面向区块链应用的证明生成编译器
A Proof-Producing Compiler for Blockchain Applications
AI总结:
该论文介绍了一种为 CairoZero 编译器添加的证明生成工具,使用户能在 Lean 3 中验证编译代码满足功能规范,并通过 secp256k1/secp256r1 曲线运算和签名验证等案例展示了其有效性。
摘要:
CairoZero 是一种用于大规模运行去中心化应用(dApps)的编程语言。用 CairoZero 语言编写的程序被编译为 Cairo CPU 架构的机器代码,并利用密码学协议在区块链上高效地验证执行结果。我们阐述了如何扩展 CairoZero 编译器,添加工具使用户能够在 Lean 3 证明助手中证明编译后的代码满足高层功能规范。我们通过验证在大型有限域上使用 secp256k1 和 secp256r1 曲线进行计算的基元,以及使用前者进行密码学签名的验证,证明了我们方法的成功。我们还验证了一种在只读环境中模拟读写字典数据结构的机制。最后,我们反思了我们的方法论,并讨论了该方法的一些优点。
英文摘要:
CairoZero is a programming language for running decentralized applications (dApps) at scale. Programs written in the CairoZero language are compiled to machine code for the Cairo CPU architecture and cryptographic protocols are used to verify the results of execution efficiently on blockchain. We explain how we have extended the CairoZero compiler with tooling that enables users to prove, in the Lean 3 proof assistant, that compiled code satisfies high-level functional specifications. We demonstrate the success of our approach by verifying primitives for computation with the secp256k1 and secp256r1 curves over a large finite field as well as the validation of cryptographic signatures using the former. We also verify a mechanism for simulating a read-write dictionary data structure in a read-only setting. Finally, we reflect on our methodology and discuss some of the benefits of our approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。