1

From here, we can read that :

A private key is a 256-bit value, meaning there are approximately 1.1579e77 possible keys (There are about 1.2288e66 invalid values

But here, we have :

Nearly every 256-bit number is a valid ECDSA private key. Specifically, any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key.

Does "nearly every" mean (1.1579e77-1.2288e66) out of 1.1579e77 ?

  • 1
    The answer is right there in the passage you quoted. "Any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key." So for instance, 0x0 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141 are not valid private keys. You can read en.wikipedia.org/wiki/… to see why; the key must be less than n, the size of the group. – Nate Eldredge Jul 8 '16 at 16:16
  • 1
    The count of invalid on reddit is wrong, it should be about 4.32420e38. But either of these is small compared to 1.15972e77, hence 'nearly every'. – dave_thompson_085 Jul 9 '16 at 1:02
2

A bitcoin private key is a number greater than or equal to 1 and less than X, where:

X = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

That's in base 16. In normal base 10 numbers, that's:

X = 115792089237316195423570985008687907852837564279074904382605163141518161494337

Any number outside of that range is an invalid private key. That includes 0 and X, X+1, X+2, ...

  • It is true that any number outside that range is invalid. The question is more about numbers inside the range. Is it possible to find, or are there any known number inside the range that is invalid? – XR SC Jul 9 '16 at 10:55
  • @XRSC All numbers in that range are valid. The quote in your question is alluding to the fact that there are some numbers that fit within 256 bits that are greater than or equal to X still, so not every 256 bit number is a valid private key. X itself, for example. – morsecoder Jul 25 '16 at 12:28

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.