Typing High-Speed Cryptography against Spectre v1
Basavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte, Tiago Oliveira, Swarn Priya, Peter Schwabe, Lucas Tabary-Maujean
摘要
The current gold standard of cryptographic software is to write efficient libraries with systematic protections against timing attacks. In order to meet this goal, cryptographic engineers increasingly use high-assurance cryptography tools. These tools guide programmers and provide rigorous guarantees that can be verified independently by library users. However, high-assurance tools reason about overly simple execution models that elide transient execution leakage. Thus, implementations validated by high-assurance cryptography tools remain potentially vulnerable to transient execution attacks such as Spectre or Meltdown. Moreover, proposed countermeasures are not used in practice due to performance overhead.We propose, analyze, implement and evaluate an approach for writing efficient cryptographic implementations that are protected against Spectre v1 attacks. Our approach ensures speculative constant-time, an information flow property which guarantees that programs are protected against Spectre v1. Speculative constant-time is enforced by means of a (value-dependent) information flow type system. The type system tracks security levels depending on whether execution is misspeculating. We implement our approach in the Jasmin framework for high-assurance cryptography, and use it for protecting all implementations of an experimental cryptographic library that includes highly optimized implementations of symmetric primitives, of elliptic-curve cryptography, and of Kyber, a lattice-based KEM recently selected by NIST for standardization. The performance impact of our protections is very low; for example, less than 1% for Kyber and essentially zero for X25519.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Spectector: Principled Detection of Speculative Information Flows 引用了 Spectre Attacks: Exploiting Speculative Execution
- Spectector: Principled Detection of Speculative Information Flows 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- 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 引用了 Meltdown: Reading Kernel Memory from User Space
- SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations 引用了 Preservation of Speculative Constant-Time by Compilation
- Preservation of Speculative Constant-Time by Compilation 引用了 SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
- ret2spec: Speculative Execution Using Return Stack Buffers 引用了 Spectre Attacks: Exploiting Speculative Execution
- Meltdown: Reading Kernel Memory from User Space 引用了 Spectre Attacks: Exploiting Speculative Execution
- Automated Side-Channel Analysis of Cryptographic Protocol Implementations 引用了 Spectre Attacks: Exploiting Speculative Execution
- Automated Side-Channel Analysis of Cryptographic Protocol Implementations 引用了 Meltdown: Reading Kernel Memory from User Space
- Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures 引用了 Spectre Attacks: Exploiting Speculative Execution
- Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures 引用了 Spectector: Principled Detection of Speculative Information Flows
- Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs 引用了 Spectre Attacks: Exploiting Speculative Execution
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs 引用了 Spectector: Principled Detection of Speculative Information Flows
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs 引用了 Meltdown: Reading Kernel Memory from User Space
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs 引用了 HACL: A Verified Modern Cryptographic Library
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs 引用了 Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures
- Preservation of Speculative Constant-Time by Compilation 引用了 Spectre Attacks: Exploiting Speculative Execution
- Preservation of Speculative Constant-Time by Compilation 引用了 Spectector: Principled Detection of Speculative Information Flows
引用它的顶会 Paper13
- Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire 等POPL 2025 · 8 次引用
- SNIP: Speculative Execution and Non-Interference Preservation for Compiler TransformationsSören van der Wall, Roland MeyerPOPL 2025 · 7 次引用
- Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security MeasuresRutvik Choudhary, Alan Wang, Zirui Neil Zhao, Adam Morrison 等CCS 2023 · 4 次引用
- Automated Side-Channel Analysis of Cryptographic Protocol ImplementationsFaezeh Nasrabadi, Robert Künnemann, Hamed NematiCCS 2026 · 2 次引用
- Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic ProgramsAli Hajiabadi, Trevor E. CarlsonISCA 2025 · 2 次引用
它引用的 Paper16
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher 等USENIX Security 2018 · 1,456 次引用
- ret2spec: Speculative Execution Using Return Stack BuffersGiorgi Maisuradze, Christian RossowCCS 2018 · 282 次引用
- HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 次引用
- Spectector: Principled Detection of Speculative Information FlowsMarco Guarnieri, Boris Köpf, José F. Morales, Jan Reineke 等S&P 2020 · 177 次引用
相关 Paper
- 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 次引用
- High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos 等S&P 2021 · 42 次引用
- Constant-time foundations for the new spectre eraSunjay Cauligi, Craig Disselkoen, Klaus von Gleissenthall, Dean M. Tullsen 等PLDI 2020 · 90 次引用
- Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot 等CCS 2017 · 157 次引用
- (Dis)Proving Spectre Security with Speculation-Passing StyleSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Xingyu Xie 等OOPSLA 2026
