Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Dear Chegg Management I made a requst couple time for this solution, then I cannot get any positive answer. Please if your exppert does not

Dear Chegg Management I made a requst couple time for this solution, then I cannot get any positive answer. Please if your exppert does not know the answer, just say our expert doesnot know the answer, then I will try different way. Because my project due is tonight 11:50. This is so hard for a student.

Dear Expert

Can I get an answer for this problem please(as early as posible), with input and output part.

Write a program called "RSA.java" to implement RSA encryption/decryption.

Specifically, your program should read several parameters, plaintext and ciphertext from a file named input.txt (in the same directory). Then your program should create a file named output.txt (in the same directory) and prints the private key information, encryption, and decryption results to output.txt. (Please check the attached sample files input.txt and output.txt.) For input.txt file: The first line is a prime number p (Hint: You may need use BigInteger datatype)

The second line is another prime number q

The third line is a randomly selected integer e, satisfying gcd(e, (n)) = 1, where (n) = ( p-1 ) * ( q-1 )

The fourth line is the plaintext M

The fifth line is the ciphertext C

For output.txt file: The first line is d satisfying ed mod (n) = 1

The second line is the ciphertext of the plaintext M in input.txt

The third line is the plaintext of the ciphertext C in input.txt

..........................................................................

............ I cannot attach the .txt files, so i pasted the input.txt and output.txt files details in here. And line is so long so I separated by line no(line 1) also mantion p,q,e,M, and C Input.txt.............. line 1, p.......> e1d7e3ba16e8ffd2c58e403eb4facebc3a5fbd4d39b364da6eb7a82ad9306f605e53e8a484f43bd0a40fdb15aa63800271e575d9963d3f2a88da9a4d960ee7db linw 2, q......> e15bd0aa10fba6323c8a1d8959f236288d9f869cdef29f457e1fde10a513af33cf578a9717dd086f1ce343216ede760ab5dfa0057201ec4b6b287f21bb6a4c65 line 3, e......> b0723482dc4678c2dcca49176129e5fed171b42e3849c842752d7286de7bcb1d808f690979b3f2745f2a61ee5aaf83d299946605cf7b6e42a777fcee3124048a12373f2f513816cae4bd00b9afceb656a903a2d5208f0bf28bafc81bd29da3065c376ac6cc049f8082c19d5f550a141e1e3c7148f5cc7bbef258033fe91133ab line4, M....> c2cf8c3af8bac876e9134055a6a145ef09d64256c03f02e347b23a1d0b5d7f0c9bcaf0bc019d61622cf8f1260f2ef99fb379bc496d655d40346eb8ba13b9d14698703906da4550dee64f672bd3c553cc32f9efe2481b69cf71830f33126fcb11dfba1f1922e5777098d8950575288cfc8714cb12c417214ae9c25fc6afbeb827 line 5,C.......> fd0238a390f11a9d55cc648650b4dba70914ec8c5d15a5dd42b4c83bbd705a71af9d36b4be4cdaa6566e817c6f52d6b2aec59a872230ca4cd9d4dc39279ab717be6eaae38c59cd4a760eb0bed04673de1aae4ea7c84c2dacdb472c89ff58dc124a5fd10257f2499b321a6e230b4bed4a0d7543e36ca173607119133eb92a099 output.txt.......... line 1, d........> 3b4037b2405e9bd648dd3b04b8898015cac68ee3c0639309045165522f52ae160ee8cb20f2c1617913bf224d19cacf4b0888bbddd76726a780f6e03529adf028663a49b5f7212858fa01780e3576f018c5c3e5572b80de5f69e88b97d10ce271469c275b91250de401a5578c03326968521a9eee962dad1c6c07078e12236a43 line 2, M.....> 2458dee5ab1154edba92fb03368c2dceeb5e1f202367079850602e1a12d25a8527b0b6c2634056da1685aa13d383b141eceae6fc122f0ded733380180875f49ae0a4ed026010f7ca5b50aee7a11f5d25d8d1e80cf3c7b8fe01725464bb66b7dcfdeb41a7ce4b388f4bdbd6b6d4b2c6916022d71244e7cda78ca4b9c43c805b7e line 3, C.......> bb102c7be74f6395ad9392b97044dc8192476e1917f4dd18a1aa036a081d206184d27cce86c83959bcbc05c5b0f019c8674bae2592aee9ad9ede76c5df5769f74acf54c34053f70d991e11dc25fb33807e05150470fa817eddc1e7517ef3964d579b27845249828fd4af988aeb5b5df2333850c918c4db04cfaf9eb13ee8956f

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions