A method and system for multi-party secure computation of coefficient of variation
By combining homomorphic encryption algorithms and preprocessing instructions with public-key encryption, additive homomorphic functions, and transmission verification functions, the problem of calculating the coefficient of variation in multi-party secure computation is solved, enabling secure processing of private data and accurate calculation results, thus ensuring the integrity of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-13
- Publication Date
- 2026-03-31
AI Technical Summary
How can we securely calculate the coefficient of variation among multiple participants in the absence of a trusted third party, while protecting the privacy of each party's private data and the accuracy of the calculation results?
By employing homomorphic encryption algorithms and preprocessing instructions, and through techniques such as public-key encryption, additive homomorphic functions, and transmission verification functions, secure data processing and transmission are achieved. This ensures that the private data of the participants is not leaked when calculating the coefficient of variation, and verifies the integrity of data transmission through discrete modular arithmetic functions.
While ensuring the security of private data, it enables multi-party secure calculation of the coefficient of variation, ensuring the accuracy of the calculation results and the integrity of data transmission.
Smart Images

Figure QLYQS_5 
Figure QLYQS_17
Abstract
Description
Technical Field
[0001] This application relates to the technical field of multi-party secure computation, and in particular to a method and system for multi-party secure computation of the coefficient of variation. Background Technology
[0002] Secure multi-party computation addresses the problem of protecting privacy in collaborative computation among a group of distrustful participants. It ensures the independence of inputs and the correctness of computation while preventing the disclosure of input values to other participants. Primarily, it addresses the challenge of securely computing an agreed-upon function in the absence of a trusted third party. Secure multi-party computation plays a crucial role in scenarios such as electronic elections, electronic voting, electronic auctions, secret sharing, and threshold signatures. Developing targeted secure multi-party computation algorithms to achieve the desired computational task remains a key challenge for those skilled in the art. Summary of the Invention
[0003] This application provides a method and system for securely calculating the coefficient of variation of a multi-party dataset, which can achieve the task of securely calculating the coefficient of variation of a dataset from multiple parties.
[0004] Firstly, this application provides a method for securely calculating the coefficient of variation by multiple parties. The multiple parties include an initiator of the calculation task, a referee, and multiple participating parties. The participating parties and the initiator hold private data. The initiator and the referee are two different parties. The method includes:
[0005] All participants receive the same preprocessing instruction to preprocess their own private data to obtain first processed data, wherein the preprocessing instruction includes a rounding instruction.
[0006] The referee generates a public and private key pair and sends the public key to all participants; during the computation, a set of prime numbers p and q are randomly selected, where n = pq. λ = lcm(p-1, q-1), define the function Calculate μ=(L(g) λ modn 2 )) -1 modn, where the public key is (n, g) and the private key is (λ, μ);
[0007] All participants use the received public key to encrypt their own initial processed data, obtaining the first encrypted data; during the computation process, participants randomly select... calculate Where, m i c represents the first processing data of the participating party. i This represents the first encrypted data of the participating parties;
[0008] All the first encrypted data is aggregated and sent to the initiator. The initiator obtains the secret state and value data based on all the first encrypted data and the constructed additive homomorphic function. During the calculation, the additive homomorphic function is... Where f represents the dense state and value data, and k represents the number of participants;
[0009] The encrypted sum data is sent to the referee, who decrypts it using their private key to obtain the explicit sum data. The referee then calculates the explicit mean sum data based on the explicit sum data and the number of participants, and distributes the explicit mean sum data to all participants. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;
[0010] All participants calculate the square of the difference between the first processed data and the mean data of the clear state to obtain the difference squared processed data;
[0011] Each participant randomly divides the difference processing data into no less than two parts and no more than the number of participants, and distributes the random partitioned data to all participants. Then, each participant calculates the sum of all the random partitioned data it receives as the difference recombined data.
[0012] All participants will summarize the difference-squared recombined data to the initiator. The initiator will calculate the square root of the sum of all difference-squared recombined data divided by the number of participants as the standard deviation data, and calculate the ratio of the standard deviation data to the mean data as the coefficient of variation.
[0013] By adopting the above technical solution, it is possible to calculate the coefficient of variation of the private data of all participants while ensuring the security of private data.
[0014] Furthermore, each participant randomly divides the difference-processed data into at least two parts and no more than the number of participants, and distributes the randomly divided data to all participants. Then, each participant calculates the sum of all the randomly divided data it receives in the difference-reconstructed data.
[0015] Each participant randomly divides the difference processing data into a number of random partitions, retains one partition for itself, and distributes the other partitions to the other participants.
[0016] Furthermore, the initiator, the referee, and the participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During the data transmission process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent together to the receiver. The receiver substitutes the received data into the transmission verification function to obtain a second verification code, and determines whether the data has been tampered with during transmission based on whether the first verification code and the second verification code are the same.
[0017] Furthermore, the preprocessing instruction also includes a scaling instruction, which precedes the rounding instruction and is used to scale the data by a specified factor.
[0018] Furthermore, the method for obtaining the preprocessing instructions includes:
[0019] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;
[0020] The adjudicator identifies the relevant data in the big data scenario, performs data analysis on the relevant data to obtain the general precision value of the relevant data, and sends the general precision value to the initiator.
[0021] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.
[0022] Secondly, this application provides a system for multi-party secure calculation of the coefficient of variation. The system includes a server and multiple terminals holding private data, wherein the server acts as the adjudicator, one terminal acts as the initiator, and at least two terminals act as participants.
[0023] After the initiator initiates the computing task, all participants obtain the same preprocessing instruction to preprocess their own private data to obtain the first processed data. The preprocessing instruction includes a rounding instruction.
[0024] The referee generates a public and private key pair and sends the public key to all participants; during the computation, a set of prime numbers p and q are randomly selected, where n = pq. λ = lcm(p-1, q-1), define the function Calculate μ=(L(g) λ modn 2 )) -1 modn, where the public key is (n, g) and the private key is (λ, μ);
[0025] All participants use the received public key to encrypt their own initial processed data, obtaining the first encrypted data; during the computation process, participants randomly select... calculate Where, m i c represents the first processing data of the participating party. i This represents the first encrypted data of the participating parties;
[0026] All the first encrypted data is aggregated and sent to the initiator. The initiator obtains the secret state and value data based on all the first encrypted data and the constructed additive homomorphic function. During the calculation, the additive homomorphic function is... Where f represents the dense state and value data, and k represents the number of participants;
[0027] The encrypted sum data is sent to the referee, who decrypts it using their private key to obtain the explicit sum data. The referee then calculates the explicit mean sum data based on the explicit sum data and the number of participants, and distributes the explicit mean sum data to all participants. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;
[0028] All participants calculate the square of the difference between the first processed data and the mean data of the clear state to obtain the difference squared processed data;
[0029] Each participant randomly divides the difference processing data into no less than two parts and no more than the number of participants, and distributes the random partitioned data to all participants. Then, each participant calculates the sum of all the random partitioned data it receives as the difference recombined data.
[0030] All participants will summarize the difference-squared recombined data to the initiator. The initiator will calculate the square root of the sum of all difference-squared recombined data divided by the number of participants as the standard deviation data, and calculate the ratio of the standard deviation data to the mean data as the coefficient of variation.
[0031] Furthermore, the participating parties are further configured as follows:
[0032] Each participant randomly divides the difference processing data into a number of random partitions, retains one partition for itself, and distributes the other partitions to the other participants.
[0033] Furthermore, the initiator, the referee, and the participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During the data transmission process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent together to the receiver. The receiver substitutes the received data into the transmission verification function to obtain a second verification code, and determines whether the data has been tampered with during transmission based on whether the first verification code and the second verification code are the same.
[0034] Furthermore, the preprocessing instructions are obtained by the initiator, which is further configured as follows:
[0035] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.
[0036] Furthermore, the initiator is further configured as follows:
[0037] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;
[0038] The adjudicator identifies the relevant data in the big data scenario, performs data analysis on the relevant data to obtain the general precision value of the relevant data, and sends the general precision value to the initiator.
[0039] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.
[0040] In summary, this application has at least the following beneficial effects:
[0041] 1. A method and system for multi-party secure calculation of the coefficient of variation is provided, which, based on homomorphic encryption algorithm, can achieve the task of calculating the coefficient of variation of the private data held by all participants while ensuring the security of the private data held by the participants;
[0042] 2. Using transmission verification functions can ensure that data is not tampered with during transmission, which helps to ensure the accuracy of calculation results; 3. Preprocessing instructions are determined based on the related data of the data scenario in big data, which helps to ensure the rationality of the first processed data.
[0043] It should be understood that the description in the Summary Section is not intended to limit the key or essential features of the embodiments of this application, nor is it intended to restrict the scope of this application. Other features of this application will become readily apparent from the following description. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0046] This application provides a method and system for multi-party secure calculation of the coefficient of variation, which employs a homomorphic encryption algorithm and performs calculations based on private data, thereby enabling the calculation of the coefficient of variation while ensuring the security of private data.
[0047] In a first aspect, embodiments of this application disclose a method for multi-party secure calculation of the coefficient of variation.
[0048] An exemplary operating environment capable of running embodiments of this application includes an initiator, a referee, and multiple participants, wherein the initiator, the referee, and the multiple participants are all interconnected, each participant holds private data, the referee and the initiator are two different parties, and the initiator may also be one of the participants.
[0049] In the specific implementation process, the participants are the terminals, the initiator is one of the participants and also a terminal, and the referee is the server.
[0050] This method can be executed by the aforementioned runtime environment.
[0051] The method specifically includes the following steps:
[0052] S201: All participants receive the same preprocessing instructions to preprocess their own private data to obtain the first processed data.
[0053] The preprocessing instructions include rounding instructions.
[0054] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.
[0055] Specifically, the ideal purpose of preprocessing instructions is to rewrite all valid bits of private data into integers through scaling, while also reflecting the size relationship between different private data. To ensure complete data integrity, the highest and lowest non-zero bits of all private data need to be determined during rewriting. Then, all private data are scaled so that the lowest non-zero bit is no lower than the units digit. For example, if the first private data has a highest non-zero bit in the ten-thousands place and a lowest non-zero bit in the thousandths place, the second in the thousandths place and the ten-thousandths place, and the third in the hundred-thousands place and the hundredths place, then the highest non-zero bit of all three private data is in the hundred-thousands place and the lowest non-zero bit is in the ten-thousandths place. In this case, to achieve distortion-free scaling, all three private data need to be enlarged by a factor of ten thousand. Of course, to reduce computational load during private data rewriting, it is also necessary to ensure that the lowest non-zero bit of all private data is no higher than the units digit. In the case of scaling down, for example, if the highest non-zero digit of the first private data is 10 billion and the lowest non-zero digit is 10,000, the highest non-zero digit of the second private data is 100 million and the lowest non-zero digit is 1,000, and the highest non-zero digit of the third private data is 1 billion and the lowest non-zero digit is 100,000, then to achieve distortion-free scaling of the three private data, all three private data need to be scaled down by a factor of 1,000.
[0056] Using the aforementioned scaling principle, ideally, scaling the private data can be guaranteed to retain all significant bits after rounding, preventing distortion after preprocessing. However, in some special cases, such as when the number of bits between the most and least significant bits of all private data exceeds the processing capacity of the hardware environment (server, terminal), some precision must be discarded. This essentially involves appropriately expanding the maximum data range that the hardware environment can process within a certain precision. The general practice is to discard one or two least significant bits, which will not be elaborated upon here.
[0057] In some cases, to reduce computational difficulty, some precision can be sacrificed while ensuring a certain level of accuracy in the results. This requires consideration of the precision requirements of the computational task; therefore, the method for obtaining preprocessing instructions has been improved.
[0058] The method for obtaining the preprocessing instructions includes: the initiator determines the data scenario and accuracy requirements based on the computing task, and sends the data scenario to the referee; the referee determines the associated data of the data scenario in the big data, performs data analysis on the associated data to obtain the general accuracy value of the associated data, and sends the general accuracy value to the initiator; the initiator determines the scaling factor of the scaling instruction in the preprocessing instructions based on the accuracy requirements and the general accuracy value.
[0059] When a computational task is determined, the target data group and the requirements for the results are also determined. The target data group corresponds to the data scenario, which includes labels that can identify related data in big data. The requirements for the results correspond to the accuracy requirements. The description of the computational task will generally include the requirements for the results. For example, when calculating money, the unit is accurate to the cent (RMB), that is, the percentile of the accurate value yuan (RMB). When calculating power generation, the unit is accurate to the unit kilowatt-hour.
[0060] The precision requirement includes the required precision bits, which is a restriction on the highest position of the lowest non-zero bit. Generally, it directly reflects that the lowest non-zero bit cannot be higher than the preset bit. The precision requirement is directly determined based on the description of the calculation task. Here, a reference model can be designed, or it can be directly input manually.
[0061] Linked data refers to data in big data that carries labels corresponding to the data scenario. The general precision value of linked data is a data range, which reflects the position of the highest and lowest non-zero bits of all linked data, and of course, it can also reflect the number of bits between the highest and lowest non-zero bits of all linked data, that is, the general number of significant bits.
[0062] Based on the capabilities of the hardware environment (server, terminal), a suggested number of significant digits and a maximum number of significant digits are pre-set. When determining the scaling factor based on the precision requirements and general precision values, the initiator will also consider the suggested number of significant digits and the maximum number of significant digits. The processing logic is as follows: if the number of significant digits of the general precision value is no more than the suggested number of significant digits, then scaling is performed by scaling the least non-zero digit of the general precision value to the units digit. If the number of significant digits of the general precision value is more than the suggested number of significant digits, then scaling is performed by scaling the preset number of digits of the required precision to the units digit. If scaling by scaling the preset number of digits of the required precision to the units digit would cause the number of significant digits of the scaled data to exceed the maximum number of significant digits, then a result indicating insufficient processing capacity will be returned.
[0063] In one example, the scaling command specifies a scaling factor that is a power of 10. Of course, the scaling factor can be any factor as needed.
[0064] In one example, suppose there are k participants (k is an integer and k≥2), and the initiator is also one of the participants. The private data held by the k participants are a, a, and a, respectively. i Let i = 1, 2, ..., k. The initiator holds private data a1, and the other private data are distributed among the participating parties in turn. The preprocessing instruction is to increase the private data by 10. t After multiplying by 1 (t∈N, pre-acquisition) and rounding down, the first processed data obtained by the participants is m. iLet i = 1, 2, ..., k. The initiator's first processing data is m1, and the other first processing data correspond to the other participants respectively. That is, within the allowable accuracy range, m is considered to be m1. i =10 t a i .
[0065] S202: The referee generates a set of public and private keys and sends the public key to all participants.
[0066] During the calculation, the judges randomly selected a set of prime numbers p and q, where n = pq, and then randomly chose... Indicates that g is from 1 to n 2 Let λ = lcm(p-1, q-1) be an integer between p-1 and q-1, indicating that λ is the least common multiple of p-1 and q-1; define the function... Calculate μ=(L(g) λ modn 2 )) -1 mod n, where mod is the modulo function. The result gives the public key (n, g) and the private key (λ, μ).
[0067] Regarding the retrieval of prime numbers, the referee has a pre-stored prime number library (generally large prime numbers, depending on encryption requirements), which can be randomly retrieved in each calculation task.
[0068] S203: All participants use the received public key to encrypt the first processed data they hold, thus obtaining the first encrypted data.
[0069] During the calculation process, the participants randomly select calculate Where, m i c represents the first processing data of the participating party. i Let i represent the first encrypted data of the participant, i = 1, 2, ..., k.
[0070] After receiving (n, g), the initiator randomly selects... Let r1 be an integer between 1 and n, and calculate... c1 represents the first encrypted data from the initiator; the other first encrypted data correspond to the other participants.
[0071] S204: All first encrypted data are aggregated and sent to the initiator. The initiator obtains the encrypted state and value data based on all first encrypted data and the constructed additive homomorphic function.
[0072] The aggregation process involves all other participants sending their initial encrypted data to the initiator, who then calculates the secret state and value data. During this calculation, the constructed additive homomorphic function is... Where f represents the dense state and value data, and k represents the number of participants.
[0073] S205: The secret sum data is sent to the referee, who uses a private key to decrypt the secret sum data to obtain the explicit sum data, calculates the explicit average value data based on the explicit sum data and the number of participants, and distributes the explicit average value data to all participants.
[0074] During the calculation process, construct y = (L(f) λ modn 2 )·μ)modn, where y represents the luminous sum and value data. The luminous mean data is equal to y / k. It should be understood that, within the allowable range of precision, the luminous mean data is 10 times the mean of the private data held by all participants. t times.
[0075] S206: All participants calculate the square of the difference between the first processed data and the mean data of the clear state to obtain the difference squared processed data.
[0076] Based on the foregoing, the first processing data of the known participants are m respectively. i If the mean luminous state data of all participants is y / k, then the difference-squared processed data of the participants are respectively (m i -y / k) 2 Taking the initiator as an example, the initiator's difference processing data is (m1-y / k). 2 Other difference processing data belong to other participating parties.
[0077] S207: Each participant will randomly divide the difference processing data into no less than two parts and no more than the number of participants, and distribute the random partitioned data to all participants. Then, each participant will calculate the sum of all the random partitioned data it receives as the difference recombined data.
[0078] After generating random partitioned data from the difference-squared processed data, the traceability of the difference-squared processed data can be avoided. Each participant obtains at least two random partitioned data after partitioning the difference-squared processed data. These data can be randomly distributed among all participants. To avoid the low-probability event that all of a participant's random partitioned data is sent to another participant, resulting in the traceability of its difference-squared processed data, it is agreed that at least two partitioned data from a participant must be distributed to all participants. That is, if there are two random partitioned data, two participants are randomly selected from all participants, and the two partitioned data are sent to each participant. If there are ten random partitioned data, ten participants are randomly selected from all participants, and the data is sent to each participant. To avoid invalid partitioning actions, the number of random partitioned data obtained by a participant must not exceed the number of participants, k.
[0079] In one example, each participant randomly divides the difference processing data into a number of random partitions, keeping one partition for itself and distributing the remaining partitions to the other participants. Let A be the identifier of all participants. i The difference processing data of initiator A1 is B. i For the partitioning and distribution process, the initiator is A1, and the initiator's difference-squared partitioned data is B1. This data will be randomly partitioned into k parts, namely B1, B2, B3, B4, and B5, B6, B7, B8, B9, B1 ... 11 B 12 B 13 ... B 1k B1 = B 11 +B 12 +B 13 +...+B 1k In the actual distribution, the initiator retains B. 11 and B 12 B 13 ... B 1k Send them sequentially to A2, A3, ..., A according to the subscript correspondence. k The kth participant A k The difference processing data is B k For the segmentation and distribution process, the k-th participant A k The difference-squared data of the k-th participant is B. k The data will be randomly divided into k parts, which will be B. k1 B k2 B k3 ... B kk B k =B k1 +B k2 +B k3 +...+B kk In the actual distribution, the initiator retains B. kk and B k1 B k2 ... B k(k-1) Send them sequentially to A1, A2, ..., A according to the subscript correspondence. k-1 .
[0080] This allows each participant, including the initiator, to have k randomly partitioned data points, each originating from one of the k participants. Again, taking the initiator as an example, the k randomly partitioned data points used by the initiator to generate the difference square recombination data are B. 11 B 21 B 31 ... B k1The same logic applies to other participants. For example, the k randomly partitioned data used by the k-th participant to generate the difference square recombination data are B. 1k B 2k B 3k ... B kk Let the difference square recombination data be C. i Then C i =B 1i +B 2i +B 3i +...+B ki For example, the initiator's difference square recombination data C1 = B 11 +B 21 +B 31 +...+B k1 The difference square recombination data C of the k-th participant k =B 1k +B 2k +B 3k +...+B kk .
[0081] S208: All participants will summarize the difference-squared recombined data to the initiator. The initiator will calculate the square root of the sum of all difference-squared recombined data divided by the number of participants as the standard deviation data, and calculate the ratio of the standard deviation data to the mean data as the coefficient of variation.
[0082] The aggregation process involves all other participants sending their reconstructed difference data to the initiator. The initiator then calculates the standard deviation data for all participants. It should be understood that, since the standard deviation data utilizes the first processed data and the clear state mean data, the calculated standard deviation data is 10 times the standard deviation of the private data held by all actual participants. t times.
[0083] The computational task of this embodiment is to calculate the coefficient of variation of the private data held by all participants. The coefficient of variation of the private data held by all participants is equal to the ratio of the standard deviation to the mean of the private data held by all participants, and also equal to the ratio of the standard deviation to the mean of the clear state data. That is, the coefficient of variation result = (standard deviation data / clear state mean data) × 100%. In this way, the coefficient of variation of the private data held by all participants is calculated, while ensuring the security of the private data.
[0084] Furthermore, the initiator, the referee, and the participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During the data transmission process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent together to the receiver. The receiver substitutes the received data into the transmission verification function to obtain a second verification code, and determines whether the data has been tampered with during transmission based on whether the first verification code and the second verification code are the same.
[0085] In one example, the transmission verification function is D = E F modH, where F is the data used for transmission, D is the verification code, and E is an integer and E is... The generators G and H are both prime numbers, and H divides G-1. In actual transmission, the sender substitutes the data F1 to be sent into the transmission verification function to obtain the first verification code D1, and sends F1 and D1 together to the receiver. The receiver receives the data F'1 and the first verification code D'1, substitutes F'1 into the transmission verification function to obtain the second verification code D2, and verifies whether the received first verification code D'1 and the second verification code D2 are equal. This determines whether the data has been tampered with during transmission, thus ensuring the security of data transmission and contributing to the accuracy of the calculation results.
[0086] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0087] The above is an introduction to the method embodiments. The following system embodiments will further illustrate the solution described in this application.
[0088] Secondly, embodiments of this application disclose a system for securely calculating the coefficient of variation among multiple parties. The system includes a server and multiple terminals holding private data, wherein the server acts as the adjudicator, one terminal acts as the initiator, and at least two terminals act as participants.
[0089] After the initiator initiates the computation task
[0090] All participants receive the same preprocessing instruction to preprocess their own private data to obtain first processed data, wherein the preprocessing instruction includes a rounding instruction.
[0091] The referee generates a public and private key pair and sends the public key to all participants; during the computation, a set of prime numbers p and q are randomly selected, where n = pq. λ = lcm(p-1, q-1), define the function Calculate μ=(L(g) λ modn 2 )) -1 modn, where the public key is (n, g) and the private key is (λ, μ);
[0092] All participants use the received public key to encrypt their own initial processed data, obtaining the first encrypted data; during the computation process, participants randomly select... calculate Where, m i c represents the first processing data of the participating party. i This represents the first encrypted data of the participating parties;
[0093] All the first encrypted data is aggregated and sent to the initiator. The initiator obtains the secret state and value data based on all the first encrypted data and the constructed additive homomorphic function. During the calculation, the additive homomorphic function is... Where f represents the dense state and value data, and k represents the number of participants;
[0094] The encrypted sum data is sent to the referee, who decrypts it using their private key to obtain the explicit sum data. The referee then calculates the explicit mean sum data based on the explicit sum data and the number of participants, and distributes the explicit mean sum data to all participants. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;
[0095] All participants calculate the square of the difference between the first processed data and the mean data of the clear state to obtain the difference squared processed data;
[0096] Each participant randomly divides the difference processing data into no less than two parts and no more than the number of participants, and distributes the random partitioned data to all participants. Then, each participant calculates the sum of all the random partitioned data it receives as the difference recombined data.
[0097] All participants will summarize the difference-squared recombined data to the initiator. The initiator will calculate the square root of the sum of all difference-squared recombined data divided by the number of participants as the standard deviation data, and calculate the ratio of the standard deviation data to the mean data as the coefficient of variation.
[0098] Furthermore, the participating parties are further configured as follows:
[0099] Each participant randomly divides the difference processing data into a number of random partitions, retains one partition for itself, and distributes the other partitions to the other participants.
[0100] Furthermore, the initiator, the referee, and the participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During the data transmission process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent together to the receiver. The receiver substitutes the received data into the transmission verification function to obtain a second verification code, and determines whether the data has been tampered with during transmission based on whether the first verification code and the second verification code are the same.
[0101] Furthermore, the preprocessing instructions are obtained by the initiator, which is further configured as follows:
[0102] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.
[0103] Furthermore, the initiator is further configured as follows:
[0104] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;
[0105] The adjudicator identifies the relevant data in the big data scenario, performs data analysis on the relevant data to obtain the general precision value of the relevant data, and sends the general precision value to the initiator.
[0106] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.
[0107] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described herein can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0108] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for securely calculating the coefficient of variation among multiple parties, wherein the multiple parties include an initiator of the calculation task, a referee, and multiple participating parties, wherein the participating parties and the initiator hold private data, characterized in that, The initiator and the referee are two different parties, and the method comprises: All the participants obtain the same preprocessing instruction to preprocess the private data they hold to obtain first processed data, and the preprocessing instruction comprises an integer instruction; A set of public key and private key is generated by the judge party, and the public key is sent to all the participating parties; during the calculation process, a set of prime numbers p and q are randomly called, n=pq, and g is randomly selected , , define the function , calculate , wherein the public key is (n, g), and the private key is ( ,µ); All participants encrypt the first processing data held by themselves using the received public key to obtain first encrypted data; in the calculation process, the participants randomly select , calculate , wherein represents the first processing data of the participants, represents the first encrypted data of the participants; All the first encrypted data are aggregated to the initiator, and the initiator obtains the ciphertext sum data according to all the first encrypted data and the constructed additive homomorphic function; during the calculation, the additive homomorphic function is wherein, The ciphertext sum data is represented by s, and k represents the number of participants. The secret state sum data is sent to a judge party, the judge party decrypts the secret state sum data by using a private key to obtain clear state sum data, calculates clear state average data according to the clear state sum data and the number of the participants, and distributes the clear state average data to all the participants; in the calculation process, a function is constructed wherein y represents the clear state sum data. All the participants calculate the square of the difference between the first processed data and the mean data in the open state to obtain difference processed data; Each participant randomly divides the difference processed data into not less than two parts and not more than the number of participants, and distributes the random divided data among all the participants, and then each participant calculates the sum of all the random divided data received by itself as difference reorganized data; All the participants collect the difference reorganized data to the initiator, the initiator calculates the square root of the sum of all the difference reorganized data divided by the number of participants as the standard deviation data, and calculates the ratio of the standard deviation data and the mean data in the open state as the coefficient of variation result.
2. The method of claim 1, wherein, In each participant, the difference processed data is randomly divided into not less than two parts and not more than the number of participants, and the random divided data is distributed among all the participants, and then each participant calculates the sum of all the random divided data received by itself as difference reorganized data, Each participant randomly divides the difference processed data into random divided data of the number of participants, retains one random divided data and distributes the other random divided data to other participants.
3. The method according to claim 1 or 2, characterized in that, The initiator, the referee and the participants agree on a transmission verification function in advance, the transmission verification function is a discrete modulo operation function, in the data sending process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent to the receiver, the receiver substitutes the received data into the transmission verification function to obtain a second verification code, and judges whether the data is tampered in the transmission process according to whether the first verification code and the second verification code are the same.
4. The method according to claim 1 or 2, characterized in that, The preprocessing instruction further comprises a scaling instruction, the scaling instruction is before the integer instruction, and the scaling instruction is used to scale the data by a specified multiple.
5. The method of claim 4, wherein, The method for obtaining the preprocessing instruction comprises: The initiator determines the data scene and the accuracy requirement according to the calculation task, and sends the data scene to the referee; The referee determines the associated data of the data scene in the big data, performs data analysis on the associated data to obtain the accuracy value of the associated data, and sends the accuracy value to the initiator; The initiator determines the scaling multiple of the scaling instruction in the preprocessing instruction according to the accuracy requirement and the accuracy value.
6. A system for multi-party secure computation of a coefficient of variation, the system comprising: The server and a plurality of terminals holding private data are provided, the server serves as a referee, one terminal serves as an initiator, and at least two terminals serve as participants; After the initiator initiates a calculation task, All the participants obtain the same preprocessing instruction to preprocess the private data they hold to obtain first processed data, and the preprocessing instruction comprises an integer instruction; A set of public key and private key is generated by the judge party, and the public key is sent to all the participating parties; during the calculation process, a set of prime numbers p and q are randomly called, n=pq, and g is randomly selected , , define the function , calculate , wherein the public key is (n, g), and the private key is ( ,µ) All participants encrypt the first processing data held by themselves using the received public key to obtain first encrypted data; in the calculation process, the participants randomly select , calculate , wherein represents the first processing data of the participants, represents the first encrypted data of the participants; All the first encrypted data are aggregated to the initiator, and the initiator obtains the ciphertext sum data according to all the first encrypted data and the constructed additive homomorphic function; during the calculation, the additive homomorphic function is wherein, the ciphertext sum data is represented by s, and k represents the number of participants. The secret state sum data is sent to a judge party, the judge party decrypts the secret state sum data by using a private key to obtain clear state sum data, calculates clear state average data according to the clear state sum data and the number of the participants, and distributes the clear state average data to all the participants; in the calculation process, a function is constructed wherein y represents the clear state sum data. All the participants calculate the square of the difference between the first processed data and the mean data in the open state to obtain difference processed data; Each participant randomly divides the difference processed data into not less than two parts and not more than the number of participants, and distributes the random divided data among all the participants, and then each participant calculates the sum of all the random divided data received by itself as difference reorganized data; All the participants collect the difference reorganized data to the initiator, the initiator calculates the square root of the sum of all the difference reorganized data divided by the number of participants as the standard deviation data, and calculates the ratio of the standard deviation data and the mean data in the open state as the coefficient of variation result. Each participant randomly divides the difference-side processed data into random partition data in no less than two and no more than the number of participants, and distributes the random partition data among all participants, and each participant calculates the sum of all random partition data received by itself as the difference-side reorganized data; All participants aggregate the difference-side reorganized data to the initiator, the initiator calculates the square root value of the sum of all difference-side reorganized data divided by the number of participants as the standard deviation data, and calculates the ratio of the standard deviation data and the clear state average value data as the coefficient of variation result.
7. The system of claim 6, wherein, The participant is further configured to: Each participant randomly divides the difference-side processed data into random partition data in the number of participants, retains one random partition data and distributes the other random partition data to other participants.
8. The system of claim 6 or 7, wherein, The initiator, the referee and the participants agree on a transmission verification function in advance, the transmission verification function is a discrete modulo operation function, in the data sending process, the sender substitutes the data to be sent into the transmission verification function to obtain a first verification code, and sends the first verification code and the data to be sent to the receiver, the receiver substitutes the received data into the transmission verification function to obtain a second verification code, and judges whether the data is tampered in the transmission process according to whether the first verification code and the second verification code are the same.
9. The system of claim 6 or 7, wherein, The preprocessing instruction is obtained by the initiator, and the initiator is further configured to: The preprocessing instruction further includes a scaling instruction, the scaling instruction is before the rounding instruction, and the scaling instruction is used to scale the data by a specified multiple.
10. The system of claim 9, wherein, The initiator is further configured to: The initiator determines the data scene and the accuracy requirement according to the computing task, and sends the data scene to the referee; The referee determines the associated data of the data scene in the big data, performs data analysis on the associated data to obtain the accuracy value of the associated data, and sends the accuracy value to the initiator; The initiator determines the scaling multiple of the scaling instruction in the preprocessing instruction according to the accuracy requirement and the accuracy value.
Citation Information
Patent Citations
Homomorphism-based cloud-assisted dynamic universal secure multi-party computing method
CN110266721A
Computer-executable method and system for secure multi-party cloud computing
CN111639345A