# 03 How can I crack a Vigenère encryption?

Kasiski examination – Wikipedia

In 1854, the British Charles Babbage succeeded in deciphering a Vigenère-encoded text. However, he kept his method secret.

In 1863, the Prussian infantry major Friedrich Wilhelm Kasiski published this method in the book “Die Geheimschriften und die Dechiffrir-Kunst”, which he invented independently of Babbage.
In his honor, the procedure is called the Kasiski test.

First, one searches the ciphertext for letter sequences of length 2 or longer that occur more than once. Then determine the distance between two identical sequences, i.e. count the letters from the first letter of the first sequence (inclusive) to the first letter of the second sequence (exclusive). Proceed in this way with all sequences found and write down the distances. You get a list of natural numbers.
These are now decomposed into prime factors. Equal divisors can thus be found quickly. Coincidental matches are then also easily recognizable, because they are out of sequence.

With the knowledge of the length of the key, the polyalphabetic cipher can now be split into monoalphabetic ciphers, which can be cracked in a known manner with the help of frequency analysis. Thus it can be found out for each of the parts with which ciphertext alphabet it was encrypted.

Essential requirements for this method are

• long ciphertexts
• short keys