←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

Substitution Techniques: Caesar Cipher & Mono-alphabetic Cipher

Study material and explanations for Unit 1

Substitution Techniques: Caesar Cipher and Mono-alphabetic Cipher

What is a Substitution Technique?

A Substitution Technique is a classical encryption method in which each character (letter) of the Plain Text is systematically replaced by another letter, number, or symbol to produce the Cipher Text.

💡 Simple Idea:
The positions of the letters stay in the same place, but the identity of each letter changes (like wearing a mask!).


1. Caesar Cipher (Shift Cipher)

The Caesar Cipher is the oldest and simplest substitution cipher in history. It was invented and used by the Roman Emperor Julius Caesar around 50 BC to send secret military messages to his army generals.

How Caesar Cipher Works:

  • In the classic Caesar Cipher, each letter in the Plain Text is replaced by a letter that is 3 positions ahead in the English alphabet.
  • The alphabet wraps around at the end: after Z, we start again from A.
    • A becomes D
    • B becomes E
    • C becomes F
    • …
    • X becomes A
    • Y becomes B
    • Z becomes C
Caesar Cipher Shift by k = 3
Plain: A B C D ... X Y ZOriginal Alphabet (0 to 25)
➔ Shift +3 ➔
Cipher: D E F G ... A B CShifted Alphabet

Mathematical Formula for Generalized Caesar Cipher:

First, assign a number from 0 to 25 to every English letter (A = 0, B = 1, C = 2, ..., Z = 25).

Letter A B C D E F G H I J K L M
Number 0 1 2 3 4 5 6 7 8 9 10 11 12
Letter N O P Q R S T U V W X Y Z
Number 13 14 15 16 17 18 19 20 21 22 23 24 25

For any shift key k (where 1 ≤ k ≤ 25):

  • Encryption Formula:

    Formula: C = E(k, P) = (P + k) mod 26

  • Decryption Formula:

    Formula: P = D(k, C) = (C - k) mod 26


📝 Solved Example (Exam Favorite):

Question: Encrypt the Plain Text "CYBER" using Caesar Cipher with key k = 3.

Step-by-Step Solution:

  1. C (P = 2): (2 + 3) mod 26 = 5 → F
  2. Y (P = 24): (24 + 3) mod 26 = 27 mod 26 = 1 → B
  3. B (P = 1): (1 + 3) mod 26 = 4 → E
  4. E (P = 4): (4 + 3) mod 26 = 7 → H
  5. R (P = 17): (17 + 3) mod 26 = 20 → U
  • Plain Text: C Y B E R
  • Cipher Text: F B E H U

Weakness of Caesar Cipher (Why is it easy to break?):

  1. Only 25 Possible Keys: Since there are only 26 letters in English (and shifting by 0 changes nothing), there are only 25 possible keys (k = 1 to 25).
  2. Vulnerable to Brute-Force Attack: A hacker or a simple computer program can try all 25 shifts in less than a millisecond and immediately spot the readable English sentence!

2. Mono-alphabetic Substitution Cipher

To fix the tiny key-space problem of the Caesar Cipher, cryptographers created the Mono-alphabetic Cipher.

What is a Mono-alphabetic Cipher?

Instead of shifting all letters by a fixed number like +3, a Mono-alphabetic Cipher allows any letter to be mapped to any other unique letter in a completely jumbled order (a random permutation of the 26 letters).

  • Mono = Single. It uses a single fixed substitution alphabet for the entire message.
  • Once you decide that A maps to Q, then every A in your message will always become Q.

Example of a Mono-alphabetic Key Table:

  • Plain Alphabet: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  • Cipher Alphabet: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M

Let’s encrypt "ATTACK" using the table above:

  • A → Q
  • T → Z
  • T → Z
  • A → Q
  • C → E
  • K → A
  • Cipher Text: QZZQEA

How Many Keys Does Mono-alphabetic Cipher Have?

  • The first letter A can be replaced by any of the 26 letters.
  • The second letter B can be replaced by any of the remaining 25 letters, and so on.
  • Total possible keys = 26! = 26 × 25 × 24 × … × 1 ≈ 4 × 10^26 keys!
  • This makes a Brute-Force attack impossible!

Weakness of Mono-alphabetic Cipher (Frequency Analysis Attack):

Even with 4 × 10^26 keys, Mono-alphabetic ciphers are easily broken using Letter Frequency Analysis:

  • In any normal English paragraph, certain letters appear much more frequently than others:
    • E is the most common letter in English (~12.7% of all letters).
    • Followed by T, A, O, I, N, S.
  • If a cryptanalyst sees that the letter X appears most frequently in the Cipher Text (say 13% of the time), they can easily guess that X stands for E! Similarly, common 3-letter words like "THE" can be spotted quickly.

3. Comparison: Caesar Cipher vs. Mono-alphabetic Cipher

Feature Caesar Cipher Mono-alphabetic Cipher
Shift Rule Uniform fixed shift (+k) for all letters Random 1-to-1 permutation of all 26 letters
Total Possible Keys Only 25 keys 26! ≈ 4 × 10^26 keys
Brute-Force Attack Extremely easy to break Impossible by brute-force alone
Main Weakness Tiny key space Broken by Letter Frequency Analysis

💡 DAVV Exam Preparation Tips

5-Mark / 10-Mark Question: “What is a Substitution Cipher? Explain Caesar Cipher and Mono-alphabetic Cipher with examples and state their limitations.”

  • Write the Caesar Cipher encryption formula C = (P + k) mod 26 and decryption formula P = (C - k) mod 26.
  • Show a clear step-by-step encryption of a word like "CYBER" or "HELLO".
  • Mention why Caesar fails (25 keys / Brute-Force) and why Mono-alphabetic fails (Frequency Analysis of English letters like E, T, A).