# US 2024/0202341 A1 · Method for patching secure boot in iot

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

- Number: US 2024/0202341 A1
- Document ID: US20240202341A1
- Status: Published application
- Kind: A1
- Application number: 18/171,583
- Filed: 2023-02-20
- Published: 2024-06-20
- Earliest claimed: 2022-12-15
- Assignees: Beken Corporation
- Applicants: Beken Corporation
- Inventors: Zhifu LIU; Zhilei WANG; Pujie YANG
- Web page: https://patentgrep.com/patent/US20240202341A1

## CPC

- G06F 21/575: {Secure boot}
- G06F 21/572: {Secure firmware programming, e.g. of basic input output system [BIOS]}
- G06F 21/725: {operating on a secure reference time value}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of patching a secure boot of an internet of things (IoT) device is provided. The method may include: loading a patch on a flash memory of a system-on-chip (SoC); generating a patch key corresponding to the loaded patch using a cryptographic algorithm; reading a pre-determined authentication key from a one-time programmable (OTP) memory of the SoC; comparing the patch key with the authentication key. In response to a comparison result that the patch key is the same as the authentication key, the method may include authenticating the patch; executing the authenticated patch on the SoC; and booting the SoC with the authenticated patch executed on the SoC.

## Claims

### Claim 1

A method comprising:
loading a patch on a flash memory of a system-on-chip (SoC);
generating a patch key corresponding to the loaded patch using a cryptographic algorithm;
reading a pre-determined authentication key from a one-time programmable (OTP) memory of the SoC;
comparing the patch key with the authentication key; and
in response to a comparison result that the patch key is the same as the authentication key,
authenticating the patch;
executing the authenticated patch on the SoC; and
booting the SoC with the authenticated patch executed on the SoC.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
in response to a comparison result that the patch key is different from the authentication key,
configuring the SoC to skip the patch; and
booting the SoC with the patch skipped.

### Claim 3 (depends on 1)

The method of claim 1, further comprising in response to a comparison result that the patch key is different from the authentication key, generating a notification that the patch is incorrect.

### Claim 4 (depends on 1)

The method of claim 1, wherein the booting of the SoC with the authenticated patch executed on the SoC comprises:
determining whether at least one requirement for a secure boot is satisfied; and
in response to determining that the at least one requirement for the secure boot is not satisfied, ceasing the booting of the SoC.

### Claim 5 (depends on 4)

The method of claim 4, wherein the at least one requirement comprises a first public key value read directly from the OTP memory being the same as a second public key value calculated by a public key read from the OTP memory and a cryptographic algorithm.

### Claim 6 (depends on 4)

The method of claim 4, wherein the at least one requirement comprises a first digital signature value calculated based on signature data using a cryptographic algorithm from the flash memory being the same as a second digital signature, wherein the second digital signature value is generated based on a digital signature read from the flash memory and a public key read from the flash memory.

### Claim 7 (depends on 4)

The method of claim 4, wherein the at least one requirement comprises a first image key read directly from the flash memory being the same as a second image key, wherein the second image key is generated based on a code image read from the flash memory.

### Claim 8 (depends on 1)

The method of claim 1, wherein the comparing the patch key with the authentication key comprises comparing a first 32 bits of the patch key with a first 32 bits of the authentication key.

### Claim 9 (depends on 1)

The method of claim 1, wherein the loading of the patch on the flash memory comprises:
reading first data from the OTP memory, the first data relating to a pre-determined patch address in the flash memory;
reading second data from the OTP memory, the second data relating to a pre-determined patch loading address in the flash memory; and
loading the patch stored in the pre-determined patch address of the flash memory on the pre-determined patch loading address of the flash memory.

### Claim 10 (depends on 1)

The method of claim 1, wherein the executing of the authenticated patch on the SoC comprises changing at least one hardware property of the SoC based on the authenticated patch.

### Claim 11 (depends on 10)

The method of claim 10, wherein the changing of the at least one hardware property of the SoC based on the authenticated patch comprises changing a clock frequency of the flash memory based on the authenticated patch.

### Claim 12 (depends on 1)

The method of claim 1, wherein the executing of the authenticated patch on the SoC comprises changing at least one software function related to the booting of the SoC based on the authenticated patch.

### Claim 13

A system-on-chip (SoC) comprising:
a flash memory configured to store a patch;
a processor configured to:
load the patch on the flash memory;
generate a patch key corresponding to the loaded patch using a cryptographic algorithm;
read a pre-determined authentication key from a one-time programmable (OTP) memory of the SoC;
compare the patch key with the authentication key; and
in response to a comparison result that the patch key is the same as the authentication key,
authenticate the patch;
execute the authenticated patch on the SoC; and
boot the SoC with the authenticated patch executed on the SoC.

### Claim 14 (depends on 13)

The SoC of claim 13, wherein the processor is further configured to:
in response to a comparison result that the patch key is different from the authentication key,
configure the SoC to skip the patch; and
boot the SoC with the patch skipped.

### Claim 15 (depends on 13)

The SoC of claim 13, wherein the processor is further configured to in response to a comparison result that the patch key is different from the authentication key, generate a notification that the patch is incorrect.

### Claim 16 (depends on 13)

The SoC of claim 13, wherein to boot of the SoC with the authenticated patch executed on the SoC, the processor is configured to:
determine whether at least one requirement for a secure boot is satisfied; and
in response to determining that the at least one requirement for the secure boot is not satisfied, cease the booting of the SoC.

### Claim 17 (depends on 13)

The SoC of claim 13, wherein to load of the patch on the flash memory, the processor is configured to:
read first data from the OTP memory, the first data relating to a pre-determined patch address in the flash memory;
read second data from the OTP memory, the second data relating to a pre-determined patch loading address in the flash memory; and
load the patch stored in the pre-determined patch address of the flash memory on the pre-determined patch loading address of the flash memory.

### Claim 18 (depends on 13)

The SoC of claim 13, wherein to execute the authenticated patch on the SoC, the processor is configured to change at least one hardware property of the SoC based on the authenticated patch.

### Claim 19 (depends on 13)

The SoC of claim 13, wherein to execute the authenticated patch on the SoC, the processor is configured to change at least one software function related to the booting of the SoC based on the authenticated patch.

### Claim 20

A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
load a patch on a flash memory of a system-on-chip (SoC);
generate a patch key corresponding to the loaded patch using a cryptographic algorithm;
read a pre-determined authentication key from a one-time programmable (OTP) memory of the SoC;
compare the patch key with the authentication key; and
in response to a comparison result that the patch key is the same as the authentication key,
authenticate the patch;
execute the authenticated patch on the SoC; and
boot the SoC with the authenticated patch executed on the SoC.
