What is Zero-Knowledge Proof
Imagine this situation: you need to tell another person that you know certain information, but you do not want to disclose this information. In other words, the other person needs to be convinced of your knowledge without receiving the data itself.
At first glance, this may seem like an intractable situation, but it is not.
In cryptography, a Zero-Knowledge Proof or ZKP is usually referred to as a protocol that allows one party (the prover) to confirm the existence of certain information to another party (the verifier). The content of the information remains hidden from the verifier.
Usually, in everyday tasks, when one party (let it be party ”A”) tries to convince another party (let it be party ”B”) that it knows some information (say some password – let it be the number ”31102008”), party ”A” will have to tell party ”B” the password ”31102008”. Thus party ”B” will have access to the password – this is a trivial solution for cases where party ”A” can share the password with others.
If we introduce a mandatory condition – party A cannot disclose this password to party B – and at the same time party B must obtain sufficient information that party A knows the correct password, then we speak about the concept of zero-disclosure proof. When we propose a concrete way to implement such a system, however, we speak of a cryptographic protocol.
Abstract Example of a Solution
There are several abstract examples that illustrate how a zero-disclosure proof works.
Suppose you have a picture – a rectangular image on which the unit symbols are presented, among which the letter ”l” can be found. You know exactly where the letter ”l” is and you need to convince another person of the same thing – but without revealing exactly where it is.
You could superimpose on top of the first image another image of grey colour and larger area with a small ”window” – the area through which the ”l” symbol is visible.
Visually it would look like this:
You may have moved the top image under the grey background to the left or right, up or down, so it will be difficult for the checker to know where the letter ”l” is – but they can be convinced that you know the position of the hidden symbol if you actually show the letter ”l” through the blank area.
To make sure you didn’t ”guess” its location at random, the checker may ask several times for proof of knowledge of the letter’s location. He may also ask to use a new grey background with a ”window” in a different location. If you in the role of proving demonstrate the letter ”l” correctly in all cases, the probability of deception on your part in the eyes of the checker is reduced.
It is worth emphasising again: this is just a simplified example of how to solve the question of proving possession of information without disclosing the information. It is often possible to prove the truth of information in a zero-disclosure protocol in several iterations, i.e., the proof may be probabilistic.
The Cave of Zero Probability
To illustrate this point, an example is usually given of the ”Cave of Zero Probability” or ”Ali Baba’s Weird Cave”, originally introduced by Jean-Jacues Quisquater and other cryptographers in a 1990 article on cryptography for children.
It goes something like this:
”An old man named Ali-baba from Baghdad was constantly being robbed by robbers. One day he followed the robber and saw him fleeing into a cave. At the entrance to the cave there was a fork – to the right and to the left. Wherever Ali Baba went, everywhere he met a dead end.
Then one night he hid in one dead end and followed a robber. He ran up to the wall of the cul-de-sac, uttered the magic phrase ”Open Sesame!” and the wall moved. Ali-baba realised that both the left and right passages were connected to each other. Ali-baba studied magic and was able to change the magic phrase into another. The robbers were eventually caught. But when Ali-baba was asked if he really knew the magic phrase, he said that he would not tell anyone, but people could check if he really knew it.
For this purpose the hero went into the cave, and people outside began to shout to him: ”Ali-baba, come out from the right!”, then they went to the fork and saw that he came out from the side of the right fork. And when they shouted to him similarly: ”Come out from the left!”, he came out from the left. When he came out ten times in a row from the right side, people were convinced that he really knew the password.
”A” – entrance to the cave, ”B” – fork. The wall uniting the left and right (”C” and ”D”) passages is marked in red.
Despite the form of the submission, ”Zero Probability Cave” clearly demonstrates a zero-disclosure proof. By the way, where might the protocol meet?
Data transfer
In fact, the concept of zero-disclosure proof can be implemented for different systems where information security is required. It can be the protection of personal data or a way to verify in the system without disclosing additional information. That is, zero-disclosure proof can be used in a banking system or, for example, in cryptocurrencies.
Interactive and non-interactive proofs
Let us focus on the most important issue within the concept: it is common to distinguish between interactive and non-interactive variants of evidence.
Interactive evidence includes evidence in which the reviewer actively interacts with the proving party. He can request evidence directly from the checker and the checker will provide it immediately after the request. This is a common scenario for using the protocol, but it is suitable when there is one verifier and one confirmer in the system and they interact directly with each other. Non-interactive variants are designed for a group of validators. That is, this option does not require constant interaction.
In any case, regardless of the type of evidence, it will need to have three important properties.
It must be consistent with:
- Completeness: If the data are correct, the prover will convince the checker.
- Soundness: if the data is incorrect, the cheater is extremely likely to fail to convince the checker of it
- Zero-Knowledge: if the data is correct, the cheater will not learn anything ”extra”, but only the fact that the data is correct.
zk-SNARK and zk-STARK
Zero-disclosure proofs are used in some cryptocurrencies. The most famous example is Zcash. In Zcash, the so-called shielded transactions can be realised through such protocols. Thus, in Zcash it is possible to conduct transactions without disclosing information about the sender, the recipient and the amount of the transfer. The cryptocurrency blockchain records a cryptographic proof that confirms the correctness of the transaction without disclosing the data.
This was realised by means of verification via the cryptographic non-interactive protocol zk-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge). This proof is created once and can be verified by an unlimited number of participants without the need for feedback from the prover to the verifiers. In fact, zk-SNARK allows to present a proof of correctness of computations in the form of a cryptographic proof based on algebraic transformations.
In addition to zk-SNARK, there are other non-interactive zero-knowledge proof protocols, such as zk-STARK (Zero-Knowledge Scalable Transparent Argument of Knowledge). One of the main differences between zk-STARK and zk-SNARK is the absence of a trusted setting in zk-STARK. A trusted installation is a situation where there is an initial ”setup”- authentication step by multiple system participants.
ZK Rollups
Among the practical applications of zero-knowledge evidence are the so-called Zero-Knowledge Rollups (ZK Rollups). This is a blockchain scaling technology that significantly reduces the load on the underlying network by moving computations outside the main blockchain and then cryptographically verifying them with zero-knowledge evidence. One example of such a solution is the ZKsync project.
ZKP perspectives
Naturally, the concept of Zero-Knowledge Proof covers privacy issues not only in blockchain. The technology itself and specific protocols continue to evolve, as seen in the development of zk-SNARK and zk-STARK. In fact, the latter is a later variation of the ZKP protocol. Also, this concept can be combined with rollups, meaning that decentralised financial systems can not only scale, but also become more secure. Potentially, ZKP could become widespread not only in cryptocurrencies, but also in digital user identification without transferring personal data, and even voting systems.
Conclusion
The concept of zero-disclosure proof allows information to be confirmed without disclosure, which enhances the security and privacy of individual systems. The technology is particularly useful in blockchain and anonymous cryptocurrency environments. Protocols like zk-SNARK allow minimising the information available on the blockchain about a transaction while maintaining the ability to correctly validate the transaction itself. In general, the technology is actively developing, and the original concept has evolved into specific protocols for solving the problem of validating data without disclosing it.
This article was originally Posted on Coinpaper.com