This shows you the differences between two versions of the page.
sasc:laboratoare:05 [2016/03/29 00:42] sergiu.costea [SPN 3] |
sasc:laboratoare:05 [2017/03/23 19:53] (current) marios.choudary |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Lab 05 ===== | + | ===== Lab 05 - DES ===== |
Line 5: | Line 5: | ||
http://cs.curs.pub.ro/2014/pluginfile.php/13095/mod_resource/content/2/sasc_curs4_5.pdf | http://cs.curs.pub.ro/2014/pluginfile.php/13095/mod_resource/content/2/sasc_curs4_5.pdf | ||
- | ==== Exercise 1 ==== | + | ==== Exercise 1 (2p) ==== |
- | Remember DESX defined as the operation DESX( (k1,k2,k3), m) = k1 ⊕ DES(k2, m ⊕ k3). | + | Remember DESX defined as the operation DESX( (k1,k2,k3), m) = k1 ⊕ DES(k2, m ⊕ k3), |
- | Show an attack on DESX that runs in time 2<sup>120</sup>. | + | where k1, k3 have 64 bits (same as input/output of DES) and k2 has 56 bits (DES key size). |
+ | Show a brute force (exhaustive key search) attack on DESX that runs in time $O(2^{120})$. | ||
- | ==== Exercise 2 ==== | + | <note tip> |
+ | Try using a couple of (message, ciphertext) pairs and see if you can get rid of k1 | ||
+ | somehow in order to speed up a brute force attack. | ||
+ | </note> | ||
+ | |||
+ | ==== Exercise 2 (3p) ==== | ||
Show why the following schemes do not bring any real advantage compared to DES: | Show why the following schemes do not bring any real advantage compared to DES: | ||
Line 17: | Line 23: | ||
* b) c = DES(k2, m ⊕ k1) | * b) c = DES(k2, m ⊕ k1) | ||
- | ==== Exercise 3 ==== | + | <note tip> |
+ | You may use a similar approach to what you did in the previous exercise. | ||
+ | </note> | ||
+ | |||
+ | ==== Exercise 3 (5p) ==== | ||
The goal of this exercise is to implement the meet-in-the-middle attack on double DES. | The goal of this exercise is to implement the meet-in-the-middle attack on double DES. | ||
Line 232: | Line 242: | ||
main() | main() | ||
</code> | </code> | ||
- | ==== SPN 2 ==== | ||
- | |||
- | Now we have a better SPN, where the output of the permutation is XOR-ed with another 2 key bytes, as in the following figure: | ||
- | {{:sasc:laboratoare:spn_1r_full_2s.png|}} | ||
- | |||
- | - Try to find the key in this case, when given the following message/ciphertext pairs: ('Om', 0x0073), ('El', 0xd00e), ('an', 0x855b). Print the key in ascii. | ||
- | |||
- | <note tip>You may try some kind of brute-force search</note> | ||
- | |||