Part 3: Toolchain and Project Setup
02/03/2010
I'll be using a number of freely available tools to help develop this project:
- PHP 5.x as the development language (Install Guide).
- PHPUnit 3.x for testing (Download / Install).
- Subversion for version control (Download / Install).
- Eclipse PDT as my editor. (Download / Install
I'll be writing the code according to Zend Framework coding standards as I find these provide the best interoperability, although I won't be using any of the framework in the main development.
Project Structure
The basic directory structure will be:
/
/library
/library/Enigma
/tests
/tests/Enigma
/cli
/docs
All classes go in /library/Enigma/* and all tests in /tests/Enigma/* , making it easy to separate code and tests for possible future distribution.
Standards and secrets
As you can see, I'm using a lot of external code and open standards in this project, all of which are free - it would be massively more complex to have to work without them. This might seem to be as different as possible from the way the codebreakers worked, but there are some interesting parallels.
Obviously the codebreakers had no open source software to work with, and couldn't go to the internet for reference - neither of these existed at the time. Their work, also, was obviously far from open. But the breaking of the codes was a massive, international shared effort. The first breaks were made by Polish mathematicians, helped by intelligence supplied by the French handler of a German agent. The Bletchley Park codebreakers largely built on their work after meeting them prior to the war, and took the ideas and designs of their "bomba" codebreaking machine to build massively more complex machines later in the war. Dozens of these 'Bombes', huge (2 meter cubes, approximately) electromechanical machines, provided the computational power to crack codes on a regular basis. Much work was also done in the US, and against Japanese codes.
While the Bombes handled Enigma, a far more complex machine was required to break the top level strategic codes, which were transmitted by encrypted teletypes. These teletypes recorded their input and transmitted it automatically as high-speed encrypted data. This wasn't quite internet communications, but it was clearly a precursor. The machine that helped crack these messages was Colossus, the first semi-programmable electronic computer. The systems used and created at Bletchley were the ancestors of all the communication and computing systems we use today.
There were *some* open standards in use at Bletchley. Morse code was an open standard used by many (if not all) Western and Axis military forces; the Japanese used an extended variant to handle their larger alphabet. The teleprinter system used the international CCITT standard. There was even a massive "community effort" of both radio amateurs and military professionals in "Y stations" all over the UK (and beyond) which intercepted German morse messages and sent them to Bletchley. Bletchley was itself a Y station (number 10, hence its alternate name of "Station X") for the early part of the war.
Part 4 of this series will take the tools and plans we've gathered so far to build some tests and start simulating the behaviour of the Enigma's rotors.
All content copyright Richard George (richard@phase.org), 2009-2010