Sharpn

Sharpen your mind

Al-Kindi Breaks a Cipher

The Islamic Golden Age

A Kufa Aristocrat in Baghdad

Abu Yusuf Ya'qub ibn Ishaq al-Kindi was born around 801 in Kufa, into the Arabian tribe of Kinda; his father held an Abbasid governorship. He studied in Basra, then Baghdad, and won the patronage of the caliphs al-Ma'mun and al-Mu'tasim; it was al-Mu'tasim who made him tutor to his son Ahmad. He wrote on optics, music, drug dosage and the Indian numerals. Whether he held any formal post at the House of Wisdom is less certain than popular accounts suggest; what is documented is a working circle of translators around him. The Arabic Theology of Aristotle was rendered for that circle by Ibn Na'ima al-Himsi, a Syrian Christian, and corrected by al-Kindi for prince Ahmad. It is not Aristotle. It is Plotinus, arriving probably via Syriac, under the wrong name.

Counting as a Weapon

Around 850, in Baghdad, al-Kindi wrote a short essay usually cited as Risala fi Istikhraj al-Mu'amma, on extracting encrypted messages. Its central move is unglamorous and complete. A substitution cipher can disguise which sign stands for which letter; it cannot change how often each letter gets used. So take a long passage of ordinary writing in the language you believe the message is in, count every letter, rank them. Count the signs in the cipher, rank them. Align the two lists. He called these the quantitative expedients of letters, and he did not stop at single letters: he works on to letter pairs, common short words, and padding symbols inserted to spoil the counts, warning that a short message yields unreliable numbers.

Why It Happened in Arabic

There is nothing mystical in this. It grew out of a particular scholarly obsession: Arabic grammarians and Quranic scholars had spent generations counting and cataloguing their own language, working out which letters may stand beside which, how words are generated from three-letter roots, how spellings distribute. Al-Khalil ibn Ahmad al-Farahidi (c. 718-786), compiler of a pioneering Arabic dictionary, is credited with a book on ciphers, Kitab al-Mu'amma. It is lost. A story attached to him has him breaking a Greek cryptogram sent by a Byzantine emperor, but it survives only in later Arabic reports, and the book that might corroborate it is gone. The counting culture is attested in surviving work. That particular rescue is not.

The Flogging, and the Missing Story

Under al-Mutawakkil, al-Kindi lost his footing. The fullest account comes from Ibn Abi Usaybi'a, compiling a biographical dictionary of physicians in the 1200s, roughly four centuries after the fact. He reports that the Banu Musa brothers, rival scholars with the caliph's ear, engineered a flogging and had al-Kindi's books carted off into a store nicknamed al-Kindiyya; the same account has them returned to him later, through the intervention of the scholar Sanad ibn Ali. Ibn al-Nadim's catalogue of around 987 credits him with more than 260 titles, thirty-two of them on geometry alone; most are lost to us all the same. And notice what the record does not hold: no account of al-Kindi personally cracking an enemy dispatch. Popular retellings supply one, sometimes with an army saved. The sources supply a method, not a war story.

Catalogued, Unread, and Then Read

In 1967 the historian David Kahn wrote that cryptology was born among the Arabs, reasoning largely from a 1412 Egyptian encyclopedia that quoted earlier treatises presumed lost. Researchers from the Arab Academy of Damascus, Mrayati, Meer Alam and at-Tayyan, went to look, and turned up more than fifteen Arabic cryptology manuscripts, most of them in Istanbul's Suleymaniye collection. Al-Kindi's was among them. It had never been hidden, only catalogued and unread. Their Arabic edition appeared in 1987, an English one from 2003. In Europe the earliest known Western description of frequency analysis is Alberti's, in 1467, some six centuries later, with no documented line running between the two.

Key Dates to Remember

  • c. 718-786Life of al-Khalil ibn Ahmad al-Farahidi, the Basran philologist credited with a book on ciphers, Kitab al-Mu'amma. It does not survive.
  • c. 801-873Al-Kindi, born in Kufa, dies in Baghdad after decades under Abbasid patronage and a late fall from favour.
  • c. 850Al-Kindi writes Risala fi Istikhraj al-Mu'amma in Baghdad, the earliest known description of breaking a cipher by counting letters.
  • 1467Leon Battista Alberti's treatise on ciphers gives the earliest known Western account of frequency analysis, about six centuries later.
  • 1987Damascus researchers locate over fifteen Arabic cryptology manuscripts in Istanbul; the al-Kindi treatise is edited and published in Arabic.
Fun Fact: The method's most famous victim believed her cipher unreadable. In July 1586 Mary, Queen of Scots, wrote to Anthony Babington in a nomenclator, symbols for letters plus codewords for whole phrases. Walsingham's cryptanalyst Thomas Phelippes broke the letter substitutions by counting and read the codewords off from context. The original was resealed and sent on so the plot could run; when Phelippes had finished decoding her reply he drew a small gallows on the outside of the packet he sent Walsingham. Mary was executed on 8 February 1587.
Next lesson
The Wreck and the Promissory Note