Blockchain Zero-knowledge Proof In A Nutshell

Demiro Massessi
Oct 22, 2018 · 3 min read
Photo by Zhifei Zhou on Unsplash

Today we’re going to talk about a cybersecurity idea in blockchain known as “Zero-Knowledge Proofs”.

Zero-knowledge proof is the ability to prove a secret without revealing what the secret is.

Discover and review best Blockchain softwares

Let’s review an example:
Let’s say there are two toy cars, identical in shape and size, except, one is red and one is blue. Jimmy, who is color-blind, holds the toy cars behind his back. Jimmy then shows one of the cars to David. Jimmy then hides that car behind his back and shows David the other car. David can consistently detect the switch because the cars are different colors, but he never has to reveal the color of the cars to Jimmy in order to prove the secret.

That is exactly what Zero-Knowledge Proofs is about, they allow me to prove to another party that I have a certain piece of knowledge without revealing what that knowledge is.

Zero-Knowledge Proofs are often referred to as zk-SNARKs, which stand for “Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge”, or zk-SNARKs for short, but, if you want to be simple, we can just call them Zero-Knowledge Proofs.

A great example of a Zero-Knowledge Proof is what is called the cave door analogy.

Pretend that there’s a circular cave, with only one entrance or exit and at the back of this circular cave there’s a door which can be unlocked using a secret code entered onto a keypad.

Yes, I am really bad at drawing! That’s the best I could come up with.

If I want to prove to you that I know the unlock code without revealing that unlock code to you, all I need to show is that I can walk into one end of the cave, open the door, and come out the other end.

If I’ve successfully demonstrated that, then you know without a doubt I’ve been able to unlock that door, but yet I haven’t revealed that unlock code to you.

This simple cave door analogy is a Zero-Knowledge proof, and if you can remember this cave door analogy, then you’ll understand why Zero-Knowledge Proofs are so important in blockchain.

For example, a user may make a request to send another user some money.
The blockchain naturally wants to make sure, before it commits this transaction, that the user sending the money has enough to send.
However, the blockchain doesn’t really need to know or care who is spending the money, or how much total money they have.

Being able to answer a question of “Does a user have enough money to send to another user” without knowing who the user is, or exactly how much they have, is one of the primary use cases for Zero-Knowledge Proofs in blockchain.

So from now on, when you hear about zk-SNARKs, don’t get intimidated.

It’s not a complex idea. Just think of Zero-Knowledge Proofs and the cave door, think about how important it is in blockchain to be able to prove a claim without actually revealing the information behind that claim, and you’ll understand Zero-Knowledge Proofs.

Hyperledger Fabric and Ethereum have the implementation of Zero-Knowledge Proofs under development.

One of the blockchain-based system using Zero-Knowledge Proofs is ZCash.

Get Best Software Deals Directly In Your Inbox

Coinmonks

Coinmonks is a non-profit Crypto educational publication.

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

Demiro Massessi

Written by

CTO / Co-Founder / Manager / Full-Stack Software Engineer / Blockchain Solution Architect / Technology lover / Wannabe writer

Coinmonks

Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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