autokey ciphers

18
Autokey Ciphers

Upload: minor

Post on 25-Feb-2016

123 views

Category:

Documents


3 download

DESCRIPTION

Autokey Ciphers. History. The Autokey Cipher is almost identical to the Vigen è re Cipher – only it’s more secure It was first invented by Girolamo Cardano and was made more secure by Vigen è re. Encryption . Start by choosing plain text and a keyword of any length - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Autokey Ciphers

Autokey Ciphers

Page 2: Autokey Ciphers

History• The Autokey Cipher is almost identical to

the Vigenère Cipher – only it’s more secure

• It was first invented by Girolamo Cardano and was made more secure by Vigenère

Page 3: Autokey Ciphers

Encryption • Start by choosing plain text and a keyword

of any length• Write the keyword over the plain text, and

then immediately after the keyword, begin writing the plain text

Key:  RESTAURANTMEET

Plaintext: MEETMEFORLUNCH

Page 4: Autokey Ciphers

Encryption II• After you assign a keyword to all of the

plain text, you are going to need a tabula recta.

Page 5: Autokey Ciphers

Encryption III• In order to encrypt plain text, you locate

the row with the first letter to be encrypted, and the column with the first letter of the key. The letter where the line and column cross is the ciphertext letter

Page 6: Autokey Ciphers

Example• Key:  RESTAURANTMEET• Plaintext: MEETMEFORLUNCH

Cipher letter = D

Continue this for the rest of the message.

Page 7: Autokey Ciphers

Example, cont.• You should now have this encrypted text: Key:  RESTAURANTMEET Plaintext:  MEETMEFORLUNCH Ciphertext: DIWMMYWOEEGRGA

• Now, if someone gave you the message “DIWMMYWOEEGRGA”, would you know how to decrypt it?

Page 8: Autokey Ciphers

Decryption• Assuming the buddy who sent you the

secret messagesecret message likes you, he probably sent you the keyword, too.

• With a key of RESTAURANT and ciphertext DIWMMYWOEEGRGA, find the key characters in the top-column header and the ciphertext characters in the table

Page 9: Autokey Ciphers

Example, Cont.Key:  R ESTAURANTMEETCiphertext: D IWMMYWOEEGRGA

Plaintext = M

Repeat!

The secret message:

“Meet me for lunch”.

Page 10: Autokey Ciphers

Cryptanalysis• Now, say your buddy sent you the secret secret

messagemessage, but didn’t give you the secret secret password password - you now have a wonderful problem!

Page 11: Autokey Ciphers

How to solve it• Choose common trigrams or bigrams in all

possible positions for the key.• Here, we use “the”.• Try it in all possible positions for the key

Page 12: Autokey Ciphers

Example Ciphertext: WMP MMX XAE YHB RYO CA Key: THE THE THE THE THE .. Plaintext: DFL TFT ETA FAX YRK ..

Ciphertext: W MPM MXX AEY HBR YOC A Key: . THE THE THE THE THE . Plaintext: . TII TQT HXU OUN FHY .

Ciphertext: WM PMM XXA EYH BRY OCA Key: .. THE THE THE THE THE Plaintext: .. WFI EQW LRD IKU VVW

Promising!

Page 13: Autokey Ciphers

Example Cont.• We also know that some of the plain text is

also in the key, to the right of the keyword• In the previous slide, we marked the

possible plain text fragments “ETA”, “OUN” and “FAX” as promising

• Now we will use these, plus “THE” to try and guess the keyword length

Page 14: Autokey Ciphers

Example Cont.Shift by 4:Ciphertext: WMPM M XXA E YHB R YOC A Key: . . . . . . ETA . THE . OUN .Plaintext: . . . . . .THE . OUN . AIN .Shift by 5: Ciphertext: WMPMMXXAEYHBRYOCAKey: .....EQW..THE..OU Plaintext: .....THE..OUN..OG

Unlikely to have a “Q” in the keyword.

Plain text looks good!

Page 15: Autokey Ciphers

Example Cont.• Now we have to use our brains• The four letter shift looks good, so we can

guess that the keyword is probably about 4 characters long

• Through the “guess-and-check” method, we can fill in some blanks

Page 16: Autokey Ciphers

Almost done!• You should now have something like this:

ciphertext: WMPMM X XAE YHB R YOC Akey: . . LTM . ETA . THE . OUN .Plaintext: . .ETA . THE . OUN . AIN .

Page 17: Autokey Ciphers

The secret message?• “Meet at the fountain”.

• …and no, Mr. Evans, that wasn’t “relatively pain-free.”

Page 18: Autokey Ciphers

Sources

• http://realmoftwelve.kryptos.info/toolbox/autokey.html

• http://en.wikipedia.org/wiki/Autokey_cipher