1. Field of the Invention
The present invention generally relates to electronic circuits with a memory and, more specifically to circuits integrating a sequential access memory.
The present invention especially applies to smart cards having their chip communicating with a reader with or without contact.
2. Discussion of the Related Art
Increasingly, the data files processed by the memory microcircuits of smart cards need to be protected against incidental or voluntary interrupts on updating of the data of these files in the memory. It may, for example, be the retrieval of a smart card from a contact reader or a disturbance in the radio-frequency field of an electromagnetic transponder generating an interrupt in the data updating in the memory. If nothing is done for the microcircuit to recover correct data at the next session, the electronic circuit operation is disturbed.
In
The transactional updating mechanism can be in a so-called past prevention mode or in a future prevention more. According to the case, when a data updating needs to be performed in the file, the index register is updated after (past prevention) or before (future prevention) the updating of these data. Such a mechanism enables the central unit to recover the data during the circuit operation in case of a problem, whatever it may be.
The use of such an updating mechanism becomes difficult if several files or several memory areas are concerned by the need to recover data in case of an interrupt of one of the updating processes. For example, in a card for transportation applications, a first transaction may be the updating of the electronic ticket (decrement of its value to bring a travel to account) while another transaction may concern the updating of a statistic file of the user. If one of the two transactions does not end, it would be desirable to be able to cancel the other one or take other appropriate measures.
A problem linked to the application to electronic circuits of the type supported by smart cards (cards with microcircuit and memory) is linked to the generally limited calculation capacity of this type of circuit. It cannot be envisaged to implement complex file management systems of the type of those present in computers.
Another problem is linked to the need for operation rapidity of the synchronous update mechanism due to the limited time for which the involved smart cards generally remain in communication with the reader supplying them.
Such problems especially exclude the use of solutions gathering several recordings of different natures within a same file to be sure of their simultaneous updating. Indeed, the central processing unit should be able to individually have access to the files according to the performed transactions.
The present invention aims at overcoming all or part of the disadvantages of file processing systems of electronic circuits with a microcircuit and memory, especially in smart card applications or the like.
The present invention more specifically aims at a mechanism of synchronous update of several files or memory areas of an electronic circuit.
The present invention also aims at preserving the properties and the individual access conditions of the different files.
The present invention also aims at providing a mechanism which is compatible with so-called memory cards, that is, with no microcontrollers.
The present invention also aims at a mechanism compatible with the two future prevention or past prevention operation modes of a commit-rollback system.
To achieve all or part of these objects, as well as others, the present invention provides a method for updating cyclic data files in sequential access storage elements, comprising the steps of storing, in at least one index file, itself cyclic, respective indexes of the data files and, in at least one index register, the current index of the index file.
According to an embodiment of the present invention, the content of a current recording of the index file is copied in the next recording of the same file before each synchronous update of the data files.
According to an embodiment of the present invention, the index register is updated at the end of the synchronous update of the data files.
According to an embodiment of the present invention, the sequential access areas of a memory are assigned to the data files.
The present invention also provides an electronic circuit comprising at least one sequential access memory and an index management circuit of this memory and:
several areas of said memory assigned to data files;
at least one area assigned to an index file, each recording of which contains indexes of the data files; and
at least one element for storing the current index of the index file.
The present invention also provides a smart card.
The foregoing and other objects, features, and advantages of the present invention will be discussed in detail in the following non-limiting description of specific embodiments in connection with the accompanying drawings.
The same elements have been designated with the same reference numerals in the different drawings. For clarity, only those steps and elements which are useful to the understanding of the present invention have been shown in the drawings and will be described hereafter. In particular, the exploitation of the data by the electronic circuit containing the file processing mechanism of the present invention has not been described in detail, the present invention being compatible with any conventional destination of said data. Further, the nature of the storage elements (RAM, rewritable non-volatile memory, etc.) has not been described in detail, the present invention being compatible with any memory provided that it is capable of storing cyclic files, thus with a sequential access.
The present invention takes advantage from the fact that the electronic circuits of smart cards with a memory most often exploit, for addressing circuit simplicity reasons, sequential access memories, and process cyclic files. Such files are characterized by the fact that the different recordings are successively filled, in a loop.
A feature of an embodiment of the present invention is to use, in addition to the main cyclic files containing data linked to the application, an additional cyclic file, each recording of which contains the respective current indexes of the different cyclic data files. Thus, the different cyclic files are not individually associated with index registers but with an index file, each recording of which contains several indexes, this cyclic index file being itself associated with a single index register.
Assume a microcircuit and memory smart card of the type illustrated in
The present invention will be described hereafter in relation with files independently from their storage area, to refer to a software implementation. However, the invention may also be used in hardware implementations of a sequential access memory.
An additional cyclic file IF is used to store the different indexes of files F1 to Fm. In other words, each recording of file IF contains m indexes. Further, index file IF is associated with an index register MIR containing a single element, that is, index IFi of the current recording into file IF.
According to applications, the different files will be stored in non-volatile memory areas of the electronic circuit or in a RAM area. For example, for the synchronous update of files in an electronic ticket application, what remains of the available travels on the electronic ticket will be stored in the non-volatile memory, as well as the statistical files. According to another example, the synchronous update concerns RAM files. In this case, the synchronous update concerns updating transactions in the memory but not to possible power failures.
On manufacturing or initialization of the smart card (
At the beginning of a synchronous update (
The index in the second recording of file IF is then updated with value I21. As long as the synchronous update of all the files is not over, index register MIR keeps value 1 and is not updated to obtain the value of the second recording.
In
In the case of a past prevention synchronous update, the reading from a file is performed based on the index contained in the current recording of the index file. Accordingly, in case the updating is interrupted before its end, the system takes index 1 of register MIR as a basis so that the contents of all the files recover the value before updating. In case of a failure in the synchronous update or of a setting to zero of the card, the card automatically finds itself in the state preceding the file updatings since the index of index file IF is 1.
In the case of a future prevention synchronous update, the file reading is performed based on the index contained in the recording of the index file which follows that pointed to by register MIR. Accordingly, in case the updating is interrupted before its end, the system uses index 2 as a basis, so that the contents of the files which have had time to be updated are taken into account.
Either the card is informed of this operating mode by the reader, or it is parameterized on manufacturing or on programming. It can be seen that the mechanism of the present invention is compatible with the two modes without modifying the file recording mode.
According to a simplified embodiment, where the past or future prevention concerns but one event, the different files only contain two recordings.
According to another embodiment, the size of the different files is greater and the present invention then enables managing the card history over a time corresponding to the side of index file IF.
According to another embodiment of the present invention, several index files using overlapping or not index ranges are used.
An advantage of the present invention is that it enables managing a commit-rollback mechanism in simple fashion with limited hardware resources.
Another advantage of the present invention is that it is compatible with a memory card with no microcontroller. Indeed, the indexes necessary to the management of the commit-rollback mechanism are themselves contained in memory areas in the form of recordings of a cyclic file.
Another advantage of the present invention is that the delocalized index mechanism in the index file enables management of the circuit operation history.
Of course, the present invention is likely to have various alterations, improvements, and modifications which will readily occur to those skilled in the art. In particular, although the present invention has been more specifically described in relation with a memory card with no microcontroller, it is of course also compatible with cards provided with a microcontroller. Further, the practical implementation of the present invention by software or hardware means is within the abilities of those skilled in the art based on the functional indications given hereabove. Further, the implementation of the present invention may be combined with the keeping, for some files, of an index register.
Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and the scope of the present invention. Accordingly, the foregoing description is by way of example only and is not intended to be limiting. The present invention is limited only as defined in the following claims and the equivalents thereto.
Number | Date | Country | Kind |
---|---|---|---|
05/52638 | Aug 2005 | FR | national |