Question: RSA Encryption In this assignment we will write a 3 2 bit, non - optimized version of the asymmetric public - private key encryption algorithm

RSA Encryption
In this assignment we will write a 32 bit, non-optimized version of the asymmetric public-private key encryption
algorithm RSA. It is a simplified version of the algorithm that is currently being used with SSH, FTPS, and https.
You wouldn't be able to use PayPal without it. There is high level theory behind this algorithm, and you are not
required to understand all of it. Our goal is to implement the steps and get it to work.
The goal of asymmetric encryption is to allow anyone on the outside, a client, to send an encrypted message to a
host, usually a web server, such that only the web server can decrypt the message. This allows the client and
server to set up private communication. The public key allows any client to encrypt. No clients can decrypt. The
private key is needed to decrypt, which only the server has. This makes it so only the server can decrypt the
messages sent from clients requesting communication. Once the server receives and decrypts the request for
communication, a symmetric encryption algorithm such as AES, where both the client and server can encrypt and
decrypt, is used from then on.
The RSA algorithm is implemented as follows:
Assume the message to be sent is an integer. For a message m, find integers e,d, and n such that:
@((me)d)%n=m
In other words, find a mod value and two exponents such that raising a number to the product of
those exponents and then modding it gives you the original number back
Once these three numbers are found, asymmetric encryption is possible.
To create an encrypted message c, also known as a cipher, use e and n :
-c=(me)%n
To decrypt, use d and n on the encrypted message:
-(cd)%n=(((me)%n)d)%n=((me)d)%n=m
Thus, the public key, which allows encryption of a message m, consists of:
e and n.
The private key, which allows decryption of a cipher c, consists of:
d and n
Note that since everything is being modded with n,m must be less than n in order to avoid duplicate ciphers
To raise to an exponent and then mod is called modular exponentiation.
We will write a function for this.
 RSA Encryption In this assignment we will write a 32 bit,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!