10 Famous Ciphers and How They Work
In 1587, Mary, Queen of Scots was executed after her encrypted letters were intercepted and decoded. Her cipher looked secure. It wasn't. Codebreaker Thomas Phelippes cracked it using frequency analysis — a technique first described by the Arab scholar al-Kindi in the 9th century.
Ciphers have decided the fates of queens and nations. Here are 10 famous ones and how they work.
The Counterintuitive Truth: Complicated-Looking Ciphers Can Be the Weakest
A cipher filled with strange symbols looks unbreakable. But if each symbol always stands for the same letter, it can often be cracked with pencil and paper by counting how often symbols appear.
We call this symbol camouflage: making a cipher look hard without making it mathematically strong.
1. Caesar Cipher
How it works: Shift each letter a fixed number of places.
Example (shift 3): ATTACK → DWWDFN
Weakness: Only 25 possible shifts.
Read Caesar Cipher Explained With Examples.
2. Atbash
How it works: Reverse the alphabet (A↔Z, B↔Y). Origin: Used for the Hebrew alphabet in ancient texts. Weakness: No key at all.
3. ROT13
How it works: Caesar shift of 13. Applying it twice returns the original. Use: Hiding spoilers and punchlines online.
4. Simple Substitution
How it works: Replace each letter with another letter or symbol. Examples: Pigpen, Wingdings, Tom-Tom Code Weakness: Frequency analysis — E is the most common letter in English.
5. Vigenère Cipher
How it works: Uses a keyword to apply different Caesar shifts to each letter. Nickname: Le chiffre indéchiffrable ("the indecipherable cipher") Broken: Methods published by Friedrich Kasiski in 1863 (Charles Babbage had also cracked it earlier but didn't publish).
6. Polybius Square
How it works: Letters placed in a 5×5 grid; each letter becomes a pair of coordinates. Origin: Described by the Greek historian Polybius.
7. Rail Fence
How it works: Write letters in a zigzag across "rails," then read row by row. Type: Transposition — letters are rearranged, not replaced.
8. Playfair Cipher
How it works: Encrypts pairs of letters using a 5×5 key grid. History: Invented by Charles Wheatstone in 1854, promoted by Lord Playfair, and used by British forces in wartime.
9. Enigma Machine
How it works: Electromechanical rotors change the substitution with every keypress. History: Used by Germany in WWII; broken by Polish mathematicians and later at Bletchley Park.
10. One-Time Pad
How it works: A random key as long as the message, used once. Strength: Mathematically unbreakable when used correctly. Weakness: Distributing and protecting keys is difficult.
Why Some Codes Are Easy to Decode
| Weakness | Example |
|---|---|
| Small key space | Caesar (25 shifts) |
| Same substitution every time | Pigpen, Wingdings |
| Patterns in language | Frequency of E, T, A |
| Reused keys | Short Vigenère keywords |
| Human mistakes | Predictable message openings |
We call these pattern leaks: tiny regularities that let codebreakers in.
Try Ciphers Yourself
Cipher Studio lets you experiment with classic ciphers like Caesar, ROT13, Atbash, Vigenère, and Enigma — and chain them with encodings like Base64, binary, or Morse. Everything runs in your browser.
Related encodings:
What Experts Say
Simon Singh, in The Code Book (1999), describes the history of cryptography as an evolutionary arms race: each new cipher inspires new codebreaking methods, which in turn inspire stronger ciphers.
Where Ciphers Are Heading
Modern encryption faces a new challenge: quantum computers could break some current public-key systems. We predict post-quantum cryptography will become standard in everyday apps over the next decade, continuing the codemaker-codebreaker race that started with Caesar's shifted letters.