A privacy set intersection method based on homomorphic encryption and optimized filter, readable medium and electronic device
By combining semi-homomorphic encryption and optimized filters, and utilizing hash substitution sorting and polynomial computation, the efficiency and communication bottlenecks of privacy set intersection protocols are solved, achieving efficient and secure set intersection computation.
Patent Information
- Application Number
- CN202510475646.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Existing privacy set intersection protocols suffer from bottlenecks in computational and communication complexity, especially in large-scale datasets where they are inefficient and involve a large amount of communication, failing to meet the needs of certain privacy protection domains.
By combining semi-homomorphic encryption and optimized filtering with hash substitution sorting technology, data filtering and hash table comparison are performed through negotiation of hash functions and generation of key pairs. The intersection is calculated using polynomials to ensure data privacy and reduce communication overhead.
It enables efficient computation in encrypted form, protects data privacy, reduces communication complexity, is suitable for large-scale and imbalanced datasets, and improves computational efficiency.
Smart Images

Figure CN120415680B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data set privacy intersection, and more particularly to a privacy set intersection method based on homomorphic encryption and an optimized filter, a readable medium and an electronic device. BACKGROUND
[0002] Private set intersection is an important protocol in the field of secure multi-party computation, aiming to allow two or more parties to compute their intersection without revealing their private intersection. The main goal is to compute the intersection of data sets while ensuring data privacy. This protocol was first proposed by Freedman et al. in 2004, and a corresponding solution was given, but the computational efficiency was still very low, and the application scenarios were very limited. Later, with the emergence of technologies such as bucketed hashing, Bloom filter, and OPRF, more efficient and secure PSI (Private Set Intersection) protocols were proposed.
[0003] Currently, PSI protocols can be widely applied in data sharing, advertising conversion rate analysis, contact discovery, etc. Traditional private set intersection technology relies on specific cryptographic primitives, such as PSI based on homomorphic encryption, PSI based on RSA blind signature, and PSI based on DH key exchange. These schemes differ in computational and communication complexity and are suitable for different application scenarios.
[0004] Later, PSI protocols were proposed to adapt to larger data sets and more complex application requirements. For example, using Oblivious Key-Value Store (OKVS) and Vector Oblivious Linear Evaluation (VOLE) can construct a PSI protocol with higher computational efficiency and lower communication volume, further reducing the time and communication overhead of the protocol. PSI based on Oblivious Transfer Extension (OTE) avoids a large number of public key transmissions and further optimizes the time complexity. However, their computational overhead increases significantly with the size of the data set, and they still cannot meet the needs of some scenarios in the field of privacy protection.
[0005] In summary, the current private set intersection protocol has the following shortcomings:
[0006] 1. Low efficiency, the protocol based on public key encryption and Boolean circuit has large computational load, especially when the size of the set is large, the overhead of encryption and ciphertext operations increases significantly.
[0007] 2. The protocol has complex interaction rounds and communication volume, and the two parties need to perform key agreement, ciphertext sending, etc., which requires a large number of interactions to waste time.
[0008] Currently, homomorphic encryption technology performs a specific form of algebraic operation on ciphertext to obtain an encrypted result,
[0009] The decrypted result is the same as the result of the same operation on plaintext. Homomorphic encryption technology includes semi-homomorphic, quasi-homomorphic and full-homomorphic encryption.
[0010] Therefore, how to efficiently and securely calculate the intersection of two private sets based on homomorphic encryption technology is a problem that those skilled in the art need to solve. SUMMARY
[0011] In view of the above problems, the present application provides a privacy set intersection method based on homomorphic encryption and optimized filter, which aims to efficiently and securely calculate the intersection of two private sets by combining semi-homomorphic encryption, optimized filter and hash replacement sorting technology, to at least solve some of the technical problems mentioned in the background art.
[0012] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0013] The present application provides a privacy set intersection method based on homomorphic encryption and optimized filter, comprising the following steps:
[0014] In the initialization phase:
[0015] The sender side and the receiver side jointly negotiate the hash function H1 and generate a semi-homomorphic encryption key pair, and create a filter system and a hash function group H2 at the same time;
[0016] In the data interaction phase:
[0017] Based on the hash function H1 and the filter system, the data filtering of the sender private set and the receiver private set is realized, and the set Y' is generated at the receiver side and the set X' is generated at the sender side;
[0018] In the hash replacement sorting phase:
[0019] The sender side creates an empty hash table W, substitutes the data in the set X' into the hash function group H2, and stores the hash values calculated by the hash function group H2 into the hash table W, and sends the hash table W to the receiver side;
[0020] The receiver end creates an empty hash table Q, and after substituting the data in the set Y' into the hash function set H2, the hash values calculated by the hash function set H2 are stored in the hash table Q and compared with the data in the hash table W; if the same data as in the hash table W exists in the hash table Q, the data in the hash table W is randomly replaced by the data in the set Y' to obtain a replacement data set Y";
[0021] In the set partitioning and polynomial generation phase:
[0022] The sender end partitions the set X' into multiple subsets, and generates polynomials according to each subset, encrypts the polynomial coefficients using the public key in the key pair, and then sends them to the receiver end in order;
[0023] In the polynomial calculation and intersection solving phase:
[0024] The receiver end restores the polynomial according to the polynomial coefficients, substitutes the data in the replacement data set Y" into the polynomial, solves the polynomial value in the ciphertext state, and returns the solving result to the sender end;
[0025] The sender end decrypts the polynomial value using the private key in the key pair, compares it with the own set X', determines the same elements as the intersection elements, and returns the intersection elements to the receiver end.
[0026] Further, in the initialization phase, the filtering system includes a filtering system a and a filtering system b;
[0027] The filtering system a includes a filter f a initialized as all zeros and a hash function h a .
[0028] The filtering system b includes a filter f b initialized as all zeros and a hash function h b .
[0029] Further, in the data interaction phase, specifically including:
[0030] The sender end calculates the hash value X of the original data in the sender's private set using the hash function H1, calculates the second hash value S a of the hash value X using the hash function h X , and stores the second hash value S X in the corresponding position of the filter f a , sets a preset index for the corresponding position, and sends the filter f a to the receiver end;
[0031] The receiver end calculates the hash value Y of the original data in the receiver's private set using the hash function H1, calculates the second hash value S bCalculate the secondary hash value S for hash value Y. Y ; the secondary hash value S Y With filter f a The preset index is used to calculate set Y'; the values in set Y' are then substituted into filter f. b After determining the corresponding position and setting a preset index for that position, filter f b Send to the sender;
[0032] The sending end will filter f b The preset index and the secondary hash value S in X Find set X'.
[0033] Furthermore, the method based on the secondary hash value S Y With filter f a The preset index is used to calculate set Y', specifically including: retaining the hash value S. Y All of the filters f a The position with a preset index value of 1 is denoted as set Y'.
[0034] Furthermore, the sending end determines the filter f. b The preset index and the secondary hash value S in X Find the set X', specifically including: the hash value S retained by the sender. X All of the filters f b The position with a preset index value of 1 is denoted as set X'.
[0035] Furthermore, in the set partitioning and polynomial generation stage, the root of each polynomial is the element value in the corresponding subset.
[0036] This invention also provides a computer-readable medium storing instructions that, when executed on the medium, cause the medium to perform a privacy set intersection method based on homomorphic encryption and optimized filters as described above.
[0037] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements a privacy set intersection method based on homomorphic encryption and optimized filters as described above.
[0038] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a privacy set intersection method, a readable medium, and an electronic device based on homomorphic encryption and optimized filters, which has the following beneficial effects:
[0039] The application uses semi-homomorphic encryption, supports efficient calculation in a ciphertext state, ensures privacy of set elements in the calculation process, and prevents the receiver from reversing the original data through the ciphertext, while ensuring less communication overhead.
[0040] The application narrows the range of candidate intersection and reduces the complexity of subsequent calculation by using an optimized filter and hash replacement sorting technology under the premise of ensuring low communication complexity.
[0041] The application divides a large-scale data set into multiple subsets through set segmentation, which is conducive to parallel processing to improve calculation efficiency, and is suitable for large-scale and unbalanced data set scenarios.
[0042] The technical solutions of the application will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor on the premise of the provided drawings.
[0044] Figure 1 The flowchart of the privacy set intersection method based on homomorphic encryption and optimized filter provided by the embodiments of the application is shown. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0046] The embodiments of the application disclose a privacy set intersection method based on homomorphic encryption and optimized filter, as shown in Figure 1 The method comprises the following steps:
[0047] (1) In the initialization phase:
[0048] The sender side and the receiver side jointly negotiate a hash function H1 and generate a semi-homomorphic encryption (such as Paillier encryption) key pair (pk, sk), and create a filter system a, a filter system b and a hash function group H2, and H2={h1, h2,..., h t}; wherein, h tThis represents the t-th hash function in hash function group H2;
[0049] The aforementioned filtration system a includes a filter f that is initially set to all zeros. a and hash function h a ;
[0050] The aforementioned filtration system b includes a filter f that is initially set to all zeros. b and hash function h b ;
[0051] In this initialization phase, semi-homomorphic encryption is used to support efficient computation in ciphertext state; it ensures that the privacy of set elements is protected during computation, and the receiver cannot deduce the original data from the ciphertext, while also ensuring low communication overhead.
[0052] (2) During the data interaction phase:
[0053] Let A denote the sender's private set, and A = {a1, a2, ..., a...} n}, where a n This represents the nth element in the sender's private set A;
[0054] Let B be the private set of the receiver, and B = {b1, b2, ..., b} n}, where b n This represents the nth element in the receiver's private set B;
[0055] The sender first uses a hash function H1 to calculate a hash value X on the original data in the sender's private set A, where X = {x1, x2, ..., x...} n}, where x n This represents the nth element in the hash value X; then the hash function h is used. a Calculate the quadratic hash value S for hash value X. X , in, S represents the quadratic hash value X The nth element in the sequence; finally, the quadratic hash value S is obtained. X Store in filter f a At the corresponding position, after setting a preset index (e.g., 1) for that position, filter f... a Send to the recipient;
[0056] The receiver first uses hash function H1 to calculate the hash value Y of the original data in the receiver's private set B, and then uses hash function h... b Calculate the secondary hash value S for hash value Y. Y , in, S represents the quadratic hash valueY The nth element in the sequence; then retain the hash value S. Y All of the filters f a The positions with a preset index value of 1 are denoted as set Y', where Y' = {y1', y'2, ..., y'}. k}, where y' k This represents the k-th element in set Y'; finally, the values in set Y' are substituted into filter f. b After determining the corresponding position and setting a preset index (e.g., 1) for that position, filter f... b Send to the sender;
[0057] The sender retains the hash value S X All of the filters f b Let the positions with a preset index value of 1 be denoted as set X', where X' = {x1', x'2, ..., x'} k}, where x' k This represents the k-th element in set X';
[0058] During this data interaction phase, the sender and receiver filter out possible intersection elements, effectively narrowing down the candidate intersection set and significantly reducing subsequent computational complexity.
[0059] (3) In the hash replacement sorting stage:
[0060] The sender creates an empty hash table W, substitutes the data in set X' into hash function group H2, stores the hash value calculated using hash function group H2 into hash table W, and sends hash table W to the receiver.
[0061] The receiving end creates an empty hash table Q. After substituting the data from set Y' into hash function group H2, it stores the hash value calculated using hash function group H2 into hash table Q and compares it with the data in hash table W. If hash table Q contains data identical to that in hash table W, it randomly replaces that data in hash table W with data from set Y', obtaining the replacement dataset Y”, where Y” = {y”1, y”2, ..., y”}. w}, where y” w This indicates replacing the w-th element in the dataset;
[0062] In this hash replacement sorting stage, the comparison process of set elements is optimized, which further improves the performance of the protocol; data privacy is ensured through random swap operations.
[0063] (4) In the set partitioning and polynomial generation stage:
[0064] The sender end divides the set X' into multiple subsets, and generates polynomials P1(x), P2(x),..., P m (x) according to each subset, wherein the roots of each polynomial are the element values in the corresponding subset; and the polynomial coefficients are encrypted using the public key in the key pair and sent to the receiver end;
[0065] In the set division and polynomial generation stage, the set subsets are processed quickly through the method of cutting the large set, constructing the polynomial, and combining the homomorphic encryption, so that the security and calculation efficiency of the protocol are greatly improved.
[0066] In the set division and polynomial generation stage, the idea of oblivious polynomial evaluation is used, the sender represents the set elements as the roots of the polynomials, and the polynomial coefficients are encrypted using the semi-homomorphic encryption, thereby enhancing the security of the protocol. It is ensured that the non-intersection elements and intermediate calculation results of both parties will not be leaked during the calculation process, and sensitive information is prevented from being inferred through the intersection size or other data characteristics.
[0067] (5) In the polynomial calculation and intersection solving stage:
[0068] The receiver end restores the polynomials according to the polynomial coefficients, substitutes the data in Y" into the polynomials, solves the polynomial values in the ciphertext state, and returns the solving result to the sender end.
[0069] The sender end decrypts the polynomial values using the private key in the key pair, compares them with the set X', determines the same elements as the intersection elements, and returns the intersection elements to the receiver end.
[0070] In the polynomial calculation and intersection solving stage, the sender compares the set after processing with the set after final processing by the receiver, which can correctly solve the intersection under the premise of ensuring data privacy.
[0071] The embodiment of the present application also provides a computer readable medium, which stores instructions, when the instructions are executed on the readable medium, the readable medium executes the above-mentioned privacy set intersection method based on homomorphic encryption and optimized filter.
[0072] The embodiment of the present application also provides an electronic device, which comprises a memory and a processor, and the memory stores a computer program executable on the processor; and the processor executes the computer program to realize the above-mentioned privacy set intersection method based on homomorphic encryption and optimized filter.
[0073] In summary, the privacy set intersection method based on homomorphic encryption and optimized filter, readable medium and electronic device provided by the embodiment of the present application propose a method based on semi-homomorphic encryption and optimized filter, combined with dynamically adjusting the filter capacity size, effectively reducing the number of candidate elements and protocol traffic in the preprocessing stage. The present application also uses hash replacement sorting, Oblivious Polynomial Evaluation (OPE), set partitioning and other auxiliary technologies to further improve the time efficiency of the protocol. The present application introduces these technologies in the privacy set intersection protocol, which can provide technical support for processing dynamic data sets under the premise of ensuring the correctness and security of the intersection result.
[0074] The privacy set intersection method based on homomorphic encryption and optimized filter has the advantages of low communication complexity and time complexity, and can be better applied to personalized recommendation settings, cross-platform advertising, private address book matching and other scenarios. For example, personalized recommendation systems are widely used in e-commerce, content platforms, social media and other fields. In e-commerce and short video platforms, platforms hope to use these data to improve the accuracy of the recommendation system, while avoiding direct data sharing. Specifically, the short video platform and the e-commerce platform each hold a set of user sets, and each user ID is associated with a set of interest tags. Both parties use the PSI protocol in this paper to interact to obtain a common user set. On this basis, the short video platform can encrypt the interest tags of users on video content after vectorization processing and transmit them to the e-commerce platform, which completes the weighted modeling of user interest distribution in the ciphertext domain to assist in generating a "interest seeding" type of commodity recommendation list. Throughout the process, the user's identity information and the data of non-intersection users are not disclosed. Both the common user list is obtained efficiently, and the data privacy and platform business interests are effectively protected.
[0075] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0076] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A privacy set intersection method based on homomorphic encryption and optimized filters, characterized in that, Includes the following steps: During the initialization phase: The sender and receiver jointly negotiate the hash function H1 and generate a semi-homomorphic encryption key pair, while creating a filtering system and a hash function group H2; During the data interaction phase: Based on the hash function H1 and the filtering system, data filtering of the sender's private set and the receiver's private set is implemented, and set Y' is generated at the receiver end and set X' is generated at the sender end. During the hash replacement sorting phase: The sender creates an empty hash table W, substitutes the data in set X' into hash function group H2, stores the hash value calculated using hash function group H2 into hash table W, and sends hash table W to the receiver. The receiving end creates an empty hash table Q, substitutes the data in set Y' into hash function group H2, stores the hash value calculated using hash function group H2 into hash table Q, and compares it with the data in hash table W; if there is data in hash table Q that is the same as that in hash table W, then the data in hash table W is randomly replaced with the data in set Y' to obtain the replacement dataset Y”; In the set partitioning and polynomial generation stage: The sender divides the set X' into multiple subsets, generates a polynomial for each subset, encrypts the polynomial coefficients using the public key in the key pair, and sends them to the receiver in order. In the polynomial calculation and intersection solution stage: The receiver recovers the polynomial based on the polynomial coefficients, substitutes the data in the replacement dataset Y” into the polynomial, calculates the polynomial value in the decrypted state, and returns the result to the sender. After decrypting the polynomial value using the private key in the key pair, the sender compares it with its own set X', determines the common elements as intersection elements, and returns the intersection elements to the receiver.
2. The privacy set intersection method based on homomorphic encryption and optimized filters according to claim 1, characterized in that, During the initialization phase, the filtration system includes filtration system a and filtration system b; The filtration system a includes a filter f that is initially set to all zeros. a and hash function h a ; The filtration system b includes a filter f that is initially set to all zeros. b and hash function h b .
3. The privacy set intersection method based on homomorphic encryption and optimized filters according to claim 2, characterized in that, The data interaction phase specifically includes: The sender uses hash function H1 to calculate the hash value X of the original data in the sender's private set, and uses hash function h... a Calculate the quadratic hash value S for hash value X. X and the secondary hash value S X Store in filter f a After setting a preset index for the corresponding position, filter f will be applied. a Send to the recipient; The receiver uses hash function H1 to calculate hash value Y of the original data in its private set, and uses hash function h... b Calculate the secondary hash value S for hash value Y. Y According to the quadratic hash value S Y With filter f a The preset index is used to calculate set Y'; the values in set Y' are then substituted into filter f. b After determining the corresponding position and setting a preset index for that position, filter f b Send to the sender; The sending end uses filter f b The preset index and the secondary hash value S in X Find set X'.
4. The privacy set intersection method based on homomorphic encryption and optimized filters according to claim 3, characterized in that, The method based on the secondary hash value S Y With filter f a The preset index is used to calculate set Y', specifically including: retaining the hash value S. Y All of the filters f a The position with a preset index value of 1 is denoted as set Y'.
5. The privacy set intersection method based on homomorphic encryption and optimized filters according to claim 3, characterized in that, The sending end uses filter f b The preset index and the secondary hash value S in X Find the set X', specifically including: the hash value S retained by the sender. X All of the filters f b The position with a preset index value of 1 is denoted as set X'.
6. The privacy set intersection method based on homomorphic encryption and optimized filters according to claim 1, characterized in that, In the set partitioning and polynomial generation stage, the root of each polynomial is the element value in the corresponding subset.
7. A computer-readable medium storing instructions, characterized in that, The instructions are executed by the processor to cause the processor to perform the method according to any one of claims 1-6.
8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, The processor executes a computer program to implement the method as described in any one of claims 1-6.