Updatable privacy set intersection method and device based on pre-calculation mode
By introducing the pre-computation mode and Bloom filter into the privacy set intersection protocol, combined with the use of difference polynomials, the calculation and communication overhead problems of the update operation in the small set vs. large set scenario in the existing technology are solved, and it is secure against malicious adversaries. model provides greater security and efficiency.
Patent Information
- Application Number
- CN202310889993.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2025-01-21
AI Technical Summary
The existing privacy set interception protocol requires re-execution of the online phase when performing update operations on a small set to large set scenario, resulting in additional computing and communication overhead. In addition, existing protocols are all based on semi-honest security models, and there is no protocol based on malicious adversary security models.
An updateable privacy set intersection method based on precomputation mode is proposed. By initializing public parameters, generating private keys and public keys, and using Bloom filters and difference polynomials to calculate and update the intersection of private data, it is suitable for small set pairs. Large collection scenarios, and structured under a malicious adversary security model.
Achieve efficient privacy data intersection solution and update operations in the small collection of large sets, reducing computing and communication overhead, and providing higher security in stricter malicious opponent security models.
Smart Images

Figure CN119337390A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of secure computing, and in particular to an updateable privacy set intersection method and device based on a pre-computation mode. Background Art
[0002] Private Set Intersection (PSI) is a specific secure multi-party computation (MPC) problem that can protect the private information sets input by both parties in the protocol and obtain the intersection of the private information sets input by both parties without leaking any additional information except public information. In the two-party private set intersection protocol, one of the participants has a private data input set. The other party has a private data input set The two parties involved can obtain the intersection X∩Y of the private data sets by executing the PSI protocol, and cannot obtain any information other than the intersection. The existing unbalanced PSI protocols applicable to the scenario of small sets versus large sets need to re-execute the online phase when performing update operations, resulting in additional computational and communication overhead. In addition, the existing PSI protocols are all based on the semi-honest security model, and there is currently no PSI protocol constructed based on the malicious adversary security model. Obviously, in practical applications, we need a more secure and efficient two-party unbalanced private set intersection protocol that is applicable to the scenario of small sets versus large sets. Summary of the invention
[0003] In view of this, the present disclosure proposes an updateable privacy set intersection method and device based on a pre-calculation mode, aiming to provide a more secure and efficient privacy set intersection protocol.
[0004] According to a first aspect of the present disclosure, a method for updating privacy set intersection based on a pre-calculation mode is provided, the method comprising:
[0005] Initialize public parameters and generate a first private key;
[0006] Initialize the first Bloom filter and the second Bloom filter according to the common parameters;
[0007] Determine a first public key based on the first private key and send the first public key to the second user terminal;
[0008] receiving a difference polynomial sent by the second user terminal, the difference polynomial being determined based on a second number of second private data in a second private data set corresponding to the second user terminal and a second number of second public keys of the second user terminal, the second number of second public keys being determined based on a second number of second private keys generated by the second user terminal based on public parameters;
[0009] Determine a first shared key for each first private data in the first private data set corresponding to the first user end according to the difference polynomial, insert the first Bloom filter into the first shared key, and send the first shared key to the second user end, so that the second user end calculates the intersection of the original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key;
[0010] In response to the first user terminal updating the private data, determining that the updated private data set is a third private data set;
[0011] A first shared key for each of the third private data in the third private data set is determined according to the difference polynomial, and is sent to the second user terminal after being inserted into the second Bloom filter, so that the second user terminal calculates and updates the intersection of the private data according to the second Bloom filter and the second shared key.
[0012] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0013] In a possible implementation manner, initializing the first Bloom filter and the second Bloom filter according to the common parameter includes:
[0014] Initialize a first Bloom filter of a first length based on the first parameter, where the first length is determined according to a first amount of first privacy data included in the first privacy data set;
[0015] A second Bloom filter of a second length is initialized based on the first parameter, where the second length is determined according to a third amount of third privacy data included in the third privacy data set.
[0016] In a possible implementation manner, determining a first public key based on the first private key and sending the first public key to the second user terminal includes:
[0017] According to the formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter;
[0018] Send the first public key to the second client.
[0019] In a possible implementation, determining, according to the difference polynomial, a first shared key for each first private data in a first private data set corresponding to the first user terminal, inserting the first shared key into the first Bloom filter and sending the first shared key to the second user terminal includes:
[0020] According to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0021] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0022] In a possible implementation, determining, according to the difference polynomial, a first shared key for each first private data in a first private data set corresponding to the first user terminal, inserting the first shared key into the first Bloom filter and sending the first shared key to the second user terminal includes:
[0023] According to the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0024] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0025] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0026] In a possible implementation, determining the first shared key of each third private data in the third private data set according to the difference polynomial, inserting the first shared key into the second Bloom filter and sending the key to the second user terminal includes:
[0027] According to the formula Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0028] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0029] In a possible implementation, determining the first shared key of each third private data in the third private data set according to the difference polynomial, inserting the first shared key into the second Bloom filter and sending the key to the second user terminal includes:
[0030] According to the formula Calculate a first candidate key for each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0031] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0032] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0033] According to a second aspect of the present disclosure, a method for updating privacy set intersection based on a pre-calculation mode is provided, the method comprising:
[0034] Initialize public parameters and generate a second number of second private keys, where the second number is the number of second private data in the second private data set corresponding to the second user terminal;
[0035] Calculate a corresponding second public key according to each of the second private keys;
[0036] Receive a first public key sent by the first client, and calculate a corresponding second shared key according to the first public key and each of the second private keys;
[0037] Calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal;
[0038] Receive a first Bloom filter and / or a second Bloom filter sent by the first user terminal, the first Bloom filter includes a first number of first shared keys, the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to the public parameters, the first shared key in the first Bloom filter is determined according to the difference polynomial and a first number of first privacy data in the first privacy data set, and the first shared key in the second Bloom filter is determined according to the difference polynomial and a third number of third privacy data in the third privacy data set;
[0039] Determine an original private data intersection according to a first shared key included in the first Bloom filter and the same as the second shared key;
[0040] An updated private data intersection is determined according to a first shared key included in the second Bloom filter and identical to the second shared key.
[0041] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0042] In a possible implementation, the calculating a corresponding second public key according to each of the second private keys includes:
[0043] According to the formula Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B j is the second private key, p is the third parameter, and enc is the encoding function.
[0044] In a possible implementation manner, the calculating a corresponding second shared key according to the first public key and each of the second private keys includes:
[0045] According to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter.
[0046] In a possible implementation manner, the calculating a corresponding second shared key according to the first public key and each of the second private keys includes:
[0047] According to the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, and p is the third parameter;
[0048] The second candidate key is hashed using a second hash function to obtain a corresponding second shared key.
[0049] In a possible implementation manner, the calculating a difference polynomial according to each of the second public keys and the second private data set includes:
[0050] Calculate the ideal permutation of each of the second public keys as in is the second public key, Π -1 is the sixth parameter, f j is the ideal replacement result;
[0051] According to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
[0052] According to a third aspect of the present disclosure, a device for updating privacy set intersection based on a pre-calculation mode is provided, the device comprising:
[0053] In a possible implementation, the first private key generation module is used to initialize the public parameters and generate the first private key;
[0054] A filter initialization module, configured to initialize the first Bloom filter and the second Bloom filter according to the common parameters;
[0055] A first public key generation module, used to determine a first public key based on the first private key and send the first public key to a second user terminal;
[0056] a polynomial receiving module, configured to receive a difference polynomial sent by the second user terminal, the difference polynomial being determined based on a second number of second private data in a second private data set corresponding to the second user terminal and a second number of second public keys of the second user terminal, the second number of second public keys being determined based on a second number of second private keys generated by the second user terminal based on public parameters;
[0057] A first key sending module, configured to determine a first shared key of each first private data in a first private data set corresponding to the first user terminal according to the difference polynomial, and send the first shared key to the second user terminal after inserting the first Bloom filter, so that the second user terminal calculates an intersection of original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key;
[0058] A first set determination module, configured to determine, in response to the first user terminal updating the privacy data, that the updated privacy data set is a third privacy data set;
[0059] The second key sending module is used to determine the first shared key of each third private data in the third private data set according to the difference polynomial, and send it to the second user end after inserting it into the second Bloom filter, so that the second user end calculates and updates the intersection of private data according to the second Bloom filter and the second shared key.
[0060] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0061] In a possible implementation, the filter initialization module is further used to:
[0062] Initialize a first Bloom filter of a first length based on the first parameter, where the first length is determined according to a first amount of first privacy data included in the first privacy data set;
[0063] A second Bloom filter of a second length is initialized based on the first parameter, where the second length is determined according to a third amount of third privacy data included in the third privacy data set.
[0064] In a possible implementation, the first public key generation module is further used to:
[0065] According to the formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter;
[0066] Send the first public key to the second client.
[0067] In a possible implementation, the first key sending module is further configured to:
[0068] According to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0069] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0070] In a possible implementation, the first key sending module is further configured to:
[0071] According to the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0072] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0073] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0074] In a possible implementation, the second key sending module is further configured to:
[0075] According to the formula Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0076] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0077] In a possible implementation, the second key sending module is further configured to:
[0078] According to the formula Calculate a first candidate key for each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0079] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0080] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0081] According to a fourth aspect of the present disclosure, a device for updating privacy set intersection based on a pre-calculation mode is provided, the device comprising:
[0082] A second private key generation module, used to initialize the public parameters and generate a second number of second private keys, where the second number is the number of second private data in the second private data set corresponding to the second user terminal;
[0083] A second public key generation module, used to calculate a corresponding second public key according to each of the second private keys;
[0084] A key calculation module, used for receiving the first public key sent by the first user terminal, and calculating a corresponding second shared key according to the first public key and each of the second private keys;
[0085] a polynomial sending module, configured to calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal;
[0086] a filter receiving module, configured to receive a first Bloom filter and / or a second Bloom filter sent by the first user terminal, wherein the first Bloom filter includes a first number of first shared keys, and the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to the public parameters, the first shared key in the first Bloom filter is determined according to the difference polynomial and a first number of first privacy data in the first privacy data set, and the first shared key in the second Bloom filter is determined according to the difference polynomial and a third number of third privacy data in the third privacy data set;
[0087] A second set determination module, configured to determine an original private data set according to a first shared key included in the first Bloom filter and being the same as the second shared key;
[0088] The third set determination module is used to determine an updated privacy data set according to a first shared key included in the second Bloom filter and the first shared key is the same as the second shared key.
[0089] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0090] In a possible implementation, the second public key generation module is further used to:
[0091] According to the formula Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B j is the second private key, p is the third parameter, and enc is the encoding function.
[0092] In a possible implementation, the key calculation module is further used to:
[0093] According to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter.
[0094] In a possible implementation, the key calculation module is further used to:
[0095] According to the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, and p is the third parameter;
[0096] The second candidate key is hashed using a second hash function to obtain a corresponding second shared key.
[0097] In a possible implementation manner, the polynomial sending module is further used to:
[0098] Calculate the ideal permutation of each of the second public keys as in is the second public key, Π -1 is the sixth parameter, f j is the ideal replacement result;
[0099] According to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
[0100] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0101] According to a sixth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0102] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code, and when the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0103] In an embodiment of the present disclosure, public parameters are initialized by the first user terminal and the second user terminal and a first private key and a second private key are generated respectively. The first user terminal initializes the first Bloom filter and the second filter according to the public parameters, and generates a first public key and sends it to the second user terminal. The second user terminal generates the second public key and determines the difference polynomial and sends it to the first user terminal. The first user terminal determines the first shared key corresponding to the original first private data and the updated third private data according to the difference polynomial, and inserts them into the first Bloom filter and the second Bloom filter respectively and sends them. The second user terminal determines the intersection of the original private data and the intersection of the updated private data according to the second shared key and the first shared key in the first Bloom filter and the second Bloom filter. The present disclosure can perform efficient intersection and update operations while reducing computational overhead and communication overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0105] Figure 1 A flowchart showing a method for intersecting an updateable privacy set based on a pre-calculation mode at a first user terminal according to an embodiment of the present disclosure is shown;
[0106] Figure 2 A flowchart showing a method for intersecting an updateable privacy set based on a pre-calculation mode at a second user terminal according to an embodiment of the present disclosure is shown;
[0107] Figure 3 A schematic diagram showing an intersection process of an updateable privacy data set based on a pre-calculation mode according to an embodiment of the present disclosure is shown;
[0108] Figure 4 A schematic diagram showing another process of intersecting an updateable privacy data set based on a pre-calculation mode according to an embodiment of the present disclosure;
[0109] Figure 5 A schematic diagram showing an updateable privacy set intersection device based on a pre-calculation mode at a first user terminal according to an embodiment of the present disclosure;
[0110] Figure 6 A schematic diagram showing an updateable privacy set intersection device based on a pre-calculation mode at a second user terminal according to an embodiment of the present disclosure;
[0111] Figure 7 A schematic diagram showing an electronic device according to an embodiment of the present disclosure;
[0112] Figure 8 A schematic diagram showing another electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0113] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0114] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0115] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0116] The updateable privacy set intersection method based on the pre-calculation mode of the embodiment of the present disclosure can be executed by an electronic device such as a terminal device or server used by the first user or the second user participating in the privacy set intersection calculation, that is, the terminal device or server can be used as the first user end and / or the second client. Among them, the terminal device can be any fixed or mobile terminal such as user equipment (UserEquipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PersonalDigitalAssistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the updateable privacy set intersection method based on the pre-calculation mode of the embodiment of the present disclosure by a processor calling computer-readable instructions stored in a memory.
[0117] Alternatively, the embodiments of the present disclosure may also use an application installed on an electronic device such as a terminal device or a server as a user terminal used by the first user or the second user participating in the privacy set intersection calculation, and execute the updateable privacy set intersection method based on the pre-calculation mode of the embodiments of the present disclosure through the first user terminal and the second user terminal used by the first user and the second user respectively.
[0118] Figure 1 A flowchart of a method for intersecting an updateable privacy set based on a pre-calculation mode at a first user terminal according to an embodiment of the present disclosure is shown. Figure 1 As shown, the privacy set intersection method on the first user side of the embodiment of the present disclosure may include the following steps S10-S70.
[0119] Step S10: Initialize public parameters and generate a first private key.
[0120] In a possible implementation, the first user terminal is a hardware or software user terminal used by a first user who is a protocol participant of the privacy set intersection method. The first user terminal can generate public parameters based on the preset requirements of the protocol, and send the public parameters to a second user terminal used by another second user who participates in the protocol. The first user and the second user who are protocol participants respectively have corresponding first private data sets. and the second private data set Where N S and N C Can be the same or different, in different cases N S Greater than N CThe protocol participants need to perform secure multi-party computation based on public parameters to find the intersection X∩Y of the first private data and the second private data set. After the first user terminal updates the private data, it can be determined that the set including the updated third private data is the third private data. N U Less than N C .
[0121] Optionally, in different application scenarios, the first user terminal may generate at least one required public parameter according to the requirements of the protocol, and generate the first private key of the first user terminal based on the initialized public parameters. For example, the public parameters generated by the embodiment of the present disclosure may include a first parameter ∈, a second parameter g, a third parameter p, a fourth parameter F, a fifth parameter Π, and a sixth parameter Π -1 . The first parameter ∈ is the parameter of the first Bloom filter and / or the second Bloom filter, the second parameter g is the generator, the third parameter p is a prime number greater than 2, the fourth parameter F is the finite field parameter, the fifth parameter Π and the sixth parameter Π -1 is an ideal permutation parameter. At the same time, the first user terminal can randomly generate a first private key α.
[0122] Step S20: Initialize the first Bloom filter and the second Bloom filter according to the common parameters.
[0123] In one possible implementation, after initializing and obtaining public parameters, the first user terminal initializes two Bloom filters according to the first parameter in the public parameters to obtain a first Bloom filter and a second Bloom filter. The first Bloom filter is used to insert a first shared key corresponding to the first private data as the original data, and the second Bloom filter is used to insert a first shared key corresponding to the third private data as the updated data. Optionally, the lengths of the first Bloom filter and the second Bloom filter are different, and can be determined according to the amount of data that needs to be inserted therein. That is, a first Bloom filter of a first length can be initialized based on a first parameter ∈, wherein the first length is determined according to the first amount of first private data included in the first private data set. A second Bloom filter of a second length is initialized based on the first parameter ∈, wherein the second length is determined according to the third amount of third private data included in the third private data set. Exemplarily, the first length can be 1.44∈N S , the second length can be 1.44∈N U , N S and N U are the first and third quantities respectively.
[0124] Step S30: determine a first public key based on the first private key and send the first public key to the second user terminal.
[0125] In a possible implementation, the first user terminal may generate a first public key based on the first private key α and the public parameters after generating the first private key α and initializing the public parameters. The generation process of the first public key may be based on formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter. After generating the first public key, the first client sends the first public key to the second client, so that the second client generates a second shared key based on the received first public key.
[0126] Step S40: receiving the difference polynomial sent by the second user terminal.
[0127] In a possible implementation, the first user terminal receives a difference polynomial sent by the second user terminal, and is used to calculate a first shared key for each first private data in the first private data set and each third private data in the third private data set according to the difference polynomial. The difference polynomial is determined based on a second number of second private data in the second private data set corresponding to the second user terminal, and a second number of second public keys of the second user terminal, and the second number of second public keys are determined based on a second number of second private keys generated by the second user terminal based on public parameters.
[0128] Optionally, after initializing the same public parameters as the first user terminal, the second user terminal may randomly generate a second number of second private keys. N c is the second number. Further, the second user terminal may generate a second public key corresponding to each second private key based on each second private key and the public parameter. Exemplarily, the second user terminal may generate a second public key corresponding to each second private key according to the formula Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B j is the second private key, p is the third parameter, and j is a value greater than or equal to 1 and less than the second number. After obtaining the second number of second public keys and receiving the first public key sent by the first client, the second number of second shared keys can be calculated. Optionally, the second user terminal can calculate the second number of second shared keys according to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter. Alternatively, you can first use the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, p is the third parameter, and the second candidate key is hashed by the second hash function to obtain the corresponding second shared key.
[0129] At the same time, after obtaining the second number of second public keys, the second user terminal can also calculate the difference polynomial through the second number of second public keys and the second privacy data set and send it to the first user terminal. The calculation process of the difference polynomial can be to first calculate the ideal permutation of each second public key as in is the second public key, Π -1 is the sixth parameter, f j is the ideal replacement result. Then according to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
[0130] Step S50: Determine a first shared key for each first private data in a first private data set corresponding to the first user terminal according to the difference polynomial, insert the first shared key into the first Bloom filter, and send the first shared key to the second user terminal.
[0131] In a possible implementation, after receiving the difference polynomial sent by the second user end, the first user end determines the first shared key of each first private data in the first private data set according to the difference polynomial, and inserts the determined first number of first shared keys into the first Bloom filter and sends them to the second user end. Optionally, the first user end can directly calculate the first shared key corresponding to each first private data according to a preset formula. Alternatively, the first candidate key corresponding to each first private data can be calculated according to a preset formula, and then the first candidate key is processed by a second hash function to obtain the corresponding first shared key. That is, the first user end can calculate the first shared key corresponding to each first private data according to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function. Alternatively, the first user terminal may also use the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first privacy data, P is the difference polynomial, H represents the first hash function, and the first candidate key is hashed by the second hash function to obtain the corresponding first shared key.
[0132] Optionally, after determining the first number of first shared keys by any of the above methods, the first user terminal inserts the first shared key of each first private data into the first Bloom filter and sends it to the second user terminal. Furthermore, after receiving the first Bloom filter, the second user terminal can calculate the intersection of the original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key. Exemplarily, the second user terminal can search for the first shared key with the same second shared key in the first Bloom filter, and determine the original private data set according to the first shared key found.
[0133] Step S60: In response to the first user terminal updating the privacy data, determining that the updated privacy data set is a third privacy data set.
[0134] In a possible implementation, after the first user terminal updates the private data, it determines that the newly added private data is the third private data, and simultaneously determines that the set consisting of the third private data is the third private data set.
[0135] Step S70: Determine a first shared key for each of the third private data in the third private data set according to the difference polynomial, insert the first shared key into the second Bloom filter, and then send the first shared key to the second user terminal.
[0136] In one possible implementation, the first user terminal determines a third private data set and after receiving a difference polynomial sent by the second user terminal, determines a first shared key for each third private data in the third private data set based on the difference polynomial, and inserts the determined third number of first shared keys into the second Bloom filter and sends them to the second user terminal. Optionally, the first user terminal may directly calculate the first shared key corresponding to each third private data according to a preset formula. Alternatively, the first candidate key corresponding to each third private data may be calculated according to a preset formula, and then the first candidate key may be processed by a second hash function to obtain the corresponding first shared key. That is, the first user terminal may calculate the first shared key corresponding to each third private data according to the formula. Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the third privacy data, P is the difference polynomial, and H represents the first hash function. Alternatively, the first user terminal can also use the formula Calculate the first candidate key of each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, x iis the third privacy data, P is the difference polynomial, H represents the first hash function, and the first candidate key is hashed by the second hash function to obtain the corresponding first shared key.
[0137] Optionally, after the first user terminal determines the third number of first shared keys by any of the above methods, it inserts the first shared key of each third private data into the second Bloom filter and sends it to the second user terminal. Furthermore, after receiving the second Bloom filter, the second user terminal can calculate the updated private data intersection according to the second Bloom filter and the second shared key. Exemplarily, the second user terminal can search for the first shared key with the same second shared key in the second Bloom filter, and determine the updated private data set according to the first shared key found.
[0138] In different application scenarios, the intersection calculated by the first user terminal and the second user terminal in the embodiment of the present disclosure can play different roles. For example, it can be applied to any application scenario such as finding common patients between different medical institutions, searching for common items in databases between different security institutions, and finding the same person in different lists without leaking other information. That is, the first privacy data set and the second privacy data set corresponding to the first user terminal and the second user terminal can be a list of people, a list of items, and an information set in different scenarios.
[0139] Based on the above technical features, the disclosed embodiment has a construction method of a two-party private set intersection protocol that can be updated by large set participants in the pre-calculation mode, which can be applied to both the semi-honest security model and the malicious adversary security model. At the same time, the private set intersection protocol using the private intersection method of the disclosed embodiment can perform efficient intersection and update operations, and the computational overhead and communication overhead have obvious advantages over existing solutions.
[0140] Figure 2 A flowchart of a method for intersecting an updateable privacy set based on a pre-calculation mode at a second user terminal according to an embodiment of the present disclosure is shown. Figure 2 As shown, the privacy set intersection method at the second user terminal side of the embodiment of the present disclosure may include the following steps S10'-S70'.
[0141] Step S10': initialize public parameters and generate a second number of second private keys.
[0142] In a possible implementation, the first user terminal is a hardware or software user terminal used by a first user who is a protocol participant of the privacy set intersection method. The first user terminal can generate public parameters based on the preset requirements of the protocol, and send the public parameters to a second user terminal used by another second user who participates in the protocol. The first user and the second user who are protocol participants respectively have corresponding first private data sets. and the second private data set Where N S and N C Can be the same or different, in different cases N S Greater than N C The protocol participants need to perform secure multi-party computation based on public parameters to find the intersection X∩Y of the first private data and the second private data set. After the first user terminal updates the private data, it can be determined that the set including the updated third private data is the third private data. N U Less than N C .
[0143] Optionally, in different application scenarios, the second user terminal may generate at least one required public parameter according to the requirements of the protocol, and generate a second number of second private keys of the second user terminal based on the public parameters obtained by initialization. The public parameters generated by the second user terminal are the same as the public parameters generated by the first user terminal. For example, the public parameters generated by the embodiment of the present disclosure may include a first parameter ∈, a second parameter g, a third parameter p, a fourth parameter F, a fifth parameter Π, and a sixth parameter Π -1 . The first parameter ∈ is the parameter of the first Bloom filter and / or the second Bloom filter, the second parameter g is the generator, the third parameter p is a prime number greater than 2, the fourth parameter F is the finite field parameter, the fifth parameter Π and the sixth parameter Π -1 is the ideal replacement parameter. At the same time, the second user terminal can randomly generate a second number of second private keys N c is the second quantity.
[0144] Step S20': Calculate a corresponding second public key according to each of the second private keys.
[0145] In a possible implementation, after generating a second number of second private keys and initializing the public parameters, the second user terminal may generate a second public key corresponding to each second private key based on each second private key and the public parameters. Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B jis the second private key, p is the third parameter, enc is the encoding function, and j is a value greater than or equal to 1 and less than the second number.
[0146] Step S30': receiving the first public key sent by the first client, and calculating a corresponding second shared key according to the first public key and each of the second private keys.
[0147] In a possible implementation, the second user terminal receives a first public key sent by the first user terminal, wherein the first public key is determined by the first user terminal based on a public parameter and a randomly generated first private key. For example, the first user terminal may first randomly generate a first private key α, and then generate the first private key α according to the formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter. After generating the first public key, the first client sends the first public key to the second client, so that the second client generates a second shared key based on the received first public key.
[0148] Furthermore, after receiving the first public key sent by the first user terminal, the second user terminal can calculate the second shared key corresponding to each second private key according to the first public key and each second private key. The second shared key can be directly calculated by a preset formula, or firstly calculated by a preset formula to obtain a second candidate key, and then processed by a second hash function to obtain the second shared key. Exemplarily, the second user terminal can calculate the second candidate key according to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter. Alternatively, you can first use the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, p is the third parameter, and the second candidate key is hashed by the second hash function to obtain the corresponding second shared key.
[0149] Step S40': calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal.
[0150] In a possible implementation, after determining the second number of second public keys, the second user terminal may also calculate a difference polynomial based on each second public key and the second privacy data set. The calculation process of the difference polynomial may be to first calculate the ideal permutation of each second public key as in is the second public key, Π -1 is the sixth parameter, f jis the ideal replacement result. Then according to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
[0151] Furthermore, after calculating the difference polynomial, the second user terminal sends the difference polynomial to the first user terminal, so that the first user terminal determines the first shared key corresponding to the first private data and the third private data based on the difference polynomial, and inserts the first Bloom filter and the second Bloom filter respectively. The first shared key corresponding to the first private data can be determined by the first user terminal according to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function. Alternatively, the first user terminal may also use the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, H represents the first hash function, and the first candidate key is hashed by the second hash function to obtain the corresponding first shared key. Similarly, the first shared key corresponding to the third private data can be determined by the first user terminal according to the formula Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the third privacy data, P is the difference polynomial, and H represents the first hash function. Alternatively, the first user terminal can also use the formula Calculate the first candidate key of each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the third privacy data, P is the difference polynomial, H represents the first hash function, and the first candidate key is hashed by the second hash function to obtain the corresponding first shared key.
[0152] Furthermore, the first user terminal may insert the first shared key corresponding to the first private data into the first Bloom filter, and insert the first shared key corresponding to the third private data into the second Bloom filter.
[0153] Step S50': receiving the first Bloom filter and / or the second Bloom filter sent by the first client.
[0154] In a possible implementation, after inserting data, the first user terminal sends the first Bloom filter and the second Bloom filter to the second user terminal, and the second user terminal receives the first Bloom filter and the second Bloom filter. The first Bloom filter includes a first number of first shared keys, the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to public parameters, the first shared key in the first Bloom filter is determined according to a difference polynomial and a first number of first private data in a first private data set, and the first shared key in the second Bloom filter is determined according to a difference polynomial and a third number of third private data in a third private data set.
[0155] Step S60': determine the intersection of original private data according to the first shared key included in the first Bloom filter and the first shared key being the same as the second shared key.
[0156] In a possible implementation, after receiving the first Bloom filter, the second user terminal may calculate the intersection of the original private data according to the first Bloom filter and the second shared key, where the second shared key is determined according to the second private key and the first public key. Exemplarily, the second user terminal may search the first shared key for the same second shared key in the first Bloom filter, and determine the original private data set according to the first shared key obtained by the search.
[0157] Step S70': determine to update the private data intersection according to the first shared key included in the second Bloom filter and the first shared key being the same as the second shared key.
[0158] In a possible implementation, after receiving the second Bloom filter, the second user terminal may calculate the updated private data intersection according to the second Bloom filter and the second shared key. For example, the second user terminal may search the second Bloom filter for the first shared key with the same second shared key, and determine the updated private data set according to the first shared key found.
[0159] Figure 3 FIG. 1 is a schematic diagram showing a process of intersecting an updateable privacy data set based on a pre-calculation mode according to an embodiment of the present disclosure. Figure 3As shown, the two parties who perform the method for intersection of private data sets in the embodiment of the present disclosure may be a first user end (sender) and a second user end (receiver). The process of intersection of private data sets may include four stages: a basic stage, a preparation stage, an online stage, and an update stage. In the basic stage, the first user end and the second user end may generate public parameters respectively, and the first user end may randomly generate a first private key, and the second user end may randomly generate a second number of second private keys. In the preparation stage, the first user end may initialize the first Bloom filter and the second Bloom filter, and generate a first public key and send it to the second user end. The second user end may receive the first public key and calculate a second number of second public keys, an ideal permutation corresponding to the second public key, and a second number of second shared keys. In the online stage, the second user end may calculate a difference polynomial based on the ideal permutation and the second private data set and send it to the first user end, the first user end may calculate a first number of first shared keys corresponding to the first private data set according to the difference polynomial, insert the first shared keys into the first Bloom filter and send them to the second user end, and the second user end may determine the intersection of the original private data according to the received first Bloom filter and the second shared key. During the update phase, the first user end can calculate the third number of first shared keys corresponding to the third privacy data set based on the difference polynomial, insert them into the second Bloom filter and send them to the second user end, and the second user end can determine the updated privacy data intersection based on the received second Bloom filter and the second shared key.
[0160] Figure 4 FIG. 2 is a schematic diagram showing another process of intersecting an updateable privacy data set based on a pre-calculation mode according to an embodiment of the present disclosure. Figure 4As shown, the two parties executing the method for intersection of private data sets in the disclosed embodiment may be a first user terminal (sender) and a second user terminal (receiver). The process of intersection of private data sets may include four stages: a basic stage, a preparation stage, an online stage, and an update stage. Among them, in the basic stage, the first user terminal and the second user terminal may generate public parameters respectively, and the first user terminal may randomly generate a first private key, and the second user terminal may randomly generate a second number of second private keys. In the preparation stage, the first user terminal may initialize the first Bloom filter and the second Bloom filter, and generate a first public key and send it to the second user terminal at the same time. The second user terminal may receive the first public key and calculate a second number of second public keys, an ideal permutation corresponding to the second public key, and a second number of second candidate keys, and then obtain the corresponding second shared key through hash processing. In the online phase, the second user end can calculate the difference polynomial based on the ideal permutation and the second private data set and send it to the first user end. The first user end calculates the first number of first candidate keys corresponding to the first private data set according to the difference polynomial, obtains the first shared key after hashing the first candidate key, inserts it into the first Bloom filter and sends it to the second user end. The second user end determines the intersection of the original private data according to the received first Bloom filter and the second shared key. In the update phase, the first user end can calculate the third number of first candidate keys corresponding to the third private data set according to the difference polynomial, obtains the first shared key after hashing the first candidate key, inserts it into the second Bloom filter and sends it to the second user end. The second user end determines the intersection of the updated private data according to the received second Bloom filter and the second shared key.
[0161] In different application scenarios, the intersection calculated by the first user terminal and the second user terminal in the embodiment of the present disclosure can play different roles. For example, it can be applied to any application scenario such as finding common patients between different medical institutions, searching for common items in databases between different security institutions, and finding the same person in different lists without leaking other information. That is, the first privacy data set and the second privacy data set corresponding to the first user terminal and the second user terminal can be a list of people, a list of items, and an information set in different scenarios.
[0162] Based on the above technical features, the disclosed embodiment has a construction method of a two-party private set intersection protocol that can be updated by large set participants in the pre-calculation mode, which can be applied to both the semi-honest security model and the malicious adversary security model. At the same time, the private set intersection protocol using the private intersection method of the disclosed embodiment can perform efficient intersection and update operations, and the computational overhead and communication overhead have obvious advantages over existing solutions.
[0163] Figure 5A schematic diagram of an updateable privacy set intersection device based on a pre-calculation mode at a first user terminal side according to an embodiment of the present disclosure is shown. Figure 5 As shown, the privacy set intersection device on the first user side of the embodiment of the present disclosure may include:
[0164] In a possible implementation, the first private key generation module 50 is used to initialize public parameters and generate a first private key;
[0165] A filter initialization module 51, configured to initialize the first Bloom filter and the second Bloom filter according to the common parameters;
[0166] A first public key generating module 52, configured to determine a first public key based on the first private key and send the first public key to a second user terminal;
[0167] a polynomial receiving module 53, configured to receive a difference polynomial sent by the second user terminal, the difference polynomial being determined based on a second number of second private data in a second private data set corresponding to the second user terminal and a second number of second public keys of the second user terminal, the second number of second public keys being determined based on a second number of second private keys generated by the second user terminal based on public parameters;
[0168] A first key sending module 54 is used to determine a first shared key of each first private data in the first private data set corresponding to the first user terminal according to the difference polynomial, and send the first shared key to the second user terminal after inserting the first Bloom filter, so that the second user terminal calculates the intersection of the original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key;
[0169] A first set determination module 55, configured to determine, in response to the first user terminal updating the privacy data, that the updated privacy data set is a third privacy data set;
[0170] The second key sending module 56 is used to determine the first shared key of each third private data in the third private data set according to the difference polynomial, and send it to the second user end after inserting it into the second Bloom filter, so that the second user end can calculate the updated private data intersection according to the second Bloom filter and the second shared key.
[0171] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0172] In a possible implementation, the filter initialization module 51 is further configured to:
[0173] Initialize a first Bloom filter of a first length based on the first parameter, where the first length is determined according to a first amount of first privacy data included in the first privacy data set;
[0174] A second Bloom filter of a second length is initialized based on the first parameter, where the second length is determined according to a third amount of third privacy data included in the third privacy data set.
[0175] In a possible implementation, the first public key generation module 52 is further configured to:
[0176] According to the formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter;
[0177] Send the first public key to the second client.
[0178] In a possible implementation, the first key sending module 54 is further configured to:
[0179] According to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0180] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0181] In a possible implementation, the first key sending module 54 is further configured to:
[0182] According to the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function;
[0183] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0184] Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
[0185] In a possible implementation, the second key sending module 56 is further configured to:
[0186] According to the formula Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0187] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0188] In a possible implementation, the second key sending module 56 is further configured to:
[0189] According to the formula Calculate a first candidate key for each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function;
[0190] Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key;
[0191] The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
[0192] Figure 6 A schematic diagram of an updateable privacy set intersection device based on a pre-calculation mode at a second user terminal according to an embodiment of the present disclosure is shown. Figure 6 As shown, the privacy set intersection device on the second user side of the embodiment of the present disclosure may include:
[0193] A second private key generation module 60, configured to initialize public parameters and generate a second number of second private keys, where the second number is the number of second private data in the second private data set corresponding to the second user terminal;
[0194] A second public key generation module 61, configured to calculate a corresponding second public key according to each of the second private keys;
[0195] A key calculation module 62, configured to receive the first public key sent by the first user terminal, and calculate a corresponding second shared key according to the first public key and each of the second private keys;
[0196] A polynomial sending module 63, configured to calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal;
[0197] a filter receiving module 64, configured to receive a first Bloom filter and / or a second Bloom filter sent by the first user terminal, wherein the first Bloom filter includes a first number of first shared keys, and the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to the public parameters, the first shared key in the first Bloom filter is determined according to the difference polynomial and a first number of first privacy data in the first privacy data set, and the first shared key in the second Bloom filter is determined according to the difference polynomial and a third number of third privacy data in the third privacy data set;
[0198] A second set determination module 65, configured to determine an original private data set according to a first shared key included in the first Bloom filter and identical to the second shared key;
[0199] The third set determination module 66 is configured to determine an updated private data set according to a first shared key included in the second Bloom filter and which is the same as the second shared key.
[0200] In a possible implementation, the common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
[0201] In a possible implementation, the second public key generation module 61 is further configured to:
[0202] According to the formula Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B j is the second private key, p is the third parameter, and enc is the encoding function.
[0203] In a possible implementation, the key calculation module 62 is further configured to:
[0204] According to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter.
[0205] In a possible implementation, the key calculation module 62 is further configured to:
[0206] According to the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, and p is the third parameter;
[0207] The second candidate key is hashed using a second hash function to obtain a corresponding second shared key.
[0208] In a possible implementation, the polynomial sending module 63 is further configured to:
[0209] Calculate the ideal permutation of each of the second public keys as in is the second public key, Π -1 is the sixth parameter, f j is the ideal replacement result;
[0210] According to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
[0211] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0212] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0213] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0214] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0215] Figure 7 A schematic diagram of an electronic device 800 according to an embodiment of the present disclosure is shown. Electronic device 800. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0216] Reference Figure 7 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0217] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0218] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0219] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0220] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0221] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0222] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0223] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0224] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0225] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0226] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above method.
[0227] Figure 8 A schematic diagram of another electronic device 1900 according to an embodiment of the present disclosure is shown. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 8, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0228] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0229] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0230] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0231] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0232] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0233] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0234] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0235] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0236] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0237] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0238] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for finding intersection of updateable privacy sets based on a pre-calculation mode, applied to a first user terminal, characterized in that: The method comprises: Initialize public parameters and generate a first private key; Initialize the first Bloom filter and the second Bloom filter according to the common parameters; Determine a first public key based on the first private key and send the first public key to the second user terminal; receiving a difference polynomial sent by the second user terminal, the difference polynomial being determined based on a second number of second private data in a second private data set corresponding to the second user terminal and a second number of second public keys of the second user terminal, the second number of second public keys being determined based on a second number of second private keys generated by the second user terminal based on public parameters; Determine a first shared key for each first private data in the first private data set corresponding to the first user end according to the difference polynomial, insert the first Bloom filter into the first shared key, and send the first shared key to the second user end, so that the second user end calculates the intersection of the original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key; In response to the first user terminal updating the private data, determining that the updated private data set is a third private data set; A first shared key for each of the third private data in the third private data set is determined according to the difference polynomial, and is sent to the second user terminal after being inserted into the second Bloom filter, so that the second user terminal calculates and updates the intersection of the private data according to the second Bloom filter and the second shared key.
2. The method according to claim 1, characterized in that The common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
3. The method according to claim 2, characterized in that Initializing the first Bloom filter and the second Bloom filter according to the common parameters includes: Initialize a first Bloom filter of a first length based on the first parameter, where the first length is determined according to a first amount of first privacy data included in the first privacy data set; A second Bloom filter of a second length is initialized based on the first parameter, where the second length is determined according to a third amount of third privacy data included in the third privacy data set.
4. The method according to claim 2 or 3, characterized in that: The determining a first public key based on the first private key and sending the first public key to the second user terminal includes: According to the formula P A =g α mod p calculates the first public key, where P A is the first public key, g is the second parameter, α is the first private key, and p is the third parameter; Send the first public key to the second client.
5. The method according to any one of claims 2 to 4, characterized in that: The determining, according to the difference polynomial, a first shared key of each first private data in the first private data set corresponding to the first user terminal, inserting the first shared key into the first Bloom filter and sending the first shared key to the second user terminal includes: According to the formula Calculate a first shared key for each first private data in the first private data set corresponding to the first user terminal, where is the first shared key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function; Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
6. The method according to any one of claims 2 to 4, characterized in that: The determining, according to the difference polynomial, a first shared key of each first private data in the first private data set corresponding to the first user terminal, inserting the first shared key into the first Bloom filter and sending the first shared key to the second user terminal includes: According to the formula Calculate a first candidate key for each first private data in the first private data set corresponding to the first user terminal, where is the first candidate key of the first private data, α is the first private key, p is the third parameter, Π is the fifth parameter, x i is the first private data, P is the difference polynomial, and H represents the first hash function; Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key; Insert the first shared key of each first privacy data into the first Bloom filter and then send it to the second user terminal.
7. The method according to any one of claims 2 to 6, characterized in that: The determining, according to the difference polynomial, a first shared key for each of the third private data in the third private data set, inserting the first shared key into the second Bloom filter and sending the key to the second user terminal comprises: According to the formula Calculate a first shared key for each third private data in the third private data set corresponding to the first user terminal, where is the first shared key of the third private data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function; The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
8. The method according to any one of claims 2 to 6, characterized in that: The determining, according to the difference polynomial, a first shared key for each of the third private data in the third private data set, inserting the first shared key into the second Bloom filter and sending the key to the second user terminal comprises: According to the formula Calculate a first candidate key for each third private data in the third private data set corresponding to the first user terminal, where is the first candidate key of the third privacy data, α is the first private key, p is the third parameter, Π is the fifth parameter, u l is the third private data, P is the difference polynomial, and H represents the first hash function; Performing hash processing on the first candidate key by using a second hash function to obtain a corresponding first shared key; The first shared key of each of the third private data is inserted into the second Bloom filter and then sent to the second user terminal.
9. A method for finding intersection of updateable privacy sets based on a pre-calculation mode, applied to a second user terminal, characterized in that: The method comprises: Initialize public parameters and generate a second number of second private keys, where the second number is the number of second private data in the second private data set corresponding to the second user terminal; Calculate a corresponding second public key according to each of the second private keys; Receive a first public key sent by the first client, and calculate a corresponding second shared key according to the first public key and each of the second private keys; Calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal; Receive a first Bloom filter and / or a second Bloom filter sent by the first user terminal, the first Bloom filter includes a first number of first shared keys, the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to the public parameters, the first shared key in the first Bloom filter is determined according to the difference polynomial and a first number of first privacy data in the first privacy data set, and the first shared key in the second Bloom filter is determined according to the difference polynomial and a third number of third privacy data in the third privacy data set; Determine an original private data intersection according to a first shared key included in the first Bloom filter and the same as the second shared key; An updated private data intersection is determined according to a first shared key included in the second Bloom filter and identical to the second shared key.
10. The method according to claim 9, characterized in that The common parameters include a first parameter, a second parameter, a third parameter, a fourth parameter, a fifth parameter and a sixth parameter, the first parameter is a parameter of the first Bloom filter and / or the second Bloom filter, the second parameter is a generator, the third parameter is a prime number greater than 2, the fourth parameter is a finite field parameter, and the fifth parameter and the sixth parameter are ideal permutation parameters.
11. The method according to claim 10, characterized in that The calculating a corresponding second public key according to each of the second private keys includes: According to the formula Calculate the second public key corresponding to each second private key, where is the second public key, g is the second parameter, B j is the second private key, p is the third parameter, and enc is the encoding function.
12. The method according to claim 10 or 11, characterized in that: The calculating a corresponding second shared key according to the first public key and each of the second private keys includes: According to the formula Calculate the second shared key, where P A is the first public key, B j is the second private key, and p is the third parameter.
13. The method according to claim 10 or 11, characterized in that: The calculating a corresponding second shared key according to the first public key and each of the second private keys includes: According to the formula Calculate the second candidate key, where P A is the first public key, B j is the second private key, and p is the third parameter; The second candidate key is hashed using a second hash function to obtain a corresponding second shared key.
14. The method according to any one of claims 10 to 13, characterized in that: The calculating a difference polynomial according to each of the second public keys and the second privacy data set comprises: Calculate the ideal permutation of each of the second public keys as in is the second public key, Π -1 is the sixth parameter, f j is the ideal replacement result; According to the sequence Construct a difference polynomial P, where y j is the second private data in the second private data set, n c is the second quantity, f j This is the ideal replacement result.
15. An updateable privacy set intersection device based on a pre-calculation mode, applied to a first user terminal, characterized in that: The device comprises: A first private key generation module, used to initialize public parameters and generate a first private key; A filter initialization module, configured to initialize the first Bloom filter and the second Bloom filter according to the common parameters; A first public key generation module, used to determine a first public key based on the first private key and send the first public key to a second user terminal; a polynomial receiving module, configured to receive a difference polynomial sent by the second user terminal, the difference polynomial being determined based on a second number of second private data in a second private data set corresponding to the second user terminal and a second number of second public keys of the second user terminal, the second number of second public keys being determined based on a second number of second private keys generated by the second user terminal based on public parameters; A first key sending module, configured to determine a first shared key of each first private data in a first private data set corresponding to the first user terminal according to the difference polynomial, and send the first shared key to the second user terminal after inserting the first Bloom filter, so that the second user terminal calculates an intersection of original private data according to the first Bloom filter and the second shared key, and the second shared key is determined according to the second private key and the first public key; A first set determination module, configured to determine, in response to the first user terminal updating the privacy data, that the updated privacy data set is a third privacy data set; The second key sending module is used to determine the first shared key of each third private data in the third private data set according to the difference polynomial, and send it to the second user end after inserting it into the second Bloom filter, so that the second user end calculates and updates the intersection of private data according to the second Bloom filter and the second shared key.
16. An updateable privacy set intersection device based on a pre-calculation mode, applied to a second user terminal, characterized in that: The device comprises: A second private key generation module, used to initialize the public parameters and generate a second number of second private keys, where the second number is the number of second private data in the second private data set corresponding to the second user terminal; A second public key generation module, used to calculate a corresponding second public key according to each of the second private keys; A key calculation module, used for receiving the first public key sent by the first user terminal, and calculating a corresponding second shared key according to the first public key and each of the second private keys; a polynomial sending module, configured to calculate a difference polynomial according to each of the second public keys and the second private data set, and send the difference polynomial to the first user terminal; a filter receiving module, configured to receive a first Bloom filter and / or a second Bloom filter sent by the first user terminal, wherein the first Bloom filter includes a first number of first shared keys, and the second Bloom filter includes a third number of first shared keys, the first Bloom filter and the second Bloom filter are initialized by the first user terminal according to the public parameters, the first shared key in the first Bloom filter is determined according to the difference polynomial and a first number of first privacy data in the first privacy data set, and the first shared key in the second Bloom filter is determined according to the difference polynomial and a third number of third privacy data in the third privacy data set; A second set determination module, configured to determine an intersection of original private data sets according to a first shared key included in the first Bloom filter and identical to the second shared key; The third set determination module is used to determine the intersection of the updated privacy data set according to the first shared key included in the second Bloom filter and the same as the second shared key.
17. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 14 when executing the instructions stored in the memory.
18. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 14 is implemented.