Ment Protocols and Their Im- Plementations
Total Page:16
File Type:pdf, Size:1020Kb
Linköping University | Department of Computer and Information Science Bachelor thesis, 16 ECTS | Computer Science 2018 | LIU-IDA/LITH-EX-G--18/047--SE Evaluation of Key Manage- ment Protocols and Their Im- plementations Utvärdering av Key Management Protokoll och dess implemen- tationer Erik Andersson David Combler Supervisor : Andrei Gurtov Examiner : Marcus Bendtsen Linköpings universitet SE–581 83 Linköping +46 13 28 10 00 , www.liu.se Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under 25 år från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns lösningar av teknisk och admin- istrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sam- manhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/. Copyright The publishers will keep this document online on the Internet – or its possible replacement – for a period of 25 years starting from the date of publication barring exceptional circum- stances. The online availability of the document implies permanent permission for anyone to read, to download, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the con- sent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping Uni- versity Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its www home page: http://www.ep.liu.se/. c Erik Andersson David Combler Students in the 5 year Information Technology program complete a semester-long software development project during their sixth semester (third year). The project is completed in mid- sized groups, and the students implement a mobile application intended to be used in a multi- actor setting, currently a search and rescue scenario. In parallel they study several topics relevant to the technical and ethical considerations in the project. The project culminates by demonstrating a working product and a written report documenting the results of the practical development process including requirements elicitation. During the final stage of the semester, students create small groups and specialise in one topic, resulting in a bachelor thesis. The current report represents the results obtained during this specialisation work. Hence, the thesis should be viewed as part of a larger body of work required to pass the semester, including the conditions and requirements for a bachelor thesis. Abstract When constructing a network system it is important to consider the attributes which define said system and how to best build around those attributes. In this report we’ve studied Key Management Protocols as well as 802.15.4 WPAN networks and how key managment is conducted in such networks. This was done to better understand how Key Management Protocols themselves work and if, or how, they differ when used in 802.15.4 networks. In this report we studied 4 different Key Management Protocols: IKEv2, HIPv2, PANA and 802.1X as well as their various implementations. Based on the information gathered we analyzed how an implementation would work according to IEEE 802.15.9. Firstly we found was that IKEv2 offers a lot of functionality at the cost of system com- plexity and required a lot of memory. It also required major modifications to work in 802.15.4 networks. Secondly we found that HIPv2 offers the ability to separate the locator and identifier tags of TCP/IP and is lightweight. It doesn’t use IP or TCP/UDP and as such required minor changes to work in 802.15.4 networks. Finally, PANA and 802.1X both offer client-to-network authentication using EAP and use a moderate to high amount of space. 802.1X required a moderate amount of changes to work in 802.15.4 networks. PANA on the other hand required few changes, though it should not be used as a general purpose Key Management Protocol in 802.15.4 networks. Acknowledgments Thank you to Andrei Gurtov for supervising and supporting this project. v Contents Abstract iv Acknowledgments v Contents vi List of Figures vii List of Tables viii 1 Introduction 1 1.1 Motivation . 1 1.2 Aim............................................ 1 1.3 Definitions and abbreviations . 2 1.4 Research questions . 2 1.5 Delimitations . 3 2 Theory, Related Work 4 2.1 Related works . 4 3 Method 5 3.1 Evaluating Key Management Protocols . 5 3.2 Evaluating KMP implementations . 6 3.3 Method for KMP comparison . 6 4 Results 7 4.1 802.15.9 . 7 4.2 Internet Key Exchange Protocol Version 2 . 9 4.3 Host Identity Protocol Version 2 . 12 4.4 PANA . 15 4.5 802.1X . 19 5 Discussion 23 5.1 Results . 23 5.2 Method . 26 5.3 The work in a wider context . 26 6 Conclusion 27 6.1 Future work . 28 Bibliography 29 vi List of Figures 4.1 Example OSI model with MPX fragmentation/reassembly and MAC-link commu- nication. As can be seen, the MPX fragmentation is part of the Network Layer. 8 4.2 A typical request/response pair IKEv2 handshake. 9 4.3 A typical HIPv2 handshake. 13 4.4 A typical PANA authentication and authorization phase. 16 4.5 IEEE 802.1X/EAP and IEEE 802.1X/MKA used together as a PAN KMP. Firstly EAP is used to autheticate the device and then MKA is used to create a key. 20 4.6 IEEE 802.1X/EAP, IEEE 802.11/4WH and IEEE 802.11/GKH used together as a PAN KMP. Similarly to Figure 4.5, EAP is used for authentication and then a key can be created with either 4WH or GKH. 21 vii List of Tables 1.1 The protocols and implementations covered in this report. 3 4.1 The IKE Header . 10 4.2 The fixed HIPv2 Header. 13 4.3 The PANA Header. 16 4.4 The AVP Header. 17 4.5 The KMPs used in 802.1X and their Protocol Data Unit formats. 19 5.1 Comparison of the various protocol attributes. Note the 4 byte generic header for IKEv2. 24 5.2 Comparison of the implementation lines of code and file size . 24 viii 1 Introduction 1.1 Motivation Key management is critical to the security of a cryptographic system. However in today’s world there are a myriad of different Key Management Protocols (KMPs) to choose from and they all differ somewhat in terms of generating, exchanging, storing, using and replacing keys. For instance, some KMPs might take up more memory than others while instead of- fering some type of functionality that the others don’t. So how do you know which one best suits your system? In this report we hope to answer this question by studying the inner workings of Key Management Protocols, their open source implementations as well as the 802.15.9 standard which defines the use of KMPs in 802.15.4 networks. We’ll also look at what changes may apply when operating these protocols in 802.15.4 networks. We’ll be looking at attributes such as the number of messages in a typical exchange, the size of the overhead, what functionality they offer and more. We will also look at the specifics of the KMP implementations, for example how many lines of code each implementation consists of and when they were last updated. Finally the findings gained from each Key Management Protocol will be compared to find how the implementations of these protocols differ. We will also try to find the underlying factors behind the difference in performance. With this research we hope to provide a basis for others when selecting which Key Man- agement Protocol to use in their 802.15.4 system. However it should be noted that due to the time constraints of this research we will only have sufficient time to investigate a few different KMPs. As such there might be other Key Management Protocols that we have not covered which better suit a specific need. 1.2 Aim In this report we want to give an estimation of which KMP is, in our view, best suited for a system based on certain parameters. We will do this by using the data collected in our research on 802.15.9, KMPs and their implementations and then comparing them. 1 1.3. Definitions and abbreviations 1.3 Definitions and abbreviations Due to the technical nature of this report, there are several loosely defined words as well as several acronyms used. Therefore they will first be explained here. Key Management Protocol (KMP): According to the IEEE the Key Management Protocol is deifined as the following: "A collection of data transactions that provide the mechanism to manage cryptographic keys.