Paper 2021/1650

“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, and 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.

Metadata
Available format(s)
PDF
Category
Implementation
Publication info
Published elsewhere. IEEE S&P 2022
Keywords
constant-timetiming attackscryptographic librarysurveydeveloper surveyexpert surveyusable securityhuman factors
Contact author(s)
445358 @ mail muni cz
marcel fourne @ mpi-sp org
daniel de-almeida-braga @ irisa fr
mohamed sabt @ irisa fr
peter schwabe @ mpi-sp org
gjbarthe @ gmail com
pa fouque @ gmail com
acar @ sec uni-hannover de
History
2021-12-17: received
Short URL
https://ia.cr/2021/1650
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2021/1650,
      author = {Jan Jancar and Marcel Fourné and Daniel De Almeida Braga and Mohamed Sabt and Peter Schwabe and Gilles Barthe and Pierre-Alain Fouque and Yasemin Acar},
      title = {“They’re not that hard to mitigate”: What Cryptographic Library Developers Think About Timing Attacks},
      howpublished = {Cryptology ePrint Archive, Paper 2021/1650},
      year = {2021},
      note = {\url{https://eprint.iacr.org/2021/1650}},
      url = {https://eprint.iacr.org/2021/1650}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.