Lune

S&P2022Top-tier venue

"They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing Attacks

Jan Jancar, Marcel Fourné, Daniel De Almeida Braga, Mohamed Sabt, Peter Schwabe, Gilles Barthe, Pierre-Alain Fouque, Yasemin Acar

Abstract

Timing attacks are among the most devastating side-channel attacks, allowing remote attackers to retrieve secret material, including cryptographic keys, with relative ease. In principle, “these attacks are not that hard to mitigate the basic intuition, captured by the constant-time criterion, is that control-flow and memory accesses should be independent from secrets. Furthermore, there is a broad range of tools for automatically checking adherence to this intuition. Yet, these attacks still plague popular cryptographic libraries twenty-five years after their discovery, reflecting a dangerous gap between academic research and cryptographic engineering. This gap can potentially undermine the emerging shift towards high-assurance, formally verified cryptographic libraries. However, the causes for this gap remain uninvestigated. To understand the causes of this gap, we conducted a survey with 44 developers of 27 prominent open-source cryptographic libraries. The goal of the survey was to analyze if and how the developers ensure that their code executes in constant time. Our main findings are that developers are aware of timing attacks and of their potentially dramatic consequences and yet often prioritize other issues over the perceived huge investment of time and resources currently needed to make their code resistant to timing attacks. Based on the survey, we identify several shortcomings in existing analysis tools for constant-time, and issue recommendations that can make writing constant-time libraries less difficult. Our recommendations can inform future development of analysis tools, security-aware compilers, and cryptographic libraries, not only for constant-timeness, but in the broader context of side-channel attacks, in particular for micro-architectural side-channel attacks, which are a younger topic and too recent as focus for this survey.

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.

30 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

  • A Systematic Evaluation of Automated Tools for Side-Channel Vulnerabilities Detection in Cryptographic Libraries cites Microwalk-CI: Practical Side-Channel Analysis for JavaScript Applications
  • A Systematic Evaluation of Automated Tools for Side-Channel Vulnerabilities Detection in Cryptographic Libraries cites A Systematic Evaluation of Transient Execution Attacks and Defenses
  • A Systematic Evaluation of Automated Tools for Side-Channel Vulnerabilities Detection in Cryptographic Libraries cites HACL: A Verified Modern Cryptographic Library
  • Spectector: Principled Detection of Speculative Information Flows cites Spectre Attacks: Exploiting Speculative Execution
  • Spectector: Principled Detection of Speculative Information Flows cites A Systematic Evaluation of Transient Execution Attacks and Defenses
  • Unhelpful Assumptions in Software Security Research cites Comparing the Usability of Cryptographic APIs
  • A Systematic Evaluation of Transient Execution Attacks and Defenses cites Spectre Attacks: Exploiting Speculative Execution
  • "These results must be false": A usability evaluation of constant-time analysis tools cites A Systematic Evaluation of Automated Tools for Side-Channel Vulnerabilities Detection in Cryptographic Libraries
  • "These results must be false": A usability evaluation of constant-time analysis tools cites Microwalk-CI: Practical Side-Channel Analysis for JavaScript Applications
  • "These results must be false": A usability evaluation of constant-time analysis tools cites Spectre Attacks: Exploiting Speculative Execution
  • "These results must be false": A usability evaluation of constant-time analysis tools cites Comparing the Usability of Cryptographic APIs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers30

  1. "False negative - that one is going to kill you": Understanding Industry Perspectives of Static Analysis based Security TestingAmit Seal Ami, Kevin Moran, Denys Poshyvanyk, Adwait NadkarniS&P 2024 · 40 citations
  2. "These results must be false": A usability evaluation of constant-time analysis toolsMarcel Fourné, Daniel De Almeida Braga, Jan Jancar, Mohamed Sabt et al.USENIX Security 2024 · 15 citations
  3. A Systematic Evaluation of Automated Tools for Side-Channel Vulnerabilities Detection in Cryptographic LibrariesAntoine Geimer, Mathéo Vergnolle, Frédéric Recoules, Lesly-Ann Daniel et al.CCS 2023 · 12 citations
  4. Microwalk-CI: Practical Side-Channel Analysis for JavaScript ApplicationsJan Wichelmann, Florian Sieck, Anna Pätschke, Thomas EisenbarthCCS 2022 · 12 citations
  5. Unhelpful Assumptions in Software Security ResearchIta Ryan, Utz Roedig, Klaas-Jan StolCCS 2023 · 9 citations

Builds on20

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp et al.USENIX Security 2019 · 442 citations
  3. Comparing the Usability of Cryptographic APIsYasemin Acar, Michael Backes, Sascha Fahl, Simson L. Garfinkel et al.S&P 2017 · 261 citations
  4. HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
  5. Spectector: Principled Detection of Speculative Information FlowsMarco Guarnieri, Boris Köpf, José F. Morales, Jan Reineke et al.S&P 2020 · 177 citations

Related papers

  1. Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
  2. Enforcing Fine-grained Constant-time PoliciesBasavesh Ammanaghatta Shivakumar, Gilles Barthe, Benjamin Grégoire, Vincent Laporte et al.CCS 2022 · 11 citations
  3. Constant-time foundations for the new spectre eraSunjay Cauligi, Craig Disselkoen, Klaus von Gleissenthall, Dean M. Tullsen et al.PLDI 2020 · 90 citations
  4. Towards Efficient Verification of Constant-Time Cryptographic ImplementationsLuwei Cai, Fu Song, Taolue ChenFSE 2024 · 4 citations
  5. Binsec/Rel: Efficient Relational Symbolic Execution for Constant-Time at Binary-LevelLesly-Ann Daniel, Sébastien Bardin, Tamara RezkS&P 2020 · 76 citations
Dusk over the sea between two cliffs drawn in fine vertical lines