Substitution Techniques
Substitution Techniques
Techniques : Substitution
Techniques
Classical Substitution Ciphers
• where letters of plaintext are replaced by
other letters or by numbers or symbols
• or if plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext
bit patterns with ciphertext bit patterns
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
Caesar Cipher
• earliest known substitution cipher
• by Julius Caesar
• first attested use in military affairs
• replaces each letter by 3rd letter on
• example:
• Where k= 1,2,…….25
Cryptanalysis of Modified Caesar
Cipher
• only have 26 possible ciphers
– A maps to A,B,..Z
• could simply try each in turn
• a brute force search
• given ciphertext, just try all shifts of letters
• do need to recognize when have plaintext
• eg. break ciphertext "GCUA VQ DTGCM"
Example
cipher: GCUA VQ DTGCM
Playfair Cipher
P L A Y F
I R E X M
B C D G H
K N O Q S
T U V W Z
5X5 matrix
P L A Y F
I R E X M
B C D G H
K N O Q S
T U V W Z
Step 2: Encryption Process
• OI IA KM AR UN XM
Example
• GOOD MORNING
• Consider m=3
• Plaintext = paymoremoney
1 0 24
5
The first three letters of the plaintext are represented by the vector
• Then, C = KP mod 26
=
• Cipher Text :
Decryption
• Decryption requires using the inverse of the
matrix K
• KK1 = K1K = I,
P=
= 431
=
= Pay
494
570
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
Polyalphabetic Ciphers
• polyalphabetic substitution ciphers
• improve security using multiple cipher alphabets
• make cryptanalysis harder with more alphabets
to guess and flatter frequency distribution
• use a key to select which alphabet is used for
each letter of the message
• use each alphabet in turn
• repeat from start after end of key is reached
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
Types Of Substitution Techniques
• Caesar Cipher
• Modified Caesar Cipher
• Mono-alphabetic Cipher
• PlayFair Cipher
• Hill Cipher
• Poly-alphabetic Cipher
• One-Time Pad
One-Time Pad
• if a truly random key as long as the message is used,
the cipher will be secure
• called a One-Time pad
• is unbreakable since ciphertext bears no statistical
relationship to the plaintext
• since for any plaintext & any ciphertext there exists
a key mapping one to other
• can only use the key once though
• problems in generation & safe distribution of key