Skip to content
Cipherloom密码织机

CIPHER/SUBSTITUTION/BOOK CIPHER

Book Cipher

Published 2 Oct 2026 · · 7 min read

A book cipher replaces the alphabet with a book. Every letter is written as a position — page, line, word, letter — and the receiver looks it up. The method requires no mathematics, no memorised square and no equipment, which is why it recurs whenever people need to communicate secretly with nothing but what is already in the room.

Era
Medieval
Type
Substitution
Key space
the shared volume
Level
Field
Cipher loom plate: Book Cipher
plate book-cipher · Substitution

IPhenomenon

Two people agree on an edition. The numbers 14.2 mean the fourteenth word, second letter of that word — or, in the fuller convention page.line.word, three numbers per letter.

Both parties must hold the same edition, not merely the same title. Page numbering differs between printings; a pocket edition and a folio do not agree. This is the method's defining practical constraint.

ConventionWritten asDigits per letter
page.line.word.letter214.07.11.38-12
line.word.letter214.34-6
word.letter (single fixed page)14.22-4
running index into one page of text612

The last row is what the bench beside this entry uses: one fixed string of letters stands in for the page, and each letter is written as the index of the matching character. It is not how a real book cipher is written, but it exposes exactly what the technique depends on — that both parties hold an identical, indexed object.

IIKey space

The key space is the set of books two people might both own, and it is not searchable in any useful sense. But that is not the same as being strong.

Consider what the attacker needs. They need the book. If they capture the book, they do not need to break anything at all — the ciphertext becomes a lookup table. If they do not capture the book, they can still exploit the fact that the numbers have structure: the first number in each group varies slowly across a page, and the last varies quickly. That structure is a fingerprint.

A cipher whose key is a public object held by two people has a security level equal to the secrecy of the correspondence, not the secrecy of the algorithm.

Related historical difficulty: running out of the agreed edition. Armies moved, libraries burned, and a cipher that cannot be used is worse than a cipher that can be broken.

IIIEnciphering

  • Agree on an exact edition with your correspondent, and record the printing details so both of you can verify them.
  • Choose the position convention: page, line, word, letter, or some shorter form. Fix it in writing before the first message.
  • Write the plaintext. Remove anything the convention cannot express — punctuation, digits, accents — or agree on a spelled-out substitute.
  • For each letter, find an occurrence of that letter in the book and record its position.
  • Join the positions into groups, using a separator to keep multi-digit numbers readable.
  • Do not reuse the same occurrence for two different letters in the same message if you can avoid it; reuse reveals structure.

IVDeciphering

  • Take the agreed edition in hand and check the printing details against the record.
  • Split the ciphertext into position groups using the agreed convention.
  • For each group, find the page, then the line, then the word, then the letter.
  • Write the letters in order. Word boundaries are recovered from context, not from the ciphertext.
  • If a group produces a letter that makes no sense, look for the two most common causes in order: a mis-recorded position and the wrong edition. Check the edition first, because it is cheaper.
  • Expect roughly one error per hundred positions under field conditions, and plan the message length accordingly.

VWeakness

Edition mismatch breaks it silently. A different printing produces wrong letters and plausible-looking nonsense, and the receiver cannot tell a wrong edition from a transmission error.

The number structure leaks. Long runs of slowly-rising first numbers tell the analyst that a page-based scheme is in use, and roughly how long the page is.

Capture of the book is total and immediate. There is no equivalent of a partial break; the whole correspondence becomes plaintext at once.

It is slow and error-prone to use. Looking up several hundred positions in a physical book, under time pressure, produces mistakes. Every re-send doubles the material available to the attacker.

It cannot be rotated without reissuing physical objects. Changing the book means physically delivering a new book to every correspondent, which is the same problem the nomenclator had, and it has the same answer: use a one-time pad instead.

VIPractice

Ciphertext

1 2 3 29 11 11 19 8 3 3 20 21 6 1 21 11 12 13 7 11 5 13 21 3 29

Hint: One fixed line of text is the book. Positions are 1-based indices into that line.

Reveal the answer

Plaintext

THE LOOM KEEPS ITS OWN COUNSEL

This entry is historical and educational. It is not guidance for circumventing the security of any system in use today, and it is not professional advice.

·History note

Book ciphers appear in the American Civil War, in nineteenth-century Russian revolutionary correspondence, and in both world wars. The most famous failure is the 1918 Zimmermann Telegram, in which German Foreign Secretary Arthur Zimmermann proposed a Mexican alliance against the United States: British cryptanalysts at Room 40 had partially reconstructed the German diplomatic codebook, and once they obtained a copy of the telegram from a Mexican telegraph office, they could read it in full. The book had been captured, in effect, and the resulting disclosure helped bring the United States into the war.

·Further reading

The book cipher is the clearest demonstration in this collection that cryptography is a systems problem. The algorithm here is trivial — a lookup. The failure modes are all operational: procurement, distribution, version control, and the training of the people doing the lookup.

Modern equivalents are easy to spot once you know what to look for: hard-coded keys in firmware, shared secrets in a wiki, a single API token copied into twelve services. The algorithm is strong; the operational model is a book cipher with worse version control.

Next on the loom: alberti-disk — the first device designed to change the substitution while the message is being written.

+Weave into