vigenére cipher kimberly chiffens & maria jannelli

12
Vigenére Cipher Kimberly Chiffens & Maria Jannelli

Upload: thomasine-thompson

Post on 02-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

Vigenére Cipher

Kimberly Chiffens&

Maria Jannelli

Page 2: 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

Page 3: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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); • }

Page 4: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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”

Page 5: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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))));

Page 6: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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

Page 7: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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

Page 8: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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

Page 9: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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

Page 10: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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….

Page 11: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

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.

Page 12: Vigenére Cipher Kimberly Chiffens & Maria Jannelli

References

•Principles of Operating Systems: Design and Application, Brian L. Stuart. Course Technology. 2009.•Invitation to Cryptology, Thomas H. Barr. Prentice Hall. 2002.