Multi-party privacy intersection method and device based on block chain, and electronic equipment
Through the combination of blockchain contract events and ECDH-PSI algorithm, a pair-two-packet parallel interception mechanism is adopted to solve the problem of low efficiency of multi-party privacy interception methods, and efficient and secure multi-party data intersection calculation is achieved.
Patent Information
- Application Number
- CN202510533065.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
The processing efficiency of multi-party privacy interrogation methods in the prior art is low, especially in large-scale multi-party interrogation scenarios, the efficiency has dropped sharply, and the data processing capabilities of the participants cannot be fully utilized, and the communication delay and computing complexity are high.
The two-two-packet parallel interception mechanism based on blockchain is adopted, and the encrypted data set upload and privacy interception operations are automatically triggered through blockchain contract events. The ECDH-PSI algorithm is used for data encryption and privacy interception, so as to achieve efficient parallel processing between the registrant and the listener.
It significantly reduces the number of data interactions and overall computing time, improves the processing efficiency of multi-party privacy requests, ensures data security and integrity, simplifies the operation process, and makes full use of the data processing capabilities of participants.
Smart Images

Figure CN120449202A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and more specifically, to a method for multi-party privacy intersection based on blockchain, a device for multi-party privacy intersection based on blockchain, a computer-readable storage medium, and an electronic device. Background Art
[0002] Multi-party private intersection extends the concept of private set intersection to multi-party scenarios. It primarily addresses the problem of efficiently computing the intersection of datasets among multiple untrusted or semi-trusted parties while protecting their own data privacy. In traditional data sharing or comparison, participants typically need to exchange data directly, which poses serious privacy risks when sensitive information (such as personal identity, financial data, and health records) is involved. Multi-party private intersection allows all parties to identify common elements in a dataset without directly revealing the dataset's contents, thereby protecting data privacy.
[0003] Existing techniques use Elliptic Curve Diffie-Hellman (ECDH) and Private Set Intersection (PSI) to calculate the intersection of two or more sets without revealing their respective private sets. However, these techniques employ a serial intersection method, requiring each intersection result to be communicated from one participant to the next. This results in cumulative communication delays and significantly increases the overall time consumption. Furthermore, serial intersection does not allow simultaneous intersection operations between different participants. Even if some participants have strong data processing capabilities, their resources cannot be fully utilized, resulting in a failure to maximize the overall processing capacity of the system. In serial intersection, the total number of intersection rounds increases linearly with the number of participants, meaning that the complexity and time required for the entire process increase linearly. For large-scale multi-party intersection scenarios, the efficiency of this method decreases dramatically. In summary, the processing efficiency of existing multi-party private intersection methods needs to be improved. Summary of the Invention
[0004] The main purpose of this application is to provide a blockchain-based multi-party privacy intersection method, a blockchain-based multi-party privacy intersection device, a computer-readable storage medium and an electronic device, so as to at least solve the problem of low processing efficiency of the multi-party privacy intersection method in the prior art.
[0005] To achieve the above-mentioned objectives, according to one aspect of the present application, a method for multi-party privacy intersection based on blockchain is provided, comprising: determining a registrant and a listener among multiple participants based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of the participants includes one registrant and one listener; each of the participants uploads an encrypted data set to the blockchain, and while the data set is uploaded to the blockchain, the registrant registers a blockchain contract event, wherein the encrypted data set of each participant is obtained based on a private key generated by the participant and the data set of the participant; the listener listens to the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, performing a privacy intersection operation between any group of the listeners and the registrants to obtain multiple privacy intersection results, and obtaining a multi-party privacy intersection result at least based on the multiple privacy intersection results, wherein the on-chain information includes a key value.
[0006] Optionally, the monitoring party monitors the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, and performs a privacy intersection operation between any group of monitoring parties and the registrant to obtain multiple privacy intersection results, including: any group of monitoring parties uses the generated private key to encrypt the encrypted data set of the registrant in the same group to obtain a secondary encrypted data set of the registrant; any group of registrants uses the generated private key to encrypt the encrypted data set of the monitoring party in the same group to obtain a secondary encrypted data set of the monitoring party; and performs a preliminary privacy intersection operation on the secondary encrypted data set of the registrant in each group and the secondary encrypted data set of the monitoring party to obtain multiple privacy intersection results.
[0007] Optionally, a multi-party private intersection result is obtained based on at least a plurality of the private intersection results, including: performing a first round of private intersection operations between the plurality of private intersection results in pairs to obtain a first-level intersection result; using the i-th level intersection result as input for the i+1-th round of private intersection operations, until the number of the m-th level intersection results reaches one, and performing pairwise intersection operations on the intersection results at each level, 1≤i≤m; when the total number of the participating parties is an even number, determining the m-th level intersection result as the multi-party private intersection result; when the total number of the participating parties is an odd number, performing the m+1-th round of private intersection operations on the m-th level intersection result and ungrouped participating parties to obtain the multi-party private intersection result.
[0008] Optionally, the intersection result of the i-th level is used as the input of the i+1-th round of private intersection operation until the number of the intersection results of the m-th level is one, and the intersection results of each level are intersected with each other, 1≤i≤m, including: the intersection results of each level are encrypted with each other using their respective private keys, wherein the private key of the intersection result of each level is generated by any participant participating in the calculation of the intersection result of each level; and the encrypted intersection results of each level are intersected with each other until the number of the intersection results of the m-th level is one.
[0009] Optionally, when the total number of the participants is an odd number, the m-th level intersection result is subjected to the m+1-th round of private intersection operation with the ungrouped participants to obtain the multi-party private intersection result, including: when the total number of the participants is an odd number, encrypting the m-th level intersection result using the private key generated by the ungrouped participants to obtain the encrypted m-th level intersection result; encrypting the ungrouped participants using the private key of the m-th level intersection result to obtain the encrypted ungrouped participants, wherein the private key of the m-th level intersection result is generated by any one of all the participants participating in the m-th round of private intersection operation; performing the m+1-th round of private intersection operation on the encrypted m-th level intersection result and the encrypted ungrouped participants to obtain the multi-party private intersection result.
[0010] Optionally, before each of the participants uploads the encrypted data set to the blockchain and the registrant registers the blockchain contract event, the method further includes: all of the participants determine an elliptic curve with shared parameters; mapping each element of the data set of each of the participants to the elliptic curve to obtain a set of data points of each of the participants; and using the private key generated by each of the participants to encrypt the data point set corresponding to the participant respectively to obtain an encrypted data set of each of the participants.
[0011] Optionally, the registrants and the listeners among the multiple participants are determined based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of the participants includes one registrant and one listener, including: randomly grouping the multiple participants in pairs to obtain multiple groups; when the total number of the participants is an even number, determining the registrants and the listeners in each of the groups; when the total number of the participants is an odd number, determining the registrants and the listeners in each of the groups except for the last ungrouped participant, wherein the registrants and the listeners in each of the groups perform the privacy intersection operation simultaneously.
[0012] According to another aspect of the present application, a device for multi-party private intersection based on blockchain is provided, comprising: a first determination unit, configured to determine a registrant and a listener among a plurality of participants based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of the participants includes one registrant and one listener; an uploading unit, configured to enable each of the participants to upload an encrypted data set to the blockchain, and the registrant to register a blockchain contract event while the data set is uploaded to the blockchain, wherein the encrypted data set of each participant is obtained based on a private key generated by the participant and the data set of the participant; a private intersection unit, configured to enable the listener to monitor the uploaded information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, perform a private intersection operation between any group of the listeners and the registrants to obtain multiple private intersection results, and obtain a multi-party private intersection result at least based on the multiple private intersection results, wherein the uploaded information includes a key value.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute any one of the blockchain-based multi-party privacy intersection methods.
[0014] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the blockchain-based multi-party privacy intersection methods.
[0015] By applying the technical solution of the present application, a registrant and a listener among multiple participants are determined based on a pairwise parallel intersection mechanism, wherein any participant is a registrant or a listener, and a group of participants includes a registrant and a listener; each participant uploads an encrypted data set to the blockchain, and the registrant registers a blockchain contract event at the same time as the data set is uploaded to the blockchain, wherein the encrypted data set of each participant is obtained based on the private key generated by the participant and the data set of the participant; the listener listens to the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, and a privacy intersection operation is performed between any group of listeners and registrants to obtain multiple privacy intersection results, and a multi-party privacy intersection result is obtained at least based on the multiple privacy intersection results, wherein the on-chain information includes a key value. In this scheme, the registrant and the monitor are determined in advance through a pairwise parallel intersection mechanism, so that the monitor will know the registrant as soon as it goes on the chain, realizing efficient parallel processing of the intersection operation, significantly reducing the number of data interactions and the overall operation time. Each participant uploads the encrypted data set to the blockchain and registers the blockchain contract event at the same time as the chain is uploaded. The monitor obtains the encrypted data set of the registrants in the same group based on the chain information of the contract event. The private intersection operation is performed between any group of monitors and registrants until the common intersection of all participants is obtained, that is, the multi-party private intersection result is obtained, thereby solving the problem of low processing efficiency of the multi-party private intersection method in the existing technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for executing a multi-party privacy intersection method based on blockchain provided in an embodiment of the present application is shown;
[0018] Figure 2 A flowchart of a multi-party privacy intersection method based on blockchain provided in accordance with an embodiment of the present application is shown;
[0019] Figure 3 A schematic diagram of a privacy intersection method for multi-party privacy intersection based on blockchain provided in accordance with an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram illustrating an example of a blockchain contract event according to a blockchain-based multi-party privacy intersection method provided in an embodiment of the present application is shown;
[0021] Figure 5 A structural block diagram of a multi-party privacy intersection device based on blockchain provided according to an embodiment of the present application is shown.
[0022] The above drawings include the following reference numerals:
[0023] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] As introduced in the background technology, the efficiency of the multi-party privacy intersection scheme in the existing technology drops sharply in large-scale multi-party intersection scenarios. In order to solve the problem of low processing efficiency of the multi-party privacy intersection method in the existing technology, the embodiments of the present application provide a blockchain-based multi-party privacy intersection method, a blockchain-based multi-party privacy intersection device, a computer-readable storage medium and an electronic device.
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure diagram of a mobile terminal for a multi-party privacy intersection method based on blockchain according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0030] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the device information display method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a method for multi-party privacy intersection based on blockchain, which runs on a mobile terminal, a computer terminal, or a similar computing device, is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] Figure 2This is a flowchart of a multi-party privacy intersection method based on blockchain according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:
[0033] Step S201: determining a registrant and a listener among a plurality of participants based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of participants includes one registrant and one listener;
[0034] Specifically, the pairwise parallel intersection mechanism means that during the privacy intersection process, all participants are divided into multiple groups, each group containing two participants. This mechanism enables these groups to perform their respective privacy set intersection operations simultaneously, that is, parallel processing, thereby improving processing speed and efficiency. In each group, the two participants play the roles of the registrant and the listener respectively, and any participant can act as a registrant or a listener. A group of the above-mentioned participants refers to the two grouped participants, and these two participants constitute an intersection unit. This grouping method ensures that each privacy intersection operation involves only two participants, simplifying the computational complexity. In short, step S201 provides a basis for efficient parallel processing of multi-party privacy intersection by adopting the pairwise parallel intersection mechanism and clarifying the registrant and the listener in each group of participants, thereby improving data processing speed.
[0035] In step S202, each of the above-mentioned participants uploads the encrypted dataset to the blockchain, and the registrant registers the blockchain contract event at the same time as the upload. The encrypted dataset of each of the above-mentioned participants is obtained based on the private key generated by the above-mentioned participant and the dataset of the above-mentioned participant;
[0036] Specifically, blockchain is a distributed database technology characterized by data stored in blocks, linked together through cryptographic techniques to form a chain. Each block contains a certain amount of transaction information, and each new block is linked to the previous block according to a specific algorithm, forming an immutable data chain. Blockchain is essentially a decentralized database, where data is stored and maintained distributed across the network, rather than centrally stored on a single server.
[0037] Each participant first uses the private key generated by itself to encrypt the data set it holds. An encrypted data set refers to a data set that has been encrypted using the elliptic curve protocol, ensuring that even in an insecure network environment, the data can be effectively protected and will not be stolen or tampered with by unauthorized third parties. When a participant uploads the encrypted data set to the blockchain, it simultaneously registers a blockchain contract event. A blockchain contract event is a smart contract function that, once set, will automatically trigger when specific conditions are met without the need for human intervention. In this embodiment, the completion of the chain upload is considered one of the triggering conditions. Through step S202, each participant uploads the encrypted data set encrypted based on the private key to the blockchain, and the registrant triggers the blockchain contract event at the same time as the chain upload, realizing the combination of secure data transmission and automated retrieval, which not only ensures the confidentiality and integrity of data in the process of multi-party privacy exchange, but also greatly improves the efficiency of data interaction and processing, and simplifies the operation process.
[0038] In step S203, the monitoring party monitors the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group. A privacy intersection operation is performed between any group of the monitoring party and the registrant to obtain multiple privacy intersection results. A multi-party privacy intersection result is obtained based on at least multiple privacy intersection results, wherein the on-chain information includes a key value.
[0039] Specifically, the monitoring party continuously monitors blockchain contract events on the blockchain. Blockchain contract events are triggered by the registrant after the data is successfully uploaded to the blockchain. When the monitoring party detects the triggering of the relevant event, it knows that the registrant has uploaded the encrypted dataset to the blockchain. The monitoring party can use the key value in the blockchain contract event's uploaded information to locate and retrieve the corresponding encrypted dataset on the blockchain. The key value can be the identifier of the encrypted dataset or a specific parameter used to retrieve the encrypted dataset, ensuring that the monitoring party can accurately obtain the registrant's encrypted dataset. Once the monitoring party obtains the registrant's encrypted dataset, the monitoring party and the registrant perform a private intersection operation. Because the entire intersection process is performed in parallel on a pairwise basis, each pair of registrants and monitoring parties produces a private intersection result. Performing the private intersection operation simultaneously on multiple such pairs will ultimately produce multiple private intersection results. These private intersection results are then iterated to obtain a multi-party private intersection result, which is the intersection of all participating parties' datasets. The multi-party private intersection result reflects the data elements shared by all participating parties without requiring any party to expose their complete dataset.
[0040] By monitoring blockchain contract events, the listening party can automatically obtain the encrypted data set uploaded by the registrant, and use the key values in the on-chain information for precise positioning, thereby efficiently and securely completing the privacy intersection operation with the registrant, obtaining multiple privacy intersection results, and then performing iterative intersection operations based on multiple privacy intersection results, ultimately obtaining a multi-party privacy intersection result, which greatly improves the automation level of data interaction and the processing efficiency of privacy intersection.
[0041] In this embodiment, a pairwise parallel intersection mechanism is used to predetermine the registrants and listeners. This ensures that the listener is aware of the registrants as soon as they are on-chain, enabling efficient parallel processing of the intersection operation and significantly reducing the number of data interactions and overall computation time. Each participant uploads an encrypted dataset to the blockchain, and simultaneously registers a blockchain contract event. Based on the on-chain information of the contract event, the listener automatically locates and obtains the encrypted datasets of the same group of registrants. A private intersection operation is then performed between any group of listeners and registrants until the common intersection of all participants is obtained, resulting in a multi-party private intersection result. This solves the low processing efficiency of existing multi-party private intersection methods.
[0042] In a specific implementation process, before each of the above-mentioned participants uploads the encrypted data set to the blockchain and the registrant registers the blockchain contract event, the above-mentioned method further includes: all of the above-mentioned participants determine an elliptic curve with shared parameters; mapping each element of the data set of each of the above-mentioned participants to the above-mentioned elliptic curve to obtain a set of data points of each of the above-mentioned participants; and using the above-mentioned private key generated by each of the above-mentioned participants to encrypt the data point set corresponding to the participant respectively, to obtain an encrypted data set of each of the above-mentioned participants.
[0043] Specifically, before the actual private intersection operation begins, all participating parties must first negotiate and determine an elliptic curve with shared parameters. Elliptic curves are the foundation of Elliptic Curve Diffie-Hellman (ECDH), defining the mathematical space for encryption and decryption. ECDH is a key exchange protocol that allows two parties to securely establish a shared secret key over an insecure communication channel. This protocol utilizes elliptic curves, allowing for shorter key lengths while maintaining the same level of security compared to traditional Diffie-Hellman key exchange. Selecting an elliptic curve with shared parameters ensures that all participating parties operate within the same mathematical framework, a prerequisite for subsequent data encryption and private intersection operations. Each participating party then hashes and salts each element in their dataset onto the determined elliptic curve, generating a set of data points corresponding to the dataset. This mapping process ensures data privacy and security because the original data is converted into points on the elliptic curve, which cannot be restored without the private key. Each participant then encrypts the aforementioned data point set using their own private key, resulting in their own encrypted dataset. In the ECDH algorithm, the combination of private keys and elliptic curve points generates a shared secret based on the private keys of both parties, without directly exposing the private keys themselves. Therefore, by encrypting each participant's data point set with their private key, each participant generates a set of data that only they can decrypt, while also enabling secure data exchange and privacy-enhancing operations with other participants.
[0044] This embodiment uses Private Set Intersection (PSI) to perform private intersection operations. PSI is a cryptographic protocol that allows two or more parties to calculate the intersection of sets without disclosing their respective data. The PSI protocol helps participants discover common data points or elements while protecting privacy. ECDH-PSI (Elliptic Curve Diffie-Hellman Private Set Intersection) combines two cryptographic technologies: Elliptic Curve Diffie-Hellman (ECDH) and Private Set Intersection (PSI). It is used to calculate the intersection between two or more sets without disclosing their respective private sets, while using ECDH to ensure the security of data during transmission and calculation. This algorithm is mainly used in scenarios where private data of different parties needs to be compared and matched.
[0045] Specifically, the ECDH-PSI algorithm steps are as follows:
[0046] 1. Alice and Bob agree on an elliptic curve E.
[0047] 2. Alice randomly generates a private key Sa.
[0048] 3. Alice repeatedly hashes each value in her original set until they are all generators of E. For example, she could iteratively apply SHA256 to each value until the output corresponds to a value x at a certain point on the curve.
[0049] 4. For each of these hash values Ga, Alice calculates Ga×Sa, where Ga is the corresponding point on the curve in step 3.
[0050] 5. Alice sends her calculated value Ga × Sa to Bob.
[0051] 6. Bob randomly generates a private key Sb.
[0052] 7. Bob repeatedly hashes each value in his original set until they are all generators of E (same as Alice did).
[0053] 8. For each of these hash values Gb, Bob calculates Gb×Sb.
[0054] 9. Bob calculates the corresponding shared key Ga×SaSb for each element G×Sa in Alice's original set.
[0055] 10.Bob sends (Gb×Sb,Ga×SaSb) to Alice.
[0056] 11. Alice calculates the corresponding shared key Gb×SaSb for each element Gb×Sb in Bob’s original set.
[0057] 12. Alice compares the shared key Ga×SaSb with the shared key Gb×SaSb and finds the intersection.
[0058] In summary, using an elliptic curve with pre-negotiated shared parameters, the elements of each participant's dataset are converted into a collection of data points, which are then encrypted using their own generated private keys. This ensures that the data is securely converted and protected before being uploaded to the blockchain and triggering blockchain contract events. This series of steps establishes an encrypted data environment based on the ECDH-PSI algorithm. This not only provides the mathematical foundation and security guarantees for subsequent multi-party private intersection, but also encrypts the points on the elliptic curves of various countries, enhancing data privacy and integrity, preventing unauthorized access and cracking even after the data is uploaded to the blockchain. In short, these steps establish a secure data processing and transmission framework for the entire multi-party private intersection process, ensuring that the privacy of all participants is effectively protected at every stage, from data preparation to blockchain interaction.
[0059] In some other embodiments of the present application, a registrant and a listener among multiple participants are determined based on a pairwise parallel intersection mechanism, wherein any of the above-mentioned participants is the above-mentioned registrant or the above-mentioned listener, and a group of the above-mentioned participants includes one above-mentioned registrant and one above-mentioned listener, including: randomly grouping the multiple above-mentioned participants in pairs to obtain multiple groups; when the total number of the above-mentioned participants is an even number, determining the above-mentioned registrant and the above-mentioned listener in each of the above-mentioned groups; when the total number of the above-mentioned participants is an odd number, determining the above-mentioned registrant and the above-mentioned listener in each of the above-mentioned groups except for the last ungrouped participant, wherein the above-mentioned registrant and the above-mentioned listener in each of the above-mentioned groups perform the above-mentioned privacy intersection operation simultaneously.
[0060] Specifically, all participants are first randomly divided into pairs, resulting in multiple groups, each containing two participants. This provides the basis for the subsequent parallel intersection operation. Within each group, one participant is randomly or through negotiation determined as the registrant and the other as the listener. The registrant is responsible for registering blockchain contract events, while the listener listens to these events and retrieves the registrant's data from the blockchain. When the total number of participants is even, all participants can be smoothly grouped and their roles determined. The registrant and listener can simultaneously initiate the private intersection operation in their respective groups, ensuring parallelism and efficiency. If the total number of participants is odd, all participants, except the last ungrouped participant, are similarly grouped into pairs and their roles determined. The last participant waits for the other groups to complete the intersection operation before independently intersecting the results obtained by the other participants. This mechanism allows for parallel intersection even with an odd number of participants, ensuring that the last participant's data fully participates in the intersection process, resulting in the final multi-party private intersection result.
[0061] By allowing for parallel intersection calculations within two groups, the efficiency of multi-party private intersection calculations can be significantly improved, reducing the frequency and time required for data transfers between different participants. For an odd number of participants, performing group intersection calculations first can more quickly narrow the intersection range, thereby reducing the computational burden of subsequent intersection calculations. Independent intersection calculations for each group prevent direct data flow between all participants, enhancing privacy during data processing. Clearly assigned roles for registrants and listeners, and automated triggering of blockchain contract events, streamline the multi-party interaction process. In short, the pairwise parallel intersection mechanism significantly improves the efficiency and security of multi-party private intersection calculations, while simplifying process management and achieving effective resource balancing and utilization.
[0062] During the specific implementation of the present application, the above-mentioned monitoring party monitors the on-chain information of the above-mentioned blockchain contract event to obtain the above-mentioned encrypted data set of the above-mentioned registrant in the same group, and performs a privacy intersection operation between any group of the above-mentioned monitoring party and the above-mentioned registrant to obtain multiple privacy intersection results, including: any group of the above-mentioned monitoring party uses the generated private key to encrypt the above-mentioned encrypted data set of the above-mentioned registrant in the same group to obtain a secondary encrypted data set of the registrant; any group of the above-mentioned registrant uses the generated private key to encrypt the above-mentioned encrypted data set of the above-mentioned monitoring party in the same group to obtain a secondary encrypted data set of the monitoring party; and performs a preliminary privacy intersection operation on the secondary encrypted data set of the above-mentioned registrant in each group and the secondary encrypted data set of the above-mentioned monitoring party to obtain multiple privacy intersection results.
[0063] Specifically, when a blockchain contract event is triggered by a registrant, the listener monitors the on-chain information from the event, which includes the key used to retrieve the encrypted dataset. Based on the key, the listener accurately retrieves the encrypted dataset uploaded by the same registrant from the blockchain. After obtaining the encrypted dataset, the listener and registrant use their own private keys to further encrypt each other's encrypted dataset, resulting in the registrant's secondary encrypted dataset and the listener's secondary encrypted dataset. This step is a key operation based on the ECDH-PSI algorithm. By combining the private keys of both parties, encrypted data can be securely generated, without directly exchanging private information. Each group (i.e., a group of registrants and listeners) independently performs a private intersection operation, resulting in multiple private intersection results. This operation is performed on the secondary encrypted datasets of both parties. Due to the use of a pairwise parallel processing approach, multiple groups can perform the operation simultaneously, greatly improving the efficiency of the intersection process.
[0064] Furthermore, a multi-party private intersection result is obtained based on at least a plurality of the above-mentioned private intersection results, including: performing a first round of private intersection operations between the plurality of the above-mentioned private intersection results, to obtain a first-level intersection result; using the i-th level intersection result as input for the i+1-th round of private intersection operations, until the number of the m-th level intersection results reaches one, and performing pairwise intersection operations on the above-mentioned intersection results at each level, 1≤i≤m; when the total number of the above-mentioned participants is an even number, determining the m-th level intersection result as the multi-party private intersection result; when the total number of the above-mentioned participants is an odd number, performing the m+1-th round of private intersection operations between the m-th level intersection result and the ungrouped participants, to obtain the multi-party private intersection result.
[0065] Specifically, multiple private intersection results are paired and further private intersection operations are performed to obtain a first-level intersection result. Subsequently, each round of private intersection operations is iteratively intersected based on the results of the previous round. The i-th level intersection result serves as the input for the i+1-th round of private intersection operations until the number of intersection results is reduced to just one, i.e., the m-th level intersection result. If the total number of participants is even, then after the m-th round of private intersection operations, only one intersection result remains, i.e., the m-th level intersection result. This m-th level intersection result is directly determined as the multi-party private intersection result. For an odd number of participants, when the private intersection operations are completed between all intersection results and the m-th level intersection result is obtained (only one intersection result remains), this m-th level intersection result is subjected to a final private intersection operation, i.e., the i+1-th round of private intersection operations, with the previously ungrouped participants to ensure that the data of all participants is fully considered. The final multi-party private intersection result includes the intersection information of all participants.
[0066] The above process ensures that, regardless of the number of participants, each round of private intersection results can be accurately integrated, resulting in a final multi-party private intersection result covering all participants. This iterative intersection strategy not only considers computational efficiency but also ensures the accuracy of the intersection results. In the case of an odd number of participants, an additional intersection step is introduced to ensure that all data is correctly processed and no participant's information is missed. In short, through this iterative private intersection operation, regardless of whether the total number of participants is even or odd, all private intersection results can be accurately integrated, resulting in a multi-party private intersection result that fully reflects the intersection information of all participants, ensuring both computational efficiency and completeness.
[0067] During the specific implementation process, the i-th level intersection result is used as the input of the i+1-th round of private intersection operation until the number of the m-th level intersection result is one, and the above-mentioned intersection results at each level are intersected with each other, 1≤i≤m, including: the above-mentioned intersection results at each level are encrypted with each other using their respective private keys, wherein the private key of the above-mentioned intersection results at each level is generated by any participant participating in the calculation of the above-mentioned intersection results at each level; the encrypted intersection results at each level are intersected with each other until the number of the above-mentioned m-th level intersection results is one.
[0068] Each level of intersection results is encrypted using each other's private keys. For example, if the i-th level intersection results include intersection result A and intersection result B, then intersection result B is encrypted using the private key of any participant in the calculation of intersection result A to obtain encrypted intersection result B. Intersection result A is then encrypted using the private key of any participant in the calculation of intersection result B to obtain encrypted intersection result A. The encrypted intersection results A and B are then intersected.
[0069] The encrypted intersection results are intersected pairwise. This process repeats with increasing intersection rounds, i, until only one intersection result is found at the mth level. Each round of intersection calculation builds on the previous round's results, continuously narrowing the intersection range. This combination of private key encryption and multi-round iterative privacy-preserving intersection calculation ensures that even in complex scenarios with multiple participants, the set intersection of all participants can be accurately calculated while protecting the privacy and security of their data. Through gradual iteration, each round of intersection calculation is based on the encrypted intersection result, ensuring the immutability of data processing and the proper protection of each participant's data throughout the process.
[0070] Furthermore, when the total number of the above-mentioned participants is an odd number, the above-mentioned m-th level intersection result is subjected to the m+1-th round of private intersection operation with the ungrouped participants to obtain the above-mentioned multi-party private intersection result, including: when the total number of the above-mentioned participants is an odd number, the above-mentioned m-th level intersection result is encrypted using the private key generated by the above-mentioned ungrouped participants to obtain the encrypted m-th level intersection result; the above-mentioned ungrouped participants are encrypted using the private key of the above-mentioned m-th level intersection result to obtain the encrypted ungrouped participants, wherein the private key of the above-mentioned m-th level intersection result is generated by any one of the above-mentioned participants participating in the m-th round of private intersection operation; the above-mentioned encrypted m-th level intersection result is subjected to the m+1-th round of private intersection operation with the above-mentioned encrypted ungrouped participants to obtain the above-mentioned multi-party private intersection result.
[0071] Specifically, when the total number of participants is an odd number, there will be a single participant that does not participate in the initial pairwise intersection, namely the ungrouped participant. When the m-th level intersection result is generated, the ungrouped participant performs a final round of private intersection operation with the m-th level intersection result. First, the m-th level intersection result is encrypted using the private key generated by the ungrouped participant to obtain the encrypted m-th level intersection result. Next, the ungrouped participant is encrypted using the private key of the m-th level intersection result, where the private key of the m-th level intersection result is generated from any participant participating in the calculation of the m-th level intersection result. The encrypted m-th level intersection result and the encrypted ungrouped participant perform the above-mentioned m+1-th round of private intersection operation to obtain the above-mentioned multi-party private intersection result. The above process ensures that even when the number of participants is an odd number, the data of all participants can participate in the intersection. At the same time, through the double encryption strategy, the security and privacy of the data processing process are enhanced, providing reliable data protection for the participants.
[0072] In some further embodiments of the present application, a Privacy Request History Record (PRHR) is maintained on the blockchain to record detailed information of each intersection operation, including the participants, intersection results, intersection timestamp, encryption algorithm and parameters used, etc. Whenever a new intersection operation occurs, the PRHR will be automatically updated to store the latest intersection information. These records can be encrypted and only authorized participants can view them to protect sensitive information. The PRHR not only provides comprehensive tracking and review of the privacy intersection process, but can also be used for auditing, dispute resolution and subsequent data analysis. In addition, the traceability of historical records helps to identify potential security vulnerabilities or abnormal behavior, further enhancing the transparency and security of the solution.
[0073] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the blockchain-based multi-party privacy intersection method of the present application will be described in detail below with reference to specific embodiments.
[0074] (1) Overall Plan
[0075] This solution combines the ECDH-PSI algorithm with blockchain to provide a secure storage method for data. The entire process adopts a pairwise intersection and parallel computing method to improve system performance.
[0076] In addition, by using the contract event monitoring method, after the data is uploaded to the chain, the listener can monitor and automatically complete the process of retrieving data on the chain, without the need for network notification and negotiation. This also greatly optimizes the process, making the entire process more convenient, smoother and more efficient.
[0077] 1. After the data is sent to the blockchain, the contract event will be registered. After the monitoring party monitors the event, it can obtain the data from the blockchain, which is convenient and fast;
[0078] 2. In some financial institution scenarios, cooperation data needs to be securely stored and auditable. Storing data in the blockchain is safe and reliable, and convenient for future inquiries and audits.
[0079] 3. When data from one or more parties changes infrequently, blockchain can reduce data exchange. For example, when multiple parties need to interact privately with Party A, Party A only needs to put its encrypted data on the blockchain, and other parties can access it from there. This eliminates the need for Party A to send its data to other parties each time, thus reducing the number of data exchanges between Party A and other parties.
[0080] 4. For scenarios where multiple parties participate in computing, data is stored on the blockchain, and other parties can retrieve data from the blockchain, which can greatly improve efficiency and reduce multiple data interactions between multiple parties.
[0081] 5. Optimize the original hash encryption to a salted hash method to enhance encryption.
[0082] Specifically, this solution targets the privacy intersection scenario involving multiple parties. If the number of nodes is even, they are calculated pairwise, and the intersection is then calculated sequentially. For an odd number of nodes, the first two nodes are calculated pairwise, and the obtained intersection is then calculated with the last node.
[0083] (2) Specific process
[0084] 1. Project Process
[0085] (1) Figure 3 Is the privacy intersection diagram of this scheme, such as Figure 3 As shown, assume that n participants are P1, P2, P3, P4...Pn, and negotiate an elliptic curve E(sha512, P256, XtoY2) with the same hash algorithm, encryption strength, and algorithm factor.
[0086] (2) The data set of each participant is hashed and salted and then mapped to a point on the elliptic curve. The resulting data are M1, M2, M3, M4…Mn. When sending data, they are sent in batches according to the amount of data, that is, M1 = {M11, M12, M13, M14…M1n}, M2 = {M21, M22, M23, M24…M2n}, and so on.
[0087] (3) Each participant generates a private key based on the agreed elliptic curve, namely K1, K2, K3, K4…Kn.
[0088] (4) Initialization: The data of P1 is initialized to Edata1 = {M11×K1, M12×K1, M13×K1, M14×K1…M1n×K1}, and the data status status = {0, 0, 0…0}, where 1 represents intersection and 0 represents no intersection.
[0089] (5) After the data is initialized, it is uploaded to the blockchain. After the upload is completed, P2, which performs the intersection operation with it, will receive the blockchain contract event. Then P2 goes to the blockchain to obtain the data and encrypts it with its own private key to obtain Edata12 = {M11×K1×K2, M12×K1×K2, M13×K1×K2, M14×K1×K2…M1n×K1×K2}, and the data status status = {0, 0, 0, 0…0}.
[0090] (6) The same processing is performed on the data of node P2 to obtain the encrypted data set Edata21 = {M21×K2×K1, M22×K2×K1, M23×K2×K1, M24×K2×K1…M2n×K2×K1}, and then Edata12 and Edata21 are intersected to obtain the intersection data S1. At this time, the data status of Edata12 and Edata21 is status = {1, 1, 1, 1…1}.
[0091] (7) Similarly, the data of nodes P3 and P4 are intersected to obtain intersection data S2. Then S1 and S2 are intersected again to obtain intersection data S3. S3 is then intersected with the data of node P5 to obtain the final intersection data S4. This is analogous to the calculation of more nodes, which are also intersected pairwise and the intersections are intersected again.
[0092] 2. Contract Event Process
[0093] (1) Figure 4 This is a diagram of an example blockchain contract event, such as Figure 4 As shown in the figure, the privacy nodes (participants) agree that the name of the contract event is A, and privacy nodes 2 and 3 monitor contract event A.
[0094] (2) After privacy node 1 uploads the encrypted data to the blockchain, it registers the contract event A. Two parameters are required when registering the event: one is the event name A, and the other is the name of the data when it is uploaded to the chain (that is, the key value of the key-value pair when it is uploaded to the chain).
[0095] (3) When Privacy Node 2 and Privacy Node 3 detect that Privacy Node 1 has registered Contract Event A, they will retrieve the encrypted data from the chain based on the key value provided by Privacy Node 1.
[0096] Similarly, as long as data interaction is required between nodes, it can be achieved by registering to listen to contract events with the same name, which is simple and convenient.
[0097] 3. Verification and audit process
[0098] The verification and audit process can be divided into two types: one is full-process verification, that is, verification of all participating nodes and data; the other is verification of a certain computing circuit, such as Figure 3 The calculation line S1, S3, and S4 in .
[0099] (1) The key value of the data on the chain is composed of the batch information of the data, and the data can be retrieved for verification based on the batch information.
[0100] (2) The blockchain records the encrypted data of each party, and the corresponding plaintext data is stored in the database of each party.
[0101] (3) During verification, data can be obtained from the databases of each party, encrypted using the keys of each party, and then compared with the ciphertext data on the blockchain.
[0102] (4) If the encrypted data is the same as the data obtained from the blockchain, it proves that the plaintext data in the database is the plaintext data used in the calculation at that time. The plaintext data can then be reviewed to see whether it is forged or real data.
[0103] Due to the immutability of blockchain, the security and reliability of on-chain data are guaranteed, and it also provides a good environment for data verification and auditing.
[0104] 4. Node pairwise intersection matching strategy
[0105] The following steps are performed during each intersection round:
[0106] (1) First, determine the data size of the nodes involved in the intersection, and sort the nodes in ascending order according to the data size to obtain the order P1, P2, P3, P4...Pn of n nodes;
[0107] (2) Then randomly match nodes in pairs, for example, P1, Pn, P2, Pn-1, P3, Pn-2 in order;
[0108] (3) Perform pairwise intersection calculations in the order of matching above, and perform parallel operations.
[0109] The advantage of doing this is that the intersection of the data with larger and smaller amounts of data can be calculated first, which can quickly reduce the intersection and reduce the amount of data for the next round of intersection, thereby improving performance.
[0110] This embodiment targets scenarios involving multiple parties seeking private data, or scenarios where one party seeks data from multiple parties. This solution leverages blockchain and contract events to significantly reduce the number of data exchanges between these parties and the overall process, improving overall efficiency. Furthermore, leveraging the blockchain's immutability, it provides a secure and reliable environment for data storage and auditing. This reduces data exchanges between multiple parties, improving efficiency, securely accessing data using blockchain, and employing blockchain contract event monitoring and processing methods to optimize the processing flow.
[0111] The embodiments of the present application also provide a device for multi-party privacy intersection based on blockchain. It should be noted that the device for multi-party privacy intersection based on blockchain in the embodiments of the present application can be used to execute the method for multi-party privacy intersection based on blockchain provided in the embodiments of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been explained will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0112] The following introduces the blockchain-based multi-party privacy intersection device provided in the embodiments of the present application.
[0113] Figure 5 This is a structural block diagram of a multi-party privacy intersection device based on blockchain according to an embodiment of the present application. Figure 5 As shown, the apparatus includes a first determination unit 10, an upload unit 20, and a privacy intersection unit 30. The first determination unit is configured to determine a registrant and a listener among multiple participants based on a pairwise parallel intersection mechanism, wherein any of the participants is either the registrant or the listener, and a group of participants includes one registrant and one listener. The upload unit is configured to enable each participant to upload an encrypted dataset to a blockchain, and simultaneously with the upload, the registrant registers a blockchain contract event. The encrypted dataset of each participant is obtained based on a private key generated by the participant and the dataset of the participant. The privacy intersection unit is configured to enable the listener to monitor the blockchain contract event's uploaded information to obtain the encrypted dataset of the registrant in the same group. A privacy intersection operation is performed between any group of listeners and the registrant to obtain multiple privacy intersection results, and a multi-party privacy intersection result is obtained based at least on the multiple privacy intersection results. The uploaded information includes a key value.
[0114] Specifically, the pairwise parallel intersection mechanism means that during the privacy intersection process, all participants are divided into multiple groups, each group containing two participants. This mechanism enables these groups to perform their respective privacy set intersection operations simultaneously, that is, parallel processing, thereby improving processing speed and efficiency. In each group, the two participants play the roles of the registrant and the listener respectively, and any participant can act as a registrant or a listener. A group of the above-mentioned participants refers to the two grouped participants, and these two participants constitute an intersection unit. This grouping method ensures that each privacy intersection operation involves only two participants, simplifying the computational complexity. In short, step S201 provides a basis for efficient parallel processing of multi-party privacy intersection by adopting the pairwise parallel intersection mechanism and clarifying the registrant and the listener in each group of participants, thereby improving data processing speed.
[0115] Each participant first uses the private key generated by itself to encrypt the data set it holds. An encrypted data set refers to a data set that has been encrypted using the elliptic curve protocol, ensuring that even in an insecure network environment, the data can be effectively protected and will not be stolen or tampered with by unauthorized third parties. When a participant uploads the encrypted data set to the blockchain, it simultaneously registers a blockchain contract event. A blockchain contract event is a smart contract function that, once set, will automatically trigger when specific conditions are met without the need for human intervention. In this embodiment, the completion of the chain upload is considered one of the triggering conditions. Through step S202, each participant uploads the encrypted data set encrypted based on the private key to the blockchain, and the registrant triggers the blockchain contract event at the same time as the chain upload, realizing the combination of secure data transmission and automated retrieval, which not only ensures the confidentiality and integrity of data in the process of multi-party privacy exchange, but also greatly improves the efficiency of data interaction and processing, and simplifies the operation process.
[0116] The monitoring party continuously monitors blockchain contract events on the blockchain. Blockchain contract events are triggered by the registrant after the data is successfully uploaded to the blockchain. When the monitoring party detects the triggering of the relevant event, it knows that the registrant has uploaded the encrypted dataset to the blockchain. The monitoring party can use the key value in the blockchain contract event's uploaded information to locate and retrieve the corresponding encrypted dataset on the blockchain. The key value can be the identifier of the encrypted dataset or a specific parameter used to retrieve the encrypted dataset, ensuring that the monitoring party can accurately obtain the registrant's encrypted dataset. Once the monitoring party obtains the registrant's encrypted dataset, the monitoring party and the registrant perform a private intersection operation. Because the entire intersection operation is performed in parallel on a pairwise basis, each pair of registrants and monitoring parties will produce a private intersection result. Performing the private intersection operation on multiple such pairs simultaneously will ultimately produce multiple private intersection results. These private intersection results are then iterated to obtain a multi-party private intersection result, which is the intersection of all participating parties' datasets. The multi-party private intersection result reflects the data elements shared by all participating parties without requiring any party to expose their complete dataset.
[0117] By monitoring blockchain contract events, the listening party can automatically obtain the encrypted data set uploaded by the registrant, and use the key values in the on-chain information for precise positioning, thereby efficiently and securely completing the privacy intersection operation with the registrant, obtaining multiple privacy intersection results, and then performing iterative intersection operations based on multiple privacy intersection results, ultimately obtaining a multi-party privacy intersection result, which greatly improves the automation level of data interaction and the processing efficiency of privacy intersection.
[0118] In a specific implementation, the apparatus further includes a second determination unit, a mapping unit, and an encryption unit. The second determination unit is configured to determine an elliptic curve with shared parameters by all the above-mentioned participants before each of the above-mentioned participants uploads the encrypted dataset to the blockchain and the registrant registers the blockchain contract event; the mapping unit is configured to map each element of each of the above-mentioned participant's dataset onto the elliptic curve to obtain a set of data points for each of the above-mentioned participants; and the encryption unit is configured to encrypt the set of data points corresponding to each of the above-mentioned participants using the private key generated by each of the above-mentioned participants to obtain an encrypted dataset for each of the above-mentioned participants.
[0119] Specifically, before the actual private intersection operation begins, all participating parties must first negotiate and determine an elliptic curve with shared parameters. Elliptic curves are the foundation of Elliptic Curve Diffie-Hellman (ECDH), defining the mathematical space for encryption and decryption. ECDH is a key exchange protocol that allows two parties to securely establish a shared secret key over an insecure communication channel. This protocol utilizes elliptic curves, allowing for shorter key lengths while maintaining the same level of security compared to traditional Diffie-Hellman key exchange. Selecting an elliptic curve with shared parameters ensures that all participating parties operate within the same mathematical framework, a prerequisite for subsequent data encryption and private intersection operations. Each participating party then hashes and salts each element in their dataset onto the determined elliptic curve, generating a set of data points corresponding to the dataset. This mapping process ensures data privacy and security because the original data is converted into points on the elliptic curve, which cannot be restored without the private key. Each participant then encrypts the aforementioned data point set using their own private key, resulting in their own encrypted dataset. In the ECDH algorithm, the combination of private keys and elliptic curve points generates a shared secret based on the private keys of both parties, without directly exposing the private keys themselves. Therefore, by encrypting each participant's data point set with their private key, each participant generates a set of data that only they can decrypt, while also enabling secure data exchange and privacy-enhancing operations with other participants.
[0120] This embodiment uses Private Set Intersection (PSI) to perform private intersection operations. PSI is a cryptographic protocol that allows two or more parties to calculate the intersection of sets without disclosing their respective data. The PSI protocol helps participants discover common data points or elements while protecting privacy. ECDH-PSI (Elliptic Curve Diffie-Hellman Private Set Intersection) combines two cryptographic technologies: Elliptic Curve Diffie-Hellman (ECDH) and Private Set Intersection (PSI). It is used to calculate the intersection between two or more sets without disclosing their respective private sets, while using ECDH to ensure the security of data during transmission and calculation. This algorithm is mainly used in scenarios where private data of different parties needs to be compared and matched.
[0121] The ECDH-PSI algorithm steps have been described in the method embodiment and will not be repeated here.
[0122] In summary, using an elliptic curve with pre-negotiated shared parameters, the elements of each participant's dataset are converted into a collection of data points, which are then encrypted using their own generated private keys. This ensures that the data is securely converted and protected before being uploaded to the blockchain and triggering blockchain contract events. This series of steps establishes an encrypted data environment based on the ECDH-PSI algorithm. This not only provides the mathematical foundation and security guarantees for subsequent multi-party private intersection, but also encrypts the points on the elliptic curves of various countries, enhancing data privacy and integrity, preventing unauthorized access and cracking even after the data is uploaded to the blockchain. In short, these steps establish a secure data processing and transmission framework for the entire multi-party private intersection process, ensuring that the privacy of all participants is effectively protected at every stage, from data preparation to blockchain interaction.
[0123] In some embodiments of the present application, the first determination unit includes a grouping unit, a first determination module, and a second determination module. The grouping unit is configured to randomly group the plurality of participants into pairs to obtain a plurality of groups; the first determination module is configured to, when the total number of the participants is an even number, determine the registrant and the monitoring party in each of the groups; and the second determination module is configured to, when the total number of the participants is an odd number, determine the registrant and the monitoring party in each of the groups, excluding the last ungrouped participant, wherein the registrant and the monitoring party in each of the groups simultaneously perform the privacy intersection operation.
[0124] Specifically, all participants are randomly divided into pairs, resulting in multiple groups, each containing two participants. This provides the basis for the subsequent parallel intersection operation. Within each group, one participant is randomly or negotiated to serve as the registrant and the other as the listener. The registrant is responsible for registering blockchain contract events, while the listener listens to these events and retrieves the registrant's data from the blockchain. When the total number of participants is even, all participants can be smoothly grouped and their roles determined. The registrant and listener can simultaneously initiate the private intersection operation in their respective groups, ensuring parallelism and efficiency. If the total number of participants is odd, all participants, except the last ungrouped participant, are similarly grouped into pairs and their roles determined. The last participant waits for the other groups to complete the intersection operation before independently intersecting the results obtained by the other participants. This mechanism allows for parallel intersection even with an odd number of participants, ensuring that the last participant's data fully participates in the intersection process, resulting in the final multi-party private intersection result.
[0125] By allowing for parallel intersection calculations within two groups, the efficiency of multi-party private intersection calculations can be significantly improved, reducing the frequency and time required for data transfers between different participants. For an odd number of participants, performing group intersection calculations first can more quickly narrow the intersection range, thereby reducing the computational burden of subsequent intersection calculations. Independent intersection calculations for each group prevent direct data flow between all participants, enhancing privacy during data processing. Clearly assigned roles for registrants and listeners, and automated triggering of blockchain contract events, streamline the multi-party interaction process. In short, the pairwise parallel intersection mechanism significantly improves the efficiency and security of multi-party private intersection calculations, while simplifying process management and achieving effective resource balancing and utilization.
[0126] In the specific implementation process of this application, the privacy intersection unit includes a first encryption module, a second encryption module, and an intersection module. The first encryption module is used by any group of the above-mentioned monitoring parties to encrypt the above-mentioned encrypted data set of the above-mentioned registrants in the same group using the generated private key to obtain a secondary encrypted data set of the registrants; the second encryption module is used by any group of the above-mentioned registrants to encrypt the above-mentioned encrypted data set of the above-mentioned monitoring parties in the same group using the generated private key to obtain a secondary encrypted data set of the monitoring parties; and the intersection module is used to perform a preliminary privacy intersection operation on the secondary encrypted data sets of the registrants and the above-mentioned monitoring parties in each group to obtain multiple privacy intersection results.
[0127] Specifically, when a blockchain contract event is triggered by a registrant, the listener monitors the on-chain information from the event, which includes the key used to retrieve the encrypted dataset. Based on the key, the listener accurately retrieves the encrypted dataset uploaded by the same registrant from the blockchain. After obtaining the encrypted dataset, the listener and registrant use their own private keys to further encrypt each other's encrypted dataset, resulting in the registrant's secondary encrypted dataset and the listener's secondary encrypted dataset. This step is a key operation based on the ECDH-PSI algorithm. By combining the private keys of both parties, encrypted data can be securely generated, without directly exchanging private information. Each group (i.e., a group of registrants and listeners) independently performs a private intersection operation, resulting in multiple private intersection results. This operation is performed on the secondary encrypted datasets of both parties. Due to the use of a pairwise parallel processing approach, multiple groups can perform the operation simultaneously, greatly improving the efficiency of the intersection process.
[0128] Furthermore, the privacy intersection unit further includes a first-round intersection module, an iterative intersection module, a third determination module, and a final intersection module. The first-round intersection module is configured to perform a first-round privacy intersection operation between each of the plurality of privacy intersection results to obtain a first-level intersection result; the iterative intersection module is configured to use the i-th level intersection result as input for the i+1-th round of privacy intersection operation, until the number of the m-th level intersection result is one, and to perform intersection between each of the above-mentioned intersection results at each level, 1≤i≤m; the third determination module is configured to determine the m-th level intersection result as the multi-party privacy intersection result when the total number of the above-mentioned participants is an even number; and the final intersection module is configured to perform an m+1-th round of privacy intersection operation between the m-th level intersection result and the ungrouped participants when the total number of the above-mentioned participants is an odd number, to obtain the multi-party privacy intersection result.
[0129] Specifically, multiple private intersection results are paired and further private intersection operations are performed to obtain a first-level intersection result. Subsequently, each round of private intersection operations is iteratively intersected based on the results of the previous round. The i-th level intersection result serves as the input for the i+1-th round of private intersection operations until the number of intersection results is reduced to just one, i.e., the m-th level intersection result. If the total number of participants is even, then after the m-th round of private intersection operations, only one intersection result remains, i.e., the m-th level intersection result. This m-th level intersection result is directly determined as the multi-party private intersection result. For an odd number of participants, when the private intersection operations are completed between all intersection results and the m-th level intersection result is obtained (only one intersection result remains), this m-th level intersection result is subjected to a final private intersection operation, i.e., the i+1-th round of private intersection operations, with the previously ungrouped participants to ensure that the data of all participants is fully considered. The final multi-party private intersection result includes the intersection information of all participants.
[0130] The above process ensures that, regardless of the number of participants, each round of private intersection results can be accurately integrated, resulting in a final multi-party private intersection result covering all participants. This iterative intersection strategy not only considers computational efficiency but also ensures the accuracy of the intersection results. In the case of an odd number of participants, an additional intersection step is introduced to ensure that all data is correctly processed and no participant's information is missed. In short, through this iterative private intersection operation, regardless of whether the total number of participants is even or odd, all private intersection results can be accurately integrated, resulting in a multi-party private intersection result that fully reflects the intersection information of all participants, ensuring both computational efficiency and completeness.
[0131] In a specific implementation, the iterative intersection module includes a first encryption submodule and a first intersection submodule. The first encryption submodule is configured to encrypt each of the intersection results at each level using their respective private keys, where the private key for each level of intersection result is generated by any participant in the calculation of each level of intersection result. The first intersection submodule is configured to intersect each of the encrypted intersection results at each level until the number of intersection results at the mth level reaches one.
[0132] Each level of intersection results is encrypted using each other's private keys. For example, if the i-th level intersection results include intersection result A and intersection result B, then intersection result B is encrypted using the private key of any participant in the calculation of intersection result A to obtain encrypted intersection result B. Intersection result A is then encrypted using the private key of any participant in the calculation of intersection result B to obtain encrypted intersection result A. The encrypted intersection results A and B are then intersected.
[0133] The encrypted intersection results are intersected pairwise. This process repeats with increasing intersection rounds, i, until only one intersection result is found at the mth level. Each round of intersection calculation builds on the previous round's results, continuously narrowing the intersection range. This combination of private key encryption and multi-round iterative privacy-preserving intersection calculation ensures that even in complex scenarios with multiple participants, the set intersection of all participants can be accurately calculated while protecting the privacy and security of their data. Through gradual iteration, each round of intersection calculation is based on the encrypted intersection result, ensuring the immutability of data processing and the proper protection of each participant's data throughout the process.
[0134] Furthermore, the final intersection module includes: a second encryption submodule, a third encryption submodule, and a second intersection submodule. The second encryption submodule is configured to, when the total number of participants is an odd number, encrypt the m-th level intersection result using the private key generated by the ungrouped participants to obtain an encrypted m-th level intersection result; the third encryption submodule is configured to encrypt the ungrouped participants using the private key of the m-th level intersection result to obtain an encrypted ungrouped participant, wherein the private key of the m-th level intersection result is generated by any one of all the participants participating in the m-th round of private intersection operation; and the second intersection submodule is configured to perform the m+1-th round of private intersection operation on the encrypted m-th level intersection result and the encrypted ungrouped participants to obtain the multi-party private intersection result.
[0135] Specifically, when the total number of participants is an odd number, there will be a single participant that does not participate in the initial pairwise intersection, namely the ungrouped participant. When the m-th level intersection result is generated, the ungrouped participant performs a final round of private intersection operation with the m-th level intersection result. First, the m-th level intersection result is encrypted using the private key generated by the ungrouped participant to obtain the encrypted m-th level intersection result. Next, the ungrouped participant is encrypted using the private key of the m-th level intersection result, where the private key of the m-th level intersection result is generated from any participant participating in the calculation of the m-th level intersection result. The encrypted m-th level intersection result and the encrypted ungrouped participant perform the above-mentioned m+1-th round of private intersection operation to obtain the above-mentioned multi-party private intersection result. The above process ensures that even when the number of participants is an odd number, the data of all participants can participate in the intersection. At the same time, through the double encryption strategy, the security and privacy of the data processing process are enhanced, providing reliable data protection for the participants.
[0136] The blockchain-based multi-party privacy-preserving intersection device includes a processor and a memory. The first determination unit, upload unit, and privacy-preserving intersection unit are all stored as program units in the memory, and the processor executes the program units stored in the memory to implement the corresponding functions. The above modules are all located in the same processor; alternatively, the above modules can be located in different processors in any combination.
[0137] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0138] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is run, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based multi-party privacy intersection method.
[0139] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned blockchain-based multi-party privacy intersection method are implemented.
[0140] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the steps of the above-mentioned blockchain-based multi-party private intersection method.
[0141] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0142] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0143] The present application is described 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 application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0146] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0147] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0148] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0149] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0150] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A multi-party privacy intersection method based on blockchain, characterized in that: include: Determine a registrant and a listener among multiple participants based on a pairwise parallel intersection mechanism, wherein any participant is the registrant or the listener, and a group of participants includes one registrant and one listener; Each participant uploads an encrypted dataset to the blockchain, and the registrant registers the blockchain contract event at the same time as the dataset is uploaded to the blockchain, wherein the encrypted dataset of each participant is obtained based on the private key generated by the participant and the dataset of the participant; The monitoring party monitors the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, performs a private intersection operation between any group of the monitoring party and the registrant, and obtains multiple private intersection results, and obtains a multi-party private intersection result based on at least the multiple private intersection results, wherein the on-chain information includes a key value.
2. The method according to claim 1, characterized in that The monitoring party monitors the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group. A private intersection operation is performed between any group of the monitoring party and the registrant to obtain multiple private intersection results, including: The monitoring parties in any group use the generated private key to encrypt the encrypted data set of the registrants in the same group to obtain a secondary encrypted data set of the registrants; The registering party in any group uses the generated private key to encrypt the encrypted data set of the monitoring party in the same group to obtain a secondary encrypted data set of the monitoring party; A preliminary privacy intersection operation is performed on the secondary encrypted data set of the registrant and the secondary encrypted data set of the monitor in each group to obtain a plurality of privacy intersection results.
3. The method according to claim 1, characterized in that Obtaining a multi-party privacy intersection result based on at least a plurality of the privacy intersection results includes: Performing a first round of private intersection operations between the plurality of private intersection results, to obtain a first-level intersection result; The i-th level intersection result is used as the input of the (i+1)-th round of private intersection operation, until the number of the m-th level intersection result is one, and the intersection results of each level are intersected with each other, 1≤i≤m; When the total number of the participating parties is an even number, determining the m-th level intersection result as the multi-party private intersection result; When the total number of the participants is an odd number, the m-th level intersection result is subjected to the (m+1)-th round of private intersection operation with the ungrouped participants to obtain the multi-party private intersection result.
4. The method according to claim 3, characterized in that The i-th level intersection result is used as the input of the (i+1)-th round of private intersection operation, until the number of the m-th level intersection result is one. The intersection results of each level are intersected with each other, 1≤i≤m, including: The intersection results at each level are encrypted using their respective private keys, wherein the private key of the intersection result at each level is generated by any participant participating in the calculation of the intersection result at each level; The encrypted intersection results of each level are intersected with each other until the number of the intersection results of the mth level is one.
5. The method according to claim 3, characterized in that When the total number of participants is an odd number, the m-th level intersection result is subjected to the (m+1) round of private intersection operation with the ungrouped participants to obtain the multi-party private intersection result, including: When the total number of participants is an odd number, encrypting the m-th level intersection result using the private key generated by the ungrouped participants to obtain an encrypted m-th level intersection result; Encrypting the ungrouped participants using the private key of the m-th level intersection result to obtain encrypted ungrouped participants, wherein the private key of the m-th level intersection result is generated by any one of all the participants participating in the m-th round of private intersection operation; The encrypted m-th level intersection result and the encrypted ungrouped participants are subjected to the m+1-th round of private intersection operation to obtain the multi-party private intersection result.
6. The method according to claim 1, characterized in that Before each of the participants uploads the encrypted data set to the blockchain and the registrant registers the blockchain contract event, the method further includes: All the participants determine an elliptic curve with shared parameters; Mapping each element of the data set of each participant onto the elliptic curve to obtain a data point set of each participant; The private key generated by each participant is used to encrypt the data point set corresponding to the participant to obtain the encrypted data set of each participant.
7. The method according to claim 1, characterized in that Determining a registrant and a listener among a plurality of participants based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of the participants includes one registrant and one listener, including: Randomly grouping the plurality of participants into pairs to obtain a plurality of groups; When the total number of the participating parties is an even number, determining the registering party and the monitoring party in each of the groups; When the total number of the participants is an odd number, except for the last ungrouped participant, the registered party and the monitored party in each group are determined. The registrants and the monitors in each group perform the privacy intersection operation simultaneously.
8. A device for multi-party privacy intersection based on blockchain, characterized in that: include: A first determining unit is configured to determine a registrant and a listener among a plurality of participants based on a pairwise parallel intersection mechanism, wherein any of the participants is the registrant or the listener, and a group of the participants includes one registrant and one listener; An uploading unit, configured to upload the encrypted dataset to the blockchain by each participant and simultaneously register the blockchain contract event by the registrant, wherein the encrypted dataset of each participant is obtained based on the private key generated by the participant and the dataset of the participant; A privacy intersection unit is configured to enable the monitoring party to monitor the on-chain information of the blockchain contract event to obtain the encrypted data set of the registrant in the same group, perform a privacy intersection operation between any group of the monitoring party and the registrant, and obtain multiple privacy intersection results, and obtain a multi-party privacy intersection result based on at least the multiple privacy intersection results, wherein the on-chain information includes a key value.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein, when the program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based multi-party privacy intersection method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the blockchain-based multi-party privacy intersection method according to any one of claims 1 to 7.