RSA algorithm
- Choose large numbers p and q which with high probability are primr
- Let n = pq
- Find a random number r relatively prime to (p - 1)(q - 1)
- Make (n,r) a public key
- Accept a message m encrypted into
- Find the number d such that
- Let (n,d) be the private key
- Decrypt the message

RSA (example)