This application is based on and claims priority from Korean Patent Application No. 10-2020-0106697 filed on Aug. 25, 2020 in the Korean Intellectual Property Office, and all the benefits accruing therefrom under 35 U.S.C. 119, the contents of which in its entirety are herein incorporated by reference.
The disclosure relates to a storage device.
With diversification of hardware functions of electronic devices, operating systems (OS) have been developed together. However, although the recent operating systems have been implemented to provide various functions and execute various application programs, there is a problem of excessive increase in the capacity required due to complex functions. Accordingly, it takes a lot of time to execute kernel at the same time as booting and execute the operating system.
To solve such a problem, electronic devices such as smart phones, Persona Digital Assistant (PDA) devices, mobile devices, and Internet home appliances have recently used an embedded operating system-based system in which the operating system is stored on a separate chip and equipped in the electronic device instead of reading the operating system from a disk like a desktop computer.
Aspects of the disclosure provide a storage device.
According to an aspect of the disclosure, there is provided a storage device including: a boot Read Only Memory (ROM) configured to store a plurality of public keys and a boot ROM image; an One-Time Programmable Memory (OTP) memory configured to identify a first public key among the plurality of public keys; a first memory including a first area configured to store the plurality of public keys and a flash boot image different from the boot ROM image, and a second area configured to store a first boot signature corresponding to the flash boot image; a second memory including a user data area, and a firmware image area configured to store a first firmware image including a first firmware signature; and a memory controller configured to: receive a second firmware image including a second firmware signature different from the first firmware signature and a second boot signature different from the first boot signature, receive a second public key among the plurality of public keys and the flash boot image from the first area of the first memory based on the second firmware image being received, and write the second boot signature in the second area of the first memory.
According to another aspect of the disclosure, there is provided a storage device including: a boot Read Only Memory (ROM) configured to store a plurality of public keys and a boot ROM image; an One Time Programmable (OTP) memory configured to identify a first public key among the plurality of public keys; a first memory including a first area configured to store the plurality of public keys and a flash boot image different from the boot ROM image, and a second area configured to store a first boot signature corresponding to the flash boot image, the second area being different from the first area; a second memory including a user data area, and a firmware image area configured to store a first firmware image including a first firmware signature; and a memory controller configured to: receive a second firmware image including a second firmware signature different from the first firmware signature, and write the second firmware image in the firmware image area based on the second firmware image being received, wherein the first area of the first memory is only readable by the memory controller, and the second area of the first memory is readable and writable by the memory controller.
According to another aspect of the disclosure, there is provided a storage device including: a storage device comprising: a boot Read Only Memory (ROM) which stores a plurality of public keys and a boot ROM image; an One-Time Programmable Memory (OTP) memory configured to identify a first public key among the plurality of public keys; a first memory including a first area configured to store the plurality of public keys and a flash boot image different from the boot ROM image, and a second area configured to store a first boot signature corresponding to the flash boot image and different from the first area; a second memory including a user data area, and a firmware image area configured to store a first firmware image including a first firmware signature generated based on a first private key corresponding to the first public key; and a memory controller configured to: receive a second firmware image including a second firmware signature different from the first firmware signature, and a second boot signature different from the first boot signature, write the second boot signature in the second area of the first memory based on the second firmware image being received, and write data in the OTP memory so that the OTP memory identifies a second public key different from the first public key among the plurality of public keys and delete the first boot signature stored in the second area of the first memory, wherein the second firmware signature is generated based on a second private key corresponding to the second public key and the second firmware image.
According to another aspect of the disclosure, there is provided a method including: storing a plurality of public keys and a boot Read Only Memory (ROM) image in a boot ROM; storing the plurality of public keys and a flash boot image different from the boot ROM image in a first area of a first memory; storing a first boot signature corresponding to the flash boot image in a second area of the first memory; storing a first firmware image including a first firmware signature in a second memory; receiving a second firmware image including a second firmware signature different from the first firmware signature and a second boot signature different from the first boot signature; receiving a second public key among the plurality of public keys and the flash boot image from the first area of the first memory based on the second firmware image being received; and writing the second boot signature in the second area of the first memory.
However, aspects of the disclosure are not restricted to the one set forth herein. The above and other aspects of the present disclosure will become more apparent to one of ordinary skill in the art to which the present disclosure pertains by referencing the detailed description of the present disclosure given below.
The above and other aspects and features of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof referring to the attached drawings, in which:
Referring to
The host device 100 may send data and commands such as read, write, and erase to the storage device 200. The storage device 200 may read data, write data or erase data in response to the command sent from the host device 100.
The host device 100 may be implemented as a PC (Personal Computer), a laptop computer, a mobile phone, a smartphone, a tablet PC, a PDA (Personal Digital Assistant), an EDA (Enterprise Digital Assistant), a digital camera, a PMP (Portable Multimedia Player), a PND (Portable Navigation Device), MP3 players or an e-book.
The host device 100 may include a central processing unit (CPU) 110, a ROM (Read Only Memory) 120, a RAM (Random Access Memory) 130, and a memory interface 140.
The central processing unit 110 may execute the operating program (OS) which is stored or resides in the ROM 120 or the RAM 130. The central processing unit 110 may execute and control programs stored in the ROM 120, RAM 130 or the storage device 200. The central processing unit 110 may control the overall operation of the host unit 100.
The ROM 120 may store data required to boot up the host device 100. The RAM 130 may be used as a main memory or a cache memory of the host device 100, or may temporarily store the data to be provided to the storage device 200.
The RAM 130 may be, for example, a dynamic random access memory such as a DRAM (dynamic random access memory), an SDRAM (Synchronous DRAM), a DDR SDRAM (Double Data Rate SDRAM), a LPDDR SDRAM (Low Power Double Data Rate SDRAM), a GDDR SDRAM (Graphics Double Data Rate SDRAM), a DDR2 SDRAM, a DDR3 SDRAM and a DDR4 SDRAM or an SRAM. However, the disclosure is not limited thereto, and as such, according to another example embodiment, the RAM may include other memories.
The host device 100 and the storage device 200 may send and receive data through the memory interface 140. The memory interface 140 may be a UFS (Universal Flash Storage), an SCSI (Small Computer System Interface), an SAS (Serial Attached SCSI), an SATA (Serial Advanced Technology Attachment), a PCIe (Peripheral Component Interconnect Express), an eMMC (embedded MultiMediaCard), a FC (Fibre Channel), an ATA (Advanced Technology Attachment), an IDE (Intergrated Drive Electronics), a USB (Universal Serial Bus), an IEEE 1394 (Firewire) and the like. Also, the memory interface 140 may be any interface that allows the host device 100 and storage device 200 to send and receive data. However, the disclosure is not limited thereto, and as such, according to another example embodiment, the memory interface may include other types of interfaces.
The storage device 200 may be a non-volatile data storage medium on which data may be electrically entered and erased. The storage device 200 may be an SSD (Solid State Driver), a memory card (flash memory card), a multimedia card (MMC), a USB flash driver, a smart media, a compact flash, a memory stick, an SD card (secure digital card), a universal flash storage (UFS), and the like. However, the disclosure is not limited thereto, and as such, according to another example embodiment, the storage device may include other types of storage device.
The system bus 105 may make connections between the central processing unit 110, the ROM 120, the RAM, 130 and the memory interface 140.
Referring to
The memory controller 210 may control the overall operations of the OTP memory 220, the boot ROM 230, the first memory 260 and the second memory 270. For example, the memory controller 210 may receive data, addresses, and commands from the host device 100 and control the operation of the second memory 270 in response to them.
An OTP memory (One-Time Programmable Memory) 220 may identify a public key used at the time of booting. For example, the OTP memory 220 may identify one of a plurality of public keys 235 stored in the boot ROM 230. The OTP memory 220 may identify one of a plurality of public keys stored in a first area 240 of the first memory 260. That is, the OTP memory 220 may identify an address of the public keys 235 and 245. The memory controller 210 may boot up the storage device 200, using the public keys 235 and 245 identify by the OTP memory 220.
The boot ROM 230 may include a boot ROM image 232. The boot ROM image 232 may include a boot code executed when the storage device 200 is booted up. The boot ROM image 232 may include a plurality of public keys 235. The public keys 235 may be injected into the boot ROM image 232 in the manufacturing (or fabrication) process of the storage device 200.
The first memory 260 may include a boot code that is executed after the boot ROM 230 is executed when the storage device 200 is booted up. Therefore, the first memory 260 may be a memory in which an access is restricted by the host (100 of
The first memory 260 may include a first area 240 and a second area 250.
A flash boot image 242 different from the boot ROM image 232 may be stored in the first area 240. The flash boot image 242 may include a boot code that is executed when the storage device 200 is booted up. The first area 240 may be an area that is only readable by the memory controller 210 but is not writable. That is, according to an example embodiment, the memory controller 210 cannot write in the first area 240.
The flash boot image 242 may include a plurality of public keys 245. A plurality of public keys 245 may be injected into the flash boot image 252 in the manufacturing process of the storage device 200.
The second area 250 may store a boot signature 255 on the flash boot image 252. That is, in the first memory 260 according to an exemplary embodiment, the first area 240 in which the flash boot image 252 is stored may be separated from the second area 255 in which the boot signature 255 is stored.
The boot signature 255 may be generated, for example, using one public key of the flash boot image 242 and the plurality of public keys 245. The boot signature 255 may be stored in the second area 250 together with the flash boot image 242 of the first area 240 when the storage device 200 is fabricated. Further, the boot signature 255 may be written by the memory controller 210 in the update process of the storage device 200. That is, the second area 250 may be an area that is readable and writable by the memory controller 210.
The first memory 260 may include a non-volatile memory. The first memory 260 may be, for example, a NOR flash memory.
The second memory 270 may include a user data area 280 and a firmware (FW) image area 290.
The user data area 280 may be an area that may be accessed by the host. For example, the user data area 280 may be an area in which data is written and read by the memory controller 210 in accordance with commands such as read or write provided from the host. That is, the user data area 280 may be most of the area in which the data is written and stored in the second memory 270.
In contrast, the firmware image area 290 may be an area in which an access of the host is restricted. The firmware image may be stored in the firmware image area 290. The firmware image may include a boot code that is executed when the firmware 215 of the memory controller 210 is booted up. The firmware image may be stored in the firmware image area 290 in the manufacturing process of the storage device 200. According to another example embodiment, a new firmware image may be stored in the firmware image area 290 by the firmware update after release of the storage device 200.
The second memory 270 may include a non-volatile memory. The second memory 270 may include, for example, a NAND flash memory, a vertical type NAND flash memory (Vertical NAND: VNAND, 3D), a NOR flash memory, a PRAM (Phase-Change Random Access Memory), a RRAM (Resistive Random Access Memory), a MRAM (Magnetoresistive Random Access Memory), a FRAM (Ferroelectric Random Access Memory), an STT-RAM (Spin Transfer Torque Random Access Memory), a non-volatile memory device similar to this or the like. However, the disclosure is not limited thereto, and as such, according to another example embodiment, the second memory may include other types of memory.
The OTP memory 220, the boot ROM 230, the first memory 260, and the firmware image area 290 of the second memory 270 are spaces in which information used for booting up the storage device 200 and the boot code are stored, and may be areas which may not be arbitrarily changed by the host and in which security is maintained. Hereinafter, a detailed explained will be provided referring to
The system bus 205 may perform connections between the memory controller 210, the OTP memory 220, the boot ROM 230, the first memory 260 and the second memory 270.
Referring to
Subsequently, the first memory 260 may be copied to the memory controller 210. The memory controller 210 may verify the copied flash boot image 242. The memory controller 210 may read the written data of the OTP memory 220. The memory controller 210 may verify the boot signature 256 of the flash boot image 242, using the first public key 236 in the boot ROM image 232, based on the write data of the OTP memory 220. For example, the memory controller 210 may verify the boot signature 256 of the flash boot image 242 using the first public key 236 identified by the OTP memory 220. The first public key 236 may be a value for confirming that the flash boot image 242 is created in an authenticated place.
When the boot signature 256 of the flash boot image 242 is verified, the flash boot image 242 may be executed by the memory controller 210. As a result, the memory controller 210 may be changed to the core of the second memory 270.
Subsequently, the firmware image 292 may be copied from the firmware image area 290 of the second memory 270 to the memory controller 210. The firmware image 292 may include a firmware signature 296. The firmware signature 296 may be generated, using the firmware image 292 and a manufacturer's private key. The firmware signature 296 may be stored in the firmware image area 290 along with the firmware image 292 when manufacturing the storage device 200.
The memory controller 210 may verify the copied firmware image 292. The memory controller 210 may verify the firmware signature 296 of the firmware image 292, using the first public key 246 in the first memory 260, based on the data written in the OTP memory 220. This makes it possible to confirm that the firmware image 292 is created in an authenticated place.
Each address of the public keys 236, 237 and 238 stored in the boot ROM image 232 may correspond to each address of the public keys 246, 247 and 248 stored in the flash boot image 242. For example, an address at which the first public key 236 is stored in the boot ROM image 232 may correspond to an address at which the first public key 246 is stored in the flash boot image 242. This is because a plurality of public keys 236, 237 and 238 stored in the boot ROM image 232, and a plurality of public keys 246, 247 and 248 stored in the flash boot image 242 are used when booting up based on the data written on the OTP memory 220. Thus, verification of the flash boot image 242 and verification of the firmware signature 296 may be performed by the same public key.
When the firmware signature 296 of the firmware image 192 is verified, the firmware image 292 may be executed by the memory controller 210. As a result, the memory controller 210 may be changed to the core of the firmware. That is, the memory controller 210 may be operated by the firmware.
Accordingly, the storage device 200 may be booted up for security. After that, the storage device 200 may be driven by the firmware.
Referring to
The storage device 200 may be provided with a new firmware image from the outside. The firmware 215 may write the new firmware image in the firmware image area 290 of the second memory 270 in response to provision of the new firmware image, and may write a new boot signature 255 in the second area 250 of the first memory 260. Also, the firmware 215 may provide a public key write command to the OTP memory 220 in response to the provision of the new firmware image. The OTP memory 220 may identify another public key in response to the public key write command. Hereinafter, a detailed explained will be given referring to
Referring to
The firmware 215 may write the second firmware image 302 in the firmware image area 290 of the second memory 270 in response to the reception of the second firmware image 302.
The firmware 215 may determine whether the first public keys 236 and 246 need to be revoked in response to the reception of the second firmware image 302 (S15). The firmware 215 may determine that the first public keys 236 and 246 need to be revoked based on the second firmware signature 307 included in the second firmware image 302. For example, when the private key used for the second firmware signature 307 is different from the private key used for the old first firmware signature 296, the firmware 215 may determine that the first public keys 236 and 246 need to be revoked.
The firmware 215 may read a new second boot signature 257 from the second firmware image 302, when it is determined that the first public keys 236 and 246 need to be revoked (S20).
For example, referring to
The digital signature algorithm may mean an algorithm that generates a signature on given data, using a private key that is known only by oneself. A third party may confirm that the data is generated from verified person through signature verification using the public key for verification.
Therefore, the second firmware image 302 may be verified to be generated by the manufacturer through the second firmware signature 307. As a result, the manufacturer certification and integrity of the second firmware image 302 may be ensured. Because the first firmware signature 296 was generated by the first private key and the second firmware signature 307 was generated by a second private key different from the first private key, the firmware 215 may determine that the first public keys 236 and 246 need to be revoked. Therefore, the firmware 215 may read the new second boot signature 257 from the second firmware image 302.
Referring to
Subsequently, the firmware 215 may write data on the OTP memory 220 (S40). As a result, the OTP memory 220 may identify another public key, that is, the second public keys 237 and 247.
Due to the characteristics of the OTP memory 220, the OTP memory 220 may not identify the first public keys 236 and 246 again. That is, the first public key 236 stored in the boot ROM image 232 and the first public key 246 stored in the flash boot image 242 may not be reused and may be revoked. Therefore, the storage device according to an exemplary embodiment may prevent the public key from rolling back to the previous public key in the update process.
Next, the firmware 215 may delete the previous first boot signature 256 written in the second area 250 of the first memory (S50).
As a result, the firmware 215 may success update of the firmware (S60), and the storage device may be booted up for security, using the new second public keys 237 and 247 (S70).
That is, as explained earlier using
Next, the flash boot image 242 and the second boot signature 257 may be copied to the memory controller 210. The memory controller 210 may read the written data on the OTP memory 220.
The memory controller 210 may verify the second boot signature 257, using the second public key 237 in the boot ROM image 232 in accordance with the data of the read OTP memory 220. Because the second boot signature 257 was generated using the second public key 247 in the flash boot image 242, it may be verified by the second public key 237 in the boot ROM image 232. Accordingly, the flash boot image 242 may be executed, and the memory controller 210 may be changed to the core of the second memory 270.
Next, the second firmware image 302 may be copied to the memory controller 210. The memory controller 210 may read the data of the OTP memory 220.
The memory controller 210 may verify the second firmware signature 307, using the second public key 247 in the flash boot image 242 in accordance with the data written on the read OTP memory 220. Because the second firmware signature 307 was generated by the second private key corresponding to the second public keys 237 and 247, it may be verified by the second public key 247 in the flash boot image 242. Accordingly, the second firmware image 302 may be executed, and the memory controller 210 may be changed to the core of the firmware 215.
As a result, the storage device 200 may be booted up for security using the updated second firmware image 302.
On the other hand, if it is determined in operation S15 that the first public keys 236 and 246 do not need to be revoked, the firmware 215 writes the second firmware image 302 in the firmware image area 290, and then may success the firmware update (S62). For example, the firmware 215 may determine that the first public keys 236 and 246 do not need to be revoked, when the second firmware signature 307 and the first firmware signature 296 are generated by the same private key. That is, when the second firmware signature 306 is generated by the first private key, because the OTP memory 220 already identifies the first public 236 in the boot ROM image 232 corresponding to the first private key and the first public key 246 in the flash boot image 242, there is no need to change the data written on the OTP memory 220.
Also, because the first public key 236 in the boot ROM image 232 and the first public key 246 in the flash boot image 242 correspond to the first private key, there is no need to revoke the first public key 236 in the boot ROM image 232 and the first public key 246 in the flash boot image 242.
As a result, the firmware 215 may success the firmware update, and the storage device 200 may be booted up for security using the old first public keys 236 and 246 (S70). Referring to
When the public key or the like used for secure booting is exposed in the storage device that supports secure booting, or there is a problem in the public key, a method for revoking the public key is required. In this case, a new firmware image including the firmware signature signed with the new private key needs to be provided to the storage device. A plurality of public keys may be stored in the boot ROM image and the flash boot image in the storage device when manufacturing the storage device. Therefore, when a new firmware image is provided, the storage device may revoke the old public key by the use of the public key corresponding to the firmware signature included in the new firmware image among a plurality of public keys, and may be booted up by the use of the new public key in accordance with new firmware.
In the case of a storage device booted up using the boot ROM and the first memory, a new flash boot image and a new firmware image are required to revoke the old public key and perform booting by the use of the new public key. However, since the first memory is a memory in which an access is restricted because of a storage of information on booting, it is not possible to provide a new flash boot image to the storage device after the release of the storage device. Also, it is difficult to inject the boot signatures of all public keys into the second area of the first memory when manufacturing the storage device. Therefore, the storage device booted up using the boot ROM and the first memory needs to be recovered and updated by the manufacturer.
In contrast, when the storage device 200 according to an exemplary embodiment is provided with a new firmware image 302 including the new boot signature 257, the new boot signature 257 may be written in the first memory 260 by the firmware 215. Also, the data written on the OTP memory 220 may be changed and the old public key in the first memory 260 may be revoked.
Therefore, the storage device 200 is provided with a new firmware image 302 without provision of a new flash boot image, revokes the old public keys 236 and 246, and may be updated with new public keys 237 and 247. That is, the storage device 200 may be updated only by providing the firmware image without changing the flash boot image. Alternatively, the manufacturer provides only the new firmware image 302, including the new boot signature 257 and the new firmware signature 307, and may provide update of the public key to the storage device 200. Also, the storage device 200 may be booted up according to the sequence of the old secure booting, without changing sequence of the secure booting.
Referring to
However, a sudden power-off (SPO) in which a power is suddenly turned off during operations S15 to S40 may occur (S80).
At this time, the storage device may security-boot up the previous first public key (S82).
For example, referring to
The firmware image area 290 may include a plurality of firmware image storage areas 290_1 to 290_n. Each of the firmware images 302_1, 302_2 and 292 may be stored in each of the firmware image storage areas 290_1 to 290_n. The second firmware images 302_1 and 302_2 may be stored in some of the plurality of firmware image storage area 290_1 to 290_n, and the first firmware image 292 may be stored in the remaining area.
In this case, because the data stored in the OTP memory has not changed yet, the storage device may be booted up for security, by verifying the first boot signature 256 by the use of the first public key 236 to execute the flash boot image 242, and by verifying the first firmware signature 296 by the use of the first public key 246 to execute the first firmware image 292.
The storage device may be updated by operations S10 to S70 when a new firmware image is provided again after the secure booting.
In still another example, referring to
According to an example embodiment, the case illustrated in
The storage device may be updated by operations S10 to S70 when a new firmware image is provided again after secure booting.
After a new second boot signature 257_1 is written in the second area 250 of the second memory, the data is written on the OTP memory 220, after that, the old first boot signature 256 is deleted, and update of the storage device according to an exemplary embodiment may be completed. As a result, even if a sudden power-off occurs during the update process, the storage device may be booted up for security by the use of the first public keys 236 and 246 before the update. Also, the storage device may be booted up for security according to the sequence of the old secure booting.
Referring to
In still another example, the new firmware image 302 may be provided with another firmware image generated by a private key different from the firmware image provided by the firmware update that failed due to the sudden power-off. In this case, the firmware 215 reads the new boot signature from the other firmware images provided, and may write a new boot signature at the address in the second area 250 corresponding to the address at which the public key is stored in the first area 240.
Therefore, even if there is a boot signature written by the failed firmware update in the second area 250, no problem may occur in the update and booting of the storage device.
Referring to
At this time, because the OTP memory 220 was written to identify the second public keys 237 and 247, even when the first boot signature 256 was not deleted, the storage device may be booted up using the second public keys 237 and 247 (S92).
The storage device verifies the second boot signature 257 using the second public key 237, and the flash boot image 242 may be executed accordingly. Also, the storage device verifies the second firmware signature 307 using the second public key 247, and the first firmware image 262 may be executed and booted up for security.
Subsequently, when both the first boot signature 256 and the second boot signature 257 are written on the second area 250 of the first memory, the firmware may delete the first boot signature 256 (S94). That is, when the OTP memory 220 is written to identify the second public keys 237 and 247, and the old first public keys 236 and 246 are revoked, the firmware may delete the old first boot signature 256 existing in the second area 250 of the first memory.
In the detailed description, those skilled in the art will appreciate that many variations and modifications may be made to the exemplary embodiments without substantially departing from the principles of the disclosure. Therefore, the disclosed exemplary embodiments of the disclosure are used in a generic and descriptive sense only and not for purposes of limitation.
Number | Date | Country | Kind |
---|---|---|---|
10-2020-0106697 | Aug 2020 | KR | national |