Memory operation method, memory and storage system
By introducing the authentication request and key verification mechanism into the memory, the problem of insufficient security of memory data access is solved, the control of read and write operations is realized, and the security of the data is ensured.
Patent Information
- Application Number
- CN202210011414.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-06
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-01-06
AI Technical Summary
Existing storage lacks security when data is accessed and is easily leaked by unauthorized personnel.
By introducing an authentication request and key verification mechanism in the memory, read and write instructions are only allowed to be executed when the authentication is passed, the authentication flag is used to identify whether the memory has passed the authentication, and key storage and configuration request processing are implemented in the peripheral circuit.
Significantly improves memory security, prevents unauthorized data reading and writing operations, and ensures data protection.
Smart Images

Figure CN114527933B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of memory, and are related to but not limited to a memory operation method, a memory, and a storage system. Background Art
[0002] Memory is used more and more widely in modern life. Various types of memory are needed in computers, mobile phones and other user terminals.
[0003] However, the current use of memory is to directly access the memory. When the data stored in the memory is important data, the important data is very easy to be leaked.
[0004] How to improve the security of memory has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, embodiments of the present application provide a memory operation method, a memory, and a storage system.
[0006] In a first aspect, an embodiment of the present application provides a memory operation method, the method being executed by a memory, comprising:
[0007] Receiving an authentication request carrying first authentication information;
[0008] Determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0009] If the authentication is successful, the received read instruction and / or write instruction is allowed to be executed;
[0010] If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed.
[0011] In some embodiments, determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory includes:
[0012] Performing a first process on the first key to obtain second authentication information;
[0013] Whether the authentication is passed is determined based on whether the first authentication information matches the second authentication information.
[0014] In some embodiments, the first authentication information is: authentication information obtained by performing a second processing on a second key; wherein the algorithms of the first processing and the second processing are the same.
[0015] In some embodiments, the authentication request includes: dynamic information; the first processing of the first key to obtain the second authentication information includes:
[0016] The first processing is performed on the first key according to the dynamic information to obtain the second authentication information.
[0017] In some embodiments, the second processing is: processing the second key according to the dynamic information.
[0018] In some embodiments, the dynamic information is: a random number obtained using a random number seed.
[0019] In some embodiments, the memory stores an authentication mark, and the authentication mark is used to identify whether the memory has passed authentication;
[0020] The method further comprises:
[0021] If the authentication is passed, updating the authentication mark to the first state;
[0022] If the authentication fails, the authentication mark is updated to the second state.
[0023] In some embodiments, if the authentication is passed, allowing the received read instruction and / or write instruction to be executed includes:
[0024] If the state of the authentication mark is the first state, the received read instruction and / or write instruction is allowed to be executed.
[0025] In some embodiments, if the authentication fails, the received read instruction and / or write instruction is not allowed to be executed, including:
[0026] If the state of the authentication mark is the second state, the received read instruction and / or write instruction is not allowed to be executed.
[0027] In some embodiments, the memory comprises:
[0028] A key storage area, used for storing the first key;
[0029] The method further comprises:
[0030] Receiving a configuration request carrying the configuration of the first key;
[0031] According to the configuration request, the first key is stored in the key storage area.
[0032] In some embodiments, the method further comprises:
[0033] According to the configuration request, data in the memory is erased.
[0034] In a second aspect, an embodiment of the present application provides a memory, wherein the memory includes a plurality of storage areas and a peripheral circuit;
[0035] The multiple storage areas include at least one key storage area; the key storage area is used to store a first key;
[0036] The peripheral circuit is configured as:
[0037] Receiving an authentication request carrying first authentication information;
[0038] Determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0039] If the authentication is successful, the received read instruction and / or write instruction is allowed to be executed;
[0040] If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed.
[0041] In some embodiments, a certification mark is stored in the memory; the certification mark is used to identify whether the memory has passed the certification.
[0042] In some embodiments, the peripheral circuit is further configured to:
[0043] If the authentication is passed, updating the authentication mark to the first state;
[0044] If the authentication fails, the authentication mark is updated to the second state.
[0045] In some embodiments, the peripheral circuit is further configured to:
[0046] Receiving a configuration request carrying the configuration of the first key;
[0047] According to the configuration request, the first key is stored in the key storage area.
[0048] In a third aspect, an embodiment of the present application provides a storage system, the storage system comprising: a controller and a memory;
[0049] The controller is configured to control a peripheral circuit of the memory;
[0050] The memory; the peripheral circuit of the memory is configured to: receive an authentication request carrying first authentication information;
[0051] Determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0052] If the authentication is successful, the received read instruction and / or write instruction is allowed to be executed;
[0053] If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed. The embodiment of the present application adds an authentication request when accessing the memory, and only when the authentication request passes, the memory is allowed to perform the read instruction and / or write instruction operation, which greatly increases the security of the memory during use. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1A A schematic diagram of the structure of an exemplary system provided in an embodiment of the present application;
[0055] Figure 1B A schematic diagram of the structure of a memory card provided in an embodiment of the present application;
[0056] Figure 1C A schematic diagram of the structure of a solid state hard disk provided in an embodiment of the present application;
[0057] Figure 1D and Figure 1E A schematic diagram of the structure of a memory including a memory cell array and a peripheral circuit provided in an embodiment of the present application;
[0058] Figure 2 A flowchart of a memory operation method provided in an embodiment of the present application;
[0059] Figure 3 A flowchart of another memory operation method provided in an embodiment of the present application;
[0060] Figure 4 A flowchart of another memory operation method provided in an embodiment of the present application;
[0061] Figure 5 A flowchart of another memory operation method provided in an embodiment of the present application;
[0062] Figure 6 A flowchart of another memory operation method provided in an embodiment of the present application;
[0063] Figure 7 A flowchart of another memory operation method provided in an embodiment of the present application;
[0064] Figure 8 A flowchart of another memory operation method provided in an embodiment of the present application;
[0065] Fig. 9 A schematic diagram of the structure of a memory provided in an embodiment of the present application;
[0066] Fig.10 A schematic diagram of the structure of a storage system provided in an embodiment of the present application;
[0067] Fig.11 is an authentication flow chart of a user terminal and a controller;
[0068] Fig.12 Another authentication flow chart of a user terminal and a controller is provided for an embodiment of the present application;
[0069] Fig.13 A schematic diagram of the structure of another memory provided in an embodiment of the present application;
[0070] Fig.14 A schematic diagram of the structure of another memory provided in an embodiment of the present application;
[0071] Fig.15 A flowchart of another memory operation method provided in an embodiment of the present application;
[0072] Fig.16 A flowchart of another memory operation method provided in an embodiment of the present application;
[0073] Fig.17 A flowchart of another memory operation method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0076] like Figure 1A As shown, an embodiment of the present application shows an exemplary system 10, which may include a host 20 and a storage system 30. The exemplary system 10 may include, but is not limited to, a mobile phone, a desktop computer, a laptop computer, a tablet computer, a vehicle computer, a game console, a printer, a positioning device, a wearable electronic device, a smart sensor, a virtual reality (VR) device, an augmented reality (AR) device, or any other suitable electronic device having a memory 34; the host 20 may be a processor (e.g., a central processing unit (CPU)) or a system on chip (SoC) (e.g., an application processor (AP)) of the electronic device.
[0077] In the embodiment of the present application, the host 20 may be configured to send data to the storage system 30 or receive data from the storage system 30. Here, the storage system 30 may include a controller 32 and one or more memories 34. The memory 34 may include, but is not limited to, NAND Flash Memory, Vertical NAND Flash Memory, NOR Flash Memory, Dynamic Random Access Memory (DRAM), Ferroelectric Random Access Memory (FRAM), Magnetic Random Access Memory (MRAM), Phase Change Random Access Memory (PCRAM), Resistive Random Access Memory (RRAM), Nano Random Access Memory (NRAM), etc.
[0078] In an embodiment of the present application, the controller 32 may be coupled to the memory 34 and the host 20, and used to control the memory 34. Exemplarily, the controller may be designed to operate in a low duty cycle environment, such as a secure digital (SD) card, a compact flash (CF) card, a universal serial bus (USB) flash drive, or other media used in electronic devices such as personal calculators, digital cameras, mobile phones, etc. In some embodiments, the controller may also be designed to operate in a high duty cycle environment SSD (Solid State Disk) or an embedded multimedia card (eMMC), which is used as a data storage device for mobile devices such as smart phones, tablet computers, laptop computers, and enterprise storage arrays. Further, the controller may manage data in the memory and communicate with the host. The controller may be configured to control operations such as memory reading, erasing, and programming; it may also be configured to manage various functions regarding data stored or to be stored in the memory, including but not limited to bad block management, garbage collection, logical to physical address conversion, wear leveling, etc.; it may also be configured to process error correction codes (ECC) regarding data read from or written to the memory. In addition, the controller may also perform any other suitable functions, such as formatting the memory, or communicating with an external device (e.g., Figure 1AThe controller may communicate with the external device through at least one of various interface protocols, such as USB protocol, MMC protocol, peripheral component interconnect (PCI) protocol, PCI Express (PCI-E) protocol, Advanced Technology Attachment (ATA) protocol, Serial ATA protocol, Parallel ATA protocol, Small Computer Mini Interface (SCSI) protocol, Enhanced Minidisk Interface (ESDI) protocol, Integrated Drive Electronics (IDE) protocol, Firewire protocol, etc.
[0079] In the embodiments of the present application, the controller and one or more memories may be integrated into various types of storage devices, for example, included in the same package (for example, a universal flash storage (UFS) package or an eMMC package). That is, the storage system may be implemented and packaged into different types of terminal electronic products. Figure 1B As shown, the controller 32 and the single memory 34 may be integrated into a memory card 40. The memory card 40 may include a PC card (PCMCIA, Personal Computer Memory Card International Association), a CF card, a Smart Media (SM) card, a memory stick, a multimedia card (MMC, RS-MMC, MMCmicro), an SD card (SD, miniSD, microSD, SDHC), UFS, etc. The memory card 40 may also include a computer that connects the memory card 40 to a host (e.g., Figure 1A The memory card connector 42 is coupled to the host 20 in the embodiment. Figure 1C In another embodiment shown in FIG. 5 , the controller 32 and the plurality of memories 34 may be integrated into the SSD 50. The SSD 50 may also include a processor that connects the SSD 50 to a host (e.g., Figure 1A In some embodiments, the storage capacity and / or operating speed of the SSD 50 is greater than the storage capacity and / or operating speed of the memory card 40.
[0080] It should be noted that the memory involved in the embodiments of the present application may be a semiconductor memory, which is a solid-state electronic device for storing data information made using semiconductor integrated circuit technology. For example, Figure 1D Schematic diagram of an optional memory 60 in the embodiment of the present application. The memory 60 may be Figures 1A to 1C The memory 34 in. Figure 1DAs shown, the memory 60 may be composed of a memory cell array 62 and a peripheral circuit 64 coupled to the memory cell array 62, etc. Here, the memory cell array may be a NAND flash memory cell array, wherein the memory cells are provided in the form of an array of NAND memory strings 66, each NAND memory string 66 extending vertically above the substrate. In some embodiments, each NAND memory string 66 may include a plurality of memory cells coupled in series and stacked vertically. Each memory cell is configured to maintain a continuous analog value, such as a voltage or charge, which depends on the number of electrons captured in the memory cell area. In addition, each memory cell in the above-mentioned memory cell array 62 may be a floating gate type memory cell including a floating gate transistor, or a charge capture type memory cell including a charge capture transistor.
[0081] In an embodiment of the present application, the above-mentioned memory cell may be a single-level memory cell (SLC) having two possible storage states and thus capable of storing one bit of data. For example, the first storage state "0" may correspond to a first voltage range, and the second storage state "1" may correspond to a second voltage range. In other embodiments, each memory cell is a multi-level memory cell (MLC) capable of storing more than a single bit of data in more than four memory states. For example, an MLC may store two bits per cell, three bits per cell (also known as a triple-level cell (TLC)), or four bits per cell (also known as a quad-level cell (QLC)). Each MLC may be programmed to take a range of possible nominal storage values. Exemplarily, if each MLC stores two bits of data, the MLC may be programmed to take one of three possible programming levels from an erased state by writing one of three possible nominal storage values to the memory cell. Among them, the fourth nominal storage value may be used for an erased state.
[0082] In an embodiment of the present application, the above-mentioned peripheral circuit can be coupled to the memory cell array through a bit line (Bit Line, BL), a word line (Word Line, WL), a source (Source Line), a source select gate (Source Select Gate, SSG) and a drain select gate (Drain Select Gate, DSG). Here, the peripheral circuit may include any suitable analog, digital and mixed signal circuits for facilitating the operation of the memory cell array by applying a voltage signal and / or a current signal to each target memory cell via a bit line, a word line, a source, SSG and DSG, and sensing a voltage signal and / or a current signal from each target memory cell. In addition. The peripheral circuit may also include various types of peripheral circuits formed using metal-oxide-semiconductor (MOS) technology. For example, as Figure 1E The peripheral circuit 70 includes a page buffer (PageBuffer) / sense amplifier 71, a column decoder / bit line driver 72, a row decoder / word line driver 73, a voltage generator 74, a control logic unit 75, a register 76, an interface 77 and a data bus 78. It should be understood that the above peripheral circuit 70 can be connected to Figure 1D The peripheral circuit 64 is the same as in FIG. 1 , and in some other embodiments, the peripheral circuit 70 may also include Figure 1E Additional peripheral circuits not shown.
[0083] In some embodiments, in order to prevent the data stored by the user in the memory from being read and written by unauthorized personnel, user authentication can be performed through the security authentication process in the SSD startup phase, and users who pass the authentication can be allowed to read and / or write data. However, the user data actually exists entirely in the NAND flash memory, and the startup process of the flash memory itself does not have security authentication, so anyone can directly access the NAND flash memory through some technical means, thereby skipping the authentication mechanism at the upper level of the SSD firmware. For example, the controller or firmware is replaced with a malicious controller and firmware without an authentication mechanism, so that the data on the NAND flash memory can be accessed at will. Another example is to remove the NAND flash memory from the SSD and directly read and write it on specific hardware to obtain data, thereby exposing the data stored on the NAND to the risk of malicious access.
[0084] Therefore, the present invention provides a method for operating a memory. Figure 2 As shown, the method is executed by a memory, comprising:
[0085] S101, receiving an authentication request carrying first authentication information;
[0086] S102, determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0087] S103, if the authentication is successful, allowing the received read instruction and / or write instruction to be executed;
[0088] S104: If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed.
[0089] The memory described in the embodiments of the present application includes but is not limited to non-volatile memory, volatile memory and new memory. Non-volatile memory includes but is not limited to electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), erasable programmable read only memory (EPROM) and flash memory (FLASH MEMORY), etc.; wherein, flash memory includes but is not limited to NOR flash memory (NORFLASH) and NAND flash memory (NAND FLASH); volatile memory includes but is not limited to static random access memory (SRAM) and dynamic random access memory (DRAM), etc. New memories include but are not limited to 3D Xpoint, Magnetoresistive Random Access Memory (MRAM), Resistive Random Access Memory (RRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), etc. A solid state drive (SSD) can be composed of one or more memories and an SSD controller.
[0090] The embodiment of the present application provides an authentication process for the memory, and the memory can allow various memory operations such as read operations and write operations when the external controller passes the authentication. For example, by adding an authentication process when the controller starts the memory, the authenticated controller and firmware can be allowed to read, write, and erase the memory.
[0091] Here, for the convenience of description, the device that issues the first authentication information is referred to as a "controller". The controller can be any hardware device or software module that can establish a connection with the memory and control the memory to perform operations such as reading and writing. For example, Figure 1A The host device shown or the control module, software module, etc. in the host device are not specifically limited here.
[0092] When it is necessary to perform read and / or write operations on the memory, the memory can first authenticate the controller. If the controller passes the authentication, the read and / or write operations on the memory can be allowed. That is, if the memory passes the authentication, if it receives a read instruction and / or a write instruction, the received read instruction and / or write instruction can be allowed to be executed.
[0093] The controller sends an authentication request with the first authentication information to the memory, the memory receives the authentication request with the first authentication information, and then compares the first authentication information with the first key pre-stored in the memory, and the comparison method can be direct comparison or indirect comparison. For example, the first authentication information is directly compared with the first key, and the first authentication information can be the second key input by the user terminal and transmitted to the controller. For another example, the first authentication information can be compared with the first key after indirect processing. For another example, both the first authentication information and the first key can be compared after indirect processing.
[0094] When the comparison result shows that the first authentication information matches the first key pre-stored in the memory, it can be considered that the controller has passed the authentication, and the memory can allow the execution of the received read instructions and / or write instructions; when the comparison result shows that the first authentication information does not match the first key pre-stored in the memory, it can be considered that the controller has not passed the authentication, and the memory does not allow the execution of the received read instructions and / or write instructions.
[0095] In some embodiments, the first authentication information sent by the controller can also be compared with at least two memories, each of which stores a corresponding first key, and the keys stored in each memory can be the same or different. When the first authentication information sent by the controller is successfully compared with the key of a memory, the memory is the target memory that can perform the above-mentioned read operation and / or write operation.
[0096] The embodiment of the present application provides a two-way authentication process for the controller and the memory, thereby improving the security of data on the target memory and facilitating the protection of data on the memory.
[0097] In some embodiments, Figure 3 As shown, the determining whether the authentication is passed according to the first authentication information and the first key pre-stored in the memory includes:
[0098] S201, performing a first process on the first key to obtain second authentication information;
[0099] S202: Determine whether the authentication is successful based on whether the first authentication information matches the second authentication information.
[0100] In some embodiments, the authentication can be confirmed by comparing the first authentication information received by the memory with the second authentication information of the memory. The second authentication information is obtained by performing a first processing on the first key. Exemplarily, the first processing can be represented by a function f(x). In an embodiment of the present application, the second authentication information can be equal to the value of f(x1), where x1 is the first key. When the first authentication information matches the second authentication information, it can be considered that the controller has passed the authentication; when the first authentication information does not match the second authentication information, it can be considered that the controller has not passed the authentication. In some embodiments, the first processing can be a fixed function and is pre-stored in the memory. In other embodiments, the first processing can also be provided by the controller. For example, the memory receives the function corresponding to the first processing while receiving the above-mentioned first authentication information. In this way, the memory can process the pre-stored first key according to the received function to obtain the second authentication information, and then compare the second authentication information with the first authentication information to determine whether the authentication is passed.
[0101] In this way, the method of obtaining the second authentication information by processing the first key and then comparing the first authentication information with the second authentication information has stronger security than the method of directly comparing the first key, and the first key stored in the memory is not easy to be cracked.
[0102] In some embodiments, the first authentication information is: authentication information obtained by performing a second processing on a second key.
[0103] The first authentication information sent by the controller may also be authentication information obtained by performing a second processing on the second key. Exemplarily, the second key is input into the controller through the host, and the controller performs a second processing on the second key. The second processing can be represented by the function g(x). The first authentication information may be equal to the value of g(x2), where x2 is the second key. In addition, the first authentication information may also intercept a specified number of digits in a specified area of the g(x2) value as the first authentication information. For example, if the g(x2) value is 10 digits, the last 6 digits may be intercepted as the first authentication information.
[0104] In some embodiments, the first process and the second process have the same algorithm.
[0105] The above-mentioned first processing can be represented by the function f(x), and the second processing can be represented by the function g(x). Here, f(x) can be the same function as g(x). Exemplarily, the controller performs a second processing on the second key x2, obtains the first authentication information, and sends it to the memory, that is, the first authentication information is g(x2). After the memory receives the first authentication information g(x2), it can perform the same processing as the second processing on the pre-stored first key x1, that is, the above-mentioned first processing f(x), and obtain the second authentication information f(x1). Here, f(x1)=g(x1) and f(x2)=g(x2).
[0106] Exemplarily, the second authentication information may also be a specified number of digits in a specified area of the f(x1) value intercepted as the second authentication information. For example, if the f(x1) value is 10 digits, the last 6 digits may be intercepted as the second authentication information, and then the first authentication information and the second authentication information are compared. It can be understood that when the first key matches the second key, whether it is the value obtained after the first key and the second key are processed by the same algorithm, or the value of the specified number of digits in the specified area is taken, or the value obtained by processing the obtained value by other identical algorithms, they are all matched.
[0107] Therefore, after the above-mentioned first processing and second processing, the security of the key can be effectively improved. During the authentication process, what is transmitted between the controller and the memory is the first authentication information obtained after processing the second key. Therefore, compared with the method of directly transmitting the second key and comparing it with the first key, the possibility of the key being cracked can be reduced.
[0108] In some embodiments, Figure 4 As shown, the authentication request includes: dynamic information; the first processing of the first key to obtain the second authentication information includes:
[0109] S301. Perform the first processing on the first key according to the dynamic information to obtain the second authentication information.
[0110] The controller may send an authentication request to the memory, which may carry some information used for authentication, including but not limited to first authentication information and dynamic information. The controller sends both the first authentication information and the dynamic information to the memory, wherein the first authentication information is information used for authentication comparison, and the dynamic information is intermediate information used to perform a first processing on the first key. In other words, the memory can determine the first processing to be performed on the first key during authentication through the dynamic information. Exemplarily, the processing of the first key can be represented by a function f(x, y), wherein x is the key to be processed and y is the dynamic information. The second authentication information obtained by the above processing of the first key is equal to f(x1, y), wherein x1 is the first key.
[0111] Dynamic information can be dynamically changing information, and the dynamic information corresponding to each authentication can be different information. In actual use, the more random the dynamic information is, the less likely it is to be repeated, or the less regular it is, the higher the security it can achieve. By introducing dynamic information, even when the authentication request issued by the controller and the related information in the authentication request are intercepted by an illegal user, due to the randomness of the dynamic information, it is very difficult for the illegal user to use the first authentication information and the dynamic information to crack the key. Therefore, the above method greatly improves the security of the memory.
[0112] In some embodiments, the second processing is: processing the second key according to the dynamic information.
[0113] Before sending the first authentication information, the controller may generate dynamic information and process the second key based on the dynamic information, i.e., the second processing mentioned above. The second processing may be represented by a function g(x, y). Where y is the dynamic information. Therefore, the first authentication information received by the memory may be obtained by the controller through the second processing of the second key, i.e., g(x2, y), where x2 is the second key mentioned above.
[0114] In some embodiments, the dynamic information is: a random number obtained using a random number seed.
[0115] Dynamic information can be a random number obtained based on a random number seed. A random number seed refers to the initial value used to generate a random number in a random number generator. Random number seeds can be obtained using software or hardware. For example, when a random number seed is obtained through hardware, the randomness of the seed comes from the randomness of the collected hardware information, such as the sound, light, and electrical information of the current environment. For example, the noise in the operation of the computer system can be collected: the timestamp of I / O (Input / Output) operations. The timestamps of I / O operations include but are not limited to the input timestamps of disks, networks, keyboards, mice, and other devices. These timestamps will be captured and the millisecond or microsecond values will be intercepted. The values of this part are usually random and non-repeatable. This random number seed obtained by hardware is a true random number.
[0116] The random number seed can also be obtained by software, for example, by using the seed(a) function, where a is a value obtained by software or hardware.
[0117] The random number can be obtained by the random(b) function, where b is the random number seed. The method for obtaining the random number seed is as described above.
[0118] In some embodiments, the memory stores an authentication mark, and the authentication mark is used to identify whether the memory has passed authentication;
[0119] like Figure 5 As shown, the method also includes:
[0120] S401, if the authentication is passed, updating the authentication mark to a first state;
[0121] S402: If the authentication fails, updating the authentication mark to a second state.
[0122] The memory may also store an authentication mark, which is used to identify whether the memory and the controller have passed the two-way authentication.
[0123] The authentication mark can be stored in a preset fixed storage area in the memory, which can be located in the same storage area as the storage area storing the first key, or in a different storage area. In another embodiment, the authentication mark can also be stored in a random position in the memory, but can be recognized by the memory through the characteristics of the authentication mark.
[0124] In some embodiments, if the memory obtains a result of passing the authentication after authenticating the received first authentication information, the authentication mark can be updated to a first state, which can be identified by a binary value "1" (conversely, it can also be identified by "0", which is not limited here) and stored in a specified location of the memory. If the authentication fails, the authentication mark is updated to a second state, which can be identified by a binary value "0" (conversely, it can also be identified by "1", which is not limited here) and stored in a specified location of the memory.
[0125] After the memory is powered on or reset, the authentication mark can be reset, that is, the authentication mark is updated to the second state. That is, after the memory is powered on or reset, the controller can be authenticated again, that is, the user authentication of the controller can be re-performed.
[0126] In the embodiment of the present application, the authentication status of the memory can be read before the controller is authenticated, that is, the authentication status can be read without permission. Therefore, the authentication status can be stored in a data area in the memory that does not need to be kept confidential.
[0127] In some embodiments, Figure 6 As shown, if the authentication is passed, the received read instruction and / or write instruction is allowed to be executed, including:
[0128] S501: If the state of the authentication mark is the first state, allowing execution of the received read instruction and / or write instruction.
[0129] If the authentication is successful, the memory can modify the authentication mark to the first state, and then the memory can determine whether to allow the received instruction to be executed based on whether the authentication mark is in the first state. Exemplarily, the data stored in the specified position of the memory can be used to represent the state of the authentication mark. For example, when the data stored in the specified position is a binary value "1", it is used to represent the first state. When the memory receives a read and / or write instruction, it first reads the data stored in the specified position. If the stored data is "1", that is, the authentication mark is in the first state, the memory is allowed to subsequently execute the read instruction and / or write instruction.
[0130] In some embodiments, Figure 6 As shown, if the authentication fails, the received read instruction and / or write instruction is not allowed to be executed, including:
[0131] S502: If the state of the authentication mark is the second state, the received read instruction and / or write instruction is not allowed to be executed.
[0132] If the authentication fails, the memory can modify the authentication mark to the second state. Of course, if the authentication mark is in the second state before the authentication, there is no need to modify the authentication mark, and the state can be maintained in the second state.
[0133] Exemplarily, the data stored in the specified position of the memory can be used to represent the state of the authentication mark. For example, when the data stored in the specified position is a binary value of "0", it is used to represent the second state. When the memory receives a read and / or write instruction, it first reads the data stored in the specified position. If the stored data is "0", that is, the authentication mark is in the second state, the memory is not allowed to subsequently execute the read instruction and / or write instruction. At this time, the memory can ignore the received read instruction and / or write instruction, or it can return a prompt message to the controller to prompt that the authentication has not passed and the operation is not allowed.
[0134] In some embodiments, Figure 7 As shown, the memory includes:
[0135] A key storage area, used for storing the first key;
[0136] The method further comprises:
[0137] S601, receiving a configuration request carrying a configuration of the first key;
[0138] S602: Store the first key in the key storage area according to the configuration request.
[0139] The memory may include a key storage area for storing the first key. The key storage area may be partitioned and set when the memory leaves the factory, or a new key storage area may be partitioned by processing an unset memory using memory partitioning software.
[0140] In some embodiments, no key is stored in the key storage area of the memory. When the memory receives a configuration request for configuring the first key from the controller, the first key carried in the configuration request may be directly stored in the key storage area.
[0141] In some embodiments, a key (such as a third key) has been stored in the key storage area of the memory, and the memory has also passed the authentication, so the authentication state of the authentication mark in the memory is in the first state. At this time, the memory receives a new first key configuration request, and the stored key can be updated to a new first key. That is, the first key in the configuration request is stored in the key storage area of the memory, so that it overwrites the original key.
[0142] In some embodiments, Figure 8 As shown, the method also includes:
[0143] S701. Erase data on the memory according to the configuration request.
[0144] In some embodiments, the key storage area of the memory has not stored a key. When the memory receives a configuration request from the controller carrying the configuration of the first key, the memory can choose to erase all data on the memory according to the configuration request, that is, reset the data. This is because when the memory is shipped from the factory, due to charge interference, device testing at the factory, etc., the internal data of the factory memory is not necessarily in a reset state when it is used, which is not conducive to subsequent data reading and / or writing operations, and may cause data miswriting and / or misreading. Choosing to erase all data on the memory is conducive to subsequent read and / or write operations.
[0145] In addition, the memory can also be used without setting a key and store data that does not need to be encrypted, etc. When the memory receives a configuration request, the data already stored in the memory can be erased first, so as to facilitate subsequent use in an encrypted state.
[0146] In some embodiments, a key has been stored in the key storage area of the memory, and the memory has passed authentication, and the authentication state at this time is in the first state. The memory receives a new first key configuration request, and the memory can erase the data in the key storage area, while retaining the data in the non-key storage area. This is because the controller that issues the key modification request at this time has been authenticated, and the subsequent operations performed by the authenticated controller on the memory can be considered as safe operations, so the data stored on the memory can be retained.
[0147] In some embodiments, a key has been stored in the key storage area of the memory, and a counter can be set in the memory to record the number of authentication failures. When the number of authentication failures reaches a preset value, it means that the controller has attempted authentication multiple times. In order to facilitate the use of the memory by the controller, the memory can be allowed to reconfigure the key. However, in order to maintain the security of the existing data in the memory, the data in the memory can be erased first and the key can be updated.
[0148] Exemplarily, the controller may resend a configuration request carrying a new first key to the memory. When the memory receives the configuration request, the data in the key storage area may be erased, and the data on the non-key storage area (i.e., other memories other than the key storage area) may be selectively erased according to the security of the stored data. For example, when the data on the non-key storage area requires level one confidentiality, the data on the non-key storage area may be erased. When the data on the non-key storage area requires level two confidentiality, the data on the non-key storage area may not be erased. Therefore, the memory may also include a confidentiality level identifier for identifying the confidentiality level of the data. For example, when the binary data stored in the confidentiality level identifier is "1", it is level one confidentiality, and when the binary data stored in the confidentiality level identifier is "0", it is level two confidentiality. It is understandable that the binary data "1" or "0" is set by the user in the confidentiality identification area in the memory.
[0149] In some embodiments, a key has been stored in the key storage area of the memory, and the memory also has a counter for recording the number of authentication failures. When the number of authentication failures reaches a preset value, the controller will resend a configuration request carrying a new first key to the memory. The memory receives the configuration request and can retain the original key storage area and the original data at the same time.
[0150] In the blank area of the memory, a designated area for the second read-write operation and a second key storage area are re-divided. The second key storage area is used to store the second key, and the second key can be used to protect the newly divided designated area for the second read-write operation. The designated area for the second read-write operation can also be used after authentication. Whether the authentication is completed determines whether the designated area for the second read-write operation is allowed to be read and written. If the authentication is passed, the designated area for the second read-write operation can be run to read and write, but the area where the original data is stored cannot be read and written.
[0151] In addition, when the controller re-authenticates the first authentication information for the original data, the memory can still determine whether to allow the original data area to be read and / or written based on the authentication result. It is understandable that there may be a second authentication mark in the area where the data is not written to, for indicating whether the unwritten area is authenticated.
[0152] The present application embodiment provides a memory, such as Fig. 9 As shown, the memory 100 includes a plurality of storage areas 101 and a peripheral circuit 103;
[0153] The multiple storage areas 101 include at least one key storage area 102; the key storage area 102 is used to store a first key;
[0154] The peripheral circuit 103 is configured as follows:
[0155] Receiving an authentication request carrying first authentication information;
[0156] Determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0157] If the authentication is successful, the received read instruction and / or write instruction is allowed to be executed;
[0158] If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed.
[0159] In some embodiments, the memory may be a non-volatile memory product such as a NAND chip.
[0160] In some embodiments, the memory 100 may include a plurality of storage areas 101 , wherein the storage area 101 includes a key storage area 102 , and the key storage area 102 stores a first key for protecting other non-key storage areas.
[0161] In some embodiments, the memory 100 may include multiple storage areas 101, each of which includes multiple key storage areas 102, and different key storage areas respectively protect different storage areas 101. The keys stored in different key storage areas 102 may be the same or different.
[0162] In some embodiments, the memory 100 stores an authentication mark, and the authentication mark is used to identify whether the memory 100 has passed authentication.
[0163] In some embodiments, the peripheral circuit 103 is further configured to:
[0164] If the authentication is passed, updating the authentication mark to the first state;
[0165] If the authentication fails, the authentication mark is updated to the second state.
[0166] In some embodiments, the peripheral circuit 103 is further configured to:
[0167] Receiving a configuration request carrying the configuration of the first key;
[0168] According to the configuration request, the first key is stored in the key storage area.
[0169] The present application embodiment provides a storage system, such as Fig.10 As shown, the storage system 300 includes: a controller 200 and a memory 100;
[0170] The controller 200 is configured to control the peripheral circuit 103 of the memory 100;
[0171] The memory 100; the peripheral circuit 103 of the memory is configured to: receive an authentication request carrying first authentication information;
[0172] Determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory;
[0173] If the authentication is successful, the received read instruction and / or write instruction is allowed to be executed;
[0174] If the authentication fails, the received read instruction and / or write instruction is not allowed to be executed.
[0175] In some embodiments, the storage system may be a product such as an SSD, or may be an electronic device including a storage device, such as a computer device.
[0176] The present application also provides the following examples:
[0177] like Fig.11As shown, the host 1001 only authenticates the SSD controller 1002, but does not authenticate the NAND memory 1003. Among them, the host 1001 can be implemented using any of a variety of electronic devices. In some embodiments, the host 1001 may include an electronic device, such as a desktop computer, a workstation, a three-dimensional (3D) TV, a smart TV, a digital audio recorder, a digital audio player, a digital photo recorder, a digital photo player and / or a digital video recorder and a digital video player. In some embodiments, the host 1001 may include a portable electronic device, such as a mobile phone, a smart phone, an e-book, an MP3 player, a portable multimedia player, and a portable game console. When the host 1001 is a computer, its security authentication process for the startup phase of the SSD is as follows. Fig.12 As shown, including:
[0178] S1101, start the computer;
[0179] S1102, start the SSD;
[0180] S1103, computer and SSD perform security authentication;
[0181] S1104, if authentication fails, data reading and writing are prohibited;
[0182] S1105. If the authentication is successful, data reading and writing are allowed.
[0183] The process of starting the SSD may include: resetting the SSD controller, resetting the NAND, and reading and writing the NAND.
[0184] Although this can protect data to a certain extent, the security of data stored in the NAND memory cannot be guaranteed if the controller or firmware is replaced with a malicious controller or firmware without authentication mechanism, which allows the data on the NAND memory to be accessed at will, or the NAND memory is removed from the SSD and directly read and written on specific hardware to obtain data.
[0185] The embodiment of the present application adds a security authentication process between the SSD controller and the NAND memory to ensure that only the authenticated controller can access the NAND memory, thereby ensuring the security of the data stored in the NAND memory.
[0186] First, the NAND memory is partitioned into a key storage area and other data areas to distinguish between keys and other data, such as Fig.13As shown, the NAND memory 1200 can be divided into a key storage area 1201 and other data area 1202, and an area is designated in the other data area 1202 to record the authentication status flag. The area for storing the authentication status flag is the authentication status flag area 1203, which is used to store the authentication status flag to facilitate reading of the authentication status.
[0187] In some embodiments, Fig.14 As shown, the authentication status mark area 1203 can also be distinguished from the other data area 1202. The data in the other data area 1202 can be read and / or written only after authentication, while the data in the authentication status mark area 1203 can be read and / or written without authentication. Part or all of the authentication mark area 1203 can be used to record the authentication mark status. When part of the area is used as the authentication mark area for the authentication mark status, the remaining area can be used to store other data that can be directly read and / or written.
[0188] In some embodiments, after the NAND memory 1200 is divided into regions, a key configuration stage may be added to the NAND memory 1200, and the controller may write the key into the key storage area 1201 of the NAND memory 1200 for subsequent authentication of other controllers.
[0189] The process of configuring the key of the NAND memory 1200 includes: the controller sends an authentication request carrying key information, and after the NAND memory 1200 receives the authentication request, it erases the original data in the NAND memory 1200 and writes the received key information into the key storage area 1201 of the NAND memory 1200.
[0190] The key written into the key storage area of the NAND memory 1200 cannot be read out by the controller from outside the NAND memory 1200. In some embodiments, if the authentication flag status of the memory is in the authenticated state, the key can be allowed to be read out by the controller that has passed the authentication. The data in other data areas 1202 can be executed with read / write commands after the authentication is passed. The authentication status flag is a flag used to indicate whether the controller and the memory have completed two-way authentication. When the NAND memory 1200 is powered on and reset, no matter what the previous state of the authentication status flag is, it can be modified to an unauthenticated state, that is, the controller can be re-authenticated after power-on and reset.
[0191] The authentication process between the controller and the NAND memory 1200 in the present application is as follows Fig.15 As shown:
[0192] S1501: The controller initiates authentication to the NAND memory;
[0193] S1502, the NAND memory notifies the controller that the authentication is successful;
[0194] S1503. Allow the NAND memory to execute the received read instruction and / or write instruction.
[0195] like Fig.16 As shown: Wherein, S1501: the controller initiating authentication to the NAND memory may also include:
[0196] S1601: The controller sends an authentication request to the NAND memory;
[0197] S1602: The controller obtains a random number seed and generates a random number;
[0198] S1603: The controller generates first verification information using an encryption algorithm based on the key and the random number, and sends the first verification information and the random number to the NAND memory;
[0199] S1604: The NAND memory generates second verification information using an encryption algorithm based on the key and the random number;
[0200] S1605: Compare the first verification information with the second verification information;
[0201] S1606: If the comparison is the same, the authentication state is changed to "authenticated" and a verification success result is returned;
[0202] S1607: If the comparison is different, the authentication status is changed to "unauthenticated" and a verification failure result is returned.
[0203] Specifically, the controller sends an authentication request to the NAND memory 1200, and the controller obtains a random number seed. The random number seed can come from the controller or from the host 1001. The random number seed can be a true random number seed or a pseudo-random number seed. According to the random number seed, a random number can be generated, and the generated random number is also divided into a true random number and a pseudo-random number. The controller uses the key input by the host 1001 or the key information stored in the controller and the random number, and uses an encryption algorithm, such as a hash algorithm, to generate a message verification code. This message verification code is sent to the NAND memory 1200 as the first authentication information together with the random number. After receiving the random number, the NAND memory 1200 uses the same hash operation together with the key stored in the key storage area 1201 to generate a second message verification code. When the first message verification code and the second message verification code are confirmed to be the same, it is considered that the controller and the memory have completed the two-way authentication. After the authentication is passed, the authentication state is changed to the authenticated state. When the first message verification code and the second message verification code are confirmed to be different, it is considered that the controller and the memory have not completed the two-way authentication. After the authentication fails, the authentication state is changed to the unauthenticated state. A counter may also be used to record the number of unsuccessful authentication attempts.
[0204] Therefore, when the NAND memory 1200 receives the instruction from the controller, the NAND memory 1200 can Fig.17 The process shown determines whether to execute the instruction.
[0205] S1701, NAND memory receives an instruction;
[0206] S1702, determining whether the instruction is a read-write instruction;
[0207] S1703: If the instruction is not a read-write instruction, allow the instruction to be executed;
[0208] S1704: If it is a read-write instruction, continue to determine whether the controller has passed the authentication;
[0209] S1705: If the authentication is successful, the instruction is allowed to be executed;
[0210] S1706: If the authentication fails, the instruction is not allowed to be executed.
[0211] Specifically: first determine whether the instruction received by the NAND memory 1200 is a read-write instruction or a non-read-write instruction. If it is a read-write instruction, do not execute the instruction first, and continue to determine whether the controller that issued the instruction has passed the authentication of the NAND memory 1200. If the controller has passed the authentication, the read-write instruction can be executed.
[0212] If the controller fails to pass the authentication, the instruction may not be executed.
[0213] If it is determined that the instruction received by the NAND memory 1200 is a non-read-write instruction, the NAND memory 1200 may directly execute the instruction.
[0214] The embodiment of the present application adds an authentication mechanism before the NAND memory 1200 executes a read / write command, thereby preventing the data on the NAND memory 1200 from being read / written by unauthorized users, and solves the security vulnerability that the data on the NAND memory 1200 can be directly read, thereby fundamentally improving the data security of the storage system based on the NAND memory 1200.
[0215] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0216] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0217] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A memory operation method, It is characterized in that The method is executed by a memory, and includes: Receiving an authentication request carrying first authentication information sent by the controller; Determining whether the controller passes the authentication of the memory according to the first authentication information and a first key pre-stored in the memory; If the controller passes the authentication of the memory, the received read instruction and / or write instruction is allowed to be executed; If the controller fails to pass the authentication of the memory, the received read instruction and / or write instruction is not allowed to be executed.
2. The method according to claim 1, It is characterized in that The determining whether the authentication is passed according to the first authentication information and a first key pre-stored in the memory includes: Performing a first process on the first key to obtain second authentication information; Whether the authentication is passed is determined based on whether the first authentication information matches the second authentication information.
3. The method according to claim 2, It is characterized in that The first authentication information is: authentication information obtained by performing a second process on a second key; wherein the algorithms of the first process and the second process are the same.
4. The method according to claim 3, It is characterized in that The authentication request includes: dynamic information; the first processing of the first key to obtain second authentication information includes: The first processing is performed on the first key according to the dynamic information to obtain the second authentication information.
5. The method according to claim 4, It is characterized in that The second processing is: processing the second key according to the dynamic information.
6. The method according to claim 4, It is characterized in that The dynamic information is: a random number obtained using a random number seed.
7. The method according to claim 1, It is characterized in that The memory stores an authentication mark, which is used to identify whether the memory has passed authentication; The method further comprises: If the controller passes the authentication of the memory, updating the authentication mark to a first state; If the controller fails to pass the authentication of the memory, the authentication flag is updated to a second state.
8. The method according to claim 7, It is characterized in that If the memory passes the authentication of the memory, allowing the execution of the received read instruction and / or write instruction includes: If the state of the authentication mark is the first state, the received read instruction and / or write instruction is allowed to be executed.
9. The method according to claim 7, It is characterized in that If the memory fails to pass the authentication of the memory, the received read instruction and / or write instruction is not allowed to be executed, including: If the state of the authentication mark is the second state, the received read instruction and / or write instruction is not allowed to be executed.
10. The method according to claim 1, It is characterized in that The memory comprises: A key storage area, used for storing the first key; The method further comprises: Receiving a configuration request carrying the configuration of the first key; According to the configuration request, the first key is stored in the key storage area.
11. The method according to claim 10, It is characterized in that The method further comprises: According to the configuration request, data in the memory is erased.
12. A memory, It is characterized in that The memory includes a plurality of storage areas and peripheral circuits; The multiple storage areas include at least one key storage area; the key storage area is used to store a first key; The peripheral circuit is configured as: Receiving an authentication request carrying first authentication information sent by the controller; Determining whether the controller passes the authentication of the memory according to the first authentication information and a first key pre-stored in the memory; If the controller passes the authentication of the memory, the received read instruction and / or write instruction is allowed to be executed; If the controller fails to pass the authentication of the memory, the received read instruction and / or write instruction is not allowed to be executed.
13. The memory according to claim 12, It is characterized in that The memory stores an authentication mark, which is used to identify whether the memory has passed authentication.
14. The memory according to claim 13, It is characterized in that The peripheral circuit is further configured as: If the controller passes the authentication of the memory, updating the authentication mark to a first state; If the controller fails to pass the authentication of the memory, the authentication flag is updated to a second state.
15. The memory according to claim 12, It is characterized in that The peripheral circuit is further configured as: Receiving a configuration request carrying the configuration of the first key; According to the configuration request, the first key is stored in the key storage area.
16. A storage system, It is characterized in that The storage system comprises: a controller and a memory; The controller is configured to control a peripheral circuit of the memory; The memory; the peripheral circuit of the memory is configured to: receive an authentication request carrying first authentication information sent by the controller; Determining whether the controller passes the authentication of the memory according to the first authentication information and a first key pre-stored in the memory; If the controller passes the authentication of the memory, the received read instruction and / or write instruction is allowed to be executed; If the controller fails to pass the authentication of the memory, the received read instruction and / or write instruction is not allowed to be executed.
Citation Information
Patent Citations
Mobile memory and access control method and system for mobile memory
CN102393836A
Method, host, storage, and machine-readable storage medium for protecting content
CN103518207A
Memory system
CN111475871A
Memory device and method for operating memory device
CN112395651A
Information processor
CN1462396A
