Breaking Enigma with Index of Coincidence on a Commodore 64

(imapenguin.com)

31 points | by saganus 4 days ago

4 comments

  • classichasclass 3 hours 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 4 hours 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?

  • serious_angel 6 hours 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 4 days ago
    The fact that Index of Coincidence works against Enigma at all is the real puzzle.