It’s not just prime numbers, it’s really, really large prime numbers – about 150 digits in length. If you take two of these really long prime numbers and multiply them together, you get a very, very long number, but the calculation is trivial for a computer. Takes a fraction of a second. But if you give the computer the very, very long number and ask it to compute the prime factors, the computer is going to take a really long time, in some cases thousands of years or longer (with modern, non-quantum computers).
Encryption relies on the complexity of factoring the very very large number. A message is encrypted and is sent along with a public key to a receiver. If the receiver has a private key (made from knowing what the primes that made the very very large number are), then the receiver can decrypt the message. But without the private key, the message is pretty much forever garbled and unreadable.
Latest Answers