Vernam Cipher (One Time Pad)

​
message
We need to protect ourselves.
bits in OTP
2000
key
encrypt
decrypt
{0,1,1,1,1,0,0,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,0,1,1,1,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,0,0,1,1,1,0,0,1,1,1,0,1,0,0,0,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,1,0,0,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,0,1,1,1,0,0,1,0,1,0,0,0,1,1,0,0,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,1,1,0,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,1,1,1,1,0,0,1,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,0,0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,1,0,1,0,1,1,0,0,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,0,0,1,0,1,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,1,1,0,1,1,0,1,1,0,1,0,1,1,1,0,1,1,0,0,1,1}
This Demonstration:
• generates a random bit key for both sender and receiver of the Vernam cipher
• provides a simple way to encrypt and decrypt messages in various Unicode-supported languages

External Links

Cipher (Wolfram MathWorld)
Secret Codes in The Wolfram Demonstrations Project (But No Dinosaurs) (Wolfram Blog)

Permanent Citation

Rudolf Muradian
​
​"Vernam Cipher (One Time Pad)"​
​http://demonstrations.wolfram.com/VernamCipherOneTimePad/​
​Wolfram Demonstrations Project​
​Published: March 7, 2011