Vigenère cipher: Difference between revisions

Content deleted Content added
more stuff
Cryptanalysis: Friedman test
Line 37:
 
==Cryptanalysis==
===Kasiski examination===
''Main article: [[Kasiski examination]]''
 
[[Friedrich Kasiski]] ''published'' the first successful attack on the Vigenère cipher in [[1863]]., but [[Charles Babbage]], however, had already developed (but did not publish) the same test in [[1854]].
 
The idea behind the Vigenère cipher is like that of all polyalphabetic ciphers &mdash; to make [[frequency analysis]] more difficult. Frequency analysis is the practice of decrypting a message by counting the frequency of ciphertext letters, and equating it to the letter frequency of normal text. For instance if <tt>P</tt> occurred most in a ciphertext whose plaintext is in [[English language|English]] one could suspect that <tt>P</tt> corresponded to <tt>E</tt>, because <tt>E</tt> is the most frequently used letter in English. Using the Vigenère cipher, <tt>E</tt> can be enciphered as any of several letters in the alphabet at different points in the message thus defeating simple frequency analysis.
Line 56 ⟶ 57:
 
Then the Kasiski test can be used.
===Friedman test===
The Friedman test (also known as the Kappa test) was invented in [[1925]] by [[William F. Friedman]]. Friedman used the [[index of coincidence]], the probability that any two cipher letters represent the same letter in the plaintext, to break the cipher. By knowing that the probability of any two randomly chosen letters in English are the same is about 6.5%, Friedman found that the key length ''I'' is approximately equal to:
 
<math>{.027n}\over{(n-1)\boldsymbol{I}-.038n+.065}</math>
 
where '''I''' (the index of coincidence) equals
 
<math>\sum_{n=1}^{26}\frac{n_i(n_1 -1)}
{n(n-1)}</math>
 
n is the length of the text and <math> n_1 </math> through <math>n_{26}</math> are the frequencies of the letters.
 
==The cipher of Blaise de Vigenère==