This shows you the differences between two versions of the page.
|
ic:laboratoare:02 [2020/10/07 20:31] acosmin.maria |
ic:laboratoare:02 [2020/10/19 14:38] (current) acosmin.maria |
||
|---|---|---|---|
| Line 116: | Line 116: | ||
| def main(): | def main(): | ||
| - | |||
| - | cipher = '021e0e061d1694c9' | ||
| - | crc_s1 = '8e31' | ||
| # Plaintexts | # Plaintexts | ||
| s1 = 'floare' | s1 = 'floare' | ||
| s2 = 'albina' | s2 = 'albina' | ||
| - | |||
| - | s1_xor_s2 = strxor(s1, s2) | ||
| - | crc_s2 = '54ba' # hex_xor(crc_s1, crc_s1_xor_s2) | ||
| - | |||
| G = '' # To find | G = '' # To find | ||
| - | C1 = cipher[:-4] | ||
| - | C2 = cipher[-4:] | ||
| # Obtain crc of s1 | # Obtain crc of s1 | ||