Wordwell.

How to Crack a Cryptogram: The Method, With a Little History

A substitution cipher looks unbreakable and falls apart in ten minutes. The trick is eleven hundred years old, and anyone can learn it.

By the Wordwell team · · 4 min read

A cryptogram swaps every letter of a message for a different one. There are more possible ways to do that than there are grains of sand on every beach on Earth, by a very wide margin. Trying them all is out of the question.

And yet a child with a pencil can break one in ten minutes. The reason is that the code hides the letters but not their habits.

The idea that breaks it

In the ninth century an Arab scholar in Baghdad, al-Kindi, wrote a short work on deciphering secret messages. His insight was simple. In any language, some letters are used far more than others. If you count the symbols in a coded message, the commonest symbol probably stands for the commonest letter.

That is called frequency analysis, and it has been the first tool of codebreakers ever since.

For English, the letter to look for is E. After it come T, A and O. Near the bottom are J, Q, X and Z.

It turns up in fiction

Edgar Allan Poe built a whole story around the method. In "The Gold-Bug", published in 1843, a character deciphers a pirate's note by counting symbols, and explains every step to the reader. Poe was fascinated by ciphers and had challenged newspaper readers to send him ones he could not solve.

Sixty years later Arthur Conan Doyle gave Sherlock Holmes the same job in "The Adventure of the Dancing Men", where the letters are replaced by little stick figures. Holmes begins exactly as al-Kindi advised: he finds the commonest figure and calls it E.

A method you can follow

Here is how we would attack the Cryptogram on Wordwell. Each puzzle is a familiar proverb, and two letters are given to start.

  1. Find the commonest coded letter. Tap a letter and every copy of it lights up, which makes counting easy. Pencil it in as E.
  2. Look at the one-letter words. In English, a word of one letter is A or I. Nothing else.
  3. Look at the two-letter words. The usual ones are IS, IT, IN, OF, TO, AS, AT, BE, ON and WE. If you already have one letter, the other is nearly forced.
  4. Find THE. A three-letter word that appears more than once, or stands at the start, is very often THE. That hands you T and H, and confirms E.
  5. Check the doubles. A doubled letter is most likely LL, EE, SS, OO or TT.
  6. Read the gaps. Once a third of the letters are in, stop counting and start reading. A pattern such as T_E EA_L_ B__D is not hard to finish.

When the count misleads you

Frequency is a tendency, not a law. A proverb is short, and short messages can be odd. The commonest letter might be T or A, not E.

So treat every guess as a pencil mark. In our game a plain letter can only be used once, so entering it somewhere new removes it from the old place. Nothing is lost by being wrong.

The surest check is whether real words appear. If your guesses produce a word like "QZE", something is off. Back up.

Use what you know about proverbs

There is one more clue that a codebreaker would envy. You know what kind of message it is.

Proverbs have favourite shapes. Many open with A or THE. Many contain IS or ARE in the middle. Plenty begin with a command: LOOK, MAKE, NEVER, DO NOT. And they are sayings you have heard. With half the letters in place, the whole line often arrives at once.

That last step is the pleasure of the thing. For five minutes you count and reason, and then your memory finishes the job in a flash.

The simpler cousin

If a full substitution feels like too much, start with the Shift Cipher. There, every letter has been moved the same number of places along the alphabet. Julius Caesar is said to have used a shift of three for his private letters.

It has only twenty-five possible keys, so it can always be broken by trying them. It is more fun to work it out: find a one-letter word, assume it is A, count the distance, and go straight to the answer.

Why bother?

Because it is one of the few HTML5 games that lets you feel like a detective for honest reasons. The technique is real. It is the same one that broke real ciphers for the best part of a thousand years.

It will not help you with modern encryption, which is built precisely to defeat this kind of attack. But for a proverb in a simple code, a count and a guess are all you need.