<p>Merkle trees in general are useful in the context of a prover-verifier model.</p>
<p>A prover Peggy wants to prove to verifier Victor that a merkle root R, which Victor knows ahead of time, commits to a tree which includes a specific leaf L.</p>
<p>To do so, Peggy would send the element L well as the Merkle proof (or branch) containing all hashing partners L is combined with to produce R. In your example diagram, that proof consists of Hk, Hij, Hmnop, and Habcdefgh. Victor uses these elements to recompute R from it, and compare it with his pre-existing knowledge of R.</p>
<p>So to answer your question: certainly something has to keep Hk (or the elements that has to it, so it can be recomputed), but it doesn't need to the same party as the one that does the verification. If there is only one party involved, there is nothing to prove.</p>

CC BY-SA 4.0
2020-10-20T22:55:06.377Z
2020-10-20T22:55:06.377Z
Pieter Wuille
<p>I think I understand Merkle verification, but I just want to make sure. Consider this following picture where all the blue nodes were sent to me</p>
<p><a href="https://i.sstatic.net/2Ep7y.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2Ep7y.png" alt="enter image description here" /></a></p>
<p>My question : if the document that I want to verify is the one that hashes to HL, I still need to have HK in my storage right ? Because otherwise I can't compute the Root, to compare it with the real root.</p>

<merkle-tree>
Question about Merkle path verification
confused_bitcoin_learner
# Question about Merkle path verification

(Asked by: username_0 on 2020-10-20)

I think I understand Merkle verification, but I just want to make sure. Consider this following picture where all the blue nodes were sent to me

[![enter image description here](https://i.sstatic.net/2Ep7y.png)](https://i.sstatic.net/2Ep7y.png)

My question : if the document that I want to verify is the one that hashes to HL, I still need to have HK in my storage right ? Because otherwise I can't compute the Root, to compare it with the real root.

**Tags:** merkle-tree


---

## 1 answers

### Answer by username_1 on 2020-10-20. Score: 1

Merkle trees in general are useful in the context of a prover-verifier model.

A prover Peggy wants to prove to verifier Victor that a merkle root R, which Victor knows ahead of time, commits to a tree which includes a specific leaf L.

To do so, Peggy would send the element L well as the Merkle proof (or branch) containing all hashing partners L is combined with to produce R. In your example diagram, that proof consists of Hk, Hij, Hmnop, and Habcdefgh. Victor uses these elements to recompute R from it, and compare it with his pre-existing knowledge of R.

So to answer your question: certainly something has to keep Hk (or the elements that has to it, so it can be recomputed), but it doesn't need to the same party as the one that does the verification. If there is only one party involved, there is nothing to prove.


---

