# US 2013/0212407 A1 · Method for managing memory space in a secure non-volatile memory of a secure element

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0212407 A1
- Document ID: US20130212407A1
- Status: Published application
- Kind: A1
- Application number: 13/437,124
- Filed: 2012-04-02
- Published: 2013-08-15
- Earliest claimed: 2012-02-09
- Assignees: Inside Secure
- Inventors: Charles WALTON; Matthias LERCH
- Web page: https://patentgrep.com/patent/US20130212407A1

## CPC

- G06F 21/60: Protecting data
- G06F 21/6209: {to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G06F 21/72: in cryptographic circuits
- G06F 21/77: in smart cards
- H04L 9/0618: {Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation}
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- H04L 9/32: including means for verifying the identity or authority of a user of the system {or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- H04L 9/3247: {involving digital signatures}
- G06F 2211/007: Encryption, En-/decode, En-/decipher, En-/decypher, Scramble, (De-)compress
- G06F 2221/2153: Using hardware token as a secondary aspect
- H04L 2209/72: Signcrypting, i.e. digital signing and encrypting simultaneously
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The invention relates to a method for managing non-volatile memory space in a secure processor comprising a secure non-volatile internal memory, the method comprising steps of: selecting data elements to remove from the internal memory, generating, by the secure processor, a data block comprising the selected data elements, and a signature computed from the selected data elements using a secret key generated by the secure processor, transmitting the data block by the secure processor, and storing the transmitted data block in an external memory.

## Claims

### Claim 1

A method for managing non-volatile memory space in a secure processor comprising a secure non-volatile internal memory, the method comprising steps of:
selecting data elements to remove from the internal memory,
generating, by the secure processor, a data block comprising the selected data elements, and a signature computed from the selected data elements using a secret key generated by the secure processor,
transmitting the data block by the secure processor to store the data block in an external memory, and
storing the transmitted data block in the external memory.

### Claim 2 (depends on 1)

The method according to claim 1, comprising transmitting a data block containing a data element to load in the internal memory, to the secure processor, comparing the signature read in the data block with a signature computed from the data block, and loading the data element in the internal memory only if the signature read corresponds to the signature computed.

### Claim 3 (depends on 2)

The method according to claim 2, comprising:
requesting the secure processor to execute an application which is not stored in the internal memory but rather in a data block stored in the external memory,
performing the steps of selecting data elements in the internal memory, generating a data block, transmitting the selected data in the data block and storing the data block in the external memory,
transmitting to the secure processor a data block containing the application to execute,
loading in the internal memory by the secure processor, the application in the transmitted data block, using if necessary space of the internal memory occupied by data stored in a data block stored in the external memory, and
executing the application loaded in the internal memory.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the secure processor generates a secret key, computes a checksum from each data element to be exported in a data block, inserts each checksum in the data block, and computes a signature from data in the data block using the secret key, and prior to loading a data element from a data block in the internal memory, the secure processor checks the signature and checksum, and the data element is loaded from the data block in the internal memory only if the signature and checksum are right.

### Claim 5 (depends on 1)

The method according to claim 1, wherein each time new data are inserted in the internal memory, the secure processor generates and transmits a data block containing the new data to store them in the external memory.

### Claim 6 (depends on 1)

The method according to claim 1, wherein prior to being inserted in a data block, a selected data element is encrypted by the secure processor using a secret key generated by the secure processor, and prior to being loaded in the internal memory, an encrypted data element read in a data block is decrypted by the secure processor using the secret key.

### Claim 7 (depends on 1)

The method according to claim 1, wherein each data block comprises:
application data comprising data of at least one data element inserted in the data block, and
administration data comprising a data block identifier, a data element descriptor for each data element in the application data, and a signature computed from the data block identifier and each data element descriptor, wherein each data element descriptor of a corresponding data element comprises a data element identifier of the corresponding data element, a data element size of the corresponding data element, a data element checksum computed from all the data of the corresponding data element, and a data element type specifying whether the corresponding data element is executable code or application data.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the secure processor attributes a new data block identifier to each data block which is generated or updated and transmitted to be stored in the external memory.

### Claim 9 (depends on 1)

The method according to claim 1, comprising:
at a first activation of the secure processor, generating by the secure processor an initial configuration data block containing data elements configured as erasable from the internal memory, and transmitting by the secure processor the generated data block to be stored in the external memory, and
restoring an initial configuration of the secure processor comprising erasing data elements configured as erasable in the internal memory, transmitting to the secure processor the initial configuration data block, and loading the data elements from the initial configuration data block in the internal memory.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the secure processor keeps a table up-to-date, containing for each data element loaded in the internal memory:
an identifier of the data element,
an export eligibility flag indicating if the data element is erasable from the internal memory and exportable in a data block,
an export state indicating if the data element has been erased from the internal memory and exported in a data block.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the table contains authentication data for each data element in the internal memory.

### Claim 12

A portable device comprising a secure processor and an external non-volatile memory, the secure processor comprising an internal non-volatile secure memory, wherein the secure processor is configured to:
generate a secret key,
select data elements to remove from the internal memory,
generate a data block comprising the selected data elements, and a signature computed from the selected data elements using the secret key, and
transmit the data block to store the data block in the external memory.

### Claim 13 (depends on 12)

The device according to claim 12, wherein the external memory is directly controlled by the secure processor, which is linked to the external memory by a bus.

### Claim 14 (depends on 12)

The device according to claim 12, wherein the external memory is controlled by an unsecure processor linked to the secure processor by a bus.

### Claim 15 (depends on 14)

The device according to claim 14, wherein the secure processor is configured to:
receive a data block containing a data element to load in the internal memory,
compute a signature from the received data block,
compare a signature read in the data block with the signature computed from the data block, and
load the data element in the internal memory only if the signature read corresponds to the signature computed.

### Claim 16 (depends on 15)

The device according to claim 15, wherein the secure processor is configured to:
receive a request to execute an application which is not stored in the internal memory but rather in a data block stored in the external memory,
select data elements in the internal memory,
generate a data block containing the selected data elements,
transmit the data block to be stored in the external memory,
receive a data block containing the application to execute,
load in the internal memory, the application in the transmitted data block, using if necessary space of the internal memory occupied by a data element in a data block stored in the external memory, and
execute the application loaded in the internal memory.

### Claim 17 (depends on 16)

The device according to claim 16, wherein the secure processor is configured to:
compute a checksum from each data element to be exported in a data block,
insert each checksum in the data block, and
compute a signature from data in the data block using the secret key,
and prior to loading a data element from a data block in the internal memory check the signature and checksum, and
load the data element from the data block in the internal memory only if the signature and checksum are right.

### Claim 18 (depends on 17)

The device according to claim 17, wherein the secure processor is configured to, each time new data are inserted in the internal memory, generate and transmit a data block containing the new data to store them in the external memory.

### Claim 19 (depends on 18)

The device according to claim 18, wherein the secure processor is configured to:
encrypt a selected data element using the secret key, and
insert the encrypted data element in a data block.

### Claim 20 (depends on 19)

The device according to claim 19, wherein the secure processor is configured to:
read an encrypted data element in a received data block,
decrypt the encrypted data element read in the data block, using the secret key, and
load the decrypted data element in the internal memory.

### Claim 21 (depends on 20)

The device according to claim 20, wherein each data block comprises:
application data comprising data of at least one data element inserted in the data block, and
administration data comprising a data block identifier, a data element descriptor for each data element in the application data, and a signature computed from the data block identifier and each data element descriptor, wherein each data element descriptor of a corresponding data element comprises a data element identifier of the corresponding data element, a data element size of the corresponding data element, a data element checksum computed from all the data of the corresponding data element, and a data element type specifying whether the corresponding data element is executable code or application data.

### Claim 22 (depends on 21)

The device according to claim 21, wherein the secure processor is configured to attribute a new data block identifier to each data block which is generated or updated, and transmitted to be stored in the external memory.

### Claim 23 (depends on 22)

The device according to claim 22, wherein the secure processor is configured to:
at a first activation of the secure processor, generate an initial configuration data block containing data elements configured as erasable from the internal memory, and transmit the generated data block to be stored in the external memory, and
restore an initial configuration of the secure processor, comprising erasing data elements configured as erasable in the internal memory, receiving the initial configuration data block, and loading the data elements from the initial configuration data block in the internal memory.

### Claim 24 (depends on 23)

The device according to claim 23, wherein the secure processor is configured to keep a table up-to-date, containing for each data element loaded in the internal memory:
an identifier of the data element,
an export eligibility flag indicating if the data element is erasable from the internal memory and exportable in a data block,
an export state indicating if the data element has been erased from the internal memory and exported in a data block.

### Claim 25 (depends on 24)

The device according to claim 24, wherein the table contains authentication data for each data element in the internal memory.
