While I don't discount the code-breaking of the Enigma, the Atlantic is s big ocean. Escort carriers provided air cover over the mid-Atlantic gap.. With advances in radar, U-boats took their life in hand when the surfaced or used their periscope. The secrets concerning Allied work on Enigma contributed greatly to the eventual success of the Allies.
Germany and Japanese hubris concerning their 'unbreakable' codes led to the the defeat of the Japs at Midway and the death of Yamamoto in the Pacific. Even with the code-breaking success, the war in many ways was determined as always by the grit and determination of the Allied fighting man. First by the Australian/American effort in New Guinea the Allied effort in North Africa, Sicily and Italy, followed by the relentless Allied effort in France and the combined Allied work against the Jap Empire.
Obviously another topic.