Java Cryptography Uses in the Wild
Mohammadreza Hazhirpasand, Mohammad Ghafari, Oscar Nierstrasz

TL;DR
This study investigates how Java developers use cryptography APIs in open-source projects, revealing widespread misuses and highlighting the need for better documentation and contextual understanding to improve security practices.
Contribution
It provides an empirical analysis of cryptography API usage in open-source Java projects, combining static analysis with developer feedback to identify common misuses and their underlying reasons.
Findings
85% of cryptography API usages are misused
Many misuses have minor security implications
Lack of documentation contributes to misuses
Abstract
[Background] Previous research has shown that developers commonly misuse cryptography APIs. [Aim] We have conducted an exploratory study to find out how crypto APIs are used in open-source Java projects, what types of misuses exist, and why developers make such mistakes. [Method] We used a static analysis tool to analyze hundreds of open-source Java projects that rely on Java Cryptography Architecture, and manually inspected half of the analysis results to assess the tool results. We also contacted the maintainers of these projects by creating an issue on the GitHub repository of each project, and discussed the misuses with developers. [Results] We learned that 85% of Cryptography APIs are misused, however, not every misuse has severe consequences. Developer feedback showed that security caveats in the documentation of crypto APIs are rare, developers may overlook misuses that originate…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
