Vigenère cipher

A repeated keyword shifts each letter by a different amount, with the tabula recta rows and the sums modulo 26.

How it works

Described by Giovan Battista Bellaso in 1553 and later credited to Blaise de Vigenère, this cipher was called “le chiffre indéchiffrable” for three centuries. It uses a keyword as a sequence of Caesar shifts: with A = 0, …, Z = 25,

$$c_i = (p_i + k_{i \bmod m}) \bmod 26, \qquad p_i = (c_i - k_{i \bmod m}) \bmod 26,$$

where $m$ is the length of the key. By hand one uses the tabula recta, a square of 26 shifted alphabets: the row of the key letter and the column of the plain letter meet at the cipher letter. ATTACKATDAWN with key LEMON gives LXFOPVEFRNHR.

Because the same plain letter becomes different cipher letters, simple frequency counts fail. But the key repeats: Charles Babbage and Friedrich Kasiski (1863) found its length from repeated fragments, and the index of coincidence does the same statistically. Once the length $m$ is known, every $m$-th letter is a Caesar cipher, broken by frequencies.

Everything is calculated in your browser. Nothing you type leaves your device.