# US 2023/0409319 A1 · Method of operating a microprocessor, related processing system and computer program product

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

- Number: US 2023/0409319 A1
- Document ID: US20230409319A1
- Status: Published application
- Kind: A1
- Application number: 18/327,681
- Filed: 2023-06-01
- Published: 2023-12-21
- Earliest claimed: 2022-06-15
- Assignees: STMicroelectronics S.r.l.
- Applicants: STMICROELECTRONICS S.r.l.
- Inventors: Matteo BOCCHI; Adriano GAIBOTTI
- Web page: https://patentgrep.com/patent/US20230409319A1

## CPC

- G06F 9/3001: {Arithmetic instructions}
- G06F 21/54: by adding security routines or objects to programs
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 9/3004: {to perform operations on memory}
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

First combinational, arithmetic, or combinational and arithmetic, operations are applied to data and an expected value, generating result bit sequences. When the value of the data corresponds to the expected value, the result bit sequences are different from each other and correspond to expected values of the result bit sequences. Second operations are applied a first memory address, a second memory address, and the result bit sequences, generating a memory address. When values of the generated result bit sequences correspond to the expected values of the result bit sequences, the generated memory address corresponds to the first memory address. When values of the generated plurality of result bit sequences do not correspond to the expected values of the result bit sequences, the generated memory address corresponds to the second memory address. A software routine starting at the generated memory address is executed.

## Claims

### Claim 1

A method of operating a processor having an associated memory, the method comprising:
applying first combinational, arithmetic or combinational and arithmetic operations to obtained data and an expected value, the applying the first combinational, arithmetic or combinational and arithmetic operations generating a plurality of result bit sequences, wherein when the value of the obtained data corresponds to the expected value, values of generated plurality of result bit sequences are different from each other and correspond to expected values of the result bit sequences;
applying second combinational, arithmetic or combinational and arithmetic operations to a first memory address, a second memory address, and the plurality of result bit sequences, the applying the second combinational, arithmetic or combinational and arithmetic operations generating a memory address, wherein,
when the values of the generated plurality of result bit sequences correspond to the expected values of the result bit sequences, the generated memory address corresponds to the first memory address, and
when one or more values of the generated plurality of result bit sequences do not correspond to the expected values of the result bit sequences, the generated memory address corresponds to the second memory address;
jumping to the generated memory address; and
executing a software routine stored in an area of the memory starting at the generated memory address.

### Claim 2 (depends on 1)

The method according to claim 1, wherein,
the plurality of result bit sequences includes a first result bit sequence and a second result bit sequence;
when the value of the obtained data corresponds to the expected value, a value of the first result bit sequence is equal to a first determined value and a value of the second result bit sequence is equal to a second determined value; and
when the value of the obtained data does not correspond to the expected value, the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the applying first combinational, arithmetic or combinational and arithmetic operations to the obtained data and the expected value includes performing operations according to:
RES1=ERES1*(B1==B2)+ERES2*(B1 !=B2)
RES2=ERES2*(B1==B2)+ERES1*(B1 !=B2)
where RES1 and RES2 correspond to the first result bit sequence and the second result bit sequence, respectively, B1 and B2 correspond to the obtained data and the expected value, respectively, ERES1 and ERES2 correspond to the first determined value and the second determined value, respectively, and operations “==” and “!=” verify whether respective values correspond or do not correspond.

### Claim 4 (depends on 2)

The method according to claim 2, wherein applying the second combinational, arithmetic or combinational and arithmetic operations includes applying a swap function to generate an address pointer, wherein,
when the value of the first result bit sequence is equal to the first determined value and the value of the second result bit sequence is equal to the second determined value, the address pointer has a value corresponding to the first memory address; and
when the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value, the address pointer has a value corresponding to the second memory address.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the applying second combinational, arithmetic or combinational and arithmetic operations to the first memory address, the second memory address, and the plurality of result bit sequences includes performing operations according to:
func={[(RES1&func_ok)|(RES2&func_fail)]& ERES1}{[(RES1&func_fail)|(RES2&func_ok)]& ERES2}
where func corresponds to the address pointer, func_ok and func_fail correspond to said the first memory address and the second memory address, respectively, RES1 and RES2 correspond to the first result bit sequence and the second result bit sequence, respectively, and ERES1 and ERES2 correspond to the first determined value and the second determined value, respectively.

### Claim 6 (depends on 2)

The method according to claim 2, wherein the first combinational, arithmetic or combinational and arithmetic operations include operations of:
combining the obtained data, the expected value and the first determined value via exclusive OR operations; and
combining the obtained data, the expected value and the second determined value via exclusive OR operations.

### Claim 7 (depends on 2)

The method according to claim 2, wherein the first combinational, arithmetic or combinational and arithmetic operations include operations of:
combining the obtained data and the expected value via an exclusive OR operation, and adding the first determined value to a result of the combination of the obtained data and the expected value via the exclusive OR operation; and
adding the second determined value to the result of the combination of the obtained data and the expected value via the exclusive OR operation.

### Claim 8 (depends on 2)

The method according to claim 2, comprising:
when the first result bit sequence does not correspond to the first determined value, jumping to the second memory address; and
when the second result bit sequence does not correspond to the second determined value, jumping to the second memory address.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the obtained data corresponds to a password, a calculated hash code or a calculated signature, and the expected value corresponds to an expected password, a hash code or signature, respectively.

### Claim 10 (depends on 1)

The method according to claim 1, wherein
when the generated memory address corresponds to the first memory address, the executing the software routine comprises executing a first software routine stored in a first area of the memory starting at the first memory address; and
when the generated memory address corresponds to the second memory address, the executing the software routine comprises executing an error handling routine stored in a second area of the memory starting at the second memory address.

### Claim 11

A device, comprising:
a memory; and
one or more processors coupled to the memory, wherein the one or more processors, in operation:
apply first combinational, arithmetic or combinational and arithmetic operations to obtained data and an expected value, the applying the first combinational, arithmetic or combinational and arithmetic operations generating a plurality of result bit sequences, wherein when the value of the obtained data corresponds to the expected value, values of generated plurality of result bit sequences are different from each other and correspond to expected values of the result bit sequences;
apply second combinational, arithmetic or combinational and arithmetic operations to a first memory address, a second memory address, and the plurality of result bit sequences, the applying the second combinational, arithmetic or combinational and arithmetic operations generating a memory address, wherein,
when the values of the generated plurality of result bit sequences correspond to the expected values of the result bit sequences, the generated memory address corresponds to the first memory address, and
when one or more values of the generated plurality of result bit sequences do not correspond to the expected values of the result bit sequences, the generated memory address corresponds to the second memory address;
jump to the generated memory address; and
execute a software routine stored in an area of the memory starting at the generated memory address.

### Claim 12 (depends on 11)

The device according to claim 11, wherein,
the plurality of result bit sequences includes a first result bit sequence and a second result bit sequence;
when the value of the obtained data corresponds to the expected value, a value of the first result bit sequence is equal to a first determined value and a value of the second result bit sequence is equal to a second determined value; and
when the value of the obtained data does not correspond to the expected value, the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value.

### Claim 13 (depends on 12)

The device according to claim 12, wherein the one or more processors, in operation, apply the first combinational, arithmetic or combinational and arithmetic operations to the obtained data and the expected value by performing operations according to:
RES1=ERES1*(B1==B2)+ERES2*(B1 !=B2)
RES2=ERES2*(B1==B2)+ERES1*(B1 !=B2)
where RES1 and RES2 correspond to the first result bit sequence and the second result bit sequence, respectively, B1 and B2 correspond to the obtained data and the expected value, respectively, ERES1 and ERES2 correspond to the first determined value and the second determined value, respectively, and operations “==” and “!=” verify whether respective values correspond or do not correspond.

### Claim 14 (depends on 12)

The device according to claim 12, wherein the one or more processors, in operation, apply the second combinational, arithmetic or combinational and arithmetic operations by applying a swap function to generate an address pointer, wherein,
when the value of the first result bit sequence is equal to the first determined value and the value of the second result bit sequence is equal to the second determined value, the address pointer has a value corresponding to the first memory address; and
when the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value, the address pointer has a value corresponding to the second memory address.

### Claim 15 (depends on 12)

The device according to claim 12, wherein the one or more processors, in operation, apply the first combinational, arithmetic or combinational and arithmetic operations by performing operations of:
combining the obtained data, the expected value and the first determined value via exclusive OR operations; and
combining the obtained data, the expected value and the second determined value via exclusive OR operations.

### Claim 16 (depends on 12)

The device according to claim 12, wherein the one or more processors, in operation, apply the first combinational, arithmetic or combinational and arithmetic operations by performing operations of:
combining the obtained data and the expected value via an exclusive OR operation, and adding the first determined value to a result of the combination of the obtained data and the expected value via the exclusive OR operation; and
adding the second determined value to the result of the combination of the obtained data and the expected value via the exclusive OR operation.

### Claim 17 (depends on 12)

The device according to claim 12, wherein the one or more processors, in operation:
when the first result bit sequence does not correspond to the first determined value, jump to the second memory address; and
when the second result bit sequence does not correspond to the second determined value, jump to the second memory address.

### Claim 18 (depends on 11)

The device according to claim 11, wherein the obtained data corresponds to a password, a calculated hash code or a calculated signature, and the expected value corresponds to an expected password, a hash code or signature, respectively.

### Claim 19 (depends on 11)

The device according to claim 11, wherein the one or more processors, in operation:
when the generated memory address corresponds to the first memory address, execute a first software routine stored in a first area of the memory starting at the first memory address; and
when the generated memory address corresponds to the second memory address, execute an error handling routine stored in a second area of the memory starting at the second memory address.

### Claim 20

A system, comprising:
a memory having a plurality of memory areas;
a peripheral device; and
one or more processors coupled to the memory and to the peripheral device, wherein the one or more processors, in operation:
apply first combinational, arithmetic or combinational and arithmetic operations to obtained data and an expected value, the applying the first combinational, arithmetic or combinational and arithmetic operations generating a plurality of result bit sequences, wherein when the value of the obtained data corresponds to the expected value, values of generated plurality of result bit sequences are different from each other and correspond to expected values of the result bit sequences;
apply second combinational, arithmetic or combinational and arithmetic operations to a first memory address, a second memory address, and the plurality of result bit sequences, the applying the second combinational, arithmetic or combinational and arithmetic operations generating a memory address, wherein,
when the values of the generated plurality of result bit sequences correspond to the expected values of the result bit sequences, the generated memory address corresponds to the first memory address, and
when one or more values of the generated plurality of result bit sequences do not correspond to the expected values of the result bit sequences, the generated memory address corresponds to the second memory address;
jump to the generated memory address; and
execute a software routine stored in a memory area of the plurality of memory areas starting at the generated memory address.

### Claim 21 (depends on 20)

The system according to claim 20, wherein,
the plurality of result bit sequences includes a first result bit sequence and a second result bit sequence;
when the value of the obtained data corresponds to the expected value, a value of the first result bit sequence is equal to a first determined value and a value of the second result bit sequence is equal to a second determined value; and
when the value of the obtained data does not correspond to the expected value, the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value.

### Claim 22 (depends on 20)

The system according to claim 20, wherein, the obtained data corresponds to a password, a calculated hash code or a calculated signature, and the expected value corresponds to an expected password, a hash code or signature, respectively.

### Claim 23 (depends on 22)

The system of claim 22, wherein the one or more processors, in operation:
obtain the obtained data from the peripheral device; and
retrieve the expected value from another memory area of the plurality of memory areas of the memory.

### Claim 24 (depends on 20)

The system according to claim 20, wherein the one or more processors, in operation:
when the generated memory address corresponds to the first memory address, execute a first software routine stored in a first area of plurality of memory areas of the memory starting at the first memory address; and
when the generated memory address corresponds to the second memory address, execute an error handling routine stored in a second area of the plurality of memory areas of the memory starting at the second memory address.

### Claim 25

A non-transitory computer-readable medium having contents which configure a processing device to perform a method, the method comprising:
applying first combinational, arithmetic or combinational and arithmetic operations to obtained data and an expected value, the applying the first combinational, arithmetic or combinational and arithmetic operations generating a plurality of result bit sequences, wherein when the value of the obtained data corresponds to the expected value, values of generated plurality of result bit sequences are different from each other and correspond to expected values of the result bit sequences;
applying second combinational, arithmetic or combinational and arithmetic operations to a first memory address, a second memory address, and the plurality of result bit sequences, the applying the second combinational, arithmetic or combinational and arithmetic operations generating a memory address, wherein,
when the values of the generated plurality of result bit sequences correspond to the expected values of the result bit sequences, the generated memory address corresponds to the first memory address, and
when one or more values of the generated plurality of result bit sequences do not correspond to the expected values of the result bit sequences, the generated memory address corresponds to the second memory address;
jumping to the generated memory address; and
executing a software routine stored in an area of the memory starting at the generated memory address.

### Claim 26 (depends on 25)

The non-transitory computer-readable medium of claim 25, wherein,
the plurality of result bit sequences includes a first result bit sequence and a second result bit sequence;
when the value of the obtained data corresponds to the expected value, a value of the first result bit sequence is equal to a first determined value and a value of the second result bit sequence is equal to a second determined value; and
when the value of the obtained data does not correspond to the expected value, the value of the first result bit sequence is equal to the second determined value and the value of the second result bit sequence is equal to the first determined value.

### Claim 27 (depends on 25)

The non-transitory computer-readable medium of claim 25, wherein the method comprises:
when the generated memory address corresponds to the first memory address, executing a first software routine stored in a first area of plurality of memory areas of the memory starting at the first memory address; and
when the generated memory address corresponds to the second memory address, executing an error handling routine stored in a second area of the plurality of memory areas of the memory starting at the second memory address.

### Claim 28 (depends on 25)

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