Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let us implement a simple python program to show us how the public-key algorithm called RSA works. To generate the two keys, choose two random

image text in transcribedimage text in transcribed

Let us implement a simple python program to show us how the public-key algorithm called RSA works. To generate the two keys, choose two random large prime numbers p and q. For simplicity of calculation in our lab, let's assume small prime numbers such as; p=47q=71 Then calculate: n=pq And calculate: (n)=(p1)(q1) Let's assume your public key is made of these two numbers: Public key =[e,n] Private key =[d,n] where e=97 and d=1693. Assume your plaintext is: "College Station". Convert each letter of your plaintext to a number mi. You may use the functions ord 0 to find the ASCII number. For each number mi, encrypt it by doing the following: ci=EPUB(mi)=(mie)modulusn Print the final ciphertext C=[c0,c1,c2,,cn] (You can print a list of ASCII values, not the character) Then, decrypt your ciphertext C by doing the following for each number ci : DPRIV(ci)=(cid)modulusn This should give you back mi and you can use chr( function to recover the character. Now with mi you can find which letter it corresponds to

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Why is it important for a firm to conduct career development?

Answered: 1 week ago

Question

=+Understand the fi eld of comparative IHRM.

Answered: 1 week ago