1. 2 very large prime numbers p and q are chosen and their product n is calculated
2. the product (p-1)(q-1) is calculated
3. a prime number e less than (p-1)(q-1) and not a factor of it is chosen (65537 usual choice)
4. another number d is found which satisfies the condition that the produce of d times e when divided by (p-1)(q-1) gives a remainder of 1
5. public key becomes the pair (n,e)
1. private key becomes the pair (n,d)