A cryptography student has accidentally used the same keystream to encrypt two different messages, 𝑀1 M 1 and 𝑀2 M 2 . We know that the ciphertexts are 𝐶1=0𝑥𝑑45𝑏63𝑑𝑑3𝑑𝑓604𝑐2 C 1 = 0 x d 45 b 63 d d 3 d f 604 c 2 and 𝐶2=0𝑥56𝑑𝑒𝑏𝑓1𝑓49𝑓7𝑑1𝑓𝑒 C 2 = 0 x 56 d e b f 1 f 49 f 7 d 1 f e . We also happen to know that 𝑀1=0𝑥𝑎4329136𝑑26𝑏2𝑐54 M 1 = 0 x a 4329136 d 26 b 2 c 54 . a) What is 𝑀2 M 2 in hexadecimal? Please give your answer a leading 0x and use lowercase letters only. b) What is the keystream? Please give your answer a leading 0x and use lowercase letters only. Hint: These are all 8 byte numbers and will fit in an unsigned long type on most systems.
Transcribed text From Image:
Expert Chegg Question Answer:
a) A message can be recovered with the help of XOR operation if two messages are encrypted by the using the same keystream.
Once we get (M1 XOR M2) we can easily recover M2 since we already know M1. All that we need to do is another XOR with M1.
First calculating C1 XOR C2 by using an online XOR calculator: –
Now, determining M2 = (C1 XOR C2) XOR M1, that is: –
b) In the same way, the keystream can be recovered by performing the XOR operation on any Ciphertext & corresponding message: –