From Caesar to Vigenère: Polyalphabetic Ciphers

Understand how the Vigenère cipher extends the Caesar cipher by using a keyword to apply different shifts to different positions, making frequency analysis much harder.

Variants

Detailed Explanation

The Vigenère Cipher

The Vigenère cipher is a natural extension of the Caesar cipher that uses a keyword to determine a different shift for each position in the plaintext.

How It Works

  1. Choose a keyword, e.g., "KEY"
  2. Repeat the keyword to match the length of the plaintext
  3. Each keyword letter determines the Caesar shift for that position
Plaintext:  H E L L O W O R L D
Keyword:    K E Y K E Y K E Y K
Shift:     10 4 24 10 4 24 10 4 24 10
Ciphertext: R I J V S U Y V J N

Letter-by-Letter Breakdown

  • H + K (shift 10): H(7) + 10 = 17 → R
  • E + E (shift 4): E(4) + 4 = 8 → I
  • L + Y (shift 24): L(11) + 24 = 35 mod 26 = 9 → J
  • L + K (shift 10): L(11) + 10 = 21 → V
  • O + E (shift 4): O(14) + 4 = 18 → S

Why It's Stronger Than Caesar

The Caesar cipher uses a single shift for the entire message. This means every 'E' in the plaintext becomes the same letter in the ciphertext, preserving frequency patterns.

The Vigenère cipher uses multiple shifts. The same plaintext letter can become different ciphertext letters depending on its position:

  • The first 'L' (with shift 24) → J
  • The second 'L' (with shift 10) → V

This disrupts simple frequency analysis.

Breaking the Vigenère Cipher

Despite being called "le chiffre indéchiffrable" (the indecipherable cipher) for 300 years, it was eventually broken:

  1. Kasiski examination (1863): Find repeated ciphertext sequences to determine keyword length
  2. Index of coincidence: Statistical method to estimate keyword length
  3. Once keyword length is known: Each position becomes a separate Caesar cipher that can be individually broken with frequency analysis

Relationship to Modern Ciphers

The Vigenère cipher introduced the concept of a key-dependent, position-dependent transformation — the same fundamental principle used in modern stream ciphers and block ciphers, just with vastly more mathematical complexity.

Use Case

Understanding the evolution from Caesar to Vigenère is essential in cryptography courses. It demonstrates why single-key substitution is weak, how polyalphabetic substitution improves security, and how even seemingly strong ciphers can be broken with the right analytical techniques.

Try It — ROT13 / Caesar Cipher

Open full tool