0% found this document useful (0 votes)
60 views

A Brief Talk On RSA

This document provides an overview of the RSA encryption algorithm in 16 pages. It begins by defining RSA as a widely used public key encryption algorithm developed in 1977. It then covers RSA's key generation process, how it works by using modular exponentiation and large prime numbers, examples of encryption and decryption, the factoring problem that RSA relies on for security, approaches to attacking RSA like brute force and timing attacks, and techniques like optimal asymmetric encryption padding to strengthen it against chosen ciphertext attacks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

A Brief Talk On RSA

This document provides an overview of the RSA encryption algorithm in 16 pages. It begins by defining RSA as a widely used public key encryption algorithm developed in 1977. It then covers RSA's key generation process, how it works by using modular exponentiation and large prime numbers, examples of encryption and decryption, the factoring problem that RSA relies on for security, approaches to attacking RSA like brute force and timing attacks, and techniques like optimal asymmetric encryption padding to strengthen it against chosen ciphertext attacks.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

A brief talk on RSA

Hello!
Here we will see some key points about
RSA Algorithm.

Page no 01
What is RSA ?

Its a public key encryption algorithm used world


wide for PGP, SSL/TLS , Digital Signature and
many other systems.
Developed by Ron Rivest, Adi Shamir,
and Leonard Adleman from MIT in 1977

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) .

In other words The foundation of RSA's security relies


upon the fact that given a composite number, it is
considered a hard problem to determine it's prime
factors.

A user of RSA creates and then publishes the product


of two large prime numbers, along with an auxiliary
value, as their public key.

Page no 04
The RSA algorithm involves four steps:

> key generation,

> key distribution,


> encryption
> decryption.

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

Compute the totient:


f(n) = (p-1)(q-1) = 1*4 = 4

Observe that the number of integers less than n that are


coprime to n is 4: (1, 3, 7, 9)

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)

Compute d s.t. de = 1 + kf(n) for some integer k


d = 7 (d is used as the private key exponent)

Page no 07
Lets see an Example
So then, the public key will be:
c=me mod n
c=m3 mod 10

And the private key will be:


m=cd mod n
m=c7 mod 10

We use the public key to encrypt and the private key to


decrypt

If we want to encrypt m=8 we use


c=83 mod 10 = 2

In order to decrypt c=2 we use


m=27 mod 10 = 8

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

determine (n) directly and compute d

find d directly

currently believe all equivalent to factoring


have seen slow improvements over the years

as of May-05 best is 200 decimal digits (663) bit with LS


biggest improvement comes from improved algorithm

cf QS to GHFS to LS
currently assume 1024-2048 bit RSA is secure

ensure p, q of similar size and matching other


constraints

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

or IF's varying which instructions executed

infer operand size based on time taken


RSA exploits time taken in exponentiation
countermeasures
use constant exponentiation time

add random delays

blind values used in calculations

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

Lecture slides by Lawrie Brown


Page no 16
Thank You!
Any questions?

You might also like