SNARKs and STARKs: Zero-Knowledge Proof Wonders

SNARKs and STARKs represent cutting-edge technologies in the realm of zero-knowledge proofs, allowing one party to verify the truth of a statement to another party without revealing additional information.

Zero-knowledge proofs (ZKPs) have garnered considerable attention due to their potential to revolutionize security, protect user privacy, and support the scalability of layer-2 networks. Essentially, ZKPs empower a party to prove the accuracy of a statement without the need to divulge extra data. This dual advantage, encompassing heightened privacy and streamlined scalability, positions ZKPs as a promising solution across various applications.

SNARKs and STARKs, two significant zero-knowledge proof systems, invite exploration for a deeper understanding. This article will delve into their intricacies, highlighting their distinctive attributes.

Zero-Knowledge Proofs: Unlocking Privacy and Efficiency in the Digital World

In the ever-evolving landscape of cryptography, one concept that stands out for its immense potential to revolutionize privacy and security is zero-knowledge proofs. These cryptographic constructs, like zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) and zk-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge), offer an innovative approach to authentication and verification, enabling parties to assert knowledge without revealing the underlying data. 

At the core of zero-knowledge proof lies the principle of proving knowledge of a specific piece of information without disclosing that information itself. In essence, they allow one party (the prover) to convince another party (the verifier) that they know a secret or a particular fact, without revealing any details about the secret itself. This paradigm shift in authentication opens up a world of possibilities in terms of privacy preservation and secure transactions.

What Is a SNARK?

zk-SNARK stands for “Zero-Knowledge Succinct Non-interactive Argument of Knowledge” and was initially introduced in a 2012 paper authored by Nir Bitansky, Ran Canetti, Alessandro Chiesa, and Eran Tromer. SNARKs offer a unique capability, enabling one party to convince another of their knowledge of a secret without revealing the secret itself. They consist of three essential components: a key generator, a prover, and a verifier. The key generator creates public keys, a proving key, and a verification key. The prover, armed with the proving key, a public input, and a private witness, generates a proof to convince the verifier that they possess knowledge of the private witness, without revealing the witness itself.

However, there’s a critical aspect to zk-SNARKs that demands careful consideration, the secret parameter lambda. Anyone with knowledge of lambda can potentially create fake proofs, undermining the system’s integrity.

The integration of zk-SNARKs into distributed ledger solutions holds promise for enhancing both privacy and scalability. Zcash, an early adopter of zk-SNARK technology, used it to create shielded transactions. These transactions conceal the sender’s identity, recipient, and transaction amounts, while still allowing verification within the network’s consensus rules.


Consider a scenario in which Bob holds a hash value “H” and seeks evidence that Alice possesses knowledge of the value “S” that, when hashed, results in H. Traditionally, Alice would demonstrate this by revealing “S” to Bob, who would then verify the hash match with H.

However, zk-SNARKs come into play when Alice wishes to keep it confidential while proving her knowledge of it.

Alice’s situation can be illustrated through the following program, presented as a JavaScript function:

function C(x, w) { return ( sha256(w) == x ); }

In simpler terms, this program takes a public hash value “x” and a confidential value “w” as inputs and returns true only if the SHA-256 hash of “w” matches “x”.

Translating Alice’s problem into the function C(x, w), it becomes clear that zk-SNARKs empower Alice to create a proof of possessing “S”, such that C(H, S) == true, without revealing the value of “S”. This precisely addresses the challenge that zk-SNARKs excel in resolving, all while preserving the confidentiality of the secret.

zk-STARKs: A Trusted Alternative

zk-STARKs (Zero-Knowledge Scalable Transparent Argument of Knowledge) offer an alternative approach to zero-knowledge proofs. They don’t require a trusted setup ceremony, eliminating the risk associated with compromised parameters. This added security makes zk-STARKs an attractive option for certain applications, although they may be less efficient and have larger proof sizes compared to zk-SNARKs.

Breaking down the zk-STARK concept:

  • Zero-knowledge: Emphasizes the preservation of privacy
  • Scalable: Signifies that the verification process is significantly faster than conventional computations
  • Transparent: Highlights the absence of a trusted setup requirement
  • Argument and knowledge: Pertains to the security and resilience of the cryptographic scheme

The functionality of zk-STARKs is rooted in the utilization of streamlined cryptography, particularly collision-resistant hash functions, to affirm the veracity of a statement without divulging its intricacies. Unlike zk-SNARKs (Zero-Knowledge Succinct Non-interactive Argument of Knowledge), which hinge on an initial trusted setup and are theoretically susceptible to quantum computer attacks, zk-STARKs overcome these challenges. Notably, zk-STARKs produce proofs that are generally 10 to 100 times larger than those generated by zk-SNARKs, potentially making them more costly and less practical for specific applications.

Choosing Between SNARKs and STARKs

The choice between zk-SNARKs and zk-STARKs depends on the specific requirements of the application. zk-SNARKs are known for their efficiency and speed, making them suitable for scenarios where rapid verification is essential. On the other hand, zk-STARKs provide enhanced security and auditability but may involve longer verification times and increased resource consumption.

In recent years, zk-SNARKs have seen more widespread adoption, mainly due to their early development. However, both zk-SNARKs and zk-STARKs represent cutting-edge cryptographic technologies, subject to ongoing advancements and discoveries in the field.


Zero-knowledge proofs, whether in the form of zk-SNARKs or zk-STARKs, are key enablers of scalability and privacy in the digital world. These cryptographic innovations pave the way for secure and efficient transactions, all while preserving the confidentiality of sensitive information. As the digital landscape continues to evolve, zero-knowledge proofs will undoubtedly play an ever-increasing role in shaping a more secure and private online environment.

Categorized in: