Cryptanalysis of the Vigenere Cipher Using Signatures and Scrawls

advertisement
Cryptanalysis of the Vigenere Cipher
Using Signatures and Scrawls
• To break a Vigenere cipher you need to know
the keyword length.
– The Kasiski and Friedman tests give keyword
lengths, but not the keyword.
– The method described here not only estimates the
keyword length but also allows the determination
of the keyword.
• The method was described by Charles
Babbage 1854…
Mathematical Description of the
Vigenere Cipher and Cosets
• Fact: When a plaintext letter is enciphered using a keyword
letter, the result is equivalent to adding the two characters
together mod 26.
• Example 1: Encipher with Vigenere
• The first step in decrypting a Vigenere cipher is to know the
length of the keyword.
• Definition: A coset are all the letters of the Vigenere
ciphertext that are enciphered by the same letter of the
keyword.
– Note: A coset of the Vigenere ciphertext has the same
encipherment as a shift cipher…
Mathematical Description of the
Vigenere Cipher and Cosets
• Example 2: Keyword PET
• Fact: The number of cosets is the length of the keyword.
• Note: If the length of the keyword is n, then there are 26^n
possible ways the Vigenere cipher can be constructed.
• Note: Because a coset is formed from a shift cipher, we can
perform a frequency analysis on that coset, which frequency
is the same as the regular alphabet only shifted according to
the letter of the keyword.
• Example 3 – Three letter keyword decipher…
Mathematical Description of the
Vigenere Cipher and Cosets
• The method described in Example 3 describes how to break the
Vigenere Cipher. Let’s now describe the method in more detail:
– Definition: English Signature Graph– the plot of the probabilities of
printed standard English plotted in increasing sorted order (from
smallest to largest).
– Definition: English Sample Signature Graph– The signature plot of the
probability frequencies of a sample of letters (small set). Note:
• Some letters may not appear in the sample.
• Some letters will have probability zero. Other letters will have probability
greater than in the English Signature
• The sum of all the probabilities is 1.
• The sample signature curve should be lower than the English Signature
initially, then become higher then the English Signature for the higher
occurring frequencies.
• The sample signature of the plaintext message should have the same sample
signature as the ciphertext, when the shift on the cosets is correct…
Mathematical Description of the
Vigenere Cipher and Cosets
• Example 3A: Sample Signature
– The Table of frequency of letters
– The Sample and Signature Graphs
– Notice that for the graphs the Sample signature
probabilities start out below the English Signature
but end up above. As mentioned before this is to
be expected. (This behavior is typical of small
sample signatures)…
Mathematical Description of the
Vigenere Cipher and Cosets
• How can we use the concept of a signature to
determine the length of the keyword used in a
Vigenere cipher (Each letter of the keyword
performs a simple shift cipher and forms a coset)
– Each coset should perform like a simple shift cipher.
Since there are few letters in each coset we would
expect the first few letters to be below the English
Signature, and those at the end to be above the
English Signature.
– The number of cosets is the same as the number of
letters in the keyword.
– Example 5 Comparing Coset Signatures…
Determining The Keyword Using
Scrawls
•
•
•
•
Scrawl – The graph of the probability distribution of letters in alphabetical order.
English Scrawl – The scrawl of the entire English Language.
Sample Scrawl – The scrawl of a sample of English (for example a ciphertext
message)
Facts about Scrawls:
– For a shift cipher, the scrawl of the ciphertext will be roughly the shape of the English Scrawl
except it is shifted to the right.
•
For the Vigenere this means each coset
– For each coset produced by a keyword letter in the Vigenere cipher, we will draw successive
shifts (from 0 to 25) until we find the sample coset scrawl with the closest match to the
English Scrawl.
– The alphabet letter in our MOD 26 alphabet assignment corresponding to the shift amount
number found in step 2 is the shift amount when ciphering the text. The inverse of the
number will be the keyword letter needed in the Vigenere encipherment.
– Repat steps 2 and 3 for each coset.
•
Example 6: Continuation of Example 5…!
Download