Data storage device performing in-storage processing and operation method thereof

The data storage device with encryption and secure memory access mechanisms addresses vulnerabilities in conventional devices, preventing malicious attacks and ensuring secure data transmission and storage.

KR103047178B1Active Publication Date: 2026-11-10SK HYNIX INC +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
KR1020210170495
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-04-28
Filing Date
2021-12-02
Publication Date
2026-11-10
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

Conventional data storage devices lack security features, making them vulnerable to malicious code attacks and data theft, particularly in scenarios where multiple applications are installed on a single device, and flash-based devices are susceptible to attacks on the Flash Translation Layer (FTL) that disrupt system operations.

Method used

A data storage device incorporating a non-volatile memory device, volatile memory device, data encryption and decryption circuits, and a processor that manages secure in-storage processing through controlled installation of programs, encrypted data transmission, and secure memory access to prevent malicious attacks and data leakage.

Benefits of technology

The solution effectively prevents attacks from malicious code, protects mapping tables and user data, and ensures secure data transmission by encrypting data during processing, thereby enhancing security performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 112021139654342-PAT00001_ABST
    Figure 112021139654342-PAT00001_ABST
Patent Text Reader

Abstract

A data storage device according to the present technology includes a non-volatile memory device, a volatile memory device, a data encryption circuit that encrypts data output from the non-volatile memory device, a data decryption circuit that decrypts data encrypted by the data encryption circuit and provides it to the volatile memory device, a first process that controls the installation of a first in-storage program, a second process that manages a mapping table between a logical address and a physical address of the non-volatile memory device, and a processor that processes a third process that performs the execution of the first in-storage program.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present technology relates to a data storage device that performs in-storage processing, and more specifically, to a data storage device that performs in-storage processing with enhanced security performance and a method of operation thereof. Background Technology

[0002] A conventional data storage device performing in-storage processing stores application code provided from a host inside the data storage device, and the application code accesses the internal storage space to perform processing within the storage.

[0003] However, conventional data storage devices lack security features, so security threats may arise if malicious code is included in an application.

[0004] For example, if multiple applications are installed on a single data storage device, malicious code contained in one application can attack other applications.

[0005] In addition, there is a risk of directly stealing user data through physical hacking techniques, and in the case of flash-based data storage devices, the Flash Translation Layer (FTL) that performs garbage collection or wear leveling can be attacked to disrupt the operation of the system.

[0006] Accordingly, there is a need for a data storage device and an operation method that eliminate security threats and safely perform in-storage processing. Prior art literature

[0007] US 2015 / 0324132 A1 US 2011 / 0208898 A1(Patent Document 0003) KR 10-2017-0033891 A The problem to be solved

[0008] The present technology provides a data storage device that performs in-storage processing with enhanced security performance and a method of operation thereof. means of solving the problem

[0009] A data storage device according to one embodiment of the present invention includes a non-volatile memory device, a volatile memory device, a data encryption circuit that encrypts data output from the non-volatile memory device, a data decryption circuit that decrypts data encrypted by the data encryption circuit and provides it to the volatile memory device, a first process that controls the installation of a first in-storage program, a second process that manages a mapping table between a logical address and a physical address of the non-volatile memory device, and a processor that processes a third process that performs the execution of the first in-storage program.

[0010] A method of operation of a data storage device according to an embodiment of the present invention comprises a flash chip, a DRAM chip, a data encryption circuit, an internal bus, a processor, and a data decryption circuit, and a method of operation of a data storage device communicating with a host device, the method comprising: a step of executing an in-storage program stored in the data storage device, wherein the in-storage program has source data in the flash chip; a step of causing source data to be stored in the DRAM chip when the in-storage program is executed, and when source data stored in the flash chip is moved to the DRAM chip, generating encrypted data corresponding to source data by the data encryption circuit; a step of transmitting the encrypted data from the data encryption circuit to the data decryption circuit through the internal bus; a step of decrypting source data from the encrypted data in the data decryption circuit; and a step of storing source data in the DRAM chip.

[0011] A method of operation of a data storage device according to an embodiment of the present invention comprises a flash chip, a DRAM chip, a data encryption circuit, an internal bus, a processor, and a data decryption circuit, and is a method of operation of a data storage device communicating with a host device, comprising: a step of executing a first in-storage program stored in the data storage device, wherein the first in-storage program has source data in a non-volatile memory chip; a step of executing a second in-storage program stored in the data storage device, wherein the second in-storage program has source data in a non-volatile memory chip; a step of providing a first partition in a volatile memory chip and storing first association information that associates the first in-storage program with the first partition; a step of providing a second partition in a volatile memory chip and storing second association information that associates the second in-storage program with the second partition; and a step of, based on the first association information, causing the first in-storage program to exchange data between the first partition and the non-volatile memory chip through an internal bus and preventing the second in-storage program from accessing the first partition. and based on the second association information, the method includes the step of allowing the second in-storage program to exchange data between the second partition and the non-volatile memory chip via an internal bus, and preventing the first in-storage program from accessing the second partition. Effects of the invention

[0012] A data storage device based on the present technology can prevent other application code from being attacked by malicious code that may be included in the application code.

[0013] A data storage device based on the present technology can prevent damage to mapping tables or user data inside the data storage device caused by malicious code that may be included in application code.

[0014] A data storage device based on this technology can prevent the leakage of original data through data encryption. Brief explanation of the drawing

[0015] FIG. 1 is a block diagram showing a data storage device according to an embodiment of the present invention. FIG. 2 is a block diagram illustrating the function of a host connected to a data storage device according to an embodiment of the present invention. FIG. 3 is a block diagram illustrating the function of a data storage device according to an embodiment of the present invention. FIG. 4 is a diagram illustrating the types of permissions in a data storage device according to an embodiment of the present invention. FIG. 5 is a block diagram illustrating a method of operation according to authority in a data storage device according to an embodiment of the present invention. FIG. 6 is a table showing the structure of a mapping table according to an embodiment of the present invention. FIG. 7 is a block diagram showing a data encryption circuit and a data decryption circuit according to an embodiment of the present invention. FIG. 8 is a block diagram showing the structure of an initialization vector generation circuit according to one embodiment of the present invention. FIG. 9 is a block diagram showing a memory security circuit according to an embodiment of the present invention. FIG. 10 is a block diagram illustrating a verification data structure according to an embodiment of the present invention. FIG. 11 is an explanatory diagram illustrating the operation of a data storage device according to an embodiment of the present invention. Specific details for implementing the invention

[0016] Embodiments of the present invention are disclosed below with reference to the attached drawings.

[0017] FIG. 1 is a block diagram showing a data storage device (100) according to one embodiment of the present invention.

[0018] The data storage device (100) can read or write data at the request of the host (200). The host (200) may be any of a server, a mobile device, a laptop computer, or a general-purpose computing device including a processor and memory, etc.

[0019] The data storage device (100) can install one or more in-storage programs provided by the host (200) and can perform in-storage processing according to the installed in-storage programs.

[0020] In the following, a data storage device (100) is disclosed using an SSD (Solid State Drive) including flash memory as an example, but is not necessarily limited thereto.

[0021] In this embodiment, the data storage device (100) includes a control circuit (1), a flash chip (2), a DRAM chip (3), and an interface (4). At this time, the number of the flash chip (2) and the DRAM chip (3) is not limited to one, but may be two or more.

[0022] A flash chip (2) is an example of a non-volatile memory device, and a DRAM chip (3) is an example of a volatile memory device.

[0023] The host (200) provides signals such as commands, addresses, and data to the data storage device (100) through the interface (4).

[0024] The host (200) can provide the data storage device (100) with commands such as installing an in-storage program, executing an in-storage program, and deleting an in-storage program, in addition to general data read / write commands.

[0025] The control circuit (1) controls the overall operation of the data storage device (100) and can be implemented through hardware, software, or a combination of hardware and software.

[0026] The control circuit (1) includes a processor (110), a flash controller (120), a DRAM controller (140), and an internal bus (160).

[0027] The control circuit (1) may further include a data encryption circuit (130) that encrypts data output from the flash chip (2), and a data decryption circuit (150) that decrypts the encrypted data and provides it to the DRAM chip (3).

[0028] The control circuit (1) may further include a cache memory (170) connected to the processor (110) to cache data of the DRAM chip (3).

[0029] The control circuit (1) may further include a memory security circuit (180) that manages the security of data used during the operation of the processor (110).

[0030] In this embodiment, the processor (110) can control various operations of the control circuit (1) according to the firmware.

[0031] The firmware may be stored in a ROM or other storage device inside or outside the processor (110). Since the technique of storing the firmware in a storage device outside or inside the processor (110) is well known, a specific description is omitted.

[0032] Generally, the processor (110) includes a Memory Management Unit (MMU) and a Translation Lookaside Buffer (TLB) inside it.

[0033] In this embodiment, the processor (110) can perform operations to convert a virtual address to a physical address and control memory access rights through a memory management unit, and can temporarily store information used for the operation of the memory management unit through an address translation buffer.

[0034] In this embodiment, if an unauthorized memory area is accessed while the in-storage program is operating, the memory management unit may generate a fault signal by referring to the storage security library (311), thereby blocking the memory access operation of the in-storage program.

[0035] The flash controller (120) is connected to the flash chip (2) through a channel and stores data in the flash chip (2) or reads data from the flash chip (2) according to commands provided by the processor (110). In the following, the flash controller (120) may be referred to as the first controller (120).

[0036] The DRAM chip (3) can store an in-storage program provided by the host (200), metadata corresponding to the in-storage program, data used by the in-storage program, a mapping table (510), data provided by the flash chip (2), etc. in a fixed space.

[0037] The DRAM controller (140) controls the operation of reading data from the DRAM chip (3) or writing data to the DRAM chip (3). In the following, the DRAM controller (140) may be referred to as the second controller (140).

[0038] The data encryption circuit (130) can encrypt data output from the flash chip (2).

[0039] The data decryption circuit (150) can decrypt data provided to the DRAM chip (2). For example, data provided after being encrypted by the data encryption circuit (130) can be decrypted by the data decryption circuit (150) and provided to the DRAM chip (2).

[0040] The data encryption circuit (130) and the data decryption circuit (150) improve the security performance of the data storage device (100) by encrypting and decrypting data during the process in which data output from the flash chip (2) is input into the DRAM chip (3).

[0041] The internal bus (160) transmits signals such as commands, addresses, and data between the processor (110), the data encryption circuit (130), the data decryption circuit (150), the memory security circuit (180), and the interface (4).

[0042] The memory security circuit (180) controls the encryption operation and data verification operation of data stored in the DRAM chip (3) to prevent the leakage of data associated with the execution of the in-storage program.

[0043] FIG. 2 is a block diagram showing the function of a host (200) using a data storage device (100) according to one embodiment of the present invention.

[0044] The host (200) may have the form of, for example, a computer device driven by an operating system. Since this structure is common, a specific description is omitted.

[0045] The host (200) may include an application (210), a host security library (220), and an interface driver (230).

[0046] The host security library (220) may be referred to as the host security library (220) and may be implemented in hardware, software, or a combination thereof.

[0047] The application (210) can control operations such as providing a simple read or write request to the data storage device (100) or installing an in-storage program inside the data storage device (100).

[0048] More specifically, the application (210) can install an in-storage program inside the data storage device (100) and receive the execution result of the in-storage program.

[0049] The host security library (220) provides an API related to controlling operations such as installing an in-storage program on a data storage device (100) and receiving results.

[0050] The application (210) can execute various operations related to the in-storage program using APIs provided by the host security library (220).

[0051] The following Table 1 shows the APIs supported by the host security library (220).

[0052] APIs provided by the host security library explanation OffloadCode(char* bin, uint* lpa, void* args, uint tid) Install the in-storage program corresponding to the specified ID (tid) on the data storage device. GetResult(uint tid, uint64_t* res) Retrieves the execution result of the in-storage program corresponding to the specified ID.

[0053] The host security library (220) can operate together with the storage security library (311) of the data storage device (100) described below to support in-storage processing operations.

[0054] The interface driver (230) is an interface-related driver between the data storage device (100) and the host (200) and can control interface operations according to, for example, the NVMe (Non-Volatile Memory Express) standard.

[0055] FIG. 3 is a block diagram showing the function of a data storage device (100) according to one embodiment of the present invention.

[0056] Each block of FIG. 3 may be implemented as software included in firmware running on a processor (110), but is not limited thereto, and may be implemented as hardware or a combination of software and hardware.

[0057] The data storage device (100) includes a storage security library (311), an FTL (312), and one or more in-storage programs (321 to 323).

[0058] The storage security library (311) manages in-storage programs and in-storage processing operations together with the host security library (220).

[0059] When the function of the storage security library (311) is called and executed by the processor (110), it may be referred to as the first process.

[0060] FTL (312) performs operations using the flash chip, such as read / write operations, garbage collection, wear leveling, and mapping table management. Since these operations are well known, a detailed description thereof is omitted.

[0061] When the function of FTL (312) is called and executed by the processor (110), it can be referred to as a second process.

[0062] In this embodiment, the storage security library (311) is a software library that supports security-related in-storage processing within the data storage device (100), but is not limited to this form.

[0063] In this embodiment, the storage security library (311) supports in-storage processing by providing APIs such as those shown in Table 2 below.

[0064] API of the Storage Security Library explanation CreateEnclave (void* config, id_t &eid, enclave_t* enclave) Initializes the enclave and installs the code of the specified in-storage program into the enclave. SetIDBits (const id_t &eid, uint64_t* lpns) Set the ID bit in the entry of the corresponding address in the mapping table. TerminateEnclave (enclave_t* enclave) Terminates the specified enclave and reclaims resources. ThrowOutEnclave(enclave_t* enclave, STEE_MSG* sm) Stops Enclase execution and throws an exception ReadMappingEntry (id_t &eid, uint64_t* lpa, uint64_t* ppa) Request the physical address corresponding to the FTL.

[0065] The storage security library (311) can store program code by installing an in-storage program or allocating a memory space (enclave) that the in-storage program can use.

[0066] The storage security library (311) can display the ID of an in-storage program corresponding to an entry in the mapping table (510), and can store the ID of the program in the corresponding entry in the mapping table (510) as disclosed below with reference to FIG. 5.

[0067] The storage security library (311) can control the operation of initializing in-storage programs within the data storage device (100) and manage the metadata of each in-storage program.

[0068] For example, information such as codes or communication keys for identifying the in-storage program may be included in the metadata of the in-storage program.

[0069] If malicious code included in the InStorage program alters the InStorage program's metadata, there is a risk that normal operation will not be performed.

[0070] In this embodiment, security performance can be improved by blocking the in-storage program from accessing the memory area used by the storage security library (311) and changing the metadata of the in-storage program.

[0071] In this embodiment, security performance can be improved by preventing an in-storage program from invading the memory area of ​​another in-storage program without legitimate authority.

[0072] As illustrated in FIG. 5, in this embodiment, the storage security library (311) and FTL (312) have security rights over the memory area, and the in-storage programs (321 to 323) have general rights over the memory area. Each configuration has different access rights to the memory space depending on the rights.

[0073] In this embodiment, the memory space includes a security area (400), a protection area (500), and a general area (600).

[0074] At this time, the memory space can correspond to the memory space of the DRAM chip (2) of the data storage device (100) as a memory space where the storage security library (311), FTL (312), and multiple in-storage programs are loaded or accessed and used.

[0075] Figure 4 shows access rights to memory areas according to the rights held by a component or process.

[0076] For a component (process) with general permissions, such as an in-storage program, read and write operations are possible for the general area (600), only read operations are possible for the protected area (500), and read and write operations are not possible for the secure area (400).

[0077] In the case of a configuration with security permissions such as a storage security library (311) and FTL (312), read and write operations are possible for the general area (400), the protected area (500), and the general area (600).

[0078] FIG. 5 is an explanatory diagram illustrating the operation of a data storage device (100) according to one embodiment of the present invention.

[0079] According to one embodiment of the present invention, the physical address area, i.e., the memory space, of the DRAM chip (2) includes a security area (400), a protection area (500), and a general area (600).

[0080] Metadata (410, 420) corresponding to the in-storage program (321, 322) is stored in the security area (400).

[0081] Metadata (410, 420) includes an identification number (ID) of an in-storage program (321, 322), an address where the in-storage program (321, 322) is stored, a communication key used by the in-storage program (321, 322) for communication, etc.

[0082] The metadata (410, 420) of the in-storage program (321, 322) can be managed by the storage security library (311).

[0083] In Fig. 5, solid arrows indicate that reading and writing operations are possible, and dotted arrows indicate that only reading operations are possible.

[0084] A mapping table (510) is stored in the protection area (500).

[0085] The mapping table (510) is a structure that manages the relationship between the logical address and the physical address of the flash chip (2) and can be managed by the FTL (312).

[0086] In the embodiment illustrated in FIG. 5, the in-storage program (321, 322) can access data of the flash chip (2), but if the mapping table (510) is stored in a secure area, the in-storage program (321, 322) may be blocked from directly accessing the mapping table (510).

[0087] At this time, the process for executing the in-storage program (321) may be referred to as the third process, and the process for executing the in-storage program (322) may be referred to as the fourth process.

[0088] In this case, the in-storage program (321, 322) must obtain a physical address through the FTL (312) and then access the memory space, but in this case, the processing time increases, and the performance of the in-storage program (321, 322) may be significantly limited.

[0089] In this embodiment, the mapping table (510) is stored in the protection area (500), and the in-storage program (321, 322) is allowed to access the protection area (500) in a read-only manner, thereby preventing performance degradation of the in-storage program (321, 322).

[0090] However, since the in-storage program (321, 322) with general authority cannot perform write operations on the protected area (500), it is possible to prevent the data of the mapping table (510) from being damaged by the in-storage program (321, 322).

[0091] The in-storage program (321, 322) cannot access the secure area (400) and cannot perform read operations.

[0092] The general area (600) includes a plurality of enclaves (610, 620). An enclave corresponds to a memory space where code of an instorage program is installed or used during the execution of an instorage program. For example, program code, call stack data, heap data, etc., can be stored in an enclave.

[0093] In the following, the enclave (610) may be referred to as the first enclave and the enclave (620) as the second enclave.

[0094] In the present invention, the in-storage program (321, 322) is able to access the general area (600), but not all enclaves (610, 620), and is only able to access the corresponding enclaves (610, 620).

[0095] This eliminates the risk of one InStorage program accessing the enclave corresponding to another InStorage program and corrupting data.

[0096] In the memory space of the DRAM, if an in-storage program accesses an enclave assigned to another in-storage program, the memory management unit may refer to the storage security library (311) to cause a failure.

[0097] For example, if a third process regarding an in-storage program (221) accesses the second enclave (620) or a fourth process regarding an in-storage program (222) accesses the first enclave (610), the memory management unit may cause a failure and, accordingly, the operation of the in-storage program itself may be blocked.

[0098] A mapping table (510) can be used to block an in-storage program from accessing the storage space of a flash chip (2) that is being used by another in-storage program.

[0099] FIG. 6 shows the data structure of a mapping table (510) according to one embodiment of the present invention.

[0100] The mapping table (510) generally includes a logical address field and a physical address field.

[0101] In this embodiment, the identification number of the in-storage program is stored in the ID field, including the ID field.

[0102] For example, the storage security library (311) can use the SetIDBits API of Table 2 to store the identification number of the in-storage program in the ID field of the mapping table (510).

[0103] For example, when In Storage Program No. 1 (321) accesses the mapping table (510) using a logical address, if the entry corresponding to the corresponding logical address corresponds to In Storage Program No. 2 (322), the mapping table (510) may display an error and, accordingly, not provide the physical address corresponding to the logical address.

[0104] This allows you to prevent one InStorage program from accessing the physical pages corresponding to another InStorage program.

[0105] FIG. 7 is a block diagram showing a data encryption circuit (130) and a data decryption circuit (150) according to one embodiment of the present invention.

[0106] The data encryption circuit (130) encrypts the data output from the flash chip (2), and the data decryption circuit (150) decrypts the encrypted data and provides it to the DRAM chip (3).

[0107] Accordingly, the internal bus (160) can prevent the leakage of original data by ensuring that encrypted data, rather than original data, is transmitted.

[0108] In this embodiment, stream-based encryption technology is used instead of block-based encryption technology. Nevertheless, the present invention does not exclude block-based encryption technology, and it is obvious that a person skilled in the art can extend the embodiment to block-based technology by referring to the disclosure of the present invention and already known block-based encryption technology.

[0109] Depending on the implementation method, stream-based encryption technology has the following advantages over existing block-based encryption technology.

[0110] First, stream-based encryption technology is not affected by the input / output bandwidth of the data flash chip (2). In contrast, block-based encryption technology generally has the same size as the block, so there is a problem that it requires a complex circuit configuration, such as adopting a pipeline structure, to achieve maximum throughput.

[0111] Second, stream-based encryption technology can be parallelized with the operation of reading pages from the flash chip (2), which has the effect of hiding the time required for the encryption operation. In contrast, block-based encryption technology cannot perform the encryption operation until one block of data is output, so there is a problem in that the overhead caused by the encryption operation cannot be hidden.

[0112] Third, stream-based encryption technology can efficiently generate pseudo-random numbers by accessing large amounts of data for in-storage programs. In contrast, block-based encryption technology suffers from frequent delays between data access and encryption due to data buffering.

[0113] The data encryption circuit (130) includes an initialization vector generation circuit (131), a stream encryption circuit (132), and an operation circuit (134).

[0114] The initialization vector (IV) generation circuit (131) generates an initialization vector (IV) that varies depending on the page to be encrypted.

[0115] As illustrated in FIG. 8, the initialization vector generation circuit (131) generates a key vector (IVO) using a pseudo-random number generation circuit (PRNG, 1311) and a shifter (1312).

[0116] The initialization vector generation circuit (131) can generate an initialization vector (IV) using a key vector (IV0) and a physical page address (PPA).

[0117] To this end, the logic operation circuit (1313) can perform an OR operation on the key vector (IV0) and the physical page address (PPA).

[0118] For example, if the key vector (IV0) is 48 bits and the physical page address (PPA) is 32 bits, the initialization vector (IV) is a total of 80 bits of data, with the upper 48 bits corresponding to the key vector (IV0) and the lower 32 bits corresponding to the physical page address (PPA).

[0119] Accordingly, different initialization vectors can be generated depending on the page to be encrypted.

[0120] The shifter (1312) can serve as a register that stores the key vector (IV0) after it is completed.

[0121] Returning to Fig. 7, the initialization vector (IV) is shared with the data decoding circuit (150) via the internal bus (160).

[0122] The stream encryption circuit (132) receives an initialization vector (IV) and generates a key stream.

[0123] For example, the stream encryption circuit (132) can generate 64 key streams per encryption cycle.

[0124] Since the stream encryption technology itself is well known, a detailed description of the specific encryption operation of the stream encryption circuit (132) that generates a key stream according to the initialization vector (IV) is omitted.

[0125] The stream buffer (133) buffers the key stream generated by the stream encryption circuit (132).

[0126] The operation circuit (134) generates ciphertext, i.e., encrypted data, by performing an XOR operation on plaintext data, i.e., original data, provided through the flash controller (120) and the key stream provided from the stream buffer (133).

[0127] At this time, the data encryption circuit (130) can buffer plaintext data output from the flash controller (120) in page units and provide it to the operation circuit (134).

[0128] Accordingly, ciphertext can be generated on a page-by-page basis using different initialization vectors (IVs).

[0129] The ciphertext and initialization vector are provided to the data decryption circuit (150) via the internal bus.

[0130] The data decryption circuit (150) has a configuration similar to the data encryption circuit (130), except for the initialization vector generation circuit (131), and performs the decryption operation by performing the operation of the data encryption circuit (130) in reverse.

[0131] That is, the data decoding circuit (150) includes an operation circuit (151), a stream buffer (152), and a stream encryption circuit (153).

[0132] The stream encryption circuit (153) receives an initialization vector (IV) from the internal bus (160) and generates a key stream.

[0133] For example, the stream encryption circuit (153) can generate 64 key streams per encryption cycle.

[0134] The stream buffer (152) buffers the key stream generated by the stream encryption circuit (153).

[0135] The operation circuit (151) generates plaintext source data by performing an XOR operation on the ciphertext provided through the internal bus (160) and the key stream provided in the stream buffer (152).

[0136] The DRAM controller (140) stores the original data in the DRAM chip (3).

[0137] In this way, while data is being transmitted from the flash chip (2) to the DRAM chip (3), encrypted data rather than the original data is transmitted, thereby improving security performance.

[0138] Unlike the above case, even when the processor (110) executes the in-storage program, user data including source data, intermediate data and result data may be leaked during the execution of the in-storage program.

[0139] In this embodiment, memory encryption and verification operations are performed using a memory security circuit (180) to block such security risks.

[0140] First, the memory encryption operation of the memory security circuit (180) is disclosed.

[0141] FIG. 9 is a block diagram showing a memory security circuit (180) according to one embodiment of the present invention.

[0142] In this embodiment, the memory security circuit (180) encrypts and stores the data when the data of the cache memory (170) is evicted to the DRAM chip (3), that is, when writing back. This allows for minimizing performance degradation caused by data encryption.

[0143] In the following, it is assumed that the cache line of the cache memory (170) contains a 64-bit data block and that data is encrypted in units of data blocks. In other embodiments, data blocks of different sizes may be used.

[0144] In this embodiment, the data block is encrypted by performing an XOR operation between the data block and a one-time password (OTP).

[0145] To ensure temporal uniqueness, a temporary password can be generated by encrypting a counter value that increases during a writeback operation using encryption technology such as AES.

[0146] In this embodiment, a counter block (181) is included to generate a counter value.

[0147] The counter block (181) includes an upper counter (1811) and a lower counter (1812).

[0148] In this embodiment, the lower counter includes M 3-bit counters, each 3-bit counter corresponding to a separate data block. In other embodiments, the number of bits of the lower counter can be adjusted.

[0149] Assuming that one data block is included in one cache line, one counter block (181) corresponds to every M cache lines.

[0150] M cache lines can be referred to as a single cache block, and a memory area corresponding to M data blocks can be referred to as a single memory block.

[0151] Depending on the embodiment, the counter block (181) may be included in the cache memory (170) or in the memory security circuit (180), but FIG. 9 illustrates an example in which the counter block (181) is included in the memory security circuit (180).

[0152] The memory security circuit (180) includes a key generation circuit (182) that generates a key by encrypting the value of the upper counter (1811) and an encryption circuit (183) that performs encryption on the key value (key) and the data block. In this embodiment, the encryption circuit (183) can perform an XOR operation.

[0153] The encrypted data output from the encryption circuit (183) is stored in the DRAM chip (3) to improve the security of user data used during the execution of the in-storage program.

[0154] If an overflow occurs in any one of the M 3-bit counters included in the lower counter (1812), the value of the upper counter (1811) increases and the lower counter (1812), that is, all M 3-bit counters, are initialized.

[0155] In this embodiment, a new key is created when the value of the upper counter (1811) increases.

[0156] In this case, if data encrypted using an existing key is stored in a DRAM chip, it can be recovered by performing an XOR operation with the existing key, then encrypted with a new key and stored again.

[0157] Below, data verification operations performed by the memory security circuit (180) are disclosed.

[0158] The memory security circuit (180) includes a verification management circuit (184).

[0159] The verification management circuit (184) verifies whether the data output from the DRAM chip (3) is the same as the data that the processor (110) wrote to the DRAM chip (3).

[0160] The verification management circuit (184) can be implemented by applying data structures such as the conventionally known Merkel Tree and Bonsai Merkle Tree (BMT).

[0161] In this embodiment, the verification management circuit (184) manages a verification data structure in the form of a tree as shown in FIG. 10. In other embodiments, a data structure other than a tree structure may be used.

[0162] When writing data back to the DRAM chip (3), the verification management circuit (184) updates the verification data structure.

[0163] In this embodiment, a Message Validation Code (MAC) is generated by hashing the data and the counter value used to encrypt the data.

[0164] Data verification can be performed by hashing the encrypted data output when reading data from the DRAM chip (3) and the counter value used to encrypt it to generate a message verification code, and then comparing it with the stored message verification code.

[0165] In this embodiment, the counter value associated with the encrypted data is stored in the DRAM chip (3) together with the encrypted data. Accordingly, the counter value used to encrypt the output encrypted data can be read from the DRAM chip (3).

[0166] The verification management circuit (184) manages message verification codes in a hierarchical structure such as a tree.

[0167] For example, when a second or subsequent writeback operation occurs for a single data block or a re-encryption operation occurs due to a key value update, a new message verification code (e.g., MAC #N-1) is generated by hashing the result of hashing the new data block (e.g., data #N-1) and the upper counter value to be used to encrypt it (e.g., counter value #N-0), and the result of hashing the existing data block and the counter value used to encrypt it together—that is, hashing the existing message verification code (e.g., MAC #N-0).

[0168] Subsequently, the aforementioned process is repeated to generate message validation codes, and accordingly, message validation codes (MACs) corresponding to a single data block can be managed in a tree-like form. This can be referred to as a validation data structure.

[0169] In Figure 10, the message validation code corresponding to the newly updated data block corresponds to the parent node in the tree structure, and the message validation code generated before corresponds to the child node.

[0170] By utilizing this verification data structure, the integrity of the data corresponding to the child node can be verified using the parent node's message verification code.

[0171] FIG. 11 illustrates a verification data structure corresponding to one data block, but the verification management circuit (184) can manage the verification data structure in a similar way for all data blocks.

[0172] Furthermore, it would be possible to generate a single integrated verification data structure for the entire data block by applying existing known data structures such as BMT. Since this allows for free design modifications by a person skilled in the art by referencing conventional data structures, a detailed explanation is omitted.

[0173] FIG. 11 is a diagram illustrating the overall operation of a data storage device according to an embodiment of the present invention.

[0174] The operation is described below with reference to the APIs disclosed in Tables 1 and 2 above.

[0175] First, the application (210) of the host (200) calls the OffloadCode API of the host security library (220) (S1).

[0176] The parameter bin corresponds to the code that precompiled the in-storage program (321), and lpa represents a list of logical page addresses of data that the in-storage program will use.

[0177] tid is an index used to identify an in-storage program (321) on a host (200).

[0178] In response to the call of the OffloadCode API, the CreateEnclave API of the storage security library (311) of the data storage device (100) is called (S2).

[0179] Through this, metadata (410) corresponding to the in-storage program (321) is also stored in the security area (400), and an enclave (610) corresponding to the in-storage program (321) is allocated in the general area (600).

[0180] At this time, the SetIDBits API of the storage security library (311) is called.

[0181] Through this, the in-storage program (321) of the mapping table (510) refers to the logical address of the data used and sets the information corresponding to the ID field of the corresponding entry.

[0182] In this embodiment, the in-storage program (321) can access the mapping table (510) to directly obtain the physical page address corresponding to the logical page address (S3).

[0183] If the mapping table (510) of the DRAM chip (3) caches only some entries of the entire mapping table, the entry corresponding to the logical address desired by the in-storage program (321) may not exist in the mapping table (510).

[0184] In this case, the instorage program (321) associated with the enclave (610) can request address translation from the FTL (312).

[0185] To do this, the ReadMappingEntry API supported by the storage security library (311) can be called.

[0186] In response to this, the FTL (312) controls the flash control circuit (120) to read the corresponding physical page address corresponding to the requested logical page address and updates the information in the mapping table (510).

[0187] Page data is stored in an enclave (610) through a data encryption circuit (130) and a data decryption circuit (150).

[0188] At this time, the data encryption and decryption process is as disclosed in Fig. 7.

[0189] After the in-storage program (321) is installed in the enclave (610), the storage security library (310) calls the in-storage program (321).

[0190] Subsequently, the storage security library (311) monitors the status of the in-storage program (321) and monitors the permissions for the memory area and mapping table as described above.

[0191] If a fault occurs during the monitoring process, such as an access error as described above, an exception can be thrown via the ThrowOutEnclave API and access can be blocked.

[0192] The storage security library (311) stores the execution result in metadata (410) when the execution of the in-storage program (321) is terminated.

[0193] When the GetResult API of the host security library (220) is called, the storage security library (311) delivers the execution result to the host (200) (S7).

[0194] Afterward, the storage security library (311) calls the TerminateEnclave API to release the resource allocation related to the enclave (610).

[0195] The scope of the present invention is not limited to the disclosure above. The scope of the present invention should be interpreted based on the scope literally described in the claims and their equivalents. Explanation of the symbols

[0196] 100: Data storage device 1: Control circuit 2: Flash chip 3: DRAM chip 4: Interface 110: Processor 120: Flash controller 130: Data encryption circuit 140: DRAM controller 150: Data decoding circuit 160: Internal bus 170: Cache memory 200: Host

Claims

Claim 1 A data storage device comprising: a non-volatile memory device; a volatile memory device; a data encryption circuit that encrypts data output from the non-volatile memory device to generate encrypted data; a data decryption circuit that decrypts the encrypted data provided from the data encryption circuit to generate original data and provides the original data to the volatile memory device; and a processor that processes a first process for controlling the installation of a first in-storage program, a second process for managing a mapping table between a logical address and a physical address of the non-volatile memory device, and a third process for executing the first in-storage program. Claim 2 The data storage device of claim 1, wherein the volatile memory device comprises a secure area for storing metadata of the first in-storage program, a protected area for storing the mapping table, and a general area including a first enclave allocated to the first in-storage program. Claim 3 A data storage device according to claim 2, wherein the first process controls the third process to prevent the third process from performing a write operation to the protected area according to an authority corresponding to the third process. Claim 4 A data storage device according to claim 2, wherein the first process controls the installation of a second in-storage program, the general area further includes a second enclave allocated to the second in-storage program, and the processor further performs a fourth process for executing the second in-storage program, wherein the first process blocks the third process from accessing the second enclave. Claim 5 A data storage device according to claim 4, wherein the mapping table comprises a logical address field, a physical address field corresponding to the logical address field, and an ID field corresponding to the logical address field, wherein the ID field stores identification information that distinguishes the first in-storage program or the second in-storage program. Claim 6 In claim 5, the second process is a data storage device that provides mapping information by referring to the ID field when the third process reads the mapping table. Claim 7 The data storage device according to claim 1, wherein the data encryption circuit comprises: an initialization vector generation circuit that generates an initialization vector by referencing the physical address of data output from the non-volatile memory device; a stream encryption circuit that generates an encrypted stream using the initialization vector; and an operation circuit that generates the encrypted data using the data and the encrypted stream. Claim 8 A data storage device according to claim 7, further comprising a stream buffer for buffering the encrypted stream. Claim 9 A data storage device according to claim 7, wherein the initialization vector generation circuit comprises a pseudo-random number generator that generates a key vector and a logic circuit that performs an operation between the key vector and the physical address to output the initialization vector. Claim 10 A data storage device according to claim 1, wherein the data decryption circuit comprises: a stream encryption circuit that generates an encrypted stream using an initialization vector; and an operation circuit that generates the original data using the encrypted data and the encrypted stream. Claim 11 A data storage device according to claim 2, further comprising: a cache memory for caching data of the first enclave; and a memory security circuit for encrypting data when performing a write-back operation to the first enclave from the data of the cache memory. Claim 12 A data storage device according to claim 11, wherein the memory security circuit comprises: a key generation circuit that generates a key value from a counter value generated according to the write-back operation; and an encryption circuit that generates an encrypted data block using a data block of the cache memory and the key value. Claim 13 The data storage device of claim 12 further comprises a counter block including an upper counter and a lower counter, wherein the lower counter increases according to the write-back operation and the value of the upper counter is adjusted when an overflow occurs in the lower counter, and the counter value is provided from the upper counter. Claim 14 The data storage device according to claim 12, wherein the memory security circuit further includes a verification management circuit, and the verification management circuit verifies the integrity of a data block output from the first enclave. Claim 15 A data storage device according to claim 14, wherein the verification management circuit hashes the data block and the counter value to generate a first message authentication code when the data block is stored in the first enclave, and generates or updates a verification data structure using the first message authentication code. Claim 16 A data storage device according to claim 15, wherein the verification management circuit stores an update data block that updates the data block in the first enclave, hashes the result of hashing the update data block and the counter value used for encryption of the update data block and the first message authentication code to generate a second message authentication code, and updates the verification data structure so that the second message authentication code is associated with the first message authentication code. Claim 17 A data storage device according to claim 1, further comprising an internal bus for transmitting data between the data encryption circuit and the data decryption circuit and an interface circuit connected to the internal bus. Claim 18 A method of operation of a data storage device that communicates with a host device, comprising a flash chip, a DRAM chip, a data encryption circuit, an internal bus, a processor, and a data decryption circuit, the method comprising: executing an in-storage program stored in the data storage device, wherein the in-storage program has source data in the flash chip; wherein, when the in-storage program is executed, the source data is stored in the DRAM chip, and when the source data stored in the flash chip is moved to the DRAM chip, the data encryption circuit generates encrypted data corresponding to the source data; wherein the encrypted data is transmitted from the data encryption circuit to the data decryption circuit through the internal bus; wherein the source data is decrypted from the encrypted data in the data decryption circuit; and wherein the source data is stored in the DRAM chip. Claim 19 A method of operation of a data storage device communicating with a host device, comprising a non-volatile memory chip, a volatile memory chip, a data encryption circuit, an internal bus, a processor, and a data decryption circuit, the method comprising: executing a first in-storage program stored in the data storage device, wherein the first in-storage program has source data in the non-volatile memory chip; executing a second in-storage program stored in the data storage device, wherein the second in-storage program has source data in the non-volatile memory chip; providing a first partition in the volatile memory chip and storing first association information that associates the first in-storage program with the first partition; providing a second partition in the volatile memory chip and storing second association information that associates the second in-storage program with the second partition; and, based on the first association information, causing the first in-storage program to exchange data between the first partition and the non-volatile memory chip through the internal bus and preventing the second in-storage program from accessing the first partition. A method of operating a data storage device comprising: a step of; and a step of, based on the second association information, allowing the second in-storage program to exchange data between the second partition and the non-volatile memory chip through the internal bus and preventing the first in-storage program from accessing the second partition. Claim 20 A method of operation of a data storage device provided in response to a function call provided by an application program interface of the host device, wherein the first partition and the second partition are provided in response to the first partition and the second partition.

Citation Information

Patent Citations

  • Method and system for managing keys and / or rights objects

    KR1020080068757A

  • Encryption of memory device with wear leveling

    KR1020140033362A

  • Apparatus and method for security storage using re-encryption

    KR1020150050899A

  • Integrated circuit having on-the-fly encryptor, computing system having the same and operating method thereof

    KR1020170136409A

  • Data storage device using host memory buffer and method of operating the same

    KR1020200046264A