Monday, November 25, 2013

Code 56 : Enigma



The Enigma (Greek for ”riddle“) is a ciphering-machine developed in Germany by Arthur Scherbius1 in 1926. Originally Enigma was intended for civilian purposes and was sold by a company founded by Scherbius. However, near the end of the twenties, the Wehrmacht started using the Enigma for military purposes and thus it vanished from the market. It is estimated that between 30,000 and 200,0002 Enigma machines were manufactured during  World War II.
During the war, the Enigma was improved continuously, which resulted in more than 50 different versions. Nevertheless, English and Polish code-analysts managed to crack German radio messages several times, which had a great impact on the war. The Polish secret service had access to an Enigma-machine from the time when it was still commercially available. And thus, Polish mathematicians managed to reverse engineer the wiring of the Enigma, which enabled them to crack the key a few months later. The Enigma had been cracked – until the Germans started to use an Enigma-variant with a new wiring. The Polish and also the British secret service later on developed machines to ease the cracking of German radio messages. Until the end of World War II, the British employed up to 7000 people in a decoding-center. The people working at this center also tried to apply the ”Turing-Bomb“, named after the computer science pioneer Alain Turing, to decode German messages.1
Fig. 1: Enigma3


The Enigma has six main components:
•    A keyboard, similar to a typewriter
•    A light field with small lights for each letter
•    A set of rollers
•    A reflector
•    A plug-board
•    A battery

Fig. 2: Structure of the Enigma4
The plug-board contains 26 sockets, each one labeled with a letter. When a button on the keyboard is pressed, voltage is applied to the conducting path of the pressed button. This conducting path usually leads directly to the rollers, unless the previously pressed letter is connected to another letter on the plug board. In this case, the electric current would first pass this connection and then the conducting path to the rollers.
The conducting paths of each single roller are wired in an arbitrary way. The rollers can be turned and, depending on the position of the rollers, a different conducting path is created, which leads to the reflector. From there, the electric current flows back over all rollers. When voltage is applied at the end of the conducting path of Y, as seen in fig.6, the small light for Y glows, unless Y is connected to another letter on the plug-board, in which case the small light of this letter would glow (in this case Q).
It has to be known which roller belongs to which position in order to decode a message with the Enigma. The ring position, which determines the offset of the inner wiring to the carry-over to the next roller, has to be known as well. Also, the connections on the plug board have to be known. Since the rollers are turning around with different speed, depending on their position, the starting positions of the rollers also have to be known.


The Enigma violates Kerckhoff’s Principle: ”The security of a cryptosystem must not be dependent on the nondisclosure of the algorithm; it should only depend on the nondisclosure of the key.”  The security of the Enigma, however, strongly depends on the secrecy of the roller wiring, which can be seen as part of the algorithm.
The reflector allows coding and decoding with the Enigma without making any modifications to the machine. Intuitively, one could assume that the reflector increases the security as well because the voltage passes each roller two times, but this would be wrong. The reflector does not allow a letter to be mapped on itself because the voltage cannot flow backwards on the same conducting path. This property could be exploited; f an attacker knows a relatively long word from a message he just has to shift this word on the encoded text until no letter is mapped to itself. The attacker then has a good chance of finding a plaintext / encoded text pair.1


The Enigma belongs to the class of rotor-ciphers because the rollers are rotating after a button has been pressed. The Enigma would not be more secure than the Caesar cipher without this rotation of the rollers and could be easily cracked with a frequency analysis.



1 Schmeh, Klaus: "Kryptografie", dpunkt.verlag, 2007, P. 56ff
2 Bauer, Friedrich: "Entzifferte Geheimnisse", Springer, 2000, P. 117
3 SSPL / Science Museum
4 Copeland, Jack: "Enigma", Abrufdatum: 2009-01-14, P. 223


Post a Comment

Note: Only a member of this blog may post a comment.