Java智能卡Applet应用开发

 2021-11-25 02:11

论文总字数:36615字

摘 要

随着智能卡技术的发展,智能卡在人们的日常生活中得到了广泛的运用,为人们带来了许多便捷。与此同时,智能卡在使用过程中也暴露出很多问题,比如不同硬件平台的智能卡之间应用的不可移植性,智能卡应用开发周期过长,升级应用需要重新发卡等问题,而Java card的提出,正好解决了以上问题,成为当今社会的主流智能卡,因此,研究Java card Applet的开发显得尤其重要。Java card之所以能避开传统智能卡的弊端,是引入了Java card虚拟机的概念,它将智能卡的底层硬件和上层应用相分离开来,底层为上层应用提供的统一访问接口以供其使用。本文主要研究Java card上层应用的开发,选择的开发对象是在Java card框架上搭建的Java SIM卡,在PC机上配置了一个应用开发环境,并在该环境上开发了Java SIM卡上的三种类型的应用。本文的具体工作内容如下:

1、研究Java card开发所需的基本知识,包含两种智能卡传输协议、APDU结构、智能卡文件系统、API应用编程接口,GlobalPlatform应用下载管理规范、Java card 应用开发的整个流程。

2、研究了一种应用非常广泛的Java card,即Java SIM卡的应用开发,同时给出了相应的应用开发方法。考虑到在Java SIM卡上面可以开发3种应用:通用Applet(普通的Java card Applet)、GSM Applet(可以访问GSM文件系统的Applet)、Toolkit Applet(STK菜单工具应用),这3种应用基本涵盖Java智能卡上的应用类型,具有一定的代表性;另外,一般人没有操作SIM卡的权限,SIM卡的应用具有很好的安全性。

3、研究Java SIM卡的Toolkit Applet涉及的协议规范:3GPP TS 43.019、GSM11.14、GSM 11.11、GSM11.14。

4、配置Java 智能卡应用开发环境,综合考虑很多方法之后,选择了两种方法:EclipseJCDE、EclipseJCOP。由于这两种方法都用到了Eclipse的插件,可以把这两种开发环境都集成到Eclipse上,且相互间工作独立。另外,分别研究了这两种环境下,Java智能卡应用工程的创建、仿真平台上测试、实体卡上测试的方法。

5、在Java智能卡应用开发环境上,使用上面提到的Java智能卡应用开发方法,研究了JAVA SIM卡上的电子钱包、打电话、访问GSM文件系统中的AND(快速拨号)三种应用,实现了前两种,可在PC端或手机端测试相关功能。

关键词:Java SIM卡、Toolkit Applet、3GPP TS 43.019、GSM11.14

ABSTRACT

With the development of smart card technology, smart cards have been widely used in people's daily life. At the same time, many problems hava been exposed during the use of smart cards, such as a smart card application between different hardware platforms is not portable, smart card application development cycle is too long, card issuers need to issue new card in order to update the application. Java card can avoid the above problems, and it has been mainstream smart card in today's society. In this case, studying the methods to develop Java card applet is important. It is the Java card virtual machine that makes Java card be able to avoid the drawbacks of conventional smart card. In java card, the underlying hardware and the upper smart card applets are separated. On-card applets access to the underlying hardware by using API. This paper studies the development of Java card upper applet, the target java card is Java SIM card, which is based on the Java card frame with GSM specifications. The PC is equipped with an applet development environment, and three types of Java SIM card applet is developed in that environment. The specific content of the work are as follows:

1. Studied basic knowledge of Java card, which contains two smart card transmission protocols, APDU structure, file system, API (application programming interface), GlobalPlatform Application management standards, and the entire process of Java card applet development.

2. Studied the development of applet on Java SIM card, which is a widely used nowadays. On Java SIM card, we can develop three kinds of applications: General Applet (general Java card Applet), GSM Applet (can access the GSM file system), Toolkit Applet (SIM Toolkit applet), these three applications almost cover all types of applets on Java smart card, it is representative; In addition, most people have no permission to operate SIM card, that to say, SIM card guarantes the safty of applet.

3. Studied protocols relating to Java SIM card’s Toolkit applet: 3GPP TS 43.019, GSM 11.14, GSM 11.11, GSM 11.14.

4. Configured Java smart card applet development environment. After considering a number of methods, two methods: EclipseJCDE, EclipseJCOP are introduced into this article since these two methods are plugin of Eclipse, and can work independently in different occasions. In addition, this article studies how to build java applet program, how to test applet on the simulation platform or on the physical card in those two development environments.

5. Based on the Java applet development environment, and development methods mentioned above, this article studies three types of Java SIM card applets, which are e-Wallet, setting up call, reading GSM file system’s AND , and implements the first two types of JAVA SIM card which can be tested in the PC terminal or mobile terminal.

Keywords: Java SIM card, Toolkit Applet, 3GPP TS 43.019, GSM11.14

目录

摘要 I

ABSTRACT III

目录 V

第一章 绪论 1

1.1 研究背景 1

1.2 研究现状 2

1.3 研究目的及内容 2

1.4 论文结构 3

第二章 智能卡开发基础 4

2.1智能卡种类 4

2.2智能卡协议 5

2.2.1 ISO 7816-3传输协议 5

2.2.2 ISO 14443-4传输协议 5

2.2.3 应用协议数据单元APDU 6

2.3 智能卡操作系统 7

2.3.1 基本功能 7

2.3.2 文件系统管理 7

2.3.3 Global Platform应用管理规范 11

2.3.4 Java card Platform 14

2.4 Java智能卡基础 14

2.4.1 Java Card技术框架 14

2.4.2 Java Card API类库 15

2.4.3 Java智能卡应用开发流程 16

第三章 Java SIM 卡上的应用开发设计 18

3.1 Java SIM Applet类型和Applet程序框架 18

3.1.1 Java SIM卡的应用类型 18

3.1.2 通用Applet程序框架 18

3.2通用Applet的开发 19

3.2.1明确需要实现的功能 19

3.2.2为package、Applet分配AID 19

3.2.3设计applet的类方法 20

3.2.4设计终端与卡通信的APDU指令内容 21

3.3 GSM Applet的开发 23

3.4 Toolkit Applet的开发 24

3.5 Java SIM Applet开发小结 26

第四章 Java SIM 卡上应用的实现 27

4.1 Java SIM卡三种应用的实现 27

4.1.1 通用Applet—电子钱包的实现 27

4.1.2 GSM Applet—访问ADN的实现 30

4.1.3 Toolkit Applet—拨打电话的实现 32

4.2应用开发环境配置 33

4.2.1环境配置所需软件 34

4.2.2环境配置流程 34

4.3应用工程创建与测试 35

4.3.1 EclipseJCDE环境 35

4.3.2 EclipseJCOP 环境 39

4.4 Java SIM 卡应用的测试结果 48

4.4.1 通用Applet—电子钱包 48

4.4.2 Toolkit Applet—拨打电话、显示文本框 50

第五章 总结与展望 51

参考文献 52

致谢 53

第一章 绪论

1.1 研究背景

上世纪70年代,智能卡的概念被法国布尔公司提出。经过几十年的发展,智能卡的功能越来越丰富,在金融、通信、社保等方面为人类提供便捷,一张小小的智能卡,几乎可以解决人们出行的所有问题。

智能卡的核心是嵌入式计算芯片,分为存储型和微处理型智能卡[1]。微处理型智能卡有卡上操作系统(COS),可以运行小型应用程序,从而实现具体的功能,比如在支付领域的电子钱包应用。目前,市面上使用最为广泛的两种微处理型智能卡是native卡和Java卡。Native卡较Java卡而言,存在很多缺陷。

Native卡没有统一的国际规范,不同的native生产厂商有各自独立的COS,不同厂商COS的操作指令不相同,就会出现这样的问题,在A厂商的native卡上开发的应用,不能直接移植到B厂商的native卡上去,需要修改相应的操作系统指令;另外,如果想要在native卡上添加或者删除应用,需要将发行出去的卡召回,对其整个操作卡片操作系统修改,同时新的应用可能会对卡上其他应用的正常工作造成影响,在操作系统修改完成之后,还需要对整张智能卡进行测试。

Java卡的出现解决了这一问题,Java卡引入了Java 卡虚拟机的概念,将应用和底层硬件平台分离开来,提供统一的API供应用使用,解决了native卡不同硬件平台之间应用不可移植的问题;应用的新增和删除不会对卡上操作系统和其他应用造成影响,所以在Java卡上开发应用是很方便的。

Java卡在欧美覆盖率达95%,而在中国和印度,由于人口基数大,为控制成本,native卡占主导地位[2]。然而,考虑到Java智能卡的许多优点,如应用开发与卡片底层无关,国际统一的协议标准,防火墙机制等,减少了智能卡应用开发壁垒,缩短了开发周期,增强了应用的安全性,所以Java智能卡的推广将势不可挡[3]。国内对Java卡的研究集中在通信领域,中国的三大运营商都在使用基于Java的(U)SIM卡,纷纷推出基于SIM卡的增值应用。运营商在获取手机用户同意的情况下,可以很方便地通过OTA的方式,为用户提供丰富多彩的增值服务。

剩余内容已隐藏,请支付后下载全文,论文总字数:36615字

相关图片展示:

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;