Question
This assignments a continuation of lab 2. Here is my lab 2's code. #include using namespace std; typedef long long ll; ll calculate(ll a,ll k,ll
This assignments a continuation of lab 2. Here is my lab 2's code.
#include For lab 3, write a program to decode a message using public key cryptography based on the RSA cipher. Use the code you wrote in Lab2 to calculate the residues. The input will be a list of 1, 2 or 3 digit numbers with spaces in between Each number will correspond to an ASCII character. The list may contain up to 100 numbers. Your program should accept a command line argument (see file below) that is the name of the file where the encrypted message is stored. In other words, I will test the program by invoking the following command: >yourprog testfile The output of this program will be your name followed by the decrypted message. Decrypt the message using the formula M =C d mod pq. The parameters needed to do this are specified in the beginning of the test file. The decoded message will be the ASCII characters corresponding to the decimal values calculated using the formula above. The messages are all somewhat famous quotes followed by the name of the person who said them. Your program should print out the decoded message. Make sure there are no extraneous characters.
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