Question
The Enigma was a machine used in World War II to encrypt and decipher (decrypt) messages. Assignment is to create a simple version that would
The Enigma was a machine used in World War II to encrypt and decipher (decrypt) messages. Assignment is to create a simple version that would allow the user to: Enter a non-repeating (no alphabets repeated), 8-letter alphabetical keyword (e.g. spectrum, yourself, asdfghjk) BUT NOT (students, programs, asdfasdf). enter a key-number between 2 and 9. encrypt one character at a time. decipher one character at a time. The keyword and key-number generates two ciphers. Cipher 1 (C1) is generated by putting the keyword at the start, followed by the remaining alphabets (in order). For example, keyword= YOURSELF: Input text : ABCD EFGH IJKL MNOP QRST UVWX YZ C1s output : YOUR SELF ABCD GHIJ KMNP QTVW XZ Cipher 2 (C2) is generated by rotating right C1 by the key-number amount. For example, keynumber= 7: Input text : ABCD EFGH IJKL MNOP QRST UVWX YZ C2s output : PQTV WXZY OURS ELFA BCDG HIJK MN Each character entered is encrypted with C1or C2. C1is for odd-numbered input (1st, 3rd, 5th, etc. character). C2is for even-numbered input (2nd, 4th, 6th, etc. character). Example (keyword= YOURSELF, key-number= 7): Alphabet input : ABCD EFGH IJKL MNOP QRST UVWX YZ C1s output : YOUR SELF ABCD GHIJ KMNP QTVW XZ C2s output : PQTV WXZY OURS ELFA BCDG HIJK MN Therefore: What you typed in: HELLO BIG BLUE WORLD What the system displays: FWDSI QAZ OSQW VFMSR Create two separate files for encrypting and decrypting
Do this in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started