Public Key Cryptosystem: 1 Dr. Reema Patel, Is-2019, B.Tech, Ce/Ict, Sot, Pdpu
Public Key Cryptosystem: 1 Dr. Reema Patel, Is-2019, B.Tech, Ce/Ict, Sot, Pdpu
• In 1977, Ronald Rivest, Adi Shamir and Leonard Adleman proposed a scheme at MIT
known as RSA.
• General Information
◦ best known & widely used asymmetric cryptographic scheme
◦ can be used to provide both secrecy & digital signatures
◦ based on exponentiation in a finite field over integers
◦ modulo a prime, using large integers (e.g.,2048 bits)
◦ Encryption is:
◦ C = 887 mod 187
= 88(3+3+1) mod 187
=(883 mod 187)(883 mod 187)(88 mod 187) mod 187
= (44 * 44 *88) mod 187
= 11
◦ Decryption is:
◦ P = 1123 mod 187 = 88
◦ EUCLID(a,b)
◦ 1. A = a; B = b
◦ 2. if B = 0 return else A = gcd(a, b)
◦ 3. R = A mod B
◦ 4. A = B
◦ 5. B = R
◦ 6. goto 2
Q A1 A2 A3 B1 B2 B3
— 1 0 160 0 1 7
22 0 1 7 1 -22 6
1 1 -22 6 -1 23 1
Q A1 A2 A3 B1 B2 B3
— 1 0 49 0 1 37
1 0 1 37 1 -1 12
3 0 1 12 -3 4 1
3 0 1 550 1 –3 109
5 1 –3 109 –5 16 5
21 –5 16 5 106 –339 4
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Q A1 A2 A3 B1 B2 B3
— 1 0 17680 0 1 3
5893 0 1 3 1 -5893 1
(4978)^2 mod 17947 = 13624 (4978)^4 mod 17947 = 5502 (4978)^8 mod 17947= 13362
(4978)^16 mod 17947 = 6288 (4978)^64 mod 17947 = 10742 (4978)^512 mod 17947 = 16375
(4978)^1024 mod 17947 = 12445 (4978)^2048 mod 17947 = 13362 (4978)^8192 mod 17947 = 1703
• bi = 1000110000
I 9 8 7 6 5 4 3 2 1 0
bi 1 0 0 0 1 1 0 0 0 0
c 1 2 4 8 17 35 70 140 280 560
f 7 49 157 526 160 241 298 166 67 1
I 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bi 1 0 1 1 1 0 0 0 0 0 1 0 1 1
c 1 2 5 11 23 46 92 184 368 736 1473 2946 5893 1178
7
f 4978 1362 1834 2489 1310 786 7598 1205 5633 393 1558 1454 2358 4847
4 0 2 9 1