The Vigenère cipher
Encrypting with a password
Caesar’s cipher has the flaw of applying the same shift to all letters. Vigenère corrects this: the shift changes for each letter, following a repeated key.
The method
The key is written beneath the message, repeated as follows:
clair M A T H S
clé C L E C L
Each letter in the key corresponds to a shift: A is 0, B is 1, C is 2, … L is 11, E is 4.
M + C = M + 2 → O
A + L = A + 11 → L
T + E = T + 4 → X
H + C = H + 2 → J
S + L = S + 11 → D
The ciphertext is OLXJD.
What this changes
Look at the two As in the word ANANAS, encrypted with the key CLE:
clair A N A N A S
clé C L E C L E
chiffré C Y E P L W
The first A becomes C, the third becomes E, and the fifth becomes L. The same plaintext letter yields different ciphertext letters.
This is exactly what was missing from substitution ciphers: frequency analysis no longer works. Counting the letters in the ciphertext is no longer meaningful, as each E in the plaintext has been spread across several ciphertext letters.
This is known as polyalphabetic ciphering: several substitution alphabets used alternately.
The cipher was considered unbreakable for so long that it was known as ‘the indecipherable cipher’. It held up for around three centuries.

