The Vernam cipher encrypts data by applying the XOR (exclusive OR) operation between each byte of the message and the corresponding byte of a key. Because XOR is reversible, applying the same key again restores the original text.
In this tool, encrypted binary data is automatically encoded as Base64 so it can be copied, stored, and transferred safely as text. During decryption, Base64 is decoded first and then XOR is applied using the same key.
For maximum security, the key should be random, at least as long as the message, and used only once. When a shorter key is reused, the cipher still demonstrates XOR encryption but no longer provides the security guarantees of a true One-Time Pad.
The Vernam cipher is historically important because it introduced the XOR principle that later became the foundation of many modern stream cipher designs.