Security solutions and devices for multi-party computational data in linear regression models
By using the Paillier probabilistic public-key encryption algorithm to generate public-private key pairs, multiple participants were able to jointly compute a linear regression model in an encrypted manner. This solved the need for secure multi-party computation of the linear regression model, ensured data privacy, and improved the accuracy and efficiency of model training.
Patent Information
- Application Number
- CN202211045911.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-08-30
AI Technical Summary
There is a lack of research on secure multi-party computation schemes for linear regression models in the existing technology, which makes it difficult to protect data privacy during data sharing and prevents participants from jointly training an accurate linear regression model.
The Paillier probabilistic public-key encryption algorithm is used to generate public-private key pairs. Data is encrypted and transmitted step by step by multiple participants. Finally, the first participant decrypts the data and calculates the linear regression model. The optimal solution is sent to all participants, ensuring that the data is transmitted and calculated in an encrypted form.
It enables participants to collaboratively train an accurate linear regression model without compromising data privacy, with low communication overhead, simple operation, and meets the secure multi-party computation requirements of linear regression models.
Smart Images

Figure CN116155522B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, specifically to a security scheme and device for multi-party computation data in linear regression models. Background Technology
[0002] In the era of big data, data is becoming a national strategic resource and an innovative production factor, with its asset and strategic value rapidly increasing. However, with the continuous generation of massive amounts of data, security has become an issue that cannot be ignored. Machine learning is an emerging discipline, and with the in-depth application of big data and cloud computing technologies, machine learning and deep learning in the era of artificial intelligence require ever-increasing amounts of data. Therefore, data security and privacy protection have become even more urgent.
[0003] Linear regression is one of the most classic machine learning models. It attempts to learn a function that predicts real-valued outputs as accurately as possible through a linear combination of attributes. Due to its simple form, linear regression is widely used both domestically and internationally.
[0004] In reality, some individuals or organizations may possess linear regression datasets with a limited number of samples. However, due to the small sample size, this data may not be sufficient to obtain an accurate linear regression model. Therefore, such individuals or organizations may wish to aggregate their samples into a larger dataset to collaboratively train a sufficiently accurate linear regression model. During the training process, they do not want their sample data to be accessible to others. In this scenario, secure multi-party computation can effectively solve this problem.
[0005] Secure multi-party computation allows participants to collaboratively compute an agreed-upon function using their own secret inputs without any trusted third party, while requiring that each participant not receive any input information from other participants except for the computation result. Secure multi-party computation plays a crucial role in scenarios such as electronic elections, electronic voting, electronic auctions, secret sharing, and threshold signatures. However, secure multi-party computation schemes specifically for linear regression models have received little research. Therefore, designing dedicated secure multi-party computation solutions for linear regression models has become an urgent need in real-world scenarios. Summary of the Invention
[0006] To address the above problems, this invention provides a security scheme for multi-party computation data in linear regression models, comprising:
[0007] Identify multiple participants and their corresponding data;
[0008] The first participant P1 generates a public-private key pair. The first participant uses the public key to encrypt the corresponding data S1 to generate the first ciphertext; the first ciphertext is then sent to the second participant P2.
[0009] The second participant P2 uses the public key to encrypt the corresponding data S2 and the first ciphertext to generate the second ciphertext; the second ciphertext is then sent to the next participant.
[0010] Until the last participant P n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant, where n is the number of participants;
[0011] The first participant uses their private key to decrypt the final ciphertext, obtains multi-party computation data, uses the multi-party data to calculate a linear regression model, obtains the optimal solution of the linear regression model, and then sends the optimal solution to all participants.
[0012] Furthermore, the number of participants is at least three.
[0013] Furthermore, the first participant, P1, generates a public-private key pair, including:
[0014] The first participant uses the Paillier probabilistic public-key encryption algorithm to generate a public-private key pair.
[0015] This invention also provides a security device for multi-party computation data in linear regression models, comprising:
[0016] The participant identification unit is used to identify multiple participants and their corresponding data.
[0017] The first ciphertext generation unit is used by the first participant P1 to generate a public-private key pair, the first participant uses the public key to encrypt the corresponding data S1 to generate the first ciphertext, and sends the first ciphertext to the second participant P2.
[0018] The second ciphertext generation unit is used by the second participant P2 to generate a second ciphertext by using the public key to encrypt the corresponding data S2 and the first ciphertext; and to send the second ciphertext to the next participant.
[0019] The final ciphertext generation unit is used until the last participant P. n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant;
[0020] The linear regression model calculation unit is used by the first participant to decrypt the final ciphertext using a private key, obtain multi-party calculation data, calculate the linear regression model using the multi-party data, obtain the optimal solution of the linear regression model, and then send the optimal solution to all participants.
[0021] Furthermore, the number of participants is at least three.
[0022] Furthermore, the first ciphertext generation unit includes:
[0023] The key generation subunit is used by the first participant to generate a public-private key pair using the Paillier probabilistic public-key encryption algorithm.
[0024] This invention provides a secure method and apparatus for multi-party computation data in linear regression models. The scheme has low communication overhead, and data is always transmitted or computed in encrypted form throughout the solution process, ensuring the privacy of each participant's data. The scheme is simple and easy to operate; except for the first participant, other participants only need to interact twice to obtain an accurate linear regression model. This solves the problem of secure multi-party computation requirements for linear regression models. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating a security scheme for multi-party computation data in a linear regression model provided by the present invention.
[0026] Figure 2 This invention relates to a flowchart of n participants jointly calculating a linear regression model;
[0027] Figure 3 This is a schematic diagram of the structure of a security device for multi-party computation data in a linear regression model provided by the present invention. Detailed Implementation
[0028] Numerous specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0029] The linear regression model involved in this invention can be defined as:
[0030]
[0031] in, d attributes represent sample i; θ represents the predicted label result for sample i; i These represent the parameters of the linear regression model. The optimal solution θ of the linear regression model. * It can be represented as:
[0032] θ * =(X T X) -1X T y
[0033] Where X is a matrix composed of many real sample data, and y is the label of the real result corresponding to these sample data.
[0034] Secure multi-party computation allows participants to collaboratively compute an agreed-upon function using their own keys without any trusted third party, while requiring that each participant receive no input information from other participants except for the computation result. Secure multi-party computation plays a crucial role in scenarios such as electronic elections, electronic voting, electronic auctions, secret sharing, and threshold signatures. However, secure multi-party computation schemes specifically for linear regression models have received little research. Therefore, designing dedicated secure multi-party computation solutions for linear regression models has become an urgent need in real-world scenarios.
[0035] Figure 1 This is a flowchart illustrating a security scheme for multi-party computation data in linear regression models provided by this invention. The following is a summary of the process. Figure 1 The solution provided by this invention will be described in detail.
[0036] Step S101: Identify multiple participants and their corresponding data.
[0037] The security solution provided by this invention requires at least three participants. Specifically, there are n participants (more than three) (P1, P2, ..., P...). n Each sample data is encrypted into ciphertext and then used in the calculation to finally obtain the linear regression model. The specific steps are as follows.
[0038] In step S102, the first participant P1 generates a public-private key pair, uses the public key to encrypt the corresponding data S1, and generates the first ciphertext; the first ciphertext is then sent to the second participant P2.
[0039] The first participant generates a public-private key pair using the Paillier probabilistic public-key encryption algorithm, publishes the public key, and then uses the public key to encrypt their data S1 into the first ciphertext Enc(S1), and then sends Enc(S1) to the second participant P2.
[0040] In step S103, the second participant P2 uses the public key to encrypt the corresponding data S2 and the first ciphertext to generate the second ciphertext; and sends the second ciphertext to the next participant.
[0041] The second participant, P2, uses the public key published by the first participant to encrypt their own data and the first ciphertext, Enc(S1), to generate the second ciphertext, Enc(S2). The second participant, P2, then sends the second ciphertext, Enc(S2), to the next participant, and so on. Participants use the same method to generate ciphertext.
[0042] Step S104, until the last participant P n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant, where n is the number of participants.
[0043] The final ciphertext generated by the last participant is Enc(Sn), which is then sent to the first participant, P1.
[0044] In step S105, the first participant uses their private key to decrypt the final ciphertext, obtains multi-party computation data, uses the multi-party data to calculate a linear regression model, obtains the optimal solution of the linear regression model, and sends the optimal solution to all participants.
[0045] Specific application examples are as follows:
[0046] like Figure 2 The flowchart shown illustrates the process of n participants jointly calculating a linear regression model. Assume there are n participants {P1, P2, ..., P...} n}, Participant P i The sample data is (X i ,y i (1≤i≤n). (X) i It is a matrix composed of samples, where each row represents a sample data point, and the row number represents the number of samples; y i It is a column vector, where each row is X. i The actual labeling results of the samples in the corresponding row). The specific secure multi-party computation scheme is as follows:
[0047] 1. Calculation of P1 (Note: X) T T represents transpose, indicating that the matrix X is transposed; X -1 This indicates finding the inverse of matrix X.
[0048] 2. P1 uses the Paillier algorithm to generate a public-private key pair (PK, SK), and publishes PK.
[0049] P1 uses the public key PK to encrypt A1 and b1 into E(A1) and E(b1). (Note: E(A) represents the ciphertext of A.)
[0050] P2 calculation
[0051]
[0052]
[0053] P2 will Send to P3. (Note: i indicates that the calculation is performed by the i-th participant, A indicates that the calculation is a summation of matrix A, and if b is inside the parentheses, it indicates a summation of vector b. The 1 in parentheses represents a ij It is an element of matrix A1; if it is 2, it means a. ij These are elements of matrix A2. The same applies below.
[0054] 3. P3 Calculation
[0055] P3 uses the public key PK to encrypt A3 and b3 into E(A3) and E(b3).
[0056] P3 is calculated similarly to step 2.
[0057]
[0058] P3 will Send to P4.
[0059] P n calculate
[0060] P n Use public key PK to A n b n Encrypt into E(A) n ), E(b n ).
[0061] P n calculate
[0062]
[0063] P n Will Send to P1.
[0064] P1 will and Decrypt using the private key SK. Then calculate:
[0065] P1 will θ * Send to other participants.
[0066] Based on the same inventive concept, this invention also provides a security device 300 for multi-party computation data in linear regression models, such as... Figure 3 As shown, it includes:
[0067] Participant identification unit 310 is used to identify multiple participants and their corresponding data;
[0068] The first ciphertext generation unit 320 is used by the first participant P1 to generate a public-private key pair, the first participant uses the public key to encrypt the corresponding data S1 to generate the first ciphertext, and sends the first ciphertext to the second participant P2.
[0069] The second ciphertext generation unit 330 is used by the second participant P2 to generate a second ciphertext by using the public key to encrypt the corresponding data S2 and the first ciphertext; and to send the second ciphertext to the next participant.
[0070] Final ciphertext generation unit 340, used until the last participant P n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant;
[0071] The linear regression model calculation unit 350 is used by the first participant to decrypt the final ciphertext using a private key, obtain multi-party calculation data, calculate the linear regression model using the multi-party data, obtain the optimal solution of the linear regression model, and send the optimal solution to all participants.
[0072] Furthermore, the number of participants is at least three.
[0073] Furthermore, the first ciphertext generation unit includes:
[0074] The key generation subunit is used by the first participant to generate a public-private key pair using the Paillier probabilistic public-key encryption algorithm.
[0075] This invention provides a secure method and apparatus for multi-party computation data in linear regression models. The scheme has low communication overhead, and data is always transmitted or computed in encrypted form throughout the solution process, ensuring the privacy of each participant's data. The scheme is simple and easy to operate; except for the first participant, other participants only need to interact twice to obtain an accurate linear regression model. This solves the problem of secure multi-party computation requirements for linear regression models.
Claims
1. A security scheme for multi-party computation data in linear regression models, characterized in that, include: Identify multiple participants and their corresponding data; The first participant P1 generates a public-private key pair. The first participant uses the public key to encrypt the corresponding data S1 to generate the first ciphertext; the first ciphertext is then sent to the second participant P2. The second participant P2 uses the public key to encrypt the corresponding data S2 and the first ciphertext to generate the second ciphertext; the second ciphertext is then sent to the next participant. Until the last participant P n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant, where n is the number of participants; The first participant uses its private key to decrypt the final ciphertext, obtains multi-party computation data, uses the multi-party computation data to calculate a linear regression model, obtains the optimal solution of the linear regression model, and sends the optimal solution to all participants.
2. The solution according to claim 1, characterized in that, The number of participants is at least three.
3. The solution according to claim 1, characterized in that, The first participant, P1, generates a public-private key pair, including: The first participant uses the Paillier probabilistic public-key encryption algorithm to generate a public-private key pair.
4. A security device for multi-party computational data in a linear regression model, characterized in that, include: The participant identification unit is used to identify multiple participants and their corresponding data. The first ciphertext generation unit is used by the first participant P1 to generate a public-private key pair, the first participant uses the public key to encrypt the corresponding data S1 to generate the first ciphertext, and sends the first ciphertext to the second participant P2. The second ciphertext generation unit is used by the second participant P2 to generate a second ciphertext by using the public key to encrypt the corresponding data S2 and the first ciphertext; and to send the second ciphertext to the next participant. The final ciphertext generation unit is used until the last participant P. n The corresponding data Sn and the (n-1)th ciphertext are encrypted using the public key to generate the final ciphertext; the last participant sends the final ciphertext to the first participant; The linear regression model calculation unit is used by the first participant to decrypt the final ciphertext using a private key, obtain multi-party computation data, calculate the linear regression model using the multi-party computation data, obtain the optimal solution of the linear regression model, and then send the optimal solution to all participants.
5. The apparatus according to claim 4, characterized in that, The number of participants is at least three.
6. The apparatus according to claim 4, characterized in that, The first ciphertext generation unit includes: The key generation subunit is used by the first participant to generate a public-private key pair using the Paillier probabilistic public-key encryption algorithm.
Citation Information
Patent Citations
Linear regression privacy protection method and system based on multi-encryption
CN110190945A
Ridge regression learning method and system based on multi-key ciphertext, medium and equipment
CN113077054A