Code Security ?

by Brucepat

If the U. S had broken the Japanese code before the battle of Midway ,and the British had cracked the enigma code machine from a captured U -boat,did anybody in the Axis command structure consider changing the codes ? Wouldn’t this have been basic signal security ?

TeaKew

Sure - if you know that your enemy have broken your codes, then changing them is a pretty important signal security step. However, there are several important details in that statement which can make it much less binary than it would appear. The following discussion will focus on Germany and Enigma.

The first question, of course, is "how do you know?" There are a lot of things going on in World War II, so it's very difficult to become certain that the enemy have broken your codes. You're just trying to work out if "they have broken our ciphers" is the most likely explanation for the events you're seeing, which can be remarkably tricky. In addition, replacing your entire cipher infrastructure is a phenomenal amount of work.

Going into WWII, the prevailing view was that Enigma style cipher systems were effectively unbreakable. In hindsight, we can see how a number of apparent security features in Enigma were actually fatal weaknesses, but most of these would not have been obvious to German command. This confidence in their security generally meant that potential breaches were disregarded, since there were nearly always alternative explanations available.

Of course, it's also worth noting that German High Command wasn't a single entity. Multiple branches used various encryption systems and they did so in a variety of ways. Notably, some parts of the Navy did begin to suspect that there might be issues with the security of Enigma. This lead to the creation of the M4 Enigma machine in 1943, which involved an additional rotor wheel and significantly increased the difficulty of cryptanalysis. However, this new innovation was not adopted by other parts of the German armed forces.

From the Allied perspective, handling intelligence from breaking Enigma etc can be likened to playing a game of poker when your opponent is sitting in front of a mirror. Sure, you can easily see all their cards - but if you make it too obvious, then they'll change seats and you lose your information. However, if you don't use any of the knowledge, then how does it even benefit you? The answer is to strike a balance - avoiding just enough of their bluffs and making just enough of your own to comfortably win, but without any individual play looking like more than normal luck/skill.

This is precisely how the Allies attempted to use their Ultra/Magic knowledge (these classifications denoted intelligence gained from breaking Enigma and comparable high-level ciphers). They refused to use it unless the advantage gained would outweigh the risks of compromising their source. While there were undoubtedly cases where a much more dramatic short term result could have been achieved, in the long term the steady and cautious approach preserved their advantage well after the end of the war.

One key aspect of this was the use of obfuscation activities. For example, after an Enigma decrypt identified the location of a U-boat, there might 'coincidentally' be an overflight from a reconnaissance plane before any attack was launched. That overflight would then be reported back by the U-boat, at which point its destruction by a passing destroyer would be considered perfectly explicable by the German command. Through tricks like this, the apparent chance of the Allies breaking Enigma could be significantly reduced.

Ultra/Magic intelligence also played an important role in more direct deception activities. Operation Mincemeat is a famous example, where a corpse bearing fake invasion plans was planted for discovery. After the fake plans were handed to the Germans, the Allies were able to use decrypted transmissions in order to work out whether the ruse was believed. This sort of indirect use is far harder for the Germans to detect, since the results are entirely indistinguishable from an effectively devised false attack.

Even if you do conclude that your cipher system is broken, it's also important to bear in mind the logistical difficulties of replacing your entire cipher system in the middle of the largest war in the history of the world. Designing a good cipher system is a really hard problem which ideally wants extensive testing and research - none of which were things the Axis had an abundance of time for. There's also no guarantee that they would have produced something better - one hallmark of hurried cryptography is normally that it's of dubious quality.

However, even if you do invent a new 'perfect' Enigma, your next problem is deploying it. You now need to build thousands of elaborate intricate machines in perfect secrecy and distribute them to the front lines of a war that's being fought on multiple continents. How do you get them to every U-boat, for example? If this problem isn't properly solved, then your existing weaker systems provide a lever that can be used to crack open your new machine, through the use of 'kisses' - where the same plaintext message has been sent on multiple cipher networks. Even when the Germans did make attempts to upgrade the security of some networks, these methods were used in practice to help circumvent their developments.

Finally, of course, it's worth noting that throughout the duration of the war the Germans made a number of steps to improve the security of their cipher systems. I've already touched on the Naval Enigma M4 from 1943 above. Perhaps the most dramatic example is the 'Lorenz' cipher machine, which was significantly more secure than Enigma and required the invention of the computer to break in a timely fashion. However, these required specific hardware and were much more involved to manufacture and operate, restricting their availability for widespread deployment.

In summary, changing the cipher systems used would have been an excellent step for Axis signal security. However, the Allies took great pains to avoid revealing the extent of their attacks on Axis communications, and the logistical impacts of attempting to fully replace the cipher system mid-war would have been extremely difficult.

Most of the information in this post is drawn from Ratcliff, Delusions of Intelligence: Enigma, Ultra, And the End of Secure Ciphers, CUP 2008, 9780521736626. I highly recommend it for a deep dive into WWII signals intelligence, looking both at the Allied successes and also the German failures.