Enigma Machine Simulator (Rotor Cipher)

Simulate the WWII German Enigma machine in your browser, with historically accurate rotor wiring and stepping mechanics. Configure rotor selection, ring settings, starting positions, and the plugboard to encrypt and decrypt messages. All processing happens entirely in your browser.


Tips

  • Enigma is a reciprocal cipher, so running the ciphertext back through the exact same rotor settings, starting position, and plugboard reproduces the original plaintext. Try it with the "Send result back to input" button.
  • Changing the starting position (Grundstellung) by even a single letter produces a completely different ciphertext. In actual wartime use, this setting was typically changed every day.
  • Because the signal always passes through the reflector (Umkehrwalze), a letter can never be encrypted to itself. This quirk later became a crucial clue for Alan Turing and his fellow codebreakers.
  • The plugboard supports up to 10 letter pairs. The German military's own operating procedures also capped it at 10 pairs.
  • Clicking "Randomize settings" lets you experience, in a simplified form, the daily key-setting ritual (changing rotors, rings, and plugboard according to a key sheet) that real operators performed every day.

Frequently Asked Questions

Polish mathematicians first worked out the machine's internal structure mathematically in the 1930s. Britain's Bletchley Park later built on that work, and Alan Turing and his colleagues developed an electromechanical device called the "Bombe" to crack the daily-changing key settings. Operational habits, like reusing common opening phrases, also provided useful clues.

Not secure at all by modern standards. It was already systematically broken during World War II, and its key space is vastly smaller than that of modern ciphers like AES, meaning a present-day computer could brute-force it almost instantly. This tool is purely a historical and educational simulator.

No. Because the signal is always routed through the reflector, it is mathematically impossible for a letter to map to itself. This was actually a cryptographic weakness, and it became one of the key clues codebreakers used to guess at the plaintext.

The starting position is the letter shown in each rotor's window, changed for every individual message. The ring setting shifts the relationship between a rotor's internal wiring and its alphabet ring, and was a longer-lived part of the key. Both must match exactly for decryption to succeed.

It is an extra encryption layer that swaps specified letter pairs between the keyboard and the lamp display, before and after the signal passes through the rotors. It dramatically increases the number of possible combinations compared to the rotors alone, and was a major factor that made real-world German military traffic harder to break.
ツールくん

Side Note — The Story of Enigma and Bletchley Park

Enigma was patented in 1918 by German engineer Arthur Scherbius as a commercial cipher machine, and later became widely known after the German military adopted it to protect its communications. It combined several rotating cipher disks called rotors; each keypress mechanically turned one or more rotors, changing the internal wiring so that even the same letter typed twice in a row would usually be encrypted differently.

The effort to break Enigma began with Polish mathematician Marian Rejewski and his colleagues, who worked out the machine's mathematical structure in the 1930s. After the outbreak of World War II, a codebreaking team assembled at Britain's Bletchley Park, where Alan Turing and others developed an electromechanical device called the "Bombe" to systematically determine the daily-changing key settings. This achievement is widely credited with contributing significantly to the Allied intelligence effort.

The history of breaking Enigma leaves a lasting lesson for modern cryptographic design: no matter how sophisticated a cipher mechanism is, operational habits and human error, such as always starting messages the same way or reusing key sheets, can become a way in. This simulator is purely an educational tool for learning about that history, and should never be used to protect real communications.