Comparing the Usability of Cryptographic APIs
Yasemin Acar, Michael Backes, Sascha Fahl, Simson L. Garfinkel, Doowon Kim, Michelle L. Mazurek, Christian Stransky
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 54 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study 引用了 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 引用了 Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study
- Hackers vs. Testers: A Comparison of Software Vulnerability Discovery Processes 引用了 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 引用了 Why Do Developers Get Password Storage Wrong?: A Qualitative Usability Study
- CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java Projects 引用了 You Get Where You're Looking for: The Impact of Information Sources on Code Security
- Understanding Privacy-Related Questions on Stack Overflow 引用了 You Get Where You're Looking for: The Impact of Information Sources on Code Security
引用它的顶会 Paper54
- CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java ProjectsSazzadur Rahaman, Ya Xiao, Sharmin Afrose, Fahad Shaon 等CCS 2019 · 159 次引用
- Hackers vs. Testers: A Comparison of Software Vulnerability Discovery ProcessesDaniel Votipka, Rock Stevens, Elissa M. Redmiles, Jeremy Hu 等S&P 2018 · 151 次引用
- Why Do Developers Get Password Storage Wrong?: A Qualitative Usability StudyAlena Naiakshina, Anastasia Danilova, Christian Tiefenau, Marco Herzog 等CCS 2017 · 146 次引用
- "If HTTPS Were Secure, I Wouldn't Need 2FA" - End User and Administrator Mental Models of HTTPSKatharina Krombholz, Karoline Busse, Katharina Pfeffer, Matthew Smith 等S&P 2019 · 105 次引用
- Understanding Privacy-Related Questions on Stack OverflowMohammad Tahaei, Kami Vaniea, Naomi SaphraCHI 2020 · 93 次引用
它引用的 Paper2
- You Get Where You're Looking for: The Impact of Information Sources on Code SecurityYasemin Acar, Michael Backes, Sascha Fahl, Doowon Kim 等S&P 2016 · 325 次引用
- SoK: Lessons Learned from Android Security Research for Appified Software PlatformsYasemin Acar, Michael Backes, Sven Bugiel, Sascha Fahl 等S&P 2016 · 101 次引用
相关 Paper
- "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
- Listen to Developers! A Participatory Design Study on Security Warnings for Cryptographic APIsPeter Leo Gorski, Yasemin Acar, Luigi Lo Iacono, Sascha FahlCHI 2020 · 39 次引用
- Cryptbara: Dependency-Guided Detection of Python Cryptographic API MisusesSeogyeong Cho, Seungeun Yu, Seunghoon WooASE 2025
- When Contracts Meets Crypto: Exploring Developers' Struggles with Ethereum Cryptographic APIsJiashuo Zhang, Jiachi Chen, Zhiyuan Wan, Ting Chen 等ICSE 2024 · 9 次引用
- Stack Overflow Considered Helpful! Deep Learning Security Nudges Towards Stronger CryptographyFelix Fischer, Huang Xiao, Ching-yu Kao, Yannick Stachelscheid 等USENIX Security 2019 · 44 次引用
