# US 2024/0267235 A1 · Method and apparatus for verifying firmware

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

- Number: US 2024/0267235 A1
- Document ID: US20240267235A1
- Status: Published application
- Kind: A1
- Application number: 18/483,951
- Filed: 2023-10-10
- Published: 2024-08-08
- Earliest claimed: 2023-02-03
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Sewon KIM; Kyung-Woo NOH; Yeongae YU
- Web page: https://patentgrep.com/patent/US20240267235A1

## CPC

- H04L 9/3268: {using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]}
- H04L 9/0825: {using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/3247: {involving digital signatures}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method for verifying firmware includes verifying a firmware certificate of the firmware using a first public key, verifying validity of a second public key included in the firmware certificate in response to successful verification of the firmware certificate, verifying the firmware using the second public key in response to successful verification of validity of the second public key, and in response to successful verification of validity of the firmware, installing the firmware in memory of an electronic device to operate hardware of the electronic device according to the firmware.

## Claims

### Claim 1

A method for verifying firmware, the method comprising:
verifying a firmware certificate of the firmware using a first public key;
verifying validity of a second public key included in the firmware certificate in response to successful verification of the firmware certificate;
verifying the firmware using the second public key in response to successful verification of validity of the second public key; and
in response to successful verification of validity of the firmware, installing the firmware in memory of an electronic device to operate hardware of the electronic device according to the firmware.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
obtaining the first public key from the memory of the electronic device.

### Claim 3 (depends on 2)

The method of claim 2, wherein the obtaining of the first public key from the memory of the electronic device comprises:
checking an index of a first signing key pair currently used in a key index region of the electronic device; and
obtaining the first public key with the index from a read only memory (ROM) of the electronic device.

### Claim 4 (depends on 1)

The method of claim 1, wherein the verifying of the firmware certificate of the firmware using the first public key comprises:
obtaining a first hash value of the firmware certificate by decrypting a signature of the firmware certificate using the first public key;
calculating a second hash value of the firmware certificate using a hash algorithm; and
verifying the firmware certificate by comparing the first hash value and the second hash value.

### Claim 5 (depends on 4)

The method of claim 4, wherein the verifying of the firmware certificate by comparing the first hash value and the second hash value comprises:
discarding a firmware image of the firmware when the first hash value and the second hash value are different; or
determining that the firmware certificate is valid when the first hash value and the second hash value are same.

### Claim 6 (depends on 1)

The method of claim 1, wherein the verifying of the second public key included in the firmware certificate in response to successful verification of the firmware comprises:
determining that the second public key is valid when a hash value of the second public key is not same as a blacklist fingerprint in a fingerprint region in the electronic device.

### Claim 7 (depends on 6)

The method of claim 6, wherein the determining that the second public key is valid when a hash value of the second public key is not same as the blacklist fingerprint in the fingerprint region in the electronic device comprises:
determining that the second public key is valid when the hash value of the second public key is same as a whitelist fingerprint in the fingerprint region.

### Claim 8 (depends on 6)

The method of claim 6, wherein the determining that the second public key is valid when a hash value of the second public key is not same as the blacklist fingerprint in the fingerprint region in the electronic device comprises:
recording the hash value of the second public key in the fingerprint region; and
determining that the second public key is valid when a same hash value as the hash value of the second public key does not exist in the fingerprint region.

### Claim 9 (depends on 1)

The method of claim 1, wherein the verifying of the firmware using the second public key obtained from the firmware certificate comprises:
calculating a third hash value of the firmware using a hash algorithm;
obtaining a fourth hash value by decoding a firmware signature using the second public key; and
verifying validity of the firmware by comparing the third hash value and the fourth hash value.

### Claim 10 (depends on 9)

The method of claim 9, wherein the verifying of the validity of the firmware by comparing the third hash value and the fourth hash value comprises:
discarding a firmware image of the firmware when the third hash value and the fourth hash value are different; or
determining that the firmware is valid when the third hash value and the fourth hash value are same.

### Claim 11

A method for distributing a firmware image for updating an electronic device, the method comprising:
generating a signature of a firmware certificate using a first private key;
generating a firmware signature for a firmware using a second private key, the second private key different from the first private key;
distributing the firmware, the firmware certificate including the signature of the firmware certificate, and the firmware image including the firmware signature; and
installing the firmware in memory of an electronic device to operate hardware of the electronic device according to the firmware.

### Claim 12 (depends on 11)

The method of claim 11, wherein
a first public key corresponding to the first private key is stored in a read only memory (ROM) in the electronic device.

### Claim 13 (depends on 11)

The method of claim 11, wherein the generating of the signature of the firmware certificate using the first private key comprises:
encrypting a hash value of a second public key corresponding to the second private key using the first private key, and
the firmware certificate includes a certification date, a certification authority, and the second public key.

### Claim 14 (depends on 11)

The method of claim 11, wherein the generating of the firmware signature for the firmware using the second private key different from the first private key comprises:
calculating a hash value of the firmware using a hash algorithm; and
encrypting the hash value using the second private key.

### Claim 15

An apparatus for verifying firmware for updating an electronic device, the apparatus comprising:
a processor; and
a memory, wherein the processor is configured to execute a program included in the memory to perform:
verifying a firmware certificate of the firmware using a root public key;
verifying a firmware public key obtained from the firmware certificate;
verifying the firmware using the firmware public key in response to a successful verification of validity of the firmware public key; and
installing the firmware in the memory to operate hardware of the electronic device according to the firmware.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein when verifying of the firmware certificate of the firmware by using the root public key, the processor is configured to perform:
obtaining a hash value of the firmware certificate from a signature of the firmware certificate decrypted using the root public key;
calculating a hash value of the firmware certificate by using a hash algorithm; and
determining that the firmware certificate is valid when the calculated hash value and the obtained hash value are same.

### Claim 17 (depends on 15)

The apparatus of claim 15, wherein when verifying of the firmware public key obtained from the firmware certificate, the processor is configured to perform:
determining that the firmware certificate is valid when a hash value of the firmware public key is same as a whitelist fingerprint in a fingerprint region in the electronic device.

### Claim 18 (depends on 15)

The apparatus of claim 15, wherein when verifying of the firmware public key obtained from the firmware certificate, the processor is configured to perform:
registering a hash value of the firmware public key to a fingerprint region; and
determining that the firmware public key is valid when the hash value is not same as a blacklist fingerprint or a whitelist fingerprint in the fingerprint region in the electronic device.

### Claim 19 (depends on 15)

The apparatus of claim 15, wherein the processor is configured to execute the program to further perform:
checking an index of a first signing key pair currently used in a key index region of the electronic device; and
obtaining a first public key with the index from a read only memory (ROM) of the electronic device.

### Claim 20 (depends on 15)

The apparatus of claim 15, wherein when verifying the firmware using the firmware public key in response to a successful verification of validity of the firmware public key, the processor is configured to perform:
calculating a hash value of the firmware using a hash algorithm;
obtaining a hash value of the firmware by decrypting a firmware signature using the firmware public key; and
determining that the firmware is valid when the calculated hash value and the obtained hash value are same.
