|
|
|
|
|
by spacemonkey92
552 days ago
|
|
I wonder what would happen if someone discovered an efficient algorithm for finding or predicting prime numbers or their factors. It would put the fundamentals of internet security at risk and likely much more. Has anyone ever considered a plan B for such a scenario? |
|
It's very, very easy to find big prime numbers: you generate a random number in the range that you are interested in, and then check whether it's prime. Repeat until you find a prime; they are fairly dense (a random number `n` has about a 1/log(n) chance of being prime) so you don't have to try too often.
In fact, that's how we find big primes for creating things like RSA key-pairs.
Testing a number for primality can also be done fairly quick. In general, much, much faster than finding the factors of a composite number. See https://en.wikipedia.org/wiki/Primality_test
> Has anyone ever considered a plan B for such a scenario?
Yes, quantum resistance cryptography is a thing. See the other comments.