Académique Documents
Professionnel Documents
Culture Documents
Spring 2008
Deliveries Cipher Crack it
Deliveries
Work in group of 2
Oral examination
• Show your code and tests
• Describe your implementation
• Demonstrate your working version
Date: February 7th and 8th
Deadline: February 13th at 17.00
Examination: February 14th and 15th at 10.00
Goal
Find plaintexts and keys for the 6 given cryptotexts
2
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
3
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
Example
Plaintext: “Renaissance”
Key word: “Band”
4
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
Cryptoanalysis
Step 1
Determines the key length m
Step 2
Determines the key K = (k1 , k2 , . . . , km )
5
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
6
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
Kasiski test
Observation
2 identical segments of plaintext will be encrypted to the same
ciphertext whenever their occurence in the plaintext in δ
positions apart, where δ ≡ 0[m]
7
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
8
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
9
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
Index of Coincidence
Text: X = (x1 , x2 , . . . , xn )
Text length: n
ni number of occurrences of the i th letter in X
P25 ni (ni −1)
Ic (X) = i=0 n(n−1)
10
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
Index of Coincidence
IEnglish ∼ 0.065
1 2 1 2
IRandom = 25
P 2
P25 1
i=0 pi = i=0 26 = 26 26 = 26 ∼ 0.038
11
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
12
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
y1 = x1 xm+1 x2m+1 . . . ,
y2 = x2 xm+2 x2m+2 . . . ,
.. .. ..
. . .
ym = xm x2m x3m . . .
However,
0.027∗n
m= (n−1)∗Ic (X)−0.038∗n+0.065
13
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
14
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)
Deliveries Cipher Crack it
15
OSKomp’08 | Cryptology – Lab 1 (Cryptoanalysis of the Vigenere cipher)