ZERO-KNOWLEDGE PROOF

SAURAV DAGAR
Blockchained India
5 min readJul 8, 2020

--

Today we will talk about a cybersecurity feature that is used in blockchain known as “Zero-Knowledge Proofs”.

Zero-knowledge proof is the ability to prove a secret without revealing the details of that secret. In other words, it is a method by which the prover can prove to the verifier that he/she knows the data, without conveying any information about the data.

Zero-Knowledge Proof must satisfy three properties:

  • Completeness: If the statement is really true and both users follow the rules properly, then the verifier would be convinced without any artificial help.
  • Soundness: If the statement is false, no cheating prover can convince the honest verifier that it is true, except with some small probability.
  • Zero-Knowledge: Verifier in any case would not know any information except that the fact is true.

Understand it better through an experiment -

https://hackernoon.com/hn-images/1*mkZDyso7UvVyutxpP5ugDA.png

Let’s suppose there are two similar cards but with different colors. Your friend is color-blind and has both the cards in his hand. Now your statement is — Both the cards are of different colors. Although your friend does not believe in your statement. So, you need to prove that they have different colors without telling him which is which. How will you prove your statement? Well, you tell your friend to keep the cards hidden behind his back. After that, he brings out a card randomly and lets you see it. He then puts that card back and then randomly chooses the ball again. However, your friend could think that you might be lucky in guessing the card correctly in the first chance as the probability of guessing it correctly is 1/2. But with every chance, the probability of guessing the right card keeps on decreasing (¼, ⅛, .. so on). However, as you keep on giving the answer correctly, he will be sure that you are right after repeating this process for some time. But make sure that your friend doesn’t know which card is of which color. This way you will be able to preserve the third property “zero-knowledge.”

Now let’s understand it with another very famous (cave door analogy) example -

There are two friends, Alice and Bob, discussing outside a cave. They both are discussing an automated gate inside the cave, as shown in the figure below. Alice says that she knows the security code of that gate, but could not share it with anyone. Bob does not trust her and asked her to prove her statement. Therefore, Alice decided to enter the cave through path A and exit from path B. As she has to open the gate to come out from the cave, hence she can prove to Bob that she knows the required code.

Alice enters the cave through path A and exits from path B. She has been able to prove to Bob that she has the security key (i.e., data) without revealing what it is.

This simple cave door analogy is a Zero-Knowledge Proof, and if you can understand this, then you will understand why it is so important in the blockchain.

Suppose a user “X” makes a request to send $100 to another user “Y”. The blockchain should ensure, before committing this transaction, that X has enough money to perform this transaction. However, blockchain does not really need to care about who is spending the money, or how much total money X has. Therefore it is easy to validate the transaction without knowing the actual data. This is one of the primary use cases for Zero-Knowledge Proofs in Blockchain.

Some real-life examples of implementing zero-proof knowledge are -

  • ZCash — ZCash is a digital currency with strong privacy features. It is an open-source and permissionless blockchain platform that offers the functionality to keep transactions ‘transparent’ and ‘shielded’ as per the requirement. ZCash started as a fork of the bitcoin blockchain on October 28, 2016. Initially, it was known as Zerocoin protocol then it was transformed into the Zerocash system and then finally, Zcash. It has a hard limit of 21 million coins.

How Does ZCash Work?

There are two types of transactions in Zcash, one is a normal transparent transaction and the other one is the shielded private transaction.

If a user is good to go with the transparent transaction and open for the world to see, then she can accomplish the transaction with her transparent address. However, if she wants some privacy and does not want the transaction details to be open to the public, she can simply have the money sent to her shielded. In this case, all the details of the transaction would be private. The reason why Z-Cash achieves such a high level of privacy is that of the utilization of zk-SNARKS or Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge.

  • INGIt is a Netherlands based bank that has introduced its own zero-knowledge blockchain. On 16 November, ING announced the initial release of its Zero-Knowledge Range Proof (ZKRP) solution — a specific ZKP that has been proven to be ten times more efficient than other ZKPs. One of the biggest challenges in the financial industry is the protection of private information on a public ledger. ZKRP technology signals a major addition to blockchain technology and will help overcome the major issue in financial services using blockchain technology: improving confidentiality in a public ledger.
  • ZCoin — When we talk about cryptocurrencies in general, we say that they have the ability to facilitate anonymous transactions. However, the truth is that cryptocurrencies like Bitcoin and Ethereum can’t provide full anonymity of transactions. Zcoin is a cryptocurrency that intends to add more anonymity and privacy in transactions using the Zerocoin protocol, which is based on zero-knowledge proof while retaining all the other advantages of cryptocurrencies like Bitcoin. In the Zcoin network, users’ coins cannot be used to trace their transaction history, which is not possible with most cryptocurrencies.

Note that Ethereum and Hyperledger are also implementing Zero-Knowledge Proof.

If you want to learn more about new developments in the blockchain field, then do join our community.

Facebook | Twitter | LinkedIn | Telegram | Website

Referencehttps://en.wikipedia.org/wiki/Zero-knowledge_proof

--

--