Unlocking the Power of Recursive ZK Snarks: Applications and Implementations

Jong Hyuck Won
9 min readDec 8, 2023

--

Introduction to Recursive ZK Snarks

In the world of zero-knowledge proofs (ZKPs), recursive proofs are a powerful concept that allows for the verification of a smart proof inside another proof. This means that a prover can provide evidence that when a smart verification algorithm is run on a proof, it returns true. The verification of recursive ZK Snarks is not significantly slower than regular ZK Snarks.

Recursive ZK Snarks offer several benefits, including compression and composability. Compression refers to the ability to supercharge succinctness by condensing multiple pieces of knowledge into a single proof. This is achieved by showing one piece of knowledge and proving that the prover knows another proof for the remaining pieces. This strategy can be cascaded to verify multiple items of knowledge with just one Snark proof. This compression technique is useful for applications such as signatures, light client boots, and roll-ups of transactions.

Composability is another powerful property of recursive proofs. It allows for the construction of proofs where the prover can demonstrate knowledge without fully knowing the underlying facts themselves. This is particularly useful in incomplete information games and can be applied to various applications like social graphs, private state channels, and roll-ups. By leveraging recursion, these proofs enable the composition of different proof systems to achieve optimal efficiency.

Implementing recursive ZK Snarks involves three main classes of recursive proofs: full recursion, atomic accumulation, and split accumulation. Full recursion allows for recursion at every step, while atomic accumulation uses a succinct accumulator to defer expensive checks until the end of a batch of proofs. Split accumulation involves splitting the accumulator into public and private parts, where the verifier only accumulates the public parts. These constructions rely on modular design and the customization of proof systems to optimize efficiency.

While recursive ZK Snarks offer significant advantages, it’s important to consider the potential challenges, such as data provisioning and computational overhead. Careful consideration must be given to the insertion of proof carrying data in applications with complex and timely data flows. However, with proper implementation and understanding, recursive ZK Snarks can unlock new possibilities in various fields, including blockchain technology and cryptography.

Applications of Recursive Compression

Recursive compression, a powerful concept in the world of zero-knowledge proofs (ZKPs), offers various applications and use cases in different fields such as blockchain technology and cryptography. This section explores the pattern for compressing knowledge, an example of compressing signatures with Isocrateia, and the use cases in blockchain like light client bootstrapping and aggregating historical data.

Explanation of the pattern for compressing knowledge

Compression, a key advantage of recursive ZK Snarks, enables the supercharging of succinctness by condensing multiple pieces of knowledge into a single proof. The pattern for compressing knowledge involves showing one piece of knowledge and proving that the prover knows another proof for the remaining pieces. This strategy can be cascaded to verify multiple items of knowledge with just one Snark proof. With compression, it becomes possible to roll up a large list of computation or items of knowledge into a single proof.

Example of compressing signatures with Isocrateia

One real-world example of recursive compression is the Isocrateia application, which utilizes the primitive of recursive compression of signatures. Isocrateia enables a low trust, low-cost roll-up of off-chain modes, securing governance in the process. By compressing signatures using recursive proof techniques, Isocrateia achieves a more efficient and secure method of handling multiple signatures in a single proof.

Use cases in blockchain

Recursive compression has several use cases in the blockchain space. One such use case is light client bootstrapping, where the recursive proof technique allows for the efficient and secure synchronization of lightweight blockchain clients with the main blockchain network. Another use case is aggregating historical data, where recursive snarks can be used to efficiently compile and provide historical data to blockchain applications. This aggregation of data can help in optimizing the storage and retrieval of large amounts of historical data, enhancing the scalability and efficiency of blockchain systems.

Case study: Mina and Polygon Hermes in transaction roll-ups

Mina, a blockchain protocol, and Polygon Hermes, a layer 2 scaling solution, both utilize recursive proof techniques in transaction roll-ups. Mina uses the recursion primitive as a consensus player primitive, allowing for the efficient aggregation and verification of multiple transactions into a single proof. Polygon Hermes, on the other hand, employs a similar strategy by using Starks for fast-prover settings and grad 16 or snarks for fast verification settings. These implementations of recursive compression in transaction roll-ups demonstrate the potential of recursive ZK Snarks in enhancing transaction scalability and efficiency.

Unlocking Composability with Recursive Snarks

Zero-knowledge (ZK) proofs have revolutionized the world of cryptography by allowing verifiable computations without revealing any underlying information. However, traditional ZK proofs have limitations when it comes to composability and compression. This is where recursive snarks come into play.

Overview of Normal ZK Proofs and Their Limitations

Normal ZK proofs, such as ZK snarks, provide a way to prove the validity of a computation without revealing any intermediate steps. However, these proofs are limited in their ability to compress multiple pieces of knowledge into a single proof and to compose with other proof systems efficiently.

Explanation of Composability with Recursive Snarks

Recursive snarks, on the other hand, offer a powerful solution to the limitations of normal ZK proofs. Composability refers to the ability to construct proofs where the prover can demonstrate knowledge without fully knowing the underlying facts themselves. This is achieved by chaining recursive proofs together, allowing for the verification of a smart proof inside another proof.

Example of Proving Social Graph Paths Without Revealing Intermediate Parties

One practical example of composability with recursive snarks is proving social graph paths. In this case, a prover can prove the existence of a path between two individuals in a social graph without revealing the intermediate parties in the path. This is achieved by showing that the prover knows a proof for each step of the path without revealing the individual steps themselves.

Use Cases like Private State Channels and Roll-Ups

Recursive snarks have numerous use cases in the world of blockchain technology. Private state channels, for example, allow for secure off-chain transactions without revealing any intermediate steps. Roll-ups, another use case, enable the aggregation of multiple transactions into a single proof, improving transaction scalability and efficiency.

Exploration of Incomplete Information Games

Recursive snarks also unlock the potential for exploring incomplete information games. These are games where players have limited information about the actions and knowledge of other players. By leveraging recursive proofs, applications in this space can be built, allowing for secure and efficient gameplay.

Overall, recursive snarks offer a powerful tool for achieving composability and compression in zero-knowledge proofs. Their applications extend beyond traditional ZK proofs, enabling the construction of more complex and efficient systems in fields like blockchain technology and cryptography.

Implementing Recursive Proofs

Implementing recursive proofs involves three main classes of recursive proofs: full recursion, atomic accumulation, and split accumulation. Each class has its own approach to constructing proofs and verifying their validity.

Overview of the Three Classes of Recursive Proofs

1. Full Recursion: This class allows for recursion at every step. The recursive verifier takes a proof instance produced by the previous instance of the recursive circuit and fully verifies it. This class is implemented in systems like Groth16 and Fractal.

2. Atomic Accumulation: In this class, a succinct accumulator is used to defer expensive checks until the end of a batch of proofs. The verifier only concerns itself with the succinct checks, while the expensive checks are accumulated and deferred until the end. This class is useful when the verifier is not sublinear. Atomic accumulation has been implemented for various proof systems.

3. Split Accumulation: This class involves splitting the accumulator into public and private parts. The verifier accumulates the public parts at each recursive step, while the private parts are deferred and verified at the end. This class is suitable when a succinct accumulator is not required. Split accumulation enables efficient accumulation of proofs and has been implemented in various systems.

Explanation and Visualization of the Constructions

In full recursion, the verifier fully verifies each recursive instance of the proof, chaining them together to create a final proof. Atomic accumulation uses a succinct accumulator to accumulate proofs and delay expensive checks until the end. Split accumulation involves splitting the accumulator into public and private parts, verifying the public parts at each step and deferring the verification of private parts until the end. Each construction has its own unique approach to implementing recursive proofs, which can be visualized as a chain of proofs building upon each other.

Discussion on Modularity in Proof Systems and Customization

Recursive proofs rely on modular design and the customization of proof systems to optimize efficiency. Proof systems can be broken down into components such as business logic, information-theoretic polynomial IOPs, cryptographic compilers, and recursive proof systems. These components can be customized and composed to create efficient and secure recursive proof systems. By selecting the best features of each component, optimization and customization can be achieved.

Examples of Composition

Composition using recursive proofs can be achieved in various ways. Information-theoretic compilers allow for the conversion of one information-theoretic protocol to another, enabling interoperability between different proof systems. Verifier and prover combinations can be implemented to leverage the strengths of each proof system, such as using a fast prover with a slow verifier. Better cryptographic compilers can also be developed, custom-made for specific target proof systems, to optimize efficiency and performance.

Call to Action for Benchmarks and Security Considerations

To further advance the implementation and understanding of recursive proofs, there is a need for benchmarks and defined metrics. Fair benchmarks of heavily used primitives, such as hash functions and big integer arithmetic, across different proving stacks can help in comparing and optimizing different compositions and configurations. Additionally, security properties should be carefully considered and defined when composing and customizing proof systems. Collaboration and input from the community can help explore and optimize the space of recursive proofs.

Conclusion and Future Directions

The power of recursive ZK Snarks in unlocking new possibilities in zero-knowledge proofs (ZKPs) is undeniable. The applications and implementations of recursive proofs have demonstrated their potential in various fields, including blockchain technology and cryptography. However, it is important to acknowledge that recursive proofs are not a silver bullet solution for all scenarios, but are more suitable for specific applications.

First and foremost, the authors would like to acknowledge the support and community efforts of Xerox Park in this area of research. Their contributions have been invaluable in advancing the understanding and implementation of recursive ZK Snarks.

While recursive proofs offer compression and composability, there are challenges that need to be addressed. One of the main challenges is data provisioning and the computational overhead associated with storing and managing proof carrying data. As applications scale, the size of the data can become a significant issue. Additionally, ensuring data availability is crucial for the efficient functioning of recursive proofs.

One potential solution for data availability is the exploration of Isocrateia, an application that utilizes recursive compression of signatures. Isocrateia offers a more efficient and secure method of handling multiple signatures in a single proof, thereby addressing the data provisioning challenge.

Furthermore, recursive ZK Snarks have unique applications in incomplete information games, allowing for secure and efficient gameplay. This opens up new possibilities for the development of applications in this space, such as party games and other interactive experiences.

To further advance the field of recursive proofs, there is a need for continued research, benchmarks, and exploration of the optimization space. Benchmarking heavily used primitives, such as hash functions and big integer arithmetic, across different proving stacks can help in comparing and optimizing different compositions and configurations. Defined metrics and security considerations should also be carefully considered when composing and customizing proof systems.

In conclusion, recursive ZK Snarks have the potential to revolutionize the world of zero-knowledge proofs. With the right implementation and understanding, they can unlock new possibilities and address challenges in various fields. Through continued research and collaboration, the optimization and customization space of recursive proofs can be explored, leading to even more efficient and secure systems.

Source: Recursive ZK Applications and Affordances | Devcon Bogotá

--

--

Jong Hyuck Won

Building web3 #AA @alchemyplatform, investing and writing @l2iterative, ex protocol builder @harmonyprotocol @klaytn_official, ex @meta, cs @stanford