Privacy data processing method based on data processing system
By dividing the data into blocks in the data processing system and decrypting and processing plaintext data blocks in multiple trusted execution environments, the problem of slow data processing speed in existing technologies is solved, achieving efficient privacy data processing and secure storage.
Patent Information
- Application Number
- CN202111655728.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing data processing systems suffer from slow processing speeds due to user-side data encryption during privacy processing. Furthermore, decryption and encryption can only be performed within a single trusted execution environment, resulting in overall slow data processing speeds.
The data to be processed is divided into multiple data blocks, each of which is encrypted separately. The plaintext data blocks are then decrypted and processed in multiple trusted execution environments. Finally, the encrypted processing results are stored in external storage space to avoid executing the storage function code outside the trusted execution environment.
It improves the overall processing speed of the data processing system, ensures the security of data decryption and processing in a trusted execution environment, reduces the number of interactions with external storage space, and improves data storage and processing efficiency.
Smart Images

Figure CN114297692B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] One or more embodiments of the present disclosure relate to a privacy data processing method based on a data processing system, a privacy data processing method implemented by a data processing system, and a data processing system for privacy data processing. BACKGROUND
[0002] A big data platform refers to a set of infrastructures mainly for processing massive big data storage, computing, and real-time computing of uninterrupted flow data. By using the big data platform, data intercommunication and sharing can be achieved to maximize data value.
[0003] The big data platform can use a trusted execution environment (TEE) to provide privacy data processing. The TEE can act as a black box in hardware, and the code and data operating system layer executing in the TEE cannot be snooped, and only the pre-defined interface in the code can operate it. In terms of efficiency, due to the black box nature of the TEE, the operation in the TEE is on plaintext data, not the complex cryptography operation in homomorphic encryption, and the calculation process efficiency is not lost, so the combination with the TEE can greatly improve the security and privacy with little performance loss. The industry is very concerned about the TEE solution, and almost all mainstream chips and software alliances have their own TEE solutions, including TPM (Trusted Platform Module) in software and Intel SGX (Software Guard Extensions), ARM Trustzone, and AMD PSP (Platform Security Processor) in hardware. SUMMARY
[0004] One or more embodiments of the present disclosure relate to a privacy data processing method based on a data processing system, a privacy data processing method implemented by a data processing system, and a data processing system for privacy data processing.
[0005] According to a first aspect of one or more embodiments of the present disclosure, there is provided a privacy data processing method based on a data processing system, the data processing system comprising a plurality of trusted execution environments, the method comprising: on a first user side: dividing data to be processed into a plurality of data blocks, each data block comprising a plurality of data rows; and encrypting each data block respectively to obtain a plurality of ciphertext data blocks, and transmitting the plurality of ciphertext data blocks to the data processing system; and on the data processing system: assigning each ciphertext data block to one trusted execution environment of the plurality of trusted execution environments; the trusted execution environment decrypting the ciphertext data block into a plaintext data block, and processing each data row of the plurality of data rows in the plaintext data block to obtain a plaintext processing result; the trusted execution environment encrypting the plaintext processing result to obtain a ciphertext processing result, and outputting the ciphertext processing result outside the trusted execution environment; and executing a storage function code outside the trusted execution environment to store the ciphertext processing result to an external storage space.
[0006] According to a second aspect of one or more embodiments of the present disclosure, there is provided a privacy data processing method implemented by a data processing system, the data processing system comprising a plurality of trusted execution environments, the method comprising: receiving a plurality of ciphertext data blocks corresponding to data to be processed from a first user, wherein each ciphertext data block is encrypted respectively; assigning each ciphertext data block to one trusted execution environment of the plurality of trusted execution environments; decrypting the ciphertext data block into a plaintext data block comprising a plurality of data rows, and processing each data row to obtain a plaintext processing result; encrypting the plaintext processing result to obtain a ciphertext processing result, and outputting the ciphertext processing result outside the trusted execution environment; and executing a storage function code outside the trusted execution environment to store the ciphertext processing result to an external storage space.
[0007] According to a third aspect of one or more embodiments of the present disclosure, a privacy data processing method based on a data processing system is provided, the data processing system comprising a trusted execution environment, the method comprising: at a first user side: dividing data to be processed into a plurality of data blocks, each data block comprising a plurality of data rows; and encrypting each data block respectively to obtain a plurality of ciphertext data blocks, and transmitting the plurality of ciphertext data blocks to the data processing system; and at the data processing system: the trusted execution environment reads a ciphertext data block from an external storage space outside the trusted execution environment; the trusted execution environment decrypts the ciphertext data block into a plaintext data block, and processes each data row in the plurality of data rows in the plaintext data block to obtain a plaintext processing result; the trusted execution environment encrypts the plaintext processing result to obtain a ciphertext processing result, and outputs the ciphertext processing result outside the trusted execution environment; an external storage function code is executed outside the trusted execution environment to store the ciphertext processing result to the external storage space; and the trusted execution environment reads a next ciphertext data block from the external storage space outside the trusted execution environment and processes it as described above, until all the plurality of ciphertext data blocks received by the data processing system are processed.
[0008] According to a fourth aspect of one or more embodiments of the present disclosure, a data processing system for privacy data processing is provided, comprising: a plurality of trusted execution environments; a storage unit; a communication unit configured to receive a plurality of ciphertext data blocks corresponding to data to be processed from a first user, wherein each ciphertext data block is encrypted respectively; a scheduling unit configured to assign each ciphertext data block to one trusted execution environment of the plurality of trusted execution environments, wherein each trusted execution environment is configured to: decrypt the ciphertext data block into a plaintext data block comprising a plurality of data rows, and process each data row to obtain a plaintext processing result; encrypt the plaintext processing result to obtain a ciphertext processing result, and output the ciphertext processing result outside the trusted execution environment, and the storage unit is configured to: execute a storage function code outside the trusted execution environment to store the ciphertext processing result to an external storage space.
[0009] Other characteristics of the present disclosure and advantages thereof will become more apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the attached drawings. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which constitute a part of this specification, illustrate one or more embodiments of the present disclosure and together with the description, explain the principles of one or more embodiments of the present disclosure.
[0011] The present disclosure one or more embodiments can be understood more readily by reference to the following detailed description of exemplary embodiments of the present disclosure and the attached drawings, and wherein:
[0012] Figure 1is a schematic diagram of an existing privacy data processing method based on a data processing system.
[0013] Figure 2 is a schematic diagram of a data processing system including a trusted execution environment.
[0014] Figure 3 is a schematic diagram of the processing on the user side of a privacy data processing method based on a data processing system according to one or more exemplary embodiments of the present disclosure.
[0015] Figure 4 is a schematic diagram of the processing on the data processing system side of a privacy data processing method based on a data processing system according to one or more exemplary embodiments of the present disclosure.
[0016] Figure 5 is a schematic diagram of the processing on the data processing system side of a privacy data processing method based on a data processing system according to one or more exemplary embodiments of the present disclosure.
[0017] Figure 6 is a schematic diagram of the processing on the data processing system side of a privacy data processing method based on a data processing system according to one or more exemplary embodiments of the present disclosure.
[0018] Figure 7 is a schematic diagram of a data processing system performing privacy data processing according to one or more exemplary embodiments of the present disclosure.
[0019] Figure 8 is an exemplary block diagram of a general-purpose hardware system applicable to one or more exemplary embodiments of the present disclosure. DETAILED DESCRIPTION
[0020] In order to enable persons skilled in the art to better understand the technical solutions in the present disclosure, the technical solutions in the present disclosure will be described clearly and completely in the following with reference to the accompanying drawings in the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all the embodiments. It should be understood that one or more embodiments of the present disclosure can be presented in various different ways, and are not limited to the embodiments described below. It should also be understood that one or more embodiments of the present disclosure can be combined in various ways to provide more additional embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present disclosure.
[0021] It should be understood that the terminology used herein is for describing specific embodiments only and is not intended to be limiting. All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. For the sake of brevity and / or clarity, well-known functions or structures may not be described in detail.
[0022] In this document, the term "connection" is intended to encompass a physical, electrical, and / or communicative connection between one feature and another feature, and there may or may not be an intermediate feature between the two features. When the connection is a communicative connection, even if A and B are mentioned as "directly connected," it is only intended to emphasize that the connection between A and B does not involve one or more features emphasized in one or more embodiments of this disclosure, but does not imply a limitation that A and B can be connected without any components. Those skilled in the art will understand that A and B can be connected via cables, routers, gateways, channels, links, networks, etc. It should be noted that in the accompanying drawings of one or more embodiments of this disclosure, whether the connection between A and B is direct or indirect, it is represented by a straight line or other graphic element connecting A and B.
[0023] In this document, the term “A or B” includes both “A and B” and “A or B”, rather than exclusively including only “A” or only “B”, unless otherwise specified.
[0024] In this document, the term "exemplary" means "used as an example, instance, or illustration," and not as a "model" to be precisely copied. Any implementation described herein is not necessarily to be construed as preferred or advantageous over other implementations. Moreover, one or more embodiments of this disclosure are not limited to any expressed or implied theory given in the foregoing technical field, background, summary of invention, or detailed description.
[0025] In this document, the term "substantially" means any minor variation caused by design or manufacturing defects, device or component tolerances, environmental influences, and / or other factors. The term "substantially" also allows for differences from the perfect or ideal situation due to parasitic effects, noise, and other practical considerations that may exist in actual implementations.
[0026] Additionally, terms such as “first,” “second,” etc., may be used in this document for reference purposes only and are not intended to be limiting. For example, unless the context clearly indicates otherwise, the words “first,” “second,” and other such numerical terms relating to structures or elements do not imply order or sequence.
[0027] It should also be understood that the word "comprising" when used herein is taken to specify the presence of stated features, integers, steps, or components but does not preclude the presence or addition of one or more other features, integers, steps, components, or groups thereof.
[0028] It should be noted that the steps of the respective methods are not necessarily performed in the order shown and described in other embodiments. In some other embodiments, the methods can include more or fewer steps than described in the present disclosure. Furthermore, a single step described in the present disclosure can be broken down into multiple steps in other embodiments; and multiple steps described in the present disclosure can be combined into a single step in other embodiments.
[0029] The following first describes Figure 1 The existing process of privacy data processing based on a data processing system is described. The data processing system herein can be, for example, a big data platform as described above, or other computer systems with privacy data processing capabilities.
[0030] For business data that needs to be processed by the data processing system, a user (e.g., a data owner or a data provider, etc.) will encrypt and transmit it to the data processing system for privacy data processing. On the user side, all the data to be processed stored in the database can be downloaded to the local machine and encrypted as a whole. For example, all the data to be processed can be saved as a single file and encrypted as a whole. The data to be processed is encrypted by the user side into an encrypted file, which can only be decrypted by the trusted execution environment (hereinafter also referred to as "TEE") of the data processing system. The user side transmits the encrypted file to the data processing system, and the TEE in the data processing system reads and decrypts the encrypted file. After all the data content is decrypted into plaintext, the calculation (i.e., data processing) is performed. The TEE encrypts the calculation result in a manner associated with the user and outputs the encrypted calculation result outside the TEE. The data processing system returns the encrypted calculation result to the user.
[0031] As described above, the existing privacy data processing based on the data processing system encrypts all the data to be processed as a whole on the user side. Therefore, the data file encryption process can only be performed on a single machine, which makes the data processing speed on the user side slow. In the data processing system, the decryption, data processing, and encrypted output can only be performed in a single TEE, which makes the data processing speed in the data processing system slow.
[0032] As Figure 1As shown, the data processing system can provide a plurality of users with a privacy data processing service. The data of each user can be processed separately to return a calculation result, or the data of a plurality of users can be jointly processed (e.g., data collision) and a respective calculation result is returned to each of the plurality of users.
[0033] The following describes the data processing system related to the embodiments of the present disclosure. Figure 2 The data processing system related to the embodiments of the present disclosure is described.
[0034] The data processing system includes a TEE and an environment outside the TEE. It should be understood that the environment outside the TEE can also perform data processing (e.g., including one or more processors), that is, plaintext data processing, and store the processing result to a storage space outside the TEE (e.g., the "memory" shown in Figure 2 In order not to obscure the main idea of the present disclosure, the functional modules related to data processing outside the TEE are not shown in Figure 2 As shown, the data processing system related to the embodiments of the present disclosure can include a plurality of TEEs, and the plurality of TEEs can implement distributed computing.
[0035] The environment outside the TEE includes a user interface through which the data processing system can receive data from and send data to the user. For data sent by the user that requires privacy data processing (as described above, the data is a ciphertext data block that is encrypted), the data processing system receives the data through the user interface and then decrypts the ciphertext data block in the TEE. The TEE is a secure extension based on CPU hardware and is completely isolated from the outside. The TEE was first proposed by Global Platform as a concept for solving the secure isolation of resources on mobile devices, providing a trusted and secure execution environment for applications parallel to the operating system. With the development of technology, the TEE has become a more general TEE than the original concept. For example, server chip manufacturers such as Intel and AMD have successively introduced hardware-assisted TEEs and enriched the concept and characteristics of TEEs. The TEE referred to now usually refers more to such hardware-assisted TEE technology. Unlike mobile terminals, cloud access requires remote access, and the end user cannot see the hardware platform, so the first step in using the TEE is to confirm the authenticity of the TEE. Therefore, the TEE technology now all introduces a remote attestation mechanism, which is endorsed by hardware manufacturers (mainly CPU manufacturers) and ensures that the user can verify the TEE state through digital signature technology. At the same time, only secure resource isolation cannot meet the security requirements, and further data privacy protection is proposed. Commercial TEEs including Intel SGX and AMD SEV also provide memory encryption technology, which limits trusted hardware to the CPU, and the data on the bus and memory is all ciphertext to prevent malicious users from snooping. For example, Intel's Software Guard Extensions (SGX) and other TEE technologies isolate code execution, remote attestation, secure configuration, secure storage of data, and trusted paths for executing code. Applications running in the TEE are protected by security and are almost impossible to be accessed by third parties.
[0036] Taking Intel SGX technology as an example, SGX provides an enclave, also known as a fly, which is an encrypted trusted execution area in memory, and the CPU protects the data from being stolen. Taking a TEE that supports SGX as an example, a part of the EPC (Enclave Page Cache, or fly page cache) can be allocated in memory by using the newly added processor instructions, and the data in the EPC is encrypted by the MEE (Memory Encryption Engine) in the CPU. The encrypted content in the EPC will only be decrypted into plaintext after entering the CPU. Therefore, in SGX, the user can not trust the operating system, VMM (Virtual Machine Monitor), or even BIOS (Basic Input Output System), and only needs to trust the CPU to ensure that the private data will not be leaked. In practical applications, private data can be encrypted in the form of ciphertext and transmitted to the enclave, and the corresponding secret key can also be transmitted into the enclave through remote attestation. Then, the data is operated under the encryption protection of the CPU, and the result is returned in the form of ciphertext. In this mode, powerful computing power can be used without worrying about data leakage.
[0037] The ciphertext data block received by the user interface of the data processing system can be generated by encrypting the data to be processed by the user on a client, which is collectively referred to herein as processing on the user side. The encryption here can use symmetric encryption or asymmetric encryption. Correspondingly, the TEE can decrypt the ciphertext data block with the corresponding key to obtain the plaintext data. If the user side uses symmetric encryption, that is, the key of the symmetric encryption algorithm is used to encrypt the plaintext data, then correspondingly, the TEE can decrypt the ciphertext data block with the key of the symmetric encryption algorithm. The encryption algorithm used by the symmetric encryption is, for example, the DES algorithm, the 3DES algorithm, the TDEA algorithm, the Blowfish algorithm, the RC5 algorithm, the IDEA algorithm, etc. The key of the symmetric encryption algorithm can be determined by negotiation between the user side and the TEE.
[0038] If the non-symmetric encryption method is used, i.e. the plaintext data is encrypted by the public key of the non-symmetric encryption algorithm, correspondingly, the TEE can decrypt the ciphertext data block by the private key of the non-symmetric encryption algorithm. The non-symmetric encryption algorithm is, for example, RSA, Elgamal, knapsack algorithm, Rabin, D-H, ECC (Elliptic Curve Cryptography) and the like. The key of the non-symmetric encryption algorithm can be, for example, a pair of public and private keys generated by the TEE, and the public key is sent to the user side before the ciphertext data block is generated on the user side, so that the user side can encrypt the plaintext data by the key. The key of the non-symmetric encryption algorithm can also be generated by a key management server. By means of remote attestation, the key management server sends the private key to the TEE, specifically, into the enclave of the TEE. The TEE can contain multiple enclaves, and the above-mentioned private key can be transmitted into a secure enclave among these enclaves; for example, the secure enclave can be a QE (Quoting Enclave) enclave, but not an AE (Application Enclave) enclave. The public key of the non-symmetric encryption can be sent to the user side by the key management server.
[0039] The user side can also use a combination of symmetric encryption and non-symmetric encryption. For example, the user side uses a symmetric encryption algorithm to encrypt the plaintext data, i.e. uses the key of the symmetric encryption algorithm to encrypt the plaintext data, and uses the public key of the non-symmetric encryption algorithm to encrypt the key used in the symmetric encryption algorithm. In this way, after the TEE receives the encrypted data, it can first use the private key of the non-symmetric encryption algorithm to decrypt to obtain the key of the symmetric encryption algorithm, and then use the key of the symmetric encryption algorithm to decrypt to obtain the plaintext data.
[0040] For example, the key management server can send the private key of the non-symmetric encryption algorithm to the enclave of the TEE by remote attestation, and send the public key of the non-symmetric encryption algorithm to the user side. Thus, the user side can use the key of the symmetric encryption algorithm to encrypt the plaintext data, and use the public key of the non-symmetric encryption algorithm to encrypt the key used in the symmetric encryption algorithm. Further, the user side can send the ciphertext data block and the encrypted symmetric key (obtained by encrypting the key used in the symmetric encryption algorithm by the public key of the non-symmetric encryption algorithm) to the data processing system. After the TEE receives the ciphertext data block and the encrypted key, it can first use the private key of the non-symmetric encryption algorithm to decrypt the encrypted key to obtain the key of the symmetric encryption algorithm, and then use the key of the symmetric encryption algorithm to decrypt the ciphertext data block to obtain the plaintext data. This encryption method is generally referred to as digital envelope encryption.
[0041] The TEE decrypts the ciphertext data block to obtain plaintext data. Specifically, the TEE can utilize a newly added processor instruction in the CPU to allocate a part of an area EPC in the memory, and encrypt the plaintext data by using an encryption engine MEE in the CPU to store the encrypted plaintext data in the EPC. The encrypted content in the EPC is decrypted into plaintext after entering the CPU. In the CPU, the plaintext data is operated to obtain a data processing result. Then, the TEE encrypts the plaintext data processing result by using a key to obtain a ciphertext processing result, and the ciphertext processing result can be decrypted only by the TEE, which can ensure that the ciphertext processing result itself is secure enough.
[0042] The TEE implements a function by running a code for implementing the function. Therefore, for a function that needs to be implemented in the TEE, the relevant code needs to be executed. For the code executed in the TEE, the relevant specifications and requirements of the TEE need to be met; accordingly, for the code for implementing a function in the related art, the code needs to be re-written in combination with the specifications and requirements of the TEE, which not only has a relatively large development amount, but also is likely to have a bug in the re-writing process, affecting the reliability and stability of the function implementation.
[0043] Therefore, by executing the storage function code outside the TEE to store the ciphertext processing result to the external storage space outside the TEE, the storage function code executed outside the TEE can be the code for implementing the storage function in the related art, which does not need to be re-written in combination with the specifications and requirements of the TEE, and can implement secure and reliable storage for the ciphertext processing result. Not only can the development amount of the relevant code be reduced without affecting the security and reliability, but also the TCB (Trusted Computing Base) can be reduced by reducing the relevant code of the TEE, so that the additional security risk caused in the process of combining the TEE technology with the big data platform technology is within a controllable range.
[0044] In one embodiment, a write cache function code can be executed in the TEE to store the plaintext processing result in a write cache in the TEE, such as the "cache" shown in Figure 2 Further, the TEE can encrypt the data in the write cache and output the encrypted data from the TEE to store in the external storage space (such as Figure 2The external storage space can be a persistent storage medium, such as a disk, a floppy disk, or a memory that can restore data after being powered on and thus can store data persistently. The write cache function code can be stored in the TEE in plaintext form, and the plaintext form of the write cache function code can be directly executed in the TEE. Alternatively, the write cache function code can be stored in ciphertext form outside the TEE, such as in the external storage space described above. Before the write cache function is executed, the ciphertext form of the write cache function code can be read into the TEE, decrypted to plaintext code in the TEE, and executed.
[0045] The write cache refers to a "buffering" mechanism provided when data is written to the external storage space to avoid "shock" to the external storage space. For example, the write cache described above can be implemented using a buffer. Of course, the write cache can also be implemented using a cache, and the present disclosure does not limit this. In fact, because the TEE is an isolated secure environment and the external storage space is outside the TEE, by using the write cache mechanism, the data in the cache can be written to the external storage space in batches, thereby reducing the number of interactions between the TEE and the external storage space and improving data storage efficiency. At the same time, the TEE can need to call processed data or generated processing results during the calculation of plaintext data. If the data to be called is located in the write cache, the data can be directly read from the write cache. This can reduce the interaction with the external storage space on the one hand, and eliminate the decryption process of the data read from the external storage space on the other hand, thereby improving the data processing efficiency in the TEE.
[0046] Of course, the write cache can also be established outside the TEE, such as by executing the write cache function code outside the TEE, thereby storing the ciphertext processing result in the write cache outside the TEE, and further storing the data in the write cache to the external storage space.
[0047] In one embodiment, the TEE can read the ciphertext processing result from the external storage space, read the ciphertext processing result into the TEE and decrypt it to plaintext processing result, then further operate on the plaintext processing result, generate a return result that needs to be returned to the user, and encrypt the return result (for example, using the symmetric key from the user side described above) and output it from the TEE, such as through the interface. Figure 2The user interface shown returns the encrypted return result to the user side. For another example, the plaintext processing result can be read from the read cache in the TEE, the return result is generated according to the plaintext processing result, and the return result is encrypted and output from the TEE; wherein the plaintext processing result is read from the corresponding ciphertext processing result in the external storage space of the TEE by executing the read cache function code in the TEE, and after the ciphertext processing result is decrypted into the plaintext processing result, the plaintext processing result is read into the TEE and stored in the read cache. In other words, the TEE reads the ciphertext processing result from the external storage space, and after the ciphertext processing result is decrypted into the plaintext processing result, the plaintext processing result can be stored in the read cache in the TEE by executing the read cache function code in the TEE, for example, the read cache can correspond to Figure 2 The "cache" shown. Further, for the data required by the TEE when performing operations, the data can be read from the read cache first, and if the relevant data can be read, it is not necessary to read from the external storage space, thereby reducing the number of interactions with the external storage space and eliminating the data decryption process.
[0048] The read cache refers to storing the read data in the read cache space in the TEE in plaintext form after reading the data from the external storage space into the TEE in order to reduce the number of interactions with the external storage space. For example, the cache can be used to implement the read cache described above; of course, the read cache can also be implemented by using a buffer, and the present disclosure does not limit this.
[0049] The TEE can simultaneously support the read cache mechanism and the write cache mechanism described above. With the continuous development of cache technology, the same cache can not only be used to implement data reading or data writing, but can also support data reading and writing operations at the same time, so that the boundary between the read cache and the write cache is sometimes not very clear, and thus Figure 2 In the present disclosure, only "cache" is shown, and the specific types are not specifically distinguished, and can be configured and adjusted according to actual needs. Of course, the cache mechanism in the TEE described above can also be applied to environments outside the TEE, but at this time, the data reading and writing only involves plaintext reading and writing, and does not need to implement data encryption and decryption operations, and in Figure 2 In the present disclosure, this is not shown and will not be described again.
[0050] It can be seen that in the embodiments of the present disclosure, the data processing system can ensure that the private data from the user is decrypted and read or operated in the TEE, and is in an encrypted state as soon as it leaves the TEE, so that the security of the private data can be ensured during the entire data processing process.
[0051] The data processing system based on the private data processing method according to the embodiments of the present disclosure will be described below. Figure 3 to Figure 6 The data processing system based on the private data processing method according to the embodiments of the present disclosure will be described below.
[0052] like Figure 3 As shown, on the user side, the data to be processed includes multiple data rows. The user side divides the data to be processed into multiple data blocks, each data block including multiple data rows. In one embodiment, the data to be processed is stored in the form of a two-dimensional table, with each data row being a row in the two-dimensional table. In one embodiment, the two-dimensional table is a row-unordered two-dimensional table, that is, the data rows in the data to be processed can be out of order, and there is no data processing dependency between the data rows. Therefore, the user side can arbitrarily divide each data row into different data blocks. Then, the user side encrypts each data block separately to obtain multiple ciphertext data blocks, and transmits the multiple ciphertext data blocks to the data processing system.
[0053] In one embodiment, the user side divides data blocks based on the memory processing capabilities of the TEE (Transmission Equipment) of the data processing system. The TEE contains fast-access encrypted memory where data is stored and only decrypted after entering the CPU; this memory typically has an upper limit. For example, the upper limit of fast-access encrypted memory in an Intel SGX is 128MB. If data exceeds this size, it is paged, resulting in slow CPU access to this paged data and decreased CPU processing performance. Therefore, in this embodiment, it is desirable that the entire encrypted data block (both before and after decryption) be stored in the TEE's fast-access encrypted memory to improve the TEE's data block processing speed. In this case, the user side may need to know the upper limit of the TEE's memory size in advance. The data processing system can inform the user side of the TEE's memory processing capabilities before dividing the data blocks.
[0054] In one embodiment, the encryption of each data block on the user side can be in the form of asymmetric encryption, for example, each data block is encrypted separately using the public key of the asymmetric encryption algorithm of the TEE of the data processing system to obtain a respective ciphertext data block. After entering the TEE, the TEE decrypts the received ciphertext data block using the private key of the asymmetric encryption algorithm to obtain the plaintext data block. In one embodiment, the encryption of each data block on the user side can be in the form of a combination of symmetric encryption and asymmetric encryption, i.e. the digital envelope encryption method described above. The user side encrypts each data block separately using the user key, and encrypts the user key using the public key of the asymmetric encryption algorithm of the TEE, and transmits the plurality of ciphertext data blocks and the encrypted user key to the data processing system. In the data processing system, the TEE decrypts the received encrypted user key using the private key of the asymmetric encryption algorithm to obtain the plaintext user key, and decrypts the ciphertext data block into plaintext data block using the user key. In these embodiments, in the case where the data processing system comprises a plurality of TEEs, the plurality of TEEs can share a pair of public and private keys of the asymmetric encryption algorithm. In these embodiments, the key management server can generate the key of the asymmetric encryption algorithm in advance. Through remote attestation, the key management server transmits the private key in the asymmetric key pair to the enclave of each TEE of the data processing system, and sends the public key in the asymmetric key pair to the user side. The TEEs of the processing system can also obtain a pair of public and private keys of the shared asymmetric encryption algorithm through a key agreement mechanism. The public key is sent to the user by the data processing system, and the private key is stored in the enclave of each TEE.
[0055] The data processing system receives each ciphertext data block from the user side through the user interface. Each ciphertext data block can be temporarily stored in an external storage space outside the TEE. In the case where the data processing system comprises a plurality of TEEs, the system schedules each ciphertext data block to one of the plurality of TEEs, and the TEE can read the ciphertext data block assigned to it from the external storage space in order to perform privacy data processing on the ciphertext data block. In the case where the data processing system comprises only one TEE, the TEE can read each ciphertext data block from the external storage space in sequence and perform privacy data processing thereon, and after the processing is completed, the next ciphertext data block is read and processed until all the plurality of ciphertext data blocks received by the data processing system are processed.
[0056] As Figure 4As shown, in the TEE, ciphertext data blocks are decrypted into plaintext data blocks, where the plaintext data block consists of multiple data lines, similar to the data block before encryption on the user side. As mentioned above, if the user side uses an asymmetric encryption algorithm to encrypt the data block, the TEE uses the private key of the asymmetric encryption algorithm to decrypt the received ciphertext data block into a plaintext data block. If the user side uses a combination of symmetric and asymmetric encryption algorithms to encrypt the data block, the TEE uses the private key of the asymmetric encryption algorithm to decrypt the received encrypted user key to obtain the user's plaintext user key, and then uses this user key to decrypt the ciphertext data block into a plaintext data block.
[0057] TEE processes each data row in a plaintext data block to obtain the plaintext processing result. As shown in the figure, the plaintext processing result can include multiple result data rows (referred to as "result rows"). It should be noted that the result rows and the data rows in the plaintext data block can be in a one-to-one correspondence, for example, one data row produces one result row after processing; or they can not be in a one-to-one correspondence, for example, one data row produces multiple result rows after processing, or multiple data rows produce one result row after processing.
[0058] The TEE encrypts the plaintext processing result to obtain the ciphertext processing result. For example, it encrypts the plaintext processing result using the key of the TEE's symmetric encryption algorithm to obtain the ciphertext processing result, and then outputs the ciphertext processing result outside the TEE. The key of this symmetric encryption algorithm can be stored within the enclosure of the TEE. The data processing system executes storage function code outside the TEE to store the ciphertext processing result in external storage space.
[0059] Data processing systems providing privacy data services to users typically need to return information to them, referred to in this article as "results." The returned results can be the processing output including multiple result rows, as mentioned above, or the result of further calculations on the processing output. For example... Figure 5 As shown, the TEE calculates the data processing return result to be returned to the user based on the plaintext processing result, encrypts the return result to obtain one or more ciphertext result blocks, and outputs one or more ciphertext result blocks outside the TEE. The data processing system transmits one or more ciphertext result blocks to the first user through the user interface. The ciphertext result blocks need to be decryptable by the user. When the user side uses a combination of symmetric and asymmetric encryption algorithms to encrypt the data block, the TEE uses the user key received from the user side to encrypt the return result to obtain the ciphertext result block.
[0060] exist Figure 5In the illustrated example, the TEE reads in the ciphertext processing result from the external storage space outside the TEE, decrypts the ciphertext processing result into a plaintext processing result, and calculates a return result according to the plaintext processing result. It should be understood that if the plaintext processing result (or part of the result) required for generating the return result is stored in the cache within the TEE, the TEE does not need to read in the ciphertext processing result (or part of the result) from the external storage space, but only needs to use the plaintext processing result (or part of the result) in its cache.
[0061] In some cases, the data of the current user needs to be calculated in combination with the data of other users to obtain the return result to be returned to the current user, for example, data collision based on big data of a large number of users. For example, as shown in FIG. 1, the data of the current user is processed in combination with the data of other users to obtain the return result to be returned to the current user. Figure 6 As shown, the TEE reads in the first ciphertext processing result (for example, "ciphertext processing result 1" in the figure) related to the current user and the second ciphertext processing result (for example, "ciphertext processing result 2" to "ciphertext processing result H" in the figure) related to other users from the external storage space outside the TEE, respectively decrypts the first and second ciphertext processing results into first and second plaintext processing results (for example, "plaintext processing result 1" and "plaintext processing result 2" to "plaintext processing result H" in the figure), and calculates a return result to be returned to the current user according to the first and second plaintext processing results.
[0062] The TEE divides the calculated plaintext return result into one or more plaintext result blocks, and each plaintext result block can include one or more data rows. The size of each plaintext result block can be a size agreed upon in advance by the current user, can be a size notified in advance by the current user, or can be the same size as the size of the data block of the data to be processed sent by the current user. The TEE respectively encrypts each plaintext result block to obtain one or more ciphertext result blocks, and outputs the one or more ciphertext result blocks to outside the TEE.
[0063] The following describes a data processing system for processing privacy data according to an embodiment of the present disclosure. Figure 7 A data processing system for processing privacy data is described according to an embodiment of the present disclosure. The data processing system includes a plurality of TEEs, a storage unit, a communication unit, and a scheduling unit.
[0064] The communication unit is configured to receive a plurality of ciphertext data blocks corresponding to data to be processed from a user, where each ciphertext data block is encrypted separately. The communication unit can implement all or part of the functions of the user interface described above. The scheduling unit is configured to assign each ciphertext data block to one of a plurality of TEEs. The scheduling unit can make the scheduling assignment of the ciphertext data blocks according to the workload of each TEE. Each TEE is configured to: decrypt the ciphertext data block into a plaintext data block comprising a plurality of data rows, and process each data row to obtain a plaintext processing result; encrypt the plaintext processing result to obtain a ciphertext processing result, for example, using a key of a symmetric encryption algorithm of the TEE to encrypt the plaintext processing result to obtain the ciphertext processing result, and output the ciphertext processing result outside the TEE. The storage unit is configured to execute a storage function code outside the TEE to store the ciphertext processing result to an external storage space. The communication unit is further configured to notify the first user of the memory processing capability of the TEE before receiving the ciphertext data blocks, so that the first user side divides the data blocks according to the memory processing capability of the TEE.
[0065] In one embodiment, each TEE is further configured to: share a pair of public and private keys of an asymmetric encryption algorithm with other TEEs; and decrypt a received ciphertext data block encrypted using the public key of the asymmetric encryption algorithm into a plaintext data block using the private key of the asymmetric encryption algorithm. In one embodiment, the communication unit is further configured to receive an encrypted user key from the user. Each TEE is further configured to: share a pair of public and private keys of an asymmetric encryption algorithm with other TEEs, and decrypt a received encrypted user key using the private key of the asymmetric encryption algorithm to obtain a plaintext user key, and decrypt a ciphertext data block encrypted using the user key into a plaintext data block using the user key.
[0066] In some embodiments, the communication unit is further configured to receive a user key from the user. Each TEE is further configured to: calculate a return result of data processing needed to be returned to the user according to the plaintext processing result, and encrypt the return result to obtain one or more ciphertext result blocks, for example, encrypt the return result using the user key to obtain the ciphertext result blocks, and output the one or more ciphertext result blocks outside the TEE. The communication unit is further configured to transmit the one or more ciphertext result blocks to the user.
[0067] In one embodiment, each TEE is further configured to read in the ciphertext processing result from an external storage space outside the TEE, decrypt the ciphertext processing result into a plaintext processing result, and calculate the return result according to the plaintext processing result. In one embodiment, each TEE is further configured to read in a first ciphertext processing result related to the current user and a second ciphertext processing result related to other users from an external storage space outside the TEE, respectively decrypt the first and second ciphertext processing results into first and second plaintext processing results, and calculate the return result to be returned to the current user according to the first and second plaintext processing results.
[0068] Figure 8 is an exemplary block diagram of a general-purpose hardware system 800 that can be applied to one or more exemplary embodiments according to the present disclosure. Reference will now be made to Figure 8 The system 800, which is an example of a hardware device that can be applied to aspects of the present disclosure, will now be described. Any of the clients or data processing systems on the user side in the above-described embodiments can include all or a portion of the system 800. The system 800 can be any machine that is configured to perform processing and / or calculations, and can be, but is not limited to, a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal data assistant, a smart phone, an in-vehicle computer, or any combination thereof.
[0069] The system 800 can include elements that can connect or communicate with the bus 802, possibly via one or more interfaces. For example, the system 800 can include the bus 802, and one or more processors 804, one or more input devices 806, and one or more output devices 808. The one or more processors 804 can be any type of processors, and can include, but are not limited to, one or more general-purpose processors and / or one or more special-purpose processors (e.g., special processing chips). Each operation and / or step in the above-described methods can be implemented by the one or more processors 804 executing instructions.
[0070] The input device 806 can be any type of device that can input information to a computing device, and can include, but is not limited to, a mouse, a keyboard, a touchscreen, a microphone, and / or a remote control. The output device 808 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer.
[0071] The system 800 can also include or be connected to a non-transitory storage device 810. The non-transitory storage device 810 can be non-transitory and can be any storage device that can implement data storage, including but not limited to a disk drive, an optical storage device, a solid-state memory, a floppy disk, a hard disk, a tape, or any other magnetic medium, an optical disk or any other optical medium, a ROM (read only memory), a RAM (random access memory), a cache, and / or any other memory chip or chip set, and / or any other medium from which the computer can read data, instructions, and / or code. The non-transitory storage device 810 can be detachable from the interface. The non-transitory storage device 810 can have data / instructions / code for implementing the methods, operations, steps, and processes described above.
[0072] The system 800 can also include a communication device 812. The communication device 812 can be any type of device or system that can communicate with external devices and / or with networks, including but not limited to a modem, a network card, an infrared communication device, a wireless communication device, and / or a chipset such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, a satellite communication device, and / or the like.
[0073] The bus 802 can include, but is not limited to, an Industry Standard Architecture (ISA) bus, a MicroChannel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus. In particular, for vehicle-mounted devices, the bus 802 can also include a Controller Area Network (CAN) bus or other architecture designed for use on vehicles.
[0074] The system 800 can also include a working memory 814, which can be any type of working memory that can store instructions and / or data useful to the operation of the processor 804, including but not limited to a random access memory and / or a read-only memory device.
[0075] The software elements can be located within working memory 814, including but not limited to an operating system 816, one or more application programs 818, drivers, and / or other data and code. Instructions for the operating system 816, the one or more application programs 818, the drivers, and / or other data and code can be stored in a non-transitory computer-readable storage medium, such as the storage device 810 described above, and can be read into the working memory 814 by a processor 804 during execution. The software elements can also include instructions for implementing the methods, operations, steps, and processes described above.
[0076] It should also be understood that, where applicable, changes in the order of the steps can be made without departing from the scope of the present disclosure. For example, the specific elements can also be implemented in hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. Additionally, connections to other computing devices such as network input / output devices can be employed. For example, some or all of the methods or apparatuses according to embodiments of the present disclosure can be implemented by using programmed hardware (e.g., programmable logic circuits including field-programmable gate arrays (FPGA) and / or programmable logic arrays (PLA)) in accordance with the logic and algorithms of the present disclosure, in assembly language, or in hardware programming languages such as VERILOG, VHDL, C++, and the like.
[0077] It should also be understood that the components of system 800 can be distributed across a network. For example, some processing can be performed using one processor, while other processing can be performed by another processor that is remote from the one processor. Other components of system 800 can be similarly distributed. In this manner, system 800 can be interpreted as a distributed computing system that performs processing at multiple locations.
[0078] The above description of one or more example embodiments of the present disclosure has been described. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than the order in which they are recited and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or possible.
[0079] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.
[0080] The controller can be implemented in any suitable way, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. The skilled person will also appreciate that, in addition to implementing the controller in pure computer readable program code, it is possible to implement the controller in the form of logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. to perform the same functions by logically programming the method steps. Such a controller can therefore be considered to be a hardware component, and the means included therein to perform the various functions can also be considered to be structures within the hardware component. Alternatively, or even additionally, the means to perform the various functions can be considered to be both a software module implementing the method and a structure within a hardware component.
[0081] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not rule out that with the development of future computer technology, computers implementing the functions of the above embodiments can be personal computers, laptop computers, vehicle human-computer interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or combinations of any of these devices.
[0082] Although the one or more embodiments of the present disclosure provide method operation steps as described in the embodiments or flowcharts, more or less operation steps can be included based on conventional or non-inventive means. The order of steps listed in the embodiments is only one of the many execution orders of the steps, and does not represent the only execution order. In actual device or terminal product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-thread processing environment, or even in a distributed data processing environment). The terms "comprise", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, product or equipment. Without more limitations, it does not exclude the presence of other same or equivalent elements in the process, method, product or equipment including the elements. For example, if the first, second, etc. terms are used to represent names, they do not represent any specific order.
[0083] For the convenience of description, the above device is described as various modules described in function. Of course, when implementing the one or more embodiments of the present disclosure, the functions of each module can be implemented in the same or more software and / or hardware, or modules implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described device embodiments are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0084] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts 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, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The device that implements the functions specified in one block or multiple blocks.
[0085] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.
[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 Figure 1 of the block or blocks.
[0087] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0088] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.
[0089] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0090] Those skilled in the art will appreciate that the one or more embodiments of the disclosure can be embodied in a variety of ways, including as a method, system or computer program product. Accordingly, one or more embodiments of the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the disclosure can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code.
[0091] One or more embodiments of the disclosure can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. One or more embodiments of the disclosure can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0092] Various embodiments in the present disclosure are described with progressive manner, and the same or similar parts among various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the system embodiments are described simply because they are basically similar to the method embodiments. In the description of the present disclosure, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. The illustrative representations of the above terms in the present disclosure are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present disclosure and the features of the different embodiments or examples without contradiction.
[0093] The above descriptions merely illustrate one or more embodiments of the present disclosure and are not intended to limit the one or more embodiments of the present disclosure. The one or more embodiments of the present disclosure can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present disclosure shall be included in the scope of claims.
Claims
1. A method for processing private data based on a data processing system, the data processing system comprising a plurality of trusted execution environments, the method comprising: at a first user side: dividing data to be processed into a plurality of data blocks according to a memory processing capability of a trusted execution environment of the data processing system, each data block comprising a plurality of data rows; encrypting each data block separately to obtain a plurality of ciphertext data blocks, and transmitting the plurality of ciphertext data blocks to the data processing system; and at the data processing system: informing the first user of the memory processing capability of the trusted execution environment before the first user side divides the data blocks; allocating each ciphertext data block to one of the plurality of trusted execution environments; decrypting, by the trusted execution environment, the ciphertext data block to obtain a plaintext data block, and processing each of the plurality of data rows in the plaintext data block to obtain a plaintext processing result; encrypting, by the trusted execution environment, the plaintext processing result to obtain a ciphertext processing result, and outputting the ciphertext processing result outside the trusted execution environment; executing a storage function code outside the trusted execution environment to store the ciphertext processing result to an external storage space; calculating, by the trusted execution environment, a plaintext return result of the data processing to be returned to the first user according to the plaintext processing result, dividing the calculated plaintext return result into one or more plaintext result blocks, and encrypting each plaintext result block separately to obtain one or more ciphertext result blocks, and outputting the one or more ciphertext result blocks outside the trusted execution environment; transmitting the one or more ciphertext result blocks to the first user; and reading, by the trusted execution environment, a first ciphertext processing result related to the first user and a second ciphertext processing result related to other users from the external storage space outside the trusted execution environment, decrypting the first and second ciphertext processing results to obtain first and second plaintext processing results, and calculating a return result to be returned to the first user according to the first and second plaintext processing results. The plurality of trusted execution environments share a pair of public and private keys of an asymmetric encryption algorithm, and the method further comprises: at the first user side, encrypting each data block separately using the public key of the asymmetric encryption algorithm; and at the data processing system, decrypting, by the trusted execution environment, the received ciphertext data block to a plaintext data block using the private key of the asymmetric encryption algorithm.
2. The method of claim 1, wherein, The plurality of trusted execution environments share a pair of public and private keys of an asymmetric encryption algorithm, and the method further comprises: at the first user side, encrypting each data block separately using a first user key and encrypting the first user key using the public key of the asymmetric encryption algorithm, and transmitting the plurality of ciphertext data blocks and the encrypted first user key to the data processing system; and at the data processing system, decrypting, by the trusted execution environment, the received encrypted first user key to obtain a plaintext first user key using the private key of the asymmetric encryption algorithm, and decrypting the ciphertext data block to a plaintext data block using the first user key.
3. The method of claim 1, wherein, 4.The method of claim 2 or 3, wherein, The public key is sent to the first user by the key management server, and the private key is sent to the enclave of each trusted execution environment by the key management server through remote attestation; or A pair of public and private keys of an asymmetric encryption algorithm is obtained by the plurality of trusted execution environments through a key agreement mechanism, wherein the public key is sent to the first user by the data processing system, and the private key is stored in the enclave of each trusted execution environment.
5. The method of claim 1, further comprising: encrypting, at the data processing system, the plaintext processing result with the key of the symmetric encryption algorithm of the trusted execution environment to obtain the ciphertext processing result.
6. The method of claim 1, further comprising: transmitting, at the first user side, the first user key to the data processing system; and encrypting, at the data processing system, the return result with the first user key to obtain the ciphertext result block.
7. The method of claim 1, further comprising: reading, at the data processing system, the ciphertext processing result from an external storage space outside the trusted execution environment, decrypting the ciphertext processing result into the plaintext processing result, and calculating the return result according to the plaintext processing result. The data to be processed is stored in the form of a two-dimensional table, and the data is a row in the two-dimensional table.
8. The method of claim 1, wherein, The two-dimensional table is a row-unordered two-dimensional table.
9. The method of claim 8, wherein, 10. A private data processing method implemented by a data processing system, the data processing system comprising a plurality of trusted execution environments, the method comprising: receiving a plurality of ciphertext data blocks corresponding to data to be processed from a first user, wherein each ciphertext data block is encrypted separately; before receiving the ciphertext data blocks, informing the first user of the memory processing capability of the trusted execution environment, so that the first user side divides the data blocks according to the memory processing capability of the trusted execution environment; allocating each ciphertext data block to one of the plurality of trusted execution environments; decrypting the ciphertext data blocks into plaintext data blocks comprising a plurality of data rows, and processing each data row to obtain plaintext processing results; encrypting the plaintext processing results to obtain ciphertext processing results, and outputting the ciphertext processing results outside the trusted execution environment; executing a storage function code outside the trusted execution environment to store the ciphertext processing results to an external storage space; calculating the plaintext return result of the data processing to be returned to the first user according to the plaintext processing results, dividing the calculated plaintext return result into one or more plaintext result blocks, and encrypting each plaintext result block separately to obtain one or more ciphertext result blocks, and outputting the one or more ciphertext result blocks outside the trusted execution environment; transmitting the one or more ciphertext result blocks to the first user; and The trusted execution environment reads in a first ciphertext processing result related to the first user and a second ciphertext processing result related to other users from an external storage space outside the trusted execution environment, respectively decrypts the first and second ciphertext processing results into first and second plaintext processing results, and calculates a return result to be returned to the first user according to the first and second plaintext processing results.
11. The method of claim 10, wherein, The plurality of trusted execution environments share a pair of public and private keys of an asymmetric encryption algorithm, and each ciphertext data block is respectively encrypted using the public key of the asymmetric encryption algorithm, and the method further comprises: The trusted execution environment decrypts the received ciphertext data block into a plaintext data block using the private key of the asymmetric encryption algorithm.
12. The method of claim 10, wherein, The plurality of trusted execution environments share a pair of public and private keys of an asymmetric encryption algorithm, and each ciphertext data block is respectively encrypted using the first user key of the first user, and the method further comprises: Receiving the encrypted first user key from the first user; The trusted execution environment decrypts the received encrypted first user key into a plaintext first user key using the private key of the asymmetric encryption algorithm, and decrypts the ciphertext data block into a plaintext data block using the first user key.
13. The method of claim 11 or 12, wherein, The public key of the asymmetric encryption algorithm is sent to the first user by a key management server, and the private key is sent into the enclave of each trusted execution environment by the key management server through remote attestation; or A pair of public and private keys of an asymmetric encryption algorithm is obtained by the plurality of trusted execution environments through a key agreement mechanism, wherein the public key of the asymmetric encryption algorithm is sent to the first user by the data processing system, and the private key is stored in the enclave of each trusted execution environment.
14. The method of claim 10, further comprising: The trusted execution environment encrypts the plaintext processing result into a ciphertext processing result using the key of the symmetric encryption algorithm of the trusted execution environment.
15. The method of claim 10, further comprising: Receiving the first user key from the first user; And The trusted execution environment encrypts the return result into a ciphertext result block using the first user key.
16. The method of claim 10, further comprising: The trusted execution environment reads in the ciphertext processing result from an external storage space outside the trusted execution environment, decrypts the ciphertext processing result into a plaintext processing result, and calculates a return result according to the plaintext processing result.
17. A private data processing method based on a data processing system, the data processing system comprising a trusted execution environment, the method comprising: On the first user side: According to the memory processing capacity of the trusted execution environment of the data processing system, divide the data to be processed into a plurality of data blocks, each data block comprising a plurality of data rows; And Each data block is respectively encrypted to obtain a plurality of ciphertext data blocks, and the plurality of ciphertext data blocks are transmitted to the data processing system; And In the data processing system: The memory processing capacity of the trusted execution environment is informed to the first user before the first user side divides the data blocks; reading, by the trusted execution environment, a ciphertext data block from an external storage space outside the trusted execution environment; decrypting, by the trusted execution environment, the ciphertext data block into a plaintext data block and processing each of a plurality of data rows in the plaintext data block to obtain a plaintext processing result; encrypting, by the trusted execution environment, the plaintext processing result to obtain a ciphertext processing result and outputting the ciphertext processing result outside the trusted execution environment; executing, outside the trusted execution environment, a storage function code to store the ciphertext processing result to the external storage space; reading, by the trusted execution environment, a next ciphertext data block from the external storage space outside the trusted execution environment and performing the above processing thereon until all of the plurality of ciphertext data blocks received by the data processing system are processed; calculating, by the trusted execution environment, a return result of the data processing needed to be returned to the first user according to the plaintext processing result, dividing the calculated return result into one or more plaintext result blocks, and encrypting each of the plaintext result blocks to obtain one or more ciphertext result blocks, and outputting the one or more ciphertext result blocks outside the trusted execution environment; transmitting the one or more ciphertext result blocks to the first user; and reading, by the trusted execution environment, a first ciphertext processing result related to the first user and a second ciphertext processing result related to other users from the external storage space outside the trusted execution environment, respectively decrypting the first and second ciphertext processing results into first and second plaintext processing results, and calculating a return result needed to be returned to the first user according to the first and second plaintext processing results.
18. The method of claim 17, further comprising: encrypting, at the first user side, each data block using a public key of an asymmetric encryption algorithm of the trusted execution environment, respectively; and decrypting, at the data processing system, the received ciphertext data block into a plaintext data block using a private key of the asymmetric encryption algorithm by the trusted execution environment.
19. The method of claim 17, further comprising: encrypting, at the first user side, each data block using a first user key and encrypting the first user key using a public key of an asymmetric encryption algorithm, and transmitting the plurality of ciphertext data blocks and the encrypted first user key to the data processing system; and decrypting, at the data processing system, the received encrypted first user key into a plaintext first user key using a private key of the asymmetric encryption algorithm by the trusted execution environment, and decrypting the ciphertext data block into a plaintext data block using the first user key.
20. The method of claim 17, further comprising: encrypting, at the data processing system, the plaintext processing result into a ciphertext processing result using a key of a symmetric encryption algorithm of the trusted execution environment.
21. The method of claim 17, further comprising: transmitting, at the first user side, the first user key to the data processing system; and encrypting, at the data processing system, the return result into a ciphertext result block using the first user key by the trusted execution environment.
22. The method of claim 17, further comprising: In the data processing system, the trusted execution environment reads in the ciphertext processing result from an external storage space outside the trusted execution environment, decrypts the ciphertext processing result into a plaintext processing result, and calculates a return result based on the plaintext processing result.
23. The method of claim 17, wherein, The data to be processed is stored in a two-dimensional table, and the data is a row in the two-dimensional table.
24. The method of claim 23, wherein, The two-dimensional table is a row-unordered two-dimensional table.
25. A data processing system for processing private data, comprising: a plurality of trusted execution environments; a storage unit; a communication unit configured to receive a plurality of ciphertext data blocks corresponding to data to be processed from a first user, and notify the first user of a memory processing capability of the trusted execution environment before receiving the ciphertext data blocks, so that the first user side divides the data blocks according to the memory processing capability of the trusted execution environment, wherein each ciphertext data block is encrypted separately; a scheduling unit configured to assign each ciphertext data block to one of the plurality of trusted execution environments, wherein, each trusted execution environment is configured to: decrypt the ciphertext data block into a plaintext data block comprising a plurality of data rows, and process each data row to obtain a plaintext processing result; encrypt the plaintext processing result to obtain a ciphertext processing result, and output the ciphertext processing result outside the trusted execution environment; calculate a return result of the data processing that needs to be returned to the first user based on the plaintext processing result, divide the calculated return result into one or more plaintext result blocks, and encrypt each plaintext result block separately to obtain one or more ciphertext result blocks, and output the one or more ciphertext result blocks outside the trusted execution environment, and the storage unit is configured to: execute a storage function code outside the trusted execution environment to store the ciphertext processing result to an external storage space; wherein the communication unit is further configured to: transmit the one or more ciphertext result blocks to the first user, each trusted execution environment is further configured to: read in a first ciphertext processing result related to the first user and a second ciphertext processing result related to other users from an external storage space outside the trusted execution environment, decrypt the first and second ciphertext processing results into first and second plaintext processing results respectively, and calculate a return result that needs to be returned to the first user based on the first and second plaintext processing results.
26. The data processing system of claim 25, wherein, each trusted execution environment is further configured to: share a pair of public and private keys of an asymmetric encryption algorithm with other trusted execution environments; and decrypt a received ciphertext data block encrypted using the public key of the asymmetric encryption algorithm into a plaintext data block using the private key of the asymmetric encryption algorithm.
27. The data processing system of claim 25, wherein, the communication unit is further configured to: receive an encrypted first user key from the first user; and the storage unit is further configured to: store the encrypted first user key in the external storage space. Each trusted execution environment is further configured to share a pair of public and private keys of an asymmetric encryption algorithm with other trusted execution environments, and to decrypt a received encrypted first user key with the private key of the asymmetric encryption algorithm to obtain a plaintext first user key, and to decrypt a ciphertext data block encrypted with the first user key into a plaintext data block with the first user key.
28. The data processing system of claim 25, wherein, Each trusted execution environment is further configured to: encrypt the plaintext processing result with the key of the symmetric encryption algorithm of the trusted execution environment to obtain a ciphertext processing result.
29. The data processing system of claim 25, wherein, the communication unit is further configured to: receive a first user key from the first user, and Each trusted execution environment is further configured to: encrypt the return result with the first user key to obtain a ciphertext result block.
30. The data processing system of claim 25, wherein, Each trusted execution environment is further configured to: read in the ciphertext processing result from an external storage space outside the trusted execution environment, decrypt the ciphertext processing result into a plaintext processing result, and compute the return result according to the plaintext processing result.
Citation Information
Patent Citations
Method for realizing privacy protection in block chain, node and storage medium
CN110020855A
Multi-party security computing method and device
CN112926051A