Question: Write a program that will verify the following steps outlining the RSA encryption / decryption technique using the prescribed test values: i . Choose two
Write a program that will verify the following steps outlining the RSA encryptiondecryption
technique using the prescribed test values:
i Choose two prime numbers p and q consisting of exactly digits.
ii Compute N pq The security of RSA depends on not making p and q publicly known
even though N will be made public. If N can be factored, then RSA becomes insecure.
iii. Compute N p q given that p and q are prime, N is easily
computed by using p q where p and q are known only to you
ivKey Generation Choose a small prime number e such that e N and
gcde Use the extended Euclidean algorithm to compute d such that ed
mod make sure you verify that gcde After the algorithm runs do
not forget to convert your result to a positive answer d mod
a Public Key: N e
b Private Key: N d
v Encode the plaintext STOP into two blocks mm of four digits using the UTF code:
m m
viEncryption For each plaintext block, use the repeated squaring algorithm to encrypt
the plaintext message m into the ciphertext c by computing
c me mod N
vii. Decryption Use the repeated squaring algorithm to decrypt the ciphertext back into
the plaintext message by computing
m cd mod N
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
