Automated Detection of Under-Constrained Circuits in Zero-Knowledge Proofs
Shankara Pailoor, Yanju Chen, Franklyn Wang, Clara Rodríguez-Núñez, Jacob Van Geffen, Jason Morton, Michael Chu, Brian Gu, Yu Feng, Isil Dillig
Abstract
As zero-knowledge proofs gain increasing adoption, the cryptography community has designed domain-specific languages (DSLs) that facilitate the construction of zero-knowledge proofs (ZKPs). Many of these DSLs, such as Circom, facilitate the construction of arithmetic circuits, which are essentially polynomial equations over a finite field. In particular, given a program in a zero-knowledge proof DSL, the compiler automatically produces the corresponding arithmetic circuit. However, a common and serious problem is that the generated circuit may be underconstrained, either due to a bug in the program or a bug in the compiler itself. Underconstrained circuits admit multiple witnesses for a given input, so a malicious party can generate bogus witnesses, thereby causing the verifier to accept a proof that it should not. Because of the increasing prevalence of such arithmetic circuits in blockchain applications, several million dollars worth of cryptocurrency have been stolen due to underconstrained arithmetic circuits. Motivated by this problem, we propose a new technique for finding ZKP bugs caused by underconstrained polynomial equations over finite fields. Our method performs semantic reasoning over the finite field equations generated by the compiler to prove whether or not each signal is uniquely determined by the input. Our proposed approach combines SMT solving with lightweight uniqueness inference to effectively reason about underconstrained circuits. We have implemented our proposed approach in a tool called QED 2 and evaluate it on 163 Circom circuits. Our evaluation shows that QED 2 can successfully solve 70% of these benchmarks, meaning that it either verifies the uniqueness of the output signals or finds a pair of witnesses that demonstrate non-uniqueness of the circuit. Furthermore, QED 2 has found 8 previously unknown vulnerabilities in widely-used circuits.
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 3d2a1bb4-d8e0-4d41-ba00-645ad086741fCited by top-tier papers13
- 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
- Specular: Towards Secure, Trust-minimized Optimistic Blockchain ExecutionZhe Ye, Ujval Misra, Jiajun Cheng, Wenyang Zhou et al.S&P 2024 · 9 citations
- 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
Builds on2
- Poseidon: A New Hash Function for Zero-Knowledge Proof SystemsLorenzo Grassi, Dmitry Khovratovich, Christian Rechberger, Arnab Roy et al.USENIX Security 2021 · 410 citations
- Efficient Zero-Knowledge Proofs on Signed Data with Applications to Verifiable Computation on Data StreamsDario Fiore, Ida TuckerCCS 2022 · 8 citations
Related papers
- Scalable Verification of Zero-Knowledge ProtocolsMiguel Isabel, Clara Rodríguez-Núñez, Albert RubioS&P 2024 · 14 citations
- ScaleCirc: Scaling the Analysis over Circom CircuitsJinan Jiang, Haoran Qin, Xiapu LuoASE 2025
- Automated Verification of Consistency in Zero-Knowledge Proof CircuitsJon Stephens, Shankara Pailoor, Isil DilligCAV 2025 · 2 citations
- Certifying Zero-Knowledge Circuits with Refinement TypesJunrui Liu, Ian Kretz, Hanzhi Liu, Bryan Tan et al.S&P 2024 · 30 citations
- Practical Security Analysis of Zero-Knowledge Proof CircuitsHongbo Wen, Jon Stephens, Yanju Chen, Kostas Ferles et al.USENIX Security 2024 · 31 citations
