United States Patent6164549
RichardsDecember 26, 2000

Title

IC card with shell feature

Abstract

There is provided an integrated circuit card having an associated operating mode. The integrated circuit card includes: a microprocessor; a memory coupled to the microprocessor; data stored in the memory representative of the operating mode; an operating system stored in the memory for processing selected information in a first IC card format; a shell application stored in the memory for processing the selected information in a second IC card format; and means for routing the selected information to either the operating system or the shell application responsive to the operating mode. The selected information may be a command, such as a file access command.


Inventors:Richards; Timothy Philip (Herts, GB)
Assignee:Mondex International Limited (London, GB)
Appl. No.:075975
Filed:May 11, 1998

Current U.S. Class:235/492 235/380 
Field of Search:235/379,380,492 705/41

U.S. Patent Documents
4214230July 1980Fak et al.
4218582August 1980Hellman et al.
4259720March 1981Campbell
4302810November 1981Bouricius et al.
4305059December 1981Benton
4321672March 1982Braun et al.
4341951July 1982Benton
4405829September 1983Rivest et al.
4408203October 1983Campbell
4423287December 1983Zeidler
4442345April 1984Mollier et al.
4453074June 1984Weinstein
4467139August 1984Mollier
4498000February 1985Decavele et al.
4536647August 1985Atalla et al.
4578530March 1986Zeidler
4605820August 1986Campbell, Jr.
4629872December 1986Hallberg
4630201December 1986White
4650978March 1987Hudson et al.
4669596June 1987Capers et al.
4705211November 1987Honda et al.
4709136November 1987Watanabe
4709137November 1987Yoshida
4727243February 1988Savar
4727244February 1988Nakano et al.
4731842March 1988Smith
4734568March 1988Watanabe
4736094April 1988Yoshida
4742215May 1988Daughters et al.
4745267May 1988Davis et al.
4746788May 1988Kawana
4748557May 1988Tamada et al.
4748668May 1988Shamir et al.
4752677June 1988Nakano et al.
4757185July 1988Onishi
4757543July 1988Tamada et al.
4759063July 1988Chaum
4759064July 1988Chaum
4767920August 1988Kitta et al.
4778983October 1988Ushikubo
4785166November 1988Kushima
4786790November 1988Kruse et al.
4797542January 1989Hara
4797920January 1989Stein
4798941January 1989Watanabe
4802218January 1989Wright et al.
4803347February 1989Sugahara et al.
4811393March 1989Hazard
4816653March 1989Anderl et al.
4816654March 1989Anderl et al.
4825052April 1989Chemin et al.
4831245May 1989Ogasawara
4833595May 1989Iijima
4839504June 1989Nakano
4839792June 1989Iijima
4849614July 1989Watanabe et al.
4853522August 1989Ogasawara
4853961August 1989Pastor
4874935October 1989Younger
4877945October 1989Fujisaki
4877947October 1989Mori
4879747November 1989Leighton et al.
4882474November 1989Anderl et al.
4887234December 1989Iijima
4891503January 1990Jewell
4891506January 1990Yoshimatsu
4900904February 1990Wright et al.
4901276February 1990Iijima
4906828March 1990Halpern
4907270March 1990Hazard
4926480May 1990Chaum
4935962June 1990Austin
4949257August 1990Orbach
4961142October 1990Elliott et al.
4969188November 1990Schoobi
4977595December 1990Ohta et al.
4984270January 1991LaBounty
4985615January 1991Iijima
4987593January 1991Chaum
4993068February 1991Piosenka et al.
4995081February 1991Leighton et al.
4996711February 1991Chaum
5001753March 1991Davio et al.
5003594March 1991Shinagawa
5005200April 1991Fischer
5010239April 1991Mita
5012074April 1991Masada
5012076April 1991Yoshida
5014312May 1991Lisimaque et al.
5016274May 1991Micali et al.
5038025August 1991Kodera
5068894November 1991Hoppe
5093862March 1992Scwartz
5097115March 1992Ogasawara et al.
5120939June 1992Claus et al.
5128997July 1992Pailles et al.
5131038July 1992Puhl et al.
5142578August 1992Matyas et al.
5146499September 1992Geffrotin
5148481September 1992Abraham et al.
5161231November 1992Iijima
5162989November 1992Matsuda
5163098November 1992Dahbura
5164988November 1992Matyas et al.
5165043November 1992Miyahara et al.
5166503November 1992Mizuta
5175416December 1992Mansvelt et al.
5180901January 1993Hiramatsu
5191193March 1993Le Roux
5191608March 1993Geronimi
5200999April 1993Matyas et al.
5201000April 1993Matyas et al.
5202922April 1993Iijima
5214702May 1993Fischer
5224162June 1993Okamoto et al.
5243175September 1993Kato
5247578September 1993Pailles et al.
5293577March 1994Hueske et al.
5371797December 1994Bocinsky, Jr.
5420405May 1995Chasek
5452431September 1995Bournas
5473690December 1995Grimonprez et al.
5485520January 1996Chaum et al.
5511121April 1996Yacobi
5517011May 1996Vandenengel
5530232June 1996Taylor
5534857July 1996Laing et al.
5539825July 1996Akiyama et al.
5542081July 1996Geronimi
5544246August 1996Mandelbaum et al.
5546523August 1996Gatto
5557516September 1996Hogan
5574269November 1996Mori et al.
5578808November 1996Taylor
5581708December 1996Iijima
5588146December 1996Leroux
5649118July 1997Carlisle et al.
5682027October 1997Bertina et al.
5692132November 1997Hogan
5699528December 1997Hogan
5704046December 1997Hogan
5705798January 1998Tarbox
5708780January 1998Levergood et al.
5715314February 1998Payne et al.
5724424March 1998Gifford
5754762May 1998Kuo et al.
5796831August 1998Paradinas et al.
5802519September 1998Jong
5825875October 1998Ugon
5912453June 1999Gungl
Foreign Patent Documents
0152024Aug., 1985EP
0157303Oct., 1985EP
0190733Aug., 1986EP
0218176Apr., 1987EP
0261030Mar., 1988EP
0275510Jul., 1988EP
0292248Nov., 1988EP
0325506Jan., 1989EP
0328289Aug., 1989EP
0354793Feb., 1990EP
0451936Oct., 1991EP
0466969Jan., 1992EP
0475837Mar., 1992EP
0537756Apr., 1993EP
0540095May., 1993EP
0547741Sep., 1992EP
0559205Aug., 1993EP
0588339Mar., 1994EP
0594493Apr., 1994EP
0636998Feb., 1995EP
0647902Apr., 1995EP
0666550Aug., 1995EP
0686947Dec., 1995EP
0707290Sep., 1995EP
0751460Jan., 1997EP
2284689Jun., 1995GB
2536928Jun., 1984FR
2592856Dec., 1996JP
266717Mar., 1992FR
2667171Mar., 1992EP
2687816Aug., 1993FR
64-81084Mar., 1989JP
WO 8707062Nov., 1987WO
WO 8809019Nov., 1988WO
WO 9005960May., 1990WO
WO 9101538Feb., 1999WO
WO 9213322Aug., 1992WO
WO 9320538Oct., 1993WO
WO 9321612Oct., 1993WO
WO 9522810Aug., 1995WO
WO 9619771Jun., 1996WO
WO 9628795Sep., 1996WO
WO 9638825Dec., 1996WO
WO 9843212Oct., 1998WO
WO 9910824Mar., 1999WO
WO 9916031Apr., 1999WO
Other References
Davies et al., "Security for Computer Networks: An Introduction to Data Security in Teleprocessing and Electronic Funds Transfer," John Wiley & Sons 1984..~
Primary Examiner: Lee; Michael G
Assistant Examiner: Tremblay; Mark
Attorney, Agent or Firm:Baker Botts, L.L.P.

Parent Case Text



CROSS-REFERENCE TO PRIORITY APPLICATIONS

This application claims the priority of U.S. Provisional Application Ser. No. 60/046,514, filed on May 15, 1997, entitled "Design for a Multi Application Smart Card," and U.S. Provisional Application Ser. No. 60/046,543, filed on May 15, 1997, entitled "Virtual Machine for a Multi Application Smart Card," which are incorporated by reference herein in their entireties.

Claims


I claim:
1. An integrated circuit card having an associated operating mode, comprising:
a microprocessor;
a memory coupled to said microprocessor;
data stored in said memory representative of said operating mode;
an operating system stored in said memory for processing selected information in a first IC card format;
a shell application stored in said memory for processing said selected information in a second IC card format; and
means responsive to said operating mode for routing said selected information to either said operating system or said shell application.

2. The integrated circuit card of claim 1, wherein said second IC card format is different than said first IC card format.

3. The integrated circuit card of claim 1, wherein said selected information is a command.

4. The integrated circuit card of claim 3, wherein said command is a file access command.

5. The method of claim 1, wherein said selected information is associated with a file structure format.

6. The integrated circuit card of claim 1, further comprising:
a non-shell application stored in said memory;
means for receiving a request by said operating system from said non-shell application for delegating control to a delegated application;
means for determining whether said operating mode of said IC card is a predetermined operating mode;
means for determining whether said delegated application corresponds to said shell application; and
means for failing the request for delegating control if the operating mode of said IC card corresponds to said predetermined operating mode and said delegated application corresponds to said shell application.

7. A method of loading an application onto an IC card, wherein said application has an associated file mode type and said IC card includes a microprocessor, memory coupled to said microprocessor, and data stored in said memory representative of an operating mode associated with said IC card, said method comprising the steps of:
determining whether the file mode type of said application is a predetermined file mode type; and
changing the operating mode of said IC card if said file mode type corresponds to said predetermined file mode type.

8. The method of claim 7, further comprising the step of determining whether any other applications have already been loaded onto the IC card before the step of changing the operating mode.

9. The method of claim 7, further comprising loading said application onto the IC card if the file mode type of said application corresponds to the predetermined file mode type and no other applications have already been loaded onto the IC card.

10. The method of claim 8, wherein the changing step comprises changing the operating mode of said IC card if said file mode type corresponds to said predetermined file mode type and no other applications have already been loaded onto the IC card.

11. A method of routing a command by an operating system of an IC card, wherein said IC card includes a microprocessor, memory coupled to said microprocessor, and data stored in said memory representative of an operating mode associated with said IC card, said method comprising the steps of:
determining whether the operating mode of said IC card is a predetermined operating mode; and
routing the command directly to an application if the operating mode of said IC card corresponds to the predetermined operating mode.

12. The method of claim 11, further comprising the steps of:
if the operating mode of said IC card does not correspond to the predetermined operating mode, determining whether said command is a select file command supported by said operating system; and
routing said command to an operating system routine responsible for said select file command if said command is a select file command supported by said operating system.

13. The method of claim 11, wherein the IC card further comprises a currently selected file having an associated file type, the method further comprising the steps of:
if the operating mode of said IC card does not correspond to the predetermined operating mode, determining whether the file type of said currently selected file is supported by said operating system; and
routing said command to an operating system routine responsible for said file type if the file type of said currently selected file is supported by said operating system.

14. The method of claim 13, if the file type of said currently selected file is not supported by said operating system, further comprising the step of routing said command to an application.

15. A method of delegating control between applications by an operating system of an IC card, wherein said IC card includes a microprocessor, memory coupled to said microprocessor a shell application stored in said memory for communicating with said operating system and for processing information formatted in a defined IC card format, and data stored in said memory representative of an operating mode associated with said IC card, said method comprising the steps of:
receiving a request by said operating system from a first application for delegating control to a second application;
determining whether the operating mode of said IC card is a predetermined operating mode;
determining whether said second application corresponds to said shell application; and
failing the request for delegating control if the operating mode of said IC card corresponds to said predetermined operating mode and said second application corresponds to said shell application.

16. A method of initiating communication between an IC card and a terminal, wherein said IC card comprises a microprocessor and a memory, said memory having stored therein an operating system, a shell application, and data representative of an operating mode of said IC card, said operating mode representing whether selected information is to be routed to said operating system or said shell application, said method comprising the steps of:
receiving a reset signal by said IC card from said terminal; and
returning an answer-to-reset from said IC card to said terminal based on said operating mode of said IC card.

17. The method of claim 16, wherein a plurality of answer-to-reset files are stored in said memory of said IC card, and said step of returning an answer-to-reset comprises selecting one of said answer-to-reset files based on said operating mode.

18. The method of claim 16, wherein said selected information is a command.

19. The method of claim 18, wherein said command is a file access command.

20. The method of claim 16, wherein said selected information is associated with a file structure format.

21. The integrated circuit card of claim 2, wherein said means is responsive only to said operating mode for routing said selected information to either said operating system or said shell application.

Description

BACKGROUND OF INVENTION

Integrated circuit (IC) cards are becoming increasingly used for many different purposes in the world today, principally because they are ideal tools for the delivery of distributed, secure information processing at a low cost. An IC card, also called a "smart card," is a card typically the size of a conventional credit card, but which contains a computer chip on the card. The computer chip on the IC card typically includes a microprocessor, read-only-memory (ROM), electrically erasable programmable read-only-memory (EEPROM), a random access memory (RAM), an input/output (I/O) mechanism, and other circuitry to support the microprocessor in its operations. The computer chip can execute one or more applications stored on the card. Examples of applications that IC cards are being used to store and execute include credit/debit, electronic money/purse, telephone calling card, and loyalty reward applications.

As the use and application of IC cards has increased, IC card standards have been promulgated. For example, the International Organization for Standardization (ISO) and the International Engineering Consortium (IEC) have promulgated several industry-wide standards for IC cards, ISO/IEC 7816-1 through ISO 7816-8. The ISO/IEC standards provide, for example, general guidelines for file structures and referencing methods so that various applications and IC card operating systems can understand one another and work in a cohesive manner. Additionally, in the field of payment systems (such as credit and debit card systems), the EMV '96 Integrated Circuit Card Specification for Payment Systems, Version 3.0, Jun. 30, 1996, available from MasterCard International Incorporated.RTM., specifies file structures and file referencing methods that are generally compliant with ISO/IEC standards 7816-4 and 7816-5. Nonetheless, proprietary IC card standards exist that are not compliant with ISO/IEC standards.

The existence of multiple IC card standards is problematic to the IC card manufacturer, who is required to produce different versions of its IC cards, with different operating systems that are compatible with the different standards. Moreover, since operating systems are typically loaded into the ROM of an IC card when it is initially produced, each time a standard is updated or a new standard is adopted, an IC card manufacturer may be required to distribute new IC cards with an updated operating system compatible with the new or updated standard.

It would advantageous to the card manufacturer, card issuer, application provider, and card user if the operating system of an IC card was not required to be updated each time a new or updated IC card standard was promulgated.

SUMMARY OF THE INVENTION

The present invention solves the aforementioned problems by introducing a "shell" application that executes "on top" of the operating system and that handles the implementation of IC card standards that are not compatible with the initially loaded operating system of the IC card. Advantageously, the shell application supplements the IC card standards with which the IC card is compatible. Thus, as standards change or new standards are adopted, an IC card needs to be updated only with a new shell application, rather than having to be updated with a new operating system.

According to a preferred embodiment of the present invention, there is provided an integrated circuit card having an associated operating mode. The integrated circuit card includes: a microprocessor; a memory coupled to the microprocessor; data stored in the memory representative of the operating mode; an operating system stored in the memory for processing selected information in a first IC card format; a shell application stored in the memory for processing the selected information in a second IC card format; and means for routing the selected information to either the operating system or the shell application responsive to the operating mode. The selected information may be a command, such as a file access command. In addition, the selected information may be associated with a file structure format.

In accordance with the present invention, there is also provided a method of loading an application onto an IC card, wherein the application has an associated file mode type and the IC card has an associated operating mode. The method includes the steps of determining whether the file mode type of the application is a predetermined file mode type, and changing the operating mode of the IC card if the file mode type corresponds to the predetermined file mode type. The predetermined file mode type is, for example, a "shell" file mode type, and the operating mode of the IC card is, for example, either "OS" or "shell." Thus, when an application has an associated file mode type of "shell," the operating mode of the IC card is changed from "OS" to "shell."

Preferably, a shell application is not loaded unless it is the first application loaded. In this way, operability of the non-shell applications loaded onto the IC card may be guaranteed. Thus, the method of loading an application according to the present invention preferably further includes the steps of: determining whether any other applications have already been loaded onto the IC card; loading the application onto the IC card if the file mode type of the application corresponds to the predetermined file mode type and no other applications have already been loaded onto the IC card; and changing the operating mode of the IC card if the file mode type corresponds to the predetermined file mode type and no other applications have already been loaded onto the IC card.

In accordance with another preferred embodiment of the present invention, there is also provided a method of routing a command by an operating system of an IC card, wherein the IC card has an associated operating mode. The method includes the steps of determining whether the operating mode of the IC card is a predetermined operating mode; and routing the command directly to an application if the operating mode of the IC card corresponds to the predetermined operating mode. For example, assuming a SELECT FILE command is received by an IC card from a terminal and the IC card has a shell application loaded thereon, if the operating mode of the IC card and the predetermined operating mode are both "shell," the operating system would route the SELECT FILE command to the shell application.

Preferably, the method of routing further includes the steps of: if the operating mode of the IC card does not correspond to the predetermined operating mode, determining whether the command is a select file command supported by the operating system; and routing the command to an operating system routine responsible for the select file command if the command is a select file command supported by the operating system.

Preferably, the IC card further comprises a currently selected file having an associated file type and the method of routing further comprises the steps of: if the operating mode of the IC card does not correspond to the predetermined operating mode, determining whether the file type of the currently selected file is supported by the operating system; and routing the command to an operating system routine responsible for the file type if the file type of the currently selected file is supported by the operating system. If the file type of the currently selected file is not supported by operating system, the method further comprises the step of routing the command to an application.

In accordance with another preferred embodiment of the present invention, there is also provided a method of delegating control between applications by an operating system of an IC card, wherein the IC card is for use with a defined IC card format and has an associated operating mode. The method includes the steps of storing a shell application in the IC card for communicating with the operating system and for processing information in a format compliant with the defined IC card format; receiving a request by the operating system from a first application for delegating control to a second application; determining whether the operating mode of the IC card is a predetermined operating mode; determining whether the second application corresponds to the shell application; and failing the request for delegating control if the operating mode of the IC card corresponds to the predetermined operating mode and the second application corresponds to the shell application.

In accordance with another preferred embodiment of the present invention, there is also provided a method of initiating communication between an IC card and a terminal, wherein the IC card comprises a microprocessor and a memory, the memory having stored therein an operating system, a shell application, and data representative of an operating mode of the IC card, the operating mode representing whether selected information is to be routed to the operating system or the shell application. The method of initiating includes the steps of receiving a reset signal by the IC card from the terminal; and returning an answer-to-reset from the IC card to the terminal based on the operating mode of the IC card.

Preferably, a plurality of answer-to-reset files are stored in the memory of the IC card, and the step of returning an answer-to-reset comprises selecting one of the answer-to-reset files based on the operating mode. The selected information may be a command, such as a file access command. In addition, the selected information may be associated with a file structure format.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic representation of an IC card in accordance with a preferred embodiment of the present invention;

FIG. 2 is a perspective view of an IC card and terminal in accordance with a preferred embodiment of the present invention;

FIG. 3 is a functional block diagram of an IC card in accordance with a preferred embodiment of the present invention;

FIG. 4 is an exemplary hierarchical file structure according to the EMV Specification;

FIGS. 5A and 5B are flowcharts illustrating the steps for a load.sub.-- file command used in accordance with a preferred embodiment of the present invention;

FIG. 6 is a flowchart illustrating the steps for a delete.sub.-- file command used in accordance with a preferred embodiment of the present invention;

FIG. 7 is a flowchart illustrating the steps for a route command used in accordance with a preferred embodiment of the present invention;

FIG. 8 is a flowchart illustrating the steps for a delegate.sub.-- request command used in accordance with a preferred embodiment of the present invention; and

FIG. 9 is a flowchart illustrating the steps for a determine.sub.-- ATR.sub.-- status command used in accordance with a preferred embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 provides a schematic representation of a typical IC card 10 that can be used with the presently claimed invention. The IC card 10 includes an integrated circuit 12 and one or more electrical contacts 14, connected to the integrated circuit 12, for communication between the integrated circuit 12 and devices outside the IC card 10.

FIG. 2 shows an example of a device with which the IC card 10 communicates. As used in this specification and the appended claims, the term "terminal" shall be used to generically describe devices with which an IC card may communicate. A typical terminal 20, as shown in FIG. 2, includes a card reader 22, a keypad 24, and a display 26. The keypad 24 and the display 26 allow a user of the IC card 10 to interact with the terminal. The keypad 24 allows the user to select a transaction, to enter a personal identification number ("PIN"), and to enter transactional information. The display 26 allows the user to receive informational messages and prompts for data entry. Other types of terminals may include IC card compatible ATM machines and telephones.

FIG. 3 provides a functional block diagram of the integrated circuit 12. At a minimum, the integrated circuit 12 includes a processing unit 100 and a memory unit 110. Preferably, the integrated circuit 12 also includes control logic 150, a timer 160, security circuitry 170, input/output ports 180, and a co-processor 190. The control logic 150 provides, in conjunction with the processing unit 100, the control necessary to handle communications between the memory unit 110 and input/output ports 180. The timer 160 provides a timing reference signal for the processing unit 100 and the control logic 150. The security circuitry 170 preferably provides fusible links that connect the input/output ports 180 to internal circuitry for testing during manufacturing. The fusible links are burned after completion of testing to limit later access to sensitive circuit areas. The co-processor 190 provides the ability to perform complex computations in real time, such as those required by cryptographic algorithms.

The memory unit 110 may include different types of memory, such as volatile and non-volatile memory and read-only and programmable memory. For example, as shown in FIG. 3, the memory unit 110 may include read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and random-access memory (RAM).

The memory unit 110 stores IC card data such as secret cryptographic keys and a user PIN. The secret cryptographic keys may be any type of well-known cryptographic keys, such as the private keys of public-key pairs. Preferably, the secret cryptographic keys are stored in a secure area of ROM or EEPROM that is either not accessible or has very limited accessibility from outside the IC card.

The memory unit 110 also stores the operating system of the IC card. The operating system loads and executes IC card applications and provides file management and other basic card services to the IC card applications. Preferably, the operating system is stored in ROM.

In addition to the basic services provided by the operating system, the memory unit 110 may also include one or more IC card applications. For example, if the IC card is to be used as an electronic cash card, an application called MONDEX.TM. PURSE might be included on the IC card, which loads an electronic value of a certain currency from a user's account in a financial institution onto the IC card. An application may include both program and data files, which may be stored in either ROM or EEPROM.

To enable the inter-operability of different terminals with different IC cards and applications, standards have been promulgated with respect to the organization of files stored on an IC card. For example, in the payment systems industry, the EMV '96 Integrated Circuit Card Specification for Payment Systems, Version 3.0, Jun. 30, 1996, available from MasterCard International Incorporated.RTM. (hereinafter the "EMV Specification"), incorporated herein by reference in its entirety, sets forth a hierarchical tree structure for accessing files, which is generally compliant with the ISO/IEC 7816-4 and 7816-5 standards. An illustrative example of such a hierarchical tree structure is provided in FIG. 4.

In FIG. 4, there are shown four types of file categories: the Directory Definition File (DDF), the Directory File (DIR), the Application Definition File (ADF), and the Application Elementary File (AEF). According to the EMV Specification, each DDF contains one DIR. Each DIR may contain one or more ADF and/or DDF. Each ADF contains one or more AEF, which are files containing data related to a particular application.

According to the EMV Specification, files are referenced either by a unique name or by a short file identifier (SFI). A DDF or ADF is referenced by its unique name using a SELECT command. Once a particular DDF or ADF is selected, a corresponding DIR or AEF is referenced with an SFI using a READ RECORD command. In the case of a DIR, the SFI is in the range of I to 10. In the case of an AEF, the SFI is in the range 1 to 30. The EMV Specification sets forth at least one mandatory DDF with a unique name of "1PAY.SYS.DDF01."

The format for a SELECT command for selecting a DDF or ADF according to the EMV Specification is shown in Table 1. In response to a SELECT command for a DDF, an IC card returns the SFI of the DIR attached to the DDF. When an ADF is selected, an IC card returns information that the terminal may use, in conjunction with other commands, to retrieve the SFI of AEFs related to the ADF.

Once the SFI of a DIR or AEF is known, a terminal may use the READ RECORD command to read the records of the DIR or AEF. The format of the READ RECORD command according to the EMV Specification is shown in Table 2.

TABLE 1 ______________________________________ SELECT Command Format Byte Number Value ______________________________________ 1 Hexadecimal "00" 2 Hexadecimal "A4" 3 Hexadecimal "04" 4 Hexadecimal "00" 5 Length of File Name (Hexadecimal "05"- "10") 6-21 File Name (number of bytes variable depending on length of file name) Last Hexadecimal "00" ______________________________________

TABLE 2 ______________________________________ READ RECORD Command Format Byte Number Value ______________________________________ 1 Hexadecimal "00" 2 Hexadecimal "B2" 3 Record Number 4 SFI 5 Hexadecimal "00" ______________________________________

Although the EMV Specification sets a standard for file organization within the payment systems industry, other IC card file organization standards may exist in other industries. Some may be proprietary and may not be generally compatible with the EMV Specification or ISO/IEC 7816-4 or 7816-5.

Typically, an IC manufacturer who desires to produce IC cards compatible with the EMV Specification and other proprietary specifications must produce IC cards with different operating systems to implement the different file structures and different file referencing and access methods defined by the various specifications. According to the presently claimed invention, however, a manufacturer may produce an IC card with a single operating system and execute different shell applications to implement the different standards.

FIGS. 5A to 9 are flowcharts illustrating a preferred embodiment of IC card operating system routines capable of supporting a shell application. In the embodiment of FIGS. 5A to 9, the operating system is a multiple application operating system that runs on IC cards, such as the MULTOS.TM. operating system from Mondex International Limited. Such an operating system includes routines for loading and deleting applications, routines for routing commands to appropriate operating system processes or applications, routines for handling delegation of processing between applications, and routines for handling the answer-to-reset (ATR) message.

In the embodiment of FIGS. 5A to 9, only one shell application can be loaded onto an IC card at any one time. Once the shell application is loaded, it is valid for all applications loaded on the IC card. Preferably, the operating system has a delegation feature, such as the delegation feature described in the United States patent application entitled "Multi-Application IC Card with Delegation Feature," by Everett et al., filed Apr. 23, 1998, which is hereby incorporated by reference. When the shell application receives a command from the operating system, it interprets the command and/or delegates control to the application associated with the command. If control is delegated to an application, when the application is finished, it returns control to the shell application. The shell application then returns any response to the operating system in the proper format for transmission to the terminal.

Although for the sake of simplicity the preferred embodiment loads only a single shell application at a time, the present invention is not limited to such an embodiment. It is within the scope of the present invention for multiple shell applications to be loaded onto an IC card and to be used with different sets of applications.

As a matter of notation, the data elements referred to in the flowcharts of FIGS. 5A to 9 follow a dot notation convention where the data element following the dot (".") is a component of the data element preceding the dot. For example, the data element file.sub.-- mode includes two components:file.sub.-- mode.sub.-- type and application.sub.-- id. In the dot notation used, the first component data element is referred to as file.sub.-- mode.file.sub.-- mode.sub.-- type and the second component data element is referred to as file.sub.-- mode.application.sub.-- id.

FIGS. 5A and 5B are flowcharts illustrating the implementation of a file loading routine by an operating system capable of supporting a shell application. In step 510, the routine receives the file loading command load.sub.-- file.sub.-- command from the security manager of the operating system, OS.sub.-- Security.sub.-- Manager. In step 520, after receiving the command, the routine checks whether the application identification number associated with the command, load.sub.-- file.sub.-- command.application.sub.-- id, is present in the operating system control information, os.sub.-- control.sub.-- info.application.sub.-- id. If the application identification number is already present, in step 521, the routine sets the response status load.sub.-- file.sub.-- response.status to "failed" and sets the error description load.sub.-- file.sub.-- response.error.sub.-- cause to "duplicate application id." This error response indicates that the application is already loaded and cannot be loaded again. The error response load.sub.-- file.sub.-- response is then returned to the OS.sub.-- Security.sub.-- Manager.

If the application identification number of the application to be loaded is not present, in step 530, the routine checks the file mode type of load.sub.-- file.sub.-- command. The file mode type may be, for example, "shell" or "non-shell." A "shell" file mode type indicates that the application to be loaded is a shell application, while a "non-shell" file mode type indicates that the application to be loaded is not a shell application.

If the application to be loaded is a shell application, the routine further checks whether os.sub.-- control.sub.-- info is empty. If os.sub.-- control.sub.-- info is not empty, then one or more applications have already been loaded onto the IC card. If this is the case, in step 531, the routine sets the response status load.sub.-- file.sub.-- response.status to "failed" and sets the error description load.sub.-- file.sub.-- response.error.sub.-- cause to "application already loaded." This error response is a result of the restriction that the shell application is to be valid for all applications loaded onto the IC card. To ensure that all applications will operate correctly with the shell application, the shell application must be the first application loaded onto the IC card.

Assuming that an error condition has not been triggered in steps 520 and 530, the directory file and os.sub.-- control.sub.-- info are updated with the appropriate application information in steps 540 and 550.

With reference to FIG. 5B, in step 560, the file mode type of load.sub.-- file.sub.-- command is checked once again. If the file mode type is "shell," then in step 570, the file.sub.-- mode and the selected.sub.-- file data elements are updated. The file.sub.-- mode data element contains both the file.sub.-- mode type of the IC card and the application.sub.-- id of the shell application. The file.sub.-- mode.file.sub.-- mode.sub.-- type variable represents the operating mode of the IC card and, thus, may also be referred to as the "operating mode." The operating mode of the IC card may be, for example, either "OS" or "shell." "OS" mode indicates that a shell is not loaded, while "shell" mode indicates that a shell is loaded. The selected.sub.-- file data element contains the application.sub.-- id and the file.sub.-- type of the currently selected file.

In step 570, file.sub.-- mode.file.sub.-- mode.sub.-- type is set to "shell." The file.sub.-- mode.file.sub.-- mode.sub.-- type represents the operating mode of the IC card and, thus, is also referred to as the "operating mode." In addition, the application identification number of the currently selected file is set to the application identification number of the shell application. The file.sub.-- type of the selected file is set to "dedicated file," indicating that file commands are not to be handled by the operating system.

In step 580, the response status load.sub.-- file.sub.-- response.status is set to "success" and is returned to the OS.sub.-- Security.sub.-- Manager.

FIG. 6 is a flowchart illustrating the implementation of a file deleting routine by an operating system capable of supporting a shell application. In step 610, a delete.sub.-- file.sub.-- command is received from the OS.sub.-- Security.sub.-- Manager. In step 620, checking is performed to verify that the application being deleted exists in os.sub.-- control.sub.-- info--i.e., that the application is loaded on the IC card. If the application identification number is not in os.sub.-- control.sub.-- info, then in step 670, the response status delete.sub.-- file.sub.-- response.status is set to "failed" and the error description delete.sub.-- file.sub.-- response.error.sub.-- cause is set to "application not loaded."

If the application is loaded on the IC card, in step 630 checking is performed to determine whether the file mode type of the application being deleted, delete.sub.-- file.sub.-- command.file.sub.-- mode.sub.-- type, is equal to "shell." Checking is also performed to determine whether the application identification number of the application being deleted, delete.sub.-- file.sub.-- command.application.sub.-- id, is equal to the application identification number assigned to the file mode of the IC card, file.sub.-- mode.application.sub.-- id. In short, checking is performed to determine whether a loaded shell application is being deleted.

If a loaded shell application is being deleted, in step 680, file.sub.-- mode.file.sub.-- mode.sub.-- type is set to "OS" and selected.sub.-- file.file.sub.-- type is set to the default file type for the IC card, i.e., "master file."

In step 640, the directory file record corresponding to the application is deleted from the directory in which it is stored. In step 650, the application identification number of the application is deleted from os.sub.-- control.sub.-- info. In step 660, delete.sub.-- file.sub.-- response.status is set to "success" and the response status is returned to the OS.sub.-- Security.sub.-- Manager.

FIG. 7 is a flowchart illustrating the implementation of a command routing routine by an operating system capable of supporting a shell application. In step 710, the route routine receives a command from the cardholder--i.e., a command from outside of the IC card. In step 720, checking is performed to determine the operating mode of the IC card. If file.sub.-- mode.file.sub.-- mode.sub.-- type is not equal to "OS," a shell application has been loaded onto the IC card. Thus, the command from the cardholder is sent directly to the currently selected application or applications. In the typical case, the currently selected application will be the shell application. It may be the case, however, that the shell application has delegated control to another application and that that application receives and processes the command directly.

If the operating mode of the IC card is equal to "OS," the various conditions defined in steps 730 to 750 are checked. In step 730, if the command is a select.sub.-- file command, the command is sent to the select.sub.-- file routine of the operating system. In step 740, if the file type of the currently selected file is "master file," the command is sent to the provide.sub.-- card.sub.-- facilities routine of the operating system, which handles commands associated with the master file type. Similarly, in step 750, if the file type is "directory file," the command is sent to the read.sub.-- card-level.sub.-- data.sub.-- files routine of the operating system, which handles commands associated with the directory file type. If none of the conditions in steps 730 to 750 are satisfied, then the selected file must be an application. Therefore, the command is sent to the currently selected applications.

FIG. 8 is a flowchart illustrating a delegate request checking routine that is necessary if an operating system supports both a shell application and a delegate feature. In step 810, a delegate.sub.-- request is received from an application. In step 820, checking is performed to determine whether the operating mode of the IC card is "shell" and whether the application identification number of the delegated application (the application to which control is being sought to be transferred) is the same as the application identification of the shell application of the IC card. If both conditions are true, then an application is attempting to delegate control to the shell application. Since the shell application is the first application loaded and selected, and thus delegates control to all other applications, such a delegation would be recursive. Recursive delegation is not allowed. In step 830, therefore, delegate.sub.-- response.status is set to "failed" and delegate.sub.-- response.error.sub.-- cause is set to "recursive shell delegation." The delegate response is returned to the delegator applications. In step 820, if it is determined that the delegator application has submitted a proper, non-recursive delegate request, the request is processed in accordance with the operating system's delegate handling procedures.

When an IC card is inserted into a terminal, it receives a reset signal. To initiate communication with the terminal, the IC card must respond to the reset signal with an appropriate answer-to-reset (ATR) message. FIG. 9 is a flowchart illustrating an ATR routine for an IC card operating system that supports a shell application.

In step 910, the operating mode of the IC card is checked. If the file.sub.-- mode.file.sub.-- mode.sub.-- type is equal to "OS," in step 920, the file type of selected.sub.-- file is set to the default "master file" and s.sub.-- ATR.sub.-- status is set to "default ATR." Otherwise, if the operating mode of the IC card is "shell," in step 930, the file type and application identification number of the selected file are set to "dedicated file" and file.sub.-- mode.application.sub.-- id, respectively. s.sub.-- ATR.sub.-- status is set to "shell ATR." In both cases, s.sub.-- ATR.sub.-- status is returned to the control.sub.-- ATR routine of the operating system. Using s.sub.-- ATR.sub.-- status, the control.sub.-- ATR routine responds with the appropriate ATR to the reset signal from the terminal. The appropriate ATR may be stored in different files on the IC card, which are selected based on s.sub.-- ATR.sub.-- status.

Although the present invention has been described with reference to certain preferred embodiments, various modifications, alterations, and substitutions will be known or obvious to those skilled in the art without departing from the spirit and scope of the invention, as defined by the appended claims.

* * * * *