Documentation
¶
Overview ¶
Package thex implements hash tree computation as defined in the following: http://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html R. C. Merkle, A digital signature based on a conventional encryption function, Crypto '87
thex is hash algorithm agnostic, New returns a new hash.Hash interface with a the hash.Hash argument as the internal algorithm.
Do not directly pass the data being hashed, write data chunks prepended with a 0x00 byte to an external hash function, and write the resulting digests to the tree. The recommended chunk size is 1024 bytes.
thex prepends each leaf hash with an 0x01 byte. This is to decrease the chance of collisions between external hashes and internal node hashes.
Because Write takes hash digests rather than chunks of data, intermediate node levels may be verified as well, Just write a complete row of intermediate node digests and call Sum().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.