Public Key Cryptography & RSA Algorithm: Presented by
Public Key Cryptography & RSA Algorithm: Presented by
Types of Cryptography-
1. Private Key Cryptography
2. Public Key Cryptography
PUBLIC-KEY CRYPTOGRAPHY
• Also known as Asymmetric-key cryptography
• Based on mathematical
calculation
Public-Key Characteristics
Usually same as or less than the More than the original plain text
Size of resulting encrypted text
original plain text size. size
– encryption/decryption(provide Confidentiality)
– digital signatures (provide authentication or proof
of origin)
RSA Algorithm - Introduction
• Let n = pq.
• Announce to the whole word the pair (e; n), which is his public key.
• Keep the pair (d; n) secret to himself, which is his private key
• Sender will now use the public key to encrypt the message M as follows
C = Me mod n. Here, C is the encrypted message.
• Receiver will use its own private key to decrypt the message by using the equation
M=Cd mod n
PROOF OF RSA
• The private key d is unique and d must be co-prime to ɸ (n)
Proof : From the above corollary (1) , we found that e and ɸ(n) are co-prime.
Therefore, there exists only one unique integer d, such that
ed mod ɸ (n) = 1.
Hence d is unique
Again, Let d is not co-prime so t is the greatest common divisor of d and ɸ(n)
Suppose
d = c1t and ɸ (n) = c2t.
From ed mod ɸ (n) = 1. We know ed = c3 ɸ (n) + 1 for some integer c3.
Hence:
ec1t = c3c2t + 1
t(ec1- c3c2)=1
Therefore t=1.
Hence it is proved that the private key d is unique and co-prime with ɸ(n).
PROOF OF RSA
• How to Prove M ed mod n = M mod n
Proof : Since n=pq, Therefore we need to prove the following two condition
M ed mod p = M mod p and
M ed mod q = M mod q
Now,
M ed mod p = M k1×φ ( n ) +1 mod p (Since ed = k1×φ ( n) +1, k1 = some constant)
= M k 1×φ ( n ) M mod p
= M k1× ( p −1)( q −1) M mod p (Since φ ( n) = ( p − 1)( q − 1))
= M k 2×( p −1) M mod p (Let k 2 = k1× ( q −1))
= ( M ( p −1) mod p) k 2 M mod p
Now let us assume that M and p are co-prime then according to Fermat’s theorem
M ( p −1) mod p = 1
Then M ed mod p = 1k 2 M mod p = M mod p
PROOF OF RSA
Again if M is a multiple of prime p then
M mod p = 0
Therefore,
M ed mod p = ( M ( p −1) mod p) k 2 × 0 = M mod p
Hence proved
RSA Example
• Select primes: p=17 & q=11
• Compute n = pq =17×11=187
• Compute ø(n)=(p–1)(q-1)=16×10=160
• Select e : gcd(e,160)=1; choose e=7
• Determine d: de=1 mod 160 and d < 160 Value is d=23 since
23×7=161= 10×160+1
• Publish public key KU={7,187}
• Keep secret private key KR={23,187}
• sample RSA encryption/decryption is:
• given message M = 88 (note that 88<187)
• encryption:
C = 887 mod 187 = 11
• decryption:
M = 1123 mod 187 = 88
PRACTICAL APPLICATIONS OF THE RSA ALGORITHM
• To this day the RSA together with the AES algorithm is
the mostly used algorithm in commercial systems.
It is used:
-to protect web traffic, in the SSL protocol
(Security Socket Layer),
-to guarantee email privacy and authenticity in
PGP (Pretty Good Privacy)
-to guarantee remote connection in SSH (Secure
Shell).
-Furthermore it plays an important role in the
modern payment systems through SET protocol (Secure
Electronic Transaction).
• RSA has been used in most digital data, information and
telephone security applications.
ADVANTAGES OF RSA
DISADVANTAGES OF RSA
• RSA is built into current operating systems by Microsoft, Apple, Sun, and
Novell. In hardware, RSA can be found in secure telephones, on Ethernet
network cards, and on smart cards. The estimated installed base of RSA
encryption engines is around 20 million, making it by far the most widely
used public-key cryptosystem in the world.
• Finally, DES is much faster than RSA. In software, DES is generally at least
100 times as fast as RSA. In hardware, DES is between 1,000 and 10,000
times as fast, depending on the implementation. Implementations of RSA
will probably narrow the gap a bit in coming years, as there are growing
commercial markets, but DES will get faster as well.