Deutsch   |  • English


Choose a simulation ...
-upd-  Universal Enigma  (v2.6.2 EN)
17 models | custom mode | Uhr; UKW-D

Start=>  enigma-u_v262_en.html
Swedish Enigma B  (v2.6.1 EN)
SGS, 1925 | s/n A-133 | 28-position wheels

Start=>  enigma-a133_v261_en.html
-upd-  Enigma Z30  (v2.6.2/b EN)
"Numbers Enigma" (1930) | 2 models

Start=>  enigma-z_v262b_en.html
————— Legacy versions —————
Universal Enigma  (v2.5 EN)
14 models | custom mode | Uhr; UKW-D
Start=>  enigma-u_v25_en.html
——————— Tools ———————
[ Coming soon…]

Enigma simulation in Javascript/HTML

by Daniel Palloks

 

The Enigma machine

The Enigma is probably the most famous electromechanical encryption device (or rather, series of devices). It was used to a great extent by Germany during World War II. The successful reverse engineering of the machine in Poland and the codebreaking efforts at Bletchley Park (UK) involving thousands of people, among them several ingenious mathematicians, have become legend.

Modus operandi

Enigma operates as a rotor machine to achieve polyalphabetic substitution. This means the letter substitution scheme is not fixed but changes with the propagation of Enigma's rotating ciphering wheels and thus, with the letter's position in a text. The wheels advance stepwise with every keystroke, thereby triggering, in some positions, the adjacent wheel to the left to perform a step as well, pretty much as in a mechanical counter. Inside a wheel each letter position is biuniquely rendered to another position through a fixed set of wires. By combining and rotating the wheels, however, a very complex substitution code is obtained. Furthermore, the inner wiring as a whole can be rotated against the outer position indicator ring and, more importantly, against the trigger notches (this is known as "ring setting"). In some models, pairs of letters can be additionally swapped by interconnecting plugs ("stecker") on a plugboard via cables.

Towards the end of WWII, a special rewirable reflector wheel (UKW-D) was introduced, as was an external device called Enigma-Uhr, or Stecker-Uhr. The latter allowed for the stecker connections' in- and outputs to be scrambled in complex, non-reciprocal patterns. The Uhr thus acted on the stecker I/Os very much like a settable but non-rotating cipher wheel.

Signal routing

Enigmas are equipped with a typewriter-like keyboard for input, while output is shown on a lampboard that in its layout resembles the keyboard. With every keystroke, the signal is routed first through the plugboard (if present), then through the fixed entry wheel and the rotor set, arriving at the reflector wheel. From there it is sent back on a different path – but with all rotor positions still the same – through the rotors, the entry wheel and again the plugboard until it reaches the lampboard where it lights the bulb corresponding to the substitute letter. A letter was therefore never encoded to itself, which would prove to be Enigma's most serious weakness. The symmetrized signal path and the resulting symmetric encryption however make it possible to decipher a message using the same machine setting it was encrypted with.

Meet the family

There was a variety of Enigma models available for civilian and military use, as well as for export. Even within a model line there were sometimes variants with altered specifiations. An "Enigma family tree" can be found in the Links section.
The best-known models today are Enigmas I ("Service Enigma"), M3 ("Naval Enigma"), M4 ("Shark") and G ("Abwehr Enigma").

Enigmas I and M3 had three rotor wheels, and fixed entry wheel (ETW) and reflector (RFL / German: UKW). They were used by the German Army including, in the case of the M3, the Navy with the exception of the submarine fleet. The latter used the more advanced M4, with an additional settable (non-rotating) wheel, called Greek wheel, in combination with a thinner reflector – a setup that in default configuration was "backward compatible" to the I/M3. – All models of this "M-line" (comprising among others the Norwegian Enigma N and the "Sonder-Enigma" used by the Military Office) were also equipped with a plugboard.

Aside from the military line, a commercial line of Enigmas was established and successfully marketed to businesses and for export. These models basically had the same design as the M-line, but no plugboard, and were instead equipped with a settable (but non-rotating) reflector. The commercial line originated in the Enigma D (later named Enigma K) and some well-documented models are the "Swiss-K", the Railway Enigma ("Rocket"), the Japanese "Tirpitz" and the special Enigma KD with rewirable UKW-D reflector, which was used by the German Military Office.

In contrast to the other models, the Abwehr Enigma G, a technical gem used mainly by German counter-intelligence, was powered by a cogwheel-gear drive rather than a lever mechanism. Furthermore, it had a rotating reflector/UKW and wheels with multiple notches, but no plugboard. A predecessor of Enigma G was the "Zählwerk-Enigma" (A28), which was a commercial machine.

Last not least, there were also custom-built models, such as a Swedish machine with 28-position rotors, and more exotic ones, like Enigma Z (Z30, "Numbers Enigma"), which had rotors with only ten positions (numbers 0..9) and was used to encrypt numerical messages.

Rotor driving mechanism

All Enigma models fall into either of two categories with respect to the wheel driving and stepping mechanism: lever-induced stepping, i.e. pawls and ratchets (which leads to a typical stepping anomaly of the middle rotor, known as double-stepping, see Features) – and gear-driven, with regular stepping, like a mechanical counter. The M-line models and most of the commercial Enigmas belong to the first, the Abwehr and Zählwerk machines to the second category. Within each category only minor differences remain, such as rotor wiring, settable/non-settable UKW, or whether a plugboard is included.

The simulations

'Universal Enigma'

While any serious codebreaker wants to be geared up for what's out there, creating and maintaining separate simulations for all the different models would be pretty dull. This is where the "Universal Enigma" comes in. It contains virtually every model with 26-position rotors that has sufficiently documented specifications available at this time. Moreover, it is also equipped with a Stecker-Uhr and, as of version 2.5, with the rewirable reflector UKW-D.

There was of course no such Enigma for real, historically! However, bundling everything into a single, uniform entity has the benefit of making all models available at any time and in a compact way, with the possibility to easily switch between them and compare their features and functionality. (Since the release of Universal Enigma, this approach has been widely embraced for Enigma simulation.) Each selected model preset will behave like a separate simulation, including limitations for wheel selection, reflector type and so on. But in addition to this, a "Custom" mode allows for individual setting of functionality features (including wheel drive mechanism) and free combination of all included components, thereby for the creation of entirely new Enigma models!

For details and specs, see the Features section.

'Enigma Z30' and 'Swedish Enigma B'

Based on v2.6 of the "Universal Enigma", two additional simulations are now available, covering somewhat exotic Enigma models: Enigma Z30 ("Zahlen-Enigma" / "Numbers Enigma") is a machine with 10-position rotors that was used to exclusively process numbers. The Swedish Enigma B (A-133) on the other hand has 28-position rotors and corresponding keys/lamps – three additional umlauts 'Å', 'Ä' and 'Ü', while omitting 'W', which is rarely used in the Swedish language and was coded as 'VV' if needed.

The rotor wheels of both machines have what I call "trivial ringsetting" (same as those in Enigma D), where the labeled index ring can be shifted against the rest of the rotor, leaving the relative positioning of the inner wiring against the turnover notches unchanged. This type of ringsetting can be neutralized by simply turning the rotor to a corresponding position and is therefore cryptographically useless.

Both Enigma Z30 and the Swedish Enigma are separate simulations and not integrated into 'Universal Enigma', as due to their deviating rotor sizes and resulting differing alphabets, they would not be compatible and combinable with any 26-position machine anyway.

++ News ++

Simulations

  • [ UPDATE ] Enigma Z30 v2.6.2/b
    Fixed wrong lamp panel output. (Thanks, Azerty!) -- 01 Feb 2024
  • [ UPDATE ] Universal Enigma
    Corrected wiring of rotor 4N (Norenigma) from updated measurements
    (Thanks, Frode!) -- 19 Nov 2023
  • [ UPDATE ] Universal Enigma
    Adjusted wiring rotation in UKW uR° (orig. Railway, hitherto theorized) using newly available empirical data
    (Thanks, Detlev and Patrick!) -- 05 Nov 2023
  • [ UPDATE ] Universal Enigma v2.6.2
    Revised turnover positions in Enigma D rotors [Foss, 1927]
    (Thanks, Jürgen!) -- 13 Aug 2023
  • [ UPDATE ] All sims: v2.6.1
    Monitor usability improvements; GUI fixes -- 29 Jan 2023
  • [ m ] Enigma Z30: harmonized versioning
    v2.6.1 beta → v2.6/b;
    v2.6 → v2.6/a (assumed different ETW wiring)
    -- 28 Jan 2023
  • [ UPDATE ] Universal Enigma
    Updated wiring of rotor 2S (Sonder-Enigma) -- 29 Aug 2022
  • [ UPDATE ] Enigma Z30 v2.6.1 beta
    Alternative ETW contact layout (pending verification!) - Previous version still available here. -- 23 Jul 2022
  • [ UPDATE ] Universal Enigma v2.6
    3 new models: accurate Enigma D (with trivial ringsetting), Railway Enigma with authentic German wiring, "Group II machine" (Abwehr) -- 26 Apr 2021
  • [ m ] UE 2.5: renamed Enigma D as K (identical rotor wirings, but D has old/trivial ring setting!) -- 23 Apr 2021
  • [ RELEASE ] Enigma Z30
    numbers-only, 2 versions, trivial/no ringsetting -- 02 Apr 2021
  • [ RELEASE ] Swedish Enigma B  (A-133)
    28-position wheels, Swedish alphabet, trivial ringsetting -- 31 Mar 2021

Website

  • Added subsection on Enigma Z30 and Swedish Enigma (in "The simulations");
    Minor text edits (FAQs);
    Updated external link. — 26 Dec 2022

External

  • [ Video ] Universal Enigma in action, and a basic tutorial here (courtesy of poughkeepsieblue) — Dec 2013

Features

Files

  • Each simulation in the box to the right consists of a single page of HTML/Javascript, working in all current browsers with Javascript enabled, on any platform. (→ Browser compatibility, Security)
  • No installation: To take it home, just save the web page.
    (To save the Enigma logo as well, choose the "Web page, complete" option, or right-click the image, choose "View background image" and save.)

Enigma models

  • "Universal Enigma" simulates the following 17 models:

    with lever mechanism (double-stepping):

    I  "Services" (Army; Air Force)
    M3  (Army; Navy)
    M4  "Shark" (U-Boats)
    N  "Norenigma" (Norway)
    S  "Sonder-Enigma" (Mil Amt) *
    D  (comm., 1926; trivial ring setting) **
    K  (commercial, 1927) ***
    Swiss-K  (Swiss Air Force)
    R  "Rocket" (Railway)
    R°  (Railway, authentic wiring) **
    T  "Tirpitz" (Japan)
    KD  (rewirable UKW-D) *

    with gearbox drive:

    A28 / G31  "Zählwerk" (comm.)
    G-111  (Hungary / Munich)
    G-260  (Abwehr in Argentina)
    G-312  (Abwehr / Bletchley Park)
    G-401  "Group II machine" (Abwehr) **
    … and the following additional components:
     
    • Enigma-Uhr ("Stecker-Uhr") - an interesting external add-on for models equipped with a plugboard
      (→ The Enigma machine / Some Help)
    • Umkehrwalze 'D' (UKW-D) a rewirable reflector *
    • For the first time, so called Maintenance wheels ("Arbeitswalzen") are also simulated: a single three-slot neutral rotor and a special reflector that swaps letters adjacent to each other on the keyboard; this setup was used for checking the Enigma's electric pathways. *
     
        * since version 2.5
      ** since version 2.6
    *** in earlier versions incorrectly named 'Enigma D'

Original Functionality

  • Complete wheel sets for all models (as far as they are known)
    -- NB: The indicator rings of rotors I-V for Enigma I were labeled with numbers (01-26). Later, for M3 and M4, the same rotors were labeled with letters (A-Z), as with the other rotors. The simulation uniformly shows rotor positions as letters. This is also to avoid confusion with the ringsetting, which is always shown as numbers.
  • Full range of features and settings: wheel selection; start positions and ring setting (standard or trivial, depending on rotor); plugboard and Enigma-Uhr; inner wiring of UKW-D
  • Virtual keyboard/lampboard in original 'QWERTZU' layout (switchable to an input pane, see below).
  • On models with lever-based driving mechanism the middle rotor will perform irregular double-stepping as it engages the rotor to its left.
    The reason for this anomaly was that the T-shaped lever (pawl) driving a wheel was allowed to engage by a notch in the wheel to the right, pushing against this notch as well when advancing its own wheel. This effect only manifests itself on the middle rotor, as the right-hand one rotates at every step anyway, and the reflector is non-rotating in the models concerned.
    -- Tip: Watch the double-stepping of rotor II, in preset configuration with rotor II positioned on 'D' and rotor I on 'Q' and by typing two characters.

Additional Functionality

  • Two input modes:
    1. clickable "QWERTZU" keyboard in original layout with integrated lampboard and optional input field for convenient typing
    2. normal text pane with full editing capability (including copy&paste → see Some Help)
      (Here, with every new input action the whole content is being re-coded from start. The down-side is it may slow down operation in case of larger texts!)
    Switching between input modes clears all text I/O, and restores current message key (rotor start positions).
  • Auto-verification of stecker connections and UKW-D wiring
  • The plugboard is not limited to 10 stecker pluggings. Plugs can be deactivated, without deleting them.
    Plugs are remembered in deactivated state when switching model presets
  • The Enigma-Uhr automatically becomes available as soon as 10 or more pluggings are active. Uhr position "00" leaves the plugging unchanged. The Uhr can be deactivated independently from the plugs. (→ Some Help)
  • Multiple selection of the same rotor is possible (e.g. VI-VI-VI).
  • The maintenance wheel "Arb.W.1", which in reality replaces all three original rotors, is emulated by three identical, synchronized neutral rotor wheels in the simulation. Each of the single neutral rotors can also be used on its own (in "Custom" mode, see below), which allows the creation of hypothetical machines that have only one or two rotors.
  • Rotors can be locked (including a rotating UKW)
    -- NB: Technically this is also possible in the real machines. The gearbox models have a lever for decoupling the rotors from the driving gear. On the lever-based models rotation can be suppressed by holding down a key until another one is pressed and then releasing it (during the overlap two lamps will be on at the same time).
  • Contacts in the rewirable reflector UKW-D can be described by two denomination schemes that can be freely switched between: the original UKW-D contact labels as imprinted on the reflector and given in the key sheets; or the harmonized "Bletchley Park" (BP) naming system that emerged from the code breaking efforts and applies a uniform denomination pattern on all parts of the machine. (NB: It is therefore also used internally by the simulation and, accordingly, by the monitor's wiring and signal path window.) To avoid confusion, BP contact names are always displayed in lowercase. The monitor's configuration summary always uses the original UKW-D contact labels, as would be expected by the operator.
  • The live monitor displays signal path, wirings and plugging, detailed machine configuration, machine state, performance and other infos.
  • Status bar shows current encryption settings
  • Balloon help for several items (on mouse-over)
  • Separate reset buttons for all sections
  • 17 model presets (I, M3, M4, N, S, D, K, Swiss-K, R, R°, T, KD, A-865, G-111, G-260, G-312, G-401)
  • 5 authentic historic wiring presets for UKW-D
  • altogether 58 rotors and 15 UKW (incl. maintenance wheels), 2 Greek wheels, 3 ETW, 2 rotor stepping mechanisms; standard and trivial ringsetting support; plugboard; Enigma-Uhr (see above)
  • In "Custom" mode all features and functions can be combined ad lib
    This may result in some exotic wheel stepping patterns, e.g. propagating double-steps in case of lever mechanism and rotating UKW, which could not be attained in a real Enigma.

[ Changelog ]

Some Help

This section gives some hints and background for operating the simulations. The interface is hopefully quite self-explanatory as to how to use it. As to what it all means, you may want to familiarize yourself with the basic concepts of the Enigma, as laid out in the Introduction or, in greater detail, on the respective pages given in the Links.

General

  • Many items show infos and tips via balloon help when pointing on them with the mouse.
  • For further clarification the Questions & Answers may be worth a look.

Message input

  • When pasting text with the mouse via context menu, you'll have to press a key in the input field afterwards ('Ctrl' or Space, for instance, which will not be coded) to let the interface know there's new input, as it doesn't catch mouse activity but only keystrokes.
    -- This is not necessary when pasting via shortcut (Ctrl+V).
  • Switching between input modes will erase all text, but will preserve the encryption key (including the starting positions of the rotors, which will be restored).
  • In text pane input mode all wheels will be locked against manual setting as soon as there is text input.
    This is necessary to keep the input fully editable, which demands that the current key settings apply to the whole text.
  • In text pane input mode it is still easily possible to re-code existing text.
    For a new message key (wheels' starting positions),
    1. reset the rotors with button [AAAA] / v2.0: [Home pos.],
    2. enter new start positions.
    3. To trigger re-coding, press any key in the input field (such as 'Ctrl', which will not be coded).
    Ring setting and plugs can be changed as well (observing item 3 in above list).
  • In 'QWERTZU' mode, re-adjusting the wheels will only affect text being entered afterwards, as in the real machine.
  • Input and output fields: double-click to select the entire content.

Enigma-Uhr

  • The Uhr requires exactly 10 pairs of activated plugs (steckers). Less than that will not work and the Uhr therefore be deactivated and locked. More steckers are allowed, with the first 10 (counting from left) then being affected by the Uhr and the remaining ones being just "normal" stecker connections.
    -- IMPORTANT: Unlike normal plugging, for the Uhr the order of the stecker pairs as well as within each pair is relevant!
  • The Uhr has 40 positions (00..39). On "00" it is neutral, or practically deactivated: The letter substitutions on this position are exactly the ones plugged (steckered).
  • All position numbers divisible by 4 produce reciprocal letter substitutions, although different ones than actually steckered (except for "00"). All other positions result in non-reciprocal substitutions that cannot be attained by mere plugging.
  • When the steckers are deactivated, so is the Uhr. After reactivation of the steckers the Uhr remains inactive and has to be activated separately.
  • Clicking on the Uhr position display toggles between "00" (neutral/inactive) and the last active position.

Key and coding procedures

Daily key & message key

Enigma's cryptographic key consists of the following parts:

  • Wheel selection and alignment (wheel order)
  • Ring settings
  • Plugboard / Uhr  (if applicable)
  • UKW-D wiring  (if applicable)
  • Initial wheel positions.

The first four make up the daily key, laid out in a code book and known to both sender and recipient. The wheels' initial positions were assigned individually to each message, and are called the message key.

Encrypting the message key ...

Being unknown to the recipient, the message key had to be included in the transmission and therefore, had to be encrypted itself. This was done using the common daily key as follows:

  1. Sender sets up the Enigma according to the daily key and chooses arbitrary initial wheel positions, e.g. WPOS (or three letters, depending on the machine), for encrypting the message key;
  2. Sender decides on a message key, e.g. CODE (or three letters, depending on the machine);
  3. Sender types in the message key (CODE), notes the output (say, IPXH) along with the chosen initial wheel positions, like "WPOS IPXH", and puts the two groups of letters in front of the coded message (without coding them again, of course).

... Decrypting the message key

Having received the transmission, the recipient now follows the same procedure (symmetric encryption!): set the machine to the daily key, adjust wheel positions according to the first group (WPOS), type in the second group (IPXH), thus obtaining the message key (CODE). This would then be set as starting position for the wheels, so the message could be deciphered.

* * *

Substitutes

Since the wheels only contain letters A to Z, only these can be encrypted. Numbers and other characters have to be either spelled out, omitted, or represented (preferably by rarely used letters or letter combinations). For example, X would often be used for a discriminator (comma, point). The German military also generally substituted the digraph "ch" with "Q" (so "Schiff" [boat] would become "SQIFF").

Precautions

To make decryption harder (cycle detection), the length of a message had been restricted to 250 characters. After that the message key was to be changed. Longer messages were split up in parts to be coded with different message keys.

Sometimes the message key was altered within a running message part; this would be indicated in the plain text by a pre-arranged code (e.g. "CYDE" for "set leftmost rotor on position 'D' now").
NB: In the simulation, 'QWERTZU' input mode would be mandatory in this case, as it allows for re-adjusting the wheel positions with text already input. The new wheel settings affect only subsequent input.

It was important to vary the structure of messages, especially when parts of the content, such as proper names or the message header ("From... To...") were likely to be deduced. Abbreviations had to be varied for the same reason. Or, for example, while X was commonly used to denote a full stop in clear text, it had to be omitted at the very end of a message. Such precautions were not always observed, though, a fact that played greatly into the hands of the codebreakers.

Interoperability of Enigma models

Enigma I within M3

The Enigma I (aka Wehrmacht Enigma or Services Enigma) can be seen as a predecessor of the M3. Already in use with the Reichswehr in 1930, it remained the most widely-used model until the end of World War II.

Enigmas I and M3 are compatible if the following is being considered:

  • Enigma I was initially equipped with only rotors I-III, by 1939 with rotors I-V. (M3/Army: I-V; Naval M3: I-VIII)
  • An earlier reflector wheel, named UKW A, was used exclusively in Enigma I, but put out of service in 1937 to be replaced by UKW B (reflector B, same as in the M3).
    NB: The old reflector UKW-A remains available in the "Universal Enigma" for Enigma I and in "Custom" mode.

Enigma M3 within M4

Model M3 (and thus, also Enigma I) can be emulated within the M4. For this the reflectors have to be made "compatible" by either of the following settings:

  • Reflector UKW B 'thin' + wheel Beta (position A, ring setting 01)  <—corresponds to—>  reflector UKW B;
  • Reflector UKW C 'thin' + wheel Gamma (on A-01)  <—corresponds to—>  reflector UKW C.

Browser compatibility, Security

  • The simulation should be working in all modern browsers (and in older ones too).
      [v2.0] Tested: Firefox 0.9+, IE 5.5+, Chrome, Opera 9+, Safari (v?), Konqueror 4+. – Netscape is not supported (sorry, folks!). ;)
      [v2.5; v2.6] Tested: Firefox 1.0.5+, IE 6+.
      Depending on the browser model, look and operability may vary. It's the curse of web design. Likewise, modified default style sheets in branded browsers (like Firefox with Linux) may have unfavourable effects on the visual appearance.
  • Keep in mind that with Javascript activated, your browser becomes vulnerable in a way, since code may be planted and executed. Faulty scripts or processing of larger amounts of data may lead to browser malfunction, freezing or crashes. In anonymized networks like TOR, anonymity could be compromised (tracking, or recognition via cookies).
      That said, nowadays it is virtually impossible to avoid Javascript while browsing the web. Most "modern" websites use or even depend on it, from webmail interfaces to news and multimedia portals to social networks, but also your ordinary image gallery. Unlike the JS applications presented here, however, those script monsters are not really comprehensible anymore to non-experts.
  • Cryptographic strength: The method demonstrated here is *not* suited for encryption of sensitive data! Although it might be hard to decipher a single message of unknown content, the Enigma's encryption – due to some serious flaws in design – is not nearly as strong as one might guess, or in fact as it could have been. (The machine had already basically been broken by Polish cryptanalysts in the 1930s and was later completely "neutralized" by UK/US during the war, albeit with inconceivable effort and a good deal of luck. This is a fascinating story, by the way...)

Questions & Answers

  1. A: The basic principle is: Settings must be the same for coding and decoding. – But since you really cannot break anything here, it won't hurt to try everything out and see what happens. For starters you may even ignore settings at all, as the Enigma will code anyway as soon as there is valid text input. Just start a new session or reload the page, enter your message on the left-hand side and observe the output to the right. You can also see the rotors step at every (codeable) keystroke. To decipher the output, copy it and feed it to the (cleared!) input pane. In case of a problem, just reset/reload and retry. The next step could be to successively play with the different "knobs" and observe the effects, starting for instance with the wheel positions, then including the rings, steckers, and so on.
    -- Tip (1): Values can be modified by pressing the '+' and '-' buttons or by direct input in the display fields. The monitor reveals some interesting information about the coding process.
    -- Tip (2): For a nice video tutorial, check out this clip by poughkeepsieblue... (<<)
  2. A: Usually it's the M-series you want. These are the best known and consequently, the most frequently simulated models. Use the M3 for a 3-wheel key and the M4 for a 4-wheel key. (NB: The M4 can be used for M3-related keys as well, if the correct combined reflector is chosen; see section about interoperability.) If this fails, and all options are exhausted (→ Key and coding procedures), you may give it a try with the Abwehr Enigma G-312 – especially if the key does not contain any stecker settings. Sometimes cache owners seem to be using their own Enigma creations or modifications (like altered rotor wirings); in such cases it is hard to tell which model these are based on and whether they operate accordingly.
    Come to think of it: Maybe, with the "Universal Enigma" out, the range of models used for those puzzles will even broaden :)  (<<)
  3. A: The simulation, i.e. ciphering, starts automatically at any valid input or keystroke (valid means letters a-Z). If however you have pasted text with the mouse, the interface is unaware of it. This is normal behaviour of the HTML forms used here. To let the interface know that there is input, an explicit keystroke is therefore required in the input field in that case. About any key will do, but a good choice would be 'Ctrl' or Space, as those are ignored for ciphering and won't alter the message text.
    -- Tip: Use the keyboard shortcut Ctrl+V (or equivalent) to paste previously copied text. The ciphering will then start immediately. (<<)
  4. A: This is normal in textfield input mode. As soon as there is valid input, manual rotor position modification is locked. This is the price for having the input pane fully editable, as it ensures that the message key remains the same for the whole text.
        This does not mean the key cannot be changed. It can, but only for the message as a whole. Here is how:
    1. Reset the wheels to [AAAA] using the respective button / v2.0: [Home pos.]
    2. Enter new configuration
    3. Start re-coding through a random keystroke in the input area (like 'Ctrl' or Space).
    Alternatively, copy and then delete (or simply cut) the input text. As the input area is cleared, the wheels will return to their starting positions and be unlocked for manual setting. After your adjustments just paste the text back (Ctrl+V) to re-encrypt it.
    -- See also: Some help
    (<<)
  5. A: By changing to text field input mode and back again. All wheels will also be reset to their last starting positions (message key), as displayed in the red status line at the top. (<<)
  6. A: By switching to wheel position view and back again. This reads the currently active wiring back in. – The wiring itself is never lost though, unless it is updated by successful activation of a new one, or by loading one of the presets. (<<)
  7. A: The Uhr always requires exactly 10 stecker connections. So, at least 10 pairs of letters must be input and activated(!). Since the algorithm for the Uhr would lead to faulty coding or errors when used with less than 10 steckers, the Uhr is automatically locked inactive in such a case (i.e. remains on position "00", where it is neutral towards the plugging).
    -- For more help on the Enigma-Uhr, see Some help.
    (<<)
  8. A: This should only occur in really outdated browsers. For the Javascript engines of that time, the sim can become quite a resource hog, especially with very long messages and in text field input mode, where the entire message has to be re-enciphered at every new keystroke (making this mode fully editable). This will at some point inevitably affect the performance, and may eventually even freeze the application. This is not the end of the world, though. Most browsers now offer an option to abort the execution of a "hanging" script. The worst that can happen is that you have to restart the browser, losing your key settings and message text (and yes, possibly other open webpages if the browser cannot restore them afterwards, which would indeed be annyoing).
    Current browsers should have no problems with texts containing 1,000 or more characters. Historically, messages were limited to 250 characters per message key anyway, so as to not lose cryptographic strength (cf. section "Key and coding procedures").
    -- Tip: The following measures may help to speed up the simulation:
    • Use the 'QWERTZU' keyboard; this mode always operates at the same speed, as it doesn't remember any previous input but processes only one character at a time
    • When copying large texts into the little input field in 'QWERTZU' mode, close the Monitor (not necessary for text field mode)
    • Split up longer texts into several parts, as was done in reality (see above)
    • Try another browser or more recent version
    (<<)
  9. A: Don't panic. The script itself has never crashed as of now – except perhaps when clicking any buttons while a ciphering operation is running. In that case you may have to restart the browser (unless the warning has popped up and offers you to cancel the operation). More likely though, the script is busy processing large amount of text input (possibly in 'QWERTZU' mode), and/or the web browser's performance is not cutting edge. If the popup warning has appeared, you may of course click "Cancel", and no harm done. (Except in cases where the now undefined state of the aborted script leads to garbled output in subsequent ciphering; see Q11!) Or you may click "Continue" and wait for the ciphering to complete. Depending on your browser/CPU and on the amount of text to be processed, this may take a while, and more warning messages may appear at regular intervals. (<<)
  10. A: That's probably an Army key. There were indeed, depending on Enigma model and wheel labeling, several different ways to express the key. The variant being used here – letters for everything except for ringsetting – was probably the prevalent method. Plus, letters facilitate the input of stecker pairs in the simulation. This means, other key variants will have to be translated into the one being used here. This is done by a simple progressive enumeration of the letter in the alphabet:
    A B C D E F G H I   J  K  L  M  N  O  P  Q   R  S  T  U  V  W  X  Y  Z
    1 2 3 4 5 6 7 8 9  10 11 12 13 14 15 16 17  18 19 20 21 22 23 24 25 26
    -- Tip: When placing the mouse pointer over a field containing a key value, a tooltip will show its corresponding value in the alternative reading. Hope this isn't too confusing... (<<)
  11. A: The simulations have been tested and should correctly decipher all messages, provided the same settings apply that were used for encryption. Possible reasons for decryption issues are:
    • During copying or pasting, a portion of the text was left out (i.e. the beginning). Perhaps the her text was bigger than the visible output window and due to not scrolling back to the very top for copying, some lines are missing now.
      -- Tip: Double-clicking into the output area selects the entire content.
    • In 'QWERTZU' mode, any already encrypted output will remain unchanged, even if the encryption key is modified during operation! Unlike in text field input mode, there is no re-coding of the entire message here. This is the behaviour of the original machines by the way. Therefore you have to memorize the exact position(s) the key was altered at, and copy only those areas where a respective key applies.
      -- Tip: The output window is cleared by switching to text field input mode and back again. The current key will be preserved.
    • Since the 'QWERTZU' mode does not have a memory, the modification of any parameter (rings, plugs, whatever – even if undone before encryption) means that a new message key is given, i.e. the current rotor positions are automatically set as new start positions!
      -- Tip: Consult the red status bar for the current encryption settings; re-adjust start positions if necessary.
    • Stecker connections were entered but not activated (activation button is red). -- In some browsers: Steckers might have been in use prior to a page reload. The stecker inputs are then recalled, but have to be activated again.
    • When (re-)selectng a wheel its starting position will always be 'A' and the ringsetting '1'. That's why these settings should always be made after wheel selection, lest they get lost. (With the real machine this procedure comes natural.)
    • In case only certain characters from the original text are missing, chances are that they are special characters, umlauts or numerals. This is normal, because they cannot be encrypted, as the wheels and the keyboard only know letters. Read more on this in section Key and coding procedures.
    • If a decrypted text is correct up to a certain position and then gets scrambled, it could indicate a wrong rotor turnover position. In this case shift rotor position and ring setting of the rightmost wheel simultaneously and in the same direction until the result is correct.
    • If you suspect that particular letters are permuted, or cyclically permuted, it is probably a stecker problem. One or more letters might have been entered incorrectly on the plugboard.
    • In case of very long input text the browser may give standard warning that a running script is slowing down the website (cf. Q8). If at this point script execution was canceled, subsequent (de)ciphering may result in garbled output. The reason lies in the internal workings of the browser, not in the Enigma script. The browser forces the script to stop but not to reset (values of variables, counters etc.), leaving it in a random state. The remedy here is to reload the page.
    • see also next question...
    (<<)
  12. A: Generally, my simulations have been checked against the programmes referenced in the Links, as far as possible, and those in turn against real Enigma machines (according to the developers). The probability of malfunctions have thus been minimized, although bugs can never be fully ruled out (e.g. after modifying or upgrading the script). I should add however that many "external" messages have already been successfully decoded with my simulation. So, perhaps another thorough check of all settings might just solve the mystery. See also the previous question. If the error should indeed persist, I will always appreciate it if you let me know about it. (<<)
  13. A: A just question – even one of cryptographic significance. Because wheels with only a single turnover point are likely to leave in particular the leftmost wheel practically static during a typical message coding. An Enigma in such a configuration has de facto only one or two rotors, considerably reducing cryptographic strength. Some modified commercial Enigmas (KD and T) and the models of "type G" overcame this flaw through wheels with multiple turnover points (the latter additionally with a rotating reflector). The rotor sets for most models were never upgraded, though. This may have had financial, logistical or compatibility reasons.
    -- Tip: The rotors in the Zählwerk and G-series have the highest number of turnover points (notches), with the wheel labeled "1.." always at the top with 17 notches. The rotors of Enigma KD have 9 notches, while those of the "Tirpitz" still have 5 notches each. Rotors VI-VIII of the M-series turn over twice per rotation (thereby however actually deteriorating, instead of improving, cryptographic strength: Turnovers and rotor size should always be mutually prime!). All other rotors have only one notch. (<<)
  14. A: They indicate the currently active "coupling" of the wheels, i.e. the stepping mechanism.
    There are 3 possible cases: stepping induced by levers (pawls), gear-induced stepping, or no stepping (wheels locked). Consequently there are three different symbols to (hopefully) illustrate these cases: '–' for a lever; '¤' for gear-drive (the currency symbol resembling a cogwheel); and '^' for uncoupled ('tilted up'), i.e. rotors locked.
    -- If a symbol appears between reflector/UKW and leftmost rotor wheel, those two are coupled as well, meaning the UKW is rotating. (<<)
  15. A: The first and third column should be self-explanatory ("cps" means "characters per second" in the left-hand column). In the central field the monitor displays either the current signal path or the current internal wiring, depending on the operation being performed:
    1. If any adjustments are made (wheels, starting positions, ring settings, plugs, Enigma-Uhr), the monitor will switch to wiring display. You will then see a uniform per-line scheme of corresponding input/output values for all components (wheels, plugs/uhr). This is shown by input value left-to-right in alphabetical order or – depending on a wheel's current position – alphabetically, starting at that position. In case of a wheel, the first line is the outer alphabet ring: the one that shows in the real machine's (and the sim's) little rotor windows during operation and the one we are talking about when referring to the message key. The first letter to the left is always the current position, as seen in the machine's rotor windows. Capital letters are turnover positions. In the second line the corresponding output position (referring also to the outer alphabet ring) is shown for each input position. The light-blue area to the left names all the components shown.
      -- For instance, changing a wheel's starting position will result in a synchronous shift of both lines for that wheel so that the starting point is the upper line's left-most character. Changing a ring setting will not move the outer ring but only rotate the internal wiring, so only the lower line will be altered. In case of steckers, the Uhr, and the ETW the monitor will always leave the upper line unchanged and modify only the lower line (output).
    2. If something is typed or pasted on the sim's input side, the monitor switches to signal path view, where you can follow the physical signal as indicated by green and red arrows for entry and return path, respectively. As in the case of internal wiring display, all components (i.e. wheels, plugs/uhr) are shown with signal positions input-wise in alphabetical order and, for rotor wheels, starting with the current position (indicator ring) on the left. This time only the upper line is shown, while the arrows indicate the input and output position at each component for the current signal. Again, capital letters represent the wheels' turnover points (as you may check against the tooltips given for the rotor position windows).
    (<<)
  16. A: This is due to page rendering in the actual browser you are using. Although the page has been optimized for many common browsers, deviations are possible. Often this is a matter of standard font size. In Firefox (Windows) the standard, being used in the sims as well, is Times New Roman 16px. This can be adjusted in Tools>Options>Content. Most browsers also let you change the current page's global font size on the fly, usually by pressing Ctrl and the '+' or '-' key at the same time. (<<)
  17. A: The sims consist merely of a single HTML page including the script (plus the file of the logo graphics). When on the sim page, just save the page (Ctrl+S). You can also right-click on a simulation link and "Save target as...". Download complete!
    -- Tip: To save the logo image as well, either select "Web Page complete" in the Save dialog, or right-click the logo, select "View background image", and save. (<<)
  18. A: Graphics was not a priority consideration here, but usability and size. There are several arguments in favour of these sims: 1. Running them requires only a web browser, and the sims will work platform-independently, i.e. with almost any device and operating system. -- 2. The source code is plain text and thus immediately readable. You are even free to modify it (in accordance with the Licence terms; see also the 'i'-button in the simulations). Javascript, the way it is used here, is a quite comprehensible language and the interaction of the algorithms with the frontend/GUI is managed through (dynamic) HTML, which is also easy to understand. -- 3. The sims, although in plain text with connotations, are extremely compact (a single HTML page of about 65kB, plus the logo image).-- 4. At the time of its release, the Universal Enigma with Stecker-Uhr offered a unique range of models and options for an Enigma simulation.
    -- My chief motivation for this project was to find out if it can be reasonably done in Javascript/HTML and within the limits of a "normal size" web page. When I began looking into the topic in October 2007, I did not find anything on the internet that matched these criteria while at the same time offering the complete set of features. (<<)
  19. A: I used to answer such questions with "No" in the past – yet here we are with several feature upgrades and new simulations. So, I think I'd rather not answer at all this time. Keep checking back on this website for any news. ;) (<<)
  20. A: Most certainly not. This would require major and very tedious restructuring of the GUI and the underlying code, without providing any new insight. Basically the simulation does work fine on mobile devices as it is; the only question is usability. This however doesn't even motivate me nearly enough. (<<)
  21. A: Hey, there's always room in my basement! (<<)
  22. A: Feedback and suggestions are very welcome and appreciated. And of course you can spread the link, and spread the word. (<<)

Links and Acknowledgements

  • Wikipedia articles (English, German; the latter also links to separate articles on some models and the Stecker-Uhr). These were my main sources in the initial stage of the project. Very comprehensive and well worth reading. There is a lot on the historic and cryptographic context, as well as details on the double-stepping anomaly.
  • The extensive Dutch website CryptoMuseum.com offers not only specifications of most Enigma models (complete wheel wirings included), but also lots of pictures, original(!) documents and own research. There is comprehensible information on the Enigma-Uhr too, as well as an Enigma Family Tree. The website is continuously being updated and extended.
  • At the time, my main sources for wiring schemes of different Enigma models were a University of Toledo site: "python" cryptanalysis files: Enigma" (in the file "enigma_configs.py"), and the Rotor Compendium within the Spanish website "Taller de Criptografía".
  • Dirk Rijmenants' really beautiful Enigma simulation (Windows executable), was of great help during debugging. The manual offers valuable information on the mechanical process (e.g. wheels rotate first, coding happens afterwards). The website contains a lot of material related to cipher machines and cryptography, and is being updated regularly.
  • For analysis of the ring setting mechanism I also consulted the M3 Naval Enigma Simulator by Geoff Sullivan and the Crypto Simulation Group (see also CryptoCellar). Their Windows executable offers a neat visualization of the signal propagation through the wheels. Geoff's Uhr simulation is to my knowledge the only validated reference for the Enigma-Uhr available on the internet and thus, indispensable for resolving the exact signal path (stecker jacks for incoming/outgoing signals). Finally, my first G-312 sim was checked against Geoff's Abwehr simulation as well, and I am indebted to him and to David Hamer for their help in clarifying the ETW diagonal.
  • Anders Wik deserves credit for bringing the Z30 and the Swedish Enigma to my attention and for providing valuable insight on the history and workings of these machines. – Philip Marks was of great help in clarifying some aspects of the different ring setting implemenations. His work on reconstructing original German rotor wirings directly inspired the v2.6 update of Universal Enigma.
  • I also want to thank Mavis Batey ("the only one left who was present when the Abwehr machine was broken"), and John Alexander of Bletchley Park Museum.
  • No amount of abstract theoretical work on the Enigma will ever match the experience of a close, hands-on encounter with the real machine. I am grateful to Eva Kudrass of Deutsches Technikmuseum Berlin, who made this possible for me in a very special way. I am equally indebted to Klaus Kopacz for sharing his time, his valuable expertise, and for the demonstration of the maintenance wheels.
  • The Universal Enigma simulator is featured in this video by poughkeepsieblue (3:00 min into the clip). Not only a nice tutorial on the sim, it also shows how you can put it to creative use... Thanks a lot, poughkeepsieblue!
  • An instructive recent project, also featuring the Uhr: Arduino Enigma Simulator (the source code is free).

Get in touch

 
  palloks@physik.hu-berlin.de
 

Copyright, Licence, Disclaimer

Copyright © 2007-2024 by Daniel Palloks. -- This software and source code may be used, distributed and modified freely as long as (1) my authorship remains acknowledged, (2) any modification is properly indicated, (3) the freeware/ open source status and the conditions for distribution and modification remain unchanged. A copy of this statement must be distributed together with the software. -- This software is provided "as is". The author will not be liable for any damage - direct, indirect or consequential - resulting from the use of this software.

I am not responsible for the contents of external web pages reached via links from this site.
The Enigma logo graphic is in the public domain (source: Wikimedia Commons).

 


© Daniel Palloks 2009-2024
Last change: Mar 17, 2019

HTML 4.01 Strict