- Getting_Started
- Compiling
- Run_Enigma
- Basic Function
- Costumize Key
- Feature
- Unit Test
- Rotorsettings
- For linux and Mac
- gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
- GUN Make 4.1
Clone this repo by using
$ git clone https://github.com/zlxlty/Enigma_Machine.git
Enter the src folder and type in
$ make
Delete all the object files by using
$ make clean_objs
To use the encryption function in Enigma simulator, you just have to compile first and use terminal and type in:
$ make run_fe
To use the decryption function, type in
$ make run_fd
Type in - to end the program
Use
$ make run_e
to encrypt with your own key. Similarly, use
$ make run_d
for decryption
As most of other ciphers, Enigma requires key to encrypt and and decrypt messages
I am simulating an early version of Enigma which has three keys:
- The Sequence of
Rotors: A three-digit number made up of123 - The initial position of each
Rotor: Three English letters - The settings of
Plugboard: Six pairs of letters
There is no need for you to know all the theories and processes behind the mechanism of Enigma Machine. If you are interested, you can go to this website for more information
#define _LINKED_DEBUG_ 0
#define _ROTORS_DEBUG_ 0
#define _GROUP_DEBUG_ 0
#define _INPUT_DEBUG_ 0
#define _MAIN_DEBUG_ 0
#define _MAIN_ 1Each source file has a unit test controlled by macro in settings.h. To activate a unit test, just change the corresponding macro to 1.
The configuration of the rotors are as follow:
#define _plugboard "AHLOCJKXWERO"
#define _rotor1 "AJDKSIRUXBLHWTMCQGZNPYFVOE"
#define _rotor2 "EKMFLGDQVZNTOWYHXUSPAIBRCJ"
#define _rotor3 "BDFHJLCPRTXVZNYEIWGAKMUSQO"
#define _rotor4 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define _reflector "YRUHQSLDPXNGOKMIEBFZCWVJAT"
#define _alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZ"| Author | Tianyi Lu |
|---|---|
| lus2@carleton.edu |