Types of zero-knowledge proofs explained
Gelato Team
•
Mar 30, 2023

Zero Knowledge Proofs (ZKP) are cryptographic protocols that allow one party (the Prover) to prove to another party (the Verifier) that a given statement is true without revealing any additional information beyond the validity of the statement itself. For more information on Zero Knowledge Proofs, check out our ultimate beginners’ guide
here.
There are two main types of ZKP: STARKs (Scalable Transparent Arguments of Knowledge) and SNARKs (Succinct Non-interactive Arguments of Knowledge). Both types use complex mathematical algorithms to enable the Prover to prove the truth of a statement without revealing any additional information to the Verifier.
ZK SNARK
zkSNARKs, which stands for Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge, are cryptographic proof systems that allow a prover to convince a verifier that a statement is true, without revealing any information about the statement itself, besides the fact that it is true.
zkSNARKs encompass four key components, let’s discuss them with the following example:
Alice wants to prove to Bob that she knows the square root of 16 without revealing the actual square root.
Alice encodes the problem as an equation: x² - 16 = 0. The equation is true only if Alice knows the correct value of x (which is 4, the square root of 16).
Bob chooses a secret and calls it 's'. Alice proves the equation holds true at 's' without revealing x, simplifying the problem for verification.
Alice and Bob use a secret language (encryption) that allows them to work with the problem without revealing x. This lets Alice show Bob the equation works with x in the secret language.
Alice hides the encrypted values by multiplying them with random numbers. This prevents Bob from learning the actual square root, but he can still check that the original equation holds true.
zkSNARKs also use a trusted setup process to generate cryptographic keys or parameters needed for the system to work. In the example above, Alice and Bob invite trusted parties to help create special rules. These parties generate secret codes for Alice to prove her knowledge without revealing the square root.
Because multiple contributors provide random pieces of information, no one knows the complete set. However, if the setup is compromised, the system may also be compromised.
Breaking down ZK SNARKs:
Zero Knowledge: The prover proves validity without disclosing extra information.
Succinct: Proofs are very short and verifiable quickly.
Non-Interactive: The prover and verifier only interact once.
Argument: The proof satisfies soundness, making it almost impossible for false proofs to be accepted.
Of Knowledge: The prover can generate a valid proof only if they actually know the secret information.
ZK STARK
zkSTARKs (Zero-Knowledge Scalable Transparent Arguments of Knowledge) are a more recent variant of zkSNARKs.
zkSTARKs don't rely on trusted setups. Instead, they use publicly available randomness to set up the parameters needed to generate and verify proofs, making them more transparent and trustless.
Two major advantages of zkSTARKs:
Scalability: Can handle very large computations with minimal overhead, and do not require a trusted setup phase.
Transparency: Proof generation relies on verifiable randomness, not trusted parties, making the system more transparent.
Conclusion

In conclusion, Zero Knowledge Proofs, including STARKs and SNARKs, are powerful tools for enhancing privacy and security in various industries.
They allow for the validation of information without the need to disclose additional details beyond the validity of the statement, making them an important solution for protecting sensitive information. As the adoption of blockchain technology and decentralized systems continues to grow, Zero Knowledge Proofs are poised to play an even more significant role in the future.
About Gelato
Gelato is a Web3 Cloud Platform empowering developers to create automated, gasless, and off-chain-aware Layer 2 chains and smart contracts. Over 400 web3 projects rely on Gelato for years to facilitate millions of transactions in DeFi, NFTs, and gaming.
Gelato RaaS: Deploy your own tailor-made ZK or OP L2 chains in a single click with native Account Abstraction and all Gelato middleware baked in.
Web3 Functions: Connect your smart contracts to off-chain data & computation by running decentralized cloud functions.
Automate: Automate your smart contracts by executing transactions automatically in a reliable, developer-friendly & decentralized manner.
Relay: Give your users access to reliable, robust, and scalable gasless transactions via a simple-to-use API.
Account Abstraction SDK: Gelato has partnered with Safe, to build a fully-fledged Account Abstraction SDK, combining Gelato's industry's best gasless transaction capabilities with the industry's most secure smart contract wallet.
Subscribe to our newsletter and turn on your
Twitter notifications to get the most recent updates about the Gelato ecosystem!
If you are interested in being part of the Gelato team and building the future of the Internet browse the open positions and apply
here.