How do I decode a secret message or unknown cipher?
Verdict summary
First identify the type: numbers often mean a book cipher or a letter-number substitution, symbols suggest a substitution or pigpen cipher, and shifted letters suggest a Caesar or Vigenère cipher. Then test it: frequency analysis breaks simple substitutions, and tools such as CyberChef, dCode or PinPoint Treasure's cipher engine try common methods automatically.
Write down exactly what you see, including spaces, line breaks and repeated groups; repeated groups are the biggest clue. Personal notes in old notebooks are often shorthand rather than a cipher.
Some famous ciphers, such as two of the three Beale ciphers, have never been solved, and may not be real ciphers at all.
Frequency analysis, step by step: count how often each symbol appears and compare with English, where E, T, A, O, I, N, S and R are the most common letters. In a simple substitution the most common symbol is often E. Short messages are unreliable, so test guesses on common words such as THE and AND rather than trusting the counts alone.
If the counts come out flat, it is probably not a simple substitution. A Vigenère-type cipher spreads letters out; the index of coincidence (about 0.066 for English, about 0.038 for random letters) and Kasiski's method of measuring the gaps between repeated groups estimate the key length. Each column can then be solved as a simple shift.
Numbers in pairs or groups usually point to a grid (Polybius square), a letter-number code (A=1), or a book cipher, where each number points to a word in a source text. A book cipher cannot be solved without the right book.
Sources: Classical cryptanalysis methods; University of Southampton, MATH1001 notes: Frequency analysis; Index of coincidence (Friedman).
Has the Zodiac cipher been solved? Partly. The Zodiac Killer's 408-character cipher was solved in 1969 by Donald and Bettye Harden, and the 340-character cipher was solved in December 2020 by David Oranchak, Sam Blake and Jarl Van Eycke. The shorter 13- and 32-character ciphers remain unsolved.
Has the Beale treasure been found? No. The Beale treasure, said to be buried in Bedford County, Virginia, has never been found. Its story comes from an 1885 pamphlet with three ciphers. Only the second has been solved, using the Declaration of Independence as the key, and many researchers consider the whole story a hoax.
Primary sources cited
- Classical cryptanalysis methods
- University of Southampton, MATH1001 notes: Frequency analysis
- Index of coincidence (Friedman)