# US 2024/0201873 A1 · Protection of an authentication method

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

- Number: US 2024/0201873 A1
- Document ID: US20240201873A1
- Status: Published application
- Kind: A1
- Application number: 18/531,044
- Filed: 2023-12-06
- Published: 2024-06-20
- Earliest claimed: 2022-12-20
- Assignees: STMicroelectronics (Grand Ouest) SAS
- Applicants: STMicroelectronics (Grand Ouest) SAS
- Inventors: Fabien ARRIVE; Yves MAGNAUD
- Web page: https://patentgrep.com/patent/US20240201873A1

## CPC

- G06F 3/0622: {in relation to access}
- G06F 21/31: User authentication
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 21/44: Program or device authentication
- G06F 21/71: to assure secure computing or processing of information
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A device executes an authentication process protected by an authentication counter that is incremented in case of an authentication failure. The incrementation of the counter is protected against unexpected device power-off or power-off attacks. A non-volatile memory is divided into pairs of cells. The protecting includes writing a fixed value D into an active pair of two consecutive cells. As long as successful authentications occur, the content of the first cell is overwritten by a random value. When a failed authentication occurs, the content of the second cell is overwritten by a random value and the next two consecutive cells are written with the fixed value D. Those cells form the active pair and the protection process is repeated. This mechanism facilitates preventing the lack of incrementation of the authentication counter in case of unexpected device power-off during the processing of a failed authentication.

## Claims

### Claim 1

A device, comprising:
a memory having a plurality of memory cells, which, in operation, are organized as a plurality of pairs of memory cells; and
processing circuitry coupled to the memory, wherein the processing circuitry, in operation:
executes an authentication process; and
protects the execution of the authentication process, the protecting of the execution of the authentication process including:
storing a first data element in a first memory cell of a first pair of the plurality of pairs of memory cells;
storing a second data element in a second memory cell of the first pair of memory cells, the first pair of memory cells being a current active pair of memory cells;
in response to the authentication process resulting in a successful authentication, rewriting the first memory cell of the first pair of memory cells with a third data element; and
in response to the authentication process resulting in a failed authentication:
rewriting the second memory cell of the first pair of memory cells with a fourth data element;
incrementing a failure counter;
writing a fifth data element into a first memory cell of a second pair of memory cells of the plurality of pairs of memory cells;
writing a sixth data element into a second memory cell of the second pair of memory cells; and
designating the second pair of memory cells as the current active pair of memory cells.

### Claim 2 (depends on 1)

The device of claim 1, wherein the processing circuitry, in operation, responds to a failure of the authentication process by blocking access to one or more functions of the device.

### Claim 3 (depends on 1)

The device of claim 1, wherein the processing circuitry, in operation, executes the authentication process in response to an authentication request received from another device.

### Claim 4 (depends on 3)

The device of claim 3, comprising an interface coupled to the processing circuitry, wherein, in operation, the authentication request is received via the interface.

### Claim 5 (depends on 1)

The device of claim 1, comprising a host processor coupled to the processing circuitry, wherein the processing circuitry is a secure element, which, in operation, executes the authentication process in response to an authentication request received from the host processor.

### Claim 6 (depends on 1)

The device of claim 1, wherein in an initial state of the plurality of memory cells, all the memory cells of the plurality of memory cells are in an erased state, except for the memory cells of the first pair, the first pair being the active pair.

### Claim 7 (depends on 6)

The device of claim 6, wherein the processing circuitry, in operation, responds to a failure of the authentication method when all of the cells of plurality of cells have been written to by resetting the plurality of memory cells to the initial state.

### Claim 8 (depends on 1)

The device of claim 1, wherein the memory comprises a non-volatile memory including the plurality of memory cells.

### Claim 9 (depends on 8)

The device of claim 8, wherein the non-volatile memory is a Flash-type memory.

### Claim 10 (depends on 1)

The device of claim 1, wherein the first, second, fifth and sixth data elements are identical, and the third and fourth data elements are random data.

### Claim 11

A method, comprising:
executing, using an electronic device, an authentication process; and
protecting the execution of the authentication process, the protecting of the execution of the authentication process including:
storing a first data element in a first memory cell of a first pair of a plurality of pairs of memory cells;
storing a second data element in a second memory cell of the first pair of memory cells, the first pair of memory cells being a current active pair of memory cells;
in response to the authentication process resulting in a successful authentication, rewriting the first memory cell of the first pair of memory cells with a third data element; and
in response to the authentication process resulting in a failed authentication:
rewriting the second memory cell of the first pair of memory cells with a fourth data element;
incrementing a failure counter;
writing a fifth data element into a first memory cell of a second pair of memory cells of the plurality of pairs of memory cells;
writing a sixth data element into a second memory cell of the second pair of memory cells; and
designating the second pair of memory cells as the current active pair of memory cells.

### Claim 12 (depends on 11)

The method of claim 11, comprising:
responding to a failure of the authentication process by blocking access to one or more functions of the electronic device.

### Claim 13 (depends on 11)

The method of claim 11, comprising:
executing the authentication process in response to an authentication request received from another electronic device.

### Claim 14 (depends on 13)

The method of claim 13, wherein the authentication request is received via an interface of the electronic device.

### Claim 15 (depends on 11)

The method of claim 11, wherein the device comprises a host processor and a secure element coupled to the host processor, wherein the method comprises executing the authentication process by the secure element in response to an authentication request received by the secure element from the host processor.

### Claim 16 (depends on 11)

The method of claim 11, comprising initializing the plurality of memory cells to an initialized state, wherein in the initialized state all the memory cells of the plurality of memory cells are in an erased state, except for the memory cells of the first pair, the first pair being the active pair.

### Claim 17 (depends on 16)

The method of claim 16, comprising responding to a failure of the authentication method when all of the cells of plurality of cells have been written to by resetting the plurality of memory cells to the initialized state.

### Claim 18 (depends on 11)

The method of claim 11, wherein the first, second, fifth and sixth data elements are identical, and the third and fourth data elements are random data.

### Claim 19

A system comprising:
a first electronic device; and
a second electronic device coupled to the first electronic device, wherein the second electronic device responds to an authentication request received from the first electronic device by:
executing an authentication process; and
protecting the execution of the authentication process, the protecting of the execution of the authentication process including:
storing a first data element in a first memory cell of a first pair of a plurality of pairs of memory cells;
storing a second data element in a second memory cell of the first pair of memory cells, the first pair of memory cells being a current active pair of memory cells;
in response to the authentication process resulting in a successful authentication, rewriting the first memory cell of the first pair of memory cells with a third data element; and
in response to the authentication process resulting in a failed authentication:
rewriting the second memory cell of the first pair of memory cells with a fourth data element;
incrementing a failure counter;
writing a fifth data element into a first memory cell of a second pair of memory cells of the plurality of pairs of memory cells;
writing a sixth data element into a second memory cell of the second pair of memory cells; and
designating the second pair of memory cells as the current active pair of memory cells.

### Claim 20 (depends on 19)

The system of claim 19, wherein the second electronic device, in operation, responds to a failure of the authentication process by blocking access to functions or data by the first electronic device.

### Claim 21 (depends on 19)

The system of claim 19, wherein the first electronic device is a host processor, and the second electronic device is a secure element.

### Claim 22 (depends on 19)

The system of claim 19, wherein the first electronic device is a host processor, and the second electronic device is a smartcard.

### Claim 23

A non-transitory computer-readable medium having contents which, in operation, configure a processing device to perform a method, the method comprising:
executing an authentication process; and
protecting the execution of the authentication process, the protecting of the execution of the authentication process including:
storing a first data element in a first memory cell of a first pair of a plurality of pairs of memory cells;
storing a second data element in a second memory cell of the first pair of memory cells, the first pair of memory cells being a current active pair of memory cells;
in response to the authentication process resulting in a successful authentication, rewriting the first memory cell of the first pair of memory cells with a third data element; and
in response to the authentication process resulting in a failed authentication:
rewriting the second memory cell of the first pair of memory cells with a fourth data element;
incrementing a failure counter;
writing a fifth data element into a first memory cell of a second pair of memory cells of the plurality of pairs of memory cells;
writing a sixth data element into a second memory cell of the second pair of memory cells; and
designating the second pair of memory cells as the current active pair of memory cells.

### Claim 24 (depends on 23)

The non-transitory computer-readable medium of claim 23, wherein the method comprises:
responding to a failure of the authentication process by blocking access to one or more functions of the processing device.

### Claim 25 (depends on 23)

The non-transitory computer-readable medium of claim 23, wherein the contents comprise instructions executable by the processing device.
