Professional Documents
Culture Documents
Selva Rani B
Part - I
Classical Techniques
Substitution Transposition
• Caesar Cipher • Rail fence Cipher
Dr. Selva Rani B
• DEFGHIJKLMNOPQRSTUVWXYZABC
• Mathematically give each letter a number
• abcdefghij k l m n o p q r s t u v w x y z
• 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25
• Algorithm can be expressed as:
c E 3, p p 3 mod26
Caesar Cipher Algorithm(2/2)
• A shift may be of any amount, so that the general Caesar
algorithm is:
C E k , p p k mod 26
Dr. Selva Rani B
p Dk , C C k mod 26
Brute-Force Cryptanalysis of Caesar Cipher
Monoalphabetic Cipher
• With only 25 possible keys : Caesar cipher is not secure
• Key space can be increased by arbitrary substitution
• Monoalphabetic cipher : single cipher for a single plaintext
Dr. Selva Rani B
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
E L 0 K C M P R T Q G V A Y S F Z X U H W B N J I D
Monoalphabetic Cipher
Dr. Selva Rani B
Playfair Cipher
• Best known multiple-letter encryption cipher
• Treats digrams in the plaintext as a single unit
• Translate those units into ciphertext digrams
Dr. Selva Rani B
B C D F G
H K L M N
O P Q S T
U W X Y Z
Hill Cipher
• Developed by the mathematician Lester Hill in 1929
• Takes ‘m’ successive plaintext letters and substitutes for
them ‘m’ ciphertext letters
Dr. Selva Rani B
𝐶 = 𝐾𝑃 𝑚𝑜𝑑 26
Hill Cipher Example
• Plaintext : paymoremoney
• Key :
Dr. Selva Rani B
17 17 5
21 18 21
2 2 19
(p a y) | (m o r) | (e m o) | (n e y)
(15 0 24) | ….
• Key : m i r r o r
• M=3
Dr. Selva Rani B
𝑚 𝑖 𝑟
• 𝑟 𝑜 𝑟
𝑥 𝑦 𝑧
Hill Cipher - Decryption
• 𝐶 = 𝐸𝐾 𝑃 = 𝐾𝑃 𝑚𝑜𝑑 26
• 𝑃 = 𝐷𝐾 𝐶 = 𝐾 −1 𝐶 𝑚𝑜𝑑 26 = 𝐾 −1 𝐾𝑃 = 𝑃
Dr. Selva Rani B
4 9 15
• 𝐾 −1 = 15 17 6
24 0 17
Polyalphabetic Cipher – Vigenere Cipher
• Use different Monoalphabetic substitutions
• Encryption :
• Key : Row (x)
Dr. Selva Rani B
• 𝑐𝑖 = 𝑝𝑖 ⊕ 𝑘𝑖
• Decryption :
• Bitwise XOR of the ciphertext and the key
• 𝑝𝑖 = 𝑐𝑖 ⊕ 𝑘𝑖