Zero-Knowledge Proofs: STARKS vs. SNARKS explained
The birth of blockchain technology and cryptocurrency promises a world where borderless transactions would go on unhinged, without governments’ regulations or prying eyes. This is facilitated with difficult-to-memorize wallet addresses as well as encrypted transactions where third parties cannot figure out the inner details of who sent what.
However, since all information on the blockchain’s public ledger can be traced and interlinked to people via centralized exchanges (CEXs) and other means that mandate KYC requirements, crypto transactions are only partially private. With adequate research, anyone can get the details of any transaction; hence, the blockchain is regarded as pseudonymous.
To solve this dilemma, Zero-knowledge proofs were created to facilitate transactions on the blockchain without divulging sensitive information, helping achieve privacy when making blockchain transactions.
What are Zero-Knowledge (ZK) Proofs?
Zero-knowledge proof is a cryptographic technology that helps prove a transaction’s validity without revealing the information in that transaction. In other words, a “prover” has to convince a “verifier” that the information sent is true without divulging the information itself.
How Does This Work?
To ascertain the validity of a transaction, the verifier asks the prover to complete some computations in relation to the transaction; if the prover sufficiently solves the problem, then the transaction is valid; however, if the prover is only guessing, then the transaction will fall through.
To make this relatable, let us use a simple example: some security protocols will require you to have a secret question to access your accounts under certain conditions. If you can effectively answer the secret question without guessing, then you can prove that you own the account; however, if you cannot, you will be denied access. All these are completed without divulging key details of the said account such as balances, transaction history, transaction pin, passwords, etc. Hence, the validity is proven without divulging critical information.
History of ZK Proofs
The concept of Zero-Knowledge Proofs was first demonstrated in 1985 by some MIT (Massachusetts Institute of Technology) researchers, Shafi Goldwasser and Silvio Micali. They showed the possibility of proving the properties of a number without revealing the number itself or other information; hence, this helps to reduce the number of information needed to prove a given theorem.
Essential Properties of a Zero-Knowledge Proof
Completeness of a ZK proof refers to the ability of the prover to show honesty by demonstrating a highly accurate knowledge of the information to be verified.
The soundness of a ZK proof refers to the ability of a verifier to prove the authenticity of the prover, identifying any bottlenecks that could jeopardize the confidentiality of the transaction.
What Zero-Knowledge (ZK) Protocols Exist?
Several Zero-knowledge protocols exist in cryptography, including SNARKS, STARKS, SNARGS, and Bulletproofs. However, in blockchain technology today, only SNARKS and STARKS are widely used. Hence, this article will compare ZK SNARKS and STARKS.
What are ZK SNARKs?
ZK SNARKs (Zero-knowledge succinct non-interactive argument of knowledge) are the earliest techniques used to achieve transaction privacy using ZK proofs. ZK SNARK as a term was first mentioned in a research paper written by Professor Alessandro Chiesa of UC Berkeley.
Breaking down the terms
S — Succinct: SNARKs are regarded as “succinct” because the proofs are small and can be easily verified.
N — Non-Interactive: They are regarded as “non-interactive” because there is no interaction between the prover and the verifier.
ARK — Argument of Knowledge: An argument of knowledge is the need to prove the validity of a transaction by proving knowledge (as explained above) without guessing or trying to cheat the system
SNARKs involve a trusted set-up between the prover and the verifier within the constraint of public parameters. These parameters are defined during a “trusted set-up ceremony,” where network participants voluntarily perform computations. These defined parameters are rules which are embedded into the ZK-SNARKs protocol; hence, when a transaction is carried out, the verifier already has a little bit of information to verify information sent by the prover via these parameters.
Some people worry that SNARKs could potentially tilt towards centralization because only a few people set the parameters; however, the trusted set-up in SNARKs is vital to avoid fraudulent transactions because if a malevolent attacker somehow got access to the computations that generated the parameters, then they can generate false proofs that would appear valid to the verifier.
SNARKs are also criticized because they aren’t quantum-resistant; hence, it is feared that a malicious prover with quantum computing power can create fake proofs that will go undetected by the verifier.
What are ZK STARKs
ZK STARKs (Zero-knowledge scalable transparent argument of knowledge) was developed as an improvement on SNARKs in 2018 by Eli Ben-Sasson et al., facilitating faster and cheaper verifications.
Unlike STARKs rely on hash functions; hence, there is no need to set up a trusted ceremony to define parameters for validation. As a result, they are regarded as “transparent.” Also, since there is no delay in going through a set of parameters, STARKs are generated faster than SNARKs; however, because STARKs utilize hash functions to verify transactions, the size of proofs is bigger in STARKs than SNARKs, and it could lead to slower transactions and higher gas fees in some cases (depending on the data involved).
SNARKs vs. STARKs Comparison
SNARK technology has been in use for roughly a decade, so it is more common in several crypto projects; however, the development of STARKs is proving to be a worthy competitor and improvement over the ZK protocol. Below are some of the differences.
Zero-knowledge Proofs is an aspect of blockchain technology and cryptography with numerous untapped potential; as a result, more improvements are expected to be made in the future to dissuade the blockchain community from the worries of the system’s imperfection.
STARK technology is getting a lot of attention, and it is expected that in the nearer future, more blockchains will adopt STARKs as much as SNARKs.
ZK proofs are important to achieving privacy on the blockchain; however, another worry is that some governments have banned privacy blockchains like Zcash, Dash, Monero, etc., because the transactions detailed have been obscured and untraceable.
In addition to privacy, ZK protocols facilitate scalability by reducing the burden of transaction verification and validation, hence facilitating high speeds and low costs. For example, a Zcash block is created in 75 seconds while costing as low as 0.0001 ZEC for transactions.