π€ AI Summary
This work addresses a critical security risk in the zero-knowledge programming language Noir, where insufficiently constrained arithmetic circuits may introduce vulnerabilities. To mitigate this, the authors present the first formalization of Noirβs ACIR intermediate representation as a finite-field theory within the SMT-LIB framework. Building upon this foundation, they develop NAVE, an open-source static verification tool based on the cvc5 solver, which enables automated validation of constraint completeness in Noir programs. Experimental evaluation across four benchmark suites demonstrates NAVEβs effectiveness, successfully identifying a class of elusive constraint patterns that are otherwise difficult to verify. This study constitutes the first formal verification approach tailored specifically for Noir, thereby filling a significant gap in the semantic verification of zero-knowledge programs.
π Abstract
Zero-Knowledge (ZK) proof systems are cryptographic protocols that can (with overwhelming probability) demonstrate that the pair $(X, W)$ is in a relation $R$ without revealing information about the private input $W$. This membership checking is captured by a complex arithmetic circuit: a set of polynomial equations over a finite field. ZK programming languages, like Noir, have been proposed to simplify the description of these circuits. A developer can write a Noir program using traditional high-level constructs that can be compiled into a lower-level ACIR (Abstract Circuit Intermediate Representation), which is essentially a high-level description of an arithmetic circuit. In this paper, we formalise some of the ACIR language using SMT-LIB and its extended theory of finite fields. We use this formalisation to create an open-source formal verifier for the Noir language using the SMT solver cvc5. Our verifier can be used to check whether Noir programs behave appropriately. For instance, it can be used to check whether a Noir program has been properly constrained, that is, the finite-field polynomial equations generated truly capture the intended relation. We evaluate our verifier over 4 distinct sets of Noir programs, demonstrating its practical applicability and identifying a hard-to-check constraint type that charts an improvement path for our verification framework.