A generalized software model of the Enigma electro-mechanical rotor cipher machines used by Germans in WWII.