0% found this document useful (0 votes)
13 views24 pages

RSA Key Generation and Encryption Exercises

Uploaded by

amanl
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views24 pages

RSA Key Generation and Encryption Exercises

Uploaded by

amanl
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Contents

By Mr. Vivian Lobo, Dept. of Computer Engg. | SJCEM | Palghar


RSA- by Rivest, Shamir, Adleman
Size of the keys

 To be secure, the recommended size


for each prime p and q should be very
large at least 512 bits (around 154
decimal digits)
 This makes the size of n, the modulus,
1024 bits (309 digits)
RSA- BY RIVEST, SHAMIR, ADLEMAN
EXERCISE
Bob chooses 17 and 11 as p and q and he
chooses two exponents, e and d, from
Z160∗(set of multiplicative inverses). If he
chooses e to be 7 find d. Alice wants to
send the plaintext 88 to Bob. Show what is
her cipher text and how Bob will decrypt
the data.
RSA Problem

 Findpublic and private key using RSA


algorithm: p=17, q=11, e=7. Use
extended Euclid’s algorithm. Encrypt
and decrypt the message m=4.
RSA Problem (HW)

Ans:

d=7

Public key = (7, 65)


Private key = (7, 65)
RSA Problem (GATE 2017 Question)

 In an RSA cryptosystem, A uses two prime numbers


p = 13 and q = 17 to generate its public and
private keys. If the public key of A is 35, then the
private key of A is ?
RSA Problem (GATE 2018 Question)
RSA Problem

 Given modulus N=143 and public key


(e) = 7. Find the values of p, q, Ф, and
private key (d) using RSA.
RSA Problem

 Given modulus N=221 and public key


(e) = 7. Find the values of p, q, Ф, and
private key (d) using RSA. Encrypt M =
5.
RSA Problem

 IfA and B wish to use RSA to communicate securely,


then A chooses public key (e, n) as (7, 247) and B
chooses public key (e, n) as (5, 221).
Calculate A’s private key
Calculate B’s private key
What will be the ciphertext sent by A to B if A wishes
to send M = 5 to B.

You might also like