German submarines attacked Allied ships carrying food, fuel and equipment across the Atlantic. The German navy used Enigma machines to encrypt radio messages. Reading some of those messages could help the Allies learn which routes put convoys at greater risk.
At Bletchley Park, the group known as Hut 8 worked on German naval encryption. Alan Turing helped develop methods for finding the settings used to send a message. The British work built on earlier discoveries by Polish mathematicians, who had studied Enigma before the war.
Turing helped design a machine known as the Bombe. It could test possible settings and rule out ones that led to contradictions. Gordon Welchman developed an important improvement, and engineers and operators built, maintained and ran the machines.
The work often began with a guess about some of the words in a message. Repeated forms of wording or familiar kinds of report could give analysts a starting point. A promising guess still had to be tested against what the message contained.
The first British Bombe began operating in 1940. The Allies could read more naval messages in 1941, but changes in German equipment or practice interrupted their work at different points. When intelligence was available in time, it helped planners choose safer routes for some convoys.
The work remained secret during the war and for years afterward. Turing’s role was one part of an effort that depended on people doing different jobs, from intercepting messages to testing the results and judging how the information could be used.