Loading...

ROTOR MACHINE CIPHER IMPLEMENTATION

Open Posted By: ahmad8858 Date: 12/10/2020 High School Rewriting & Paraphrasing

  1) Using any programming language of your choice implement the encryption scheme that uses a simple two cylinder rotor machine. It is not necessary to implement the decryption scheme [50 marks] Please note that your submission is expected to run on IRIS. Please ensure that you use a programming language that is compatible with IRIS and also ensure the program can run on IRIS before submitting it 2) Specifications: The program should start by randomly generating the mappings for the inner and outer cylinders, with the inner cylinder rotating faster than the outer cylinder. You can use any data structure to implement the cylinders but a “map” data structure is recommended. The program should then prompt the user for an input string to encrypt. When the user presses the enter, the program should validate and encrypt the input string. Validation would mean that the string is well formed and is not a command. It should then output the encrypted text and prompt the user for another text value. The cylinders should update their state after each character encryption. At any time, the user should be able to enter a predefined string to exit the program. The program should also contain a sub-routine that prints out the current state of the cylinders by entering a predefined command at the prompt. Example output might look like: Inner Cylinder 25 ↔ 4 6 ↔ 11 . . Outer Cylinder 13 ↔ 12 12 ↔ 24 . . In coding the above, please note the following • White space, numeric and special characters should not be encrypted. Simply output whitespace, numeric and special characters into the ciphertext • You can write your code to be case insensitive – convert all input to lower case 3) What can you say about the computational complexity of your algorithm relative to the size of the input string? [10 marks] Test 1 [10 marks] 1) Output the state of your cylinders. 2) Encrypt the string “A” and output its encrypted value. 3) Output the state of your cylinders. Test 2 [15 marks] 1) Output the state of your cylinders. 2) Encrypt the string “EE” and output its encrypted value. 3) Output the state of your cylinders. 4) Is a rotor machine a monoalphabetic or polyalphabetic cipher? Comment based on the results above. Test 3 [15 marks] 1) Output the state of your cylinders. 2) Encrypt the string “Mr. Jock, TV quiz PhD, bags few lynx” and output its encrypted value. 3) Output the state of your cylinders. 4) Comment on the state of your cylinders before and after encryption. Please provide an explanation for what you observe. Submission 1) Submit the following documents separately in Blackboard by the deadline. NO ZIPPED FILES ALLOWED 1) All your code files 2) A detailed README file, which should explain how to run the code with sample input and output. If you are unfamiliar with READMEs you can find an introduction here https://www.makeareadme.com/ , here https://medium.com/@meakaakka/a-beginners-guide-to-writing-a-kickassreadme-7ac01da88ab3 and here v=RZ5vduluea4. Note that the README file you

submit for this project need not be complex, it only needs to at least explain how

to compile the code and run the code with examples. [5 marks]

3) A MAKEFILE that automates the building/compiling of your code. If you are

unfamiliar with Makefiles you can get a quick introduction here

https://www.youtube.com/watch?v=vye0kV5gvkA and here

https://swcarpentry.github.io/make-novice/02-makefiles/. Note that the exact

structure of your makefile will depend on the programming language you are

using, so you may choose to find an example specific to you. The Makefile you

create for this assignment need not be complicated. It only needs to define the

TARGET, its DEPENDENCIES, if any and the COMMAND to create the target

executable. [5 marks]

4) A report (which should include your answer to Question 3 and your test results

with screen shots)

Category: Arts & Education Subjects: English literature Deadline: 12 Hours Budget: $150 - $300 Pages: 3-6 Pages (Medium Assignment)