Question: Task 1 : Generating Public and Private Keys You are expected to write a function RSA _ Gen that accepts two prime numbers p and
Task : Generating Public and Private Keys
You are expected to write a function RSAGen that accepts two prime numbers and at its input, and gives us three integer numbers N d and e at its output.
For and and e must satisfy the following conditions:
zzzdedmodzN,;modNmc;modNcdm
and have common factors, that you factor into its primenumber constituents, would not divisible any those prime numbers. Equivalently, the greatest common divisor and must one.
Choose such that divisible that modz
Your public key then given the pair and your private key given
you are using MATLAB, these built functions may help you this project: rem, mod, and factor. Make yourself familiar with them and their they correctly their job for very large numbers?
Task : RSA Encryption
You are expected write a function that accepts the public key along with a message a natural number less than its input, and gives the encrypted version its output:
;
You basically need write a code that calculates
modN.
are large numbers, you may need calculate multiple steps; remember the the MATLAB functions that you use and that Check out the supplementary video clip RSA protocol get some idea.
Task : RSA Decryption
You are expected write a function that accepts the private key along with a ciphertext natural number less than its input, and gives the plaintext its output:
;
You basically need write a code that calculates
modN.
Again, are large numbers, you may need calculate multiple steps; remember the the MATLAB functions that you use and that Check out the supplementary video clip RSA protocol get some idea.
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
