Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Cryptography / Classical ciphers

Breaking Ciphers with Statistics

Letter frequencies, the index of coincidence and Kasiski’s method for finding a Vigenère key length.

3 min read · 2 sections · 1 checks

Contents 3 sections
  1. §1Fingerprints of a language
  2. §2Attacking Vigenère
  3. ?Check yourself

By the end you can

  • Break a substitution cipher with frequency analysis
  • Estimate a Vigenère key length
  • Explain why statistics defeat classical ciphers

Helps to know: Substitution and Shift Ciphers

§1Fingerprints of a language

In English, E makes up about 12.7% of letters, T 9.1% and A 8.2%, while Z is under 0.1%. A substitution cipher relabels letters but keeps these proportions, so the most common ciphertext letter probably stands for E.

§2Attacking Vigenère

  1. Guess the key length LL: split the ciphertext into LL columns and pick the LL whose columns have an index of coincidence near English.
  2. Each column is now a plain shift cipher. Choose the shift whose letter frequencies best match English.
  3. Read off the keyword from the shifts.

Check yourself

  1. Q1
    The most frequent letter in a long English substitution ciphertext most likely stands for…