Hacker News new | ask | show | jobs
by graemewicksted 3132 days ago
I thought modern RSA crypto intentionally stays away from real primes because it's less secure. They use two semi-prime co-primes of significant size and with a large enough difference between them.
1 comments

I think you're confused.

A RSA private key uses large primes, two to be exact. Those two primes form your private key. Multiplying them together gives your public key. The idea is that undoing that operation: finding which two primes multiplied together form the public key, is an intractable problem.

Those two primes multiplied together is what's called a semiprime. The one part that you're correct on is that these two primes should be sufficiently distant, otherwise just trying a couple numbers near sqrt(pq) will give you either p or q.