Can someone explain Merkle Trees to me in a practical sense?

https://news.ycombinator.com/item?id=21109546
by traceroute66 • 7 years ago
20 6 7 years ago

I've been spending much time in the company of <insert_your_favoured_search_engine> and can only find highly theoretical, often mathematical answers to the question.

The problem I've got is I can't wrap my head around how Merkle Trees work in a practical sense.

The advertised beauty of Merkle Trees is that you can verify the integrity of a branch without the entire tree.

Ok, fine, I get it but how does that work in practice ?

Let's take the well known example of AWS Glacier. I give Amazon a calculated merkle tree root and the BLOB.

So far so good, but what I dont' get is how does that help Amazon verify the integrity of a portion ("branch" in Merkle-speak) of a file ?

I know that the tree root I calculated is the concatenation of various parts ? And given the tree is a concatenation of cryptographic hashes, you can't exactly extract the branches from the root hash ?

Does it work by virtue of brute-force (i.e. when you first send them the file, Amzazon calculates the branches at the point-of-receipt and then stores the hashes of those branches ad-infinitum ?) Or is it more clever than that ?

That's my point. I get the supposed benefits. I understand how you calculate the root. But I just can't fathom how you magically derive the branches from the root without going through the steps of calculating the branches first ?

I hope this is not the wrong place to ask this sort of question !

Related Stories

Loading related stories...

Source preview

news.ycombinator.com