Crypto-0-nite
Published in

Crypto-0-nite

Merkle proofs Explained.

This article explains how to obtain and what merkle proofs are.

Merkle proofs are used to decide upon the following factors:

  • If the data belongs in the merkle tree
  • To concisely prove the validity of data being part of a dataset without storing the whole data set
  • To ensure the validity of a certain data set being inclusive in a larger data set without revealing either the complete data set or its subset.

Merkle trees make extensive use of one way hashing.

Merkle proofs are established by hashing a hash’s corresponding hash together and climbing up the tree until you obtain the root hash which is or can be publicly known.

Given that one way hashes are intended to be collision free and deterministic algorithms, no two plaintext hashes can/should be the same.

Merkle proofs are better explained with the following example.

In order to verify the inclusion of data [K], in the merkle tree root, we use a one way function to hash [K] to obtain H(K).

In order to validate the inclusivity of K, K doesn’t have to be revealed, similarly the hash of data L can be revealed without any implicit security repercussions and so on.

H(K) when hashed with the hash of the unknown dataset L, yields H(KL).
H(KL) hashed with H(IJ) leads to H(IJKL).
H(IJKL) hashed with H(MNOP) leads to H(IJKLMNOP)
H(IJKLMNOP) when hashed with H(ABCDEFGH) yields H(ABCDEFHGIJKLMNOP) which happens to be our publically available merkle root.

We’ve hence proven that the data set K is indeed present in our merkle tree by making use of H(L), H(IJ), H(MNOP) and H(ABCDEFGH) without having to reveal K or any of the data.

In order to obtain a merkle proof of H, we need H(L), H(IJ), H(MNOP) and H(ABCDEFGH) with which we can together obtain H(ABCDEFHGIJKLMNOP) hence proving that H(K) was part of the merkle tree implying that data set K was indeed part of the universal dataset [A, B, C, … , N, O, P]

Merkle trees are extensively used to prove inclusivity in large datasets and majority of blockchain applications.

References:

I hope this was helpful and informative.

Thanks to erick calder for correcting the mistakes.

All the best

Cryptonite aims to be a collection of articles, thoughts and insight into the world of applied Cryptography.

Recommended from Medium

Programming languages — Relationship between satisfaction and opportunities

Data Analysis on Student’s Performance Dataset from Kaggle.

My prelude to Data Science

Analyzing NYPD Motor Vehicle Collisions with Python (Part 2)

What Is Big Data Analytics and How Useful Is It to Your Business?

Product Release Wrap-Up April 2019

Update: Correlations Explorer in my COVID-19 app

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Belavadi Prahalad

Belavadi Prahalad

Protagonist. Freedom. Bitcoin.

More from Medium

Understanding DeFi — empowerment of a financial revolution

Sovryn explained: DeFi on Bitcoin’s side-chain

X-Margin Partners to Launch Maple Solana, Opens $45M Pool

A Primer on Token Price Stability