←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Polygram & Polyalphabetic Substitution Ciphers (Vigenère Cipher)

Study material and explanations for Unit 1

Polygram and Polyalphabetic Substitution Ciphers

In the previous topic, we saw that Mono-alphabetic Ciphers are weak because every time a letter (like E) appears in the Plain Text, it always gets replaced by the exact same Cipher Text letter—making it easy to crack using Frequency Analysis.

To defeat Frequency Analysis, cryptographers invented two smarter methods:

  1. Polygram Substitution Cipher (substituting groups of letters together)
  2. Polyalphabetic Substitution Cipher (using multiple substitution alphabets)

1. Polygram Substitution Cipher

What is a Polygram Cipher?

In a Polygram Substitution Cipher, instead of replacing one single letter at a time, we replace a block (group) of letters all at once with another block of letters.

  • Poly = Many, Gram = Letters/Characters.
  • A group of 2 letters is called a Digram (used in Playfair Cipher).
  • A group of 3 letters is called a Trigram (often used in Hill Cipher).
Single-Letter vs. Polygram Substitution
Mono-alphabetic (Letter by Letter)
• H always becomes K
• So "HE" ➔ "KL"
• And "HI" ➔ "KM" (First letter still K!)
Polygram Cipher (Block by Block)
• Whole block is replaced from a dictionary
• "HE" ➔ "XY"
• "HI" ➔ "ab" (Completely different!)

Why is Polygram Cipher Stronger?

  • Even though both "HE" and "HI" start with the letter H, their Cipher Texts ("XY" and "PQ") have nothing in common.
  • This hides single-letter frequencies and makes cryptanalysis much harder.
  • Famous Examples of Polygram Ciphers: Playfair Cipher (encrypts 2 letters at a time) and Hill Cipher (encrypts m letters at a time using matrices).

2. Polyalphabetic Substitution Cipher

What is a Polyalphabetic Cipher?

A Polyalphabetic Substitution Cipher uses multiple substitution alphabets to encrypt a single message, switching from one alphabet to another as it moves through the Plain Text.

💡 Key Advantage:
The same Plain Text letter (e.g., L in "HELLO") can be encrypted into two completely different Cipher Text letters depending on its position in the word! This flattens the letter frequency graph and defeats simple frequency analysis.


3. Vigenère Cipher (The Most Famous Polyalphabetic Cipher)

The best-known and simplest Polyalphabetic Cipher is the Vigenère Cipher, published by Blaise de Vigenère in 1586.

How Vigenère Cipher Works:

  1. We choose a secret Keyword (for example, "KEY" or "DECEPTIVE").
  2. We repeat the Keyword over and over until it matches the exact length of our Plain Text message.
  3. Each letter is converted to its number (A = 0, B = 1, ..., Z = 25).
  4. We add the Plain Text number and the Key letter number modulo 26:
    • Encryption Formula:

      Formula: Ci = (Pi + Ki) mod 26

    • Decryption Formula:

      Formula: Pi = (Ci - Ki + 26) mod 26


📝 Step-by-Step Solved Example (Vigenère Cipher):

Question: Encrypt the Plain Text "ATTACK" using the Vigenère Cipher with the Keyword "KEY".

Step 1: Repeat the Keyword "KEY" to match the 6 letters of "ATTACK":

  • Plain Text (P): A T T A C K
  • Repeated Key (K): K E Y K E Y

Step 2: Write the numeric values (A=0, B=1, ..., Z=25):

  • Plain Text (P): A(0), T(19), T(19), A(0), C(2), K(10)
  • Key (K): K(10), E(4), Y(24), K(10), E(4), Y(24)

Step 3: Add (Pi + Ki) mod 26 for each position:

Position Plain Letter (Pi) Key Letter (Ki) Calculation (Pi + Ki) mod 26 Cipher Letter (Ci)
1 A (0) K (10) (0 + 10) mod 26 = 10 K
2 T (19) E (4) (19 + 4) mod 26 = 23 X
3 T (19) Y (24) (19 + 24) mod 26 = 43 mod 26 = 17 R
4 A (0) K (10) (0 + 10) mod 26 = 10 K
5 C (2) E (4) (2 + 4) mod 26 = 6 G
6 K (10) Y (24) (10 + 24) mod 26 = 34 mod 26 = 8 I
  • Resulting Cipher Text: K X R K G I

🔍 Notice Something Amazing!
Look at positions 2 and 3 in "ATTACK". Both Plain Text letters are T, yet the first T became X and the second T became R! That is the power of a Polyalphabetic Cipher.


4. Mono-alphabetic vs. Polyalphabetic Cipher

Feature Mono-alphabetic Cipher Polyalphabetic Cipher
Number of Alphabets Uses only 1 substitution alphabet Uses multiple substitution alphabets
Same Plain Letter Always produces the same Cipher letter Can produce different Cipher letters at different positions
Frequency Analysis Very easy to break using letter frequency Hides single-letter frequency; much harder to break
Examples Caesar Cipher, Simple Substitution Vigenère Cipher, Vernam Cipher, One-Time Pad

💡 DAVV Exam Preparation Tips

5-Mark / 10-Mark Question: “What is Polyalphabetic Substitution? Explain how it overcomes the limitations of Mono-alphabetic Cipher with an example.”

  • Define both Polygram and Polyalphabetic substitution.
  • Solve the Vigenère Cipher example (Plain = ATTACK, Key = KEY → Cipher = KXRKGI) and point out how the two Ts encrypt to different letters (X and R).
  • Include the comparison table between Mono-alphabetic and Polyalphabetic ciphers.