CN117708900A - Storage device, method of operating the same, and method of operating electronic device including the same - Google Patents

Storage device, method of operating the same, and method of operating electronic device including the same Download PDF

Info

Publication number
CN117708900A
CN117708900A CN202311109479.8A CN202311109479A CN117708900A CN 117708900 A CN117708900 A CN 117708900A CN 202311109479 A CN202311109479 A CN 202311109479A CN 117708900 A CN117708900 A CN 117708900A
Authority
CN
China
Prior art keywords
data
secure
request
encryption key
host device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311109479.8A
Other languages
Chinese (zh)
Inventor
金昌焕
申旼坤
金志守
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020230030721A external-priority patent/KR20240037139A/en
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Publication of CN117708900A publication Critical patent/CN117708900A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

A method of operating a storage device in communication with a host device is disclosed. The method comprises the following steps: distributing a security area and a user area; storing first data encrypted by using a first encryption key in a first data block of the secure area; receiving a first request from the host device indicating a first secure delete operation for the first data; decrypting at least one valid data of the first data block by using the first encryption key based on the first request, wherein the at least one valid data does not include the first data; encrypting the decrypted at least one valid data by using a second encryption key different from the first encryption key; storing the encrypted at least one valid data in a second data block of the secure area; and deleting the first encryption key.

Description

Storage device, method of operating the same, and method of operating electronic device including the same
Cross Reference to Related Applications
The present application claims priority from korean patent application No. 10-2022-0195876 filed at the korean intellectual property office on 9 months 14 of 2022 and korean patent application No.10-2023-0030721 filed at the korean intellectual property office on 8 of 2023, the disclosures of each of which are incorporated herein by reference in their entirety.
Technical Field
Embodiments of the present disclosure described herein relate to a storage device, and more particularly, to a storage device that deletes an encryption key, a method of operating the storage device, and a method of operating an electronic device including the storage device.
Background
The memory device stores data in response to a write request and outputs the data stored therein in response to a read request. For example, the memory device is classified as a volatile memory device such as a Dynamic Random Access Memory (DRAM) device or a Static RAM (SRAM) device that loses data stored therein when power is turned off, or a nonvolatile memory device such as a flash memory device, a phase change RAM (PRAM), a Magnetic RAM (MRAM), or a Resistive RAM (RRAM) that retains data stored therein even when power is turned off.
The storage device may store data received from the host device. The host device may identify the data by using the logical address. The memory device may generate a mapping relationship between a logical address and a physical address, and may store data in a memory cell corresponding to the physical address. The host device may provide a request to delete data to the storage device. Even if the memory device deletes the mapping relationship, the data stored in the memory cell may not be physically erased. Then data that is not physically erased may be acquired and/or accessed by malicious users. Therefore, a technique for securing the deletion operation is required.
Disclosure of Invention
Embodiments of the present disclosure provide a storage device that deletes an encryption key, a method of operating the storage device, and a method of operating an electronic device that includes the storage device.
According to at least one embodiment, a storage device communicates with a host device. A method of operating the storage device comprising: distributing a security area and a user area in the storage device; storing first data encrypted by using a first encryption key in a first data block of the secure area; decrypting at least one valid data of the first data block using the first encryption key in response to receiving a first request from the host device, wherein the first request indicates a first secure delete operation of the first data and the at least one valid data does not include the first data; encrypting the decrypted at least one valid data using a second encryption key, wherein the second encryption key is different from the first encryption key; storing the encrypted at least one valid data in a second data block of the secure area; and deleting the first encryption key.
According to at least one embodiment, an electronic device includes a host device and a storage device. A method of operating the electronic device comprising: providing, by the host device, a first request for allocation of the storage device; assigning, by the storage device, a secure area and a user area in response to the first request; providing, by the host device, a second request for a secure write operation of target data; storing, by the storage device in response to the second request, first data encrypted by using a first encryption key in a first data block of the secure area; providing, by the host device, a third request indicating a secure delete operation for the target data; decrypting, by the storage device, at least one valid data of the first data block using the first encryption key in response to the third request, wherein the at least one valid data does not include the target data; encrypting, by the storage device, the decrypted at least one valid data using a second encryption key that is different from the first encryption key; storing, by the storage device, the encrypted at least one valid data in a second data block of the secure area; and deleting, by the storage device, the first encryption key.
According to at least one embodiment, a memory device includes: a nonvolatile memory device including a user area and a security area; and a storage controller in communication with the host device and the nonvolatile memory device. The storage controller storing target data encrypted using a first encryption key in a first data block of the secure area in response to receiving a first request from the host device, wherein the first request indicates a secure write operation; decrypting at least one valid data of the first data block using the first encryption key in response to receiving a second request from the host device, wherein the second request indicates a secure delete operation of first data and the at least one valid data does not include the first data; encrypting the decrypted at least one valid data using a second encryption key, wherein the second encryption key is different from the first encryption key; storing the encrypted at least one valid data in a second data block of the secure area; and deleting the first encryption key.
Drawings
The above and other objects and features of the present disclosure will become apparent by describing in detail embodiments thereof with reference to the accompanying drawings.
Fig. 1 is a block diagram of an electronic device in accordance with at least one embodiment of the present disclosure.
FIG. 2 is a block diagram illustrating the memory controller of FIG. 1 according to some embodiments of the present disclosure.
Fig. 3 is a diagram describing a conventional electronic device.
Fig. 4 is a diagram depicting an electronic device according to some embodiments of the present disclosure.
Fig. 5 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure.
Fig. 6 is a diagram describing secure operation of an electronic device according to some embodiments of the present disclosure.
Fig. 7 is a flow chart describing the allocation of secure enclaves for an electronic device according to some embodiments of the present disclosure.
Fig. 8 is a diagram depicting the address ranges of fig. 7, in accordance with some embodiments of the present disclosure.
Fig. 9 is a diagram depicting a secure write operation of an electronic device according to some embodiments of the present disclosure.
Fig. 10 is a diagram describing a secure read operation of an electronic device according to some embodiments of the present disclosure.
Fig. 11 is a diagram describing recovery of a secure erase operation after a Sudden Power Off (SPO) event in accordance with some embodiments of the present disclosure.
Fig. 12 is a flowchart describing a secure zone management method of an electronic device according to some embodiments of the present disclosure.
Fig. 13 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure.
Fig. 14 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure.
Fig. 15 is a diagram depicting commands of an electronic device according to some embodiments of the present disclosure.
Fig. 16 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described in detail and clearly to the extent that those skilled in the art can easily practice the embodiments of the present disclosure. Examples of some embodiments are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout. In this regard, the present embodiments may take various forms and should not be construed as limited to the descriptions set forth herein. Accordingly, the embodiments are described below merely by referring to the drawings to illustrate aspects.
Unless specifically indicated otherwise, functional components (including those described in the detailed description with reference to the terms "unit," "module," "layer," "device," "controller," etc.) and functional blocks illustrated in the drawings may be implemented in the form of processing circuitry, such as software, hardware, or a combination thereof. For example, the processing circuitry may more particularly include, but is not limited to, electronic circuitry (which includes electrical components such as at least one of transistors, resistors, capacitors, etc.), a Central Processing Unit (CPU), an Arithmetic Logic Unit (ALU), a digital signal processor, a microcomputer, a Field Programmable Gate Array (FPGA), a system on a chip (SoC), a programmable logic unit, a microprocessor, an Application Specific Integrated Circuit (ASIC), etc. For example, the software may be machine code, firmware, embedded code, and application software. For example, the hardware may include electrical circuitry, electronic circuitry, processors, computers, integrated circuits, integrated circuit cores, pressure sensors, inertial sensors, microelectromechanical systems (MEMS), passive components, or combinations thereof.
It will be understood that, although the terms "first," "second," and/or "third," etc. may be used herein to describe various elements, operations, etc., these elements, operations, etc. should not be limited by these terms. These terms are only used to distinguish one element, operation, etc. from another element, operation, etc. Thus, a first element, operation, request, etc. discussed below could be termed a second, third, etc. element, operation, request, etc. alternatively without departing from the present disclosure.
Fig. 1 is a block diagram of an electronic device in accordance with at least one embodiment of the present disclosure. Referring to fig. 1, an electronic device 1000 includes a host device 1100 and a storage device 1200. The electronic device 1000 may be a computing system such as a Personal Computer (PC), notebook, laptop, server, workstation, tablet PC, smart phone, digital camera, black box, etc. configured to process and/or store various information.
The host device 1100 is configured to control the overall operation of the electronic device 1000. Host device 1100 may communicate with storage device 1200. For example, host device 1100 may communicate with storage device 1200 to store data in storage device 1200, read data stored in storage device 1200, and/or delete data stored in storage device 1200. In some embodiments, the host device 1100 and the storage device 1200 may communicate with each other in accordance with NVMe (fast nonvolatile memory) standards.
In at least one embodiment, host device 1100 includes applications 1110 and operating system 1120. In at least one embodiment, applications 1110 and operating system 1120 can be implemented in software. For example, host device 1100 may include a processor and memory. At least some of the functions implemented by the software may be stored as instructions in a non-transitory computer-readable medium (e.g., storage device 1200). The processor of the host device 1100 may be configured to execute instructions such that the host device 1100 performs functions corresponding to the instructions by loading the instructions stored in the non-transitory computer readable medium into the memory of the host device 1100 and executing the loaded instructions.
The application 1110 may initiate system operations under the control of a user. For example, the application 1110 may generate a file, may read the generated file, may edit the generated file, and/or may delete the generated file. The file may be stored as data in the storage device 1200.
Operating system 1120 may be a system that provides an interface between software and hardware and manages at least one resource of electronic device 1000. Operating system 1120 can provide commands and addresses to storage device 1200 and can communicate with storage device 1200 upon system requests by applications 1110.
In accordance with at least one embodiment, the memory device 1200 includes a memory controller 1210 and a nonvolatile memory device 1220. The memory controller 1210 may store data in the nonvolatile memory device 1220 and/or may read data stored in the nonvolatile memory device 1220 according to a request of the host device 1100. The nonvolatile memory device 1220 may operate under the control of the memory controller 1210. For example, the memory controller 1210 may store data in the nonvolatile memory device 1220 or may read data stored in the nonvolatile memory device 1220 based on a command and an address received from the host device 1100.
In some embodiments, the storage controller 1210 may support secure operations. For example, the memory controller 1210 may receive a secure write request from the host device 1100 and store data encrypted using an encryption key in the nonvolatile memory device 1220. As another example, the storage controller 1210 may receive a secure read request from the host device 1100, decrypt data of the nonvolatile storage device 1220 by using the encryption key, and provide the decrypted data to the host device 1100. The encryption key may include a series of unique codes used in the encryption operation and the decryption operation.
The user (and/or application 1110) may have difficulty discerning the content of the encrypted data without decryption. For example, if encrypted data is revealed to a malicious user through an abnormal access path, it may be difficult for the malicious user to discern the content of the encrypted data. Decryption operations using the associated encryption key may be required to discern the content of the encrypted data. That is, the secure operation can prevent the contents of the stored data from being leaked. The secure area may be adapted to store data requiring security (e.g., personal information or sensitive information of the user).
The nonvolatile memory device 1220 is configured to store data. In some embodiments, the nonvolatile memory device 1220 may be a NAND flash memory device, but the present disclosure is not limited thereto. For example, the nonvolatile memory device 1220 may be one of various memory devices that retain data stored therein even when power is turned off, such as a phase change random access memory (PRAM), a Magnetic Random Access Memory (MRAM), a Resistive Random Access Memory (RRAM), a Ferroelectric Random Access Memory (FRAM), or the like.
The nonvolatile memory device 1220 may include a user area and a security area. A security zone may refer to a zone managed in accordance with the security policies of the present disclosure. For example, a secure region may refer to a region where encrypted data is stored in accordance with the security policies of the present disclosure. The secure area may include a plurality of data blocks PBK1 to PBKN. Herein, N is a natural number. Each of the plurality of data blocks PBK1 to PBKN may include a physical data block having a plurality of pages. A page may refer to a minimum unit of storing data (e.g., a data chunk) identified by a physical address. For example, a page may refer to the minimum unit of write operation. The physical data block may refer to a minimum unit of an erase operation.
The plurality of data blocks PBK1 to PBKN are configured to store data encrypted by using the plurality of encryption keys EK1 to EKN. For example, the first data block PBK1 may store data encrypted by using the first encryption key EK 1. A decryption operation using the first encryption key EK1 may be required to read the data of the first data block PBK 1. The second data block PBK2 may store data encrypted by the second encryption key EK 2. A decryption operation using the second encryption key EK2 may be required to read the data of the second data block PBK 2. The plurality of encryption keys EK1 to EKN may be managed by the memory controller 1210.
For better understanding of the present disclosure, the description will be given as a plurality of encryption keys EK1 to EKN different from each other, but the present disclosure is not limited thereto. Encryption keys having the same content may be used at the same point in time; however, new encryption keys may be added over time and/or multiple encryption keys may exist at the same point in time in accordance with the management policy.
For example, when the first data block PBK1 and the second data block PBK2 store data corresponding to a file generated at the same point in time, the content of the first encryption key EK1 may be the same as the content of the second encryption key EK 2. Thereafter, when the third data block PBK3 stores data corresponding to another file, the contents of the third encryption key EK3 may be different from the contents of the first encryption key EK1 and the contents of the second encryption key EK 2. In this case, EK1 of the first encryption key and EK2 of the second encryption key may be referred to as "old keys", and the third encryption key EK3 may be referred to as "new keys".
The user area may refer to an area managed independently of the security policy of the present disclosure. For example, the user area may be used to manage data that is not encrypted according to the security policies of the present disclosure or data that is encrypted according to any other policy (e.g., SED (self-encrypting device) standard). The user area may be referred to as a "non-managed area" of data independent of the security policies of the present disclosure.
The user area may include a plurality of user data blocks PBKu1 to PBKuM. Herein, M is a natural number. Each of the plurality of user data blocks PBKu1 to PBKuM may include a physical data block having a plurality of pages. Each of the plurality of user data blocks PBKu1 to PBKuM may store unencrypted data (e.g., normal data) or data encrypted according to a different policy than the security policy of the present disclosure.
Because data of the user area is managed without encryption and decryption according to the security policies of the present disclosure, read operations and write operations in the user area may be faster than those of the security area, and power consumption in the user area may be smaller than that of the security area. The user area may be adapted to store data having a low level of importance and requiring fast read operations and fast write operations.
In some embodiments, the memory controller 1210 may adjust the ratio of the user area to the secure area of the nonvolatile memory device 1220. For example, the non-volatile memory device 1220 may include a plurality of physical data blocks. The storage controller 1210 may determine a ratio of the user area to the security area according to a request of the host device 1100. According to the determined ratio, the memory controller 1210 may use some of the plurality of physical data blocks as the plurality of data blocks PBK1 to PBKN, and may use other of the plurality of physical data blocks as the plurality of user data blocks PBKu1 to PBKuM. The ratio of the user area to the security area may be adjusted again according to the next request of the host device 1100.
As described above, according to at least one embodiment of the present disclosure, the storage device 1200 may store encrypted data in a secure area, and thus, the security of the stored data may be improved. In addition, because the storage device 1200 supports both a user area and a secure area, the user (and/or the storage controller 1210) can selectively manage data in terms of security, latency, and power, and can increase user convenience.
FIG. 2 is a block diagram illustrating the memory controller of FIG. 1 according to some embodiments of the present disclosure. Referring to fig. 2, the memory controller 1210 includes a security manager 1211, a mapping table 1212, a processor 1213, a volatile memory device 1214, a Power Management Integrated Circuit (PMIC) 1215, a host interface circuit 1216, and a nonvolatile memory interface circuit 1217.
The security manager 1211 is configured to perform security operations based on requests from the host device 1100. The security manager 1211 may be implemented using processing circuitry such as hardware, software, or a combination of hardware and software. In some embodiments, at least a portion of the security manager 1211 may be implemented using hardware on a Flash Translation Layer (FTL).
According to at least one example, at least a portion of the security manager 1211 may be implemented in software. In this case, the security manager 1211 may be stored in the nonvolatile memory device 1220 in the form of instructions. The functions of the security manager 1211 may be implemented when the processor 1213 loads instructions from the nonvolatile memory device 1220 to the volatile memory device 1214 and executes the loaded instructions.
The security manager 1211 may include a command manager 1211a, a key manager 1211b, and an encryption manager 1211c. The command manager 1211a is configured to process requests from the host device 1100. The command manager 1211a may allocate a security area and a user area according to a request of the host device 1100. The command manager 1211a may manage (e.g., write, read, or delete) data of the user area and the security area based on a request of the host device 1100.
The key manager 1211b is configured to manage encryption keys. Over time, the key manager 1211b may generate new encryption keys and/or may discard (e.g., delete) previously generated encryption keys. The key manager 1211b may manage a plurality of encryption keys respectively assigned to a plurality of data blocks in the secure area of the nonvolatile memory device 1220. The key manager 1211b may provide the encryption key to the encryption manager 1211c under the control of the command manager 1211 a.
Under the control of the command manager 1211a, the encryption manager 1211c may perform data encryption or data decryption by using the encryption key received from the key manager 1211 b.
The security manager 1211 is configured to perform a secure write operation. For example, based on a secure write request from the host device 1100, the command manager 1211a may buffer (e.g., temporarily store) data received from the host device 1100 in the buffer memory 1214a of the volatile storage device 1214, may control the key manager 1211b and the encryption manager 1211c such that the buffered data of the buffer memory 1214a is encrypted, and may store the encrypted data in the nonvolatile storage device 1220.
The security manager 1211 is configured to perform a secure read operation. For example, based on a secure read request from the host device 1100, the command manager 1211a may load encrypted data from the nonvolatile storage device 1220 to the buffer memory 1214a of the volatile storage device 1214, may control the key manager 1211b and the encryption manager 1211c such that the loaded data is decrypted, and may provide the decrypted data to the host device 1100.
The mapping table 1212 is configured to store a mapping relationship between logical addresses and physical addresses. The host device 1100 may use the logical address to identify the data. The logical address may be, for example, at least one of a Logical Block Address (LBA) and/or a logical page address (LPN). The physical address may be used to identify a page in a physical data block of the nonvolatile memory device 1220. The mapping relationship may be referred to as "mapping information". In some embodiments, the mapping table 1212 may be implemented in the volatile memory device 1214. The mapping table 1212 may be backed up to the nonvolatile memory device 1220.
According to at least one embodiment, the security manager 1211 is configured to manage a mapping table 1212. For example, when a write request is received, the security manager 1211 may generate (e.g., store) a new mapping relationship in the mapping table 1212. Upon receiving the read request, the security manager 1211 may reference the mapping relationship of the mapping table 1212 to access pages of the physical data blocks of the nonvolatile memory device 1220. When a delete request (e.g., a unmap request) is received, the security manager 1211 may delete the mapping relationship of the mapping table 1212 and may reduce the effective page count of the physical data block that is the target of the delete request. The security manager 1211 may perform a physical erase operation of a physical data block whose valid page count has a specific value (e.g., "0") with reference to the mapping table 1212.
The processor 1213 is configured to control the overall operation of the memory controller 1210. The processor 1213 may be hardware that physically implements the functions of the software modules.
The volatile memory device 1214 is a device that loses data stored therein when power is turned off, such as a Dynamic Random Access Memory (DRAM) device or a Static Random Access Memory (SRAM) device. The volatile memory device 1214 may include a buffer memory 1214a. The buffer memory 1214a may buffer data from the host device 1100 and/or may buffer encrypted data from the nonvolatile memory device 1220. In addition, the volatile memory device 1214 may serve as a buffer memory and/or a cache memory for the memory controller 1210.
The PMIC 1215 is configured to manage power for the memory controller 1210. For example, the PMIC 1215 may receive a power supply voltage from the host device 1100, and may provide voltages necessary for the memory controller 1210 and the nonvolatile memory device 1220 based on the power supply voltage.
The storage controller 1210 is configured to communicate with the host device 1100 through the host interface circuit 1216. In some embodiments, the host interface circuit 1216 may be implemented based on at least one of various interfaces such as a Serial Advanced Technology Attachment (SATA) interface, a peripheral component interconnect express (PCIe) interface, a serial attached Small Computer System Interface (SCSI) (SAS), a nonvolatile memory express (NVMe) interface, a universal flash memory (UFS) interface, and so forth.
The memory controller 1210 is configured to communicate with the nonvolatile memory device 1220 through the nonvolatile memory interface circuit 1217. In some embodiments, the non-volatile memory interface circuit 1217 may be implemented based on a NAND interface.
Fig. 3 is a diagram describing a conventional electronic device. A conventional electronic device ED will be described with reference to fig. 3. For a better understanding of the present disclosure, the components and operation of a conventional electronic device ED will be described, but the conventional electronic device ED may include technical features not disclosed in the document of the information disclosure statement, and is not intended to limit the scope and spirit of the invention.
A conventional electronic device ED may include a host device, a command manager, a mapping table, and a nonvolatile memory device. The command manager, mapping table, and nonvolatile memory device may be collectively referred to as a "storage device".
The mapping table may store a mapping relationship between logical addresses and physical addresses. For example, the mapping table may store a mapping table of the first logical address LA1 and the first physical address PA 1. As in the above description, the mapping table may store the mapping relationship between the second to fourth logical addresses LA2 to LA4 and the second to fourth physical addresses PA2 to PA 4.
The nonvolatile memory device may include a plurality of data blocks PBK1 to PBKN. Each of the plurality of data blocks PBK1 to PBKN may include a plurality of pages. For example, the first data block PBK1 may include first to fourth pages identified by first to fourth physical addresses PA1 to PA4, respectively. The first to fourth pages of the first data block PBK1 may store the first to fourth data DT1 to DT4, respectively.
The command manager may receive a first request RQ1 to delete the first data DT1 from the host device. The first request RQ1 may include a first logical address LA1 corresponding to the first data DT1. The command manager may delete the mapping relationship (e.g., mapping information) of the first logical address LA1 and the first physical address PA1 from the mapping table based on the first request RQ1. In the first data block PBK1, the first data DT1 may be invalid data and the second to fourth data DT2 to DT4 may be valid data.
The command manager may refer to the mapping table to decrease the effective page count of the first data block PBK1 from "4" to "3". Because the effective page count of the first data block PBK1 is not "0", the command manager does not perform a physical erase operation of the first data block PBK 1. That is, the command manager may perform only the demapping of the mapping relationship based on the first request RQ1, and the first data block PBK1 may still hold the first data DT1.
The command manager may receive a second request RQ2 to read the first data DT1 from the host device. The host device may recover the unmapped first physical address PA1 in accordance with the mapping rules of the mapping table and may provide a second request RQ2 comprising information of the thus recovered first physical address PA1. Alternatively, the command manager may recover the unmapped first physical address PA1 with reference to any other physical address (e.g., second physical address PA 2) in the mapping table. The command manager may acquire the first data DT1 for the first page by accessing the first page corresponding to the first physical address PA1 of the first data block PBK1 in the nonvolatile memory device based on the restored first physical address PA1. The command manager may provide the first data DT1 to the host device.
As described above, the conventional electronic device ED may physically hold deleted (e.g., unmapped) data and may provide the deleted data to the host device upon a next request. That is, in the case where the malicious user restores only the mapping relationship, the malicious user can also access the deleted data and can check the content of the deleted data. Therefore, the safety or effectiveness of the deletion operation cannot be ensured.
Alternatively, unlike the description given with reference to fig. 3, a technique for physically erasing all data of the first data block PBK1 may be considered. However, when the physical erase operation is performed even in the case where only the first data DT1 of the first data block PBK1 is inactive and the remaining data of the first data block PBK1 is active, a write amplification factor for backing up the active data may be increased, the number of program/erase cycles and power consumption of the nonvolatile memory device may be increased, data processing may be delayed, and/or the lifetime of the nonvolatile memory device may be shortened.
Therefore, a technique for ensuring the security or effectiveness of a deletion operation without performing a physical erase operation of a physical data block unit but performing a deletion (e.g., demapping) operation of a data block unit would improve the function of the nonvolatile memory device.
Fig. 4 is a diagram depicting an electronic device according to some embodiments of the present disclosure. Referring to fig. 4, the electronic device 1000 may include a host device 1100, a security manager 1211, a mapping table 1212, a buffer memory 1214a, and a nonvolatile memory device 1220.
The security manager 1211 includes a command manager 1211a, a key manager 1211b, and an encryption manager 1211c.
The mapping table 1212 is configured to store a mapping relationship between logical addresses and physical addresses. For example, the mapping table 1212 may store mappings between the first to fourth logical addresses LA1 to LA4 and the first to fourth physical addresses PA1 to PA 4.
The nonvolatile memory device 1220 is configured to include a plurality of data blocks PBK1 to PBKN. The plurality of data blocks PBK1 to PBKN may store data encrypted by using the plurality of encryption keys EK1 to EKN. Each of the plurality of data blocks PBK1 to PBKN may include a plurality of pages. For example, the first data block PBK1 may include first to fourth pages identified by first to fourth physical addresses PA1 to PA4, respectively. The first to fourth pages of the first data block PBK1 may store the first to fourth data DT1 to DT4 encrypted by using the first encryption key EK1, respectively.
The security manager 1211 may receive a first request RQ1 for deleting the first data DT 1. The first request RQ1 may include a first logical address LA1 corresponding to the first data DT 1. When receiving the first request RQ1, the command manager 1211a is configured to load valid data of the first data block PBK1 of the nonvolatile memory device 1220 into the buffer memory 1214a with reference to the mapping table 1212. The valid data may include, for example, second data DT2 to fourth data DT4.
The key manager 1211b is configured to provide the first encryption key EK1 to the encryption manager 1211c under the control of the command manager 1211 a. The first encryption key EK1 may be an old key. Under the control of the command manager 1211a, the encryption manager 1211c may decrypt the second to fourth data DT2 to DT4 using the first encryption key EK1, and the decrypted second to fourth data DT2 to DT4 may be loaded into the buffer memory 1214a.
The key manager 1211b is configured to provide the second encryption key EK2 to the encryption manager 1211c under the control of the command manager 1211 a. The second encryption key EK2 may be a new key. In at least one embodiment, a new key is generated using a random number generator configured to generate n bits. Under the control of the command manager 1211a, the encryption manager 1211c may encrypt the decrypted second data DT2 to fourth data DT4 in the buffer memory 1214a using the second encryption key EK2.
The command manager 1211a is configured to store the second to fourth data DT2 to DT4 in the buffer memory 1214a encrypted using the second encryption key EK2 at fifth to seventh pages of the second data block PBK2 of the nonvolatile memory device 1220, respectively identified by fifth to seventh physical addresses PA5 to PA 7. The key manager 1211b may delete the first encryption key EK1 under the control of the command manager 1211 a.
The command manager 1211a is configured to update a mapping relationship (e.g., mapping information) of the mapping table 1212. For example, the command manager 1211a may delete the mapping relation of the first logical address LA1 in the mapping table 1212, and/or the mapping table 1212 may store (or overwrite) the mapping relation of the second to fourth logical addresses LA2 to LA4 and the fifth to seventh physical addresses PA5 to PA7 in the mapping table 1212.
Thereafter, the security manager 1211 may receive a second request RQ2 for reading the first data DT 1. If the second request is from a malicious user, the malicious user may restore the mapping relationship of the first logical address LA1 deleted in the mapping table 1212, and the security manager 1211 may load the first data DT1 of the first data block PBK1 from the nonvolatile memory device 1220 into the buffer memory 1214a. However, since the first data DT1 is encrypted using the first encryption key EK1 and the first encryption key EK1 is deleted, the key manager 1211b cannot decrypt the first data DT1, and thus, the first data DT1 can be protected from a malicious user.
As described above, according to at least one embodiment of the present disclosure, since an encryption key is deleted based on a deletion request of a data chunk unit, unmapped data cannot be restored. Therefore, the safety or effectiveness of the deletion operation can be ensured.
Fig. 5 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure. Referring to fig. 5, an electronic device 1000 may include a host device 1100 and a storage device 1200.
In operation S111, the host device 1100 provides the first request RQ1 for allocation to the storage device 1200. The first request RQ1 may be used to direct the allocation operations of the secure area and the user area. The first request RQ1 may comprise an address range of the secure enclave.
In operation S112, the storage device 1200 allocates a user area and a security area based on the first request RQ1. The user area may store unencrypted data or data encrypted according to a security policy different from the security policy of the present disclosure. The secure area may store encrypted data.
In operation S121, the host device 1100 provides the second request RQ2 for the secure write operation of the first data DT1 to the storage device 1200. The buffer memory of the storage device 1200 may temporarily store the first data DT1.
In operation S122, the storage apparatus 1200 encrypts the first data DT1 of the buffer memory using the first encryption key EK1 based on the second request RQ2, and stores the thus encrypted first data DT1 in the first data block PBK1 of the secure area of the nonvolatile memory device.
In some embodiments, the first data DT1 may have a chunk size (chunk size). The chunk size may correspond to the size of the logical block address LBA of the host device 1100 and/or may correspond to a unit (or page unit) of a write operation of the storage device 1200. The chunk size may be smaller than the unit of physical erase operation of the memory device 1200.
In some embodiments, the electronic device 1000 may maintain an allocation of secure areas while maintaining an allocation of user areas. For example, after operation S112, the storage device 1200 may receive a request for an unsecure write operation (e.g., a normal write operation without accompanying an encryption operation) of data of the user data block from the host device 1100. The storage device 1200 may store unencrypted data and/or data encrypted according to a policy different from the security policy of the present disclosure in a user data block of a user area of the nonvolatile memory device based on a request of the host device 1100.
In operation S130, the host device 1100 may provide the third request RQ3 for the secure deletion operation of the first data DT1 to the storage device 1200. The third request RQ3 may indicate invalid data in a data block of the secure enclave. The data indicated by the third request RQ3 may be unmapped.
In some embodiments, the third request RQ3 may indicate a plurality of invalid data in the same data block. For example, the third request RQ3 may indicate any other invalid data of the first data block PBK1 in addition to the first data DT1.
In operation S140, the storage device 1200 loads valid data of the first data block PBK1 based on the third request RQ3, and decrypts the loaded valid data by using the first encryption key EK1. The valid data may include second data DT2 different from the first data DT1. The valid data may not include the first data DT1 indicated by the third request RQ 3.
In operation S150, the storage apparatus 1200 encrypts the data of operation S140 (e.g., valid data of the first data block PBK1 decrypted using the first encryption key EK 1) by using the second encryption key EK 2.
In operation S160, the storage device 1200 stores the data of operation S150 (e.g., valid data of the first data block PBK1 encrypted by using the second encryption key EK 2) in the second data block PBK2 of the secure area.
In operation S170, the storage device 1200 may delete the first encryption key EK1. Since the first encryption key EK1 is deleted, the first data DT1 of the first data block PBK1 may not be recovered in practice (or the first data DT1 of the first data block PBK1 may be guaranteed to be unrecoverable).
Fig. 6 is a diagram describing secure operation of an electronic device according to some embodiments of the present disclosure. Referring to fig. 6, the electronic device 1000 includes a host device 1100, a security manager 1211, a mapping table 1212, a buffer memory 1214a, and a nonvolatile memory device 1220. The electronic device 1000 may correspond to the electronic device 1000 of fig. 5.
The security manager 1211 includes a command manager 1211a, a key manager 1211b, and an encryption manager 1211c. The key manager 1211b may manage the first encryption key EK1 and the second encryption key EK2.
The mapping table 1212 is configured to store a mapping relationship between logical addresses and physical addresses. For example, the mapping table 1212 may store the mapping relationship of the first to fourth logical addresses LA1 to LA 4.
The nonvolatile memory device 1220 includes a user area and a security area. The secure area may include a first data block PBK1 and a second data block PBK2. The first data block PBK1 may include first to fourth pages corresponding to the first to fourth physical addresses PA1 to PA 4. The first to fourth pages may store data encrypted by the first encryption key EK 1. The second data block PBK2 may include fifth to eighth pages corresponding to the fifth to eighth physical addresses PA5 to PA 8. The fifth page to the eighth page may store data encrypted by the second encryption key EK2.
Hereinafter, a secure operation of the electronic apparatus 1000 will be described. The secure operation may include an area allocation operation, a secure write operation, and a secure delete operation.
In the first operation (1), the security manager 1211 allocates a security area and a user area.
In the second operation (2), based on the secure write request from the host device 1100, the secure manager 1211 encrypts the first data DT1 by using the first encryption key EK1, and stores the encrypted first data DT1 to the first page of the first data block PBK 1. The first page of the first data block PBK1 may be identified by a first physical address PA 1. As described above, the second to fourth pages corresponding to the second to fourth physical addresses PA2 to PA4 of the first data block PBK1 may store the second to fourth data DT2 to DT4 encrypted by using the first encryption key EK 1.
In the third operation (3), the security manager 1211 receives a request for a security deletion operation of the first data DT1. Based on the request, the command manager 1211a may obtain a physical address of the valid data of the first data block PBK1 with reference to the mapping table 1212, and may load the valid data of the first data block PBK1 into the buffer memory 1214a. The valid data may include second to fourth data DT2 to DT4. The valid data may not include the first data DT1.
The security manager 1211 triggers the security deletion operation according to the timing internally determined in accordance with the internal policy (for example, the fourth operation (4) may be started), and/or may trigger the security deletion operation according to the timing determined by the host device 1100. For example, the security manager 1211 may determine the timing of performing the security deletion operation in accordance with the internal policy of the storage device 1200 regardless of the host device 1100. As another example, the security manager 1211 may determine the timing to perform the security deletion operation based on the timing determined by the host device 1100. An embodiment of triggering the secure erase operation by the host device 1100 will be described in detail with reference to fig. 13 and 14.
In the fourth operation (4), the key manager 1211b supplies the first encryption key EK1 to the encryption manager 1211c under the control of the command manager 1211 a. The first encryption key EK1 may be an old key. Under the control of the command manager 1211a, the encryption manager 1211c may decrypt the second to fourth data DT2 to DT4 loaded into the buffer memory 1214a by using the first encryption key EK1.
In the fifth operation (5), the key manager 1211b supplies the second encryption key EK2 to the encryption manager 1211c under the control of the command manager 1211 a. The second encryption key EK2 may be a new key. Under the control of the command manager 1211a, the encryption manager 1211c may encrypt the decrypted second data DT2 to fourth data DT4 in the buffer memory 1214a by using the second encryption key EK2 (e.g., may re-encrypt the decrypted second data DT2 to fourth data DT4 by using a new key).
In the sixth operation (6), the command manager 1211a stores the second to fourth data DT2 to DT4 re-encrypted by using the second encryption key EK2 at the fifth to seventh pages of the second data block PBK 2. The fifth page to the seventh page may be identified by fifth physical address PA5 to seventh physical address PA7.
The command manager 1211a updates the mapping relation of the mapping table 1212. For example, the command manager 1211a deletes the mapping relation of the first logical address LA1 in the mapping table 1212. The command manager 1211a may update the mapping relation of the mapping table 1212 such that the second to fourth logical addresses LA2 to LA4 are mapped to the fifth to seventh physical addresses PA5 to PA7, respectively.
In the seventh operation (7), the key manager 1211b deletes the first encryption key EK1 under the control of the command manager 1211 a. After deleting the first encryption key EK1, the first data DT1 of the first data block PBK1 may not be restored in practice.
Fig. 7 is a flow chart describing the allocation of secure enclaves for an electronic device according to some embodiments of the present disclosure. Referring to fig. 7, an electronic device 1000 may include applications 1110, an operating system 1120, and a storage device 1200. Applications 1110 and operating system 1120 may be collectively referred to as a "host device".
In operation S211, the application 1110 starts an allocation operation. For example, a user of electronic device 1000 may initiate a dispensing operation by controlling application 1110 with a separate interface device.
In operation S212, the application 1110 provides a partition creation request to the operating system 1120.
In operation S213, the operating system 1120 reduces the previously allocated user area. Operating system 1120 may create a space partition corresponding to the reduced user area. When the space division already exists, the operation of narrowing down the user area may be skipped.
In operation S214, the application 1110 provides a command for setting a security area to the storage device 1200. The command may indicate an allocation operation of the secure enclave. The command may include an address range for the secure enclave (e.g., an LBA range defined by a first LBA indicating the start of the secure enclave and a second LBA indicating the end of the secure enclave). In some embodiments, the command may be implemented as a set feature command of the NVMe standard.
In operation S215, the storage device 1200 stores an address range of the security area.
In operation S216, the storage device 1200 creates an encryption key for managing data of the secure area.
In operation S217, the storage device 1200 provides a completion response to the application 1110. The completion response may indicate that the secure enclave is set to complete. Alternatively, the completion response may indicate that the command in operation S214 is processed.
In operation S218, the application 1110 provides a request for allocation of a secure area to the operating system 1120.
In operation S219, the operating system 1120 allocates a security area. Operating system 1120 may determine that the secure region of the empty partition is allocated to completion. Thereafter, the storage device 1200 may perform a secure write operation, a secure read operation, and a secure delete operation on the secure area according to a request of the application 1110 or the operating system 1120.
Fig. 8 is a diagram depicting the address ranges of fig. 7, in accordance with some embodiments of the present disclosure. Address ranges of the storage device 1200 managed by the operating system 1120 will be described with reference to fig. 7 and 8. The address range may be an LBA range.
The LBA range of the storage device 1200 may include a system volume (system volume) and a user volume (user volume). The system volume may store data necessary for operation of a system (e.g., an operating system). The system volume may be referred to as a "system area". The user volume may store data such as image data, video data, text data, and audio data. The user volume may be referred to as a "user area" or "drive C".
Operating system 1120 may shrink the user volumes allocated to storage device 1200. An empty partition with a reduced user volume size may be created. Operating system 1120 may assign a secure volume to an air partition. The secure volume may store encrypted data. The secure volume may be referred to as a "secure enclave" or "drive S". The operating system 1120 may enable secure operations in the secure volume, or may disable secure operations, upon request of the application 1110. Upon request by application 1110, operating system 1120 may release the secure volume and may create the empty partition.
Fig. 9 is a diagram depicting a secure write operation of an electronic device according to some embodiments of the present disclosure. Referring to fig. 9, the electronic device 1000 includes a host device 1100, a security manager 1211, a mapping table 1212, a buffer memory 1214a, and a nonvolatile memory device 1220. The security manager 1211 includes a command manager 1211a, a key manager 1211b, and an encryption manager 1211c. The key manager 1211b is configured to manage encryption keys. The mapping table 1212 is configured to store a mapping relationship between logical addresses and physical addresses. The nonvolatile memory device 1220 includes a user area and a security area. The secure area may include a first data block PBK1 and a second data block PBK2.
Hereinafter, a secure write operation of the electronic apparatus 1000 will be described.
In the first operation (1), the security manager 1211 may receive a request for a secure write operation of the first data DT1 from the host device 1100. The request may include a first logical address LA1 of the first data DT1.
In the second operation (2), the buffer memory 1214a receives the first data DT1 corresponding to the secure write operation from the host device 1100 under the control of the secure manager 1211. The buffer memory 1214a may buffer the first data DT1.
In the third operation (3), the key manager 1211b supplies the first encryption key EK1 to the encryption manager 1211c under the control of the command manager 1211 a. Under the control of the command manager 1211a, the encryption manager 1211c may encrypt the first data DT1 buffered in the buffer memory 1214a by using the first encryption key EK1.
In the fourth operation (4), referring to the mapping table 1212, the command manager 1211a searches for the first physical address PA1 corresponding to the empty page, generates a mapping relationship of the first logical address LA1 and the first physical address PA1, and stores the mapping relationship in the mapping table 1212. The command manager 1211a stores the encrypted first data DT1 of the buffer memory 1214a in a first page corresponding to the first physical address PA1 of the first data block PBK1 in the secure area based on the first physical address PA 1.
Fig. 10 is a diagram describing a secure read operation of an electronic device according to some embodiments of the present disclosure. Referring to fig. 10, the electronic device 1000 includes a host device 1100, a security manager 1211, a mapping table 1212, a buffer memory 1214a, and a nonvolatile memory device 1220. The security manager 1211 includes a command manager 1211a, a key manager 1211b, and an encryption manager 1211c. The key manager 1211b is configured to manage encryption keys. The mapping table 1212 is configured to store a mapping relationship between logical addresses and physical addresses. The nonvolatile memory device 1220 includes a user area and a security area. The secure area includes a first data block PBK1 and a second data block PBK2.
Hereinafter, a secure read operation of the electronic apparatus 1000 will be described.
In the first operation (1), the security manager 1211 may receive a request for a secure read operation of the first data DT1 from the host device 1100. The request may include a first logical address LA1 of the first data DT1.
In the second operation (2), the command manager 1211a searches the first physical address PA1 having a mapping relationship with the first logical address LA1 with reference to the mapping table 1212. The command manager 1211a loads the first data DT1 stored at the first page of the first data block PBK1 into the buffer memory 1214a based on the first physical address PA1. The buffer memory 1214a buffers the first data DT1. The first data DT1 is data encrypted by using the first encryption key EK1 in a previous secure write operation.
In the third operation (3), the key manager 1211b supplies the first encryption key EK1 to the encryption manager 1211c under the control of the command manager 1211 a. Under the control of the command manager 1211a, the encryption manager 1211c decrypts the first data DT1 buffered in the buffer memory 1214a by using the first encryption key EK1.
In the fourth operation (4), the command manager 1211a supplies the decrypted first data DT1 of the buffer memory 1214a to the host device 1100.
Fig. 11 is a diagram describing recovery of a secure erase operation after a Sudden Power Off (SPO) event in accordance with some embodiments of the present disclosure. Referring to fig. 11, the electronic device 1000 includes a host device 1100, a security manager 1211, a buffer memory 1214a, a PMIC 1215, and a nonvolatile memory 1220. The security manager 1211 includes a command manager 1211a, a key manager 1211b, an encryption manager 1211c, and a log register 1211d. The key manager 1211b is configured to manage encryption keys.
The log register 1211d is configured to store a log (e.g., log data) of the secure deletion. The log of the secure deletion stored on the log register 1211d may include a start time point of the secure deletion operation, a time point of processing valid data, an end time point of the secure deletion operation, and the like.
For example, the first data block PBK1 may store the first to fourth data DT1, DT2, DT3, and DT4. In the secure erase operation, the second data DT2 to the fourth data DT4 may be valid data.
When there is no SPO event, the log register 1211d may store a start time point after receiving a request for a secure delete operation from the host device 1100. After decrypting the second data DT2 by using the first encryption key EK1, re-encrypting the second data DT2 by using the second encryption key EK2, and storing the re-encrypted second data DT2 in the second data block PBK2, the log register 1211d may store a point of time when the second data DT2 is processed. As described above, after the re-encrypted third data DT3 and fourth data DT4 are stored in the second data block PBK2, the log register 1211d stores the point in time at which the third data DT3 and fourth data DT4 are processed. After all valid data are processed and the first encryption key EK1 is deleted, the log register 1211d stores the completion time point.
In contrast, when an SOP event occurs while the secure erase operation is being processed, the log register 1211d may store only some of the processing time points associated with the secure erase operation. Referring to the log register 1211d, the command manager 1211a may check a point in time at which the secure delete operation is suspended due to the SPO event, and may resume the suspended secure delete operation.
The nonvolatile memory device 1220 may include a user area and a security area. The secure area may include a first data block PBK1 and a second data block PBK2.
Hereinafter, the secure erase operation and the resume of the secure erase operation after the SPO event will be described.
In the first operation (1), the security manager 1211 may receive a request for a security deletion operation of the first data DT 1. The first data DT1 may be invalid data. The second data DT2 to the fourth data DT4 may be valid data.
The security manager 1211 re-encrypts the second data DT2 of the first data block PBK1 and stores the re-encrypted second data DT2 at the fifth page of the second data block PBK2 corresponding to the fifth physical address PA 5. The log register 1211d stores the processing time point of the second data DT 2.
The security manager 1211 re-encrypts the third data DT3 of the first data block PBK1 and stores the re-encrypted third data DT3 at the sixth page of the second data block PBK2 corresponding to the sixth physical address PA 6. The log register 1211d stores a processing time point of the third data DT 3.
In a second operation (2), an SPO event may occur. The SPO event may indicate an unexpected interruption of the power supply. For example, the supply of power supply voltage from host device 1100 to PMIC 1215 may be suddenly interrupted. The SPO event may occur while the secure delete operation is being processed. For example, the SPO event may occur after processing the third data DT3 and before processing the fourth data DT 4. The log register 1211d may not store the processing time point of the fourth data DT 4.
In a third operation (3), the supply voltage is supplied again after the SPO event occurs. For example, after a period of time has elapsed from the point in time when the SPO event occurred, the host device 1100 may supply a power supply voltage to the PMIC 1215. The PMIC 1215 may provide a voltage necessary for the security manager 1211 based on the power supply voltage.
In a fourth operation (4), the security manager 1211 detects the occurrence of an SPO event based on the voltage received from the PMIC 1215. The security manager 1211 may refer to the log register 1211d for the purpose of checking whether an SPO event occurs during a security delete operation or whether an SPO event occurs after a security delete operation. The security manager 1211 may refer to the log register 1211d to determine that an SPO event occurred during the security delete operation. For example, referring to the log register 1211d, the security manager 1211 may check that the third data DT3 is processed and the fourth data DT4 is not processed. The security manager 1211 resumes the operation for re-encrypting the fourth data DT 4. The command manager 1211a loads the fourth data DT4 of the first data block PBK1 into the buffer memory 1214a.
In the fifth operation (5), the key manager 1211b supplies the first encryption key EK1 to the encryption manager 1211c under the control of the command manager 1211 a. For example, under the control of the command manager 1211a, the encryption manager 1211c may decrypt the fourth data DT4 loaded into the buffer memory 1214a by using the first encryption key EK1.
In the sixth operation (6), the key manager 1211b supplies the second encryption key EK2 to the encryption manager 1211c under the control of the command manager 1211 a. Under the control of the command manager 1211a, the encryption manager 1211c may encrypt the decrypted fourth data DT4 of the buffer memory 1214a using the second encryption key EK2 (e.g., may re-encrypt the decrypted fourth data DT4 by using a new key).
In the seventh operation (7), the command manager 1211a stores the fourth data DT4 of the buffer memory 1214a re-encrypted by using the second encryption key EK2 at the seventh page of the second data block PBK 2. The seventh page may be identified by a seventh physical address PA 7.
In the eighth operation (8), the key manager 1211b deletes the first encryption key EK1 under the control of the command manager 1211 a.
As described above, according to the embodiments of the present disclosure, even if an SPO event occurs during a secure delete operation, the electronic device 1000 can resume the secure delete operation. The operation of restoring the secure erase operation due to the occurrence of the SPO event may be implemented on a Flash Translation Layer (FTL) in hardware form. During the resume secure erase operation, the electronic device 1000 may refer to the log register to identify data corresponding to the suspended operation, may decrypt the data by using the old key, may re-encrypt the decrypted data by using the new key, and may erase the old key after all valid data is re-encrypted. Therefore, even if an SPO event occurs during the secure erase operation, the validity of the secure erase operation can be ensured.
Fig. 12 is a flowchart describing a secure zone management method of an electronic device according to some embodiments of the present disclosure. Referring to fig. 12, an electronic device 1000 includes a host device 1100 and a storage device 1200.
In operation S311, the host device 1100 provides a first request RQ1 for allocating a user area and a security area to the storage device 1200.
In operation S312, the storage device 1200 allocates a user area and a security area. The secure area may store encrypted data. The user area may store unencrypted data or data encrypted according to a different policy than the security policies of the present disclosure.
In operation S321, the host device 1100 provides a second request RQ2 for security disabling of the secure area.
In operation S322, the storage device 1200 disables the security feature of the security area. When the security feature is disabled, the address range of the allocated security region may be maintained without modification. The security region may operate similarly to the user region until the security feature is again enabled.
For example, when a write request is received from the host device 1100, the storage device 1200 stores unencrypted data in the secure area. When a delete request is received from the host device 1100, the memory controller 1200 may perform demapping of invalid data of the secure area without performing a re-write operation of the valid data. In contrast, when a read request for data stored when the security feature is enabled is received from the host device 1100, the storage controller 1200 decrypts the encrypted data of the security area and provides the decrypted data to the host device 1100.
In operation S331, the host device 1100 provides a third request RQ3 for security enablement of the secure area.
In operation S332, the storage device 1200 enables the security feature of the security area. When the security feature is enabled, the secure area may support the next read, write, and delete security operations. Through background operations, the storage device 1200 may encrypt data stored when a security feature is disabled and may store the encrypted data in a secure area.
In operation S341, the host device 1100 provides a fourth request RQ4 for releasing the secure enclave.
In operation S342, the storage device 1200 releases the secure area. For example, in at least one embodiment, the released security zone may be maintained as a space division zone and/or may be included in the user zone.
In some embodiments, according to the release mode of the fourth request RQ4, the storage device 1200 may physically erase all data of the secure enclave and/or may decrypt all data of the secure enclave for storage in the user enclave.
Fig. 13 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure. With reference to FIG. 13, an electronic device 1000 includes applications 1110, an operating system 1120, and a storage device 1200. The electronic device 1000 may operate in accordance with the NVMe standard.
In operation S411, the application 1110 starts an allocation operation under the control of the user.
In operation S412, the application 1110 provides a partition creation request to the operating system 1120.
In operation S413, the operating system 1120 creates a space partition. For example, operating system 1120 may shrink the previously allocated user area and may create a spatial partition corresponding to the reduced address range.
In operation S414, the application 1110 provides a set feature command for setting a security area to the storage device 1200. The set feature command may be defined, for example, in the NVMe standard. The feature identifier of the set feature command may indicate an operation of generating the security area. The feature identifier of the set feature command may be referred to as "createSecurePath reference". The set feature command may include an address range (e.g., LBA range) corresponding to the secure area.
In operation S415, the storage apparatus 1200 sets a security area based on the set feature command. For example, the storage device 1200 may store an address range of a secure enclave. The storage device 1200 may create an encryption key for secure operations.
In operation S416, the storage device 1200 provides a completion response to the application 1110.
In operation S417, the application 1110 provides an area creation request to the operating system 1120.
In operation S418, the operating system 1120 allocates a security area.
In operation S421, the application 1110 provides a request for a secure delete operation to the operating system 1120. For example, instead of immediately performing the secure erase operation, the application 1110 may allow the operating system 1120 to schedule the timing of performing the secure erase operation. In at least one embodiment, the secure erase operation may be performed by a background operation of the operating system 1120. The operating system 1120 may generate at least one trim command (trim command) based on the request of the application 1110. The pruning command may be used to delete (e.g., unmap) the mapping relationship of the data chunks in logical address units.
In operations S422a, S422b, and S422c, the operating system 1120 may sequentially provide a plurality of trimming commands to the storage device 1200 based on the scheduled timing. For example, operating system 1120 may trigger a request for secure deletion of storage device 1200.
To intuitively understand the trimming command, three trimming commands are illustrated in fig. 13, but the present disclosure is not limited thereto. The number of pruning commands may be increased or decreased depending on the number of data chunks to be invalidated in the secure erase operation.
In operation S423, the storage apparatus 1200 performs a secure deletion operation. For example, based on the trimming command in operation S422a, operation S422b, and operation S422c, the storage device 1200 may identify valid data, may re-encrypt the valid data by using a new key, may store the re-encrypted data in any other data block, and may delete the old key.
Fig. 14 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure. Referring to fig. 14, an electronic device 1000 may include applications 1110, an operating system 1120, and a storage device 1200. The electronic device 1000 may operate in accordance with the NVMe standard. Operation S511, operation S512, operation S513, operation S514, operation S515, operation S516, operation S517, and operation S518 are the same as and/or substantially similar to operation S411, operation S412, operation S413, operation S414, operation S415, operation S416, operation S417, and operation S418 of fig. 13, and thus, additional descriptions will be omitted to avoid redundancy.
In operation S521, the application 1110 provides a setting feature command for a secure deletion operation to the storage device 1200. Instead of performing the security deletion operation through the background operation of the operating system 1120, the application 1110 may directly control the storage device 1200 so as to immediately perform the security deletion operation. For example, the application 1110 may trigger a request for secure deletion of the storage device 1200.
The feature identifier of the set feature command may indicate an operation for securely deleting invalid data of the secure area (e.g., an operation of re-encrypting valid data by using a new key and deleting an old key). The feature identifier of the set feature command may be referred to as "triggersecure mix". The set feature command may include an address range (e.g., LBA range) corresponding to the secure area.
In operation S522, the storage device 1200 performs a secure deletion operation. For example, based on the set feature command in operation 521, the storage device 1200 identifies valid data, re-encrypts the valid data by using the new key, stores the re-encrypted data in any other data block, and deletes the old key.
Fig. 15 is a diagram depicting commands of an electronic device according to some embodiments of the present disclosure. An example of the set feature command of fig. 13 and 14 will be described with reference to fig. 15.
The set feature command may include 32 binary bits.
Bits 00 through 07 of the set feature command may belong to a field for storing a feature identifier. This field may indicate an identifier specified by the set feature command. The operation of setting the feature command may be specified according to the feature identifier.
Bits 08 through 30 of the set feature command may belong to the reserved field.
Bit 31 of the set feature command may belong to the save (save) field. The save field may specify that the memory controller should save the attribute so that the attribute persists and resets for all power states.
Since bits 00 to 07 of the set feature command corresponding to the feature identifier are 8 binary bits, they can be represented again with 2 hexadecimal bits. The contents of the feature identifier according to two hexadecimal bit values are described with reference to a table of feature identifiers.
Bit 00h of the feature identifier may belong to the reserved field.
Bits 01h through 18h of the feature identifier may be defined in the NVMe standard.
Bits 19h through 77h of the feature identifier may belong to the reserved field.
Bits 78h through 7Fh of the feature identifier may represent operations defined in the NVMe management interface standard.
Bits 80h through BFh of the feature identifier may belong to a reserved field and may indicate a specified command set.
Bits C0h through FFh of the feature identifier may belong to vendor specific fields. The feature identifier "createsecurep art" and the feature identifier "triggersecure mix" described with reference to fig. 13 and 14 may be implemented by using some bits of the vendor specific field.
Fig. 16 is a flowchart describing a method of operating an electronic device according to some embodiments of the present disclosure. A method of operating the electronic device will be described with reference to fig. 16. The electronic devices may include a host device and a storage device, for example, host device 1100 and storage device 1200.
In operation S610, the electronic device allocates a security area and a user area. For example, upon request of the host device, some of the physical data blocks of the nonvolatile memory devices in the memory device may be used as secure areas, and other physical data blocks may be used as user areas.
In operation S620, the electronic device performs a secure write operation. For example, the host device may issue a request for a secure write operation. The storage device may encrypt data by using the encryption key, and may store the encrypted data in the secure area.
In operation S630, the electronic device performs a secure read operation. For example, the host device may issue a request for a secure read operation. The storage device may load encrypted data of the secure area, may decrypt the loaded data by using the encryption key, and may provide the decrypted data to the host device.
In operation S640, the electronic device performs security disabling. For example, the host device may issue a request for security disablement. The storage device may disable the security features of the secure area.
In operation S650, the electronic device performs security enablement. For example, the host device may issue a request for security enablement. The storage device may enable a security feature of the secure enclave.
In operation S660, the electronic apparatus performs a first security deletion operation. For example, the first data block of the secure area may include first to fourth data encrypted by using the first encryption key. The host device may issue a request for a first secure delete operation for the first data. The storage device may load second data to fourth data of the first data block, may decrypt the second data to fourth data by using the first encryption key, may re-encrypt the second data to fourth data by using the second encryption key, and may store the re-encrypted second data to fourth data in the second data block of the secure area.
In operation S670, the electronic device performs a second security deletion operation. The SPO event may occur while the second secure erase operation is performed. The electronic device may detect that an SPO event occurred while the second secure erase operation was performed.
For example, the first data block of the secure area may include second data to fourth data encrypted by using the second encryption key. The host device may issue a request for a second secure delete operation for the second data. In this way, the storage device may load the third data of the second data block, may decrypt the third data by using the second encryption key, may re-encrypt the third data by using the third encryption key, and may store the re-encrypted third data in the third data block of the secure area. The SPO event may occur after the third data is processed and before the fourth data is processed. The re-encryption operation of the fourth data may be suspended due to the SPO event.
In operation S680, the electronic apparatus resumes the second security deletion operation. For example, after the electronic device detects that an SPO event occurred during the second secure erase operation, the host device may again supply the power supply voltage to the storage device. The storage device may refer to the log register based on the supplied power supply voltage again, and may check that the processing of the third data is completed and the processing of the fourth data is not completed. The storage device may then load fourth data of the second data block, may decrypt the fourth data by using the second encryption key, may re-encrypt the fourth data by using the third encryption key, and may store the re-encrypted fourth data in the third data block of the secure area. That is, when the secure erase operation resumes, the storage device may decrypt using the old key and may re-encrypt using the new key.
In operation S690, the electronic device releases the secure area. For example, the host device may issue a request to release the secure enclave. The storage device may release the secure enclave. The released security area may be maintained as a space division or may be included in the user area.
According to at least one embodiment of the present disclosure, there is provided a storage device that deletes an encryption key, a method of operating the storage device, and a method of operating an electronic device including the storage device.
In addition, a storage device, a method of operating a storage device, and a method of operating an electronic device including a storage device are provided as follows: the storage device deletes an encryption key to ensure that unmapped data is unrecoverable, selectively uses a secure area or a user area to improve convenience, and ensures validity of a secure delete operation even if a Sudden Power Off (SPO) event occurs.
Although the present disclosure has been described with reference to the embodiments thereof, it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the disclosure as set forth in the following claims.

Claims (20)

1. A method of operating a storage device in communication with a host device, the method comprising:
Distributing a security area and a user area in the storage device;
storing first data encrypted by using a first encryption key in a first data block of the secure area;
decrypting at least one valid data of the first data block using the first encryption key in response to receiving a first request from the host device, wherein the first request indicates a first secure delete operation of the first data and the at least one valid data does not include the first data;
encrypting the decrypted at least one valid data using a second encryption key, wherein the second encryption key is different from the first encryption key;
storing the encrypted at least one valid data in a second data block of the secure area; and
deleting the first encryption key.
2. The method of claim 1, the method further comprising:
in response to receiving a second request from the host device, storing second data in a user data block of the user area, wherein the second request indicates an unsecure write operation of the second data and the second data is not encrypted.
3. The method of claim 1, wherein,
the first data has a chunk size, and
the chunk size corresponds to a size of a logical block address of the host device and is smaller than a unit of a physical erase operation of the storage device.
4. The method of claim 1, wherein assigning the secure area and the user area comprises:
receiving a first command indicating a setting of the secure area;
storing an address range of the secure enclave based on the first command;
creating the first encryption key based on the first command; and
a response is provided to the host device indicating that the setting of the secure enclave is complete.
5. The method of claim 4, wherein,
the first command is a set feature command of a flash nonvolatile memory standard, and
the first command includes a feature identifier indicating a setting of the secure area and the address range.
6. The method of claim 1, wherein,
the first request is triggered by an operating system of the host device, an
The first request includes a pruning command to delete a mapping relationship of the first data in a mapping table of the storage device.
7. The method of claim 1, wherein,
the first request is triggered by an application of the host device, an
The first request includes a second command indicating the first secure delete operation for the first data.
8. The method of claim 7, wherein the second command is a set feature command of a flash nonvolatile memory standard, and
the second command includes a feature identifier indicating the first secure erase operation and an address range corresponding to the secure enclave.
9. The method of claim 1, the method further comprising:
receiving a third request from the host device, the third request indicating a second secure delete operation for third data among the encrypted at least one valid data of the second data block;
detecting a sudden power-off event while performing the second secure erase operation based on the third request; and
in response to a supply voltage being re-supplied from the host device, the second secure erase operation is resumed after the sudden power-off event is detected.
10. The method of claim 9, wherein,
the detection of the sudden power-off event includes: storing a start time point of the second secure erase operation in a log register in response to the third request, and
Recovering the second secure erase operation includes:
in response to re-supplying the power supply voltage, referring to the log register, determining that the abrupt power-off event occurred while the second secure erase operation was performed, and
the second secure erase operation is resumed in response to determining that the abrupt power-off event occurred while the second secure erase operation was performed.
11. The method of claim 9, wherein,
the encrypted at least one valid data of the second data block includes fourth data, and the fourth data is valid data in the second secure delete operation, and
wherein recovering the second secure erase operation comprises:
decrypting the fourth data of the second data block using the second encryption key based on the third request and the re-supply of the supply voltage,
encrypting the fourth data using a third encryption key, wherein the third encryption key is different from the second encryption key,
storing the encrypted fourth data in a third data block of the secure area, and
deleting the second encryption key.
12. The method of claim 1, wherein storing the first data encrypted using the first encryption key comprises:
a fourth request is received from the host device indicating a secure write operation for the first data,
receiving the first data from the host device,
encrypting the received first data using the first encryption key based on the fourth request; and
the encrypted first data is stored in the first data block of the secure area.
13. The method of claim 1, the method further comprising:
loading the encrypted first data of the first data block in response to receiving a fifth request after storing the encrypted first data and before deleting the first encryption key, wherein the fifth request indicates a secure read operation of the first data;
decrypting the loaded encrypted first data using the first encryption key; and
providing the decrypted first data to the host device.
14. The method of claim 1, the method further comprising:
disabling a security feature of the secure enclave based on a sixth request from the host device, the sixth request indicating a security disabling of the secure enclave; and
After disabling the security feature, enabling the security feature of the security area in response to receiving a seventh request, the seventh request indicating security enablement of the security area.
15. The method of claim 1, the method further comprising:
the secure region is released in response to receiving an eighth request from the host device, the eighth request indicating release of the secure region.
16. A method of operating an electronic device comprising a host device and a storage device, the method comprising:
providing, by the host device, a first request for allocation of the storage device;
assigning, by the storage device, a secure area and a user area in response to the first request;
providing, by the host device, a second request for a secure write operation of target data;
storing, by the storage device in response to the second request, first data encrypted by using a first encryption key in a first data block of the secure area;
providing, by the host device, a third request indicating a secure delete operation for the target data;
decrypting, by the storage device, at least one valid data of the first data block using the first encryption key in response to the third request, wherein the at least one valid data does not include the target data;
Encrypting, by the storage device, the decrypted at least one valid data using a second encryption key that is different from the first encryption key;
storing, by the storage device, the encrypted at least one valid data in a second data block of the secure area; and
deleting, by the storage device, the first encryption key.
17. The method of claim 16, wherein the third request is triggered by an application or an operating system of the host device.
18. A storage device, the storage device comprising:
a nonvolatile memory device including a user area and a security area; and
a memory controller configured to communicate with a host device and the non-volatile memory device,
wherein the storage controller is configured to:
storing target data encrypted using a first encryption key in a first data block of the secure area in response to receiving a first request from the host device, wherein the first request indicates a secure write operation;
decrypting at least one valid data of the first data block using the first encryption key in response to receiving a second request from the host device, wherein the second request indicates a secure delete operation of first data and the at least one valid data does not include the first data;
Encrypting the decrypted at least one valid data using a second encryption key, wherein the second encryption key is different from the first encryption key;
storing the encrypted at least one valid data in a second data block of the secure area; and
deleting the first encryption key.
19. The storage device of claim 18, wherein the storage controller comprises:
a buffer memory configured to buffer the target data and the at least one valid data,
a mapping table configured to store a mapping relationship between logical addresses and physical addresses of the target data, an
Processing circuitry configured to process the first request and the second request based on communication with the host device, the buffer memory, and the mapping table.
20. The storage device of claim 19, wherein the processing circuit comprises:
a command manager configured to process the first request and the second request,
an encryption manager configured to: encrypting the target data by using the first encryption key, decrypting the at least one valid data by using the first encryption key, and encrypting the decrypted at least one valid data by using the second encryption key under the control of the command manager;
A key manager configured to: providing the first encryption key and the second encryption key to the encryption manager under control of the command manager; and
a log register configured to: a log of the secure delete operation of the second request is stored under control of the command manager.
CN202311109479.8A 2022-09-14 2023-08-30 Storage device, method of operating the same, and method of operating electronic device including the same Pending CN117708900A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR10-2022-0115876 2022-09-14
KR10-2023-0030721 2023-03-08
KR1020230030721A KR20240037139A (en) 2022-09-14 2023-03-08 Storage device deleting encryption key, method of operating the same, and method of operating electronic device having the same

Publications (1)

Publication Number Publication Date
CN117708900A true CN117708900A (en) 2024-03-15

Family

ID=90144949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311109479.8A Pending CN117708900A (en) 2022-09-14 2023-08-30 Storage device, method of operating the same, and method of operating electronic device including the same

Country Status (1)

Country Link
CN (1) CN117708900A (en)

Similar Documents

Publication Publication Date Title
EP2249280B1 (en) Information processor and method for controlling the same
US8190917B2 (en) System and method for securely saving and restoring a context of a secure program loader
KR101081118B1 (en) System and method for securely restoring a program context from a shared memory
KR101054981B1 (en) Computer-implemented methods, information processing systems, and computer-readable recording media for securely storing the context of a program
US20100058066A1 (en) Method and system for protecting data
US20180260151A1 (en) Data Storage Device and Operating Method Therefor
US11329815B2 (en) Key management device and processor chip for data encryption/decryption
US8898807B2 (en) Data protecting method, mobile communication device, and memory storage device
CN115904219A (en) Electronic device
CN112020843A (en) Temporary area in non-volatile memory device
US11468159B2 (en) Memory system
JP2014206967A (en) Storage device
US11644983B2 (en) Storage device having encryption
EP4339790A1 (en) Storage device deleting encryption key, method of operating the same, and method of operating electronic device including the same
CN117708900A (en) Storage device, method of operating the same, and method of operating electronic device including the same
US20240086336A1 (en) Storage device deleting encryption key, method of operating the same, and method of operating electronic device including the same
TWI775284B (en) Memory system, its control method and information processing system
US11368302B2 (en) Key management device and processor chip having bypass channels
KR20240037139A (en) Storage device deleting encryption key, method of operating the same, and method of operating electronic device having the same
JP2000250818A (en) Storage system, storage device and stored data protecting method
CN118282630A (en) Key management device, processor chip and method for avoiding use of incomplete key
KR20230102145A (en) Electric device and method for emulating non-volatile memory
JP2012216201A (en) Information processor and data protection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication