RSA - Algorithm - Presentation .5
RSA - Algorithm - Presentation .5
Presented by
Dammar Adhikari
Table of Content
• Introduction
• How RSA Works
• Steps
• Example
• RSA Security
• Application Of RSA
• Conclusion
Introduction
• What is RSA?
• RSA (Rivest-Shamir-Adleman) is a public-key
cryptographic algorithm.
• Used for secure data transmission.
• Why is RSA important?
• Ensures data confidentiality and authentication
• Used in SSL/TLS, digital signatures, and
encryption.
How RSA Works
• RSA involves three main steps:
• 1. Key Generation – Creating public and private
keys.
• 2. Encryption – Converting plaintext into
ciphertext.
• 3. Decryption – Converting ciphertext back to
plaintext.
Step 1 - Key Generation
• 1. Select two large prime numbers: p and q.
• 2. Calculate n = p × q (modulus).
• 3. Calculate ϕ(n) = (p-1) × (q-1) (Euler's totient
function).
• 4. Select e (public exponent) such that 1 < e <
ϕ(n) and gcd(e, ϕ(n)) = 1.
• 5. Calculate d (private exponent): d = e⁻¹ mod
ϕ(n).
• 6. Public Key: (e, n)
• 7. Private Key: (d, n)
Step 2 - Encryption
• Sender uses the recipient’s public key (e, n) to
encrypt the message.
• Formula:
• - Ciphertext (C) = M^e mod n
• - Where M is the plaintext message.
Step 3 - Decryption
• Receiver uses the private key (d, n) to decrypt.
• Formula:
• - Plaintext (M) = C^d mod n
• - Where C is the ciphertext.
Example Calculation
• Choose primes: p = 3, q = 11
• Compute n: n = 3 × 11 = 33
• Compute ϕ(n): (3-1)(11-1) = 2 × 10 = 20
• Choose e: Let e = 7 (gcd(7,20) = 1)
• Compute d: d = 3 (since 7 × 3 mod 20 = 1)
• Public Key: (7, 33)
• Private Key: (3, 33)
RSA Security
• Based on prime
factorization: Factorization of large n into p
and q is hard .
• Key size matters:
• 1024-bit keys are not secure today.
• 2048-bit or more is recommended.
• Quantum Threat: RSA can be factored in the
future using Shor's algorithm.
Applications of RSA
• Secure Web Browsing (SSL/TLS)
• Digital Signatures & Authentication
• Secure Email (PGP, S/MIME)
• Blockchain & Cryptocurrencies
Conclusion
• RSA is a fundamental encryption algorithm
used worldwide.
• Its security relies on large prime factorization.
• While powerful, newer encryption methods
like ECC and post-quantum cryptography are
emerging.
Thank You