1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-23 07:08:13 +00:00

CH04::privkeys: Hash digests aren't numbers

We just choose to interpet them that way
This commit is contained in:
David A. Harding 2023-02-08 20:35:01 -10:00
parent bf46fef5bf
commit ca26228f58

View File

@ -150,7 +150,8 @@ than 2^256^) defined as the order of the elliptic curve used in bitcoin
256-bit number and check that it is less than +n+. In programming terms,
this is usually achieved by feeding a larger string of random bits,
collected from a cryptographically secure source of randomness, into the
SHA256 hash algorithm, which will conveniently produce a 256-bit number.
SHA256 hash algorithm, which will conveniently produce a 256-bit value
that can be interpreted as a number.
If the result is less than +n+, we have a suitable private key.
Otherwise, we simply try again with another random number.