Skip to content

Commit abe2a4b

Browse files
authored
Support for Tree Tiger Hash and Merkle Hash Tree
#55 ## Merkle Hash Tree multihash `<merkle-hash-tree-mc>-<len>-(<hash-tree-type>-(<multihash>[<multihash>...]))` `<0x0400>-<len>-(<0x01>-(<multihash>[<multihash>...]))` 0x0400 - Merkle Hash Tree (1024 decimal) multicodec value 0x01 - Hash Tree Type with this settings: * Data segment size - 1024 bytes * Data prefix - one byte with value 0 (0x00) * Hash pair prefix - one byte with value 1 (0x01) * Unpaired hashes move on next level unchanged. * Multihashes in tree multihash packed in breadth-first order from root to leafs. ## Tiger multihash: `<tiger-mc>-<len>-<hash>` `<0x7A>-<0x18>-<0x3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3>` 0x7A - Tiger-hash multicodec value ## Tree Tiger multihash: `<merkle-hash-tree-mc>-<len>-(<hash-tree-type>-(<tiger-root-multihash>[<tiger-multihash>...]))` ## Tree sha2-256 multihash: `<merkle-hash-tree-mc>-<len>-(<hash-tree-type>-(<sha2-256-root-multihash>[<sha2-256-multihash>...]))` ## Links: [Tree Hash EXchange format (THEX)](https://adc.sourceforge.io/draft-jchapweske-thex-02.html#anchor2) [Tiger: A Fast New Cryptographic Hash Function (Designed in 1995)](http://www.cs.technion.ac.il/~biham/Reports/Tiger/) wikipedia: [Tiger (cryptography)](https://en.wikipedia.org/wiki/Tiger_(cryptography)) wikipedia: [Merkle tree#Tiger tree hash](https://en.wikipedia.org/wiki/Merkle_tree#Tiger_tree_hash) License: MIT Signed-off-by: Ivan <[email protected]>
1 parent b8c0e28 commit abe2a4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hashtable.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ keccak-384, , 0x1C
1919
keccak-512, , 0x1D
2020
murmur3-128, , 0x22
2121
murmur3-32, , 0x23
22+
tiger, , 0x7A
23+
merkle-hash-tree, , 0x0400
2224
,, Note: keccak has variable output length. The number specifies the core length
2325
blake2b-8,Blake2b consists of 64 output lengths that give different hashes,0xb201
2426
blake2b-16,,0xb202

0 commit comments

Comments
 (0)