Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Enigma machine
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Design == [[File:Bundesarchiv Bild 183-2007-0705-502, Chiffriermaschine "Enigma".jpg|thumb|upright|Enigma in use, 1943]] Like other rotor machines, the Enigma machine is a combination of mechanical and electrical subsystems. The mechanical subsystem consists of a [[alphanumeric keyboard|keyboard]]; a set of rotating disks called ''rotors'' arranged adjacently along a [[axle|spindle]]; one of various stepping components to turn at least one rotor with each key press, and a series of lamps, one for each letter. These design features are the reason that the Enigma machine was originally referred to as the rotor-based cipher machine during its intellectual inception in 1915.<ref name="Enigma History">{{Cite web|title=Enigma History|url=https://www.cryptomuseum.com/crypto/enigma/hist.htm|access-date=2020-12-16|website=cryptomuseum.com}}</ref> === Electrical pathway === [[File:Enigma wiring kleur.svg|thumb|left|upright=1.3|Enigma wiring diagram with arrows and the numbers 1 to 9 showing how current flows from key depression to a lamp being lit. The ''A'' key is encoded to the ''D'' lamp. D yields A, but A never yields A; this property was due to a patented feature unique to the Enigmas, and could be exploited by cryptanalysts in some situations.]] An electrical pathway is a route for current to travel. By manipulating this phenomenon the Enigma machine was able to scramble messages.<ref name="Enigma History"/> The mechanical parts act by forming a varying [[electrical network|electrical circuit]]. When a key is pressed, one or more rotors rotate on the spindle. On the sides of the rotors are a series of electrical contacts that, after rotation, line up with contacts on the other rotors or fixed wiring on either end of the spindle. When the rotors are properly aligned, each key on the keyboard is connected to a unique electrical pathway through the series of contacts and internal wiring. Current, typically from a battery, flows through the pressed key, into the newly configured set of circuits and back out again, ultimately lighting one display [[Electric light|lamp]], which shows the output letter. For example, when encrypting a message starting ''ANX...'', the operator would first press the ''A'' key, and the ''Z'' lamp might light, so ''Z'' would be the first letter of the [[ciphertext]]. The operator would next press ''N'', and then ''X'' in the same fashion, and so on. [[File:Enigma-action.svg|thumb|upright|The scrambling action of Enigma's rotors is shown for two consecutive letters with the right-hand rotor moving one position between them.]] Current flows from the battery (1) through a depressed bi-directional keyboard switch (2) to the plugboard (3). Next, it passes through the (unused in this instance, so shown closed) plug "A" (3) via the entry wheel (4), through the wiring of the three (Wehrmacht Enigma) or four (''[[Kriegsmarine]]'' M4 and ''Abwehr'' variants) installed rotors (5), and enters the reflector (6). The reflector returns the current, via an entirely different path, back through the rotors (5) and entry wheel (4), proceeding through plug "S" (7) connected with a cable (8) to plug "D", and another bi-directional switch (9) to light the appropriate lamp.<ref name="Rijmenants">Rijmenants, Dirk; [https://www.ciphermachinesandcryptology.com/en/enigmatech.htm Technical details of the Enigma machine] Cipher Machines & Cryptology</ref> The repeated changes of electrical path through an Enigma scrambler implement a [[polyalphabetic cipher|polyalphabetic substitution cipher]] that provides Enigma's security. The diagram on the right shows how the electrical pathway changes with each key depression, which causes rotation of at least the right-hand rotor. Current passes into the set of rotors, into and back out of the reflector, and out through the rotors again. The greyed-out lines are other possible paths within each rotor; these are hard-wired from one side of each rotor to the other. The letter ''A'' encrypts differently with consecutive key presses, first to ''G'', and then to ''C''. This is because the right-hand rotor steps (rotates one position) on each key press, sending the signal on a completely different route. Eventually other rotors step with a key press. === Rotors === [[File:Enigma rotors with alphabet rings.jpg|thumb|Enigma rotor assembly. In the Enigma I, three movable rotors are sandwiched between two fixed wheels: the entry wheel, on the right, and the reflector on the left.]] {{Main|Enigma rotor details}} The rotors (alternatively ''wheels'' or ''drums'', ''Walzen'' in German) form the heart of an Enigma machine. Each rotor is a disc approximately {{convert|10|cm|in|abbr=on}} in diameter made from [[Ebonite]] or [[Bakelite]] with 26 [[brass]], spring-loaded, [[electrical contact]] pins arranged in a circle on one face, with the other face housing 26 corresponding electrical contacts in the form of circular plates. The pins and contacts represent the [[alphabet]] — typically the 26 letters A–Z, as will be assumed for the rest of this description. When the rotors are mounted side by side on the spindle, the pins of one rotor rest against the plate contacts of the neighbouring rotor, forming an electrical connection. Inside the body of the rotor, 26 wires connect each pin on one side to a contact on the other in a complex pattern. Most of the rotors are identified by Roman numerals, and each issued copy of rotor I, for instance, is wired identically to all others. The same is true for the special thin beta and gamma rotors used in the [[Enigma-M4|M4]] naval variant. [[File:enigma-rotors.jpg|thumb|left|Three Enigma rotors and the shaft, on which they are placed when in use]] By itself, a rotor performs only a very simple type of [[encryption]], a simple [[substitution cipher]]. For example, the pin corresponding to the letter ''E'' might be wired to the contact for letter ''T'' on the opposite face, and so on. Enigma's security comes from using several rotors in series (usually three or four) and the regular stepping movement of the rotors, thus implementing a polyalphabetic substitution cipher. Each rotor can be set to one of 26 starting positions when placed in an Enigma machine. After insertion, a rotor can be turned to the correct position by hand, using the grooved finger-wheel which protrudes from the internal Enigma cover when closed. In order for the operator to know the rotor's position, each has an ''alphabet tyre'' (or letter ring) attached to the outside of the rotor disc, with 26 characters (typically letters); one of these is visible through the window for that slot in the cover, thus indicating the rotational position of the rotor. In early models, the alphabet ring was fixed to the rotor disc. A later improvement was the ability to adjust the alphabet ring relative to the rotor disc. The position of the ring was known as the ''Ringstellung'' ("ring setting"), and that setting was a part of the initial setup needed prior to an operating session. In modern terms it was a part of the [[initialization vector]]. [[File:Enigma rotors and spindle showing contacts rachet and notch.jpg|thumb|left|Two Enigma rotors showing electrical contacts, stepping ratchet (on the left) and notch (on the right-hand rotor opposite '''D''')]] Each rotor contains one or more notches that control rotor stepping. In the military variants, the notches are located on the alphabet ring. The Army and Air Force Enigmas were used with several rotors, initially three. On 15 December 1938, this changed to five, from which three were chosen for a given session. Rotors were marked with [[Roman numerals]] to distinguish them: I, II, III, IV and V, all with single turnover notches located at different points on the alphabet ring. This variation was probably intended as a security measure, but ultimately allowed the Polish [[Clock (cryptography)|Clock Method]] and British [[Banburismus]] attacks. The Naval version of the ''[[Wehrmacht]]'' Enigma had always been issued with more rotors than the other services: At first six, then seven, and finally eight. The additional rotors were marked VI, VII and VIII, all with different wiring, and had two notches, resulting in more frequent turnover. The four-rotor Naval Enigma (M4) machine accommodated an extra rotor in the same space as the three-rotor version. This was accomplished by replacing the original reflector with a thinner one and by adding a thin fourth rotor. That fourth rotor was one of two types, ''Beta'' or ''Gamma'', and never stepped, but could be manually set to any of 26 positions. One of the 26 made the machine perform identically to the three-rotor machine. === Stepping === To avoid merely implementing a simple (solvable) substitution cipher, every key press caused one or more rotors to step by one twenty-sixth of a full rotation, before the electrical connections were made. This changed the substitution alphabet used for encryption, ensuring that the cryptographic substitution was different at each new rotor position, producing a more formidable polyalphabetic substitution cipher. The stepping mechanism varied slightly from model to model. The right-hand rotor stepped once with each keystroke, and other rotors stepped less frequently. === Turnover === [[File:Enigma ratchet.png|thumb|The Enigma stepping motion seen from the side away from the operator. All three ratchet pawls (green) push in unison as a key is depressed. For the first rotor (1), which to the operator is the right-hand rotor, the ratchet (red) is always engaged, and steps with each keypress. Here, the middle rotor (2) is engaged, because the notch in the first rotor is aligned with the pawl; it will step (''turn over'') with the first rotor. The third rotor (3) is not engaged, because the notch in the second rotor is not aligned to the pawl, so it will not engage with the rachet.]] The advancement of a rotor other than the left-hand one was called a ''turnover'' by the British. This was achieved by a [[Ratchet (device)|ratchet and pawl]] mechanism. Each rotor had a ratchet with 26 teeth and every time a key was pressed, the set of spring-loaded pawls moved forward in unison, trying to engage with a ratchet. The alphabet ring of the rotor to the right normally prevented this. As this ring rotated with its rotor, a notch machined into it would eventually align itself with the pawl, allowing it to engage with the ratchet, and advance the rotor on its left. The right-hand pawl, having no rotor and ring to its right, stepped its rotor with every key depression.<ref name="doublestepping" /> For a single-notch rotor in the right-hand position, the middle rotor stepped once for every 26 steps of the right-hand rotor. Similarly for rotors two and three. For a two-notch rotor, the rotor to its left would turn over twice for each rotation. The first five rotors to be introduced (I–V) contained one notch each, while the additional naval rotors VI, VII and VIII each had two notches. The position of the notch on each rotor was determined by the letter ring which could be adjusted in relation to the core containing the interconnections. The points on the rings at which they caused the next wheel to move were as follows.<ref>{{cite web| last=Sale|first=Tony|author-link=Tony Sale|title=Technical specifications of the Enigma rotors| work=Technical Specification of the Enigma|url=http://www.codesandciphers.org.uk/enigma/rotorspec.htm|access-date=15 November 2009}}</ref> {|class="wikitable" style="margin: 1em auto 1em auto" |+Position of turnover notches |- ! style="width:130pt;"| Rotor ! style="width:130pt;"| Turnover position(s) ! style="width:130pt;"| BP mnemonic |- style="text-align:center;" | |I|| style="text-align:center;"|R|| style="text-align:center;"|Royal |- style="text-align:center;" | |II|| style="text-align:center;"|F|| style="text-align:center;"|Flags |- style="text-align:center;" | |III|| style="text-align:center;"|W|| style="text-align:center;"|Wave |- style="text-align:center;" | |IV|| style="text-align:center;"|K|| style="text-align:center;"|Kings |- style="text-align:center;" | |V|| style="text-align:center;"|A|| style="text-align:center;"|Above |- | style="text-align:center;"|VI, VII and VIII|| style="text-align:center;"|A and N||| |} The design also included a feature known as ''double-stepping''. This occurred when each pawl aligned with both the ratchet of its rotor and the rotating notched ring of the neighbouring rotor. If a pawl engaged with a ratchet through alignment with a notch, as it moved forward it pushed against both the ratchet and the notch, advancing both rotors. In a three-rotor machine, double-stepping affected rotor two only. If, in moving forward, the ratchet of rotor three was engaged, rotor two would move again on the subsequent keystroke, resulting in two consecutive steps. Rotor two also pushes rotor one forward after 26 steps, but since rotor one moves forward with every keystroke anyway, there is no double-stepping.<ref name="doublestepping">{{cite journal |first=David |last=Hamer |title=Enigma: Actions Involved in the 'Double-Stepping' of the Middle Rotor |journal=Cryptologia |volume=21 |issue=1 |date=January 1997 |pages=47–50 |url=http://www.eclipse.net/~dhamer/downloads/rotorpdf.zip |archive-date=19 July 2011 |archive-url=https://web.archive.org/web/20110719081659/http://www.eclipse.net/~dhamer/downloads/rotorpdf.zip |format=zip |doi=10.1080/0161-119791885779|url-access=subscription }}</ref> This double-stepping caused the rotors to deviate from [[odometer]]-style regular motion. <!-- {| |- | ADM |- | ADN |- | ADO |- | ADP |- | ADQ |- | AER |- | AFS |- | AFT |- | AFU |} --> With three wheels and only single notches in the first and second wheels, the machine had a period of 26×25×26 = 16,900 (not 26×26×26, because of double-stepping).<ref name="doublestepping" /> Historically, messages were limited to a few hundred letters, and so there was no chance of repeating any combined rotor position during a single session, denying cryptanalysts valuable clues. To make room for the Naval fourth rotors, the reflector was made much thinner. The fourth rotor fitted into the space made available. No other changes were made, which eased the changeover. Since there were only three pawls, the fourth rotor never stepped, but could be manually set into one of 26 possible positions. A device that was designed, but not implemented before the war's end, was the ''Lückenfüllerwalze'' (gap-fill wheel) that implemented irregular stepping. It allowed field configuration of notches in all 26 positions. If the number of notches was a [[Coprime integers|relative prime]] of 26 and the number of notches were different for each wheel, the stepping would be more unpredictable. Like the Umkehrwalze-D it also allowed the internal wiring to be reconfigured.<ref>{{cite web|url=http://www.cryptomuseum.com/crypto/enigma/lf/index.htm |title=Lückenfüllerwalze |publisher=Cryptomuseum.com |access-date=17 July 2012}}</ref>{{Clear}} === Entry wheel === The current entry wheel (''Eintrittswalze'' in German), or entry [[stator]], connects the [[plugboard]] to the rotor assembly. If the plugboard is not present, the entry wheel instead connects the keyboard and lampboard to the rotor assembly. While the exact wiring used is of comparatively little importance to security, it proved an obstacle to Rejewski's progress during his study of the rotor wirings. The commercial Enigma connects the keys in the order of their sequence on a [[QWERTZ]] keyboard: ''Q''→''A'', ''W''→''B'', ''E''→''C'' and so on. The military Enigma connects them in straight alphabetical order: ''A''→''A'', ''B''→''B'', ''C''→''C'', and so on. It took inspired guesswork for Rejewski to penetrate the modification. === Reflector === [[File:Enigma insides.agr.jpg|thumb|left|Internal mechanism of an Enigma machine showing the type B reflector and rotor stack]] With the exception of models ''A'' and ''B'', the last rotor came before a 'reflector' (German: ''Umkehrwalze'', meaning 'reversal rotor'), a patented feature<ref name="Korn"/> unique to Enigma among the period's various rotor machines. The reflector connected outputs of the last rotor in pairs, redirecting current back through the rotors by a different route. The reflector ensured that Enigma would be [[Involution (mathematics)|self-reciprocal]]; thus, with two identically configured machines, a message could be encrypted on one and decrypted on the other, without the need for a bulky mechanism to switch between encryption and decryption modes. The reflector allowed a more compact design, but it also gave Enigma the property that no letter ever encrypted to itself. This was a severe cryptological flaw that was subsequently exploited by codebreakers. In Model 'C', the reflector could be inserted in one of two different positions. In Model 'D', the reflector could be set in 26 possible positions, although it did not move during encryption. In the ''Abwehr'' Enigma, the reflector stepped during encryption in a manner similar to the other wheels. In the German Army and Air Force Enigma, the reflector was fixed and did not rotate; there were four versions. The original version was marked 'A',{{sfn|Marks|Weierud|2000}} and was replaced by ''Umkehrwalze B'' on 1 November 1937. A third version, ''Umkehrwalze C'' was used briefly in 1940, possibly by mistake, and was solved by [[Hut 6]].{{sfn|Marks|2001|pp=101–141}} The fourth version, first observed on 2 January 1944, had a rewireable reflector, called ''Umkehrwalze D'', nick-named Uncle Dick by the British, allowing the Enigma operator to alter the connections as part of the key settings.{{Clear}} === Plugboard === [[File:Enigma-plugboard.jpg|right|thumb|The plugboard (''Steckerbrett'') was positioned at the front of the machine, below the keys. When in use during World War II, there were ten connections. In this photograph, just two pairs of letters have been swapped (A↔J and S↔O).]] The plugboard (''Steckerbrett'' in German) permitted variable wiring that could be reconfigured by the operator. It was introduced on German Army versions in 1928,<ref>Craig P. Bauer: ''Secret History – The Story of Cryptology''. CRC Press, Boca Raton 2013, p. 248. ISBN 978-1-4665-6186-1.</ref> and was soon adopted by the ''[[Reichsmarine]]'' (German Navy). The plugboard contributed more cryptographic strength than an extra rotor, as it had 150 trillion possible settings (see below).<ref name="158,962,555,217,826,360,000">{{Cite news|last1=Van Manen|first1=Dirk-Jan|last2=Johan O. A.|first2=Robertsson|date=2016|title=Codes and Ciphers|work=Geo ExPro|url=https://geoexpro.com/codes-and-ciphers-part-i/|access-date=October 13, 2023}}</ref> Enigma without a plugboard (known as ''unsteckered Enigma'') could be solved relatively straightforwardly using hand methods; these techniques were generally defeated by the plugboard, driving Allied cryptanalysts to develop special machines to solve it. A cable placed onto the plugboard connected letters in pairs; for example, ''E'' and ''Q'' might be a steckered pair. The effect was to swap those letters before and after the main rotor scrambling unit. For example, when an operator pressed ''E'', the signal was diverted to ''Q'' before entering the rotors. Up to 13 steckered pairs might be used at one time, although only 10 were normally used. Current flowed from the keyboard through the plugboard, and proceeded to the entry-rotor or ''Eintrittswalze''. Each letter on the plugboard had two jacks. Inserting a plug disconnected the upper jack (from the keyboard) and the lower jack (to the entry-rotor) of that letter. The plug at the other end of the crosswired cable was inserted into another letter's jacks, thus switching the connections of the two letters. === Accessories === [[File:Enigma-printer-2.jpg|thumb|The ''Schreibmax'' was a printing unit which could be attached to the Enigma, removing the need for laboriously writing down the letters indicated on the light panel.]] Other features made various Enigma machines more secure or more convenient.<ref>{{cite web |last=Reuvers |first=Paul |title=Enigma accessories |year=2008 |url=http://www.jproc.ca/crypto/enigma_acc.html |access-date=22 July 2010}}</ref> ==== ''Schreibmax'' ==== Some M4 Enigmas used the ''Schreibmax'', a small [[Printer (computing)|printer]] that could print the 26 letters on a narrow paper ribbon. This eliminated the need for a second operator to read the lamps and transcribe the letters. The ''Schreibmax'' was placed on top of the Enigma machine and was connected to the lamp panel. To install the printer, the lamp cover and light bulbs had to be removed. It improved both convenience and operational security; the printer could be installed remotely such that the signal officer operating the machine no longer had to see the decrypted [[plaintext]]. ==== ''Fernlesegerät'' ==== Another accessory was the remote lamp panel ''Fernlesegerät''. For machines equipped with the extra panel, the wooden case of the Enigma was wider and could store the extra panel. A lamp panel version could be connected afterwards, but that required, as with the ''Schreibmax'', that the lamp panel and light bulbs be removed.<ref name="Rijmenants" /> The remote panel made it possible for a person to read the decrypted plaintext without the operator seeing it. ==== ''Uhr'' ==== [[File:Enigma-uhr-box.jpg|right|thumb|upright|The Enigma Uhr attachment]] In 1944, the ''Luftwaffe'' introduced a plugboard switch, called the ''Uhr'' (clock), a small box containing a switch with 40 positions. It replaced the standard plugs. After connecting the plugs, as determined in the daily key sheet, the operator turned the switch into one of the 40 positions, each producing a different combination of plug wiring. Most of these plug connections were, unlike the default plugs, not pair-wise.<ref name="Rijmenants" /> In one switch position, the ''Uhr'' did not swap letters, but simply emulated the 13 stecker wires with plugs. === Mathematical analysis === The Enigma transformation for each letter can be specified mathematically as a product of [[permutation]]s.{{sfn|Rejewski|1980}} Assuming a three-rotor German Army/Air Force Enigma, let {{mvar|P}} denote the plugboard transformation, {{mvar|U}} denote that of the reflector (<math>U=U^{-1}</math>), and {{mvar|L}}, {{mvar|M}}, {{mvar|R}} denote those of the left, middle and right rotors respectively. Then the encryption {{mvar|E}} can be expressed as :<math>E=PRMLUL^{-1}M^{-1}R^{-1}P^{-1}.</math> After each key press, the rotors turn, changing the transformation. For example, if the right-hand rotor {{mvar|R}} is rotated {{mvar|n}} positions, the transformation becomes :<math>\rho^nR\rho^{-n},</math> where {{mvar|ρ}} is the [[cyclic permutation]] mapping A to B, B to C, and so forth. Similarly, the middle and left-hand rotors can be represented as {{mvar|j}} and {{mvar|k}} rotations of {{mvar|M}} and {{mvar|L}}. The encryption transformation can then be described as :<math>E=P\left(\rho^n R\rho^{-n}\right)\left(\rho^j M\rho^{-j}\right)\left(\rho^{k}L\rho^{-k}\right)U\left(\rho^kL^{-1}\rho^{-k}\right)\left(\rho^j M^{-1}\rho^{-j}\right)\left(\rho^n R^{-1}\rho^{-n}\right)P^{-1}.</math> Combining three rotors from a set of five, each of the 3 rotor settings with 26 positions, and the plugboard with ten pairs of letters connected, the military Enigma has 158,962,555,217,826,360,000 different settings (nearly 159 [[Names of large numbers|quintillion]] or about 67 [[bit]]s).<ref name="158,962,555,217,826,360,000"/> * Choose 3 rotors from a set of 5 rotors = 5 x 4 x 3 = 60 * 26 positions per rotor = 26 x 26 x 26 = 17,576 * Plugboard = 26! / ( 6! x 10! x 2^10) = 150,738,274,937,250 * Multiply each of the above = 158,962,555,217,826,360,000
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)