A SYSTEM COMPRISING A SMART CARD AND A READER
CONTEXT
The invention relates to an assembly that comprises a smart card and a smart card reader. The card may be, for example, a subscriber identity module (SIM) for a cellular phone network. The reader may be, for example, a reader that can copy data from one SIM card to another SIM card.
INVENTION
The card comprises a functional set of instructions that the reader can execute. The reader comprises a basic set of instructions, which causes the reader to retrieve the functional set of instructions from the card. The functional set of instructions causes the reader to manipulate data contained in the card.
ADVANTAGE
The invention allows a low-cost reader. The basic set of instructions can be very generic. Any special details, which may differ from one type of card to another, can be in the functional set of instructions that reside in the card. Consequently, the reader can be used for a wide range of different types of cards. Consequently, the reader can be produced in relatively large numbers, which allows economy of scale.
Among various manipulations of data contained in the card, the invention allows data stored in a current card, to be transferred by the reader to a new card, particularly personal data relating to the user.
DETAILS
Figure 1 shows the general structure of a device 1 which typically constitutes, by way of example, each of the above-mentioned smart card and associated reader. It comprises information processing means or CPU (Calculation Processing Unit) 2, information memorizing means 3,4,5 of various type (RAM, EEPROM, ROM), input/output means 6 allowing the device to cooperate with another device of same type, and a bus 7 allowing the above- mentioned elements of the device to exchange data.
The functional set of instructions in the card may cause the reader to manipulate data contained in the card. More specifically, the functional set of instructions may cause the reader to carry out a transfer of data between the card and another card that is coupled to the reader.
The card may comprise an indication data that identifies the card as a card that has a functional set of instructions that the reader can execute. Complementary, the reader may have a subset of basic instructions for checking whether the card comprises the indication data or not. More specifically, the indication data may comprise a file that is not foreseen in any application for which the card has been configured. For example, let it be assumed that the card is configured for a cellular phone application in accordance with the GSM standard. In that case, the indication data can be a file that is not present in an ordinary card for this application. As another example, the indication data may comprise a fictitious alteration of a standard file or command present in the card. Namely, the response of the standard card to the reset triggered by the reader (called "Answer To Reset") includes history bytes for keeping trace of previous actions : these history bytes may be altered in the manner they constitute the indication data of the invention.
Advantageously, the functional set of instructions causes the reader to write an indication data in the card that identifies the latter as a card that has been manipulated by the reader according to the functional set of instructions.
An example of implementation is illustrated by means of the following flow diagram (table 1), in which "New SIM" corresponds to the card mentioned hereinbefore and in which SIM copy device corresponds to the reader mentioned hereinbefore.
Some comments about the various steps of the above table 1 are given hereunder, by referring to the number of the step indicated in left column. In general, any specific word or abbreviation mentioned is derived from GSM 11.11 standard which relates to communication between the SIM card, the cellular phone, and the cellular phone network. Accordingly, the specific words or abbreviations mentioned have the meaning defined in said standard.
-step 1 : ATR stands for "Answer To Reset", that is the response of the SIM to the reset triggered by the SIM copy device ;
-step 2 :
-MF stands for "Master File" ;
-CHV1 stands for "Card Holder Value 1", which corresponds to the "PIN"
-step 4 : "DF Telecom" is the GSM application ;
-step 7 : comparison of xx value allows checking that the file selected by the device duly corresponds to that to copy ;
-step 9 : confirms that old and new SIM have exchanged data ; -steps 11-13 : have the purpose of establishing a correspondence between homologous SMS files of old and new SIM, which manage the SMS messages ;
-in steps 16-18, file "EF ADN" is the one storing the address book or "Abbreviated Dial Numbers" ; the respective files "EF ADN" of old and new SIM are brought into correspondance ;
-step 22 : the writing of said data in new SIM ensures that the latter will not be used another time as a new SIM. In other words, this SIM is now an old SIM. This prevents erroneously canceling the content of the new SIM after the old SIM has been thrown away.
PILOTING THE SIM COPY DEVICE
This chapter describes a set of commands (such as APDU) which may be used to pilot the SIM copy function in the electronic device.
The manner these commands are coded (byte code) in the new SIM is not the purpose of this document.
1. Structuring a scripting application
The scripting application of the SIM copy device is made of three types of entity:
1. The commands related to the smart cards. 2. The commands related to the interaction with the user.
3. The messages.
These three categories might be combined to have command displaying a message, waiting for an action from the customer, and sending an APDU to a smart card. The coding of all these elements is fully depending on the device manufacturer choices (i.e. the byte code). The commands may consist in a program directly usable by a microcontroler of the reader.
2. Defining what is a command
A command or function as defined here below is not always a single smart card APDU. It might be a combination of APDUs, and may include user interactions (displaying a message, waiting for a PIN entrance ...).
This document describes the device characteristics for the SIM copy function. Of course, the commands might vary for another application.
3. Defining what is a message Messages are defined outside of the commands. Some message might be displayed under certain circumstances, when an error appears for instance. These messages will be described later on.
The manner a message is coded is not the purpose of this document, and is under the responsibility of the device manufacturer. This principle is applicable to many different circumstances.
For example, it might be interesting to customize messages format depending on the design of the LCD screen. Instead of translating a UNICODE message on the flow to the value to write in the registers of the LCD screen, it is more interesting to precalculate the correct registers value, then the translation is no more required.
4. Device reaction when a command fails Some commands might be mandatory, some other might not.
The distinction is done by adding a parameter to all commands, indicating whether it is mandatory or not.
Failure on a command not compulsorily successful:
A failure forces the script to jump to next milestone. Milestones are populated over the scripts in order to identify the important steps. Having found the next milestones, the device continues the script execution by executing the next command. If no more milestones are found, treatment applied on compulsorily successful commands is engaged.
Failure on a compulsorily successful command: A compulsorily successful command failure induces the immediate termination of the script, displaying the error message.
Interpreting the smart card status words:
• SW1-SW2 = 90-00^ Continue normally
• SW1-SW2 = 9F-xx^ Retrieve xx bytes using the GET RESPONSE command.
• Any other value -> Command failure: process to treatment as described here above.
5. Pre required environment
The commands described here are to be used in scripts. Thus, it is required to have some internal variables to store intermediate results. These variables are: • A -> 20 bytes long binary buffer
• B - 20 bytes long binary buffer
• GRR -> GetResponse command Result
There is no need to be able to perform arithmetic calculations to complete the SIM copy function. By the way, more sophisticated application might require such new commands to be included. There are to be described when needs will occur, but not in this document.
6. Commands list
The following table 2 briefly describes an incomplete list of commands of the new SIM to be read by the reader, and their parameters. By the way, most of them require indicating also the following:
• The smart card slot where to apply the command.
• A Boolean value indicating if the command must compulsorily be successful or not.