A method and system for finding intersection of private sets
By using the cuckoo hashing algorithm and pseudo-random matrix processing in the privacy set interception method, the amount of information sent by the server in the online stage is reduced, the problem of inefficiency in medium and slow network environments is solved, and a more efficient privacy set interception process is achieved.
Patent Information
- Application Number
- CN202111559832.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-12-20
AI Technical Summary
In the prior art, in the privacy collection interception, the amount of information sent by the server in the online stage is too large, resulting in a reduction in overall efficiency in a medium-slow network environment.
By storing the server dataset with cuckoo hash algorithm numbering in the offline stage, a pseudo-random matrix T and matrix U are generated, and matrix Q is obtained by inadvertent transmission expansion. In the online stage, the server calculates the hash value of matrix T to form a truth table to send it to the client, and the client calculates the hash value of its own data and the truth table to determine the intersection.
It effectively reduces the amount of information sent by the server in the online stage and improves the overall efficiency in a medium-slow network environment.
Smart Images

Figure CN114401080B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and system for obtaining intersection of privacy sets. Background Art
[0002] At present, the prior art provides a method for efficient batch processing of oblivious PRF with applications to private set intersection. In this method, the client stores its own set with cuckoo hash numbers in the offline phase, and constructs batch oblivious pseudo-random functions (batch-OPRF) with the server using oblivious transmission extension. In the online phase, the server processes its own set with batch-OPRF and sends it to the client. The client receives the information and compares it with its own content to obtain the intersection of the two parties.
[0003] However, the method provided by the prior art has an obvious problem, that is, the amount of information sent by the server in the online stage is too large, which will drag down the overall efficiency of the solution in a medium-slow network environment. Currently, there is no such method to reduce the amount of information transmitted in the solution. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a method for privacy set intersection that overcomes the above problems or at least partially solves the above problems.
[0005] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:
[0006] A method for finding the intersection of private sets, comprising:
[0007] S100. In the offline phase, the server uses the cuckoo hash algorithm to store its own data set R by number, and obtains a new data set R1;
[0008] S200. The server generates a pseudo-random matrix T, and uses a pseudo-random function C to obtain a matrix U in combination with the new data set R1;
[0009] S300. The server cooperates with the client to obtain a matrix Q through oblivious transfer expansion based on the client's selected preset bit length string p and server matrices T and U;
[0010] S400. When in the online stage, the server calculates H(t i ), and form a truth table, and send the truth table to the client;
[0011] S500. The client calculates H(q) for each of its own data y using a hash algorithm j +C(y)*p), where H is a hash function with a fixed output length, q j is the jth row of the matrix Q, C is a pseudo-random function, y is the client data, p is the string of the client's selected preset bit length; H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
[0012] Furthermore, in S100, when the data set R has n data, the new data set R1 is expanded to 1.2n+s data by using the cuckoo hash algorithm, that is, R = {r1, r2, ..., r n , ..., r 1.2n+s}, where s is a specific parameter of the Cuckoo Hash algorithm.
[0013] Further, in S200, the random matrix T is a matrix with 1.2n+s rows and k columns, and the elements in the matrix are 0 or 1 randomly distributed.
[0014] Furthermore, in S200, each row u of the matrix U i =t i +C(r i ), where t i represents the i-th row of matrix T, r i Server data.
[0015] Furthermore, in S200, the pseudo-random function C supports any input and outputs a k-bit string that meets security requirements.
[0016] Furthermore, in S300, each row q of the matrix Q i Specifically: q i =t i +C(r i )*p, where t i represents the i-th row of matrix T, r i Server data.
[0017] Further, in S400, H(t i ), by calculating H(t i ) outputs a fixed-length bit string.
[0018] Furthermore, in S500, j is equal to H1(y), H2(y), H3(y), 1.2n+1, 1.2n+2, ..., 1.2n+s, with a total of 3+s values, where H1, H2, H3 are hash functions of cuckoo hashing, and their output is an integer in the closed interval [1,1.2n].
[0019] Furthermore, the present invention also discloses a privacy set intersection system, comprising: a server and a client, wherein:
[0020] The server is used to use the cuckoo hash algorithm to number and store its own data set R in the offline stage to obtain a new data set R1; to generate a pseudo-random matrix T, and use a pseudo-random function C to combine the new data set R1 to obtain a matrix U; to cooperate with the client to obtain a matrix Q through inadvertent transmission expansion based on a string p of a preset bit length selected by the client and the server matrices T and U; and to calculate H(t i ), and form a truth table, and send the truth table to the client;
[0021] The client is used to calculate H(q j +C(y)*p), where H is a hash function with a fixed output length, q j is the jth row of the matrix Q, C is a pseudo-random function, y is the client data, p is the string of the client's selected preset bit length; H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
[0022] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:
[0023] The invention discloses a method for finding intersection of privacy sets, comprising: in an offline stage, a server uses a cuckoo hash algorithm to number and store its own data set R to obtain a new data set R1; the server generates a pseudo-random matrix T, and uses a pseudo-random function C to obtain a matrix U in combination with the new data set R1; the server cooperates with a client to obtain a matrix Q through inadvertent transmission expansion based on a character string p with a preset bit length selected by the client and server matrices T and U; in an online stage, the server calculates H(t i ) and form a truth table, which is sent to the client; the client calculates H(qj +C(y)*p), and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server. The present invention solves the problem that in the prior art, in the intersection of private sets, the amount of information sent by the server in the online stage is too large, which will drag down the overall efficiency in a medium-slow network environment.
[0024] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0026] Figure 1 This is a flowchart of a method for finding the intersection of privacy sets in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0028] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method and system for finding the intersection of privacy sets.
[0029] Example 1
[0030] This embodiment discloses a method for finding the intersection of private sets. Figure 1 ,include:
[0031] S100. In the offline stage, the server uses the cuckoo hash algorithm to number and store its own data set R to obtain a new data set R1; specifically, in S100, when the data set R has n data, the new data set R1 is expanded to 1.2n+s data through the cuckoo hash algorithm, that is, R = {r1, r2, ..., r n , ..., r 1.2n+s}, where s is a specific parameter of the Cuckoo Hash algorithm. The data numbered by the Cuckoo Hash algorithm needs a larger set to store. s is a specific parameter of CuckooHash, that is, a set of size n will become a numbered set of size 1.2n+s, and the empty positions are filled with virtual items. The larger the n, the smaller the s.
[0032] S200. The server generates a pseudo-random matrix T, and uses a pseudo-random function C to combine with the new data set R1 to obtain a matrix U. Specifically, in S200, the random matrix T is a 1.2n+s row, k column matrix, and the elements in the matrix are randomly distributed as 0 or 1. Each row u of the generated matrix U i =t i +C(r i ), where t i represents the i-th row of matrix T, r i Server data. The pseudo-random function C supports arbitrary input and outputs a k-bit string that meets security requirements.
[0033] S300. The server cooperates with the client to obtain a matrix Q through oblivious transfer expansion based on the preset bit length string p selected by the client and the server matrices T and U; specifically, each row q of the matrix Q i Specifically: q i =t i +C(r i )*p, where t i represents the i-th row of matrix T, r i Server data. The length of the string p selected by the client is k. It should be noted that q i It is not caused by i +C(r i )*p is calculated, and the client cannot know the specific t i ,q i It is just that the characteristics of the inadvertent transfer extension happen to be equal to this formula.
[0034] S400. When in the online stage, the server calculates H(t i ), and form a truth table, which is sent to the client. Specifically, H(t i ), by calculating H(t i ) outputs a fixed-length bit string.
[0035] S500. The client calculates H(q) for each of its own data y using a hash algorithm j +C(y)*p), where H is a hash function with a fixed output length, q jis the jth row of the matrix Q, C is a pseudo-random function, y is the client data, p is the string of the client's selected preset bit length; H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
[0036] A system for finding intersections of privacy sets, characterized by comprising: a server and a client, wherein: the server is used to use a cuckoo hash algorithm to number and store its own data set R in an offline phase to obtain a new data set R1; is used to generate a pseudo-random matrix T, and use a pseudo-random function C to obtain a matrix U in combination with the new data set R1; is used to cooperate with a client to obtain a matrix Q by inadvertent expansion based on a character string p with a preset bit length selected by the client and the matrix U; and is also used to calculate H(t i ), and form a truth table, and send the truth table to the client;
[0037] The client is used to calculate H(q j +C(y)*p), where H is a hash function with a fixed output length, q j is the jth row of the matrix Q, C is a pseudo-random function, y is the client data, and the client selects a string with a preset bit length; and H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
[0038] The present embodiment discloses a method for finding the intersection of private sets, including: in an offline stage, the server uses a cuckoo hash algorithm to number and store its own data set R to obtain a new data set R1; the server generates a pseudo-random matrix T, and uses a pseudo-random function C to obtain a matrix U in combination with the new data set R1; the server cooperates with the client to obtain a matrix Q by inadvertently expanding a character string p with a preset bit length selected by the client; in an online stage, the server calculates H(t i ) and form a truth table, which is sent to the client; the client calculates H(q j +C(y)*p), and the truth table H(t j) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server. The present invention solves the problem that in the prior art, in the intersection of private sets, the amount of information sent by the server in the online stage is too large, which will drag down the overall efficiency in a medium-slow network environment.
[0039] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0040] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0041] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.
[0042] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.
[0043] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.
[0044] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
Claims
1. A method for finding the intersection of private sets, characterized in that: include: S100. In the offline phase, the server uses the cuckoo hash algorithm to store its own data set R by number, and obtains a new data set R1; S200. The server generates a pseudo-random matrix T, and uses a pseudo-random function C to obtain a matrix U in combination with the new data set R1; S300. The server cooperates with the client to obtain a matrix Q through oblivious transfer expansion based on the client's selected preset bit length string p and server matrices T and U; S400. When in the online stage, the server calculates H(t i ), and form a truth table, and send the truth table to the client; S500. The client calculates H(q) for each of its own data y using a hash algorithm j +C(y)*p), where H is a hash function with a fixed output length, q j is the jth row of the matrix Q, C is a pseudo-random function, y is the client data, p is the string of the client's selected preset bit length; H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
2. A method for finding intersection of private sets as claimed in claim 1, characterized in that: In S100, when the data set R has n data, the new data set R1 is expanded to 1.2n+s data by using the cuckoo hash algorithm, that is, R = {r1, r2, ..., r n , ..., r 1.2n+s }, where s is a specific parameter of the cuckoo hash algorithm.
3. A method for finding intersection of private sets as claimed in claim 1, characterized in that: In S200, the random matrix T is a matrix with 1.2n+s rows and k columns, and the elements in the matrix are randomly distributed as 0 or 1.
4. A method for finding intersection of private sets as claimed in claim 1, characterized in that: In S200, each row u of the matrix U i =t i +C(r i ), where t i represents the i-th row of matrix T, r i Server data.
5. The method for finding the intersection of private sets as claimed in claim 1, characterized in that: In S200, the pseudo-random function C supports any input and outputs a k-bit string that meets security requirements.
6. A method for finding intersection of private sets as claimed in claim 1, characterized in that: In S300, each row q of the matrix Q i Specifically: q i =t i +C(r i )*p, where t i represents the i-th row of matrix T, r i Server data.
7. A method for finding intersection of private sets as claimed in claim 1, characterized in that: In S400, H(t i ), by calculating H(t i ) outputs a fixed-length bit string.
8. The method for finding the intersection of private sets as claimed in claim 1, characterized in that: In S500, j is equal to H1(y), H2(y), H3(y), 1.2n+1, 1.2n+2, ..., 1.2n+s, with a total of 3+s values, where H1, H2, H3 are hash functions of cuckoo hashing, and their output is an integer in the closed interval [1,1.2n].
9. A system for finding intersection of private sets, characterized in that: include: The server and the client include: the server is used to use the cuckoo hash algorithm to number and store its own data set R in the offline stage to obtain a new data set R1; it is used to generate a pseudo-random matrix T, and use a pseudo-random function C to combine the new data set R1 to obtain a matrix U; it is used to cooperate with the client to obtain a matrix Q through inadvertent transmission expansion based on a string p of a preset bit length selected by the client and the server matrices T and U; it is also used to calculate H(t i ), and form a truth table, and send the truth table to the client; The client is used to calculate H(q j +C(y)*p), where H is a hash function with a fixed output length, q j is the jth row of the matrix Q, C is a pseudo-random function, y is the client data, and the client selects a string with a preset bit length; and H(q j +C(y)*p) and the truth table H(t j ) for comparison, if H(q j +C(y)*p) and H(t j ) are equal, then the data y is considered to be in the intersection of the client and the server.
Citation Information
Patent Citations
Multi-party privacy set intersection method for resisting malicious enemies
CN110719159A
Pathogenic gene detection method based on privacy protection intersection calculation protocol
CN111125736A