Home » Articles » Inside an Enigma: Turing at Bletchley

Inside an Enigma: Turing at Bletchley

Turing's time at the code-breaking centre, and the innovations he led.

Inside an Enigma: Turing at Bletchley

Turing's time at the code-breaking centre, and the innovations he led.

“It is a riddle wrapped in a mystery inside an enigma.”

Winston Churchill’s speech on Russia, 1939

It was the first action in the war at sea.  A few hours after the declaration of war between Germany, Britain and France, the German submarine U-30, under Captain Fritz-Julius Lemp, torpedoed and sank the Cunard liner Athenia, with the loss of 117 lives.  Now, 20 months later, Lemp’s submarine (U-110) was on the surface, forced into the open by the British destroyer Bulldog.  The crew were in the water and being picked up and a small boat from the Bulldog, with an armed boarding party, was alongside the stricken submarine.

Led by a sub-lieutenant called David Balme, the boarding party managed to climb through the damaged conning tower, aware that U-110 might sink beneath them at any moment, and found the control room deserted.  The sailors spread through the submarine, with orders to seize any charts and books that were not novels.  The telegraphist in the group went straight to the signals office and grabbed the signal logs and paybooks, which seemed to have been abandoned.

To his astonishment, there in front of him was an elusive Enigma coding machine, still plugged in.  The telegraphist fiddled with it, didn’t understand it and so sent it down the chain of men up the hatch.  When the naval authorities realised what it was they had found, the machine was rushed to the top secret code centre at Bletchley Park.  It was a major breakthrough in the struggle to crack the elusive Nazi naval code, and Turing was at the heart of the British organisation devised to crack it, as a temporary civil servant in the Foreign Office Department of Communications.

This was not the first Enigma machine the British had in their possession.  They had been given one by the Poles at the beginning of the war.  They had also captured another.  But from before the war, they recognised the critical importance of cracking the Enigma code, and naval Enigma was far more difficult to crack.  That was the prime focus of the strange mixture of individuals who joined Turing at Bletchley, a mock Tudor pile deliberately chosen by the head of secret intelligence, Captain Quex Sinclair, because it was on the railway line midway between the two ancient university towns of Oxford and Cambridge.

Throughout the war, under huge stress and some discomfort, the government’s secret code-breakers lived in ever-greater numbers at Bletchley, and the captured code books and the occasional captured coding machine were rushed there, sometimes – as one code breaker revealed a generation later when the secrets became commonplace – with the blood stains on them still wet.

At the outbreak of war, Turing had converted his considerable savings into two large silver ingots, which he buried, slipping a disk as he lifted them into a pram for the task (he never managed to find them again).  He arrived at Bletchley in a small group, under the usual code of ‘Captain Ridley’s Shooting Party’, on 4 September 1939.  He and three colleagues were lodged temporarily in a low building next to the big house called The Cottage before he moved into rooms in the Crown pub in Shenley Brooke End.  There he was looked after by the landlady Mrs Ramshaw, who constantly scolded him about his dishevelled appearance.

Alan Turing in 1930

The next few years proved to be the great work of Turing’s short life, and – although he would be largely unknown by the general public, and little known even in the military intelligence circles – his may have been the greatest contribution.  But he wasn’t alone: around him were not just mathematicians and crossword experts, but linguists, statisticians, puzzle creators, and strange individuals from the future novelist Angus Wilson to the future Home Secretary Roy Jenkins and the future historian Asa Briggs, all of them in their own enclosed huts, revealing nothing to the outside world and little to each other.  There were Egyptologists , bridge players, even one expert on seaweeds and mosses who had been sent there because of a misunderstanding of the biological term ‘cryptogams’, and who played a critical role working out how to dry out code books damaged by sea water.

The historian Hugh Trevor Roper, who visited often, described the atmosphere as “friendly informality verging on apparent anarchy”. One military policeman famously mistook Bletchley for a military asylum.

Turing and his colleagues were not starting from scratch.  Behind them were centuries of work on code-breaking, primarily the great insight by Turing’s Victorian predecessor Charles Babbage, who realised that the way to treat codes was to imagine the letters were random.  If they were random, every letter would be used on average 6.7 per cent of the time – and then whatever is not random in the coded passage is a potential clue.

Yet Enigma was a huge challenge.  It looked like a typewriter, but with no space for paper.  It had lights for each letter and, inside it, the three rotors (and later more than three) could be arranged in a range of different ways, each one linked to a different set of electrical connections.   The key code, with the rotor setting, would be in a three letter key for each day, which all the machine operators would look up in the code book.  It was believed to be impregnable.  The three rotors could mean more than 17,000 different solutions for a given message, but – since the three rotors could be re-arranged in any of six different ways – the number of combinations reached over 105,000.

But here again, Turing and colleagues could rely on the previous breakthroughs by the Polish mathematicians who had been able to read Enigma messages for some time, using the system’s weaknesses.  For one thing, it would have to go through all 26 positions before the middle rotor moved, which meant you knew that the first 26 letters of any message only used one rotor.  There was also the fatal mistake made by the German military which was that the three letter key setting were usually sent twice and you knew there would be a link between the first and fourth letters and so on (this stopped in May 1940).

The Poles, led by the mathematicians Jerzy Rozycki, Henryk Zygalski and Marian Rejewski, had used a system of paper with punched holes with all the possible combinations and shone lights through from below, shifting the papers around until one light shone all the way through.  They called this system, and the machine that helped them, the bombe.  It was to link up with Turing’s own ideas about computing.

By the outbreak of war, the code breakers at Bletchley had some advantages.  They were soon able to recognise the codes of origin for each message, and – despite the short supply of coloured pencils – they began to code them visually, yellow for the Norwegian campaign, green for the army, red for the Luftwaffe.  This was the situation when Turing arrived there, and was given the task of overseeing the theoretical aspects of cracking the coded messages.  He was soon known as ‘The Prof’.

In the early weeks of the war, he spent his time writing out in an almost illegible longhand a plan for cracking the codes, working the whole process out logically. The key point was that Coded Enigma messages were reversible, and –since they were reversible – they could reverse it.  He was sent out soon afterwards to Paris to meet a group of Polish code breakers, nearly causing the furious resignation of the senior cryptographer Dillwyn Knox, because he was taking the precious Polish bombe sheets out of the country.

Turing was clear that they would need two elements.  The first was a series of what he called cribs, bits of code that were likely-looking translations.  The second was a much improved, much faster version of the Polish bombe – a machine for testing out the various cribs to see if they worked, without which the whole process would be impossibly time-consuming.  Speed was always vital at Bletchley Park.

The first problem to solve was the cribs.  There were clues.  Sometimes it was clear that some messages were weather reports.  Sometimes the words ‘weather’ or Heil Hitler!’ were obvious.  One signaller was in the habit of ending his signals ‘nothing to report’ (nicht zu melden).  But it was Turing’s colleague John Herival who provided the best route for cribs.  He was dozing by the fire, and woke up with a start, imagining himself as a German signal officer with an Enigma machine, and suddenly realised that laziness would mean they would often just use the same settings as the day before.  Straight away, he began to work out how to detect when they had.

The bombe, Phoenix, similar to that built by Turing, this time re-built by a team led by John Harper.

Then there was the problem of a crib testing machine.  This time, it was not enough to imagine the kind of computing machine that might solve the problem.  Turing and his colleague Gordon Welchman (from Hut 6) had to actually build one.  His first bombe was called Victory.  It was seven feet long and six feet high, and it weighed a ton.  It had the power to simulate the actions of 30 Enigma machines at once.  It also leaked oil, was constantly getting itself jammed and gave people electric shocks.

Victory was built in Letchworth by the British Tabulating Machine Company under their chief engineer, Doc Keen.  Once it was ready, there was a major problem of how to get it to Bletchley Park.  The huge security it required would, the authorities thought, simply draw attention to it.  In the end it was sent, quite openly, on the back of a lorry.  It was installed in Hut 1 on 18 March 1940, just days before the invasion of Norway.

There is a replica bombe in the preserved Hut 8 at Bletchley to this day, but it is only a replica.  None of the working machines have survived, though 200 of them were eventually built, operated mainly by Wrens (women naval personnel) at sites in north London like Eastcote and Stanmore.

Once the Phoney War was over and Victory was in place, a rhythm began to emerge.  When the first few messages emerged with the key settings for that day, they were sent to Hut 8, where a friend of Turing’s from Princeton called Shaun Wylie searched for phrases that might be repeated, or obvious proper names.  When his cribs began to emerge, they would go to the machine room.  It was stressful work, which had to be carried out quickly and accurately.  One wire out of place on the bombe would mean a short circuit and that would put them back for hours. Then the machine would stop when it reached a contradiction or an answer, and the settings would be checked until it stopped at an answer which seemed to produce obvious German.

Then it would go over to Hut 3, where the message would be translated, mostly by particularly meticulous former schoolmasters, interpreted and sent out.  Then the machine would be stripped down and given the next task.  And so it would go on, far into the night.

There was an un-military atmosphere of informality combined with seriousness.  Nobody wore uniforms.  Absolute discretion was vital in case the word leaked out, via a hint to families for example, that would allow the Nazis to know their messages were being read.  The food was terrible, full of watery cabbage and stale fat.  There was a shortage of nearly everything, except perhaps musicians.  Madrigals were sung by the canal on summer evenings.

Turing failed to quite fit in at Bletchley, any more than he had at Cambridge.  Bletchley alumni remember him as a “bit of a weirdo”, walking quickly along the paths around the estate, looking worried.  On one occasion, he was arrested by the local police because he looked suspicious, and – when he was taken to the police station – he was found not to have signed his identity card.  He claimed, in his typically literal way, that he had taken seriously the rule that you were not supposed to write on them.  It was precisely the kind of contradiction that bothered him.  Meanwhile, Turing also bothered his superiors.  The precise balance of admiration and irritation was expressed in a letter about him written by Knox:

“He is very difficult to anchor down.  He is very clever, but quite irresponsible and throws out a mass of suggestions of all degrees of merit.  I have just, but only just, enough authority and ability to keep him and his ideas in some sort of order and disciple, but he is very nice about it all.”

David Boyle is the author of Alan Turing: Unlocking the Enigma.