HK1069668B - A process and system for modifying data in a card-based transaction system - Google Patents

A process and system for modifying data in a card-based transaction system Download PDF

Info

Publication number
HK1069668B
HK1069668B HK05102104.4A HK05102104A HK1069668B HK 1069668 B HK1069668 B HK 1069668B HK 05102104 A HK05102104 A HK 05102104A HK 1069668 B HK1069668 B HK 1069668B
Authority
HK
Hong Kong
Prior art keywords
memory
record
transaction
card
check register
Prior art date
Application number
HK05102104.4A
Other languages
Chinese (zh)
Other versions
HK1069668A1 (en
Inventor
埃里克.格尔伯特
Original Assignee
Ask股份有限公司
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
Priority claimed from FR0204705A external-priority patent/FR2838536B1/en
Application filed by Ask股份有限公司 filed Critical Ask股份有限公司
Publication of HK1069668A1 publication Critical patent/HK1069668A1/en
Publication of HK1069668B publication Critical patent/HK1069668B/en

Links

Description

Process and system for modifying data in a card-based transaction system
Technical Field
The present invention relates to systems in which portions of a data record stored on a card are modified during a transaction using a card reader, and more particularly to a process for modifying data stored on a memory card during a transaction using a card reader.
Background
The use of memory cards, also known as smart cards, is increasing as support for data relating to the cardholder. Among these cards, contactless cards have been developed as means for accessing controlled access areas, personal identification and even electronic wallet means, which exchange information by remote electromagnetic coupling between an antenna placed in the card and an associated reader.
The memory containing the data in the smart card is typically a non-volatile, erasable, and rewritable memory, preferably of the EEPROM type. This type of memory is divided into a number of memory cells, containing data records of a certain length, for example 32 bytes.
At the time of a transaction, the records contained in the memory of the card must generally be modified in order to accommodate the new conditions that arise as a result of the transaction. Unfortunately, the memory, particularly if it is of the EEPROM type, requires a relatively long erase/write time (for example 5ms), during which a power failure may occur, resulting in the loss of the data contained in the recording.
Further, in various transaction operations, several data record on/off mode operations are modified. For transaction security reasons, all transactions must be repeated if a power outage occurs while operating, risking permanent loss of sensitive data (e.g., the credit balance of an electronic wallet) if the transaction cannot be repeated from scratch.
In order to answer the above-described questions, attempts have been made to store the data record in a cache before modifying the data record. When all changes are completed, the old record is erased from the cache memory.
Unfortunately, this method requires 4 operations per record, namely saving in the buffer, erasing the record to be modified, overwriting, and finally erasing the old record in the buffer. When a transaction involves many operations, for example, often 8 operations are required, the transaction takes a long time and may be a time incompatible with the cardholder who presents the card to the card reader. In addition, the main disadvantage of this method is that the records of the data area are often located in the same memory unit, while the buffer area is located in a fixed place of the memory; this will increase the "stress" on the memory and limit the number of transactions that can be completed because the operands are constrained within a given silicon manufacturer guaranteed value.
Disclosure of Invention
Another problem that makes the above problem more difficult relates to the selection of free sectors for storing modification records. Conventional methods include scanning the memory to find free sectors. The time required for this seek operation adds to the already indicated operation time necessary for recording and erasing. However, when there are several records that need to be modified, requiring several searches for free sectors, this time becomes very important and incompatible with transaction time.
This is why the invention aims to create a process for modifying the data of a memory card at the time of a transaction, which enables the modifications made at the time of the transaction to be synchronized with the on/off pattern in a short period of time compatible with limiting the access time of the card at the time of the transaction, while avoiding the use of a part of the memory as a cache memory for storing data, thus avoiding the frequent writing of data into the same memory area, creating "stress" on the memory.
The invention therefore relates to a process for modifying data in a card-based transaction system, the system being characterised by a storage card and a card reader, the card being readable when placed in a defined position relative to the card reader. The card comprises a first memory (RAM) and a second non-volatile, erasable and rewritable memory (EEPROM) having memory locations containing data records for transactions performed by the card, each transaction resulting in modification of at least one of the data memory locations and addition of a new record.
The method according to the invention comprises the following steps:
a) for the data record to be modified or the record to be added, the address of a free memory location of the second memory is read out in a previous check register, which is located in a first determined memory location of the second memory,
b) the newly modified or added record, written to the free memory location,
c) repeating steps a) and b) for each new record to be modified or added,
d) a new check register is written to a second determined location of the second memory, the new check register containing the address of the free location of the second memory to be used for the next transaction.
Drawings
The objects, and advantages of the present invention will become more apparent from the following description when taken in conjunction with the accompanying drawing, which is a flow chart illustrating a process according to the present invention.
Detailed Description
In the following description it is assumed that the smart card used for the transaction features an EEPROM memory, which is for example divided into identical sectors of 32 bytes. An essential feature of the invention is the use of a check register which occupies a sector of the memory. The check register includes data designated for transactions in which an identification of a free sector of memory may be used to record new data. The check register specifically includes the following fields:
FlagOpen (flag start): indicating whether or not the transaction is to be initiated,
-oldset (old sector): the number of sectors before the modification is indicated,
PrevReg (previous register): indicating the sector number where the previous check register was located,
-NextReg (next register): indicating the sector number where the next check register is located,
flag close (end of flag): indicating whether the transaction is to be ended or not,
new sector): indicates the number of free sectors for the new modification,
assuming that a transaction is in progress, the process according to the invention takes place according to the flow chart shown in the single figure. Initially, there is an initialization step (step 10) which consists in initializing 4 variables in the RAM memory of the card:
-check register address: the number of the sector in which the register is stored is checked,
-NbUpdates (number update): the variable incremented after each record modifies or adds a new record,
transactionilevel: a bit indicating that the transaction is in progress,
OldSector (old sector): indicating the number of sectors used to record data throughout the transaction.
The second step is a transaction start step (step 12) in which the transactionivelel bit of the RAM memory is changed from 0 to 1 and the flag open field of the check register is set to the hexadecimal value a5 from the original 0.
In the next step it is determined whether there is a record that needs to be modified or added to a memory location in the memory (step 14). if so, the old sector number is written to the RAM memory (step 16), the address of the sector to which the new record must be written is read from the check register (step 17), the new record is written to the sector identified by the number read from the check register (step 22), and finally the modification of the check data in the RAM memory is performed (step 20). the process returns to the step of determining whether there is another record that needs to be modified or added (step 14).
It should be noted that the advantages of the invention mainly consist in the fact that transactions almost always require the modification of several records, which modification of records can make use of check registers without wasting time, since free sectors are indicated in the check registers, which do not have to be looked up.
It should be noted that in the case of adding a record, rather than modifying a record, the sector number in RAM need not be stored, since the sector does not exist, but instead stores a virtual number of 0.
Sector area Content providing method and apparatus
1 Record #1
2 Record #2
3 Record #3
4 Record #4
5 Check register
6 Free, new check register
7 Free, modified candidate #1
8 Free, modified candidate #2
9 Free, modified candidate #3
10 Free, modified candidate #4
11 Free, modified candidate #5
12 Free, modified candidate #6
13 Free, modified candidate #7
14 Free, modified candidate #8
When no more records need to be written to the memory, the new check register containing the new data is written to a free sector, the number of which is provided by the old check register (step 16), the old check register is erased (step 24), the old sector containing the record to be modified is erased (step 26), and the check variable of the RAM is reset to 0 (step 28).
To illustrate the process of the present invention, consider the following example in which the EEPROM memory is in the form of the following prior to the transaction:
the check register located in sector 5 includes the following data:
-FlagOpen:00
-OldSect:0,0,0,0,0,0,0,0,0
-PrevReg:0
-NextReg:6
-FlagClose:A5
-NewSect:7,8,9,10,11,12,13,14
assume that the transaction includes 4 consecutive changes:
-modification record 2
-modifying the record 3
-adding a record 5
Second modification of record 2
After the initialization step, the steps of the process are as follows:
-transaction initiation: the flag open field at hexadecimal a5 is written to the current register and the variables are initialized:
NbUpdates=0
TransactionLevel=1
OldSec t[8]={0,0,0,0,0,0,0,0,0}
-modification record #2: store old sector #2 into RAM, write new record in sector #7, RAM variables are:
NbUpdates=1
TransactionLevel=1
OldSect[8]={2,0,0,0,0,0,0,0,0}
-modification record #3: the old sector #3 is stored in the RAM, and a new record is written in the sector # 8. The variables of the RAM are:
NbUpdates=2
TransactionLevel=1
OldSect[8]={2,3,0,0,0,0,0,0,0}
-add record #5: the old sector #0 is stored in the RAM (0 means an old non-existing sector), and a new record is written in the sector # 9. The variables of the RAM are:
NbUpdates=3
TransactionLevel=1
OldSect[8]={2,3,0,0,0,0,0,0,0}
-modification record #2: the old sector #7 is stored in the RAM, and a new record is written in the sector # 10. The variables of the RAM are:
NbUpdates=4
TransactionLevel=1
OldSect[8]={2,3,0,7,0,0,0,0,0}
-transaction end
Decreasing TransactionLevel
Write new register to sector #6 with FlagClose ═ 0
Erasing old check registers
Erase old sectors #2, #3, #7
FlagClose write at $ A5
Initialization:
■NbUpdates=0
■TransactionLevel=0
■OldSect[8]={x,x,x,x,x,x,x,x,x)
after the transaction, the EEPROM memory takes the form:
the new check register contains the following data:
-FlagOpen:00
-OldSect:2,3,0,7,0,0,0,0
-PrevReg:5
-NextReg:11
sector area Transacted content
1 Record #1
2 Freedom of movement
3 Freedom of movement
4 Record #4
5 Free, old check register
6 Check register
7 Freedom of movement
8 Record #3
9 Record #5
10 Record #2
Sector area Transacted content
11 Free, new check register
12 Free, modified candidate #1
13 Free, modified candidate #2
14 Free, modified candidate #3
15 Free, modified candidate #4
16 Free, modified candidate #5
17 Free, modified candidate #6
-FlagClose:A5
-NewSect:12,13,14,15,16,17
We see that the new check register contains: the identification of the old sector whose value is provided by the RAM, the identification of the sector where the old check register is located, the identification of the sector of the next check register to be placed, the number of free sectors that can be written for the next modification, and an indication of the end of the transaction (FlagClose).
If a power failure occurs while the EEPROM memory is being modified, the contents of the RAM are lost, however the condition of the data enables any transaction to be repeated again from zero without fear of losing sensitive data. All sectors that may have been written are simply erased with new data in the following manner: either all sectors marked "free" in the check register are erased or only those data written after having scanned their contents to verify if they have been written (otherwise they contain several 0 s) are erased.
It should be noted that if a power failure occurs at the end of the transaction, then a 0 has been placed into the FlagClose field of the new check register indicating that the transaction has not ended and that the old sector contents that were erased in the second to last operation must be considered, the last operation being to write a FlagClose indicating the end of the transaction.
The process according to the invention uses fewer cycles than if the data were stored in a cache memory. In the conventional process, 4 EEPROM memory operations are required for each data modification: writing to a cache memory region, erasing future memory cells, writing new data in the memory cells, and erasing memory cells in the cache memory region. At the top of these steps, also the management of cache memory and the management of information related to the data to be stored must be added.
In contrast, according to the process of the present invention, each data modification requires only 2 EEPROM operations, i.e., writing new data into a new sector and erasing an old sector, and 4 general operations, i.e., at the beginning, writing FlagOpen into a check register, erasing an old check register, writing a new check register, and writing FlagOpen into the check register.
In this way, for N modifications, a comparison table can be established showing the number of operations of the EEPROM memory in the conventional process and the process according to the present invention, and the number of operations saved.
If a write or erase operation lasts 5ms in EEPROM, then a minimum 30ms savings is made for 4 (modify) operations.
In addition to the above time gain, since the check register indicates a free sector, there is no need to scan the EEPROM memory for free sectors, and the resulting time gain can be added.

Claims (7)

1. A process for modifying data in a card-based transaction system, the system being characterized by a memory card and a card reader, the card reader being capable of reading a card when the card is placed in a defined position relative to the card reader, the card being characterized by a first RAM memory and a second non-volatile, erasable and rewritable memory, the second memory including a memory location containing a record of data relating to transactions completed by the card, each transaction resulting in a modification of at least one of the memory locations or the addition of a new record, the process being characterized by the steps of:
a. -writing (16) the number of the memory location in which the record to be modified or added is stored in said first RAM.
b. Reading (17) the address of a free location of said second memory from a previous check register for the data record to be modified or the record to be added, the previous check register being located in a first determined location of said second memory,
c. writing (18) the newly modified or added record to the free storage unit,
d. repeating steps a and b for each new record to be modified or added,
e. writing (22) a new check register to a second determined location of said second memory, the address of said second determined location being given by said previous check register, the new check register containing the address of a free location of said second memory to be used for the next transaction, an
f. When the transaction is over, the memory locations containing modified or added records are erased (26)
g. At the end of the transaction, erasing said previous check register of said first determined location in said second memory and indicating in said new check register that said first determined location is free.
2. The process according to claim 1, wherein said memory location number in said first RAM written is a virtual number when the operation to be performed involves a record to be added.
3. A process according to claim 1 or 2, wherein two variables are to be recorded in said first RAM memory when a transaction is initiated, a first variable being set to a value of 0 so that it can be incremented on each record modify operation or record add operation, and a second variable being set to a value of 0 so that it can be changed from 0 to 1 as the transaction progresses.
4. A process according to claim 3, wherein said memory location number containing a modified or added record is written from said first RAM to said new check register when the transaction is terminated.
5. The process according to claim 4, wherein said variables recorded in said first RAM are all reset to 0 when the transaction is completed.
6. The process of claim 5 wherein prior to erasing said previous check register and said modified or added record, a field of said new check register is reset to 0, the word indicating whether the transaction is complete, and is set to another value after these operations have been performed.
7. A system for modifying data in a card-based transaction, comprising means adapted to carry out the steps of the process of any one of claims 1 to 6.
HK05102104.4A 2002-04-16 2003-04-15 A process and system for modifying data in a card-based transaction system HK1069668B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
FR0204705A FR2838536B1 (en) 2002-04-16 2002-04-16 METHOD OF MODIFYING DATA OF A MEMORY CARD DURING A TRANSACTION
FR02/04705 2002-04-16
PCT/FR2003/001205 WO2003088262A1 (en) 2002-04-16 2003-04-15 Method for modification of data on a memory card on a transaction

Publications (2)

Publication Number Publication Date
HK1069668A1 HK1069668A1 (en) 2005-05-27
HK1069668B true HK1069668B (en) 2010-12-17

Family

ID=

Similar Documents

Publication Publication Date Title
US5867641A (en) Flash translation layer cleanup system and method
EP1739683B1 (en) Space management for managing high capacity nonvolatile memory
CN101727978B (en) Method for writing and reading data in an electrically erasable and programmable nonvolatile memory
EP1729304A1 (en) Space management for managing high capacity nonvolatile memory
EP1410399A1 (en) Method and apparatus for decreasing block write operation times performed on nonvolatile memory
WO1997012324A1 (en) Memory management
KR20040014971A (en) Non-volatile memory control method
CN104978154A (en) Cache operation-based flash rapid read-write method and system
US20070011416A1 (en) Data storage device and medium and related method of storing backup data
US7146472B2 (en) Method for modification of data on a memory card on a transaction
HK1069668B (en) A process and system for modifying data in a card-based transaction system
JP3471842B2 (en) Data management device, data storage device, and data management method
JP4460850B2 (en) IC card and IC card processing method
JP3195122B2 (en) Check method of instruction format given to IC card
US20060015675A1 (en) Secure method for modifying data recorded in a memory card
JPS63145582A (en) Data storage system
JP2544722B2 (en) Information storage control method and information storage device equipped with the method
JPH01147686A (en) Portable electronic device
JP2004334744A (en) Issue system and method of portable electronic medium and portable electronic medium
JP3222619B2 (en) Information recording medium using key
JPS63301388A (en) IC card
EP0488780A2 (en) Portable storage device
JPH06309525A (en) Information recording medium with built-in CPU
HK1089540A (en) Secure method for modifying data recorded in a memory card
JPH0468487A (en) Portable storage medium