History

How a 9th-century scholar cracked secret codes by counting letters

30seconds
The 30-second version

For roughly nine centuries after Julius Caesar, swapping each letter for another was a perfectly good way to keep a secret. Then, in 9th-century Baghdad, the scholar al-Kindi wrote down how to break it.

His trick: a code can rename every letter, but it can't hide how often each one is used. In English, E alone is about one letter in eight. Count the symbols, match the pattern, and the message falls open. Try it yourself on an intercepted letter.

Deep dive · 5 min