RSA Algorithm
Prof. Neeraj Bhargava
Kapil Chauhan
Department of Computer Science
School of Engineering & Systems Sciences
MDS University, Ajmer
Public Key Cryptography
public-key/two-key/asymmetric Cryptography
involves the use of two keys.
A public-key, which may be known by anybody, and
can be used to encrypt messages, and verify
signatures
The RSA Algorithm
Based on the idea that factorization of integers into
their prime factors is difficult.
n=p . q, where p and q are primes
Proposed by Rivest, Shamir, and Adleman in 1977.
A public-key cryptosystem.
RSA Algorithm
B chooses two primes p,q and compute n=pq
B chooses e with gcd(e,(p-1)(q-1))= gcd(e, ψ(n))=1
B solves de 1 (mod ψ(n))≡
B makes (e,n) public and (p,q,d) secret
A encrypts M as C M≡ e
(mod n)
B decrypts by computing M C≡ d
(mod n)
The RSA Algorithm
Cd
(M≡ e
)d
M≡ ed
M≡ 1+kφ(n)
M (mod n) by Euler’s theorem≡
p=885320963, q=238855417,
n=p . q=211463707796206571
Let e=9007, d=116402471153538991∴
M=“cat”=30120, C=113535859035722866
The Concept and Criteria
1. Ek(Dk(m))=m and Dk(Ek(m))=m for every
message m in M, the set of possible messages,
every key k in K, the set of possible keys
2. For every m and every k, then values of Ek(m)
and Dk(m) are easy to compute
3. For every k, if someone knows only the function
Ek, it is computationally infeasible to find an
algorithm to compute Dk
4. Given k, it’s easy to find the functions Ekand Dk
RSA Security
possible approaches to attacking RSA are:
brute force key search (infeasible given sizeof
numbers)
mathematical attacks (based on difficulty
of computing ø(n), by factoring modulus n)
timing attacks.
chosen cipher text attacks.
Assignment Question
Explain public key cryptography with suitable
example.
Explain RSA algorithm step by step with suitable
example.

RSA Algorithm

  • 1.
    RSA Algorithm Prof. NeerajBhargava Kapil Chauhan Department of Computer Science School of Engineering & Systems Sciences MDS University, Ajmer
  • 2.
    Public Key Cryptography public-key/two-key/asymmetricCryptography involves the use of two keys. A public-key, which may be known by anybody, and can be used to encrypt messages, and verify signatures
  • 3.
    The RSA Algorithm Basedon the idea that factorization of integers into their prime factors is difficult. n=p . q, where p and q are primes Proposed by Rivest, Shamir, and Adleman in 1977. A public-key cryptosystem.
  • 4.
    RSA Algorithm B choosestwo primes p,q and compute n=pq B chooses e with gcd(e,(p-1)(q-1))= gcd(e, ψ(n))=1 B solves de 1 (mod ψ(n))≡ B makes (e,n) public and (p,q,d) secret A encrypts M as C M≡ e (mod n) B decrypts by computing M C≡ d (mod n)
  • 5.
    The RSA Algorithm Cd (M≡e )d M≡ ed M≡ 1+kφ(n) M (mod n) by Euler’s theorem≡ p=885320963, q=238855417, n=p . q=211463707796206571 Let e=9007, d=116402471153538991∴ M=“cat”=30120, C=113535859035722866
  • 6.
    The Concept andCriteria 1. Ek(Dk(m))=m and Dk(Ek(m))=m for every message m in M, the set of possible messages, every key k in K, the set of possible keys 2. For every m and every k, then values of Ek(m) and Dk(m) are easy to compute 3. For every k, if someone knows only the function Ek, it is computationally infeasible to find an algorithm to compute Dk 4. Given k, it’s easy to find the functions Ekand Dk
  • 7.
    RSA Security possible approachesto attacking RSA are: brute force key search (infeasible given sizeof numbers) mathematical attacks (based on difficulty of computing ø(n), by factoring modulus n) timing attacks. chosen cipher text attacks.
  • 8.
    Assignment Question Explain publickey cryptography with suitable example. Explain RSA algorithm step by step with suitable example.