Wouldn't it be possible to create as many as possible key pairs for the RSA encryption and then determine from a public key which the corresponding private key is ?

  • 1
    Short answer: No, there are too many possible key pairs.
    – SEJPM
    Mar 22, 2016 at 18:21

1 Answer 1


The answer to your question is very closely related to this post: https://math.stackexchange.com/questions/263588/how-many-all-prime-numbers-p-with-length-of-bits-of-p-1024-bits

Via. the prime number theorem we can calculate that there are approximately 1.26 * 10305 prime numbers less than 21024. That is a lot of numbers. For scale, a terabyte is 1012 bytes!

So yes, though this brute force approach is theoretically doable we don't, and won't, have the resources for a very long time!

  • 1
    replace "for a very long time" with "it's physically impossible!" as per this answer
    – SEJPM
    Mar 22, 2016 at 19:23
  • 1
    @SEJPM Currently believed to be physically impossible would be more accurate. Once upon a time, heavier than air flying machines were physically impossible.
    – Phil Lello
    Mar 22, 2016 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.