zk-SNARKs and zk-STARKs permeate almost everything zero-knowledge in blockchain. Here's all you need to know to understand how they differ.

## Table of Contents:

To understand the concept of zk-SNARKs vs zk-STARKs and how these technologies measure against each other, itâ€™s imperative to first outlay the problem they solve.

Lack of privacy and scalability are the two biggest obstacles hampering the mass adoption of blockchain technology. As beautiful as the idea of a public and permissionless blockchain is, without data privacy, a Web3-heavy future could look like a dystopia in which every single transaction leaves a clear trail open to the public to learn everything about you.

Publicly accessible transaction records are great as verifiable activity proofs, but anyone who cared could go digging, linking payment to payment, and tying your real-world identity to your on-chain trail and could use it against you.

Similarly, a lack of scalability can gravely inhibit the prospects of blockchain adoption. The scalability problem has been at the core of most of the blockchain innovations weâ€™ve seen in the past couple of years. Without sacrificing decentralization, the current state of blockchain technology simply cannot support applications that reach mass adoption.

Then came zero-knowledge proofs â€“ Â a single solution to both problems.

**ZKPs â€“ a solution to the blockchain privacy/scalability riddle**

A ZKP (Which stands for zero-knowledge proof) allows one party to verify (among other things) a claim that a transaction is valid or correct without the need to carry additional information about the transaction. Through them, cryptography found a way to prove the authenticity of a transaction without revealing sensitive information.

The emergence of ZK-proofs signaled a new dawn for the crypto space. Not only could they enable truly private transactions, but they could also help networks like Ethereum scale.

For a zero-knowledge proof to work, it needs to fulfill three conditions â€“ completeness, soundness, and zero-knowledge. ZKPs can be of one of two types â€“ interactive and non-interactive. Interactive zero-knowledge proofs needed constant, back-and-forth interactions between the prover and the verifier until the verifier confirms the truth in the prover's claims.

Non-interactive ZKPs require no such interaction, with a single exchange of information sufficing to satisfy both parties. The most prominent non-interactive ZKPs are zk-SNARKs and zk-STARKs. In this article, weâ€™ll look at what they are, their differences, applications, and use cases.

**What are zk-SNARKs?**

zk-SNARK stand for Zero-knowledge Succinct Non-interactive Argument of Knowledge, a type of non-interactive zero-knowledge proof widely used today. Privacy coin protocols like Zcash use zk-SNARKs to offer a shielded blockchain experience while providing sufficient proof that every shielded transaction is valid.

To understand how zk-SNARKs work, we must consider each letter of the acronym:

**ZK:**This pair represents â€śzero-knowledgeâ€ť, signifying that a zk-SNARK provides no additional information other than the validity of its submitter claims. Any information that describes the nature of the transaction(s), its participants, and the exchanged value is withheld from the verifier.**S:**This letter stands for â€śsuccinctâ€ť, meaning that the proof size is small (occupying little space) paving the way for quick and easy verifications.**N:**Stands for non-interactive, meaning that little or no interaction is required between prover and verifier. Everything from proof generation to submission and verification occurs within a single transaction.**ARK**: Represents â€śArgument of Knowledgeâ€ť, and this part adds the quality of computational soundness to zk-SNARKs. Simply put, a bad actor can hardly cheat the system without the knowledge to support their claim (i.e. by holding the underlying information theyâ€™re trying to forge). This is based on the theory that the bad actor has limited computational power, meaning that anyone with unlimited computational power could create fake proofs. Some zk-SNARK protocols have a way to prevent this kind of attack.

zk-SNARKs have an important piece of their makeup: they require a trusted setup between prover and verifier. To construct zero-knowledge proofs with zk-SNARKs, a set of public parameters is needed, along with the creation of cryptographic keys. You can liken these parameters to the â€śrulesâ€ť of a protocol, and they are usually encoded. Meanwhile, the keys make privacy possible.

Zcash is one of the foremost privacy-preserving protocols that use zk-SNARKs. Also, some popular ZK-rollups and Layer-2 blockchains use zk-SNARK proof technology to provide scalability to traditional blockchain networks like Ethereum.

**What are zk-STARKs?**

The first papers detailing STARKs were published in 2018 by Eli Ben-Sasson, Iddo Bentov, Yinon Horeshy, and Michael Riabzev. As another type of non-interactive zero-knowledge proof, zk-STARKs are less popular than their zkSNARK counterparts, mostly because they are a newer model. The term stands for zero-knowledge scalable transparent arguments of knowledge, and they are faithful to the fundamentals of zero-knowledge proofs, allowing users to share validated data or perform computations with third parties without disclosing any actual information to the third party. Like in the case of zk-SNARKs, we will evaluate each letter of the acronym to learn how zk-STARKs work.

**ZK:**Like in â€śzk-SNARKsâ€ť, this also means â€śzero-knowledgeâ€ť, implying that they prove transactions or interactions without disclosing any underlying information except that they are correct and authentic.**S:**This means â€śscalableâ€ť, highlighting how these zero-knowledge proofs focus on enhancing blockchain scalability. zk-STARKs enable developers to execute computation and store data off-chain, increasing scalability exponentially. The zero-knowledge proofs verify these off-chain activities, which are then submitted online for interested parties to verify them.**T:**Stands for â€śtransparentâ€ť, and this quality marks one of the most significant differences between zk-STARKs and zk-SNARKs. They use publicly-available randomness to generate parameters, eliminating the need for a trusted setup.**ARK:**â€śArgument of Knowledgeâ€ť implies the same as in zk-SNARKs, but use a different computation approach. They use hash functions resistant to collisions, effectively eliminating the need for trusted setups.

zkSTARK technology is more recent than zk-SNARKs, and it was pioneered by Starkware with rollup solutions. Using zk-STARKs, one can compute several thousands of transactions in batches off-chain and submit a sole zkSTARK proof to confirm the transactionsâ€™ validity on-chain.

**zk-SNARKs vs. zk-STARKs: similarities and differences**

**Similarities**

These two share a few similarities. Firstly, they are non-interactive zero-knowledge proof protocols, requiring little interaction between prover and verifier. Proof generation, submission, and verification are usually completed within one transaction.

Also, they enhance blockchain scalability. Zero-knowledge proofs are much smaller than the average Bitcoin transaction and get verified much quicker. Swift verification and less block space mean more scalability for networks like Ethereum.

**Differences**

zk-SNARKs and zk-STARKs differ on four major points, at least:

**Transparency**

zk-SNARKs need an initial trusted setup phase to generate the randomness required to generate zero-knowledge proofs. These parameters are usually held in the custody of a small group to protect them. If the parameters fall into the wrong hands, dishonest actors could use them to create false proofs.

zk-STARKs follow a different approach, utilizing collision-resistant cryptography to eliminate the need for private parameter generation ceremonies. Without trusted setups, the parameters for generating randomness are public, limiting centralization and empowering transparency.

**Security**

zk-SNARKs use an initial setup to generate parameters and, according to their setup, are computationally sound. Their soundness, however, assumes that provers have limited computing power. However, when a prover uses an unlimited amount of computing power, they will be able to, for instance, make use of a certain algorithm that can execute extremely quick parallel integer factorization computations that can be used to extract a private key from a public key. In other words, they will be able to breach proof systems. Thus, zk-SNARKs are, in theory, vulnerable to quantum computing attacks, therefore, not *quantum resistant.*

zk-STARKs do not need an initial trusted setup, choosing a collision-resistant approach instead. Thus, they do not require high computation costs like zk-SNARKs, eliminating the threat of being compromised by the unlimited computation power of quantum computing. They are, therefore, higher in the *quantum resistant *scale.

**Scalability**

zk-SNARKs have a smaller byte size compared to zk-STARKs, but their computational demand makes them slower to generate proofs compared to the other option. zk-SNARKs consume less gas than zk-STARKs, and they verify proofs faster because of the difference in byte size.

While it may seem like zk-SNARKs are more scalable due to their faster proof verification, zk-STARKs generate proofs quicker and scale faster, consuming less gas when coming on-chain due to the adoption of off-chain computation and storage. However, during periods of low throughput (few proofs created), they will take much longer to verify.

**Structure**

zk-SNARKs are built on elliptic curves, which improve security and privacy under the assumption that it is infeasible to find the logarithm of a random elliptic curve element in relation to a public base point.

zk-STARKs, on the other hand, uses lean cryptography â€“ collision-resistant hash functions â€“ to provide scalability and security.

**Applications and Use Cases**

**zk-SNARKs**

zk-SNARKs are the more popular of the two main non-interactive zero-knowledge proofs. Several projects in the crypto space today have adopted them to further scalability and privacy, with the latter being more widely used.

zk-SNARKs generate and verify zero-knowledge proofs quickly, and privacy-enhancing protocols have used them vastly. With zk-SNARKs, privacy-enabled blockchains can shield transactions from the public eye, allowing users to provide zero-knowledge proofs in the place of average transaction records.

Some privacy protocols like Panther Protocol have integrated selective disclosure mechanisms that allow users to share the information shielded by the blockchain with trusted third parties.

zk-SNARKs can also be adapted for identity verification, allowing users to pass KYC and AML requirements without putting their sensitive information at risk. Using zk-SNARKs, these protocols can allow users to submit a zero-knowledge proof of their identity instead of Â documents, confirming that they have the required data to be verified without revealing any extra information. zk-SNARKs have also been adopted to drive privacy in decentralized finance, gaming, ZK-rollups, and asset ownership.

**zk-STARKs**

zk-STARKs are known to scale better than zk-SNARKs. Hence they have been adopted by blockchain scalability solutions like ZK-rollups and Layer-2 blockchain solutions. With them, these protocols compute transactions and store data off-chain, then submit zero-knowledge proofs on-chain to update the network's state.

**About Panther**

Panther is a decentralized protocol that enables interoperable privacy in DeFi using zero-knowledge proofs.

Users can mint fully-collateralized, composable tokens called zAssets, which can be used to execute private, trusted DeFi transactions across multiple blockchains.

Panther helps investors protect their personal financial data and trading strategies, and provides financial institutions with a clear path to compliantly participate in DeFi.

Stay connected: Telegram | Twitter | LinkedIn | Website