Pulsars
0 %
Log inSign up

Cancel a substitution

Frequency analysis

The method that breaks all simple substitution ciphers was described in the 9th century by the Arab scholar Al-Kindi. It is disarmingly simple.

The principle

  1. Count how many times each letter appears in the ciphertext.
  2. Compare this frequency distribution with that of the target language.
  3. Establish the most likely correspondences, then refine them.

French frequencies

Letter Frequency
E ~15 %
A ~8%
S ~8%
I ~7%
N ~7%
T ~7%

E dominates by a wide margin: in a reasonably long French text, it is almost always the most frequent letter.

In practice

In an encrypted message of a few hundred letters, the most frequent letter is almost certainly E. We replace it, and partial words emerge:

_E _E___GE E_T _L_IR

From there, we can gradually work out LE MESSAGE EST CLAIR. Each correct guess reveals further possibilities: the analysis speeds up of its own accord.

A realistic limitation

The method requires sufficient data. With just three words, the frequencies are meaningless and the attack fails. This is why very short messages hold out — not because of the strength of the cipher, but due to a lack of usable statistics.

Key takeaway: it is not the key size that provides protection, but the absence of structure in the ciphertext.