Simulates an Enigma-I machine in Haskell.
I developed this after watching the great movie "The Imitation Game" to gain a deeper knowledge of how the Enigma-I machine worked. This project is NOT meant to glorify Nazi-technology.
The Enigma machine is an encryption device developed and used in the early- to mid-20th century to protect commercial, diplomatic and military communication. It was employed extensively by Nazi Germany during World War II, in all branches of the German military. https://en.wikipedia.org/wiki/Enigma_machine
./Enigma.hs "[Rotors] [Grundstellung] [Rings] [Plugboard]" "Text_to_encrypt/decrypt"
Example:
From https://de.wikipedia.org/wiki/Enigma_(Maschine)
./Enigma.hs "I,IV,III 18,20,26 16,26,8 AD CN ET FL GI JV KZ PU QY WX" \
"DASOBERKOMMANDODERWEHRMAQTGIBTBEKANNTXAACHENXAACHENXISTGERETTET"
> "LJPQH SVDWC LYXZQ FXHIU VWDJO BJNZX RCWEO TVNJC IONTF QNSXW ISXKH JDAGD JVA"
./Enigma.hs "I,IV,III 18,20,26 16,26,8 AD CN ET FL GI JV KZ PU QY WX" \
"LJPQH SVDWC LYXZQ FXHIU VWDJO BJNZX RCWEO TVNJC IONTF QNSXW ISXKH JDAGD JVA"
> "DASOB ERKOM MANDO DERWE HRMAQ TGIBT BEKAN NTXAA CHENX AACHE NXIST GERET TET"