Count, rank, compare: breaking a cipher without the key
Book IV · Islamic world
Scene In Baghdad in the 9th century the scholar al-Kindi wrote a treatise on deciphering encrypted messages. Its core: you count the letters. Every language has common and rare ones, and replacing them with other signs does not change that.
A long cryptogram: every letter of the message was replaced, always by the same other letter. Like al-Kindi you count how often each cipher letter occurs and compare that with how often letters occur in our language. Tap a cipher letter and choose what it should stand for. “Rank by rank” makes al-Kindi’s suggestion for you; you decide the rest from the text.
The cryptogram
The cryptogram has 284 letters, in groups of five. Under each letter is what you have assigned so far.
Blue tick in a row: how often the chosen plain letter would occur on average in a text of this length. If the bar is far off, the assignment is probably wrong.
Assign the cipher letters
Seals of this station
Solvedsolve the puzzle
Best effortdecipher the message without having a letter revealed
Masterpiecedecipher without revealing and correct at most ten of your own assignments
The method in al-Kindi’s words (in English translation, as Ycart quotes it): you acquire a fairly long plaintext in the language and count how often each letter occurs. We have not read the Arabic manuscript itself.
Among the expedients we use in cryptanalysing a cryptogram if the language is already known, is to acquire a fairly long plaintext in that language, and count the number of each of its letters.
Rank by rank
Then the most frequent cipher symbol is taken to be the letter that was “first” in the plaintext, the second most frequent the “second”, and so on. That is exactly what the “Rank by rank” button does.
Then we go back to the message we want to cryptanalyse, and classify the different symbols, searching for the most frequent symbol of the cryptogram and we regard it as being the same letter we have marked
The image of gold
Why some letters are more frequent, al-Kindi explains with an image: gold is the material of many shapes of finery. So the vowels are the material of every text and occur more often than the non-vowels.
Al Kindī had based his counts on 7 pages totaling 3667 letters
How long must the text be?
How long must the text be? A later Arab author, ʿAfīf ibn ʿAdlān (1187 to 1268), gives a rule of thumb of at least about ninety letters. Our cryptogram, at around 300, is much longer.
The length of the text to be cryptanalysed should be at least in the neighborhood of ninety letters as a rule of thumb
A conjecture
A conjecture about the origin: perhaps close study of the Qur’an first showed that Arabic has a characteristic letter frequency. As Wikipedia writes, this is a suggestion.
It has been suggested that a close textual study of the Qur'an first brought to light that Arabic has a characteristic letter frequency.
Since al-Kindi
According to Ycart, since al-Kindi all treatises on cryptology contain a section on simple substitution with one alphabet. Our inference: Caesar’s shift is also such a simple substitution and so open to attack by this method.
Letter frequency is the number of times letters of the alphabet appear on average in written language.
German frequencies
The one for German comes from the count after Beutelspacher: umlauts are counted as ae, oe, ue and the ß as a character of its own. We leave the ß out.
Die Umlaute ä, ö und ü wurden wie ae, oe und ue gezählt, ß als eigenständiges Zeichen.
Our cryptogram
Our cryptogram: it is written in English, not Arabic, and invented by us. The “Rank by rank” suggestion usually gets only the most frequent letters right; you find the rest by recognising words. That is the work al-Kindi’s method leaves open.