Abstract
Verifiable outsourced computation (VC) allows a client to delegate computation to a remote server and verify the correctness of the result without re-executing the task. However, existing VC systems often struggle with the overhead of RAM operations and dynamic control flow. We present Buffet, a system that bridges the gap between circuit-based and CPU-based VC approaches. By introducing a hybrid RAM model using permutation networks and a "loop flattening" technique for dynamic control flow, Buffet achieves performance gains of 1 to 3 orders of magnitude over previous systems while supporting nearly the entire C programming language.
1. Introduction
In the landscape of cloud computing, ensuring the integrity of outsourced tasks is a critical challenge. Verifiable Computation (VC) addresses this by using cryptographic proofs to confirm that a server executed code correctly. However, translating high-level code like C into the arithmetic circuits required for these proofs has historically involved significant trade-offs.
Previous systems generally followed one of two paradigms:
- The "ASIC" Approach (e.g., Pantry): This approach compiles code line-by-line into circuits. While efficient for pure mathematical logic, it incurs high costs for RAM operations—often relying on expensive cryptographic hashes—and lacks support for loops with dynamic bounds.
- The "CPU" Approach (e.g., BCTV): This approach simulates a complete MIPS-like CPU within the proof. While it handles RAM and complex control flow naturally, it imposes a "CPU tax" on every instruction, making even simple operations costly.
Buffet aims to eliminate this trade-off by providing a system that is both efficient for logic and flexible for complex program structures.
2. Methodology
Buffet introduces two primary innovations to optimize verifiable computation:
2.1 Hybrid RAM Model
Buffet adopts the efficient line-by-line compilation of the ASIC approach but replaces expensive hash-based memory with a RAM abstraction derived from CPU-based models. Instead of hashing for every memory access, Buffet utilizes permutation networks. This "a la carte" RAM model ensures that users only pay for memory operations when they are used, significantly reducing the cost per operation.
2.2 Loop Flattening
To support dynamic control flow—such as if statements, break, continue, and data-dependent loop bounds—Buffet employs "loop flattening." This technique transforms nested C loops into a single, flat state machine. This state machine is then unrolled into a fixed number of steps based on a programmer-provided bound, allowing the arithmetic circuit to handle complex execution paths that were previously intractable for efficient verification.
3. Evaluation and Results
The performance of Buffet was evaluated using a suite of benchmarks including straight-line math (e.g., matrix multiplication), RAM-intensive tasks (e.g., merge sort), and data-dependent control flow (e.g., KMP search).
3.1 Performance Metrics
Buffet demonstrates significant improvements in both Prover and Verifier efficiency. The costs associated with the system are summarized in the table below, where $|C|$ represents the number of constraints and $|x|, |y|$ represent input and output sizes respectively.
3.2 Key Findings
- Massive Speedups: Buffet outperforms BCTV by 1–2 orders of magnitude for RAM-heavy tasks and 1–3 orders of magnitude for programs with complex, data-dependent loops.
- Efficiency Parity: For mathematical tasks, Buffet matches the performance of Pantry, indicating no penalty for its increased flexibility.
- Broad Language Support: Buffet supports an expansive subset of C, disallowing only
gotoand function pointers. This makes it one of the most programmable high-performance VC systems. - Scalability: The system can handle computations resulting in up to 10 million constraints, limited primarily by the memory of the testbed machines.
4. Discussion and Future Work
The success of Buffet lies in breaking the abstraction barrier between circuit compilers and CPU simulators. By applying classical compiler optimizations like load-store elimination, Buffet reduces the number of constraints in the final proof, directly translating to faster Prover times.
Despite these gains, the Prover overhead remains substantial compared to native execution. Future work may involve mapping higher-level language features (e.g., from Rust or Haskell) to Buffet's model or developing universal circuits to avoid the per-program setup phase required by the current architecture.
Summary updated