Understanding the Enigma machine from “The Imitation Game” with 30 Lines of Ruby
red-badger.com
red-badger.com
Here's the NSA's official history of Enigma and the bombe: https://www.nsa.gov/about/_files/cryptologic_heritage/public...
They credit the Polish cryptanalysts who first cracked the Enigma and built the first bombe. Turing and Welchman at Bletchley Park came up with improvements which made it much more effective. Building the new machines was outsourced to the British Tabulating Machine Company.
Then the Germans switched from a three-rotor Enigma to a four-rotor, which the British machines could not solve and increased the effort required by a factor of 26. So the US Navy had National Cash Register build much faster machines. Hundreds of them.
Four wheels was about the limit for a portable rotor machine where the key presses advanced the wheels. The key pressure required for even a 3-wheel Enigma was very high. (I've typed on one, when one was at Stanford. The key travel is huge, almost an inch.) So that was as complex as the ciphers used by German mobile units (ships, trucks) ever got.
For fixed installations, there was the German Lorenz machine, which had 12 wheels. That required a completely different approach to crack. Bombes were a brute-force solution. The Colossus machine used electronics and a more statistical approach. But that's another story.
Not entirely. The Poles realised that the German keying procedure was flawed; they were doubly-encrypting the start of messages which made key recovery extremely easy.
They (the Germans,) stopped doing this relatively early on, so the key recovery devised by Turing (and then expanded on by the Americans) was a completely different attack. [1]
(I mean I get it, the idea is to link the title to the recent film and make the article somehow more current and clickable. Maybe it is a cultural thing but to me it sounds jarring and crass)
This is a minor flaw for the explanation but the result was that a letter could never be enciphered to itself on Enigma. And this fact was exploited because it meant that crib positions could be eliminated.
IMHO it's correct.
Reflector = Hash[*('A'..'Z').to_a.shuffle]
Reflector.merge!(Reflector.invert)Really?
Born: March 26, 1985 (age 29), Teddington, London, United Kingdom
Is the problem that her British accent wasn't posh enough?
BP have a "paper" enigma machine that they use for school children and we pair programmed an implementation in a couple of hours. (no plug board IIRC)
Nice programming exercise and a great place to visit, although if you go don't forget to visit the computer museum (BP and the computer museum have fallen out so access to the museum is a bit more awkward than it used to be).
And sometimes Knuth-style pseudocode beats jerking off in Ruby. This is one of those times.