SHA-256d
Bitcoin's double application of SHA-256, used for block hashing and checksums.
Basically
In plain words, sHA-256d is the hash function forming the core of Bitcoin.
Key Takeaways
- SHA-256d is the hash function forming the core of Bitcoin.
- About SHA-256d was proposed in one of the Ferguson/Schneier books like so: SHA-256d(x) = SHA-256(SHA-256(x)) The motivation for this construction is to avoid length extension attacks.
- Example An example is this protocol designed to provide mutual proof that each party has made some minimum number of evaluations of some 256-bit hash function H (note: Alice performs the odd steps, and the next even step is performed by Bob with roles reversed): When H is SHA-256, this protocol is safe for both Alice and Bob.
Background
SHA-256d is the hash function forming the core of Bitcoin. About SHA-256d was proposed in one of the Ferguson/Schneier books like so: SHA-256d(x) = SHA-256(SHA-256(x)) The motivation for this construction is to avoid length extension attacks. Example An example is this protocol designed to provide mutual proof that each party has made some minimum number of evaluations of some 256-bit hash function H (note: Alice performs the odd steps, and the next even step is performed by Bob with roles reversed): When H is SHA-256, this protocol is safe for both Alice and Bob.
How It Works
However if H is SHA-256d, defined as x↦SHA-256(SHA-256(x)), there is a