[deleted]
The German navy had a quite sophisticated code-breaking team, called the B-Dienst. They had a great amount of success at breaking British naval codes, especially those used by the convoys. These were book codes, like the example here - easy to produce, simple ciphers that were very suitable for merchant use. This did, however, make them easy to break. Most of these codes had been broken by the outbreak of war, and the codes weren't changed with it. Probably the biggest success of the B-Dienst was in March 1943. Signals intercepted from convoys SC 122 and HX 229 were decrypted. These decryptions allowed the Germans to precisely position their U-boats, leading to the sinking of 23 ships totalling 146,000 tons. The Germans managed to keep up with changes in the codes - when the RN switched to Naval Cipher No 3 in October 1941, B-Dienst had penetrated it by September 1942. However, they were careless with the intelligence produced by code-breaking. In May 1943, Allied codebreakers deciphered German messages containing intelligence derived from signals intercepts. These messages were so detailed that it was clear that code-breaking could be the only possible way of obtaining the information contained within. Newer, more sophisticated coding systems were introduced.
Meanwhile, on land, the Germans successfully cracked a US State Department code known as the Black Code. Simultaneously, the Italian intelligence service managed to steal a copy. Unknowing, the American military attache in Cairo, a Colonel Bonner Fellers, sent all his messages to the US in this code. These messages contained a vast amount of detail about British operations in North Africa, from operational strengths to future plans. The Germans could read all of this, and it was a major help to Rommel's operations.