PUBLIC KEY CRYPTOGRAPHY
ALGORITHMS
Rivest Shamir Adleman (RSA)
Diffie-hellman
Digital Signature Standard (DSA)
Eliptic-Curve Cryptography (ECC)
Most Widely used algorithms are RSA
and Diffie-Hellman.
RSA Public-key Encryption Algorithm
• The RSA algorithm was invented by Rivest,
Shamir and Adleman in 1977.
1. Let p and q be two distinct large random primes.
The modulus n is the product of these two primes,
n=pxq
Euler’s totient function of n is given by
(n)= (pxq) = (p-1)(q-1)
Now, let us select a number 1<e< (n) such that
gcd(e, (n))=1
and compute d with
d=e-1(mod (n)) or de 1 mod (n)
using the extended Euclid's algorithm. Under this
scheme, e is the public exponent and d is the
private exponent.
The modulus n and the public exponent e are
published. The value of d and the prime numbers
p and q are kept secret.
RSA Algorithm
RSA Example
1. Select two primes, p = 17 and q = 11
2. Calculate n = pq = 17 11 = 187
3. Calculate (n) = (p-1)(q-1) = 16 10 = 160
4. Select e s.t. e is relatively prime to (n) and less than (n); in
this case, e = 7
5. Determine d s.t. de 1 mod 160 and d < 160. The correct value
is d = 23 (7 23 = 161 = 160 + 1)
6. PU = {7, 187}, PR = {23, 187}
RSA 2ND EXAMPLE
M
C M
e d
5
DIFFIE-HELLMAN KEY EXCHANGE
A number of commercial products
employ this key exchange technique.
The purpose of this algorithm is to
enable two users to exchange a secret
key securely that can be used for
subsequent encryption of messages.
The algorithm itself is limited to the
exchange of the keys.
DIGITAL SIGNATURE STANDARD
Digital Signature Standard (DSS) – makes
use of SHA-1 and presents a new digital
signature algorithm (DSA)
Was originally proposed in 1991 and then
revised in 1993 for security concerns.
Further minor revision was made in 1996.
It is only used for Digital Signature function.
Unlike RSA it cannot be used for Encryption
and Decryption.
ELLIPTIC CURVE CRYPTOGRAPHY
Bit length for secure RSA use has
increased over recent years thus
increased the load in processing.
The principal attraction of ECC
compared to RSA is that it appears to
offer security for a far smaller bit size,
therefore reducing processing overhead.
Still confidence level is not that much
high as compare to RSA.