Show how an adversary capable of eavesdropping messages exchanged between A and B can recover the original message M.
B receives message M1 which is XOR of M and random key of A RA
M2 = M1 XOR RB
M1 = M XOR RA
Substituting this value in M2 -> M2 = (M XOR RA) XOR RB
M2 XOR RB = (M XOR RA) XOR (RB XOR RB)
= (M XOR RA) XOR 0
= M XOR RA
Again using XOR operator on RA, we get
M2 XOR RB XOR RA = M XOR (RA XOR RA) = M XOR 0
And M2 XOR RA = M3, therefore we get M2 XOR RB = M, thus we are able to recover the message M
A student recently invented a simple protocol for sending a message securely from A to B...