mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-12-23 15:18:11 +00:00
CH04::privkeys: Hash digests aren't numbers
We just choose to interpet them that way
This commit is contained in:
parent
bf46fef5bf
commit
ca26228f58
@ -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,
|
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,
|
this is usually achieved by feeding a larger string of random bits,
|
||||||
collected from a cryptographically secure source of randomness, into the
|
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.
|
If the result is less than +n+, we have a suitable private key.
|
||||||
Otherwise, we simply try again with another random number.
|
Otherwise, we simply try again with another random number.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user