Codes, cryptography and algorithms · Maths EE idea · Accessible

Breaking substitution ciphers with statistics

A research question to start from

How reliably can a substitution cipher be broken by letter-frequency analysis, and how much ciphertext is needed?

A starting point, not your question: change the case, the comparison or the limit until it is yours. The research-question builder helps you check it.

Why it works as a maths EE

Statistics applied to a decoding method you evaluate quantitatively.

Mathematics you would need

  • Frequency distributions
  • Chi-squared distance
  • Index of coincidence
  • Sample size and variability

Much of this goes beyond the DP course. That is expected in a maths EE, but you must understand and explain everything you use.

One possible line of attack

  1. Define a scoring statistic for candidate decryptions.
  2. Measure success against ciphertext length.
  3. Explain the index of coincidence and use it for a Vigenère cipher.

Scope and difficulty

Accessible. Accessible; the Vigenère extension adds depth.

Pitfalls

  • Puzzle-solving narrative.
  • No measure of reliability.

Where to start reading

Search a library catalogue or a university's open lecture notes for: index of coincidence derivation; frequency analysis ciphertext length. Prefer textbooks, lecture notes and journal articles to a single website, and cite everything you use (how to reference a maths EE).

Make it your EE

Similar ideas

All codes, cryptography and algorithms ideas · the full ideas library