Breaking Enigma with Index of Coincidence on a Commodore 64 (imapenguin.com)

by saganus 5 comments 48 points
Read article View on HN

5 comments

[−] classichasclass 41d ago
Although he's trying to avoid using floating point, the dirty secret in many Microsoft-derived BASICs, including Commodore's, is that everything is floating point. In fact, even if you explicitly declare a variable as integer, it actually gets truncated and expanded: the native format for calculations is still 40-bit MBF. The only advantage integer variables have is smaller array storage. Every variable in his program is actually internally handled as a floating point value even though they're all integrals.
[−] teo_zero 41d ago
I think the author is too quick to dismiss the impact of the plugboard.

> IC attacks only the rotor settings [...] Once you’ve found the right rotors and positions, you can solve the plugboard separately using frequency analysis.

So two steps: first solve for rotor settings with IC analysis, then solve the plugboard.

But IC analysis can't find the solution, just propose a lot of candidates among which a human can spot the correct one by looking for intelligible German text. And how can you spot intelligible German text if some letters are swapped by the plugboard?

[−] throwaway81523 40d ago
Yeah something is wrong there, and I don't see actual breaks in the post, though maybe I missed something. Solving the rotors to get to the plugboard isn't so easy! The permutation changes every character, as the rotors advance.
[−] serious_angel 41d ago
Freaking awesome... thank you very much!

Have you seen the film about Enigma, named "The Imitation Game" of 2014? I once or two asked about one of the main points of the film stated in there, yet no one still responded. Yes, I do sure rarely see films/movies nowadays (but wish so much...) for the time availability sake, but some may find the film interesting for that main point stated, I believe.

[−] bediger4000 45d ago
The fact that Index of Coincidence works against Enigma at all is the real puzzle.