On this page
For centuries, military commanders and diplomats believed that swapping each letter of a message for a different symbol made it perfectly secure. If 'A' became 'Q' and 'B' became 'Z', the resulting text looked like random noise.
This illusion of perfect security ended in the 9th century. An Arab polymath named Abū Yūsuf Yaʻqūb ibn ʼIsḥāq aṣ-Ṣabbāḥ al-Kindī (c. 801–873 AD) realised that a language's natural structure cannot be hidden by simple substitution. According to historical records of cryptography, Al-Kindi's book, *A Manuscript on Deciphering Cryptographic Messages*, introduced the world to frequency analysis.
What is Al-Kindi's frequency analysis method?
Frequency analysis is a cryptanalysis technique based on the mathematical certainty that letters are not used equally. In his manuscript, Al-Kindi noted that certain letters in the Arabic language appear far more often than others. This statistical property holds true for almost every human language.
In a typical English text, for instance, the letters E, T, A, and O are the most common, while Z, Q, X, and J are rare. If a simple substitution cipher changes every 'E' to 'X', the letter 'X' will suddenly become the most frequent character in the encrypted text. Al-Kindi realised that by counting the frequencies of symbols in a ciphertext and matching them to the known frequencies of a language, a codebreaker could peel back the encryption.
This insight—that underlying data distributions survive superficial transformation—is considered the first known use of statistical inference. The discovery of these characteristic letter frequencies likely originated from close textual and linguistic studies of the Qur'an by Arab scholars.
How do you break a cipher using frequency analysis?
When faced with a substitution cipher, you can apply Al-Kindi's method systematically without guessing. Here is a framework for breaking a basic code:
Count the ciphertext: Tally every symbol in the encrypted message. Sort them from most frequent to least frequent.
Establish the baseline: Keep a standard frequency list for your target language handy. In English, the nonsense phrase "etaoin shrdlu" represents the 12 most frequent letters in order, according to analyses of letter frequency.
Make the primary substitutions: Assume the most frequent ciphertext symbol is 'E'. Substitute it throughout the text. If the second most frequent symbol is near the first in count, it is likely 'T' or 'A'.
Look for small words: In English, one-letter words are almost always 'a' or 'I'. The most common three-letter word is 'the'. If you have identified 'T' and 'E', finding a three-letter word ending in 'E' often reveals 'H'.
Check for repeats: The most common double letters in English are 'll', 'ee', 'ss', 'oo', 'tt', and 'ff'. Use these to verify your substitutions.
How did cryptanalysis evolve after Al-Kindi?
Al-Kindi's breakthrough meant that simple substitution ciphers were no longer safe for confidential data. To protect their secrets, cryptographers had to design more complex systems.
They developed polyalphabetic substitution, which uses multiple alphabets to encrypt a single message, masking the underlying letter frequencies. This arms race between code-makers and code-breakers eventually led to electro-mechanical rotor machines like the Enigma in World War II. To defeat these complex encryptions, pioneers laid theoretical groundwork (see Alan Turing's 1936 paper), and engineers like Tommy Flowers built Colossus, the codebreaking computer to run logic and frequency calculations at unprecedented speeds.
When you encounter a complex logic puzzle or a mathematical pattern that seems entirely hidden, staring at the raw data rarely helps. Instead, Fermi's AI tutor can work out what you already know, build a plan for the session, and teach through it—holding a line of reasoning across a whole session and checking understanding as it goes. Furthermore, if you want to explore the mathematical properties of probability and data distribution, the Fermi Concept Library has every concept in mathematics and computing, each with its own lesson and its place in the map.
Today, computers can execute frequency analysis in milliseconds, rendering classical ciphers completely obsolete. However, Al-Kindi's 9th-century insight remains the foundation of modern cryptanalysis: no matter how you scramble information, the mathematics of the original data will always leave a footprint.



