Chapter 1: An introduction to the Enigma
This series was initially developed back in 2009. Five years is a long time in software, so I’m now revising the project to use current technologies and methods.
Way back in August 2009, I first visited Bletchley Park. Back then, the site and its history were almost unknown, and the Park was in a very difficult situation. However, following a major social media campaign, and support from various major technology companies, it’s now in a much better position to tell its story to future generations.
And it’s a pretty incredible story. Bletchley Park was the site of the British Government Code and Cipher school in the Second World War, the “home of the codebreakers”. Here, numerous Axis codes were broken and read, giving the Allies critical knowledge about enemy action and strategy which in turn helped shorten the war by many months and save millions of lives.
While everything from hand codes to the most complex cryptographic systems of the day were tackled at Bletchley, two Axis systems deserve particular mention: Tunny and Enigma. Thanks to an increasing amount of media interest, including films and TV series, many people will now at least have heard of Enigma, and that’s the system we’ll look at in more detail here. Tunny is somewhat less known, possibly because a system named after a fish just doesn’t catch the public imagination. It’s the system built to crack Tunny messages that got the fame in this case. Colossus, one of the world’s first electronic computers, was developed at Bletchley Park, meaning that not only did this location help win the Second World War, it also helped launch the information revolution. Few places can claim quite that contribution to our modern lives.
However, as Colossus and Tunny have little to do with Enigma, we won’t discuss them further here. For more information and to see a working replica of Colossus, you’re strongly encouraged to visit the National Museum of Computing, also based at Bletchley Park. Now, however, let’s look more closely at Enigma.
Enigma was a device that looked much like a typewriter (for those who remember such things) and was much the same size. It was an electromechanical device with three or four rotors and a pluggable wiring board, designed to be robust, reliable and easy to produce. Around one hundred thousand were made. Initially a commercial device, it was adopted and developed by the German military, and used by the Germans and their allies in various forms throughout the war. It was a symmetrical cipher, used for mostly for tactical communications near the front lines and on U-boats, the encrypted messages being sent either over telegraph lines or by radio.
Simulating it provides us both with an interesting historical exercise and a practical technical challenge giving us an introduction to the practices of Test Driven Development. The machine itself is fairly simple - as it had to be to be produced in such numbers and operated reliably in forward positions - but complex enough to be interesting.