# US 2023/0143189 A1 · Storage device and method of operating the same

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

- Number: US 2023/0143189 A1
- Document ID: US20230143189A1
- Status: Published application
- Kind: A1
- Application number: 17/857,387
- Filed: 2022-07-05
- Published: 2023-05-11
- Earliest claimed: 2021-11-08
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Seok Gi HONG; Myeong Jong LEE; Sung Ho YOON; Seong Chan JO
- Web page: https://patentgrep.com/patent/US20230143189A1

## CPC

- G06F 21/572: {Secure firmware programming, e.g. of basic input output system [BIOS]}
- G06F 21/575: {Secure boot}
- G06F 21/602: {Providing cryptographic facilities or services}
- H04L 9/3236: {using cryptographic hash functions}
- H04L 9/3239: {involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD}
- 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

A storage device and an operating method are provided. The storage device includes a non-volatile memory comprising a first area configured to store a plurality of normal firmware images and a second area configured to store a plurality of trusted firmware images, a firmware table configured to store information about the plurality of normal firmware images and the plurality of trusted firmware images, and a storage controller configured to control the non-volatile memory, perform a self-test for the storage device and write at least one of the plurality of trusted firmware images over a boot image based on a result of the self-test. The firmware table is configured to store a first hash value calculated before encryption of the plurality of trusted firmware images, and a second hash value calculated after encryption of the plurality of trusted firmware images.

## Claims

### Claim 1

A storage device for storing data, comprising:
a non-volatile memory comprising a first area configured to store a plurality of normal firmware images and a second area configured to store a plurality of trusted firmware images;
a firmware table configured to store information about the plurality of normal firmware images and the plurality of trusted firmware images; and
a storage controller configured to:
control the non-volatile memory;
perform a self-test for the storage device; and
write at least one of the plurality of trusted firmware images over a boot image based on a result of the self-test,
wherein the firmware table is configured to store a first hash value calculated before encryption of the plurality of trusted firmware images, and a second hash value calculated after encryption of the plurality of trusted firmware images.

### Claim 2 (depends on 1)

The storage device of claim 1, wherein the firmware table is further configured to store a third hash value calculated before encryption of the plurality of normal firmware images.

### Claim 3 (depends on 1)

The storage device of claim 1, wherein the firmware table is further configured to store information for distinguishing between the plurality of normal firmware images and the plurality of trusted firmware images.

### Claim 4 (depends on 1)

The storage device of claim 1, wherein the firmware table is further configured to store boot priority, and
wherein firmware assigned a higher boot priority is executed first when the storage device is booted.

### Claim 5 (depends on 4)

The storage device of claim 4, wherein the storage controller is configured to change the boot priority in the firmware table based on the result of the self-test.

### Claim 6 (depends on 1)

The storage device of claim 1, wherein, based on the result of the self-test indicating that an error is detected, the storage controller is further configured to:
load an encrypted first trusted firmware image, among the plurality of trusted firmware images from the non-volatile memory, for fixing the error;
perform a first verification to determine whether a calculated third hash value of the encrypted first trusted firmware image is the same as the first hash value;
decrypt the encrypted first trusted firmware image based on the first verification succeeding;
perform a second verification to determine whether a calculated fourth hash value of the decrypted first trusted firmware image is the same as the second hash value; and
write the decrypted first trusted firmware image over the boot image based on the second verification succeeding.

### Claim 7 (depends on 6)

The storage device of claim 6, wherein the storage controller is further configured to decrypt the encrypted first trusted firmware image based on unique information of the storage device.

### Claim 8 (depends on 1)

The storage device of claim 1, wherein the storage controller is further configured to:
receive a firmware image from an authenticated host device;
calculate a fifth hash value of the received firmware image based on the received firmware image being a normal firmware image;
store the fifth hash value in the firmware table; and
store the normal firmware image in the first area of the non-volatile memory.

### Claim 9 (depends on 8)

The storage device of claim 8, wherein the storage controller is further configured to:
calculate a sixth hash value of the received firmware image based on the received firmware image being a trusted firmware image;
encrypt the trusted firmware image;
calculate a seventh hash value of the encrypted trusted firmware image;
store the sixth hash value and the seventh hash value in the firmware table; and
store the encrypted trusted firmware image in the second area of the non-volatile memory.

### Claim 10

An operating method of a storage device, comprising:
providing a firmware table storing boot priority, a first hash value, and a second hash value for a plurality of trusted firmware images;
performing a self-test for the storage device;
based on a result of the self-test indicating that an error is detected, changing a boot priority of a first trusted firmware image, among the plurality of trusted firmware images, for fixing the error;
loading the first trusted firmware image stored in a non-volatile memory, the first trusted firmware image being encrypted;
performing a first verification to determine whether a calculated third hash value of the encrypted first trusted firmware image is the same as the first hash value;
decrypting the encrypted first trusted firmware image based on the first verification succeeding;
performing a second verification to determine whether a calculated fourth hash value of the decrypted first trusted firmware image is the same as the second hash value; and
writing the decrypted first trusted firmware image over a boot image based on the second verification succeeding.

### Claim 11 (depends on 10)

The operating method of claim 10, wherein the decrypting of the encrypted first trusted firmware image comprises decrypting the encrypted first trusted firmware image using unique information of the storage device.

### Claim 12 (depends on 10)

The operating method of claim 10, wherein the storage device is configured to store a plurality of normal firmware images, and
wherein the firmware table is configured to store a hash value of each of a plurality of unencrypted normal firmware images and is configured to not store a hash value of each of a plurality of encrypted normal firmware images.

### Claim 13 (depends on 12)

The operating method of claim 12, wherein the firmware table is further configured to store information for distinguishing between the plurality of normal firmware images and the plurality of trusted firmware images.

### Claim 14 (depends on 10)

The operating method of claim 10, further comprising:
receiving a firmware image from an authenticated host device;
calculating a third hash value of the received firmware image based on the received firmware image being a trusted firmware image;
encrypting the trusted firmware image;
calculating a fourth hash value of the encrypted trusted firmware image;
storing the third hash value as the first hash value in the firmware table; and
storing the fourth hash value as the second hash value in the firmware table.

### Claim 15 (depends on 14)

The operating method of claim 14, further comprising, based on the received firmware image being a normal firmware image:
calculating a fifth hash value of the received firmware image; and
storing the fifth hash value in the firmware table.

### Claim 16

An operating method of a storage device, comprising:
authenticating a host device;
receiving a firmware image from the host device based on the authentication of the host device succeeding;
identifying whether the received firmware image is a normal firmware image or a trusted firmware image;
based on the received firmware image being a normal firmware image:
calculating a first hash value of the received firmware image,
storing the first hash value in a firmware table, and
storing the normal firmware image in a non-volatile memory; and
based on the received firmware image being a trusted firmware image:
calculating a second hash value of the received firmware image,
encrypting the trusted firmware image,
calculating a third hash value of the encrypted trusted firmware image,
storing the second hash value and the third hash value in the firmware table, and
storing the encrypted trusted firmware image in the non-volatile memory.

### Claim 17 (depends on 16)

The operating method of claim 16, wherein the encrypting of the trusted firmware image comprises encrypting the encrypted trusted firmware image using unique information of the storage device.

### Claim 18 (depends on 16)

The operating method of claim 16, further comprising:
performing a self-test for the storage device;
based on a result of the self-test indicating that an error is detected, loading the encrypted trusted firmware image for fixing the error from the non-volatile memory;
performing a first verification to determine whether a calculated fourth hash value of the encrypted trusted firmware image is the same as the third hash value;
decrypting the encrypted trusted firmware image based on the first verification succeeding;
performing a second verification to determine whether a calculated fifth hash value of the decrypted trusted firmware image is the same as the second hash value; and
writing the decrypted trusted firmware image over a boot image based on the second verification succeeding.

### Claim 19 (depends on 18)

The operating method of claim 18, further comprising, based on the result of the self-test indicating that an error is detected, changing, in the firmware table, a boot priority of the encrypted trusted firmware image for fixing the error.

### Claim 20 (depends on 16)

The operating method of claim 16, wherein the firmware table is configured to store information for distinguishing between the normal firmware image and the trusted firmware image.
