Question: Objective: create ciphertext (encrypt) and decrypt a message using ARM assembly, in the process the student will learn to process commands, encryption vector and utilize

Objective: create ciphertext (encrypt) and decrypt a message using ARM assembly, in the process the student will learn to process commands, encryption vector and utilize stack for functions and the heap for arrays, create output files and write the resulting string to output file, and to the console (stdout).

1. Use ARM assembly to display a menu for the user to select encrypt or decrypt the input file and solicit the user to enter encryption key vector. then the program must read string of ASCII characters from the input file and save it into dynamically allocated array in memory (Not static array allocation). 2. Exclusive OR (XOR) encryption vector with each character of the message string and create a cipher text (encrypted) string of the input file text and write the new encrypted string to an output file in the same directory of the program and display on the console(stdout) as well.

Implementation: 1. Open a text file, write a paragraph or few sentences and save the file. 2. Display a menu on the console asking the user to select encrypt or decrypt the content of the input file. Once the user selected an option then, 3. The program should as the user to enter encryption/decryption vector (value) to be used as the key. The vector value should be in the range of 1 to 127 inclusive, any other value entered must be considered as an error, and the system must display a message to the user indicating that the acceptable range is from 1 to 127. 4. The program then will open the input file and read the content into dynamically allocated array/buffer, then create another dynamic array for output, XOR the content of input array with the key and write to the output buffer. 5. Once the process is completed, the program must create/open an output file, and write the content of output array to the output file and to the console (stdout). 6. One the previous steps are completed, the program must free the dynamically allocated memory, then close both input and output files, display a message to the effect file encryption completed (if user selection was encryption), other the message will indicate file decryption is completed. 7. Once an encrypted file is created, it must be used as an input file, and by selecting decrypt from the menu and use the same key, it must generate output file and, on the console, exactly the original file text.

Your assembly program must have proper comments, and the assembly statements should not use literals, instead defined symbols. Functions and stack must be used in the implementation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!