Lune

POPL2025顶会

Preservation of Speculative Constant-Time by Compilation

Santiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire, Vincent Laporte

摘要

Compilers often weaken or even discard software-based countermeasures commonly used to protect programs against side-channel attacks; worse, they may also introduce vulnerabilities that attackers can exploit. The solution to this problem is to develop compilers that preserve such countermeasures. Prior work establishes that (a mildly modified version of) the CompCert and Jasmin formally verified compilers preserve constant-time, an information flow policy that ensures that programs are protected against timing side-channel attacks. However, nothing is known about preservation of speculative constant-time, a strengthening of the constant-time policy that ensures that programs are protected against Spectre-v1 attacks. We first show that preservation of speculative constant-time fails in practice by providing examples of secure programs whose compilation is not speculative constant-time using GCC (GCC -O0 and GCC -O1) and Jasmin. Then, we define a proof-of-concept compiler that distills some of the critical passes of the Jasmin compiler and use the Coq proof assistant to prove that it preserves speculative constant-time. Finally, we patch the Jasmin speculative constant-time type checker and demonstrate that all cryptographic implementations written in Jasmin can be fixed with minimal impact.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Non-interference Preserving Optimising Compilation 引用了 SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
  • Non-interference Preserving Optimising Compilation 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • Spectector: Principled Detection of Speculative Information Flows 引用了 Spectre Attacks: Exploiting Speculative Execution
  • Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers 引用了 Spectre Attacks: Exploiting Speculative Execution
  • Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers 引用了 SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
  • Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers 引用了 Interaction trees: representing recursive and impure programs in Coq
  • Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • Decompiling for Constant-Time Analysis 引用了 Spectre Attacks: Exploiting Speculative Execution
  • Decompiling for Constant-Time Analysis 引用了 Spectector: Principled Detection of Speculative Information Flows
  • Decompiling for Constant-Time Analysis 引用了 SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
  • Decompiling for Constant-Time Analysis 引用了 SoK: Computer-Aided Cryptography
  • Decompiling for Constant-Time Analysis 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations 引用了 Spectre Attacks: Exploiting Speculative Execution
  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations 引用了 Spectector: Principled Detection of Speculative Information Flows
  • SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations 引用了 SoK: Computer-Aided Cryptography
  • SoK: Computer-Aided Cryptography 引用了 Spectre Attacks: Exploiting Speculative Execution
  • SoK: Computer-Aided Cryptography 引用了 Jasmin: High-Assurance and High-Speed Cryptography
  • KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM 引用了 Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and Compilers
  • KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM 引用了 SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
  • KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM 引用了 SoK: Computer-Aided Cryptography
  • KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM 引用了 Interaction trees: representing recursive and impure programs in Coq
  • KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEM 引用了 Jasmin: High-Assurance and High-Speed Cryptography
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. SNIP: Speculative Execution and Non-Interference Preservation for Compiler TransformationsSören van der Wall, Roland MeyerPOPL 2025 · 7 次引用
  2. Non-interference Preserving Optimising CompilationJulian Rosemann, Sebastian Hack, Deepak GargOOPSLA 2025 · 1 次引用
  3. Smooth, Integrated Proofs of Cryptographic Constant Time for Nondeterministic Programs and CompilersOwen Conoly, Andres Erbsen, Adam ChlipalaPLDI 2025 · 1 次引用
  4. Decompiling for Constant-Time AnalysisSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Youcef Bouzid 等OOPSLA 2026 · 1 次引用
  5. KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEMSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Gregoire 等CCS 2026 · 1 次引用

它引用的 Paper30

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
  2. Spectector: Principled Detection of Speculative Information FlowsMarco Guarnieri, Boris Köpf, José F. Morales, Jan Reineke 等S&P 2020 · 177 次引用
  3. SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet 等S&P 2021 · 169 次引用
  4. Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot 等CCS 2017 · 157 次引用
  5. Interaction trees: representing recursive and impure programs in CoqLi-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur 等POPL 2020 · 133 次引用

相关 Paper

  1. Typing High-Speed Cryptography against Spectre v1Basavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte 等S&P 2023
  2. Protecting Cryptographic Code Against Spectre-RSB: (and, in Fact, All Known Spectre Variants)Santiago Arranz-Olmos, Gilles Barthe, Chitchanok Chuengsatiansup, Benjamin Grégoire 等ASPLOS 2025 · 1 次引用
  3. Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin 等POPL 2020 · 77 次引用
  4. High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos 等S&P 2021 · 42 次引用
  5. Constant-time foundations for the new spectre eraSunjay Cauligi, Craig Disselkoen, Klaus von Gleissenthall, Dean M. Tullsen 等PLDI 2020 · 90 次引用
黄昏的海面,两侧是细线勾勒的悬崖