What it is
A substitution cipher replaces each letter with another, using one mixed-up alphabet for the whole message. There are more possible alphabets than grains of sand on Earth, so you can't try them all, but letters keep their habits: E is still the most common, THE is still everywhere. In the 800s the scholar al-Kindi wrote down how to break it by counting letters. Read the Archive cards Al-Kindi Counts the Letters and The Gallows Letter.
How to encode
- Make a cipher alphabet. An easy way: write a keyword without repeated letters, then the rest of the alphabet.
- Write the plain alphabet above it; each plain letter becomes the letter below it.
Keyword MARBLE:
Plain ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher MARBLECDFGHIJKNOPQSTUVWXYZ
How to break it, step by step
- Count the letters. The most common cipher letter is probably E, then T, A, O, I and N.
- Find short words. A one-letter word is A or I. The commonest three-letter word is THE.
- Look for patterns. A doubled letter is often LL, EE, SS or OO.
- Pencil in, then check. Each guess fills that letter everywhere; keep the ones that make words.
Worked example 1: the key given
TDL AIUL BNNQ FS NOLK MT KFKL
Find each cipher letter in the bottom row of the MARBLE alphabet and read the plain letter above it: T → T, D → H, L → E.
Answer: THE BLUE DOOR IS OPEN AT NINE.
Worked example 2: no key, just counting
OCT NTTRN QMT NTO OJ OCT TQNO BQOT QIR OCT BTTNT NTOOGT OCTMT QO RPNF
The most common letter is T, so try T = E. The three-letter word OCT appears 3 times: it's THE, which also gives T and H. Fill those in everywhere, and words like NTTRN (SEEDS) and BTTNT (GEESE) show their doubled E. Keep going letter by letter.
Answer: THE SEEDS ARE SET TO THE EAST GATE AND THE GEESE SETTLE THERE AT DUSK.
Common mistakes
- Trusting frequencies on a short message. Under about 50 letters, the counts are rough; lean on words.
- Forgetting that no letter can stand for two different letters.
- Ignoring the punctuation and word lengths: they're free clues.