Certain mathematical operations are difficult to reverse.
It’s easy to take two prime numbers and multiply them. But it’s hard taking the product of that multiplication and figuring out the two original numbers. The larger the numbers, the more difficult the problem becomes, so public key mechanisms such as RSA use numbers that are hundreds of digits long.
Without going into detail, this problem (prime number factorization) along with other difficult problems (discrete root and discrete logarithm) are the basis for the RSA public key encryption.
If you want to actually know how RSA works, you can search this sub, since this question was asked many times.
Latest Answers