TOPICS
Search

Enigma Machine


an Enigma machine in its open wooden case

The Enigma machine is an electromechanical device for cryptography whose letter enciphering rule changes as its rotors move. At each fixed rotor state, it acts as a permutation of the 26 letters of the alphabet (Rejewski 1980). The photograph above is courtesy of the Central Intelligence Agency (2011).

EnigmaSignalPath

Let Q be the permutation carrying a keyboard letter through the plugboard and rotors to the reflector, and let R be the reflector's permutation. The reflector pairs the 26 letters, so R is a permutation involution with no fixed points. The return path applies the inverse permutation Q^(-1), giving the enciphering permutation

 E=Q^(-1)RQ,

with function composition evaluated from right to left. The permutations E and R are conjugate elements, so E(E(x))=x and E(x)!=x for every letter x (Rejewski 1980). No letter enciphers to itself, a restriction that can rule out proposed alignments of plaintext and ciphertext. Rotor motion changes Q between keystrokes. Decryption therefore requires reproducing the same sequence of rotor states, starting from matching initial settings (Grime, pp. 1-4).

close-up of the Enigma keyboard and lampboard

The close-up above shows the keyboard below the lampboard (Central Intelligence Agency 2011).

A plugboard joins letters in pairs, each acting as a transposition, and leaves the remaining letters unchanged. For an alphabet of n letters, the number of arrangements with exactly k pairs is

 B(n,k)=(n!)/((n-2k)!2^kk!)

for a positive integer n and a nonnegative integer k with 2k<=n. This follows by selecting and ordering 2k letters, then removing the ordering of the k pairs and of the two letters in each pair (Grime, pp. 3-4).

With three ordered rotors chosen from five, 26 initial positions per rotor, and ten plugboard pairs, the number of settings is 60×26^3B(26,10)=158962555217826360000 (Grime, pp. 3-4). The reflector and rotor ring settings are held fixed in this count.


See also

Conjugate Element, Cryptography, Permutation Involution, Transposition

Explore with Wolfram|Alpha

References

101 Computing. "Enigma Machine Emulator." Apr. 22, 2019. https://www.101computing.net/enigma-machine-emulator/.Central Intelligence Agency. "Enigma Machine." 2011. https://commons.wikimedia.org/wiki/File:Enigma-Machine.jpg and https://commons.wikimedia.org/wiki/File:Enigma_Machine_-_Flickr_-_The_Central_Intelligence_Agency_(2).jpg.Cryptii. "The Enigma Machine: Encrypt and Decrypt Online." https://cryptii.com/pipes/enigma-machine/.Grime, J. Maths from the Talk "Alan Turing and the Enigma Machine." https://www.singingbanana.com/enigmaproject/maths.pdf.Numberphile. "158,962,555,217,826,360,000 (Enigma Machine)." Jan. 10, 2013. https://www.youtube.com/watch?v=G2_Q9FoD-oQ.Numberphile. "Flaw in the Enigma Code." Jan. 14, 2013. https://www.youtube.com/watch?v=V4V2bpZlqx8.Rejewski, M. "An Application of the Theory of Permutations in Breaking the Enigma Cipher." Appl. Math. 16, 543-559, 1980. https://doi.org/10.4064/am-16-4-543-559.Veritasium. "The Insane Real Engineering of the Nazi Enigma Machine." Sep. 21, 2026. https://www.youtube.com/watch?v=JsBZOcqZerk.

Cite this as:

Weisstein, Eric W. "Enigma Machine." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/EnigmaMachine.html

Subject classifications