Year 7 code-breaking workshop
On Wednesday 1 February our Year 7 students welcomed Mr James Grime into school. James has been visiting the school for a number of years to speak to Year 7 students about code-breaking, and he always amazes the girls by bringing in a genuine Enigma machine and talking to the girls about how Alan Turing and his team cracking the code was evidence that “you can save lives simply by using your brain”.
During the talk James described a number of historical scenarios in which code-breakers have drastically changed the course of history. For instance, Mary Queen of Scots and Anthony Babington wrote coded letters to each other amidst a plot to kill Queen Elizabeth I and, as two of the letters were intercepted and de-coded, the ‘Babington Plot’ came to light, and Mary Queen of Scots was arrested and imprisoned and, eventually, executed by beheading.
After the talk the girls were split into three groups to attend a code-breaking workshop. The questions that the girls posed were inspired. They learnt that Mr Grime’s machine was saved by an American soldier as a souvenir from Germany; that the machine doesn’t transmit the message itself, it simply helps the user to write and read coded messages; that the Polish had been working on breaking the Enigma code and, five weeks before Poland was invaded by Germany, had shared their understanding of the code (having never even seen an Enigma machine) with the British.
Understanding how the machine worked and how the code was created didn’t, on its own, enable the Allied Forces to interpret German communications. On first inspection the machine looks like a typewriter, with a row of lettered keys, each of which can be pressed. Above the bottom row of keys is a second row of letters, although these letters are not keys to be pressed – instead they light up one by one, depending on which key is pressed on the bottom row. The bottom keys do not correspond to the same letters on the top row of lights. And nor does the same bottom key always light up the same letter on the top row. This is how the code works: once you have a message you want to transmit, you type in each letter on the bottom row, record each letter that is lit up on the top row, and transmit only the string of letters from the top row of lights – seemingly a completely random bunch of letters. For instance, Mr Grime typed in the word ‘hello’, and wrote down the corresponding lit up letters as ‘rtfgi’. The message is then sent to correspondents elsewhere who then type in the message in their own Enigma machine, noting down the letters that light up in order to find the meaning of the message.
Keen code-breakers might note that the two instances of ‘l’ in hello are not repeated letters in the code. This is because the machine works by connecting each letter key to the letter lights via wires, a battery, and three rotors (which create 17,576 different positions/paths). Each time a key is pressed, the wheels rotate one position, to create the ‘code’ for the next letter. There is no way to humanly predict what the next letter will be. So if one Engima machine’s wheel positions were not aligned with the others, they would not be able to make sense of the message they received. In order to resolve this, users had to be made aware of the particular day’s machine settings (i.e. the positions of the wheels at the start of the day). It was at this point that Alan Turing’s Bletchley Park team was able to progress the work of the Polish, who had created an Enigma machine and worked out how it worked – but hadn’t yet been able to find a way to work out the day’s settings quickly enough to be able to use the machine to interpret the day’s communications.
There is one flaw in the code: each letter when typed in can't become itself. Using this realisation, and ‘the Bombe’ invented by Mr Turing (his early work on computers is how our computers works today), the British were able to break the code in 20 minutes, even before the Germans had had a chance to decode their messages to each other!
The girls were eager to have a go at code-breaking exercises themselves and each group spent one lesson in the LRC attempting a range of different codes that Mr Grime had brought with him. For any girls who have shown particular interest in the workshop, Mr Grime recommended Fermat's last theorem by Simon Singh as an excellent read for keen code breakers.