[go: up one dir, main page]

CN1183449C - 用微控制器使用高级程序设计语言 - Google Patents

用微控制器使用高级程序设计语言 Download PDF

Info

Publication number
CN1183449C
CN1183449C CNB971810370A CN97181037A CN1183449C CN 1183449 C CN1183449 C CN 1183449C CN B971810370 A CNB971810370 A CN B971810370A CN 97181037 A CN97181037 A CN 97181037A CN 1183449 C CN1183449 C CN 1183449C
Authority
CN
China
Prior art keywords
microcontroller
code
byte
card
java
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CNB971810370A
Other languages
English (en)
Other versions
CN1242086A (zh
Inventor
T��J��ά����ɭ
T·J·维尔金森
S·B·古特赖
K·克里斯纳
���ظ�÷��
M·A·蒙特格梅赖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gemalto Oy
Axalto SA
Original Assignee
Schlumberger Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=21846980&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=CN1183449(C) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Schlumberger Technologies Inc filed Critical Schlumberger Technologies Inc
Publication of CN1242086A publication Critical patent/CN1242086A/zh
Application granted granted Critical
Publication of CN1183449C publication Critical patent/CN1183449C/zh
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/77Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information in smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/52Binary to binary
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44557Code layout in executable memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/355Personalisation of cards for use
    • G06Q20/3552Downloading or loading of personalisation data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/356Aspects of software for card payments
    • G06Q20/3563Software being resident on card
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/357Cards having a plurality of specified features
    • G06Q20/3574Multiple applications on card
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/10Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means together with a coded signal, e.g. in the form of personal identification information, like personal identification number [PIN] or biometric data
    • G07F7/1008Active credit-cards provided with means to personalise their use, e.g. with PIN-introduction/comparison system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/062Pre-authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2153Using hardware token as a secondary aspect
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/131Protocols for games, networked simulations or virtual reality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Microcomputers (AREA)
  • Storage Device Security (AREA)
  • Credit Cards Or The Like (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

一种用于终端的集成电路卡。集成电路卡包括一个存储器,存储器存储解释程序和具有高级程序设计语言格式的应用程序。卡的处理器被配置成用解释程序来解释执行应用程序并用卡的通信器来与终端通信。

Description

用微控制器使用高级程序设计语言
本专利文件的部分内容含有受版权保护的材料。版权所有人不反对任何人按美国专利和商标局的文件或记录的形式原样复制该专利文件,但是保留所有的版权权利。
根据35 U.S.C.§119(e),本申请要求在先的美国临时申请系列号60/029,057(1996年10月25日提交)的权益。
本发明总的来说涉及程序设计领域,更具体来说涉及用智能卡或微控制器来使用高级程序设计语言。
用JAVA高级程序设计语言编写的软件应用程序是这样设计的,即用JAVA编写的应用程序能不加改变地在许多不同的计算机品牌或计算机平台上运行。这是通过以下步骤实现的。在编写JAVA应用程序时,它被编译成含有字节代码的“类”文件,字节代码是称为JAVA虚拟机的假想计算机的指令。这个虚拟机的实现要为每个被支持的平台编写。当某个用户希望在选定平台上运行特定JAVA应用程序时,从所要求的应用程序编译成的类文件就被加载到选定平台上。选定平台的JAVA虚拟机被运行,解释类文件中的字节代码,这样实际就是在运行JAVA应用程序。
以下参考文献描述了JAVA,本文引用它们作为参考:(1)Arnold、Ken和Jame Gosling的《The Java Programming Language》(Addison-Wesley出版,1996年);(2)Jame Gosling、Bill Joy和Guy Steele的《The Java Language Specification》(SunMicorsystems出版,1996年,web网址:http://java.sun.com/doc/language_environment/);(3)JameGosling和Henry McGilton的《 The Java Language Environment:A White Paper》(Sun Micorsystems出版,1995年,web网址:http://java.sun.com/doc/language_environment/);(4)TimLindholm和Frank Yellin的《The Java Virtual MachineSpecification》(Addison-Wesley出版,1997年)。这些文章和其它文章都描述了如何用JAVA编写程序。
为了让JAVA应用程序能在特定平台上运行,要编写一个在该平台的限制条件内运行的JAVA虚拟机实现,还必须提供一个用于将所要求的JAVA应用程序加载到该平台的机构,并且还是保持在该平台的限制条件内。
常规的支持JAVA的平台通常是基于微处理器的计算机,能访问相对大量的内存和硬盘存储空间。这种微处理器实现经常用在桌面电脑和个人电脑中。然而,在智能卡通常使用的微控制器中却没有常规的JAVA实现。
微控制器与微处理器的差别有许多方面。例如,微处理器一般有一个中央处理单元,它要求一定的外部部件(例如存储器、输入控制和输出控制)要功能正常。典型的微处理器可以访问从Mb级到Gb级容量的存储器,用一条指令就能处理16、32或64位或更大的数据。与微处理器不同,微控制器包括的中央处理单元、存储器和其它功能单元都在一个半导体基片或集成电路(例如“芯片”)上。与微处理器访问的相对较大的外部存储器相比,典型的微控制器访问的存储器容量小得多。典型的微控制器能访问1到64Kb的内置存储器,16Kb则非常普遍。
一般来说有三种不同类型的存储器被使用:随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)。在微控制器中,每一种存储器的可用容量受到集成电路上用于每一种存储器的空间的限制。通常,RAM占用的空间最多,处于短缺状态;ROM占用空间最少,处于充足状态;EEPROM比RAM更充足,但不及ROM。
每一种存储器适合于不同的用途。尽管ROM最价廉,但它只适用于没有变化的数据,诸如操作系统的代码。EEPROM用于存储断电时必须保留的数据,但是写的速度极慢。RAM可以高速读写,但是价格高,断电时数据丢失。
微处理器系统通常有较小的ROM和EEPROM,有1~128Mb的RAM-这是因为不受在单个集成电路设备上要受到的约束,经常能访问外部磁盘存储器系统,后者作为大型可写、非易失性存储区,费用比EEPROM更低。然而,微控制器通常有个0.1~2.0K的小RAM、2K~8K的EEPROM、8K~56K的ROM。
由于所需的外部部件数量少,体积小,微控制器经常用于集成电路卡,诸如智能卡。这种智能卡有各种形式,包括基于接触的卡和无接触的卡,前者必须插入读卡机才能使用,后者则不必插入。事实上,以无接触方式通讯的微控制器通常被嵌入特殊造型中,例如手表和戒指中,实际上以符合人机工程学的引人入胜方式集成了智能卡的功能。
由于环境要求的限制,用于智能卡的应用程序通常是用低级程序设计语言(例如汇编语言)编写的,以节约存储空间。
法国专利公开号90 118 18描述了一种用高级程序设计语言为智能卡编程的方法(该专利名称为“用于易于编程的微电路的便携式支持介质和为该微电路的编程步骤”(Portable support medium for aneasily programmable microcircuit and programming procedurefor said microcircuit),公开号为2,667,171)。然而该专利申请没有涉及数据安全问题,没有说明如何防止对智能卡上数据和信息的非授权访问,也没有说明如何提供这样一种程序设计环境,使得程序员能用诸如Java语言的功能丰富的程序设计语言来为智能卡编程,并且还能用智能卡上的一种在智能卡执行限制内操作的解释程序来执行该程序。
集成电路卡是一种安全、耐用、抗干扰、便于携带的数据存储设备。集成电路卡是最个人化的个人电脑,因为其体积小,因为其具有集成电路卡所独有的硬件和软件数据安全特点。
集成电路卡和卡上的微控制器的主要任务是保护存储在卡上的数据。因此,自1974发明以来,出于这些相同的安全原因,智能卡技术受到严密的保护。智能卡首先由法国的银行作为信用卡使用。在这种应用中,在基于信用卡的金融交易被认可之前,信用卡用户除了拥有其持的卡外还必须表明其知道一个4位数的个人标识号(PIN)。任何可能导致发现遗失或被偷信用卡上的个人标识号的信息都被堵塞在公共传播之外。事实上,由于在这一方面没有人能分辨哪些信息可能有用,几乎所有有关集成电路卡的信息都被隐瞒起来。
出于保密性考虑,为集成电路卡编写的应用程序具有独特的性质。例如,每个应用程序通常只以某特定所有人或身份来标识。由于应用程序通常是用低级程序设计语言诸如汇编语言编写的,所以应用程序是为特定类型的微控制器编写的。由于低级程序设计语言的性质,未经认可的应用程序可以访问集成电路卡上的数据。为特定集成电路卡编写的程序要用特定本体来标识,使得如果两个本体想要执行同一个编程功能,集成电路卡的微控制器上应用程序的有些部分必须有两份拷贝。
集成电路卡系统历史上一直是封闭的系统。集成电路卡含有为了与特定终端应用共同工作而设计的专有应用程序。集成电路卡使用时的安全检查的内容,主要是确认卡应用程序与终端应用程序是匹配的一对,卡上的数据是有效数据。
随着集成电路卡流行程度的提高,集成电路卡用户显然会不愿意携带适合各个集成电路卡应用的不同集成电路卡。因此开始在一个提供商的集成电路卡上提供多个合作应用。于是,例如一个自动柜员机(ATM)访问卡和一个借方卡可以共存于单一的集成电路卡平台上。不过,这仍然是一种封闭系统,因为终端和卡中的所有应用都是由一个清楚地了解其它提供商的提供商建立的。
有关集成电路卡的信息-特别是有关如何与它们通讯以及如何为它们编写程序的信息-的缺乏,已经阻碍了集成电路卡的普遍应用。然而,公用数字网络(例如因特网和万维网)的出现已经为集成电路卡的应用开放了新的领域。特别地,这已经导致需要在卡上装入不是清楚地了解其它提供商的新的应用程序,但是不可能破坏卡的保密性。然而,对于用低级程序设计语言编制的常规卡来说,这种做法是不切实际的。
根据本发明的一个方面,提供一种有一组资源限制的微控制器,包含:
一个存储器;
一个装在存储器中的解释程序,它能在该组资源限制范围内操作,该微控制器的特征在于具有:
至少有一个装在该存储器中、要由该解释程序解释的应用程序,其中该至少一个应用程序被生成
一个编译器,用于将高级语言源代码形式的应用程序源程序编译成一种字节代码格式的编译形式;
一个转换器,用于将该编译形式后处理成适合由该解释程序解释的最小形式,该后处理采用包括下述步骤的过程中的至少一个步骤:
a)记录原始字节代码中的所有跳转和它们的目的地;
b)将专用字节代码转换成等价通用字节代码或者相反;
c)将字节代码操作数从采用标识串的引用修改到采用唯一标识符的引用;
d)将该编译形式中的字节代码重新编号成为适合解释的格式的等价字节代码;以及
e)重新链接其目的地地址受转换步骤a)、b)、c)或d)影响的跳转。
根据本发明的另一方面,提供一种微控制器编程方法,其中,该微控制器有一个存储器和一个按照一个资源限制集合进行操作的处理器,该方法包含的步骤是:
输入用第一程序设计语言编写的应用程序;
将用该第一程序设计语言编写的该应用程序编译成与该第一程序设计语言关联的第一中间代码;
其中,该第一中间代码被至少一个第一中间代码虚拟机解释;
其中编程该微控制器的方法的特征在于:
将该第一中间代码转换成第二中间代码;
其中,通过执行下述步骤中的至少一个步骤,该第二中间代码被至少一个第二中间代码虚拟机解释,这些步骤有:
a)记录原始字节代码中的所有跳转和它们的目的地;
b)将专用字节代码转换成等价通用字节代码或者相反;
c)将字节代码操作数从采用标识串的引用修改到采用唯一标识符的引用;以及
d)将采用编译格式的字节代码重新编号,使其成为采用适合解释的格式的等价字节代码;以及
e)重新链接其目的地地址受转换步骤a)、b)、c)或d)影响的跳转;以及
将该第二中间代码加载到该微控制器的该存储器中。
根据本发明的第三方面,提供一种微控制器,其具有一个存储器和一个被装入存储器中的解释程序,其可操作执行作为以一种可解释程序设计语言编写的程序衍生物的衍生程序,该微控制器的特征在于:
(a)该微控制器在一个资源限制集合内操作,该资源限制包括其大小不足以允许解释执行以该可解释程序设计语言编写的程序的存储器;
(b)该存储器包括一个可对以该可解释语言的衍生物编写的衍生程序进行解释的解释程序,其中一个以该可解释程序设计语言编写的程序的衍生物是从以该可解释程序设计语言编写的该程序通过应用从下列一个规则集合中选择的至少一个规则导出的:
将串映射到标识符;
在解释之前或解释期间进行安全检查;
在解释之前或解释期间进行结构检查;
在解释之前或解释期间进行语义检查。
总之,作为本发明特点的一个方面,本发明描述了一种微控制器,例如一个集成电路卡或智能卡。出于解释的目的,在该概述部分之后的详细描述中说明了本发明在与终端一起使用的集成电路卡中的应用。然而本发明也可应用于小型计算机处理器的其它应用中,例如,使用微控制器的嵌入式系统。
本发明的微控制器的微处理器包括一个存储一个解释程序和至少一个具有高级程序设计语言格式的应用程序的存储器。该存储器的至少一部分可以位于该微处理器中。该微处理器被配置为用解释程序解释执行该应用程序。
以下是本发明的其中一些优点。新的应用程序可以下载到智能卡或具有微控制器的其它系统中,而不破坏智能卡或微控制器的安全性。这些应用程序可以是由不同的公司提供的,可以用不同的终端在不同的时间加载。安全性之所以不受破坏,是因为应用程序受到防止未授权访问任何应用程序代码或数据的保护,这种保护是由JAVA虚拟机提供的安全特点决定的。应用程序可以采用功能强大的主流程序开发工具、以诸如JAVA和Eiffel的高级语言进行编制。新的应用程序能在数小时内迅速成型并下载到智能卡,无须借助软屏蔽。
采用微控制器的嵌入式系统通过使用本发明,也能获得许多这些优点,来下载新的应用程序、进行高级语言程序开发和快速成型。
在微控制器上使用诸如Java和Eiffel的高级语言的困难在于解释程序和用这种语言产生的应用程序的编译形式都需要大量的存储器。本发明通过在该应用程序处理链中引入一个转换器而克服了这一困难。
本发明的实现包括以下若干内容。应用程序的高级程序设计语言格式可以有类文件格式,可以有JAVA程序设计语言格式。该应用程序可以包括字节代码,诸如Java字节代码。
实现本发明的系统可以包括一个编译器,用于将用高级编程语言编写的那些应用的源程序编译成一种编译形式。本发明还可以包括一个转换器,用于将该编译形式后处理成适合由该解释器解释的形式。
根据本发明的一个方面,该转换器可进行操作以包括该解释器所要求的那些应用程序属性,而不包括该解释器不要求的属性。该转换器还可以接受采取标准高级语言格式的一种编译形式作为输入,以及产生一种适合由该解释器解释的形式的输出。在一个方面,该转换器包括用于将标识串映射成唯一标识符(例如一个整数)的装置。这一映射过程可以记录在一个串到标识符映射文件中。
根据本发明的解释器可以进一步限制成支持该高级语言的特征和数据类型的全部集合的一个子集。在这种情况下,该转换器进一步验证该应用程序的编译形式是否只包含所支持的特征和数据类型。
在一个实施例中,该转换器包括用于将编译形式的字节代码转换成适合由该微控制器编译器解释的形式的字节代码的装置,在其转换过程中使用从包括下列步骤中的集合中选择的至少一个步骤:记录跳转和目的地,将特殊的字节代码转换成通用字节代码(或反之),修改所引用的字节代码操作数以使用唯一的标识符来代替标识串,将字节代码重新编号为等价的字节代码,以及将其目的地地址受这种转换步骤影响的跳转重新链结。
该解释器可以配置成实现安全检查。该安全检查可以包括建立防火墙,以及该安全检查可以包括实现一个砂箱安全模型(sandboxsecurity model)。例如,该解释器可以确定该应用是否满足从一个集合选择的一个安全准则,该集合包括不允许访问未授权的存储器部分,不允许访问未授权的微处理器资源,检查字节代码的执行不会违反一个安全限制。本发明的一个实施例也可以包括在加载一个应用程序前的处理,双检验该应用程序不会超过任何安全限制,以及以一种安全的方式加载该应用程序。后一步骤的例子包括检验该加载实体允许将应用程序加载到该微控制器以及使用一个加载密钥加密要加载的应用程序。
在另一方面,本发明是一种编程微控制器的方法,其包括步骤:将以第一编程语言编写的一个应用程序从一个由一个编译器产生的用于由一个第一虚拟机解释的第一中间代码转换成一个第二中间代码,其中该第二中间代码可由一个第二虚拟机解释并被加载到该微处理器的存储器中。
根据本发明的该方法,该转换步骤还可以进一步包括将对象,类,域或过程的标识串关联以及将这种标识串映射到唯一标识符,例如整数。
本发明的该方法的一个实施例还可以进一步包括下列步骤中的至少一个步骤:记录跳转以及目的地,将特殊的字节代码转换成通用字节代码(或反之),修改所使用的字节代码操作数以使用唯一的标识符来代替标识串,将字节代码重新编号为等价的字节代码,以及将其目的地地址受这种转换步骤影响的跳转重新链结。
根据本发明的另一特征,一个微控制器对一个资源限制集合进行操作,该资源限制集合包括其存储器的大小不足以允许对以该可解释编程语言编写的程序进行解释。该存储器包括一个可对作为一个高级编程语言的衍生物程序进行解释的解释器,该衍生物是通过应用从一个规则集中选择的至少一个规则而得到的,该规则集包括将标识串映射到标识符,在解释之前或解释期间执行安全检查,在解释之前或解释期间执行结构检查,以及在解释之前或解释期间执行语义检查。
这些安全检查也可以是一个逻辑,从一个请求者接收访问多个衍生程序中的一个的请求。在接收到该请求时,检查该衍生程序是否满足一个预定的规则集,并且根据该确定,有选择地授权请求者访问该衍生程序。在通过对该衍生程序是否有权访问(该衍生程序试图要访问的)特定的存储器部分的确定解释该衍生程序的同时,该预定的规则可以由该解释器执行。
该微控制器可以进一步配置成在解释该衍生程序的同时,执行从所执行的安全规则中所选择的至少一种安全检查,该解释器被配置成在执行每一字节代码之前至少对其检查一次以确定可以根据执行前和执行后检查执行该字节代码,以及在该衍生程序被加载进该微控制器之前要对其进行检查以检验该衍生程序的完整性,以及根据一个安全协议执行该加载。该安全协议可以要求必须对一个特定的身份进行检验以允许将一个衍生程序加载进卡中。该安全协议还可以包括一个解密密钥,要求使用一个对应于该解密密钥的加载密钥加密要加载的衍生程序。
该微控制器可以进一步配置成提供从一个包括加密,解密,签名,签字验证,互相认证,传送密钥以及会话密钥的集合中所选择的密码业务。
该微控制器也可以具有一个文件系统,以及被配置成通过使该微控制器具有用于授权对文件的读取,对文件的写入或者对文件的删除的一个访问控制表提供对该文件系统的安全访问。另外,该微控制器可以进行密钥确认以建立对一个文件的授权的访问或者验证卡持有者的身份以建立对一个文件的授权的访问。
阅读以下说明和权利要求,其它优点和特点将是显而易见的。
图1是一个集成电路卡系统的框图。
图2是表示对要下载到集成电路卡的JAVA应用程序进行准备的流图。
图3是由卡类文件转换器使用并生成的文件的框图。
图4是表示应用程序类文件变换成卡类文件的框图。
图5是表示类文件转换器的工作的流图。
图6是表示字节代码的修改的流图。
图7是表示专用字节代码变换成通用字节代码的框图。
图8是表示用常量替换常量引用的框图。
图9是表示将引用用它们的更新值进行替换的框图。
图10是表示对原始字节代码重新编号的框图。
图11是表示为不同的虚拟机结构翻译原始字节代码的框图。
图12是表示将应用程序加载到集成电路卡的框图。
图13是表示在集成电路卡中执行应用程序的框图。
图14是表示ROM、RAM和EEPROM的存储器组织结构的示意图。
图15是表示卡JAVA虚拟机的总体体系结构的流图。
图16是表示在带有安全检查的卡JAVA虚拟机中的过程执行的流图。
图17是表示卡JAVA虚拟机中的字节代码执行的流图。
图18是表示在没有安全检查的卡JAVA虚拟机中的过程执行的流图。
图19是表示卡应用程序与身份之间的关联性的框图。
图20是表示专用运行应用程序的访问权的框图。
图21是智能卡上的微控制器的透视图。
图22是电话上的微控制器的透视图。
图23是钥匙环上的微控制器的透视图。
图24是戒指上的微控制器的透视图。
图25是汽车电路卡上的微控制器的透视图。
参见图1,构造一个集成电路卡10(例如智能卡)来提供一个高级的、基于JAVA的多应用程序编程和执行环境。集成电路卡10有一个通信器12a,它被配置成与终端14的终端通信器12b进行通信。在有些实施例中,集成电路卡10是一个智能卡,带有8位的微控制器、512字节的RAM、4K字节的EEPROM和20K字节的ROM;终端通信器12b是常规的接触式智能卡读卡机;终端14是运行Windows NT操作系统的常规个人电脑,该操作系统支持个人电脑智能卡(PC/SC)标准并提供JAVA开发支持。
在有些实施例中,微控制器、存储器和通信器内置于与通常的信用卡尺寸几乎相同的塑料卡中。在另一些实施例中,微控制器、存储器和通信器安装在塑料卡以外的基体中,诸如首饰(例如手表、戒指或项链)、汽车设备、电信设备(例如用户身份模块(SIM)卡)、安全设备(例如加密模块)和家用电器中。
终端14准备JAVA应用程序并用终端通信器12b将JAVA应用程序加载到集成电路卡10。终端通信器12b是一种能在集成电路卡10与终端14之间建立通信通道的通信设备。有些通信选择包括接触式读卡机、通过无线频率或红外技术的无线通信,串行通信协议、分组通讯协议、ISO 7816通讯协议,等等。
终端14也能与集成电路卡10中运行的应用程序交互作用。在有些情况下,可以用不同的终端来实现这种目的。例如,可以用一种终端来准备应用程序,用不同的终端来下载应用程序,用另外其它终端来运行各种应用程序。终端可以是自动柜员机(ATM)、销售点终端、防盗门系统、付费系统、存取控制系统、或者任何其它与集成电路卡或微控制器通信的系统。
集成电路卡10含有卡JAVA虚拟机(卡JVM)16,它被用于解释卡10上含有的应用程序。
参见图2,JAVA应用程序20包括三个JAVA源代码文件A.java20a、B.java 20b和C.java 20c。这些源代码文件是在JAVA应用程序开发环境22中被准备和编译的。当JAVA应用程序20被开发环境22编译时,就产生了应用程序类文件24,其中这些类文件A.class24a、B.class 24b和C.class 24c分别对应它们各自的类JAVA源代码20a、20b和20c。应用程序类文件24符合《JAVA虚拟机规范》第4章记载的标准类文件格式(《JAVA虚拟机规范》为Tim Lindholm和Frank Yellin所著,1996年Addison-Wesley公司出版)。这些类文件24被馈送到卡类文件转换器26,后者将文件合并、压缩,生成单一的卡类文件27。用常规的卡加载器28将卡类文件27装入集成电路卡10。
参见图3,卡类文件转换器26是一个处理一组按标准JAVA类文件格式编码的类文件24的类文件后处理器,它可选择采用一种串到ID输入映射文件30来生成某种卡类文件格式的JAVA卡类文件27。附录A描述了一个这种卡类文件格式,本文引为参考。此外,在有些实施例中,卡类文件转换器26产生一个串到ID输出映射文件32,用作卡类文件转换器的后继执行的输入。
在有些实施例中,为了使串到ID映射与以前生成的卡类文件一致(在有多个类文件引用相同的串的情况下),卡类文件转换器26能从串到ID输入映射文件30接受以前定义的串到ID映射。如果没有这一个文件,各ID就由卡类文件转换器26生成。本文引为参考的附录B描述了实现并产生串到ID输入映射文件30和串到ID输出映射文件32的一种可能方法,并举例说明了这种映射表。
参见图4,典型的应用程序类文件24a包括类文件数据41,类常量池42,类、域创建的、界面引用的和过程数据43,以及各种属性数据44,它们在前文所述的《JAVA虚拟机规范》中有详细说明。注意,属性数据44中许多对于本实施例来说并不需要,因此被卡类文件转换器26剔除45。剔除的属性包括SourceFile、ConstantValue、Exceptions、LineNumberTable、LocalVariableTable以及任何可选择的售主属性。如附录A中所述的典型卡类文件27是按下列方式从应用程序类文件24导出的。卡类文件数据46是从所有应用程序类文件24a、24b、24c的合计类文件数据41导出的。卡类文件常量池47是从所有应用程序类文件24a、24b、24c的合计类常量池42导出的。卡类、域创建的、界面引用的和过程数据48是从所有应用程序类文件24a、24b、24c的合计类、域创建的、界面引用的和过程数据43导出的。本实施例中的卡属性数据49仅仅是从所有应用程序类文件24a、24b、24c的合计属性数据44的代码属性导出的。
为了避免在卡中进行动态链接,在构成应用程序24的若干JAVA类文件24a、24b、24c之间分配的所有数据被图5中流图中所示的进程合并成一个卡类文件27。在51a,选择要处理的第一类文件。在51b以下述方式压缩常量池42。JAVA类文件24a中引用的所有对象、类、域、过程都被用类文件24a的常量池42中的串来标识。卡类文件转换器26将在JAVA类文件24a中发现的常量池42压缩成一个优化版本。这种压缩是通过将类文件常量池42中发现的所有串映射成整数而完成的(其大小依微控制器的体系结构而定)。这些整数也被称作ID。每个ID唯一地标识应用程序20中的某特定对象、类、域或过程。因此,卡类文件转换器26将JAVA类文件常量池42中的串替换为其对应的唯一ID。附录B显示一例应用程序HelloSmartCard.java,位于附录下部的表说明的是与该应用程序的类文件的常量池中发现的串对应的ID。本例中所用的ID都是16位无符号整数。
下一步,在51c卡类文件转换器26在输入JAVA类文件24a的代码属性中检查不受支持的特征码。卡JVM16只支持全部JAVA字节代码的一个子集,具体如本文引为参考的附录C中所述。因此,卡类文件转换器26在JAVA类文件24a的代码属性中检查不受支持的字节代码。如果在52发现任何不受支持的字节代码,卡类文件转换器设立一个错误标志并停止转换53。附录D中作“A”标记的程序代码片断显示了这些寄生字节代码是如何被理解的。通过要求标准JAVA开发环境22编译带“-g”标志的应用程序22可以进行另一个层次的检查。根据上述JAVA虚拟机规范,该选项要求JAVA编译器将关于JAVA应用程序20中所使用变量的数据放置到类文件24a的LocalVariableTable属性中。卡类文件转换器26利用这个数据来检查JAVA类文件24a是否引用不被JAVA卡支持的数据类型。
下一步,卡类文件转换器26丢弃进行解释时不要求的、JAVA类文件24a中的所有不需要的部分。JAVA类文件24a存储与在JAVA类文件的属性节44中的类文件中的字节代码有关的数据。在45卡JVM16进行解释时所不要求的属性,诸如SourceFile、ConstantValue、Exceptions、LineNumberTable、LocalVariableTable可以安全地丢弃。唯一被保留的属性是代码属性。代码属性含有对应于JAVA类文件24a中过程的字节代码。
修改字节代码54涉及到检查类文件中每个过程的代码属性数据44,以及修改引用JAVA类文件常量池42的条目的字节代码的操作数以反映卡类文件常量池47中的条目。在有些实施例中,字节代码也被修改,如下文所述。
修改字节代码54涉及五遍(两遍是可选择的),如图6中的流图所述。原始字节代码60被发现在正被处理的JAVA类文件24a的代码属性44中。第一遍61记录所有跳转及其在源字节代码中的目的地。在以后进行的字节代码翻译中,有些单字节代码可能被翻译成2个或3个字节。图7所示的例子中,字节代码ILOAD_0被用两个字节代替:字节代码ILOAD和参数0。这一步完成后,代码大小发生变化,这就要求对受其影响的任何跳转目的地进行调整。因此,在完成这些转换之前,要分析原始字节代码60,找出任何跳转字节代码,记下它们的位置和当前目的地。附录D中作“B”标记的程序代码片断显示了如何记录这些跳转指令。附录D被本文引为参考。
一旦记录了跳转指令,如果不是正在进行可选择的字节代码翻译62,卡类文件转换器26就可以进行第三遍64。
否则,卡类文件转换器就将专用字节代码转换成通用字节代码。通常,翻译出的字节代码不在卡JVM16中被解释,但是却得到支持,因为能将该字节代码转换成能被卡JVM16解释的等价字节代码(见图7)。字节代码70可以替换为语义上等价的另一个不同字节代码72。这通常导致将诸如ILOAD_0的专用短单字节代码翻译成更通用的形式。例如,ILOAD_0可以被带参数0的字节代码ILOAD代替。进行这种翻译,目的是减少由卡JVM 16翻译的字节代码的数量,由此减少对卡JVM 16的复杂程度和代码空间的要求。附录D中作“C”标记的程序代码片断显示了这种翻译是如何完成的。注意,这种翻译增加了结果字节代码的大小,必须对任何受影响的跳转指令进行重新计算。
在第三遍64中,卡类文件转换器重建常量引用,方法是剔除用于表示这些常量的串。图8表示的例子中,引用通过JAVA类文件24a的常量池42中的索引发现的常量“18”的字节代码LDC 80可以被翻译成BIPUSH字节代码82。在这遍中,卡类文件转换器26修改引用JAVA类文件常量池42的条目的所有字节代码的操作数以反映它们在卡类文件常量池47中的新位置。图9表示的例子中,一个字节代码的参数INVOKESTATIC 90引用JAVA类文件常量池42的某个条目,该条目被修改以反映该条目在卡类文件常量池47中的新位置。修改后的操作数94表示这种转换。附录D中作“D”标记的程序代码片断显示了这种修改是如何完成的。
一旦常量引用被再链接后,如果不是正在进行可选择的字节代码修改,卡类文件转换器就继续到第五个也是最后一遍67。
否则,卡类文件转换器就将原始字节代码修改成由正使用的特定卡JVM 16支持的某个不同的字节代码集合。一种可能的修改是将原始字节代码60重新编号变成卡JVM 16的字节代码(见图10)。这种重新编号方式导致原始字节代码60中的字节代码100被修改成重新编号后的字节代码102。由值21识别的字节代码ILOAD可以被重新编号变成由值50来识别。可以用这种修改来优化卡JVM 16中的类型测试(在现有技术中也称为第三遍检查)。附录D中作“E”标记的程序代码片断显示了这个实施例的一个实现。为了减少卡JVM 16解释字节代码所需的程序空间可以进行这种修改。这种修改的实质是将字节代码重组成卡JVM 16字节代码,使得具有类似操作数和结果的字节代码被组合在一起,卡JVM 16的字节代码之间没有空隙。这就使得卡JVM 16能在其执行时高效地检查卡JVM 16字节代码并确认类型。
在有些实施例中,卡类文件转换器将原始字节代码60修改成旨在用于不同虚拟机体系结构的不同字节代码集合,如图11中所示。旨在在字堆栈114上使用的JAVA字节代码ILOAD 112可以被要在字节堆栈118上使用的卡JVM 16的字节代码ILOAD_B 116替换。字堆栈114中的一个单元要求分配4个字节的堆栈空间,而字堆栈118中的一个单元仅要求1个字节的堆栈空间。尽管这种选择有助于提高执行速度,其风险是丧失原始字节代码所具有的安全特性。
因为前面的步骤63、64或66都可能会改变字节代码60的大小,在67所以卡类文件转换器26只好再链接任何已经受影响的跳转指令。由于跳转指令已经在卡类文件转换器26的第一个步骤61被记录,所以进行这种调整的方法是将跳转目的地确定为适当的值。附录D中作“F”标记的程序代码片断显示了这些跳转是如何确定的。
卡类文件转换器现在已经修改与待命加载的原始字节代码60等价的字节代码68。从JAVA类文件24a到卡类文件27的转换现在完成。
参见图5,如果在55还有类文件24等待处理,则对其余的每个类文件重复执行前面的步骤51a、51b、51c、52、54。在56卡类文件转换器26收集已处理过的类24的映射和修改后的字节代码,在57将它们合并放置并生成卡类文件27。如果需要的话,卡类文件转换器26就生成一个串到ID输出映射文件32,它含有为翻译期间在JAVA类文件24的常量池42中遇到的串所分配的所有新ID的清单。
参见图12,终端14内的卡加载器28用标准ISO 7816命令将卡类文件发送到集成电路卡中的加载与执行控件120。加载与执行控件120有一个卡操作系统122,卡操作系统提供必要的系统资源,包括支持卡文件系统124,卡文件系统可用于存储几个卡应用程序126。有许多常规的卡加载器是用由卡操作系统122支持的低级语言编写的。在优选实施例中,引导程序加载器是用JAVA编写的,集成电路卡10包括运行这个应用程序的JAVA虚拟机。在本文引为参考的附录E中表示了加载与执行控件120的一个Java实现。加载与执行控件120接收卡类文件26,生成在集成电路卡10的EEPROM中卡文件系统126中存储的JAVA卡应用程序126x。多个JAVA卡应用程序126x、126y和126z都能以这种方式存储在单一的卡中。加载与执行控件120支持终端能用来选择哪一个Java卡应用程序立即或在下一次卡复位时运行的命令。
参见图13,当接收到来自加载与执行控件120的一个复位或执行命令时,卡JAVA虚拟机(卡JVM)16开始在所选JAVA卡应用程序126z中所选类的某个预定过程(例如主过程)执行。卡JVM 16提供JAVA卡应用程序126z访问基础卡操作系统122,操作系统用本机JAVA过程来提供诸如I/O、EEPROM支持、文件系统、存取控制以及其它系统功能。所用本机JAVA过程如本文引为参考的附录F中所示。
所选的JAVA卡应用程序126z用通信器12a与终端14中的适当应用程序通信,以便建立通向终端14的通信通道。从通信器12a到终端14的数据经过终端中的通信驱动程序132,通信驱动程序是专门为处理通信器12a所用的通讯协议而编写的。数据然后传送到集成电路卡驱动程序134,集成电路卡驱动程序是专门为访问正被使用的特定集成电路卡10的能力而编写的,它向终端应用程序136提供高级软件服务。在优选实施例中,这个驱动程序是合适的PC/SC智能卡服务提供商(SSP-Smartcard Service Provider)软件。数据然后传送到终端应用程序136,后者必须处理由正在运行的特定卡应用程序126z所提供的能力。命令和响应就这样在终端应用程序136和选定的卡应用程序126z之间来回传送。终端应用程序与用户交互作用,接收来自用户的命令-其中有些命令被传送到选定的JAVA卡应用程序126z,接收来自选定的JAVA卡应用程序126z的响应-这些响应经处理后被传送回用户。
参见图14,卡JVM 16是一个解释卡应用程序126x的解释器。微控制器中影响卡JVM 16的存储器资源是卡ROM 140、卡RAM 141和卡EEPROM 142。卡ROM 140用于存储卡JVM 16和卡操作系统122。卡ROM 140也可用于存储固定的卡应用程序140a和类库140b。可加载的应用程序141a、141b和库141c也可以存储在卡RAM 141中。卡JVM 16解释卡应用程序141a、141b或140a。卡JVM 16用卡RAM来存储VM堆栈144a和系统状态变量144b。卡JVM 16通过VM堆栈144a来跟踪所进行的操作。由卡JVM 16创建的对象或者存储在RAM堆144c中,或者存储在EEPROM堆146a中,或者存储在文件系统147中。
所有由卡JVM 16操纵的堆都可以作为RAM堆144c存储在卡RAM141中,也可以作为EEPROM堆分布到卡EEPROM142。卡RAM141也用于记录用微控制器的本机代码编写的例程所用的系统堆栈148的状态。卡JVM 16用卡EEPROM 142来把应用程序数据存储在EEPROM堆146a或文件系统147中。存储在文件中的应用程序数据可以通过到卡操作系统122的接口来操纵。这种接口由卡ROM 140中存储的类库140b提供,由卡EEPROM 142中存储的可加载类库141c提供。附录F中描述了一个这样的接口。卡中的应用程序和数据被防火墙机构149隔离。
为了适应微控制器上所能得到的有限资源,卡JVM 16执行JAVA程序设计语言的一个严格的子集。结果,JAVA应用程序20编译成一个含有JAVA字节代码的一个严格子集的类文件。这就使应用程序设计者能以这个JAVA的严格子集编写程序并仍然保持与现有JAVA虚拟机的兼容。由卡JVM 16解释的JAVA字节代码的语义在前面所述的《JAVA虚拟机规范》中有描述。附录C中有由卡JVM 16解释的字节代码子集。卡类文件转换器26检查JAVA应用程序20以确保只使用这个子集中可用的特征,并将应用程序转换成能被卡JVM 16理解和解释的形式。
在其它实施例中,卡JVM 16被设计成能解释字节代码116的一个不同集合或增广集合。尽管不同的字节代码集合可能导致某些性能上的提高,从原始JAVA字节代码具有的安全性或者从与主流JAVA开发工具的兼容性角度来说,偏离严格的JAVA子集可能并不可取。
所有卡JVM 16应用程序126都有一个定义好的入口点,入口点由某个类和该类中的某个过程指示。这种入口点在串到ID输入映射30中映射,并由卡类文件转换器26分配。JAVA应用程序20中的类、过程和域是由卡类文件转换器26分配ID的。例如,对应主应用程序类的ID可被定义为F001,对应其主过程诸如“main()V”的ID可被定义为F002。
图15中的流图描述了卡JVM的总体执行体系。卡JVM 16的执行从执行控件120开始,执行控件选择一个要执行的卡应用程序126z。它接着就寻找并分配卡应用程序中的一个入口点152(某过程)供卡JVM 16去解释。卡JVM 16解释该过程153。如果解释进行得成功154,卡JVM 16就报告成功155,将控制返还给执行控件120。如果在进行解释的过程中153,卡JVM 16遇到未处理的错误或异常(通常是资源限制或安全侵犯),则卡JVM 16就停止156并将适当的错误报告给终端14。
卡JVM 16的核心部分是一个处理字节代码的执行的子例程。图16中的流图描述了这个子例程。该流图假定一个过程160,该子例程执行该过程中的字节代码。子例程的开始是准备该过程的参数161。这涉及到设置VM堆栈144a指针、VM堆栈144a帧限制,以及将程序计数器设置到过程的第一个字节代码。
下一步检查过程各标志162。如果过程被标志为本地的,则过程实际上是一个对本机过程代码(用微控制器的本地处理器代码编写的子例程)的调用。在这种情况下,卡JVM 16为有效调用进行准备163并返回到本机代码例程。参数可以在VM堆栈144a上或通过系统堆栈148传送给本机过程。在进行适当的安全检查后本机过程子例程被调用。返回时,本机过程子例程的结果(如果有结果的话)被置于VM堆栈144a上,以便能被下一个要执行的字节代码来存取。
然后就进入了卡JVM 16的调度循环164。字节代码调度循环负责每个字节代码的准备、执行和退役。循环结束的条件是,循环结束了对过程160中字节代码的解释,或者卡JVM 16遇到资源限制或安全侵犯。
如果上一个字节代码导致要转移165,则卡JVM 16准备转移165a。提取下一个字节代码165b。为了保持以低代价处理每个字节代码,要尽可能提取并存储常用的单元,诸如字节代码参数、长度、类型。
为了提供程序设计语言的安全模型具有的安全性,要检验类文件中字节代码,判断是否符合该模型。这种检查在现有技术中通常是由一个称为字节代码检验器的程序执行的,按照《JAVA虚拟机规范》,字节代码检验器进行四遍操作。为了提供由字节代码检验器保障的运行时的安全性,卡JVM 16必须进行与检验器的第三、第四遍相关的检查。这种检查可以被卡JVM 16省略,条件是由卡JVM 16解释的字节代码60的安全性能得到保证(这几乎不可能做到)。至少,只要对象引用不可能是假造的、VM堆栈144a和本地变量界限得到遵守,代码安全性就可能得到保持。这就要求针对正在执行的字节代码检查VM堆栈144a的状态。
为了实施程序设计语言的安全模型,要创建一个256字节的表,如本文引为参考的附录G所示。该表由字节代码的编号标引。该表含有与索引字节代码关联的类型和长度数据。其编码方式是前5位代表类型,后3位代表长度。字节代码的类型和长度是直接从该表由字节代码编号索引的。这种类型和长度然后被用于进行由本文引为参考的附录H所示的检查。附录H中,这种检查始于从本文引为参考的附录G的表中解码长度和类型。长度用于递增程序计数器。类型首先用于执行前的检查,以保证在VM堆栈144a上的数据类型对于要执行的字节代码来说是正确的。用256个字节的ROM存储该表,使得原始Java字节代码能在卡JVM 16中运行并使对要加载到卡的JAVA类文件所需的改变最少。其它JAVA字节代码可以容易地被支持,因为更新适当的表条目是相对容易的事情。
在其它实施例中,如图10所示,过程中JAVA字节代码是这样重新编号的,即要使得存储在附录H的表中的字节代码类型和长度数据在重定序中是隐含的。附录H被本文引为参考。于是,必须对VM堆栈144a的状态和正在处理的字节代码进行的检查并不涉及对表的查找。通过执行本文引为参考的附录I中所示的几个简单比较就能进行检查。当ROM空间非常宝贵时,最好采用这个实施例,因为它去除了一个256字节的表。然而要向被支持字节代码的集合添加新字节代码,必须仔细地设计周到,因为新字节代码必须适合被支持字节代码的隐含编号方案。
在另一个实施例中,卡JVM 16为了卡JVM 16的执行速度而选择不进行任何安全检查。这在图18的流图中表示。图18的流图与去掉安全检查后的图16的流图相同。从安全的观点来说,这种选择是不可取的,除非能保证字节代码是安全的。
卡JVM 16也能实施其它安全检查。如果字节代码可以引用局部变量,卡JVM 16就检查这种引用是否有效,如果无效,就发出出错信号。如果引用有效,卡JVM 16就将该局部变量的类型存储起来用于将来的检查。要检查VM堆栈144a指针,看其是否仍然处于有效区间。如果不在有效区间,就发出异常信号。要检查字节代码编号,如果不受支持,就发出异常信号。
最后,字节代码本身被调度165d。由卡JVM 16翻译的字节代码清单列举在附录C中。前述的《JAVA虚拟机规范》中有针对字节代码调度之前和之后VM堆栈144a的状态对字节代码的语义的描述。注意,有些字节代码(字节代码INVOKESTATIC、INVOKESPECIAL、INVOKENONVIRTUAL和INVOKEVIRTUAL)可能导致重新进入卡JVM 16,要求在子例程161的入口处开始处理。图17表示字节代码执行例程的流图。该例程被赋予一个要执行的字节代码171。卡JVM 16执行该字节代码所要求的指令172。如果在执行的过程中,卡JVM 16遇到某资源限制173,它就返回一个错误156。这个错误被卡JVM 16返回给终端16。如果字节代码执行成功,它就返回一个成功信号175。
执行之后,结果的类型被用于正确地设置VM堆栈144a(165e),适当地在VM堆栈144a上设置数据类型标志。上一次从字节代码信息表收集(165b)的字节代码数据被用于按照刚刚执行的字节代码来设置VM堆栈144a的状态。
在其它实施例中,针对被执行的字节代码来设置VM堆栈144a的输出状态在字节代码是重新编号过的情况下被简化。这种简化在本文引为参考的附录I中表示。
在另一个实施例中,卡JVM 16为了卡JVM 16的执行速度,可能省略对VM堆栈144a的输出状态的设置。从安全的观点来说,这种选择并不可取-除非能保证字节代码是安全的。
在字节代码已经执行后,字节代码被退役(165f)。这涉及到使参数从VM堆栈144a出栈。一旦字节代码的处理完成,循环164就对过程的下一个字节代码重复。
一旦调度循环164终止,VM堆栈144a就被清空(166)。这就防止有任何对象引用渗漏到其它卡JVM 16调用,破坏卡JVM 16的安全。字节代码调度循环164的停止167,标志卡JVM 16已经完成了对所请求过程的执行。
为了将集成电路卡10中的数据和应用程序互相隔离,集成电路卡10要依靠由卡JVM 16提供的防火墙机构149。因为卡JVM实施标准的第3和第4遍的检验器检查,它能检测到某应用程序引用另一个应用程序所用数据或代码空间的任何企图并发出安全错误信号(156)。例如,常规低级应用程序能将非引用数据类型变造成引用,由此使得能访问未经授权的存储空间,侵犯安全。如果采用本发明,则要是卡应用程序126z企图用一个非引用数据类型作为引用的话,就会触发一个安全侵犯错误(156)。在常规JAVA中,这种受保护的应用程序环境被称为沙箱应用程序-解释环境。
然而,这些防火墙设施并不是独立工作的。实际上,这些设施是与下表所示的常规存取控制列表和加密机构重叠并互相加强的:
存取控制列表 虚拟机 加密
  数据保护 操作前的存取控制 只访问自己的名字空间 去向另一个程序的数据被加密
  程序保护 执行前的存取控制 只对正确的类型执行 数据在程序的名字空间中加密
  通信保护 通道上的存取控制 在自己的名字空间中的通道控制 只有互相验证的各方才能通信
这些设施结合在一起,隔离集成电路卡10上的数据和应用程序,保证每个卡应用程序126只能访问集成电路卡10的授权资源。
参见图19,当卡应用程序126执行时,卡应用程序126x、126y、126z能被赋予特别的特权。这些特权例如确定,卡应用程序126能访问哪些数据文件,卡应用程序126在文件系统147上能执行哪些操作。授予卡应用程序126的特权一般是在特定的卡应用程序126z被用户通常从终端14启动时设置的。
集成电路卡10用加密验证过程来将某身份190(例如身份190a、190b和190c)并因此将一组特权关联到卡应用程序126的执行。特定身份190c与卡应用程序126z的关联是在卡应用程序126z开始执行时作出的,因此而创建一个特定的运行应用程序200,如图20所示。身份190是一种独特可识别的文字,与某身份标志可靠关联。身份标志(例如个人身份证号(PIN)或RSA私人密钥)是一种密钥。
参见图20,为了运行特定的卡应用程序126z,必须验证卡应用程序126z的身份190c。身份190c是通过展示知道与身份190c关联的身份标志而验证的。因此,为了运行卡应用程序126z,代理(例如持卡者或希望运行该应用程序的另一个应用程序)必须显示其拥有或知道该应用程序的定义身份的密钥。
展示拥有密钥的一种方式是简单地展示该钥本身。PIN验证就是这种验证形式的一个例子。另一种不展示密钥本身就能显示拥有密钥的方式是,展示有能力以该密钥来加密或解密普通文字。
因此,集成电路卡10上特定的运行应用程序200包括一个卡应用程序126z和一个验证过的身份190c。没有这两个单元的就位,任何卡应用程序126都不能运行。卡应用程序126z定义要执行的数据处理操作,验证过的身份190c确定这些操作可以在什么计算对象上执行。例如,某特定应用程序126z只能访问文件系统147中与该特定身份190c关联的该身份C的文件202,该特定卡应用程序126z不能访问与该特定身份190c以外的身份关联的其它文件204。
集成电路卡10可以采取其它步骤来保证应用程序和数据的隔离。集成电路卡10具有三个软件部件集:验证过的身份的存取控制列表、基于JAVA的虚拟机、分别保护数据文件、应用程序执行和通信通道的一次性会话密钥。这些部件集联合起来用于一个实施例时,能为一个实施例提供应用程序防火墙149。下面讨论每个软件部件集,然后展示这三个集是如何共同工作来保证在集成电路卡10上隔离应用程序和数据的。
集成电路卡10上每一个受保护的-即对其的访问要受控制的一计算对象(例如数据文件或通信通道)都有一个关联的存取控制列表(ACL)。(特定计算对象的)ACL上的条目的数据格式称为e-tuple:
type(类型):identity(身份):permissions(允许)
type域指示后面的(identity域中的)身份-例如某用户(例如“John Smith”)或某小组-的类型。permissions域指示能由该身份对计算对象进行的操作(例如读、追加数据和更新)的一个列表。
例如,假定某数据文件有ACL条目:
USER:AcmeAirlines:RAU,
则任何身份是“AcmeAirlines”的应用程序都能对该数据文件进行读(“R”)、追加数据(“A”)和更新(“U”)。此外,该ACL可以选择性地用于允许创建和删除数据文件。此外,该ACL可以选择性地用于允许执行一个应用程序。
每当某计算对象被运行应用程序200访问时,访问都被卡JVM 16截获并传送到卡操作系统122,后者判断是否有ACL与该对象关联。如果有关联的ACL,则与运行应用程序200关联的身份190c在该ACL上被匹配。如果该身份不存在,或者不允许该身份进行正在请求的类型的访问,则访问被拒绝。否则,就允许进行访问。
参见图13,为了防止由于集成电路卡10与终端14之间只有单一的数据通路而可能产生的问题,要完成通信通道的隔离,方法是在身份验证进程中增加在卡应用程序126z与终端应用程序136之间交换一次性会话密钥209。密钥209然后被用于加密随后在验证终端应用程序136与验证过的卡应用程序126z之间的通信。有了一次性会话密钥209后,无赖终端应用程序既不能“收听”在终端14与集成电路卡10之间的验证过的通信,也不能“电子欺骗”卡应用程序去代表无赖终端应用程序进行没有验证的操作。
卡-终端通信的加密解密,既可以由卡操作系统122处理,也可以有卡应用程序本身126z处理。在前一种情况下,与终端14的通信是对应用程序透明地进行加密的,信息通信解密后到达应用程序的数据空间。在后一种情况下,卡应用程序126z选择进行加密和解密来提供一个额外的安全层,这是因为应用程序能在数据一旦创建时就加密数据,在数据要使用时就解密数据。否则,数据就用会话密钥209保持在加密状态。
所以,应用程序防火墙包括三个互相加强的软件集。数据文件受到验证过的身份存取控制列表的保护。应用程序执行空间受卡JVM 16的保护。通信通道用一次性会话密钥209保护。
在其它实施例中,上述用于微控制器(诸如处理器12)的技术可以控制集成电路卡以外的设备(例如汽车发动机的一部分)。在这些应用中,微控制器提供一个小平台(即一个中央处理单元和一个存储器,二者都位于一个半导体衬底上)来存储和执行高级程序设计语言。多数采用微控制器的现有设备和新设计都能用本发明来提供用高级语言为微控制器编程的能力,特别是包括了本发明对这类设备的应用。
应用程序这个用语包括任何诸如JAVA应用程序、JAVA小应用程序、JAVA aglets、JAVA小服务程序(servlets)、JAVA小通信程序(commlets)、JAVA部件程序,以及其它能产生如下所述的类文件的非JAVA程序。
类文件可以具有一个不是JAVA程序文件的源。有一些非JAVA的程序设计语言也有用于从各自的源文件生成类文件的编译程序或汇编程序。例如,程序设计语言Eiffel可用于用Pirmin Kalberer的“J-Eiffel”来生成类文件。“J-Eiffel”是具有JVM字节代码生成功能的Eiffel编译程序(web网址:http://www.spin.ch/~kalberer/jive/index.htm)。在以下的(本文引为参考的)参考文献中描述了一种将Ada 95到JAVA字节代码的翻译器:《用Ada 95编写因特网程序》(原文标题为“Programming the Internet in Ada95”,作者taft,S.Tucker,1996年发表于’96欧洲Ada学会会刊)。Jasmin是一种JAVA字节代码汇编程序,能用于生成类文件,方法如以下的(本文引为参考的)参考文献中所描述:《JAVA虚拟机》(原文标题为“JAVA Virtual Machine”作者Meyer、Jon和Troy Downing,1997年O’Reilly出版)。不管类文件的源是什么,上述描述可应用于JAVA以外的语言以生成要被解释的代码。
图21表示一种集成电路卡或智能卡,它包括的微控制器210安装在塑料卡212上。塑料卡212具有与典型的信用卡大致相同的形式因素。通信器12a能用接触焊点(contact pad)214来建立通信通道,通信器12a或者也能采用无线通信系统。
在其它实施例中,微控制器210被安装在移动式或固定的电话220中,实际上向电话添加了智能卡的功能,如图22所示。在这些实施例中,微控制器210被安装在能插入电话220或从电话中摘除的模块(诸如用户身份模块(SIM-Subscribe Identity Module))中。
在其它实施例中,微控制器210被加到钥匙环230上,如图23所示。这可用于保护安装有识别与钥匙环230上微控制器210相关联的身份的装备的汽车的出入。
诸如手表或戒指240等贵重物品上也能以符合人机工程学的方式安装微控制器210,如图24所示。这种实施例通常用无线通信系统来建立通信通道,是一种对用户妨碍最小的存取控制的实现方式。
图25表示一个在汽车254的电子子系统252中安装的微控制器210。在这个实施例中,微控制器被用于各种用途,诸如控制进出汽车(例如检查身份或驾车人是否清醒后才启动汽车的点火系统)、通过无线通信来付路桥费、或者与全球定位系统(GPS)交互作用来追踪汽车的位置,如此等等。
本文描述了本发明的特定实施例,但本领域的熟练人员通过阅读本说明书显然知道存在各种修改和替代方案。这种修改和替代并不超出本发明的范围。
附录A
优选实施例的卡类文件格式
介绍
该卡类文件是原始类文件的一种压缩形式。卡类文件只含有解释从原始类文件来的JAVA程序所需的语义数据。原始类文件中的间接引用被替换为直接引用,结果产生一种紧凑的表示。
卡类文件的格式基于下列原则:
贴近标准类文件格式。卡类文件格式应当尽可能地接近标准类文件格式。类文件中的JAVA字节代码保持不变。不改变字节代码,保证了对它们的结构和静态约束依然可以验证是完好无缺的。
容易实现。卡类文件格式应当足够简单,以吸引JAVA虚拟机的实现者。它必须允许不同形式但行为相当的实现。
可行性。卡类文件格式必须紧凑,以便能与智能卡技术结合。必须既符合当今技术条件,又不失对明日创新的远见。
本文件基于题为《JAVATM虚拟机规范》[1]一书中的第4章“类文件格式”,此后称该书为红皮书。由于本文件基于红皮书中说明的标准类文件格式,我们只展示不同的数据。任何澄清都要以红皮书为最终权威依据。
与标准类文件格式的主要不同之处是:
常量池被优化成只含有16位的标识符,在可能的地方,间接引用被替换成直接引用。
原始类文件中的属性被剔除或重新分组。
JAVA卡类文件格式
本节描述JAVA卡类文件格式。每个卡类文件含有一个或许多JAVA类型,其中的类型可以是类或界面。
卡类文件由8位字节的流组成。所有16位、32位和64位数都是通过分别读取两个、四个和八个连续的8位字节而构造的。多字节的数据项总是以大结尾顺序(big-endian order)存储的,其中高位字节位于前面。在JAVA语言中,这种格式受界面java.io.DataInput和java.io.DataOutput以及诸如java.io.DataInputStream和java.io.DataOutputStream的类的支持。
我们定义并使用相同的数据类型集表示Java类文件数据:类型u1、u2和u4分别代表无符号的1字节、2字节或4字节数。在JAVA语言中,这些类型可以被诸如界面java.io.DataInput的readUnsignedByte、readUnsignedShort和readInt的过程读取。卡类文件格式采用用与C语言相象的结构记号编写的伪结构来表示。为了避免与JAVA卡虚拟机类和类实例的域混淆,描述卡类文件格式的结构的内容被称为项。与C结构的域不同,连续的项被顺序存储在卡类文件中,没有填充或对齐。由可变长项组成的可变长表在几个类文件结构中被使用。尽管将用类似C的数组语法来引用表项,但事实上表是可变长度结构的流,这就意味着不可能直接将表索引翻译成表内字节位移地址。
当我们称某数据为数组时,它实际就是一个数组。
为了区别卡类文件结构与标准类文件结构,我们增加了大写表示法。例如我们将原始类文件中的field_info重新命名为卡类文件中的FieldInfo。
卡类文件
卡类文件含有一个单一的CardClassFile结构:
CardClassFile{
u1 major_version;
u1 minor_version;
u2 name_index;
u2 const_size;
u2 max_class;
Cpinfo constant_pool[const_size];
ClassInfo class[max_class];
}
CardClassFile结构中的项如下:
minor_version,major_version
minor_version和major_version项的值是产生该卡类文件的卡外JAVA卡虚拟机的低和高版本号。JAVA卡虚拟机的实现一般支持具有给定高版本号和0到某特定minor_version的低版本号的卡类文件。
只有Java卡论坛(Java Card Forum)才可以定义卡类文件版本号的意思。
name_index
name_index的值必须代表一个有效的Java类名。由name_index代表的Java类名必须与要在卡中运行的主应用程序对应的Java类名严格相同。卡类文件含有若干类或界面,是它们构成了在卡中运行的应用程序。由于Java允许每个类都含有一个主过程,必须有方法来区别含有与卡应用程序对应的主过程的类文件。
const_size
const_size的值给出在卡类文件常量池中条目的数量。constant_pool下标如果大于等于0并且小于const_size时才被视为有效。
max_class
该值指的是卡类文件中出现的类的数目。由于Java卡中的名字归结和链接都是由卡外Java虚拟机完成的,所以应用程序所需的所有类文件或类都被一起放置在一个卡类文件中。
constant_pool[]
constant_pool是一个可变长度结构的表(),代表各种串常量、类名、域名和其它在CardClassFile结构和其子结构内被引用的常量。
卡类文件中的第一个条目是constant_pool[0]。
下标在0到const_size的constant_pool表的每个条目都是一个可变长度的结构()。
class[]
该类是构成加载到卡上的应用程序的max_class个类的一个表。
constant pool
所有constant_pool表条目都具有以下的通用格式:
CpInfo{
u1 tag;
u1 info[];
}
constant_pool表中的每项都必须以标志cp_info条目的种类的1字节的标签开始。该info数组的内容随标签的值而变化。有效标签以及它们的值与红皮书中规定的一样。
每个标签字节后必须跟随两个或更多给出有关特定常量的数据的字节。额外数据的格式随标签值而变。
当前要包括的标签只有CONSTANT_Class、CONSTANT_FiledRef、CONSTANT_MethodRef和CONSTANT_InterfaceRef。也可以增加对其它标签的支持,因为它们包含在规范中。
CONSTANT_Class
CONSTANT_Class_info结构用于代表一个类或一个界面:
CONSTANT_Classinfo{
u1 tag;
u2 name_index;
}
CONSTANT_Class_info结构的诸项如下所述:
tag
tag项具有值CONSTANT_Class(7)。
name_index
name_index的值必须代表一个有效的Java类名。由name_index代表的Java类名必须是与由原始类文件的constant_pool中对应的CONSTANT_Class条目所描述的完全相同的Java类名。
CONSTANT_Fieldref、CONSTANT_Methodref和CONSTANT_InterfaceMethodref域、过程和界面过程由类似结构代表:
CONSTANT_FieldrefInfo{

u1 tag;

u2 class_index;

u2 name_sig_index;

}

CONSTANT_MethodrefInfo{

u1 tag;

u2 class_index;

u2 name_sig_index;

}
				
				<dp n="d30"/>
CONSTANT_InterfaceMethodrefInfo{

u1 tag;

u2 class_index;

u2 name_sig_index;

}
这些结构的诸项如下所述:
tag
CONSTANT_FieldrefInfo结构的tag项具有值CONSTANT_Fieldref(9)。
CONSTANT_MethodrefInfo结构的tag项具有值CONSTANT_Methodref(10)。
CONSTANT_InterfaceMethodrefInfo结构的tag项具有值CONSTANT_InterfaceMethodref(11)。
CLass_index
class_index项的值必须代表一个有效的Java类或界面名。由class_index代表的名必须是与由原始类文件的constant_pool中对应的CONSTANT_Class_info条目所描述的完全相同的名。
name_sig_index
name_sig_index的值必须代表一个有效的Java名和类型。由name_sig_index代表的名和类型必须是与由原始类文件的constant_pool结构中的CONSTANT_NameAndType_info条目所描述的完全相同的名和类型。
Class
每个Class都由一个定长的ClassInfo结构来描述。这种结构的格式是:
ClassInfo{

u2 name_index;

u1 max_field;

u1 max_sfield;

u1 max_method;

u1 max_interface;

u2 superclass;
				
				<dp n="d31"/>
u2 access_flags

FieldInfo field[max_field+max_sfield];

InterfaceInfo interface[max_interface];

MethodInfo method[max_method];

}
ClassInfo结构的诸项如下所述:
name_index
name_index项的值必须代表一个有效的Java类名。由name_index代表的Java类名必须是与由原始类文件的对应ClassFile结构所描述的完全相同的Java类名。
max_field
max_field项的值给出域表中代表由该类或界面类型说明的实例变量的FieldInfo()结构的数目。这个值指的是卡类文件中非静态域的数目。如果类代表一个结构则max_field的值为0。
max_sfield
max_sfield项的值给出域表中代表由该类或界面类型说明的类变量的FieldInfo结构的数目。这个值指的是卡类文件中静态域的数目。
max_method
max_method项的值给出过程表中MethodInfo()结构的数目。
max_interface
max_interface项的值给出该类或界面类型的直接超界面的数目。
superclass
对于一个类来说,superclass项的值必须代表一个有效的Java类名。由superclass代表的Java类名必须是与由原始类文件的对应ClassFile结构所描述的完全相同的Java类名。无论该superclass还是其任何超类都不以是一个最后类。
如果superclass的值是0,则该类必须代表类java.lang.Object,这是唯一没有超类的类或界面。
对于界面来说,superclass的值总是代表Java类java.lang.Object。
access_flags
access_flags项的值是用在类和界面说明中的修改符的一个屏蔽。这些access_flags修改符和它们的值是与原始类文件的对应ClassFile结构中的完全相同的access_flags修改符。
field[]
field表中的每个值都必须是一个定长的FieldInfo()结构,能全面描述类或界面类型中的一个域。field表仅包括那些由该类或界面说明过的域。它不包括代表从超类或超界面继承的域的项。
interface[]
interface数组中每个值都必须代表一个有效的界面名。由每个条目代表的界面名必须是与由原始类文件的对应界面数组所描述的完全相同的界面名。
method[]
method表中的每个值都必须是一个可变长的MethodInfo()结构,能全面描述类或界面中某过程的Java虚拟机代码。
MethodInfo结构代表由该类或界面类型所说明的所有过程,包括实例过程和一对于类来说一类(静态)过程。该method表只包括由该类所显式说明的那些过程。界面只有一个过程<clinit>,即界面初始化过程。说method表不包括表示从超类或超界面所继承的过程的那些项。
Fields
每个field都由一个定长的field_info结构来描述。这种结构的格式是:
FieldInfo{
u2 name_index;
u2 signature_index;
u2 access_flags;
}
FieldInfo结构的诸项如下所述:
name_index
name_index项的值必须代表一个有效的Java域名。由name_index代表的Java域名必须是与由原始类文件的对应field_info结构所描述的完全相同的Java域名。
signature_index
signature_index项的值必须代表一个有效的Java域描述符。由name_index代表的Java域描述符必须是与由原始类文件的对应field_info结构所描述的完全相同的Java域描述符。
access_flags
access_flags项的值是用于描述对域的访问许可和域的特性的修改符的一个屏蔽。这些access_flags修改符和它们的值是与原始类文件的对应field_info结构中的完全相同的access_flags修改符。
methods
每个method(过程)都由一个变长的MethodInfo结构来描述。MethodInfo结构是一个变长的结构,含有用于一个单一Java过程、实例初始化过程、或类或界面初始化过程的Java虚拟机指令和辅助信息。该结构具有以下的格式:
MethodInfo{

u2 name_index;
u2 signature_index;

u1 max_local;

u1 max_arg;

u1 max_stack;

u1 access_flags;

u2 code_length

u2 exception_length;

u1 code[code_length];

{u2 start_pc;

u2 end_pc;

u2 handler_pc;

u2 catch_type;

}einfo[exception_length];

}
MethodInfo结构的诸项如下所述:
name_index
name_index项的值必须要么代表一个特殊内部过程名-<init>或者<clinit>,要么代表一个有效的Java过程名。由name_index代表的Java过程名必须是与由原始类文件的对应method_info结构所描述的完全相同的Java过程名。
signature_index
signature_index项的值必须代表一个有效的Java过程描述符。由signature_index代表的Java过程描述符必须是与由原始类文件的对应method_info结构所描述的完全相同的Java过程描述符。
max_local
max_local项的值给出该过程所用的局部变量的数目,不包括调用时传递给过程的参数。第一个局部变量的变址值是0。对于一个单字值最大的局部变量变址量是max_locals-1。
max_arg
max_arg项的值规定向该过程传递的参数的最大数目。
max_stack
max_stack项的值规定在执行该过程期间的任何时刻操作数堆栈上的最多字数。
access_flags
access_flags项的值是用于描述对过程或实例初始化过程的访问许可和过程的特性的修改符的一个屏蔽。这些access_flags修改符和它们的值是与原始类文件的对应method_info结构中的完全相同的access_flags修改符。
code_length
code_length项的值给出该过程的代码数组中的字节数。code_length的值必须大于0,代码数组不得为空数组。
exception_length
exception_length项的值给出exception_info表中的条目数。
code[]
code(代码)数组给出实现该过程的Java虚拟机代码的实际字节。当代码数组被读入字节可寻址机器上的存储器中时,如果数组的第一个字节是在4字节边界上对齐的,则表切换(tableswitch)和查找切换(lookupswitch)的32位位移地址是4字节对齐的;关于代码数组对齐的重要性可参阅对这些指令的说明以了解更多情况。对代码数组内容的具体限制很广泛,与《Java虚拟机规范》一文中所述的相同。
einfo[]
einfo数组中的每个条目都描述代码数组中的一个异常处理程序。每个einfo条目都含有以下各项:
start_pc、end_pc
start_pc、end_pc这两项的值表示代码数组中异常处理程序活动时所处的范围。
start_pc的值必须是一个在某指令的操作码的代码数组内的有效变址量。end_pc的值要么必须是在某指令的操作码的代码数组内的有效变址量,要么必须等于code_length即代码数组的长度。start_pc的值必须小于end_pc的值。
start_pc是包含的,end_pc是排除的,就是说,当程序计数器位于区间[start_pc,end_pc]内时,异常处理程序必须是活动的。
handler_pc
handler_pc项的值指示异常处理程序的开始。该项的值必须是代码数组内的一个有效变址,必须是某指令的操作码的变址,必须小于code_length项的值。
catch_type
如果catch_type项的值是非零的,它必须代表一个有效的Java类类型。由catch_type代表的Java类类型必须是与由原始类文件的对应method_info结构中的catch_type所描述的完全相同的Java类类型。该类必须是类Throwable或者它的其中一个子类。异常处理程序仅当被抛出的异常是给定类或者它的其中一个子类的一个实例时才被调用。
如果catch_type项的值为零,则该异常处理程序就对所有异常而被调用。这被用于最终的执行。
Attributes
原始类文件中使用的属性要么被剔除,要么被重组,目的是为了紧凑。
可以将预先定义的属性SourceFile、ConstantValue、Exception、LineNumberTable和Local-VariableTable剔除,而不牺牲Java字节代码解释所需的任何信息。
预先定义的含有特定过程的所有字节代码的属性Code,在对应的MethodInfo结构中被移动。
对Java卡虚拟机代码的限制
过程、实例初始化过程、或者类或界面初始化过程的Java卡虚拟机代码被存储在卡类文件的MethodInfo结构的数组代码中。对这个代码数组的静态的和结构性的两种限制都与红皮书中所述的相同。
Java卡虚拟机和Java卡类文件格式的限制
该版本的《Java卡虚拟机规范》在Java卡虚拟机中施加以下限制:
每个卡的类文件常量池由CardClassFile结构()的16位const_size域限制在65535个条目。这作为对一个单一卡类文件的总体复杂程度的内部限制。这个计数也包括对应卡中应用程序可用的类层次的常量池的条目。
每个过程的代码量由MethodInfo结构中的变址量大小限制在65535个字节。
过程中的局部变量个数由MethodInfo结构()的max_local项的大小限制在255。
类的域的个数由ClassInfo结构()的max_field和max_sfield项的大小限制在510。
类的过程个数由ClassInfo结构()的max_method项的大小限制在255。
操作数堆栈的大小由MethodInfo结构()的Max_stack域限制到255个字。
参考文献
[1]Tim Linfholm and Frank Yellin,The Java Virtual MachineSpeicification,Addison-Wesley,1996。
附录B
串到ID输入和输出
为了卡JVM的正确操作,很重要的一点是对所说明和生成的各ID加以正确的管理。这种管理由串到ID输入文件String-ID INMap中的定义来控制。这个文本文件的基础如以下所示,它说明名字的哪些地方可以用于什么用途。这个映射的一种可能安排可以保留一些ID供卡JVM解释器作内部使用,其余的被分配给卡JVM应用程序。
#
# String-ID INMap  文件
#
#  4000-7FFF    可供应用程序所用
#  F000-FFFE    保留供卡JVM作内部使用
#
constantBase F000       #从F000到FFFF的区域保留
                        #供卡JVM作内部使用
                        #
MainApplication         #F000-Startup类的名字
                        #(随各应用程序而变)
main()V                 #F001-Startup过程的名字
                        #(可以随应用程序而变)
java/lang/Object        #F002
java/lang/String        #F003
<init>()V               #F004
<clinit>()V             #F005
[L                      #F006
[I                      #F007
[C                      #F008
[B                      #F009
[S                      #F000A
#
constantBase FFF0       #本区保留用于简单返回类型
L                       #FFF0
V                    #FFF1
I                    #FFF2
S                    #FFF3
C                    #FFF4
B                    #FFF5
Z                    #FFF6
#
constantBase 4000    #此处开始的该空间依应用程序而定。
实际上,所有要被加载进智能卡中的应用程序都在OX 4000-OX7FFF之间被分配一个它们自己的ID。对于每一个应用程序,这一空间是空闲的,因为不允许所加载的应用程序访问其它应用程序。
一定要注意管理预加载的类库的ID。通过串到ID输出文件String-IDOUTMap文件的生成(可选)可有助于这些ID的管理。这种映射是以新String-ID绑定扩充的String-ID INMap。这些绑定可以是在卡类文件转换器应用程序终止时产生。产生String-ID OUTMap用于在卡上加载的支持库和OS接口。该映射可用
作使用加载在该卡上的支持库和OS接口的智能卡应用程序的String-ID INMap。
作为一个例子,考虑下面的Java程序,Hello Smart Card.Java。在对其编译时,产生一个类文件Hello Smart Card.Class。该类文件已嵌入表示该类名、过程和类型信息的串中。根据上述的String-ID INMap,卡类文件转换器产生一个卡类文件,该文件用卡类文件转换器分配的ID替换该类文件中的串。表1列出了在Hello Smare Card。Class的常量池中发现的串,这些串具有各自的卡类文件转换器分配的ID。
注:一些串(象“Java/Lang/Object”)具有预先分配的值(F002),一些串(象“()V”)获得一个新值(4004)。
Program:HelloSmartCard.java
public class HelloSmartCard{
 public byte aVariable;
 public static void main(){
  HelloSmartCard h=new HelloSmartCard();
  h.aVariable=(byte)13;
 }
}
String-ID OUT Map的相关条目
附录C
由优选实施例中的卡JVM支持的字节代码
AALOAD               AASTORE              ACONST_NULL

ALOAD                ALOAD_0              ALOAD_1

ALOAD_2              ALOAD_3              ARETURN

ARRAYLENGTH          ASTORE               ASTORE_0

ASTORE_1             ASTORE_2             ASTORE_3

ATHROW               BALOAD               BASTORE

CHECKCAST            DUP                  DUP2

DUP2_X1              DUP2_X2              DUP_X1

DUP_X2               GETFIELD             GETSTATIC

GOTO                 IADD                 IALOAD
IAND                 IASTORE              ICONST_0

ICONST_1             ICONST_2             ICONST_3

ICONST_4             ICONST_5             ICONST_M1

IDIV                 IFEQ                 IFGE

IFGT                 IFLE                 IFLT

IFNE                 IFNONNULL            IFNULL

IF_ACMPEQ            IF_ACMPNE            IF_ICMPEQ

IF_ICMPGE            IF_ICMPGT            IF_ICMPLE

IF_ICMPLT            IF_ICMPNE            IINC

ILOAD                ILOAD_0              ILOAD_1

ILOAD_2              ILOAD_3              IMUL

INEG                 INSTANCEOF           INT2BYTE

INT2CHAR             INT2SHORT            INVOKEINTERFACE

INVOKENONVIRTUAL     INVOKESTATIC         INVOKEVIRTUAL

IOR                  IREM                 IRETURN

ISHL                 ISHR                 ISTORE

ISTORE_0             ISTORE_1             ISTORE_2

ISTORE_3             ISUB                 IUSHR

IXOR                 JSR                  LDC1

LDC2                 LOOKUPSWITCH         NEW

NEWARRAY             NOP                  POP

POP2                 PUTFIELD             PUTSTATIC

RET                  RETURN               SALOAD

SASTORE              SIPUSH               SWAP

TABLESWITCH          BIPUSH
优选实施例中支持的字节代码的标准Java字节代码号
package util;

/*

*  由该JVM处理的实际Java字节代码的列表

*  参见Lindohlm和Yellin的文章。

*

*  版权属于美国的Schlumberger Austin Products Center,

*             Schlumberger,Austin,Texas,1996。

*/

public interface BytecodeDefn{

  public static final byte j_NOP=(byte)0;

  public static final byte ACONST_NULL=(byte)1;

  public static final byte ICONST_M1=(byte)2;

  public static final byte ICONST_0=(byte)3;

  public static final byte ICONST_1=(byte)4;

  public static final byte ICONST_2=(byte)5;

  public static final byte ICONST_3=(byte)6;

  public static final byte ICONST_4=(byte)7;

  public static final byte ICONST_5=(byte)8;

  public static final byte BIPUSH=(byte)16;

  public static final byte SIPUSH=(byte)17;

  public static final byte LDC1=(byte)18;

  public static final byte LDC2=(byte)19;

  public static final byte ILOAD=(byte)21;

  public static final byte ALOAD=(byte)25;

  public static final byte ILOAD_0=(byte)26;

  public static final byte ILOAD_1=(byte)27;

  public static final byte ILOAD_2=(byte)28;

  public static final byte ILOAD_3=(byte)29;

  public static final byte ALOAD_0=(byte)42;

  public static final byte ALOAD_1=(byte)43;
				
				<dp n="d42"/>
public static final byte ALOAD_2=(byte)44;

public static final byte ALOAD_3=(byte)45;

public static final byte IALOAD=(byte)46;

public static final byte AALOAD=(byte)50;

public static final byte BALOAD=(byte)51;

public static final byte CALOAD=(byte)52;

public static final byte ISTORE=(byte)54;

public static final byte ASTORE=(byte)58;

public static final byte ISTORE_0=(byte)59;

public static final byte ISTORE_1=(byte)60;

public static final byte ISTORE_2=(byte)61;

public static final byte ISTORE_3=(byte)62;

public static final byte ASTORE_0=(byte)75;

public static final byte ASTORE_1=(byte)76;
public static final byte ASTORE_2=(byte)77;

public static final byte ASTORE_3=(byte)78;

public static final byte IASTORE=(byte)79;

public static final byte AASTORE=(byte)83;

public static final byte BASTORE=(byte)84;

public static final byte CASTORE=(byte)85;

public static final byte POP=(byte)87;

public static final byte POP2=(byte)88;

public static final byte DUP=(byte)89;

public static final byte DUP_X1=(byte)90;

public static final byte DUP_X2=(byte)91;

public static final byte DUP2=(byte)92;

public static final byte DUP2_X1=(byte)93;

public static final byte DUP2_X2=(byte)94;

public static final byte SWAP=(byte)95;

public static final byte IADD=(byte)96;

public static final byte ISUB=(byte)100;

public static final byte IMUL=(byte)104;

public static final byte IDIV=(byte)108;

public static final byte IREM=(byte)112;

public static final byte INEG=(byte)116;
				
				<dp n="d43"/>
public static final byte ISHL=(byte)120;

public static final byte ISHR=(byte)122;

public static final byte IUSHR=(byte)124;

public static final byte IAND=(byte)126;

public static final byte IOR=(byte)128;

public static final byte IXOR=(byte)130;

public static final byte IINC=(byte)132;

public static final byte INT2BYTE=(byte)145;

public static final byte INT2CHAR=(byte)146;

public static final byte INT2SHORT=(byte)147;

public static final byte IFEQ=(byte)153;

public static final byte IFNE=(byte)154;

public static final byte IFLT=(byte)155;

public static final byte IFGE=(byte)156;

public static final byte IFGT=(byte)157;

public static final byte IFLE=(byte)158;

public static final byte IF_ICMPEQ=(byte)159;

public static final byte IF_ICMPNE=(byte)160;

public static final byte IF_ICMPLT=(byte)161;

public static final byte IF_ICMPGE=(byte)162;

public static final byte IF_ICMPGT=(byte)163;

public static final byte IF_ICMPLE=(byte)164;

public static final byte IF_ACMPEQ=(byte)165;

public static final byte IF_ACMPNE=(byte)166;

public static final byte GOTO=(byte)167;

public static final byte j_JSR=(byte)168;

public static final byte RET=(byte)169;

public static final byte TABLESWITCH=(byte)170;

public static final byte LOOKUPSWITCH=(byte)171;

public static final byte IRETURN=(byte)172;

public static final byte ARETURN=(byte)176;

public static final byte RETURN=(byte)177;

public static final byte GETSTATIC=(byte)178;

public static final byte PUTSTATIC=(byte)179;

public static final byte GETFIELD=(byte)180;
				
				<dp n="d44"/>
public static final byte PUTFIELD=(byte)181;

public static final byte INVOKEVIRTUAL=(byte)182;

public static final byte INVOKENONVIRTUAL=(byte)183;

public static final byte INVOKESTATIC=(byte)184;

public static final byte INVOKEINTERFACE=(byte)185;

public static final byte NEW=(byte)187;

public static final byte NEWARRAY=(byte)188;

public static final byte ARRAYLENGTH=(byte)190;

public static final byte ATHROW=(byte)191;

public static final byte CHECKCAST=(byte)192;

public static final byte INSTANCEOF=(byte)193;

public static final byte IFNULL=(byte)198;

public static final byte IFNONNULL=(byte)199;
附录D
卡类文件转换程序的字节代码转换过程
/*

*再处理代码块

*/

static

void

reprocessMethod(iMethod*imeth)

{

 int pc;

 int npc;

 int align;

 bytecode*code;

 int codelen;

 int i;

 int opad;

 int npad;

 int apc;

 int high;

 int low;

/*Codeinfo表跟踪有效Java字节代码及其对应

*    的翻译

*/

 code=imeth->external->code;

 codelen=imeth->external->code_length;

 jumpPos=0;

 align=0;

 /*   扫描不支持的操作码         */

 for(pc=0;pc<codelen;pc=npc){

  if(codeinfo[code[pc]].valid==0){

    error(″Unsupported opcode%d″,code[pc]);
				
				<dp n="d46"/>
 }

 npc=nextPC(pc,code);

}

/*  扫描跳转指令并插入跳转表            */

for(pc=0;pc<codelen;pc=npc){

 npc=nextPC(pc,code);

 if(codeinfo[code[pc]].valid==3){

   insertJump(pc+1,pc,(int16)((code[pc+1]<<8)|code[pc+2]));

  }

  eise if(codeinfo[code[pc]].valid==4){

  apc=pc &amp; -4;

  low=(code[apc+8]<<24)|(code[apc+9]<<16)

     |(code[apc+10]<<8)|code[apc+11];

  high=(code[apc+12]<<24)|(code[apc+13]<<16)

     |(code[apc+14]<<8)|code[apc+15];

  for(i=0;i<high-low+1;i++){

   insertJump(apc+(i*4)+18,pc,

          (int16)((code[apc+(i*4)+18]<<8)|code[apc+(i*4)+19]));

  }

  insertJump(apc+6,pc,(int16)((code[apc+6]<<8)|code[apc+7]));

 }

 else if(codeinfo[code[pc]].valid==5){

  apc=pc &amp; -4;

  low=(code[apc+8]<<24)|(code[apc+9]<<16)

     |(code[apc+10]<<8)|code[apc+11];

  for(i=0;i<low;i++){

   insertJump(aPc+(i*8)+18,pc,

          (int16)((code[apc+(i*8)+18]<<8)|code[apc+(i*8)+19]));

  }

  insertJump(apc+6,pc,(int16)((code[apc+6]<<8)|code[apc+7]));

 }

}
				
				<dp n="d47"/>
#ifdef TRANSLATE_BYTECODE

 /*    翻译专用操作的以生成通用操作码   */

 for(pc=0;pc<codelen;pc=npc){

  /*  这是一个翻译代码         */

  if(codeinfo[code[pc]].valid==2){

    switch(code[pc]){

    case ILOAD_0:

    case ILOAD_1:

    case ILOAD_2:

    case ILOAD_3:

     insertSpace(code,&amp;codelen,pc,1);

     align+=1;

     code[pc+1]=code[pc]-ILOAD_0;

     code[pc+0]=ILOAD;

     break:

    case ALOAD_0:

    case ALOAD_1:

    case ALOAD_2:

    case ALOAD_3:

     insertSpace(code,&amp;codelen,pc,1);

     align+=1;

     code[pc+1]=code[pc]-ALOAD_0;

     code[pc+0]=ALOAD;

     break;

    case ISTORE_0:

    case ISTORE_1:

    case ISTORE_2:

    case ISTORE_3:

     insertSpace(code,&amp;codelen,pc,1);

     align+=1;

     code[pc+1]=code[pc]-ISTORE_0;

     code[pc+0]=ISTORE;
				
				<dp n="d48"/>
 break;

case ASTORE_0:

case ASTORE_1:

case ASTORE_2:

case ASTORE_3:

 insertSpace(code,&amp;codelen,pc,1);

 align+=1;

 code[pc+1]=code[pc]-ASTORE_0;

 code[pc+0]=ASTORE;

 break;

case ICONST_M1:

 insertSpace(code,&amp;codelan,pc,2);

 align+=2;

 code[pc+2]=255;

 code[pc+1]=255;

 code[pc+0]=SIPUSH;

 break;

case ICONST_0:

case ICONST_1:

case ICONST_2:

case ICONST_3:

case ICONST_4:

case ICONST_5:
 insertSpace(code,&amp;codelen ,pc,2);

 align+=2;

 code[pc+2]=code[pc]-ICONST_0;

 code[pc+1]=0;

 code[pc+0]=SIPUSH;

 break;

case LDC1:

 insertSpace(code,&amp;codelen,pc,1);
				
				<dp n="d49"/>
align+=1;

code[pc+1]=0;

code[pc+0]=LDC2;

break;
				
				<dp n="d50"/>
 case BIPUSH:

  insertSpace(code,&amp;codelen,pc,1);

  align+=1;

  if((int8)code[pc+2]>=0){

    code[pc+1]=0;

  }

  else{

    code[pc+1]=255;

  }

  code[pc+0]=SIPUSH;

  break;

case INT2SHORT:

 removeSpace(code,&amp;codelen,pc,1);

 align-=1;

 npc=pc;

 continue;

 }

}

elseif(codeinfo[code[c]].valid==4‖codeinfo[code[pc]].valid==5){

 /* 切换被对齐到4字节的边界。由于我们在插入,删除字节代码,

 * 这会改变切换指令的对齐。

 * 因此我们必须重新调整切换中的填充来加以补偿。

 */

 opad=(4-(((pc+1)-align)%4))%4;/*当前切换填充      */

 npad=(4-((pc+1)%4))%4;  /*新切换填充      */

 if(npad>opad){

   insertSpace(code,&amp;codelen,pc+1,npad-opad);

   align+=(npad-opad);

 }

 else if(npad<opad){

  removeSpace(code,&amp;codelen,pc+1,opad-npad);

  align-=(opad-npad);

 }
				
				<dp n="d51"/>
  }

  npc=nextPC(pc,code);

 }

#endif

 /*重链接常量               */

 for(pc=0;pc<codelen;pc=npc){

  npc=nextPC(pc,code);

  i=(uint16)((code[pc+1]<<8)+code[pc+2]);

  switch(code[pc]){

  case LDC2:

   /*′i′==通用变址*/

   switch(cltem(i).type){

   case CONSTANT_lnteger.

    i=cltem(i).v.tint;

    code[pc]=SIPUSH;

    break;

   case CONSTANT_String:

    i=buildStringlndex(i);

    break;

   default:

    error(″Unsupported loading of constant type″);

    break;

   }

   break;

  case NEW:

  case INSTANCEOF:

  case CHECKCAST:

   /*′i′==类变址    */
				
				<dp n="d52"/>
   i=buildClasslndex(i);

   break;

  case GETFIELD:

  case PUTFIELD:

   /*′i′==域变址    */

   /*i=buildFieldSignaturelndex(i);*/

   i=buildStaticFieldSignaturelndex(i);

   break;

  case GETSTATIC:

  case PUTSTATIC:

   /*′i′==域变址   */

   i=buildStaticFieldSignaturelndex(i);

   break;

  case INVOKEVIRTUAL:

  case INVOKENONVIRTUAL:

  case INVOKESTATIC:

  case INVOKEINTERFACE:

   /*′i′==过程签名变址   */

   i=buildSignaturelndex(i);

   break;

  }

  /*插入应用程序的常量引用    */

  code[pc+1]=(i>>8)&amp; 0×FF;

  code[pc+2]=i &amp; 0×FF;

 }

#ifdef MODIFY_BYTECODE

 /*翻译代码    */

 for(pc=0;pc<codelen;pc=npc){

  npc=nextPC(pc,code);
				
				<dp n="d53"/>
  code[pc]=codeinfo[code[pc]].translation;

 }

#endif
 /*重链接跳转*/

 for(i=0;i<jumpPos;i++){

  apc=jumpTable[i].at;

  pc=jumpTable[i].from;
  npc=jumpTable[i].to-pc;

  code[apc+0]=(npc>>8)&amp; 0×FF;

  code[apc+1]=npc &amp; 0×FF;

 }

 /*固定长度    */

 imeth->external->code_length=codelen;

 imeth->esize=(SIZEOFMETHOD+codelen+3)&amp;-4;

}
附录E
加载和执行控制程序举例
public class Bootstrap{

∥整个程序所使用的常量

static final byte BUFFER_LENGTH    =32;

static final byte ACK_SIZE    =(byte)1;

static final byte ACK_CODE    =(byte)0;

static final byte OS_HEADER_SIZE    =(byte)0×10;

static final byte GPOS_CREATE_FILE    =(byte)0×E0;

static final byte ST_INVALID_CLASS   =(byte)0×C0;

static final byte ST_INVALID_PARAMETER  =(byte)0×A0;

static final byte ST_INS_NOT_SUPPORTED  =(byte)0×B0;

static final byte ST_SUCCESS        =(byte)0×00;

static final byte ISO_COMMAND_LENGTH    =(byte)5;

static final byte ISO_READ_BINARY   =(byte)0×B0;

static final byte ISO_UPDATE_BINARY     =(byte)0×D6;

static final byte ISO_INIT_APPLICATION  =(byte)0×F2;

static final byte ISO_VERIFY_KEY    =(byte)0×2A;

static final byte ISO_SELECT_FILE   =(byte)0×A4;

static final byte ISO_CLASS      =(byte)0×C0;
static final byte ISO_APP_CLASS     =(byte)0×F0;

publc static void main(){

 byte pbuffer[]=new byte[ISO_COMMAND_LENGTH];

 byte dbuffer[]=new byte[BUFFER_LENGTH];

 byte ackByte[]=new byte[ACK_SIZE];

 ∥short fileld;

 short offset;
				
				<dp n="d55"/>
byte bRetumStatus;

∥初始化通信

_OS.SendATR();

do{

  ∥提取命令首部

  _OS.GetMessage(pbuffer,ISO_COMMAND_LENGTH,ACK_CODE);

  ∥检验报文的类-仅ISO和应用程序

  if((pbuffer[0]!=ISO_APP_CLASS)

  &amp;&amp;(pbuffer[0]!=ISO_CLASS)){

   _OS.SendStatus(ST_INVALID_CLASS);

 }

  else{

   ∥通过切换

   ∥发送应答代码

   ∥检验数据长度是否太大

   if(pbuffer[4]>BUFFER_LENGTH){

     bReturnStatus=ST_INVALID_PARAMETER;

   }

   else

   {

    switch(pbuffer[1]){

    case ISO_SELECT_FILE:

      ∥假定长度总是2

      if(pbuffer[4]!=2){

         bRetumStatus=ST_INVALID_PARAMETER;

      }

      else

      {

         ∥读取数据缓冲器中的field(offset)

         _OS.GetMessage(dbuffer,(byte)2,pbuffer[1]);

         ∥将dbuffer[0..1]变换成短整数
				
				<dp n="d56"/>
    offset=(short)((dbuffer[0]<<8)|(dbuffer[1]&amp;0×00FF));

    bReturnStatus=_OS.SelectFile(offset);

  }

  break;

case ISO_VERIFY_KEY:

  ∥从终端取得密钥

  _OS.GetMessage(dbuffer,pbuffer[4],pbuffer[1]);

  bReturnStatus=_OS.VerifyKey(pbuffer[3],

                  dbuffer,

                  pbuffer[4]);

  break;

case ISO_INIT_APPLICATION:

  ∥应发送有效程序文件的ID

  _OS.GetMessage(dbuffer,(byte)1,pbuffer[1]);

  ∥通过变换从pbuffer[2..3]计算fileld(offset)

  offset=(short)((pbuffer[2]<<8)|(pbuffer[3]&amp;0×00FF));

  bReturnStatus=_OS.Execute(offset,

                  dbuffer[0]);

  break;

case GPOS_CREATE_FILE:

  if(pbuffer[4]=OS_HEADER_SIZE){

     bReturnStatus=ST_INVALID_PARAMETER;

     break;

  }

  ∥接收数据

  _OS.GetMessage(dbuffer,pbuffer[4],pbuffer[1]);

  bReturnStatus=_OS.CreateFile(dbuffer);

  break;

case ISO_UPDATE_BINARY:

  _OS.GetMessage(dbuffer,pbuffer[4],pbuffer[1]);

  ∥通过变换从pbuffer[2..3]计算偏移
				
				<dp n="d57"/>
      offset=(short)((pbuffer[2]<<8)|(pbuffer[3]&amp;0×00FF));

      ∥假定有文件已被选择

      bReturnStatus=_OS.WriteBinaryFile(offset,

                           pbuffer[4],

                           dbuffer);

      break;

      case ISO_READ_BINARY:

        ∥通过变换从pbuffer[2..3]计算偏移

        offset=(short)((pbuffer[2]<<8)|(pbuffer[3]&amp;0×00FF));

       ∥假定某文件已经被选择

       bReturnStatus=_OS.ReadBinaryFile(offset,

                           pbuffer[4],

                           dbuffer);

       ∥如果成功则发送数据

       ackByte[0]=pbuffer[1];

       if(bReturnStatus==ST_SUCCESS){

         _OS.SendMessage(ackByte,ACK_SIZE);

         _OS.SendMessage(dbuffer,pbuffer[4]);

         }

         break;

       default:

         bReturnStatus=ST_INS_NOT_SUPPORTED;

       }

      }

     _OS.SendStatus(bReturnStatus);

    }

   }

   while(true);

  }

}
附录F
优选实施例中访问卡操作系统功能的过程
public class_OS{

 static native byte    SelecfFile        (short file_id);

 static native byte    SelectParent      ();

 static native byte    SelectCD          ();

 static native byte    SelectRoot        ();

 static native byte    CreateFile        (byte file_hdr[]);

 static native byte    DeleteFile        (short file_id);

 ∥一般文件操作

 static native byte    ResetFile         ();

 static native byte    ReadByte          (byte offset);
 static native short   ReadWord          (byte offset);

 ∥首部操作

 static native byte    GetFileInfo       (byte file_hdr[]);

 ∥二进制文件支持

 static native byte    ReadBinaryFile    (short offset,

                               byte data_length,

                               byte buffer[]);

 static native byte    WriteBinary File  (short offset,

                               byte data_length,

                               byte buffer[]);

 ∥记录文件支持

 static native byte    SelectRecord      (byte record_nb,

                               byte mode);

 static native byte    NextRecord        ();

 staric native byte    PreviousRecord    ();
				
				<dp n="d59"/>
static native byte    ReadRecord     (byte record_data[],

                            byte record_nb,

                            byte offset,

                            byte length);

static native byte    WriteRecord    (byte buffer[],

                            byte record_nb,

                            byte offset,

                            byte length);

∥循环文件支持

static native byte    LastUpdatedRec ();

∥报文传递功能

static native byte    GetMessage     (byte buffer[],

                            byte expected_length,

                            byte ack_code);

static native byte    SendMessage    (byte buffer[],

                            byte data_length);

static native byte    SetSpeed       (byte speed);

∥身份管理

static native byte    CheckAccess    (byte ac_action);

static native byte    VerifyKey      (byte key_number,

                            byte key_buffer[],

                            byte key_length);

static native byte    VerifyCHV      (byte CHV_number,

                            byte CHV_buffer[],

                            byte unblock_flag);

static native byte    ModifyCHV      (byte CHV_number,

                            byte old_CHV_buffe[],

                            byte new_CHV_buffer[],

                            byte unblock_flag);
				
				<dp n="d60"/>
static native byte    GetFileStatus       ();

static native byte    SetFileStatus       (byte file_status);

static native byte    GrantSupervisorMode ();

static native byte    RevokeSupervisorMode();

static native byte    SetFileACL          (byte file_acl[]);

static native byte    GetFileACL          (byte file_acl[]);

∥文件上下文操作

static native void    Init FileStatus     ();

static native void    Backup FileStatus   ();

static native void    RestoreFileStatus   ();

∥实用程序

static native byte    CompareBuffer       (byte pattern_length,

                            byte buffer_1[],

                            byte buffer_2[]);

static native short   AvailableMemory     ();

static native void    ResetCard           (byte mode);

static native byte    SendATR             ();

static native byte    SetDefaultATR       (byte buffer[],

                            byte length);

static native byte    Execute             (short file_id,

                            byte flag);

∥全局状态变量函数

static native byte    Getldentity         ();

static native byte    GetRecordNb         ();

static native short   GetApplicationld    ();

static native byte    GetRecordLength     ();

static native byte    GetFileType         ();

static natiye short   GetFileLength       ();

static native void    SendStatus          (byte status);
				
				<dp n="d61"/>
}
附录G
字节代码属性表
划分Java字节代码成类型组
每个字节代码都被分配一个与之关联的5位类型。它用于将代码划分为行为相似的各个集合。一般来说,这种行为反映的是各类型的字节代码是如何在堆栈上操作的;但是,类型0、13、14和15反映的是特殊种类的指令,如注解栏所注明。
下表表示在每类指令被执行前后堆栈的状态。
类型  执行前                   执行后        注解
0                                               非法指令
1      stk0==int stk1==int   pop(1)
2      stk0==int               pop(1)
3      stk0==int stk1==int   pop(2)
4
5      push(1)
6      stk0==int stk1==int   pop(3)
7      stk0==int               pop(1)
8      stk0==ref               pop(1)
9      stk0==int               pop(1)
10     push(1)                   stk0<-int
11     push(1)                   stk0<-ref
12     stk0==ref               stk0<-int
13                                               DUPs,SWAP指令
14                                               INVOKE指令
15                                               FIELDS指令
16                               stk0<-ref
使用标准Java字节代码(设有重新排序)-属性查找表
/*

*字节代码译码信息表。该表内容是字节代码类型和

*字节代码长度。当前支持代码0-201的所有

*标准字节代码(共202个代码)

*/

#define    T_   0

#define    T3   1

#define    T6   2

#define    T1   3

#define    T2   4

#define    T7   5

#define    T9   6

#define    T8   7

#define    T12  8

#define    T10  9

#define    T5   10

#define    T11  11

#define    T16  12

#define    T4   13

#define    T13  14

#define    T14  15

#define    T15  16

#define    D(T,L)

_BUILD_ITYPE_AND_ILENGTH(T,L)

#define   _BUILD_ITYPE_AND_ILENGTH(T,L)

(_BUILD_ITYPE(T)|_BUILD_ILENGTH(L))

#define    _BUILD_ITYPE(T)    ((T)<<3)

#define    _BUILD_ILENGTH(L)         (L)

#define    _GET_ITYPE(I)             ((I)&amp;0×F8)

#define    _GET_ILENGTH(I)    ((I)&amp;0×07)
				
				<dp n="d64"/>
const uint8_SCODE_decodeinfo[256]={

    D(T4,1),      /*NOP          */

    D(T11,1),     /*ACONST_NULL  */

    D(T10,1),     /*ICONST_M1    */

    D(T10,1),     /*ICONST_0     */

    D(T10,1),     /*ICONST_1     */

    D(T10,1),     /*ICONST_2     */

    D(T10,1),     /*ICONST_3     */

    D(T10,1),     /*ICONST_4     */

    D(T10,1),     /*ICONST_5     */

    D(T_,1),

     D(T_,1),

     D(T_,1),
 
     D(T_,1),

     D(T_,1),

     D(T_,1),

     D(T_,1),

     D(T10,2),     /*BIPUSH       */

    D(T10,3),     /*SIPUSH       */
    D(T_,2),      /*LDC1         */
 
    D(T11,3),     /*LDC2         */

    D(T_,3),

     D(T5,2),      /*ILOAD        */

    D(T_,2),

     D(T_,2),

     D(T_,2),

     D(T5,2),      /*ALOAD        */

    D(T5,1),      /*ILOADD_0     */

    D(T5,1),      /*ILOAD_1      */

    D(T5,1),      /*ILOAD_2      */

    D(T5,1),      /*ILOAD_3      */

    D(T_,1),

     D(T_,1),

     D(T_,1),

     D(T_,1),
				
				<dp n="d65"/>
D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T5,1),      /*ALOAD_0   */

D(T5,1),      /*ALOAD_1   */

D(T5,1),      /*ALOAD_2   */

D(T5,1),      /*ALOAD_3   */

D(T_,1),      /*IALOAD    */

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),      /*AALOAD    */

D(T7,1),      /*BALOAD    */

D(T_,1),      /*CALOAD    */

D(T7,1),      /*SALOAD    */

D(T2,2),      /*ISTORE    */

D(T_,2),

D(T_,2),

D(T_,2),

D(T8,2),      /*ASTORE    */

D(T2,1),      /*ISTORE_0  */

D(T2,1),      /*ISTORE_1  */

D(T2,1),      /*ISTORE_2  */

D(T2,1),      /*ISTORE_3  */

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),
				
				<dp n="d66"/>
D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T8,1),      /*ASTORE_0    */

D(T8,1),      /*ASTORE_1    */

D(T8,1),      /*ASTORE_2    */

D(T8,1),      /*ASTORE_3    */

D(T_,1),      /*IASTORE*/

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),      /*AASTORE     */

D(T6,1),      /*BASTORE     */

D(T_,1),      /*CASTORE     */

D(T6,1),      /*SASTORE     */

D(T2,1),      /*POP         */

D(T3,1),      /*POP2        */

D(T13,1),     /*DUP         */

D(T13,1),     /*DUP_X1      */

D(T13,1),     /*DUP_X2      */

D(T13,1),     /*DUP2        */

D(T13,1),     /*DUP2_X1     */

D(T13,1),     /*DUP2_X2     */

D(T13,1),     /*SWAP        */

D(T1,1),      /*IADD        */

D(T_,1),

D(T_,1),

D(T1,1),

D(T_,1),      /*ISUB       */

D(T_,1),

D(T_,1),

D(T_,1),
				
				<dp n="d67"/>
D(T1,1),    /*IMUL        */

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),    /*IDIV        */

D(T_,1),

D(T_,1),

D(T_,1),

D(T1,1),    /*IREM        */

D(T_,1),

D(T_,1),

D(T_,1),

D(T9,1),    /*INEG        */

D(T_,1),

D(T_,1),

D(T_,1),

D(T1,1),    /*ISHL        */

D(T_,1),

D(T1,1),    /*ISHR        */

D(T_,1),

D(T1,1),    /*IUSHR       */

D(T_,1),

D(T1,1),    /*IAND        */

D(T_,1),

D(T1,1),    /*IOR         */

D(T_,1),

D(T1,1),    /*IXOR        */

D(T_,1),

D(T4,3),    /*IINC        */

D(T_,1),
D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),
				
				<dp n="d68"/>
D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T9,1),    /*INT2BYTE    */

D(T9,1),    /*INT2CHAR    */

D(T_,1),    /*INT2SHORT   */

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T2,3),    /*IFEQ        */

D(T2,3),    /*IFNE        */

D(T2,3),    /*IFLT        */

D(T2,3),    /*IFGE        */

D(T2,3),    /*IFGT        */

D(T2,3),    /*IFLT        */

D(T3,3),    /*IF_ICMPEQ   */
D(T3,3),    /*IF_ICMPNE   */

D(T3,3),    /*IF_ICMPLT   */

D(T3,3),    /*IF_ICMPGE   */

D(T3,3),    /*IF_ICMPGT   */

D(T3,3),    /*IF_ICMPLE   */

D(T3,3),    /*IF_ACMPEQ   */

D(T3,3),    /*IF_ACMPNE   */

D(T4,3),    /*GOTO        */

D(T_,3),    /*JSR         */

D(T_,2),    /*RET         */

D(T2,0),    /*TABLESWITCH */

D(T2,0),    /*LOOKUPSWITCH*/

D(T2,1),    /*IRETURN     */

D(T_,1),
				
				<dp n="d69"/>
D(T_,1),

D(T_,1),

D(T8,1),     /*ARETURN        */

D(T4,1),     /*RETURN         */

D(T15,3),    /*GETSTATIC      */

D(T15,3),    /*PUTSTATIC      */

D(T15,3),    /*GETFIELD       */

D(T15,3),    /*PUTFIELD       */

D(T14,3),    /*INVOKEVIRTUAL  */

D(T14,3),    /*INVOKESPECIAL  */

D(T14,3),    /*INVOKESTATIC   */

D(T14,5),    /*INVOKEINTERFACE*/

D(T_,1),

D(T11,3),    /*NEW            */

D(T16,2),    /*NEWARRAY       */

D(T_,3),

D(T12,1),    /*ARRAYLENGTH    */

D(T8,1),     /*ATHROW  */

D(T16,3),    /*CHECKCAST      */

D(T12,3),    /*INSTANCEOF     */

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,4),

D(T8,3),     /*IFNULL  */

D(T8,3),     /*IFNONNULL     */

D(T_,5),

D(T_,5),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),
				
				<dp n="d70"/>
D(T_,1),
D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),

D(T_,1),
				
				<dp n="d71"/>
  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  D(T_,1),

  (T_,1),

  D(T_,1),
};
附录H
通过类型对Java字节代码进行的检查
将指令解码,得出要生成下一个PC的长度、以及指令类型:
pcarg1=_GET_ILENGTH(_decodeinfo[insn]);
itype=_GET_ITYPE(_decodeinfo[insn]);
根据以下内容进行一些执行前检查:
/*   根据指令类型来检查输入堆栈类型         */

if(itype<=ITYPE9){

      if(itype<=ITYPE1}{

            check_stack_int(1);

      }

      check_stack_int(0);

}

else if(itype<=ITYPE12){

      check_stack_ref(0);

}

else if(itype<ITYPE11){

      push(1);

}
最后,进行一些执行后的检查:
/*设置输出状态     */

if(itype<=ITYPE8){

      if(itype<=ITYPE6){

            if(itype>=ITYPE6){

                  pop(1);

            }
				
				<dp n="d73"/>
         pop(1);

    }

    pop(1);

}

else if(itype<=ITYPE10){

     set_stack_int(0);

}

else if(itype>=ITYPE11 &amp;&amp; itype<=ITYPE16){

     set_stack_ref(0);

}
附录I
对重编号的Java字节代码进行的检查
取指令。指令的数字值隐含地包括指令类型:
insn=getpc(-1);
根据以下内容进行一些执行前检查:
/*

    *检查输入堆栈状态。通过对字节代码重新编号,

    *如果字节代码的值(因此字节代码)属于正确的

    *组,则能通过测试而进行必需的安全检查。

*/

if(insn<=TYPE9_END){

  if(insn<=TYPE1_END){

    check_stack_int(1);

  }

  check_stack_int(0);

}

else if(insn<=TYPE12_END){

 check_stack_ref(0);

}

else if(insn<=TYPE11_END){

 push(1)

}
最后,进行一些执行后检查;
  /*
				
				<dp n="d75"/>
*设置输出堆栈状态。

*/

 if(insn<=TYPE8_END){

  if(insn<=TYPE6_END){

    if(insn>=TYPE6_START){

      pop(1);

    }

     pop(1);

    }

    pop(1);

   }

   else if(insn<=TYPE10_END){

    set_stack_int(0);

   }

   else if(insn>=TYPE11_START &amp;&amp; insn<=TYPE16_END){

    set_stack-ref(0);

   }
按类型来对所支持的Java字节代码进行重定序
/*类型3*/

#define s_POP2       0

#define s_IF_ICMPEQ  1

#define s_IF_ICMPNE  2

#define s_IF_ICMPLT  3

#define s_IF_ICMPGE  4

#define s_IF_ICMPGT  5

#define s_IF_ICMPLE  6

#define s_IF_ACMPEQ  7

#ddfine s_IF_ACMPNE  8

/*类型6*/

#define TYPE6_START  9

#define s_SASTORE    9

#define s_AASTORE    10

#define s_BASTORE    11

#define TYPE6_END    12

/*类型1*/

#define s_IADD       13

#define s_ISUB       14

#define s_IMUL       15

#define s_IDIV       16

#define s_IREM       17

#define s_ISHL       18

#define s_ISHR       19

#define s_IUSHR      20

#define s_IAND       21
				
				<dp n="d77"/>
#define s_IOR          22

#define s_IXOR         23

#define TYPE1_END      23

/*类型2*/

#define s_ISTORE       24

#define s_POP          25

#define s_IFEQ         26

#define s_IFNE         27

#define s_IFLT         28

#define s_IFGE         29

#define s_IFGT         30

#define s_IFLE         31

#define s_TABLESWITCH  32

#define s_LOOKUPSWITCH 33

#define s_IRETURN      34

/*类型7*/

#define s_SALOAD       35

#define s_AALOAD       36

#define s_BALOAD       37

/*类型9*/

#define s_INEG         39

#define s_INT2BYTE     40

#define s_INT2CHAR     41

#define TYPE9_END      41

/*类型8*/
				
				<dp n="d78"/>
#define s_ASTORE        42

#define s_ARETURN       43

#define s_ATHROW        44

#define s_IFNULL        45

#define s_IFNONNULL     46

#define TYPE8_END       46

/*类型12*/

#define s_ARRAYLENGTH   47

#define s_INSTANCEOF    48

#define TYPE12_END      48

/*类型10*/

#define s_SIPUSH        49

#define TYPE10_END      49

/*类型5*/

#define s_ILOAD         50

#define s_ALOAD         51

/*类型11*/

#define TYPE11_START    52

#define s_ACONST_NULL   52

#define s_LDC2          53

#define s_JSR           54

#define s_NEW           55
				
				<dp n="d79"/>
#define TYPE11_END          55

/*类型16*/

#define s_NEWARRAY          56

#define s_CHECKCAST         57

#define TYPE16_END          57

/*类型13*/

#define s_DUP               58

#define s_DUP_X1            59

#define s_DUP_X2            60

#define s_DUP2              61

#define s_DUP2_X1           62

#define s_DUP2_X2           63

#define s_SWAP              64

/*类型14*/

#define s_INVOKEVIRTUAL     65/*01000001*/

#define s_INVOKENONVIRTUAL  66/*01000010*/

#define s_INVOKESTATIC      67/*01000011*/

#define s_INVOKEINTERFACE   68/*01000100*/

/*类型15*/

#define s_GETSTATIC         69

#define s_PUTSTATIC         70

#define s_GETFIELD          71

#define s_PUTFIELD          72

/*类型4*/
				
				<dp n="d80"/>
#define s_NOP           73

#define s_IINC          74

#define s_GOTO          75

#define s_RET           76

#define s_RETURN        77

Claims (29)

1.一种有一组资源限制的微控制器(10),包含:
一个存储器;
一个装在存储器中的解释程序(16),它能在该组资源限制范围内操作,该微控制器(10)的特征在于具有:
至少有一个装在该存储器中、要由该解释程序解释的应用程序,其中该至少一个应用程序被生成
一个编译器(22),用于将高级语言源代码形式的应用程序源程序(20)编译成一种字节代码格式的编译形式(24);
一个转换器(26),用于将该编译形式(24)后处理成适合由该解释程序(16)解释的最小形式(27),该后处理采用包括下述步骤的过程中的至少一个步骤:
a)记录原始字节代码中的所有跳转和它们的目的地(61);
b)将专用字节代码转换成等价通用字节代码或者相反(63);
c)将字节代码操作数从采用标识串的引用修改到采用唯一标识符的引用(64);
d)将该编译形式(24)中的字节代码重新编号成为适合解释的格式的等价字节代码;以及
e)重新链接其目的地地址受转换步骤a)、b)、c)或d)影响的跳转(67)。
2.权利要求1的微控制器(10),其中,该编译形式(24)包括属性,该转换器(26)包含一种用于包括该解释程序(16)所需属性而不包括该解释程序(16)所不需属性的装置(51d)。
3.权利要求1或2的微控制器(10),其中,该编译形式(24)的格式是标准Java类文件格式,该转换器(26)接收标准Java类文件格式的编译形式(24)作为输入,并以适合由解释程序(16)解释的形式输出(27)。
4.权利要求1或2的微控制器(10),其中,该编译形式(24)包括关联一个表示对象、类、域或过程的标识串,该转换器包含一个用于将这类串映射到唯一标识符(51b)的装置(57)。
5.权利要求4的微控制器(10),其中,每个唯一标识符都是一个整数。
6.权利要求5的微控制器(10),其中,串到唯一标识符的映射存储在一个串到标识符映射文件(30、32)中。
7.权利要求1、2或5的微控制器(10),其中,该高级语言支持第一个特征集合和第一个数据类型集合,该解释程序(16)支持第一个特征集合的一个子集和第一个数据类型集合的一个子集,并且其中该转换器(26)要检验(51c、52)该编译形式(24)仅含有第一个特征集合的该子集中的特征并仅含有第一个数据类型集合的该子集中的数据类型。
8.权利要求1、2或5的微控制器(10),其中,该应用程序被编译成这样一种编译形式(24),执行或解释该编译形式(24)所需的资源超出在该微控制器上所能得到的资源。
9.权利要求1、2或5的微控制器(10),其中,该编译形式(24)被设计成能在不同计算机平台上移植。
10.权利要求1、2或5的微控制器(10),其中,该解释程序(16)被进一步配置成能在应用程序的解释期间判定该应用程序是否符合一个从一个规则集中选择的安全标准,其中该规则集含有至少一个从以下集合中选择的规则:
不允许该应用程序访问未授权的存储器部分,
不允许该应用程序访问未授权的微控制器资源,
其中,该应用程序由字节代码组成,执行之前要对多个字节代码检查至少一次,以确认该字节代码的执行不侵犯安全限制。
11.权利要求1、2或5的微控制器(10),其中,至少一个应用程序是由包括下列步骤的过程生成的:
加载该应用程序之前,确认该应用程序不侵犯任何安全限制;
以安全的方式加载该应用程序。
12.权利要求11的微控制器(10),其中,以安全方式加载应用程序步骤包括从加载实体来进行加载,并包含这样的步骤:
确认该加载实体有在该微控制器上加载应用程序的许可。
13.权利要求11的微控制器(10),其中,以安全方式加载应用程序步骤包含的步骤是:
用加载密钥来加密要被加载的该应用程序。
14.一种微控制器编程方法,其中,该微控制器有一个存储器和一个按照一个资源限制集合进行操作的处理器,该方法包含的步骤是:
输入用第一程序设计语言编写的应用程序(20);
将用该第一程序设计语言编写的该应用程序(20)编译(22)成与该第一程序设计语言关联的第一中间代码(24);
其中,该第一中间代码(24)被至少一个第一中间代码虚拟机解释;
其中编程该微控制器的方法的特征在于:
将该第一中间代码(24)转换成(26)第二中间代码(27);
其中,通过执行下述步骤中的至少一个步骤,该第二中间代码(27)被至少一个第二中间代码虚拟机解释,这些步骤有:
a)记录原始字节代码中的所有跳转和它们的目的地(61);
b)将专用字节代码转换成等价通用字节代码或者相反(63);
c)将字节代码操作数从采用标识串的引用修改到采用唯一标识符的引用(64);以及
d)将采用编译格式的字节代码重新编号,使其成为采用适合解释的格式的等价字节代码(66);以及
e)重新链接其目的地地址受转换步骤a)、b)、c)或d)影响的跳转(67);以及
将该第二中间代码加载到该微控制器(10)的该存储器中。
15.权利要求14的微控制器(10)编程方法,其中,该转换步骤进一步包含:
关联一个表示对象、类、域或过程的标识串并将这类串映射到唯一标识符(51b)。
16.权利要求14或15的微控制器编程方法,其中,该映射步骤包含将串映射到整数的步骤。
17.权利要求14或15的微控制器编程方法,其中该方法的进一步特征在于:将该第二中间代码(27)加载进该微控制器的存储器还包括在加载该第二中间代码(27)之前检查该第二中间代码(27)以验证该第二中间代码(27)满足一个预定的完整性检查,并且根据一个安全协议进行加载。
18.权利要求17的微控制器编程方法,其中该安全协议要求在加载该第二中间代码(27)之前必须对一个特定的身份进行确认以允许加载。
19.权利要求18的微控制器编程方法,其特征还在于提供一个解密密钥,并且其中该安全协议要求使用对应于该解密密钥的一个加载密钥加密该第二中间代码(27)。
20.一种微控制器(10),其具有一个存储器和一个被装入存储器中的解释程序(16),其可操作执行作为以一种可解释程序设计语言编写的程序(24)衍生物的衍生程序(27),该微控制器的特征在于:
(a)该微控制器在一个资源限制集合内操作,该资源限制包括其大小不足以允许解释执行以该可解释程序设计语言编写的程序的存储器;
(b)该存储器包括一个可对以该可解释语言的衍生物编写的衍生程序进行解释的解释程序,其中一个以该可解释程序设计语言编写的程序的衍生物是从以该可解释程序设计语言编写的该程序通过应用从下列一个规则集合中选择的至少一个规则导出的:
将串映射到标识符;
在解释之前或解释期间进行安全检查;
在解释之前或解释期间进行结构检查;
在解释之前或解释期间进行语义检查。
21.权利要求20的微控制器(10),其中该衍生程序(27)是类文件或类文件的衍生物。
22.权利要求20或21的微控制器(10),其特征进一步在于:
该存储器的存储量小于1M字节。
23.权利要求20或21的微控制器(10),其中该微控制器的特征还在于该安全检查:
接收来自一个请求者的请求以访问多个衍生程序(27)之一的逻辑;
接收该请求之后,判断该多个衍生程序(27)之一是否满足一个预定的规则集合;以及
基于该判断,有选择地授权给该请求者去访问该多个应用程序之一。
24.权利要求23的微控制器(10),其中在该衍生程序(27)被解释期间,通过判断该衍生程序(27)对其试图访问的存储器的一个特定部分是否具有访问权限由该解释程序实行该预定的规则。
25.权利要求20、21或24的微控制器(10),其特征还在于该微控制器被配置成执行从具有下列成员的集合中选择的至少一个安全检查:
在解释该衍生程序(27)期间实行预定的安全检查,从而防止该衍生程序访问存储器的未授权部分或其他未授权的微控制器资源;
该解释程序被配置成在执行每一字节代码之前检查每一字节代码至少一次,以确定根据执行前和执行后的检查可执行该字节代码;
在该衍生程序被加载进该微控制器之前对其进行检查,以检验该衍生程序(27)的完整性,以及根据一个安全协议进行加载。
26.权利要求25的微控制器(10),其中该安全协议要求必须对一个特定的身份进行确认以允许将一个衍生程序(27)加载到一个卡上。
27.权利要求25的微控制器(10),其特征还在于具有一个解密密钥,其中该安全协议要求使用对应于该解密密钥的一个加载密钥加密要加载的该衍生程序。
28.权利要求27的微控制器(10),其特征还在于其被配置成提供从包括加密、解密、签字、签名验证、相互认证、传输密钥和会话密钥的集合中所选择的密码服务。
29.权利要求20的微控制器(10),其特征还在于具有一个文件系统,并且被配置成通过从包括以下成员的集合中选择的一种装置提供对该文件系统的安全访问:
该微控制器具有访问控制表,用于授权对文件的读取、对文件的写或删除一个文件;
该微控制器实行密钥确认,以建立对文件的所授权的访问;以及
该微控制器检验持卡者身份以确定访问文件的权利。
CNB971810370A 1996-10-25 1997-10-22 用微控制器使用高级程序设计语言 Expired - Lifetime CN1183449C (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US2905796P 1996-10-25 1996-10-25
US60/029,057 1996-10-25

Publications (2)

Publication Number Publication Date
CN1242086A CN1242086A (zh) 2000-01-19
CN1183449C true CN1183449C (zh) 2005-01-05

Family

ID=21846980

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB971810370A Expired - Lifetime CN1183449C (zh) 1996-10-25 1997-10-22 用微控制器使用高级程序设计语言

Country Status (15)

Country Link
US (7) US6308317B1 (zh)
EP (1) EP0932865B1 (zh)
JP (2) JP2000514584A (zh)
KR (1) KR100329063B1 (zh)
CN (1) CN1183449C (zh)
AU (1) AU722463B2 (zh)
BR (1) BR9713267A (zh)
DE (1) DE69714752C5 (zh)
ES (1) ES2184066T3 (zh)
HK (1) HK1021762A1 (zh)
MY (1) MY126363A (zh)
PT (1) PT932865E (zh)
TW (1) TW476914B (zh)
WO (1) WO1998019237A1 (zh)
ZA (1) ZA979479B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182267A (zh) * 2013-05-21 2014-12-03 中兴通讯股份有限公司 编译方法、解释方法、装置及用户设备

Families Citing this family (292)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385645B1 (en) 1995-08-04 2002-05-07 Belle Gate Investments B.V. Data exchange system comprising portable data processing units
ES2153455T3 (es) 1995-08-04 2001-03-01 Belle Gate Invest B V Sistema de intercambio de datos que incluye unidades portatiles de procesamiento de datos.
EP0825506B1 (en) 1996-08-20 2013-03-06 Invensys Systems, Inc. Methods and apparatus for remote process control
CN1183449C (zh) 1996-10-25 2005-01-05 施卢默格系统公司 用微控制器使用高级程序设计语言
US6934945B1 (en) * 1997-03-14 2005-08-23 Cardsoft, Inc. Method and apparatus for controlling communications
EP0992025B1 (de) 1997-06-27 2002-07-17 Swisscom Mobile AG Transaktionsverfahren mit einem tragbaren Identifizierungselement
US6157966A (en) * 1997-06-30 2000-12-05 Schlumberger Malco, Inc. System and method for an ISO7816 complaint smart card to become master over a terminal
US6230006B1 (en) 1997-09-08 2001-05-08 Acterna, Llc Test system for remotely testing switches within a telecommunications network
US6564995B1 (en) 1997-09-19 2003-05-20 Schlumberger Malco, Inc. Smart card application-selection
US6736325B1 (en) * 1998-01-22 2004-05-18 Mondex International Limited Codelets
US6308270B1 (en) 1998-02-13 2001-10-23 Schlumberger Technologies, Inc. Validating and certifying execution of a software program with a smart card
CA2322686A1 (en) * 1998-03-23 1999-09-30 International Business Machines Corporation Java runtime system with modified constant pool
FR2779018B1 (fr) 1998-05-22 2000-08-18 Activcard Terminal et systeme pour la mise en oeuvre de transactions electroniques securisees
US6808111B2 (en) * 1998-08-06 2004-10-26 Visa International Service Association Terminal software architecture for use with smart cards
US7020441B2 (en) 1998-09-03 2006-03-28 Casabyte, Inc. Test system for remotely testing switches within a telecommunications network
CA2345794A1 (en) 1998-09-29 2000-04-06 Sun Microsystems, Inc. Superposition of data over voice
US6591229B1 (en) 1998-10-09 2003-07-08 Schlumberger Industries, Sa Metrology device with programmable smart card
US7174457B1 (en) 1999-03-10 2007-02-06 Microsoft Corporation System and method for authenticating an operating system to a central processing unit, providing the CPU/OS with secure storage, and authenticating the CPU/OS to a third party
US6609199B1 (en) * 1998-10-26 2003-08-19 Microsoft Corporation Method and apparatus for authenticating an open system application to a portable IC device
US20050060549A1 (en) * 1998-10-26 2005-03-17 Microsoft Corporation Controlling access to content based on certificates and access predicates
US7139915B2 (en) * 1998-10-26 2006-11-21 Microsoft Corporation Method and apparatus for authenticating an open system application to a portable IC device
US7194092B1 (en) 1998-10-26 2007-03-20 Microsoft Corporation Key-based secure storage
BR9914820A (pt) * 1998-11-03 2001-07-10 Thomson Licensing Sa Processo e aparelho para atualizar código de computador que usa uma interface de circuito integrado
FR2785695B1 (fr) * 1998-11-06 2003-01-31 Bull Cp8 Procede de compactage d'un programme de type code objet intermediaire executable dans un systeme embarque muni de ressources de traitement de donnees, systeme compacteur et systeme embarque multi-applications correspondants
JP3749798B2 (ja) * 1998-12-01 2006-03-01 株式会社東芝 Icカードにおけるデータ書込方法およびicカードにおけるデータ読込方法
US6425003B1 (en) * 1999-01-22 2002-07-23 Cisco Technology, Inc. Method and apparatus for DNS resolution
US7093122B1 (en) 1999-01-22 2006-08-15 Sun Microsystems, Inc. Techniques for permitting access across a context barrier in a small footprint device using shared object interfaces
US6633984B2 (en) * 1999-01-22 2003-10-14 Sun Microsystems, Inc. Techniques for permitting access across a context barrier on a small footprint device using an entry point object
US6823520B1 (en) * 1999-01-22 2004-11-23 Sun Microsystems, Inc. Techniques for implementing security on a small footprint device using a context barrier
US6907608B1 (en) 1999-01-22 2005-06-14 Sun Microsystems, Inc. Techniques for permitting access across a context barrier in a small footprint device using global data structures
US6581206B2 (en) * 1999-11-12 2003-06-17 Sun Microsystems, Inc. Computer program language subset validation
US6922835B1 (en) * 1999-01-22 2005-07-26 Sun Microsystems, Inc. Techniques for permitting access across a context barrier on a small footprint device using run time environment privileges
SE9900321L (sv) * 1999-02-01 2000-08-02 Mats Iderup Sätt och anordning vid utbyte av information
US7200842B1 (en) * 1999-02-02 2007-04-03 Sun Microsystems, Inc. Object-oriented instruction set for resource-constrained devices
US6880155B2 (en) * 1999-02-02 2005-04-12 Sun Microsystems, Inc. Token-based linking
US6848111B1 (en) 1999-02-02 2005-01-25 Sun Microsystems, Inc. Zero overhead exception handling
AU3346400A (en) * 1999-02-05 2000-08-25 Cyrus Intersoft, Inc. Instrumenting streamed classes
FR2790629A1 (fr) 1999-02-19 2000-09-08 Bull Cp8 Procede d'activation d'applications localisees dans une carte a puce par un navigateur du type dit "web"
US7127605B1 (en) * 1999-05-10 2006-10-24 Axalto, Inc. Secure sharing of application methods on a microcontroller
US6938244B1 (en) 1999-05-11 2005-08-30 Microsoft Corp. Interlaced protocol for smart card application development
WO2000068902A1 (en) * 1999-05-11 2000-11-16 Microsoft Corporation Method and apparatus for sharing data files among runtime environment applets in an integrated circuit card
US6845498B1 (en) * 1999-05-11 2005-01-18 Microsoft Corporation Method and apparatus for sharing data files among run time environment applets in an integrated circuit card
US6547150B1 (en) 1999-05-11 2003-04-15 Microsoft Corporation Smart card application development system and method
AU5273100A (en) 1999-05-17 2000-12-05 Foxboro Company, The Methods and apparatus for control configuration with versioning, security, composite blocks, edit selection, object swapping, formulaic values and other aspects
US7089530B1 (en) 1999-05-17 2006-08-08 Invensys Systems, Inc. Process control configuration system with connection validation and configuration
US6546546B1 (en) * 1999-05-19 2003-04-08 International Business Machines Corporation Integrating operating systems and run-time systems
DE29908783U1 (de) * 1999-05-19 1999-09-09 Me Technology Europe GmbH, 04430 Dölzig Eingabegerät für Geschäftsvorfälle
US6668271B1 (en) 1999-05-19 2003-12-23 Richo Company, Ltd. System for distributing, installing and running web applications (agents)
FR2794543B1 (fr) * 1999-06-04 2001-08-24 Gemplus Card Int Migration de differents langages sources vers un support d'execution
WO2000077640A1 (en) 1999-06-10 2000-12-21 Belle Gate Investment B.V. Arrangements storing different versions of a set of data in separate memory areas and method for updating a set of data in a memory
US6788980B1 (en) 1999-06-11 2004-09-07 Invensys Systems, Inc. Methods and apparatus for control using control devices that provide a virtual machine environment and that communicate via an IP network
US6463521B1 (en) * 1999-06-23 2002-10-08 Sun Microsystems, Inc. Opcode numbering for meta-data encoding
FR2795835B1 (fr) * 1999-07-01 2001-10-05 Bull Cp8 Procede de verification de transformateurs de codes pour un systeme embarque, notamment sur une carte a puce
US7908216B1 (en) 1999-07-22 2011-03-15 Visa International Service Association Internet payment, authentication and loading system using virtual smart card
US6684389B1 (en) * 1999-08-05 2004-01-27 Canon Kabushiki Kaisha Compiler that decrypts encrypted source code
US7376583B1 (en) 1999-08-10 2008-05-20 Gofigure, L.L.C. Device for making a transaction via a communications link
AU6631600A (en) * 1999-08-11 2001-03-05 Spinware, Inc. System and method for controlling access to data stored in portable storage medium
FR2797963B1 (fr) * 1999-08-23 2002-11-29 Trusted Logic Protocole de gestion, procede de verification et de transformation d'un fragment de programme telecharge et systemes correspondants
US6560774B1 (en) * 1999-09-01 2003-05-06 Microsoft Corporation Verifier to check intermediate language
KR20010050212A (ko) * 1999-09-13 2001-06-15 스테븐 디.피터스 메모리 카드에 기록된 파일에 대한 접근 제어 시스템
GB9921720D0 (en) 1999-09-14 1999-11-17 Tao Group Ltd Loading object-oriented computer programs
US7231411B1 (en) * 1999-09-15 2007-06-12 Koninklijke Philips Electronics N.V. Removable card system with downloadable agent for communicating with a digital television receiver or other host device
WO2001029762A2 (en) * 1999-10-20 2001-04-26 Spyrus, Inc. Method and system for an integrated circuit card interface device with multiple modes of operation
GB9925227D0 (en) 1999-10-25 1999-12-22 Internet Limited Data storage retrieval and access system
GB2356268B (en) 1999-11-10 2004-08-18 Mars Inc Value transaction systems
US8453133B2 (en) * 1999-11-12 2013-05-28 Oracle America, Inc. Optimization of N-base typed arithmetic instructions via rework
US7158993B1 (en) 1999-11-12 2007-01-02 Sun Microsystems, Inc. API representation enabling submerged hierarchy
US7207037B2 (en) * 1999-11-12 2007-04-17 Sun Microsystems, Inc. Overflow sensitive arithmetic instruction optimization using chaining
US7107581B2 (en) * 1999-11-12 2006-09-12 Sun Microsystems, Inc. Overflow predictive arithmetic instruction optimization using chaining
US6363523B1 (en) * 1999-11-12 2002-03-26 Sun Microsystems, Inc. Optimization of N-base typed arithmetic expressions
US7010786B2 (en) 1999-11-12 2006-03-07 Sun Microsystems, Inc. Predictive arithmetic overflow detection
FR2801118B1 (fr) 1999-11-17 2001-12-21 Bull Cp8 Procede de chargement d'applications dans un systeme embarque multi-application, systeme embarque correspondant, et procede d'execution d'une application du systeme embarque
EP1230780B1 (de) 1999-11-19 2005-03-09 Swisscom Mobile AG Anpassbare chipkarte
WO2001040910A1 (en) 1999-12-06 2001-06-07 De Jong, Eduard, Karel Computer arrangement using non-refreshed dram
AU776977B2 (en) 1999-12-07 2004-09-30 Sun Microsystems, Inc. Computer-readable medium with microprocessor to control reading and computer arranged to communicate with such medium
EP1236181B1 (en) 1999-12-07 2006-08-02 Sun Microsystems Inc. Secure photo carrying identification device, as well as means and method for authenticating such an identification device
FR2802319B1 (fr) * 1999-12-10 2004-10-01 Gemplus Card Int Controle d'acces par capacites pour des applications notamment cooperantes dans une carte a puce
US6757824B1 (en) * 1999-12-10 2004-06-29 Microsoft Corporation Client-side boot domains and boot rules
US20010007146A1 (en) * 1999-12-23 2001-07-05 Uwe Hansmann Method for providing a set of software components
FR2804819B1 (fr) 2000-02-03 2002-05-03 Gemplus Card Int Gestion de temps au niveau communication pour entite du type carte a puce
FR2805062B1 (fr) * 2000-02-10 2005-04-08 Bull Cp8 Procede de transmission de flux de donnees a haut debit sur un reseau de type internet entre un serveur et un terminal a carte a puce, notamment d'un flux de donnees multimedia
US6748592B1 (en) * 2000-02-14 2004-06-08 Xoucin, Inc. Method and apparatus for protectively operating a data/information processing device
AU2001238541A1 (en) * 2000-02-17 2001-08-27 Interactive Video Technologies, Inc. Incremental bootstrap class loader
GB0003920D0 (en) 2000-02-21 2000-04-05 Ncipher Corp Limited Computer system
US6813762B1 (en) * 2000-02-22 2004-11-02 Freescale Semiconductor, Inc. Method for processing program files in a programming language capable of dynamic loading
JP4509291B2 (ja) * 2000-03-30 2010-07-21 大日本印刷株式会社 Icカード、icカードのプログラム更新装置、および、その方法
US6651186B1 (en) 2000-04-28 2003-11-18 Sun Microsystems, Inc. Remote incremental program verification using API definitions
US6986132B1 (en) 2000-04-28 2006-01-10 Sun Microsytems, Inc. Remote incremental program binary compatibility verification using API definitions
US6883163B1 (en) 2000-04-28 2005-04-19 Sun Microsystems, Inc. Populating resource-constrained devices with content verified using API definitions
FR2812101A1 (fr) * 2000-07-24 2002-01-25 Bull Cp8 Protocole d'echange de messages entre applications implantees sur un systeme embarque, et systeme embarque correspondant
US6675338B1 (en) 2000-08-09 2004-01-06 Sun Microsystems, Inc. Internally generated vectors for burnin system
JP2002091762A (ja) * 2000-09-14 2002-03-29 Denso Corp プログラム生成装置
US6981245B1 (en) 2000-09-14 2005-12-27 Sun Microsystems, Inc. Populating binary compatible resource-constrained devices with content verified using API definitions
JP2002117381A (ja) * 2000-10-05 2002-04-19 Dainippon Printing Co Ltd Icカード
FR2815801B1 (fr) 2000-10-20 2004-10-29 Trusted Logic Protocole de transmission d'une pluralite de flux logiques d'echange multiple de couples de commande/reponse sur un canal physique unique d'echange entre maitre et esclave et systeme de suivi et de controle d'execution d'appliquettes
US8149048B1 (en) 2000-10-26 2012-04-03 Cypress Semiconductor Corporation Apparatus and method for programmable power management in a programmable analog circuit block
US8103496B1 (en) 2000-10-26 2012-01-24 Cypress Semicondutor Corporation Breakpoint control in an in-circuit emulation system
US6724220B1 (en) 2000-10-26 2004-04-20 Cyress Semiconductor Corporation Programmable microcontroller architecture (mixed analog/digital)
US8176296B2 (en) 2000-10-26 2012-05-08 Cypress Semiconductor Corporation Programmable microcontroller architecture
US7765095B1 (en) 2000-10-26 2010-07-27 Cypress Semiconductor Corporation Conditional branching in an in-circuit emulation system
US20020108054A1 (en) * 2001-02-02 2002-08-08 Moore Christopher S. Solid-state memory device storing program code and methods for use therewith
CN1227626C (zh) * 2001-02-08 2005-11-16 诺基亚有限公司 智能读卡器
US7080373B2 (en) * 2001-03-07 2006-07-18 Freescale Semiconductor, Inc. Method and device for creating and using pre-internalized program files
FR2822334A1 (fr) * 2001-03-16 2002-09-20 Schlumberger Systems & Service Module d'idente d'abonne a gestion independante et securisee d'une pluralite de commandes d'au moins une appliquette, notamment pour un equipement mobile de communication
US6971001B1 (en) * 2001-05-17 2005-11-29 Accenture Global Services Gmbh General and reusable components for defining net-centric application program architectures
AU2006200734B2 (en) * 2001-05-17 2007-12-13 Accenture Global Services Limited Pipeline architecture for use with net-centric application program architectures
US8209753B2 (en) * 2001-06-15 2012-06-26 Activcard, Inc. Universal secure messaging for remote security tokens
US20040218762A1 (en) 2003-04-29 2004-11-04 Eric Le Saint Universal secure messaging for cryptographic modules
RU2307388C2 (ru) * 2001-08-13 2007-09-27 Квэлкомм Инкорпорейтед Привилегия доступа на уровне приложений к области памяти компьютерного устройства
US7155702B2 (en) * 2001-09-13 2006-12-26 Axalto Sa Interface and stub generation for code distribution and synthesis
US7406674B1 (en) 2001-10-24 2008-07-29 Cypress Semiconductor Corporation Method and apparatus for generating microcontroller configuration information
US20030084172A1 (en) * 2001-10-29 2003-05-01 Sun Microsystem, Inc., A Delaware Corporation Identification and privacy in the World Wide Web
US20030084302A1 (en) * 2001-10-29 2003-05-01 Sun Microsystems, Inc., A Delaware Corporation Portability and privacy with data communications network browsing
US7275260B2 (en) 2001-10-29 2007-09-25 Sun Microsystems, Inc. Enhanced privacy protection in identification in a data communications network
US7085840B2 (en) 2001-10-29 2006-08-01 Sun Microsystems, Inc. Enhanced quality of identification in a data communications network
JP4055393B2 (ja) * 2001-10-30 2008-03-05 ソニー株式会社 データ処理装置およびその方法とプログラム
US8078970B1 (en) 2001-11-09 2011-12-13 Cypress Semiconductor Corporation Graphical user interface with user-selectable list-box
US8042093B1 (en) 2001-11-15 2011-10-18 Cypress Semiconductor Corporation System providing automatic source code generation for personalization and parameterization of user modules
US7844437B1 (en) 2001-11-19 2010-11-30 Cypress Semiconductor Corporation System and method for performing next placements and pruning of disallowed placements for programming an integrated circuit
US6971004B1 (en) 2001-11-19 2005-11-29 Cypress Semiconductor Corp. System and method of dynamically reconfiguring a programmable integrated circuit
US7774190B1 (en) 2001-11-19 2010-08-10 Cypress Semiconductor Corporation Sleep and stall in an in-circuit emulation system
US8069405B1 (en) 2001-11-19 2011-11-29 Cypress Semiconductor Corporation User interface for efficiently browsing an electronic document using data-driven tabs
US7770113B1 (en) 2001-11-19 2010-08-03 Cypress Semiconductor Corporation System and method for dynamically generating a configuration datasheet
US7243853B1 (en) 2001-12-04 2007-07-17 Visa U.S.A. Inc. Method and system for facilitating memory and application management on a secured token
EP1463992A1 (en) * 2002-01-11 2004-10-06 Sierra Wireless, Inc. Host extensible wireless application interface
DE60210416T2 (de) * 2002-02-28 2006-09-07 Matsushita Electric Industrial Co., Ltd., Kadoma Speicherkarte
US20100174717A1 (en) * 2002-02-28 2010-07-08 Olivier Fambon Interative serialisation procedure for structured software objects
US8769517B2 (en) * 2002-03-15 2014-07-01 International Business Machines Corporation Generating a common symbol table for symbols of independent applications
US6996802B2 (en) 2002-03-18 2006-02-07 Sun Microsystems, Inc. Method and apparatus for deployment of high integrity software using initialization order and calling order constraints
US7181737B2 (en) 2002-03-18 2007-02-20 Sun Microsystems, Inc. Method and apparatus for deployment of high integrity software using static procedure return addresses
US7010783B2 (en) 2002-03-18 2006-03-07 Sun Microsystems, Inc. Method and apparatus for deployment of high integrity software using reduced dynamic memory allocation
US6912633B2 (en) 2002-03-18 2005-06-28 Sun Microsystems, Inc. Enhanced memory management for portable devices
US8103497B1 (en) 2002-03-28 2012-01-24 Cypress Semiconductor Corporation External interface for event architecture
DE10216602A1 (de) * 2002-04-15 2003-10-30 Giesecke & Devrient Gmbh Optimierung von compilergeneriertem Programmcode
US7890771B2 (en) 2002-04-17 2011-02-15 Microsoft Corporation Saving and retrieving data based on public key encryption
US7308608B1 (en) 2002-05-01 2007-12-11 Cypress Semiconductor Corporation Reconfigurable testing system and method
US7127241B2 (en) * 2002-05-09 2006-10-24 Casabyte, Inc. Method, apparatus and article to remotely associate wireless communications devices with subscriber identities and/or proxy wireless communications devices
FR2840084A1 (fr) * 2002-05-27 2003-11-28 Gemplus Card Int Procede de verification de codes pour microcircuits a ressources limitees
NO20023194D0 (no) * 2002-07-01 2002-07-01 Sospita As Fremgangsmåte og apparatur for eksekvering av programvareapplikasjoner i et multiprosessormiljö
US20040122774A1 (en) * 2002-08-02 2004-06-24 Martin Studd Method and system for executing applications on a mobile device
US7761845B1 (en) 2002-09-09 2010-07-20 Cypress Semiconductor Corporation Method for parameterizing a user module
WO2004025921A2 (en) * 2002-09-16 2004-03-25 Telefonaktiebolaget L M Ericsson (Publ) Secure access to a subscription module
ATE488116T1 (de) 2002-09-16 2010-11-15 Ericsson Telefon Ab L M Sicherer zugang auf ein teilnehmermodul
US20040139021A1 (en) 2002-10-07 2004-07-15 Visa International Service Association Method and system for facilitating data access and management on a secure token
US6904591B2 (en) * 2002-11-01 2005-06-07 Oz Development, Inc. Software development system for editable executables
FR2846770B1 (fr) * 2002-11-04 2005-01-28 Oberthur Card Syst Sa Carte a microcircuit comportant des moyens de publication de ses objets informatiques
CN1276363C (zh) * 2002-11-13 2006-09-20 深圳市朗科科技有限公司 借助半导体存储装置实现数据安全存储和算法存储的方法
US20040123152A1 (en) * 2002-12-18 2004-06-24 Eric Le Saint Uniform framework for security tokens
US20040143739A1 (en) * 2003-01-16 2004-07-22 Sun Mircosystems, Inc., A Delaware Corporation Run time code integrity checks
US7222331B2 (en) 2003-01-16 2007-05-22 Sun Microsystems, Inc. Linking of virtual methods
US7484095B2 (en) 2003-01-16 2009-01-27 Sun Microsystems, Inc. System for communicating program data between a first device and a second device
US7281244B2 (en) 2003-01-16 2007-10-09 Sun Microsystems, Inc. Using a digital fingerprint to commit loaded data in a device
US7165246B2 (en) 2003-01-16 2007-01-16 Sun Microsystems, Inc. Optimized representation of data type information in program verification
US8121955B2 (en) 2003-01-16 2012-02-21 Oracle America, Inc. Signing program data payload sequence in program loading
US7272830B2 (en) 2003-01-16 2007-09-18 Sun Microsystems, Inc. Ordering program data for loading on a device
CN100388191C (zh) 2003-04-01 2008-05-14 松下电器产业株式会社 程序连接方法、装置以及终端装置
US20040199787A1 (en) * 2003-04-02 2004-10-07 Sun Microsystems, Inc., A Delaware Corporation Card device resource access control
US20040221174A1 (en) * 2003-04-29 2004-11-04 Eric Le Saint Uniform modular framework for a host computer system
US7328432B2 (en) * 2003-06-02 2008-02-05 Sun Microsystems, Inc. Proximity-based addressing for supporting in-place execution in virtual machines
US7184756B2 (en) * 2003-06-12 2007-02-27 Motorola Inc. Wireless communication device with tamper resistant configuration settings
WO2005007258A1 (en) * 2003-07-23 2005-01-27 Koninklijke Philips Electronics N.V. Device to process program codes
US10437964B2 (en) * 2003-10-24 2019-10-08 Microsoft Technology Licensing, Llc Programming interface for licensing
CH716409B1 (de) * 2003-11-12 2021-01-29 Legic Identsystems Ag Verfahren zum Einschreiben einer Datenorganisation in Identifikationsmedien und zum Einschreiben und Ausführen von Applikationen in der Datenorganisation.
DE10357257A1 (de) 2003-12-08 2005-06-30 Giesecke & Devrient Gmbh Java Smart Card Chip mit für globale Variablen reserviertem Speicherbereich
US20050138380A1 (en) 2003-12-22 2005-06-23 Fedronic Dominique L.J. Entry control system
US7907935B2 (en) * 2003-12-22 2011-03-15 Activcard Ireland, Limited Intelligent remote device
FR2864398A1 (fr) * 2003-12-23 2005-06-24 France Telecom Terminal de telecommunication a deux espaces d'execution
US7259696B1 (en) * 2004-02-10 2007-08-21 Zilog, Inc. Interactive web-based codeset selection and development tool
US7436345B1 (en) * 2004-02-10 2008-10-14 Zilog, Inc. Script instruction for jumping to a location, interpreting a predetermined number of instructions and then jumping back
US7230562B1 (en) * 2004-02-10 2007-06-12 Zilog, Inc. Sending a script to a virtual machine for immediate interpreting
US7227492B1 (en) * 2004-02-10 2007-06-05 Zilog, Inc. Interpreting a common script block to output various forms of data according to a common protocol
US7091857B2 (en) * 2004-02-12 2006-08-15 Mi-Jack Products, Inc. Electronic control system used in security system for cargo trailers
US7374099B2 (en) 2004-02-24 2008-05-20 Sun Microsystems, Inc. Method and apparatus for processing an application identifier from a smart card
US7140549B2 (en) 2004-02-24 2006-11-28 Sun Microsystems, Inc. Method and apparatus for selecting a desired application on a smart card
US7191288B2 (en) 2004-02-24 2007-03-13 Sun Microsystems, Inc. Method and apparatus for providing an application on a smart card
US7165727B2 (en) 2004-02-24 2007-01-23 Sun Microsystems, Inc. Method and apparatus for installing an application onto a smart card
US8321923B2 (en) * 2004-03-04 2012-11-27 Gemalto Sa Secure sharing of resources between applications in independent execution environments in a retrievable token (e.g. smart card)
US7295049B1 (en) 2004-03-25 2007-11-13 Cypress Semiconductor Corporation Method and circuit for rapid alignment of signals
US20050263596A1 (en) * 2004-05-12 2005-12-01 Solicore, Inc. Portable charger, including portable sleeve, for an electronically readable card
US20060041854A1 (en) * 2004-07-22 2006-02-23 Steven Schlanger Devices and methods for programming microcontrollers
US8286125B2 (en) 2004-08-13 2012-10-09 Cypress Semiconductor Corporation Model for a hardware device-independent method of defining embedded firmware for programmable systems
US8069436B2 (en) * 2004-08-13 2011-11-29 Cypress Semiconductor Corporation Providing hardware independence to automate code generation of processing device firmware
US7855672B1 (en) 2004-08-19 2010-12-21 Ixys Ch Gmbh Compressed codeset database format for remote control devices
US20060047954A1 (en) * 2004-08-30 2006-03-02 Axalto Inc. Data access security implementation using the public key mechanism
KR100597413B1 (ko) 2004-09-24 2006-07-05 삼성전자주식회사 자바 바이트코드 변환 방법 및 상기 변환을 수행하는 자바인터프리터
US20060080655A1 (en) * 2004-10-09 2006-04-13 Axalto Inc. System and method for post-issuance code update employing embedded native code
FR2877454B1 (fr) * 2004-11-04 2006-12-29 Gemplus Sa Procede de chargement d'un code logiciel en langage intermediaire oriente objet dans un appareil portatif
US7232073B1 (en) 2004-12-21 2007-06-19 Sun Microsystems, Inc. Smart card with multiple applications
JP4215037B2 (ja) * 2004-12-27 2009-01-28 セイコーエプソン株式会社 リソース管理システム、プリンタ、プリンタ用ネットワークカードおよびリソース管理プログラム、並びにリソース管理方法
JP4207938B2 (ja) * 2005-02-01 2009-01-14 セイコーエプソン株式会社 ソフトウェア認証システム、ソフトウェア認証プログラム、およびソフトウェア認証方法
JP2006244451A (ja) * 2005-02-01 2006-09-14 Seiko Epson Corp リソース管理システムおよびリソース管理プログラム、並びにリソース管理方法
US7332976B1 (en) 2005-02-04 2008-02-19 Cypress Semiconductor Corporation Poly-phase frequency synthesis oscillator
JP4311386B2 (ja) * 2005-02-14 2009-08-12 セイコーエプソン株式会社 ファイル操作制限システムおよびファイル操作制限プログラム、ファイル操作制限方法、電子機器並びに印刷装置
US20060203733A1 (en) * 2005-02-17 2006-09-14 Casabyte, Inc. Methods, apparatuses, and articles to remotely test communications networks using digital fingerprints of content
JP4628149B2 (ja) * 2005-03-14 2011-02-09 株式会社エヌ・ティ・ティ・ドコモ アクセス制御装置及びアクセス制御方法
JP4232767B2 (ja) * 2005-03-14 2009-03-04 セイコーエプソン株式会社 ソフトウェア認証システムおよびソフトウェア認証プログラム、並びにソフトウェア認証方法
DE102005019753A1 (de) * 2005-04-28 2006-11-09 Braun Gmbh Blutdruckmessgerät sowie Chipkarte hierfür
US7400183B1 (en) 2005-05-05 2008-07-15 Cypress Semiconductor Corporation Voltage controlled oscillator delay cell and method
US8089461B2 (en) 2005-06-23 2012-01-03 Cypress Semiconductor Corporation Touch wake for electronic devices
US8887295B2 (en) * 2005-06-27 2014-11-11 Safend Ltd. Method and system for enabling enterprises to use detachable memory devices that contain data and executable files in controlled and secure way
US7792289B2 (en) * 2005-06-28 2010-09-07 Mark Ellery Ogram Encrypted communications
US7698703B2 (en) * 2005-06-29 2010-04-13 Gemalto Inc. Imparting digital uniqueness to the types of a programming language using a unique digital sequence
US7647630B2 (en) * 2005-12-15 2010-01-12 International Business Machines Corporation Associating security information with information objects in a data processing system
US20070143601A1 (en) * 2005-12-15 2007-06-21 Arroyo Diana J System and method for authorizing information flows
DE102005061659A1 (de) * 2005-12-22 2007-06-28 Giesecke & Devrient Gmbh Sicherung eines tragbaren Datenträgers gegen Angriffe
FR2895608B1 (fr) * 2005-12-23 2008-03-21 Trusted Logic Sa Procede pour la realisation d'un compteur securise sur un systeme informatique embarque disposant d'une carte a puce
US20070192840A1 (en) * 2006-02-10 2007-08-16 Lauri Pesonen Mobile communication terminal
JP4933292B2 (ja) * 2006-02-28 2012-05-16 キヤノン株式会社 情報処理装置、無線通信方法、記憶媒体、プログラム
US8067948B2 (en) 2006-03-27 2011-11-29 Cypress Semiconductor Corporation Input/output multiplexer bus
US20080052770A1 (en) * 2006-03-31 2008-02-28 Axalto Inc Method and system of providing security services using a secure device
US9092635B2 (en) 2006-03-31 2015-07-28 Gemalto Sa Method and system of providing security services using a secure device
DE102006023436A1 (de) * 2006-05-18 2007-11-22 Giesecke & Devrient Gmbh Authentisierung für entfernte Funktionsaufrufe
EP1860589B1 (en) * 2006-05-26 2013-11-27 Incard SA Method for accessing structured data in IC Cards
EP1881404A1 (fr) * 2006-07-20 2008-01-23 Gemplus Procédé de protection dynamique des données lors de l'exécution d'un code logiciel en langage intermédiaire dans un appareil numérique
US7817799B2 (en) * 2006-09-07 2010-10-19 International Business Machines Corporation Maintaining encryption key integrity
EP1936574A1 (en) * 2006-12-01 2008-06-25 Cassis International PTE Ltd. CAP file for the personalisation of a Java application
US7971061B2 (en) * 2006-12-11 2011-06-28 Pitney Bowes Inc. E-mail system and method having certified opt-in capabilities
US8285329B1 (en) 2007-04-02 2012-10-09 Sprint Communications Company L.P. Mobile device-based control of smart card operation
US8026739B2 (en) 2007-04-17 2011-09-27 Cypress Semiconductor Corporation System level interconnect with programmable switching
US8130025B2 (en) 2007-04-17 2012-03-06 Cypress Semiconductor Corporation Numerical band gap
US7737724B2 (en) * 2007-04-17 2010-06-15 Cypress Semiconductor Corporation Universal digital block interconnection and channel routing
US8516025B2 (en) 2007-04-17 2013-08-20 Cypress Semiconductor Corporation Clock driven dynamic datapath chaining
US8092083B2 (en) 2007-04-17 2012-01-10 Cypress Semiconductor Corporation Temperature sensor with digital bandgap
US9564902B2 (en) 2007-04-17 2017-02-07 Cypress Semiconductor Corporation Dynamically configurable and re-configurable data path
US8040266B2 (en) 2007-04-17 2011-10-18 Cypress Semiconductor Corporation Programmable sigma-delta analog-to-digital converter
US9720805B1 (en) 2007-04-25 2017-08-01 Cypress Semiconductor Corporation System and method for controlling a target device
US8065653B1 (en) 2007-04-25 2011-11-22 Cypress Semiconductor Corporation Configuration of programmable IC design elements
US8266575B1 (en) 2007-04-25 2012-09-11 Cypress Semiconductor Corporation Systems and methods for dynamically reconfiguring a programmable system on a chip
ITMI20070996A1 (it) * 2007-05-17 2008-11-18 Incard Sa Metodo per il controllo di esecuzione di un'applet per una ic card
US8049569B1 (en) 2007-09-05 2011-11-01 Cypress Semiconductor Corporation Circuit and method for improving the accuracy of a crystal-less oscillator having dual-frequency modes
US8249654B1 (en) * 2007-09-27 2012-08-21 Sprint Communications Company L.P. Dynamic smart card application loading
US9883381B1 (en) 2007-10-02 2018-01-30 Sprint Communications Company L.P. Providing secure access to smart card applications
JP5262089B2 (ja) * 2007-11-30 2013-08-14 凸版印刷株式会社 Icカードに実装されるコンピュータ装置及びその処理方法
CN101520733B (zh) * 2008-02-27 2014-04-16 国际商业机器公司 装载类的方法和装置及重组类存档文件方法
CN101256612B (zh) * 2008-04-01 2010-11-03 北京飞天诚信科技有限公司 基于.Net卡的程序保护方法和系统
CN101419549B (zh) * 2008-05-13 2012-04-18 飞天诚信科技股份有限公司 基于.Net卡查找类和函数的方法和装置
CN102124432B (zh) 2008-06-20 2014-11-26 因文西斯系统公司 对用于过程控制的实际和仿真设施进行交互的系统和方法
US8806457B2 (en) * 2008-12-15 2014-08-12 Apple Inc. Deferred constant pool generation
US20100211591A1 (en) * 2009-02-16 2010-08-19 Chuan-Hua Chang Apparatus for processing strings simultaneously
US9448964B2 (en) 2009-05-04 2016-09-20 Cypress Semiconductor Corporation Autonomous control in a programmable system
US8127060B2 (en) 2009-05-29 2012-02-28 Invensys Systems, Inc Methods and apparatus for control configuration with control objects that are fieldbus protocol-aware
US8463964B2 (en) 2009-05-29 2013-06-11 Invensys Systems, Inc. Methods and apparatus for control configuration with enhanced change-tracking
US9384063B2 (en) * 2009-06-18 2016-07-05 Microsoft Technology Licensing, Llc Eliding synchronization in a concurrent data structure
JP5449905B2 (ja) * 2009-07-29 2014-03-19 フェリカネットワークス株式会社 情報処理装置、プログラム、および情報処理システム
EP2497055B1 (en) * 2009-11-05 2018-07-18 Trusted Logic Secure portable object
KR101054596B1 (ko) * 2009-11-18 2011-08-04 에스케이씨앤씨 주식회사 자바카드용 마이그레이터를 이용한 메모리 절감 방법
US8276188B2 (en) * 2009-12-03 2012-09-25 Condel International Technologies Inc. Systems and methods for managing storage devices
DE102010004446A1 (de) * 2010-01-13 2011-07-14 Giesecke & Devrient GmbH, 81677 Verfahren zum Bereitstellen eines sicheren Zählers auf einem Endgerät
US9052919B2 (en) * 2010-01-15 2015-06-09 Apple Inc. Specialized network fileserver
US8538480B2 (en) * 2010-03-30 2013-09-17 Qualcomm Incorporated Methods and apparatus for device applet management on smart cards
EP2397998A1 (fr) * 2010-06-17 2011-12-21 Gemalto SA Procédé et système de contrôle du traitement de plusieurs flux de communication radiofréquence par une carte à circuits intégrés
US8499299B1 (en) 2010-06-29 2013-07-30 Ca, Inc. Ensuring deterministic thread context switching in virtual machine applications
US8732670B1 (en) 2010-06-29 2014-05-20 Ca, Inc. Ensuring determinism during programmatic replay in a virtual machine
US8769518B1 (en) * 2010-06-29 2014-07-01 Ca, Inc. Ensuring determinism during programmatic replay in a virtual machine
US8959492B2 (en) * 2010-12-14 2015-02-17 Ngmoco, Llc Communication protocol between a high-level language and a native language
US8621168B2 (en) 2010-12-17 2013-12-31 Google Inc. Partitioning the namespace of a contactless smart card
US8352749B2 (en) * 2010-12-17 2013-01-08 Google Inc. Local trusted services manager for a contactless smart card
US8196131B1 (en) 2010-12-17 2012-06-05 Google Inc. Payment application lifecycle management in a contactless smart card
US8533336B1 (en) * 2011-02-04 2013-09-10 Google Inc. Automated web frontend sharding
JP5329602B2 (ja) * 2011-05-12 2013-10-30 株式会社三菱東京Ufj銀行 端末装置およびプログラム
EP2535832B1 (en) * 2011-06-17 2017-04-26 Simulity Labs Ltd A method for operating a virtual machine over a file system
US8171525B1 (en) 2011-09-15 2012-05-01 Google Inc. Enabling users to select between secure service providers using a central trusted service manager
US8255687B1 (en) 2011-09-15 2012-08-28 Google Inc. Enabling users to select between secure service providers using a key escrow service
US8313036B1 (en) 2011-09-16 2012-11-20 Google Inc. Secure application directory
MX341641B (es) 2011-11-01 2016-08-29 Google Inc Sistemas, metodos y productos de programas de computadora para interconectar multiples gestores de servicios de confianza proveedores de servicios y elementos de seguridad.
US9544759B2 (en) 2011-11-01 2017-01-10 Google Inc. Systems, methods, and computer program products for managing states
JP5818695B2 (ja) * 2012-01-04 2015-11-18 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation コード変換方法、プログラム及びシステム
US9372985B2 (en) 2012-01-25 2016-06-21 Sony Corporation Information processing device, information processing method, and computer program
US8385553B1 (en) 2012-02-28 2013-02-26 Google Inc. Portable secure element
JP5953867B2 (ja) * 2012-03-26 2016-07-20 富士ゼロックス株式会社 プログラム、及びプログラム保護装置
ITMI20120561A1 (it) * 2012-04-05 2013-10-06 St Microelectronics Srl Metodo per proteggere un programma applicativo
US8429409B1 (en) 2012-04-06 2013-04-23 Google Inc. Secure reset of personal and service provider information on mobile devices
US20130311382A1 (en) * 2012-05-21 2013-11-21 Klaus S. Fosmark Obtaining information for a payment transaction
US9383448B2 (en) 2012-07-05 2016-07-05 Deca System Co., Ltd. Golf GPS device with automatic hole recognition and playing hole selection
US8676709B2 (en) 2012-07-31 2014-03-18 Google Inc. Merchant category codes in a proxy card transaction
CN104395909B (zh) 2012-09-18 2017-08-25 谷歌公司 用于多个服务供应商可信服务管理器和安全元件的接口连接的系统、方法和计算机程序产品
EP2843605A1 (en) * 2013-08-30 2015-03-04 Gemalto SA Method for authenticating transactions
US9516006B2 (en) * 2013-10-23 2016-12-06 Google Inc. Re-programmable secure cryptographic device
US9280339B1 (en) * 2013-12-12 2016-03-08 Amazon Technologies, Inc. Class replacer during application installation
EP3215238B1 (en) * 2014-11-05 2019-10-02 Wwtemplar LLC Remote control of fire suppression systems
US10176094B2 (en) 2015-06-30 2019-01-08 Renesas Electronics America Inc. Common MCU self-identification information
WO2017066194A1 (en) * 2015-10-11 2017-04-20 Renesas Electronics America Inc. Data driven embedded application building and configuration
JP6275098B2 (ja) * 2015-10-16 2018-02-07 三菱電機株式会社 制御装置およびレジスタの故障復帰方法
WO2017209876A1 (en) * 2016-05-31 2017-12-07 Brocade Communications Systems, Inc. Buffer manager
KR101894894B1 (ko) 2017-06-16 2018-09-05 서울대학교산학협력단 바이트코드 처리 장치 및 동작 방법
CN109840395A (zh) * 2017-11-24 2019-06-04 航天信息股份有限公司 一种基于Java卡下载应用程序的方法和系统
US10698666B2 (en) * 2017-12-29 2020-06-30 Microsoft Technology Licensing, Llc Automatically building software projects
CN108966235B (zh) * 2018-06-20 2021-07-02 融慧金科金融服务外包(北京)有限公司 Ios用户网络身份证rhidfa的运行方法
CN110059499A (zh) 2019-03-22 2019-07-26 华为技术有限公司 一种文件访问权限认证方法及电子设备
US12216769B2 (en) 2022-04-29 2025-02-04 Oracle International Corporation Secure element enforcing a security policy for device peripherals
US12197974B2 (en) * 2022-06-08 2025-01-14 Oracle International Corporation Logical java card runtime environment
EP4425328A1 (en) * 2023-02-28 2024-09-04 STMicroelectronics International N.V. Method of executing a java card application

Family Cites Families (106)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE408455C (de) 1923-07-15 1925-01-19 Georg Koenig Verfahren zur fortlaufenden Bestimmung des Heizwerts von Gasgemischen
FR2386080A1 (fr) 1977-03-31 1978-10-27 Cii Honeywell Bull Systeme de comptabilisation d'unites homogenes predeterminees
US4650975A (en) * 1984-08-30 1987-03-17 Casio Computer Co., Ltd. IC card and an identification system thereof
US4667290A (en) 1984-09-10 1987-05-19 501 Philon, Inc. Compilers using a universal intermediate language
JPS61204741A (ja) 1985-03-06 1986-09-10 Nec Corp ソ−スプログラムの圧縮方法
JPH0635227B2 (ja) 1985-07-31 1994-05-11 トツパン・ム−ア株式会社 更新情報と履歴情報の読出し手段を有するicカ−ド
US4905138A (en) 1985-10-17 1990-02-27 Westinghouse Electric Corp. Meta-interpreter
US4874935A (en) 1986-03-10 1989-10-17 Data Card Coprporation Smart card apparatus and method of programming same
GB2191029B (en) 1986-05-29 1990-12-12 Almex Systems Ltd Electronic pass
JPH07104891B2 (ja) 1986-08-05 1995-11-13 沖電気工業株式会社 取引処理装置
US5133072A (en) 1986-11-13 1992-07-21 Hewlett-Packard Company Method for improved code generation in reduced instruction set computers
JPS63156255A (ja) 1986-12-19 1988-06-29 Fujitsu Ltd インタプリタにおけるオ−バレイ方法
JPS63156254A (ja) 1986-12-19 1988-06-29 Fujitsu Ltd インタプリタにおける中間テキストの管理方法
US4777355A (en) 1986-12-24 1988-10-11 Mitsubishi Denki Kabushiki Kaisha IC card and system for checking the functionality thereof
US4791558A (en) * 1987-02-13 1988-12-13 International Business Machines Corporation System and method for generating an object module in a first format and then converting the first format into a format which is loadable into a selected computer
JPS63231692A (ja) 1987-03-20 1988-09-27 Mitsubishi Electric Corp 機密コ−ド書込装置
FR2626095B1 (fr) 1988-01-20 1991-08-30 Sgs Thomson Microelectronics Systeme de securite pour proteger des zones de programmation d'une carte a puce
US4892974A (en) 1988-03-10 1990-01-09 Air Products And Chemicals, Inc. Process for producing mono-ortho-tert-butyl-aniline using silica-alumina catalysts
JPH01243125A (ja) * 1988-03-24 1989-09-27 Fuji Electric Co Ltd 解釈プログラムの実行速度向上方法
US5195130A (en) 1988-05-05 1993-03-16 Transaction Technology, Inc. Computer and telephone apparatus with user friendly computer interface and enhanced integrity features
JP2666847B2 (ja) 1988-06-06 1997-10-22 日本電気株式会社 異種言語間連絡方式
US5313614A (en) 1988-12-06 1994-05-17 At&T Bell Laboratories Method and apparatus for direct conversion of programs in object code form between different hardware architecture computer systems
US5119465A (en) * 1989-06-19 1992-06-02 Digital Equipment Corporation System for selectively converting plurality of source data structures through corresponding source intermediate structures, and target intermediate structures into selected target structure
JPH0378082A (ja) 1989-08-21 1991-04-03 Hitachi Ltd 予約取引処理方法
CA2025120A1 (en) 1989-09-28 1991-03-29 John W. White Portable and dynamic distributed application architecture
US5120939A (en) 1989-11-09 1992-06-09 At&T Bell Laboratories Databaseless security system
US5339419A (en) * 1990-06-25 1994-08-16 Hewlett-Packard Company ANDF compiler using the HPcode-plus compiler intermediate language
FR2667171B1 (fr) * 1990-09-25 1994-08-26 Gemplus Card Int Support portable a micro-circuit facilement programmable et procede de programmation de ce micro-circuit.
US5307492A (en) 1991-03-07 1994-04-26 Digital Equipment Corporation Mapping assembly language argument list references in translating code for different machine architectures
US5450575A (en) 1991-03-07 1995-09-12 Digital Equipment Corporation Use of stack depth to identify machine code mistakes
JP3602857B2 (ja) * 1991-04-23 2004-12-15 株式会社日立製作所 多機種対応型情報処理システム、および、方法
JP2690229B2 (ja) 1991-11-26 1997-12-10 三菱電機株式会社 非接触icカード
US5406380A (en) 1991-12-30 1995-04-11 Management Graphics, Inc. Film recorder with interface for user replaceable memory element
WO1994010657A1 (en) * 1992-10-26 1994-05-11 Intellect Australia Pty. Ltd. Host and user transaction system
US5469572A (en) 1992-12-01 1995-11-21 Taylor; James M. Post compile optimizer for linkable object code
US5367685A (en) 1992-12-22 1994-11-22 Firstperson, Inc. Method and apparatus for resolving data references in generated code
FR2705810B1 (fr) 1993-05-26 1995-06-30 Gemplus Card Int Puce de carte à puce munie d'un moyen de limitation du nombre d'authentifications.
US5519866A (en) 1993-06-28 1996-05-21 Taligent, Inc. Method and apparatus of incrementally linking components of a modeled computer program
CA2168434A1 (en) 1993-07-30 1995-09-02 Quentin Rees Oliver Device and method for programmable functions
US5650761A (en) 1993-10-06 1997-07-22 Gomm; R. Greg Cash alternative transaction system
GB2283349A (en) 1993-10-29 1995-05-03 Ibm Transaction processing system
FR2713803B1 (fr) * 1993-12-07 1996-01-12 Gemplus Card Int Carte à mémoire et procédé de fonctionnement.
US5457799A (en) 1994-03-01 1995-10-10 Digital Equipment Corporation Optimizer for program loops
US5537474A (en) * 1994-07-29 1996-07-16 Motorola, Inc. Method and apparatus for authentication in a communication system
US5500517A (en) * 1994-09-02 1996-03-19 Gemplus Card International Apparatus and method for data transfer between stand alone integrated circuit smart card terminal and remote computer of system operator
US5732270A (en) 1994-09-15 1998-03-24 Visual Edge Software Limited System and method for providing interoperability among heterogeneous object systems
US5544086A (en) 1994-09-30 1996-08-06 Electronic Payment Services, Inc. Information consolidation within a transaction network
US5841866A (en) * 1994-09-30 1998-11-24 Microchip Technology Incorporated Secure token integrated circuit and method of performing a secure authentication function or transaction
US5613120A (en) 1994-10-20 1997-03-18 Silicon Graphics, Inc. System and method for enabling, without recompilation, modification of class definitions and implementations in an object-oriented computer program
US5613012A (en) 1994-11-28 1997-03-18 Smarttouch, Llc. Tokenless identification system for authorization of electronic transactions and electronic transmissions
US5668999A (en) 1994-12-20 1997-09-16 Sun Microsystems, Inc. System and method for pre-verification of stack usage in bytecode program loops
US5748964A (en) * 1994-12-20 1998-05-05 Sun Microsystems, Inc. Bytecode program interpreter apparatus and method with pre-verification of data type restrictions
US5590331A (en) 1994-12-23 1996-12-31 Sun Microsystems, Inc. Method and apparatus for generating platform-standard object files containing machine-independent code
JPH10513585A (ja) * 1995-02-17 1998-12-22 ユーロペイ アンテルナショナル エス.アー. 集積回路制御トランザクション管理システム
US5679945A (en) * 1995-03-31 1997-10-21 Cybermark, L.L.C. Intelligent card reader having emulation features
US5590197A (en) * 1995-04-04 1996-12-31 V-One Corporation Electronic payment system and method
DE19518930A1 (de) 1995-05-23 1996-11-28 Siemens Ag Verfahren zur Verbindungssteuerung für interaktive Dienste
JP3310525B2 (ja) 1995-06-01 2002-08-05 ビー・イー・テクノロジー株式会社 デジタルデータ処理装置
US6181867B1 (en) 1995-06-07 2001-01-30 Intervu, Inc. Video storage and retrieval system
US5692132A (en) 1995-06-07 1997-11-25 Mastercard International, Inc. System and method for conducting cashless transactions on a computer network
US5689565A (en) 1995-06-29 1997-11-18 Microsoft Corporation Cryptography system and method for providing cryptographic services for a computer application
US5675804A (en) 1995-08-31 1997-10-07 International Business Machines Corporation System and method for enabling a compiled computer program to invoke an interpretive computer program
US5663553A (en) * 1995-09-27 1997-09-02 Intel Corporation Mass storage device adapter for smart cards
DE19536169A1 (de) 1995-09-29 1997-04-03 Ibm Multifunktionale Chipkarte
CA2160496A1 (en) 1995-10-13 1997-04-14 Allan M. Brown Electronic funds acceptor for vending machines
AU1143297A (en) 1995-12-01 1997-06-19 Lsi Logic Corporation Integrated network browser chip, network browser system, and method for network data communication
US6151618A (en) * 1995-12-04 2000-11-21 Microsoft Corporation Safe general purpose virtual machine computing system
FR2742892B1 (fr) 1995-12-21 1998-02-13 Bull Sa Systeme de protection de logiciel pour ordinateur ecrit en langage interprete
US6526565B1 (en) 1995-12-21 2003-02-25 International Business Machines Corporation Packaging algorithm for providing object oriented applications having reduced footprints
US5835772A (en) 1995-12-29 1998-11-10 Intel Corporation Method and apparatus for providing an interface between a system and a peripheral device
US5811771A (en) 1996-05-22 1998-09-22 Dethloff; Juergen Method and system for paying with a portable data medium having security against over charging and unauthorized use
US6226789B1 (en) 1996-01-29 2001-05-01 Compaq Computer Corporation Method and apparatus for data flow analysis
US6535903B2 (en) 1996-01-29 2003-03-18 Compaq Information Technologies Group, L.P. Method and apparatus for maintaining translated routine stack in a binary translation environment
US5860008A (en) 1996-02-02 1999-01-12 Apple Computer, Inc. Method and apparatus for decompiling a compiled interpretive code
US5742756A (en) * 1996-02-12 1998-04-21 Microsoft Corporation System and method of using smart cards to perform security-critical operations requiring user authorization
TW369753B (en) 1996-02-14 1999-09-11 Mitsubishi Electric Corp Data security method and system
US5761306A (en) 1996-02-22 1998-06-02 Visa International Service Association Key replacement in a public key cryptosystem
US6075863A (en) 1996-02-28 2000-06-13 Encanto Networks Intelligent communication device
US5848274A (en) 1996-02-29 1998-12-08 Supercede, Inc. Incremental byte code compilation system
US5764989A (en) 1996-02-29 1998-06-09 Supercede, Inc. Interactive software development system
JPH09244904A (ja) * 1996-03-12 1997-09-19 Matsushita Electric Ind Co Ltd 仮想コード翻訳系および仮想マシンシステム
US5889941A (en) * 1996-04-15 1999-03-30 Ubiq Inc. System and apparatus for smart card personalization
US5915226A (en) * 1996-04-19 1999-06-22 Gemplus Card International Prepaid smart card in a GSM based wireless telephone network and method for operating prepaid cards
US5815657A (en) * 1996-04-26 1998-09-29 Verifone, Inc. System, method and article of manufacture for network electronic authorization utilizing an authorization instrument
US6151703A (en) 1996-05-20 2000-11-21 Inprise Corporation Development system with methods for just-in-time compilation of programs
US5794049A (en) 1996-06-05 1998-08-11 Sun Microsystems, Inc. Computer system and method for executing architecture specific code with reduced run-time memory space requirements
US5946487A (en) 1996-06-10 1999-08-31 Lsi Logic Corporation Object-oriented multi-media architecture
GB9613450D0 (en) 1996-06-27 1996-08-28 Europay Int Sa Payment system
US5844218A (en) * 1996-07-16 1998-12-01 Transaction Technology, Inc. Method and system for using an application programmable smart card for financial transactions in multiple countries
US5923884A (en) * 1996-08-30 1999-07-13 Gemplus S.C.A. System and method for loading applications onto a smart card
EP0829828A1 (en) 1996-09-13 1998-03-18 Koninklijke KPN N.V. Multiple tickets in smart cards
US5875335A (en) 1996-09-30 1999-02-23 Apple Computer, Inc. Parameter marshaling techniques for dynamic object-oriented programming languages
US6438573B1 (en) 1996-10-09 2002-08-20 Iowa State University Research Foundation, Inc. Real-time programming method
US6094528A (en) 1996-10-24 2000-07-25 Sun Microsystems, Inc. Method and apparatus for system building with a transactional interpreter
CN1183449C (zh) 1996-10-25 2005-01-05 施卢默格系统公司 用微控制器使用高级程序设计语言
US5905895A (en) 1997-03-07 1999-05-18 International Business Machines Corporation Method and system for optimizing non-native bytecodes before bytecode interpretation
US5966536A (en) 1997-05-28 1999-10-12 Sun Microsystems, Inc. Method and apparatus for generating an optimized target executable computer program using an optimized source executable
US6055211A (en) 1997-07-03 2000-04-25 Microchip Technology Incorporated Force page zero paging scheme for microcontrollers using data random access memory
US6078744A (en) 1997-08-01 2000-06-20 Sun Microsystems Method and apparatus for improving compiler performance during subsequent compilations of a source program
US5987256A (en) 1997-09-03 1999-11-16 Enreach Technology, Inc. System and process for object rendering on thin client platforms
US6233733B1 (en) 1997-09-30 2001-05-15 Sun Microsystems, Inc. Method for generating a Java bytecode data flow graph
US6061520A (en) 1998-04-07 2000-05-09 Sun Microsystems, Inc. Method and system for performing static initialization
US8127121B2 (en) * 1999-01-28 2012-02-28 Ati Technologies Ulc Apparatus for executing programs for a first computer architechture on a computer of a second architechture
US6880155B2 (en) * 1999-02-02 2005-04-12 Sun Microsystems, Inc. Token-based linking
US9086931B2 (en) * 2002-11-20 2015-07-21 Purenative Software Corporation System for translating diverse programming languages
US20080282238A1 (en) * 2007-05-10 2008-11-13 Microsoft Corporation Static type for late binding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182267A (zh) * 2013-05-21 2014-12-03 中兴通讯股份有限公司 编译方法、解释方法、装置及用户设备
CN104182267B (zh) * 2013-05-21 2019-10-25 南京中兴新软件有限责任公司 编译方法、解释方法、装置及用户设备

Also Published As

Publication number Publication date
DE69714752C5 (de) 2015-08-13
MY126363A (en) 2006-09-29
WO1998019237A1 (en) 1998-05-07
AU4911897A (en) 1998-05-22
US8726247B2 (en) 2014-05-13
HK1021762A1 (en) 2000-06-30
US9400668B2 (en) 2016-07-26
DE69714752T2 (de) 2003-05-15
US20120254843A1 (en) 2012-10-04
US7818727B2 (en) 2010-10-19
AU722463B2 (en) 2000-08-03
US20120254844A1 (en) 2012-10-04
ES2184066T3 (es) 2003-04-01
PT932865E (pt) 2002-12-31
US8881119B2 (en) 2014-11-04
US6308317B1 (en) 2001-10-23
US8881118B2 (en) 2014-11-04
BR9713267A (pt) 2004-06-15
US20030023954A1 (en) 2003-01-30
JP2003141488A (ja) 2003-05-16
KR100329063B1 (ko) 2002-03-18
US20080115117A1 (en) 2008-05-15
DE69714752D1 (de) 2002-09-19
ZA979479B (en) 1998-05-12
JP3766052B2 (ja) 2006-04-12
US20110126178A1 (en) 2011-05-26
KR20000052759A (ko) 2000-08-25
US20140245272A1 (en) 2014-08-28
TW476914B (en) 2002-02-21
CN1242086A (zh) 2000-01-19
US7117485B2 (en) 2006-10-03
EP0932865A1 (en) 1999-08-04
JP2000514584A (ja) 2000-10-31
EP0932865B1 (en) 2002-08-14

Similar Documents

Publication Publication Date Title
CN1183449C (zh) 用微控制器使用高级程序设计语言
CN1290009C (zh) 使用全局数据结构在小型注脚设备上允许越过文本屏障进行访问的技术
CN1338070A (zh) 使用进入点对象在小型注脚设备上允许越过文本屏障进行访问的技术
CN1157655C (zh) 采用文本屏障在小型注脚设备上实施安全的技术
CN1261870C (zh) 数据处理方法及其设备
CN1220939C (zh) 管理协议,验证和转换下载程序片断的方法及对应的系统
CN1282071C (zh) 数据处理装置、数据处理方法和程序
CN1154071C (zh) 数据处理单元及包括该数据处理单元的数据交换系统
CN1351728A (zh) 使用运行时间环境特权在小型注脚设备上允许越过文本屏障进行访问的技术
CN101042736A (zh) 一种智能卡及智能卡中存取对象的方法
CN1287270C (zh) 重启动翻译的指令
CN101042738A (zh) 一种实现智能卡多应用的方法及数据处理装置
CN1096637C (zh) 管理类方法名
CN1338072A (zh) 使用共享对象接口在小型注脚设备中允许越过文本屏障进行访问的技术
CN1273893C (zh) 模块化计算机系统以及相关方法
CN1524216A (zh) 软件构件插件程序结构的系统和方法
CN1745400A (zh) 半导体存储卡及对其进行控制的程序
US20050188360A1 (en) Method and apparatus for providing an application on a smart card
CN101042737A (zh) 一种智能卡及向智能卡中创建应用、插入对象的方法
US20050184164A1 (en) Method and apparatus for installing an application onto a smart card
CN1365474A (zh) 认证装置
CN1241144C (zh) 自主型集成电路卡
CN1624657A (zh) 安全相关的编程接口
CN1922576A (zh) 操作系统
CN1834908A (zh) 用于将开发模式应用于基于组件的应用程序的系统和方法

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1023827

Country of ref document: HK

C56 Change in the name or address of the patentee

Owner name: SETEC OY

Free format text: FORMER NAME: AXALTO SA

Owner name: AXALTO SA

Free format text: FORMER NAME: SCHLUMBERGER TECHNOLOGIES, INC.

CP01 Change in the name or title of a patent holder

Address after: Monte Carlo, France

Patentee after: AXALTO S.A.

Address before: Monte Carlo, France

Patentee before: Schlumberger Systems

CP03 Change of name, title or address

Address after: East France

Patentee after: GEMALTO OY

Address before: Monte Carlo, France

Patentee before: AXALTO S.A.

CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20050105