A Brief Talk On RSA
A Brief Talk On RSA
Hello!
Here we will see some key points about
RSA Algorithm.
Page no 01
What is RSA ?
Page no 02
Lets take a look to a public
key encryption system
Page no 03
What is RSA based on ?
RSA is based on the fact that finding the factors of an
integer is hard (the factoring problem) .
Page no 04
The RSA algorithm involves four steps:
Page no 05
How it works ?
Key Generation
1. Choose two different large random prime
numbers p and q
2. Calculate n=pq
n is the modulus for the public key and the
private keys.
3. Calculate the totient: f(n)=(p-1)(q-1)
4. Choose an integer e such that 1 < e < f(n)
e is coprime to f(n).
e is released as the public key exponent.
5. Compute d to satisfy the congruence relation de =1
mod f(n)
d is kept as the private key exponent.
Page no 06
Lets see an Example
Lets use small prime numbers for the example:
p=2 q=5
n=pq=10
Choose an integer e s.t. 1 < e < f(n), and e and f(n) are coprime
e = 3 (e is used as the public key exponent)
Page no 07
Lets see an Example
So then, the public key will be:
c=me mod n
c=m3 mod 10
Page no 08
Again ! What is RSA based on?
RSA's security relies upon the fact that
given a composite number, it is
considered a hard problem to
determine it's prime factors.
So large prime numbers (1024 bit, 2048
bit) are recommended to use as keys.
Small numbers (below 256 bits)are
easily breakable.
Page no 09
RSA Security
possible approaches to attacking RSA are:
brute force key search - infeasible given size of
numbers
mathematical attacks - based on difficulty of
computing (n), by factoring modulus n
timing attacks - on running of decryption
chosen cipher text attacks - given properties of
RSA
Page no 10
Factoring Problem
mathematical approach takes 3 forms:
factor n=p.q, hence compute (n) and then d
find d directly
cf QS to GHFS to LS
currently assume 1024-2048 bit RSA is secure
Page no 11
Progress in Factoring
Page no 12
Timing Attacks
developed by Paul Kocher in mid-1990s
exploit timing variations in operations
eg. multiplying by small vs large number
Page no 13
Chosen Cipher text
Attacks
RSA is vulnerable to a Chosen Cipher text
Attack (CCA)
attackers chooses cipher texts & gets
decrypted plaintext back
choose cipher text to exploit properties of
RSA to provide info to help cryptanalysis
can counter with random pad of plaintext
or use Optimal Asymmetric Encryption
Padding (OASP)
Page no 14
Optimal
Asymmetric
Encryption
Padding
(OASP)
Page no 15
Reference
RSA 1977
Author
Ron. Rivest, Adi. Shamir, Leonerd. Adleman.
A Method for Obtaining Digital Signatures and Public-Key Cryptosystems.
Communications of the ACM, Vol. 21 (2), pp.120-126. 1978.
Previously released as an MIT "Technical Memo" in April 1977.
Initial publication of the RSA scheme.
Cryptographic Hashing
Kocher 1996
Author
Paul C. Kocher
CRYPTO 96
Proceedings of the 16th Annual International Cryptology
Conference on Advances in Cryptology
Pages 104-113