The state-of-the-then-art German Enigma machine encrypted messages for the Nazis. The Japanese had a similar machine they called Purple. The dramatic efforts of the Allies to break Enigma and the arrogant confidence of the Axis in this machine determined the course of World War II. Now, you can play with versions of these machines on your home computer!
Remember, as you read this article, that codes and cyphers are different things. A code is where one word is substituted for another or for many words. An example would be a parent referring to a trip to the doctor's as a "fun ride." The child does not know that "fun ride" is being substituted for the word "doctor." Of course, after a few "fun rides," the child will know, and either a new substitute word will have to be invented or the parents will have to learn to be parents. Cyphers and cryptography involve substituting one letter or symbol for another. For example, if I put my hands on the wrong row on the keyboard, "UnSpace" becomes "&hW0qd3″. &=U, h=n, W=S and so on. This is a simple encypherment; much more complex schemes are available. The German WehrMacht Enigma encyphers messages, and can even be used to encrypt codes. Whereas codes can be broken by repeated usage, cryptography can be broken using specialized mathematics.
The Polish Cipher Bureau, recognizing both the threat of the Nazis and the power of the Enigma encryption machine, pirated copies and began working on techniques for breaking the encryption scheme. When Germany invaded Poland, the Poles smuggled their work out to France and then to England.
British efforts at breaking Enigma were lead by a host of mathematicians, the most famous of whom was Alan Turing. Turing created a computer that was so optimized at working on the Enigma problem that it could produce results 100 times faster than a modern Pentium 4 working on the same problem.
All of this would have been for naught, had the Germans not made repeated blunders with their cryptographic system. Operator mistakes, like sending the letter "T" repeatedly in a test message or sending forms each day with identical wording, gave the British mathematicians a chance at breaking Enigma.
Protecting the cracking of Enigma was crucial. Information so gained had to be "discovered" in another way so that the Germans would never suspect the Allies could read the messages. While permitting Coventry to be bombed is the classic example, there were others. If the position of a convoy sending supplies to Rommel was found out, a "spotter plane" would overfly the convoy and report finding it. The spotter plane was often shot down, but it enabled the Allies to have an excuse to destroy the convoy. Enigma was so effective that one of the messages from Rommel to the German high command sarcastically commented that Rommel received some supplies — they washed up on shore.
The Japanese used a similar machne called "Purple," but there were added problems. The Japanese language is not written with an alphabet. Messages had to be "translated" into one or more alphabets before they could be sent. Purple was not the only form of encryption used, and it wasn't even used for much tactical data. The Japanese had another system, called Jn-25, that was more difficult to break. The Japanese used both codes and cyphers; even if a message could be decyphered, it might still have to be decrypted.
Much folklore about Roosevelt "permitting" Pearl Harbor to be bombed neglects the tenuous nature of the Japanese information decrypted and decoded. The Japanese were even known for sending messages with misinformation that would simply be ignored. In hindsight, disbelieving the Pearl Harbor messages seems unthinkable. At the time, it was simply a distrust of "mathematical warfare" and a refusal to believe such a bold attack would be attempted.
The cryptographers got their revenge. Yamamoto, who led the attack on Pearl Harbor, was killed because the Allies knew where he would be. His death put an underling in charge of the attack on Midway, and led to crucial mistakes by the Japanese navy. The attack on Midway was known in advance by the cryptographers…sort of. They knew that an attack on "AF" (codeword for some location) was coming. But where was AF?
A Japanese plane sent the symbol AF while over Midway. Was this the symbol for Midway? The Americans sent a message from Midway in a code they knew to be broken, saying that Midway was out of water. Soon, a Japanese message was intercepted saying that AF was out of water.
Nimitz gambled that the cryptographers were correct. Had Nimitz and the cryptographers been wrong, the attack might have been devastating to the United States. Instead, a prepared U.S. Navy took out so much of the Japanese fleet that the Japanese navy was reduced from offensive to a retreating defense.
If you'd like to play with the Enigma machines, there are virtual copies available on the web! One is a fully functional version of the four-rotor Wehrmacht Enigma and can be used to decrypt actual messages when it is installed on your computer. If you don't want to install a program on your computer, you can go to a Javascript version of a three-wheel Enigma machine to get a feeling for what the machine could do.
A recent Slashdot article talks about the decrypting of one of the remaining undecrypted German messages from World War II. While decrypting it will obviously not change the outcome of the war, it's helping computer scientists to learn about the capabilities of distributed computing and historians to fill in some blanks about the war. Be advised, this thread is typical Slashdot: gems of insight and information embedded in dreck and occasionally offensive garbage.
The story of Midway doesn't end with the battle. A Chicago Tribune reporter, having seen decrypted messages while on a carrier at Midway, hinted at America having broken the Japanese cyphers in a June 7th, 1942 article. While writing a paper for American History in 10th grade, I looked up the original article. The reporter was, in my opinion, very circumspect. His statements only indicated that America could read Purple if you already knew that America could read Purple. He in no way endangered the war effort.
How do I know he didn't spill the beans to the Japanese? Congress became outraged at the exposure of this secret and mounted a major investigation into how the reporter got his information. The New York Times and even the Pittsburgh papers of the day carried stories about the Congressional investigation that resulted. There went Congress blathering on about how the Chicago Tribune "revealed" secrets.
The Japanese didn't even change some of the settings on Purple until their next scheduled change. The Germans didn't even do that much. The original Chicago Tribune article might have hinted at the truth; the Congressional investigation did everything but send messages encrypted by Purple to the Japanese and Enigma to the Germans. Still, neither side was willing to believe that their "perfect" technology had been bested. Had it not been for the hubris of the Axis, the war might have lasted far longer.
How much did the ability of the Allies to decrypt Enigma and Purple and JN-25 truly affect the outcome? Historians now claim that as much as two years might have been shaved off the war. There are many arguments that Germany and Japan could not win, no matter what. They took more than they could hold, they were fighting on too many fronts, the war was propping up failing economies, and American technology (including the bomb) would make the difference.
It's a comforting thought. The Edith Keeler-caused Nazi World of Star Trek's "City on the Edge of Forever" could never have happened. The bad guys would have lost no matter what.
But I keep wondering. Germany was close to having the atomic bomb. Owing to some simple errors in physics by Heisenberg, the Germans thought they needed far more fissionables at far higher enrichment than was necessary. Given time, that error might have been discovered. Werner Von Braun and his cohorts were developing rockets at an astonishing pace. An England under Nazi rule would have made an American-led D-Day far more difficult.
Perhaps the Allies still would have won, but the cost to the world might have been many more mushroom clouds and other horrors. The question is hypothetical, because the mathematicians were able to decrypt the messages of the Axis. The next time someone asks "Who needs algebra," remember the mathematicians of World War II.