The enigma machine had a fault that helped the code breakers break the code it was that it never encoded a letter with itself this accompanied with other information and the fact that messages sent by German operators sometimes started with the same word. Although the enigma machine had a fault and the operators used the simpler way of setting the machines it was still a hard a laborious process of breaking the code.
In January 1940, Alan Turing a twenty six year old mathematician working on the enigma code became convinced that some of the information the polish had given them was incorrect, so he travelled to France to meet the Polish and found out that he was correct some of the information had been wrong. When he returned to Bletchley Park, he was successful in breaking one of the encoded messages this was due to a German operator not following the rulebook.
John Herivel a mathematician tried to put himself in the position of a German operator and thought the operators would not be careful when setting the code in the morning, he thought what if the operators did not bother to reset their machines and the message they sent would not be random. Disappointingly, his idea did not work because their was not enough messages to make use of, but after the German invasion of Denmark and Norway the number of messages increased this made them more likely to find a messages the same.
In 1941, Bletchley Park succeeded in the cracking the German navel code this was not done by one breakthrough but hard work a some good luck. An enigma instruction book was found on a German u-boat and the codebook for February 1941 was found and later the codebooks for June and July using these clues they were able to crack the navel code.
There success was short lived because in the late summer and autumn of 1941, the German navy began to question weather the enigma machine was secure and so they started to use an enigma machine that used a fourth wheel increasing the number of settings from 17,576 to 459,976, so everything from the last two years of work was useless and allied loses in the Atlantic were rising rapidly. In December 1941, Bletchley Park found out that the German navy did not know that the three-wheeled enigma machine had been cracked and were just trying to make the system more secure by using the four-wheeled machine. The u-boats had the new four-wheeled machine but the shore bases and supply depots did not so they could still break the code.
After the battle of the Atlantic had been won Bletchley Park took on the challenge of breaking the code called fish, the code Hitler used to send messages when the code breakers attempted to crack they face the problem of not knowing what the machine looked like, but after two months of hard work they worked this out and made replica of one. This allowed the Bletchley Park to read the messages sent from Berlin to the commander of the German forces.