This shows you the differences between two versions of the page.
sasc:res:tema1 [2017/03/07 15:29] dan.dragan |
sasc:res:tema1 [2017/03/19 23:46] (current) dan.dragan |
||
---|---|---|---|
Line 5: | Line 5: | ||
Let's analyse some substitution-permutation networks (SPN). | Let's analyse some substitution-permutation networks (SPN). | ||
- | === SPN 1 (4p) === | + | === SPN 1 (3p) === |
We have the SPN from this figure: | We have the SPN from this figure: | ||
Line 236: | Line 236: | ||
</code> | </code> | ||
- | ==== SPN 2 (4p) ==== | + | ==== SPN 2 (3p) ==== |
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: | 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: | ||
Line 245: | Line 245: | ||
<note tip>You may try some kind of brute-force search</note> | <note tip>You may try some kind of brute-force search</note> | ||
- | ==== Exercise 2 (2 pct) ==== | + | ==== Exercise 2 (4 pct) ==== |
As another example, which uses a larger block size, let's use an SPN that takes a 4-byte input x=[x1 || x2 || x3 || x4] and an 8-byte key k=[k1 || k2 || k3 || k4 || k5 || k6 || k7 || k8] as in this figure: | As another example, which uses a larger block size, let's use an SPN that takes a 4-byte input x=[x1 || x2 || x3 || x4] and an 8-byte key k=[k1 || k2 || k3 || k4 || k5 || k6 || k7 || k8] as in this figure: | ||
Line 256: | Line 256: | ||
<note tip> This time you cannot (easily) do a brute-force on all the bytes of the last XOR. However, you may try to attack one S-box at a time. Think of the bits that affect one such S-box and find an efficient attack. | <note tip> This time you cannot (easily) do a brute-force on all the bytes of the last XOR. However, you may try to attack one S-box at a time. Think of the bits that affect one such S-box and find an efficient attack. | ||
</note> | </note> | ||
+ | |||
+ | ==== Bonus (4 pct) ==== | ||
+ | |||
+ | {{:sasc:res:css_enc.png|}} | ||
+ | |||
+ | Decode the following ciphertext: | ||
+ | <code> | ||
+ | '74b906c56684a5d250fe68bc09eb7ee55ffd2271b8d07d6c35a41d96e4ada74de4852d031ba080374dce7bbcaafd0a4bd4' | ||
+ | </code> | ||
+ | knowing that the first bit for both 17 bits and 25 bits LFSRs is 1 and the first 6 bytes of plaintext of the encryption are: | ||
+ | <code> | ||
+ | 'ENCRYP' | ||
+ | </code> | ||
+ | |||
+ | Please download the skeleton from here: {{:sasc:res:dvd_css.zip|}} | ||
+ |