Vigenère Cipher
A repeating keyword hides simple frequencies but leaves periodic structure
Babbage ~1854 · Kasiski 1863
Why This Matters
The repeating-key Vigenère cipher is an important polyalphabetic system. It did not invent polyalphabetic substitution, which had earlier examples, and its analysis is one part of the longer history of cryptanalysis.
Bellaso described a related keyword-controlled polyalphabetic system in 1553. The modern repeating-Caesar-table cipher bears Vigenère’s name, although Vigenère’s 1586 work also described an autokey method. These historical constructions should not all be treated as identical tables.
Babbage developed an attack in the 1850s; Kasiski published a general method in 1863. Those milestones do not establish that every earlier message remained unread or that the cipher enjoyed an uninterrupted 300-year security guarantee.
Civil War use: Confederate communications used repeating-key polyalphabetic methods, with documented keywords including MANCHESTER BLUFF, COMPLETE VICTORY and COME RETRIBUTION. Kasiski’s publication was in 1863, after the war began; it is inaccurate to say adoption necessarily followed that public break.
The Vigenère uses a 26×26 "tabula recta" — a grid of all 26 Caesar shifts. The keyword determines which row to use for each letter:
- Write the keyword repeatedly above the plaintext
- For each plaintext letter, find its column in the tabula recta
- Find the row corresponding to the key letter above it
- The intersection is the ciphertext letter
Key: L E M O N L E M O N L E Plain: A T T A C K A T D A W N Cipher: L X F O P V E F R N H R Formula: C = (P + K) mod 26
The same plaintext letter can encrypt differently at different key positions — A becomes L, then O, then E depending on which key letter is above it. This mixes several shifted frequency distributions. The combined counts can still contain clues, and positions sharing a key letter can be analysed together.
Tabula Recta — Hover over cells to explore
Repeated ciphertext sequences can suggest alignments under a repeating key. Their distances may have factors related to the period, but accidental repetitions, multiples and short samples can mislead. A GCD is a candidate-generation tool, not a guaranteed answer.
Once the key length is known, split the ciphertext into N groups (N = key length). Each group was encrypted with the same Caesar shift. Apply frequency analysis to each group independently to recover the key letter for that position.
The fatal flaw: The keyword repeats. Every 5 letters (for a 5-letter key), the same substitution alphabet is used again. This periodicity is invisible to the eye — but mathematically detectable with enough ciphertext.
| Vigenère Concept | Modern Evolution |
|---|---|
| Multiple alphabets (key-dependent shift) | ChaCha20 derives a pseudorandom keystream from a key, nonce, and block counter; individual byte values naturally recur |
| Repeating key → detectable periodicity | Unique nonce/counter inputs prevent deliberate reuse of the same keystream block under a key, within the construction’s limits; this does not forbid repeated byte values |
| Key length determines security | A uniformly selected AES-256 key has 2²⁵⁶ possibilities; exhaustive search averages about 2²⁵⁵ trials |
| XOR-equivalent operation | Many modern stream ciphers combine bytes using XOR: C = P ⊕ keystream; Vigenère instead adds modulo 26 |
Paste Vigenère ciphertext. The tool finds repeated sequences and estimates the key length.
This is a constructed exercise using a historically documented Confederate keyword, not an authenticated wartime ciphertext. Key length: 15 letters.
Key: COMPLETEVICT… (15 letters)
Sources and Reading
Handbook of Applied Cryptography, Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone (1997), §7.3.3, p.241: repeating-key arithmetic. The Codebreakers: The Comprehensive History of Secret Communication from Ancient Times to the Internet, David Kahn (revised edition, 1996), “On the Origin of a Species”: Bellaso’s 1553 keyword-controlled system. The challenge ciphertext here was independently recalculated from its stated plaintext and key; that calculation does not authenticate wartime provenance.