Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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