Question: A simple ROT encryption can be used to obfuscate a string of characters by adding a number to each character, called the key. Here

A simple ROT encryption can be used to obfuscate a string of

 

A simple ROT encryption can be used to obfuscate a string of characters by adding a number to each character, called the key. Here is a C++ function definition for the function encryptROT(). The function uses pass by reference, and forces the encrypted string to remain in the ASCII printable character range. // Preconditions: string s, int key // Postconditions: encrypted s void encryptROT (string & s, int key) { for (int i = 0; i < s.length(); i++) { s[i] (s[i] + key) 8 128; if (s[i] < 33) { } s[i] = s[i] + 33; Develop an x86 assembly implementation for the procedure encryptROT() shown above. Also develop a simple assembly driver program that calls the function so you can test it. You may use windows32 or console32 templates. Provide screenshots of memory to prove that your function executes correctly. Do not violate the function prototype. If you use windows32, show your input and output strings. If you use console32 (recommended), you can hard code a test string in the .DATA section and write the output to memory. Show your memory screenshot of the obfuscated string. Show all of your code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the assembly implementation of the encryptROT function along with a simple assembly driver program that calls the function assembly encryptROT function section text encryptROT push ebp mov ebp e... View full answer

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 Programming Questions!