Decentralized privacy-based intersection method, device, and electronic device based on blockchain
By using the combination technology of blockchain, commitment and OPPRF functions in the privacy request, the problems of statisticians committing evil deeds and participants maliciously expanding data in the centralized privacy request method are solved, and decentralized privacy request is achieved. Ensures the safety and accuracy of the results.
Patent Information
- Application Number
- CN202210513811.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-05-11
AI Technical Summary
The traditional method of privacy interrogation is centralized. Statisticians may commit evil, and participants may maliciously expand the data, which cannot guarantee the security of the results.
Adopt a decentralized privacy submission method based on blockchain, and each participant generates a commitment list and secret sharing value, and uses OPPRF functions and smart contracts for verification and calculation to ensure that all participants can safely conduct privacy submission results. Verification of the calculation.
Decentralized privacy requests are achieved, preventing statisticians from committing evil deeds and maliciously expanding data by participating parties, and ensuring the security of multi-party privacy calculations and the accuracy of results.
Smart Images

Figure CN114978493B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain and secure computing, and in particular to a decentralized privacy-enforcing method and device, and electronic equipment based on blockchain. Background Art
[0002] The traditional privacy intersection method is centralized, requiring a participant as the final data statistician to aggregate the results of the privacy intersection and then send them to other participants. If the statistician acts maliciously, the security of the results cannot be guaranteed. And the possibility of malicious expansion of the data of the participants cannot be avoided. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a decentralized privacy intersection method and device, and electronic device based on blockchain to solve the technical problems existing in the related technologies that statisticians may do evil and participants may maliciously expand data.
[0004] According to a first aspect of an embodiment of the present application, a decentralized privacy intersection method based on blockchain is provided, and each participant synchronously executes the method, and the method includes:
[0005] Each participant generates a commitment list for the sample set held by the participant and uploads it to the chain, which is used by the participant to verify whether other participants actually own the sample set through commitment;
[0006] A set of secret sharing values is randomly generated for each value in each sample set held by this participant;
[0007] Each participant generates a point set consisting of a sample set and secret sharing for all participants;
[0008] Based on the point set, each participant generates OPPRF functions for all participants respectively;
[0009] Each participant runs the OPPRF function between each other, and after the receiver verifies the commitment list, calculates the secret sharing set of all senders for each sample in the receiver's sample set;
[0010] Each participant generates a new point set based on its own sample set and secret sharing set;
[0011] Based on the new point set, a new OPPRF function is generated and the smart contract is called on the chain;
[0012] Call the smart contract to request the blockchain to initiate result calculation and obtain the result of the private intersection.
[0013] Furthermore, each participant generates a commitment list for the sample set held by the participant, including:
[0014] (1.1) Any party P among all the parties participating in the private intersection i , initiate a request to the blockchain and publish the smart contract to the blockchain;
[0015] (1.2) Receive notification from the blockchain that all parties have started to execute the privacy request;
[0016] (1.3) All participants P i Generate commitment list cmList i .
[0017] Furthermore, all participants P i Generate commitment list cmList i ,include:
[0018] (1.3.1)P i For the sample set X held by this participant i Each sample in and a blinding factor r randomly generated based on the sample data to generate a commitment
[0019] (1.3.2) The sample set X i All Combine to form a promise list cmList i ;
[0020] (1.3.3) Call the relevant functions of the smart contract and cmList i As public information, it is stored on the chain. After that, all participants can call the smart contract to obtain cmList from the chain. i .
[0021] Furthermore, each participant runs the OPPRF function between each other, and after the receiver verifies the commitment list, the secret sharing set of all senders for each sample in the receiver's sample set is calculated, including:
[0022] (2.3.1) Receiver P j To all other participants P i Get the OPPRF function F i,j , and call the smart contract to obtain P from the chain i The promise list cmList i ;
[0023] (2.3.2)P j Through zero-knowledge proof π, without disclosing P i In the case of sample data and blinding factor r, it is proved that P i With this data, you can Function gets cm;
[0024] (2.3.3) Each sample Enter F i,j In the example above, we get n-1 senders P. i The secret sharing value or random numbers;
[0025] (2.3.4) The function F i,j The output of the secret is shared with the receiver (a total of n data) are XORed to obtain the receiver's sample-based The secret sharing value
[0026] Furthermore, the blockchain is requested to initiate result calculation and obtain the result of the privacy intersection, including:
[0027] (3.4.1) Any participant P who wants to initiate the result calculation i Make a request to the blockchain and publish the smart contract to the blockchain;
[0028] (3.4.2) Call the smart contract and obtain the other n-1 participants P from the chain j F j ;
[0029] (3.4.3) Through the relevant functions of the smart contract, each sample of this participant Enter F j In the above example, the secret sharing value of the corresponding participant is obtained. or random numbers;
[0030] (3.4.4) Share the output of the function with the secret value of this participant XOR, if the result is equal to 0, then the sample It is the result of seeking privacy, otherwise it is not;
[0031] (3.4.5) Loop through (3.4.3) to (3.4.4) until the sample set X i Each sample data in is calculated and the final privacy intersection result set is obtained.
[0032] According to a second aspect of an embodiment of the present application, a decentralized privacy exchange device based on blockchain is provided, comprising:
[0033] The first generation module is used for each participant to generate a commitment list for the sample set held by the participant and upload it to the chain, so that the participant can verify whether other participants actually own the sample set through commitment;
[0034] The second generation module is used to randomly generate a set of secret sharing values for each value in each sample set held by the participant;
[0035] The third generation module is used for each participant to generate a point set consisting of a sample set and secret sharing for all participants;
[0036] A fourth generation module is used to generate OPPRF functions for all participants respectively according to the point set by each participant;
[0037] A verification calculation module is used for running the OPPRF function between each participant, and after the receiving party verifies the commitment list, the secret sharing set of all senders for each sample in the receiving party's sample set is calculated;
[0038] The fifth generation module is used for each participant to generate a new point set based on the sample set and secret sharing set of the participant;
[0039] The sixth generation module is used to generate a new OPPRF function based on the new point set and call the smart contract on the chain;
[0040] The calculation module is used to call the smart contract, request the blockchain to initiate result calculation, and obtain the result of the privacy intersection.
[0041] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:
[0042] one or more processors;
[0043] A memory for storing one or more programs;
[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.
[0045] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0046] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0047] As can be seen from the above embodiments, this application uses the technical means of blockchain, commitment and zero-knowledge proof to solve the problem that in the traditional centralized privacy intersection method, the statistician may do evil and the participants may maliciously expand the data. That is, it ensures that all participants cannot construct false data to participate in multi-party privacy calculations, and all participants can verify the privacy intersection results. The present invention can solve the drawbacks of the traditional centralized privacy intersection method and realize a decentralized privacy intersection method based on blockchain.
[0048] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 The present invention is a flowchart of a decentralized privacy intersection method based on blockchain according to an exemplary embodiment.
[0051] Figure 2 It is a structural diagram of a decentralized privacy exchange device based on blockchain according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0053] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0054] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0055] Figure 1 is a flowchart of a decentralized privacy intersection method based on blockchain according to an exemplary embodiment. Figure 1 As shown, each participant synchronously executes the method, which includes:
[0056] Step S11, each participant generates a commitment list for the sample set held by the participant and uploads it to the chain, so that the participant can verify whether other participants actually own the sample set through commitment;
[0057] Step S12, randomly generating a set of secret sharing values for each value in each sample set held by the participant;
[0058] Step S13, each participant generates a point set consisting of a sample set and secret sharing for all participants;
[0059] Step S14, based on the point set, each participant generates an OPPRF function for all participants respectively;
[0060] Step S15, each participant runs the OPPRF function between each other, and after the receiving party verifies the commitment list, calculates the secret sharing set of all senders for each sample in the receiving party's sample set;
[0061] Step S16, each participant generates a new point set based on the sample set and secret sharing set of the participant;
[0062] Step S17, based on the new point set, generate a new OPPRF function and call the smart contract on the chain;
[0063] Step S18, calling the smart contract, requesting the blockchain to initiate result calculation, and obtaining the result of the privacy intersection.
[0064] As can be seen from the above embodiments, this application uses blockchain, commitment and zero-knowledge proof technology to solve the problem that the statistician may do evil and the participants may maliciously expand the data in the traditional centralized privacy intersection method. The present invention can solve the drawbacks of the traditional centralized privacy intersection method, ensure that all participants cannot construct false data to participate in multi-party privacy computing, and all participants can verify the privacy intersection results.
[0065] In the specific implementation of step S11, each participant generates a commitment list for the sample set held by the participant and uploads it to the chain, so that the participant can verify whether other participants actually own the sample set through commitment; this step may include the following sub-steps:
[0066] Step S111: any party P among all the parties participating in the privacy exchange request i , initiate a request to the blockchain and publish the smart contract to the blockchain;
[0067] Specifically, the blockchain acts as the controller, and any participant who wants to participate in the private intersection calculation must call the smart contract before the calculation starts and submit a request to initiate the calculation to the blockchain, so that the smart contract triggers an event to notify all participants who are listening to the event, thereby achieving the purpose of notifying all other participants to start the private intersection calculation.
[0068] Step S112, receiving a notification from the blockchain notifying all parties to start executing the privacy request;
[0069] Specifically, the blockchain notifies all participants to start privacy computing, and each step of the subsequent computing process is recorded on the blockchain to ensure that the entire multi-party privacy intersection process is secure and auditable to prevent denial.
[0070] Step S113, all participants P i Generate commitment list cmList i Specifically, this step may include the following sub-steps:
[0071] Step S1131, P i For the sample set X held by this participant i Each sample in and a blinding factor r randomly generated based on the sample data to generate a commitment
[0072] Specifically, P i As the committed party, the sample set X held by this participant i Each sample in As message m, select a random number r as the blinding factor and generate a commitment for each sample The commitment scheme is hidden and binding. The commitment value will not leak any information about the message m, and any malicious committer cannot open the commitment to a message other than m and pass the verification. That is, the receiver can be sure that m is the message corresponding to the commitment. i It can declare to other participants that the participant actually owns the data of message m. The commitment technology here can be implemented by Pedersen commitment, but it is not limited to being implemented by this technology.
[0073] Step S1132: Set the sample set X i All Combine to form a promise list cmList i ;
[0074] Specifically, this step combines all the commitments in the sample set into a list, which is convenient for other participants to open the commitments later and verify the entire sample set data of the participants to whom the commitment list belongs.
[0075] Step S1133, call the relevant function of the smart contract and convert cmList i As public information, it is stored on the chain. After that, all participants can call the smart contract to obtain cmList from the chain. i .
[0076] Specifically, by calling the storage function of the smart contract, the commitment list is stored in the contract state of the smart contract. In the subsequent calculation steps, other participants can directly call the acquisition function of the smart contract to obtain the commitment list. Using blockchain smart contracts to store this information also facilitates auditing after the privacy intersection calculation is completed.
[0077] In the specific implementation of step S12, a set of secret sharing values is randomly generated for each value in each sample set held by the participant;
[0078] Specifically, each participant uses secret sharing technology to split each sample value in the sample set, and the XOR result of these secret sharing values is zero. Using this technology in this step can avoid exposing the real sample data of the participant during the calculation process, and using these secret sharing values with XOR values of zero to participate in the subsequent privacy intersection calculation is the prerequisite for calculating the intersection result of multi-party privacy intersection.
[0079] In the specific implementation of step S13, each participant generates a point set consisting of a sample set and a secret sharing for all participants;
[0080] Specifically, the point set The OPPRF function in step S14 can be constructed using this point set.
[0081] In the specific implementation of step S14, each participant generates an OPPRF function for all participants respectively according to the point set;
[0082] Specifically, let F = {G(x1) = y1, G(x2) = y2, ..., G(x k )=y k , G(else) = random} is defined on the point set Z = {(x1, y1), (x2, y2), ..., (x k ,y k )}, which can realize the following functions: for each set of points (x k ,y k ) establishes a mapping relationship G(x k )=y k , establish a mapping relationship G(else) = random for other data not in Z. For any input data set X = {x1, x2, ..., xj}, F will return the corresponding OPPRF result for each input in X. This function can be constructed by cuckoo hashing, obfuscated circuits, etc.
[0083] In the specific implementation of step S15, each participant runs the OPPRF function between each other, and after the receiving party verifies the commitment list, the secret sharing set of all senders for each sample in the receiving party's sample set is calculated; this step may include the following sub-steps:
[0084] Step S151, the receiver P j To all other participants P i Get the OPPRF function F i,j , and call the smart contract to obtain P from the chain i The promise list cmList i ;
[0085] Specifically, the receiver P j Obtain the OPPRF function and commitment list of all other participants, because this function and commitment list are needed in the calculation of subsequent steps S152, S153, and S154.
[0086] Step S152, P j Through zero-knowledge proof π, without disclosing P i In the case of sample data and blinding factor r, it is proved that P i With this data, you can The function obtains cm. Through commitment, each participant can confirm that the data of other participants in the privacy intersection calculation are real and there is no malicious expansion of data;
[0087] Specifically, the zero-knowledge proof π proves the following proposition: Without disclosing the message m and the blinding factor r, it is proved that the participant has the id and r of this data, so that cm:=COMM r (m). Through the mechanism of zero-knowledge proof plus commitment, each participant can confirm that the data of other participants participating in the privacy intersection calculation are real and there is no malicious expansion of data without exposing the data of other participants.
[0088] Step S153: each sample Enter F i,j In the example above, we get n-1 senders P. i The secret sharing value or random numbers;
[0089] Specifically, the receiver P j The receiver's sample set X j Each sample in As input value, the input is sent by the sender P i For the receiver P j Constructed OPPRF function F i,j If the sender P i With this input data, the output obtained is the sender P i The secret sharing value Otherwise, it is a random value. Through such operation, the following effect can be achieved: the receiver does not know whether the receiver obtains a real secret sharing value or a random value, and the sender does not know whether the receiver has this sample. The output of the function will be used by the receiver for calculation in step S154.
[0090] Step S154: Share the output of the function with the recipient's secret value (a total of n data) are XORed to obtain the receiver's sample-based The secret sharing value
[0091] Specifically, the sample-based The secret sharing value It will be used as an element of the set in step S16.
[0092] In the specific implementation of step S16, each participant generates a new point set Z for its own sample set and secret sharing set. j ;
[0093] Specifically, each participant P j Sample collection for this participant and secret sharing collection Generate a new point set In step S17, the point set Z needs to be used j Generate a new OPPRF function.
[0094] In the specific implementation of step S17, according to the new point set Z j , generate a new OPPRF function F j And call the smart contract to the chain;
[0095] Specifically, the new OPPRF function F j The generation process of is similar to step S14 and will not be repeated here. In the process of calling the smart contract on-chain, it is necessary to call the OPPRF on-chain storage function of the smart contract and pass OPPRF as a parameter to the smart contract. j On-chain storage.
[0096] In the specific implementation of step S18, the smart contract is called to request the blockchain to initiate result calculation and obtain the result of the privacy intersection. This step may include the following sub-steps:
[0097] Step S181: Any participant P who wants to initiate result calculation i Call the smart contract to make a request to the blockchain;
[0098] Specifically, any participant can call a smart contract to send a request to the blockchain. By calling the smart contract, data can be obtained from the chain to calculate the result of the privacy intersection. The traditional centralized privacy intersection method requires the statistician to calculate the result of the privacy intersection and then send the result to other participants. Compared with the traditional method, the privacy intersection method proposed in this patent realizes decentralization. Any participant can initiate a request to the blockchain and calculate the result. At the same time, the participant who wants to calculate the result must first initiate a request to the blockchain, and the blockchain, as the controller, records this operation to facilitate subsequent audits.
[0099] Step S182, call the smart contract and obtain the other n-1 participants P from the chain j F j ;
[0100] Specifically, the participant P i Call the smart contract to obtain the other n-1 participants P j F j , used for calculation in step S183.
[0101] Step S183, through the relevant functions of the smart contract, each sample of this participant Enter F j In the above example, the secret sharing value of the corresponding participant is obtained. or random numbers;
[0102] Specifically, the participant P i By calling n-1 execution OPPRF functions F in the smart contract j The correlation function of each sample of this participant Enter the function as a parameter and get the result.
[0103] Step S184: Share the output of the function with the secret value of the participant XOR, if the result is equal to 0, then the sample It is the result of seeking privacy, otherwise it is not;
[0104] Specifically, for each sample of this participant Share the output of n-1 functions with the secret value of this participant XOR: If all participants have the sample, since the XOR value between the secret sharing values when each sample is split into secret sharing values is 0, the XOR result must be 0, so the sample It is the result of seeking privacy, otherwise it is not.
[0105] Step S185, loop through steps S183 to S184 until the sample set X i Each sample data in is calculated and the final privacy intersection result set is obtained.
[0106] Specifically, for the sample set X i Repeat the calculation from step S183 to step S184 for each sample data in to obtain the result of whether the sample is a privacy intersection. All the results are combined into a result set to obtain the final result of the privacy intersection.
[0107] Corresponding to the aforementioned embodiment of the decentralized privacy intersection method based on blockchain, the present application also provides an embodiment of a decentralized privacy intersection device based on blockchain.
[0108] Figure 2 is a block diagram of a decentralized privacy-enforcing device based on blockchain according to an exemplary embodiment. Figure 2 , the device comprises:
[0109] The first generation module 11 is used for each participant to generate a commitment list for the sample set held by the participant and upload it to the chain, so that the participant can verify whether other participants actually own the sample set through commitment;
[0110] The second generating module 12 is used to randomly generate a set of secret sharing values for each value in each sample set held by the participant;
[0111] The third generation module 13 is used for each participant to generate a point set consisting of a sample set and secret sharing for all participants;
[0112] The fourth generating module 14 is used for generating OPPRF functions for all participants respectively according to the point set by each participant;
[0113] The verification calculation module 15 is used to run the OPPRF function between each participant, and after the receiving party verifies the commitment list, calculate the secret sharing set of all senders for each sample in the receiving party's sample set;
[0114] A fifth generating module 16, configured for each participant to generate a new point set for the sample set and secret sharing set of the participant;
[0115] The sixth generation module 17 is used to generate a new OPPRF function according to the new point set and call the smart contract on the chain;
[0116] The calculation module 18 is used to call the smart contract, request the blockchain to initiate result calculation, and obtain the result of the privacy intersection.
[0117] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0118] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0119] Correspondingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the decentralized privacy intersection method based on blockchain as described above.
[0120] Correspondingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, characterized in that when the instructions are executed by a processor, the decentralized privacy intersection method based on blockchain as described above is implemented.
[0121] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0122] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A decentralized privacy intersection method based on blockchain, characterized in that: Each participant synchronously executes the method, which includes: Each participant generates a commitment list for the sample set held by the participant and uploads it to the chain, so that other participants can verify through commitment whether other participants actually own the sample set; A set of secret sharing values is randomly generated for each value in each sample set held by this participant; Each participant generates a point set consisting of a sample set and secret sharing for all participants; Based on the point set, each participant generates OPPRF functions for all participants respectively; Each participant runs the OPPRF function between each other, and after the receiver verifies the commitment list, calculates the secret sharing set of all senders for each sample in the receiver's sample set; Each participant generates a new point set based on its own sample set and secret sharing set; Based on the new point set, a new OPPRF function is generated and the smart contract is called on the chain; Call the smart contract, request the blockchain to initiate result calculation, and obtain the result of the private intersection.
2. According to a blockchain-based decentralized privacy intersection method according to claim 1, it is characterized in that: Each participant generates a commitment list for the sample set held by the participant, including: (1.1) Any party P among all the parties participating in the private intersection i , initiate a request to the blockchain and publish the smart contract to the blockchain; (1.2) Receive notification from the blockchain that all parties have started to execute the privacy request; (1.3) All participants P i Generate commitment list cmList i .
3. The method according to claim 2, characterized in that All participants P i Generate commitment list cmList i ,include: (1.3.1)P i For the sample set X held by this participant i Each sample in and a blinding factor r randomly generated based on the sample data to generate a commitment (1.3.2) The sample set X i All Combine to form a promise list cmList i ; (1.3.3) Call the relevant functions of the smart contract and cmList i As public information, it is stored on the chain. After that, all participants can call the smart contract to obtain cmList from the chain. i .
4. The method according to claim 1, characterized in that: Each participant runs the OPPRF function between each other. After the receiver verifies the commitment list, the secret sharing set of all senders for each sample in the receiver's sample set is calculated, including: (2.3.1) Receiver P j To all other participants P i Get the OPPRF function F i,j , and call the smart contract to obtain P from the chain i The promise list cmList i ; (2.3.2)P j Through zero-knowledge proof π, without disclosing P i In the case of sample data and blinding factor r, it is proved that P i With this data, you can Function gets cm; (2.3.3) The receiver sends each sample Enter F i,j In the example above, we get n-1 senders P. i The secret sharing value or random numbers; (2.3.4) The receiver shares the output of the function with the receiver’s secret (a total of n data) are XORed to obtain the receiver P j Based on the sample The secret sharing value 5. According to a blockchain-based decentralized privacy intersection method according to claim 1, it is characterized in that: Request the blockchain to initiate result calculation and obtain the result of the privacy intersection, including: (3.4.1) Any participant P who wants to initiate the result calculation i Make a request to the blockchain; (3.4.2) Call the smart contract and obtain the other n-1 participants P from the chain j F j ; (3.4.3) Through the relevant functions of the smart contract, each sample of this participant Enter F j In the above example, the secret sharing value of the corresponding participant is obtained. or random numbers; (3.4.4) Share the output of the function with the secret value of this participant XOR, if the result is equal to 0, then the sample It is the result of seeking privacy, otherwise it is not; (3.4.5) Loop through (3.4.3) to (3.4.4) until the sample set X i Each sample data in is calculated and the final privacy intersection result set is obtained.
6. A decentralized privacy-enforcing device based on blockchain, characterized in that: include: The first generation module is used for each participant to generate a commitment list for the sample set held by the participant and upload it to the chain, so that the participant can verify whether other participants actually own the sample set through commitment; The second generation module is used to randomly generate a set of secret sharing values for each value in each sample set held by the participant; The third generation module is used for each participant to generate a point set consisting of a sample set and secret sharing for all participants; A fourth generation module is used to generate OPPRF functions for all participants respectively according to the point set by each participant; A verification calculation module is used for running the OPPRF function between each participant, and after the receiving party verifies the commitment list, the secret sharing set of all senders for each sample in the receiving party's sample set is calculated; The fifth generation module is used for each participant to generate a new point set based on the sample set and secret sharing set of the participant; The sixth generation module is used to generate a new OPPRF function based on the new point set and call the smart contract on the chain; The calculation module is used to call the smart contract, request the blockchain to initiate result calculation, and obtain the result of the privacy intersection.
7. The device according to claim 6, characterized in that Each participant runs the OPPRF function between each other. After the receiver verifies the commitment list, the secret sharing set of all senders for each sample in the receiver's sample set is calculated, including: (2.3.1) Receiver P j To all other participants P i Get the OPPRF function F i,j , and call the smart contract to obtain P from the chain i The promise list cmList i ; (2.3.2)P j Through zero-knowledge proof π, without disclosing P i In the case of sample data and blinding factor r, it is proved that P i With this data, you can Function gets cm; (2.3.3) Each sample Enter F i,j In the example above, we get n-1 senders P. i The secret sharing value or random numbers; (2.3.4) Share the output of the function with the recipient’s secret value (a total of n data) are XORed to obtain the receiver's sample-based The secret sharing value 8. The device according to claim 6, characterized in that Request the blockchain to initiate result calculation and obtain the result of the privacy intersection, including: (3.4.1) Any participant P who wants to initiate the result calculation i Make a request to the blockchain; (3.4.2) Call the smart contract and obtain the other n-1 participants P from the chain j F j ; (3.4.3) Through the relevant functions of the smart contract, each sample of this participant Enter F j In the above example, the secret sharing value of the corresponding participant is obtained. or random numbers; (3.4.4) Share the output of the function with the secret value of this participant XOR, if the result is equal to 0, then the sample It is the result of seeking privacy, otherwise it is not; (3.4.5) Loop through (3.4.3) to (3.4.4) until the sample set X i Each sample data in is calculated and the final privacy intersection result set is obtained.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
