Calculation method of single cloud architecture threshold multi-party privacy set intersection depending on trusted hardware and homomorphic encryption
By utilizing the memory interaction between TEE and REE and the (2,2) threshold Paillier cryptosystem on a single cloud server supporting Intel SGX, the communication overhead and trust assumption fragility issues in multi-server architectures are resolved, enabling efficient and secure threshold multi-party privacy set intersection computation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-10
AI Technical Summary
Existing methods for calculating the intersection of multi-party privacy sets in multi-server architectures suffer from high communication overhead, fragile trust assumptions, and heavy burden on clients. Furthermore, traditional trusted execution environments have performance limitations and are susceptible to side-channel attacks.
It employs a single cloud server supporting Intel SGX technology, utilizes Trusted Execution Environment (TEE) and Rich Execution Environment (REE) memory interaction, and combines a (2,2) threshold Paillier cryptosystem to achieve secure comparison and computation through homomorphic encryption, reducing network communication and relying on hardware isolation protection.
It improves computing speed and communication efficiency, reduces the computing and storage resource consumption of participants, protects the privacy of participants, avoids network latency and multi-round communication, and enhances security.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention relates to the field of privacy protection technology in information security, and in particular to a method for calculating the intersection of multi-party privacy sets based on security comparison. This invention relates to the field of information security and privacy protection computational technology, and particularly to a method combining homomorphic encryption technology and trusted hardware facilities for calculating the intersection of multi-party privacy sets under threshold conditions. Background Technology
[0002] With the advent of the big data era, the demand for cross-institutional data fusion and collaborative computing is growing. Private Set Intersection (PSI), as a key privacy computing technology, allows participants to calculate the intersection of datasets without revealing their non-intersecting elements. In practical applications (such as electronic voting and joint risk control), it is often necessary to introduce the concept of a "threshold," meaning that an element is only included in the result if it appears in more than a certain number of participants. This is the concept of threshold-based private set intersection.
[0003] Existing methods for calculating the intersection of multi-party privacy sets primarily rely on homomorphic encryption and multi-party secure computation (MPC) protocols. To achieve comparison and computation within ciphertext, traditional architectures typically employ a "multi-server model," where decryption and comparison are performed through interaction between servers. However, this existing technology suffers from the following significant drawbacks:
[0004] The communication overhead is enormous: multi-server architectures require frequent, multi-round network communications between physical servers. In scenarios with massive amounts of data, wide area network bandwidth and latency become serious performance bottlenecks, resulting in extremely long computation times.
[0005] The trust assumption is fragile: security relies heavily on the assumption that "multiple servers do not collude with each other." In a real-world business environment, if two cloud service providers are actually controlled by the same entity or have been compromised by the same attacker, user privacy will be completely exposed.
[0006] Heavy burden on the client: Some solutions still require the client to participate in some calculations online or act as a data relay, which increases the load on the client-side devices, while sometimes the client side does not have strong computing power to guarantee.
[0007] Trusted Execution Environments (TEEs), such as Intel® Software Guard Extensions (Intel SGX), build encrypted and isolated "enclaves" in memory through CPU hardware, ensuring that code and data are not spied on or tampered with by the operating system or privileged malware during execution.
[0008] While Trusted Execution Environments (TEEs) offer performance improvements, they also have limitations, such as lack of support for library portability, limited computing environment, poor scalability, and vulnerability to side-channel attacks.
[0009] Therefore, there is an urgent need for a single-cloud architecture privacy set intersection computation method that combines efficient and low-overhead software computing methods with the hardware isolation advantages of TEE, and has high communication efficiency and does not rely on too many security assumptions. Summary of the Invention
[0010] To address the aforementioned technical challenges, this invention proposes a method for calculating the intersection of threshold multi-party privacy sets in a single-cloud architecture based on trusted hardware and homomorphic encryption. This invention utilizes a single cloud server supporting Intel Software Protection Extensions (IntelSGX) technology. By internally partitioning the server into a Rich Execution Environment (REE) and a Trusted Execution Environment (TEE), it achieves an equivalent or even higher level of security protection while eliminating inter-server network communication overhead and maintaining high computational efficiency.
[0011] To achieve the above objectives, the technical solution provided by this invention is as follows: a method for calculating the intersection of threshold multi-party privacy sets in a single-cloud architecture based on trusted hardware and homomorphic encryption, comprising a task requester (RU), a cloud server supporting Intel SGX technology, and multiple task participants performing threshold privacy set intersection calculations; the cloud server includes a rich execution environment (REE) containing the operating system and a trusted execution environment (TEE) protected and isolated by CPU hardware; the technical solution includes the following steps:
[0012] Step 1: The task requester RU initializes the (2,2) threshold Paillier cryptosystem, generating a key pair (pk, sk), where pk is the system's public key and sk is the private key. The private key sk is then split into two parts, sk1 and sk2, using a private key splitting algorithm. These parts satisfy the following requirements: sk1 + sk2 ≡ 0 (mod sk), sk1 + sk2 ≡ 1 (mod N). The Chinese Remainder Theorem is used to solve for the key pair (pk, sk1, sk2). Neither the split private key sk1 nor sk2 can completely decrypt data encrypted with the public key pk.
[0013] The task requester RU, as the initiator of the control plane, after initializing the (2,2) threshold Paillier cryptosystem, recruits a trusted cloud service provider CSP, and with the help of the rich execution environment REE and trusted execution environment TEE provided by the CSP, which are cloud servers with trusted hardware, constructs two logically independent computing entities to reliably complete the computation of most of the privacy set intersection in the cloud.
[0014] The task requester RU defines a task to compute the intersection of a threshold multi-party privacy set, including the specific threshold size and each task participant.
[0015] The task requester RU establishes a secure communication channel with the Trusted Execution Environment (TEE) of the cloud server through Remote Attestation; the rich execution environment REE establishes secure communication channels with both the task requester RU and the Trusted Execution Environment (TEE).
[0016] Furthermore, the task requester RU sends the computation task and private key sk1 to the rich execution environment REE, while sending the private key sk2 to the trusted execution environment TEE through the secure channel. The public key pk is simultaneously made public to all task participants and the recruited cloud server.
[0017] Step 2: After receiving the public key pk of the (2,2) threshold Paillier cryptosystem published by the task requester RU, each task participant first computes a Bloom filter BF for the client's private data set locally. This filter contains parameters m and k, which represent the length of the bit array of the Bloom filter as m bits and the use of k independent hash functions to map each element in each task participant's private set into the bit array, respectively. Then, the Bloom filter is encrypted using the public key pk to obtain the encrypted Bloom filter EBF.
[0018] Finally, each task participant independently establishes a secure communication channel with the cloud server via remote authentication. Only after confirming the authenticity of the TEE will they transmit their encrypted Bloom Filter (EBF) through the secure communication channel. i The rich execution environment (REE) sent to the cloud server;
[0019] Step 3: For each element of the local private set, the Rich Execution Environment (REE) of the cloud server calculates k corresponding hash values based on the selected k hash functions. Then, using these hash values as indices, it extracts the encrypted values from the Bloom filter of each client. For each client, the REE independently performs a homomorphic summation on the obtained encrypted values, and then calls the predefined Enclave interface (ECALL) to pass the homomorphic summation result into the Trusted Execution Environment (TEE). The REE and TEE jointly perform a secure comparison operation to ensure that no information is leaked during the comparison process. The comparison operation values are the homomorphic summation of the k value encrypted using the (2,2) threshold Paillier public key pk and the encrypted values obtained from the Bloom filter. The comparison result is stored in the REE.
[0020] Step 4: After obtaining the comparison results, the rich execution environment REE knows each element y in its private set. j Whether it appears in every client; in order to obtain a set that satisfies the threshold condition, the rich execution environment REE continues to process each element y j Whether the encrypted bit values appear in each client set are homomorphically summed;
[0021] Step 5: The Rich Execution Environment (REE) and the Trusted Execution Environment (TEE) perform encrypted interactive computation to complete the secure comparison of the occurrence count of elements with the threshold condition. The comparison is also performed on the (2,2) threshold Paillier ciphertext space. Finally, the REE and TEE jointly decrypt to obtain the set of elements that meet the condition that the occurrence count is greater than or equal to the threshold condition, and return the generated set to each task participant through a secure communication channel.
[0022] Furthermore, in step 1, the key generation (KeyGen) process of the (2,2) threshold Paillier cryptosystem is as follows: First, two large prime numbers p' and q' need to be found. In their binary representation, they have Len bits. The larger the length of Len, the more difficult it is to crack, which means a higher security factor. Then, the mask values p = 2p' + 1 and q = 2q' + 1 are calculated to hide the real values of p and q. The Paillier modulus N = p·q and the generator g = N + 1 are calculated, as well as λ = lcm(p-1, q-1), where lcm() represents finding the least common multiple. The inverse of the least common multiple of p-1 and q-1 with respect to N, μ = λ, is calculated. -1 mod N, set and publish the public key pk = (g, N) and private key sk = λ of the (2,2) threshold Paillier cryptosystem.
[0023] Furthermore, in step 1, the (2,2) threshold Paillier cryptosystem divides the private key λ into two parts, private keys sk1 and sk2, which satisfy the following requirements: sk1+sk2≡0 (mod sk), sk1+sk2≡1 (mod N); the specific generation process is as follows: according to the operation property of congruence equations, multiply the above two equations to obtain the characteristic equation δ=sk1+sk2 =sk·μ mod (sk·N), and according to the Chinese Remainder Theorem, it is required that δ≡0 (mod sk) and δ≡1 (mod N) are true at the same time. Then, sk1 is set to a σ-bit random positive integer R, that is, sk1=R. According to the Chinese Remainder Theorem, sk2=sk·μ+η·sk·N-sk1 can be obtained, where η is a non-negative integer.
[0024] Furthermore, in step 2, the rich execution environment (REE) uses the MurmurHash3 hash generation algorithm to generate k random hash functions and sends them to each task participant; for the i-th participant P... i P i First, calculate your own Bloom filter (BF) locally. Specifically, when adding any element x from the dataset, use k hash functions to obtain k hash values, and then set the corresponding bit in the bit array of the Bloom filter to 1, that is, the position h mapped by the i-th hash function. d (x) will be set to 1 (1≤i≤k); if a position is set to 1 multiple times, only the first time will have an effect, and subsequent times will have no effect. Then, each element BF of the bit group is encrypted using the server's public key pk. i [j], the encrypted Bloom filter EBF is obtained. i Finally, each client verifies the cloud server's existence as a genuine Trusted Execution Environment (TEE) through remote authentication before using the locally calculated EBF. i The rich execution environment (REE) sent to the cloud server.
[0025] Furthermore, in step 3, the rich execution environment (REE) uses a randomly selected hash function for each server set element. Calculate k hash values; then use these hash values as indices to retrieve the element at the i-th client P. i The encrypted value in the encrypted Bloom filter, i.e. ,in , , Let be the size of the server set, and d represent the d-th hash function. Then, perform a homomorphic summation operation in the Paillier ciphertext space on the extracted encrypted values, and re-randomize the sum to obtain... ,in Represents a homomorphic summation operation, where ReRand is the rerandomization function, specifically implemented by adding an encrypted zero value to the ciphertext homomorphism. This indicates that the ciphertext is the j-th element on the server regarding the i-th client; according to the principle of the Bloom filter, if this server element... Belongs to client P i So, ciphertext The corresponding plaintext must be k; because The k hash values are indices. The cryptographic Bloom filter on this client produces values that are all 1 in the ciphertext state. Homomorphic summation yields k in the ciphertext state. Therefore, it is only necessary to... By performing a secure comparison with k in Paillier's cipherspace, we can determine whether the server element appears in the client.
[0026] Furthermore, in step 3, the specific implementation of the Joint Security Comparison Operation (SCMP) based on the (2,2) threshold Paillier cryptosystem used for encrypted interaction calculation between the Rich Execution Environment (REE) and the Trusted Execution Environment (TEE) of the cloud server is as follows: First, the REE generates a random number π, which can be either 0 or 1; the original comparison data is masked by calculating the difference D between the two numbers r1 and r2 being compared; if π = 0, then D = r1 - r2, otherwise D = r2 - r1; the difference D calculated by the security comparison is partially decrypted using a partial private key sk1 to obtain the decryption result D1; second, the REE transmits (D, D1) into the TEE through the ECALL interface; the TEE internally uses sk2, which is pre-stored using key sealing technology, to partially decrypt D to obtain D2, and finally decrypts the plaintext d = D1 * D2 mod N2 using the partially decrypted results D1 and D2 to obtain the plaintext d = D1 * D2 mod N2, and compares d with N / 2; if d > N / 2, then d = 1, otherwise d = 0. Then, the Trusted Execution Environment (TEE) returns the result to the Rich Execution Environment (REE) via the OCALL interface; in the third step, the Rich Execution Environment (REE) calculates the comparison result. If SCMP returns an encrypted 1, then the obtained Bloom filter encrypted value is greater than or equal to k, indicating that the server element appears in the corresponding client set; otherwise, it will return an encrypted 0.
[0027] Furthermore, in step 4, the rich execution environment REE will process each server element y j Homomorphic summation is performed on values appearing in each client set. The specific operation of homomorphic summation is modular multiplication, which involves multiplying the ciphertexts and then squared by the Paillier modulus N. 2Take the modulo; then repeat the homomorphic summation until you get the sum of the number of times each server element appears in the client set.
[0028] Furthermore, in step 5, the Rich Execution Environment (REE) and the Trusted Execution Environment (TEE) continue to perform encrypted interactive computation to complete the Joint Security Comparison (SCMP). The comparison objects are the encrypted server element occurrence count sum and the Paillier-encrypted threshold condition T value of the computation task. The REE then interacts with the TEE again to perform joint decryption to obtain the set of elements that satisfy the occurrence count being greater than or equal to the threshold condition T. The generated set is then returned to each task participant as the result of the computation task.
[0029] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0030] This invention proposes a method for calculating the intersection of threshold multi-party privacy sets by combining trusted hardware with homomorphic encryption. It utilizes only a single cloud server equipped with trusted hardware for auxiliary computation, reducing the computational and storage resource consumption of participating entities and avoiding the communication overhead caused by multiple rounds of communication between the server and client in existing solutions. Furthermore, it replaces traditional inter-server communication with memory interaction (ECALL / OCALL) between the REE and TEE within a single server, eliminating network latency, significantly improving communication efficiency, and ultimately resulting in a substantial increase in computational speed.
[0031] This invention successfully enables multiple participants to use their private data for computation, obtaining the intersection information of sets that meet threshold conditions, without disclosing any private information of the participants other than the result, thus protecting the privacy of participants in multi-party scenarios. Specifically, the method of this invention uses fully encrypted data transmission and computation, and achieves secure comparison and secure computation of privacy sets through the homomorphism and security of the (2,2) threshold Paillier. Based on this software, it also incorporates trusted hardware, no longer relying on the weak assumption of "multiple servers not colluding," but rather on the isolation protection provided by CPU hardware. Through a remote authentication mechanism, users only need to trust Intel's trusted hardware itself; even cloud service provider administrators cannot snoop on the memory data within the TEE. Because it is a software and hardware combined algorithm, even if the TEE encounters a side-channel attack, only the ciphertext that cannot be decrypted individually will be leaked.
[0032] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0033] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0034] Figure 1 This is a flowchart illustrating the method for calculating the intersection of threshold multi-party privacy sets in a single-cloud architecture based on trusted hardware and homomorphic encryption, as provided by the present invention.
[0035] Figure 2 This is a schematic diagram of the framework for the calculation method of the intersection of threshold multi-party privacy sets in a single-cloud architecture based on trusted hardware and homomorphic encryption, provided by the present invention. Detailed Implementation
[0036] The present invention will be further described in detail below with reference to embodiments and accompanying drawings, but the implementation of the present invention is not limited thereto. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for calculation and analysis, stored data, displayed data, etc.) involved in the present invention application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0037] like Figure 1 and Figure 2 As shown, this embodiment provides a method for calculating the intersection of threshold-based multi-party privacy sets in a single-cloud architecture based on trusted hardware and homomorphic encryption. The method involves representing the set elements locally using a Bloom filter and encrypting them with a (2,2) threshold Paillier. The intersection of the privacy sets is calculated and compared on the cloud server through data outsourcing. Finally, the result is compared with a threshold and the calculated intersection of the multi-party privacy sets under the threshold condition is returned. This involves a cloud server with powerful computing capabilities and trusted hardware, and multiple task participants performing the threshold-based multi-party privacy set intersection calculation. The cloud server is divided into a Rich Execution Environment (REE) containing an operating system and a Trusted Execution Environment (TEE) protected by trusted hardware. To facilitate understanding of the implementation of the technical solution, specific data is used for demonstration in this embodiment.
[0038] Step 1: The task requester initializes the (2,2) threshold Paillier cryptosystem and generates a key pair (pk, sk). In this example, p = 3850291647 and q = 4729063851 are generated, and pk = p·q = 18208275043634952597 is calculated. The generated private key sk=3634247515011905445 is split into two parts: sk1=10828241489933559846258085808229968827 and sk2=27009522109509558561224149810781419733. Part of the private key sk1 is sent to the Rich Execution Environment (REE) of the cloud server. A secure channel is established through remote authentication, and part of the private key sk2 is sent to the Trusted Execution Environment (TEE) of the cloud server. The public key pk is made public and sent to each client that performs the intersection calculation of the privacy set.
[0039] Step 2: In this embodiment, client C1 has a set {1, 4, 5, 7}, client C2 has a set {2, 4, 6, 8}, and the cloud server rich execution environment REE has a set {7, 5, 4, 3}. The bit array of the Bloom filter has a length of m=16 bits, and k=4 independent hash functions are used to map each element in each client's private set into the bit array. Client C1 constructs an unencrypted Bloom filter for its own set as {0,0,1,1,1,1,0,0,1,1,1,1,1,1,1,0}. After encrypting each element using pk, the encrypted Bloom filter is obtained as {6293567407005720209002177286078709274335433647769962748880444151141505121604999225609785041875503302061342879362273138523713637330673318577565}. 3814837102505423991310004218945740668175306219049927409167636588151376583651800764650197148137243088646004350672123400731352374749504958978912, 3520622595276862755524174960109535420686800433319205303286838379041120803288640102700338617498068847376704843756841862739346268756861832585101, 7671200901661237557420520665204505686553317438470838424597108564937935434271798263231626674337411250533734924901732720671041321000725067114785, 8749781759967717603566684940065203202966656555027545308733004169842555710289314230779362725731539162648483961034718387202318946113456509728977,6644996862664338135899349536576972192116395617509947820795499939467025639248561261854653379421299087868505116945189123288732126443585631124591, 6631941530671870761030399418568824108584099835895909042873398263399810522224920115774150703759461707747210132568085455508478215633902850228239, 9106035285036511727909105477583486714777188536936196094324325399085287304306713310388526837149146018300450014132889024265739072708048067158079, 9101453275125164224971030107428299707886754245808216949181230350285387774661121425930555434388445215440620444326163483768631497999480293618068, 9237562922434622820989087306403978136137069315204435391371948454403159445107578728648053561198285411968636670581062226783118254430355243137839, 1877687253016684032902277798674141082511094224255887741990425202652639268143800366675812826160817998102546129909491452960635357605789675299497,2062358512023490284636103233784067316750335056819793475492693556508348856282160574751259805429022728927847213999982986383167090588889989013890, 8608568630213790383490193989976174535110539269876178546046981135683543382788487828860426685489835776754827374062854912380694850877607253472020, 5944953728432788643823620950201258331562826789992922728493163375981203299475531278877908673445138848462755170441841332964757878691951582405736, 6177886083687224167248622979673068197842074677170725529540836880154816286363736269066219994399877784148786620983203912704401229700420344693083, 2917895219768750614253602280065664748270361324952921745388339451029509105452251086131010470207444742612717350285705631975770986770429568176281}; The client C2 constructs an unencrypted Bloom filter for its own set as {0,1,1,1, 1,1,0,0,1,0,1,1,1,0,1,0}, after being encrypted using pk, becomes {2877109644863823932081156055469746569712145843476094949847560392425702792563693189616910807544867600538947952351666863183418726320227328928747,2042710280203651427274716604717840488385894354352020179561852125386870355249860600981008093650748931370606483589615638265780708408353485402480, 4362211850748485420328866873874303531795532333233458732555358806682440201263396723594129273265819381913778496093074113759864517560107475806582, 8412334500638776287286996744578560480115450695262596360346816068422512970758139855521529173090671034390154092818115187141503479899255703609574, 1963435033214941294656692412958154892301742609211236646341177595781803164594672413851599212443297836205113053700092312466387682825886853629782, 2147841538158614387073842198407557842425451292758247862608238653081774578233785977440509479011291928972884090704305783333803056591492478195290, 5477821380361038366664491603393572599430375279615970355182738065680235077314085036460230560140279435073475443076961179311446395218971963098085,1941177683377849218822474200852759512269405170630632967700947292878941895599374887753225450528837476420824237548742257348000511878925159719820, 8187401310328328079189469352986850968359127192905262348478277685585253639320146133808268401420974724189583898130741812126218117266505021083166, 9828584886102874208003424743339058431633973832110752336533453004837050922666083933822236490510900972347597149968363168227191209939978508932138, 1217891078568433065960113709115230459564598235177590319011423925950620968802781454616710214784532464554567078927728455043420911756373707939307, 5318207062141061277435528473754179401524533899006299229014432854185207887761540249145653473785772350266363206881379545344635781991013633175004, 8306416200817141697735792844367195422800588603585731514510953603079282465737396246627569981129102375537441355958154009949648674418839686771359,3222971182747411240036113780218923370990546214761724607240603218013727311514578036646715622301607532396774584783021133625081517316664531196413, 7950715907944792252448066644003008837516041111417134821265166751885168656309885838544439027680186737287420022634377046359923690312228204722974, After completing local encryption, both clients send their encrypted Bloom filter (EBF) to the cloud server's Rich Execution Environment (REE).
[0040]
[0041] Step 4: The REE (Rich Execution Environment) on the cloud server continues to perform homomorphic summation on the comparison results of each element to obtain the elements that meet the threshold condition. The sum of the comparison results of element 7 is 6957615710466611639544410185394344323805551196114185479339085525033228686070249476311247457768385120413027785560332437239424810517985180751977; The sum of the comparison results for element 5 is 2312082282195293285989518480063546182918951657418595832088077725534998903648609420877977418925338830870826226749142955789658866790993879024816; The sum of the comparison results for element 4 is 4197271794442125932573122368914117262319926410088847952820167472885214227641776636225421974604015119569788608725491394603106029882722070993232; The sum of the comparison results for element 3 is 3877426247612791664354503898672714225387505624886054756243914695559168437576888068925129014051724154232144927492620296549023733006280898176219.
[0042] Step 5: The Rich Execution Environment (REE) and Trusted Execution Environment (TEE) of the cloud server perform encrypted interactive calculations to complete further security comparisons. The sum of the comparison results of element 7 and the comparison result of the threshold T are: 37534364372116032113441132634915857240555395566811270728274330884001667182488217812703059900975195139158517655349390251074062975785263467 51210, decrypting the result yields a value of 1, indicating that the frequency of element 7 meets the threshold condition; the sum of the comparison results of element 5 compared with the threshold T is 2116647278136293182410918194167948807344728121854898844663625905692358287389323990419197568611704554688818786050570637223163919905650503860199, decrypting the result... The result of decrypting the result is 1, indicating that the frequency of element 5 meets the threshold condition. The sum of the comparison results of element 4 and the threshold T is 7009870476559983189977849967967988049352936855886697308415911179730438180336063302930073477413043237942918064956031638572477420995309611894734. Decrypting the result yields a value of 1, indicating that the frequency of element 5 meets the threshold condition. The frequency of occurrence meets the threshold condition; the sum of the comparison results of element 3 compared with the threshold T is 5749373953891765978316255449433602678411006237149203844893887433815690642413135890438119145503601597405555654158859435091515622059514419225976. Decrypting the result yields a value of 0, indicating that the frequency of occurrence of element 3 does not meet the threshold condition. In summary, CP obtains the set of elements that meet the threshold condition as {7, 5, 4}, and returns the set to each client.
[0043] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for computing a threshold multi-party private set intersection of a single cloud architecture with trusted hardware and homomorphic encryption, the method comprising: The system includes a task requester RU, a cloud service provider CSP supporting Intel software guard extensions (Intel SGX) technology, and a plurality of task participants; the cloud server includes a rich execution environment (REE) such as an operating system and a virtual machine manager, and a trusted execution environment (TEE) isolated by CPU hardware protection; the task requester creates a task of computing a threshold multi-party private set intersection and sends it to the cloud server; the cloud server calculates whether each server element appears in the set of each task participant in the rich execution environment (REE) according to the computing task, the local private element space, and the obtained private element space of each task participant; in order to protect data privacy, the REE and the TEE call trusted functions inside the enclave through a secure interface (ECALL) to jointly execute a secure comparison protocol; The REE is responsible for preprocessing and homomorphic aggregation of ciphertext data, and the TEE is responsible for partial decryption and comparison in a hardware-isolated encrypted memory area using stored private key fragments, so as to ensure that the comparison operation of private data is protected at the hardware level in the TEE, and the calculation of the threshold multi-party private set intersection is completed without leaking private data. Further, the system architecture does not need to introduce an additional fully trusted third-party entity, and the TEE used is regarded as a white-box environment rather than a traditional black-box environment. The overall private set intersection calculation protocol design uses ciphertext / mask calculation inside the TEE, which can effectively resist side-channel attacks to obtain plaintext against the TEE.
2. The method of claim 1, wherein, The system includes the following steps: Step 1, the task requester RU initializes a (2, 2) threshold Paillier cryptosystem, generates a set of key pairs (pk, sk), where pk is the public key of the system, and sk is the private key, and splits the private key sk into two partial private keys sk1 and sk2 using a private key splitting algorithm, the partial private keys sk1 and sk2 satisfy the following requirements: sk1+sk2≡0(mod sk), sk1+sk2≡1(mod N), a set of keys (pk, sk1, sk2) is obtained by solving the Chinese remainder theorem; only the partial private key sk1 or sk2 cannot completely decrypt the data encrypted using the public key pk; The task requester RU as the initiator of the control plane recruits a trusted cloud service provider CSP after initializing the (2, 2) threshold Paillier cryptosystem, and constructs two logically mutually uncolluding computing entities by means of the rich execution environment (REE) and the trusted execution environment (TEE) of the cloud server provided by the CSP with trusted hardware to credibly complete most of the private set intersection calculation work in the cloud. The task requester RU defines a task of computing a threshold multi-party private set intersection, including a specific threshold size and each task participant. The task requester RU establishes a secure communication channel with the trusted execution environment (TEE) of the cloud server through remote authentication (Remote Attestation). The rich execution environment REE establishes a secure communication channel with the task requester RU and the trusted execution environment TEE, respectively. Further, the task requester RU sends the computing task and the private key sk1 to the rich execution environment REE, and sends the private key sk2 to the trusted execution environment TEE through the secure channel, and the public key pk is simultaneously disclosed to all task participants and the recruited cloud server; Step 2, after each task participant receives the public key pk of the (2, 2) threshold Paillier encryption system disclosed by the task requester RU, the task participant first calculates a Bloom filter BF of the private data set of the local client, which includes parameters m and k, representing the bit array length of the Bloom filter as m bits, and using k independent hash functions to map each element in the private set of each task participant to the bit array; then, the Bloom filter is encrypted using the public key pk to obtain an encrypted Bloom filter EBF. Finally, each task participant independently establishes a secure communication channel with the cloud server through remote authentication, and only after the authenticity of the TEE is verified explicitly, the encrypted Bloom filter EBF of the task participant is sent to the cloud server through the secure communication channel i a rich execution environment, REE, sent to the cloud server; Step 3, the rich execution environment REE of the cloud server calculates k corresponding hash values according to the selected k hash functions for each element of the local private set, and then extracts the encrypted values in the Bloom filter of each client as the index of the hash values; for each client, the rich execution environment REE independently homomorphically sums the obtained encrypted values, and then calls the predefined Enclave interface (ECALL) to pass the homomorphic sum result into the trusted execution environment TEE. The rich execution environment REE and the trusted execution environment TEE jointly perform a secure comparison operation to ensure that no information is leaked during the comparison process. The values used in the comparison operation are the homomorphic sum of the k values encrypted using the public key pk of the (2, 2) threshold Paillier and the encrypted values obtained from the Bloom filter, and the comparison result is stored in the rich execution environment REE; Step 4, after obtaining the comparison result, the Rich Execution Environment, REE, knows each element y in its private set j whether it appears in each client; to obtain the set that satisfies the threshold condition, the Rich Execution Environment, REE, continues to homomorphically sum the encrypted bit values of whether each element y j appears in each client set; Step 5, the rich execution environment REE and the trusted execution environment TEE perform ciphertext interaction calculation to complete the secure comparison of the element occurrence frequency and the threshold condition. The comparison is also performed in the (2, 2) threshold Paillier ciphertext space. Finally, the rich execution environment REE and the trusted execution environment TEE jointly decrypt to obtain the element set that satisfies the condition of occurrence frequency greater than or equal to the threshold, and return the generated set to each task participant through the secure communication channel.
3. The method of claim 2, wherein, In step 1, the key generation (KeyGen) process of the (2, 2) threshold Paillier cryptosystem is as follows: first, two large prime numbers p' and q' are needed, which have Len bits in binary representation. The larger the length of Len, the more difficult it is to crack, representing a higher security factor; then the mask values p = 2p' + 1 and q = 2q' + 1 are calculated to hide the true values of p and q, the Paillier modulus N = p q is calculated, the generator g = N + 1 is generated, and λ = lcm(p - 1, q - 1) is calculated, where lcm() represents the least common multiple, the inverse of N μ = λ -1 modN, set and disclose the public key pk = (g, N) and the private key sk = λ of the (2, 2) threshold Paillier cryptosystem.
4. The method of claim 3, wherein, In step 1, the (2, 2) threshold Paillier cryptosystem divides the private key λ into two parts, private keys sk1 and sk2, which satisfy the following requirements: sk1 + sk2≡0(mod sk), sk1 + sk2≡1(mod N); the specific generation process is as follows: according to the operation property of congruence equation, multiply the above two equations to obtain the characteristic equation δ = sk1 + sk2 = sk·μ mod(sk·N), then according to the Chinese remainder theorem, require δ≡0(mod sk) and δ≡1(mod N) to be true at the same time, then set sk1 to be a σ-bit random positive integer R, that is, sk1 = R, and according to the Chinese remainder theorem, sk2 = sk·μ + η·sk·N-sk1 can be obtained, where η is a non-negative integer.
5. The method of claim 4, wherein, In step 2, the rich execution environment (REE) generates k random hash functions using the hash generation algorithm of MurmurHash3 and sends them to each task participant; for the ith participant P i , i First, calculate the Bloom filter (BF) locally, that is, when adding any element x in the data set, use k hash functions to get k hash values, then set the corresponding bit in the bit array of the Bloom filter to 1, that is, the position h d (x) mapped by the ith hash function will be set to 1 (1≤i≤k); if a position is set to 1 multiple times, only the first time will take effect, and the following times will have no effect, then use the public key pk provided by the server to encrypt each element BF i [j] of the bit array to obtain the encrypted Bloom filter EBF i . Finally, each client confirms that the cloud server has a real trusted execution environment (TEE) through remote authentication before sending the locally calculated EBF i to the rich execution environment (REE) of the cloud server.
6. The method of claim 5, wherein, In step 3, the Rich Execution Environment (REE) uses a randomly selected hash function for each service set element Computes k hash values; then extracts the encrypted value of the element in the encrypted Bloom filter of the ith client P i , that is , where , , is the size of the service set, and d represents the dth hash function; then performs a homomorphic summation operation on the extracted encrypted value in the Paillier ciphertext space, and re-randomizes the result, to obtain , where represents the homomorphic summation operation, ReRand is a re-randomization function, and the specific implementation is to add an encrypted zero value to the ciphertext homomorphism, represents that the ciphertext is the jth element of the server with respect to the ith client; according to the principle of the Bloom filter, if the service element belongs to the client P i , then the corresponding plaintext of the ciphertext must be k; because the k hash values of are indexes of the values obtained in the encrypted Bloom filter of the client, which are all in the ciphertext state 1, and the homomorphic summation operation obtains k in the ciphertext state, so only a secure comparison between and k in the Paillier ciphertext space is needed to determine whether the service element appears in the client.
7. The method of claim 6, wherein, In step 3, the rich execution environment REE and the trusted execution environment TEE of the cloud server perform joint secure comparison SCMP based on the (2, 2) threshold Paillier cryptosystem for ciphertext interaction calculation, and the specific implementation is as follows: first, the rich execution environment REE generates a random number π, which is 0 or 1; the difference D between the two numbers r1 and r2 is calculated to mask the original comparison data; if π = 0, then D = r1-r2, otherwise D = r2-r1; the difference D of the secure comparison calculation is partially decrypted using the partial private key sk1 to obtain the decryption result D1; Second, the rich execution environment REE passes (D, D1) into the trusted execution environment TEE through the ECALL interface; The trusted execution environment TEE internally uses the pre-stored sk2 to partially decrypt D to obtain D2 through key sealing technology, uses the partial decryption results D1 and D2 to finally decrypt D to obtain the plaintext d=D1*D2 mod N2 of D, and compares the size of d and N / 2, if d>N / 2, then d=1, otherwise d=0. Then the trusted execution environment TEE returns the result to the rich execution environment RE through the OCALL interface; in the third step, the rich execution environment RE calculates the comparison result If the return value of the SCMP is encrypted 1, the obtained Bloom filter encryption value is greater than or equal to k, which indicates that the server element exists in the corresponding client set, otherwise the encrypted 0 is returned.
8. The method of claim 7, wherein, In step 4, the Rich Execution Environment, REE, homomorphically sums the values of whether each server element y j appears in each client set, the specific operation of the homomorphic sum being a modular multiplication, i.e. multiplying the ciphertexts and then taking the square of the Paillier modulus N 2 modulo; then repeating the homomorphic sum until the number of times each server element appears in the client set, sum, is obtained.
9. The method of claim 8, wherein, In step 5, the rich execution environment REE and the trusted execution environment TEE continue to perform joint secure comparison SCMP for ciphertext interaction calculation, and the comparison object is the encrypted server element occurrence frequency sum and the threshold condition T value of the calculation task after Paillier encryption; The rich execution environment REE performs interactive decryption with the trusted execution environment TEE again to obtain the element set that satisfies the occurrence frequency greater than or equal to the threshold condition T, and returns the generated set as the result of the calculation task to each task participant.