
→ Send a message and encrypt it with the public key. Now only the owner, for example a server, can decrypt it using the private key.
→ I want to prove that I am indeed who I say I am, for example a server you search, I can sign a message with my private key, which can only be decrypted with my public key. This proves that I have the private key.
Symmetric Encryption doesn’t scale so well, since we have to create a key for every user.

Using asymmetric encryption we can create only one private key and give out one public key everybody knows.

Key to the concept of RSA is the FACTORING PROBLEM.

The one-way trapdoor in RSA is knowing the p and q, which together give you the n value. With that you can calculate totient(n) and then calculate the private key out of that.
p and q are both prime values.

→ Get a random p and q (must be big) and calculate an n. → Create a your private key using this formula and the public key most likely being 65537:
totient(n) = (p-1) * (q-1)
e * d ≡ 1 mod (totient(n)) → Which means that d is the multiplicative inverse of e and totient(n)