Recently a new term started buzzing around in Crypto community — Zero Knowledge Proof or ZK-Snark.
Zero-knowledge proof is a method or process, where one person (the prover) can prove something to another person (the verifier) that given statement is true without revealing no additional information about that statement apart from the fact that it is actually true.
Let’s take an example.
I managed to find a simple example to understand everything better. Imagine an experiment, where we have a color-blind person who cannot distinguish colors.
And we have two balls of different colors.
You know that those balls are different colors, however, for the color-blind person they seem identical. The question is, how you can prove him, that these balls are actually different without revealing any information which one is which, not even their actual color?
This is where Zero-knowledge proof comes into play.
You conduct an experiment:
The color-blind person takes both balls and hide them behind his back. Then he shows you one ball, returns it back, and shows you the same or the second ball one more time.
Every time you have to say if he has swapped the balls or not. From now on, each time he shows the ball, there is a 50% probability that he swapped the ball.
By looking at their colours, you can definitely say whether or not he switched them. On the other hand, if they were the same colour and hence indistinguishable, there is no way you could guess correctly with probability higher than 50%.
If you repeat this proof multiple times, the color-blind person should be convinced that balls are actually different colour otherwise, you would not be able to guess right that many times.
This is a perfect example of zero-knowledge proof. You never reveal what color and which ball is which, but the color-blind person is convinced that the balls are actually different color.
A more technical example could be that given the hash of a random number, the prover can convince the verifier not only that the number exists, but that they in fact know such a number for that hash — again, without revealing any information about the number.
So why everyone talks about this thing? Where it can be actually applied in Crypto space?
Cryptocurrency with market cap of more than $840,000,000 is fully powered by Zero-Knowledge proof. Zcash is the first open, permissionless cryptocurrency that can fully protect the privacy of transactions using zero-knowledge cryptography.
Zcash is powered by zero-knowledge proof construction called a zk-SNARK.
Zcash uses zk-SNARKs to prove that the conditions for a valid transaction have been satisfied without revealing any crucial information about the addresses or values involved. The sender of a shielded transaction constructs a proof to show that, with high probability:
- the input values sum to the output values for each shielded transfer.
- the sender proves that they have the private spending keys of the input notes, giving them the authority to spend.
- The private spending keys of the input notes are cryptographically linked to a signature over the whole transaction, in such a way that the transaction cannot be modified by a party who did not know these private keys.
To be honest, I haven’t deeply analysed Zcash before, but now it seems pretty fascinating from a technology perspective and at the same time pretty scary from money laundering perspective. Compared to Bitcoin, you can trace the route of a coin, and once it hit’s some exchange — EUREKA, most of the time you know the actual person behind some bad things. With ZCash you do not have that ability anymore.
The recent Ethereum Metropolis (Byzantium) upgrade added a zk-SNARKs — a cryptographic tool developed by ZCash team. The building blocks of the verification algorithm was added to Ethereum in the form of precompiled smart contracts.
Using zk-SNARKS on Ethereum you could implement Token transfers from one address to another without revealing the amount of the transaction. Consensys explained how it could work here.
In DevCon3 there was presented The Open Vote Network, a system that enables anonymous voting on the Ethereum platform using Zero-Knowledge proofs.
It is still early and there is not many applications on Ethereum developed yet using Zero-knowledge proof, but it shows a huge potential for privacy on Ethereum Blockchain.
I had an opportunity to study cryptography for half a year. Even though the course was interesting, it was not that satisfying as I couldn’t find real-world use-cases by that time. And just more than a year ago, I started to understand the actual value of cryptography in the whole CryptoCurrency economy, as everything is purely based on it and mathematics.
This knowledge allows me to understand the true value behind cryptocurrency like Zcash and many more. I would highly recomend you to digg deeper into cryptography and the mechanics of it, as this knowledge gives you massive advantage no matter your goals.
Enjoyed the article? Please let me know that by recommending it to others by clicking CLAP below.
Click follow, if you want to get more insights on the blockchain and smart contracts!