The Math That Broke Every Code

### The Math That Broke Every Code

Ancient Secrets · Code-Breaking

For hundreds of years, generals thought substitution ciphers were basically magic. If you swapped letters for new symbols, your secrets were perfectly safe! But in 9th-century Baghdad, a brilliant polymath named Al-Kindi working at the House of Wisdom shattered that illusion forever.

Al-Kindi realized that language leaves a mathematical fingerprint. Even if you disguise a written message, you cannot hide how humans actually talk. In English, the letter E is everywhere, showing up about 13 percent of the time.

He figured out that a substitution code doesn’t change a letter’s frequency. If a spy swaps E for a squiggly line, that squiggly line will still be the most common symbol on the page. To crack the code, you simply have to count.

Match the most common secret symbols to the most common regular letters, and the message begins to unravel. With this single realization, Al-Kindi invented the science of frequency analysis—and the modern art of code-breaking was officially born.