Method and system for safely calculating multi-party set intersection of unbalanced data set
By using polynomial coefficient representation, pseudo-random function, Paillier encryption algorithm dual blinding and homomorphic encryption technology under the uneven data set, the problem of excessive computation and communication volume under the uneven data set is solved, and efficient intersection calculation and user privacy protection are achieved.
Patent Information
- Application Number
- CN202510630278.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-08
AI Technical Summary
The existing private set intersection protocol faces multiple challenges in efficiency, scalability and security in the era of big data, especially in the unbalanced data sets that the calculation amount and traffic volume are too large, and the existing polynomial coefficient representation is not flexible enough.
The polynomial coefficient representation of the set is used to avoid polynomial multiplication operations, and double blinding is used to use pseudo-random functions and Paillier encryption algorithms. Combined with homomorphic encryption technology, intersection calculation is performed through cloud servers to reduce calculation overhead and traffic.
It realizes more efficient intersection calculation under unbalanced data sets, protects user privacy, reduces computing and communication overhead, and is suitable for multi-party data secure communication.
Smart Images

Figure CN120454969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of secure multi-party computing technology, and more specifically, to a method and system for securely computing the intersection of multiple sets of unbalanced data sets. Background Art
[0002] With the deep integration of big data, artificial intelligence, and cloud computing technologies, data has become a core production factor driving socioeconomic development. However, the inherent contradiction between data sharing and privacy protection is becoming increasingly prominent. Private set intersection protocols, as a key technical path to resolving this contradiction, face multiple challenges in efficiency, scalability, and security in the face of the massive data storage and computing demands of the big data era. Summary of the Invention
[0003] In order to solve the technical problems in the prior art, the present invention provides a method and system for secure calculation of the intersection of multiple sets of unbalanced data sets. The communication volume of this scheme is lower than that of the traditional private set intersection protocol, and the client's computational workload is less. In addition, due to the use of homomorphic encryption technology, the protocol does not require a secure channel for data communication in the intersection calculation stage, and the overhead of the secure channel also accounts for a considerable proportion in real life.
[0004] The technical solution of the present invention uses a polynomial coefficient representation of a set. This polynomial coefficient representation of a set requires different amounts of data for each participant's set power, while the polynomial point value representation of a set requires each participant to represent the set with at least twice the maximum power of the set of all participants plus 1. To ensure data updatability, this value needs to be even larger to accommodate data additions by the participant with the largest set power. This significantly increases the communication and computational workload for participants in smaller sets and is inflexible.
[0005] The present invention avoids the multiplication of polynomials. The time complexity of multiplying two polynomials in the polynomial coefficient representation of the set is , and the time complexity of multiplying two polynomials in the polynomial point value representation of a set is ,in , therefore, the present invention avoids the polynomial multiplication operation using a set polynomial coefficient representation.
[0006] To achieve the above objectives, the present invention provides, in a first aspect, a method for securely calculating the intersection of multiple sets of unbalanced datasets, comprising: During the initialization phase, the cloud server generates a pseudorandom function (PRF) and a public-private key pair for the Paillier encryption algorithm. The generated information and the public key of the Paillier encryption algorithm are published, while the private key of the Paillier encryption algorithm is kept confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudorandom key seeds. The user and the querying party each have their own datasets. During the data upload phase, the user and querying party represent their respective data sets as polynomial coefficient vectors. They then use a pseudorandom function (PRF) and their respective master keys to obtain the corresponding random value vectors. The coefficient vectors and random value vectors are then added together to obtain the blinded polynomial point value vectors, which are then uploaded to the cloud server for storage. In the intersection calculation phase, the querying party requests the cloud server to calculate the intersection to determine whether there is an intersection between the querying party and the user.
[0007] In one embodiment, the initialization phase includes: S1.1: Cloud server C establishes a finite domain , where p is a large prime number, and then generates a pseudo-random function , is the key length in bits, is an integer, R is a random number, select the security parameter , generate the public and private key pair of the Paillier encryption algorithm ,The cloud server publishes all generated information and public keys, and keeps the private key confidential; S1.2: User Own your own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function; S1.3: Query Party B has its own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function.
[0008] In one embodiment, the data upload phase includes a user calculating a blinded polynomial point value vector and sending it to a cloud server, and a querying party calculating a blinded polynomial point value vector and sending it to the cloud server. The user calculating the blinded polynomial point value vector and sending it to the cloud server includes: user Represent your own dataset as a polynomial; Represent the polynomial as a coefficient vector; Using pseudo-random function PRF and master key generate Random numbers get random value vector; Add the coefficient vector and the random value vector correspondingly to obtain the blinded polynomial point value vector, and upload it to the cloud server C for storage; The querying party calculates the blinded polynomial point value vector and sends it to the cloud server, including: Query party B expresses its data set as a polynomial; Represent the polynomial as a coefficient vector; Using pseudo-random function PRF and master key generate Random numbers get random value vector; The coefficient vector and the random value vector are added correspondingly to obtain the blinded polynomial point value vector, which is then uploaded to the cloud server C for storage.
[0009] In one embodiment, the intersection calculation phase includes: S3.1: When the querying party B wants to find the intersection with other parties, it uses the Paillier key generation algorithm to generate its own public and private key pair , and use your public key and identity Send to the cloud server to request intersection calculation; S3.2: After receiving the computing request from B, the cloud server 、 、 and Send to , and at the same time Return to B, of which, The public key generated for the cloud server, For users The generated blinded polynomial point value vector; S3.3: If the user If B agrees to perform the intersection calculation, the random value vector and coefficient vector are restored and blinded based on the seed of the pseudo-random function and the pseudo-random function PRF. The first key is encrypted with the public key of the querying party B and sent to the querying party. The second key is encrypted with the public key of the cloud server C and sent to the cloud server together with the blinded result. S3.4: The querying party restores its own random value vector and coefficient vector, and restores its own polynomial and its own data set. It encrypts the polynomial coefficient vector using the querying party's public key and sends it to cloud server C. S3.5: Cloud server C receives the user After receiving the data sent by the querying party B, the user's first key is used to eliminate the blinded polynomial, and the sum of the polynomials is calculated using homomorphic encryption and the blinded value is added. The result is then sent to the querying party. S3.6: The querying party decrypts the sum of the polynomials and uses the user's second key to eliminate the blinded polynomial. Finally, the data in the querying party's data set is substituted into the polynomial to obtain the intersection.
[0010] In one embodiment, S3.3 includes: S3.3.1: Restore by and ;
[0011] S3.3.2: Generate two first keys and the second , and use the pseudo-random function PRF to generate two sets of random values and ;
[0012]
[0013]
[0014] S3.3.3: Use and polynomial vectors Perform the first blinding to obtain the result of the first blinding , then use and Perform the second blinding to get the result of the first blinding , calculated as follows;
[0015]
[0016] S3.3.4: Encrypt using the public key of the querying party B Get the encrypted first key , encrypted using the public key of cloud server C Get the encrypted second key , then and Send to cloud server C, Send to querying party B;
[0017] .
[0018] In one embodiment, S3.4 includes: S3.4.1: Restore by and ;
[0019] S3.4.2: Restoring polynomials , and use the Jenkins-Traub algorithm to factorize and find the root, restoring the query party B's own data set ; S3.4.3: Encrypt the polynomial coefficient vector using B’s public key Get the encrypted polynomial coefficient vector , and Send to cloud server C; .
[0020] In one embodiment, S3.5 includes: S3.5.1: Decryption Key get , regenerate Generated obfuscated data , then from Data Eliminate the obfuscated data to obtain the decrypted coefficient vector ;
[0021] S3.5.2: Get the maximum cardinality of the set of all parties ,Will Add the blinded polynomials to obtain the coefficient vector of the sum , is the jth item of the coefficient vector. If a user The higher-order coefficients of another user If it does not exist in the polynomial of The coefficient of this order is considered to be 0;
[0022] S3.5.3: Use B's public key pair Encrypt and get ;
[0023] S3.5.4: Generate random numbers , multiply the polynomial of B by , and then compare the result with the encryption polynomial of a single user The ciphertext of Perform homomorphic addition operations to obtain the vector of the polynomial ,in For each item in the vector, then Sent to querying party B, if If it does not exist, ; .
[0024] In one embodiment, S3.6 includes: S3.6.1: For each user Decryption get , and recover The corresponding blinding value vector;
[0025] S3.6.2: Translate the coefficient vectors of the sum of the polynomials After decryption, remove each user The blinding value is ,if If it does not exist, , is the coefficient vector of the polynomial sum, where For each item in the vector, restore it to a polynomial ;
[0026] S3.6.3: Gather Yourself Each data Substitute the polynomial , if the value of the polynomial is found If it is 0, it is considered are the elements in the intersection.
[0027] Based on the same inventive concept, the second aspect of the present invention provides a secure computation system for the intersection of multiple sets of unbalanced datasets, comprising: The initialization module is used to perform the operations in the initialization phase, specifically including: the cloud server generates a pseudo-random function (PRF) and a public-private key pair for the Paillier encryption algorithm, publishes the generated information and the public key of the Paillier encryption algorithm, and keeps the private key of the Paillier encryption algorithm confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudo-random key seeds, wherein the user and the querying party have their own data sets; The data upload module is used to perform operations in the data upload phase, specifically including: the user and the querying party represent their respective data sets as polynomial coefficient vectors, then use the pseudo-random function (PRF) and their respective master keys to obtain the corresponding random value vectors, and then add the coefficient vectors and random value vectors to obtain the blinded polynomial point value vectors, which are then uploaded to the cloud server for storage; The intersection calculation module is used to perform operations in the intersection calculation phase, specifically including: the query direction requests the cloud server to calculate the intersection and find out whether there is an intersection between the query direction and the user.
[0028] Based on the same inventive concept, the third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, the secure calculation method for the intersection of multiple sets of unbalanced data sets described in the first aspect is implemented.
[0029] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows: The present invention provides a method for securely calculating the intersection of multiple sets of unbalanced data sets, including an initialization phase, a data uploading phase, and an intersection calculation phase. In the initialization phase, a cloud server generates a public-private key pair of a pseudo-random function PRF and a Paillier encryption algorithm, and publishes the generated information and the public key of the Paillier encryption algorithm, keeping the private key confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudo-random key seeds. In the data uploading phase, the user and the querying party express their own data sets in the form of coefficient vectors of polynomials, and then use the pseudo-random function PRF and their own master keys to obtain corresponding random value vectors. The coefficient vectors are then added to the random value vectors to obtain blinded polynomial point value vectors, and the vectors are uploaded to the cloud server for storage. In the intersection calculation phase, the querying party requests the cloud server for intersection calculation to determine whether there is an intersection between the querying party and the user. This invention utilizes a double blinding mechanism and homomorphic encryption technology within a cloud server to ensure that users can more efficiently resolve secure channel issues while avoiding the need to encrypt outsourced datasets. This approach offers significant advantages when client datasets vary significantly in size, i.e., when datasets are imbalanced. The cloud-delegated multi-party set intersection secure computation solution based on imbalanced datasets can be used for secure multi-party data communication, achieving the technical benefits of reducing computational overhead and communication overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 Flowchart of the method for securely calculating the intersection of multiple sets of unbalanced data sets disclosed in an embodiment of the present invention; Figure 2 This is an interaction diagram of the intersection calculation stage in an embodiment of the present invention; Figure 3 Detailed implementation diagram of the method for calculating the intersection of multiple private sets of an unbalanced data set in an embodiment of the present invention; Figure 4 This is a module diagram of the secure computing system for the intersection of multiple sets of unbalanced datasets disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] This invention discloses a cloud-delegated multi-party set intersection secure computation scheme suitable for unbalanced datasets. The computation method involves three parties: client A, cloud server C, and query party B. Client A (user) contains private information, which needs to be outsourced to server C due to computational complexity and efficiency. To prevent cloud server C from obtaining this information, client A implements a cloud-delegated multi-party set intersection secure computation scheme based on unbalanced datasets, while simultaneously protecting user privacy and ensuring efficient transmission. Specifically, the scheme includes the following steps: First, client A uses its own two pseudo-random key seeds to generate two sets of random polynomials and blind their respective coefficient polynomials. The blinded polynomials and the pseudo-random key seed encrypted with the public key of cloud server C are then sent to cloud server C. The pseudo-random key seed encrypted with the public key of query party B is then sent to query party B. Simultaneously, query party B encrypts its own coefficient polynomials and sends them to the cloud server. Cloud server C uses the pseudorandom key seed encrypted by client A to unblind the polynomial. It then uses homomorphic encryption to calculate the sum of the polynomials, adding its own blinded value. The result is then sent to querying party B. Querying party B decrypts the sum of the polynomials and uses the pseudorandom key seed that client A used to send to querying party B to unblind the polynomials. Finally, it substitutes its own data into the polynomials to calculate the intersection. This cloud-delegated multi-party set intersection secure computation scheme based on unbalanced datasets can be used for secure multi-party data communication, achieving the technical effect of reducing computational overhead and communication overhead.
[0033] Example 1 This embodiment discloses a method for securely calculating the intersection of multiple sets of unbalanced data sets. Figure 1 ,include: S1: Initialization phase: The cloud server generates a pseudo-random function (PRF) and a public-private key pair for the Paillier encryption algorithm. It publishes the generated information and the public key of the Paillier encryption algorithm, while keeping the private key of the Paillier encryption algorithm confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudo-random key seeds. The user and the querying party have their own datasets. S2: During the data upload phase, the user and querying party represent their respective data sets as polynomial coefficient vectors. They then use a pseudorandom function (PRF) and their respective master keys to derive the corresponding random value vectors. The coefficient vectors and random value vectors are then added together to obtain the blinded polynomial point value vectors, which are then uploaded to the cloud server for storage. S3: In the intersection calculation phase, the querying party requests the cloud server to calculate the intersection to determine whether there is an intersection between the querying party and the user.
[0034] Specifically, the Paillier encryption algorithm is an asymmetric encryption algorithm proposed by Pascal Paillier in 1999. It has additive homomorphism, that is, calculations can be performed on ciphertext, and the decrypted result is consistent with the result of performing the same calculation on the plaintext.
[0035] In the specific implementation process, during the data upload stage, users Use your own two pseudo-random keys and Generate two sets of random polynomials and , used to blind the respective coefficient polynomials , and the blinded polynomial and the pseudo-random key encrypted with the public key of cloud server C Sent to cloud server C, the pseudo-random key encrypted with the public key of query party B Send it to the querying party B. At the same time, the querying party B encrypts its own coefficient polynomial and sends it to the cloud server.
[0036] In the intersection calculation phase, the cloud server uses Unblinding polynomial , use homomorphic encryption to find the sum of the polynomials and add your own blinded value, then send the result to the query party B, who decrypts the sum of the polynomials and uses Eliminate the blinded polynomial and finally substitute your data into the polynomial to find the intersection.
[0037] The above-mentioned cloud-delegated multi-party set intersection secure computing solution based on unbalanced data sets can be used in multi-party data secure communication, achieving the technical effect of reducing computing overhead and lowering communication costs.
[0038] See Figure 3, which is a detailed implementation diagram of the method for calculating the intersection of multiple private sets of an unbalanced data set in an embodiment of the present invention.
[0039] The specific implementation of each stage is described as follows (1) Initialization phase: Cloud Server C: Cloud Server C establishes a finite domain , where p is a large prime number. Then generate a pseudo-random function , is the key length in bits, is an integer, R is a random number. Select security parameters , generate the public and private key pair of the Paillier encryption algorithm ,The cloud server publishes all the generated information and the public key, and the private key remains confidential.
[0040] user :S1.2 users Own your own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function.
[0041] Query Party B: Query Party B has its own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function.
[0042] (2) Data upload stage: user : The first step is user Represent your own dataset as a polynomial ,in : (1) The second step is to express the polynomial as a coefficient vector. : (2) The third step is to use the pseudo-random function PRF and the master key generate Random numbers get random value vector ; (3) The fourth step is to add the coefficient vector and the random value vector to obtain the blinded polynomial point value vector And upload it to cloud server C for storage.
[0043] (4) Inquiring Party B: The first step is user Represent your own dataset as a polynomial ,in : (5) The second step is to express the polynomial as a coefficient vector. : (6) The third step is to use the pseudo-random function PRF and the master key generate Random numbers get random value vector ; (7) The fourth step is to add the coefficient vector and the random value vector to obtain the blinded polynomial point value vector And use a secure channel to upload it to cloud server C for storage.
[0044] (8) See Figure 2 , which is an interaction diagram of the intersection calculation stage in an embodiment of the present invention.
[0045] (3) Intersection calculation stage: If the querying party B wants to find the intersection with other parties, it uses the Paillier key generation algorithm to generate its own public and private key pair , then use your public key and identity Send to the cloud server to request intersection calculation.
[0046] After receiving B's computing request, the cloud server will generate the public key , the public key generated by the querying party , query party B and polynomial point value vector Send to , in order to tell which user wants to request the intersection, and let Can restore polynomials and Return it to B so that B can restore the polynomial and set data.
[0047] If the user Agree to calculate the intersection with B, then the first step is to restore and ; (9) The second step is to generate two keys and , and use the pseudo-random function PRF to generate two sets of random values and ; (10) (11) (12) The third step is to use and polynomial vectors Perform the first blinding to obtain the first blinding result , then use and Perform the second blinding to obtain the second blinding result , calculated as follows; (13) (14) Step 4: Encrypt using the public key of querying party B get , encrypted using the public key of cloud server C get , then and Send to cloud server C, Send to querying party B; (15) (16) Querying party B performs the following steps: Step 1: Restore and ; (17) The second step is to Restoring polynomials , and use the Jenkins-Traub algorithm to factorize and find the root, restoring the query party B's own data set ; The third step is to encrypt the polynomial coefficient vector using B’s public key. Get the encrypted polynomial coefficient vector , and Send to cloud server C; (18) Cloud server C receives user After receiving the data sent by querying party B, the following steps are performed: Step 1: Decryption Key get , regenerate Generated obfuscated data , then from Data Eliminate the obfuscated data to obtain the decrypted coefficient vector ; (19) The second step is to obtain the maximum cardinality of the set of all participants ,Will The blinded polynomials of Add the data with the same subscript to get the coefficient vector of the sum ,in For each item of the coefficient vector, since some users have less data and some users have more data, if a user The higher-order coefficients of another user If it does not exist in the polynomial of The coefficient of this order is considered to be 0; (20) The third step is to use B's public key pair Encrypt and get ; (twenty one) Step 4: Generate random numbers , multiply the polynomial of B by , which will be the vector Multiply all terms of , and then add the result to the ciphertext of the sum of the user's encryption polynomials Perform homomorphic addition operations to add all users to the polynomial of B and obtain the vector of the polynomial ,in For each item in the vector, then Sent to the querying party B. If If it does not exist, .
[0048] (twenty two) After receiving the message from the cloud server, query party B performs the following steps to obtain the intersection result: The first step is for each user Decryption get , and recover The corresponding blinding value vector; (twenty three) The second step is to transform the coefficient vector of the sum of the polynomials into After decryption, remove each user The blinding value is ,if If it does not exist, .Then is the coefficient vector of the polynomial sum, where For each item in the vector, restore it to a polynomial ; (twenty four) Step 3: Gather Yourself Each data Substitute the polynomial , if the value of the polynomial is found If it is 0, it is considered are the elements in the intersection.
[0049] Example 2 Based on the same inventive concept, this embodiment discloses a method and system for securely calculating the intersection of multiple sets of unbalanced data sets. Figure 4 ,include: Initialization module 101 is used to perform operations in the initialization phase, specifically including: the cloud server generates a pseudo-random function (PRF) and a public-private key pair for the Paillier encryption algorithm, publishes the generated information and the public key of the Paillier encryption algorithm, and keeps the private key of the Paillier encryption algorithm confidential; the user and the querying party use a random number generation function to generate their own master keys as pseudo-random key seeds, wherein the user and the querying party have their own data sets; The data upload module 102 is used to perform operations in the data upload phase, specifically including: the user and the querying party represent their respective data sets as polynomial coefficient vectors, then use the pseudorandom function (PRF) and their respective master keys to obtain the corresponding random value vectors, then add the coefficient vectors and the random value vectors to obtain the blinded polynomial point value vectors, and upload them to the cloud server for storage; The intersection calculation module 103 is used to perform operations in the intersection calculation phase, specifically including: the querying party requests the cloud server to perform intersection calculation to determine whether there is an intersection between the querying party and the user.
[0050] Since the system described in Example 2 of the present invention is used to implement the method for securely calculating the intersection of multiple sets of unbalanced datasets described in Example 1 of the present invention, the specific structure and variations of this system are readily apparent to those skilled in the art based on the method described in Example 1 of the present invention, and thus will not be further described here. All systems used in the method described in Example 1 of the present invention fall within the scope of protection of the present invention.
[0051] Example 3 Based on the same inventive concept, the present invention further provides a computer device, including a memory 401, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in Embodiment 1 when executing the program.
[0052] Since the computer device described in Example 3 of the present invention is used to implement the method for securely calculating the intersection of multiple sets of unbalanced datasets described in Example 1 of the present invention, the specific structure and variations of this computer device are readily apparent to those skilled in the art based on the method described in Example 1 of the present invention, and thus will not be further described here. All computer devices used in the method described in Example 1 of the present invention fall within the scope of protection of the present invention.
[0053] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0055] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. Thus, the present invention is intended to include such changes and modifications to the embodiments of the present invention if they fall within the scope of the claims and their equivalents.
Claims
1. A secure computation method for the intersection of multiple sets of unbalanced datasets, characterized by: include: During the initialization phase, the cloud server generates a pseudorandom function (PRF) and a public-private key pair for the Paillier encryption algorithm. The generated information and the public key of the Paillier encryption algorithm are published, while the private key of the Paillier encryption algorithm is kept confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudorandom key seeds. The user and the querying party each have their own datasets. During the data upload phase, the user and querying party represent their respective data sets as polynomial coefficient vectors. They then use a pseudorandom function (PRF) and their respective master keys to obtain the corresponding random value vectors. The coefficient vectors and random value vectors are then added together to obtain the blinded polynomial point value vectors, which are then uploaded to the cloud server for storage. In the intersection calculation phase, the querying party requests the cloud server to calculate the intersection to determine whether there is an intersection between the querying party and the user.
2. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 1, wherein: The initialization phase includes: S1.1: Cloud server C establishes a finite domain , where p is a large prime number, and then generates a pseudo-random function , is the key length in bits, is an integer, R is a random number, select the security parameter , generate the public and private key pair of the Paillier encryption algorithm ,The cloud server publishes all generated information and public keys, and keeps the private key confidential; S1.2: User Own your own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function; S1.3: Query Party B has its own dataset , and use the random number generator function Generate your own master key , used as a seed for a pseudo-random function.
3. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 2, wherein: The data upload phase includes the user calculating the blinded polynomial point value vector and sending it to the cloud server, and the querying party calculating the blinded polynomial point value vector and sending it to the cloud server. The user calculating the blinded polynomial point value vector and sending it to the cloud server includes: user Represent your own dataset as a polynomial; Represent the polynomial as a coefficient vector; Using pseudo-random function PRF and master key generate Random numbers get random value vector; Add the coefficient vector and the random value vector correspondingly to obtain the blinded polynomial point value vector, and upload it to the cloud server C for storage; The querying party calculates the blinded polynomial point value vector and sends it to the cloud server, including: Query party B expresses its data set as a polynomial; Represent the polynomial as a coefficient vector; Using pseudo-random function PRF and master key generate Random numbers get random value vector; The coefficient vector and the random value vector are added correspondingly to obtain the blinded polynomial point value vector, which is then uploaded to the cloud server C for storage.
4. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 2, wherein: The intersection calculation phase includes: S3.1: When the querying party B wants to find the intersection with other parties, it uses the Paillier key generation algorithm to generate its own public and private key pair , and use your public key and identity Send to the cloud server to request intersection calculation; S3.2: After receiving the computing request from B, the cloud server 、 、 and Send to , and at the same time Return to B, of which, The public key generated for the cloud server, For users The generated blinded polynomial point value vector; S3.3: If the user If B agrees to perform the intersection calculation, the random value vector and coefficient vector are restored and blinded based on the seed of the pseudo-random function and the pseudo-random function PRF. The first key is encrypted with the public key of the querying party B and sent to the querying party. The second key is encrypted with the public key of the cloud server C and sent to the cloud server together with the blinded result. S3.4: The querying party restores its own random value vector and coefficient vector, and restores its own polynomial and its own data set. It encrypts the polynomial coefficient vector using the querying party's public key and sends it to cloud server C. S3.5: Cloud server C receives the user After receiving the data sent by the querying party B, the user's first key is used to eliminate the blinded polynomial, and the sum of the polynomials is calculated using homomorphic encryption and the blinded value is added. The result is then sent to the querying party. S3.6: The querying party decrypts the sum of the polynomials and uses the user's second key to eliminate the blinded polynomial. Finally, the data in the querying party's data set is substituted into the polynomial to obtain the intersection.
5. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 4, wherein: S3.3 includes: S3.3.1: Restore by and ; S3.3.2: Generate two first keys and the second , and use the pseudo-random function PRF to generate two sets of random values and ; S3.3.3: Use and polynomial vectors Perform the first blinding to obtain the result of the first blinding , then use and Perform the second blinding to get the result of the first blinding , calculated as follows; S3.3.4: Encrypt using the public key of the querying party B Get the encrypted first key , encrypted using the public key of cloud server C Get the encrypted second key , then and Send to cloud server C, Send to querying party B; 。 6. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 4, wherein: S3.4 includes: S3.4.1: Restore by and ; S3.4.2: Restoring polynomials , and use the Jenkins-Traub algorithm to factorize and find the root, restoring the query party B's own data set ; S3.4.3: Encrypt the polynomial coefficient vector using B’s public key Get the encrypted polynomial coefficient vector , and Send to cloud server C; 。 7. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 4, wherein: S3.5 includes: S3.5.1: Decryption Key get , regenerate Generated obfuscated data , then from Data Eliminate the obfuscated data to obtain the decrypted coefficient vector ; S3.5.2: Get the maximum cardinality of the set of all parties ,Will Add the blinded polynomials to obtain the coefficient vector of the sum , is the jth item of the coefficient vector. If a user The higher-order coefficients of another user If it does not exist in the polynomial of The coefficient of this order is considered to be 0; S3.5.3: Use B's public key pair Encrypt and get ; S3.5.4: Generate random numbers , multiply the polynomial of B by , and then compare the result with the encryption polynomial of a single user The ciphertext of Perform homomorphic addition operations to obtain the vector of the polynomial ,in For each item in the vector, then Sent to querying party B, if If it does not exist, ; 。 8. The method for securely calculating the intersection of multiple sets of unbalanced datasets according to claim 4, wherein: S3.6 includes: S3.6.1: For each user Decryption get , and recover The corresponding blinding value vector; S3.6.2: Translate the coefficient vectors of the sum of the polynomials After decryption, remove each user The blinding value is ,if If it does not exist, , is the coefficient vector of the polynomial sum, where For each item in the vector, restore it to a polynomial ; S3.6.3: Gather Yourself Each data Substitute the polynomial , if the value of the polynomial is found If it is 0, it is considered are the elements in the intersection.
9. A secure computation system for the intersection of multiple sets of unbalanced datasets, characterized by: include: The initialization module is used to perform the operations in the initialization phase, specifically including: the cloud server generates a pseudo-random function (PRF) and a public-private key pair for the Paillier encryption algorithm, publishes the generated information and the public key of the Paillier encryption algorithm, and keeps the private key of the Paillier encryption algorithm confidential. The user and the querying party use a random number generation function to generate their own master keys as pseudo-random key seeds, wherein the user and the querying party have their own data sets; The data upload module is used to perform operations in the data upload phase, specifically including: the user and the querying party represent their respective data sets as polynomial coefficient vectors, then use the pseudo-random function (PRF) and their respective master keys to obtain the corresponding random value vectors, and then add the coefficient vectors and random value vectors to obtain the blinded polynomial point value vectors, which are then uploaded to the cloud server for storage; The intersection calculation module is used to perform operations in the intersection calculation phase, specifically including: the query direction requests the cloud server to calculate the intersection and find out whether there is an intersection between the query direction and the user.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for securely calculating the intersection of multiple sets of unbalanced data sets according to any one of claims 1 to 8 is implemented.