Fast Merkle Trees



Summary:

In an email exchange on September 7, 2017, Peter Todd agreed with Russell O'Connor's proposal for a fast hash for internal nodes, but added that designs should not create new hash functions using custom IVs. Todd suggested using bog-standard SHA256 and making a fixed first block to allow optimized implementations to start with the fixed midstate. Regarding the use of custom IVs of the SHA256 hash of some fixed string, Todd explained that it results in a hash of data that is functionally equivalent to prefixing the data with the padded version of the fixed string and using a regular SHA256 hash of the combined data. This clarification was deemed important.


Updated on: 2023-06-12T18:32:34.903435+00:00