The Vigenère Cipher is a classical polyalphabetic substitution cipher that uses a repeating keyword to determine shifting values for each letter in a message. Unlike the Caesar Cipher, which applies a single fixed shift, the Vigenère Cipher changes the shift for every letter based on the key. This shifting pattern significantly reduces simple frequency analysis.
It can be viewed as a systematic expansion of the Trithemius Cipher, which uses a progressive shifting pattern instead of a repeating keyword.
Vigenère Cipher: Encoding
To encode, repeat the keyword so it matches the length of the plaintext. Each plaintext letter is shifted forward by the alphabetical index of the corresponding key letter (A=0, B=1, ..., Z=25).
Example using plaintext “HELLO” and keyword “KEY”:
Plaintext: H E L L O
Keyword: K E Y K E
Convert letters to numbers:
H(7) E(4) L(11) L(11) O(14)
K(10) E(4) Y(24) K(10) E(4)
Add modulo 26:
7+10 = 17 → R
4+4 = 8 → I
11+24= 35 ≡ 9 → J
11+10= 21 → V
14+4 = 18 → S
Ciphertext: RIJVS
Vigenère Cipher: Decoding
To decode, subtract the key letter values instead of adding them.
Ciphertext: R I J V S
Keyword: K E Y K E
R(17) - K(10) = 7 → H
I(8) - E(4) = 4 → E
J(9) - Y(24) = -15 ≡ 11 → L
V(21) - K(10) = 11 → L
S(18) - E(4) = 14 → O
Plaintext: HELLO
Vigenère Cipher: Notes
The Vigenère Cipher was once considered “le chiffre indéchiffrable” — the indecipherable cipher — because its shifting alphabets obscure simple frequency patterns. However, it was eventually broken using methods such as the Kasiski examination and index of coincidence analysis.
Despite being vulnerable to modern cryptanalysis, the Vigenère Cipher remains one of the most important stepping stones in the development of classical cryptography, bridging simple substitution systems and more advanced mechanical encryption devices.