Question: Specifications: In this project, you are required to write the java program RSA . java to implement RSA. Specifically, your program reads the parameters, plaintext
Specifications:
In this project, you are required to write the java program RSAjava to implement RSA.
Specifically, your program reads the parameters, plaintext and ciphertext from a file named
inputtxtunder the same directory of the program Then your program computes the private
key, encrypts the plaintext, and decrypts the ciphertext. Finally, your program creates a file
named outputtxtunder the same directory of the program and writes the results to
outputtxt Please check the attached sample files inputtxt and outputtxt
In inputtxt:
First line is a prime number p represented by hexadecimal digits.
Second line is another prime number q represented by hexadecimal digits.
Third line is a randomly selected integer e represented by hexadecimal digits, satisfying
GCDe
n where n p q
Fourth line is the plaintext, represented by hexadecimal digits.
Fifth line is the ciphertext, represented by hexadecimal digits.
In outputtxt:
First line is d represented by hexadecimal digits, satisfying d e mod
n
Second line is the ciphertext, presented by hexadecimal digits, which is the encryption
result of the plaintext in input.txt
Third line is the plaintext, presented by hexadecimal digits, which is the decryption result of the ciphertext in input.txt
It will be tested using command line.
First, the files inputtxt and RSAjava will be placed under the same directory A new
input.txt file which is different than the sample data will be used to test your program
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
