RSA slides
RSA slides
1
Symmetric and asymmetric key cryptography
Symmetric key Cryptography Asymmetric key Cryptography
Key Pair Key Pair
Key Key
(dA , PA) Exchange Public Keys (dB , PB)
Sk Sk
Public
Key PB Public
Key PA
Advantages: Advantages:
• Efficiency • No need to deliver private key
Disadvantages: • Scalability
• Need secure channel in provisioning • Secure against honest but curious TTP
phase Disadvantages:
• Rely on trust of TTP • Increased computational and
• Key renewing can be difficult communication costs
• Scalability • Need to manage certificates and a
revocation list
|2
Key management
problems
3
Key Generation Encryption & Decryption
• Choose p and q
• Compute n = p * q • Public key is (e, n) , Private key is (d, n)
• Compute φ(n) = (p - 1) * (q - 1)
• The encryption of m is c =me mod n
• Choose e such that 1 < e < φ(n) and e and φ (n) are coprime.
• Compute a value for d such that (d * e) mod φ(n) = 1. • The decryption of m = cd mod n
4
RSA operations are done over the integer ring Zn(i.e., arithmetic modulo n), where n = p *
q, with p, q being large primes
The security of the scheme relies on the fact that it is hard to derive the “private exponent”
d given the public-key (n, e)
5
Communication using RSA between Alice and Bob
6
Communication using RSA between Alice and Bob
7
Implementation aspects
The RSA cryptosystem uses only one arithmetic operation (modular exponentiation)
which makes it conceptually a simple asymmetric scheme
Even though conceptually simple, due to the use of very long numbers, RSA is orders
of magnitude slower than symmetric schemes, e.g., DES, AES
8
RSA is the most widely used public-key cryptosystem
The public key e can be a short integer, the private key d needs to have the full length of
the modulus n
Currently 1024-bit cannot be factored, but progress in factorization could bring this into
reach within 10-15 years. Hence, RSA with a 2048 or 3076 bit modulus should be used for
long-term security
A naïve implementation of RSA allows several attacks, and in practice RSA should be
used together with padding