B-Dienst
The B-Dienst (, observation service), also called xB-Dienst, X-B-Dienst and χB-Dienst, was a Department of the German Naval Intelligence Service (, MND III) of the OKM, that dealt with the interception and recording, decoding and analysis of the enemy, in particular British radio communications before and during World War II. B-Dienst worked on cryptanalysis and deciphering (decrypting) of enemy and neutral states' message traffic and security control of Kriegsmarine key processes and machinery.

"The ultimate goal of all evaluation was recognizing the opponent's goal by pro-active identification of data."

B-Dienst was instrumental in moulding Wehrmacht operations during the Battles of Norway and France in spring 1940, primarily due to the cryptanalysis successes it had achieved against early and less secure British Naval cyphers.

B-Dienst broke British Naval Combined Cypher No. 3 in October 1941, which was used to encrypt all communications between naval personnel, for Allied North Atlantic convoys. This enabled B-Dienst to provide valuable signals intelligence for the German Navy in the Battle of the Atlantic. The intelligence flow largely  ended when the British Admiralty introduced Naval Cypher No. 5 on 10 June 1943. Naval Cypher No. 5 became effectively secure in January 1944 with the introduction of the Stencil Subtractor system which was used to recypher it.

Background

The B-Dienst unit began as the German Radio Monitoring Service, or educational and news analysis service () by the end of World War I, in 1918, as part of the navy of the German Empire.

A counterpart to the B service on the British side was the Y-service or Y Service. The Y was onomatopoeic for the initial syllable of the word wireless, similar to the B initial for the German service.

Little was known outside about the internal organization and workings of the B-Dienst section. After the armistice of Italy (Armistice of Cassibile), officers of the Italian naval communications intelligence (SIM, ) in conversation with the allies, informed them that even though they had worked in close collaboration with B-Dienst, they had little understanding of the workings or internal structure of B-Dienst, thereby affirming the secretive nature of the organization and its effective security.

B-Dienst personnel numbered around 5000 people by the end of 1944. B-Dienst originally started as the 3rd section of the 3 Naval Operations () (3/SKL) of the OKM, became part of the 2/SKL, stayed with 2/SKL when it rose to a division, and became in effect 4/SKL. Technically it was the Radio Reconnaissance Branch of the Naval Communications Services Division.

In 1938 before the start of the war, B-Dienst had insufficient personnel to work on the more complex cyphers, so instead concentrated on the Royal Navy Administrative Code, which was a 5-figure code recyphered on a subtractor table.  By October 1939, B-Dienst had around 40 men working at the English desk on Naval Cypher, specifically in those areas that interested them, i.e. North Sea and the Atlantic.  By the time of the British expeditionary force to Norway (Norwegian Campaign), personnel had almost doubled. By the end of 1940, numbers increased again to 150. Service personnel were recruited from all areas of the armed forces, specifically those who had foreign language skills and were given a short six week training course. By December 1942, the English desk had 275 personnel employed, and around 300–360 cryptanalysts by spring 1943, which was the peak. Including clerks and evaluators, the number was around 1100. From 1942 onwards, due to the high demand for men at the front, B-Dienst was forced to employ women cryptographers. By the end of the war, employment was split at 50% women and 50% men.

The B-Dienst organization worked over a 24-hour period from the beginning of the war to the last months. The duty cycle for each person consisted of an eight hour shift, working in the order of three days, three evenings and three nights. The number of military personnel working per watch depended on the code being worked on, but at the end was around 80 men. For Naval Code, which was used by the Royal Navy for administrative purposes, it was slightly less; for Naval Cypher which was used by the Royal Navy for operational purposes, it was slightly more.

During World War II, B-Dienst was located in 72–76 Tirpitzufer in Berlin, which was later renamed Bendlerblock, until it was bombed in December 1943, when they re-located to a bunker outside the city, which was code-named BISMARCK. Its location was communicated to the Kriegsmarine in an Enigma key called FREYA. The bombing of Berlin in 1943 destroyed large parts of B-Dienst records, markedly reducing their operational efficiency and forcing them to move to the town of Sengwarden near Eberswalde, located about 50 km northeast of Berlin. Forced again to move in the spring of 1945, due to the Russian advance, they first moved to Aurich, a town in Lower Saxony, then to the Intercept Station at Neumünster and finally moved to the Signals School at Flensburg. TICOM located them on 17 May 1945.

Key personnel

Kurt Fricke

Admiral Kurt Fricke (8 November 1889 – 2 May 1945) was Chief of Operations of Naval War Command. Kurt Fricke ran the major enquiry which investigated the sinking of the German auxiliary cruiser, colloquially known as an armed raider, the Atlantis in the context of Enigma security. Fricke exculpated both Naval Enigma security and treason of senior staff of the Atlantis, at a time when Naval Enigma was undergoing extensive cryptanalysis by the British Government Code and Cypher School at Bletchley Park. Fricke also investigated the sinking of the German battleship Tirpitz and a number of other sinkings.  Fricke was killed on 2 May 1945 during the Battle of Berlin.

Ludwig Stummel
Konteradmiral Ludwig Stummel (5 August 1898 in Kevelaer – 30 November 1983 in Kronberg im Taunus) had succeeded Theodor Arps as Group Director of Naval Warfare department: Communications (4/SKL) from 1 January 1940 to 15 June 1941. Ludwig Stummel was a career signals officer who had joined the Navy during World War I. A fervent Nazi and Catholic during the run-up to the war, he increasingly became disaffected with the regime as the excesses of the regime offended his religion.  As well as running the B-Dienst cipher bureau, one of the responsibilities of group heads was to investigate situations in which the Naval Enigma and keying procedures could be compromised and take appropriate action. Between 16 June 1941 and May 1943, Vice Admiral Erhard Maertens (26 February 1891 in Glogau – 5 May 1945 in Berlin) took responsibility for the position becoming Stummel's immediate superior. Ludwig Stummel, now promoted to rear admiral, took over the position when Erhard Maertens was sacked. Stummel was Group Director from May 1943 to 16 August 1944 and Rear Admiral Fritz Krauss was in charge from 16 August 1944 to 22 July 1945.

Heinz Bonatz

Kapitänleutnant Heinz Bonatz (18 August 1897 in Witzenhausen – 1981) was Chief of German Naval Radio Intelligence, head of Group III (Radio Intelligence, Interception, Traffic Analysis, Cryptanalysis) of 4/SKL (, English: Marine Communications) of OKM, which was responsible for cryptanalysis of enemy signals. An energetic man, he joined B-Dienst in February 1934.

Wilhelm Tranow

The most important individual at B-Dienst was former radio man and energetic cryptologist Oberregierungsrat (Senior Civil Service Councillor) Captain Wilhelm Tranow, head of the English language cryptanalysts. The American military historian of cryptography David Kahn stated:

If one man in German intelligence ever held the keys to victory in World War II, it was Wilhelm Tranow.

Wilhelm Tranow was in charge of section IIIF of group III of 4/SKL of OKM, which was the English desk, and was responsible for the interception of enemy radio communications, the evaluation of those enemy crypts, and the deciphering of enemy crypts. The organization of the German radio security processes was another important responsibility.

Other notable personnel
Two other important individuals at B-Dienst, who were successful cryptologists, were Lothar Franke, who was responsible for the French desk, and Paul August for the Italian desk.

Organization

By August 1944, B-Dienst as an organization with OKM had enough personnel to qualify as a division, and the Order of battle within 4/SKL (Communication) of OKM was as follows:

All high-grade traffic was forwarded to 4/SKL in Berlin, together with direction finding results, traffic analysis and low-grade decoding results.

The Office of Naval Communications (4/SKL) was commanded by Konteradmiral Krauss between 16 August 1944 and 22 July 1945. 4/SKL was subdivided as follows:

General Section 4/SKL I
Central Office. Commanded by Korvettenkapitän z. V. Jensen, Central Office has three subsections. The central sections function was one of administration.

 Section Ia: This section answered general questions relating to the organization, managed the training and utilization of officers of the service, and managed the registration and classification of documents.
 Section Ib: This section dealt with the training and utilization of petty officers, men and women auxiliaries of the service, with the exception of the line telegraphy unit personnel. It was also responsible for the defence of the Marine Military Radio. ()
 Section Ic: Training and utilization of all other personnel in 4/SKL not covered by sections Ia and Ib. Setting up and organizing line telegraphy units.
 Section Iz: This section was responsible for the personal matters of officials and employees of the Office and of officials of the radio intelligence service at subordinate stations.

General Section 4/SKL II
Radio, Visual Signal, and Recognition Signal Service Division. Commanded by Kapt. z. S. Lucan

 Section IIa: Its responsibility was also one of liaison, specifically with 1/Skl (Operation)  and with any other departments which needed operational, tactical or general questions answered.  It managed the cooperation between 4/SKL and allied navies. Responsible for operation secrecy of the service.
 Section IIb: This section answered all questions related to the radio service. It was responsible for the application of radio communication technologies for naval warfare, which included camouflage, deception and radio jamming. It also managed the execution of the radio teleprinter service.

 Subsection IIba: Its responsibilities included the evaluation of war diaries and other captured documents as well as the operational conduct of overseas radio services.

 Subsection IIbb: This subsection was responsible for allocation of frequencies for particular radio operations.

 Section IIc: Its areas of concern were development, production and distribution of cipher material, cipher systems, cipher keys and all necessary operational aids.

 Subsection IIca: Work on cipher systems and security of cryptographic systems.

 Subsection IIcb: Production and distribution of special keys.

 Subsection IIcc: Production and distribution of naval keys and radio names.

 Section IId: It was responsible for monitoring German cryptographic material from the standpoint of enemy radio intelligence, development of new machine methods for encipherment; development of new inventions in the field of cryptography.
 Section IIe: This section managed the Optical Communications Service, the Recognition Signals system, which was used to ensure that friendly units (U-boats, surface ships) could recognize each other at sea, and they managed the update and publishing of the Signal Book  () of the Navy.
 Section IIf: This section ran the communications service for the German Merchant Marine in wartime; the international and public radio service for B-Dienst, and the official B-Dienst radio service. It also managed the Relay message service, the Nautical Naval Communications Service and the sea distress reporting service.
 Section IIW: This section worked on all operational aspects and problems of transmission in the meteorological service () i.e. the distribution of instruments, preparation of weather transmitters, allocation of frequencies for weather circuits, management of encryption of weather reports and unit management for line telegraphy of the weather service.

General Section 4/SKL III
Communications Intelligence () Division.  Commanded by Kapt. z. S. Kupfer.

 Section IIIa: A section which managed all organization and operations around radio intelligence, including disposition and assignment of duties, new planning and organization on land and on board ship. It also regulated the watch service within the division.
 Section IIIb: Military evaluation of England. Work on English Radio Systems.
 Section IIIc: Tracking and positioning of enemy shipping, especially convoys.
 Section IIIh: It was responsible for the immediate evaluation of decrypted messages, preparing cryptologic reports and cryptologic location status reports ().  It managed the issue and administration of publications of the Division Radio Intelligence, the archival and supervision of messages in a document registry and ran the courier service. It also tracked and published reports on the tactical organization and station of foreign warships.
 Section IIIe: Military evaluation of the cryptologic systems of the US and discovery of US radio systems.
 Section IIIg: Military evaluation of Russia, France and Swedish systems and work on the radio traffic of these countries.
 Section IIIt: Work on technical problems of radio intelligence. Supervision of the teleprinter network on 4/SKL III.
 Section IIId: Undertook testing of all German cryptologic systems with B-Dienst and ensuring security of own key processes.
 Section IIIF: Research England. Commanded by Ob. Reg. Rat Wilhelm Tranow.

 Subsection IIIFl: Research England I.

 Subsection IIIFm: Research England II and Turkey.

 Subsection IIIFn: Research England III.

 Subsection IIIFo: Research England IV.

 Subsection IIIFqu: Research England V.

 Section IIIr: Research Russia.
 Section IIIu: Research USA.
 Section IIIv: Research France and Sweden. Commanded by Ob. Reg. Rat. Franke.
 Section IIIausb Training ().
 Section IIIk: Special Duty.
 Section IIIp: Rating of P.O.s, men and women auxiliaries in Branch IV B; Handing of training matters, in Branch IV B; Handling of organizational changes in out-stations; Estimating of war strength needs of the division.

Operations

At the start of World War II, Germany already had an established naval intelligence service. Established in 1899, it had grown in size and effectiveness, professionalized and by the end of the interwar period (1918–1939) had become a highly effective signal intelligence agency, regularly breaking British Cyphers.

Linguistic output
The output of B-Dienst was a weekly bulletin called X-B Berichte, similar to the OKW/CHI Reliable Reports () (OKW/Chi Linguistic Output)

Little was known about these, until a bulletin, dated 23 June 1944, was captured in Italy in September 1944. The information was known to be correlated, highly cogent, carefully organized with a fixed form.  Twenty-five copies were thought to be made, with 22 copies distributed, and 3 held for archive purposes. The distribution list was considerably bigger than was customary for the US Bulletin distribution.

The distribution list:

 Eight copies were distributed outside of High Command.

Staff of Naval Group Command West (located at Paris and in charge of naval surface units based on Biscay and Channel ports as well as coastal defence and Channel convoys)
Task group Tirpitz and 4th Destroyer Flotilla in northern Norway
Admiral Northern Waters at Narvik in Norway
Naval Liaison with Wehrmacht Field Headquarters
German Naval Command Italy 
10th Flieger Corps via Air Fleet 3 (West Europe)
German Air Force Lofoten (Luftwaffe responsible for reconnaissance on Arctic convoys for Russia)
Small Battle Units Command (set up early in 1944, in charge of midget submarines, explosive motor boats, special commandos for mining and sabotage)

 Fourteen copies distributed inside of Naval High Command.

6 copies to Chief of SKL, 1 SKL section, 2 SKL/Commander of the submarines BdU ()operations etc.
4 copies to intelligence – 3 SKL
1 copy to radar and electronics research – 5 SKL
3 copies within 4 SKL itself including one to the division head

Two grades of intelligence were produced according to their source:

 B-Reports –   Reading of open channels, and output of traffic analysis. 
 X-B-Reports – Decrypted messages transformed into Signals Intelligence.

The captured bulletin contained both B and X-B with XB information being framed in black boxes on the page. To avoid uncertainty arising in the interpretation of the information presented in the bulletin, a reliability scale was included, with reliability indicated by the category words probably or approximately and presume.

U-Boat operations

Sending a message to a U-boat usually began with Rear Admiral Dönitz (Commander of the Submarines, German: Befehlshaber der U-Boote, abbr. BdU) who maintained tight control on U-boat operations. The Officer of the watch would take the message, timestamp it, and hand it to the duty radio technician watch officer for encryption. Fifteen to twenty radiomen worked per shift enciphering and deciphering messages. As only officers could set the rotor positions, which remained in force for two days, the watch officer set every Enigma with a new inner key, bar one, just before midnight every second day. One Enigma cipher machine remained on the previous key setting to decipher late messages. After the officer completed setting the rotors, the radio technician configured the Plugboard and turned the rotors to the key. When the Enigma was configured, the message was enciphered and then immediately deciphered on another Enigma to ensure that it could be read. If readable, it was sent to the appropriate location. To do that, the radio technician determined the location of the target, usually a U-boat, and the specific circuit to transmit it on (Cryptochannel, Telecommunication circuit). Naval Command had several geographical nets, the Kriegsmarine version of the German Naval Grid System (), which were called, Amerika A, for the northern Atlantic area, Amerika B for the southern Atlantic area, Afrika 1 and 2, Ireland and others. Two other nets were also used for submarines attacking convoys, one code-named Diana, the other Hubertus. Each net had three frequencies, configured at the time of day to ensure best reception. Hubertus had six different frequencies used at different times. Occasionally a Wolfpack would get its own frequency.

Once the correct configuration was chosen, the message was transmitted in Morse code along a wire to a radio transmitter (radio tower) at Lorient. The messages were also re-transmitted by the much more powerful Sainte-Assise transmitter in France. The Sainte Assise tower would repeat the message at two, six, twelve and twenty four hours, and if critically important two days later. On any particular day, the unit would transmit twenty to thirty messages, with each message taking fifteen to thirty minutes.

On the U-boat, a radio technician was always on watch. Radio messages were received when a submarine was surfaced, at periscope depth and even down to forty feet. The radio technician always wrote the message down, even if it was not for that sub, with message serial numbers informing the technician if he had missed any. The U-boat captain also monitored the serial numbers on a regular basis to ensure no messages were missing and to ensure the radio technician was not negligent. The technician then ran a complicated process that yielded the key, set the rotors on the Enigma and reversed the message encipherment to yield the message, which was passed to the captain, with the captain taking appropriate actions in accordance with the message's orders or reading to keep informed of current events.

U-boat Message Types

Communications between the U-boats and land based facilities, i.e. headquarters, ports, aircraft, were encoded as messages and were categorized into six types, which were as follows:

 Long signals were messages encoded in four letter groups by Naval Enigma, in an easily recognizable format with their first two and last two groups being repeated indicators, giving the Enigma Cipher being used and the initial setup of rotor for a specific message. Message lengths were between 10 and 80 groups, which took between 25 seconds and 3 minutes to transmit in Morse Code. Long signals made good High-frequency direction finding (HF/DF or Huff-Duff) targets but were usually never sent when the U-boat was located near convoys.
 Convoy sightings reports: Convoy reports were enciphered initially by the Signal Book of the Navy () up until early 1943 in the Atlantic, later using the Short Signal Book (), and subsequently re-enciphered in the Naval Enigma. Signalbuch length was up to 12 groups, making the U-boat location easy to spot by Huff-Duff. The Kurzsignale code system condensed messages into short codes consisting of short sequences for common terms such as "convoy location" so that additional descriptions would not be needed in the message with transmission as rapidly as possible, typically taking about 20 seconds. Typical length of a message was about 25 characters. The messages were preceded by the German Morse Code letter Alpha, encoded by ..-.., to clear the channel of less urgent messages and were called E-bar by Bletchley Park cryptanalysts and Alpha signals by the Kriegsmarine, indicating their importance.
 Transmissions of one to six groups: Similar to the process for Convoy messages. So called contact short signals, they were typically used to provide fuel provision location, convoy position, speed, and course. Transmissions of this type would use the Short Signal Book, a 110-page signal code book, or the Short Weather Cipher () for weather reports. The message was preceded by the German Morse Code letter Beta, encoded as -...-, and was called B-bar by Bletchley Park cryptanalysts and Beta signals by the Kriegsmarine. Generally consisting of five four-letter groups, making 27 letters including the indicators and the U-boat's two letter radio signature.  Messages took around 25 seconds to transmit at the speed of 70 letters per minute. Beta signals of 5 group were easy to spot by Huff-Duff if the operator was on the correct frequency. Single group beta signals contained a mere 11 letters including an indicator and signature and lasted about 10 seconds during transmission. Attempts by the Allies to fix these message locations by Huff-Duff realized some success in 1942, of 33 signals sent, 10 were fixed.
 Weather reports:  Encrypted by the Short Weather Cipher and then re-enciphered with the Naval Enigma. An example would be 68° North latitude, 20° West longitude (north of Iceland), atmospheric pressure 972 millibars, temperature minus 5° Celsius, wind northwest Force 6 (on the Beaufort scale), 3/10 cirrus cloud cover, visibility 5 nautical miles, would become MZNFPED.
 Miscellaneous messages: Principally used for all other types of communications which precluded the above. A typically message type might detail refueling instructions. The message was encrypted by Naval Enigma. 
 Key Exchange: The process in which the U-boat and Headquarters established a key and used it for exchange of messages. The encipherment process was picked up from where it left off. It was faster than establishing a new key.
The B-bar was a Morse code type sequence that was used by German military submarines (U-boats) during World War 2 at the beginning of all their radio transmissions. It was a bar, followed by three dots, then another bar (). It was the Morse code for the letter B but with an extra bar at the end, hence the name "B-bar". The name was coined by the British. Bars in Morse code are more conventionally called "dashes" these days.

Dissemination to U-boats at sea
Considerable effort was taken to ensure that U-boats on operational duty were kept informed of any intelligence which would have made their task easier, i.e. sinking allied shipping. Hundreds of messages were passed for offensive war capability describing allied convoy movements, and neutral country shipping movements. For defensive war capability included not only the number and disposition of both surface and air anti-submarine units, but also tactics, armament, and anti-submarine location devices (Anti-submarine warfare). In addition, files were kept on board, that were updated periodically by radio transmissions. From a German Naval viewpoint, radio transmission was critical to disseminate any intelligence and indeed any scrap of information that could be gathered on allied defences.

 ..the reader of U-boat traffic was supplied with a surprisingly large background for judging German anxieties, suspicions, fears, and misconceptions, together with plans and hopes, or expedients, for counter action.

Intelligence Dissemination Per Period
During the 1942–1943 Winter Offensive, intelligence was always concerning convoys with particular emphasis on US-UK lanes. During 1943, when U-boat operations moved to a defensive Battle of the Atlantic Campaign Climax, a distinct type of message began to be exchanged, which eventually became commonplace, i.e. Allied contact and attack reports. Defence situations reports became remarkable for their length and new editions. Reports of distant areas, like the Caribbean, became more common. By winter 1943–44, the resumption of an offensive war against Allied convoys (Battle of Atlantic Final Years) brought back convoy messages. With the difficulties of finding convoys to attack, and with the Allies now reading all communications that the Kriegsmarine sent, concurrently, with daily allied operations, new types of intelligence messages including direction finding (Radio direction finder) on positions of Allied units and special reports from intercept parties aboard U-boats became more prominent. Particular concerns included Allied location devices, the positions of U.S. Navy Escort carrier groups (in an attempt to ensure that U-boats surface safely). Attempts were made to evaluate new kinds of underwater sounds, particularity related to ASDIC, search buoys and countering devices for acoustic torpedoes.

Training

Interception station MPA Flanders (), which was located in the Castle of Saint Andries, Bruges, was used to train the radio and cryptographic operators of German submarine U-664.

Chronic personnel requirements

During the whole period of the World War II, B-Dienst struggled to retain personnel and indeed had a continual chronic shortage of personnel. In April 1941, a total of 64 personnel were assigned to the Naval Cipher, on a 4-watch basis. Four additional personnel were needed per watch. A total of forty men were assigned to one subdivision of the Naval Code, and eight more were required. The other subdivision had seven men working by day but six more were needed to build up a two watch schedule. The total personnel needed for the main British systems alone was 165 people.

In March 1945, personnel requirements for decryption were stated as follows: For all countries, for readable traffic 155 personnel were needed, for research on British Systems, 85 men were needed, thus a total of 240. In the year from January 1944, the staff for the Naval Code subsection dropped from 198 to 94.

Tranow stated that by 1942 his core cryptanalyst staff had increased to about 275 people. He wanted to double that number, but did not succeed in doing so. In May 1945, during his TICOM interview, he bitterly remarked that the entire number of personnel in the English cryptanalysis section was 275.

Offensive cryptology

Summary

At the start of the World War II in 1939, Germany already had an established naval intelligence service. Founded in 1899, it had grown in size and effectiveness, professionalized and by end of the interwar period had become a highly effective signal intelligence agency, regularly breaking British cyphers. The British Royal Navy was B-Dienst's main adversary during world War II. Britain's main high grade naval cyphers in use at that time were:

 Naval Cypher No 1 – A four-digit code group book, in force since 1934, for use by naval units. Naval Cypher was always used reciphered or in the language of the day super-enciphered. Recyphering or superencipherment consisted of adding to the cypher random seeming numbers from tables of 5,000 number groups, but depending on the cypher could be as many as 20,000 number groups

Naval Cypher superencipherment tables at that time were limited to five; Commander in Chiefs Table, Flag Officers Table, General Table held by all ships below destroyers, Small Ships Tables and China Gunboats Tables.
 Naval Code (Administrative Code) –  A five-digit code group book, also in force since 1934, for communications to merchant shipping, i.e., convoys, and had been used extensively, unrecoded for non-confidential signals, and from 1938 onwards recoded using one general series of tables, for confidential signals. From February 1937 to April 1939, Administrative Code had been used with a special secret recyphering table. At the start of the war the security value of the code was very low. Naval Code replaced Administrative Code on 20 August 1940.
 Auxiliary Code No 3 – A four-digit code group book, in force since February 1937, for use by small vessels. It had been used unrecoded for non-confidential traffic and recoded by multiple alphabet table for confidential traffic. Its security was also low. Both these versions of Naval Code and Auxiliary Code were withdrawn from use on 20 August 1940.

Wilhelm Tranow broke the Royal Navy's most widely used code, the 5-digit Naval Code, in autumn of 1935. On the day the war started, B-Dienst were well aware of British merchant ship movements in the seas off Germany. On 11 September 1939, they read a message that informed them of a convoy assembling off the coast of the Bristol Channel, and dispatched U-boat  which sank SS Aviemore about  southwest of Cape Clear.

During this time, B-Dienst had insufficient staff to deal with Naval Cypher, and had only made preliminary entry. The volume of traffic increased enormously. The section was temporarily snowed under, not only by the sheer quantity of material but also because a setback had begun before the war on 25–26 August 1939, when the Britain changed the Commander in Chief and Flag Officers Recyphering Tables All work on Naval Cypher was temporarily ceased, Naval Code was being read about 35% of the time. By October 1939, they were again reading a small proportion of Naval Cypher messages with work concentrated on messages concerning traffic in the North Atlantic Ocean, South Atlantic, North Sea and the Skagerrak, etc. Messages read contained wartime organization of the Royal Navy, and the effect of the sinking of  in Scapa Flow and the effects of German battleship activity in the Channel area. After the sinking of  on 23 November 1939, Wilhelm Tranow read Royal Navy counter measures. Entry into Naval Cypher No 1 had been made possible through Submarine Recyphering Tables which were universally used for all British traffic. It was not until May 1940 that special tables were set aside for submarines and by 20 August, British submarines had ceased to use Naval Cypher and instead moved to Naval Code. In April 1940, Naval Code was again penetrated.

Operation Stratford

Perhaps B-Dienst's biggest success was in mid-March–April 1940, when a version of Naval Cypher No.1 was penetrated and messages revealed plans for an Anglo-French expedition against Norway under the cover name Operation Stratford. Germany seized the initiative and invaded Norway on 9 April 1940. The code was read concurrently during the campaign. Exact data on British counter-measures such as landing fields, and the arrival of transports at Harstad were known in advance, enabling German Armed Forces to take appropriate action. When Norway surrendered in early May 1940, B-Dienst received a number of captured documents from , a destroyer which was grounded in the Ofotfjord in the Battle of Narvik during the Norwegian Campaign, but when Bergen was being evacuated by the British, they left a large cache of British cryptography documents behind which were discovered in May 1940. These included a copy of the Administrative Code, a copy of the Foreign Office Interdepartmental Cypher No.1, the current Merchant Navy Code with recoding tables and the Auxiliary Code and Recoding Tables along with Call Signs and Delivery Groups. These were exploited as an aid to reading future ciphers. The Norwegian campaign enabled Tranow to rest on his laurels until August 1940, when new challenges appeared.

1941–42 period

1940–41 in the North Atlantic and North Sea.

1942–43 period
January–August 1942 to about August

End of B-Dienst success

By the end of 1943, B-Dienst successes were growing fewer and fewer. Naval Code, Brown edition, could still be read at the end of 1943, but a heavy air raid in Berlin in November 1943 destroyed large numbers of their records, reducing their operational effectiveness drastically. B-Dienst had to move to Sengwarden near Eberswalde. With the Admiralty now changing keys every day, instead of every 15 days as they had done the previous year, and the increasing use of one-time pads, effectively made the continual breaking of high level cypher impossible.  On 20 April 1944, the Canadian destroyer  was sunk off the coast of Brittany and, while the code books were recovered, they made little difference. A Leading Telegraphist, captured from the ship, gave a detailed description of the new double conversion procedure for the Stencil Subtractor system. B-Dienst devoted intensive study to this problem, and appeared to have developed methods by which the process could be broken down

In the month before the Normandy Landings, B-Dienst was asked in an order from Hitler what English cyphers it was reading, and could only reply that both main high security English cyphers could no longer be read, Naval Cypher from start of June 1943 and Naval Code from January 1944.

Naval Cypher

Introduction of Naval Cypher 2

B-Dienst's status continued until 20 August 1940, when Naval Cypher No. 1, which had been in use since 1934, was replaced with Naval Cypher No. 2. The general Recyphering Tables were also introduced around the same time, with the Naval Code becoming a 4-digit code instead of a 5-digit code. This change resulted in a setback for B-Dienst because both Naval Code and Naval Cypher were externally identical, but by September 1940, they were again reading a small proportion of Naval Cypher. Within seven weeks they had discovered the meanings of 800 code-groups, 400 of the general vocabulary and 450 ship names in Naval Cypher. From October 1940, the British Admiralty introduced Left and Right recyphering procedures and two additional recypher tables: one for use in the North Sea and Atlantic, the other in the Mediterranean. By the start of 1941, this had expanded to 700 ship names and 1,200 vocabulary words.  At that point, B-Dienst started to assign British codes with nicknames, based on German cities. Naval Cypher was Cologne, and Naval Code, which was crumbling, was called Munich with two variants Brown and Blue. On 20 January 1940, the Admiralty introduced disguised Starting-point Indicators, eliciting a serious crisis in naval headquarters. Achim Teubner, Head of Communications Intelligence ordered a directive sent to all ships that the position and movements of all British ships would not be known due to a cipher change.

B-Dienst could read nothing until after about four weeks, but insufficient staff were not able to build on the success. At that time, B-Dienst had access to few Hollerith machines, and after four weeks could only read 10% of the intercepts received.

In September 1941, disguised Starting-Point Indicators were abandoned, and a family of standard four-digit Starting-point Indicators were brought into use. This forced B-Dienst to determine which table to use for each particular message, which provided assistance to B-Dienst, enabling Tranow to read again nearly half as much as he did at the peak of his success immediately before 1 October 1940. Results were so good that Tranow reached the old standard before the recyphering of Indicators. This continued until Naval Cypher No. 2 was replaced by Naval Cypher No. 4 on 1 January 1942

Combined Naval Cipher No. 3

The breaking of the Allied Naval Cipher was perhaps also the biggest achievement of B-Dienst.

The Combined Naval Cipher No. 3, introduced on 20 January 1941, was set aside for both American and British use, for enciphering communications to and from Atlantic convoys. The USA's entry into the war increased the number of messages B-Dienst were handling, as the number of target areas rose from 136 to 237 at the end of the war. By the end of 1943, the number of intercepts were more than 3,101,831 a year, or 8,500 per day, although duplicates were common.

By October 1941, sufficient traffic was being generated for B-Dienst to start to notice the vital importance of the cypher giving it the moniker Convoy Cipher and gave it the code name Frankfurt. To strip the super-encipherment from the message, one or two messages with overlapping super-enciphered numbers were required. Of 100 messages or more, the probability was more than half that two would not merely overlap but would start at the same point in the number tables B-Dienst also exploited cribs.

The subtractor tables used with Naval Cypher No 3 had 15,000 groups in 1941. As the traffic had increased enormously, so did the subtractor tables. M table-General had increased to 218,000 groups in August 1942, and S table-Atlantic increased to 148,000 groups in October 1942 but by November had increased again to 220,000 groups. Code groups were reused several times, and it was these depths that B-Dienst used to help reconstruct the cypher. The British admiralty tried to limit depths by changing recyphering tables every month, then from September 1942 every 15 days and in 1943 every 10 days.

By February 1942, the cypher had been reconstructed with astonishing rapidity, perhaps being helped by the fact that until 1 April 1942, almost all the traffic in Cypher No. 3 had been recyphered using only one table, the General M table. By March 1942, Tranow was reading the majority of messages with the smallest of lag, for signals where the cypher was used, including the North Atlantic. The Left and Right recoding procedure was added to the ciphering process on 1 August 1942, but made no difference, with B-Dienst reading as much as 80% of all traffic.  This continued for most of 1942, until 15 December, when an additional recyphering table was introduced, the Atlantic Area recyphering table, but it made little difference. Disguised starting point indicators were also introduced, but with additional staff conscripted to B-Dienst, Tranow was again reading substantial message volumes by February 1943. Tranow was frequently able to read almost all convoy traffic that interested him in the North Atlantic so quickly that on occasion he had the information ten to twenty hours in advance. Routine signals from Western Approaches and Halifax helped him as much as reading traffic from the Merchant Ships Code, particularly those recoded using Convoy Tables. This information was of immense tactical importance to U-boats. What the Admiralty considered the most disturbing aspect was that from February 1942 until 10 June 1943, B-Dienst was able to read, almost daily, the Admiralty U-boat disposition signal, often on the same night it was produced. Using this information, B-Dienst could forecast the routes that convoys would take to avoid concentrations of U-boats referred to in the signal, and take appropriate action.

On 10 June 1943, Cypher No. 3 was withdrawn.

British suspicions of compromise

Fears of compromise
Around February 1943, the U-boat packs Neptune, Ritter and Knappen (60 U-boats in all) were on station in the Greenland Gap. Dönitz had formed these three wolf packs into a patrol line on the meridian of 30° West, beginning in 63° North and stretching southwards for  to 53° North.

In February 1943, there was a successful attack on convoy ON 166, and the Admiralty suspected that cipher No. 3 was compromised, although it could not be demonstrated at that time. Last minute shifts in the patrol lines of Groups Ritter and Neptune on 18 February showed that German High Command had abandoned the plan of conducting operations on convoy HX 226 but was instead reforming attack group lines to target westbound convoy ON 166. Within a few moments of these changes, a third group of U-boats was formed to swing out to the southeast of the Neptun-Ritter line and cut off any southerly diversion of the convoy.

s hydrophone made contact with the convoy's screws. Convoy ON 166 had received three diversions by 17–18 February 1943, sent by the Admiralty using Naval Cypher No. 3 (recyphered using table S), and attempted to proceed in south. That Tranow had known about the convoy was unquestioned in the Admiralty. The disposition and shifting of the U-boats between 18 and 20 February suggested that B-Dienst had knowledge of the location of the convoy rather than a reckoning.  Of the three diversions, the first was most suspect, as it would have sent the convoy through the Ritter line just south of its midpoint, with the stragglers route would have passed through the Knappen line.

Fears communicated
On 26 February 1943, the Atlantic Section of the Admiralty sent a memo to COMINCH commenting on the strange behaviour of the wolfpacks and the effective change of sequence of U-boats during that occasion.

Evidence accumulates
Further evidence had accumulated after the battle of Convoys HX 229/SC 122, which was considered the largest U-boat battle of World War II, when B-Dienst solutions to Frankfurt were at their peak of efficiency. On 5 March the slow convoy SC122 left New York City followed on the 8th by the faster convoy HX229. On the 12th and 13th, SC122's 51 vessels steamed in 13 columns, while HX229 which was catching up on SC122, steaming in 11 columns, both heading for the North Atlantic, when the Admiralty heard heavy U-boat communications ahead of the two convoys. At 8pm on 13 March SC122, currently at 49° North, 40° West, were ordered to avoid the U-boats, by steering a course of 67°.  B-Dienst decrypted this message, passed it to Karl Dönitz. One degree of latitude represents sixty nautical miles, and one degree of longitude, at 49° North latitude, equals 39.3 nautical miles. This meant that even if the convoys knew exactly where the U-boats were located, and the U-boats knew where the convoys were, they could still be dozens of miles off course. To enable them to spot the convoy, Dönitz ordered 17 submarines to spread out in a north–south line against SC122, and later 11 submarines against HX229.

Order of communications were as follows:

 Original route for HX 229, sent in Naval Cipher No. 3, Recyphering Table "M".
 HX 229 diverted; ordered to turn due east on reaching 49°N – 48°W. (J) Sent in Naval Cipher #3, "M". U-boats present on the original route between Newfoundland and Greenland was known.
 Raubgraf U-boat group ordered to form new line off Newfoundland for 15 March in expectation of a north eastbound convoy. HX 229 original route would have bisected this line at about 50°30'N – 47°W.
 Before Raubgraf could reform on the line for the 15th, it was suddenly ordered to head for area 49°40'N – 42°15'W at high speed.
 Raubgraf line ordered from 51°15'N – 42°05'W to 49°27'N – 40°55'W. "Get hold of eastbound convoy to which further groups can be detailed later."

It is difficult to account for Raubgraf's sudden shift without assuming compromise. There is nothing in those reports which could have justified B-Dienst's conclusion that a northeast convoy not yet sighted was turning into an eastward convoy. Several hours later, Raubgraf U-boats were going through several maneuvers involving such fine points as a 15-mile shift to the south, accompanied by such phrases as "The convoy must be found!". B-Dienst uncertainty as to the precise location of the convoy and their failure to arrange U-boats with the requisite precision probably indicated that B-Dienst did not possess a complete recovery of the HX 229 diversion dispatch from the Admiralty.

Further evidence mounted with the suspicious movements of U-boats around convoy TO 2 on 18–22 March, on route (Trinidad to Curaçao) and convoy UGS 6 on 7–13 March on route (Chesapeake Bay to Gibraltar) and by May 1943, Convoy HX 237 on route (Halifax Harbour, later New York City) to Liverpool) and SC 129 on route (Sydney, Nova Scotia or Halifax Harbour or New York City to Liverpool) confirmed the Admiralty's suspicions.

Compromise accepted

In May 1943, COMINCH was informed of the compromise with the Admiralty arriving at the same conclusion and recommend a solution for June, until Cipher No. 5 could be introduced. The insecurity of Naval Cypher No. 3 was attributed to:

 Compromise of portions of aviation base book due to heavy use over long periods.
 Overload of "M" and "S" tables in spite of continual 10 day change.
 Easy classification of messages in Naval Cypher No. 3 due to distinctive call signs.

The proposed counter measure was to change the period of the "M" and "S" recypherment tables from every 10 days to every 5 days. However continuing evidence of compromise proved that the interim safeguards could not be accepted fully. Naval Cipher No. 5 was introduced on 1 June 1943.

Naval Cipher No. 4

In January 1942, Naval Cypher No. 4 was introduced, and by March 1942 Tranow had reconstructed part of the book, but continued to focus on Cipher No.3, which was considered by far the most important cypher for some months, but by October 1942, he had reconstructed the code book enough to intercept and read messages regarding convoy movements in the Pacific Ocean, Indian Ocean and Red Sea. Around this time, December 1941 to January 1942, the Admiralty had started to use One-time pads for recypherment, particularly in the areas of North Atlantic and home waters and were called:

 Admiralty
 Commander-in-Chief Home Fleet
 Commander-in-Chief Western Approaches

Wilhelm Tranow and his team were considerably hindered by the introduction of one-time pads and were deprived of substantial traffic, particularly daily SITREP reports from Western Approaches which used to be recyphered in Area 1 table but now were recyphered in Commander-in-Chief Western Approaches Code OUT one-time pad. From May 1942, the use of Hollerith tabulating machinery was introduced, which helped, but never achieved the success with this cipher as he did with previous versions.

Naval Cipher No. 5

On 1 June 1943, Naval Cypher No. 5 replaced No. 4 and on 10 June 1943, it replaced Naval Cypher No.3. Cypher No. 5 was a new type of cypher which introduced a number of improvements, making it much more secure. It is likely that Tranow could have achieved the same level of success as he had with previous cyphers but would have been short-lived, as from 1 July 1943, the usual long subtractor tables started to be replaced with the Stencil Subtractor System, which was unbreakable.

B-Dienst ceased all work on Naval Cypher on 31 January 1945.

Naval Code

Naval Code replaced Administrative code on 20 August 1940, as Administrative Code had been in use during the interwar period, from 1937, and which had been comprehensively broken by B-Dienst due to sloppy British cryptography practices during peacetime, of using the cypher both recyphered and unrecyphered. Naval Code was a four-figure code group cypher, thus making it identical to Naval Cypher, and this confused B-Dienst for about six weeks as described above, when Naval Code was initially broken. Naval Code, which was used for communications between convoys and shore, also started to be used for auxiliary vessels communications using the Auxiliary Vessel Tables with the distinctive War Vessels Call Signs. B-Dienst were able to quickly break this code with some success, until the Stencil Subtractor system was introduced on 1 December 1943, enabling the changing of recyphering tables on a daily basis.

B-Dienst devoted considerable personnel to breaking Naval Code in Area I recyphering tables which was communications occurring in English Channel, North Sea and North Atlantic, which came into force on 21 November 1940. As a rule B-Dienst only concentrated on breaking the address portion of the message in order to discover the location of major battle groups. The Left and Right procedure was effective until 1 October 1940, but with additional staff Tranow made repeated intrusions into the code.  Left and Right procedure was not introduced for Auxiliary Vessels until 1 October 1941. Disguised Starting-point Indicators introduced on 20 January 1941, meant B-Dienst had to use additional staff as the work load had doubled.

A copy of Naval Code No. 1 was captured in May 1941, when , a heavy cruiser, was sunk in Suda Bay, Crete. Soaked with sulphuric acid it was unknown by the Allies whether it was illegible. On 1 January 1942, Naval Code No. 2 was introduced. Within 10 days B-Dienst was able to read routine messages, and throughout 1942, their success increased. Disguised starting-point indicators were introduced on 15 December 1942, but as with Naval Cypher, were of little use, merely a temporary setback. Naval Code No. 3 was introduced on 1 March 1943 and B-Dienst continued to read a high volume of messages recyphered with Auxiliary Vessels Tables. A copy of Naval Code No. 2 was captured by B-Dienst at Tobruk at the end of 1942, which confirmed how much work they had done to penetrate the code. Naval Code No.3 was an improvement on No. 2 and caused B-Dienst's cryptanalysis unit to stall but by August 1943, B-Dienst was again penetrating the code via the Auxiliary recyphering table and with increasing success up until 1 December 1943.

From 1 March 1943, B-Dienst did little work with Auxiliary tables, due to inadequate staffing. On 1 December 1943, the Stencil Subtractor system was implemented on Naval Code, meaning that code recyphering was undertaken on a much faster period, sometime hourly, or a new naval operation was starting. It took B-Dienst almost a month to understand that a new recyphering methodology had been put into force, initially suspecting that the underlying code had changed. They also attributed it to Italy surrendering to Allied forces on 13 Oct. 1943. B-Dienst set about trying to determine how the new recyphering worked and by January 1944, displaying an astonishing high degree of skill managed to establish the principles of the Stencil Subtractor single conversion indicator procedure which was effective at that time. In the course of succeeding weeks, Tranow and his team were able to reconstruct some individual messages and later on, whole days traffic. It was apparent to Tranow by that point that new Key Recoding Pages were effective each day, and their recovery of figures from Key Pages indicated that a Stencil having windows in a constant position was being used for recyphering. It was only a matter of time before the stencil was reconstructed and a staff of 250 was employed exclusively on this work. B-Dienst assumed that given enough traffic the Stencil Subtractor system could be broken but only if the basic code book was available, i.e. pinched, or perhaps one which had been used for several months in which groups had already been recovered. By January 1944, B-Dienst was able to break the December 1943 traffic in the Auxiliary table, but only due to the fact that they were working with an edition of Naval Code which was almost at end of life. On 1 January 1944, Naval Code No. 4 was introduced with Stencil Subtractor recyphering making it far more secure than the old long-subtractor recyphering method.

Table of attempted cyphers solutions

This is a list of Cyphers and Codes that were both solved and those where an attempt was made by the cryptanalyst unit from the beginning of World War II, to January 1945. The information is taken from TICOM documents T-517, T-520 and from I-12 and I-93.

Defensive cryptology

The primary Kriegsmarine (Navy) cryptological machine used for defence, i.e. to encrypt communications between land based naval personnel and German naval units at sea, was the Naval Enigma (Enigma machine) and was  known as Key M by the Kriegsmarine.

This had been introduced during the interwar years in 1925 and was the first Military Enigma type to be adopted. During much of the 1920s and 1930s the Naval Enigma and associated key processes had been under continual security review and improvement and by the start of World War II, the Kriegsmarine were assured that sufficient preparation had been made to ensure that Naval Enigma was the most secure of the other services, including the Heer (army) and Luftwaffe (Air Force). In April 1940, during the Norwegian Campaign (Operation Stratford), the British had recovered matched plain and cypher text covering two days from a captured German Patrol Boat  VP2623. These were passed to Hut 8 at Bletchley Park (GC&CS), which had been set up to attack Naval Enigma. The material enabled Hut 8 to read the traffic for six days during May 1940. History is unclear as to whether the material contained a plug layout on loose paper, for the six days or whether actual cryptanalysis took place using the first Bombe.

Operational security
As Enigma was the central element, i.e. control, of the naval U-boat offensive, the Kriegsmarine strove to ensure the security of the machine. As with the continual security review conducted during the interwar years, the process continued during the war years. B-Dienst's own communications were monitored for mistakes on an continual basis. For example, during the Norwegian Campaign, the Büffel, boat NS25, a converted whaler used as an auxiliary patrol ship, made a mistake, when it requested a weather report with the service abbreviation QOB. This was an impossible situation for the answering telegraphist, as Bletchley Park cryptanalysts would know that the returned message was a weather report, i.e. offering a crib, and made the answer impossible to deliver. Radioman Wilhelm Lemcke, who sent the message, was sent to Stavanger for additional training. Physical and logical exposure of Enigma machinery and keying documentation was equally important and was limited, whenever possible. For example, vessels which were expected to encounter shallow water, where Enigma materials could be recovered, were instructed to carry none whatsoever, and instead use the hand cipher () For example, the U-boat , which sank  on 14 October 1939, carried only a hand cipher. When the  was scuttled in shallow water, the Enigma machinery and keying documents were already safely stored by the German Naval Attaché in Montevideo.

Kriegsmarine enquiries

On occasion when a ship or U-boat sank in shallow waters, and there was a chance that Enigma materials could be recovered, POW interrogations indicated a leak, or an agent would release documents indicating compromise, the Kriegsmarine would demand that a report was written. If the report indicated that there was no compromise, then no action was taken. However, if there was indication of compromise, in the context of Naval Enigma security, then a probe was undertaken, and if considered serious, a formal investigation. Several times during the war, Dönitz considered the possibility of the Enigma cipher systems compromise. In particular, he authorized two substantial investigations into the source of enemy information: the first in autumn 1941 and the second in spring 1943.

1940 suspicions

U-33 sinking
If the investigation resulted in troubling findings, then an enquiry would be launched. Early in the war, most of these probes were undertaken by Ludwig Stummel and when a combination of events raised suspicion that the security of the Naval Enigma had been compromised, he would launch an investigation. In February–March period of 1940, Patrol Boat 805 was lost in Heligoland Bight, the sinking of  which was laying naval mines in the Firth of Clyde, a particularly dangerous operation, with the submarine crew personally seen off by Karl Dönitz and the boarding of the  by British forces (Altmark incident). The U-33 operation represented a major risk for Enigma security, as the submarine was operating in an area where the seabed was only  deep, easily within reach of divers. So in relation to the U-33 incident, the Kriegsmarine failed to enforce their own rules, putting the security of the Enigma infrastructure at direct risk. Stummel considered the combination of events serious enough to launch the first investigation of the war. Although he did not conclude that a leak had occurred, the indicator for weather messages and officer-grade messages was changed to the indicator for general grade messages. The investigation lasted several weeks, with the following conclusions:
 The components of Naval Enigma were secure even if some components were lost.
 Water-soluble ink protected the most important documents.
 Solutions could only be achieved through superimposition. The Kriegsmarine incorrectly believed that the frequent changes of keys precluded this.

Sinking of 8 destroyers and the submarine U-13 
In April 1940, another probe was launched by Stummel, when eight destroyers were sunk in a Norwegian fjord, and suspicions were again raised. Karl Dönitz himself intervened in the probe, having phoned the Naval Communications Service (part of 4/SKL III), worried about the sinking of the U-boat  in May 1940, and requesting confirmation that the sinking of the submarine had effected the change in movement of a convoy that was being targeted. Admiral Erhard Maertens, the Director of Naval Communication Service, coming to the help of his subordinate, stated that four events would need to occur, which would make it highly unlikely:
 That U-boat submariners being threatened capture or destruction, had not destroyed the Enigma machinery or changed the configuration.
 That water-soluble ink would not work.
 That the enemy could detect the difference between the settings and those of the key list.
 That the British Admiralty could solve B-Dienst messages and extract the correct intelligence to enable the convoy to avoid the U-boats.

Maertens believed these events taken singly were unlikely and together impossible. In an attempt to ensure U-13 and all associated Key M infrastructure was destroyed, a bombing raid was ordered. The crew of one of the planes noticed that the site of U-13 was marked by buoys, indicating perhaps the submarine had not been salvaged, the report stated. In that case the British Admiralty had not recovered any Key M material or machinery.

Sinking in Norway

Another incident in 1940 which caused great concern in B-Dienst and the Kriegsmarine was the disappearance of the patrol boat , designated Schiff 26, a converted trawler. Julius Pickenpack was of 18 Flotilla Outpost (German: Vorpostenflotille) which was formed on 3 October 1940 and disguised as the Dutch trawler Polares. This caused immediate consternation. The investigation showed that an examination of message intercepts surfaced that:
 One message had alerted the harbourmaster of Trondheim that the patrol ship was due to arrive on the next day.
 Another message warned the trawlers to delay their arrival.

Both messages were sent an hour after British destroyers were seen in the immediate area. The report concluded that it was unlikely that the Enigma settings for June 1940 were on the two patrol vessels. Schiff 26 was indeed captured by  on 26 April 1940. A search of the vessel yielded Key M material, from a bag thrown overboard when the vessel was captured and failed to sink. This enabled GC&CS to solved the Dolphin key for six days, which was considered the first time that a Naval Enigma cipher had been broken.

1941 suspicions

In 1941, two investigations of Naval Enigma cypher security were undertaken. By March and April 1941, when Naval Code was broken, B-Dienst again started deciphering British convoy messages, and generally knew convoy locations. However, when several U-boats failed to locate an expected convoy, Dönitz suspected that the Allies had discovered the range of at least one U-boat patrol area. In April 1941, he ordered the need-to-know list to be made as small as possible. He also restricted the number of radio relay and sending stations transmitting U-boat messages. In addition, he asked the Marine Command for a special, separate U-boat Enigma key, which according to official Kriegsmarine history was the TRITON key, but according to the Historian Ralph Erskine, was an upgraded key.

The sinking of the battleship  on 27 May 1941 caused great consternation in the Kriegsmarine. Around the end of May, British Admiralty was reading Enigma messages with a delay of two to three days and was actively searching for Bismarck support shipping, and they found and sunk them. By 21 June 1941, they had sunk the tanker Belchen, the tanker  was scuttled by her crew after taking fire from  and  on 4 June, and the supply ship . Although the British Admiralty had intelligence on the location of the tanker  and the ex-Norwegian scout , they had ensured they were not sunk, to ensure that Kriegsmarine suspicions were not raised. However, the Royal Navy accidentally came across Gonzenheim and Gedania and immediately sank them on 21 June 1941.

The quick losses of ships elicited substantial fears of cipher security compromise in the Kriegsmarine and the B-Dienst. Admiral Kurt Fricke, Director of Naval War Command, undertook a thorough investigation with a number of different theses to explain the losses. The first of these was coincidence, i.e. the ships could have been spotted by a Royal Navy ship, especially in a busy area like the Bay of Biscay particularly as the Royal Navy ruled the waves at the start of the war, but was ruled out. Secondly, Admiral Fricke looked at the possibility of a spy, but evidence was lacking. Direction finding was also investigated and French agents could have tapped the Kriegsmarine telephone lines, but both were discarded, again through lack of evidence. Fricke lastly looked at the possibility of enemy cryptanalysis, which he considered the most serious.

He presumed that even with a Naval Enigma, and all the rotors, a solution was not possible without the daily keys and indicators, believing that the system was so extraordinarily difficult, that it was unthinkable. Looking at the Key M processes, evidence showed that officers and men had fulfilled their duty. Enigma documents used water-soluble ink, and the indicators were kept with radiomen, and the key lists with the officers. Believing both document types would both have to be seized and that a British vessel would have to come alongside the German ship with a boarding party and search her (which was exactly what happened on a number of occasions). He decided without stating his scope, that:

Seizure of cryptomaterial was unlikely

He came to the same verdict in every case:
 Belchen – It had been sunk by gunfire and the papers sank.
 Gonzenheim –  The crew had time to destroy Key M and papers.
 Esso Hamburg – Surprise entry was excluded.

Pure cryptanalysis was ruled out. Fricke found no palpable, unequivocal cause of the roundup and reported that:

All B-Dienst specialists had agreed that reading of German Navy messages through solution is impossible

A number of measures were taken. All orders were to be printed and all charts marked in water-soluble ink. As cipher documentation recovered at sea might have enabled the Admiralty to read cryptograms for that period that the key remained in operation, a new cue word – PERSEUS was put into operation, putting new key and uncompromised keys into effect on 22 June 1941. In August 1941 Dönitz began addressing U-boats by the names of their captains, instead of boat numbers. The method of defining meeting points in the new Short Signal Book (German:Kurzsignale) was regarded as compromised, so a method was defined by B-Dienst to disguise their positions on the Kriegsmarine German Naval Grid System (German:Gradnetzmeldeverfahren). As the grid was used by all the German Navy, senior personnel in the Third Reich hierarchy, who held the Home Waters U-boat Enigma Key, could follow submarine movements. Dönitz feared that this endangered security. Trying to limit who knew the locations of a particular submarine, Dönitz issued an edict forbidding all but a few units access to the locations of U-boats and ordered the locations be disguised by replacing the grid digraphs with substitutes for the North Atlantic. The substitutes were known only to U-boat commanders and were from Table B of the digraph substitution booklet: FLUSS or FLUSZ (English:River), which was also used to encipher indicator groups (Message key) for the Naval Enigma. Other digraph booklets existed and were used including BACH (1940), STROM (1941) and TEICH, UFER etc.

To paraphrase David Kahn
The table consisted of a 26x26 square of letter pairs with single letters at the end of each column and row. This was modified for the grid encipherment. At the top of each 26 columns, the cipher clerk wrote one of the 26 most used grid digraphs in a sequence specified by B-Dienst. The clerk replaced the grid digraph with any one of the 26 digraphs under it. The grid digraph AL might become the cipher KS, or LK or OM, or any of the other 23 digraphs 

These instructions were enciphered using Naval Enigma with Officers keys and transmitted to all U-boats in six parts totaling 504 four-letter groups on 10 September 1941, and went into effect immediately. By late September 1941, with U-boat sightings of convoys still seemingly more accident than planned, Dönitz again tightened the need-to-know circle for U-boat operations, by eliminating even the Naval Intelligence Officer (German:Marine Nachrichten Offizier) and added an additional code for positional coordinates.

Capture of U-570
In August 1941, the capture of U-boat U-570, later renamed to HMS Graph by the Admiralty, elicited an analysis by Vizeadmiral Erhard Maertens. Maertens wrote on the first page of his report: ...a current reading of our messages is not possible. However, on the next page he stated that if the British Navy had captured the submarine with the Enigma undisturbed, a current reading was possible. The last signal from U-570, he said, had probably been the attempt to notify the BdU that the crucial cipher documents had been destroyed. They could attribute all the suspicious losses of the autumn to the capabilities of British Huff-Duff. Dönitz received additional reassurance in December from a coded letter from a U-570 prisoner of war reporting proper destruction of all secret material.

1941 enquiry
In September 1941, these incidents prompted a full investigation of the Kriegsmarine Enigma's security, which was instigated by Dönitz. The investigation team analyzed a series of Admiralty intercepts and found one conspicuous (German:Auffällige) case. A decrypted British report correctly described a group of U-boats in the southern sector. The investigators found this striking (German:Besonders Auffällig), as according to Dönitz reports, the U-boats in the southern sector had not signaled their position after departure, and Kriegsmarine Command had not received any information regarding their attacks since heading south.  The Admiralty intercepts had added no cross bearing and no direction finding, so Huff-Duff direction finding did not appear to be the source of the information leading to the location of the submarine pack. However, the investigation team had discovered that another U-boat,  had signaled, and the Admiralty needed to see it, it must have been noticed and have been included in the Admiralty Situation Report. The report concluded it is unambiguously clear that that U-boat would have been announced with the one which signaled at 1209 on 2nd September (U-83). This explanation allowed the investigation team to decide it was British Huff-Duff that explained this case. The team also found two additional scenarios which could reinforce British direction-finding as the cause and tie it to the information in the Situation Report, and that involved the U-boats themselves:

...it is very possible that the U-boats...either had developed traffic among themselves or had attempted, at an inopportune time, to signal the base, without this attempt being noticed, whereas the English D/F service had succeeded nonetheless in an approximate tactical location [of the submarine].

With this, the Kriegsmarine settled for an explanation of the excellent British D/F, radar and other locating services. This belief in the superior quality of British location systems would emerge throughout these investigations into Enigma security. The outcome of these investigations often rested on the assertion that Allied cryptanalysis could only break Enigma messages using pure statistical methods, which the Allies did not use for each possible combination. Instead the Allies used the Enigma design flaws, i.e. Enigma not enciphering a letter as itself, and the operational flaws such as German salutations and built machinery, e.g. Bombes, to facilitate decoding.

Sinking of Atlantis and Python
The sinking of the  on 22 November 1941 and the supply ship  on 24 November 1941, which was sent to rescue the survivors, was considered so serious by Dönitz that it elicited an investigation to be conducted by Kurt Fricke. On 2 December 1941, Heinz Bonatz wrote

It is the third time a supply ship has been caught by the enemy at a meeting point. It is still not possible to tell from British radio messages, whether they knew about the meeting points, but the fact that there had been three interceptions is remarkable.

This was a time when B-Dienst were reading a substantial number of messages encoded by the Admiralty Naval Code. Bonatz proposed that the most recent German and British messages be analyzed to determine if German messages had been read. Over 400 survivors made it back to Germany after being rescued by U-boats, and who attested at the enquiry that none of them stated in evidence that they had been spotted by a chance aeroplane. They all attested that they had been spotted by British cruisers which appeared to know where to find them. Two months later the enquiry was complete. On 18 March 1942, Admiral Fricke stated that both the officers in charge and staff were suspicious about the loss of shipping and it could only be because of treason or a compromised cipher. However, Fricke, who believed that Key M was superior to any other countries' cipher systems, felt neither treason nor compromise were to blame. No one had broken the Key M process and an examination of all messages sent by Britain, since the beginning of the war, did not show that any Naval Enigma messages had been decoded.

1943 enquiry
The shift in the Battle of the Atlantic in 1943 against the Kriegsmarine and the U-boats  showed up in monthly statistics reports and triggered a series of security investigations, which continued through the first half of 1943, and each one cleared Naval Enigma.

U-Boat positioning
An examination of Admiralty intercepts had discovered that 6% of messages, 10 messages in total were disquieting. An analysis of the messages compared the precise position coordinates from their own message, i.e. enciphered using Naval Enigma, with the same positions in deciphered Admiralty reports.  In their emphasis on correct numbers of U-boats and their precise coordinates in the weekly Admiralty situation reports, they overlooked the convoy routing messages, and did not realize through analysis how well convoys were being routed around submarine wolfpacks. The investigative team focused on a series of Admiralty intercepts about four submarine groups which came close to reporting an actual U-boat deployment plan. The decrypted intercepts seemed to be tracking the four submarine groups: Jaguar, Delphin, Falke and Habicht. The report stated the disposition order for each group was using the TRITON Enigma key, and Admiralty intercepts showed that signals sent had used the Officer only cipher.  The report stated that Admiralty was not using Enigma to locate U-boat groups. The team believed it was the U-boat wolfpacks themselves, because they had stayed in position, in the same region of the ocean, in the same formation for several days and nights. The lack of movement along with their sending periodic signals back to HQ made them visible and vulnerable to Allied direction finding. The signals from D/F were assumed to be the source, not cryptanalysis of Enigma messages. The team decided to verify Enigma security by comparing U-boat messages sent with the ten disquieting Admiralty messages and in their examination focused on details rather than looking at the big picture. The historian R.A. Ratcliff, stated:

In accounting for the trees, they missed the forest.

One of the 10 signals was explained by blaming the compromised Italian ciphers. The Kriegsmarine blamed their own inaccuracy in measuring the position of their own submarine groups, blaming estimates, rather than accurate positioning. Such accuracy, the Marine team concluded, proved that the Admiralty had not read the specific messages from B-Dienst considered possibly vulnerable. The Admiralty had not cracked Enigma.

Partial reading of ciphers

This investigation, and the subsequent report, appeared to later post-war reviewers to be designed less to discover the Admiralty's source of information than to reinforce the sense of Enigma's invulnerability. The investigative team tried to prove that Enigma was not the leak, but failed to produce any evidence which explained the Admiralty's decrypts. The Kriegsmarine assumed that the Admiralty would be reading messages completely, within a three to five day period, i.e. that Enigma was being read via captured code-books, instead of what was truly happening: the Admiralty was bringing together many sources of information, there could sometimes be days when decrypts were not available, or messages were partially decrypted, or perhaps message decryption was delayed. Fundamental mistakes were made in their quest to identify Admiralty errors.  For example, concerning the U-boat groups Falke and Habicht on 15 January 1943, they reported that the Admiralty reported the correct number of U-boats in the first group, but had somehow forgotten three on the second day, the 16th. The report stated:

on our own side no appreciable change in the position of the U-boats was introduced between the 15th and 16th. A decrease in U-boat numbers was not introduced; on the contrary, group Habicht was increased from 6 to 9.

No one seemed to  notice that the number of U-boats missing from Falke was the same number added to Habicht and could be explained by corrupt or partial cryptanalysis.

Hundred Day Project

It came to a point that B-Dienst believed if the Government Code and Cypher School at Bletchley Park could read Enigma, they would have extensively improved their own codes and cyphers during the course of the war.

The measures so far taken would not be satisfactory (German: Nicht Genüge Tun) given an English discovery of German decipherments.

Since British code upgrades had been intermittent, B-Dienst believed that Naval Enigma was not being read. Not even the introduction of Naval Cypher No. 5 with the Stencil Subtractor system could change their mind. As a precaution, B-Dienst decided to test their Naval Enigma. Three different attempts were made. The project was called the Hundred Day Project (German: Hundert-Tage Arbeit) to try and break enciphered messages, that were originally encoded on the three rotor Naval Enigma during the Norwegian Campaign. A second attempt was made use of a a document cover (German: Aktendeckel) and pieces of signaled message. A third study requested by the OKW/Chi, the cipher bureau of the supreme command, used Frequency analysis (German: Buchstabenweisen) but each attempt failed to find a solution. Each attempt ended in failure and concluded that Key M could not be broken by cryptanalysis. These attempts tended to reassure Marine Command and Intelligence commanders. U-boat commanders were less sure. Dr Timothy Mulligan, a naval historian and expert on U-boat commanders, has concluded that the captains' increasing reluctance to signal HQ except in emergencies indicated that they believed the Key M infrastructure was compromised. Marine intelligence failed to understand this. No mechanism existed for U-boat commanders to express their concerns to senior personnel in the Kriegsmarine, as meetings either consisted of Dönitz meeting with each submarine when they returned from a mission, or informal meetings between personnel in civilian locations, e.g. cafes, that happened by chance.  The commanders could not even meet to compare notes about the voyage, Allied sightings or other movements. Their experience and general uneasiness did not receive attention by Naval Command.

Allied Radar and Metox
The Kriegsmarine believed that the Admiralty had an undisputed lead in radar detection. By the end of 1942, all U-boats had been fitted with the Metox radar detector (German:Funkmessbeobachtung, abbr. FuMB), a pioneering very sensitive high frequency radar warning receiver for Air to Surface Vessel radar transmissions from patrolling Allied aircraft. In March 1943, Karl Dönitz ordered his submarines to submerge after a positive reading from the device, expecting the U-boat to escape. Although the tactic was successful, Allied aircraft still continued to make positive contact. The Kriegsmarine decided on available evidence that the Allies had developed a new Radar, undetectable to Metox. A radioman aboard U-382 patched together a Metox receiver to a tuner which received a wider frequency spectrum above Metox. The patched gear had sounded a warning that was not received by the standard Metox. Marine Command believed this was proof of a new Allied radar and copied the radioman's device, calling it Magic Eye. However losses still mounted drastically, and B-Dienst and Kriegsmarine came to believe from expert testimony, that the Metox emitted radiation. Being a new technology it was hard to disprove. The Marine had its radar specialist attempt to locate the Metox radiation by flying detection aircraft close to active Metox on the submarine. The report indicated that radiation emissions could be detected from 500 to 2000 metres.  However, it was a complete fallacy. No Allied detector actually existed and U-boat logs frequently reported contacts would be made when the Metox device was not switched on. The real reason was that the Enigma M4 was being read by Bletchley Park cryptanalysts from December 1942, and read U-boats' locations with some delays. As with OKW/Chi cryptanalysts, B-Dienst analysts misunderstood the extent of the size of the Allies' effort to break Enigma M. In an August 1943 BdU logbook, U-boat Command noted that word had reached them from a Swiss man working in the US Navy that Naval Enigma was being read, but failed to take action.

Naval Enigma

Naval Enigma Cipher Keys

Operational evaluation

Summary

From the beginning of World War II to the Autumn 1941, the Bdu, aided by B-Dienst decipherments of radio intelligence from Allied shore stations, built up an extensive operational intelligence map of the movement of shipping and convoys, and maintained a fairly constant strategic pattern in the North Atlantic. By the end of 1941, B-Dienst knew the general rhythm of the eastbound HX and SC and the westbound ON convoys and knew the general routes they followed.

Lacking specific intelligence on a specific convoy, the Kriegsmarine was able to make an informed guess as to its probable position on any given date; easily within  in a generally north–south direction and within one day's run  along the Great circle. If ten U-boats spaced  apart were searching a specific area, the pack could sweep the area in two days, and given fair visibility, would have a fair to good chance of locating the convoy. B-Dienst had computed the areas of probable greatest convoy density, and throughout the war had from two to six submarine groups patrolling these areas. They were configured in three lines, and these changed as new intelligence dictated. In the east, the group was deployed in line running south from Iceland to the 50° parallel, somewhere near the 25° meridian and groups on this line were intended to intercept ON convoys, and hunt them to 45° W, refuel and then take up patrol in the west. In the west, the line was established on an east–west direction from North of Newfoundland to the Flemish Cap. A third line extended from the south-east tip of Greenland in a south-easterly direction to the 40° parallel; submarine groups on this line attacked both eastbound and westbound convoys.

This campaign was one of the most successful during the war, with the average monthly shipping losses and the exchange rate of merchant ships sunk per submarine reaching the highest figure. But by the middle of May 1943, U-boat attacks had become very unprofitable:

{| class="wikitable" 
|-
! colspan=5 style="background:LightSteelBlue"|Ratio of ships sunk to U-boat sinkings
|-
! style="text-align: center;background:#ccc"|Month
| style="text-align: center;background:#ccc"|No. of Ships Sunk
! style="text-align: center;background:#ccc"|No. of U-boats Sunk
! style="text-align: center;background:#ccc"|Chart Ships Sunk per Submarines Sunk
|-
| February 43
| style="text-align: center;" | 36
| style="text-align: center;" | 10
| style="text-align: center;" | 3.6
|-
| March 43
| style="text-align: center;" | 48
| style="text-align: center;" | 6
| style="text-align: center;" | 8.0
|-
| April 43
| style="text-align: center;" | 20
| style="text-align: center;" | 10
| style="text-align: center;" | 2.0
|-
| May 43
| style="text-align: center;" | 19
| style="text-align: center;" | 34
| style="text-align: center;" | 0.56
|}

Of the 60 U-boats sunk, around 27, which was half, were sunk by surface ships. The other half were sunk by land based aircraft. Three were accounted for by carrier aircraft.

Effect on the ability of U-boats to contact convoys
Annex 3 of Evaluation of the Role of Decryption Intelligence In the Operational Phase of the Battle of the Atlantic Subtitle:Wartime Achievements on Major British System referenced in Further Reading contains the raw data for the following table:

Note that, definition of contact in this instance means a convoy only being contacted once, even though several submarines may contact it. Further, definition of compromise in this instance is when X-B Intelligence was useful to BdU in contacting a convoy, whether it was used, or not.

See also
 Hut 4
 Hut 8
 OP-20-G
 Room 40
 German code breaking in World War II
 List of Allied convoys during World War II by region

References

Further reading

External links
 Christos Military and Intelligence Corner: B-Dienst Information on an educational site founded by Christos Triantafyllopoulos in 2011 to explore obscure aspects on World War II cryptography. 
 Evaluation of the Role of Decryption Intelligence In the Operational Phase of the Battle of the Atlantic Subtitle

Cryptography organizations
History of telecommunications in Germany
Signals intelligence of World War II
Research and development in Nazi Germany
Military history of Germany during World War II
Kriegsmarine
Military communications of Germany