Method and system for multi-party secure computation of mean one-sided data quantity

By employing a multi-party secure computation method and a homomorphic encryption algorithm, the method achieves secure computation of the average data quantity of the private data of the participating parties without a trusted third party. This solves the problems of data privacy protection and computational accuracy, and ensures the security and integrity of the data transmission process.

CN116582322BActive Publication Date: 2026-05-29LONGTEL INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LONGTEL INC
Filing Date
2023-05-13
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

How can we securely calculate the average data quantity among a group of untrusted participants in the absence of a trusted third party, while protecting the privacy of each party's data from being leaked?

Method used

A multi-party secure computation method is adopted, which utilizes homomorphic encryption algorithm and public key encryption technology. Through preprocessing, encryption, decryption, mean calculation and difference calculation, the secure mean of the data of the participants is calculated, and the integrity of data transmission is guaranteed by transmission verification function.

Benefits of technology

While ensuring the security of private data, the system accurately calculates the average amount of private data on one side of the participants' data and ensures the security and accuracy of the data transmission process through a transmission verification function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0004226797030000011
    Figure FDA0004226797030000011
  • Figure FDA0004226797030000012
    Figure FDA0004226797030000012
  • Figure FDA0004226797030000013
    Figure FDA0004226797030000013
Patent Text Reader

Abstract

The application provides a method and system for securely calculating the number of data greater than or less than the average in a multi-party secure calculation, belonging to the field of multi-party secure calculation, and used for providing a new scheme for achieving the task of securely calculating the number of data greater than or less than the average in a data group, wherein the multi-party includes an initiator of a calculation task, a referee and a plurality of participants, the participants and the initiator hold private data, the initiator and the referee are two different parties, and the method comprises the following steps: the participants pre-process the data, the referee generates a public key and a private key, and sends the public key to the participants, all the participants calculate the average of the private data based on an additive homomorphic encryption algorithm, and calculate the size relationship between the private data and the average based on a subtraction homomorphic encryption algorithm combined with the average, and then determine the number of data greater than or less than the average, and guarantee the data security of the private data held by all the participants.
Need to check novelty before this filing date? Find Prior Art

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 number of data on the mean side. Background Technology

[0002] Secure multi-party computation addresses the problem of privacy-preserving collaborative computation among a group of distrustful participants. It ensures input independence and computational correctness while preventing input values ​​from being disclosed 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 number of data points on one side of the mean in a multi-party calculation, which can achieve the task of securely calculating the number of data points in a data set that are greater than or less than the mean.

[0004] Firstly, this application provides a method for multi-party secure computation of the amount of data on one side of the mean. The multi-party components include an initiator of the computation 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 value based on the explicit sum data and the number of participants, and sends this explicit mean value to the initiator. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;

[0010] The initiator uses the public key to encrypt the plaintext mean data, obtaining encrypted mean data; during the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data;

[0011] The initiator obtains the encrypted difference data based on all the initial encrypted data, the encrypted mean data, and a subtractive homomorphic function, and sends the encrypted difference array to the referee; the subtractive homomorphic function is... z i This represents the dense state difference data corresponding to the i-th participant;

[0012] The adjudicator uses its private key to decrypt all encrypted difference data, obtaining explicit difference data corresponding to each participant. Based on these explicit difference data, the adjudicator determines the number of data points greater than or less than the mean. The number of data points greater than the mean represents the number of private data points held by each participant that are larger than the average of all private data, while the number of data points less than the mean represents the number of private data points held by each participant that are smaller than the average of all private data. During the calculation process, a... w i This represents the luminous difference data corresponding to the i-th participant, where w is greater than 0. i The quantity reflects the number of data points below the mean; w is less than 0. i The quantity reflects the number of data points greater than the mean.

[0013] By adopting the above technical solution, it is possible to calculate the average number of private data from all participants while ensuring the security of private data.

[0014] 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.

[0015] 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.

[0016] Furthermore, the method for obtaining the preprocessing instructions includes:

[0017] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;

[0018] 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.

[0019] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.

[0020] Secondly, this application provides a system for securely calculating the amount of data on one side of the average from multiple parties. The system includes a server and multiple terminals holding private data, wherein the server acts as the referee, one terminal acts as the initiator, and at least two terminals act as participants.

[0021] 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.

[0022] 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 (λ, μ);

[0023] 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;

[0024] 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;

[0025] 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 value based on the explicit sum data and the number of participants, and sends this explicit mean value to the initiator. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;

[0026] The initiator uses the public key to encrypt the plaintext mean data, obtaining encrypted mean data; during the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data;

[0027] The initiator obtains the encrypted difference data based on all the initial encrypted data, the encrypted mean data, and a subtractive homomorphic function, and sends the encrypted difference array to the referee; the subtractive homomorphic function is... z i This represents the dense state difference data corresponding to the i-th participant;

[0028] The adjudicator uses its private key to decrypt all encrypted difference data, obtaining explicit difference data corresponding to each participant. Based on these explicit difference data, the adjudicator determines the number of data points greater than or less than the mean. The number of data points greater than the mean represents the number of private data points held by each participant that are larger than the average of all private data, while the number of data points less than the mean represents the number of private data points held by each participant that are smaller than the average of all private data. During the calculation process, a... w i This represents the luminous difference data corresponding to the i-th participant, where w is greater than 0. i The quantity reflects the number of data points below the mean; w is less than 0. i The quantity reflects the number of data points greater than the mean.

[0029] 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.

[0030] Furthermore, the preprocessing instructions are obtained by the initiator, which is further configured as follows:

[0031] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.

[0032] Furthermore, the initiator is further configured as follows:

[0033] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;

[0034] 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.

[0035] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.

[0036] In summary, this application has at least the following beneficial effects:

[0037] 1. A method and system for multi-party secure calculation of the average data quantity is provided. Based on homomorphic encryption algorithm, it can achieve the task of calculating the average data quantity of the private data held by all participants while ensuring the security of the private data held by the participants.

[0038] 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.

[0039] 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. Attached Figure Description

[0040] This application has no accompanying drawings. Detailed Implementation

[0041] 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.

[0042] This application provides a method and system for multi-party secure calculation of the number of data on the mean side, which uses a homomorphic encryption algorithm and performs calculations based on privacy data, thereby enabling the calculation of the number of data on the mean side while ensuring the security of privacy data.

[0043] In a first aspect, embodiments of this application disclose a method for multi-party secure calculation of the number of data on one side of the mean.

[0044] 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.

[0045] 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.

[0046] This method can be executed in the aforementioned runtime environment.

[0047] The method specifically includes the following steps:

[0048] S201: All participants receive the same preprocessing instructions to preprocess their own private data to obtain the first processed data.

[0049] The preprocessing instructions include rounding instructions.

[0050] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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 .

[0061] S202: The referee generates a set of public and private keys and sends the public key to all participants.

[0062] 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 (λ, μ).

[0063] 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.

[0064] S203: All participants use the received public key to encrypt the first processed data they hold, thus obtaining the first encrypted data.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] S205: The secret state sum data is sent to the referee, who uses a private key to decrypt the secret state sum data to obtain the explicit state sum data, calculates the explicit state average data based on the explicit state sum data and the number of participants, and sends the explicit state average data to the initiator.

[0070] During the calculation process, construct y = (L(f) λ modn 2 )·μ)modn, where y represents the luminous state sum and value data. The luminous state mean data is equal to y / k, and the luminous state mean data is rounded to the nearest integer. The y / k used in subsequent calculations represents the rounded result. It should be understood that, within the allowable range of precision, the luminous state mean data is 10 times the mean of the private data held by all participating parties. t times.

[0071] S206: The initiator uses the public key to encrypt the plain mean data to obtain encrypted mean data.

[0072] During the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data;

[0073] S207: The initiator obtains the dense state difference data based on all the first encrypted data, the encrypted mean data, and the constructed subtractive homomorphic function, and sends the dense state difference array to the referee.

[0074] In this step, the subtraction homomorphic function is: z i This represents the dense state difference data corresponding to the i-th participant.

[0075] S208: The referee uses the private key to decrypt all the encrypted difference data to obtain the explicit difference data corresponding to each participant, and determines the number of data points greater than the mean or less than the mean based on all the explicit difference data.

[0076] The number of data points greater than the mean represents the number of private data points held by all participants that are greater than the mean of all private data; the number of data points less than the mean represents the number of private data points held by all participants that are less than the mean of all private data. During the calculation process, a structure is constructed... w i This represents the luminous state difference data corresponding to the i-th participant. The luminous state difference data is equal to the luminous state mean data minus the first processed data of the i-th participant. A value greater than 0 indicates a w. i The quantity reflects the number of data points less than the mean; w is less than 0.i The quantity reflects the number of data points greater than the average. This allows us to determine how much of the private data held by all participants is greater than the average of all private data, and how much is less than the average of all private data, while simultaneously ensuring the security of the private data.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] The above is an introduction to the method embodiments. The following system embodiments will further illustrate the solution described in this application.

[0081] Secondly, embodiments of this application disclose a system for securely calculating the amount of data on one side of the average from multiple parties. The system includes a server and multiple terminals holding private data, wherein the server acts as the referee, one terminal acts as the initiator, and at least two terminals act as participants.

[0082] After the initiator initiates the computation task

[0083] All participants receive the same preprocessing instruction to preprocess their own private data to obtain first processed data. The preprocessing instruction includes a rounding instruction.

[0084] 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 (λ, μ);

[0085] 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;

[0086] 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;

[0087] 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 value based on the explicit sum data and the number of participants, and sends this explicit mean value to the initiator. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data;

[0088] The initiator uses the public key to encrypt the plaintext mean data, obtaining encrypted mean data; during the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data;

[0089] The initiator obtains the encrypted difference data based on all the initial encrypted data, the encrypted mean data, and a subtractive homomorphic function, and sends the encrypted difference array to the referee; the subtractive homomorphic function is... z i This represents the dense state difference data corresponding to the i-th participant;

[0090] The adjudicator uses its private key to decrypt all encrypted difference data, obtaining explicit difference data corresponding to each participant. Based on these explicit difference data, the adjudicator determines the number of data points greater than or less than the mean. The number of data points greater than the mean represents the number of private data points held by each participant that are larger than the average of all private data, while the number of data points less than the mean represents the number of private data points held by each participant that are smaller than the average of all private data. During the calculation process, a... w i This represents the luminous difference data corresponding to the i-th participant, where w is greater than 0. i The quantity reflects the number of data points less than the mean; w is less than 0. i The quantity reflects the number of data points greater than the mean.

[0091] Furthermore, the participating parties are further configured as follows:

[0092] 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.

[0093] 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.

[0094] Furthermore, the preprocessing instructions are obtained by the initiator, which is further configured as follows:

[0095] The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.

[0096] Furthermore, the initiator is further configured as follows:

[0097] The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee;

[0098] 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.

[0099] The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.

[0100] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0101] 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 amount of data on one side of a multi-party average, wherein the multi-party includes 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 initiating party and the referee are two different parties, and the method includes: All participants receive the same preprocessing instruction to preprocess their own private data to obtain first processed data. The preprocessing instruction includes a rounding instruction. 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 (λ, μ); 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; 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; 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 value based on the explicit sum data and the number of participants, and sends this explicit mean value to the initiator. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data; The initiator uses the public key to encrypt the plaintext mean data, obtaining encrypted mean data; during the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data; The initiator obtains the encrypted difference data based on all the initial encrypted data, the encrypted mean data, and a subtractive homomorphic function, and sends the encrypted difference array to the referee; the subtractive homomorphic function is... z i This represents the dense state difference data corresponding to the i-th participant; The adjudicator uses its private key to decrypt all encrypted difference data, obtaining explicit difference data corresponding to each participant. Based on these explicit difference data, the adjudicator determines the number of data points greater than or less than the mean. The number of data points greater than the mean represents the number of private data points held by each participant that are larger than the average of all private data, while the number of data points less than the mean represents the number of private data points held by each participant that are smaller than the average of all private data. During the calculation process, a... w i This represents the luminous difference data corresponding to the i-th participant, where w is greater than 0. i The quantity reflects the number of data points less than the mean; w is less than 0. i The quantity reflects the number of data points greater than the mean.

2. The method according to claim 1, characterized in that, The initiator, referee, and participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During data transmission, 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.

3. The method according to claim 1 or 2, characterized in that, The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.

4. The method according to claim 3, characterized in that, The method for obtaining the preprocessing instructions includes: The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee; 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. The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.

5. A system for multi-party secure calculation of the number of data points on one side of the mean, characterized in that, It includes a server and multiple terminals holding private data, wherein the server acts as the referee, one terminal acts as the initiator, and at least two terminals act as participants. After the initiator initiates the computation task All participants receive the same preprocessing instruction to preprocess their own private data to obtain first processed data. The preprocessing instruction includes a rounding instruction. 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 (λ, μ); 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; 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; 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 value based on the explicit sum data and the number of participants, and sends this explicit mean value to the initiator. During the calculation, y = (L(f) is constructed. λ modn 2 )·μ)modn, where y represents the luminous state and value data; The initiator uses the public key to encrypt the plaintext mean data, obtaining encrypted mean data; during the calculation process, the initiator randomly selects... calculate Where m0 represents the plain mean data and c0 represents the encrypted mean data; The initiator obtains the encrypted difference data based on all the initial encrypted data, the encrypted mean data, and a subtractive homomorphic function, and sends the encrypted difference array to the referee; the subtractive homomorphic function is... z i This represents the dense state difference data corresponding to the i-th participant; The adjudicator uses its private key to decrypt all encrypted difference data, obtaining explicit difference data corresponding to each participant. Based on these explicit difference data, the adjudicator determines the number of data points greater than or less than the mean. The number of data points greater than the mean represents the number of private data points held by each participant that are larger than the average of all private data, while the number of data points less than the mean represents the number of private data points held by each participant that are smaller than the average of all private data. During the calculation process, a... w i This represents the luminous difference data corresponding to the i-th participant, where w is greater than 0. i The quantity reflects the number of data points less than the mean; w is less than 0. i The quantity reflects the number of data points greater than the mean.

6. The system according to claim 5, characterized in that, The initiator, referee, and participants pre-agree on a transmission verification function, which is a discrete modular arithmetic function. During data transmission, 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.

7. The system according to claim 5 or 6, characterized in that, The preprocessing instructions are obtained by the initiator, which is further configured as follows: The preprocessing instructions also include scaling instructions, which precede the rounding instructions and are used to scale the data by a specified factor.

8. The system according to claim 7, characterized in that, The initiator is further configured as follows: The initiator determines the data scenario and accuracy requirements based on the computation task, and sends the data scenario to the referee; 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. The initiator determines the scaling factor of the scaling instruction in the preprocessing instruction based on the accuracy requirements and general accuracy values.