Question: For example, Caesar's cipher can have a code book below ( the key value is 3 ) . Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC If the key
For example, Caesar's cipher can have a code book below the key value is
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC
If the key value is selected in the substitution cipher, the string "APPLE" can be
encrypted into "ETTPI" as shown below.
Your task is to write an MIPS assembly language program to encrypt a plaintext string,
assuming that the key is
Your program should meet the following requirements:
Prompt for and read an input string. Initially, the input string can be stored in a
static space allocated in the main memory.
Prompt to read the cipher key integer and store it in a register.
The input consists of a string that contains only uppercase letters without other
characters or special characters such as lowercase, spaces, periods, etc.
Write a function to dynamically allocate memory to hold and encrypt the output
string, which is the same length as the input string. Note: use stack to store the
parameters in the function $ for the address for the input string, $ for the
cipher key, and $ra for the value of $ra register, refer to the previous lab.
Write a function to displayprint the content in the dynamically allocated memory.
Write a function to calculate the length of the input string and show the length of
the dynamically allocated string.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
