Classification of Cryptographic Libraries
Total Page:16
File Type:pdf, Size:1020Kb
Institute of Software Technology University of Stuttgart Universitätsstraße 38 D–70569 Stuttgart Fachstudie Classification of cryptographic libraries Andreas Poppele, Rebecca Eichler, Roland Jäger Course of Study: Softwaretechnik Examiner: Prof. Dr. rer. nat. Stefan Wagner Supervisor: Kai Mindermann, M.Sc. Commenced: 2017/03/07 Completed: 2017/09/07 CR-Classification: A.1, A.2 Declaration 2/186 Zusammenfassung Bei der Umsetzung von Sicherheitskonzepten stehen Softwareentwickler vor der Heraus- forderung eine passende kryptografische Bibliothek zu finden. Es gibt eine Vielzahl von kryptographischen Bibliotheken für verschiedene Programmiersprachen, ohne dass es eine standardisierte Auffassung von verschiedenen Eigenschaften dieser kryptographischen Bibliotheken gibt. Dieser Bericht liefert eine Klassifizierung von über 700 kryptograph- ischen Bibliotheken. Die Bibliotheken wurden in Bezug auf Aktualität und Beliebtheit ausgewählt. Um einen standardisierten Überblick zu liefern, wurden die wichtigsten Merkmale dieser Bibliotheken gesammelt und definiert. Die Datenerhebung zu diesen Merkmalen wurde sowohl manuell als auch automatisiert durchgeführt. Die Klassifizier- ung enthält Informationen, die erfahrenen und unerfahrenen Entwicklern im kryptografis- chen Bereich helfen, eine Bibliothek zu finden, die ihren Fähigkeiten und Anforderungen entspricht. Darüber hinaus kann sie als Grundlage für Studien über jede Form der Verbesserung dieser Bibliotheken und vieles mehr verwendet werden. Abstract Software developers today are faced with choosing cryptographic libraries in order to implement security concepts. There is a large variety of cryptographic libraries for diverse programming languages, without there being a standardized conception of different properties of these cryptographic libraries. This report provides a classification of over 700 cryptographic libraries. The libraries were chosen pertaining to currentness and popularity. In order to provide a standardized overview the most important traits and characteristics of these libraries were gathered and defined. Data collection on these characteristics was performed in a manual as well as automated fashion. The classification contains information that will help experienced and inexperienced developers in the cryptographic field to choose a library that fits their abilities. Furthermore, it may be used as a basis for studies concerning any form of improvement of these libraries and many more. 3/186 Contents Contents 1. Introduction6 1.1. Context.....................................6 1.2. Purpose.....................................6 1.3. Overview....................................6 2. Literature Review7 3. Method9 3.1. Research Design................................9 3.2. Languages Selection..............................9 3.3. Search Methodology.............................. 13 3.3.1. Code hosting sites........................... 14 3.3.2. Criteria for exclusion.......................... 15 3.3.3. Search constraints........................... 16 3.4. Data Collection................................. 21 3.4.1. Manual data Collection........................ 21 3.4.2. Automated Data Collection...................... 23 4. Classification 26 4.1. Library Types.................................. 26 4.2. Interface-Level................................. 27 4.3. Dependencies.................................. 28 4.4. Related Libraries................................ 28 4.5. Licenses..................................... 29 4.6. Cryptographic Features............................ 29 4.7. Authors and Contributors........................... 31 4.8. Project size................................... 32 4.9. Impact...................................... 32 4.10. Standard Library................................ 36 4.11. Documentation................................. 37 4.12. Ease of Use................................... 37 5. Results 37 5.1. C Libraries................................... 38 5.2. C++ Libraries................................. 42 5.3. JavaScript Libraries.............................. 45 5.4. Ruby Libraries................................. 49 5.5. Rust Libraries.................................. 51 5.6. C# Libraries.................................. 54 5.7. Swift Libraries................................. 56 5.8. Java Libraries.................................. 58 5.9. Objective-C Libraries.............................. 61 5.10. Go Libraries................................... 63 5.11. PHP Libraries.................................. 66 5.12. Python Libraries................................ 68 4/186 Contents 6. Conclusion 70 6.1. Future work................................... 70 6.2. Remarks..................................... 71 7. Acknowledgements 71 References 72 Appendices 74 Appendix A. Detailed Library Table 74 5/186 1. Introduction 1. Introduction 1.1. Context Today’s software developers heavily rely on existent cryptographic libraries to provide features needed to implement security concepts. There is a large variety of cryptographic libraries for diverse programming languages. The libraries differ in terms of size, the range and type of features, the amount of authors and developers still maintaining it. There are libraries which are maintained by companies and some which are developed by individuals as a leisure activity. Some aren’t maintained any more and are deprecated, others still offer great potential. A lot of libraries merely re-implement or use another, offering a different interface through which the functionality can be accessed. Developers are faced with choosing a library which fits their needs in terms of offered functionality and application programmable interface, accessible with their level of ex- perience and knowledge in the cryptographic field. This can be very daunting as there is no standardized conception of different properties of cryptographic libraries. There is no general overview which contrasts these libraries with which developers can choose libraries with properties that fit their needs. 1.2. Purpose This report aims to provide a classification of a large number of cryptographic libraries. A number of selected libraries are examined in respect to defined criteria. The libraries are then systematically grouped according to the result of the examination [8]. This report does not introduce or use a taxonomy as the defined criteria and groupings aren’t ordered in an hierarchical context [13]. To begin with, it is necessary to establish, which library features are relevant, for the purpose of contrasting cryptographic libraries. Additionally, we aim to ascertain, which libraries are relevant in the cryptographic field, pertaining to currentness and popularity and which ones out of the compiled collection have the highest impact. Furthermore, we wish to identify which of the previously selected libraries offer high potential for experienced developers in the cryptographic field and which ones are interesting for inexperienced developers. 1.3. Overview The first section following the introduction is on the conducted literature review, the background and related work. The section 3, Method, contains the Research design, the approach on selecting programming languages and their corresponding cryptographic libraries. Furthermore, it has a section on how the data on the libraries was collected. The investigated properties of the libraries are explicated in section 4, Classification. The data on the collected libraries is contrasted in section 5, Results, and briefly summarised and evaluated in section 6, Conclusion. 6/186 2. Literature Review 2. Literature Review In the field of classification of software related entities several approaches have been developed. Medvidovic and Taylor came up with an approach for classifying architecture descrip- tion languages [10]. The aim of this work was to provide a definition of architecture description languages to make them distinguishable from other types of specifications. In order to classify the architecture description languages, different characteristics were defined. Those include e.g. architecture modeling features like components, connectors or architectural configurations and tool support like multiple views or code generation. Shaw and Clements also concentrated on architecture in their paper [16]. They developed a framework for the classification of architectural styles that should support initial design decisions in software development. Their framework mainly distinguishes between the components and connectors that are used in the different architectural styles and the control issues between those components. As a result, their classification scheme arranges the libraries in a two-dimensional grid. In this report, the use of a two-dimensional grid for the classification would not be feasible, as the cryptographic libraries have more than two main characteristics. Also, the number of libraries is too high to arrange them in a grid. Another classification scheme that concentrates on software security patterns was de- veloped by Alvi and Zulkernine [2]. Their classification makes use of the different phases of the software engineering process. Software security patterns are classified according to their relation to the requirement, design or implementation phase. On the level of individual software security patterns they also developed a template that defines the characteristics of each pattern that have to be collected. Besides their name, these also include, for example, the pattern’s context, its problem as well as its solution and the consequences