To start the program, open your cmd or terminal and change the current working directory to the location where you want to clone the repository. Then clone the repo.
The repository consists of 5 files.
- cw1.py: This is the main Enigma file. Users will run this file.
- plugboard.py: Plugboards are stored in this file.
- rotor.py: Rotors and reflectors are stored in this file.
- test.txt: text file to test the import file feature
- CW1_report.pdf: detailed report on the program
PRE-REQUISITES Programming Language: Python 3.9.7
HOW TO USE THE CODE?
After cloning the repository, run the “cw1.py” file. Once the program starts, it will first print out a menu to the user to choose whether to decrypt or encrypt a message. To make the code have a coherent flow sequence, the menu is showed every time after the user executes a selection, he/she can end the program by selecting the option that ends it. After choosing whether to decrypt or encrypt a message, below are the steps that will follow:
- Choose 3 rotors by order.
- Choose a reflector.
- Choose the starting point of the 3 rotors.
- Choose whether you want to use a plugboard or not.
- If yes, choose whether you want a preset one or you want to configure one.
- If a preset one, you choose one.
- If you want to configure one, you enter your pairings.
- If yes, choose whether you want a preset one or you want to configure one.
- Choose whether you want to encrypt/decrypt a typed message or an imported file.
- If a typed message, enter your message.
- If an imported file, enter the file name.
- Choose whether you want to save the output in a file or not.
- If yes, enter a filename.