The communities of blockchains and distributed ledgers have been stirred up by the introduction of zero-knowledge proofs (ZKPs). Originally designed to solve privacy issues, ZKPs have now evolved into an effective remedy for scalability concerns and are applied in Zcash (internet money like Bitcoin). To enable ZKPs, Rank-1 Constraint Systems (R1CS) offer a verifier for bi-linear equations. To accurately and efficiently represent R1CS, several language tools like Circom, Noir, and Snarky have been proposed to automate the compilation of advanced programs into R1CS. However, due to the flexible nature of R1CS representation, there can be significant differences in the compiled R1CS forms generated from circuit language programs with the same underlying semantics. To address this issue, this paper uses a data-flow-based R1CS paradigm algorithm, which produces a standardized format for different R1CS instances with identical semantics. By using the normalized R1CS format circuits, the complexity of circuits' verification can be reduced. In addition, this paper presents an R1CS normalization algorithm benchmark, and our experimental evaluation demonstrates the effectiveness and correctness of our methods.
翻译:区块链和分布式账本社区因零知识证明(ZKPs)的引入而备受关注。ZKPs最初旨在解决隐私问题,现已演变为解决可扩展性问题的有效手段,并应用于Zcash(类似比特币的数字货币)。为支持ZKPs,秩-1约束系统(R1CS)提供了双线性方程验证器。为准确高效地表示R1CS,学界提出了Circom、Noir、Snarky等语言工具,用于将高级程序自动编译为R1CS。然而,由于R1CS表示的灵活性,具有相同底层语义的电路语言程序所生成的R1CS形式可能存在显著差异。针对此问题,本文采用基于数据流的R1CS范式算法,为具有相同语义的不同R1CS实例生成标准化格式。通过使用归一化的R1CS格式电路,可降低电路验证的复杂度。此外,本文提出了R1CS归一化算法基准测试,实验评估验证了方法的有效性和正确性。