What is ZKP in simple words

Introduction

People's use of cryptocurrencies continues to grow year by year due to its key benefit - independence from financial institutions or government regulations that can seize assets without warning or explanation.

However we must also acknowledge its downside since every transaction conducted on the blockchain network is transparently recorded for all parties involved. But now thanks to emerging cryptographic technologies like zk-SNARK and zk-STARK we can enjoy anonymous transactions while maintaining ownership over their digital assets. This article delves deeper into how these advanced systems work in order to provide enhanced privacy protection for cryptocurrency holders.

What is Zero Knowledge Proof and how does it work?

ZKP technology enables one party to prove the truth of a statement to another party without revealing any additional information. The party providing the proof can generate unique mathematical proofs, which the verifier can use to confirm the validity of the statement. It is important to emphasize that neither party can utilize the proof to gain access to the original information. Currently, ZKP is being actively embraced by blockchains, and many DeFi projects are already utilizing ZKP technology to enhance anonymity for users. Now let me give you a visual example of how ZKP works: Imagine you have a store in your house, and to enter, one needs to input a password. You notice someone attempting to access the store without knowing the password. You offer to sell him the password. However, the person wants to make sure that you actually have the password. In this case, we need to prove that our claim is true without revealing additional information (password) - instead of revealing the password, you simply enter it and open the door, convincing the potential buyer that you possess the necessary information. To summarize, ZKP allows us to prove possession of certain information without disclosing the information itself.

There are only two types of ZKP: interactive and non-interactive.

Non-interactive - implies that direct communication is not required and the authenticity of the claim can be proven ex post facto. Simply put, it means that there is almost no interaction between prover and verifier.  In "non-interactive" structures, there is only one piece of proof to be exchanged between the prover and the verifier.

Interactive ZKP is considered an older version, where the verifier performs proof in real time and sends a request to the prover, who must provide an answer.

zk-SNARK

zk-SNARK stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge. It is a type of non-interactive ZKP commonly used today to construct zero-knowledge protocols. To understand what it entails, let's delve into each letter of the acronym.

Zk: Zero Knowledge - It ensures that if a statement is true, the verifier gains no additional knowledge other than the fact that the statement is indeed true. In other words, no supplementary information is disclosed.

S: Succinct - This indicates that the proof's size is compact enough to be efficiently verified within a short span of time.

N: Non-interactive - It signifies that this construction does not require bidirectional communication between the verifier and the prover.

ARK: Argument of Knowledge - It establishes a scenario where the prover can convince the verifier that certain information exists without fully revealing all the details of that information.

Currently, zk-SNARK proofs rely on an initial trusted setup between the prover and the verifier.

Initial trusted setup

Consider a chef who works in a restaurant and is responsible for cooking fish. To prepare a dish, the chef needs fresh salmon, which he can’t catch or buy on his own. In this case the assistant chef takes the fish and gives it to the chef, without giving any additional information about the fish (where he caught it, whether it is fresh or not, etc.) The act of catching the fish by the assistant is a phase of trust, since no one knows where and when the fish was caught. The chef must trust the helper completely when using a particular fish. If the fish turns out to be tainted, the customer will not be able to tell if it was contaminated during the cooking process or if it was already tainted when the assistant received it. The initial setup process is extremely important to prevent fraudulent operations because if someone gains access to the randomness of the parameters, they can manipulate the data to create convincing false information for the verifier.

zk-STARK

zk-STARK is an enhanced version of zk-SNARK that offers improved efficiency and speed by reducing the number of data exchange cycles between the prover and verifier. Furthermore, zk-STARK addresses a significant issue of zk-SNARK, which is its reliance on a trusted setup. Instead of trust tuning, zk-STARK uses transparent arguments of knowledge, allowing the verifier to check the proof without needing to trust the party providing the proof. This is achieved by using universal and immutable verification keys that can be pre-generated and made publicly available to all participants in the system. This is why there is a T in the STARK, which stands for - transparent. zk-SNARK is computationally sound, with a very low probability of fraudulent provers successfully deceiving the system. Its robustness is based on the assumption that the checker has limited computational power. In theory, a prover with sufficient computational power could create fraudulent proofs, which is one reason why quantum computers might pose a threat to zk-SNARK. However, zk-STARK overcomes this challenge by eliminating the need for an initial trusted setup.

Examples of zk-stark and zk-snark applications

KYC

Most likely, you are already familiar with the KYC procedure, which is commonly implemented on various exchanges. However, it is crucial to consider the security of your personal data and the potential risks associated with data breaches and misuse. In this regard, zk-STARK technology emerges as an optimal solution to ensure utmost privacy and security. By leveraging zk-STARK in KYC processes, we can verify the identities of customers without disclosing their sensitive data, relying on ZKP. This approach significantly enhances the security level in the KYC process, mitigating the risks of data leaks and unauthorized handling by personnel.

Zcash

Zcash is a cryptocurrency that you may have come across or even used before. The core concept of Zcash revolves around ensuring privacy and confidentiality in your transactions. So, how is this achieved? The answer lies in zk-SNARK technology. Zcash utilizes zk-SNARK based on ZKP. When conducting transactions, zk-SNARK enables the generation of evidence that verifies the transaction's correctness without disclosing specific data or transaction details. This impressive feat is accomplished through the application of elliptic curve algorithms and hash functions, delivering a remarkable level of privacy and data protection within the Zcash ecosystem.

Starknet and zk-STARK

Let's talk about StarkNet, our favorite platform using zk-STARK technology. One of the motivations behind adopting zk-STARK on StarkNet is its remarkable ability to offer mathematically valid proofs, known as zero-knowledge proof, enabling the verification of complex computations while safeguarding sensitive data. This ensures a heightened level of privacy for users, as their input data and program logic remain securely concealed. Moreover, zk-STARK boasts impressive scalability, facilitating the processing of a substantial number of transactions within short timeframes. This scalability is particularly vital for StarkNet, as the platform aims to empower the development of decentralized applications like JediSwap, necessitating robust bandwidth and rapid transaction execution. By incorporating zk-STARK into StarkNet, we achieve a remarkable blend of privacy, security, and scalability, making the platform immensely appealing to developers and users seeking to embrace decentralized ethereum based applications.

Conclusion

In conclusion, it is important to acknowledge that advancements like those seen with zk-SNARK and zk-STARK represent crucial accomplishments within the field of zero-knowledge proof. These  breakthroughs exhibit exceptional levels of confidence while retaining an impressive degree of efficiency during verification processes - Although it is notable that zk-STARK enjoys a clear advantage thanks to its absence from requiring an assumed initial trusted setup. These protocols open new doors, ones filled with possibilities regarding implementing secure as well as transparent systems. With such innovations gaining momentum within cryptographic industries - it inflicts improvements that could significantly enhance trust in our digital world.