Encode and decode Vigenère cipher text. Includes Kasiski examination, Index of Coincidence analysis, key length detection, and key recovery cryptanalysis tools.
Not sure which cipher you have? Use the Cipher Identifier to auto-detect cipher types from unknown ciphertext using frequency analysis and Index of Coincidence.
The Vigenere cipher is a polyalphabetic substitution cipher that uses a keyword to encrypt text with multiple different Caesar cipher shifts. Invented by Giovan Battista Bellaso in 1553 and later misattributed to Blaise de Vigenere, it was considered unbreakable for over 300 years — earning it the nickname "le chiffre indechiffrable" (the indecipherable cipher).
The Vigenere cipher represents a critical evolution in cryptographic history. By using multiple substitution alphabets instead of one, it defeats simple frequency analysis — the technique that trivially breaks Caesar and monoalphabetic substitution ciphers. Understanding the Vigenere cipher and how it was eventually broken teaches essential concepts about polyalphabetic encryption, key length analysis, and the ongoing arms race between codemakers and codebreakers.
Encryption uses a keyword that is repeated to match the length of the plaintext. Each keyword letter determines the Caesar shift for the corresponding plaintext letter:
Example with keyword "KEY":
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Plaintext | A | T | T | A | C | K | A | T | D |
| Keyword | K | E | Y | K | E | Y | K | E | Y |
| Shift | 10 | 4 | 24 | 10 | 4 | 24 | 10 | 4 | 24 |
| Ciphertext | K | X | R | K | G | I | K | X | B |
Each letter is encrypted with a different shift, so the same plaintext letter (A) can encrypt to different ciphertext letters (K, K, K in this case because the keyword position happens to align — but with longer keywords, repetition decreases).
The Vigenere cipher was broken in the 19th century using two techniques:
Friedrich Kasiski observed that repeated sequences in ciphertext reveal the key length. If "THE" is encrypted at positions that align with the same keyword letters, the same ciphertext trigram appears. The distances between repetitions are multiples of the key length.
William Friedman developed a statistical method that measures the probability that two randomly chosen letters from the ciphertext are the same. Natural language has a higher index of coincidence (~0.067 for English) than random text (~0.038). By testing different key lengths and measuring the IC of resulting groups, the correct key length produces groups with language-like IC values.
The Vigenere cipher provides no security for modern use. Its vulnerabilities include:
The Vigenère cipher is a polyalphabetic substitution cipher that uses a keyword to shift letters. Unlike the Caesar cipher which uses a single shift, each letter in the keyword determines a different shift for the corresponding plaintext letter. This makes it much harder to break than simple substitution ciphers.
Kasiski examination is a method to determine the key length of a Vigenère cipher. It works by finding repeated sequences in the ciphertext (like XYZ appearing multiple times). The distances between these repetitions are likely multiples of the key length. Finding the GCD of these distances reveals probable key lengths.
The Index of Coincidence (IC) measures how likely it is that two randomly selected letters from a text are the same. English text has an IC around 0.067, while random text is around 0.038. By calculating the IC for different assumed key lengths, we can determine the actual key length - the correct length will have IC values closer to English.
First, determine the key length using Kasiski examination or IC analysis. Then, split the ciphertext into groups by key position. Each group is effectively a Caesar cipher that can be solved with frequency analysis. Finally, combine the individual key letters to reveal the full keyword.