Exhibit 12 of 172 19th Century

Running Key Cipher

A book-length key removes short repetition, but keeps language patterns

Source text identification · Statistical analysis

InventorNo single inventor established here
YearHistorical running-key family
Key TypeFull-length key text (book or speech)
Broken BySource text identification · Statistical analysis
Modern LessonA long key is not necessarily a random key

Why This Matters

A running key replaces Vigenère’s short repeating keyword with a long passage. Removing that short period does not make the key random: natural language remains biased and structured. A book passage therefore does not give the perfect secrecy of a one-time pad.

Historical Context

The running key cipher applies Vigenère's arithmetic but replaces the short repeating keyword with a message-length passage from a pre-agreed text — a book, a speech, or a newspaper article. Kasiski's usual search for a repeated keyword period is no longer the same route to an attack. Accidental repetitions can still occur, and the structure of the plaintext and key text remains available to statistical analysis.

A shared book offers an inconspicuous source of key material: both parties need the same edition and an agreed starting position. It does not provide a secret, uniformly random, independent pad, and sharing the book does not remove the need to manage those choices securely.

How It Works
Plain: ATTACKATDAWN
Key:   FROMTHISBOOK
Cipher: each letter shifted by key letter

A+F=F, T+R=K, T+O=H, A+M=M,
C+T=V, K+H=R, A+I=I, T+S=L...

An attacker can test guesses for the source passage and starting position. Even without finding the book, statistical attacks can exploit language patterns in both the plaintext and key. Keeping the source unidentified is therefore not a sufficient security condition.

From this book we take our key text ⇓ key source Plain: A T T A C K A T Key: F R O M T H I S Cipher: F K H M V R I L Key = book text Key length = msg length But NOT random → NOT a one-time pad
Book text used as a key matches message length — but English letter patterns make it weaker than a true one-time pad
How It Was Broken
Source Text Attack
Complexity: Depends on the candidate sources and positions

If an attacker identifies the edition and passage used for the key, they can reconstruct that keystream and decrypt the message. A likely book title narrows the search, but the starting position and text preparation still matter.

Statistical Cryptanalysis
Complexity: Hard

Even without knowing the source, the key text has English statistical structure. Both the plaintext and key obey English letter frequencies. This creates detectable second-order patterns that sophisticated statistical attacks can exploit — making the running key cipher weaker than a true one-time pad.

What It Teaches Modern Cryptography
Concept from Running Key CipherModern Evolution
Key length = message lengthNecessary but not sufficient for a one-time pad: its secret key must also be uniformly random, independent of the message, and used only once
Non-repeating keyModern stream constructions must avoid reusing keystream under their specified key-and-nonce rules
Key source = security weaknessTrue randomness: OTP keys must be random, not drawn from patterned text

Reading: Joshua Holden, The Mathematics of Secrets: Cryptography from Caesar Ciphers to Digital Encryption (2017), §5.1 on running-key attacks and §5.2 on one-time pads. A long key and a uniformly random key are different requirements.

Quick Facts
Exhibit12 of 172
Era19th Century
TrustBroken
InventorNo single inventor established here
YearHistorical running-key family
Key TypeFull-length key text (book or speech)
Broken BySource text identification · Statistical analysis
← Previous Gronsfeld Cipher