Special Exhibit Β· The Science of Breaking Codes

Cryptanalysis Lab

"To know how to defend, you must first know how to attack."

Every cipher in this museum was eventually broken. This lab explains the techniques used β€” from Al-Kindi's frequency tables in 850 AD to the electromechanical Bombe machines at Bletchley Park. Twelve of the most famous codebreaks in history. Seven techniques that break almost every classical cipher ever invented.

Open Codebreaker's Workbench β†’
The Toolkit

7 Techniques That Break Classical Ciphers

Modern solvers combine all seven. A Vigenère cipher that took weeks in 1800 now falls in under one second.

Technique 01
Frequency Analysis
Al-Kindi Β· Baghdad Β· ~850 AD

Languages have predictable letter frequencies. In English, E=12.7%, T=9.1%, A=8.2%. Any cipher that maps one letter to one symbol preserves these frequencies. Count the symbols, compare to known frequencies, recover the key.

Technique 02
Kasiski Examination
Friedrich Kasiski Β· 1863

In a Vigenère cipher, the same plaintext + same key position = same ciphertext. Identical repeated strings in the ciphertext reveal probable key length. Their spacing is likely a multiple of the key length.

Technique 03
Index of Coincidence
William Friedman Β· 1920

Measures statistical similarity to natural language. English text has an IC of ~0.066. Random text has ~0.038. A polyalphabetic cipher produces values between these β€” and the IC can reveal the key length without finding repeated strings.

Vigenère Running Key Polyalphabetic
Technique 04
Crib-Based Cryptanalysis
Polish Mathematicians Β· WWII Bletchley

Guess probable plaintext words called "cribs" β€” military messages often start with standard phrases. The Enigma was broken partly because operators always began with WETTER (weather), HEIL HITLER, or ANX (a header). Known structure is a fatal weakness.

Technique 05
Known Plaintext Attack
Universal Β· Classical through Modern

When some plaintext is known, the key can often be derived directly. The Hill cipher's matrix key is recoverable with just two known plaintext-ciphertext pairs by solving a system of linear equations. Enigma used weather forecasts as cribs.

Technique 06
Hill Climbing Search
Modern Β· Computer Era

Start with a random key. Decrypt. Score the result using English language statistics β€” common digrams like TH, HE, IN. Make random changes to the key. Keep improvements, discard downgrades. Repeat millions of times. Works against substitution, Playfair, transposition.

Substitution Playfair Transposition
Technique 07
Simulated Annealing / Genetic Algorithms
Modern Β· AI-Assisted

Advanced optimization heuristics that explore key space more broadly than pure hill climbing. Genetic algorithms evolve populations of candidate keys. Simulated annealing occasionally accepts worse solutions to escape local optima. Breaks double transposition, Playfair, Hill cipher in seconds.

⚑

Speed comparison: A Vigenère cipher with a 5-letter key that took professional cryptanalysts weeks in the 1800s is now cracked by modern programs in under one second. A monoalphabetic substitution cipher that kept Renaissance diplomats safe for decades falls in milliseconds. This is why modern cryptography uses mathematical problems believed to require billions of years, not minutes.

Hands-On

Try the Techniques

Apply cryptanalysis tools to real ciphertext.

IC = Ξ£ ni(niβˆ’1) / N(Nβˆ’1)  Β·  β€”

Letter Frequencies (gold = input, outline = English)

Historical Record

12 Famous Codebreaks in History

The moments that changed wars, toppled spies, and birthed the computer.

850 AD
Al-Kindi Breaks Substitution
Al-Kindi Β· Baghdad
Technique: Frequency Analysis

First documented scientific cryptanalysis. Introduced statistical analysis to codebreaking. Every cipher for the next 400 years was vulnerable.

1850s
Babbage Breaks Vigenère
Charles Babbage
Technique: Repeating Sequence Analysis

Ended the myth of the "indecipherable cipher." Babbage kept his method secret; Kasiski published it in 1863 and received the credit.

1863
Kasiski Publishes the Method
Friedrich Kasiski
Technique: Pattern Repetition Analysis

First widely published method for breaking polyalphabetic ciphers. European diplomatic Vigenère systems collapsed.

1932
Polish Mathematicians Break Enigma
Rejewski, RΓ³ΕΌycki, Zygalski Β· Warsaw
Technique: Permutation Analysis Β· Known Plaintext

Created the first Enigma-breaking machines. Passed their work to Britain and France just before WWII began β€” giving Bletchley Park a head start.

1940
Friedman Breaks Japanese Purple
William Friedman Β· Washington DC
Technique: Statistical Analysis Β· Machine Reconstruction

The US could read Japanese diplomatic traffic before Pearl Harbor. The diplomatic warning was there β€” the military intelligence chain failed to act on it.

1970s
DES Differential Weakness Found
Eli Biham Β· Adi Shamir
Technique: Differential Cryptanalysis

Showed theoretical weaknesses in DES block cipher design. Revolutionized how cryptographers design and evaluate cipher strength.

WWII
Bletchley Park Breaks Enigma
Alan Turing Β· Gordon Welchman
Technique: Crib Attacks Β· Electromechanical Bombe

Shortened WWII by an estimated 2–4 years. The Bombe machine tested thousands of possible Enigma settings per minute, exploiting known plaintext cribs.

1943
Lorenz Cipher Broken with Colossus
Bill Tutte Β· Tommy Flowers
Technique: Known Plaintext Β· Early Computer Search

Led to the creation of Colossus β€” the world's first programmable electronic computer. The direct ancestor of modern computing was built to break a cipher.

1943–80
VENONA: Soviet OTP Cracked
US Army Signal Intelligence
Technique: Key Reuse Exploitation

Soviet operators reused one-time pad key material under wartime pressure. VENONA decoded thousands of messages and exposed Julius Rosenberg and other Soviet spies in the US.

1993
Linear Cryptanalysis vs DES
Mitsuru Matsui
Technique: Linear Cryptanalysis

Found linear approximations of DES S-box operations, reducing the work to break DES from 2⁡⁢ to 2⁴³. Accelerated the case for replacing DES with AES.

1996
RSA Timing Attack
Paul Kocher
Technique: Side-Channel Timing Analysis

Broke RSA implementations by measuring how long decryption took. The math was fine β€” the implementation leaked secrets through time. Side-channel security became a new discipline.

2017
SHA-1 Collision (SHAttered)
Google Β· CWI Institute
Technique: Collision Attack

Produced two different PDF files with the same SHA-1 hash. Forced the entire internet to migrate from SHA-1 to SHA-256 and SHA-3. Cryptographic hash functions are not forever.

πŸ”

The Big Pattern: Most famous codebreaks succeeded not from pure mathematics, but from human mistakes (reused OTP keys, predictable message headers), protocol flaws (Enigma operators sending the same message twice), and implementation errors (RSA timing leaks). The math is often the last thing that fails. This is as true today as in Caesar's time.