I am looking on the wikipedia article for hash trees, and I am slightly confused by their diagram.
A leaf node obviously contains the hash of the underlying data.
Are leaf nodes in hash trees different than any non-leaf node? Do non-leaf nodes contain hashes of data, or hashes of hashes?
Given this diagram:
Which of these is Hash 1
a hash of?
Hash 1-0
+ Hash 1-1
Data block 002
+ Data block 003
Or are hash trees fundamentally different depending on the application (rsync, P2P networks, Git, etc)?
This is what wiki article says:
Nodes further up in the tree are the hashes of their respective children. For example, in the picture hash 0 is the result of hashing hash 0-0 and then hash 0-1. That is,
hash 0 = hash( hash 0-0 || hash 0-1 )
where || denotes concatenation.
But I truly believe that a developer may customize the tree and algorithm, use different hash functions and so on, optimizing it for different data or speed or memory or whatever.