Automated Detection of Under-Constrained Circuits in Zero-Knowledge Proofs

Author:

Pailoor Shankara1ORCID,Chen Yanju1ORCID,Wang Franklyn2ORCID,Rodríguez Clara3ORCID,Van Geffen Jacob1ORCID,Morton Jason4ORCID,Chu Michael5ORCID,Gu Brian5ORCID,Feng Yu1ORCID,Dillig Işıl1ORCID

Affiliation:

1. Veridise, USA

2. Harvard University, USA / 0xparc, USA

3. Complutense University of Madrid, Spain

4. ZKonduit, USA

5. 0xparc, USA

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.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference52 articles.

1. 2019. Tornado.cash got hacked. by Us.. https://tornado-cash.medium.com/tornado-cash-got-hacked-by-us-b1e012a3c9a8 2019. Tornado.cash got hacked. by Us.. https://tornado-cash.medium.com/tornado-cash-got-hacked-by-us-b1e012a3c9a8

2. Aleo. 2022. Leo code translates to invalid Aleo instruction code. https://github.com/AleoHQ/leo/issues/2042 Aleo. 2022. Leo code translates to invalid Aleo instruction code. https://github.com/AleoHQ/leo/issues/2042

3. A Certifying Compiler for Zero-Knowledge Proofs of Knowledge Based on Σ-Protocols

4. Aztec. 2022. Disclosure of recent vulnerabilities. https://hackmd.io/@aztec-network/disclosure-of-recent-vulnerabilities Aztec. 2022. Disclosure of recent vulnerabilities. https://hackmd.io/@aztec-network/disclosure-of-recent-vulnerabilities

5. aztec. 2022. Disclosure of recent vulnerabilities. https://hackmd.io/@aztec-network/disclosure-of-recent-vulnerabilities aztec. 2022. Disclosure of recent vulnerabilities. https://hackmd.io/@aztec-network/disclosure-of-recent-vulnerabilities

Cited by 6 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Specular: Towards Secure, Trust-minimized Optimistic Blockchain Execution;2024 IEEE Symposium on Security and Privacy (SP);2024-05-19

2. Scalable Verification of Zero-Knowledge Protocols;2024 IEEE Symposium on Security and Privacy (SP);2024-05-19

3. PP-CSA: Practical Privacy-Preserving Software Call Stack Analysis;Proceedings of the ACM on Programming Languages;2024-04-29

4. Split Gröbner Bases for Satisfiability Modulo Finite Fields;Lecture Notes in Computer Science;2024

5. Formal Verification of Zero-Knowledge Circuits;Electronic Proceedings in Theoretical Computer Science;2023-11-14

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3