Lune

S&P2022Top-tier venue

CirC: Compiler infrastructure for proof systems, software verification, and more

Alex Ozdemir, Fraser Brown, Riad S. Wahby

Abstract

Cryptographic tools like proof systems, multi-party computation, and fully homomorphic encryption are usually applied to computations expressed as systems of arithmetic constraints. In practice, this means that these applications rely on compilers from high-level programming languages (like C) to such constraints. This compilation task is challenging, but not entirely new: the software verification community has a rich literature on compiling programs to logical constraints (like SAT or SMT). In this work, we show that building shared compiler infrastructure for compiling to constraint representations is possible, because these representations share a common abstraction: stateless, non-uniform, non-deterministic computations that we call existentially quantified circuits, or EQCs. Moreover, we show that this shared infrastructure is useful, because it allows compilers for proof systems to benefit from decades of work on constraint compilation techniques for software verification. To make our approach concrete we create CirC, an infrastructure for building compilers to EQCs. CirC makes it easy to compile to new EQCs: we build support for three, R1CS (used for proof systems), SMT (used for verification and bug-finding), and ILP (used for optimization), in ≈2000\approx 2000 LOC. It’s also easy to extend CirC to support new source languages: we build a feature-complete compiler for a cryptographic language in one week and ≈900\approx 900 LOC, whereas the reference compiler for the same language took years to write, comprises ≈24000\approx 24000 LOC, and produces worse-performing output than our compiler. Finally, CirC enables novel applications that combine multiple EQCs. For example, we build the first pipeline that (1) automatically identifies bugs in programs, then (2) automatically constructs cryptographic proofs of the bugs’ existence.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

23 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs cites Zombie: Middleboxes that Don't Snoop
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers23

  1. SoK: What don't we know? Understanding Security Vulnerabilities in SNARKsStefanos Chaliasos, Jens Ernstberger, David Theodore, David Wong et al.USENIX Security 2024 · 32 citations
  2. Zombie: Middleboxes that Don't SnoopCollin Zhang, Zachary DeStefano, Arasu Arun, Joseph Bonneau et al.NSDI 2024 · 26 citations
  3. Satisfiability Modulo Finite FieldsAlex Ozdemir, Gereon Kremer, Cesare Tinelli, Clark W. BarrettCAV 2023 · 14 citations
  4. Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsSebastian Angel, Eleftherios Ioannidis, Elizabeth Margolin, Srinath T. V. Setty et al.USENIX Security 2024 · 12 citations
  5. NoisePrints: Distortion-Free Watermarks for Authorship in Private Diffusion ModelsNir Goren, Oren Katzir, Abhinav Nakarmi, Eyal Ronen et al.ICLR 2026 · 5 citations

Related papers

  1. Automated Detection of Under-Constrained Circuits in Zero-Knowledge ProofsShankara Pailoor, Yanju Chen, Franklyn Wang, Clara Rodríguez-Núñez et al.PLDI 2023 · 24 citations
  2. A Fast and Verified Software Stack for Secure Function EvaluationJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.CCS 2017 · 34 citations
  3. Automated Verification of Consistency in Zero-Knowledge Proof CircuitsJon Stephens, Shankara Pailoor, Isil DilligCAV 2025 · 2 citations
  4. ConsCS: Effective and Efficient Verification of Circom CircuitsJinan Jiang, Xinghao Peng, Jinzhao Chu, Xiapu LuoICSE 2025 · 2 citations
  5. Scalable Verification of Zero-Knowledge ProtocolsMiguel Isabel, Clara Rodríguez-Núñez, Albert RubioS&P 2024 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines