Zero-Knowledge (ZK) in Blockchain

Publication date: October 25, 2023

Zero-Knowledge Proof is a method by which one party can prove to another party that a given statement is true, while avoiding conveying to the verifier any information beyond the mere fact of the statement’s truth.

In blockchain, Zero-Knowledge Proof is used to enhance privacy, security, and scalability by enabling confidential transactions, private data management, and leveraging specific applications such as zkRollups.

There are two parties – prover and verifier. The prover convinces verifier of a statement’s truth without revealing extra information. Whereas, the verifier validates the proof without learning more thanks to the statement’s validity.

One example for zero-knowledge authentication is when a prover has an asymmetric key-pair (e.g. RSA, EC) and using the private key (the identifying secret) to respond to a challenge sent with the public key. The private key is never revealed, but the verifier is convinced that the prover has the key.

zkSNARKs and zkSTARKs – popular ZK Proof systems in blockchain

The analysed protocol is of importance in cryptocurrency sector.

Privacy in the cryptocurrency world has always been perceived by crypto enthusiasts and the crypto community as one of the most important aspects. Most cryptocurrency holders do not want their assets and their transaction history to be completely public. Among the many different cryptographic techniques focused on ensuring privacy in blockchain networks, Zk-SNARK and Zk-STARK proofs are two examples that are definitely worth paying more attention to.

Zk-SNARK is an abbreviation of the English zero-knowledge succinct non-interactive argument of knowledge, which literally translates into Polish as: concise and non-interactive proof based on zero knowledge. In turn, Zk-STARK stands for a concise and transparent proof based on zero knowledge. Zk-SNARK is already used, among others, in Zcash, JP Morgan Chase’s payment system based on blockchain technology, and as a way to securely authenticate customers through data servers. While Zk-SNARK proofs are already very widely used and implemented in many systems, Zk-STARKs are now touted as a new and improved version of their original that simultaneously addresses many of the existing shortcomings in the Zk-SNARK protocol.

They enable the creation of compact and efficient proofs. Creation of proofs involve computationally intensive calculations, whereas verification is computationally efficient and allows for quick validation. zkSNARKs provide shorter proof sizes and faster proof generation compared to zkSTARKs, on the other hand zkSTARKs eliminate the need for a trusted setup providing better transparency and avoiding potential trust issues.

Examples of ZK Applications in Blockchain

ZK is used in anonymous payments and financial transactions, managing personal data and identity privacy, voting systems and elections with integrity and anonymity, zkRollups.

zkRollups is a Layer 2 scaling solution that utilizes ZK Proofs in blockchain. By aggregating multiple transactions into a single proof, zkRollups improve scalability, reduce costs, and maintain the security and transparency of the underlying blockchain.

zkRollups and Optimistic Rollups are two Layer 2 scaling approaches in blockchain. Determining if ZK-rollups or optimistic rollups are superior depends on the specific needs of a blockchain network. ZK-rollups provide enhanced security and privacy through zero-knowledge proofs, allowing transaction verification without revealing details and reducing data storage requirements.

Optimistic rollups offer higher scalability, processing more transactions per second, and are easier to implement without needing complex zero-knowledge proofs. The choice depends on network goals, and a hybrid approach may combine the best features of both rollups.

In the medium to long term, as technology improves, zkRollups are expected to excel in all use cases.

Advantages, Computational Resources and Challenges of ZK

The use of ZK in the blockchain can be very beneficial. This method ensures increased privacy and confidentiality of transactions, improves scalability by compressing large files into compact evidence, and increases security by ensuring the validity of transactions and data without revealing sensitive information.

Generating zero-knowledge proofs involves very complex calculations best performed on specialized machines. Verifying proofs also requires complex computation and increases the costs of implementing zero-knowledge technology in applications. This cost is particularly relevant in the context of proving computation. However, verification of ZK proofs is a fast operation.

It is important to consider the size of proofs, which can impact scalability and network bandwidth. Balancing computational efficiency, proof size, and security is crucial when implementing ZK protocols in blockchain networks.

Continued research and development in ZK protocols will unlock new possibilities. Embracing ZK in blockchain has the potential to revolutionize various industries and applications.