RSA
Bob selects at random 2 large prime numbers p and q, say 150 decimals each.
Bob chooses odd integer e relatively prime to f(n) = (p-1)(q-1).
Compute d as multiplicative inverse of e, modulo f(n).
Publish P=(e,n) as public key.
Keep secret S=(d,n) as private (secret) key.
Domain of plaintexts is Zn
Encryption function E(M) = C = Me (mod n)
Decryption function D(C) = Cd (mod n)