Data storage methods, devices, systems, equipment, media and products

By using a trusted execution environment to encrypt data in the data processing module, the problem of insufficient data storage security is solved, and the data storage system only receives encrypted data, thereby improving the security of data storage.

CN114912105BActive Publication Date: 2026-11-17CHINA UNIONPAY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210517249.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2026-11-17
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In existing technologies, data security is insufficient during storage. Any user with data storage system permissions can access plaintext data, leading to reduced data storage security.

Method used

In the data processing module, a Trusted Execution Environment (TEE) is used to encrypt the data to be stored, and the encrypted data is stored in the data storage system to ensure that the encrypted computation is performed in the hardware Trusted Execution Environment and that the data storage system only receives ciphertext data.

Benefits of technology

It improves the security of data storage, prevents data storage system maintenance personnel or personnel with super administrative privileges from obtaining plaintext data, and enhances the security of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912105B_ABST
    Figure CN114912105B_ABST
Patent Text Reader

Abstract

This application discloses a data storage method, apparatus, system, device, medium, and product. The data storage method includes: acquiring first data to be stored corresponding to a first application; encrypting the first data in a first Trusted Execution Environment (TEE) to obtain second data; and sending the second data to the data storage system to store the second data in the data storage system. According to the embodiments of this application, the security of data storage can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application pertains to data processing technology, and particularly relates to a data storage method, apparatus, system, device, medium, and product. Background Technology

[0002] With data emerging as a new factor of production, data security has become paramount, and prioritizing data security has become a global trend.

[0003] Typically, data protection focuses on data transmission and storage after data is stored in a data storage system. Among these, the main solution for secure data storage is transparent encryption of the storage medium. That is, data is encrypted at the operating system or data storage system level. When data is written to disk, the data storage system performs the encryption action, so that users are unaware of the encryption and decryption process when retrieving data from the data storage system.

[0004] In this way, any user with data storage system privileges can obtain plaintext data from the data storage system, thereby reducing the security of data storage. Summary of the Invention

[0005] This application provides a data storage method, apparatus, system, device, medium, and product that can effectively improve the security of data storage.

[0006] In a first aspect, embodiments of this application provide a data storage method applied to a data processing module, the method comprising:

[0007] Obtain the first data to be stored corresponding to the first application;

[0008] The first data is encrypted in the first Trusted Execution Environment (TEE) to obtain the second data.

[0009] The second data is sent to the data storage system to store the second data in the data storage system.

[0010] Secondly, embodiments of this application provide a data reading method applied to a data processing module, the method comprising:

[0011] In response to the first application's operation of reading the first data, second data is obtained from the data storage system, wherein the second data is encrypted data corresponding to the first data;

[0012] The second data is decrypted in the first TEE to obtain the first data;

[0013] Return the first data to the first application.

[0014] Thirdly, embodiments of this application provide a key management method applied to a key management module, the method comprising:

[0015] Receive a key acquisition request sent by the data processing module, wherein the key acquisition request includes an application identifier corresponding to the first application;

[0016] In response to the key acquisition request, a first key corresponding to the first application is generated in the second TEE based on the application identifier;

[0017] The first key is sent to the data processing module through a secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

[0018] Fourthly, embodiments of this application provide a data processing system, including a data processing module and a key management module, wherein:

[0019] The data processing module is used to perform the steps of the data storage method as described in any embodiment of the first aspect and the data reading method as described in any embodiment of the second aspect;

[0020] The key management module is used to perform the steps of the key management method as described in any embodiment of the third aspect.

[0021] Fifthly, embodiments of this application provide a data processing system, including a data processing gateway cluster and a key management module, wherein the data processing gateway cluster includes a proxy module and multiple data processing modules;

[0022] The proxy module is used to assign corresponding data processing modules to multiple applications respectively;

[0023] The first data processing module corresponding to the first application is used to execute the steps of the data storage method as described in any embodiment of the first aspect and the data reading method as described in any embodiment of the second aspect, wherein the first application is any one of the plurality of applications;

[0024] The key management module is used to perform the steps of the key management method as described in any embodiment of the third aspect.

[0025] Sixthly, embodiments of this application provide a data storage device applied to a data processing module, the device comprising:

[0026] The first acquisition unit is used to acquire the first data to be stored corresponding to the first application;

[0027] An encryption processing unit is used to encrypt the first data in a first trusted execution environment (TEE) to obtain the second data.

[0028] A data sending unit is used to send the second data to the data storage system so as to store the second data in the data storage system.

[0029] Seventhly, embodiments of this application provide a data reading device applied to a data processing module, the device comprising:

[0030] The second acquisition unit is configured to acquire second data from the data storage system in response to the first application's operation of reading first data, wherein the second data is encrypted data corresponding to the first data;

[0031] A decryption processing unit is used to decrypt the second data in the first TEE to obtain the first data;

[0032] The data return unit is used to return the first data to the first application.

[0033] Eighthly, embodiments of this application provide a key management device applied to a key management module, the device comprising:

[0034] A request receiving unit is used to receive a key acquisition request sent by the data processing module, wherein the key acquisition request includes an application identifier corresponding to the first application;

[0035] A key generation unit is configured to, in response to the key acquisition request, generate a first key corresponding to the first application in the second TEE based on the application identifier;

[0036] A key sending unit is used to send the first key to the data processing module via a secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

[0037] Ninthly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;

[0038] When the processor executes the computer program instructions, it implements the steps of the data storage method as described in any embodiment of the first aspect, the data reading method as described in any embodiment of the second aspect, or the key management method as described in any embodiment of the third aspect.

[0039] In a tenth aspect, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps of the data storage method described in any embodiment of the first aspect, the data reading method described in any embodiment of the second aspect, or the key management method described in any embodiment of the third aspect.

[0040] In the eleventh aspect, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform steps of a data storage method as described in any embodiment of the first aspect, a data reading method as described in any embodiment of the second aspect, or a key management method as described in any embodiment of the third aspect.

[0041] The data storage method, apparatus, system, device, medium, and product in this application embodiment establish a data processing module between the first application and the data storage system. This module, leveraging the hardware-based security capabilities of confidential computing, encrypts the first data to be stored in the first application within a TEE (Trusted Execution Environment). The encrypted ciphertext data, i.e., the second data, is then sent to the data storage system for processing and disk storage. Because the encryption computation is performed within a hardware-based trusted execution environment, the security of the encryption computation process during data storage is enhanced. Furthermore, since the data storage system receives ciphertext data, even maintenance personnel or those with super-administrative privileges cannot obtain plaintext data from the data storage system, thus improving data storage security. Attached Figure Description

[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is an architecture diagram applicable to the data storage method provided in this application;

[0044] Figure 2 This is another architecture diagram applicable to the data storage method provided in this application;

[0045] Figure 3 This is a flowchart illustrating a data storage method provided in one embodiment of this application;

[0046] Figure 4This is a schematic diagram of a key management structure provided in this application;

[0047] Figure 5 This is a schematic diagram of a data storage scenario provided in this application;

[0048] Figure 6 This is a flowchart illustrating a data reading method provided in one embodiment of this application;

[0049] Figure 7 This is a schematic diagram of a data reading scenario provided in this application;

[0050] Figure 8 This is a flowchart illustrating a key management method provided in one embodiment of this application;

[0051] Figure 9 This is a schematic diagram of an application integration and deployment method provided in this application;

[0052] Figure 10 This is a schematic diagram of one of the proxy gateway deployment methods provided in this application;

[0053] Figure 11 This is a schematic diagram of the structure of a data storage device provided in one embodiment of this application;

[0054] Figure 12 This is a schematic diagram of the structure of a data reading device provided in one embodiment of this application;

[0055] Figure 13 This is a schematic diagram of the structure of a key management device provided in one embodiment of this application;

[0056] Figure 14 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0057] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0058] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0059] With the rapid development of digital financial services and the migration of data to the cloud and edge, data protection in its usage state is crucial. Currently, the security capabilities for data in the computational state are insufficient, resulting in a missing link in the data security chain. Confidential computing is a key technology for addressing this issue. Confidential computing refers to a technology that protects data in use by performing computations within a hardware-based TEE (Transmission over Environment) and is one of the three mainstream technologies for privacy computing.

[0060] To address the problems of existing technologies, this application provides a data storage method, apparatus, system, device, medium, and product based on confidential computing. The data storage method provided in this application can be applied to, for example... Figure 1 and Figure 2 In the architecture, specifically combined Figure 1 and Figure 2 Please provide a detailed explanation.

[0061] Figure 1 This is an architecture diagram applicable to the data storage method provided in this application.

[0062] like Figure 1 As shown in the diagram, the architecture may include a first electronic device 11 corresponding to the first application, a second electronic device 12 containing the key management module, and a third electronic device 13 containing the data storage system. The first electronic device 11 may contain a data processing module. The first electronic device 11 and the second electronic device 12 can establish a secure channel through remote authentication for key transmission. The first electronic device 11 and the third electronic device 13 can communicate via a network for encrypted data transmission. Furthermore, the first electronic device 11, the second electronic device 12, and the third electronic device 13 can be devices with storage and computing capabilities, such as servers, cloud servers, and server clusters.

[0063] Figure 2This is another architecture diagram applicable to the data storage method provided in this application.

[0064] like Figure 2 As shown in the diagram, the architecture may include a fourth electronic device 21 corresponding to the first application, a device cluster 22 containing the data processing gateway cluster, a fifth electronic device 23 containing the key management module, and a sixth electronic device 24 containing the data storage system. Device cluster 22 and the fifth electronic device 23 can establish a secure channel through remote authentication for key transmission. The fourth electronic device 21 and device cluster 22 can communicate via a network for plaintext data transmission. Device cluster 22 and the sixth electronic device 24 can communicate via a network for encrypted data transmission. Furthermore, device cluster 22 can be a cloud server or server cluster, or other devices with storage and computing capabilities. The fourth electronic device 21, fifth electronic device 23, and sixth electronic device 24 can be servers, cloud servers, server clusters, or other devices with storage and computing capabilities.

[0065] Based on the two architectures mentioned above, the first application can integrate a data security storage service SDK (Software Development Kit) to call a unified encapsulated data read / write interface to achieve secure data storage; the data processing module can be used to perform data encryption and decryption calculations; the key management module can be used to manage the entire lifecycle of keys, including key generation, storage, distribution, and updates; and the data storage system can be used to process and store ciphertext data. For the storage of unstructured data, the data storage system can be, for example, a file system for storing file data.

[0066] Therefore, based on the above architecture, the data storage method provided in this application embodiment can be applied to scenarios where data generated by applications is stored securely. The data storage method provided in this application embodiment is described below.

[0067] Figure 3 This is a flowchart illustrating a data storage method provided in one embodiment of this application. This data storage method can be applied in a data processing module.

[0068] like Figure 3 As shown, this data storage method may specifically include the following steps:

[0069] S310, Obtain the first data to be stored corresponding to the first application;

[0070] S320. Encrypt the first data in the first Trusted Execution Environment (TEE) to obtain the second data;

[0071] S330. Send the second data to the data storage system to store the second data in the data storage system.

[0072] Therefore, by setting up a data processing module between the first application and the data storage system, this module leverages the hardware-based security capabilities of confidential computing to encrypt the first data to be stored in the first application within the TEE (Trusted Execution Environment). The resulting ciphertext data, i.e., the second data, is then sent to the data storage system for processing and disk storage. Since the encrypted computation is performed within a hardware-based trusted execution environment, the security of the encrypted computation process during data storage is enhanced. Furthermore, because the data storage system receives ciphertext data, even system administrators or those with super-administrative privileges cannot access the plaintext data, thus improving data storage security.

[0073] The specific implementation methods for each of the above steps are described below.

[0074] In some implementations, in S310, the first application can be any application, and the first data can be business data to be stored generated by the first application. This business data can be unstructured data, such as file data.

[0075] For example, the first application can input plaintext data, i.e., the first data, by calling the storage interface provided by the data processing module, and then send the first data to the data processing module, which will encrypt the first data and trigger the data storage process.

[0076] In some implementations, in S320 and S330, the first TEE is a hardware-based trusted execution environment set up in the data processing module. The data processing module can transfer the acquired first data to the first TEE to perform encrypted calculations within the first TEE. The key used for the encrypted calculations can be a key pre-stored in the first TEE or generated based on the application identifier of the first application; this is not limited here.

[0077] For example, after encrypting the first data, the first TEE can return the encrypted ciphertext data, i.e. the second data, to the encryption agent in the data processing module. After obtaining the second data, the encryption agent calls the underlying storage interface provided by the data storage system to send the second data to the data storage system in ciphertext form so that the data storage system can perform encryption processing and disk storage operations.

[0078] Furthermore, since the data storage system may contain data stored by different applications, or data of different types stored within the same application, different data may need to be stored in different directories within the data storage system. Therefore, prior to S330 above, the data storage method provided in this application embodiment may further include:

[0079] Obtain the data storage directory corresponding to the first application.

[0080] Based on this, the aforementioned S330 may specifically include:

[0081] The system calls the corresponding storage interface of the data storage system according to the data storage catalog, and sends the second data to the data storage system through the storage interface.

[0082] For example, when the first application sends the first data to the data processing module through the storage interface provided by the data processing module, it can also send the data storage directory to the data processing module at the same time. After the data processing module completes the encryption processing of the first data, it can call the underlying storage interface of the data storage system according to the data storage directory to store the encrypted data corresponding to the first data, that is, the second data, in the corresponding directory of the data storage system.

[0083] In this way, by obtaining the data storage directory and storing data according to that directory, the isolation between different application or business data can be improved, and the security of data storage can be further enhanced.

[0084] In addition, to further improve the security of data storage between different applications, in some possible implementations, before S320, the data storage method provided in this application embodiment may further include:

[0085] Obtain the application identifier corresponding to the first application;

[0086] In the first TEE, the first key corresponding to the first application is obtained based on the application identifier.

[0087] Based on this, the aforementioned S320 may specifically include:

[0088] In the first TEE, the first data is encrypted using the first key to obtain the second data.

[0089] Here, the application identifier can be information that can uniquely identify the application, such as the application's unique identifier code, name, etc.

[0090] For example, when the first application sends the first data to the data processing module through the storage interface provided by the data processing module, it may also send the application identifier of the first application to the data processing module at the same time, so that the data processing module can obtain the first key corresponding to the first application based on the application identifier.

[0091] In some examples, when the data storage function is used for the first time by the first application, the first key may be a working key corresponding to the first application, randomly generated based on the application identifier. When the data storage function is not used for the first application for the first time, the first key may be a previously generated and stored working key corresponding to the first application, retrieved from the first TEE based on the application identifier. The generation process of the first key can be executed in the first TEE of the data processing module, or in the TEE of other modules; this is not limited to these specific instances.

[0092] In this way, by using application identifiers to map different applications to different keys, a one-to-one correspondence between applications and encryption keys can be established, thereby achieving data isolation between different applications and further improving the security of data storage between different applications.

[0093] In addition, to improve the security and stability of key storage, in some embodiments, before the step of obtaining the first key corresponding to the first application based on the application identifier in the first TEE, the data storage method provided in this application embodiment may further include:

[0094] Send a key acquisition request to the key management module. The key acquisition request includes an application identifier. The key acquisition request is used to instruct the key management module to generate a first key corresponding to the first application in the second TEE based on the application identifier.

[0095] The receiving key management module receives the first key sent through the secure channel.

[0096] Here, in order to prevent the inability to encrypt and decrypt data after the device where the first TEE is located crashes, this embodiment of the application can delegate the entire lifecycle management operations of the key, such as key generation, storage, distribution, and updating, to the key management module in other devices.

[0097] For example, when the first application calls the security storage service for the first time, it will first initialize the working key. The working key (i.e. the first key) is generated and distributed by the key management module deployed in a bypass manner.

[0098] like Figure 4As shown, when the first application calls the secure storage service for the first time, the data processing module can send a key acquisition request to the key management module, uploading the application identifier to the key management module. The key management module then randomly generates a working key corresponding to the first application (i.e., the first key) in its second TEE based on the application identifier, and stores the first key in its database, associating it with the application identifier. Next, a secure channel is established between the second TEE in the key management module and the first TEE in the data processing module via remote authentication. The key management module then sends the first key to the data processing module through this secure channel, enabling the data processing module to perform encryption and decryption calculations on the first application's data using this first key. This secure channel can be, for example, a channel established based on public-key encryption technology. For example, the key management module can encrypt the first key using a public key agreed upon with the data processing module, send the encrypted first key to the data processing module, and then the data processing module can decrypt the encrypted first key using the agreed public key to securely obtain the first key. The encryption methods used in this secure channel include, but are not limited to, symmetric encryption and asymmetric encryption.

[0099] In this way, by placing the key generation process in the TEE of other modules, the first key corresponding to the first application can be retrieved from the TEE of other devices in a timely manner after the device where the first TEE of the data processing module is located crashes, thereby improving the security and stability of key storage.

[0100] Therefore, to further improve the security of key storage, in some embodiments, after the step of receiving the first key sent by the key management module through a secure channel, the data storage method provided in this application embodiment may further include:

[0101] In the first TEE, the first key is encrypted according to the root key corresponding to the first TEE to obtain the first key ciphertext;

[0102] The application identifier and the first key ciphertext are stored accordingly.

[0103] Here, the root key can be, for example, a physical root sealing key provided by the confidential computing environment. This root sealing key can be automatically derived by the data processing module in the first TEE by calling the system interface of the device it resides in based on the trusted base information. The trusted base information can include information that uniquely identifies the hardware device, such as the CPU security version number of the device where the first TEE resides, the key materials pre-installed within the CPU, and the device's factory identifier. That is, one TEE in a hardware device corresponds to one root sealing key, which can be automatically generated according to certain rules based on hardware information such as the CPU security version number and the key materials pre-installed within the CPU.

[0104] For example, such as Figure 4 As shown, after receiving the first key, the data processing module can encrypt the first key using the physical root key provided by the confidential computing environment, and then store the obtained first key ciphertext in the data processing module after associating it with the application identifier corresponding to the first application.

[0105] In this way, by encrypting and storing the first key in the data processing module, the plaintext information of the first key can be kept out of the TEE, thereby further improving the security of key storage.

[0106] Based on this, in some possible implementations, the step of obtaining the first key corresponding to the first application based on the application identifier in the first TEE may specifically include:

[0107] Obtain the first key ciphertext corresponding to the application identifier;

[0108] In the first TEE, the first key ciphertext is decrypted based on the root key corresponding to the first TEE to obtain the first key corresponding to the first application.

[0109] Here, if the data processing module stores the ciphertext of the first key associated with the application identifier of the first application, the root key of the first TEE can be used to decrypt the ciphertext of the first key, thereby obtaining the first key corresponding to the first application. This facilitates the encryption of the data of the first application, such as the first data. The decryption calculation process occurs within the first TEE, ensuring that the plaintext key does not leave the TEE.

[0110] In this way, by decrypting the first key ciphertext in the first TEE, the security of key storage and retrieval can be further improved, thereby enhancing the security of the data encryption process.

[0111] To better describe the above data storage method, some specific examples are given based on the above embodiments.

[0112] For example, such as Figure 5 As shown, the specific process of the data storage method may include: application 51 calling the storage interface of data processing module 52 and inputting parameters such as plaintext data, application identifier, and data storage directory; encryption agent 521 in data processing module 52 passing the plaintext data and application identifier to TEE 522 in its own module for encryption; TEE 522 selecting a key according to the application identifier and performing encryption calculation, returning ciphertext data to encryption agent 521; after obtaining the ciphertext data, encryption agent 521 calling the underlying storage interface of data storage system 53 according to the storage directory to store the ciphertext data in data storage system 53.

[0113] In addition, corresponding to the above data storage method, this application embodiment also provides a data reading method, which can be applied to scenarios of securely reading data stored in the application. The data reading method provided by this application embodiment will be described below.

[0114] Figure 6 This is a schematic flowchart of a data reading method provided in one embodiment of this application. This data reading method can be applied to a data processing module.

[0115] like Figure 6 As shown, this data reading method may specifically include the following steps:

[0116] S610. In response to the operation of the first application to read the first data, obtain the second data from the data storage system, wherein the second data is the encrypted data corresponding to the first data;

[0117] S620. Decrypt the second data in the first TEE to obtain the first data;

[0118] S630: Return the first data to the first application.

[0119] Therefore, by setting up a data processing module between the first application and the data storage system, when the first application reads the required first data, it retrieves the corresponding encrypted data, i.e., the second data, from the data storage system and reads it into the data processing module in ciphertext form. The data processing module, leveraging the hardware-based security capabilities of confidential computing, decrypts the second data corresponding to the first data to be read by the first application within the TEE (Trusted Execution Environment), and returns the decrypted plaintext data, i.e., the first data, to the first application, completing the data reading process. In this way, since the decryption calculation is performed in a hardware-based trusted execution environment, the security of the decryption calculation process during data reading is improved. Furthermore, because the data read from the data storage system is ciphertext, even the data storage system's maintenance personnel or those with super-administrative privileges cannot obtain the plaintext data, thus enhancing the security of data reading.

[0120] The specific implementation methods for each of the above steps are described below.

[0121] In some implementations, in S610, the second data may be data obtained by the first application after encryption processing in the data processing module when storing the first data.

[0122] For example, the first application can call the reading interface provided by the data processing module, input a data reading instruction corresponding to the first data, and then send the data reading instruction to the data processing module, so that the data processing module can obtain the corresponding second data from the corresponding data storage system.

[0123] Furthermore, since the data storage system may contain data stored by different applications, or data of different types stored within the same application, different data may need to be stored in different directories within the data storage system. Therefore, prior to S610 above, the data reading method provided in this application embodiment may further include:

[0124] Get the data storage directory corresponding to the first data;

[0125] Retrieve second data from the data storage system, including:

[0126] The system calls the corresponding read interface of the data storage system according to the data storage catalog, and retrieves the second data from the data storage system through the read interface.

[0127] For example, when the first application calls the read interface provided by the data processing module to read the first data, it can also send the data storage directory of the second data corresponding to the first data to the data processing module. In this way, the data processing module can call the underlying read interface of the data storage system according to the data storage directory to read the encrypted data corresponding to the first data, that is, the second data, from the corresponding directory in the data storage system.

[0128] In this way, by obtaining the data storage directory and reading data according to that directory, the isolation between different application or business data can be improved, and the security of data storage can be further enhanced.

[0129] In some implementations, in S620 and S630, the data processing module can transfer the acquired second data to the first TEE for decryption calculation. The key used for decryption calculation can be a key pre-stored in the first TEE or generated based on the application identifier of the first application; this is not limited here.

[0130] For example, after decrypting the second data, the first TEE can return the decrypted plaintext data, i.e. the first data, to the encryption proxy in the data processing module. After obtaining the first data, the encryption proxy returns the first data to the first application through the read interface of the data processing module called by the first application, so that the first application can perform business processing and other operations.

[0131] In addition, to further improve the security of data storage between different applications, in some possible implementations, before S620, the data reading method provided in this application embodiment may further include:

[0132] Obtain the application identifier corresponding to the first application;

[0133] In the first TEE, the first key corresponding to the first application is obtained based on the application identifier;

[0134] Based on this, the aforementioned S620 may specifically include:

[0135] In the first TEE, the second data is decrypted according to the first key to obtain the first data.

[0136] For example, when the first application calls the read interface provided by the data processing module to read the first data, it can also send the application identifier of the first application to the data processing module, so that the data processing module can obtain the first key corresponding to the first application based on the application identifier.

[0137] In some examples, the first key can be a working key corresponding to the first application, generated and stored in the first TEE based on the application identifier, and previously stored during data storage. The first key can be stored in encrypted form to ensure that the plaintext information of the key does not leave the TEE, thus improving the security of key storage.

[0138] Based on this, in some implementations, the step of obtaining the first key corresponding to the first application based on the application identifier in the first TEE may specifically include:

[0139] Obtain the first key ciphertext corresponding to the application identifier;

[0140] In the first TEE, the first key ciphertext is decrypted based on the root key corresponding to the first TEE to obtain the first key corresponding to the first application.

[0141] Here, the data processing module stores a first key ciphertext associated with the application identifier of the first application. Since this first key ciphertext is obtained by encrypting the first key using the root key of the first TEE, the first key ciphertext can be decrypted using the root key of the first TEE to obtain the first key corresponding to the first application. This facilitates the decryption of the encrypted data of the first application, such as the second data. The decryption calculation process occurs within the first TEE, ensuring that the plaintext key does not leave the TEE.

[0142] In this way, by decrypting the first key ciphertext in the first TEE, the security of key storage and retrieval can be further improved, thereby enhancing the security of the data encryption and decryption process.

[0143] To better describe the above data reading method, some specific examples are given based on the above embodiments.

[0144] For example, such as Figure 7As shown, the specific process of the data reading method may include: application 71 calling the reading interface of data processing module 72 and inputting the application identifier and data storage directory; encryption agent 721 in data processing module 72 calling the underlying reading interface of data storage system 73 to read ciphertext data from data storage system 73; data processing module 72 passing the ciphertext data and application identifier to TEE 722 in its own module for decryption; TEE 722 selecting a key according to the application identifier and performing decryption, returning plaintext data to encryption agent 721; encryption agent 721 returning the plaintext data to application 71.

[0145] In addition, this application also provides a key management method, which can be applied to scenarios where keys are securely managed. The key management method provided in this application is described below.

[0146] Figure 8 This is a flowchart illustrating a key management method provided in one embodiment of this application. This key management method can be applied to a key management module.

[0147] like Figure 8 As shown, the key management method may specifically include the following steps:

[0148] S810, Receive a key acquisition request sent by the data processing module, wherein the key acquisition request includes an application identifier corresponding to the first application;

[0149] S820. In response to the key acquisition request, a first key corresponding to the first application is generated in the second TEE according to the application identifier;

[0150] S830: Send the first key to the data processing module through the secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

[0151] Therefore, by setting up a separate key management module and placing the key generation process within its second TEE, the first key corresponding to the first application can be promptly retrieved from the key management module's TEE even if the device containing the first TEE of the data processing module fails, thereby improving the security and stability of key storage. Furthermore, having the key management module perform key generation and distribution management operations allows for unified management of keys for multiple applications, saving management overhead on the data processing module and improving key management efficiency.

[0152] The specific implementation methods for each of the above steps are described below.

[0153] In some implementations, in S810, when the first application calls the security storage service for the first time, it will first initialize the working key. The working key (i.e. the first key) is generated and distributed by the key management module deployed in a bypass manner.

[0154] For example, when the first application calls the security storage service for the first time, the data processing module can send a key acquisition request to the key management module and send the application identifier to the key management module. After receiving the key acquisition request sent by the data processing module, the key management module can obtain the application identifier corresponding to the first application from the key acquisition request in order to generate a key.

[0155] In some implementations, in S820, the second TEE can be a trusted execution environment set in the key management module. To ensure key security and prevent the plaintext of the key from leaving the TEE, the key generation process can be executed in the second TEE.

[0156] For example, the key management module can randomly generate a working key corresponding to the first application, i.e., the first key, in its second TEE based on the application identifier.

[0157] In addition, to back up and save the keys so that previously acquired keys can still be retrieved from the key management module even if the device housing the data processing module fails, the key management method described above may further include, in some possible implementations:

[0158] In the second TEE, the first key is encrypted according to the root key corresponding to the second TEE to obtain the second key ciphertext;

[0159] The application identifier and the second key ciphertext are stored accordingly.

[0160] Here, similar to the root key corresponding to the first TEE, the second TEE also has a corresponding root key.

[0161] For example, after the data management module generates the first key in the second TEE, it can encrypt the first key using the physical root key provided by the confidential computing environment, and then store the obtained second key ciphertext together with the application identifier corresponding to the first application in the database of the key management module.

[0162] In this way, by encrypting and storing the first key in the data management module, the plaintext information of the first key can be kept out of the TEE, thereby further improving the security of key storage.

[0163] In some implementations, in S830, the secure channel can be, for example, a channel established based on public-key encryption technology. This public-key encryption technology can involve the key management module encrypting a first key using a public key agreed upon with the data processing module, sending the encrypted first key to the data processing module, and then the data processing module decrypting the encrypted first key using the agreed public key to securely obtain the first key. Here, the encryption method used in the secure channel includes, but is not limited to, symmetric encryption and asymmetric encryption.

[0164] For example, after the key management module generates the first key, the second TEE in the key management module and the first TEE in the data processing module can establish a secure channel through remote authentication. The key management module then sends the first key to the data processing module through this secure channel, so that the data processing module can encrypt and decrypt the data of the first application based on the first key.

[0165] For details of the above process, please refer to [link / reference]. Figure 4 The relevant descriptions will not be repeated here.

[0166] Based on the same inventive concept, this application provides a data processing system, which may include a data processing module and a key management module. The data processing module can be used to execute the data storage method as described in the embodiment corresponding to the first aspect, and the data reading method as described in the embodiment corresponding to the second aspect; the key management module can be used to execute the key management method as described in the embodiment corresponding to the third aspect.

[0167] In some implementations, the data processing module may be located in the application server corresponding to the first application.

[0168] For example, the data processing module can be deployed through application integration. For instance... Figure 9 As shown, this method is an application-exclusive mode, that is, the data processing module is directly deployed on the application server corresponding to the first application, thereby enabling secure access to the application's unstructured data.

[0169] In addition, this application also provides a data processing system, which may include a data processing gateway cluster and a key management module. The data processing gateway cluster includes a proxy module and multiple data processing modules.

[0170] Specifically, the proxy module can be used to allocate corresponding data processing modules to multiple applications respectively; the first data processing module corresponding to the first application can be used to execute the data storage method as described in the embodiment corresponding to the first aspect, and the data reading method as described in the embodiment corresponding to the second aspect, wherein the first application is any one of the multiple applications; the key management module can be used to execute the key management method as described in the embodiment corresponding to the third aspect.

[0171] In order to address the issue that the application server may not have confidential computing capabilities, this embodiment of the application may also deploy the data processing module in a data processing gateway cluster, which may be located in the same intranet as the application server.

[0172] For example, such as Figure 10 As shown, this method is a multi-application sharing mode. That is, the data processing module is directly deployed in the same intranet data processing gateway cluster as the application server of the first application. This allows multiple applications, including the first application, to share a single secure storage service infrastructure, enabling secure data access even if the application server lacks a TEE (Trusted Execution Environment). When an application needs to store or retrieve data, it can call the unified storage / retrieval interface provided by the data processing gateway cluster. The proxy module will temporarily allocate a data processing module to the application to provide data encryption and decryption services during storage or retrieval.

[0173] Based on the same inventive concept, this application also provides a data storage device, specifically combined with... Figure 11 Please provide a detailed explanation.

[0174] Figure 11 This is a schematic diagram of a data storage device provided in one embodiment of this application. The device can be applied to a data processing module.

[0175] like Figure 11 As shown, the data storage device 1100 may include:

[0176] The first acquisition unit 1101 is used to acquire the first data to be stored corresponding to the first application;

[0177] The encryption processing unit 1102 is used to encrypt the first data in the first trusted execution environment (TEE) to obtain the second data.

[0178] The data sending unit 1103 is used to send the second data to the data storage system so as to store the second data in the data storage system.

[0179] The data storage device 1100 described above will be described in detail below:

[0180] In some embodiments, the data storage device 1100 further includes:

[0181] The third acquisition unit is used to encrypt the first data in the first trusted execution environment (TEE) and acquire the application identifier corresponding to the first application before obtaining the second data.

[0182] The fourth acquisition unit is used to acquire, in the first TEE, a first key corresponding to the first application based on the application identifier;

[0183] The encryption processing unit 1102 includes:

[0184] The first encryption subunit is used to encrypt the first data in the first TEE according to the first key to obtain the second data.

[0185] In some embodiments, the data storage device 1100 further includes:

[0186] The first sending unit is configured to send a key acquisition request to the key management module before acquiring the first key corresponding to the first application based on the application identifier in the first TEE. The key acquisition request includes the application identifier. The key acquisition request is used to instruct the key management module to generate the first key corresponding to the first application based on the application identifier in the second TEE.

[0187] The first receiving unit is used to receive the first key sent by the key management module through a secure channel.

[0188] In some embodiments, the data storage device 1100 further includes:

[0189] The first encryption unit is configured to, after receiving the first key sent by the key management module through a secure channel, encrypt the first key in the first TEE according to the root key corresponding to the first TEE to obtain the first key ciphertext.

[0190] The first storage unit is used to store the application identifier and the first key ciphertext in correspondence.

[0191] In some embodiments, the fourth acquisition unit includes:

[0192] The first acquisition subunit is used to acquire the first key ciphertext corresponding to the application identifier;

[0193] The first decryption subunit is used to decrypt the first key ciphertext in the first TEE according to the root key corresponding to the first TEE, so as to obtain the first key corresponding to the first application.

[0194] In some embodiments, the data storage device 1100 further includes:

[0195] The fifth acquisition unit is used to acquire the data storage directory corresponding to the first application before sending the second data to the data storage system;

[0196] The data transmission unit 1103 includes:

[0197] The sending subunit is used to call the storage interface corresponding to the data storage system according to the data storage directory, and send the second data to the data storage system through the storage interface.

[0198] Therefore, by setting up a data processing module between the first application and the data storage system, this module leverages the hardware-based security capabilities of confidential computing to encrypt the first data to be stored in the first application within the TEE (Trusted Execution Environment). The resulting ciphertext data, i.e., the second data, is then sent to the data storage system for processing and disk storage. Since the encrypted computation is performed within a hardware-based trusted execution environment, the security of the encrypted computation process during data storage is enhanced. Furthermore, because the data storage system receives ciphertext data, even system administrators or those with super-administrative privileges cannot access the plaintext data, thus improving data storage security.

[0199] Based on the same inventive concept, this application also provides a data reading device, specifically combined with... Figure 12 Please provide a detailed explanation.

[0200] Figure 12 This is a schematic diagram of a data reading device provided in one embodiment of this application. The device can be applied to a data processing module.

[0201] like Figure 12 As shown, the data reading device 1200 may include:

[0202] The second acquisition unit 1201 is used to acquire second data from the data storage system in response to the first application's operation of reading first data, wherein the second data is encrypted data corresponding to the first data;

[0203] The decryption processing unit 1202 is used to decrypt the second data in the first TEE to obtain the first data;

[0204] The data return unit 1203 is used to return the first data to the first application.

[0205] The data reading device 1200 described above will be described in detail below:

[0206] In some embodiments, the data reading device 1200 described above further includes:

[0207] The sixth acquisition unit is used to decrypt the second data in the first TEE and, before obtaining the first data, acquire the application identifier corresponding to the first application.

[0208] The seventh acquisition unit is used to acquire, in the first TEE, a first key corresponding to the first application based on the application identifier;

[0209] The decryption processing unit 1202 includes:

[0210] The second decryption subunit is used to decrypt the second data in the first TEE according to the first key to obtain the first data.

[0211] In some embodiments, the seventh acquisition unit includes:

[0212] The second acquisition subunit is used to acquire the first key ciphertext corresponding to the application identifier;

[0213] The third decryption subunit is used to decrypt the first key ciphertext in the first TEE according to the root key corresponding to the first TEE, so as to obtain the first key corresponding to the first application.

[0214] In some embodiments, the data reading device 1200 described above further includes:

[0215] The eighth acquisition unit is used to acquire the data storage directory corresponding to the first data before acquiring the second data from the data storage system;

[0216] The second acquisition unit 1201 includes:

[0217] The third acquisition subunit is used to call the corresponding read interface of the data storage system according to the data storage directory, and acquire the second data from the data storage system through the read interface.

[0218] Therefore, by setting up a data processing module between the first application and the data storage system, when the first application reads the required first data, it retrieves the corresponding encrypted data, i.e., the second data, from the data storage system and reads it into the data processing module in ciphertext form. The data processing module, leveraging the hardware-based security capabilities of confidential computing, decrypts the second data corresponding to the first data to be read by the first application within the TEE (Trusted Execution Environment), and returns the decrypted plaintext data, i.e., the first data, to the first application, completing the data reading process. In this way, since the decryption calculation is performed in a hardware-based trusted execution environment, the security of the decryption calculation process during data reading is improved. Furthermore, because the data read from the data storage system is ciphertext, even the data storage system's maintenance personnel or those with super-administrative privileges cannot obtain the plaintext data, thus enhancing the security of data reading.

[0219] Based on the same inventive concept, this application also provides a data reading device, specifically combined with... Figure 13 Please provide a detailed explanation.

[0220] Figure 13 This is a schematic diagram of a key management device provided in one embodiment of this application. The device can be applied to a key management module.

[0221] like Figure 13 As shown, the key management device 1300 may include:

[0222] The request receiving unit 1301 is used to receive a key acquisition request sent by the data processing module, wherein the key acquisition request includes an application identifier corresponding to the first application;

[0223] The key generation unit 1302 is configured to, in response to the key acquisition request, generate a first key corresponding to the first application in the second TEE based on the application identifier;

[0224] The key sending unit 1303 is used to send the first key to the data processing module through a secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

[0225] The key management device 1300 described above will be explained in detail below:

[0226] In some embodiments, the key management device 1300 further includes:

[0227] The second encryption unit is used to encrypt the first key in the second TEE according to the root key corresponding to the second TEE to obtain the second key ciphertext.

[0228] The second storage unit is used to store the application identifier and the second key ciphertext accordingly.

[0229] Therefore, by setting up a separate key management module and placing the key generation process within its second TEE, the first key corresponding to the first application can be promptly retrieved from the key management module's TEE even if the device containing the first TEE of the data processing module fails, thereby improving the security and stability of key storage. Furthermore, having the key management module perform key generation and distribution management operations allows for unified management of keys for multiple applications, saving management overhead on the data processing module and improving key management efficiency.

[0230] Figure 14 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application.

[0231] The electronic device 1400 may include a processor 1401 and a memory 1402 storing computer program instructions.

[0232] Specifically, the processor 1401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0233] Memory 1402 may include mass storage for data or instructions. For example, and not limitingly, memory 1402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1402 may include removable or non-removable (or fixed) media. Where appropriate, memory 1402 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 1402 is non-volatile solid-state memory.

[0234] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0235] The processor 1401 implements any of the methods described above by reading and executing computer program instructions stored in the memory 1402.

[0236] In some examples, electronic device 1400 may also include communication interface 1403 and bus 1410. For example, Figure 14 As shown, the processor 1401, memory 1402, and communication interface 1403 are connected through bus 410 and complete communication with each other.

[0237] The communication interface 1403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0238] Bus 1410 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not as a limitation, bus 1410 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0239] For example, the electronic device 1400 can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc.

[0240] The electronic device 1400 can execute any of the methods described in the embodiments of this application, thereby achieving the combination Figures 1 to 13 Any of the methods and apparatus described.

[0241] Furthermore, in conjunction with any of the methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.

[0242] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0243] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0244] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0245] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0246] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A data storage method, applied to a data processing module in a data processing system, characterized in that, The data processing system further includes a key management module and a data storage system, which are deployed on different devices. The method includes: Obtain the first data to be stored corresponding to the first application; the first application and the data processing module are on the same device; The first data is encrypted in the first Trusted Execution Environment (TEE) to obtain the second data. Send the second data to the data storage system to store the second data in the data storage system; Before encrypting the first data in a first Trusted Execution Environment (TEE) to obtain the second data, the method further includes: Obtain the application identifier corresponding to the first application; In the first TEE, a first key corresponding to the first application is obtained according to the application identifier; different applications correspond to different keys, and the entire lifecycle management operation of the generation, storage, distribution, and updating of the first key is performed by the key management module; the first key is a working key corresponding to the first application randomly generated by the key management module according to the application identifier of the first application. The encryption of the first data in the first Trusted Execution Environment (TEE) to obtain the second data includes: In the first TEE, the first data is encrypted using the first key to obtain the second data.

2. The method according to claim 1, characterized in that, In the first TEE, before obtaining the first key corresponding to the first application based on the application identifier, the method further includes: Send a key acquisition request to the key management module. The key acquisition request includes the application identifier. The key acquisition request is used to instruct the key management module to generate a first key corresponding to the first application in the second TEE based on the application identifier. Receive the first key sent by the key management module through a secure channel.

3. The method according to claim 2, characterized in that, After receiving the first key sent by the key management module via a secure channel, the method further includes: In the first TEE, the first key is encrypted according to the root key corresponding to the first TEE to obtain the first key ciphertext; The application identifier and the first key ciphertext are stored accordingly.

4. The method according to claim 1, characterized in that, In the first TEE, obtaining the first key corresponding to the first application based on the application identifier includes: Obtain the first key ciphertext corresponding to the application identifier; In the first TEE, the first key ciphertext is decrypted according to the root key corresponding to the first TEE to obtain the first key corresponding to the first application.

5. The method according to claim 1, characterized in that, Before sending the second data to the data storage system, the method further includes: Obtain the data storage directory corresponding to the first application; Sending the second data to the data storage system includes: The storage interface corresponding to the data storage system is invoked according to the data storage catalog, and the second data is sent to the data storage system through the storage interface.

6. A data reading method, applied to a data processing module in a data processing system, characterized in that, The data processing system further includes a key management module and a data storage system, which are deployed on different devices. The method includes: In response to the first application's operation of reading first data, second data is obtained from the data storage system, wherein the second data is encrypted data corresponding to the first data; the first application and the data processing module are on the same device; the second data is obtained by the data processing module encrypting the first data in the first TEE based on the first key corresponding to the first application; different applications correspond to different keys, and the entire lifecycle management operation of the generation, storage, distribution, and updating of the first key is performed by the key management module; the first key is a working key corresponding to the first application randomly generated by the key management module based on the application identifier of the first application; The second data is decrypted in the first TEE to obtain the first data; Return the first data to the first application; Before decrypting the second data in the first TEE to obtain the first data, the method further includes: Obtain the application identifier corresponding to the first application; In the first TEE, a first key corresponding to the first application is obtained based on the application identifier; The process of decrypting the second data in the first TEE to obtain the first data includes: In the first TEE, the second data is decrypted according to the first key to obtain the first data.

7. The method according to claim 6, characterized in that, In the first TEE, obtaining the first key corresponding to the first application based on the application identifier includes: Obtain the first key ciphertext corresponding to the application identifier; In the first TEE, the first key ciphertext is decrypted according to the root key corresponding to the first TEE to obtain the first key corresponding to the first application.

8. The method according to claim 6, characterized in that, Before retrieving the second data from the data storage system, the method further includes: Obtain the data storage directory corresponding to the first data; The step of obtaining the second data from the data storage system includes: The second data is retrieved from the data storage system by calling the corresponding read interface according to the data storage directory.

9. A key management method, applied to a key management module in a data processing system, characterized in that, The data processing system further includes a data processing module and a data storage system, wherein the data processing module, key management module, and data storage system are deployed on different devices, and the method includes: The system receives a key acquisition request sent by the data processing module, the key acquisition request including an application identifier corresponding to the first application; the first application and the data processing module are on the same device; the data processing module and the key management module are on different devices. In response to the key acquisition request, a first key corresponding to the first application is generated in the second TEE based on the application identifier; the first key is a working key corresponding to the first application randomly generated by the key management module based on the application identifier of the first application. The first key is sent to the data processing module through a secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

10. The method according to claim 9, characterized in that, The method further includes: In the second TEE, the first key is encrypted according to the root key corresponding to the second TEE to obtain the second key ciphertext; The application identifier and the second key ciphertext are stored accordingly.

11. A data processing system, characterized in that, It includes a data processing module and a key management module, wherein: The data processing module is used to execute the data storage method as described in any one of claims 1 to 5, and the data reading method as described in any one of claims 6 to 8; The key management module is used to perform the steps of the key management method as described in any one of claims 9 to 10.

12. The system according to claim 11, characterized in that, The data processing module is located in the application server corresponding to the first application.

13. A data processing system, characterized in that, It includes a data processing gateway cluster and a key management module, wherein the data processing gateway cluster includes a proxy module and multiple data processing modules; The proxy module is used to assign corresponding data processing modules to multiple applications respectively; The first data processing module corresponding to the first application is used to execute the steps of the data storage method as described in any one of claims 1 to 5 and the data reading method as described in any one of claims 6 to 8, wherein the first application is any one of the plurality of applications; The key management module is used to perform the steps of the key management method as described in any one of claims 9 to 10.

14. A data storage device, applied to a data processing module, characterized in that, The device includes: The first acquisition unit is used to acquire first data to be stored corresponding to the first application; the first application and the data processing module are located on the same device. An encryption processing unit is used to encrypt the first data in a first trusted execution environment (TEE) to obtain the second data. A data sending unit is configured to send the second data to a data storage system to store the second data in the data storage system; The data storage device further includes: The third acquisition unit is used to encrypt the first data in the first trusted execution environment (TEE) and acquire the application identifier corresponding to the first application before obtaining the second data. The fourth acquisition unit is used to acquire, in the first TEE, a first key corresponding to the first application based on the application identifier; different applications correspond to different keys, and the entire lifecycle management operation of the generation, storage, distribution, and updating of the first key is performed by a key management module in a device other than the electronic device where the data processing module is located; the first key is a working key corresponding to the first application randomly generated by the key management module based on the application identifier of the first application. The encryption processing unit includes: The first encryption subunit is used to encrypt the first data in the first TEE according to the first key to obtain the second data.

15. A data reading device, applied to a data processing module, characterized in that, The device includes: The second acquisition unit is configured to acquire second data from the data storage system in response to the first application's operation of reading first data, wherein the second data is encrypted data corresponding to the first data; the first application and the data processing module are located on the same device; the second data is obtained by the data processing module encrypting the first data in the first TEE based on the first key corresponding to the first application; different applications correspond to different keys, and the full lifecycle management operation of the generation, storage, distribution, and updating of the first key is performed by a key management module in a device other than the electronic device where the data processing module is located; the first key is a working key corresponding to the first application randomly generated by the key management module based on the application identifier of the first application. A decryption processing unit is used to decrypt the second data in the first TEE to obtain the first data; The data return unit is used to return the first data to the first application; The data reading device further includes: The sixth acquisition unit is used to decrypt the second data in the first TEE and, before obtaining the first data, acquire the application identifier corresponding to the first application. The seventh acquisition unit is used to acquire, in the first TEE, a first key corresponding to the first application based on the application identifier; The decryption processing unit includes: The second decryption subunit is used to decrypt the second data in the first TEE according to the first key to obtain the first data.

16. A key management device, applied to a key management module, characterized in that, The device includes: A request receiving unit is configured to receive a key acquisition request sent by a data processing module, wherein the key acquisition request includes an application identifier corresponding to a first application; the first application and the data processing module are located on the same device; and the data processing module and the key management module are located on different electronic devices. A key generation unit is configured to, in response to the key acquisition request, generate a first key corresponding to the first application in the second TEE based on the application identifier; the first key is a working key corresponding to the first application randomly generated by the key management module based on the application identifier of the first application. A key sending unit is used to send the first key to the data processing module via a secure channel, so that the data processing module can encrypt the first data in the first TEE according to the first key to obtain the second data.

17. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the steps of the data storage method as described in any one of claims 1-5, the data reading method as described in any one of claims 6-8, or the key management method as described in any one of claims 9-10.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the data storage method as described in any one of claims 1-5, the data reading method as described in any one of claims 6-8, or the key management method as described in any one of claims 9-10.

19. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the steps of the data storage method as described in any one of claims 1-5, the data reading method as described in any one of claims 6-8, or the key management method as described in any one of claims 9-10.

Citation Information

Patent Citations

  • Data storage method and device and electronic equipment

    CN111538995A

  • Data management method, device and system and storage medium

    CN114417362A