What is Zero-Knowledge Proof?

What is zero-knowledge proof

Everybody cares about protecting the user’s information these days, especially since the European Union passed its GDPR. Websites ask for your permission to store cookies, organizations want you to give your consent to store your personal data, and so on.

While everything sounds good on paper, the hard truth is that people are “forced” to reveal personal information. After all, you can’t get a job or a loan without providing specific information about yourself.

Fortunately, a solution might exist that will take data protection on the next level. I’m talking about zero-knowledge proof.

If you don’t know about zero-knowledge proof, I won’t be surprised. It’s used in cryptocurrencies to hide transaction information.

So, today I’m going to explain to you what the zero-knowledge proof is and its possible applications.

1. What is zero-knowledge proof?

Let’s say that you know a secret. Your friend doesn’t believe you and says that you’re lying. You want to prove to him that you know the secret, but without relieving the secret itself.

That’s what zero-knowledge proof is. It’s a way to verify information without disclosing the actual data.

It’s not a new concept at all. It was first described in a 1985 paper called “The Knowledge Complexity of Interactive Proof-Systems.”

However, the recent breakthroughs in cryptocurrencies have brought it back on the stage as a way to secure transactions.

2. How does zero-knowledge proof works?

At first, zero-knowledge proof sounds impossible. Well, to explain it to you I’m going to use the Two color balls and the Color-blinded friend scenario.

Imagine that your friend Bob is color blind. If you have an identical red and green ball, he won’t be able to tell them apart. As a result, Bob might not believe you that they are different and assume that you’re making a fool out of him.

How are you going to prove to your friend that the balls are not the same without pointing out which is red and which is green?

You hand over the balls to Bob and remember which ball in which hand is. Then Bob puts his hands behind his back. Bob might switch the balls’ position or not. You don’t know.

Next, Bob shows you the balls and asks, “Have I switched the balls?”

If you’re not color blind like Bob, you’ll be able to answer correctly. That should convince Bob that the two balls are not identical.

However, Bob might say, “You’ve guessed.” And he’d be right to say so. You have 50/50 chance of getting it right.

What do you do? You repeat the exercise. Each time, your chances of guessing get lower and lower. If you do it enough times, Bob should get convinced that the balls are different.

However, he still won’t be able to tell which is green and which is red because you haven’t told them.

So, the main principles on which the zero-knowledge proof lies are:

  • Zero-knowledgeness – your friend doesn’t learn what you know (how to tell the balls apart, for example) 
  • Soundness – you can convince your friend only if you know the truth
  • Completeness – if you know the solution, it’s highly probable that you’ll persuade Bob that you’re not lying

Another abstract example of how the zero-knowledge proof works is the Ali Baba Cave, for which you can read here.

3. What are interactive and non-interactive zero-knowledge proofs?

The example I gave you is interactive zero-knowledge proof because you – the prover – has to interact with the verifier – the person you have to convince.

However, as some of you might point out, the disadvantage of this method is that you can convince only one person at a time. Imagine that you have to do the ball trick with 10-20 friends!

So, that’s not going to work when it comes to the blockchain, because it would be time-consuming to convince all the nodes involved. Instead, cryptocurrencies like ZCash use non-interactive zero-knowledge proof.

A non-interactive zero-knowledge proof allows you to make a proof that anyone can verify by themselves. It involves some complicated math that I’m not going to talk about because it’s too difficult to comprehend. Instead, I’m going to give you the Sudoku example.

Let’s say that you know the solution to a Sudoku game. To prove that you know it without revealing the answers, you need 27 cards for each number from 1 to 9.

Then you fill the blank spaces by putting the cards face down (the visible numbers you fill with cards face up). You need three cards for each space (for example, three 7s, 6s, and so on) Then:


Credit: www.expressvpn.com

  • Take the cards from the first row and put them into a pile.
  • Do the same with the remaining rows. You should have nine piles.
  • Repeat the steps with the columns.
  • Finally, take the last cards from each sector (from each big square).

If you are telling the truth, each pile should contain the numbers from 1 to 9 without any repetitions. So, everyone who wishes can verify it for themselves.

Of course, it’s way more complicated when it’s applied to cryptocurrencies, but it’s the same principle.

4. What are the possible applications of zero-knowledge proof?

As I already pointed out, one of the current applications of the zero-knowledge proof is within the cryptocurrency field.

Bitcoin is not anonymous at all despite what you might have heard. The data about the sender/receiver and the amount sent is available for every node and everybody who joins the blockchain. So, if Bob knows your Bitcoin address, he can check your balance wherever he wants.

That’s why some cryptocurrencies like Zcash have turned to zero-knowledge proof as a way to make the transactions private. They use zk-SNARK, which stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. The verifying nodes do not know the content of the transition, instead, they are verifying hashes.

Banks have also noticed the potential of the zero-knowledge proof. In fact, ING Bank has already started using Zero-Knowledge Range Proof. For example, if you want to get a loan or a mortgage, but you don’t want to reveal your salary, you can instead proof that your salary is within a specific range.

And that’s not all. You can use it to prove that one payment is within certain limits without disclosing the exact number. It’s far more efficient than traditional technology and consequently, cheaper. It won’t be surprising if it revolutionizes the financial market.

The only problem is that the range has to be wide enough. For example, if the range is from $2000 to $2050, it won’t take you much to guess someone’s salary, which negates the zero-knowledge proof principle.

In addition to this, zero-knowledge might be applied to nuclear disarmament. Countries trying to reduce the number of nuclear warheads they have won’t allow “independent verifiers” to check their weapons. After all, they can leak the design and the specifications to a hostile nation.

Instead, by using physical zero-knowledge proofs scientist can say whether two objects are the same in terms of geometry and compositions. That would allow them to make sure that a county has really destroyed their nuclear warheads without revealing the design.

5. What are the cons of the zero-knowledge proof?

Let’s go back to our examples with the balls and the color blinded friend. The more you repeat the exercise, the lower the chances are that you’re lying about the balls.

However, the percentage would never be zero, so zero-knowledge proof can never yield an airtight proof. There is a small chance that someone would be able to trick the system.

In addition to this, interactive zero-knowledge proof requires a large number of interactions (remember the ball exercise), and it’s far too time-consuming.

What’s more, the algorithm requires lots of computing power, so it might not be able to run on slow devices or mobile ones. Zcash is working on improving it, so we might see it soon on a smart phone.

Another possible downside is that you can lose the secret you’re trying to protect. Let’s say that only a couple of people know a state secret. If they use the zero-knowledge proof, and they die without revealing it to other people, the only thing remaining would be the proof that they know the same secret.

Nowadays, regulations and laws are still hindering banks and other organization from fully employing zero-knowledge proofs. However, it’s evident that it has a bright future and that it’s a great solution for protecting sensitive information.

What do you think about zero-knowledge proof? Do you think that it has the potential to change the financial world? Share your thoughts in the comments.

About the author

    Whale Sumo

    Hello, I’m Jamie Harber. I’m a specialist in computer sciences with vast experience and practice. As a graduate of the ITT Technical Institute-Murray, I’ve worked on expanding my knowledge about computers and malware.My sole purpose is to teach customers how to prevent serious malware attacks and give them a comprehensive removal guide for getting rid of viruses. To do my job well, I research existing malware so that I can inform my customers how serious or how harmful these viruses could be.In the morning I can’t think of anything else but what virus removal instructions I can give my clients. I try to come up with the most helpful ones that won’t be hard to follow.