The Vigènere cipher is the best-known example of a polyalphabetic substitution there is. The Vigenere Cipher initially seems very secure; however, it can be broken fairly easily once the length of the keyword is known. If you know that the length of the keyword is n, you can break the ciphertext into n co-sets and attack the cipher using frequency analysis if the ciphertext sample is long enough > SOURCE. This page, and the corresponding source code, will look at one method to determine the length of the keyword, the Index of Coincidence (IC) test, and how once an approximation of the key length is complete, the plaintext can be recovered using statistical approaches such as the Chi-Square test.
If the key length is unknown to ..