IVX
Roman Numeral ConverterEN
CLASSICAL SUBSTITUTION & TRANSPOSITION CIPHERS TOOL • UNIFIED WORKSPACE

Vigenère Cipher

Encrypt and decrypt polyalphabetic substitution ciphers using custom keyword strings and the historical 26×26 Vigenère tabula recta.

Presets:
Ready
MMXXVI
Copied!

Calculation Breakdown

What is the Vigenère Cipher?

The Vigenère cipher is a famous polyalphabetic substitution cipher that resisted cryptanalysis for over three centuries, earning the historical moniker "le chiffre indéchiffrable" (the indecipherable cipher). Originally described by Giovan Battista Bellaso in 1553 and later misattributed to Blaise de Vigenère in the 19th century, it dramatically improves upon the Caesar cipher by using a repeating secret keyword.

Instead of shifting every letter by the same constant value, the Vigenère cipher applies a different Caesar shift to each consecutive character based on the corresponding letter of the keyword. For instance, using keyword "KEY", the first letter shifts by K (10), the second by E (4), and the third by Y (24), repeating cyclically.

This polyalphabetic rotation flattens natural English letter frequencies, preventing simple single-letter frequency analysis from breaking the code.

How to Use This Tool

  1. Enter your plaintext or ciphertext message into the input box.
  2. Enter your secret keyword (e.g., "CIPHER", "SECRET", or "KEY") in the key configuration field.
  3. Select Encode to encrypt or Decode to decrypt.
  4. Copy the resulting text or inspect the character-by-character modular shifts.

How the Vigenère Cipher Works

Let $P_i$ be the index of the $i$-th plaintext letter and $K_i$ be the index of the repeated keyword letter ($0 \le P_i, K_i \le 25$):

Encryption: $C_i = (P_i + K_{i \bmod m}) \pmod{26}$

Decryption: $P_i = (C_i - K_{i \bmod m} + 26) \pmod{26}$

This corresponds to finding the intersection of the plaintext column and keyword row in the $26 \times 26$ tabula recta grid.

Vigenère Cipher Examples

Encryption with Key "KEY"

Encrypting "HELLO WORLD" with repeating key "KEYKEYKEYK".

In:HELLO WORLD (Key: KEY)
Out:RIJVS UYVJN

Decryption with Key "KEY"

Deciphering "RIJVS UYVJN" back to "HELLO WORLD".

In:RIJVS UYVJN (Key: KEY)
Out:HELLO WORLD

Key Repeating & Kasiski Examination

  • When the keyword is short compared to the message, repeating letter patterns occur at intervals equal to the keyword length (exploited by Kasiski examination and the Friedman test).
  • If the keyword is truly random, never reused, and as long as the message, the cipher becomes an unbreakable One-Time Pad.

Frequently Asked Questions

How does the Vigenère cipher encrypt and decrypt?
It encrypts by repeating a keyword across the message, converting each keyword letter to a numeric shift (A=0, B=1... Z=25), and adding it to the plaintext letter modulo 26. Decryption subtracts the keyword shift.
How do Vigenère ciphers work?
A Vigenère cipher works by interleaving multiple Caesar ciphers in sequence. By changing the shift value with every letter according to a secret keyword, the letter "E" might be represented by three or four different letters in the same sentence.
How do you decode a Vigenère cipher?
To decode, align the repeating keyword above the ciphertext. For each letter, look up the row corresponding to the key letter in the Vigenère table and locate the ciphertext letter; the header of that column reveals the original plaintext letter.
Is the Vigenère cipher hard to crack?
Historically it was considered unbreakable for over 300 years. Today, it can be easily cracked with a computer using Kasiski examination to find the key length followed by frequency analysis on each independent shift set.
How to write a Vigenère cipher?
Choose a keyword (e.g., "LUCK"). Repeat it above your message ("LUCK LUCK LUCK"). For each letter, find the column for the message letter and the row for the key letter in a tabula recta, and write the intersecting letter.
How can a Vigenère cipher be broken?
It is broken using the Kasiski test (finding distances between repeated ciphertext strings to factor the key length) or the Index of Coincidence. Once the key length $m$ is known, the cipher breaks down into $m$ simple Caesar ciphers.
Who invented the Vigenère cipher?
It was invented in 1553 by Italian cryptographer Giovan Battista Bellaso. Blaise de Vigenère later described a related autokey cipher in 1586, and in the 19th century the cipher was mistakenly attributed to Vigenère.
Can you explain the Vigenère cipher simply?
Imagine Caesar cipher, but instead of shifting every letter by 3, you shift letter 1 by 2, letter 2 by 5, and letter 3 by 8, repeating that sequence over and over based on a secret codeword.

Related Tools