nick jackson 0 Newbie Poster

write a Bash script file that implement the RSA algorithm. The user has to enter on the
command line some parameters and options, which will determine the behaviors of the script.
The syntax of the shell command is
$ your-shell-file-name –p<file> –q<file> –e|-d [-i <filename>]
[-o <filename>]
OR
$ your-shell-file-name –h
Which displays a help message indicating the usage of the command (syntax) and the
meaning of options.
Following are the options that need to be supported in your script:
 -p<file> : filename which contains the first prime number, p. It should be at least 5 digits
 -q<file>: filename which contains the second prime number, q. It should be at least 5 digits
 -e: encrypt the specified input
 -d: decrypt the specified input
 -h: display a help/usage message for running the script
 -i <input file> : input file that contains plaintext (optional). If not specified, the default is
in.txt
 -o <outputfile> : output file to store ciphertext (optional). If not specified use standard
output
Your output should display the public key, the private key, the original (input) message, the
modified (output) message. In addition, the script should also measure the execution time of your
implementation