Protecting Cryptographic Code Against Spectre-RSB: (and, in Fact, All Known Spectre Variants)
Santiago Arranz-Olmos, Gilles Barthe, Chitchanok Chuengsatiansup, Benjamin Grégoire, Vincent Laporte, Tiago Oliveira, Peter Schwabe, Yuval Yarom, Zhiyuan Zhang
摘要
It is fundamental that executing cryptographic software must not leak secrets through side-channels. For softwarevisible side-channels, it was long believed that "constant-time" programming would be sufficient as a systematic countermeasure. However, this belief was shattered in 2018 by attacks exploiting speculative execution-so called Spectre attacks.
Recent work shows that language support suffices to protect cryptographic code with minimal overhead against one class of such attacks, Spectre v1, but leaves an open question of whether this result can be extended to also cover other classes of Spectre attacks. In this paper, we answer this question in the affirmative: We design, validate, implement, and verify an approach to protect cryptographic implementations against all known classes of Spectre attacks-the main challenge in this endeavor is attacks exploiting the return stack buffer, which are known as Spectre-RSB. Our approach combines a new value-dependent information-flow type system that enforces speculative constant-time in an idealized model of transient execution and a compiler transformation that realizes this idealized model on the generated low-level code. Using the Coq proof assistant, we prove that the type system is sound with respect to the idealized semantics and that the compiler transformation preserves speculative constant-time. We implement our approach in the Jasmin framework for highassurance cryptography and demonstrate that the overhead incurred by full Spectre protections is below 2% for most cryptographic primitives and reaches only about 5-7% for the more complex post-quantum key-encapsulation mechanism Kyber.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- SoK: Computer-Aided Cryptography 引用了 Spectre Attacks: Exploiting Speculative Execution
- SoK: Computer-Aided Cryptography 引用了 Jasmin: High-Assurance and High-Speed Cryptography
- ret2spec: Speculative Execution Using Return Stack Buffers 引用了 Spectre Attacks: Exploiting Speculative Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses 引用了 Spectre Attacks: Exploiting Speculative Execution
- A Systematic Evaluation of Transient Execution Attacks and Defenses 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre Era 引用了 Spectre Attacks: Exploiting Speculative Execution
- dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre Era 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre Era 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
- dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre Era 引用了 Jasmin: High-Assurance and High-Speed Cryptography
- Securing Cryptographic Software via Typed Assembly Language 引用了 Spectre Attacks: Exploiting Speculative Execution
- Securing Cryptographic Software via Typed Assembly Language 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- Securing Cryptographic Software via Typed Assembly Language 引用了 Jasmin: High-Assurance and High-Speed Cryptography
- (Dis)Proving Spectre Security with Speculation-Passing Style 引用了 Spectre Attacks: Exploiting Speculative Execution
- (Dis)Proving Spectre Security with Speculation-Passing Style 引用了 SoK: Computer-Aided Cryptography
- (Dis)Proving Spectre Security with Speculation-Passing Style 引用了 ret2spec: Speculative Execution Using Return Stack Buffers
- (Dis)Proving Spectre Security with Speculation-Passing Style 引用了 A Systematic Evaluation of Transient Execution Attacks and Defenses
引用它的顶会 Paper3
- dfence: Fine-Grained Speculation Barriers for Efficient and Effective Hardware-Software Protection in the Spectre EraDavide Davoli, Marton Bognar, Lesly-Ann Daniel, Benjamin Gregoire 等CCS 2026 · 1 次引用
- Securing Cryptographic Software via Typed Assembly LanguageShixin Song, Tingzhen Dong, Kosi Nwabueze, Julian Zanders 等CCS 2025
- (Dis)Proving Spectre Security with Speculation-Passing StyleSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Xingyu Xie 等OOPSLA 2026
它引用的 Paper24
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp 等USENIX Security 2019 · 442 次引用
- ret2spec: Speculative Execution Using Return Stack BuffersGiorgi Maisuradze, Christian RossowCCS 2018 · 282 次引用
- SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet 等S&P 2021 · 169 次引用
- Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot 等CCS 2017 · 157 次引用
相关 Paper
- Typing High-Speed Cryptography against Spectre v1Basavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte 等S&P 2023
- Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire 等POPL 2025 · 8 次引用
- High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos 等S&P 2021 · 42 次引用
- Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 次引用
- Constant-time foundations for the new spectre eraSunjay Cauligi, Craig Disselkoen, Klaus von Gleissenthall, Dean M. Tullsen 等PLDI 2020 · 90 次引用
