In this method, there are 2 parties and there are 2 keys that are generated:
- A public key that is sent to one party.
- A private key that remains with the other party.
- The message is encrypted using the public key and opened with the private key.
The security of this method depends on keeping the private key secret and ensuring that only the party receiving the message can access it.
Various mathematical algorithms create the public/private keys, with the most famous one based on factorizing a large number into primes, known as RSA.
Multiplying two very large numbers is quick, but factorizing a large number into prime factors takes much more time. To hack RSA and obtain the private key from the public key, one would need to factorize a very large number with more than 600 digits.
- No algorithm or machine is known today that is able to do such thing.
- It would take more than a million years of computation time to solve.