arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.15550cs.PL
收藏

光滑、集成的非确定性程序与编译器的密码学常数时间证明

Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers

Owen Conoly, Andres Erbsen, Adam Chlipala

AI总结:

本文用全知语义形式化非确定性程序的常数时间属性,证明Bedrock2 C到RISC-V的密码学代码无数据泄露,并研究程序-编译器契约变体,在Coq中集成端到端定理。

摘要:

软件和编译器的形式化验证已被用于排除大量安全关键问题,但对意外信息泄露的风险考虑却少得多。形式化规范的一个关键要求是保留系统行为某些细节的未指定性,以便容纳未来的实现变更,然而,人们仍然期望这些选择不会基于系统处理的机密信息而做出。本文使用全知语义(omnisemantics)和简单的单拷贝断言(plain single-copy assertions)形式化了这一概念,首次给出了非确定性程序为常数时间或更一般地避免泄露其(部分)输入的含义的规范。我们利用这一理论证明了从Bedrock2 C编译到RISC-V机器代码的核心密码学例程的无数据泄露执行,表明全知语义为非确定性提供的光滑规范和证明体验在同一设置中扩展到了常数时间属性。我们还研究了关键的程序-编译器契约的变体,强调了诱人简化的陷阱以及非确定性选择输入约束方式的微妙后果。我们的结果由模块化程序逻辑和编译器正确性定理支持,并集成到Coq证明助手中的一个简洁的端到端定理中。

英文摘要:

Formal verification of software and compilers has been used to rule out large classes of security-critical issues, but risk of unintentional information leakage has received much less consideration. It is a key requirement for formal specifications to leave some details of a system's behavior unspecified so that future implementation changes can be accommodated, and yet it is nonetheless expected that these choices would not be made based on confidential information the system handles. This paper formalizes that notion using omnisemantics and plain single-copy assertions, giving for the first time a specification of what it means for a nondeterministic program to be constant-time or more generally to avoid leaking (a part of) its inputs. We use this theory to prove data-leak-free execution of core cryptographic routines compiled from Bedrock2 C to RISC-V machine code, showing that the smooth specification and proof experience omnisemantics provides for nondeterminism extends to constant-time properties in the same setting. We also study variants of the key program-compiler contract, highlighting pitfalls of tempting simplifications and subtle consequences of how inputs to nondeterministic choices are constrained. Our results are backed by modular program-logic and compiler-correctness theorems, and they integrate into a neat end-to-end theorem in the Coq proof assistant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑