Choose an encoding
The encoding determines how characters are converted into bits
| Char | Code | Bits |
|---|
The Vernam cipher (one-time pad) is an encryption method that is theoretically unbreakable under three conditions: the key is random, equal in length to the message, and used only once.
Message characters are converted into bits. Available encodings: Baudot code (5 bits/char), ASCII 7/8 bit, UTF-8 (variable length). The character table updates dynamically.
The text is converted into a bit sequence according to the selected encoding. Unsupported characters are highlighted with a warning.
The key is generated randomly (0/1 with equal probability). Length options: 64–2048 bits or "Match message length" (a true one-time pad). If the key is shorter than the message, it repeats cyclically (reducing security).
Each message bit is combined with a key bit using exclusive OR (XOR): 0⊕0=0, 0⊕1=1, 1⊕0=1, 1⊕1=0. Modes: step-by-step (visualizing the bitwise operation) or instant.
Bob applies the same key to the ciphertext using XOR: ciphertext ⊕ key = original message. Thanks to XOR's reversibility, this operation is identical to encryption.
The decrypted bits are converted back into characters. The user chooses a decoding encoding — the system checks the result against the original message and shows a preview.
Final comparison: original message, key (HEX), ciphertext (HEX), decrypted text. On a successful match, a confirmation and statistics are shown.
Visualization legend:
● Message / result | ● Key | ● Ciphertext | ⊕ XOR operation
Important: In real cryptography the key must be truly random, never reused, and transmitted over a secure channel. This demo is an educational model.
The encoding determines how characters are converted into bits
| Char | Code | Bits |
|---|