Enigma

This page uses JavaScript to simulate a three-rotor Enigma machine; the type used by the German army during World War II. Enigma machines were used to encrypt messages by exchanging letters in the plaintext to produce the ciphertext in a manner far more complex than the standard Caesar Shift substitution cipher (i.e. if you press the same letter on the keyboard twice, you don't get the same two letters produced as output). The machine was interesting because it could be used to both encipher and decipher using the same settings - the operator at the other end set his rotors to the same position as those in the sender's machine, and typed in the ciphertext to produce the plaintext.

Please note that this page is intended to be a demonstration of how an Enigma machine worked - an illustration of the complexity of the substitution and the symmetry of the encryption/decryption process - rather than a historically-accurate device for deciphering original war-time documents.

You can read about, and try, some simpler substitution ciphers in the Interactive section.

How it works

My Enigma machine emulator can be use to both encrypt and decrypt messages, provided both sender and receiver use the same rotor positions to start with. When you start the emulator, you will be asked to choose three rotors from the full set of eight that were used in the three-rotor Enigma, together with their starting positions. You will also need to choose one of the four possible reflectors.

To successfully decrypt a message, click the Reset button at the bottom right of the keyboard and enter the same rotor settings again. If you have any trouble working the Enigma, send an e-mail message to andrew@[this domain].

In a real Enigma machine, a extra level of complexity can be added by using the plugboard - a set of cables and sockets that can be used to re-map the keys on the keyboard. This has been omitted from my version, but will be added as soon as I get time!

Enigma MachineEnigma Machine Enigma MachineEnigma Machine Enigma MachineEnigma Machine Enigma MachineEnigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine Enigma Machine
X
Q W E R T Z U I O A S D F G H J K P Y X C V B N M L Reset

Enigma Settings

To set up the Enigma machine, you must select the three rotors (from a set of eight) and reflector to be used, and then choose the starting positions for each rotor.

Rotors UsedRotor Positions
1st position: 1st rotor:
2nd position: 2nd rotor:
3rd position: 3rd rotor:

Use reflector: