## Question

Using the prime numbers p=13 q=3

Compute an RSA public and private key pair of (n,e) and (n,d) respectively.

Using the last two digits of your student ID, XY calculate XYmod38 as the message m. Encrypt the message, m using RSA.

c = m^e mod n

So for example if the last two digits of your ID are 99 then 99mod38=23 and you would use 23 as the message m.

Now using the RSA cipher output (c) decrypt using your private key (n,d).

m= c^d mod n

Show all steps in the computation. Be verbose. When calculating large exponents in a modulus be sure to use the binary expansion technique. Show all steps of this binary expansion.

2.0 Diffie-Helman

Use the last two digits XY of your student ID number to form the secrets chosen by Alice and Bob respectively as 1X and 1Y. So if your student ID number is 21 you will use 12 and 11 as the secrets chosen by Alice and Bob respectively. If the last two digits are 40 and you will use 14 and 10 respectively and so on.

Compute the shared secret that is arrived at by Alice and Bob using Diffle Hellman.

Show all steps in your computation.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

1. RSAWe compute 87 (Id) mod 38 for the message m=> m=11

n=p*q=13*3=39

Then φ(n)=(p-1)*(q-1)=12*2=24

Now for the public encryption exponent e we must choose a number between 1 and 24, to be co-prime with n(39).

We take e=5

We must know discover the private exponent used for decryption, d.

The relation between e and d is the following...

By purchasing this solution you'll be able to access the following files:

Solution.docx.