The Enigma cipher was a field cipher used by the Germans during World War II. Enigma is one of the most famous encryption machines in history. The first Enigma machine was invented by a German engineer named Arthur Scherbius at the end of World War I. It was used commercially from the early 1920s and was also used by the military and government services of a number of countries, including Germany, before and during World War II to transmit encoded messages. Many different Enigma models have been produced, but the German military model and the German Enigma code are the most well-known and discussed.
Hacking the Enigma cipher during World War II
Some historians believe that breaking the Enigma cipher was the most important victory of the Allied powers during World War II. The Enigma machine allowed billions of message coding methods to be used, which made hacking German codes during World War II incredibly difficult for other countries. For some time, the code seemed invulnerable. Then Alan Turing and other researchers used several flaws in the implementation of the Enigma code and gained access to German code books, which allowed them to create a machine called Bombe. She helped crack the most complex versions of Enigma. Poland in 2007 issued a coin in honor of the 75th anniversary of the breaking of the Enigma cipher - 2 zlotys from northern gold. The emblem of Poland is depicted in the center, and the Enigma wheel-relay is in a circle.
The meaning of cipher hacking for allies
Some historians believe that the hacking of Enigma was the single most important victory of the Allied powers during World War II. Using the information that they deciphered from the Germans, the Allies were able to prevent many attacks. But in order to avoid suspicions that they found a way to decrypt messages, the Allies had to allow some attacks, despite the fact that they had the knowledge to stop them. This is described in the movie "The Game of Imitation", released in 2014.
Machine "Enigma": description, components
The Enigma machine consists of several parts, including a keyboard, circuit board, rotors and internal electronic circuits. Some of them have additional features. The encoded messages were a set of letters that turned into a clear sentence when decoding. Enigma machines use a form of wildcard encryption. Wildcard encryption is an easy way to encode messages, but such codes are pretty easy to break. But the Enigma machine is designed so that the right rotor advances one position immediately after pressing the enter key. Thus, encryption of letters actually begins while the rotors are in the position preceding the AAA. This is usually an AAZ position.
How the Enigma code works
A simple example of a substitution encryption scheme is Caesar's cipher. It consists in changing the place of each letter of the alphabet. For example, when shifting by 3 places, the letter A will take the place of G. But the Enigma machine code was undoubtedly much more powerful than Caesar's simple code. They use the form of wildcard ciphers, but each time the letter was matched with another, the entire encoding scheme changed. Enigma cipher options are in the photo below.
After pressing each button, the rotors move and direct the current along a different path to another open letter. Thus, for the first keystroke, one encoding is generated, and when you press the second, another. This greatly increases the number of encoding options because every time a key is pressed on the Enigma machine, the rotors rotate and the code changes.
The principle of operation of the Enigma machine
When a key is pressed on the keyboard, one or more rotors move to form a new rotor configuration that will encode one letter as another. Current flows through the machine, and one light on the lamp board lights up, which shows the output letter. An example of the Enigma cipher looked like this: if the P key is pressed, and the Enigma machine encodes this letter as A, A. will light up on the lamp panel. Each month, Enigma operators received code books that indicated which settings they would use every day.
Encryption scheme
The circuit was similar to an old-fashioned telephone patch panel, which has ten wires, with each end having two ends that can be connected to the connector. Each plug wire can connect two letters in a pair by connecting one end of the wire to the slot of one letter, and the other end to the other letter. The two letters in the pair will change, so if B is connected to G, G becomes B and B becomes G. This provides an additional level of encryption for the military.
Message Encoding
Each rotor of the machine has 2626 numbers or letters. An Enigma machine can use three rotors at a time, but they can be changed by choosing from five sets, which leads to thousands of possible configurations. The "key" to the Enigma cipher consists of several elements: rotors and their order, their initial positions and the displacement scheme. If we assume that the rotors move from left to right, and you need to encrypt the letter A, then when the letter A is encrypted, each rotor is in its original position - AAA. As the rotors move from left to right, the symbol A first goes through the third. Each rotor performs a replacement operation. Therefore, after the symbol A passes through the third, it exits as B. Now the letter B is entered through the second rotor, where it is replaced by J, and in the first J is changed to Z. After the Enigma code goes through all the rotors, he goes to the reflector and goes through another simple replacement.
The key to decrypting messages
After exiting the reflector, the message is sent through the rotors in the opposite direction, and reverse replacement is used. After that, the symbol A will turn into U. On each rotor, on the rim, there is an alphabet, so the operator can specify a certain sequence. For example, an operator can rotate the first rotor to display D, rotate the second to display K, and rotate the third slot to display P. When the initial set of three numbers or letters displayed on the machine of the sender, when he began to enter the message, the recipient can decode it by setting the initial sender settings on its identical Enigma machine.
The disadvantages of the encryption method "Enigma"
The main disadvantage of the Enigma cipher was that the letter could never be encoded as it is. In other words, A will never be encoded as A. This was a huge flaw in the Enigma code because it provided some of the information that could be used to decrypt messages. If the decoders could guess the word or phrase that is likely to appear in the message, this information would help them to figure out the code. Since the Germans always sent a weather report at the beginning and usually included a phrase with their traditional greeting at the end of the message, phrases were found that brought the decoders closer to the solution.
Alan Turing and Gordon Welchman's machine
Alan Turing and Gordon Welchman developed a machine called Bombe that used electrical circuits to decrypt Enigma encoded messages in less than 20 minutes. The Bombe machine tried to determine the rotor settings and circuitry of the Enigma machine used to send a given encoded message. The standard British Bombe machine was essentially 36 Enigma machines joined together. Thus, she simulated several Enigma machines at once.
What did the Bombe car look like?
Most Enigma machines had three rotors, and each of the Enigma simulators in Bombe had three drums, one for each rotor. The Bombe drums were color coded to match the rotor they simulated. The drums were arranged so that the top of the three simulated the left Enigma rotor, the middle imitated the middle rotor, and the lower one the right rotor. For each full rotation of the upper drums, the middle drums were increased by one position, the same thing happened with the middle and lower drums, resulting in a total number of positions of 17,576 positions of the Enigma machine with 3 rotors.
Decryption Work
For each rotor configuration, at each rotation of the reels, the Bombe machine made an assumption about setting up the circuit, for example, that A is connected to Z. If the assumption turned out to be false, the machine rejected it and no longer used it, and did not waste time checking any of these later. The Bombe machine shifted the rotor positions and selected a new assumption and repeats this process until a satisfactory arrangement of settings appears. If the machine βguessedβ that A was connected to Z, then it understood that B needed to be connected to E, and so on. If the test did not lead to a contradiction, the machine stopped and the decoder used the selected configuration as the key to the message.