In January 1940, in the stable yard of a country house in Buckinghamshire, England, British codebreakers read wartime German Enigma messages for the first time. The machine behind those messages looked a lot like a typewriter. The German forces were sure no one could break its cipher.

The house was Bletchley Park, and the machine was called Enigma. The story is often told as the story of one man, Alan Turing. Follow the records, though, and it begins in Poland, not Britain, and by the end close to 10,000 people were part of it.

What kind of machine was Enigma, and who broke it, in what order? Where did the intelligence go, and why did it stay secret for decades? This article follows the public records of GCHQ (the UK's intelligence, security and cyber agency), the Imperial War Museums (IWM), the Bletchley Park Trust and the IEEE History Center.

A cipher machine that looked like a typewriter

Arthur Scherbius, a German engineer, invented Enigma shortly after the First World War. His patent for a rotor machine dates from 1918. From the outside it looked like a typewriter, and above its keys sat a panel of lamps, one for each letter.

Using it was simple. The operator typed a letter of the message, and a different letter glowed on the lamp panel; that letter became the ciphertext. The complicated part happened inside the box.

Inside sat a set of rotors that could be swapped in and out. Each key press made the rotors turn, so the cipher rule shifted from one letter to the next. A plugboard on the machine's face swapped letters in pairs.

Think of a padlock whose combination changes every day. The real machine was different in one key way. A padlock opens once one combination is set, but in Enigma the rotors moved with every key press, so the rule changed again for the next letter.

The Bletchley Park Trust says the rotors and plugboard together offered 103 sextillion possible settings. That is 103 followed by 21 zeros. The Germans believed this made Enigma unbreakable.

The settings also changed often. As a rule they were reset once a day, every 24 hours, and once the war began the Germans tightened security by changing the cipher system daily. The Trust dates German military adoption of the machine to the years 1926 to 1935. By the IEEE History Center's account, the navy took it up in 1926 and the army in 1928.

A concept sketch of Enigma's parts and the path one letter takes. On the left, the operator presses a plaintext letter on the keyboard. The signal passes through the scrambling part in the middle: the plugboard on the front, which swaps pairs of letters; interchangeable rotors, which turn with every key press; and a reflecting rotor. One enciphered letter then lights up on the lamp board on the right. Three boxes below give the number of possible settings that the Bletchley Park Trust cites, 103 sextillion (103 followed by 21 zeros), note that settings usually changed every 24 hours, and say the Germans believed this made Enigma unbreakable. A note says it is a concept sketch with no real wiring or rotor numbers
The path of one letter from keyboard to lamp board; a concept sketch of what each part does, not the real wiring (diagram)(Diagram)

First broken in Poland

Britain was not idle. From 1926, when Enigma became known, Britain handed the problem to one codebreaker, Dilly Knox. Knox broke the commercial Enigma with tools made of paper. GCHQ notes, though, that his method could not grow to a larger scale and could not keep up as the German military improved its own machines.

Poland took a different path. By 1928 the Polish Cipher Bureau of the General Staff was already teaching cryptography in Poznań to German-speaking mathematics graduates. Three people from that course, Marian Rejewski, Jerzy Różycki and Henryk Zygalski, went on to break Enigma.

Rejewski started work on Enigma in September 1932. That year the French passed him two German manuals on running the military machine. By the end of 1932 he had worked out how the military rotors were wired. On the French side, Major Bertrand of the Deuxième Bureau paid a German agent for Enigma handbooks and key material, and France shared what it obtained with Poland.

The three built a machine called the bomba together with engineers from the AVA Radio Manufacturing Company. The bomba ran through every one of the 105,456 rotor positions, looking for the ones that showed certain patterns. In December 1938 the Germans added two new rotors, which meant 60 bomby were now needed, more than the Cipher Bureau could pay for.

As war came closer, the three countries sat down together. An earlier meeting, held in Paris in January 1939, went nowhere because the British and the Poles each kept what they knew to themselves. When they met again outside Warsaw in July, the Poles explained everything they had achieved.

The date of that July meeting appears in two forms on the same GCHQ page. The page's own summary gives 25 and 26 July, while the 2014 speech by the Director of GCHQ gives 15 and 16 July. By then, German security measures had greatly reduced Polish success. Even so, the British and French learned that the Poles were far ahead of them, both in how much they had read and in the design of the bomba.

Out of the meeting, Britain and France each came away with a Polish-built Enigma double. They also got an explanation of how the Poles worked out the daily keys. After Germany invaded Poland, the Polish codebreakers went to France and set up a joint unit with French colleagues, which stayed in touch with Bletchley Park by teleprinter.

A code school moves to Bletchley Park

On the British side, the key player was the Government Code and Cypher School (GC&CS). It was GCHQ's name until 1946. GC&CS had been planning to leave London since 1938, and on 2 August 1939 it began getting ready to move to Bletchley Park, its home for the war years.

Staff were told to be on site by 10:00 on 15 August. If neighbors asked, they were to hear that the work had to do with defending London from the air. At first about 150 people worked in the main house and the buildings around it. As numbers grew, sections moved into prefabricated wooden huts on the lawns, and for security each section was known only by its hut number.

Enigma was the job of the Enigma Research Section that Knox set up. Later Peter Twinn, Alan Turing and Gordon Welchman came to work there too. Turing had already done part-time work for the code school before the war, and he arrived at Bletchley Park in September 1939.

In January 1940, Turing went to Paris to see the Polish codebreakers who had escaped to France. GCHQ says Turing's conversations with Rejewski laid the groundwork for the thinking behind the first British Bombe. Around the 23rd of that month, Bletchley Park made its first operational break, solving a German Army administrative key known as "the Green", and then cracked the Luftwaffe's "Red" key.

There is plenty of argument over which of the three countries did more. At a ceremony in Warsaw in July 2014, the Director of GCHQ compared the cooperation to a relay race and said the team as a whole wins the medal. In his words, it should be a story about cooperation, not about which partner deserves more honor.

The Bombe: a machine for finding settings

The Bombe was the machine Turing built with his colleague Welchman. Inside were multiple drums standing in for Enigma's rotors, so it behaved like several Enigma machines linked together. It tested possible settings at speed to find the day's setting, and it took a great deal of work off the codebreakers.

Its name came from the Polish bomba, but it looked for patterns in a different place. According to the IEEE History Center, the Polish machine looked at the indicators at the start of each message, while the British Bombe looked at the messages themselves. Hut 1 hosted the first Bombe test in March 1940, and from mid-1940 German Air Force signals were being read at Bletchley.

The machines multiplied. Hut 11 held up to six Bombes from March 1941, and over 200 Bombes were built during the war. Hundreds of them were run by members of the Women's Royal Naval Service, known as Wrens. The job was remembered as dull and draining, with women working long shifts in dim, airless rooms.

German naval communications were more complex and had defeated many people at Bletchley. From February 1940, Hut 8 housed Turing's Naval Enigma section, and with captured Enigma material and a technique Turing developed, naval Enigma could be read from 1941. For a period in 1942, it became unreadable again.

The United States joined the effort. In December 1942, Turing went to the United States to advise US military intelligence on using Bombes. The US Navy Bombe was engineered by Joseph Desch and others at the Naval Computing Machine Laboratory, inside the National Cash Register Company (NCR) in Dayton, Ohio.

The Bletchley Park Trust sees the Bombe as the first codebreaking machine designed for the purpose and then built in large numbers. In the Trust's words, the Bombes heralded the industrialization of codebreaking.

Where the intelligence went

During most of the war, the park itself did not do its own radio listening. Secret listening posts called "Y" stations did the intercepting. The one exception was an 8-week stretch in May–July 1944, when the park listened on site to save time. Around D-Day, a message could be intercepted, broken, translated and on a teleprinter to Allied commanders in two and a half hours or less.

The effect was large at sea, where in the second half of 1941 Hut 8, led by Turing, broke the "Dolphin" key used by U-boats attacking transatlantic convoys. From then on, the Trust says, the codebreakers helped the Admiralty follow the U-boat wolf packs. That sharply cut how many merchant ships the German Navy could sink on the supply run from America to Britain. At first, even getting naval commanders to take the intelligence seriously was a struggle.

The Battle of Matapan, fought in the Mediterranean in March 1941, followed directly from breaking Italian Naval Enigma. On land, North Africa was the leading example, with help from Bletchley Park's outpost in Cairo, the Combined Bureau Middle East. The Trust says intelligence gathered ahead of the 1942 Battle of El Alamein helped win that campaign in Egypt.

In 1944, Enigma decrypts revealed German defensive preparations for the D-Day invasion and German reactions to it. The Trust quotes General Eisenhower, who told the codebreakers their intelligence before and during the campaign had been of priceless value to him. He added that it had spared the lives of thousands of British and American soldiers.

Even unbroken messages had value. Traffic analysis looked not at the content of messages but at features such as volume, direction, broadcast patterns and call signs. This let analysts gather intelligence even from messages that had not been broken.

The people and the numbers

The organization started in 1939 with about 150 people and grew quickly. The Bletchley Park Trust puts the total for the wider Bletchley Park organization at close to 10,000. Around D-Day, the 7,000 people working at the park were breaking close to 5,000 Enigma messages every day.

Bar chart of people and machines at Bletchley Park, grouped by source. Staff: about 150 at the start in 1939, 7,000 at Bletchley Park around D-Day, and nearly 10,000 in the wider organisation (all from the Bletchley Park Trust). In 1945, 75% of the staff were women, and six in ten of them were in uniform. Machines: over 200 British Bombes (the Trust), 6 Polish bomby (IEEE History Center), 60 bomby that would have been needed after two new rotors were added in December 1938 (IEEE History Center), and 10 Colossus machines, of which 8 were dismantled after the war and 2 kept by GCHQ (GCHQ). Enigma messages decrypted a day around D-Day: almost 5,000 (the Trust). A note says scales differ between blocks and each count covers a different scope
People and machines; public sources count different scopes, so each block keeps to one source (diagram)(Diagram)

The two staff figures count different things. "Nearly 10,000" covers what the Trust calls the wider Bletchley Park organization, while 7,000 is the workforce at Bletchley Park around D-Day. Adding them together or treating them as one figure would be a mistake.

The way people were found also changed. At first, GC&CS looked for "men and women of a professor type" through people it knew at Oxford and Cambridge. As the work became more mechanized and intercepts grew, it had to recruit far more widely, and many recruits came from the women's branches of the armed forces. Everyone else came in as civil servants.

By 1945, 75% of Bletchley Park's staff were women, and six out of ten of them were in uniform. In most sections, civilians and service personnel sat side by side. A handful of American service members also came over and joined several sections.

A long-kept secret and what it left

Enigma was not the only target. The Lorenz cipher machine carried German strategic messages of high importance. A technique Turing developed in July 1942 fed into his colleagues' work on understanding Lorenz. A team led by Tommy Flowers, an engineer from the General Post Office, built a valve-based machine called Colossus.

Colossus used around 2,500 valves and stood more than 2 m tall. Ten were built, and what they produced was valuable intelligence, above all before D-Day. Once the war was over, eight were taken apart so the parts could be reused, and GCHQ kept two. GCHQ says it used Colossus's functions until the early 1960s, and many people regard it as the first digital computer.

The secret held even during the war. Bertrand of France, Colonel Langer, who ran the Polish Cipher Bureau, and four more Polish codebreakers were captured and questioned, yet the secret of breaking Enigma never leaked. After the war, the secrecy continued.

IWM says the work of Bletchley Park and Turing's part in it were kept secret until the 1970s, and the full story was not known until the 1990s. GCHQ says the existence of Colossus came out only in the early 2000s, after some sixty years of secrecy. Flowers retired before his part could be told.

The secrecy also hid other contributions. The story of three countries working together faded from memory. When Britain's official history of wartime intelligence began to appear in 1979, its first volume played down the Polish and French contribution. The Director of GCHQ said correcting that took nine years.

Turing's post-war life was not easy. He received an OBE in 1945 for his wartime work, but in 1952 he was arrested for homosexuality, which was then illegal in Britain. In 1954 he was found dead from cyanide poisoning, and an inquest ruled it suicide. For 2013, IWM says his conviction was overturned, and the Trust says he received a posthumous royal pardon.

His name became widely known around the time of the 2014 film The Imitation Game. Anyone who knows him from the film should read it apart from the records. In the records, Turing and Welchman built the Bombe together, and before it came the Polish bomba and the material that France obtained.

Sources describe the impact of codebreaking on the war in different terms. IWM notes an estimate that Turing and his fellow codebreakers shortened the war by several years. The IEEE History Center calls the Polish work a base for British codebreaking that, together with later American help, contributed to ending the war.

Bletchley Park itself nearly disappeared. At the end of 1945 the site had more than 20 huts, but by 1991 what was left faced demolition to make room for new housing. In 1992 local historians rescued the site, and the Bletchley Park Trust was set up to look after it. Today visitors can walk through Huts 3, 6 and 8, all restored.

Timeline of breaking Enigma. From top to bottom: 1918, Scherbius patents a rotor machine; 1926, the German Navy begins using Enigma (the Army in 1928); 1928, the Polish Cipher Bureau runs a cryptography course for maths graduates in Poznań; September 1932, Rejewski begins his attack and by the end of the year works out the military rotor wiring; December 1938, the Germans add two new rotors; January 1939, the Paris meeting brings no real exchange; July 1939, the meeting outside Warsaw (one GCHQ page gives two dates, 25–26 and 15–16 July); August 1939, GC&CS moves to Bletchley Park; September 1939, Turing joins; January 1940, the first wartime break and Turing meets Rejewski in Paris; March 1940, the first British Bombe is tested; 1941, Naval Enigma becomes readable; December 1942, Turing visits the United States; 1944, around D-Day, almost 5,000 messages are decrypted a day; secret until the 1970s; 1979, the first volume of the official history; early 2000s, the existence of Colossus is revealed. Colors mark Poland, joint work with France, Britain and the post-war years, and a note says the rows are evenly spaced, not to scale
The flow from 1918 to the early 2000s, using only dates given by GCHQ, IWM, the Bletchley Park Trust and the IEEE History Center (diagram)(Diagram)

What to read next

  • The Battle of the Atlantic: U-boats and the long convoy war. The sea battle where the Dolphin key breakthrough was used.
  • North Africa and El Alamein: a desert war of supply. A land campaign where Bletchley Park's intelligence was used.
  • D-Day in Normandy: the preparation and the day. The operation where decrypts showed the German reaction.
  • Electronic warfare: listening to, blocking and protecting signals, explained with today's definitions.
  • Military communications resilience: why military links today are designed on the assumption they will be cut, and the strengths and limits of links carried by laser light.