Privacy-preserving interaction methods and communication systems
By constructing a mapping table using hash and elliptic curve algorithms, and combining hash prefix filtering and elliptic curve encryption, the problems of high communication volume and low security in privacy intersection are solved, achieving efficient and secure data intersection calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies involve large communication volumes, long query times, and low security during privacy-preserving intersection processes.
A mapping table is constructed using hash and elliptic curve algorithms. A hash prefix filter is used to match the dataset, reducing communication volume. Elliptic curve algorithms are used to encrypt the data, improving security.
It reduces data communication volume, shortens query time, and improves the security of intersection of privacy sets.
Smart Images

Figure CN115758437B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of data processing, and in particular to a privacy-preserving intersection method and communication system. Background Technology
[0002] Private Set Intersection (PSI) is a specific application problem in the field of privacy computing, with significant theoretical and practical value. PSI allows multiple parties holding their own private datasets to compute the intersection of their data without revealing any information beyond the intersection. It can be used in scenarios such as data alignment and data discovery. For example, the first essential data processing step in longitudinal federated learning is aligning the data from each party; another example is friend discovery using address books in social media applications.
[0003] In existing technologies, when performing privacy-preserving intersection operations, participating parties need to return encrypted results of all data in their sets to the requesting party. This results in high communication volume, long query time, and low security. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a privacy-preserving intersection method and communication system to solve the above problems.
[0005] According to a first aspect of the present invention, a privacy-preserving intersection method is provided, wherein a requesting party constructs a first mapping table based on the processing results of a first dataset using a hash algorithm and an elliptic curve algorithm; a participating party constructs a second mapping table based on the processing results of a second dataset using a hash algorithm and an elliptic curve algorithm; the participating party matches the first mapping table with the second mapping table based on the processing results of the first dataset and the second dataset using a hash algorithm; the participating party encrypts the processing results of the first dataset and the second dataset using an elliptic curve algorithm to obtain encrypted data; and the requesting party searches for the data intersection that matches the encrypted data in the matching results of the first mapping table and the second mapping table.
[0006] In another implementation of the present invention, a first mapping table is constructed based on the processing results of the first dataset using a hash algorithm and an elliptic curve algorithm, including: mapping the first dataset using a hash algorithm to obtain multiple first hash results; encrypting the multiple first hash results using an elliptic curve algorithm to obtain multiple first public keys; and associating the multiple first hash results and the multiple first public keys with the first mapping table.
[0007] In another implementation of the present invention, the plurality of first hash results are encrypted using an elliptic curve algorithm to obtain a plurality of first public keys, including: generating a first private key using an elliptic curve algorithm; mapping the plurality of first hash results onto an elliptic curve to obtain a plurality of base points; and calculating the first private key and the plurality of base points using an elliptic curve algorithm to obtain a plurality of first public keys.
[0008] In another implementation of the present invention, associating multiple first hash results and multiple first public keys with the first mapping table includes: presetting a first prefix length; extracting the first prefix results of the multiple first hash results according to the first prefix length; associating the first prefix results with the first public keys and storing them in the first mapping table.
[0009] In another implementation of the present invention, a second mapping table is constructed based on the processing results of the second dataset using a hash algorithm and an elliptic curve algorithm, including: mapping the second dataset using a hash algorithm to obtain multiple second hash results; encrypting the multiple second hash results using an elliptic curve algorithm to obtain multiple second public keys; and associating the multiple second hash results and the multiple second public keys with the second mapping table.
[0010] In another implementation of the present invention, the second public key is obtained by processing the second dataset using an elliptic curve algorithm, including: generating a second private key using an elliptic curve algorithm; mapping the second hash result of the second dataset onto an elliptic curve to obtain multiple base points; and calculating the second public key using the second private key and the multiple base points using an elliptic curve algorithm.
[0011] In another implementation of the present invention, associating multiple second hash results and multiple second public keys with a second mapping table includes: presetting a second prefix length; extracting the second prefix result of the second hash result according to the second prefix length; associating the second prefix result with the second public key and storing it in the second mapping table.
[0012] In another implementation of the present invention, matching the first mapping table and the second mapping table based on the processing results of the first dataset and the second dataset using a hash algorithm includes: the requester processing the first dataset using a hash algorithm to obtain a first hash result; extracting a first prefix result from the first hash result, the first prefix result being used to construct the first mapping table; the participant processing the second dataset using a hash algorithm to obtain a second hash result; extracting a second prefix result from the second hash result, the second prefix result being used to construct the second mapping table; and matching the first prefix result in the first mapping table with the second prefix result in the second mapping table.
[0013] In another implementation of the present invention, the requester searches for the data intersection that matches the encrypted data in the matching results of the first mapping table and the second mapping table, including: decrypting the encrypted data to obtain decrypted data; and matching the decrypted data with the matching results of the first dataset and the second dataset to form a data intersection.
[0014] According to a second aspect of the present invention, a communication system is provided, comprising: a requesting device and a participating device; wherein the requesting device constructs a first mapping table based on the processing results of a first dataset using a hash algorithm and an elliptic curve algorithm; the participating device constructs a second mapping table based on the processing results of a second dataset using the hash algorithm and the elliptic curve algorithm; the participating device matches the first mapping table and the second mapping table based on the processing results of the first dataset and the second dataset using the hash algorithm; the participating device encrypts the processing results of the first dataset and the second dataset using the elliptic curve algorithm to obtain encrypted data; and the requesting device searches for the intersection of data matching the encrypted data in the matching results of the first mapping table and the second mapping table.
[0015] This invention provides a privacy-preserving intersection method. The requesting party constructs a first mapping table based on the processing results of a first dataset using a hash algorithm and an elliptic curve algorithm. The participating parties construct a second mapping table based on the processing results of a second dataset using the same hash algorithm. The participating parties match the first and second mapping tables based on the hash algorithm results of the first and second datasets. The participating parties then encrypt the processing results of the first and second datasets using the elliptic curve algorithm to obtain encrypted data. The requesting party searches for the intersection of the encrypted data with the matching results of the first and second mapping tables. This privacy-preserving intersection method uses a hash algorithm to process the data, allowing the participating parties to return data with the same matching result to the requesting party, while data with different matching results is not returned, reducing data communication overhead. Furthermore, the encryption of data using the elliptic curve algorithm improves the security of privacy-preserving intersection. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. By reading the detailed description of the embodiments below, the advantages and benefits of the solutions will become clear to those skilled in the art. The accompanying drawings are only for illustrating preferred embodiments and are not intended to limit the present invention. In the accompanying drawings:
[0017] Figure 1 This is a flowchart illustrating the steps of a privacy-preserving intersection method according to an embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of a communication system according to another embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0020] This invention provides a privacy-preserving intersection method. Figure 1 A flowchart illustrating the steps of a privacy-preserving intersection method provided in an embodiment of the present invention is shown below. Figure 1 As shown, this embodiment mainly includes:
[0021] S101. The requester constructs a first mapping table based on the processing results of the first dataset using the hash algorithm and the elliptic curve algorithm.
[0022] For example, the requester holds a first dataset X = {x1, x2, ..., x...} m}, where m is a real number, x i For any data point in dataset X, where 1 ≤ i ≤ m, use a hash algorithm to hash the data point x. i After processing, the hash result H(x) is obtained. i ), using the elliptic curve algorithm to hash the result H(x) i Process it according to the hash result H(x) i The first mapping table is constructed using the results of the elliptic curve algorithm and the processing results of the algorithm. In this embodiment, one requester is used as an example, but multiple requesters are also possible; the number of requesters is not specifically limited.
[0023] The requesting party can either first process the first dataset using a hash algorithm and then calculate the encryption result using an elliptic curve algorithm, or first calculate the encryption result using an elliptic curve algorithm and then process the first dataset using a hash algorithm. In this embodiment, hash processing is performed first as an example, and the specific order of the two processing steps is not limited.
[0024] S102. The participants construct a second mapping table based on the processing results of the second dataset using the hash algorithm and the elliptic curve algorithm, respectively.
[0025] For example, the participants hold a second dataset Y = {y1, y2, ..., y}. n}, where n is a real number, y jFor any data point in dataset Y, where 1 ≤ j ≤ n, use a hash algorithm to hash the data y. j After processing, the hash result H(y) is obtained. j ), using the elliptic curve algorithm to hash the result H(y) j Process it according to the hash result H(y) j The results of the elliptic curve algorithm are used to construct a second mapping table. This embodiment uses one participant as an example, but multiple participants are also possible; the number of participants is not specifically limited.
[0026] Participants can either first use a hash algorithm to calculate the hash result and then use an elliptic curve algorithm to calculate the encryption result, or they can first use an elliptic curve algorithm to calculate the encryption result and then use a hash algorithm to calculate the hash result. In this embodiment, hashing is performed first as an example, and the order of the two processes is not specifically limited.
[0027] When the amount of data in the initial dataset Y held by a participating party is significantly greater than the amount of data in the dataset X held by the requesting party, the participating party can process the data first. In this embodiment, the requesting party processes the dataset first as an example, and there is no specific limitation on the order in which the requesting party and the participating party process the datasets.
[0028] S103. The participants match the first mapping table with the second mapping table based on the processing results of the first dataset and the second dataset using the hash algorithm.
[0029] For example, a participant receives a first mapping table sent by the requester, parses it to obtain the processing result of the hash algorithm on the first dataset, and then filters the data in the second mapping table using a hash prefix filter. Specifically, the participant searches the second mapping table for the hash algorithm's processing result on the second dataset that matches the result of the hash algorithm on the first dataset, constructs a new mapping table from the matching results, and sends the new mapping table to the requester. This embodiment uses a hash prefix filter as an example; however, any specified range of hash field content can be used as the filtering condition, and no specific limitations are imposed on the filtering conditions used.
[0030] S104. The participants encrypt the processing results of the first dataset and the second dataset using the elliptic curve algorithm to obtain encrypted data.
[0031] For example, the participants further encrypt the processing results of the first and second datasets using the elliptic curve algorithm to obtain encrypted data. This embodiment uses the elliptic curve algorithm for illustrative purposes; other encryption algorithms can also be used, and no specific limitation is made on the encryption algorithm used.
[0032] Participants can first use a hash algorithm to process the results of the first and second datasets, matching the first and second mapping tables. Then, they can use an elliptic curve algorithm to encrypt the results of the first and second datasets, obtaining encrypted data. Alternatively, they can first encrypt the results of the first and second datasets using an elliptic curve algorithm, obtaining encrypted data, and then use a hash algorithm to match the results of the first and second datasets, matching the first and second mapping tables. In this embodiment, matching the first and second mapping tables is used first as an example, and the specific order of the two processes is not specified.
[0033] S105. The requester searches for the intersection of data that matches the encrypted data in the matching results of the first mapping table and the second mapping table.
[0034] For example, the requester decrypts the encrypted data to obtain decrypted data, and then searches for matching data in the matching results of the first and second mapping tables to form a data intersection.
[0035] In the solution of this embodiment of the invention, by using a hash prefix filter, the participants only need to return the data that matches the processing result of the requester's hash algorithm on the first dataset to the requester, without having to return all the data in their own set to the requester. This reduces the communication volume of each participant while ensuring a high degree of data matching, and further shortens the query time for the requester. Data that does not match the processing result of the requester's hash algorithm on the first dataset does not need to be returned, thus improving the security of the participants' datasets.
[0036] In another implementation of the present invention, the requester constructs a first mapping table based on the processing results of the first dataset using a hash algorithm and an elliptic curve algorithm, including: mapping the first dataset using a hash algorithm to obtain multiple first hash results; encrypting the multiple first hash results using an elliptic curve algorithm to obtain multiple first public keys; and associating the first hash results and the first public keys with the first mapping table.
[0037] For example, the requester holds a first dataset X = {x1, x2, ..., x...} m}, where m is a real number, x iFor any data point in dataset X, where 1 ≤ i ≤ m, use a hash algorithm to hash the data point x. i After processing, the first hash result H(x) is obtained. i The key k is generated using the elliptic curve algorithm, and the first hash result H(x) is used. i A point G mapped onto the elliptic curve i The key k and base point G are determined using the elliptic curve algorithm. i The first public key kG is obtained through calculation. i The requesting party maps the multiple first prefix results obtained by the hash algorithm to the multiple first public keys obtained by the elliptic curve algorithm, forming a first mapping table, and sends it to the participating parties.
[0038] In another implementation of the present invention, multiple first hash results are encrypted using an elliptic curve algorithm to obtain multiple first public keys, including: generating a first private key using an elliptic curve algorithm; mapping multiple first hash results onto an elliptic curve to obtain multiple base points; and calculating the first private key and the multiple base points using an elliptic curve algorithm to obtain a first public key.
[0039] For example, a first private key k is generated using an elliptic curve algorithm, and the first hash result H(x) is... i A point G mapped onto the elliptic curve i The first private key k and the base point G are obtained through elliptic curve algorithm. i The first public key kG is obtained through calculation. i .
[0040] In the solution of this invention embodiment, based on the OT protocol, the data is encrypted using the elliptic curve algorithm, which ensures the security of the data during the intersection process. At the same time, the elliptic curve algorithm can be used for two-party and multi-party calculations, and is suitable for most scenarios of intersection of privacy sets.
[0041] In another implementation of the present invention, associating multiple first hash results and a first public key with a first mapping table includes: presetting a first prefix length; extracting the first prefix results of multiple first hash results according to the first prefix length; associating the first prefix results with the first public key and storing them in the first mapping table.
[0042] For example, multiple first prefix results are extracted based on the first prefix length l, i.e., the first hash result H(x) i The content of the first l units of ), where l is a real number; for example, the first hash result H(x1) is A8B13F529C64D572. If the length of the first prefix is 4, the extracted first prefix result is A8B1. If the length of the first prefix is 5, the extracted first prefix result is A8B13.
[0043] Furthermore, the requester combines the first prefix result obtained by the hash algorithm with the first public key kG obtained by the elliptic curve algorithm. i A one-to-one mapping is established to form the first mapping table, which is then sent to the participants.
[0044] In the embodiment of the present invention, the dataset is hashed, and by flexibly adjusting the hash prefix length, flexible control over communication volume and efficiency can be achieved in different scenarios; the first mapping table sent by the requester to the participants includes the first prefix result and the first public key kG. i Since the participating parties do not know the requester's key k, they cannot resolve the dataset X and base point G held by the requester. i This improves the security of the requester's data during transmission, allowing for the collection of any data within the system.
[0045] In another implementation of the present invention, the participants construct a second mapping table based on the processing results of the second dataset using a hash algorithm and an elliptic curve algorithm, including: mapping the second dataset using a hash algorithm to obtain multiple second hash results; encrypting the second hash results using an elliptic curve algorithm to obtain multiple second public keys; and associating the second hash results and the second public keys with the second mapping table.
[0046] For example, the participants hold a second dataset Y = {y1, y2, ..., y}. n}, where n is a real number, y j For any data point in dataset Y, where 1 ≤ j ≤ n, use a hash algorithm to hash the data y. j After processing, the second hash result H(y) is obtained. j The second hash result H(y) is processed using the elliptic curve algorithm. j The second public key is obtained by processing the second hash result H(y). j The second public key and the second public key are used to construct the second mapping table.
[0047] The requester calculates the first hash result H(x) i ) and the participants in calculating the second hash result H(y) j When x is used, the hash algorithm and configuration parameters must remain consistent. That is, ensure that when x... i The second hash result y j When data values are equal, H(x) is calculated using a hash algorithm. i ) and H(y j) The data values should also be equal.
[0048] In another implementation of the present invention, the second hash result H(y) is processed using an elliptic curve algorithm. jThe encryption process is performed to obtain multiple second public keys, including: generating a second private key using an elliptic curve algorithm; mapping the second hash result of the second dataset onto an elliptic curve to obtain multiple base points; and processing the second private key and multiple base points using an elliptic curve algorithm to obtain multiple second public keys.
[0049] For example, the key r is generated using the elliptic curve algorithm, and the second hash result H(y) is... j A point P mapped onto the elliptic curve j The key r and the base point P are determined using the elliptic curve algorithm. j The second public key rP is obtained through calculation. j .
[0050] The requester will use the first hash result H(x) i A point G mapped onto the elliptic curve i "and "The participants will use the second hash result H(y) j A point P mapped onto the elliptic curve j In this context, both parties use the same elliptic curve, meaning an elliptic curve with the same parameters. This ensures that when the first hash result H(x) is obtained... i ) and the second hash result H(y) j When data values are equal, the base point G mapped onto the elliptic curve i and P j They should also be based on the same point.
[0051] In another implementation of the present invention, associating multiple second hash results and multiple second public keys with a second mapping table includes: presetting a second prefix length; extracting the second prefix result of the second hash result according to the second prefix length; associating the second prefix result with multiple second public keys and storing them in the second mapping table.
[0052] For example, multiple second prefix results are extracted based on the second prefix length s, i.e., the second hash result H(y) j The first s units of the hash function are represented by the hash function H(y1), where s is a real number. For example, if the second hash result H(y1) is A8B14761C792381E, and the length of the second prefix is 4, the extracted result before the second prefix is A8B1; if the length of the second prefix is 5, the extracted result before the second prefix is A8B14. In this embodiment, one participant is used as an example, but there can be multiple participants, and the number of participants is not specifically limited.
[0053] Furthermore, the participants map the second prefix result obtained by the hash algorithm to the second public key obtained by the elliptic curve algorithm, forming a second mapping table and storing it locally.
[0054] In the embodiment of the present invention, the dataset is hashed, and the communication volume and efficiency are flexibly controlled in different scenarios by flexibly adjusting the hash prefix length; the data is encrypted by elliptic curve algorithm, which improves the security of the dataset during transmission.
[0055] In another implementation of the present invention, the participants match the first mapping table and the second mapping table based on the processing results of the first dataset and the processing results of the second dataset using a hash algorithm, including: processing the first dataset using a hash algorithm to obtain a first hash result; extracting a first prefix result from the first hash result, the first prefix result being used to construct the first mapping table; processing the second dataset using a hash algorithm to obtain a second hash result; extracting a second prefix result from the second hash result, the second prefix result being used to construct the second mapping table; and matching the first prefix result in the first mapping table with the second prefix result in the second mapping table.
[0056] For example, based on the first prefix result, the participant filters the data in the second mapping table using a hash prefix filter. Specifically, the participant searches the second mapping table for a second prefix result that matches the first prefix result, constructs a new mapping table from the matching results, and sends the new mapping table to the requester. The new mapping table contains the second prefix result that matches the first prefix result, as well as the second public key corresponding to that second prefix result in the original second mapping table. For instance, if the first mapping table contains first prefix results A8B1 and A8B2, and the second mapping table contains second prefix results A8B1, A8B2, and A8B3, then the participant needs to search the second mapping table for the second prefix results A8B1 and A8B2 that match the first prefix result, as well as the second public key corresponding to A8B1 and A8B2. This embodiment uses a hash prefix filter for illustrative purposes; however, any hash field content within a specified range can be used as the filtering condition, and no specific limitations are imposed on the filtering conditions used.
[0057] In the scheme of this embodiment of the invention, by using a hash prefix filter, each participant only needs to return the data that matches the first prefix result of the requester, without having to return all the data in its own set. This reduces the communication volume of each participant while ensuring a high data matching degree, further shortening the query time for the requester. The data sent by the participants to the requester includes the second prefix result and the second public key rP. j Since the requester does not know the participant's key r, it cannot resolve the participant's dataset Y and base point P. j This enhances the security of data transmitted by participating parties, allowing for the collection of any data within the system.
[0058] For example, when the length of the first prefix l is equal to the length of the second prefix s, the hash prefix lengths in the first mapping table and the second mapping table are equal. In the process of the participants obtaining a new mapping table through the filter, the hash prefix parts in the first mapping table and the second mapping table are matched. Only those whose content and length are completely matched can pass the filter and become the constituent data of the new mapping table.
[0059] When the length of the first prefix l is less than the length of the second prefix s, matching items are filtered according to the length of the first prefix l; when the length of the first prefix l is greater than the length of the second prefix s, matching items are filtered according to the result of the second prefix s. In this embodiment, the size of the prefix length is explained by way of example. The suffix or any intermediate field of the hash result can also be used as the filtering condition. This application does not impose specific limitations on the filtering conditions.
[0060] In the scheme of this embodiment of the invention, the smaller the prefix length value, the more matching data the participants will obtain through the filter, and the more data the participants return to the requester and the more data the requester receives from the participants. This reduces the risk of brute-force collisions and further improves the security of the privacy intersection process. However, it leads to an increase in the amount of communication between the parties. Therefore, it is necessary to select an appropriate prefix length according to the specific scenario and make a trade-off between security and communication volume in the privacy intersection process.
[0061] In another implementation of the present invention, the requesting party searches for the data intersection that matches the encrypted data in the matching results of the first mapping table and the second mapping table, including: decrypting the encrypted data to obtain decrypted data; matching the decrypted data with the matching results of the first mapping table and the second mapping table, and the resulting matching data forming the data intersection.
[0062] For example, the participants use the second private key r and the first public key kG i The encrypted data rkG is obtained by calculating using the elliptic curve algorithm. i and encrypt the data rkG i The data is sent to the requesting party, which receives the data returned by the participating party and parses it to obtain the encrypted data rkG. i The requester obtains the decryption result by calculating the matching results of the first and second mapping tables, using the following formula:
[0063] k -1 rkG i =rG i
[0064] Where k is the first private key, r is the second private key, and G i The first hash result H(x) i Map the points onto the elliptic curve.
[0065] Search and decrypt the result rG in the matching results of the first and second mapping tables. i Matching data yields the data intersection.
[0066] Optionally, the second public key rP in the matching results of the first and second mapping tables can be obtained using an elliptic curve algorithm. j The second encrypted data krP is obtained by calculating with the first private key k. j Then, based on the first encrypted data rkG i Find the matching second encrypted data krP j This allows us to obtain the data intersection between the requester and the participants. This embodiment provides an illustrative description of the method for finding matches, but does not specifically limit the method used.
[0067] Optionally, if the participating parties also need the intersection result, the requesting party shall obtain the hash ciphertext from the matching result of the first and second mapping tables based on the key k, which is the corresponding second encryption result rP. j Calculate and obtain the second encrypted data krP j This generates a mapping table and returns it to the participants. The participants receive and parse the second encrypted data krP from the mapping table. j , with the first encrypted data rkG i By performing matching, we can obtain the data intersection between the requester and the participants.
[0068] Furthermore, this method can also be used in scenarios where multiple parties jointly solve for the intersection of data. Taking the intersection of privacy sets by the requester, participant 1, and participant 2 as an example, when all participants have equal status and the processing procedures are the same, the efficiency of the privacy set intersection can be improved through distributed parallel processing. While the requester is sending the first mapping table to participant 1, it is simultaneously sending the first mapping table to participant 2, thereby triggering participant 2 to perform a similar privacy intersection method as participant 1. In step S105, since the requester receives data returned by participants 1, participant 2, and others, the intersection of the data from all parties can be obtained through parsing.
[0069] When the requester serially processes the data intersection with each participant, in special scenarios, such as when each participant has a large dataset and the intersection result is large, in order to improve the efficiency of obtaining the multi-party data intersection, the requester can serially process the data intersection with each participant. That is, the requester follows the steps of the privacy intersection method. First, the requester and participant 1 obtain the data intersection between the two parties. Then, based on the data intersection, the requester sends a privacy intersection request to participant 2, and so on. Each time the intersection result is obtained, the data size of the intersection set will be smaller than the previous one, until the privacy intersection process is performed with all participants to obtain the final multi-party intersection result.
[0070] In the embodiment of the present invention, the data sent by the participant to the requester includes an encryption result and a matching result of the first mapping table and the second mapping table. The matching result of the first mapping table and the second mapping table includes a portion of the second prefix result and a portion of the second initial encryption result. Since the requester does not know the participant's key r, it cannot parse and obtain any data in the participant's dataset and base point. This achieves the goal of data being available but not visible, thereby improving the security of the dataset.
[0071] In another implementation of the present invention, Figure 2 A communication system 200 is provided, comprising: a requesting device 201 and a participating device 202; wherein, the requesting device 201 constructs a first mapping table based on the processing results of a first dataset using a hash algorithm and an elliptic curve algorithm; the participating device 202 constructs a second mapping table based on the processing results of a second dataset using the hash algorithm and the elliptic curve algorithm; the participating device 202 matches the first mapping table with the second mapping table based on the processing results of the first dataset and the second dataset using the hash algorithm; the participating device 202 encrypts the processing results of the first dataset and the second dataset using the elliptic curve algorithm to obtain encrypted data; and the requesting device 201 searches for the intersection of data matching the encrypted data in the matching results of the first mapping table and the second mapping table.
[0072] The privacy-preserving intersection method of this invention processes data using a hash algorithm. Participants return data with the same matching result to the requester, while data with different matching results are not returned, reducing data communication volume. Furthermore, since data with different matching results is not returned, and the data is encrypted using an elliptic curve algorithm, the security of data in privacy set intersection is improved. This method can be used in business fields such as food, pharmaceuticals, cosmetics, medical devices, and communications, without specific limitations on the application field.
[0073] Specific embodiments of the invention have now been described. Other embodiments are within the scope of the appended claims. In some cases, the actions described in the claims can be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing can be advantageous.
[0074] It should be noted that all directional indicators (such as up, down, left, right, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0075] In the description of this invention, the terms "first" and "second" are used only for convenience in describing different components or names, and should not be construed as indicating or implying a sequential relationship, relative importance, or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first" and "second" may explicitly or implicitly include at least one of that feature.
[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0077] It should be noted that although specific embodiments of the present invention have been described in detail with reference to the accompanying drawings, this should not be construed as limiting the scope of protection of the present invention. Various modifications and variations that can be made by those skilled in the art without inventive effort within the scope described in the claims still fall within the scope of protection of the present invention.
[0078] The examples of the embodiments of the present invention are intended to concisely illustrate the technical features of the embodiments of the present invention, so that those skilled in the art can intuitively understand the technical features of the embodiments of the present invention, and are not intended to be an improper limitation of the embodiments of the present invention.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A privacy-preserving intersection method, the method comprising: The requesting party constructs a first mapping table based on the processing results of a first dataset using a hash algorithm and an elliptic curve algorithm. This includes: the requesting party, using a preset first prefix length, processes the first dataset using the hash algorithm and the elliptic curve algorithm, extracts a first prefix result from the processing result of the first dataset, and associates the first prefix result with a first public key corresponding to the processing result of the first dataset to construct the first mapping table; processes the first dataset using the hash algorithm to obtain a first hash result; and extracts a first prefix result from the first hash result, which is used to construct the first mapping table. The participants construct a second mapping table based on the processing results of the second dataset using the hash algorithm and the elliptic curve algorithm; this includes: processing the second dataset using the hash algorithm and the elliptic curve algorithm with a preset second prefix length, extracting the second prefix result of the processing result of the second dataset, and associating the second prefix result with the second public key corresponding to the processing result of the second dataset to construct the second mapping table; The participants process the second dataset using the hash algorithm to obtain a second hash result; extract a second prefix result from the second hash result, which is used to construct the second mapping table; match the first prefix result in the first mapping table with the second prefix result in the second mapping table to obtain the matching result of the requester in the first mapping table and the second mapping table; the participants encrypt the processing results of the first dataset and the second dataset based on the elliptic curve algorithm to obtain encrypted data; The requesting party searches for the intersection of data that matches the encrypted data in the matching results of the first mapping table and the second mapping table.
2. The method as described in claim 1, wherein constructing the first mapping table based on the processing results of the first dataset using the hash algorithm and the elliptic curve algorithm comprises: The first dataset is mapped using the hash algorithm to obtain multiple first hash results; The multiple first hash results are encrypted using the elliptic curve algorithm to obtain multiple first public keys; The plurality of first hash results and the plurality of first public keys are associated with the first mapping table.
3. The method as described in claim 2, characterized in that, The elliptic curve algorithm is used to encrypt the plurality of first hash results to obtain a plurality of first public keys, including: The first private key is generated using the elliptic curve algorithm. The multiple first hash results are mapped onto the elliptic curve to obtain multiple base points; The first private key and the plurality of base points are calculated using the elliptic curve algorithm to obtain the plurality of first public keys.
4. The method as described in claim 1, wherein constructing the second mapping table based on the processing results of the second dataset using the hash algorithm and the elliptic curve algorithm comprises: The second dataset is mapped using the hash algorithm to obtain multiple second hash results; The multiple second hash results are encrypted using the elliptic curve algorithm to obtain multiple second public keys; The plurality of second hash results and the plurality of second public keys are associated with the second mapping table.
5. The method as described in claim 4, characterized in that, The elliptic curve algorithm is used to encrypt the multiple second hash results to obtain multiple second public keys, including: The second private key is generated using the elliptic curve algorithm. The multiple second hash results are mapped onto the elliptic curve to obtain multiple base points; The second private key and the plurality of base points are calculated using the elliptic curve algorithm to obtain the plurality of second public keys.
6. The method as described in claim 1, characterized in that, The step of finding the intersection of data matching the encrypted data in the matching results of the first mapping table and the second mapping table includes: The encrypted data is decrypted to obtain decrypted data; In the matching results of the first mapping table and the second mapping table, find the data that is the same as the decrypted data to obtain the data intersection.
7. A communication system, comprising: Requester's equipment and participant's equipment; The requesting device obtains the processing result of the first dataset based on a hash algorithm and an elliptic curve algorithm by presetting a first prefix length, extracts the first prefix result of the processing result of the first dataset, and associates the first prefix result with the first public key corresponding to the processing result of the first dataset to construct a first mapping table; and processes the first dataset through the hash algorithm to obtain a first hash result; and extracts the first prefix result of the first hash result, which is used to construct the first mapping table. The participating device obtains the processing result of the second dataset based on the hash algorithm and the elliptic curve algorithm by preset the second prefix length, extracts the second prefix result of the processing result of the second dataset, and associates the second prefix result with the second public key corresponding to the processing result of the second dataset to construct a second mapping table; The participating device processes the second dataset using the hash algorithm to obtain a second hash result; extracts a second prefix result from the second hash result, which is used to construct the second mapping table; and matches the first prefix result in the first mapping table with the second prefix result in the second mapping table to obtain the matching result of the requesting device in the first mapping table and the second mapping table. The participating device encrypts the processing results of the first dataset and the second dataset based on the elliptic curve algorithm to obtain encrypted data; The requesting device searches for the intersection of data that matches the encrypted data in the matching results of the first mapping table and the second mapping table.
Citation Information
Patent Citations
Privacy protection set intersection acquisition method and device based on domestic cryptographic algorithm
CN114640444A