# German code breaking in World War II

German code breaking in World War II achieved some notable successes cracking British naval ciphers until well into the fourth year of the war, using the extensive German radio intelligence operations during World War II. Cryptanalysis also suffered from a problem typical of the German armed forces of the time: numerous branches and institutions maintained their own cryptographic departments, working on their own without collaboration or sharing results or methods. This led to duplicated effort, a fragmentation of potential, and lower efficiency than might have been achieved. There was no central German cryptography agency comparable to Britain’s Government Code and Cypher School (GC&CS), based at Bletchley Park.

## History
### Departments

In Germany, each cryptographic department was responsible for cryptanalytic operations. They included:
* Deutsche Reichspost (DRP) - Reich Mail Service
* Forschungsstelle - "Research Bureau", telephone intercept unit, part of the DRP
* Forschungsamt - "Research Office", under the authority of Reichsmarschall Hermann Göring
* Auslandsamt, Abteilung Z
* Oberkommando der Wehrmacht Chiffrierabteilung (OKW/Chi Wehrmacht) - Decryption Department of the High Command of the Wehrmacht
* General der Nachrichtenaufklärung of the Heer
* Oberkommando des Heeres/Abt. Fremde Heere Ost (OKH/FHO - Army Supreme Command/Foreign Armies East Department intelligence focused on Eastern nations' armies)
* Oberkommando des Heeres/Abt. Fremde Heere West (OKH/FHW - Army Supreme Command/Foreign Armies West Department intelligence focused on Western nations' armies)
* Abwehr - the intelligence department of the Wehrmacht
* Chiffrierstelle, Oberbefehlshaber der Luftwaffe, of the Oberkommando der Luftwaffe (OKL) - Air Force Supreme Command
* Oberkommando der Marine (OKM) - Navy Supreme Command
* Reich Security Main Office (RSHA) - Reich Security Main Office under Himmler
* Pers Z S - of the Foreign Office
While most contributed little to the German war effort, the Navy's OKM did have some remarkable successes in breaking Allied codes. The 2. Abteilung der Seekriegsleitung included the Marinenachrichtendienst (M.N.D.) and its III. Abteilung, radio intelligence. The B-Dienst (Beobachtungsdienst, "surveillance service",) and the xB-Dienst ("decryption service") were able to break into several important Allied radio communication circuits.

### B-Dienst

The B-Dienst, created in the early 1930s, had broken the most widely used British naval code by 1935. When war came in 1939, B-Dienst specialists had broken enough British naval codes that the Germans knew the positions of all British warships. They had further success in the early stages of the war as the British were slow to change their codes. The B-Dienst could regularly read the Broadcast to Allied Merchant Ships (BAMS) code, which proved valuable for U-boat warfare in the early phases of the Battle of the Atlantic. In February 1942, B-Dienst broke the code used for communication with many of the Atlantic convoys.
Before the US entered the war at the end of 1941, B-Dienst could also read several American codes. This changed after April 1942, when the US Navy changed their code systems, but earlier, the ability to read American message traffic contributed to the success of Operation Paukenschlag (Operation Drumbeat), the destructive U-boat attacks off the American East Coast in early 1942.
In 1941, the US Navy refused, for security reasons, to equip the British Navy with their ECM Mark 1 encryption devices, so the British Admiralty introduced "Naval Cypher No. 3" for Allied radio communication and convoy coordination in the Atlantic. The B-Dienst concentrated on deciphering the new code, in September 1942 and from December 1942 to May 1943, 80 percent of the intercepted radio messages were read but only 10 percent were decrypted in time to take action.
The British Naval Cypher No. 5 is also known to have been broken by the B-Dienst, as were various low-grade British Naval and Air codes, including COFOX, MEDOX, FOXO, LOXO, SYKO, Air Force code and Aircraft Movement code. The US "Hagelin" M-209 field cipher machine and the French "Anglp" code were also often read.
In addition, B-Dienst cracked Soviet and Danish code systems.

### Radiotelephone interception

Apart from the notable successes of the German navy's decryption services, there were also some useful results from other institutions. For example, the Reichspost was able to descramble scrambled voice transmission of transatlantic radiotelephone conversations between the USA and Great Britain. For this purpose, an interception and descrambling facility was built in Noordwijk, near the Hague in occupied Holland. From 1940, the Mail Service's descrambling specialists intercepted and understood classified telephone conversation between President Roosevelt and the British Prime Minister Winston Churchill.
The scrambler worked by voice inversion around a chosen frequency, so that the high frequencies become low and vice versa. It was impossible for a casual listener to break. However the Germans, by recording the telephone message on a BASF tape recorder, could quickly identify the scrambling method by playing the tape a few times through the few possible combinations of coding, to unscramble it.
In 1943 the facility relocated to a purpose built bunker facility in Valkenswaard, south of Eindhoven to avoid a potential commando raid on the northern coast. Valkenswaard remained operational until August 1944 when the facility had to relocate to Germany to avoid the advancing British. The most important intercept was a conversation discussing on 29 July the pending Italian surrender, weeks before the event took place on 3 September 1943, giving the Germans time to plan the occupation of Italy and disarming of Italian soldiers. The interception potential thereafter decreased, as did the number of phone calls intercepted.
This was not codebreaking, but an adjunct to it - the exploitation of understanding of a sophisticated technology for the purpose of data interception.

### Co-operation with Italy

Another success was the OKW/Chi 1941 cryptanalysis of the "Black" code used by US diplomats. Due to this, a huge interception facility in Lauf (Bavaria) could decrypt communication between US diplomats and Washington DC. The specialists in Lauf concentrated on messages from Bonner Fellers relating to the North African Campaign, so they could pass information to Feldmarschall Erwin Rommel about Allied plans and operations. The Germans also received the "Black" code from the Italians; Italian spies had photographed the code tables in the US embassy in Rome in September 1941. While the Germans appreciated the gift from their ally, they did not explain that they were already able to read "Black" code messages.
In general, however, German performance in code breaking was weak due to the fragmentation of responsibility and specialized personnel. The Navy's B-Dienst was an exception to the rule, although its successes largely ended when the Allies began using more sophisticated encryption methods by 1943.