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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fc061b70-7942-4196-bd16-997b737e5305Cited 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
- 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
- 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
