Cryptanalysis of
Autokey Cipher
Agenda
1 What is Autokey Cipher?
2 An Example
3 What is Cryptanalysis?
4 Cryptanalysis of Autokey Cipher
2
1. What is Autokey Cipher?
• An autokey cipher (also known as the autoclave cipher) is a cipher which incorporates the
message (the plaintext) into the key.
• There are two forms of autokey cipher:
1. key autokey cipher,
2. text autokey ciphers
• A key-autokey cipher uses previous members of the keystream to determine the next element in
the keystream.
• A text-autokey uses the previous message text to determine the next element in the keystream.
3
2. An Example
• message: meet at the fountain
• keyword: KILT
Hence,
plaintext: MEETATTHEFOUNTAIN
key: KILTMEETATTHEFOUN
ciphertext: WMPMMXXAEYHBRYOCA
4
3. What is Cryptanalysis?
• Cryptanalysis is the study of analyzing information systems in order to study the
hidden aspects of the systems.
• Cryptanalysis is used to breach cryptographic security systems and gain access to
the contents of encrypted messages, even if the cryptographic key is unknown.
5
4. Cryptanalysis of Autokey Cipher?
• We will use previously ciphered text for cryptanalysis.
• We try common words, bigrams, trigrams etc. in all possible positions in the key.
For example, THE:
Ciphertext Key plaintext
WMP MMX XAE YHB RYO CA
W MPM MXX AEY HBR YOC A
WM PMM XXA EYH BRY OCA
THE THE THE THE THE ..
. THE THE THE THE THE .
.. THE THE THE THE THE
DFL TFT ETA FAX YRK ..
. TII TQT HXU OUN FHY .
.. WFI EQW LRD IKU VVW
6
Cryptanalysis of Autokey Cipher (cont.)
• We sort the plaintext fragments in order of likelihood:
unlikely <------------------> promising
EQW DFL TFT ... ... ... ... ETA OUN FAX
• We know that a correct plaintext fragment will also appear in the key, shifted right by the length
of the keyword.
• Similarly our guessed key fragment ("THE") will also appear in the plaintext shifted left.
• So by guessing keyword lengths (probably between 3 and 12) we can reveal more plaintext and
key
7
Cryptanalysis of Autokey Cipher (cont.)
• Trying this with "OUN" (possibly after wasting some time with the others):
shift by 4:
ciphertext:
WMPMMXXAEYHBRYOCA
key:
......ETA.THE.OUN
plaintext:
......THE.OUN.AIN
by 5:
ciphertext:
WMPMMXXAEYHBRYOCA
key:
.....EQW..THE..OU
plaintext:
.....THE..OUN..OG
by 6:
ciphertext:
WMPMMXXAEYHBRYOCA
key:
....TQT...THE...O
plaintext:
....THE...OUN...M
8
Cryptanalysis of Autokey Cipher (cont.)
• We see that a shift of 4 looks good (both of the others have unlikely Qs), so we shift
the revealed "ETA" back by 4 into the plaintext:
ciphertext: WMPMMXXAEYHBRYOCA
key: ..LTM.ETA.THE.OUN
plaintext: ..ETA.THE.OUN.AIN
• We have a lot to work with now. The keyword is probably 4 characters long ("..LT"),
and we have some of the message:
M.ETA.THE.OUN.AIN
9
Cryptanalysis of Autokey Cipher (cont.)
• Because our plaintext guesses have an effect on the key 4 characters to the left, we
get feedback on correct/incorrect guesses, so we can quickly fill in the gaps:
MEETATTHEFOUNTAIN
• The ease of cryptanalysis is thanks to the feedback from the relationship between
plaintext and key.
• A 3-character guess reveals 6 more characters, which then reveal further characters,
creating a cascade effect, allowing us to rule out incorrect guesses quickly.
10
Thank you

Cryptanalysis of autokey cipher

  • 1.
  • 2.
    Agenda 1 What isAutokey Cipher? 2 An Example 3 What is Cryptanalysis? 4 Cryptanalysis of Autokey Cipher 2
  • 3.
    1. What isAutokey Cipher? • An autokey cipher (also known as the autoclave cipher) is a cipher which incorporates the message (the plaintext) into the key. • There are two forms of autokey cipher: 1. key autokey cipher, 2. text autokey ciphers • A key-autokey cipher uses previous members of the keystream to determine the next element in the keystream. • A text-autokey uses the previous message text to determine the next element in the keystream. 3
  • 4.
    2. An Example •message: meet at the fountain • keyword: KILT Hence, plaintext: MEETATTHEFOUNTAIN key: KILTMEETATTHEFOUN ciphertext: WMPMMXXAEYHBRYOCA 4
  • 5.
    3. What isCryptanalysis? • Cryptanalysis is the study of analyzing information systems in order to study the hidden aspects of the systems. • Cryptanalysis is used to breach cryptographic security systems and gain access to the contents of encrypted messages, even if the cryptographic key is unknown. 5
  • 6.
    4. Cryptanalysis ofAutokey Cipher? • We will use previously ciphered text for cryptanalysis. • We try common words, bigrams, trigrams etc. in all possible positions in the key. For example, THE: Ciphertext Key plaintext WMP MMX XAE YHB RYO CA W MPM MXX AEY HBR YOC A WM PMM XXA EYH BRY OCA THE THE THE THE THE .. . THE THE THE THE THE . .. THE THE THE THE THE DFL TFT ETA FAX YRK .. . TII TQT HXU OUN FHY . .. WFI EQW LRD IKU VVW 6
  • 7.
    Cryptanalysis of AutokeyCipher (cont.) • We sort the plaintext fragments in order of likelihood: unlikely <------------------> promising EQW DFL TFT ... ... ... ... ETA OUN FAX • We know that a correct plaintext fragment will also appear in the key, shifted right by the length of the keyword. • Similarly our guessed key fragment ("THE") will also appear in the plaintext shifted left. • So by guessing keyword lengths (probably between 3 and 12) we can reveal more plaintext and key 7
  • 8.
    Cryptanalysis of AutokeyCipher (cont.) • Trying this with "OUN" (possibly after wasting some time with the others): shift by 4: ciphertext: WMPMMXXAEYHBRYOCA key: ......ETA.THE.OUN plaintext: ......THE.OUN.AIN by 5: ciphertext: WMPMMXXAEYHBRYOCA key: .....EQW..THE..OU plaintext: .....THE..OUN..OG by 6: ciphertext: WMPMMXXAEYHBRYOCA key: ....TQT...THE...O plaintext: ....THE...OUN...M 8
  • 9.
    Cryptanalysis of AutokeyCipher (cont.) • We see that a shift of 4 looks good (both of the others have unlikely Qs), so we shift the revealed "ETA" back by 4 into the plaintext: ciphertext: WMPMMXXAEYHBRYOCA key: ..LTM.ETA.THE.OUN plaintext: ..ETA.THE.OUN.AIN • We have a lot to work with now. The keyword is probably 4 characters long ("..LT"), and we have some of the message: M.ETA.THE.OUN.AIN 9
  • 10.
    Cryptanalysis of AutokeyCipher (cont.) • Because our plaintext guesses have an effect on the key 4 characters to the left, we get feedback on correct/incorrect guesses, so we can quickly fill in the gaps: MEETATTHEFOUNTAIN • The ease of cryptanalysis is thanks to the feedback from the relationship between plaintext and key. • A 3-character guess reveals 6 more characters, which then reveal further characters, creating a cascade effect, allowing us to rule out incorrect guesses quickly. 10
  • 11.