Data storage method and controller
By installing a controller with built-in secure storage hardware in the vehicle and using its root key to encrypt the keys of other controllers, the problem of increased controller hardware costs is solved, and the cost of secure storage of vehicle data is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, vehicle controllers require built-in secure storage hardware to achieve secure data storage, which increases hardware costs.
By installing a controller with built-in secure storage hardware in the vehicle, and using its root key to encrypt the keys of other controllers that do not have built-in secure storage hardware, the secure storage of vehicle data can be achieved.
By reducing the number of secure storage hardware deployments, the cost of secure data storage for the entire vehicle is reduced while maintaining data security.
Smart Images

Figure CN121637520A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive technology, specifically to a data storage method and controller. Background Technology
[0002] Data confidentiality protection primarily relies on symmetric encryption followed by secure storage. However, symmetric encryption depends on the encryption key, which also needs to be securely stored, ultimately leading to the secure storage of the root key (used for encrypting other keys). Currently, secure storage of the root key mainly relies on hardware implementation, stored in the backend via an encryption device. In the vehicle, it typically relies on a security chip or its secure storage space.
[0003] Typically, a vehicle has dozens of controllers, most of which have important data that needs to be stored securely. If we rely on current secure storage solutions, these controllers need to have hardware security chips or secure storage space. These hardware requirements will increase hardware costs, leading to higher data storage costs. Summary of the Invention
[0004] In view of this, embodiments of this application provide a data storage method and controller that reduce the cost of secure data storage without lowering the security protection level of data storage.
[0005] To address the above problems, the technical solutions provided in this application are as follows:
[0006] In a first aspect of this application, a data storage method is provided, the method being applied to a first controller, the first controller having built-in secure storage hardware, the secure storage hardware storing a root key including:
[0007] The system receives a first request message sent by a second controller. The first request message includes a first key generated by the second controller. The first request message is used to request the first controller to encrypt the first key. The first key is used to encrypt data in the second controller. The second controller does not have built-in secure storage hardware.
[0008] The first key is encrypted using the root key to obtain the second key;
[0009] The second key is sent to the second controller so that the second controller stores only the second key.
[0010] In a second aspect of this application, a data storage method is provided, which is applied to a second controller that does not have built-in secure storage hardware, comprising:
[0011] Send a first request message to the first controller. The first request message includes a first key generated by the second controller. The first request message is used to request the first controller to encrypt the first key. The first key is used to encrypt the data in the second controller. The first controller has built-in secure storage hardware.
[0012] Receive a second key sent by the first controller, wherein the second key is obtained by the first controller encrypting the first key using the root key stored in the secure storage hardware;
[0013] Store the second key.
[0014] In a third aspect of this application, a controller is provided, the controller having built-in secure storage hardware, the secure storage hardware storing a root key, including:
[0015] The receiving unit is configured to receive a first request message sent by the second controller. The first request message includes a first key generated by the second controller. The first request message is used to request the first controller to encrypt the first key. The first key is used to encrypt data in the second controller. The second controller does not have built-in secure storage hardware.
[0016] A processing unit is configured to encrypt the first key using the root key to obtain a second key;
[0017] The sending unit is configured to send the second key to the second controller, so that the second controller stores only the second key.
[0018] In a fourth aspect of this application, a controller is provided that does not have built-in secure storage hardware, comprising:
[0019] The sending unit is used to send a first request message to the first controller. The first request message includes a first key generated by the second controller. The first request message is used to request the first controller to encrypt the first key. The first key is used to encrypt the data in the second controller. The first controller has built-in secure storage hardware.
[0020] The receiving unit is used to receive a second key sent by the first controller, wherein the second key is obtained by the first controller encrypting the first key using the root key stored in the secure storage hardware;
[0021] A processing unit for storing the second key.
[0022] In a fifth aspect of this application, a controller is provided, including: a processor and a memory;
[0023] The memory is used to store computer-readable instructions or computer programs;
[0024] The processor is configured to read the computer-readable instructions or the computer program to cause the electronic device to implement the method described in the first aspect or the second aspect.
[0025] In a sixth aspect of this application, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a device, cause the device to perform the method described in the first or second aspect.
[0026] In a seventh aspect of this application, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to perform the method described in the first aspect or the second aspect.
[0027] Therefore, the embodiments of this application have the following beneficial effects:
[0028] In this application, a secure storage hardware is built into the first controller to store the root key. The second controller, however, does not have built-in secure storage hardware. For the first key used to encrypt data corresponding to the second controller, the second controller sends the first key to the first controller via a first request message. The first controller then encrypts the first key using the root key to obtain the second key, and sends the second key back to the second controller, storing the encrypted first key. That is, in this application, only the first controller has built-in secure storage hardware to store the root key required by all controllers. When other controllers (the second controller) need to securely store their own keys, they can do so based on the root key in the first controller. This reduces the need for built-in secure storage hardware while still meeting the security storage requirements, thereby lowering the cost of secure storage. Attached Figure Description
[0029] Figure 1 An interactive flowchart of a data storage method provided in an embodiment of this application;
[0030] Figure 2 This application provides an embodiment of two controller initialization root keys and key diagrams;
[0031] Figure 3 This application provides a schematic diagram illustrating two controllers for storing and retrieving data in an embodiment.
[0032] Figure 4This application provides a schematic diagram of a second controller storing and retrieving data in an embodiment.
[0033] Figure 5 This is a structural diagram of a data storage device provided in an embodiment of this application. Detailed Implementation
[0034] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0035] Currently, to achieve secure storage, each controller in a vehicle needs to have a built-in secure storage hardware component, relying on its own secure storage hardware to achieve secure storage. When there are a large number of controllers requiring secure storage, this leads to increased hardware costs.
[0036] Based on this, this application proposes a solution to achieve secure data storage for the entire vehicle through a controller with built-in secure storage hardware, thereby reducing costs associated with secure storage. Specifically, the vehicle has a controller with built-in secure storage hardware. When other controllers need to perform secure storage, they rely on the root key stored in the aforementioned secure storage hardware to encrypt the keys of other controllers, thus achieving secure key storage.
[0037] To facilitate understanding of this application, the technical terms used in this application are explained below.
[0038] A key is the correspondence between a ciphertext and plaintext, and is divided into symmetric keys and asymmetric keys. In symmetric key encryption algorithms, the same key is used for encryption and decryption; asymmetric keys consist of a public key and a private key, with the public key used for encryption and the private key used for decryption. Keys play a crucial role in cryptography and are central to protecting information security.
[0039] The root key is used to protect the confidentiality of the aforementioned keys (such as the key encryption key). It is the foundation of the key management hierarchy and plays a decisive role in the security of the entire business. The root key of a device is generally stored in the system. If an attacker obtains the root key stored in the device, it will threaten the security of all encrypted data.
[0040] Secure storage hardware is typically a special integrated circuit chip used to protect sensitive data from unauthorized access, tampering, and theft. It provides a high level of data security and reliability through security mechanisms such as hardware encryption, access control, and identity verification.
[0041] To ensure secure storage for each controller in this application, the following procedures will be followed:
[0042] Key generation: A string of random numbers is generated as the key using a true random number generator or a trusted pseudo-random number algorithm. The true random number generator or the trusted pseudo-random number algorithm can guarantee that the generated data is random, unpredictable, and the value of the key cannot be inferred from other information.
[0043] One key per device: This means that each individual component has a unique key, preventing the possibility of guessing the keys of other components on the same platform after cracking one component.
[0044] Symmetric encryption: refers to the use of standard AES or SM4 encryption algorithms, which at the algorithm level guarantee that without knowing the key, it is impossible to decrypt or forge encrypted data.
[0045] Secure communication: To ensure the confidentiality of communication between parts, the content of the communication cannot be obtained by eavesdropping. Different communication schemes can be selected depending on the situation, such as Transport Layer Security (TLS) protocol, or symmetric encryption communication scheme. Symmetric encryption communication refers to symmetric encryption of the communication content using AES or SM4. Both the sender and receiver have a built-in communication key before leaving the factory. This key is unique to each device, ensuring that the communication content cannot be eavesdropped.
[0046] Secure Storage: To ensure the confidentiality and secure storage of data, the data requiring secure storage is symmetrically encrypted before storage. This way, even if an attacker obtains the encrypted data, they cannot access the original text. However, this raises the question of how to store the encryption key. Even if the encryption key is also securely stored using symmetric encryption, the question arises about how to securely store the key that encrypts the encryption key. This necessitates the introduction of a secure root key.
[0047] Secure Root Key: To solve the problem of secure storage keys mentioned above, a secure root key is needed. The secure root key requires dedicated secure storage hardware, typically a secure chip, to ensure that the data stored within it cannot be illegally accessed.
[0048] To facilitate understanding of the technical solutions provided in this application, specific embodiments will be described below.
[0049] See Figure 1 This figure is an interaction diagram of a data storage method provided in an embodiment of this application, such as... Figure 1 As shown, this method is applied to both the first and second controllers. The first controller has built-in secure storage hardware that stores the root key; the second controller does not have built-in secure storage hardware. Typically, a vehicle has only one first controller; the other controllers without built-in secure storage hardware are collectively referred to as the second controller.
[0050] Specifically, the method includes:
[0051] S101: The second controller sends a first request message to the first controller, the first request message including a first key generated by the second controller.
[0052] The first controller generates a root key MK using a random number algorithm and stores it in secure storage hardware. This root key is used to encrypt the keys of other controllers or to encrypt the data within the first controller. The second controller generates a first key SK using a random number algorithm. This first key is used to encrypt the data within the first controller.
[0053] To ensure key security, after generating the first key, the second controller sends the first key to the first controller via a first request message, requesting the first controller to encrypt the first key using the root key.
[0054] The first controller and the second controller communicate with each other via a secure communication bus.
[0055] S102: The first controller receives the first request information and encrypts the first key using the root key to obtain the second key.
[0056] S103: The first controller sends the second key to the second controller.
[0057] In this embodiment, after receiving the first request information, the first controller obtains the first key by parsing the first request information, and encrypts the first key using the root key to obtain the encrypted first key, that is, the second key SK' is the ciphertext data corresponding to the first key.
[0058] After obtaining the second key, the first controller can send the second key back to the second controller via a secure communication bus.
[0059] S104: The second controller stores the second key.
[0060] In this application, the second controller only stores ciphertext data and does not store plaintext data. Therefore, the second controller only stores the second key and does not have the first key, thereby preventing the other data encrypted with the first key from being decrypted and stolen after the first key is stolen.
[0061] After the second controller stores the second key, if there is first data that needs to be securely stored, it includes:
[0062] (1) The second controller sends a second request message to the first controller, the second request message including a second key.
[0063] The second request information is used to request the first controller to decrypt the second key so that the data in the first controller can be encrypted using the decrypted second key.
[0064] (2) The first controller receives the second request information, decrypts the second key using the root key, and obtains the first key.
[0065] (3) The first controller sends the first key to the second controller.
[0066] (4) The second controller uses the first key to encrypt the first data, obtains the encrypted first data, and stores the encrypted first data.
[0067] The first controller decrypts the second key using the root key to obtain the plaintext key (the first key), and sends it to the second controller via the secure communication bus. Upon obtaining the first key, the second controller encrypts the first data using the first key and stores the encrypted first data locally. That is, the second controller only stores the encrypted first data locally.
[0068] It should be noted that after the second controller encrypts the first data using the first key, it will delete the data from the local storage and will not store the first key, but will only store the second key.
[0069] Furthermore, when the first controller contains second data that needs to be securely stored, the first controller will encrypt the second data using the root key and store the encrypted second data. That is, the first controller only stores the encrypted second data locally.
[0070] For example Figure 2 The diagram shows that the first controller stores the root key MK in secure storage hardware and the encrypted second data Mdata' in other storage spaces. The second controller stores the second key SK' and the encrypted first data Sdata' locally.
[0071] When data needs to be read from within the controller, including:
[0072] (1) The second controller sends a third request message to the first controller, the third request message including the second key.
[0073] The third request information is used to request the first controller to decrypt the second key so that the second controller can use the decrypted second key to decrypt the encrypted data in the first controller.
[0074] (2) The first controller receives the third request information and uses the root key to decrypt the second key to obtain the first key.
[0075] (3) The first controller sends the first key to the second controller.
[0076] (4) The second controller uses the first key to decrypt the encrypted first data to obtain the first data.
[0077] The first controller decrypts the second key using the root key to obtain the plaintext key (the first key), and sends it to the second controller via the secure communication bus. Upon obtaining the first key, the second controller uses it to decrypt the encrypted first data to obtain the first data.
[0078] It should be noted that after the second controller decrypts the encrypted first data using the first key, it will delete the data locally and not store the first key, but only the second key.
[0079] In addition, when the first controller needs to read the second data, the first controller will use the root key to decrypt the encrypted second data to obtain the second data.
[0080] For example, Figure 3 The diagram illustrates the controller's data storage and retrieval framework. The first controller stores the root key MK in secure storage hardware. When data Mdata needs to be stored, it is encrypted using MK to obtain Mdata', and only the encrypted data Mdata' is stored. When data Mdata needs to be retrieved, the root key MK is used to decrypt Mdata' to obtain Mdata. After use, Mdata is deleted and not stored again.
[0081] After obtaining the key SK, the second controller requests the first controller to encrypt the key SK using the root key MK, storing the ciphertext SK' locally, but not the key SK. When there is data Sdata that needs to be securely stored or read, the second controller requests the first controller to decrypt the ciphertext SK' to obtain the key SK. The second controller then uses the key SK to encrypt the data Sdata, obtaining the encrypted data Sdata'. When it is necessary to read the data Sdata, the second controller uses the decrypted key SK from the first controller to decrypt the data Sdata', obtaining Sdata. After using Sdata, the data is deleted and not stored.
[0082] As can be seen, this application includes a controller with built-in secure storage hardware within the vehicle. When other controllers need to perform secure storage, they encrypt the keys of other controllers using the root key stored in the aforementioned secure storage hardware, thus achieving secure key storage. In other words, secure storage of the entire vehicle's data can be achieved using only one controller, reducing the number of secure storage hardware deployments and thereby lowering secure storage costs.
[0083] To facilitate understanding of the overall implementation process of this application, the storage and retrieval of data by the second controller will be used as an example for illustration. Figure 4 The data storage and retrieval process is shown below:
[0084] Initialization process:
[0085] 1. The first controller generates a secure root key MK, which is stored by secure storage hardware;
[0086] 2. The second controller generates a secure storage key SK;
[0087] 3. The second controller sends SK to the first controller via a secure communication connection;
[0088] 4. The first controller uses MK to encrypt SK, obtaining SK';
[0089] 5. The second controller sends SK' to the second controller via a secure communication connection;
[0090] 6. The second controller stores SK'.
[0091] Data storage process:
[0092] 1. The second controller sends SK' to the first controller via a secure communication connection;
[0093] 2. The first controller uses MK to decrypt SK' and obtain SK.
[0094] 3. The first controller sends SK to the second controller via a secure communication connection;
[0095] 4. Second controller: After encrypting the data SData using SK, obtain SData' and store SData'.
[0096] First controller: Uses MK to encrypt data MData to obtain MData', and stores MData'.
[0097] Data reading process:
[0098] 1. The second controller sends SK' to the first controller via a secure communication connection;
[0099] 2. The first controller uses MK to encrypt SK', thus obtaining SK;
[0100] 3. The first controller sends SK to the second controller via a secure communication connection;
[0101] 4. Second controller: Use SK to decrypt data SData' and obtain the original data SData;
[0102] First controller: Use MK to decrypt data MData' and obtain the original data MData.
[0103] Based on the above method embodiments, this application provides a data storage device, which will be described below with reference to the accompanying drawings.
[0104] See Figure 5 This figure is a structural diagram of a data storage device provided in an embodiment of this application, such as... Figure 5 As shown, the device 500 includes a receiving unit 501, a processing unit 502, and a transmitting unit 503.
[0105] The device 500 can implement the functions of the first controller (or second controller) in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments. In the embodiments of this application, the device 500 can be the first controller (or second controller), or it can be an integrated circuit or component inside the first controller (or second controller), such as a chip. The following embodiments will be described using the device 500 as the first controller or the second controller as an example.
[0106] In some embodiments, the device 500 is used to perform the method executed by the first controller in the foregoing embodiments. In this case, the device 500 has built-in secure storage hardware that stores the root key.
[0107] The receiving unit 501 is used to receive a first request information sent by the second controller. The first request information includes a first key generated by the second controller. The first request information is used to request the first controller to encrypt the first key. The first key is used to encrypt the data in the second controller. The second controller does not have built-in secure storage hardware.
[0108] Processing unit 502 is used to encrypt the first key using the root key to obtain the second key;
[0109] The sending unit 503 is used to send the second key to the second controller so that the second controller stores only the second key.
[0110] In some implementations, if the second controller has first data that needs to be securely stored, the receiving unit 501 is further configured to receive second request information sent by the second controller, the second request information including the second key, the second request information being used to request the first controller to decrypt the second key;
[0111] The processing unit 502 is further configured to decrypt the second key using the root key to obtain the first key;
[0112] The sending unit 503 is further configured to send the first key to the second controller, so that the second controller uses the first key to encrypt the first data and store the encrypted first data.
[0113] In some implementations, if it is necessary to read the first data, the receiving unit 501 is further configured to receive a third request message sent by the second controller, the third request message including the second key, the third request message being used to request the first controller to decrypt the second key;
[0114] The processing unit 502 is further configured to decrypt the second key using the root key to obtain the first key;
[0115] The sending unit 503 is further configured to send the first key to the second controller, so that the second controller can use the first key to decrypt the encrypted first data and obtain the first data.
[0116] In some implementations, if the first controller has second data that needs to be securely stored, the processing unit 502 is further configured to encrypt the second data using the root key and store the encrypted second data.
[0117] In some implementations, if it is necessary to read the second data, the processing unit 503 is further configured to decrypt the encrypted second data using the root key to obtain the second data.
[0118] In other embodiments, the device 500 is used to perform the method executed by the second controller in the foregoing embodiments, in which case the device 500 does not have built-in secure storage hardware.
[0119] The sending unit 503 is used to send a first request message to the first controller. The first request message includes a first key generated by the second controller. The first request message is used to request the first controller to encrypt the first key. The first key is used to encrypt the data in the second controller. The first controller has built-in secure storage hardware.
[0120] The receiving unit 501 is used to receive a second key sent by the first controller, wherein the second key is obtained by the first controller encrypting the first key using the root key stored in the secure storage hardware;
[0121] Processing unit 502 is used to store the second key.
[0122] In some implementations, if the second controller has first data that needs to be securely stored, the sending unit 503 is further configured to send a second request message to the first controller, the second request message including the second key, the second request message being used to request the first controller to decrypt the second key;
[0123] The receiving unit 501 is further configured to receive the first key sent by the first controller;
[0124] The processing unit 502 is further configured to encrypt the first data using the first key and store the encrypted first data, wherein the first key is obtained by the first controller decrypting the second key using the root key.
[0125] In some implementations, if it is necessary to read the first data, the sending unit 503 is further configured to send a third request message to the first controller, the third request message including the second key, the third request message being used to request the first controller to decrypt the second key;
[0126] The receiving unit 501 is further configured to receive the first key sent by the first controller;
[0127] The processing unit 502 is further configured to decrypt the encrypted first data using the first key to obtain the first data.
[0128] It should be noted that the execution process of each unit of the above-mentioned device 500 can be found in the description of the method embodiment shown above in this application, and will not be repeated here.
[0129] This application provides a computer-readable storage medium, including instructions or a computer program, which, when run on a computer, causes the computer to execute the code processing method described above.
[0130] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0131] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0132] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0133] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0134] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data storage method, characterized by, The method is applied to a first controller, the first controller is built-in with secure storage hardware, the secure storage hardware stores a root key, and the method comprises the following steps of: receiving first request information sent by a second controller, the first request information comprising a first key generated by the second controller, the first request information being used for requesting the first controller to encrypt the first key, the first key being used for encrypting data in the second controller, and the second controller not being built-in with secure storage hardware; encrypting the first key by using the root key to obtain a second key; sending the second key to the second controller, so that the second controller only stores the second key.
2. The method of claim 1, wherein, If the second controller has first data that needs to be securely stored, the method further comprises the following steps of: receiving second request information sent by the second controller, the second request information comprising the second key, and the second request information being used for requesting the first controller to decrypt the second key; decrypting the second key by using the root key to obtain the first key; sending the first key to the second controller, so that the second controller encrypts the first data by using the first key and stores the encrypted first data.
3. The method of claim 2, wherein, If the first data needs to be read, the method further comprises the following steps of: receiving third request information sent by the second controller, the third request information comprising the second key, and the third request information being used for requesting the first controller to decrypt the second key; decrypting the second key by using the root key to obtain the first key; sending the first key to the second controller, so that the second controller decrypts the encrypted first data by using the first key to obtain the first data.
4. The method according to any one of claims 1 to 3, characterized in that, If the first controller has second data that needs to be securely stored, the method further comprises the following steps of: encrypting the second data by using the root key to store encrypted second data.
5. The method of claim 4, wherein, If the second data needs to be read, the method further comprises the following steps of: decrypting the encrypted second data by using the root key to obtain the second data.
6. A data storage method characterized by, The method is applied to a second controller, the second controller is not built-in with secure storage hardware, and the method comprises the following steps of: sending first request information to a first controller, the first request information comprising a first key generated by the second controller, the first request information being used for requesting the first controller to encrypt the first key, the first key being used for encrypting data in the second controller, and the first controller being built-in with secure storage hardware; receiving a second key sent by the first controller, the second key being obtained by encrypting the first key by using a root key stored in the secure storage hardware of the first controller; storing the second key.
7. The method of claim 6, wherein, If the second controller has first data that needs to be securely stored, the method further comprises the following steps of: sending second request information to the first controller, the second request information comprising the second key, the second request information being used to request the first controller to decrypt the second key; receiving the first key sent by the first controller, encrypting the first data by using the first key, and storing the encrypted first data, the first key being obtained by the first controller decrypting the second key by using the root key.
8. The method of claim 7, wherein, If the first data needs to be read, the method further comprises: sending third request information to the first controller, the third request information comprising the second key, the third request information being used to request the first controller to decrypt the second key; receiving the first key sent by the first controller, and decrypting the encrypted first data by using the first key to obtain the first data.
9. A controller characterized by comprising: The controller is built-in with the secure storage hardware, and the secure storage hardware stores a root key and comprises: a receiving unit configured to receive first request information sent by a second controller, the first request information comprising a first key generated by the second controller, the first request information being used to request the first controller to encrypt the first key, the first key being used to encrypt data in the second controller, the second controller not being built-in with secure storage hardware; a processing unit configured to encrypt the first key by using the root key to obtain a second key; a sending unit configured to send the second key to the second controller, so that the second controller only stores the second key.
10. A controller characterized by comprising: The controller is not built-in with secure storage hardware and comprises: a sending unit configured to send first request information to a first controller, the first request information comprising a first key generated by the second controller, the first request information being used to request the first controller to encrypt the first key, the first key being used to encrypt data in the second controller, the first controller being built-in with secure storage hardware; a receiving unit configured to receive second key sent by the first controller, the second key being obtained by the first controller encrypting the first key by using a root key stored in the secure storage hardware; a processing unit configured to store the second key.