Lecture1 PDF
Lecture1 PDF
Riccardo Pucella
Goals of Cryptography
Alice wants to send message X to Bob
C = Z26
K = Z26
ek = ?
Written a (mod m)
Remainder of a divided by m
Modular Arithmetic
Zm = { 0, 1, ..., m-1 }
Define a + b in Zm to be a + b (mod m)
Define a x b in Zm to be a x b (mod m)
Obeys most rules of arithmetic
+ commutative, associative, 0 additive identity
x commutative, associative, 1 mult. identity
+ distributes over x
Formally, Zm forms a ring
For a prime p, Zp is actually a field
Shift Cipher, Finished
C = Z26
K = Z26
d(a,b)(y) = ?
φ(26) X 26
Substitution Cipher
P = Z26
C = Z26
K = all possible permutations of Z26
A permutation P is a bijection from Z26 to Z26
ek(x) = k(x)
dk(x) = k-1(x)
Example
Shift cipher, affine cipher
Size of keyspace?
Cryptanalysis
Kerckhoff’s Principle:
The opponent knows the cryptosystem being used
No “security through obscurity”
Objective of an attacker
Identify secret key used to encrypt a ciphertext
Different models are considered:
Ciphertext only attack
Known plaintext attack
Chosen plaintext attack
Chosen ciphertext attack
Cryptanalysis of Substitution Cipher
Statistical cryptanalysis
General recipe:
Identify possible encryptions of E (most common English letter)
Use trigrams
Find ‘THE’
Obvious idea
Polyalphabetic ciphers
Size of keyspace?
Cryptanalysis of Vigenère Cipher
Written Ic(X)
Encrypted by a shift ki
f0+ki (mod 26)/n’, ..., f25+ki (mod 26)/n’ should be close to p0, ..., p25
P = C = (Z26)m
K = (Z26)m
∑
Using zi+m = j=0,...,m-1 cjzi+j (mod 2), we get m linear
equations in m unknowns (c0,...,cm-1), which we can solve
Autokey Cipher
A simple example of a non-synchronous stream cipher
P = C = K = L = Z26
ez(x) = x + z (mod 26)
dz(x) = x - z (mod 26)
The keystream corresponding to key k is
z1 = k
zi = xi-1 for all i ≥ 2.
where x1, x2, x3, ... is the sequence of plaintext