Lune

POPL2020顶会

Formal verification of a constant-time preserving C compiler

Gilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin, Vincent Laporte, David Pichardie, Alix Trieu

摘要

Timing side-channels are arguably one of the main sources of vulnerabilities in cryptographic implementations. One effective mitigation against timing side-channels is to write programs that do not perform secret-dependent branches and memory accesses. This mitigation, known as łcryptographic constant-timež, is adopted by several popular cryptographic libraries.

This paper focuses on compilation of cryptographic constant-time programs, and more specifically on the following question: is the code generated by a realistic compiler for a constant-time source program itself provably constant-time? Surprisingly, we answer the question positively for a mildly modified version of the CompCert compiler, a formally verified and moderately optimizing compiler for C. Concretely, we modify the CompCert compiler to eliminate sources of potential leakage. Then, we instrument the operational semantics of CompCert intermediate languages so as to be able to capture cryptographic constant-time. Finally, we prove that the modified CompCert compiler preserves constant-time. Our mechanization maximizes reuse of the CompCert correctness proof, through the use of new proof techniques for proving preservation of constant-time. These techniques achieve complementary trade-offs between generality and tractability of proof effort, and are of independent interest.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 33 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DICE: A Formally Verified Implementation of DICE Measured Boot 引用了 HACL: A Verified Modern Cryptographic Library
  • SoK: Computer-Aided Cryptography 引用了 Verified Correctness and Security of mbedTLS HMAC-DRBG
  • SoK: Computer-Aided Cryptography 引用了 The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
  • SoK: Computer-Aided Cryptography 引用了 Verifying Constant-Time Implementations
  • SoK: Computer-Aided Cryptography 引用了 HACL: A Verified Modern Cryptographic Library
  • SoK: Computer-Aided Cryptography 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • Hardware-Software Contracts for Secure Speculation 引用了 Verifying Constant-Time Implementations
  • The Last Mile: High-Assurance and High-Speed Cryptographic Implementations 引用了 Verified Correctness and Security of mbedTLS HMAC-DRBG
  • The Last Mile: High-Assurance and High-Speed Cryptographic Implementations 引用了 Verifying Constant-Time Implementations
  • The Last Mile: High-Assurance and High-Speed Cryptographic Implementations 引用了 HACL: A Verified Modern Cryptographic Library
  • The Last Mile: High-Assurance and High-Speed Cryptographic Implementations 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • High-Assurance Cryptography in the Spectre Era 引用了 SoK: Computer-Aided Cryptography
  • High-Assurance Cryptography in the Spectre Era 引用了 Hardware-Software Contracts for Secure Speculation
  • High-Assurance Cryptography in the Spectre Era 引用了 The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
  • High-Assurance Cryptography in the Spectre Era 引用了 Verifying Constant-Time Implementations
  • High-Assurance Cryptography in the Spectre Era 引用了 HACL: A Verified Modern Cryptographic Library
  • High-Assurance Cryptography in the Spectre Era 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • Automatically eliminating speculative leaks from cryptographic code with blade 引用了 Verifying Constant-Time Implementations
  • Automatically eliminating speculative leaks from cryptographic code with blade 引用了 HACL: A Verified Modern Cryptographic Library
  • Automatically eliminating speculative leaks from cryptographic code with blade 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • HACL: A Verified Modern Cryptographic Library 引用了 Verifying Constant-Time Implementations
  • Jasmin: High-Assurance and High-Speed Cryptography 引用了 Verified Correctness and Security of mbedTLS HMAC-DRBG
  • Jasmin: High-Assurance and High-Speed Cryptography 引用了 Verifying Constant-Time Implementations
  • Jasmin: High-Assurance and High-Speed Cryptography 引用了 HACL: A Verified Modern Cryptographic Library
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper33

  1. SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet 等S&P 2021 · 169 次引用
  2. Hardware-Software Contracts for Secure SpeculationMarco Guarnieri, Boris Köpf, Jan Reineke, Pepe VilaS&P 2021 · 111 次引用
  3. Automatically eliminating speculative leaks from cryptographic code with bladeMarco Vassena, Craig Disselkoen, Klaus von Gleissenthall, Sunjay Cauligi 等POPL 2021 · 53 次引用
  4. High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos 等S&P 2021 · 42 次引用
  5. DICE*: A Formally Verified Implementation of DICE Measured BootZhe Tao, Aseem Rastogi, Naman Gupta, Kapil Vaswani 等USENIX Security 2021 · 25 次引用

它引用的 Paper9

  1. Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir 等USENIX Security 2016 · 274 次引用
  2. HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 次引用
  3. Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot 等CCS 2017 · 157 次引用
  4. The Last Mile: High-Assurance and High-Speed Cryptographic ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Benjamin Grégoire 等S&P 2020 · 67 次引用
  5. Verified Correctness and Security of mbedTLS HMAC-DRBGKatherine Q. Ye, Matthew Green, Naphat Sanguansin, Lennart Beringer 等CCS 2017 · 59 次引用

相关 Paper

  1. Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire 等POPL 2025 · 8 次引用
  2. "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing AttacksJan Jancar, Marcel Fourné, Daniel De Almeida Braga, Mohamed Sabt 等S&P 2022 · 61 次引用
  3. Decompiling for Constant-Time AnalysisSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Youcef Bouzid 等OOPSLA 2026 · 1 次引用
  4. Enforcing Fine-grained Constant-time PoliciesBasavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte 等CCS 2022 · 11 次引用
  5. Towards Efficient Verification of Constant-Time Cryptographic ImplementationsLuwei Cai, Fu Song, Taolue ChenFSE 2024 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖