Certifying Zero-Knowledge Circuits with Refinement Types
Junrui Liu, Ian Kretz, Hanzhi Liu, Bryan Tan, Jonathan Wang, Yi Sun, Luke Pearson, Anders Miltner, Isil Dillig, Yu Feng
Abstract
Zero-knowledge (ZK) proof systems have emerged as a promising solution for building security-sensitive applications. However, bugs in ZK applications are extremely difficult to detect and can allow a malicious party to silently exploit the system without leaving any observable trace. This paper presents Coda, a novel statically-typed language for building zero-knowledge applications. Critically, Coda makes it possible to formally specify and statically check properties of a ZK application through a rich refinement type system. One of the key challenges in formally verifying ZK applications is that they require reasoning about polynomial equations over large prime fields that go beyond the capabilities of automated theorem provers. Coda mitigates this challenge by generating a set of Coq lemmas that can be proven in an interactive manner with the help of a tactic library. We have used Coda to re-implement 77 arithmetic circuits from widely-used Circom libraries and applications. Our evaluation shows that Coda makes it possible to specify important and formally verify correctness properties of these circuits. Our evaluation also revealed 6 previously-unknown vulnerabilities in the original Circom projects.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Integer Reasoning Modulo Different Constants in SMT cites Practical Security Analysis of Zero-Knowledge Proof Circuits
- Integer Reasoning Modulo Different Constants in SMT cites Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
- Integer Reasoning Modulo Different Constants in SMT cites Satisfiability Modulo Finite Fields
- Integer Reasoning Modulo Different Constants in SMT cites Split Gröbner Bases for Satisfiability Modulo Finite Fields
- zkFuzz: Foundation and Framework for Effective Fuzzing of Zero-Knowledge Circuits cites Practical Security Analysis of Zero-Knowledge Proof Circuits
- zkFuzz: Foundation and Framework for Effective Fuzzing of Zero-Knowledge Circuits cites ConsCS: Effective and Efficient Verification of Circom Circuits
- Satisfiability Modulo Finite Fields cites Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
- Split Gröbner Bases for Satisfiability Modulo Finite Fields cites Practical Security Analysis of Zero-Knowledge Proof Circuits
- Split Gröbner Bases for Satisfiability Modulo Finite Fields cites Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
- Split Gröbner Bases for Satisfiability Modulo Finite Fields cites Satisfiability Modulo Finite Fields
- ConsCS: Effective and Efficient Verification of Circom Circuits cites Practical Security Analysis of Zero-Knowledge Proof Circuits
- Automated Verification of Consistency in Zero-Knowledge Proof Circuits cites Practical Security Analysis of Zero-Knowledge Proof Circuits
Cited by top-tier papers11
- zkFuzz: Foundation and Framework for Effective Fuzzing of Zero-Knowledge CircuitsHideaki Takahashi, Jihwan Kim, Suman Jana, Junfeng YangS&P 2026 · 8 citations
- Split Gröbner Bases for Satisfiability Modulo Finite FieldsAlex Ozdemir, Shankara Pailoor, Alp Bassa, Kostas Ferles et al.CAV 2024 · 4 citations
- ConsCS: Effective and Efficient Verification of Circom CircuitsJinan Jiang, Xinghao Peng, Jinzhao Chu, Xiapu LuoICSE 2025 · 2 citations
- Automated Verification of Consistency in Zero-Knowledge Proof CircuitsJon Stephens, Shankara Pailoor, Isil DilligCAV 2025 · 2 citations
- Integer Reasoning Modulo Different Constants in SMTElizaveta Pertseva, Alex Ozdemir, Shankara Pailoor, Alp Bassa et al.CAV 2025 · 1 citation
Builds on5
- Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without CompromisesAndres Erbsen, Jade Philipoom, Jason Gross, Robert Sloan et al.S&P 2019 · 147 citations
- Practical Security Analysis of Zero-Knowledge Proof CircuitsHongbo Wen, Jon Stephens, Yanju Chen, Kostas Ferles et al.USENIX Security 2024 · 31 citations
- SolType: refinement types for arithmetic overflow in solidityBryan Tan, Benjamin Mariano, Shuvendu K. Lahiri, Isil Dillig et al.POPL 2022 · 29 citations
- Proving UNSAT in Zero KnowledgeNing Luo, Timos Antonopoulos, William R. Harris, Ruzica Piskac et al.CCS 2022 · 14 citations
- Satisfiability Modulo Finite FieldsAlex Ozdemir, Gereon Kremer, Cesare Tinelli, Clark W. BarrettCAV 2023 · 14 citations
Related papers
- Scalable Verification of Zero-Knowledge ProtocolsMiguel Isabel, Clara Rodríguez-Núñez, Albert RubioS&P 2024 · 14 citations
- 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
- Tabby: A Synthesis-Aided Compiler for High-Performance Zero-Knowledge Proof CircuitsJunrui Liu, Jiaxin Song, Yanning Chen, Hanzhi Liu et al.OOPSLA 2025
- Language-Agnostic Detection of Computation-Constraint Inconsistencies in ZKP Programs Via Value InferenceArman Kolozyan, Bram Vandenbogaerde, Janwillem Swalens, Lode Hoste et al.S&P 2026 · 4 citations
- Bounded Verification for Finite-Field-Blasting - In a Compiler for Zero Knowledge ProofsAlex Ozdemir, Riad S. Wahby, Fraser Brown, Clark W. BarrettCAV 2023 · 11 citations
