Breaking Enigma with Index of Coincidence on a Commodore 64

What happened
A retrocomputing demo is turning heads: it has been reported that Michael Doornbos published a walkthrough showing how the Index of Coincidence (IC) can be used to recover Enigma rotor settings on a Commodore 64 — without any crib. No weather-header guesswork, no hand-fed plaintext. Just ciphertext and a clever statistic. The post walks through theory, gives a 60‑character test ciphertext, and — allegedly — shows the C64 arriving at the correct rotor trio and positions for that sample.
The trick
The idea is simple and elegant. The IC measures how “language-like” a string is by asking: what’s the chance two randomly chosen letters match? For English that probability is around 0.067; for uniformly random letters it’s 1/26. Decrypt with wrong Enigma settings and the output looks like noise; decrypt with the right settings and the IC jumps toward the language value. Doornbos explains how you can avoid floating point on a C64 by comparing the IC numerator against an integer threshold — tiny math, big payoff.
The C64 angle
Why the Commodore 64? Because the IC attack only needs letter counts and comparisons, not modern horsepower. The plugboard, being a fixed substitution, doesn’t change frequencies and therefore doesn’t spoil the IC test — it only shuffles labels. The post notes the rotor-only search space (millions of candidates, growing with ring settings) and argues that splitting plugboard and rotor problems makes the search tractable on vintage hardware. It has been reported that the example uses rotors III‑I‑V at positions M‑C‑Q as the correct setting for the supplied ciphertext.
Why this matters
This isn’t a new cryptanalytic miracle — Friedman’s IC has been around for a century — but the demo is a neat intersection of history, hobbyist computing, and practical cryptanalysis. It’s a reminder: sometimes old maths plus modest machines beat brute-force flair. Want a dose of computing nostalgia with a side of cryptography? This one’s for the retro‑crypto crowd.
Sources: imapenguin.com, Hacker News
Comments