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

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

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!