Lune

S&P2017Top-tier venue

Comparing the Usability of Cryptographic APIs

Yasemin Acar, Michael Backes, Sascha Fahl, Simson L. Garfinkel, Doowon Kim, Michelle L. Mazurek, Christian Stransky

Abstract

Potentially dangerous cryptography errors are welldocumented in many applications. Conventional wisdom suggests that many of these errors are caused by cryptographic Application Programming Interfaces (APIs) that are too complicated, have insecure defaults, or are poorly documented. To address this problem, researchers have created several cryptographic libraries that they claim are more usable; however, none of these libraries have been empirically evaluated for their ability to promote more secure development. This paper is the first to examine both how and why the design and resulting usability of different cryptographic libraries affects the security of code written with them, with the goal of understanding how to build effective future libraries. We conducted a controlled experiment in which 256 Python developers recruited from GitHub attempt common tasks involving symmetric and asymmetric cryptography using one of five different APIs. We examine their resulting code for functional correctness and security, and compare their results to their self-reported sentiment about their assigned library. Our results suggest that while APIs designed for simplicity can provide security benefits-reducing the decision space, as expected, prevents choice of insecure parameters-simplicity is not enough. Poor documentation, missing code examples, and a lack of auxiliary features such as secure key storage, caused even participants assigned to simplified libraries to struggle with both basic functional correctness and security. Surprisingly, the availability of comprehensive documentation and easy-touse code examples seems to compensate for more complicated APIs in terms of functionally correct results and participant reactions; however, this did not extend to security results. We find it particularly concerning that for about 20% of functionally correct tasks, across libraries, participants believed their code was secure when it was not. Our results suggest that while new cryptographic libraries that want to promote effective security should offer a simple, convenient interface, this is not enough: they should also, and perhaps more importantly, ensure support for a broad range of common tasks and provide accessible documentation with secure, easy-to-use code examples.

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.

54 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

  • Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • Hackers vs. Testers: A Comparison of Software Vulnerability Discovery Processes cites Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study
  • Hackers vs. Testers: A Comparison of Software Vulnerability Discovery Processes cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • "If HTTPS Were Secure, I Wouldn't Need 2FA" - End User and Administrator Mental Models of HTTPS cites Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study
  • CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java Projects cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
  • Understanding Privacy-Related Questions on Stack Overflow cites You Get Where You're Looking for: The Impact of Information Sources on Code Security
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers54

  1. CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java ProjectsSazzadur Rahaman, Ya Xiao, Sharmin Afrose, Fahad Shaon et al.CCS 2019 · 159 citations
  2. Hackers vs. Testers: A Comparison of Software Vulnerability Discovery ProcessesDaniel Votipka, Rock Stevens, Elissa M. Redmiles, Jeremy Hu et al.S&P 2018 · 151 citations
  3. Why Do Developers Get Password Storage Wrong?: A Qualitative Usability StudyAlena Naiakshina, Anastasia Danilova, Christian Tiefenau, Marco Herzog et al.CCS 2017 · 146 citations
  4. "If HTTPS Were Secure, I Wouldn't Need 2FA" - End User and Administrator Mental Models of HTTPSKatharina Krombholz, Karoline Busse, Katharina Pfeffer, Matthew Smith et al.S&P 2019 · 105 citations
  5. Understanding Privacy-Related Questions on Stack OverflowMohammad Tahaei, Kami Vaniea, Naomi SaphraCHI 2020 · 93 citations

Builds on2

  1. You Get Where You're Looking for: The Impact of Information Sources on Code SecurityYasemin Acar, Michael Backes, Sascha Fahl, Doowon Kim et al.S&P 2016 · 325 citations
  2. SoK: Lessons Learned from Android Security Research for Appified Software PlatformsYasemin Acar, Michael Backes, Sven Bugiel, Sascha Fahl et al.S&P 2016 · 101 citations

Related papers

  1. "I'm Pretty Expert and I Still Screw It Up": Qualitative Insights into Experiences and Challenges of Designing and Implementing Cryptographic Library APIsJuliane Schmüser, Philip Klostermeyer, Kay Friedrich, Sascha FahlS&P 2025
  2. Listen to Developers! A Participatory Design Study on Security Warnings for Cryptographic APIsPeter Leo Gorski, Yasemin Acar, Luigi Lo Iacono, Sascha FahlCHI 2020 · 39 citations
  3. Cryptbara: Dependency-Guided Detection of Python Cryptographic API MisusesSeogyeong Cho, Seungeun Yu, Seunghoon WooASE 2025
  4. When Contracts Meets Crypto: Exploring Developers' Struggles with Ethereum Cryptographic APIsJiashuo Zhang, Jiachi Chen, Zhiyuan Wan, Ting Chen et al.ICSE 2024 · 9 citations
  5. Stack Overflow Considered Helpful! Deep Learning Security Nudges Towards Stronger CryptographyFelix Fischer, Huang Xiao, Ching-yu Kao, Yannick Stachelscheid et al.USENIX Security 2019 · 44 citations
Dusk over the sea between two cliffs drawn in fine vertical lines