Cloud server and white box TEE combined security outsourcing computing method

Through the secure outsourcing computing method combined with cloud server and white box TEE, the Paillier encryption system and homomorphic encryption protocol are used to solve the contradiction between data security and availability in cloud computing, and efficient linear and nonlinear privacy computing is achieved. Enhanced data protection and computing efficiency, suitable for large-scale data processing.

CN119109573APending Publication Date: 2024-12-10XIDIAN UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411139621.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

There is a contradiction between data security and availability in existing cloud computing, especially the traditional security outsourcing computing method has limited support for nonlinear operations, large communication overhead, non-conspiracy assumptions, and TEE is vulnerable to side channel attacks, which cannot be effectively guaranteed. Safe storage and computing of large-scale data.

Method used

Using a secure outsourcing computing method combined with cloud server and white box TEE, through Paillier encryption system and homomorphic encryption protocol, shard private keys and collaborate between cloud server and trusted execution environment for encryption calculation, and improve the offline-online mechanism. Efficiency, avoiding co-conspiracy risks, TEE is regarded as a white box environment to resist side channel attacks.

Benefits of technology

It realizes efficient linear and nonlinear privacy computing, solves the problem of limited storage and computing resources, reduces security assumption dependence, enhances data privacy protection and computing efficiency, and is suitable for large-scale data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109573A_ABST
    Figure CN119109573A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud server and white box TEE combined security outsourcing computing method, which relates to the technical field of cloud computing data security, and comprises the following steps: system initialization: requesting a user RU to generate a public key pk and a private key sk, splitting the sk into sk1 and sk2, recruiting a cloud server and a trusted execution environment TEE, and establishing a security channel with the TEE; the Server establishes communication with the RU and the TEE; (pk, sk1) is sent to the Server, and (pk, sk2) is sent to the TEE; data encryption: the RU encrypts a plaintext m into a ciphertext # imgabs0 # and sends the ciphertext # imgabs0 # to the Server, and a calculation task is initiated; offline processing: both the Server and the TEE generate a plurality of tuples; online processing: the Server interactively cooperates with the TEE, calculates the # imgabs1 # by using a tuple and a linear and nonlinear privacy calculation protocol to obtain a ciphertext # imgabs2 #, and returns the ciphertext # imgabs2 # to the RU; and returning a result: decrypting the # imgabs3 # by the RU to obtain R. The efficient processing of the data is ensured, the privacy of the data is ensured, and the problem that the TEE is easily attacked by a side channel is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing data security technology, and in particular to a secure outsourced computing method combining a cloud server and a white box TEE. Background Art

[0002] With the ever-increasing demand for storage and computing resources, traditional user terminals are gradually experiencing performance bottlenecks when handling intensive computing tasks. To address this issue, cloud computing technology has emerged. This emerging technology provides computing services over the internet, including comprehensive computing services such as storage capacity, processing power, and network bandwidth. Thanks to its high adaptability and convenience, cloud computing has rapidly gained popularity among both individual and enterprise users, with an increasing number of users outsourcing their computing tasks to third-party cloud service providers. However, as more and more data is outsourced to cloud servers, their credibility has come under scrutiny, raising potential security and privacy concerns. These security and privacy concerns highlight data security issues that are becoming a significant constraint on the further development of cloud computing technology.

[0003] Addressing the data security challenges facing cloud servers, secure outsourced computing effectively balances the tension between data availability and security. It allows users to encrypt data before uploading it, enabling cloud servers to perform computations on the encrypted data without requiring full decryption, thus ensuring the security of cloud computing. However, the field of secure outsourced computing currently faces a number of challenges, including but not limited to: limited support for secure computation types, significant communication overhead, low computational efficiency, reliance on non-collusion assumptions, treating the trusted execution environment as a completely secure black box, and a lack of support for large-scale data storage and computation.

[0004] The specific questions are as follows:

[0005] 1. Traditional homomorphic encryption allows operations to be performed on ciphertext and the results to be converted into the corresponding plaintext operations. However, the supported operations are limited to addition and multiplication, two linear homomorphic operations, and nonlinear operations such as comparison cannot be performed. Combining a dual-server architecture with homomorphic encryption can support arbitrary computations, but this approach relies on the security assumption of "non-collusion" between servers.

[0006] 2. Secure multi-party computation, including obfuscated circuits and secret sharing schemes, allows multiple parties to jointly compute results without revealing private inputs. While these enable general computation of arbitrarily complex functions, they require significant storage and communication resources and rely heavily on the assumption of non-collusion among the participants.

[0007] 3. The Trusted Execution Environment (TEE) protects sensitive data in the system, including executable code, operating state, and memory, by creating a trusted, isolated, and confidential space independent of the operating system. It provides strong data confidentiality and integrity guarantees, making it a crucial component of security protocol design. However, TEEs are vulnerable to side-channel attacks, cannot fulfill the "perfectly secure black box" assumption, and are also resource-constrained.

[0008] Therefore, there is an urgent need to provide a secure outsourced computing method that combines cloud servers and white box TEEs to solve the above technical problems. Summary of the Invention

[0009] In response to the problems existing in the existing technology, the present invention provides a secure outsourced computing method that combines a cloud server and a white-box TEE, which can not only ensure the efficient operation and processing of data by cloud services, but also protect data privacy and solve the problem that TEE is vulnerable to side-channel attacks.

[0010] The technical solution of the present invention is achieved as follows:

[0011] A secure outsourced computing method combining a cloud server and a white box TEE includes the following steps:

[0012] Step 1: System initialization: Request the user RU to initialize the threshold Paillier encryption system, generate the public key pk and private key sk, and use the private key splitting algorithm to split the private key sk into sk1 and sk2;

[0013] The requesting user RU recruits a cloud server Server and trusted execution environment TEE provided by the same cloud service provider, and establishes a secure channel with the trusted execution environment TEE through remote authentication; the cloud server Server establishes communication channels with the requesting user RU and the trusted execution environment TEE respectively; the communication channel here can be either a regular channel or an encrypted secure channel.

[0014] The requesting user RU sends the key group (pk, sk1) to the cloud server Server, and sends the key group (pk, sk2) to the trusted execution environment TEE through the secure channel;

[0015] Step 2: Data encryption: The requesting user RU invokes the encryption algorithm Enc to encrypt the private data m into ciphertext [[m]], then sends the ciphertext [[m]] to the cloud server Server and requests to initiate a computing task; the private data m is used for secure outsourced computing; the types of secure outsourced computing include linear privacy computing protocols and nonlinear privacy computing protocols based on Paillier homomorphic encryption;

[0016] The number of ciphertexts uploaded must include at least two, and operations such as addition, subtraction, multiplication, division, and comparison must be performed.

[0017] Step 3, offline processing: The cloud server generates multiple first arrays, each of which includes at least one random number and at least one constant; the trusted execution environment TEE generates multiple second arrays, each of which includes at least one constant;

[0018] The cloud server Server and the trusted execution environment TEE respectively use the encryption algorithm Enc and the received key group to encrypt the random number and the constant, respectively, to obtain a random number ciphertext and a constant ciphertext;

[0019] The random number, random number ciphertext, constant and constant ciphertext belonging to the same first array form a tuple Server ; The constants and constant ciphertext belonging to the same second array form a tuple TEE The tuple is used for the secure outsourced computing. Offline here means that there is no contact or interaction between the cloud server and the trusted execution environment TEE. During offline processing, a large number of tuples are generated and stored in the cloud server and the trusted execution environment TEE respectively. Server and tuple TEE .

[0020] The Paillier algorithm involves the generation of random numbers and their ciphertext, which are used in ciphertext calculations. Each encryption and decryption operation requires the generation of random numbers, increasing the computing overhead and burden on the device. Generating and storing random numbers and their ciphertext in batches in advance can avoid delays caused by random number generation during high-frequency encryption operations, thereby improving the efficiency of encryption and decryption operations. When tuples are exhausted, the server and TEE generate a new batch of tuples.

[0021] Step 4, online processing: The cloud server Server interacts with the trusted execution environment TEE according to the computing task, collaborates to perform secure outsourced computing on the ciphertext [[m]], obtains the ciphertext result [[R]], and returns the ciphertext result [[R]] to the requesting user RU;

[0022] Step 5. Return result: The requesting user RU decrypts the ciphertext result [[R]] according to the private key sk and the decryption algorithm Dec; and obtains the result R.

[0023] As a cloud service platform, the cloud server is responsible for storing and managing encrypted data uploaded by the RUs, as well as storing and maintaining intermediate and final results transmitted to or outsourced from the trusted execution environment (TEE). Furthermore, the cloud server acts as the primary computing entity, providing online computing services.

[0024] As a computing collaborator, TEE only provides online computing services and collaborates with cloud servers to perform secure computing on encrypted data. It does not store anything other than tuples. TEE Any encrypted data other than

[0025] The cloud server Server can provide an untrusted storage space UnS with "unlimited" data storage capacity. TEE itself can store tuples TEE , or safely tuple data TEE Seal algorithm is used to seal the data in UnS for storage. In the trusted execution environment TEE, once the process exits, the TEE itself will be destroyed, resulting in the loss of protected data (such as pre-calculated data tuples generated in the offline phase). TEE If the data needs to be reused, the data is decrypted from UnS using the Unseal algorithm. Both Seal and Unseal algorithms use symmetric encryption algorithms.

[0026] Resource-limited requesting users (RUs) can delegate computationally intensive tasks to the cloud. The cloud provides a server and a trusted execution environment (TEE) to assist in the computation, eliminating the need for a fully trusted third party. Treating the TEE as a white-box environment, the security of the model relies not on the TEE's absolute security assumptions but on the design of the privacy-preserving computing protocol itself. The server and the TEE collaborate on computations as independent parties, eliminating the risk of data leakage caused by collusion.

[0027] It is worth noting that a white-box TEE is equivalent to a transparent TEE, which guarantees data integrity but does not protect the confidentiality of all information except for certificates, signatures, and keys. This allows others to observe the running state of the TEE, thus demonstrating that this invention is resistant to side-channel attacks against the TEE.

[0028] The threshold Paillier encryption system allows private keys to be sharded. Both the cloud server and the trusted execution environment (TEE) retain only part of the private key. The intermediate data in the entire outsourced calculation process involves masks, and only the requesting user (RU) can obtain the plaintext of the final calculation result.

[0029] This solution ultimately solves the problems of limited storage and computing resources of TEE, limited support of secure computing types by traditional cryptographic schemes, and excessive security assumptions such as "no collusion between servers" and "absolutely secure black box TEE".

[0030] As a further optimization of the above solution, in step 1, the public key pk and the private key sk are generated using the key generation algorithm Keygen; the generation process of the public key pk is:

[0031]

[0032] Among them, p and q are The odd prime numbers of bits, p′ and q′ are bits, and p, q, p', q' are mutually prime; l(κ) represents the bit length of the private key sk, n(κ) represents the bit length of the modulus N, κ is a security parameter; y is a y-valued integer from the integer group A uniformly randomly selected number in ;

[0033] The size of the plaintext space m is determined by the modulus N. The plaintext space [0, N-1] of the private data m is divided into two ranges, one is represents a non-negative number, and the other is Represents a negative number. When m < 0, according to the congruence theorem, it is equivalent to the effect of m = N - |m|.

[0034] The private key is sk = α = p·q;

[0035] The private key splitting algorithm is: randomly generate a random number with a bit length of σ as sk1, then sk2=((2α) -1 modN)·(2α)-sk1+η·2α·N, where η is a randomly generated non-negative integer and σ is a security parameter that controls the bit length.

[0036] The relevant parameters (N, P, Q, p, q) are generated by the algorithm NGen and meet the following conditions:

[0037]

[0038] Among them, gcd(*,*) is the "greatest common divisor" function.

[0039] As a further optimization of the above scheme, the encryption algorithm Enc is:

[0040] c←Enc(pk,m,r)=(1+m·N)·(h N modN 2 ) r modN 2 ;

[0041] Where pk is the public key; m is the plaintext, c is the ciphertext obtained by encrypting m; r is a random number whose bit length is less than or equal to the bit length of the private key sk. Plaintext is also the encrypted data.

[0042] As a further optimization of the above solution, the decryption algorithm Dec is:

[0043]

[0044] As a further optimization of the above solution, the tuple Server Including r1, r2, r3, r4, and The tuple TEE include and Among them, r1, r2, r3, and r4 are all random numbers and satisfy:

[0045]

[0046] in, It is expressed as the ciphertext of any value *, that is, * is encrypted using the public key pk and encryption algorithm Enc

[0047] As a further optimization of the above solution, the linear privacy computation protocol includes a secure multiplication protocol (SMUL). The secure multiplication protocol (SMUL) is used to calculate the product of plaintext x and plaintext y in the following steps:

[0048] Step A1: The cloud server randomly selects a tuple Server , and calculate:

[0049]

[0050] in, and are two ciphertexts involved in the calculation; L is a constant shared between the cloud server Server and the trusted execution environment TEE, and the bit length of L is greater than or equal to σ+2;

[0051] The cloud server Server partially decrypts C using the partial decryption algorithm PDec to obtain the partial ciphertext C1, namely:

[0052] C1←PDec(sk1,C);

[0053] The cloud server Server sends (C, C1) to the trusted execution environment TEE;

[0054] Step A2: The trusted execution environment (TEE) performs the following calculations:

[0055]

[0056] Among them, TDec is the joint decryption algorithm; Expressed as * rounded down; x+r1 and y+r2 are the quotient and remainder obtained by dividing (L·(x+r1)+y+r2) by L, respectively.

[0057] The trusted execution environment TEE will ciphertext Send to the cloud server Server; Step A3, the cloud server Server according to the ciphertext Calculate the ciphertext Right now:

[0058]

[0059] The cloud server will ciphertext Send back to the requesting user RU, requesting the user RU to use the decryption algorithm Dec After decryption, we can get the plaintext x·y.

[0060] As a further optimization of the above scheme, the nonlinear privacy computing protocol includes the secure comparison protocol SCMP; the secure multiplication protocol SMUL is used to compare the size of plaintext x and plaintext y, and the steps are as follows:

[0061] Step B1: The cloud server randomly selects a tuple Server , and select a random number π from the set {0,1};

[0062] If π=0, then calculate

[0063] If π=1, then calculate

[0064] The cloud server Server partially decrypts D using the partial decryption algorithm PDec to obtain a partial ciphertext D1, namely:

[0065] D1←PDec(sk1,D);

[0066] The cloud server Server sends (D, D1) to the trusted execution environment TEE;

[0067] Step B2: The trusted execution environment (TEE) performs the following calculations:

[0068]

[0069] Among them, TDec is the joint decryption algorithm;

[0070] The trusted execution environment TEE generates ciphertext

[0071] like but otherwise,

[0072] The trusted execution environment TEE will ciphertext Send to the cloud server Server;

[0073] Step B3: The cloud server Server Generate ciphertext

[0074] If π=0, then

[0075] If π=1, then

[0076] In step 5, the requesting user RU The decrypted plaintext μ=0 or μ=1, that is:

[0077]

[0078] Among them, μ=0, which means x≥y; μ=1, which means x<y.

[0079] As a further optimization of the above solution, the calculation of the partial decryption algorithm PDec is:

[0080]

[0081] Among them, C is the ciphertext, C i is the partial ciphertext obtained by decrypting part C, sk i is the partial private key, including sk1 and sk2.

[0082] As a further optimization of the above solution, the calculation of the joint decryption algorithm Tec is:

[0083]

[0084] Among them, M is the plaintext corresponding to the ciphertext C.

[0085] As a further optimization of the above solution, the process of establishing the secure channel is as follows: set K TEE is the symmetric key shared between RU and TEE, π AE =(Enc TEE ,Dec TEE ) is the authentication encryption scheme; the communication between TEE and RU is encrypted using the encryption algorithm Enc TEE (K TEE ,*) encrypts the transmission content* and uses the decryption algorithm Dec TEE (K TEE ,*) is decrypted to obtain the transmission content*.

[0086] The authenticated encryption scheme here is a symmetric encryption algorithm. Encryption algorithm Enc TEE (K TEE ,*) and decryption algorithm Dec TEE (K TEE ,*) correspond to algorithm Seal and algorithm Unseal respectively.

[0087] Compared with the prior art, the present invention achieves the following beneficial effects:

[0088] (1) The present invention provides a joint computing model framework based on cloud servers and white-box TEEs and a corresponding secure outsourcing computing method, which can effectively solve the problems of limited storage resources and overly strong security assumptions in privacy computing. This method entrusts the storage and computing tasks of large-scale data to cloud servers, while TEEs are only responsible for lightweight verification and auxiliary computing tasks. The two work together as independent participants to effectively solve the problem of limited TEE storage and computing resources in privacy computing. The use of TEEs instead of additional cloud service providers avoids collusion between the two servers, thereby avoiding data leakage. TEE is regarded as a white-box environment, so that the security of the solution depends on the design of the privacy computing protocol itself, rather than the absolute security assumption of TEE, thereby establishing a more practical security assumption.

[0089] (2) The present invention can effectively remove the limitations of limited privacy computing types and low efficiency. By innovatively combining the secure two-party computing method (the cloud server and the white box TEE are regarded as two participants) with the Paillier threshold cryptographic system, a secure outsourced linear and nonlinear privacy computing protocol is designed. Specifically, for the linear privacy computing protocol, Paillier is first used to implement efficient privacy-preserving addition and subtraction operations, and then the privacy-preserving multiplication operation is implemented through the collaboration between the cloud server and the white box TEE. For the nonlinear privacy computing protocol, an equivalent conversion mechanism is introduced to convert nonlinear operations into linear operations, and privacy-preserving comparison and division operations are implemented through privacy-preserving addition, subtraction and multiplication operations. Based on this principle, through protocol combination, it can be further expanded to implement other complex privacy-preserving calculations to meet the needs of complex computing tasks. In addition, by utilizing the properties of the congruence theorem, negative integers are mapped to positive integers, enabling them to be operated on the integer domain, expanding the application scope of secure outsourced computing. Finally, by combining the offline-online mechanism, the computational efficiency of the secure outsourced computing protocol is improved.

[0090] (3) The present invention can effectively break through the dilemma of balancing high efficiency and high security in privacy computing. Through a joint privacy computing model framework based on cloud servers and white-box TEEs, linear and nonlinear privacy computing protocols with collaborative security outsourcing between the two parties are designed to achieve comprehensive privacy protection. Specifically, this method not only ensures the efficiency of computing tasks by collaboratively utilizing the rich computing resources of the cloud and the isolated execution environment of TEE, but also effectively prevents the risk of leakage of sensitive data during cloud computing. The combination of software and hardware enables privacy protection to achieve a balance between efficiency and security, which is particularly suitable for large-model application scenarios, especially for the large amount of computing and high privacy protection requirements in large-model training and inference. It overcomes the challenge of traditional solutions that are difficult to balance computing performance and privacy protection, and achieves the dual goals of data value release and privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 This is a schematic diagram of a framework for a secure outsourced computing method combining a cloud server and a white-box TEE, provided by an embodiment of the present invention;

[0092] Figure 2 This is a flowchart of a secure outsourced computing method combining a cloud server and a white box TEE provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0094] like Figure 1 、 Figure 2 As shown, this embodiment provides a secure outsourced computing method for combining a cloud server with a white box TEE, including the following steps:

[0095] Step 1: System initialization: Request the user RU to initialize the threshold Paillier encryption system, use the key generation algorithm Keygen to generate the public key pk and private key sk, and use the private key splitting algorithm to split the private key sk into sk1 and sk2;

[0096] The generation process of the public key pk is:

[0097]

[0098] Among them, p and q are The odd prime numbers of bits, p′ and q′ are bits, and p, q, p′, q′ are mutually prime; l(κ) represents the bit length of the private key sk, n(κ) represents the bit length of the modulus N, κ is the security parameter; y is a number from the integer group A uniformly randomly selected number in ;

[0099] The private key is sk = α = p·q;

[0100] The private key splitting algorithm is: randomly generate a random number with a bit length of σ as sk1, then sk2=((2α) - 1 modN)·(2α)-sk1+η·2α·N, where η is a randomly generated non-negative integer and σ is a security parameter that controls the bit length.

[0101] The relevant parameters (N, P, Q, p, q) are generated by the algorithm NGen and meet the following conditions:

[0102]

[0103] Among them, gcd(*,*) is the "greatest common divisor" function.

[0104] In this embodiment, p=211, q=239 is generated, then P=35027, Q=43499, N=P·Q=1523639473;

[0105] Next, from the integer group Select a random number y=13 and calculate

[0106] β=(P-1)(Q-1) / (4pq)=7553, h=-y 2β (modN)=753767586.

[0107] Finally, the public key is pk = (N = 1523639473, h = 753767586), and the private key is sk = α = p·q = 50429. When splitting the private key, set sk1 = 1530, η = 0, then

[0108] sk2=((2α) -1 modN)·(2α)-sk1+η·2α·N=132725758130974.

[0109] Request the user RU to recruit a cloud server and trusted execution environment (TEE) provided by the same cloud service provider, and establish a secure channel with the trusted execution environment (TEE) through remote authentication;

[0110] In this embodiment, the process of establishing a secure channel is as follows: setting K TEE is the symmetric key shared between RU and TEE, π AE =(Enc TEE ,Dec TEE ) is the authentication encryption scheme; the communication between TEE and RU is encrypted using the encryption algorithm Enc TEE (K TEE ,*) encrypts the transmission content* and uses the decryption algorithm Dec TEE (K TEE ,*) to decrypt and obtain the transmitted content*.

[0111] The authenticated encryption scheme here is a symmetric encryption algorithm. Encryption algorithm Enc TEE (K TEE ,*) and decryption algorithm Dec TEE (K TEE ,*) correspond to algorithm Seal and algorithm Unseal respectively.

[0112] The cloud server Server establishes communication channels with the requesting user RU and the trusted execution environment TEE respectively; the communication channel here can be either a regular channel or an encrypted secure channel.

[0113] Request the user RU to send the key group (pk, sk1) to the cloud server Server, and send the key group (pk, sk2) to the trusted execution environment TEE through a secure channel;

[0114] Step 2: Data encryption: Request the user RU to call the encryption algorithm Enc to encrypt the private data m into ciphertext Then the ciphertext The data is sent to the cloud server and a secure outsourced computing task is requested, including: ① computing 4869·1412, and ② comparing the numbers 4869 and 1412. The private data then includes 4869 and 1412. The types of secure outsourced computing include linear and nonlinear privacy-preserving computing protocols based on Paillier homomorphic encryption.

[0115] The number of ciphertexts uploaded must include at least two, and operations such as addition, subtraction, multiplication, division, and comparison must be performed.

[0116] The size of the plaintext space m is determined by the modulus N. The plaintext space [0, N-1] of the private data m is divided into two ranges, one is represents a non-negative number, and the other is Represents a negative number. When m < 0, according to the congruence theorem, it is equivalent to the effect of m = N - |m|.

[0117] In this embodiment, the encryption algorithm Enc is:

[0118] c←Enc(pk,m,r)=(1+m·N)·(h N modN 2 ) r modN 2 ;

[0119] Where pk is the public key; m is the plaintext, c is the ciphertext obtained by encrypting m; r is a random number whose bit length is less than or equal to the bit length of the private key sk. The plaintext is also the encrypted data. For the sake of convenience in calculation demonstration, the random number r = 7 is used in the encryption process. Then the encryption algorithm Enc is called to calculate

[0120] and

[0121] Step 3, offline processing: The cloud server generates multiple first arrays, each of which includes at least one random number and at least one constant; the trusted execution environment TEE generates multiple second arrays, each of which includes at least one constant;

[0122] The cloud server and the trusted execution environment (TEE) use the encryption algorithm Enc and the received key group to encrypt the random number and constant, respectively, to obtain the random number ciphertext and the constant ciphertext;

[0123] The random number, random number ciphertext, constant and constant ciphertext belonging to the same first array form a tuple Server ; The constants and constant ciphertext belonging to the same second array form a tuple TEE ;Tuples are used for secure outsourcing of computations;

[0124] In this embodiment, the tuple Server Including r1, r2, r3, r4, and tuple TEE include and Among them, r1, r2, r3, and r4 are all random numbers and satisfy:

[0125]

[0126] in, It is expressed as the ciphertext of any value *, that is, * is encrypted using the public key pk and encryption algorithm Enc

[0127] The offline part here means that there is no contact or interaction between the cloud server and the trusted execution environment TEE. During offline processing, a large number of tuples are generated and stored in the cloud server and the trusted execution environment TEE respectively. Server and tuple TEE .

[0128] The Paillier algorithm involves the generation of random numbers and their ciphertext, which are used in ciphertext calculations. Each encryption and decryption operation requires the generation of random numbers, increasing the computing overhead and burden on the device. Generating and storing random numbers and their ciphertext in batches in advance can avoid delays caused by random number generation during high-frequency encryption operations, thereby improving the efficiency of encryption and decryption operations. When tuples are exhausted, the server and TEE generate a new batch of tuples.

[0129] In this embodiment, tuple Server The random numbers, constants and their encrypted values ​​extracted from the tuple include r1=3746, r2=2962,

[0130] r3=298, r4=761819635,

[0131]

[0132] and And in tuple TEE The numbers extracted from the tuple include and

[0133] Step 4: Online processing: The cloud server interacts with the trusted execution environment TEE according to the computing task and collaborates to process the ciphertext. Perform secure outsourcing calculations to obtain ciphertext results And the ciphertext result Return to the requesting user RU;

[0134] In this embodiment, the linear privacy computation protocol includes the secure multiplication protocol SMUL. The secure multiplication protocol SMUL is used to calculate the product of plaintext x and plaintext y. The steps are as follows:

[0135] Step A1: The cloud server randomly selects a tuple Server , according to the obtained and calculate:

[0136]

[0137] in, and are the two ciphertexts involved in the calculation; L is a constant shared between the cloud server Server and the trusted execution environment TEE, and the bit length of L is greater than or equal to σ+2;

[0138] In this embodiment, the constant L=14104, C=X L ·Y=891152495622872307;

[0139] The cloud server Server uses the partial decryption algorithm PDec to partially decrypt C and obtain the partial ciphertext C1, namely:

[0140]

[0141] Among them, C is the ciphertext, C i is the partial ciphertext obtained by decrypting part C.

[0142] Therefore, we get

[0143]

[0144] The cloud server sends (C, C1) to the trusted execution environment TEE;

[0145] Step A2: The Trusted Execution Environment (TEE) performs the following calculations:

[0146]

[0147] Among them, TDec is the joint decryption algorithm, namely:

[0148]

[0149] Among them, M is the plaintext corresponding to the ciphertext C.

[0150] Therefore, the calculation is:

[0151]

[0152] Expressed as * rounded down; x+r1 and y+r2 are the quotient and remainder obtained by dividing (L·(x+r1)+y+r2) by L, respectively.

[0153] Trusted Execution Environment TEE will ciphertext Send to the cloud server;

[0154] Step A3: The cloud server receives the encrypted data Calculate the ciphertext Right now:

[0155]

[0156] The cloud server will ciphertext Send back to the requesting user RU, requesting the user RU to use the decryption algorithm Dec After decryption, we can get the plaintext x·y.

[0157] In this embodiment, the nonlinear privacy computing protocol includes a secure comparison protocol SCMP; a secure multiplication protocol SMUL is used to compare the size of plaintext x and plaintext y; and The comparison steps are as follows:

[0158] Step B1: The cloud server randomly selects a tuple Server , and select a random number π from the set {0,1};

[0159] If π=0, then calculate

[0160] If π=1, then calculate

[0161] In this embodiment, π=0, then

[0162] The cloud server Server uses the partial decryption algorithm PDec to partially decrypt D and obtain the partial ciphertext D1, namely:

[0163]

[0164] The cloud server sends (D, D1) to the trusted execution environment TEE;

[0165] Step B2: The Trusted Execution Environment (TEE) performs the following calculations:

[0166]

[0167] Among them, TDec is the joint decryption algorithm;

[0168] Trusted Execution Environment TEE generates ciphertext

[0169] like but otherwise,

[0170] At this time, due to Trusted Execution Environment TEE from a tuple TEE Extract from the tuple make

[0171] Trusted Execution Environment TEE will ciphertext Send to the cloud server;

[0172] Step B3, the cloud server Server according to the ciphertext Generate ciphertext

[0173] If π=0, then

[0174] If π=1, then

[0175] In this embodiment, π=0, so

[0176] Step 5. Return result: Request user RU to decrypt the ciphertext result according to the private key sk and decryption algorithm Dec Decryption is performed; the result R is obtained. In this embodiment, the decryption algorithm Dec is:

[0177]

[0178] In task ①, RU receives the encrypted result returned Decrypt using sk as follows:

[0179]

[0180] The range of known non-negative numbers is The range of negative numbers is because Therefore, it represents a non-negative number and does not require additional processing, that is, the final result is 4869·1412=6875028.

[0181] In task ②, RU receives the encrypted result returned Decrypt using sk as follows:

[0182] The result is 0, which means x≥y, that is, 4869≥1412, which satisfies mathematical logic.

[0183] As a cloud service platform, the cloud server is responsible for storing and managing encrypted data uploaded by the RUs, as well as storing and maintaining intermediate and final results transmitted to or outsourced from the trusted execution environment (TEE). Furthermore, the cloud server acts as the primary computing entity, providing online computing services.

[0184] As a computing collaborator, TEE only provides online computing services and collaborates with cloud servers to perform secure computing on encrypted data. It does not store anything other than tuples. TEE Any encrypted data other than

[0185] The cloud server Server can provide an untrusted storage space UnS with "unlimited" data storage capacity. TEE itself can store tuples TEE , or safely tuple data TEE Seal algorithm is used to seal the data in UnS for storage. In the trusted execution environment TEE, once the process exits, the TEE itself will be destroyed, resulting in the loss of protected data (such as pre-calculated data tuples generated in the offline phase). TEE If the data needs to be reused, the data is decrypted from UnS using the Unseal algorithm. Both Seal and Unseal algorithms use symmetric encryption algorithms.

[0186] Resource-limited requesting users (RUs) can delegate computationally intensive tasks to the cloud. The cloud provides a server and a trusted execution environment (TEE) to assist in the computation, eliminating the need for a fully trusted third party. Treating the TEE as a white-box environment, the security of the model relies not on the TEE's absolute security assumptions but on the design of the privacy-preserving computing protocol itself. The server and the TEE collaborate on computations as independent parties, eliminating the risk of data leakage caused by collusion.

[0187] It is worth noting that a white-box TEE is equivalent to a transparent TEE, which guarantees data integrity but does not protect the confidentiality of all information except for certificates, signatures, and keys. This allows others to observe the running state of the TEE, thus demonstrating that this invention is resistant to side-channel attacks against the TEE.

[0188] The threshold Paillier encryption system allows private keys to be sharded. Both the cloud server and the trusted execution environment (TEE) retain only part of the private key. The intermediate data in the entire outsourced calculation process involves masks, and only the requesting user (RU) can obtain the plaintext of the final calculation result.

[0189] This solution ultimately solves the problems of limited storage and computing resources of TEE, limited support of secure computing types by traditional cryptographic schemes, and excessive security assumptions such as "no collusion between servers" and "absolutely secure black box TEE".

[0190] Based on the disclosure and teachings of the above description, those skilled in the art may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and any modifications and variations of the present invention should also fall within the scope of protection of the claims of the present invention. In addition, although certain specific terms are used in this description, these terms are only for convenience of description and do not constitute any limitation to the present invention.

Claims

1. A secure outsourcing computing method for combining a cloud server with a white box TEE, characterized in that: The following steps are involved: Step 1: System initialization: Request the user RU to initialize the threshold Paillier encryption system, generate a public key pk and a private key sk, and use a private key splitting algorithm to split the private key sk into sk1 and sk2; The requesting user RU recruits a cloud server Server and a trusted execution environment TEE provided by the same cloud service provider, and establishes a secure channel with the trusted execution environment TEE through remote authentication; The cloud server Server establishes a communication channel with the requesting user RU and the trusted execution environment TEE respectively; The requesting user RU sends the key group (pk, sk1) to the cloud server Server, and sends the key group (pk, sk2) to the trusted execution environment TEE through the secure channel; Step 2, data encryption: the requesting user RU calls the encryption algorithm Enc, encrypts the private data m into the ciphertext [[m]], then sends the ciphertext [[m]] to the cloud server Server, and requests to initiate a computing task; the private data m is used for secure outsourced computing; the types of secure outsourced computing include linear privacy computing protocols and nonlinear privacy computing protocols based on Paillier homomorphic encryption; Step 3, offline processing: the cloud server Server generates multiple first arrays, the first arrays include at least one random number and at least one constant; the trusted execution environment TEE generates multiple second arrays, the first arrays include at least one constant; The cloud server Server and the trusted execution environment TEE respectively use the encryption algorithm Enc and the received key group to encrypt the random number and the constant respectively, to obtain a random number ciphertext and a constant ciphertext; The random number, random number ciphertext, constant and constant ciphertext belonging to the same first array form a tuple Server ; The constants and constant ciphertext belonging to the same second array form a tuple tuple TEE ; The tuple is used for the secure outsourcing calculation; Step 4, online processing: the cloud server Server interacts with the trusted execution environment TEE according to the computing task, collaborates to perform secure outsourced computing on the ciphertext [[m]], obtains the ciphertext result [[R]], and returns the ciphertext result [[R]] to the requesting user RU; Step 5, returning the result: the requesting user RU decrypts the ciphertext result [[R]] according to the private key sk and the decryption algorithm Dec; The result R is obtained.

2. According to claim 1, a secure outsourcing computing method for combining a cloud server and a white box TEE is characterized in that: In step 1, the public key pk and the private key sk are generated using the key generation algorithm Keygen; the generation process of the public key pk is: Among them, p and q are The odd prime numbers of bits, p′ and q′ are bits, and p, q, p′, q′ are mutually prime; l(κ) represents the bit length of the private key sk, n(κ) represents the bit length of the modulus N, κ is a security parameter; y is a integer from the group A uniformly randomly selected number from ; The private key is sk=α=p·q; The private key splitting algorithm is: randomly generate a random number with a bit length of σ as sk1, then sk2=((2α) - 1 modN)·(2α)-sk1+η·2α·N, where η is a randomly generated non-negative integer and σ is a security parameter that controls the bit length.

3. According to claim 2, a secure outsourcing computing method for combining a cloud server and a white box TEE is characterized in that: The encryption algorithm Enc is: c←Enc(pk,m,r)=(1+m·N)·(h N modN 2 ) r modN 2 ; Among them, pk is the public key; m is plain text, c is the ciphertext obtained after m is encrypted; r is a random number, and the bit length of r is less than or equal to the bit length of the private key sk.

4. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 3, characterized in that: The decryption algorithm Dec is:

5. According to claim 2, a secure outsourcing computing method for combining a cloud server and a white box TEE is characterized in that: The tuple Server The tuple includes r1, r2, [[r1]], [[r2]], [[-r1·r2]], r3, r4, [[r4]], [[r3+r4]], [[0]] and [[1]], wherein TEE Including [[0]] and [[1]]; wherein r1, r2, r3, and r4 are all random numbers and satisfy: Among them, [[*]] represents the ciphertext of any value *.

6. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 5, characterized in that: The linear privacy computing protocol includes a secure multiplication protocol SMUL; the secure multiplication protocol SMUL is used to calculate the product of plaintext x and plaintext y, and the steps are as follows: Step A1: The cloud server randomly selects a tuple Server , and calculate: Wherein, [[x]] and [[y]] are two ciphertexts involved in the calculation respectively; L is a constant shared between the cloud server Server and the trusted execution environment TEE, and the bit length of L is greater than or equal to σ+2; The cloud server Server partially decrypts C using the partial decryption algorithm PDec to obtain a partial ciphertext C1, namely: C1←PDec(sk1,C); The cloud server Server sends (C, C1) to the trusted execution environment TEE; Step A2: The trusted execution environment TEE performs the following calculations: Among them, TDec is the joint decryption algorithm; The trusted execution environment TEE sends the ciphertext [[(x+r1)·(y+r2)]] to the cloud server Server; Step A3: The cloud server Server calculates the ciphertext [[(x+r1)·(y+r2)]] based on the ciphertext [[x·y]], that is:

7. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 6, characterized in that: The nonlinear privacy computing protocol includes a secure comparison protocol SCMP; the secure multiplication protocol SMUL is used to compare the size of plaintext x and plaintext y, and the steps are as follows: Step B1: The cloud server randomly selects a tuple Server , and select a random number π from the set {0,1}; If π=0, then calculate If π=1, then calculate The cloud server Server partially decrypts D using the partial decryption algorithm PDec to obtain a partial ciphertext D1, namely: D1←PDec(sk1,D); The cloud server Server sends (D, D1) to the trusted execution environment TEE; Step B2: The trusted execution environment TEE performs the following calculations: Among them, TDec is the joint decryption algorithm; The trusted execution environment TEE generates a ciphertext [[μ0]]; like Then [[μ0]]=[[0]]; otherwise, [[μ0]]=[[1]]; The trusted execution environment TEE sends the ciphertext [[μ0]] to the cloud server Server; Step B3, the cloud server Server generates a ciphertext [[μ]] based on the ciphertext [[μ0]]; If π=0, then [[μ]]=[[μ0]]; If π = 1, then [[μ]] = [[1]]·[[μ0]] N-1 。 8. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 6 or 7, characterized in that: The calculation of the partial decryption algorithm PDec is: Among them, C is the ciphertext, C i is the partial ciphertext obtained by decrypting part C, sk i Part of the private key.

9. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 8, characterized in that: The calculation of the joint decryption algorithm Tec is: Among them, M is the plaintext corresponding to the ciphertext C.

10. A secure outsourcing computing method for combining a cloud server and a white box TEE according to claim 1, characterized in that: The process of establishing the security channel is as follows: set K TEE is the symmetric key shared between RU and TEE, Π AE =(Enc TEE ,Dec TEE ) is the authentication encryption scheme; the communication between TEE and RU is encrypted using the encryption algorithm Enc TEE (K TEE ,*) encrypts the transmission content* and uses the decryption algorithm Dec TEE (K TEE ,*) is decrypted to obtain the transmission content*.