Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ forehand e receiver creates a public key and a secret key as follows. Generate two distinct primes, p andq. Since they can be

image text in transcribedUse C++

forehand e receiver creates a public key and a secret key as follows. Generate two distinct primes, p andq. Since they can be used to generate the secret key, they must be kept hidden. Let n-pg, phi(n) ((p-1)*(q-1) Select an integer e such that gcd(e, (p-100g-1))-1. The public key is the pair (e,n). This should be distributed widely. Compute d such that d-l(mod (p-1)(q-1). This can be done using the pulverizer. The secret key is the pair (d.n). This should be kept hidden Encoding: iven a messagem, the sender first checks thatgcd(m,n)-1.The sender then encrypts message m to produce m using the public key: ing: receiver decrypts message m' back to message m using the secret key: mrem(m'Y.n) Develop an application that will implement the RSA cryptosystem. Inputs: 1. Two prime numbers: p andg 2. The message to be encrypted (this is an integer): m Required features:+ 1. An independentmethod that could be used to compute gcdof two numbers using the Euclidean algorithm: geda,b)=gcd(b, rem(a,b))- 2. Ability to find the values of two integers s and tSuch that gcd(a,b) = sa +tb . This should be implemented as an independent method. This method is the Pulverizer or the Extended Euclidean algorithm 3. Compute the public and private keys. You need to think about an intelligent way to utilize the routines that you have developed in Step 1 and Step 2. 4. Perform encryption and decryption. 5. The application should print the encrypted message on the output screen and should also verify that decryption actually reproduce the original message 6. Your application should NOT be using any built in libraries. 7. Use the (%) operator to compute the remainder,d 8. You may compute rem a.b) using successive squaring as explained in an example on page 107 of the textbook. For example, all the congruences below hold modulo 17- 62 362 2 615-8-64-62-6-16-42-#23

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

What are the eligibility criteria for SBIC funding?

Answered: 1 week ago