Ad Space — Top Banner

Vigenere Cipher Encoder / Decoder

Encode or decode text using the Vigenere cipher with any keyword.
A polyalphabetic substitution cipher stronger than Caesar cipher.

Vigenere Result

What Is the Vigenere Cipher? The Vigenere cipher is a polyalphabetic substitution cipher invented by Giovan Battista Bellaso in 1553 in Italy, though it was misattributed to Blaise de Vigenere and bears his name. It uses a keyword to shift each letter by a different amount, making it much harder to break than a simple Caesar cipher.

How It Works Each letter of the keyword determines the shift for the corresponding letter of the plaintext. If the keyword is “KEY”, then the first letter is shifted by K=10, the second by E=4, the third by Y=24, then the pattern repeats. The formula is: Cipher_i = (Plain_i + Key_i) mod 26.

Example Plaintext: HELLO. Keyword: KEY (repeats as KEYKE). H+K(10)=R, E+E(4)=I, L+Y(24)=J, L+K(10)=V, O+E(4)=S. Result: RIJVS.

To Decode Subtract instead of add: Plain_i = (Cipher_i - Key_i) mod 26. Using the same keyword, RIJVS decodes back to HELLO.

Historical Significance The Vigenere cipher was considered unbreakable for nearly 300 years — it was called “le chiffre indechiffrable” (the unbreakable cipher). In 1863, Friedrich Kasiski published a method to break it by finding repeated sequences in the ciphertext to determine the keyword length. Once the keyword length is known, each position can be attacked as a separate Caesar cipher using frequency analysis.

Strength vs Caesar Cipher A Caesar cipher has only 25 possible keys. The Vigenere cipher has 26^n possible keys where n is the keyword length. A 10-letter keyword gives over 141 trillion possible keys. However, it is still vulnerable to Kasiski examination and the Friedman test.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.