Secret codes

Al-Kindi

Date: c. 850Place: Baghdad (Iraq)

The Baghdad scholar who invented codebreaking by counting letters

Great codebreakers
Al-Kindi’s manuscript on deciphering
Al-Kindi’s manuscript on deciphering — the first description of frequency analysis
en:Image:Al-kindi_cryptographic.gif — Public domain — Wikimedia Commons

In brief

Al-Kindi, a 9th-century Arab philosopher and scholar, wrote in Baghdad the oldest known text explaining how to decipher a message without knowing the key. His method, frequency analysis, consists of counting the letters in the encrypted message and comparing them with the most common letters of the language.

The story

Abu Yusuf Yaqub al-Kindi lived in Baghdad, capital of the Abbasid caliphs, where the “House of Wisdom” translated Greek, Persian and Indian learning into Arabic. He was nicknamed “the philosopher of the Arabs”. He wrote on mathematics, medicine, optics, music… and cryptography. Scholars studying the Quran were already counting how often words and letters appeared: al-Kindi applied the idea to secret messages.

In his “Manuscript on Deciphering Cryptographic Messages”, he explains that you should take a long ordinary text in the message’s language, count how many times each letter appears, then do the same with the encrypted text. The most frequent sign probably matches the most frequent letter. The manuscript, long forgotten, was rediscovered in 1987 in a library in Istanbul.

Example

Did you know?

Frequency analysis breaks all simple substitutions, such as the Caesar cipher or the pigpen cipher. It would take centuries to invent defences.

Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.

In the same family: Great codebreakers