Who cracked the enigma code?

by BattleSeven

I heard that Poland cracked enigma and offered it to the ally’s as part of the deal for protecting Poland, but then I’ve heard way later on in the war, the British forced a German sub to surface and before it sank they went inside. Inside it they found an intact German code book and enigma machine, so they began regularly reading enigma coded transmissions. These story’s seem to contradict and I’m wondering which one is true or if I’m missing something?

Bigglesworth_

Both are (broadly) true. Enigma wasn't a monolithic entity, there were several versions of the Enigma machine, and different ways of using them. The Polish did outstanding work before the war but their primary method of breaking Enigma relied upon repeated indicator letters at the start of a message, a procedure that was discontinued in May 1940. The Polish handed their work over to the British and French, giving Bletchley Park a substantial leg up, but they had to continually adapt over the war to be able to continue breaking Enigma. The introduction of a four-rotor Enigma machine for U-boats was particularly problematic, and it was for cracking this that 'pinches' of coding material from submarines including U-110 and U-559 were enormously helpful.

For a bit more of an overview see In the Imitation Game movie, how did the real Enigma machine work?