In World War II, military leaders used wireless radio communication to pass military messages to troops all over the world. Unfortunately, radio messages could be intercepted. If enemy forces intercepted a message, they would have time to prepare for an attack.
To prevent the enemy from intercepting information, plans and orders were transmitted using secret codes. During World War II, the Germans invented a special machine called "Enigma" to encode their secret messages.
The Allies eventually cracked the German code, thanks to the work of Polish and British mathematicians. In the 1930s, a German traitor gave information to the Allies, which Polish cryptologists used to copy the Enigma machine and solve its letter-scrambling patterns. The Allies gave a special code name to information from decrypted Enigma messages: “ULTRA."
Cryptologists also unlocked secret Japanese codes. By 1940, the U.S. Army and Navy could read diplomatic Japanese messages between Tokyo and embassies in London, Washington, Berlin and Rome.
Sadly, these diplomatic messages did not provide specific military information, so the United States had no advance knowledge of the planned Pearl Harbor attack on December 7, 1941.
Although cryptology played a key role in World War II, it had been used for centuries before then. In ancient times when important documents and military commands were carried on foot by messenger, kings and rulers would encrypt the letters they sent to troops and allies.
This ensured that information would remain secret if the messages were intercepted or stolen. Even George Washington sent secret messages to his troops and commanders.