- Use more efficient pairing functions. Pairing functions are a key component of zkSNARKs, and their efficiency can have a big impact on the overall computational cost. Newer pairing functions, such as the BLS12-381 pairing, are much more efficient than older pairing functions, such as the BN128 pairing.
- Use more efficient elliptic curve operations. Elliptic curve operations are also another key component of zkSNARKs, and their efficiency can also have a big impact on the overall computational cost. Newer elliptic curves, such as the K-256 elliptic curve, are much more efficient than older elliptic curves, such as the secp256k1 elliptic curve.
- Use precomputation. Precomputation is a technique where some of the most expensive computations in a zkSNARK proof are performed in advance and stored in a lookup table. This can significantly reduce the computational cost of generating and verifying zkSNARK proofs.
- Use trusted setup. A trusted setup is a way to generate a common reference string (CRS) for a zkSNARK system without having to perform the expensive computations required to generate a CRS from scratch. This can significantly reduce the computational cost of generating zkSNARK proofs.
In addition to these general techniques, there are also a number of specific zkSNARK constructions that have been designed to be more efficient. For example, the Groth16 zkSNARK construction is much more efficient than the original zkSNARK construction proposed by Gennaro, Gentry, and Parno.
Another way to reduce the computational cost of zkSNARKs is to use hardware accelerators. Hardware accelerators are specialized chips that are designed to perform specific types of computations efficiently. For example, there are hardware accelerators that are designed to perform elliptic curve operations efficiently.
Finally, it is important to note that the computational cost of zkSNARKs is still a relatively active area of research. New techniques are being developed all the time, and it is likely that the computational cost of zkSNARKs will continue to decrease in the future.
Here are some specific examples of how these techniques are being used to reduce the computational cost of zkSNARKs in the real world:
- The zkSync Layer-2 scaling solution uses the BLS12-381 pairing function and the K-256 elliptic curve to significantly improve the efficiency of zkSNARKs.
- The Espresso zkSNARK system uses precomputation to reduce the computational cost of generating zkSNARK proofs by up to 90%.
- The Marlin zkSNARK system uses a trusted setup to reduce the computational cost of generating zkSNARK proofs by up to 99%.
- The Mina blockchain uses the zkSNARK-based consensus mechanism Ouroboros Proof-of-Stake to reduce the computational cost of running a full node by up to 99.9%.
As zkSNARK technology continues to develop, we can expect to see even more innovative ways to reduce the computational cost of zkSNARKs. This will make zkSNARKs more accessible to a wider range of applications and help to accelerate their adoption.
Marlin zkSNARK system:
Marlin is a preprocessing zkSNARK system with a universal and updatable structured reference string (SRS). This means that anyone can contribute to the SRS, which makes it more robust and decentralized. Marlin is also very efficient, with proofs that are just over a kilobyte in size and verification times that are three times faster than the previous state-of-the-art.
Marlin works by combining two ingredients:
- An algebraic holographic proof (AHP): An AHP is a type of proof that can be used to verify that a statement is true without revealing any additional information about the statement.
- A polynomial commitment scheme: A polynomial commitment scheme is a way to commit to a polynomial without revealing the polynomial itself.
Marlin uses the AHP to prove that a statement is true, and the polynomial commitment scheme to commit to the statement. This allows Marlin to generate proofs that are very short and efficient to verify.
Marlin has a number of advantages over other zkSNARK systems:
- Universal and updatable SRS: The SRS in Marlin is universal, which means that it can be used to prove any statement up to a certain size bound. The SRS is also updatable, which means that anyone can contribute to it. This makes Marlin more robust and decentralized than other zkSNARK systems.
- Very efficient: Marlin proofs are just over a kilobyte in size and verification times are three times faster than the previous state-of-the-art. This makes Marlin suitable for a wide range of applications, including mobile devices and real-time applications.
- Easy to use: Marlin is implemented in the Rust programming language and provides a user-friendly API. This makes it easy for developers to use Marlin to build zkSNARK proofs and verifiers.
Marlin is still under development, but it has the potential to become the go-to zkSNARK system for a wide range of applications.
Here are some examples of how Marlin can be used:
- Scalable privacy-preserving payments: Marlin can be used to build privacy-preserving payment systems that can scale to millions of users.
- Verifiable credentials: Marlin can be used to build verifiable credentials that can be used to prove one’s identity or qualifications without revealing any personal information.
- Decentralized identity: Marlin can be used to build decentralized identity systems that allow users to control their own identities and data.
- Secure multi-party computation (MPC): Marlin can be used to build secure MPC protocols that allow multiple parties to compute a function together without revealing their inputs to each other.
Marlin is a promising new zkSNARK system with the potential to revolutionize a wide range of applications.