Historians estimate that cracking the code shortened the war by two years. The story of how Polish mathematicians and researchers at Bletchley Park in the UK (including Alan Turing) cracked the Enigma code is both humbling and fascinating. There were many different versions of the Enigma our simulator models one of the 3-rotor devices. Here’s what it looks like:Įnigma machines were used to encrypt Axis military communications in World War II. Stepping levers move, moving rotors as needed.įor (var i = 0 i < _rotors.Thursday is National History Day at our local high school, and just in time for the competition, my son and I put the finishing touches on a German Enigma simulator to complement his display-written, of course, in Silverlight. To get a flavour for the code here’s the function to read a letter in the machine and returning the substituted value. So, eventually I got it working reliably, with lots of testing against Louise Dade’s existing simulator. The ring settings and double stepping, in particular, took me a while to wrap my head around. A plug board (Steckerbrett) can be used to perform another layer of letter substitution (Steckerverbindungen or Plug Connections).Īlso the rotor stepping has some quirks (steps before substitution, turnover notch location(s), double-stepping, thin rotors).The reflector can be changed (Umkehrwalze or Reflector Wheel).The rotors can be removed and placed in different orders (Walzenlage or Wheel Order).Wiring in the rotor can be offset (Ringstellung or Ring Setting).In addition to the current position of the rotor (the Grundstellung or Ground Setting) there are a few more ways to increase the randomness of the system: I soon had some code for a rotor that could perform letter substitution for each of the rotor types, however the devil is in the detail and this is why building a simulator rather than reading about them helps to understand how they work. So, when simulating it, I first had to find the wiring for the rotors in the machines – lucky for me there is a lot of detail on the subject. ![]() Despite knowing that information was being leaked, German High Command put it down to more traditional means (spying). ![]() However, due to mistakes machine operators made and slack operating procedures, messages were routinely broken throughout the war. The number of combinations that could be used in configuring the Enigma is so great that it would have been impossible to crack with any means available at the time – that is, even after understanding how the machine works and exploiting its flaws. Once you’ve got your encrypted message you can send it over the radio to your buddy in a U-boat and he can rerun the process on the encrypted text, recreating the original message. The rightmost one would turn every key press and the others would click over every full revolution of the rotor on their right (think of a car’s odometer). So the trick to the machines is that every time you hit a key, the rotors would shift (rotor stepping). Each rotor randomly connects an input letter to an output letter. It’s a simple electrical circuit that lights up a lamp but the path gets scrambled as the electrical signal passes through the rotors. ![]() When you hit a key, one of the letters above the typewriter keys would light up showing what that character is getting encrypted or decrypted to. You’d configure the machine by turning the dials (rotors) at the top to the day’s code book settings and then start typing on the typewriter. They look like this, which you might have seen already if you’ve watched The Imitation Game. Me, deciding to write a simulator.Ī bit of explanation: Enigma machines were used by the German armed forces to encrypt and decrypt their messages throughout World War 2. However, reading descriptions didn’t really help me understand the workings, so, because I like wasting my precious little free time, I thought I’d try to write a simulator using Javascript. In the book, there is a fair amount of detail about how the Enigma machines work. While his whole life was pretty remarkable, one of the most important parts was his cryptanalysis work at Bletchley Park trying to crack the Enigma code. Recently, I read Alan Turing: The Enigma – a Turing biography by Andrew Hodges.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |