CrySL: An Extensible Approach to Validating the Correct Usage of Cryptographic APIs
Open accessAbstract
Various studies have empirically shown that the majority of Java and Android applications misuse cryptographic libraries, causing devastating breaches of data security. It is crucial to detect such misuses early in the development process. To detect cryptography misuses, one mustdefinesecure uses first, a process mastered primarily by cryptography experts but not by developers. In this paper, we presentCrySL, a specification language for bridging the cognitive gap between cryptography experts and developers.CrySLenables cryptography experts to specify the secure usage of the cryptographic libraries they provide. We have implemented a compiler that translates suchCrySLspecification into a context-sensitive and flow-sensitive demand-driven static analysis. The analysis then helps developers by automatically checking a given Java or Android app for compliance with theCrySL-encoded rules. We have designed an extensiveCrySLrule set for the Java Cryptography Architecture (JCA), and empirically evaluated it by analyzing 10,000 current Android apps and all 204,788 current Java software artefacts on Maven Central. Our results show that misuse of cryptographic APIs is still widespread, with 95 percent of apps and 63 percent of Maven artefacts containing at least one misuse. Our easily extensibleCrySLrule set covers more violations than previous special-purpose tools that contain hard-coded rules, while still offering a more precise analysis.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
No references could be resolved yet.
Research works printed but not linked: 22
- Alexia Chatzikonstantinou, Christoforos Ntantogian, Georgios Karopoulos, and Christos Xenakis. Evaluation of cryptography usage in android applications. In International Con- ference on Bio-inspired Information and Communications Technologies, pages 83-90, 2016.
- Manuel Egele, David Brumley, Yanick Fratantonio, and Christopher Kruegel. An empirical study of cryptographic misuse in android applications. In ACM Conference on Computer and Communications Security, pages 73-84, 2013.
- Felix Fischer, Konstantin Böttinger, Huang Xiao, Christian Stransky, Yasemin Acar, Mi- chael Backes, and Sascha Fahl. Stack overflow considered harmful? the impact of copy&paste on android application security. In 2017 IEEE Symposium on Security and Privacy, SP 2017, San Jose, CA, USA, May 22-26, 2017, pages 121-136, 2017.
- Simon Goldsmith, Robert O'Callahan, and Alexander Aiken. Relational queries over pro- gram traces. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object- Oriented Programming, Systems, Languages, and Applications, OOPSLA 2005, October 16-20, 2005, San Diego, CA, USA, pages 385-402, 2005.
- Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William Griswold. An overview of aspectj. ECOOP 2001-Object-Oriented Programming, pages 327-354, 2001.
- Stefan Krüger, Sarah Nadi, Michael Reif, Karim Ali, Mira Mezini, Eric Bodden, Florian Göpfert, Felix Günther, Christian Weinert, Daniel Demmler, and Ram Kamath. Cog- niCrypt: Supporting Developers in Using Cryptography. In Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering, ASE 2017, Urb- ana, IL, USA, October 30 -November 03, 2017, pages 931-936, 2017.
- Patrick Lam, Eric Bodden, Ondřej Lhoták, and Laurie Hendren. The Soot framework for Java program analysis: a retrospective. In Cetus Users and Compiler Infrastructure Workshop (CETUS 2011), oct 2011.
- David Lazar, Haogang Chen, Xi Wang, and Nickolai Zeldovich. Why does cryptographic software fail?: a case study and open problems. In ACM Asia-Pacific Workshop on Systems (APSys), pages 7:1-7:7, 2014.
- V. Benjamin Livshits and Monica S. Lam. Finding security vulnerabilities in java ap- plications with static analysis. In Proceedings of the 14th USENIX Security Symposium, Baltimore, MD, USA, July 31 -August 5, 2005, 2005.
- Michael C. Martin, V. Benjamin Livshits, and Monica S. Lam. Finding application errors and security flaws using PQL: a program query language. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2005, October 16-20, 2005, San Diego, CA, USA, pages 365-383, 2005.
- David A. McGrew and John Viega. The security and performance of the galois/counter mode (GCM) of operation. In Progress in Cryptology -INDOCRYPT 2004, 5th Interna- tional Conference on Cryptology in India, Chennai, India, December 20-22, 2004, Proceed- ings, pages 343-355, 2004.
- Clint Morgan, Kris De Volder, and Eric Wohlstadter. A static aspect language for check- ing design rules. In Proceedings of the 6th International Conference on Aspect-Oriented Software Development, AOSD 2007, Vancouver, British Columbia, Canada, March 12-16, 2007, pages 63-72, 2007. 10:27
- Sarah Nadi, Stefan Krüger, Mira Mezini, and Eric Bodden. Jumping through hoops: why do Java developers struggle with cryptography APIs? In International Conference on Software Engineering (ICSE), pages 935-946, 2016.
- Nomair A. Naeem and Ondrej Lhoták. Typestate-like analysis of multiple interacting objects. In Proceedings of the 23rd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2008, October 19-23, 2008, Nashville, TN, USA, pages 347-366, 2008.
- Siegfried Rasthofer, Steven Arzt, Marc Miltenberger, and Eric Bodden. Harvesting runtime values in android applications that feature anti-analysis techniques. In Network and Dis- tributed System Security Symposium (NDSS), 2016.
- Martin P. Robillard, Eric Bodden, David Kawrykow, Mira Mezini, and Tristan Ratchford. Automated api property inference techniques. IEEE TOSEM, 39(5):613-637, 2013. doi: 10.1109/TSE.2012.63. · DOI
- Martin P. Robillard, Eric Bodden, David Kawrykow, Mira Mezini, and Tristan Ratchford. Automated API property inference techniques. IEEE Transactions on Software Engineering (TSE), 39:613-637, 2013.
- Shuai Shao, Guowei Dong, Tao Guo, Tianchang Yang, and Chenjie Shi. Modelling ana- lysis and auto-detection of cryptographic misuse in Android applications. In nternational Conference on Dependable, Autonomic and Secure Computing, pages 75-80, 2014.
- Johannes Späth, Karim Ali, and Eric Bodden. Ide al : Efficient and precise alias-aware data- flow analysis. In 2017 International Conference on Object-Oriented Programming, Lan- guages and Applications (OOPSLA/SPLASH). ACM Press, 2017. To appear.
- Johannes Späth, Lisa Nguyen Quang Do, Karim Ali, and Eric Bodden. Boomerang: Demand-driven flow-and context-sensitive pointer analysis for java. In 30th European Conference on Object-Oriented Programming, ECOOP 2016, July 18-22, 2016, Rome, Italy, pages 22:1-22:26, 2016.
- Robert E. Strom and Shaula Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Software Eng., 12(1):157-171, 1986. doi: 10.1109/TSE.1986.6312929. · DOI
- Raja Vallée-Rai, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. Optimizing java bytecode using the soot framework: Is it feasible? In Compiler Construction, pages 18-34, 2000.
Cited by
Sorted by citations
Do Users Write More Insecure Code with AI Assistants?
Perry, N., Srivastava, M., Kumar, D., & Boneh, D. (2023) · Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security · doi:10.1145/3576915.3623157 · Cited by 259 · see citing works
- Authors
- Kruger, S., Spath, J., Ali, K., Bodden, E., & Mezini, M.
- Affiliations
- University of Alberta (CA)
- Paderborn University (DE)
- Technische Universität Darmstadt (DE)
- Venue
- IEEE Transactions on Software Engineering
- Published
- 2021-11-01
- Volume
- 47
- Issue
- 11
- Pages
- 2382-2400
- ISSN
- 0098-5589 (ISSN-L)
- 1939-3520
- 2326-3881
- OpenAlex
- W2973035781
- Cited by
- 112
- References
- 0
- Citations by year
- 2026: 12 · 2025: 10 · 2024: 17 · 2023: 10 · 2022: 18 · 2021: 11 · 2020: 17 · 2019: 15 · 2018: 2
- FWCI
- 7.04
- Type
- journal article
- Language
- en
- Open access
- green
- drops.dagstuhl.de
- Licence
- Locations
- IEEE Transactions on Software Engineering (publishedVersion)
- DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) (submittedVersion, cc-by)
- Publikationsdatenbank der Fraunhofer-Gesellschaft (Fraunhofer-Gesellschaft) (submittedVersion)
- Fraunhofer-Publica (Fraunhofer-Gesellschaft) (submittedVersion)
- TUbilio (Technical University of Darmstadt) (submittedVersion)
- Leibniz international proceedings in informatics (cc-by)
- Funders
- DFG
- RUNSECURE
- Natural Sciences and Engineering Research Council of Canada
- Heinz Nixdorf Stiftung
- Fraunhofer ATTRACT
- Oracle Collaborative Research
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Security and Verification in Computing
- Physical Sciences › Computer Science › Artificial Intelligence › Cryptographic Implementations and Security
- Physical Sciences › Computer Science › Signal Processing › Advanced Malware Detection Techniques
- Keywords
- cryptographic API misuse, specification languages, static analysis, Android application, Java programs, security rules, demand-driven analysis, Maven Central, software security
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review