April 4, 2026

Grandpa’s PC vs WWII secrets

Breaking Enigma with Index of Coincidence on a Commodore 64

Commodore 64 'cracks' Enigma—fans cheer, purists nitpick

TLDR: A coder used a Commodore 64 and a statistical trick to spot real-language patterns and home in on Enigma settings. Fans applauded the retro feat, while skeptics argued it only narrows possibilities and sniped that C64 BASIC uses floating-point math anyway, sparking a lively nostalgia-meets-nerd fight.

A retro showdown just hit the comments: a researcher used a 1980s Commodore 64 to help crack the WWII Enigma cipher using the Index of Coincidence—a stat check that spots whether text looks like real language or random soup. The crowd split fast. One camp is dazzled by the throwback wizardry; as one fan put it, the real magic is that this math trick works at all.

But the skeptics rolled in hard. The author argues the plugboard—the letter-swapping patch panel on Enigma—doesn’t change the statistic, so you can find the rotor setup first and deal with the plugboard later. Critics snapped back that this only narrows the search, not finishes it, and could leave you drowning in “almost-right” settings. Meanwhile, a side-drama erupted over the C64’s BASIC: the author brags about avoiding messy floating-point math, and a commenter drops the “dirty secret” that Commodore BASIC quietly turns everything into floats anyway. Cue the “gotcha” memes.

Elsewhere, a subplot of nostalgia and movie night broke out, with users name-dropping The Imitation Game and swapping history tidbits about Enigma and Index of Coincidence. The overall vibe? Big retro flex meets pedant patrol, with bonus laughs about grandpa’s breadbox PC poking holes in a wartime cipher. Internet, never change.

Key Points

  • The article presents a cribless Enigma attack using William F. Friedman’s Index of Coincidence (IC) to distinguish language-like output from random noise.
  • IC for language (e.g., English ≈0.0667; German similar) contrasts with random text (≈0.0385), enabling identification of correct decryptions.
  • A practical Commodore 64 implementation computes only the IC numerator (IC sum) and compares it against an integer threshold, avoiding floating point.
  • The Enigma plugboard does not affect IC because it permutes letter labels without changing counts; thus IC targets rotor settings only.
  • After identifying rotor settings (≈5.9 million candidates; ≈103.9 billion including ring settings), the plugboard can be solved with frequency analysis.

Hottest takes

"The fact that Index of Coincidence works against Enigma at all is the real puzzle" — bediger4000
"I think the author is too quick to dismiss the impact of the plugboard" — teo_zero
"the dirty secret in many Microsoft-derived BASICs, including Commodore's, is that everything is floating point" — classichasclass
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.