Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ic:laboratoare:02 [2020/10/07 20:30]
acosmin.maria
ic:laboratoare:02 [2020/10/19 14:38] (current)
acosmin.maria
Line 96: Line 96:
 ==== Bonus: Exercise 4 (2p) ==== ==== Bonus: Exercise 4 (2p) ====
  
-In class, we explained that the one-time pad is malleable (i.e. we can easily change the encrypted plaintext by simply modifying the ciphertext). We have also discussed how the CRC was a very bad idea in the design of WEP due to its linearity.+In class, we explained that the One Time Pad is malleable (i.e. we can easily change the encrypted plaintext by simply modifying the ciphertext). We have also discussed how the CRC was a very bad idea in the design of WEP due to its linearity.
  
 You are given the following ciphertext in hexadecimal:​ You are given the following ciphertext in hexadecimal:​
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
ic/laboratoare/02.1602091807.txt.gz · Last modified: 2020/10/07 20:30 by acosmin.maria
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0