Lune

S&P2023Top-tier venue

Spectre Declassified: Reading from the Right Place at the Wrong Time

Basavesh Ammanaghatta Shivakumar, Jack Barnes, Gilles Barthe, Sunjay Cauligi, Chitchanok Chuengsatiansup, Daniel Genkin, Sioli O'Connell, Peter Schwabe, Rui Qi Sim, Yuval Yarom

Abstract

Practical information-flow programming languages commonly allow controlled leakage via a declassify construct—programmers can use this construct to declare intentional leakage. For instance, cryptographic signatures and ciphertexts, which are computed from private keys, are viewed as secret by information-flow analyses. Cryptographic libraries can use declassify to make this data public, as it is no longer sensitive.In this paper, we study the interaction between speculative execution and declassification. We show that speculative execution leads to unintended leakage from declassification sites. Concretely, we present a PoC that recovers keys from AES implementations. Our PoC is an instance of a Spectre attack, and remains effective even when programs are compiled with speculative load hardening (SLH), a widespread compiler-based countermeasure against Spectre. We develop formal countermeasures against these attacks, including a significant improvement to SLH we term selective speculative load hardening (selSLH). These countermeasures soundly enforce relative non-interference (RNI): Informally, the speculative leakage of a protected program is limited to the existing sequential leakage of the original program. We implement our simplest countermeasure in the FaCT language and compiler—which is designed specifically for high-assurance cryptography—and we see performance overheads of at most 10%. Finally, although we do not directly implement selSLH, our preliminary evaluation suggests a significant reduction in performance cost for cryptographic functions as compared to traditional SLH.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites Spectre Attacks: Exploiting Speculative Execution
  • Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch Predictor cites SMoTherSpectre: Exploiting Speculative Execution through Port Contention
  • SMoTherSpectre: Exploiting Speculative Execution through Port Contention cites Spectre Attacks: Exploiting Speculative Execution
  • SMoTherSpectre: Exploiting Speculative Execution through Port Contention cites Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Spectre Attacks: Exploiting Speculative Execution
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Serberus: Protecting Cryptographic Code from Spectres at Compile-Time
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites Spectre Attacks: Exploiting Speculative Execution
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites Verifying Constant-Time Implementations
  • Serberus: Protecting Cryptographic Code from Spectres at Compile-Time cites Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks
  • Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures cites Spectre Attacks: Exploiting Speculative Execution
  • Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security Measures cites SMoTherSpectre: Exploiting Speculative Execution through Port Contention
  • Preservation of Speculative Constant-Time by Compilation cites Spectre Attacks: Exploiting Speculative Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. Indirector: High-Precision Branch Target Injection Attacks Exploiting the Indirect Branch PredictorLuyi Li, Hosein Yavarzadeh, Dean M. TullsenUSENIX Security 2024 · 18 citations
  2. Serberus: Protecting Cryptographic Code from Spectres at Compile-TimeNicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline TrippelS&P 2024 · 16 citations
  3. RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security VerificationYao Hsiao, Nikos Nikoleris, Artem Khyzha, Dominic P. Mulligan et al.MICRO 2024 · 12 citations
  4. Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire et al.POPL 2025 · 8 citations
  5. Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security MeasuresRutvik Choudhary, Alan Wang, Zirui Neil Zhao, Adam Morrison et al.CCS 2023 · 4 citations

Builds on24

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB AttacksBen Gras, Kaveh Razavi, Herbert Bos, Cristiano GiuffridaUSENIX Security 2018 · 357 citations
  3. Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
  4. SMoTherSpectre: Exploiting Speculative Execution through Port ContentionAtri Bhattacharyya, Alexandra Sandulescu, Matthias Neugschwandtner, Alessandro Sorniotti et al.CCS 2019 · 267 citations
  5. ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler et al.USENIX Security 2019 · 247 citations

Related papers

  1. Ultimate SLH: Taking Speculative Load Hardening to the Next LevelZhiyuan Zhang, Gilles Barthe, Chitchanok Chuengsatiansup, Peter Schwabe et al.USENIX Security 2023
  2. Levioso: Efficient Compiler-Informed Secure SpeculationAli Hajiabadi, Archit Agarwal, Andreas Diavastos, Trevor E. CarlsonDAC 2024 · 1 citation
  3. Securing Cryptographic Software via Typed Assembly LanguageShixin Song, Tingzhen Dong, Kosi Nwabueze, Julian Zanders et al.CCS 2025
  4. Hunting the Haunter - Efficient Relational Symbolic Execution for Spectre with Haunted RelSELesly-Ann Daniel, Sébastien Bardin, Tamara RezkNDSS 2021
  5. Protecting Cryptographic Code Against Spectre-RSB: (and, in Fact, All Known Spectre Variants)Santiago Arranz-Olmos, Gilles Barthe, Chitchanok Chuengsatiansup, Benjamin Grégoire et al.ASPLOS 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines