[Solved]Java Python C Project Topic Implementing Rsa Cryptosystem Programming Project 1 Overview O Q37111545
Java/ Python/C++ project
Topic: Implementing RSA Cryptosystem Programming Project:
1 Overview
The objective of this project is to implement components of theRSA cryptosystem. You will implement three modules that make upthis cryptosystem.
Key setup:
This module will compute and output the keys: public andprivate. The keys will be output to two separate files namedpublic_key and private_key..
Encryption:This module will take the public key and a message tobe encrypted as the inputs. They will be read from the files publickey and message , respectively. The module will output theciphertext (encrypted message) which will be stored in a file namedciphertext .
Decryption: This module will take the public key, the privatekey and the ciphertext to be decrypted as the inputs. They will beread from the files public key, private key and ciphertext ,respectively. The module will output the decrypted message andstore it in a file named decrypted message.
In the project you will have to do computations on very largeintegers (at least 200-digit numbers in decimal). Therefore, youwill need do use a language with built in large integers (such asPython) or use existing large integer package (such as PARI/GP).You can also choose to implement your own large integer arithmeticpackage.
2 Key setup
To compute the keys you need to implement a modularexponentiation algorithm, that is, an algorithm that inputsintegers x , a and n , and returns x a (mod n ) . . Modularexponentiation will also be used in encryption and decryptionmodules.
You will need to implement an algorithm to generate large primenumbers. Two key components of that algorithm are: (1) an algorithmto generate large integers at random, and (2) a primality testingalgorithm. You can use Fermat Primality Test or Miller-RabinPrimality Test.Finally, you will have to implement the ExtendedEuclid Algorithm, needed to compute multiplicative inverses.To setup a public key you will generate two different prime numbers p andq with at least 100 decimal digits each, and making sure thedifference between them is at least 10 95 .
Next you will compute n = pq and choose an integer e relativelyprime to ( p − 1)(q − 1) . Usually,e = 2 16 + 1 = 65537 is a goodchoice (you will need to check that it works). At this point yourpublic key ( n, e) is ready. To compute the private key d you willapply the Extended Euclid Algorithm to compute d= e − 1 (mod ( p−1)(q −1)).
3 Encryption and Decryption
The message to be encrypted will appear as a sequence of digits(an integer with 150 decimal digits. You will encrypt it using thepublic key and the modular exponentiation algorithm To decrypt theciphertext, you will use the private key and apply the modularexponentiation algorithm.
4 Programming languages/systems
To write your program you have to use one of the followingprogramming languages: Python, C/C++, or Java. Python and Java havelarge-number arithmetic built in. Examples of C librariesimplementing large-number arithmetic are: PARI/GP (available athttp://pari.math.u-bordeaux.fr/) and GMP (available atttp://gmplib.org/).You cannot use source code for any components ofthis project from the web or elsewhere.
If you use C/C++, you should use OpenStack ubuntu virtualmachine (the common choice in other CS
classes) to write and compile the source code. If you use Javaor Python, use Java 1.8, python 2.7.12 or python 3.5.2.
5 Documentation
Submit a single .zip file which should contain the followingfiles:
•A narrative report (in pdf format) describing how your programworks and what algorithms you implemented. List the majorcomponents of the program and explain how they fit together.
Describe how you tested the program and how you verified itscorrectness. Write about the problems that you encountered and howyou overcame them. If your program does not work correctly, explainwhat parts do not work and what parts you believe work correctly.The report should also contain
compilation and execution instructions for your program.
• The source code for all modules implemented, thoroughlydocumented. In each module explain the functionality of the module(what is the input and the output). Describe in comments allimportant variables.
• The results of a test run for the message (a single integer of150 digits):111111111111111222222222222222333333333333333444444444444444555555555555555
666666666666666777777777777777888888888888888999999999999999000000000000000
as plaintext. The results of the test should be documented byincluding the files public key , private key, message , ciphertextand decrypted message as described in the Overview Section.
Expert Answer
Answer to Java/ Python/C++ project Topic: Implementing RSA Cryptosystem Programming Project: 1 Overview The objective of this proj… . . .
OR

