Secure Text Communication for the Tiger XS
Total Page:16
File Type:pdf, Size:1020Kb
Institutionen för systemteknik Department of Electrical Engineering Examensarbete Secure Text Communication for the Tiger XS Examensarbete utfört i Informationsteori vid Tekniska högskolan i Linköping av David Hertz LITH-ISY-EX--06/3842--SE Linköping 2006 Department of Electrical Engineering Linköpings tekniska högskola Linköpings universitet Linköpings universitet SE-581 83 Linköping, Sweden 581 83 Linköping Secure Text Communication for the Tiger XS Examensarbete utfört i Informationsteori vid Tekniska högskolan i Linköping av David Hertz LITH-ISY-EX--06/3842--SE Handledare: Tina Lindgren isy, Linköpings universitet Robin von Post Sectra Communications Examinator: Viiveke Fåk isy, Linköpings universitet Linköping, 14 December, 2006 Avdelning, Institution Datum Division, Department Date Division of Information Theory Department of Electrical Engineering 2006-12-14 Linköpings universitet S-581 83 Linköping, Sweden Språk Rapporttyp ISBN Language Report category — Svenska/Swedish Licentiatavhandling ISRN Engelska/English Examensarbete LITH-ISY-EX--06/3842--SE C-uppsats Serietitel och serienummer ISSN D-uppsats Title of series, numbering — Övrig rapport URL för elektronisk version http://www.it.isy.liu.se http://www.ep.liu.se/2006/3842 Titel Säkra Textmeddelanden för Tiger XS Title Secure Text Communication for the Tiger XS Författare David Hertz Author Sammanfattning Abstract The option of communicating via SMS messages can be considered available in all GSM networks. It therefore constitutes a almost universally available method for mobile communication. The Tiger XS, a device for secure communication manufactured by Sectra, is equipped with an encrypted text message transmission system. As the text message service of this device is becoming increasingly popular and as options to connect the Tiger XS to computers or to a keyboard are being researched, the text message service is in need of upgrade. This thesis proposes amendments to the existing protocol structure. It thor- oughly examines a number of options for source coding of small text messages and makes recommendations as to implementation of such features. It also suggests security enhancements and introduces a novel form of stegangraphy. Nyckelord Keywords source coding, text compression, cryptography, steganography, PPM Abstract The option of communicating via SMS messages can be considered available in all GSM networks. It therefore constitutes a almost universally available method for mobile communication. The Tiger XS, a device for secure communication manufactured by Sectra, is equipped with an encrypted text message transmission system. As the text message service of this device is becoming increasingly popular and as options to connect the Tiger XS to computers or to a keyboard are being researched, the text message service is in need of upgrade. This thesis proposes amendments to the existing protocol structure. It thor- oughly examines a number of options for source coding of small text messages and makes recommendations as to implementation of such features. It also suggests security enhancements and introduces a novel form of stegangraphy. v Acknowledgements Several people have provided valuable aid in the process of working with this thesis. I would like to thank the following people in particular: Robin von Post for his valuable feedback and ideas as well as proofreading assistance. My examiner, Viiveke Fåk, for giving feedback and on the work and report of this thesis. Andreas Tyrberg for aiding me with LATEX typesetting issues. Cem Göcgören, Stig Nilsson and Tina Brandt at Regeringskansliet, Rikspolis- styrelsen and MUST, respectively, for their input on the functionality of the Tiger XS. Christina Freyhult for providing valuable feedback. My family for proofreading assistance. vii Contents 1 Introduction 1 1.1 Background . 1 1.2 Purpose . 1 1.3 Methodology . 1 1.4 Disposition . 2 2 The Tiger XS 3 2.1 Tiger XS . 3 2.2 Communication Security . 3 2.2.1 The Need for Communication Security . 3 2.2.2 Security Required . 5 2.2.3 Security Offered by GSM . 5 2.2.4 Security Offered by Tiger XS . 5 3 Protocol 7 3.1 Underlying Protocols . 7 3.1.1 Encrypted Short Message Protocol . 7 3.1.2 Carrier Protocols . 8 3.2 Protocol Structure . 9 3.2.1 Protocol Coding . 10 3.2.2 Message Control Protocol (MCP) . 11 3.2.3 Object Control Protocol (OCP) . 11 3.2.4 Object Specific Protocols . 11 4 Source coding 15 4.1 Purpose of This Chapter . 15 4.1.1 Purpose . 15 4.1.2 Prerequisites . 16 4.1.3 Limitations . 16 4.2 Definitions . 16 4.3 Source Coding Evaluation Environment . 17 4.4 Source Coding Basics . 17 4.4.1 Entropy and Source Coding . 17 4.4.2 Generalized Source Coding . 18 4.4.3 Statistics . 18 ix x Contents 4.4.4 Predictors . 19 4.4.5 Coding . 19 4.5 Source Coding Using the Tiger XS . 21 4.6 Source Coding of Text . 22 4.6.1 The Entropy of Text . 22 4.6.2 Static and Adaptive Approaches . 23 4.6.3 Early Design Decisions . 24 4.6.4 Dictionary Techniques . 25 4.6.5 Predictive Techniques . 37 4.6.6 Preprocessing Text . 53 4.6.7 Lossy Text Coding . 55 4.6.8 Variable Algorithm Coding . 55 4.6.9 GSM Text Compression . 56 4.6.10 Other Algorithms . 58 4.7 Source Coding of Transmission Protocols . 60 4.7.1 Coding of Numeric Fields . 61 5 Security 65 5.1 Purpose of This Chapter . 65 5.1.1 Purpose . 65 5.1.2 Prerequisites . 65 5.1.3 Limitations . 66 5.2 Definitions . 66 5.3 Security Basics . 66 5.3.1 Possible Attacks . 67 5.3.2 Cryptography Objectives . 68 5.3.3 Symmetric and Asymmetric Ciphers . 68 5.3.4 Block Ciphers and Stream Ciphers . 69 5.3.5 Initialization Vectors . 70 5.3.6 Cryptographic Hash Algorithms and MACs . 70 5.3.7 Challenge-Response Schemes . 71 5.4 GSM Security . 72 5.4.1 GSM Security in Brief . 72 5.4.2 Vulnerabilities . 73 5.5 Encrypted short MeSsaGe (EMSG) . 74 5.6 Extending EMSG . 74 5.6.1 Centrally Assigned Session Keys . 75 5.6.2 Peer-to-Peer (P2P) Session Establishment . 81 5.6.3 Pre-setup Session Keys . 85 5.7 Source Coding and Cryptography . 87 5.8 Steganography Using PPM . 87 5.8.1 The Protocol . 88 5.8.2 Adapting PPM for Steganography . 90 5.8.3 Detecting PPM Steganography . 91 5.8.4 Cryptographic Aspects . 95 5.8.5 Practical Test . 95 6 Conclusions, Recommendations and Further Studies 97 6.1 Conclusions . 97 6.1.1 Communication Protocols . 97 6.1.2 Source Coding . 97 6.1.3 Security . 99 6.2 Recommendations . 100 6.2.1 Communication Protocols . 100 6.2.2 Source Coding . 100 6.2.3 Security . 101 6.3 Further Studies . 101 Bibliography 103 A Language Reference Files 105 A.1 DN-4 . 105 A.2 CaP . 105 A.3 RodaRummet . 105 A.4 Bibeln . 106 A.5 Nils . 106 A.6 Macbeth . 106 B Performance Reference Files 107 B.1 Jordbävning . 107 B.2 Nelson . 107 B.3 Diplomatic-1 . 107 B.4 Jalalabad . 108 B.5 Blair . 108 C Source Coding Graphs 109 C.1 Dictionary Techniques . 109 D Steganographic Texts 112 D.1 DN-1 . 112 D.2 CaP-1 . 113 E Source Coding Evaluation Environment 115 E.1 Screen Shots . 115 F Acronyms 118 xii Contents Chapter 1 Introduction This document was written as the report of a Master of Science thesis in Applied Physics and Electrical Engineering at the Department of Electrical Engineering at Linköping Institute of Technology. The task was performed at Sectra Communi- cations AB. 1.1 Background The Tiger XS is a battery-powered, handheld device offering encrypted voice and data services. The Tiger XS as well as other Sectra products provide means for transmitting and receiving encrypted text messages via the GSM Short Message Service (SMS). Encrypted voice and data services made available using the Tiger XS are car- ried using a GSM Circuit Switched Data (CSD) channel. The availability of CSD channels is limited as not all GSM-operators provide such services. In some coun- tries CSD-channels are not available at all. SMS is, however, almost universally available and requires less configuration hassle for roaming end-users. It is of great interest for Sectra to extend the current message channel into a more advanced and efficient channel capable of carrying several types of content. 1.2 Purpose The purpose of this thesis is to describe possible solutions to extend the current message channel into a more advanced channel capable of carrying several types of content in an efficient and secure way. 1.3 Methodology Initially a survey concerning which additions in terms of functionality were desired in this new protocol was performed. Discussions were held with customers of Sectra 1 2 Introduction Communications regarding their view of the current system and their priorities in terms if enhancements. The following tasks were carried out: • Design of a.