Practical Cryptography: "Enigma Cipher"
Read this page, which discusses the Enigma Cipher. Go through the JavaScript example and read about mathematical description.
Click http://practicalcryptography.com/ciphers/mechanical-era/enigma/ link to open resource.