The Book Cipher is a classical encryption method in which numbers in the ciphertext refer to positions within an agreed-upon text, known as the key book. Instead of substituting letters directly, the cipher uses an external document as the lookup table. Without the exact same book, edition, and formatting, the ciphertext is effectively meaningless.

Book Cipher: Encoding

By default, spaces and punctuation are excluded when counting positions. Letters are indexed sequentially as a continuous stream of characters.

Using the key text:

THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

Remove spaces before indexing:

THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG

Now encode “HELLO” by referencing the first occurrence of each letter:

Index positions:
H = 2
E = 3
L = 29
L = 29
O = 11

Ciphertext: 2 3 29 29 11

The indexing convention (letter-based, word-based, first occurrence, nth occurrence, etc.) must always be agreed upon in advance. Changing the counting method changes the ciphertext.

Book Cipher: Decoding

Ciphertext: 2 3 29 29 11
Lookup positions in:
THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG

Decoded letters: H E L L O
Plaintext: HELLO

Any difference in spacing, punctuation, capitalization rules, or indexing method will produce incorrect results. Precision is not optional in a Book Cipher — it is the entire system.

Book Cipher