The XOR operation that underpins every modern stream cipher — patented in 1917
Gilbert Vernam’s 1917 XOR-based teleprinter cipher is the direct ancestor of every modern stream cipher. ChaCha20, AES-CTR, and AES-GCM all use the same XOR operation he patented over a century ago.
Gilbert Vernam was an AT&T Bell Labs engineer who in 1917 patented an automatic cipher for teleprinter communications. Messages on punched paper tape were XOR'd with a key tape character by character. When Joseph Mauborgne suggested using a completely random, non-repeating key tape, they had invented the One-Time Pad — though Shannon would not prove its perfection for another 32 years.
The Vernam cipher is the direct ancestor of every modern stream cipher. ChaCha20, AES-CTR, and AES-GCM all use the XOR operation Vernam patented. The difference is that modern ciphers generate their keystream from a short key and a nonce, rather than requiring a physical tape as long as the message.
The Vernam cipher operates at the bit level using the XOR (exclusive or) operation. Each bit of the plaintext is combined with the corresponding bit of the key.
Ciphertext = Plaintext XOR Key (bitwise) H = 01001000 K = 10110100 (key byte) C = 11111100 (ciphertext) Decryption is identical: C XOR K = P (XOR is its own inverse) When key tape is: Random + same length + used once → One-Time Pad (unbreakable) Repeating or non-random → Vigenère-equivalent (breakable)
The elegance of XOR is that encryption and decryption are the same operation. There is no separate decryption algorithm — just XOR the ciphertext with the same key, and the plaintext reappears.
When key tapes were reused (common under operational pressure), XOR-ing two ciphertexts cancels the key: C1 ⊕ C2 = P1 ⊕ P2. This reduces to a running-key cipher attack. If the key was non-random (e.g. a text passage), statistical properties of the key language leak through.
VENONA: Soviet operators reused one-time pad key pages under WWII supply pressure. The same depth attack that breaks a reused Vernam tape broke thousands of Soviet intelligence messages — exposing the Rosenbergs and Klaus Fuchs.
| Concept from Vernam | Modern Evolution |
|---|---|
| XOR as cipher operation | All modern stream ciphers: C = P ⊕ keystream |
| Key tape = keystream | ChaCha20 generates 512-bit blocks of keystream per counter value |
| Reused key = catastrophic failure | Nonce uniqueness: AES-GCM fails catastrophically on nonce reuse |
| Automatic teleprinter encryption | Hardware crypto acceleration: AES-NI CPU instructions |
A short Vernam cipher message. Use what you just learned.
Key: 10101010 10101010 10101010 · Hint: XOR each bit. What do you get?
Depth attack works if any key material reused. If OTP rules followed: mathematically proven unbreakable (100%).
| Exhibit | 34 of 37 |
| Era | 1917 |
| Security | Weak if key reused |
| Inventor | Gilbert Vernam |
| Year | 1917 |
| Broken By | Key reuse / depth attack |