The Beale Cipher is a set of three ciphertexts that allegedly reveal the location of a hidden treasure buried in the United States in the early 19th century. Only one of the three ciphers, commonly referred to as Beale Cipher #2, has been solved, revealing the treasure’s contents using a book cipher method. The Beale Cipher demonstrates early use of substitution based on external text sources, linking it conceptually to other systems like the Letter Number Substitution and Simple Substitution Cipher.

In a book cipher, the key is an agreed-upon text, such as a published book, from which numbers in the ciphertext are mapped to letters. Each number in the ciphertext corresponds to the position of a letter in the key text, creating a reproducible but concealed substitution. Traditionally, the Beale Cipher was allegedly used with the United States Declaration of Independence, which is preloaded here as the default keyword book.

Beale Cipher: Encoding

To encode a message using the Beale method, choose a key text and replace each plaintext letter with the position number of that letter in the text. For example, using the pangram “THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG” as the key, the word “HELLO” encodes as:

Plaintext: HELLO
Key text positions: H=2, E=3, L=36, L=36, O=13

Ciphertext: 2 3 36 36 13

The positions depend entirely on the chosen key text, so the same plaintext will produce different ciphertexts with different books.

Beale Cipher: Decoding

Decoding requires the exact key text. Each number in the ciphertext is mapped back to the corresponding letter at that position in the key:

Ciphertext: 2 3 36 36 13
Key text: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

Decoded letters: H E L L O
Plaintext: HELLO

Without the key text, the ciphertext is essentially undecipherable, which explains why two of the Beale ciphers remain unsolved.

Beale Cipher: Notes

The Beale Cipher exemplifies an early form of a book cipher, a type of substitution cipher where numbers correspond to letters from an external key source. It differs from ciphers like the A1Z26 Cipher or the Baconian Cipher by relying on an external text for mapping rather than a fixed algorithm. The use of a historical document such as the Declaration of Independence adds both intrigue and a real-world example of key-dependent encoding. Its combination of secrecy, reliance on a key document, and historical mystery has made it a classic example in the study of cryptography and steganography.

Beale Cipher