

(This is not entirely accurate: Due to a very particular “feature” of the ENIGMA machine, the middle rotor exhibits a “double-stepping” behavior. Similarly, after 26 turns of rotor RM, rotor RL will turn one position. After 26 turns of rotor RM, a notch in it engages a stepping lever in rotor RM, thus making it turn one letter position. After a key is pressed, rotor RN turns one letter position, thus changing the wires connected to both the stator and rotor RM for the next letter to be encrypted. In this example, the letter E is translated into M. When the key E is pressed, electrical current flows from the stator, through the rotor wirings, to the reflector, and then back from the reflector, through the rotor wirings, to the lampboard. The rotors are labeled RL, RM, RN, the reflector is U, and the stator is connected to both the keyboard and the lamps. This diagram shows in simplified form a three-rotor ENIGMA.

The following figure illustrates the encryption of one character by the ENIGMA machine. The letters on the face of the rotor are on a movable ring, whose position relative to the starting position of the rotor can be changed by disengaging the ring’s catch (not shown), sliding the ring on the rotor, and engaging the catch to fix the ring. The teeth shown in the top photograph allow turning the rotor one letter position in a manner to be explained shortly. The notches on the flange protruding from the rotor can be “pushed” manually to set the starting position of the rotor. On the surface of the right side, there is a circle of 26 spring contacts, while on the surface of the left side there is a circle of 26 plate contacts. The top photograph shows the right side of the rotor. The bottom photograph shows the left side of a rotor when viewed in such a way that the letters on it are right-side up. The following figure shows the views of the two sides of a typical ENIGMA rotor. To understand the operation of ENIGMA, one must be familiar with its fundamental components, namely the rotors. The plugboard was a later addition to the machine to provide one more encryption step by associating pairs of letters. It consists of a typewriter, a set of lamps labeled with letters in front of the typewriter keys, a set of rotors (partially hidden by the cover) in front of the lamps, and a plugboard on the front vertical wall of the box. The ENIGMA machine, shown in the figure below with its cover closed, is a rotor crypto-machine.
JAVA ENIGMA SIMULATOR SIMULATOR
Weierud have edited and put available the document “Turing’s Treatise on Enigma” from the original documents in the National Archives.) This article deals with the development of a simulator of the ENIGMA machine. For technical details on the breaking of the code, the master himself is the source: on the world-wide web, R. Battle of Wits: The Complete Story of Codebreaking in World War II. The Hut Six Story: Breaking the Enigma Codes. New York: Academic Press, 1980, and the following books (to name a few): Welchman, G. A History of Computing in the Twentieth Century. (The interested reader is referred to the book by Bauer, the chapter titled “The COLOSSUS” by B. It is beyond the scope of this article to recount the fascinating history of the codebreaking of ENIGMA.
JAVA ENIGMA SIMULATOR CODE
The machine is also famous because the British cryptographers at Bletchley Park, most notably Alan Mathison Turing, were able to crack the ENIGMA code (with substantial initial help from Polish mathematicians who had been given an ENIGMA machine). There were commercial and military versions of this machine, which is famous for having been used by the German armed forces (Wehrmacht, Kriegsmarine, and Luftwaffe) and by the intelligence service (Abwehr) during World War II. The ENIGMA enciphering/deciphering machine was patented in Holland in the fall of 1919 by Hugo Koch, who sold the patent to the German engineer Arthur Scherbius, who in turn filed for a patent in 1926 (US patent number 1,584,660). Part of the presentation and the figures are from Bauer, F.L., Decrypted Secrets, pp. NOTE: This article is adapted from Chapter 12 of my unpublished textbook Applied Algorithms and Data Structures.
