Special Exhibit Β· The Science of Breaking Codes

Cryptanalysis Techniques

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

Seven techniques that break almost every classical cipher in this museum β€” from Al-Kindi's frequency tables (850 AD) to modern hill-climbing algorithms.

Open Codebreaker's Workbench β†’
The Toolkit

7 Techniques That Break Classical Ciphers

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.

Chart showing English letter frequency distribution used in cryptanalysis
English letter frequency distribution β€” the foundation of frequency analysis attacks. Illustration: Google Gemini AI
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.

Diagram illustrating the Kasiski examination technique for breaking Vigenère ciphers
Kasiski examination — finding repeated ciphertext sequences to determine Vigenère key length. Illustration: Google Gemini AI
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.

Diagram explaining the Index of Coincidence technique used to distinguish encrypted text from natural language
Index of Coincidence β€” measuring statistical deviation from random to determine cipher type and key length. Illustration: Google Gemini AI
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.

Diagram illustrating the crib-based cryptanalysis method used to break Enigma by exploiting known plaintext patterns
Crib-based cryptanalysis β€” exploiting predictable message headers and standard phrases to break machine ciphers. Illustration: Google Gemini AI
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.

Diagram showing how a known plaintext attack derives cipher keys from matched plaintext-ciphertext pairs
Known plaintext attack β€” using matched plaintext-ciphertext pairs to recover the encryption key. Illustration: Google Gemini AI
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.

Diagram showing the hill climbing search algorithm iteratively improving cipher key guesses to break substitution ciphers
Hill climbing search β€” iteratively refining key guesses by scoring decrypted output against English language statistics. Illustration: Google Gemini AI
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.

Diagram illustrating simulated annealing and genetic algorithm optimization techniques used in modern cryptanalysis
Simulated annealing β€” escaping local optima to find the global best key through controlled randomness. Illustration: Google Gemini AI
⚑

Speed comparison: A Vigenère with a 5-letter key that took weeks in the 1800s is cracked in under one second today. Monoalphabetic substitution falls in milliseconds.

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.