HK1002491B - Reading data from smart card - Google Patents
Reading data from smart card Download PDFInfo
- Publication number
- HK1002491B HK1002491B HK98101314.0A HK98101314A HK1002491B HK 1002491 B HK1002491 B HK 1002491B HK 98101314 A HK98101314 A HK 98101314A HK 1002491 B HK1002491 B HK 1002491B
- Authority
- HK
- Hong Kong
- Prior art keywords
- data
- reader
- card
- smart card
- memory
- Prior art date
Links
Description
The invention relates to data reading from a smart card. A smart card, otherwise known as an integrated circuit card, is a card carrying a microprocessor, memory, and an interface for electrical coupling to read/write devices. Preferably the memory is non-volatile, by which is meant memory which retains information in the absence of electrical power. Typically, memories used in smart cards are of the Electronic Erasable Programmable Read Only Memory (EEPROM) type. Such cards may be used for many purposes, such as for carrying personal information, perhaps for example medical information or for personal identification purposes. Alternatively, such cards may be used as bank cards or payment cards. An application for smart cards to which the present invention is particularly, but not exclusively, applicable is as electronic purses. Electronic purses hold value data which may be uploaded and downloaded by communication with a bank or other financial institution. Value may be exchanged between electronic purses which are coupled by a data link. Thus purchases may be made, using the value data as "electronic cash". Smart cards can carry an appreciable amount of information in a secure manner. Data in the card may include fixed data set at manufacture, such as a card serial number or the like. However this fixed data is not of interest to users. The card is used to input, store and output variable data. Although some of this data may in practice not be changed after first being input, it is different from data fixed by the manufacturer of the card and is use-variable data. More usually, use-variable data is data changed regularly in the normal use of the card. Smart card use-variable data is read to and from the card serially via the contacts using an established protocol.
The read protocol as exemplified in ISO protocol 7816 which requires that when coupling is established between a reader and the card, the reader applies power and clock and reset signals to the card microprocessor. Then, an Answer to Reset (ATR) sequence of data bytes is transmitted from card to reader. Thereafter the card may be interrogated by the reader to transmit demanded use-variable data. US-A-5 034 596 describes such a card processing apparatus, whereby an IC card is inserted into a card reader/writer, which upon insertion of the card feeds the power and reset signal to the card for activating the operation of this card. The activated card then outputs the initial response data signal ATR to the data reading/writing unit. The data is used as a security measure to check the validity of the card before exchange of data between the card reader/writer and card takes place. This requires a reader of relative sophistication and expense.
There is a requirement for an inexpensive reader to allow display or use of selected use-variable data from the card. The use-variable data to be read will vary from application to application. In a medical or diary card it may be the details of a next appointment; in a security card it may be a security code to gain access via a lock-release reader; and in an electronic purse it may be the value of the balance remaining. The present invention seeks to provide a system which allows the provision of an inexpensive smart card reader.
According to one aspect of the invention there is provided a method of reading data from a smart card, the smart card having a microprocessor and a memory holding use-variable data, the method consisting in coupling a reader to the card to establish a data transmission path between the reader and the card, accessing required use-variable data in said memory and incorporating said accessed data as part of an answer-to-reset signal transmitted from the card to the reader.
In this way data required to be read can be transmitted to the reader in the ATR sequence and the reader does not require the capacity for full protocol-regulated card interrogation as is conventional. The reader can thus be simple and inexpensive.
In the ISO standard 7816 the ATR sequence may include "historical bytes". These are generally provided for the convenience of the card manufacturer to represent a card identifier for example. Preferably, in the present invention, at least some of the "historical bytes" of the ATR are used to convey the required data.
The reset signal is conveniently initiated in the reader automatically in response to coupling being made with a card, and the card automatically responds with the Answer to Reset sequence.
A modification envisaged is that the data included in the ATR sequence may be sequentially changed on each reading. Thus, for example, the data read from an electronic purse may alternate between the balance and details of the last transaction. If a third or other items of information are to be included the data read will step one step around the required sequence each time the card is applied to a reader. This may be accomplished by providing a sequence of data addresses in the EEPROM and arranging that each time the ATR sequence is sent an address pointer is stepped cyclically around the address sequence so that on the next reading data from the next address is sent in the ATR sequence.
According to another aspect of the invention there is provided a reader adapted to read data from a smart card in accordance with the above-described method, the reader comprising a battery, an interface arrangement for coupling to a smart card, and circuit means effective to interpret a specific part of any answer-to-reset signals received via the interface to derive use-variable data included therein.
The circuit means may be a dedicated integrated circuit incorporating, by virtue of its structure, logic appropriate for the interpretation of the answer-to-reset signals. Alternatively, the circuit means may comprise a general-purpose microprocessor and a memory including a program to control the microprocessor.
The reader may be incorporated in a small handheld unit smaller than the smart card and a key-fob is envisaged, for example. A slot to accept a contact portion of the card is provided and need be large enough to accept only a side region or corner region of the card, for example.
According to another aspect of the invention there is provided a smart card adapted to have data read in accordance with the above-described method, the card having a microprocessor and a memory, a memory region holding use-variable data, and a memory region holding an operating program, the operating program being effective to include, in answer-to-reset signals generated by the card, specific use-variable data accessed from the memory.
The invention will be further described with reference to the accompanying drawings, of which:-
- Figure 1 is a perspective view of a smart card and a smart card reader in accordance with the invention;
- Figure 2 is a plan view of the reader of Figure 1 with the card inserted;
- Figure 3 is a timing diagram illustrating the timing of the reset and answer-to-reset sequence employed in the reader and card of Figures 1 and 2;
- Figure 4 is a diagram of a conventional answer-to-reset signal;
- Figure 5 is a block diagram of the electronic components of the reader and card;
- Figure 6 is a flow chart for the programs in the reader and card; and
- Figure 7 is a flow chart illustrating a modification for enabling sequentially different read-outs from the card.
Referring to Figure 1 there is shown a smart card 1 which constitutes an electronic purse in a value transfer system. The card is of credit card size and has an internal microprocessor and Electronic Erasable Programmable Read Only Memory (EEPROM) which retains data in a non-volatile manner. A contact pad 2 of eight contacts 2a to 2h on the surface of the card allows connection to reader/writer units. In use, a card may be loaded with data representing value from a reader/writer coupled to the user's bank. Purchases may then be made off-line from the bank by transferring value data to a trader's electronic purse by means of a point of sale reader/writer. Ultimately the trader may transfer accumulated value to his own bank from his electronic purse.
Conventionally, communication for data transfer via a reader/writer is serial communication established by way of a pair of contacts in the contact pad 2 under a certain protocol. An example of such a protocol is known under the designation ISO/IEC 7816, which will be referred to hereinafter as "the protocol". Implementation of the full protocol requires a degree of sophistication in the reader/writer microprocessor and program which renders such reader/writers relatively expensive. There is a requirement for a small and inexpensive device which can read and use (typically but not necessarily for display) certain data from the card.
Figure 1 shows such a device as a key-fob reader 3. The reader has a body 4 with a hole 5 near one end for attachment to a key-ring. The other end of the reader has a slot 6 for the insertion of a card such as card 3. The reader with the card inserted is shown in Figure 2. Within the reader are spring loaded contacts which couple with respective contacts on pad 2 when the card is fully inserted. The simple act of insertion of the card into the slot 6 effects connection between the respective card and reader contacts. This causes power to be applied to the card from a battery in the reader. Then a reset signal is sent from the reader to the card and an answer-to-reset (ART) signal is sent from the card to the reader. The ATR signal, in accordance with the invention, includes particular variable information derived from the card EEPROM. In this example the information is the balance of the value data in the card. The automatic read procedure concludes with interpretation in the reader, of the transmitted balance value data and display of the balance on a liquid crystal display (LCD) 7.
Referring to Figure 3 there is shown a diagram illustrating the timing of the reset and answer-to-reset signals in accordance with the ISO protocol. Six of the eight contacts 2(a) to 2(h) are used and the signals on these are:-
- 2(a) GND (ground)
- 2(b) VCC (supply voltage)
- 2(c) VPP (programming voltage)
- 2(d) RST (reset signal)
- 2(e) CLK (clock signal)
- 2(f) I/O (data input/output)
When the smart card is inserted into the reader its presence is detected by the reader hardware and the microprocessor within the reader is powered on. The software controlling the reader microprocessor checks that the smart card is still inserted and applies power to the lines VCC and VPP and, (at time t2) the I/O line is set to a state suitable for transfer of data.
The reset line RST is held low for 4000 clock cycles (t3) from t0. Thereafter an answer-to-reset (ATR) serial signal is initiated from the card under control of its microprocessor between 400 and 4000 clock cycles (t1).
Figure 4 illustrates the nature of the ATR signal. Conventionally the ATR signal comprises a number of serial eight-bit bytes. The first byte B1 is an initial character. The second byte B2 is a format character. There follows a number of optional interface characters B3 to BI; up to fifteen optional historical characters BH to BN and a conditional check character BC. The total number of characters after the initial character cannot exceed 32. The historical characters are often used by the card manufacturer to convey specific card identification information such as manufacturing serial number. In the present embodiment of the invention the last eight bytes of the historical character block are filled with card value balance information. Thus, this is transmitted automatically to the reader on application of the card.
Referring now to Figure 5 the electronic components of the reader and card are illustrated schematically. Although illustrated separately in the drawing, it is to be understood that most, if not all, of the electronic components described are embodied in a single integrated circuit chip. The spring contacts of the reader 3 are shown as a pad 10. This makes contact when the card is inserted with contact pad 2 on the card. Contacts on pad 10 are connected to a battery 11, a clock 12 and a serial interface 13. When the card is inserted power is taken for the card via the contact pads. A power drain detector 14 thus detects the insertion of the card and responds to apply power to the serial interface 13, the clock 12, a microprocessor 15 and a display driver 16. Microprocessor 15 uses random access memory (RAM) 15a.
On being powered up the microprocessor responds to a boot-up program in a read only memory (ROM) and transmits the clock and reset signals described with reference to Figure 3. The card has a serial interface 17 connected to the pad 2, a microprocessor 18 and an EEPROM 19. Microprocessor 18 uses random access memory (RAM) 18a. The EEPROM has a program section P which detects the end of the reset signal and then controls the interface, via the microprocessor, to transmit the ATR signal. The final eight bytes of the ATR signal are derived from information contained in the EEPROM. An address pointer region 19a of the EEPROM contains an address pointer which is the address of a balance region 19b of the memory. The balance region contains the current value balance of the card. Thus, in response to the reset signal the microprocessor 18 reads the address pointer at 19a, then the contents of region 19b and constructs the last eight bytes of the ATR signal to include the balance information.
The ATR signal is transmitted via interface 17 and interface 13 to be processed by the microprocessor 15. The program which drives microprocessor 15 decodes the value signal derived from interface 13 and applies the result to display driver 16 whereby the value is displayed on the LCD 7.
Referring now to Figure 6 there is shown a flow diagram for the programs driving the microprocessors 15 and 18. Figure 6(a) shows the reader program for processor 15. On power up at 21 the clock and reset signals are sent. At 22 there is a test to determine whether the ATR signal has been received within the permitted time slot. If NO, the reader is closed down. If YES, then the ATR is decoded at 23 to derive the balance value. At 24 there is a test to determine if the decoded information is meaningful. If NO an error message is constructed at 25 and displayed. If YES then at 26 the balance value is formatted for display and displayed. After a period of 3 seconds at 27 the reader is shut down.
In the card (Figure 6(b)) there is a test at 28 to determine whether the reset signal has terminated. If NO, then the system waits. If YES, then at 29 the address pointer at 19a (Figure 5) is read. Then the data at the designated address 19b is read at 30. Then the value balance data thus read is encoded at 31 into the ATR which is then sent at 32.
Referring now to Figure 7 there is shown a modification to the flow chart for the card. After step 32 when the ATR signal is sent the system writes, at 33, a new pointer address to 19a (Figure 5). This new address is derived as the next in cyclic sequence of addresses, the sequence being stored in the EEPROM. This means that next time the card is powered up a new address pointer will be read which will result in data from a different address being encoded into the ATR. The sequence of addresses is selected so that different required information is displayed on the reader each time the card is inserted. Thus, there may be two, three, four or more pieces of information displayed by the reader in turn each time the card is removed and inserted. Examples of other read-outs in the electronic purse embodiment is given the amount of the last transaction or the amount last drawn down from or refunded to the bank.
It is important to note that if the protocol is followed exactly, then the card will be held in a reset state for 40,000 clock cycles, and must commence a further transmission of the ATR bytes within a further 40,000 clock cycles. The commonly used clock speed is 3.57 MHz, therefore, each of these figures corresponds to 11 milliseconds. The maximum length of the ATR is 32 bytes, which takes about 35 milliseconds to be transmitted at 9600 bps. Therefore power is only ever applied to the card by the reader for a maximum duration of 11+11+35=57 milliseconds.
It will be seen that the reader requires only information which is transmitted as part of the ATR bytes emitted by the card at power on. Therefore there is no need to send a command requesting the current balance to the card, and no corresponding need for a communications protocol to be used during data transmission. As the card has no knowledge of absolute time, it can be operated at very low clock speeds to obtain the ATR. All of these factors make the design of the reader very simple, and achievable with a very low cost microprocessor or appropriate logic, thus producing a very low cost design. As the card need only be powered on for a very short period of time for each balance display the demands on the battery are minimal.
The invention is not restricted to the details of the above-described embodiment. For example, other parts of the ATR signal may be used to convey the required use-variable data, perhaps different or fewer or greater bytes of the historic bytes portion, or perhaps bytes other than the in-store bytes.
Instead of incorporating a general purpose microprocessor and program memory, the reader may incorporate a specifically designed logic arrangement as an array of interconnected gates and associated circuit components designed as an application specific integrated circuit, for example.
The reader may take other forms and may be incorporated in a security device such as a lock which may be released on receipt of appropriate data transmitted in this way from a smart access card. Display of the information may not be necessary or even desirable in such situations.
Coupling between card and reader may be other than by electrical contacts. Proposals exist, for example, to couple cards and readers by induction, radio or microwaves, and acoustic or infra-red optical interfaces. The invention is applicable to any method of coupling.
The address pointer may be re-written even if only one type of use-variable data is to be accessed since, depending on the use of the card, the same data (for example value balance) may be written at various places in the memory from time to time. Finally, although EEPROM is currently favoured as memory for this purpose, other kinds of memory may be used.
Claims (17)
- A method of reading data from a smart card (1), said smart card (1) having a microprocessor (18) and a memory (19), the method comprising coupling a reader (3) to the smart card (1) to establish a data transmission path between said reader (3) and the smart card (1), the method characterised by reading use-variable data held in the memory (19) where said use-variable data is incorporated as part of an answer-to-reset signal transmitted from the card (1) to the reader (3).
- A method of reading data from a smart card (1) as claimed in claim 1 wherein the format of the answer-to-reset signal is in accordance with the ISO/IEC 7816 protocol and includes historic bytes, the said accessed data being incorporated as historic bytes.
- A method of reading data from a smart card (1) as claimed in either of the preceding claims wherein the memory holds an address pointer (19a) which designates the memory address of the data to be accessed, the address pointer (19a) being read as a preliminary to accessing said data.
- A method of reading data from a smart card (1) as claimed in claim 3 wherein the address of the data to be accessed varies and the address pointer (19a) is re-written accordingly.
- A method of reading data from a smart card (1) as claimed in claim 4 wherein the address pointer (19a) is re-written on each reading of data in a cyclic fashion so as to step around a predetermined cyclic pattern, whereby predetermined different sets of data are read in succession in successive uses of the reader (3).
- A method of reading data from a smart card as claimed in any of the preceding claims including the steps of coupling of the card (1) with the reader (3), automatically sending a reset signal from the reader (3) to the card (1), on such detection, automatically sending said answer-to-reset signal from the card (1) to the reader (3) in response to the reset signal, automatically interpreting the use-variable data in the answer-to-reset signal and using the interpreted data.
- A method of reading data from a smart card (1) as claimed in claim 6 wherein there is a display (7) in the reader (3) and the interpreted data is used by activating the display (7) to display the data.
- A reader (3) adapted to read data from a smart card (1) in accordance with the method of any of claims 1-7, the reader comprising a battery (11), an interface arrangement (13) for coupling to a smart card (1) characterised in that circuit means (15) are provided effective to interpret a specific part of any answer-to-reset signals received via the interface (13) to derive use-variable data including therein.
- A reader (3) as claimed in claim 8 wherein the circuit means comprises a microprocessor (15) and memory (15a) which includes a program effective to control the microprocessor (15) to effect said interpretation.
- A reader (3) as claimed in claim 9 including detector means responsive to the coupling of a smart card with the reader and means responsive to the detector means to power up the reader microprocessor (15) or said coupling, the microprocessor (15) being otherwise powered down to conserve battery life.
- A reader (3) as claimed in claims 8 to 10 which operates under the ISO 7816 protocol at least insofar as the format of the answer-to-receive signal is concerned, said signal thus having historic bytes and said use-variable data being incorporated in the historic bytes.
- A reader (3) as claimed in any of the claims 8 to 11 which includes a display (7) for displaying the use-variable data read from the card.
- A reader (3) as claimed in any of claims 8 to 12 which is smaller than the credit card-sized smart card (1) and which has a slot (6) and within the slot (6) a set of spring contacts (10), the slot (16) accepting a portion of a smart card (1) whereby electrical contact is established between smart card contacts on a contact pad (2) on the card and said spring contacts (10).
- A smart card (1) adapted to have data read in accordance with the method claimed in any of claims 1 to 7, the card (1) having a microprocessor (18) and a memory (19), a memory region (19b) holding use-variable data, and a memory region holding an operating program P, characterised by the operating program P being effective to include, in said answer-to-reset signals generated by the card (1), specific use-variable data accessed from the memory (19).
- A smart card (1) as claimed in claim 14 wherein the memory (19) includes an address pointer (19a) which holds the address of data to be accessed for inclusion in the answer-to-reset signal.
- A smart card (1) as claimed in claim 15 wherein the program is effective to control the microprocessor (18) to re-write the address pointer (19a) on each reading of data in a cyclic fashion so as to step around a predetermined cyclic pattern, whereby predetermined different sets of data are read in succession in successive uses of a reader (3).
- A smart card (1) as claimed in any of claims 14 to 16 which is an electronic purse in a value transfer system, the said use-variable data being the balance of value data on the card.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB9306805.4 | 1993-04-01 | ||
GB939306805A GB9306805D0 (en) | 1993-04-01 | 1993-04-01 | Smart card reader |
PCT/GB1994/000715 WO1994023399A1 (en) | 1993-04-01 | 1994-04-05 | Reading data from a smart card |
Publications (2)
Publication Number | Publication Date |
---|---|
HK1002491A1 HK1002491A1 (en) | 1998-08-28 |
HK1002491B true HK1002491B (en) | 2000-03-24 |
Family
ID=
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0643857B1 (en) | Reading data from a smart card | |
US5712472A (en) | Card read/write method | |
Shelfer et al. | Smart card evolution | |
US6145739A (en) | System and method for performing transactions and an intelligent device therefor | |
US5682027A (en) | System and method for performing transactions and a portable intelligent device therefore | |
GB2275654A (en) | Smart card with LCD and energy store for receiving external power | |
JPS609308B2 (en) | electronic card | |
JP2000067185A (en) | Device and system improved for optical card reading and method for using the same | |
JP3718564B2 (en) | IC card | |
HK1002491B (en) | Reading data from smart card | |
US20030150913A1 (en) | IC card terminal | |
WO2001016874A1 (en) | Smart card transaction manager | |
JPS62211788A (en) | IC card | |
JP2810781B2 (en) | Information processing device for IC card | |
JP2683341B2 (en) | IC card | |
AU687760B2 (en) | A system and method for performing transactions and a portable intelligent device therefor | |
AU700628B2 (en) | A system and method for performing transactions and an intelligent device therefor | |
JP2001209757A (en) | Electronic information processing medium, floppy (registered trademark) disk and electronically settling method | |
JPH0869509A (en) | Reader / writer | |
Hansmann et al. | Smart Card Readers and Terminals | |
JPH09212597A (en) | Portable terminal equipment for ic card | |
JPH03142292A (en) | Housing for portable electronic device | |
JPS6386091A (en) | Portable memory medium reader/write | |
WO2006131876A1 (en) | Controlled access smart card | |
JPH0351911A (en) | Control method for card reader |