A long time ago (1987, I think) I wrote an Enigma program.
The Unix system at the time had a program called "crypt" which was an implementation with a single rotor.
To make it easy to use, it generated mappings for all the ASCII characters in its "wheel", and included the reverse mapping in the same wheel.
So you could encrypt something with a password, then take the encrypted data and feed it back into the same program, with the same password, to recover the original text.
I became interested in it when one of the salesmen at our company (probably the best salesman) had a falling out with the owners.
After he left one of the owners came to me and asked what I knew about crypt. Seems that he had encrypted all of his sales lead data and was refusing to give them the password.
Talking to him later, I found out that the falling out was over a big sale he landed, and he didn't get the (sizable) commission on it, they told him there was a cap (never mentioned before).
He was willing to give them the password if they had paid his commission.
Anyway... I did some digging, and found out that it was possible to break the encryption if you had enough data.
Since it was encoding ASCII, there were only 256 characters, and the rotor did a complete "revolution" with 256 characters input, then repeated the same mapping.
So if you took blocks of 256 characters, with enough of them and assuming the character distribution for the language, you could relatively easily work out the mapping.
George didn't leave enough big files to make that viable, so I never managed to break his encryption.
But it made me interested in writing my own.
What I ended up with was three rotors, but I didn't do reverse mappings.
The mappings were defined by a random number generator using a seed derived from the password.
When encrypting, rather than moving the first wheel on notch, and doing an odometer type of progression, I rotated each rotor randomly selected a random number of notches (0 1 or 2), derived from the random number generator.
To decrypt it used an option (or later, just a different name -- link) to generate reverse mappings for the rotors.
If anyone is interested in the source, let me know and I will dig out a copy.
So without the random rotor increment, it would have not repeated its mapping for 256*256*256 = 16,777,216 characters, and a darn sight more once you throw in the randomization.