Privacy-preserving machine learning reasoning method and system based on secure multi-party computing

By using commitment values ​​and zero-knowledge proofs in secure multi-party computation to verify the integrity of the machine learning model and perform inferences in the secure computing framework, the problems of low secure multi-party computation performance and high computational overhead in the existing technology are solved, achieving Resource-efficient privacy-preserving machine learning inference.

CN114398662BActive Publication Date: 2024-09-24XIDIAN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111489427.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2024-09-24
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The publicly verifiable performance of secure multi-party computation in the existing technology is low, and the high complexity of the hash circuit results in high computational overhead, making it difficult to complete data verification and ensure the verifiability of the calculation process under conditions of limited resources.

Method used

Adopting a privacy-preserving machine learning inference method based on secure multi-party computation, the service provider commits to the model to generate labels, uses zero-knowledge proof to verify the integrity of the model, and performs machine learning inference in a secure computing framework to ensure the security of the computing process. sex.

Benefits of technology

It realizes the credibility verification of the data of both parties under the condition of limited resources, protects the privacy of user data and the security of the service provider model, avoids data tampering and leakage, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398662B
    Figure CN114398662B
Patent Text Reader

Abstract

The present invention belongs to the field of data security and cryptography application technology, and discloses a privacy-preserving machine learning reasoning method and system based on secure multi-party computing. The privacy-preserving machine learning reasoning method based on secure multi-party computing includes: the service provider makes a commitment to the machine learning model it provides, generates a label to ensure a one-to-one binding between the label and the model; uses the label to limit the model to ensure that the model will not be changed after the user selects the label; before the user starts machine learning reasoning, uses zero-knowledge proof to verify whether the selected label has been changed; and finally uses a secure computing framework to ensure the security of the computing process. The present invention makes full use of the characteristics of unchangeable commitments and zero-knowledge proofs. In the entire service process, there is no trusted third party involved, that is, there will be no third party that simultaneously grasps the data of both parties, solving the problem of untrustworthy third parties from the root.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data security and cryptography application technology, and in particular relates to a privacy-preserving machine learning reasoning method and system based on secure multi-party computing. Background Art

[0002] At present, in the information age, life is inseparable from data. In order to process these data more conveniently, the method of processing data using machine learning has emerged. The machine learning method is a method in which computers use existing data to derive a certain model and use this model to predict the future. As a mainstream data processing solution, it plays an important role in many fields. With the continuous promotion of machine learning algorithms, the accuracy of machine learning reasoning continues to improve, and the cost continues to decrease. Not only enterprises, but also many individuals want to process their own data through machine learning reasoning. However, the generation of an excellent machine learning model requires a lot of data and time. Individuals or smaller companies do not have the ability or need to generate their own machine learning models. In this context, various big data processing service providers are gradually beginning to expand their businesses, carry out machine learning reasoning services for personal or corporate data, and use their own machine learning models to predict user data. Users select the corresponding machine learning model for reasoning according to their own needs to obtain the reasoning results. However, users often do not want others to know their user data. For enterprises, they do not want other enterprises to know the data they have spent time and energy to collect; for individuals, personal data contains personal privacy information, which can be used to determine basic personal information, including personal daily activities and health conditions, such as electricity consumption information can be used to infer whether a person is at home, and medical information can be used to infer whether a person has a disease, etc.; similarly, for service providers, because the models they have obtained at great cost have commercial value, they will also protect the models from being leaked. Based on the above two points, it is necessary to protect the privacy of user data and the security of the service provider's model at the same time. In order to solve the above problems, there are two ways to solve this problem in the prior art: 1) Add Pedersen commitment to the original data, based on publicly verifiable secure computing. 2) Based on the symmetric verifiability of SPDZ, add hash commitment to the original data. However, the public verifiability of secure multi-party computing is low, and the high complexity of hash circuits will bring large computational overhead.

[0003] Through the above analysis, the problems and defects of the existing technology are: the public verifiable performance of secure multi-party computing in the existing technology is low, and the high complexity of the hash circuit will bring large computational overhead.

[0004] The difficulty in solving the above problems and defects lies in how to use fewer resources to complete the verification of both parties' data before secure calculation and ensure the verifiability of the calculation process.

[0005] The significance of solving the above problems and defects is that after fully solving the above problems, the credibility of the input data of both parties during the data reasoning process can be protected. Summary of the invention

[0006] In response to the problems existing in the prior art, the present invention provides a privacy-preserving machine learning reasoning method and system based on secure multi-party computing.

[0007] The present invention is implemented as follows: a privacy-preserving machine learning reasoning method based on secure multi-party computing, the privacy-preserving machine learning reasoning method based on secure multi-party computing comprising:

[0008] The service provider commits to the machine learning model it provides and generates labels to ensure a one-to-one binding between the label and the model;

[0009] Use tags to limit the model to ensure that the model will not be changed after the user selects a tag;

[0010] Before the user starts machine learning reasoning, zero-knowledge proof is used to verify whether the selected label has been changed; finally, the secure computing framework is used to ensure the security of the computing process.

[0011] Furthermore, the privacy-preserving machine learning reasoning method based on secure multi-party computing specifically includes the following steps:

[0012] Step 1, the model qualification stage, the service provider uses the commitment value to qualify the model, publicly discloses the commitment value as a label, and uses the label to qualify the model; this step can ensure that the service provider's model corresponds to the label one by one and that the corresponding relationship will not be changed.

[0013] Step 2: Input limitation stage. This module is used by both parties to combine the data involved in the calculation with the global MAC code and then share them to achieve the purpose of locking the input data. It can ensure that the input data will not be maliciously tampered with. Any tampering with the data will lead to the failure of subsequent verification.

[0014] Step 3, zero-knowledge proof stage, using a linear zero-knowledge proof scheme to determine whether the restricted model data is the same as the model data corresponding to the label under zero-knowledge conditions;

[0015] Step 4, the secure computing phase, uses a two-party secure computing protocol to perform machine learning reasoning, which can ensure the security of the computing process.

[0016] Furthermore, the specific process of the model definition stage is as follows:

[0017] Service providers can use the data model they own to k , generating the corresponding generation w k The Pedersen commitment P(w k );

[0018] The service provider will P(w k ) is published as a label, and the publicly available random numbers g, h, p used for verification are also published;

[0019] The P(w k )for:

[0020]

[0021] Among them, w k is the model, p is a large prime number, g and h are finite fields Z P The element on the , r is a randomly generated blinding factor, P(w k ) is the committed value.

[0022] Furthermore, the specific process of the input limitation stage is as follows:

[0023] Client randomly generates n prime numbers p k , the size of n is related to the data length b (0≤k<n), The maximum length of encrypted data supported by BGV in the HElib library is 32 bits, which is extended here;

[0024] The client publishes the randomly generated prime numbers, and the server selects any prime numbers from the set m. The client uses p i Generate the public and private key pair pk of BGV for the module i ,sk i , where (0≤i<n and ); Server with p j Generate the public and private key pair pk of BGV for the module j ,sk j , where (0≤j<n and j∈m);

[0025] Server generates a random number α s , r s ; Client generates a random number α c , r c ; Server will use its own random number α s , r s And the w involved in the calculation is modulo p k , we get α s,k , r s,k With w k; Client sends its own random number α c , r c Respectively modulo p k Get α c,k , r c,k , where 0≤k<n;

[0026] Server and Client use public key pk k The alpha corresponding to the encryption s,k , r s,k , α c,k , r c,k and w k ; get C(α s,k ), C(r s,k ), C(α c,k ), C(r c,k ) and C(w k );

[0027] The server sends the data numbered j to the client; the client sends the data numbered i to the server; in this way, the server obtains C(α s,i ), C(r s,i ), C(α c,i ), C(r c,i ) and C(w i ); Client gets C(α s,i ), C(r s,i ), C(α c,i ), C(r c,i ) and C(w i ), where (0≤i<n and ), (0≤j<n and j∈m);

[0028] Both parties perform calculations locally, and the Server and Client use their own private keys sk j With sk i Decrypt the corresponding data; after the server completes the decryption, it sends the data to the client, and the client uses the Chinese remainder theorem to get Δ+r s +rc , And let Δ2=Δ+r s +r c -r c , the server side sets Δ1 = -r s .

[0029] Furthermore, the two parties respectively perform local calculations, specifically:

[0030] C(α k )=C(α s,k)+C(α c,k );

[0031] C(Δ k )=C(α k ·w k )=C(α k )·C(w k );

[0032] C(Δ k +r s,k +r c,k )=C(α k ·w k )+C(r s,k )+C(r c,k );

[0033] Where 0≤k<n, and the result is made public.

[0034] Furthermore, the specific process of the zero-knowledge proof stage is as follows:

[0035] Server Computing h R Where R is a random number, and the Client calculates Send the results to each other and get g α and g Δ h R , both parties get:

[0036]

[0037] because

[0038]

[0039] If: a1 = 1, a2 = p-1, a3 = 0;

[0040] Satisfies: 1·x1+(p-1)·x2+0·x3=0modp;

[0041] Zero-knowledge proof scheme;

[0042] Server generates v i ,satisfy Server Computing

[0043] s i =v i -C x i ;

[0044]

[0045] Where C=H(g,g α, h, y, t), function H(x) is a hash function; the result is sent to the Client;

[0046] Client judgment as well as

[0047] Is it true? If so, enter the secure multi-party computing framework for further calculation;

[0048] If there are n w and w k , then batch verification is performed:

[0049] Client generates a random number η i ,judge

[0050]

[0051]

[0052] Is it true, where C j =H(g,g α ,h,y j , t j ), function H(x) is a hash function.

[0053] Furthermore, the specific process of the secure calculation stage is as follows:

[0054] The data of both parties involved in machine learning reasoning are input into the SPDZ framework for secure multi-party computing.

[0055] Another object of the present invention is to provide a privacy-preserving machine learning reasoning system based on secure multi-party computing that implements the privacy-preserving machine learning reasoning method based on secure multi-party computing, and the privacy-preserving machine learning reasoning system based on secure multi-party computing includes:

[0056] The model qualification module is used by service providers to commit to their own model data and disclose the committed value as a label, that is, to limit all their own models through labels and disclose the defined labels. After the labels are disclosed, the committed model information will not be changed due to the security of the commitment; at the same time, the label value will also be used as data to participate in the subsequent verification process, that is, in the subsequent calculation process, the model data input by the service provider will be compared with the model data limited by the label;

[0057] The input restriction module is used for the two parties to combine the data involved in the calculation with the global MAC code Δ to generate α, and share α to achieve the purpose of locking the input data and ensure that the data will not change during the subsequent calculation process. The global MAC code Δ is jointly generated and controlled by both parties. No party can obtain the value of the global MAC code Δ. If either party changes the locked data, it will cause an error in the recovery of the value α during the subsequent verification process, resulting in verification failure;

[0058] A zero-knowledge proof module is used for zero-knowledge proof. It uses a linear zero-knowledge proof scheme to determine whether the restricted model data is the same as the model data provided by the service provider under zero-knowledge conditions.

[0059] The secure computing module is used for secure computing after verification to ensure the security of the data of both parties involved in the computing process. It is implemented by the secure multi-party computing model under the existing malicious model, and the SPDZ framework is used here.

[0060] Another object of the present invention is to provide a storage medium for receiving a user input program, wherein the stored computer program enables an electronic device to execute the privacy-preserving machine learning reasoning method based on secure multi-party computing, comprising the following steps:

[0061] The service provider commits to the machine learning model it provides and generates labels to ensure a one-to-one binding between the label and the model;

[0062] Use tags to limit the model to ensure that the model will not be changed after the user selects a tag;

[0063] Before the user starts machine learning reasoning, zero-knowledge proof is used to verify whether the selected label has been changed; finally, the secure computing framework is used to ensure the security of the computing process.

[0064] Another object of the present invention is to provide a computer program product stored on a computer-readable medium, including a computer-readable program, which, when executed on an electronic device, provides a user input interface to implement the privacy-preserving machine learning reasoning method based on secure multi-party computing.

[0065] Combined with all the above technical solutions, the advantages and positive effects of the present invention are as follows: the present invention provides a machine learning reasoning scheme for a limited model based on the idea of ​​verifiable commitment value and zero-knowledge proof, making full use of the characteristics of unchangeable commitment and zero-knowledge proof of zero knowledge. In the entire service process, there is no trusted third party involved, that is, no third party will master the data of both parties at the same time, solving the problem of untrustworthy third parties from the root. The present invention provides a machine learning reasoning scheme for a limited model based on the idea of ​​verifiable commitment value and zero-knowledge proof. In order to avoid the leakage of service provider data, the model that the service provider can provide is committed, a label is generated, and the user can choose different services by publicizing the label to perform secure machine learning reasoning, and the idea of ​​homomorphic encryption and SPDZ is used to ensure the non-tamperability of the input of both parties. At the same time, the present invention provides a machine learning reasoning scheme for a limited model based on the idea of ​​verifiable commitment value and zero-knowledge proof, and then provides a machine learning reasoning scheme for a limited model. The entire calculation process needs to ensure the security of the data of both parties, so zero-knowledge proof is introduced to ensure the validity of the data input by the service provider. The present invention ensures that after the user selects the service in the process of "machine learning as a service", the service provider can only use the model corresponding to the service disclosed by itself to provide services. That is, the authenticity of the data input by the service provider is guaranteed and cannot be tampered with. Protect the legitimate rights and interests of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic diagram of the structure of a privacy-preserving machine learning reasoning system based on secure multi-party computing provided by an embodiment of the present invention;

[0067] Figure 1 In: 1. Model limitation module; 2. Input limitation module; 3. Zero-knowledge proof module; 4. Secure computing module.

[0068] Figure 2 It is a flow chart of a privacy-preserving machine learning reasoning method based on secure multi-party computing provided by an embodiment of the present invention.

[0069] Figure 3 It is a flow chart of the model definition module of the method of the present invention.

[0070] Figure 4 It is a schematic diagram of the flow chart of the input limiting module of the method of the present invention.

[0071] Figure 5 It is a flow chart of the zero-knowledge proof module of the method of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0073] In view of the problems existing in the prior art, the present invention provides a privacy-preserving machine learning reasoning method and system based on secure multi-party computing. The present invention is described in detail below in conjunction with the accompanying drawings.

[0074] A person skilled in the art may also adopt other steps to implement the privacy-preserving machine learning inference system based on secure multi-party computing provided by the present invention. Figure 1 The privacy-preserving machine learning reasoning system based on secure multi-party computing provided by the present invention is only a specific embodiment.

[0075] like Figure 1 As shown, the privacy-preserving machine learning reasoning system based on secure multi-party computing provided by an embodiment of the present invention includes:

[0076] Model qualification module 1 is used for service providers to commit to their own model data and disclose the committed value as a label, that is, to define all their own models through labels and disclose the defined labels. After the labels are disclosed, the committed model information will not be changed due to the security of the commitment. At the same time, the label value will also be used as data to participate in the subsequent verification process, that is, in the subsequent calculation process, the model data entered by the service provider will be compared with the model data limited by the label.

[0077] Input limitation module 2 is used for the two parties to combine the data involved in the calculation with the global MAC code Δ to generate α, and share α to achieve the purpose of locking the input data and ensure that the data will not change during the subsequent calculation process. The global MAC code Δ is jointly generated by both parties and is jointly controlled by both parties. No party can obtain the value of the global MAC code Δ. If either party changes the locked data, it will cause an error in the recovery of the value α during the subsequent verification process, resulting in verification failure.

[0078] The zero-knowledge proof module 3 is used for zero-knowledge proof, and uses a linear zero-knowledge proof scheme to determine whether the limited model data is the same as the model data provided by the service provider under zero-knowledge conditions.

[0079] The secure computing module 4 is used for secure computing after verification to ensure the security of the data of both parties involved in the computing process; this module is implemented by the secure multi-party computing model under the existing malicious model (the SPDZ framework is used here).

[0080] like Figure 2As shown, the privacy-preserving machine learning reasoning method based on secure multi-party computing provided by an embodiment of the present invention includes:

[0081] S101: In the model definition stage, the service provider defines the model using the commitment value, and discloses the commitment value as a label to define the model;

[0082] S102: Input restriction stage, this module is used for the two parties to combine the data involved in the calculation with the global MAC code and then share them, so as to achieve the purpose of locking the input data;

[0083] S103: In the zero-knowledge proof stage, a linear zero-knowledge proof scheme is used to determine whether the restricted model data is the same as the model data corresponding to the label under zero-knowledge conditions;

[0084] S104: Secure computing phase, using a two-party secure computing protocol for machine learning reasoning.

[0085] like Figure 3 As shown, the specific process of the model definition stage provided by the embodiment of the present invention is:

[0086] Service providers can use the data model they own to k , generating the corresponding generation w k The Pedersen commitment P(w k ).in, w k is the machine learning model owned by the service provider, p is a large prime number, g and h are finite fields Z P The element on the , r is a randomly generated blinding factor, P(w k ) is the committed value.

[0087] The service provider will P(w k ) is published as a label, and the publicly available random numbers g, h, and p used for verification are also published.

[0088] like Figure 4 As shown, the input restriction stage provided by the embodiment of the present invention has the following specific process: the Client randomly generates n prime numbers p k , the size of n is related to the data length b (0≤k<n), The maximum length of encrypted data supported by BGV in the HElib library is 32 bits, so it is extended here. The client publishes the randomly generated prime number, and the server selects any prime number from the set m; the client uses p i Generate the public and private key pair pk of BGV for the module i ,sk i , where (0≤i<n and ); Server with pj Generate the public and private key pair pk of BGV for the module j ,sk j , where (0≤j<n and j∈m). The server generates a random number αs, r s ; Client generates a random number α c , r c The server will use its own random number α s , r s And w involved in the calculation is secretly shared using the Chinese remainder theorem. The prime number in the Chinese remainder theorem is p k , we get α s,k , r s,k With w k ; Client also uses its own random number α c , r c Using the Chinese remainder theorem modulo p k Get α c,k , r c,k , where 0≤k<n.

[0089] Server and Client use public key pkk to encrypt the corresponding α s,k , r s,k , α c,k , r c,k and w k . We get C(α s,k ), C(r s,k ), C(α c,k ), C(r c,k ) and C(w k ).

[0090] The server sends the data numbered j to the client; the client sends the data numbered i to the server. In this way, the server obtains C(α s,i ), C(r s,i ), C(α c,i ), C(r c,i ) and C(w i ). Client gets C(α s,i ), C(r s,i ), C(α c,i ), C(r c,i ) and C(w i ), where (0≤i<n and ), (0≤j<n and j∈m).

[0091] Both parties calculate locally:

[0092] C(α k)=C(α s,k )+C(α c,k );

[0093] C(Δ k )=C(α k ·w k )=C(α k )·C(w k );

[0094] C(Δ k +r s,k +r c,k )=C(α k ·w k )+C(r s,k )+C(r c,k );

[0095] Where 0≤k<n, and the result is made public.

[0096] Server and Client use their own private keys sk j With sk i Decrypt the corresponding data; after the server completes the decryption, it sends the data to the client, and the client uses the Chinese remainder theorem to get Δ+r s +r c , and let Δ2=Δ+r s +r c -r c , the server side sets Δ1 = -r s .

[0097] like Figure 5 As shown, the specific process of the zero-knowledge proof stage provided by the embodiment of the present invention is:

[0098] Server Computing h R Where R is a random number, and the Client calculates Send the results to each other and get g α and g Δ h R , both parties get:

[0099]

[0100] because

[0101]

[0102] If: a1 = 1, a2 = p-1, a3 = 0;

[0103] Satisfies: 1·x1+(p-1)·x2+0·x3=0modp;

[0104] Meet the zero-knowledge proof scheme.

[0105] Server generates v i ,satisfy Server Computing

[0106] s i =v i -C x i ;

[0107]

[0108] Where C=H(g,g α , h, y, t), function H(x) is a hash function; the result is sent to the Client.

[0109] Client judgment as well as

[0110] Is it true? If the result is true, enter the secure multi-party computing framework for further calculation.

[0111] If there are n w and w k , you can perform batch verification:

[0112] Client generates a random number η i ,judge

[0113]

[0114]

[0115] Is it true, where C j =H(g,g α ,h,y j , t j ), function H(x) is a hash function.

[0116] The specific process of the secure computing phase provided by the embodiment of the present invention is as follows:

[0117] The data of both parties involved in machine learning reasoning are input into the SPDZ framework for secure multi-party computing.

[0118] The technical effects of the present invention are described in detail below in conjunction with specific embodiments.

[0119] 1 Correctness and Security

[0120] The present invention uses Pedersen commitment and zero-knowledge proof to ensure security, that is, after the service provider makes the label public, the correspondence between the label and the model will not be changed. In zero-knowledge proof, except for the proof result, the user does not obtain any information about the service provider model.

[0121] Proof: This is guaranteed to be verified with zero knowledge, thanks to the following method:

[0122]

[0123] P Calculate the commitment value where v1, ..., v l is the residue system modulo q The linear relationship is satisfied A set of random numbers. P calculates s i =v i -cx i (i=1, ..., l) and construct (s1, ..., s l , t), where c = H (g1, g2, ... g l , y, t), function H(x) is a hash function.

[0124] -PROOFCHECK(·)→l or0;

[0125] V verifies the zero-knowledge proof by verifying the following two equations:

[0126]

[0127]

[0128] where c = H (g1, g2, ... g l , y, t), function H(x) is a hash function. If the verification is successful, the output is 1; otherwise, the output is 0.

[0129] -BATCHCHECK(·)→lor0;

[0130] Given y j and (s j , 1, ..., S j,l , t j ) Generate a random number η i ,judge:

[0131]

[0132]

[0133] Is it true, where c = H (g1, g2, ... gl , y, t), function H(x) is a hash function.

[0134] 2 Effectiveness: In terms of computational cost, the method used in the present invention is effective. Table 1 shows the results of an experiment on 10,000 128-bit data on a virtual machine (Ubuntu 18.04).

[0135] Table 1 shows the results of the experiment on a virtual machine (Ubuntu 18.04) with 10,000 128-bit data.

[0136] Calculation time Using Paillier implementation 361.7s Implementation using BGV 423.5s Use sha256 implementation in SPDZ 2250s

[0137] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.

[0138] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A privacy-preserving machine learning reasoning method based on secure multi-party computing, characterized in that: The privacy-preserving machine learning inference method based on secure multi-party computation includes: The service provider makes a commitment to the machine learning model it provides, generates a label to ensure a one-to-one binding between the label and the model; Use the label to limit the model to ensure that the model will not be changed after the user selects the label; Before the user starts machine learning inference, use zero-knowledge proof to verify whether the selected label has been changed; Finally, use a secure computing framework to ensure the security of the computing process; The privacy-preserving machine learning inference method based on secure multi-party computation specifically includes the following steps: Step 1, model limitation stage. The service provider uses the commitment value to limit the model, publicly uses the commitment value as a label, and uses the label to limit the model; Step 2, input limitation stage. The two parties involved combine the data participating in the calculation with the global MAC code and then share it to achieve the purpose of locking the input data; Step 3, zero-knowledge proof stage. Use a linear zero-knowledge proof scheme to determine whether the limited model data is the same as the model data corresponding to the label in zero knowledge; Step 4, secure computing stage. Use a two-party secure computing protocol to perform machine learning inference; The specific process of the model limitation stage is: Service providers can use the data model they own to k , generating the corresponding generation w k The Pedersen commitment P(w k ); The service provider will P(w k ) is published as a label, and the publicly available random numbers g, h, p used for verification are also published; The P(w k )for: Among them, w k is the model, p is a large prime number, g and h are finite fields Z P The element on the , r is a randomly generated blinding factor, P(w k ) is the committed value; The specific process of the input limitation stage is: Client randomly generates n prime numbers p k , the size of n is related to the data length b (0≤k <n), The maximum length of encrypted data supported by BGV in the HElib library is 32 bits, which is extended here; The Client makes the randomly generated prime number public, and the Server selects any number of prime numbers with numbers in the set m; The Client generates the public and private key pair pk i of BGV with p i as the modulus, sk i , where 0 ≤ i < n and The Server generates the public and private key pair pk j of BGV with p j as the modulus, sk j , where 0 ≤ j < n and j ∈ m; Server generates a random number σ s , r s ; Client generates a random number α c , r c ; Server will use its own random number σ s , r s And the w involved in the calculation is modulo p k , we get α s,k , r s,k With w k ; Client sends its own random number σ c , r c Respectively modulo p k Get α c,k , r c,k , where 0≤k <n; Server and Client use public key pk k The encryption corresponding to σ s,k , r s,k , α c,k , r c,k and w k ; get C(α s,k ), C(r s,k ), C(σ c,k ), C(r c,k ) and C(w k ); The Server sends the data numbered j to the Client; the Client sends the data numbered i to the Server; in this way, the Server obtains C(σ s,i ), C(r s,i ), C(σ c,i ), C(r c,i ) and C(w i ); the Client obtains C(α s,i ), C(r s,i ), C(α c,i ), C(r c,i ) and C(w i ), where 0 ≤ i < n and 0 ≤ j < n and j ∈ m; Both parties perform calculations locally, and the Server and Client use their own private keys sk j With sk i Decrypt the corresponding data; after the server completes the decryption, it sends the data to the client, and the client uses the Chinese remainder theorem to get Δ+r s +r c , and let Δ2=Δ+r s +r c -r c , the server side sets Δ1 = -r s ; The two parties calculate locally respectively, specifically: C(a k )=C(α s,k )+C(a c,k ); C(D k )=C(α k ·w k )=C(σ k )·C(w k ); C(Δ k +r s,k +r c,k )=C(α k ·w k )+C(r s,k )+C(r c,k ); where 0 ≤ k < n, and the result is made public; The specific process of the zero-knowledge proof stage is as follows: Server calculation h R Where R is a random number, and the Client calculates Send the results to each other and get g α and Both parties get: Since If we take: a1 = 1, a2 = p - 1, a3 = 0; Satisfy: 1·x1+(p - 1)·x2+0·x3 = 0 mod p; Zero-knowledge proof scheme; Server generates v i ,satisfy Server calculation: s i =v i -C·x i ; Where C=H(g,g α , h, y, t), function H(x) is a hash function; the result is sent to the Client; Client judgment as well as Whether it holds. If the result holds, enter the secure multi-party computing framework for further calculation; If there are n w and w k , then batch verification is performed: Client generates a random number η i ,judge: Is it true, where C j =H(g,g σ ,h,y j , t j ), function H(x) is a hash function.

2. The privacy-preserving machine learning reasoning method based on secure multi-party computing as claimed in claim 1, characterized in that: The specific process of the secure computing stage is: Input the data of the two parties participating in the machine learning inference into the SPDZ framework for secure multi-party computation.

3. A privacy-preserving machine learning reasoning system based on secure multi-party computing that implements the privacy-preserving machine learning reasoning method based on secure multi-party computing as described in any one of claims 1 to 2, characterized in that: The privacy-preserving machine learning inference system based on secure multi-party computation includes: A model limitation module, which is used for the service provider to make a commitment to its own model data and publicly use the commitment value as a label, that is, limit its own all models through the label and make the limited label public. After the label is made public, due to the security of the commitment, the committed model information will not be changed; at the same time, this label value will also participate in the subsequent verification process as data, that is, in the subsequent calculation process, the model data input by the service provider will be compared with the model data limited by this label; An input limitation module, which is used for the two parties involved to combine the data participating in the calculation with the global MAC code Δ to generate α and share α to achieve the purpose of locking the input data, ensuring that the data will not change during the subsequent calculation. The global MAC code Δ is jointly generated by the two parties and jointly mastered by the two parties. Neither party can obtain the value of the global MAC code Δ. Any party changing the locked data will cause the value α to be restored incorrectly during the subsequent verification process, resulting in verification failure; A zero-knowledge proof module, which is used for zero-knowledge proof. Use a linear zero-knowledge proof scheme to determine whether the limited model data is the same as the model data provided by the service provider in zero knowledge; The secure computing module is used for secure computing after verification to ensure the security of the data of both parties involved in the computing process. It is implemented by the secure multi-party computing model under the existing malicious model, and the SPDZ framework is used here.

4. A storage medium for receiving user input program, wherein the stored computer program enables an electronic device to execute the privacy-preserving machine learning reasoning method based on secure multi-party computing as described in any one of claims 1 to 2, comprising the following steps: The service provider commits to the machine learning model it provides and generates labels to ensure a one-to-one binding between the label and the model; Use tags to limit the model to ensure that the model will not be changed after the user selects a tag; Before the user starts machine learning reasoning, zero-knowledge proof is used to verify whether the selected label has been changed; finally, the secure computing framework is used to ensure the security of the computing process.

5. A computer program product stored on a computer-readable medium, comprising a computer-readable program, which, when executed on an electronic device, provides a user input interface to implement the privacy-preserving machine learning reasoning method based on secure multi-party computing as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Decentralized federated machine learning method under privacy protection

    CN111600707A

  • Auditable outsourcing machine learning service method for providing integrity verification

    CN112488227A

  • Multiprover interactive verification system

    US4926479A

  • Bootstrappable homomorphic encryption method, computer program and apparatus

    US8515058B1