A privacy data trusted comparison method, system, device and computer medium
Through polynomial sharing and blockchain on-chain mechanism, the credibility and privacy issues of data comparison in multi-party secure calculations are solved, data comparison results with high credibility and privacy are achieved, and the credibility and privacy issues in the existing technology are filled. A void of insufficient privacy.
Patent Information
- Application Number
- CN202211157062.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing multi-party secure computing technology is difficult to achieve data comparison without a trusted third party, and the trust issue between participants has not been effectively resolved, resulting in limitations in data privacy and the reliability of comparison results.
By generating and calculating polynomial shared shares, the blockchain on-chain mechanism is used to ensure data privacy and credibility in the data comparison process. Specific steps include obtaining and generating secret shared polynomials, calculating and sending secret shares, and calculating differences and products. value, and finally go up the chain to determine the data comparison result.
It ensures the credibility and privacy of data comparison results without exposing data differences, solves the credibility problem between participants, and improves the usability of multi-party secure calculations.
Smart Images

Figure CN115567202B
Abstract
Description
Technical Field
[0001] The present application relates to the field of privacy computing technology, and more specifically, to a privacy data trusted comparison method, system, device and computer medium. Background Art
[0002] In 1982, Professor Yao Qizhi proposed the famous millionaire problem. Two millionaires wanted to compare who was richer, but they didn't want to reveal how much money they had. Based on this, the first multi-party secure computing protocol was proposed. Multi-party secure computing is a current research hotspot in the field of cryptography and has produced a large number of practical applications in industry. It enables participants to confidentially calculate a specific function without a trusted third party. At present, most mainstream multi-party secure computing frameworks use secret sharing sharding to share secrets. The main sharding methods are arithmetic sharing mentioned by Atallah et al. in 2004, Boolean sharing proposed by Goldreich et al. in 1987, Yao sharing based on the obfuscated circuit design proposed by Professor Yao Qizhi in 1982, and threshold secret sharing proposed by Shamir based on polynomial interpolation in 1979. Demmler et al. proposed the ABY framework in 2015, which realized the conversion between Boolean sharing, arithmetic sharing, and Yao sharing, and summarized the basic calculation methods such as addition, subtraction, multiplication, and comparison of the above three sharing methods. Boolean sharing, arithmetic sharing, and Yao sharing all require all fragments to recover the secret, while threshold secret sharing can recover the secret when the number of fragments obtained is greater than the threshold, which is more suitable for application scenarios that require access control. Ben-Or et al. designed the BGW algorithm based on Shamir threshold secret sharing, which supports addition, subtraction, multiplication, and multiplication operations, but does not support comparison algorithms. Due to the different ciphertext forms, privacy comparison algorithms designed based on other secret sharing methods cannot be directly applied to threshold secret sharing. The lack of comparison algorithms limits the availability of the BGW algorithm.
[0003] At the same time, after calculating the shard secret, each participant selects a participant to collect a share to restore the secret and publish it, or each participant broadcasts the secret to restore the calculation result. This method solves the data privacy problem between the participants, but does not solve the trust problem between the participants. There is a possibility that a participant steals the correct result and others get the wrong result. Blockchain is an effective technical means to solve the trust problem. The threshold property of BGW ensures that the recovery results of different combinations can be compared after the fragment results are finally uploaded to the chain, eliminating the possibility of participants doing evil. This property is not available in other sharing methods, but BGW does not have an effective comparison algorithm, which limits the availability of the BGW algorithm.
[0004] In summary, how to enable credible and private data comparison between data comparison participants is an urgent problem to be solved by technical personnel in this field. Summary of the invention
[0005] The purpose of this application is to provide a trusted comparison method for private data, which can solve the technical problem of how to make trusted and private data comparison between data comparison participants to a certain extent. This application also provides a trusted comparison system, device and computer-readable storage medium for private data.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A privacy data trustworthy comparison method is applied to a target data provider, comprising:
[0008] Obtaining its own first data and generating a first random number;
[0009] Generate a first secret sharing polynomial of the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include the target data provider, another data provider and other participants;
[0010] generating a second secret sharing polynomial of the first random number, and calculating a second secret share of each of the data processors based on the second secret sharing polynomial;
[0011] Sending the first secret share and the second secret share to the corresponding data processor;
[0012] receiving a third secret share and a fourth secret share of the target data provider sent by the other data provider, the third secret share comprising a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share comprising a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial comprising a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial comprising a secret sharing polynomial of a second random number generated by the other data provider;
[0013] Calculate the difference between the first secret share and the third secret share of the target data provider, and obtain the fifth secret sharing share of the target data provider based on the difference of the target data provider;
[0014] Calculate a first product value between the second secret share and the fourth secret share of the target data provider, and obtain a sixth secret sharing share of the target data provider based on the first product value of the target data provider;
[0015] Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain a seventh secret sharing share of the target data provider based on the second product value of the target data provider;
[0016] The seventh secret sharing of the target data provider is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors.
[0017] Preferably, the first secret sharing polynomial for generating the first data includes:
[0018] Based on a secret sharing generation formula, generate a first cryptographic shared polynomial of the first data;
[0019] The secret sharing generation formula includes:
[0020] f(x)=m+m1x+m2x 2 +...+m t-1 x t-1 ;
[0021] Wherein, f(x) represents a secret sharing polynomial; m represents target data; t represents a secret decryption threshold, t≤n, and n represents the total number of the data processing parties.
[0022] Preferably, the step of calculating the first secret share of each data processor based on the first secret sharing polynomial includes:
[0023] Calculate the first secret share of each data processor based on the first secret sharing polynomial using a secret share generation formula;
[0024] The secret share generation formula includes:
[0025] g(i)=f(i); 1≤i≤n;
[0026] Wherein, g(i) represents the secret share of the i-th data processor.
[0027] Preferably, obtaining the fifth secret sharing share of the target data provider based on the difference comprises:
[0028] Reducing the difference based on the Vandermonde matrix and the target matrix to obtain the fifth secret sharing share of the target data provider;
[0029] The step of obtaining a sixth secret sharing share of the target data provider based on the first product value comprises:
[0030] Based on the Vandermonde matrix and the target matrix, the first product value is reduced to obtain the sixth secret sharing share of the target data provider;
[0031] The step of obtaining a seventh secret sharing share of the target data provider based on the second product value comprises:
[0032] Based on the Vandermonde matrix and the target matrix, the second product value is reduced to obtain the seventh secret sharing share of the target data provider;
[0033] Among them, P(i,j)=1 in the target matrix, i=j≤t, and the values of other positions are zero.
[0034] Preferably, the seventh secret sharing share of the target data provider is put on the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors, including:
[0035] The seventh secret sharing share of the target data provider is uploaded to the chain, so that the blockchain obtains the seventh secret sharing share published by the other data provider and the other participants, reduces the order of all the seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain a target value, and determines a comparison result between the first data and the second data based on the target value.
[0036] Preferably, after uploading the seventh secret sharing share of the target data provider to the chain, the method further includes:
[0037] A secure multi-party computing framework is constructed based on the comparison result.
[0038] A trusted comparison method for private data, applied to a target party, includes:
[0039] Receive a first secret share and a second secret share of the target participant sent by a target data provider, wherein the first secret share includes a secret share generated by the target data provider for each data processor based on a first secret sharing polynomial, and the second secret share includes a secret share generated by the target data provider for each data processor based on a second secret sharing polynomial, the first secret sharing polynomial includes a secret sharing polynomial of first data generated by the target data provider, and the second secret sharing polynomial includes a secret sharing polynomial of a first random number generated by the target data provider, and the data processors include the target data provider, another data provider, the target participant and other participants;
[0040] receiving a third secret share and a fourth secret share of the target participant sent by the other data provider, wherein the third secret share includes a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share includes a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial includes a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial includes a secret sharing polynomial of a second random number generated by the other data provider;
[0041] Calculate the difference between the first secret share and the third secret share of the target party, and obtain the fifth secret share of the target party based on the difference of the target party;
[0042] Calculate a first product value between the second secret share and the fourth secret share of the target participant, and obtain a sixth secret sharing share of the target participant based on the first product value of the target participant;
[0043] Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target party, and obtain a seventh secret sharing share of the target party based on the second product value of the target party;
[0044] The seventh secret sharing share of the target participant is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors.
[0045] A privacy data trusted comparison system, applied to a target data provider, includes:
[0046] A first acquisition module, used to acquire its own first data and generate a first random number;
[0047] A first generating module, configured to generate a first secret sharing polynomial of the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include the target data provider, another data provider, and other participants;
[0048] A second generating module, configured to generate a second secret sharing polynomial of the first random number, and calculate a second secret share of each of the data processors based on the second secret sharing polynomial;
[0049] A first sending module, configured to send the first secret share and the second secret share to the corresponding data processor;
[0050] a first receiving module, configured to receive a third secret share and a fourth secret share of the target data provider sent by the other data provider, the third secret share comprising a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share comprising a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial comprising a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial comprising a secret sharing polynomial of a second random number generated by the other data provider;
[0051] a first calculation module, configured to calculate a difference between the first secret share and the third secret share of the target data provider, and obtain a fifth secret sharing share of the target data provider based on the difference of the target data provider;
[0052] a second calculation module, configured to calculate a first product value between the second secret share of the target data provider and the fourth secret share, and obtain a sixth secret sharing share of the target data provider based on the first product value of the target data provider;
[0053] a third calculation module, configured to calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain a seventh secret sharing share of the target data provider based on the second product value of the target data provider;
[0054] The first uplink module is used to uplink the seventh secret sharing share of the target data provider to determine a comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors.
[0055] A privacy data trusted comparison device, comprising:
[0056] Memory for storing computer programs;
[0057] A processor is used to implement the steps of any of the above-mentioned privacy data trusted comparison methods when executing the computer program.
[0058] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned privacy data trusted comparison methods are implemented.
[0059] The present application provides a trusted comparison method for privacy data, which is applied to a target data provider, to obtain its own first data and generate a first random number; to generate a first secret sharing polynomial for the first data, and to calculate a first secret share of each data processor based on the first secret sharing polynomial; to generate a second secret sharing polynomial for the first random number, and to calculate a second secret share of each data processor based on the second secret sharing polynomial; to send the first secret share and the second secret share to the corresponding data processor; to receive a third secret share and a fourth secret share of the target data provider sent by another data provider; and to calculate the difference between the first secret share and the third secret share of the target data provider. , and obtain the fifth secret sharing share of the target data provider based on the difference of the target data provider; calculate the first product value between the second secret share of the target data provider and the fourth secret share, and obtain the sixth secret sharing share of the target data provider based on the first product value of the target data provider; calculate the second product value between the fifth secret sharing share of the target data provider and the sixth secret sharing share, and obtain the seventh secret sharing share of the target data provider based on the second product value of the target data provider; chain the seventh secret sharing share of the target data provider, so that the blockchain determines the comparison result of the first data and the second data based on the seventh secret sharing share published by all data processors. In this application, the corresponding share of the difference between the first data and the second data can be hidden with the help of the corresponding secret share of the first random number and the second random number, and finally the difference between the first data and the second data is hidden accordingly based on the first random number and the second random number, so that the comparison result of the first data and the second data can be determined without exposing the difference between the first data and the second data, with high credibility and ensuring the privacy of the first data and the second data. A trusted comparison system, device and computer-readable storage medium for privacy data provided by this application also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0061] Figure 1 A flowchart of a privacy data trustworthy comparison method provided in an embodiment of the present application;
[0062] Figure 2 A schematic diagram of the structure of a privacy data trusted comparison system provided in an embodiment of the present application;
[0063] Figure 3A schematic diagram of the structure of a trusted privacy data comparison device provided in an embodiment of the present application;
[0064] Figure 4 Another structural schematic diagram of a privacy data trusted comparison device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] See also Figure 1 , Figure 1 A flowchart of a privacy data trusted comparison method provided in an embodiment of the present application.
[0067] A privacy data trust comparison method provided in an embodiment of the present application is applied to a target data provider and may include the following steps:
[0068] Step S101: Acquire its own first data and generate a first random number.
[0069] In actual applications, the target data provider may first obtain its own first data and generate a first random number.
[0070] It should be noted that the type of the first data can be determined according to actual needs. For example, the first data can be the property value of the target data provider, the corresponding value generated by the target data provider during the secure multi-party computing process, etc., and the first random number can be a positive integer, etc. This application does not make specific limitations here.
[0071] Step S102: Generate a first secret sharing polynomial for the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include a target data provider, another data provider, and other participants.
[0072] In actual applications, after the target data provider obtains its own first data and generates a first random number, it can generate a first secret sharing polynomial for the first data, and calculate the first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include the target data provider, another data provider and other participants.
[0073] In practical applications, when generating a secret sharing polynomial in the present application, the corresponding secret sharing polynomial can be generated based on a secret sharing generation formula, wherein the secret sharing generation formula can be constructed based on the Shamir method, for example, it may include: f(x)=m+m1x+m2x 2 +...+m t-1 x t-1 ; Wherein, f(x) represents the secret sharing polynomial; m represents the target data; t represents the secret decryption threshold, t≤n, and n represents the total number of data processors. In the process of generating secret shares based on the secret sharing polynomial, the secret shares can be generated by a secret share generation formula, and the secret share generation formula may include: g(i)=f(i); 1≤i≤n; where g(i) represents the secret share of the i-th data processor, etc.
[0074] Correspondingly, in the process of generating the first secret sharing polynomial of the first data, d(x)=a+a1x+a2x can be generated. 2 +...+a t-1 x t-1 As the first password shared polynomial for the first data, where a represents the first data; then d(i) can be used as the first secret share of the i-th data processor.
[0075] Step S103: Generate a second secret sharing polynomial of the first random number, and calculate a second secret share of each data processor based on the second secret sharing polynomial.
[0076] In actual applications, after the target data provider generates a first secret sharing polynomial for the first data and calculates the first secret share of each data processor based on the first secret sharing polynomial, it can generate a second secret sharing polynomial for the first random number and calculate the second secret share of each data processor based on the second secret sharing polynomial.
[0077] In specific application scenarios, R(x)=r+r1x+r2x can be generated 2 +...+r t-1 x t-1 As the second secret sharing polynomial of the first random number, where r represents the first random number, and then R(i) can be used as the second secret share of the i-th data processor.
[0078] Step S104: Send the first secret share and the second secret share to the corresponding data processor.
[0079] In practical applications, after the target data provider generates the second secret sharing polynomial of the first random number and calculates the second secret share of each data processor based on the second secret sharing polynomial, the first secret share and the second secret share can be sent to the corresponding data processor so that the data processor processes the first secret share and the second secret share. It should be noted that the target data provider can directly retain the first secret share and the second secret share sent to itself.
[0080] Step S105: receiving the third secret share and the fourth secret share of the target data provider sent by another data provider, the third secret share including the secret share generated by the other data provider for each data processor based on the third secret sharing polynomial, the fourth secret share including the secret share generated by the other data provider for each data processor based on the fourth secret sharing polynomial, the third secret sharing polynomial including the secret sharing polynomial of the second data generated by the other data provider, and the fourth secret sharing polynomial including the secret sharing polynomial of the second random number generated by the other data provider.
[0081] In actual applications, after the target data provider sends the first secret share and the second secret share to the corresponding data processor, the target data provider can receive the third secret share and the fourth secret share of the target data provider sent by another data provider.
[0082] Specifically, another data provider can generate y(x)=b+b1x+b2x 2 +...+b t-1 x t-1 As the third secret sharing polynomial of the second data, b represents the second data, and then y(i) can be used as the third secret share of the i-th data processor; K(x)=k+k1x+k2x can be generated 2 +...+k t-1 x t-1 As the fourth secret sharing polynomial of the second random number, k represents the second random number which is a positive integer, then K(i) can be used as the fourth secret share of the i-th data processor.
[0083] Step S106: Calculate the difference between the first secret share and the third secret share of the target data provider, and obtain the fifth secret share of the target data provider based on the difference of the target data provider.
[0084] In actual applications, after receiving the third secret share and fourth secret share of the target data provider sent by another data provider, the target data provider can calculate the difference between the first secret share and the third secret share of the target data provider, and obtain the fifth secret sharing share of the target data provider based on the difference of the target data provider.
[0085] In a specific application scenario, in the process of obtaining the fifth secret sharing share of the target data provider based on the difference, the difference can be reduced based on the Vandermonde matrix and the target matrix to obtain the fifth secret sharing share of the target data provider; wherein, the Vandermonde matrix can refer to the processing method of the BGW algorithm, and P(i,j) in the target matrix is 1, i is j≤t, and the values of the remaining positions are zero.
[0086] Step S107: Calculate a first product value between the second secret share and the fourth secret share of the target data provider, and obtain a sixth secret share of the target data provider based on the first product value of the target data provider.
[0087] In actual applications, after the target data provider calculates the difference between the first secret share and the third secret share of the target data provider, and obtains the fifth secret sharing share of the target data provider based on the difference of the target data provider, the target data provider can calculate the first product value between the second secret share and the fourth secret share of the target data provider, and obtain the sixth secret sharing share of the target data provider based on the first product value of the target data provider, and the first product value can be reduced based on the Vandermonde matrix and the target matrix to obtain the sixth secret sharing share of the target data provider.
[0088] Step S108: Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain the seventh secret sharing share of the target data provider based on the second product value of the target data provider.
[0089] In actual applications, after the target data provider calculates the first product value between the second secret share and the fourth secret share of the target data provider, and obtains the sixth secret sharing share of the target data provider based on the first product value of the target data provider, the target data provider can calculate the second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain the seventh secret sharing share of the target data provider based on the second product value of the target data provider, and the second product value can be reduced based on the Vandermonde matrix and the target matrix to obtain the seventh secret sharing share of the target data provider.
[0090] It should be noted that the principle for each data processor to generate the seventh secret sharing share is the same as the principle for the target data provider to generate the seventh secret sharing share, that is, to calculate the difference between its own first secret share and the third secret share, and obtain its own fifth secret sharing share based on its own difference, calculate the first product value between its own second secret share and the fourth secret share, and obtain its own sixth secret sharing share based on its own first product value, calculate the second product value between its own fifth secret sharing share and the sixth secret sharing share, and obtain its own fifth secret sharing share based on its own second product value. In other words, the data processing party Pi calculates the difference h(i)=d(i)-y(i), and reduces the difference to obtain the fifth secret sharing share (i, h(i)) of ab; calculates the first product value RK'(i)=R(i)*K(i), and reduces RK'(i) to obtain the sixth secret sharing share (i, RK(i)) of r*k; calculates the second product value M′(i)=RK(i)*h(i), and reduces M′(i) to obtain the seventh secret sharing share (i, M(i)) of r*k(ab).
[0091] Step S109: The seventh secret sharing share of the target data provider is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all data processors.
[0092] In actual applications, after the target data provider calculates the second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtains the seventh secret sharing share of the target data provider based on the second product value of the target data provider, the seventh secret sharing share of the target data provider can be uploaded to the chain, so that the blockchain can determine the comparison result of the first data and the second data based on the seventh secret sharing share published by all data processors.
[0093] In a specific application scenario, when the blockchain obtains the comparison result between the first data and the second data, the blockchain can obtain the seventh secret sharing share published by the target data provider, another data provider and other participants; reduce the order of all the seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain the target value r*k(ab); determine the comparison result between the first data and the second data based on the target value. Specifically, if the target value is less than zero, it can be determined that the comparison result is that the first data is less than the second data; if the target value is equal to zero, it can be determined that the comparison result is that the first data is equal to the second data; if the target value is greater than zero, it can be determined that the comparison result is that the first data is greater than the second data, etc. In addition, after obtaining the comparison result, the first data and the second data can also be sorted according to the comparison result without exposing the data value, etc., and this application does not make specific limitations here.
[0094] In a specific application scenario, the target data provider can obtain the comparison results of the first data and the second data from the blockchain, and build a secure multi-party computing framework based on the comparison results. For example, a nonlinear function, such as an activation function, a pooling function, etc., can be generated based on the first data and the second data according to the comparison results, and then a secure multi-party computing framework can be built based on the generated nonlinear function.
[0095] In a specific application scenario, in order to ensure the reliability of the data processing process, the data processor can also be used as a node of the blockchain, and the data processing method of the present application can be executed through a smart contract, so as to obtain the comparison result of the first data and the second data with the help of the blockchain. In this process, each data processor can upload the seventh secret share generated by itself to the chain, so as to trace the comparison result based on the seventh secret share uploaded to the chain. Specifically, the blockchain can restore the seventh secret share published by all data processors based on its own smart contract, and determine the comparison result of the first data and the second data based on the secret restored by the smart contract. It needs to be explained What is interesting is that the smart contract can use the combination of the seventh secret sharing shares input by different data processors that just reach the threshold value to restore the target value, that is, to restore the product value of the first random number, the second random number and the difference, and the difference is the difference between the first data and the second data. For example, there are a total of n data processors who have uploaded the seventh secret sharing shares to the chain, the recovery threshold is t, and t is less than or equal to n, then the blockchain can restore the target value based on any t seventh secret sharing shares, and the target value restored by the combination of t seventh secret sharing share fragments of different types should be consistent, otherwise the blockchain can further find out the malicious data processor through comparison and publish it.
[0096] The present application provides a trusted comparison method for privacy data, which is applied to a target data provider, to obtain its own first data and generate a first random number; to generate a first secret sharing polynomial for the first data, and to calculate a first secret share of each data processor based on the first secret sharing polynomial; to generate a second secret sharing polynomial for the first random number, and to calculate a second secret share of each data processor based on the second secret sharing polynomial; to send the first secret share and the second secret share to the corresponding data processor; to receive a third secret share and a fourth secret share of the target data provider sent by another data provider; and to calculate the difference between the first secret share and the third secret share of the target data provider. , and obtain the fifth secret sharing share of the target data provider based on the difference of the target data provider; calculate the first product value between the second secret share of the target data provider and the fourth secret share, and obtain the sixth secret sharing share of the target data provider based on the first product value of the target data provider; calculate the second product value between the fifth secret sharing share of the target data provider and the sixth secret sharing share, and obtain the seventh secret sharing share of the target data provider based on the second product value of the target data provider; chain the seventh secret sharing share of the target data provider, so that the blockchain determines the comparison result of the first data and the second data based on the seventh secret sharing share published by all data processors. In this application, the corresponding share of the difference between the first data and the second data can be hidden with the help of the corresponding secret share of the first random number and the second random number, and finally the difference between the first data and the second data is hidden accordingly based on the first random number and the second random number, so that the comparison result of the first data and the second data can be determined without exposing the difference between the first data and the second data, with high credibility and ensuring the privacy of the first data and the second data.
[0097] A privacy data trust comparison method provided in an embodiment of the present application, when applied to a target participant, may include the following steps:
[0098] Receive a first secret share and a second secret share of a target participant sent by a target data provider, wherein the first secret share includes a secret share generated by the target data provider for each data processor based on a first secret sharing polynomial, and the second secret share includes a secret share generated by the target data provider for each data processor based on a second secret sharing polynomial, the first secret sharing polynomial includes a secret sharing polynomial of first data generated by the target data provider, and the second secret sharing polynomial includes a secret sharing polynomial of a first random number generated by the target data provider, and the data processors include the target data provider, another data provider, the target participant, and other participants;
[0099] receiving a third secret share and a fourth secret share of a target participant sent by another data provider, wherein the third secret share comprises a secret share generated by another data provider for each data processor based on a third secret sharing polynomial, the fourth secret share comprises a secret share generated by another data provider for each data processor based on a fourth secret sharing polynomial, the third secret sharing polynomial comprises a secret sharing polynomial of second data generated by another data provider, and the fourth secret sharing polynomial comprises a secret sharing polynomial of a second random number generated by another data provider;
[0100] Calculate the difference between the first secret share and the third secret share of the target participant, and obtain the fifth secret share of the target participant based on the difference of the target participant;
[0101] Calculate a first product value between the second secret share and the fourth secret share of the target participant, and obtain a sixth secret share of the target participant based on the first product value of the target participant;
[0102] Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target participant, and obtain the seventh secret sharing share of the target participant based on the second product value of the target participant;
[0103] The seventh secret sharing share of the target participant is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all data processors.
[0104] The description of the corresponding steps in the privacy data trusted comparison method provided in the embodiment of the present application when applied to the target participant can be found in the above embodiment and will not be repeated here.
[0105] See also Figure 2 , Figure 2 A schematic diagram of the structure of a data processing system provided in an embodiment of the present application.
[0106] The embodiment of the present application provides a trusted comparison system for privacy data, which is applied to a target data provider and may include:
[0107] A first acquisition module 101 is used to acquire its own first data and generate a first random number;
[0108] A first generating module 102, configured to generate a first secret sharing polynomial of the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include a target data provider, another data provider, and other participants;
[0109] A second generating module 103, configured to generate a second secret sharing polynomial of the first random number, and calculate a second secret share of each data processor based on the second secret sharing polynomial;
[0110] A first sending module 104, configured to send the first secret share and the second secret share to a corresponding data processor;
[0111] The first receiving module 105 is used to receive the third secret share and the fourth secret share of the target data provider sent by another data provider, the third secret share includes the secret share generated by the other data provider for each data processor based on the third secret sharing polynomial, the fourth secret share includes the secret share generated by the other data provider for each data processor based on the fourth secret sharing polynomial, the third secret sharing polynomial includes the secret sharing polynomial of the second data generated by the other data provider, and the fourth secret sharing polynomial includes the secret sharing polynomial of the second random number generated by the other data provider;
[0112] A first calculation module 106, configured to calculate a difference between the first secret share and the third secret share of the target data provider, and obtain a fifth secret sharing share of the target data provider based on the difference of the target data provider;
[0113] A second calculation module 107, configured to calculate a first product value between the second secret share and the fourth secret share of the target data provider, and obtain a sixth secret sharing share of the target data provider based on the first product value of the target data provider;
[0114] A third calculation module 108, configured to calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain a seventh secret sharing share of the target data provider based on the second product value of the target data provider;
[0115] The first on-chain module 109 is used to on-chain the seventh secret sharing share of the target data provider, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all data processors.
[0116] In a privacy data trusted comparison system provided in an embodiment of the present application, the first generation module may include:
[0117] A first generating unit, configured to generate a first cryptographic shared polynomial of first data based on a secret sharing generation formula;
[0118] The secret sharing generation formula includes:
[0119] f(x)=m+m1x+m2x 2 +...+m t-1 x t-1;
[0120] Wherein, f(x) represents the secret sharing polynomial; m represents the target data; t represents the secret decryption threshold, t≤n, and n represents the total number of data processors.
[0121] In a privacy data trusted comparison system provided in an embodiment of the present application, the first generation module may include:
[0122] A first generating unit, configured to calculate a first secret share of each data processor based on a first secret sharing polynomial by using a secret share generating formula;
[0123] The secret share generation formula includes:
[0124] g(i)=f(i); 1≤i≤n;
[0125] Wherein, g(i) represents the secret share of the i-th data processor.
[0126] In a privacy data trusted comparison system provided in an embodiment of the present application, the first calculation module may include:
[0127] A first calculation unit, configured to reduce the order of the difference based on the Vandermonde matrix and the target matrix to obtain a fifth secret sharing share of the target data provider;
[0128] The second calculation module may include:
[0129] A second calculation unit is used to reduce the first product value based on the Vandermonde matrix and the target matrix to obtain a sixth secret sharing share of the target data provider;
[0130] The third calculation module may include:
[0131] A third calculation unit, configured to reduce the order of the second product value based on the Vandermonde matrix and the target matrix to obtain a seventh secret sharing share of the target data provider;
[0132] Among them, P(i,j)=1 in the target matrix, i=j≤t, and the values of the remaining positions are zero.
[0133] An embodiment of the present application provides a trusted comparison system for privacy data, in which the first on-chain module can be used to: on-chain the seventh secret sharing share of the target data provider so that the blockchain obtains the seventh secret sharing share published by another data provider and other participants, reduces the order of all seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain a target value, and determines the comparison result between the first data and the second data based on the target value.
[0134] The privacy data trusted comparison system provided in the embodiment of the present application may also include:
[0135] The first building module is used to build a secure multi-party computing framework based on the comparison result after the first chaining module chains the seventh secret sharing share of the target data provider.
[0136] The embodiment of the present application provides a trusted comparison system for privacy data, which is applied to a target participant and may include:
[0137] The second-level receiving module is used to receive the first secret share and the second secret share of the target participant sent by the target data provider, the first secret share includes the secret share generated by the target data provider for each data processor based on the first secret sharing polynomial, the second secret share includes the secret share generated by the target data provider for each data processor based on the second secret sharing polynomial, the first secret sharing polynomial includes the secret sharing polynomial of the first data generated by the target data provider, the second secret sharing polynomial includes the secret sharing polynomial of the first random number generated by the target data provider, and the data processors include the target data provider, another data provider, the target participant and other participants;
[0138] a third receiving module, configured to receive a third secret share and a fourth secret share of a target participant sent by another data provider, wherein the third secret share includes a secret share generated by another data provider for each data processor based on a third secret sharing polynomial, and the fourth secret share includes a secret share generated by another data provider for each data processor based on a fourth secret sharing polynomial, the third secret sharing polynomial includes a secret sharing polynomial of second data generated by another data provider, and the fourth secret sharing polynomial includes a secret sharing polynomial of a second random number generated by another data provider;
[0139] a fourth calculation module, configured to calculate a difference between the first secret share and the third secret share of the target participant, and obtain a fifth secret sharing share of the target participant based on the difference of the target participant;
[0140] a fifth calculation module, configured to calculate a first product value between the second secret share and the fourth secret share of the target participant, and obtain a sixth secret sharing share of the target participant based on the first product value of the target participant;
[0141] a sixth calculation module, configured to calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target participant, and obtain the seventh secret sharing share of the target participant based on the second product value of the target participant;
[0142] The second on-chain module is used to chain the seventh secret sharing share of the target participant, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing share published by all data processors.
[0143] The present application also provides a privacy data trusted comparison device and a computer-readable storage medium, both of which have the corresponding effects of the privacy data trusted comparison method provided in the embodiments of the present application. Figure 3 , Figure 3 A schematic diagram of the structure of a privacy data trusted comparison device provided in an embodiment of the present application.
[0144] An embodiment of the present application provides a trusted privacy data comparison device, including a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the trusted privacy data comparison method described in any of the above embodiments are implemented.
[0145] See also Figure 4 , another data processing device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, used to transmit commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, used to display the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, used to realize the communication between the data processing device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication mode adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0146] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the privacy data trusted comparison method described in any of the above embodiments are implemented.
[0147] The computer-readable storage medium involved in the present application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.
[0148] For the description of the relevant parts of the trusted comparison system, device and computer-readable storage medium for private data provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts of the trusted comparison method for private data provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0149] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0150] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A trusted comparison method for private data, characterized in that: Applicable to target data providers, including: Obtaining its own first data and generating a first random number; Generate a first secret sharing polynomial of the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include the target data provider, another data provider and other participants; generating a second secret sharing polynomial of the first random number, and calculating a second secret share of each of the data processors based on the second secret sharing polynomial; Sending the first secret share and the second secret share to the corresponding data processor; receiving a third secret share and a fourth secret share of the target data provider sent by the other data provider, the third secret share comprising a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share comprising a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial comprising a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial comprising a secret sharing polynomial of a second random number generated by the other data provider; Calculate the difference between the first secret share and the third secret share of the target data provider, and obtain the fifth secret sharing share of the target data provider based on the difference of the target data provider; Calculate a first product value between the second secret share and the fourth secret share of the target data provider, and obtain a sixth secret sharing share of the target data provider based on the first product value of the target data provider; Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain a seventh secret sharing share of the target data provider based on the second product value of the target data provider; The seventh secret sharing share of the target data provider is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors; Among them, the secret sharing polynomial for generating target data includes: Based on the secret sharing generation formula, generate a secret sharing polynomial of the target data; The secret sharing generation formula includes: f(x)=m+m1x+m2x 2 +...+m t-1 x t-1 ; Wherein, f(x) represents a secret sharing polynomial; m represents the target data; t represents a secret decryption threshold, t≤n, and n represents the total number of data processing parties; The secret share of each data processor is calculated based on the secret sharing polynomial, including: Calculate the secret share of each data processor based on the secret sharing polynomial by using a secret share generation formula; The secret share generation formula includes: g(i)=f(i); 1≤i≤n; Wherein, g(i) represents the secret share of the i-th data processor; Wherein, obtaining the fifth secret sharing share of the target data provider based on the difference includes: Reducing the difference based on the Vandermonde matrix and the target matrix to obtain the fifth secret sharing share of the target data provider; The step of obtaining a sixth secret sharing share of the target data provider based on the first product value comprises: Based on the Vandermonde matrix and the target matrix, the first product value is reduced to obtain the sixth secret sharing share of the target data provider; The step of obtaining a seventh secret sharing share of the target data provider based on the second product value comprises: Based on the Vandermonde matrix and the target matrix, the second product value is reduced to obtain the seventh secret sharing share of the target data provider; Wherein, P(i,j)=1 in the target matrix, i=j≤t, and the values of the remaining positions are zero; The seventh secret sharing share of the target data provider is put on the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors, including: The seventh secret sharing share of the target data provider is uploaded to the chain, so that the blockchain obtains the seventh secret sharing share published by the other data provider and the other participants, reduces the order of all the seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain a target value, and determines a comparison result between the first data and the second data based on the target value.
2. The method according to claim 1, characterized in that After the seventh secret sharing share of the target data provider is uploaded to the chain, the method further includes: A secure multi-party computing framework is constructed based on the comparison result.
3. A trusted comparison method for private data, characterized in that: Applicable to target parties, including: Receive a first secret share and a second secret share of the target participant sent by a target data provider, wherein the first secret share includes a secret share generated by the target data provider for each data processor based on a first secret sharing polynomial, and the second secret share includes a secret share generated by the target data provider for each data processor based on a second secret sharing polynomial, the first secret sharing polynomial includes a secret sharing polynomial of first data generated by the target data provider, and the second secret sharing polynomial includes a secret sharing polynomial of a first random number generated by the target data provider, and the data processors include the target data provider, another data provider, the target participant and other participants; receiving a third secret share and a fourth secret share of the target participant sent by the other data provider, wherein the third secret share includes a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share includes a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial includes a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial includes a secret sharing polynomial of a second random number generated by the other data provider; Calculate the difference between the first secret share and the third secret share of the target party, and obtain the fifth secret share of the target party based on the difference of the target party; Calculate a first product value between the second secret share and the fourth secret share of the target party, and obtain a sixth secret sharing share of the target party based on the first product value of the target party; Calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target party, and obtain a seventh secret sharing share of the target party based on the second product value of the target party; The seventh secret sharing share of the target participant is uploaded to the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors; Among them, the secret sharing polynomial for generating target data includes: Based on the secret sharing generation formula, generate a secret sharing polynomial of the target data; The secret sharing generation formula includes: f(x)=m+m1x+m2x 2 +...+m t-1 x t-1 ; Wherein, f(x) represents a secret sharing polynomial; m represents the target data; t represents a secret decryption threshold, t≤n, and n represents the total number of data processing parties; The target data provider calculates the secret share of each data processor based on the secret sharing polynomial, including: calculating the secret share of each data processor based on the secret sharing polynomial by using a secret share generation formula; The secret share generation formula includes: g(i)=f(i); 1≤i≤n; Wherein, g(i) represents the secret share of the i-th data processor; Wherein, obtaining the fifth secret sharing share of the target participant based on the difference includes: Reducing the difference based on the Vandermonde matrix and the target matrix to obtain the fifth secret sharing share of the target participant; Obtaining a sixth secret sharing share of the target party based on the first product value includes: Based on the Vandermonde matrix and the target matrix, the first product value is reduced to obtain the sixth secret sharing share of the target participant; Obtaining a seventh secret sharing share of the target party based on the second product value includes: Based on the Vandermonde matrix and the target matrix, the second product value is reduced to obtain the seventh secret sharing share of the target participant; Wherein, P(i,j)=1 in the target matrix, i=j≤t, and the values of the remaining positions are zero; The seventh secret sharing share of the target participant is put on the chain, so that the blockchain determines the comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors, including: The seventh secret sharing share of the target participant is uploaded to the chain, so that the blockchain obtains the seventh secret sharing shares published by the target data provider, the other data provider and the other participants, reduces the order of all the seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain a target value, and determines a comparison result between the first data and the second data based on the target value.
4. A trusted comparison system for private data, characterized in that: Applicable to target data providers, including: A first acquisition module, used to acquire its own first data and generate a first random number; A first generating module, configured to generate a first secret sharing polynomial of the first data, and calculate a first secret share of each data processor based on the first secret sharing polynomial; wherein the data processors include the target data provider, another data provider, and other participants; A second generating module, configured to generate a second secret sharing polynomial of the first random number, and calculate a second secret share of each of the data processors based on the second secret sharing polynomial; A first sending module, configured to send the first secret share and the second secret share to the corresponding data processor; a first receiving module, configured to receive a third secret share and a fourth secret share of the target data provider sent by the other data provider, the third secret share comprising a secret share generated by the other data provider for each of the data processors based on a third secret sharing polynomial, the fourth secret share comprising a secret share generated by the other data provider for each of the data processors based on a fourth secret sharing polynomial, the third secret sharing polynomial comprising a secret sharing polynomial of second data generated by the other data provider, and the fourth secret sharing polynomial comprising a secret sharing polynomial of a second random number generated by the other data provider; a first calculation module, configured to calculate a difference between the first secret share and the third secret share of the target data provider, and obtain a fifth secret sharing share of the target data provider based on the difference of the target data provider; a second calculation module, configured to calculate a first product value between the second secret share and the fourth secret share of the target data provider, and obtain a sixth secret sharing share of the target data provider based on the first product value of the target data provider; a third calculation module, configured to calculate a second product value between the fifth secret sharing share and the sixth secret sharing share of the target data provider, and obtain a seventh secret sharing share of the target data provider based on the second product value of the target data provider; A first on-chain module, configured to on-chain the seventh secret sharing share of the target data provider, so that the blockchain determines a comparison result between the first data and the second data based on the seventh secret sharing shares published by all the data processors; Among them, the generation module generates the secret sharing polynomial of the target data, including: Based on the secret sharing generation formula, generate a secret sharing polynomial of the target data; The secret sharing generation formula includes: f(x)=m+m1x+m2x 2 +...+m t-1 x t-1 ; Wherein, f(x) represents a secret sharing polynomial; m represents the target data; t represents a secret decryption threshold, t≤n, and n represents the total number of data processing parties; Wherein, the first generation module includes: A first generating unit, configured to calculate the secret share of each data processor based on a secret sharing polynomial by using a secret share generating formula; The secret share generation formula includes: g(i)=f(i); 1≤i≤n; Wherein, g(i) represents the secret share of the i-th data processor; Wherein, the first calculation module includes: A first calculation unit, configured to reduce the order of the difference based on a Vandermonde matrix and a target matrix to obtain the fifth secret sharing share of the target data provider; The second calculation module includes: A second calculation unit is used for reducing the first product value based on the Vandermonde matrix and the target matrix to obtain the sixth secret sharing share of the target data provider; The third calculation module includes: A third calculation unit, configured to reduce the order of the second product value based on the Vandermonde matrix and the target matrix to obtain the seventh secret sharing share of the target data provider; Wherein, P(i,j)=1 in the target matrix, i=j≤t, and the values of the remaining positions are zero; Among them, the first on-chain module is used to: chain the seventh secret sharing share of the target data provider, so that the blockchain obtains the seventh secret sharing share published by the other data provider and the other participants, reduces the order of all the seventh secret sharing shares based on the Vandermonde matrix and the target matrix to obtain the target value, and determines the comparison result between the first data and the second data based on the target value.
5. A trusted comparison device for private data, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the privacy data trusted comparison method as described in any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the privacy data trusted comparison method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Identity authentication method, system and device and computer readable storage medium
CN112468293A
Key-value pair model safety training and reasoning method based on safety multi-party calculation
CN113535808A
Input information privacy protection system and method based on secure two-party calculation
CN114707169A
Super-threshold multi-party privacy set intersection method based on oblivious pseudo-random secret sharing
CN114866225A
Secure multi-party computing method, apparatus, system, and storage medium
WO2021083179A1
