4. RSA
First practicable public key cryptosystems
Encryption key- public
Decryption key- private
Ron Rivest,Adi Shamir and Leonard Adleman
5/2/2014
4
RSA
6. Section-1-Public key
Pick two prime numbers p&q
Calculate n=p*q
Calculate z=(p-1)*(q-1)
Choose the prime number ‘k’ such
that k is co-prime of z and k
should not be divisible by z
5/2/2014
6
RSA
P=3 and q=11
n=33
Z=20
K=7,11,13,17,19
K=7
9. Section-2:Encryption and Decryption
P ^ K = E (mod n)
P: Plain text
N and k are public keys
E:Encrypted message
E ^ J = P (mod n)
E:Encrypted message
J: Server’s secret key
P:Plain text that we want
to recover
N:Server public key
5/2/2014RSA
9
14 ^ 7 = E (mod 33)
E=20
20 ^ 3 = p (mod 33)
P=14
10. Draw Backs
The alphabets in the plain text are represented
by numbers ranging from 1 to 26
Redundant calculation
Redundant calculation-easier hacking
5/2/2014RSA
10
11. Enhancement of RSA:Section-1
Select two distinct prime numbers
Compute n=p*q
Compute φ(n)=(p-1) * (q-1)
Choose integer e such that 1 < e < φ(n) and
GCD(e,φ(n))=1
Public key: (e,n)
Private Key: (d,n)
5/2/2014RSA
11
12. Enhancement of RSA:Section-2
Encryption
C=M ^ e (mod n)
C:Cipher Text
M:Plain text
e:integer
Decryption
M=C ^ d (mod n)
C:Cipher Text
M:Plain Text
D:Private key
5/2/2014RSA
12