Protecting Cryptographic Code Against Spectre-RSB: (and, in Fact, All Known Spectre Variants)
Spectre attacks void the guarantees of constant-time cryptographic code by leaking secrets during speculative execution. Recent research shows that such code can be protected from Spectre-v1 attacks with minimal overhead, but leaves open the question of protecting against other Spectre variants. In this work, we design, validate, implement, and verify a new approach to protect cryptographic code against all known classes of Spectre attacks, in particular Spectre-RSB. Our approach combines a new value-dependent information-flow type system that ensures that no secrets leak even under speculative execution and a compiler transformation that enables it on the generated low-level code. We first prove the soundness of the type system and the correctness of the compiler transformation using the Coq proof assistant. We then implement our approach in the Jasmin framework for high-assurance cryptography and demonstrate that the overhead incurred by all Spectre protections is below 2% for most cryptographic primitives and reaches only about 5--7% for the more complex post-quantum key-encapsulationkmechanism Kyber.
Authors
- Yuval Yarom (ORCID: https://orcid.org/0000-0003-0401-4197)
- Santiago Arranz Olmos
- Peter Schwabe (ORCID: https://orcid.org/0000-0002-1310-0997)
- Gilles Barthe (ORCID: https://orcid.org/0000-0002-3853-1777)
- Tiago Oliveira (ORCID: https://orcid.org/0000-0001-7395-3070)
- Vincent Laporte (ORCID: https://orcid.org/0000-0002-3468-352X)
- Chitchanok Chuengsatiansup (ORCID: https://orcid.org/0000-0002-0329-2681)
- Zhiyuan Zhang (ORCID: https://orcid.org/0009-0000-2669-5654)
- Benjamin Grégoire (ORCID: https://orcid.org/0000-0001-6650-9924)
Institutions
- Centre National de la Recherche Scientifique (FR)
- Institut national de recherche en sciences et technologies du numérique (FR)
- Radboud University Nijmegen (NL)
- The University of Melbourne (AU)
- Max Planck Institute for Security and Privacy (DE)
- Laboratoire Lorrain de Recherche en Informatique et ses Applications (FR)
- IMDEA Software Institute (ES)
- Université de Lorraine (FR)
- Ruhr University Bochum (DE)
Publication Details
- Published
- 2025-03-27
- DOI
- https://doi.org/10.1145/3676641.3716015
- Citations
- 1
- Primary Topic
- Security and Verification in Computing
- Type
- article
- Field-Weighted Citation Impact
- 2.48
Funders
- European Commission
- Deutsche Forschungsgemeinschaft
- Agence Nationale de la Recherche
- Bundesministerium für Bildung und Forschung