SIM Cards for Cellular Networks an Introduction to SIM Card Application Development
Total Page:16
File Type:pdf, Size:1020Kb
Mid Sweden University The Department of Information Technology and Media (ITM) Author: Peter Edsbäcker E-mail address: [email protected] Study program: B. Sc. in engineering, computer engineering, 180 ECTS Examiner: Åke Malmberg, Mid Sweden University, [email protected] Tutor: Örjan Sterner, Mid Sweden University, [email protected] Scope: 31699 words inclusive of appendices Date: 2010-06-12 B. Sc. Thesis within Computer Engineering C, 15 ECTS SIM cards for cellular networks An introduction to SIM card application development. Peter Edsbäcker SIM cards for cellular networks An introduction to SIM card application development Abstract Peter Edsbäcker 2011-06-12 Abstract A SIM, Subscriber Identity Module, is the removable circuit board found in a modern cellular phone. It carries the network identity information and is a type of smart card which can also be found on payment cards (EMV), ID cards and so on. A smart card is basically a small computer, providing a safe and controlled execution environment. Historically smart card software was very hardware dependent and mostly developed by the manufacturers themselves. With the introduction of the open Java Card standard created by Sun Microsystems (Oracle) this was meant to change. However, information still remains scattered and is hard to obtain. This paper is meant to serve both as an introduction to the field and also as a good foundation for future studies. It begins with a theoretical discussion about smart card hardware and software architectures, network standards in the context of SIM cards, typical applications, coming trends and technologies and ends off with an overview of the Java Card standard. The following section discusses the supplied example SIM card application coupled with an introduction how to use the Gemalto Developer Suite for application development and testing. The paper ends with an extensive appendix section going in depth about some of the more important subjects. Keywords: SIM, Smart card, GSM, 3G, LTE, SIM Toolkit, Java Card, Global Platform, TPDU, APDU, Gemalto Developer Suite. SIM cards for cellular networks An introduction to SIM card application development Acknowledgements Peter Edsbäcker 2011-06-12 Acknowledgements This bachelor‟s thesis was conducted during autumn 2010 and spring 2011. I would like to thank my teachers Örjan Sterner (for his dedication reading my many intermediate versions of this thesis) and Börje Hansson (for his inspiration). Both are based at Mid Sweden University. Also I would like to thank my old colleagues at Seamless Distribution AB [43]; it was through my work there that I came into contact with the field of SIM application programming, an interesting and to most developers, quite unknown, field of software engineering. A big thank you goes to Google; whose excellent search engine helped me during the countless hours spent navigating the vast sea of Internet knowledge which serves as the basis of this thesis. Physical book references have mostly been avoided, the modern developer works and lives on the Internet in one way or another and books becomes obsolete very quickly. Another thank you goes to Gemalto N. V [2] for providing the (for evaluation purposes) free Gemalto Developer Suite that was used during development and testing of the example application provided with this thesis. SIM cards for cellular networks An introduction to SIM card application development Contents Peter Edsbäcker 2011-06-12 Contents 1 Introduction ............................................................................................................. 1 1.1. Background and motivation ..................................................................................... 1 1.2. Overall aim ............................................................................................................... 2 1.3. Scope ........................................................................................................................ 2 1.4. Disposition ............................................................................................................... 2 1.5. Audience .................................................................................................................. 3 1.6. Method ..................................................................................................................... 3 2 Smart cards .............................................................................................................. 4 2.1. The smart card hardware platform ........................................................................... 5 2.1.1. The smart card hardware interface ................................................................... 7 2.2. The smart card software platform ............................................................................ 7 2.2.1. Open platform / GlobalPlatform ....................................................................... 8 2.3. Java Card platform components ............................................................................... 9 2.3.1. Low level operating system ............................................................................ 10 2.3.2. Java Card virtual machine (JCVM) ................................................................ 10 2.3.3. Java Card API (framework classes) ............................................................... 11 2.3.4. GlobalPlatform API ........................................................................................ 11 2.3.5. Java Card Runtime Environment (JCRE) ...................................................... 11 2.3.6. Application layer (Applets) ............................................................................ 12 2.3.7. Smart card manufacturing, issuing and deployment ...................................... 12 2.4. Over the Air distribution of applications ............................................................... 13 2.5. Typical commercial applications ........................................................................... 13 2.5.1. Financial services ........................................................................................... 13 2.5.2. Electronic signatures ...................................................................................... 14 2.5.3. Roaming control ............................................................................................. 15 2.5.4. Value added services on a SIM ...................................................................... 15 2.6. New technologies ................................................................................................... 15 2.6.1. USAT (Extended S@T) ................................................................................. 15 2.6.2. Near field communications (NFC) and RFID ................................................ 15 2.6.3. Virtual Sim card ............................................................................................. 16 2.6.4. USB and USB-2 support ................................................................................ 16 SIM cards for cellular networks An introduction to SIM card application development Contents Peter Edsbäcker 2011-06-12 2.6.5. Java Card 3 and GlobalPlatform 3 base technologies .................................... 16 2.6.6. Secure VoIP, Mobile broadcast TV ............................................................... 17 3 SIM Cards and cellular networks .......................................................................... 18 3.1. The historical evolution of the cellular phone standards........................................ 18 3.1.1. GSM ............................................................................................................... 18 3.1.2. CDMAone/CDMA2000 ................................................................................. 19 3.1.3. UMTS and LTE .............................................................................................. 19 3.2. SIM card configurations......................................................................................... 21 3.2.1. SIM network applications .............................................................................. 21 3.2.2. SIM card hardware types ................................................................................ 21 3.2.3. SIM card generations...................................................................................... 22 3.3. GSM network parameters ...................................................................................... 22 3.3.1. Authentication of a cellular phone with the GSM network ............................ 23 3.4. Communication between SIM and Handset ........................................................... 24 3.4.1. Applet-Handset interaction............................................................................. 25 4 Developing SIM applications ................................................................................ 26 4.1. Obtaining SIM cards for development purposes .................................................... 26 4.2. Development environments ................................................................................... 26 4.3. Java Card v2.x Applet basics ................................................................................ 26 4.3.1. Java Card 1.x/2.x limitations (with respect to standard Java) ........................ 28 4.3.2. Java Card 3.x “connected” edition limitations and differences ..................... 28 4.4. Applet intra-vendor compatibility