Z Cryptography Chapter 2
Z Cryptography Chapter 2
ATTACKS
BASIC TERMINOLOGY
8
SYMMETRIC CIPHER MODEL
9
Cipher or cryptographic system : a scheme for encryption and decryption
10
CIPHERS
12
SYMMETRIC ENCRYPTION
Mathematically:
Y = EK(X) or Y = E(K, X)
X = DK(Y) or X = D(K, Y)
X = plaintext
Y = cipher text
K = secret key
E = encryption algorithm
D = decryption algorithm
Both E and D are known to public
13
CRYPTANALYSIS
128 2128 = 3.4 1038 2127 µs = 5.4 1024 years 5.4 1018 years
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
26 characters 26! = 4 1026 2 1026 µs = 6.4 1012 years 6.4 106 years
(permutation) 15
CRYPTANALYTIC ATTACKS
Known-plaintext attack
Chosen-plaintext attack
Chosen-ciphertext attack
16
CIPHERTEXT-ONLY ATTACK
17
KNOWN-PLAINTEXT ATTACK
18
CHOSEN-PLAINTEXT ATTACK
19
EXAMPLE: CHOSEN-PLAINTEXT ATTACK
21
CLASSICAL CIPHERS
23
CAESAR CIPHER
25
MONOALPHABETIC SUBSTITUTION CIPHER
Shuffle the letters and map each plaintext letter to a different random ciphertext letter:
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
27
LANGUAGE STATISTICS AND CRYPTANALYSIS
There are tables of single, double & triple letter frequencies for various
languages
28
ENGLISH LETTER FREQUENCIES
29
STATISTICS FOR DOUBLE & TRIPLE LETTERS
Double letters:
th he an in er re es on, …
Triple letters:
the and ent ion tio for nde, …
30
USE IN CRYPTANALYSIS
To attack, we
31
EXAMPLE CRYPTANALYSIS
Given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
Count relative letter frequencies
Guess {P, Z} = {e, t}
Of double letters, ZW has highest frequency, so guess ZW = th and hence ZWP =
the
Proceeding with trial and error finally get:
33