Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information & Communication Technology Engineering/
  4. ICT Semester 5/
  5. Cyber Security (4353204)/

4 mins· ·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Classical Cryptography Techniques

Classical Cryptography Techniques

Substitution and Transposition Methods

Historical Foundations of Modern Cryptography

Classical Cryptography Overview

  • Historical Importance: Foundation of modern crypto
  • Two Main Types: Substitution and Transposition
  • Educational Value: Understanding basic principles
  • Security: Weak by modern standards
Substitution and Transposition

Substitution Techniques

Definition: Replace elements of plaintext with corresponding elements of ciphertext

Key Principle:

  • Each character mapped to different character
  • Position remains the same
  • Systematic replacement

Caesar Cipher

Method: Shift each letter by fixed number of positions
Example (Shift = 3):
Plaintext: 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
Ciphertext: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Encryption: C = (P + k) mod 26
Decryption: P = (C - k) mod 26
Caesar Cipher Mechanism

Caesar Cipher Example

Key = 3

Plaintext: HELLO
H → K (H + 3)
E → H (E + 3)
L → O (L + 3)
L → O (L + 3)
O → R (O + 3)

Ciphertext: KHOOR

Monoalphabetic Cipher

Method: Each letter mapped to different letter using random substitution
Example Mapping:
Plaintext: 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
Ciphertext: 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
  • Key Space: 26! possible keys
  • Weakness: Vulnerable to frequency analysis

Playfair Cipher

Method: Encrypts pairs of letters using 5×5 matrix
Key Matrix (Keyword: MONARCHY):
M O N A R
C H Y B D
E F G I K
L P Q S T
U V W X Z

Rules:

  1. Same row: take letters to the right
  2. Same column: take letters below
  3. Rectangle: take corners horizontally

Vigenère Cipher

Method: Uses keyword to shift letters by different amounts
Example:
Plaintext: HELLO WORLD
Keyword: KEY KEY KEY
Shifts: K=10, E=4, Y=24

H + K = R, E + E = I, L + Y = J, etc.
Ciphertext: RIJVS UIVJH
  • Strength: Resists frequency analysis
  • Weakness: Keyword repetition patterns

Hill Cipher

Method: Uses matrix multiplication for encryption
2×2 Key Matrix:
K = [3 2]
    [5 7]

Encryption: C = (K × P) mod 26
  • Advantage: Can encrypt multiple characters at once
  • Requirement: Matrix must be invertible

Transposition Techniques

Definition: Rearrange characters of plaintext according to a system

Key Principle:

  • Same characters, different positions
  • No character substitution
  • Pattern-based rearrangement

Rail Fence Cipher

Method: Write message in zigzag pattern, read row by row
Example (3 rails):
Plaintext: HELLO WORLD

H     L     O     O     L
 E   L   W   R   D
  L              

Ciphertext: HLOOL ELWRD L

Columnar Transposition

Method: Write in grid, read columns in key order
Keyword: ZEBRA (Order: 5-2-1-4-3)
Z E B R A
5 2 1 4 3

W E A R E
D I S C O
V E R E D

Read: Column 1(B), 2(E), 3(A), 4(R), 5(Z)
Ciphertext: ASR EIE EOD REC WDV
Columnar Transposition Cipher

Route Cipher

Method: Write in grid, read following specific route
Grid:
H E L L O
W O R L D

Routes:
• Spiral clockwise
• Diagonal
• Snake pattern

Substitution vs Transposition

FeatureSubstitutionTransposition
OperationReplace charactersRearrange characters
Character SetChangesRemains same
Frequency AnalysisVulnerableLess vulnerable
ComplexitySimplerMore complex

Breaking Classical Ciphers

  • Frequency Analysis: Analyze letter frequencies
  • Pattern Recognition: Look for common words
  • Brute Force: Try all possible keys
  • Dictionary Attacks: Use common keywords

Why Classical Ciphers Are Weak

  • Small Key Space: Limited number of keys
  • Pattern Preservation: Language patterns remain
  • No Confusion/Diffusion: Lack modern principles
  • Manual Implementation: Error-prone processes

Modern Relevance

  • Educational Value: Understanding fundamentals
  • Building Blocks: Basis for modern algorithms
  • Puzzle Games: Entertainment and learning
  • Historical Research: Deciphering old documents

Try It Yourself

Encrypt "ATTACK AT DAWN" using:

1. Caesar cipher (shift = 5)
2. Rail fence (3 rails)
3. Columnar transposition (key = "KEY")

Answers:

  1. FYYFHP FY IFBS
  2. AKTANATA CWT
  3. TCA KAT ATW

Learning Tools

  • Online Simulators: Practice encryption/decryption
  • Cryptanalysis Tools: Frequency analyzers
  • Historical Examples: Study real cipher cases
  • Programming Exercises: Implement algorithms

Key Takeaways

  • Classical ciphers use substitution or transposition
  • Each method has specific strengths and weaknesses
  • All are vulnerable to modern cryptanalysis
  • Understanding history helps learn modern crypto
  • Simple doesn't mean secure
Remember: These techniques laid the foundation for modern cryptography

Thank You

Questions & Discussion

Next: Modern Hashing Algorithms