Rsa Algorithm

16,344 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
16,344
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
378
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Rsa Algorithm

  1. 1. RSA Algorithm: 1. Select two very large prime numbers. 2. n = p.q 3. ɸ = (p - 1).(q - 1) 4. Select e; such that, e is relatively prime to ɸ and e < ɸ, gcd (e, ɸ) = 1 5. Select d; such that, d.e mod ɸ = 1 or e = 1 mod ɸ 6. Public key : {e, n} Private key : {d, n} 7. e = pe mod n p = cd mod n Example: 1. p = 3, q = 11 2. n = 3 x 11 = 33 3. ɸ = (3 – 1).(11 – 1) = 2 x 10 = 20 4. e = 3, 7, 9, 11, 13, 17, 19 d = 1, 3 mod 20 ≠ 1 5. d = 7, d.e mod 20 = 1 d = 2, 6 mod 20 ≠ 1 d.3 mod 20 = 1 d = 3, 9 mod 20 ≠ 1 d = 4, 12 mod 20 ≠ 1 8. Public key : {33, 33} d = 5, 15 mod 20 ≠ 1 d = 6, 18 mod 20 ≠ 1 Private key : {7, 33} d = 7, 21 mod 20 = 1
  2. 2. Diffe-Hellman Protocol: k = gxy mod p Alice Bob R1 gx mod p R2 gy mod p R R k = R2x mod p k = R1y mod p = (gy mod p)x mod p = (gx mod p)y mod p = gxy mod p = gxy mod p k is the shared key p and g : two large number with some properties.

×