Mr . Sathish Kumar . M 
Department of Electronics and Communication 
Engineering 
I’ve learned that people will forget what you said, people will forget 
what you did, but people will never forget how you made them feel. 
–Maya Angelou
RivestShamir& Adleman 
MIT in 1977
What is RSA…? 
• RSA is an algorithm used by modern computers 
to encrypt and decrypt messages. 
• It is an asymmetric cryptographic algorithm. 
• It is included as part of the Web browsers from 
Microsoft and Netscape. 
• It's also part of Lotus Notes, Intuit's Quicken, and many 
other products.
RSA 
PUBLIC KEY PRIVATE KEY 
Public-key 
cryptography, also 
known as asymmetric 
cryptography, is a 
class 
of cryptographic 
algorithms 
Messages encrypted 
using the public key 
can only be 
decrypted with the 
private key.
OPERATION: 
• RSA involves a public key and private key. 
• The public key can be known to everyone, it is used to encrypt 
messages. 
• Messages encrypted using the public key can only be decrypted 
with the private key. 
The public key is used for encryption. 
• The key is known to the public . 
• The private key is used for decryption. 
• The key is only known to the 
owner .
The RSA algorithm involves three 
steps: key generation, encryption and decryption.
Why RSA…? 
• It developed to address two key issues: 
• Key distribution – how to have secure 
communications in general without having to 
trust a KDC with your key 
• Digital signatures – how to verify a message 
comes intact from the claimed sender
RSA CHARACTERISTICS: 
 Public-Key algorithms rely on two keys with the characteristics 
that it is: 
 computationally infeasible to find decryption key knowing 
only algorithm & encryption key 
 computationally easy to en/decrypt messages when the 
relevant (en/decrypt) key is known 
 either of the two related keys can be used for encryption, 
with the other used for decryption (in some schemes)
One-way function with trapdoor 
f 
x y 
x y 
x y 
 
f 
 
1 
 
f 
 
1 
 
trapdoor 
Easy: 
Hard: 
Easy: 
Use trapdoor 
as the private key. 
Many public-key cryptosystems are 
based on trapdoor one-way fu 
 
nctions.
RSA 
 
1 
RSA 
 
Idea behind RSA 
* 
It works in group 
Z 
Encryption (easy): 
Decryption (hard): 
Looking for a trapdoor: ( ) . 
If is a number such that 1mod ( ), then 
( ) 
1 
. 
e 
e 
e d 
n 
x x 
x x 
x x 
d ed n 
e d k 
n 
 
 
 
 
 
  
k 
for some , and 
  ( ) 1 ( ) 
k 
e d ed n k n 
x x x x x x x           
( ) 1 .
Integers 
a b a b a b 
 
| : divides , is a divisor of . 
 
gcd( a , b ): greatest common divisor of a and b 
. 
 Coprime or relatively prime: gcd( a , b 
)  
1. 
 
Euclid's algorithm: computes gcd( a , b 
). 
 Extented Eucl 
id's algorithm: computes integers 
x and y such that ax  by  gcd(a,b).
Euler Totient Function ø(n) 
• when doing arithmetic modulo n 
• complete set of residues is: 0..n-1 
• reduced set of residues is those numbers (residues) which are 
relatively prime to n 
eg for n=10, 
• complete set of residues is {0,1,2,3,4,5,6,7,8,9} 
• reduced set of residues is {1,3,7,9} 
• number of elements in reduced set of residues is called the Euler 
Totient Function ø(n)
Euler Totient Function ø(n) 
• when doing arithmetic modulo n 
• complete set of residues is: 0..n-1 
• reduced set of residues is those numbers (residues) which are 
relatively prime to n 
• eg for n=10, 
• complete set of residues is {0,1,2,3,4,5,6,7,8,9} 
• reduced set of residues is {1,3,7,9} 
• number of elements in reduced set of residues is called the 
Euler Totient Function ø(n)
Euler Totient Function ø(n) 
• when doing arithmetic modulo n 
• complete set of residues is: 0..n-1 
• reduced set of residues is those numbers (residues) which 
are relatively prime to n 
eg for n=10, 
• complete set of residues is {0,1,2,3,4,5,6,7,8,9} 
• reduced set of residues is {1,3,7,9} 
• number of elements in reduced set of residues is called the 
Euler Totient Function ø(n)
RSA ALGORITH EXAMPLE 
Choose p = 3 and q = 11 
Compute n = p * q = 3 * 11 = 33 
Compute φ(n) = (p - 1) * (q - 1) = 2 * 10 = 20 
Choose e such that 1 < e < φ(n) and e and n are coprime. Let e = 7 
Compute a value for d such that (d * e) % φ(n) = 1. One solution is d = 3 [(3 * 
7) % 20 = 1] 
Public key is (e, n) => (7, 33) 
Private key is (d, n) => (3, 33) 
The encryption ofm = 2 isc = 27 % 33 = 29 
The decryption ofc = 29 ism = 293 % 33 = 2
RSA ALGORITHM

RSA ALGORITHM

  • 1.
    Mr . SathishKumar . M Department of Electronics and Communication Engineering I’ve learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel. –Maya Angelou
  • 2.
  • 3.
    What is RSA…? • RSA is an algorithm used by modern computers to encrypt and decrypt messages. • It is an asymmetric cryptographic algorithm. • It is included as part of the Web browsers from Microsoft and Netscape. • It's also part of Lotus Notes, Intuit's Quicken, and many other products.
  • 4.
    RSA PUBLIC KEYPRIVATE KEY Public-key cryptography, also known as asymmetric cryptography, is a class of cryptographic algorithms Messages encrypted using the public key can only be decrypted with the private key.
  • 6.
    OPERATION: • RSAinvolves a public key and private key. • The public key can be known to everyone, it is used to encrypt messages. • Messages encrypted using the public key can only be decrypted with the private key. The public key is used for encryption. • The key is known to the public . • The private key is used for decryption. • The key is only known to the owner .
  • 7.
    The RSA algorithminvolves three steps: key generation, encryption and decryption.
  • 8.
    Why RSA…? •It developed to address two key issues: • Key distribution – how to have secure communications in general without having to trust a KDC with your key • Digital signatures – how to verify a message comes intact from the claimed sender
  • 10.
    RSA CHARACTERISTICS: Public-Key algorithms rely on two keys with the characteristics that it is:  computationally infeasible to find decryption key knowing only algorithm & encryption key  computationally easy to en/decrypt messages when the relevant (en/decrypt) key is known  either of the two related keys can be used for encryption, with the other used for decryption (in some schemes)
  • 12.
    One-way function withtrapdoor f x y x y x y  f  1  f  1  trapdoor Easy: Hard: Easy: Use trapdoor as the private key. Many public-key cryptosystems are based on trapdoor one-way fu  nctions.
  • 13.
    RSA  1 RSA  Idea behind RSA * It works in group Z Encryption (easy): Decryption (hard): Looking for a trapdoor: ( ) . If is a number such that 1mod ( ), then ( ) 1 . e e e d n x x x x x x d ed n e d k n        k for some , and   ( ) 1 ( ) k e d ed n k n x x x x x x x           ( ) 1 .
  • 14.
    Integers a ba b a b  | : divides , is a divisor of .  gcd( a , b ): greatest common divisor of a and b .  Coprime or relatively prime: gcd( a , b )  1.  Euclid's algorithm: computes gcd( a , b ).  Extented Eucl id's algorithm: computes integers x and y such that ax  by  gcd(a,b).
  • 15.
    Euler Totient Functionø(n) • when doing arithmetic modulo n • complete set of residues is: 0..n-1 • reduced set of residues is those numbers (residues) which are relatively prime to n eg for n=10, • complete set of residues is {0,1,2,3,4,5,6,7,8,9} • reduced set of residues is {1,3,7,9} • number of elements in reduced set of residues is called the Euler Totient Function ø(n)
  • 16.
    Euler Totient Functionø(n) • when doing arithmetic modulo n • complete set of residues is: 0..n-1 • reduced set of residues is those numbers (residues) which are relatively prime to n • eg for n=10, • complete set of residues is {0,1,2,3,4,5,6,7,8,9} • reduced set of residues is {1,3,7,9} • number of elements in reduced set of residues is called the Euler Totient Function ø(n)
  • 17.
    Euler Totient Functionø(n) • when doing arithmetic modulo n • complete set of residues is: 0..n-1 • reduced set of residues is those numbers (residues) which are relatively prime to n eg for n=10, • complete set of residues is {0,1,2,3,4,5,6,7,8,9} • reduced set of residues is {1,3,7,9} • number of elements in reduced set of residues is called the Euler Totient Function ø(n)
  • 18.
    RSA ALGORITH EXAMPLE Choose p = 3 and q = 11 Compute n = p * q = 3 * 11 = 33 Compute φ(n) = (p - 1) * (q - 1) = 2 * 10 = 20 Choose e such that 1 < e < φ(n) and e and n are coprime. Let e = 7 Compute a value for d such that (d * e) % φ(n) = 1. One solution is d = 3 [(3 * 7) % 20 = 1] Public key is (e, n) => (7, 33) Private key is (d, n) => (3, 33) The encryption ofm = 2 isc = 27 % 33 = 29 The decryption ofc = 29 ism = 293 % 33 = 2