Upload
thomasine-thompson
View
220
Download
1
Tags:
Embed Size (px)
Citation preview
Vigenére Cipher
Kimberly Chiffens&
Maria Jannelli
Progress Report•Implementation of Vigenere encryption and decryption•Applet design•Implementation of Friedman attack to find key length •Apply cryptanalysis algorithms
Friedman AttackKey Length
• Uses frequencies to count the amount of each letter in the ciphertext
• We multiply the count of each letter by count minus 1 and then add up the sum.
• It computes the sum of the frequencies as follows:• for(int k = 0; k < 26; k++)
• sum = sum + Fcount[k]*(Fcount[k]-1); • }
Friedman Attack
• To find this we divide the entire sum of the frequencies with the length of the cipher times the length minus 1.• index= sum/(length*(length-1));
• Then we must calculate the key length. To do so we use this equation:• keyword= ((0.0265*length)/((0.065-index)+
(length*(index-0.0385))));
Index of Coincidence
The probability that two randomly selected letter in the English alphabet letters are identical
The probability of choosing an identical pair of letters from a pool in which there are equal numbers of the respective letters
The probability that a letter selected at random is an “A”
Ciphertext:KSMEHZBBL KSMEMPOGA JXSEJCSFL ZSYFrequencies:
Length = 30 letters Key: RELATIONSPlaintext:TOBEORNOT TOBETHATIST HEQUEST ION
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
1 2 1 0 3 1 1 1 0 2 2 2 3 0 1 1 0 0 5 0 0 0 0 1 1 2
Friedman Example
keyword=((0.0265*length)/((0.065- index)+(length*(index -0.0385))));
Cryptanalysis
C T M Y R D O I B S R E S R R R I J Y R E K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3
B Y L D I Y M L C C Y Q X S R R M L Q F S K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3
D X F O W F K T C Y J R R I Q Z S M X K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1 K2 K3 K1
Step One: Find the key lengthStep Two: Generate possible keys
CryptanalysisSet 1: Red Letters
Frequency Set 2:Green Letters
Frequency Set 3:Blue Letters
Frequency
C 2 T 2 M 2Y 3 R 4 D 1O 2 I 4 B 1S 2 Y 2 E 2R 3 L 1 R 3B 1 S 2 J 1D 2 M 1 L 2M 1 F 1 Y 1X 2 X 1 C 2Q 1 W 1 Q 2K 1 J 1 S 1Z 1 F 2
CryptanalysisMost frequent letters of the English alphabet: E, T, N, O, R, I, A, SCiphertext letter Possible plaintext
letterCorresponded key-word letterPossible first letter of the keyword
Y E UY T FY N LY O KY R HY I QY A YY S G
Cryptanalysis
Ciphertext letter Possible plaintext letter
Corresponded key-word letterPossible second letter of the keyword
R E NR T YR N ER O DR R AR I JR A RR S Z
CryptanalysisCorresponded key-word letterPossible first letter of the keyword
Corresponded key-word letterPossible second letter of the keyword
Corresponded key-word letterPossible third letter of the keyword
U N NF Y YL E EK D DH A AQ J JY R RG Z Z
Create all possible three-letter words by choosing first letter from the first column, second from second column and third from third column.Possible keywords: FED, FEE, FEN, LEA, KEN, KEY, HER….
Cryptanalysis
The answer: Deciphering the ciphertext with keyword KEY will give a plaintext:SPOON FEEDING IN THE LONG RUN TEACHES US NOTHING BUT THE SHAPE OF SPOON.
References
•Principles of Operating Systems: Design and Application, Brian L. Stuart. Course Technology. 2009.•Invitation to Cryptology, Thomas H. Barr. Prentice Hall. 2002.