1553, broken in print 1863Venice, then Prussia
Bellaso's countersign, and how Kasiski broke it
1 The story
In 1553 Giovan Battista Bellaso, from a noble family of Brescia, published a small booklet in Venice. In it he proposed a key that is easy to remember and easy to change: a word or a few words, which he called the countersign. You write the countersign over your message again and again, and each of its letters decides which shifted alphabet enciphers the letter below it. So the same letter of the message comes out in different ways, and simply counting letters no longer works. The method was later named after someone else, Blaise de Vigenère; in 1863 a retired Prussian officer, Friedrich Kasiski, published how to break it.
Read more
Bellaso. Almost nothing is known of his life. He served in the household of Cardinal Pio da Carpi, and his booklet of 1553 was printed again in 1557. He kept improving his ciphers and published a new book on them in 1564.
The square. A table of 26 alphabets, each shifted one place further, was already in print: the German scholar Johannes Trithemius had described it in his Polygraphia, the first printed book on cryptography. Bellaso’s new step was the key: instead of using the alphabets in a fixed order, a short word, which anyone can learn by heart and change at any time, chooses them.
Kasiski. Friedrich Wilhelm Kasiski (1805 to 1881) spent his career as an infantry officer in Prussia and retired as a major in 1852. In 1863 he published Die Geheimschriften und die Dechiffrir-Kunst (Secret writing and the art of deciphering). Later in life he turned to archaeology instead.
2 The machine
Choose a countersign and type a message. Each key letter sits over one letter of the message and picks the shifted alphabet for it.
3 Your turn
This message was enciphered with an unknown countersign (we wrote it for this puzzle). Break it the way Kasiski describes, in two steps. Step 1: find pieces of ciphertext that repeat and measure the gaps between them; the key length divides the gaps. Step 2: split the message into one column per key letter. Each column is an ordinary shift cipher, so its letter counts look like English, just moved along. Slide each column until its bars match.
Cracked · in your notebook
Stuck?
- Most gaps are multiples of the same number. 10 fits many gaps too, but 10 is twice that number.
- The key has 5 letters. In each column, look for the tallest bar: it is usually E.
- The countersign is an Italian word for a flower, FIORE.
4 What really happened
What Kasiski saw. When a common word, such as “the”, falls under the same part of the key twice, it is enciphered the same way twice. So the ciphertext repeats, and the gap between the repeats is a multiple of the key length. Kasiski’s advice: measure the gaps, break them into factors, and the factor that keeps coming back is the length of the key. With the length known, the message falls apart into columns that are each a simple shift, and simple shifts fall to letter counting. This two-step attack is still called the Kasiski examination.
“Unbreakable”? For centuries the cipher was thought to be unbreakable. It was not: codebreakers of the 16th century, such as Giovanni Battista Argenti, already read some messages in it, by guessing the key. Kasiski’s book was the first general method in print, one that works without a lucky guess.
Then and now: the Toolbox has a Vigenère cipher, Kasiski examination and a Vigenère breaker that does both steps for you.
Sources
- D. Kahn, The Codebreakers, Macmillan, 1967: p. 137 (Bellaso), pp. 145 to 148 (Vigenère and the misnaming), pp. 207 to 209 (Kasiski).
- A. Petrucci, “Bellaso, Giovan Battista”, Dizionario Biografico degli Italiani, vol. 7, 1970 (in Italian). treccani.it
- K. Pommerening, “Polyalphabetic substitution: the Renaissance”, lecture notes on cryptology, University of Mainz (archived copy). web.archive.org
- D. Kahn, “Kasiski, Friedrich Wilhelm”, Neue Deutsche Biographie, vol. 11, 1977, p. 317 (in German). deutsche-biographie.de
- C. F. Rocca Jr., Cryptology Through History and Inquiry, section 4.3, “Nineteenth Century Revelations” (open textbook, Western Connecticut State University). sites.wcsu.edu