Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(C++) Hello, write this code in C++ Also, give an explanation for the last sentences of this instruction please!! Thanks, 2) RSA Encryptionn One place

(C++) Hello, write this code in C++

Also, give an explanation for the last sentences of this instruction please!! Thanks,

image text in transcribed

image text in transcribed

2) RSA Encryptionn One place the greatest common divisor is used is in encryption schemes. RSA encryption is one common encryption scheme. It uses the following steps If I want you to send me an encrypted message, I take any two relatively large prime numbers p and q (we'll use 11 and 17 for this example, although the primes actually used are much larger) and multiply them together to get n = pq: 187 1. 2. I next take any number e with the property that gcd(e, (p - 1)(q-1))1. (e.g., e = 3 works since gcd(3, (11-1) * (17-1))-1.) 3. I send you e and n To send me an encrypted message you take your message, assign numerical equivalents to each character, and then encrypt these numerical equivalents by C ae mod n. You then send the results. (The real algorithm actually takes groups of letters, rather than single letters at a time; however, we are asking you to simplify this by encoding each letter separately.) 4. Example: S TP 19 20 15 16 193 mod 187 127 203 mod 187146 153 mod 187 = 6 163 mod 187 169 Write two functions: 1. A function check_epq that, given e and prime numbers p, and q, checks whether (You can assume p and q are prime here.) Hint: use your ged function from gcd(eKp-1X4-1))-1 the previous problem. 2. A function char_to_number that takes in an upper case alphabetic character, and returns an integer

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What fraction of a sample is left after exactly 6 half-lives?

Answered: 1 week ago

Question

What are the steps that the EEOC uses once a charge is filed?

Answered: 1 week ago

Question

What would you do?

Answered: 1 week ago