Cracking the Vigenère Cipher — Babbage, Kasiski, and the Key Length

For three centuries, the Vigenère cipher was considered unbreakable. And then two men — Charles Babbage in England and Friedrich Kasiski in Prussia — independently figured out how to crack it. Their insight was as elegant as it was devastating: if the keyword repeats, and the plaintext has repetitions of its own, then some trigrams in the ciphertext must repeat too — and the distances between those repetitions leak the key length. In this lesson we walk through the full Kasiski examination on a real ciphertext. We hunt for repeated trigrams, measure the distances between them, take their greatest common divisor to recover the key length, and then split the ciphertext into columns — one per key position. Each column is a simple Caesar cipher, and we crack all five of them at once with frequency analysis, landing on the keyword PARIS and the plaintext underneath. Follow along on the companion site, where you can paste your own Vigenère ciphertext, run the Kasiski examination interactively, and watch the columns decrypt in real time: https://kyri-cou.github.io/cryptography/ This is the payoff lesson for the Vigenère series in our cryptography course — watch the earlier lessons first if you haven't already.