CHIFFRE · INDÉCHIFFRABLE

The Vigenère · Square

One keyword · Twenty-six alphabets · Three hundred years unbroken
Rolling Thunder Security · Symmetric Encryption

Frequency analysis killed the single-alphabet cipher, so the obvious repair was to stop using a single alphabet. In 1553 Giovan Battista Bellaso described the scheme that history would misfile under Blaise de Vigenère's name: write a keyword over and over above the message, and let each key letter choose which of 26 Caesar alphabets encrypts the letter beneath it. The same plaintext letter now becomes different ciphertext letters depending on where it falls, and the tidy peaks that betrayed Mary, Queen of Scots, are smeared flat.

It earned the name le chiffre indéchiffrable and kept it for three centuries. Charles Babbage quietly broke it around 1854 and never published; Friedrich Kasiski published the same attack in 1863. The weakness was never the alphabets. It was the repeat: a keyword of length k means every k-th letter is enciphered with the same Caesar shift, and Caesar, as you already know, cannot survive a letter count.

I · Encipher with the square

The tabula recta is all 26 Caesar alphabets stacked up. To encipher one letter, find the row of the key letter, the column of the plaintext letter, and read the ciphertext where they cross. Type a keyword and a message and watch it happen one letter at a time. The little disc shows the same step the way a Confederate signal officer would have seen it: the inner wheel clicks round to the key letter, and it is just a Caesar wheel with a new setting every time.

Tabula Recta

Plaintext · columnKey · rowCiphertext · crossing

Key and message

Keyword
Message
Speed

Use to walk the message by hand. The key repeats as often as it must: ATTACKATDAWN under LEMON becomes LEMONLEMONLE. Notice the two Ts in ATTACK come out as different letters, and the two As in ATTACK and AT do too.

The same step on a disc

L SHIFT +11 KEY LETTER

A key letter of A is shift 0, B is 1 … Z is 25. Vigenère is nothing more than a Caesar wheel that is re-set before every letter.

II · Why the letter count fails

Here is the same passage of English three ways. A Caesar shift only slides the histogram, so the tall E-peak is still there for anyone to find. Vigenère spreads every plaintext letter across several ciphertext letters, and the peaks collapse toward a flat line. The longer the keyword, the flatter it gets; a key as long as the message and never reused is the one-time pad, and its histogram is perfectly flat.

Keyword Caesar shift3
Plaintext
Caesar ciphertext
Vigenère ciphertext

The number under each chart is the index of coincidence: the chance that two letters picked at random from the text are the same. English sits near 0.066; perfectly random letters sit at 1/26 ≈ 0.038. Caesar leaves it untouched. Vigenère drags it toward random, which is exactly the property William Friedman turned into a key-length test in the 1920s.

III · Babbage's Desk

Now break it. The method is the one Babbage and Kasiski found: look for repeated groups of ciphertext letters. When a common plaintext word such as THE happens to land under the same part of the keyword twice, it produces the same ciphertext twice, and the distance between the two copies must be a multiple of the keyword length. Find the length, and the "unbreakable" cipher falls apart into a handful of Caesar ciphers.

Intercepted ciphertext

Step 1 · Find the repeats
Step 2 · Tally the factors of every distance

Each bar counts how many repeat-distances are divisible by that number. The keyword length (and its multiples) should tower over the rest. Click a bar to choose it, or let the index of coincidence break a tie.

Key length
Step 3 · Break each column as a Caesar cipher

Every k-th letter shares one key letter. Slide each column's shift until its tallest bar lands on E (the blue bar marks where E is for the current guess), or press fit to let a chi-squared test choose the best match to English for you. Watch the plaintext appear on the right as the columns come good.

Recovered keyword·
Step 4 · Read the message

IV · What Vigenère teaches

Complexity is not security

Twenty-six alphabets sounded unbreakable. The attack never engaged with the alphabets at all; it attacked the period. Whatever repeats in a system is where the analyst starts.

Key reuse is the sin

A short keyword is a long key reused. Stretch the key to the length of the message, use it once, and you have the one-time pad, the only provably unbreakable cipher. Every stream cipher since is an attempt to fake that with a short key, and every stream-cipher disaster (WEP, reused nonces) is a key reused.

Statistics beat secrecy

Kasiski needed no key, no plaintext and no insider, only enough ciphertext and a pencil. Modern ciphers are designed so that ciphertext is statistically indistinguishable from random no matter how much of it you collect.

Publish or perish

Babbage broke the cipher in 1854 and told no one; it is thought the Crimean War made the result too valuable to release. Kasiski published in 1863 and got the credit. Cryptography advances in the open, which is one more reason Kerckhoffs was right.

Try it yourself

Race the clock in the Vigenère Cipher Challenge, or step back to the Caesar wheel and Mary's nomenclator to see what this cipher was built to fix.

Where it leads

The idea of a machine that changes the alphabet with every letter did not die; it grew rotors. The Enigma is Vigenère with a period of 17,576 and the same fatal habit of repeating itself.