CRYPTO

Vigenère

A keyword chooses a different Caesar shift for each letter. With the key LEMON, the first letter shifts by 11 (L), the second by 4 (E), and so on, starting over when the key runs out.

Direction

Letters only. Anything else is ignored.

Result

Crack it

Every letter under the same key letter gets the same shift. If you guess the key length, you can split the ciphertext into that many columns and break each one as a Caesar cipher.

To find the length, the cracker splits the text into columns for each length from 1 to 16 and measures their index of coincidence: the chance that two letters picked at random from a column match. English scores about 0.066, and scrambled letters about 0.038, so the right length stands out. Multiples of it score well too. Choose a length to use its key.

    How it works

    Giovan Battista Bellaso described this cipher in 1553. It was later credited to Blaise de Vigenère, who wrote about a stronger variant in 1586, and the name stuck. The French called it le chiffre indéchiffrable, the indecipherable cipher, and for about three hundred years it held up against the frequency analysis that breaks a Caesar cipher, because each plaintext letter can turn into several different ciphertext letters.

    Its weakness is the repeating key. Charles Babbage broke it around 1854 but never published his method. Friedrich Kasiski published one in 1863: find repeated strings in the ciphertext, measure the distances between them, and the key length is usually a common factor of those distances. In 1922 William Friedman introduced the index of coincidence, the statistic the cracker above uses.

    A key as long as the message, used once and chosen at random, would leave nothing to measure. That is the one-time pad, and it can't be broken.