Question: Write a C program to implement RSA Cryptosystem and demonstrate the encryption/decryption of the input plaintext message of upto a maximum of 20 characters. The

Write a C program to implement RSA Cryptosystem and demonstrate the encryption/decryption of the input plaintext message of upto a maximum of 20 characters. The program then asks the user to input the following and does appropriate validation of the input as per the requirements of the RSA algorithm before proceeding further with encryption: (1) the prime factors p and q (data type long) and the encryption exponent e. Obviously, as part of the design your program must also compute the (a) Euler's Totient function phi(n), (b) check whether gcd(e, phi (n)) = 1 and (c) compute the decryption key (d, n) such that d = e^-1 mod phi (n) (d to be computed using the Extended Euclidean algorithm to find inverse). The program must output the computed ciphertext and then decrypt the ciphertext and print the decrypted plaintext message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
