Tuesday, January 22, 2019

Cracking the Enigma Code: The Disproven Myth of Nazi Superiority




Until the outbreak of World War II, Hitler and the Third Reich had convinced a significant part of the German people that they were a superior race, destined to conquer and control the world. The German made Enigma Machine proved to be one of the cracks that caused their whole edifice to come crumbling down.
    As the level of technological sophistication grew after the Industrial Revolution, the role that computers played in warfare and espionage also took on a higher level of significance. The Nazi military leaders used the Enigma to send commands to commanders in the field. Since radio was the most efficient form of communications technology at the time, instructions were broadcast over the airwaves. The obvious problem is that radio transmissions could easily be intercepted and analyzed by enemy spies so that military maneuvers can be easily predicted. The Enigma Machine changed the whole game by encrypting information which could be decrypted by the officers who needed it. Supplied with a one time pad that was discarded and replaced on a monthly basis, codes were made clear for the possessor of this key while to an outside observer the codes were nothing but a meaningless jumble of random letters.
    The Enigma Machine was invented by Arthur Scherbius; originally its purpose was for the exchange of banking and business information. As Hitler rose to power and the Third Reich began the saber rattling that signaled the coming of war, he sold them the patent to be used as a tool for the military. The Nazis naively believed their new toy created codes that were impossible for the enemy to break.
    The Enigma Machine worked by sending battery-powered electrical currents through a circuit. The operator typed the code into a keyboard and each key stroke sent an electrical charge through a plug-board which was the key to the encryption; it was necessary for the sender and receiver of each command to have this part wired in exactly the same way so the encryption and decryption would be identical. With one plug out of place, the entire procedure would fail. The plug-board arrangement pattern was the key sent out to officers every month. After passing through the plug-board, the current went through three rotary scramblers which had a notch for each of the 26 letters of the alphabet. The wheels rotated to alternate letters using a polyalphabetic substitution cipher called the Vigenere Code and complicated  further with a caesar shift. Each current passed through three wheels so it would be encrypted three times using a separate alphabetic cipher each time. The wheels were set so that a letter could not possibly encrypt as itself.   Finally the current ended in a series of lamps with letters on them that provided the encrypted message which was then read over the radio to operators stationed far away. Thus the word “attack” might encrypt as “tygksh” and without the key, the patterning of frequencies would be too complex to be easily or quickly detected. The receiver of the command would type the message into their own Enigma Machine after wiring the plug-board according to their one time pad. The electrical currents would pass through the rotary scramblers and connect with a reflector placed at the rear of the machine; the reflector reversed the whole process and an easy to read message would be displayed on the lamps at the head of the device. The Enigma Machine was a hand-carried gadget with roughly the same dimensions as a medium-sized suitcase.
    Fortunately, some Polish espionage agents were able to seize an Enigma Machine. They handed it over to the Polish secret service where a mathematician and cryptanalyst named Marian Rejewski was able to replicate the Enigma and solve the puzzle of how it worked. Building one replica-Enigma was difficult enough, but figuring out how to crack the transmitted codes was an entirely different problem. Using a polyalphabetic substitution cipher with a caesar shift meant that, although the number of possible encryptions was less than infinite, there still would be enough of them to make running each one a daunting and inefficient task that would take too long to be of use. Rejewksi came up with the idea of building multiple replicas of the Enigma and running them simultaneously until a legible code was produced. An entire room full of replicas was built by assistant engineers and a computer was used to list every possible combination of plug-board arrangements. Intercepted messages were run through the battery of machines until one produced the properly decrypted command. The replicas were called Bombs because they made bomb-like ticking noises as the rotary scramblers turned. Decrypting a ciphertext took about 24 hours.
    The Polish military’s use of these Bombs worked well for a span of time. Nazi tactical maneuvers were sometimes unsuccessful but they believed this to be chance; they obviously did not know that replica Enigmas had been made as the Polish espionage agency kept this information strictly secret. Then the Nazis began adding additional rotary encryption wheels to their machines so that each Enigma had five, six, or seven scramblers instead of the older models with three. These were used more by the German navy when fighting in the Atlantic. The Polish military decided it was time to coordinate their intelligence with the British so they brought them one of their Bombs and showed them how it worked. It was taken to the highly-secretive Bletchley Park where scientists set to work on building a computer that could run more complicated ciphertexts in a shorter amount of time. Eventually they succeeded but the process took such a long time that the deciphered commands were sometimes outdated.
    Then a stroke of luck occurred. A French spy who worked as a double agent for the Aixs and the Allies, not knowing what it was he had found, passed a one time pad key to the British intelligence agents. They rewired an Enigma plug-board using the key and found it worked. The British navy then set out to intercept the keys which were distributed at the beginning of every month. They raided German weather boats stationed in the Atlantic and retrieved the one time pads. They did not want the Germans to know they were raiding the ships to get the key so they bombed and sunk each one every time they finished a siege to make it look like a routine military attack. Soon the British navy, working in coordination with the American navy, were able to attack German warships and submarines before they began their operations. The Germans still did not know that the Enigma code had been cracked and they interpreted their failures as bad luck.
    Of course, the Nazis eventually lost the war. The biggest weapon the Allied powers might have had was the fascists’ own hubris, the belief that their superior intelligence and military prowess made them invincible. Blinded by their own delusions of grandeur, the Germans, yet again, started and lost another war.

Singh, Simon. The Code Book: The Science of Secrecy from Ancient Egypt to  Quantum Cryptography. Anchor Books, 1999.

No comments:

Post a Comment