Writing Data in a Non-Volatile Memory of a Smart Card
AssigneeMorpho
InventorsMichael Barthe, Geoffrey Spinau
Life of this patent
Estimating the term…
Abstract
The invention relates in particular to a method for writing data in a non-volatile memory of a smart card. The invention also relates to a smart card and a computer program capable of implementing such a method, to a storage medium including such a computer program, and to a system including a smart card and a device making it possible to write in the card.
Claims10
A method for writing data in a non-volatile memory of a smart card, comprising:
- /a/ receiving a write command in a buffer in a volatile memory of the smart card,
- /b/ comparing, by the smart card, an object identification parameter associated with the write command, with an object identification parameter stored in the non-volatile memory of the smart card,
- /c/ if the comparison is positive,
- /c1/ writing the data to be written, embedded in the write command, from the buffer to the object associated with the write command, at a predefined address whose value is stored in the non-volatile memory,
- /c2/ calculating an address corresponding to the sum of the stored predefined address and the size of the written data,
- /c3/ storing the calculated address in the non-volatile memory in place of the predefined address,
- /d/ if the comparison is negative,
- /d1/ writing the data to be written, embedded in the write command, from the buffer to the object associated with the write command, at a default address,
- /d2/ calculating an address corresponding to the sum of the default address and the size of the written data,
- /d3/ storing the calculated address in the non-volatile memory as the predefined address.
A smart card (SC) comprising a non-volatile memory (EEPROM), a volatile memory (RAM), a buffer (BUF) within the volatile memory, and a circuit (PROC, ROM) for processing write commands in non-volatile memory, said circuit (PROC, ROM) being arranged to process a command stored in the buffer (BUF) and associated with an identification parameter identifying an object stored in the non-volatile memory (EEPROM) where the command is to write to, said circuit (PROC, ROM) being arranged to store, in the non-volatile memory (EEPROM), on the one hand an identification parameter (FID) of an object (EF), the object (EF) being stored in the non-volatile memory (EEPROM), and on the other hand a predefined address (ADDR) within the object (EF), the circuit (PROC, ROM) being arranged, when processing a write command, to compare the object identification parameter associated with the write command with the object (EF) identification parameter (FID) stored in the non-volatile memory (EEPROM), and, if the comparison is positive, to write the data to be written, embedded in the write command, from the buffer (BUF) to the object associated with the write command, at the predefined address (ADDR) stored in the non-volatile memory (EEPROM), calculate an address corresponding to the sum of the stored predefined address (ADDR) and the size of the written data, as well as store the calculated address in the non-volatile memory (EEPROM) in place of the predefined address (ADDR), the circuit (PROC, ROM) being arranged, if the comparison is negative, to write the data to be written, embedded in the write command, from the buffer (BUF) to the object associated with the write command, at a default address, calculate an address corresponding to the sum of the default address and the size of the written data, and store the calculated address in the non-volatile memory (EEPROM) as the predefined address.
Dependencies are inferred from the claim text.