最后一英里:高保证和高速加密实现
The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
摘要:
我们开发了一种新的方法来构建加密实现。我们的方法走了最后一英里,并提供汇编代码,可证明功能正确,防止侧通道,并作为手写汇编高效。我们使用TLS 1.3中的强制密码套件之一ChaCha 20-Poly 1305来说明我们的方法,并提供正式验证的向量化实现,其性能优于最快的未经验证的代码。我们实现我们的方法相结合的Jasmin框架,它提供了在一个单一的语言功能的高级和低级编程,和EasyCrypt证明助手,它提供了一个多功能的验证基础设施,支持功能正确性和等价性检查的证明。这两种工具以前都没有用于功能正确性。总之,这些基础设施使程序员能够通过“游戏跳跃”来开发高效和经过验证的实现,从证明功能正确的参考实现开始,并逐渐引入通过等价性检查证明正确的程序优化。我们还做出了一些独立的贡献,包括一个新的和可扩展的Jasmin验证编译器,具有更丰富的内存模型和支持向量化指令,以及在EasyCrypt中新嵌入Jasmin。
英文摘要:
We develop a new approach for building cryptographic implementations. Our approach goes the last mile and delivers assembly code that is provably functionally correct, protected against side-channels, and as efficient as hand-written assembly. We illustrate ur approach using ChaCha20-Poly1305, one of the mandatory ciphersuites in TLS 1.3, and deliver formally verified vectorized implementations which outperform the fastest non-verified code. We realize our approach by combining the Jasmin framework, which offers in a single language features of high-level and low-level programming, and the EasyCrypt proof assistant, which offers a versatile verification infrastructure that supports proofs of functional correctness and equivalence checking. Neither of these tools had been used for functional correctness before. Taken together, these infrastructures empower programmers to develop efficient and verified implementations by "game hopping", starting from reference implementations that are proved functionally correct against a specification, and gradually introducing program optimizations that are proved correct by equivalence checking. We also make several contributions of independent interest, including a new and extensible verified compiler for Jasmin, with a richer memory model and support for vectorized instructions, and a new embedding of Jasmin in EasyCrypt.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。