Vigenère cipher: weaknesses and attacks
The Kasiski method, Friedman’s index of coincidence and column-by-column frequency analysis: how the Vigenère cipher is broken.
- 01
Look for repetitions
Sequences of three or more letters repeated in the ciphertext are often the same word encrypted with the same stretch of key.
- 02
Measure the distances
The distance between two repetitions is usually a multiple of the key length.
- 03
Find the length
The greatest common divisor of the distances indicates the probable length: this is the Kasiski method.
- 04
Confirm with the index of coincidence
Splitting the text into columns with the assumed length, each column should have an index similar to that of the message’s language.
- 05
Solve each column
Frequency analysis finds the shift of each column, that is each letter of the key.
- Short key
- The shorter the key relative to the message, the more repetitions appear and the easier the attack.
- Known plaintext
- Knowing even a few words of the message lets you derive key letters directly.
- Predictable key
- Common or context-related words are guessed with dictionary attempts.
The Vigenère cipher today
Where the Vigenère cipher is found today: teaching, games, puzzles, and the lessons it left to modern cryptography.
The pages of this topic
Back to the overviewVigenère cipher: history
From Alberti to Trithemius, from Bellaso to Vigenère: how the “indecipherable” cipher was born, why it bears the wrong name and how it was broken in the nineteenth century.
Vigenère cipher: how it works
How to encrypt and decrypt with the Vigenère cipher using the square table and the repeated keyword.
Vigenère cipher: worked example
Step-by-step encryption of the message “meet me at the bridge” with the key CIPHER, letter by letter.
Vigenère cipher: the maths
The formulas of the Vigenère cipher in modular arithmetic, the key space and why the repetition of the key is its weakness.
Vigenère cipher: try it yourself
Encryption and decryption exercises with the Vigenère cipher, with solutions.
Vigenère cipher: frequently asked questions
Short answers to the most common questions about the Vigenère cipher.