Constant-Overhead Zero-Knowledge for RAM Programs

Nicholas Franzese, Jonathan Katz, Steve Lu, Rafail Ostrovsky, Xiao Wang, Chenkai Weng

TL;DR

This paper introduces a groundbreaking zero-knowledge (ZK) proof system for RAM programs that achieves constant overhead, meaning its communication and runtime scale linearly with memory (N) and execution time (T) of the program. This offers significant asymptotic and practical improvements over prior work, enabling efficient ZK proofs for complex computations.

What Problem Does This Paper Address?

Zero-knowledge proofs are powerful tools for proving knowledge of a secret without revealing it. While significant progress has been made for proving statements about computations represented as circuits, applying ZK to programs running on general-purpose CPUs (RAM model) has been challenging. Converting RAM programs to circuits is inefficient, leading to sub-optimal performance. Existing RAM-based ZK proofs often incur a logarithmic overhead per memory access, which this paper aims to eliminate by achieving constant overhead.

Methods

The core innovation lies in a novel approach to ensure memory access consistency without relying on oblivious RAM or expensive sorting networks. Instead, they use a polynomial equality check. For read-only access, they commit to an array and prove statements about its elements. For read/write access, they introduce timestamps to enforce memory consistency. These techniques are then instantiated using efficient VOLE-based ZK protocols for circuits.

A key practical contribution is the design of a lightweight RISC CPU with a simple instruction set that can efficiently emulate MIPS-I instructions. This CPU is then used as the target for ZK proofs, allowing for efficient verification of arbitrary RAM programs. The paper also introduces optimizations for expensive instructions like cyclic shifts and memory access by delaying their full computation.

Datasets

Not discussed in the paper. The paper focuses on theoretical constructions and experimental evaluation using simulated hardware and network conditions.

Key Insights and Ideas

  • Constant Overhead for RAM ZK: The most significant insight is achieving constant overhead for ZK proofs of RAM programs, a long-standing goal in the field. This is a major step towards making ZK practical for general computation.
  • Polynomial Equality for Memory Consistency: Replacing sorting networks with polynomial equality checks for memory access consistency is a clever and efficient technique.
  • Lightweight RISC CPU for ZK: Designing a custom, simple CPU specifically for efficient ZK proofs is a pragmatic approach that yields substantial performance gains over generic circuit implementations.
  • Optimizing Expensive Instructions: The strategy of delaying expensive instructions (like memory access or complex arithmetic) and amortizing their cost over multiple cycles is a practical optimization for improving overall ZK performance.

Key Results

  • Read/Write Array Access: Achieves 34 bytes of communication per access for 64MB of memory, an 80x improvement over prior work like BubbleRAM.
  • Lightweight RISC CPU: ZK proofs for the custom CPU with 64MB RAM and 4MB program memory require only ~320 bytes of communication per cycle.
  • CPU Performance: The ZK-enabled CPU achieves a clock rate of 6.6 KHz on a 100 Mbps network, significantly outperforming previous systems like BubbleCache (0.23 KHz).
  • Regular Expression Matching: A customized protocol for proving regular expression matching is efficient, with total execution time around 2.7-3.1 ms for a DFA with up to 2000 states.
  • Scrypt Preimage: Demonstrates the ability to prove knowledge of a preimage for the memory-hard hash function scrypt, showing competitive performance.

Limitations and Future Work

  • MIPS-I Subset: The designed CPU emulates most MIPS-I instructions but omits exception and interrupt instructions, assuming the executed code does not contain them.
  • Word Size Limitation: The current implementation has a maximum word size of 64 bits, requiring workarounds for larger word sizes (e.g., in scrypt). Natively supporting larger word sizes would improve performance.
  • Delay Impact: The effectiveness of the "delaying expensive instructions" optimization depends on the program's reliance on these instructions. Future work could explore more dynamic scheduling.
  • Network Bottleneck: While performance improves with bandwidth, computation becomes the bottleneck at higher network speeds, suggesting further algorithmic optimizations might be needed.
  • Further Customization: The paper suggests that for specific applications, customized RAM-based protocols (beyond the general CPU approach) can offer even better efficiency.

Summary updated

BibTeX
@article{franzese2021constant,
  author = {Nicholas Franzese and Jonathan Katz and Steve Lu and Rafail Ostrovsky and Xiao Wang and Chenkai Weng},
  title = {{Constant-Overhead Zero-Knowledge for RAM Programs}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2021},
  url = {https://openreview.net/forum?id=MrhZYJvUtwK},
}

Loading related content...

Figure