Enigma Machine Settings
This page briefly describes the Enigma Machine and the settings that can be changed.
This article is not a comprehensive explaination on how the Enigma Machine works.
For some information about the Enigma, see these articles and videos (they're also my sources):
- en.wikipedia.org/wiki/Enigma_machine
- en.wikipedia.org/wiki/Enigma_rotor_details
- enigma.louisedade.co.uk/howitworks.html
- And a couple of very good videos by Numberphile
Enigma Machine Translation
There are 4 parts to an Enigma Machine encryption- A rotor: each rotor maps characters in a specific way. They can be rotated (hence the name rotors) and switched with other rotors.
- A reflector: a reflector is like a rotor but it does not rotate. They can also be switched around.
- A plugboard: a plugboard maps each letter to another. The person setting up the Enigma machine chooses the mappings.
Parts
Rotors
The Enigma Machine (M3 Army version) has three slots for rotors. Each slot can take one of these rotors:Rotor name | Rotor mapping |
---|---|
I | |
II | |
III | |
IV | |
V | |
VI | |
VII | |
VIII |
Reflector
Reflector name | Mapping |
---|---|
Reflector A | |
Reflector B | |
Reflector C |
Plugboard
Any two letters can be paired togetherSyntax of settings
Settings for a particular part of the machine are specified between < and >.Different parts can be separated by spaces, tabs, or newlines. Newer settings completely override older ones (even plugboard settings)
Rotors
A rotors is specified with < name of rotor : position : starting rotation >. Where- name of rotor: the name of the rotor to place in. Has to be one I, II, III IV, V, VI, or VII
- position: the position in the machine. Must be between 1 and 3 (inclusive)
- starting rotation: the starting rotation of the new rotor. Has to be a capital letter
Reflector
A reflector is specified with < reflector name > where reflector name is one of Reflector A, Reflector B, or Reflector C.Plugboard
The plugboard is specified with < (c1, c2) (c3, c4) ... >. Where- (c1, c2) is a pair of (uppercase) characters. A character should only appear once in the part
Implementation Details
Enigma settings can be represented by a regular language so the parser is simply this DFA implementation.
Last updated: August 2015 by John Rizkalla