Cryptography / Public-key cryptography
RSA
Public-key encryption and signatures built from Euler’s theorem and the difficulty of factoring.
Contents 3 sections
By the end you can
- Generate a toy RSA key pair
- Encrypt, decrypt and sign with RSA
- Explain why RSA is believed secure
Helps to know: Diffie–Hellman Key Exchange
§1Building keys
- Choose two large primes and set .
- Compute .
- Choose with ; commonly .
- Compute .
- Publish ; keep secret.
Decryption works because , so by Euler’s theorem.
§2A toy example
Example 1,
- , .
Check yourself
- Q1With and ,
- Q2Factoring would let an attacker…