Breaking Classical Ciphers
Frequency analysis, Vigenère, XOR, and the one cipher that can't be broken.
Historic ciphers fell to statistics. Breaking them by hand teaches the core idea of cryptanalysis: any pattern that survives encryption is a weakness.
1
Frequency analysis and Vigenère
In English text some letters are far more common than others. E is the most frequent (about 12%), then T, A, O. In a substitution cipher, the most common ciphertext letter probably stands for E.
The Vigenère cipher defeats simple frequency analysis by using a keyword: each letter is shifted by the matching key letter (A = 0, B = 1, ...), repeating the key.
plaintext: A T T A C K A T D A W N key: L E M O N L E M O N L E ciphertext: L X F O P V E F R N H ROnce you find the key length (Kasiski examination looks for repeated sequences), each column is just a Caesar cipher again.
2
XOR and the one-time pad
XOR (
⊕) compares bits: 1 if they differ, 0 if they're the same. Key facts:x ⊕ x = 0x ⊕ 0 = x(m ⊕ k) ⊕ k = m: XOR with the same key twice gives the message back
A one-time pad XORs the message with a truly random key as long as the message, used once. It is proven unbreakable. Reuse the key even once and it falls apart:
c1 ⊕ c2 = m1 ⊕ m2, and the key disappears.
⚑ Report a problem with this room
Log in to report a problem.