Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs

Alex Ozdemir, Evan Laufer, Dan Boneh

IEEE Symposium on Security and Privacy 2025 · Day 3 · Zero Knowledge

Overview

This technical article delves into groundbreaking research presented at IEEE S&P 2025, focusing on a novel approach to enhance the efficiency of Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge (zkSNARKs). The talk, delivered by Alex Ozdemir and co-authored with Evan Laufer and Dan Boneh, addresses a critical bottleneck in current zkSNARK implementations: the inefficient handling of state manipulation, particularly Random Access Memory (RAM). By introducing a new computational model known as Algebraic Interactive Proofs (AIPs), the researchers propose a reimagined pipeline for zkSNARK construction, promising substantial performance improvements for a wide range of properties that rely on memory operations.

Watch on YouTube

Visual summary for Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs by Alex Ozdemir, Evan Laufer, Dan Boneh
Visual summary for Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs by Alex Ozdemir, Evan Laufer, Dan Boneh

Key moments

  1. 0:00 Introduction: efficient zk-SNARKs for RAM
  2. 1:00 Proposed new pipeline for RAM in zk-SNARKs
  3. 2:00 Prior work bottleneck: slow address ordering for RAM
  4. 3:00 First key insight: grouping addresses, not full ordering
  5. 4:19 Second key insight: new model, Algebraic Interactive Proofs (AIPs)
  6. 5:10 Building an efficient zk-SNARK for the AIP model
  7. 6:00 Concrete speedups for different types of RAM

Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs

Speakers: Alex Ozdemir, Evan Laufer, Dan Boneh

Conference: IEEE S&P

YouTube: https://www.youtube.com/watch?v=521klx1HAyQ

Overview

This technical article delves into groundbreaking research presented at IEEE S&P 2025, focusing on a novel approach to enhance the efficiency of Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge (zkSNARKs). The talk, delivered by Alex Ozdemir and co-authored with Evan Laufer and Dan Boneh, addresses a critical bottleneck in current zkSNARK implementations: the inefficient handling of state manipulation, particularly Random Access Memory (RAM). By introducing a new computational model known as Algebraic Interactive Proofs (AIPs), the researchers propose a reimagined pipeline for zkSNARK construction, promising substantial performance improvements for a wide range of properties that rely on memory operations.

The core problem tackled by this work lies in the inherent limitations of the traditional zkSNARK programming model, which typically operates on low-level arithmetic circuits over a finite field. While compilers can translate high-level languages that utilize RAM into these circuits, the process of proving RAM consistency within a circuit context is notoriously inefficient, primarily due to the high cost of simulating comparisons. The presented research introduces two key insights: first, that strict address ordering for RAM proofs can be relaxed to mere grouping, and second, that integrating randomness directly into the computational model via AIPs can dramatically simplify and accelerate these proofs.

The significance of this work extends beyond mere performance optimization. By establishing AIPs as a robust and efficient new programming model for zkSNARKs, the researchers provide a powerful primitive that can unlock the potential for more complex and practical zero-knowledge applications. The demonstrated speedups for various RAM types — including a remarkable 50x improvement for persistent RAM — illustrate the immediate impact of this approach. Furthermore, the broader applicability of the AIP pipeline, already demonstrated for tasks like signature verification, suggests a fundamental shift in how developers can approach building privacy-preserving and integrity-proving systems, making them more accessible and computationally viable.

Background

▶ Watch: Introduction: efficient zk-SNARKs for RAM (0:00)

To appreciate the contributions of this research, it's essential to understand the foundational concepts and existing challenges in the realm of zkSNARKs. A zkSNARK is a cryptographic primitive that allows one party (the prover) to convince another party (the verifier) that a certain statement is true, without revealing any information beyond the truth of the statement itself. These proofs are "succinct" (small in size and fast to verify) and "non-interactive" (requiring only a single message from prover to verifier after an initial setup). Abstractly, a zkSNARK can prove that a function P holds for some secret data, yielding a boolean result.

Concretely, most existing zkSNARKs operate on a very low-level programming model: arithmetic circuits over a finite field. In this model, computations are expressed as a network of addition and multiplication gates. While powerful, this model is far removed from the high-level languages (like Python or Rust) that programmers typically use. Consequently, practical applications of zkSNARKs often rely on compilers to translate high-level code, which frequently utilizes data structures implemented with Random Access Memory (RAM), into these low-level circuits.

The challenge arises when these high-level programs manipulate state in RAM. Proving properties about RAM accesses within an arithmetic circuit is problematic. Conceptually, a RAM proof involves demonstrating the consistency of a sequence of read and write operations to various memory addresses over time. The core difficulty is that dependencies between memory accesses (e.g., a read operation needing to retrieve the value from the most recent write to the same address) are non-local when ordered by time. Prior work addressed this by sorting all memory accesses by their address. This transformation localizes dependencies, meaning that for any given address, all its accesses become adjacent, making consistency checks simpler. However, this "address ordering proof" becomes the bottleneck. Arithmetic circuits, by their nature, cannot directly perform comparisons (e.g., A < B). Instead, comparisons must be simulated using a complex series of additions and multiplications, leading to circuits of super-linear size and significant computational overhead. This inefficiency has historically limited the practical applicability of zkSNARKs for stateful computations.

Key Findings

▶ Watch: Prior work bottleneck: slow address ordering for RAM (2:00)

The research introduces a paradigm shift in how zkSNARKs handle RAM, built upon two fundamental insights and a new computational model.

The first key insight addresses the inefficiency of address ordering in RAM proofs. Instead of requiring memory accesses to be strictly ordered by address, the researchers realized that merely grouping accesses by address is sufficient to localize dependencies. This simplification reduces the problem from a complex sorting task to proving that the address labels assigned to these groups are unique – that no address is mistakenly associated with two different groups. This uniqueness proof, while still challenging for traditional arithmetic circuits, is a significantly less demanding requirement than full sorting.

This leads to the second key insight: to change the fundamental model of computation for zkSNARKs by allowing for randomness in circuits. The traditional model for zkSNARKs (arithmetic circuits) only permits operations like public input, private input, multiplication, addition, and certain inequalities. The proposed new model introduces just one additional operation: sampling a random input. This seemingly minor addition enables a powerful new class of computations, capturing an "informal notion of randomized circuits" and leading to a more efficient way to prove properties like uniqueness.

The formalization of this new computational model is a major contribution: Algebraic Interactive Proofs (AIPs). As the name suggests, AIPs draw connections to complexity theory and formally define a model where secret inputs and random inputs can interact across multiple rounds, mirroring the structure of an interactive proof. The researchers demonstrate that any AIP for a property P can be converted into an efficient zkSNARK for the same property. This construction effectively formalizes and operationalizes the concept of "verifier randomness," an idea that has existed in folklore for years but lacked a concrete, efficient implementation within zkSNARKs. Critically, the resulting zkSNARK for AIPs is shown to be as efficient as the best existing zkSNARKs for circuits, such as Groth16 (GRT16), but for a significantly more powerful and flexible programming model.

By combining these insights and the new AIP model, the researchers propose a new pipeline for zkSNARKs: instead of compiling RAM properties directly into circuits, they are compiled into AIPs, which are then processed by the new AIP-compatible zkSNARK. This innovative pipeline allows for the construction of more efficient zkSNARKs for various types of RAM, yielding substantial asymptotic and concrete speedups over the state-of-the-art.

Technical Deep Dive

▶ Watch: First key insight: grouping addresses, not full ordering (3:00)

The technical core of this work revolves around two main components: the novel approach to RAM proofs and the introduction of Algebraic Interactive Proofs (AIPs).

Redefining RAM Proofs for Efficiency:

The traditional method for proving RAM consistency in zkSNARKs involves sorting all memory accesses (reads and writes) by their address. This is done because dependencies between accesses to the same memory location (e.g., ensuring a read operation retrieves the value from the most recent write to that address) become localized once all operations for a specific address are grouped together. However, sorting is computationally expensive within arithmetic circuits. Circuits can only perform additions and multiplications directly. Comparisons, which are fundamental to sorting algorithms, must be simulated. For instance, checking A < B might involve computing B - A and then proving that this difference is a non-zero element in a finite field, which is a complex operation requiring many gates. This leads to sorting algorithms having a super-linear gate count and a high constant factor, making them a significant bottleneck.

The first insight simplifies this: instead of strict ordering, grouping by address is sufficient. This means the proof only needs to ensure that all accesses to a particular address X are clustered together, and that these clusters correspond to unique addresses. The problem then reduces to proving the uniqueness of n address labels in a finite field. While the talk defers the specific "simple, beautiful, and concretely efficient" solution to the paper, it highlights that this solution achieves a strictly linear cost with a constant of just four, a stark contrast to the super-linear and high-constant-factor costs of circuit-based sorting or comparison methods. The implication is that by moving away from explicit comparisons and leveraging the new AIP model, a dramatically more efficient method for validating address uniqueness becomes feasible.

Algebraic Interactive Proofs (AIPs):

The true innovation lies in the formalization and implementation of Algebraic Interactive Proofs (AIPs). AIPs extend the familiar model of arithmetic circuits by introducing a single, yet powerful, new operation: sampling a random input. In traditional arithmetic circuits, all inputs are either public or secret (private). AIPs add a third category: random inputs, which can be sampled by the verifier (or a trusted third party in a designated verifier setting, or simply derived from public randomness for non-interactive proofs).

The formal definition of AIPs captures several critical details:

  1. Secret and Random Input Dependence: The model allows for secret inputs and random inputs to depend on one another, enabling more dynamic and complex interactions.
  2. Multiple Rounds: Similar to interactive proofs in complexity theory, AIPs can involve multiple rounds of interaction, where random inputs might be introduced at different stages of the computation. This flexibility is crucial for constructing efficient randomized protocols.
  3. Formalization of Verifier Randomness: AIPs provide a rigorous framework for the concept of "verifier randomness," which has been discussed informally in the zkSNARK community. This formalization is key to proving the security and soundness properties of the new zkSNARK construction.

The researchers demonstrate a practical method to convert any AIP for a property P into a zkSNARK for that same property. This construction is remarkably efficient, achieving performance comparable to GRT16 (Groth16), one of the most widely used and efficient elliptic curve-based zkSNARKs for arithmetic circuits. The significance here is profound: GRT16 is highly optimized for its specific model, yet the new AIP-based zkSNARK matches its efficiency while supporting a stronger and more expressive programming model. This means that computations previously deemed too complex or expensive for zkSNARKs due to their reliance on randomness or intricate state manipulation can now be proved with similar efficiency as simpler circuit-based tasks. The power of randomness, often used in classical algorithms to achieve probabilistic efficiency, is now formally and efficiently integrated into the zero-knowledge proof paradigm.

Demo / Proof of Concept

▶ Watch: Building an efficient zk-SNARK for the AIP model (5:10)

While the talk did not feature a live demonstration in the traditional sense, the speakers presented compelling experimental results and cost models that serve as a robust proof of concept for their proposed pipeline. Their work involved building a new zkSNARK for AIPs and developing new reductions from various RAM types to AIPs, culminating in several efficient zkSNARK implementations.

The performance gains are categorized by different types of RAM:

  1. Persistent RAM: This refers to memory where both the initial and final states are significant and represented, for example, by cryptographic hashes. The proof demonstrates a correct transition between these hashed states. For this type of RAM, the researchers achieved significant asymptotic speedups and a concrete speedup that beats the state-of-the-art by a factor of 50. This substantial improvement underscores the power of the AIP approach for handling long-lived state in zkSNARK applications.
  1. Volatile RAM: This is a special case where the initial state is assumed to be zeroed (empty), and the final state of the RAM is ignored. Only the output of the program running on the RAM matters. For volatile RAM, the research yielded an asymptotic speedup for large RAMs. However, the concrete speedup was more modest, around 33% for a 64-bit address space. The speaker attributed this smaller gain to the fact that volatile RAM was already a highly optimized special case in prior work, meaning the baseline for comparison was already very efficient.
  1. Sparse Persistent RAM: This represents another special case of persistent RAM where, similar to "Swiss cheese," most memory cells are zero, and only a sparse set of locations hold non-zero values. Although this particular case was not fully implemented, the researchers developed detailed cost models. These models predict a big asymptotic speedup and an even bigger concrete speedup than observed for normal persistent RAM. This suggests that the AIP pipeline is particularly well-suited for scenarios where memory usage is sparse, which is common in many real-world applications.

These experimental results and predictive models provide strong evidence that the new AIP-based pipeline significantly outperforms traditional circuit-based approaches for proving properties about RAM, making zkSNARKs more practical for stateful computations.

Defensive Implications

▶ Watch: Concrete speedups for different types of RAM (6:00)

The research on "Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs" does not directly address vulnerabilities or defensive measures against attacks on existing systems. Instead, its implications are primarily for developers and cryptographers building secure and privacy-preserving applications using zkSNARKs. By dramatically improving the efficiency of proving properties about memory, this work enables a new generation of more robust and practical privacy-enhancing technologies.

The key defensive implications can be understood as follows:

  1. Lowering the Barrier for Stateful ZK Applications: Historically, the high computational cost of proving RAM consistency has been a major impediment to integrating zkSNARKs into applications that rely heavily on stateful computations (e.g., smart contracts, database interactions, operating system components). This research significantly reduces that cost, making it more feasible to deploy zkSNARKs for proving the integrity of memory operations without revealing the underlying data. This enables the construction of systems where sensitive state transitions can be verified efficiently in zero-knowledge.
  1. Enhancing Privacy and Integrity for Complex Protocols: With more efficient RAM proofs, developers can design more sophisticated privacy-preserving protocols. For instance, a system might use zkSNARKs to prove that a user correctly updated their private data in a database without revealing the specific update or the data itself. Similarly, it could verify the execution of a complex program that manipulates internal memory, ensuring its correctness without exposing the program's internal state. This directly contributes to stronger integrity guarantees and user privacy.
  1. Broader Applicability for Secure Computations: The speakers explicitly highlight that the AIP pipeline is not limited to RAM. They mention an immediate application in signature verification for legacy schemes like ECDSA and EDDSA to build anonymous credentials. This suggests that the AIP model can be a general-purpose primitive for accelerating various cryptographic proofs. For defenders, this means that the toolkit for building privacy-preserving authentication, authorization, and data integrity systems is expanded, potentially allowing for more efficient and secure implementations of existing security primitives in a zero-knowledge context.
  1. Enabling Auditable and Transparent Systems with Privacy: The ability to efficiently prove properties about memory means that complex system states or program executions can be audited or verified for correctness without exposing sensitive details. For example, a cloud provider could prove that a customer's virtual machine executed a specific workload correctly, or that its memory was managed according to policy, without revealing the customer's proprietary data or the full VM state. This enhances transparency and accountability in environments where privacy is paramount.

In essence, the defensive implication is about empowerment: empowering developers to build more secure, private, and verifiable systems by overcoming previous computational barriers associated with memory-intensive zero-knowledge proofs. It encourages security practitioners to re-evaluate problems that were previously intractable for zkSNARKs and consider how the introduction of randomness into the proof system can lead to more elegant and efficient solutions.

Key Takeaways

  • New ZK-SNARK Pipeline for RAM: The research introduces a novel pipeline for building more efficient zkSNARKs for properties involving Random Access Memory (RAM), replacing traditional circuit-based models with Algebraic Interactive Proofs (AIPs).
  • Randomness as a Core Primitive: AIPs extend arithmetic circuits by adding the crucial operation of sampling a random input, formally integrating the power of randomness into the zkSNARK computational model.
  • Significant Performance Gains: This new approach yields substantial speedups, including a 50x concrete speedup for persistent RAM compared to state-of-the-art methods, and predicted even larger gains for sparse persistent RAM.
  • Optimized RAM Proofs: The key insight for RAM is that grouping by address is sufficient for localizing dependencies, rather than the more expensive full address ordering, leading to a highly efficient (linear cost with a constant of 4) uniqueness proof.
  • Formalization of Verifier Randomness: The work formalizes the concept of "verifier randomness" through AIPs, providing a robust and efficient construction that matches the performance of leading circuit-based zkSNARKs like GRT16 but for a stronger programming model.
  • Broad Applicability: The AIP pipeline is presented as a general-purpose primitive with applications extending beyond RAM, already demonstrated for tasks like signature verification in building anonymous credentials, opening doors for future zkSNARK innovations.

About the Speaker(s)

The talk was presented by Alex Ozdemir, who introduced the work as "our work at Oakland 2025." He co-authored the paper, "Volatile and Persistent Memory for zkSNARKs via Algebraic Interactive Proofs," with Evan Laufer and Dan Boneh. While specific affiliations were not detailed in the transcript, the context of presenting at a prestigious academic conference like IEEE S&P (Oakland) with Dan Boneh, a renowned professor in cryptography at Stanford University, strongly suggests their background in academic research, likely at a leading institution like Stanford. Their expertise lies in advancing the frontiers of zero-knowledge proofs and their practical applications.

All talks from IEEE Symposium on Security and Privacy 2025