OTP
One Time Pads (OTP)¶
Cipher-text is XORed with a random key that is shared between Alice and Bob.
k1 k1
| |
P1 ->(XOR) ->C1 ->(XOR) -> P1
Real OTP are hard to implement as the key is as long as the plain-text and if you had a secure way to transmit the key you could just sent the message instead.
Attacks on OTP¶
Perfectly secure if the key is secure random and is at least as long as the plain-text.
Reusing the OTP is also not good
C1 (XOR) C2 = (P1 (XOR) k) (XOR) (P2 (XOR) k)
= P1 (XOR) P2 (XOR) k (XOR) k
= P1 (XOR) P2 (XOR) 0
= P1 (XOR) P2