Exhibit 34 of 37 1917 Weak (if key reused)

Vernam Cipher

The XOR operation that underpins every modern stream cipher — patented in 1917

InventorGilbert Vernam (AT&T Bell Labs)
Year1917
Key TypeKey tape (bitwise XOR)
Broken ByKey reuse → depth attack
Modern LessonXOR as cipher operation · nonce uniqueness

Why This Matters

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.

📜 Historical Context

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.

⚙️ How It Works

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.

💀 How It Was Broken
Depth Attack (Key Reuse)
Complexity: Moderate · When key tapes were reused

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.

🔬 What It Teaches Modern Cryptography
Concept from VernamModern Evolution
XOR as cipher operationAll modern stream ciphers: C = P ⊕ keystream
Key tape = keystreamChaCha20 generates 512-bit blocks of keystream per counter value
Reused key = catastrophic failureNonce uniqueness: AES-GCM fails catastrophically on nonce reuse
Automatic teleprinter encryptionHardware crypto acceleration: AES-NI CPU instructions
Can You Break This?

A short Vernam cipher message. Use what you just learned.

11001010 10110111 01011101

Key: 10101010 10101010 10101010 · Hint: XOR each bit. What do you get?

01100000 00011101 11110111 → plaintext bytes
Difficulty to Break
Moderate 40%

Depth attack works if any key material reused. If OTP rules followed: mathematically proven unbreakable (100%).

📋 Quick Facts
Exhibit34 of 37
Era1917
SecurityWeak if key reused
InventorGilbert Vernam
Year1917
Broken ByKey reuse / depth attack
← Previous One-Time Pad