Agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace difference

By introducing multi-key homomorphic encryption and Laplace differential technology in federated learning, the problem of insufficient privacy protection and security in federated learning is solved, more efficient data privacy protection and secure sharing is achieved, and the system is enhanced Security.

CN119249474APending Publication Date: 2025-01-03NANJING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411221551.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In federated learning, existing privacy protection technologies such as differential privacy and single-key homomorphic encryption have problems such as data leakage and insufficient security, especially when the model parameter update process is vulnerable to attacks, with low transmission efficiency and system security Lower.

Method used

Using a combination method of multi-key homomorphic encryption and Laplace difference, multi-key homomorphic encryption security parameters are initialized through the key generation center in the federated learning framework, participants generate public-private key pairs, and in local model training Add Laplace noise to ensure data privacy and security, encrypt model parameters using multi-key homomorphic encryption algorithm, and the server aggregates and distributes encrypted global model parameters.

Benefits of technology

It effectively reduces the risk of inferred attacks by malicious participants, prevents privacy leakage, enhances system security, ensures the integrity and security of data privacy during transmission, and avoids the security risks of single-key homomorphic encryption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249474A_ABST
    Figure CN119249474A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace difference. According to the method, the problem of data islands faced by model training is solved by using a federated learning technology, corresponding noise is added to the gradient in the local model training process through a Laplace differential privacy technology, and the risk that malicious participants conduct inference attacks and other possible privacy attack means are greatly reduced. By using a multi-key homomorphic encryption technology, different keys are distributed to different agricultural insurance enterprises for encrypting different local model parameters, so that the problem that the traditional homomorphic encryption cannot ensure that participants do not leak privacy is solved, and the situation that a plurality of malicious internal clients jointly attack is prevented. According to the method, data and models of all participants are encrypted on the basis of federated learning, the efficiency of the federated learning technology is fully exerted, and data privacy among all enterprises is protected to a greater extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cyberspace security data privacy protection, and in particular relates to an agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace differential. Background Art

[0002] Nowadays, with the gradual development of artificial intelligence technology, artificial intelligence technology has been demonstrated in almost all walks of life. For example, in 2016, AlphaGo defeated all the top chess players in the world chess competition. Humans expect big data-driven artificial intelligence technologies like AlphaGO to appear in people's daily lives as soon as possible. However, the actual situation in the real world is somewhat frustrating: most fields have only limited data or poor quality data, which makes the implementation of artificial intelligence technology much more difficult than people imagine. Traditional machine learning requires a large amount of data for model training, which may contain user privacy data, and the leakage of privacy data will bring great threats to users, such as the patient's medical history in medical care, the user's income in insurance, etc., which makes users unwilling to share data. At the same time, there is business competition among enterprises, and each party is unwilling to share the data they have collected. These factors have led to barriers between data sources, making data unable to communicate with each other, resulting in the fact that data in most fields nowadays often appear in the form of islands, resulting in the contradiction between the current status of data islands and the current data fusion needs, and this contradiction is becoming increasingly prominent.

[0003] In order to achieve secure data sharing without being viewed by the other party and solve the "data island" problem, technicians have proposed federated learning technology (Federated machine learning / Federated Learning). Federated learning is a distributed learning algorithm that does not share locally stored data, but shares the model parameters of its local training. This allows all participants to collaborate on training models while ensuring that the data does not leave the local area, helping users, enterprises, and departments to effectively train machine learning models without leaking their own private data.

[0004] Federated learning technology greatly reduces the risk of data privacy leakage because it exchanges model parameters instead of data. However, in recent years, with the in-depth research and exploration of this technology, technicians have found that federated learning technology also has the hidden danger of privacy data leakage. During the process of updating model parameters, attackers can intercept and capture the parameters, and can infer model information or even original data information from the intercepted data. Therefore, it is urgent to add privacy protection technology to federated learning technology.

[0005] Privacy protection technology can provide strict protection for the privacy of information. According to the requirements of federated learning for user privacy, differential privacy, homomorphic encryption and secure multi-party computation are the three most common privacy protection technologies. Among them, homomorphic encryption and secure multi-party computation both belong to the field of cryptographic methods. Although these three technologies can achieve the purpose of privacy protection, they have some differences in their working principles and goals.

[0006] Differential privacy was first proposed by Dwork in 2006. It provides a data information theory security guarantee, that is, the input and output results of the function are insensitive to all special records in the data set, so differential privacy is often used to resist the reasoning aggression of members. In federated learning, the more common differential privacy is divided into local differential privacy and central differential privacy. Local differential privacy refers to the participants adding noise during the local training process to protect the local data security of the participants, so that the server cannot obtain the original data of the participants. Central differential privacy refers to adding noise to the trained model parameters on the server side to protect the data privacy in the federated learning reasoning process. However, this method also has defects. If the amount of noise added is too large, it will affect the accuracy of the trained model.

[0007] Homomorphic encryption was proposed by Rivest et al. in 1978. It provides a function that can manage each encrypted data. It is an encryption technology that can obtain the correct encryption result by performing calculation operations on the ciphertext. As a method of processing ciphertext without decrypting it, homomorphic encryption is currently the most commonly used privacy protection mechanism in federated learning systems. However, this method also has disadvantages. Compared with other privacy protection methods, the calculation of homomorphic encryption is more complicated, and if the amount of ciphertext data is large, it will lead to a decrease in transmission efficiency. In the homomorphic encryption method based on a single key, if one of the participants is successfully attacked by an attacker, or there are malicious users among the participants, the security of the system will be greatly reduced, and there will be a greater security risk. Summary of the invention

[0008] The purpose of the present invention is to solve the problems raised in the background technology and to provide an agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace differential to protect the privacy and security of local sensitive data information of each participant when conducting federated learning among agricultural insurance companies.

[0009] In order to achieve the purpose of the present invention, the present invention discloses a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, comprising the following steps:

[0010] Step 1: Building a federated learning framework: Agricultural insurance companies, central servers, and key generation centers form a horizontal and vertical federated learning framework.

[0011] Step 2: Parameter distribution and key generation: The key generation center initializes the multi-key homomorphic encryption security parameters and public parameters, and sends the parameters to each participant. Each participant generates a different key pair based on the public parameters.

[0012] Step 3: The server generates initial model parameters and sends them to all participants in this round of training;

[0013] Step 4: Each participant conducts local model training in parallel; randomly selects and uses local data sets for training, and adds noise that satisfies differential privacy to the training gradient to protect local model parameters and implement model parameter updates;

[0014] Step 5: After training a model that meets the preset conditions, each participant encrypts the local model parameters using the public key obtained in step 2, and uploads its own public key and the ciphertext of the model parameters to the server;

[0015] Step 6: The server aggregates the ciphertext of the local model parameters of each participant to obtain a global model encrypted by a multi-key homomorphic encryption algorithm, and distributes the encrypted global model parameters to each participant;

[0016] Step 7: Each participant uses their own private key to decrypt the encrypted global model after aggregation and update the local model.

[0017] Furthermore, in step 1, trusted transmission channels are established between the participants, between the participants and the central server, and between the participants and the key generation center; the channel between the participants and the server is used to transmit the initial model parameters and the trained model parameters; the channel between the participants and the key generation center is used to transmit each key pair, and the channel between the server and the key generation center is used to transmit the operated model parameter ciphertext and the product public key PK.

[0018] Further, step 2 includes the following steps:

[0019] Step 2.1, the key generation center determines the security parameter λ, which is used to generate the public parameter;

[0020] Step 2.2, select a λ-bit modulus n = pq, where p = 2p'+1, q = 2q'+1, and p' and q' are different prime numbers, and then select a random parameter of order pp'qq' Make g p′q′ (mod n 2 )=1+kn, where k∈[1,n-1]; the plaintext space is Zn , error distribution Φ∈R, distribution x=x(λ) on R is the key distribution, so its public parameter pp=(n,k,g,Φ,a), where a is a random vector in Indicates that the elements in the vector belong to Z n The k-dimensional vector of , and the master private key mk = (p', q');

[0021] Step 2.3: The key generation center sends the public parameter pp to each participant, and each participant i generates a different key pair (PK i ,SK i ), where the private key SK i =s i , parameter s i For Randomly selected, and the public key

[0022] Further, step 3 includes the following steps:

[0023] Step 3.1, the server initializes the model parameters;

[0024] Step 3.2: The server sends the initial model parameters to each participant.

[0025] Further, step 4 includes the following steps:

[0026] Step 4.1, each participant obtains initial model parameters;

[0027] Step 4.2: Each participant randomly selects a local data set to participate in training;

[0028] Among them, each participant randomly selects several data sets from their own data sets to form the data sets for this round of batch training;

[0029] Step 4.3: Each participant performs gradient calculation on the initial model parameters and the selected data set, and obtains the gradient parameters according to the loss function L. And the gradient parameter Clipping is performed to obtain clipping gradient parameters

[0030] Step 4.4: After obtaining the gradient values ​​corresponding to all data, each participant adds Laplace noise to all gradient values, and sums and averages the gradient values ​​processed by differential privacy to obtain the average gradient parameter of the local model after adding noise for this batch.

[0031] Step 4.5: Use the optimization algorithm stochastic gradient descent to update the model parameters. Where ω is the step size or learning rate, w i The model parameters held by each participant;

[0032] Step 4.6: Each participant repeats steps 4.2 to 4.6 until the local model parameters that meet the conditions are trained.

[0033] Further, step 5 includes the following steps:

[0034] Step 5.1: Each participant uses their own public key PK i For the local model parameter w i Encrypt and get the ciphertext Contains two values ​​(A i ,B i ), where A i =g r (mod n 2 ), B i =g r (1+mn)(mod n 2 ), r is the number of participants from Z n A randomly selected number in

[0035] Step 5.2: Each participant uploads the encrypted model parameters to the server. The server receives the ciphertext set sent by all participants as Where t is the number of participants.

[0036] Further, step 6 includes the following steps:

[0037] Step 6.1: After receiving the local model parameters W uploaded by all participants, the server * After that, the KeyEn algorithm will be used to cipher the parameter texts sent by all participants. Convert to the ciphertext Enc under the product public key PK encryption PK (w i ) without changing the underlying plaintext, where

[0038]

[0039] Specifically, the KeyEn algorithm is used for the public key PK of the participant. i The given ciphertext (A i ,B i ), the server uses a random message τ i ∈Z n Blind the ciphertext Then And the public key PK of each participant i Send to the key generation center;

[0040] The key generation center calculates the product public key And decrypt the ciphertext using the master private key Then use the product public key to encrypt the blinded plaintext Then (C i ,D i ) is sent back to the server;

[0041] The master private key decryption algorithm is as follows: given a ciphertext c = 9A, B), the algorithm decrypts c through mk, PK, and pp to obtain m. First, calculate where k -1 represents the inverse of k modulo n, and then calculates Define δ as the inverse of p'q' modulo n, let v = a r (mod n), get the plaintext

[0042] Finally, the server uses the property of additive homomorphism to remove τ i Get the ciphertext encrypted by the product public key PK

[0043] Step 6.2: The server performs aggregation operations. Where ° represents the addition operation in the homomorphic encryption scheme;

[0044] Step 6.3: The server executes the TranDec algorithm to encrypt the aggregate model parameters Convert to t participants' public keys PK i Encrypted aggregate model parameter ciphertext

[0045] Step 6.4: The server aggregates the model parameter ciphertext Sent to all parties.

[0046] Further, step 7 includes the following steps:

[0047] Each participant receives the aggregate model parameter ciphertext Then use their respective private keys SK i Decryption Get global model parameters Finally Used to update the local model;

[0048] The specific decryption algorithm is: given the ciphertext c = (A, B) and SK = a, through the formula Get the plaintext m.

[0049] Compared with the prior art, the significant progress of the present invention lies in: 1) on the basis of traditional federated learning, differential privacy technology is introduced to add appropriate Laplace noise to the gradient values ​​corresponding to all data during the local model training process, greatly reducing the risk of inference attacks by malicious participants and other possible privacy attack methods; 2) a multi-key homomorphic encryption algorithm is used to encrypt the model parameters in the training process. Each participant uses its own public key to encrypt the model parameters of its own local training. Compared with the traditional single-key homomorphic encryption algorithm, this algorithm ensures that the privacy of the participants is not disclosed to each other, prevents the situation of joint attacks by multiple malicious internal clients, and makes it impossible for third parties such as servers to obtain global model parameters, further increasing the security of the system.

[0050] In order to more clearly illustrate the functional characteristics and structural parameters of the present invention, further description is given below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0052] Figure 1 It is an overall flow chart of an agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace differential in an embodiment of the present invention;

[0053] Figure 2 It is a principle framework diagram of an agricultural insurance data privacy protection method based on multi-key homomorphic encryption and Laplace differential in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0055] The present invention discloses a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, comprising the following steps:

[0056] Step 1: Building a federated learning framework: Agricultural insurance companies, central servers, and key generation centers form a horizontal and vertical federated learning framework.

[0057] Step 2: Parameter distribution and key generation: The key generation center initializes the multi-key homomorphic encryption security parameters and public parameters, and sends the parameters to each participant. Each participant generates a different key pair based on the public parameters.

[0058] Step 3: The server generates initial model parameters and sends them to all participants in this round of training;

[0059] Step 4: Each participant conducts local model training in parallel; randomly selects and uses local data sets for training, and adds noise that satisfies differential privacy to the training gradient to protect local model parameters and implement model parameter updates;

[0060] Step 5: After training a model that meets the preset conditions, each participant encrypts the local model parameters using the public key obtained in step 2, and uploads its own public key and the ciphertext of the model parameters to the server;

[0061] Step 6: The server aggregates the ciphertext of the local model parameters of each participant to obtain a global model encrypted by a multi-key homomorphic encryption algorithm, and distributes the encrypted global model parameters to each participant;

[0062] Step 7: Each participant uses their own private key to decrypt the encrypted global model after aggregation and update the local model.

[0063] Example

[0064] In the federated learning system of this example, Figure 2 As shown in Figure 1, it is assumed that there is a central server, two participants a1 and a2, and a key generation center, where the key generation center is trusted. The process of two participants wanting to update their local models is as follows: Figure 1 As shown: First, the key generation center generates security parameters and public parameters and distributes them to both parties. Both parties generate their own public-private key pairs based on the public parameters. Second, the server distributes the initial model parameters. Both parties perform local model training based on the initial model parameters and their own data sets until a model that meets the conditions is trained. The model parameters are then encrypted and sent to the server. The server and the key generation center perform aggregate updates to obtain new global model parameters. Finally, the parameters are distributed to participants a1 and a2, and each participant uses its own private key to decrypt and obtain the updated global model parameters. In this process, differential privacy and multi-key homomorphic encryption technologies will be applied in the local model training and model parameter upload of participants a1 and a2, respectively.

[0065] A method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, in the above-mentioned federated learning application scenario, includes the following steps:

[0066] Step 1: Building a federated learning framework, including the agricultural insurance enterprise participants a1, a2, the central server, and the key generation center to form a horizontal and vertical federated learning framework.

[0067] Step 1.1: Establish a trusted transmission channel between participants a1 and a2, between each participant and the central server, and between each participant and the key generation center.

[0068] Among them, the information transmission channel is a trusted channel, that is, there is no need to consider the risks of interception, tampering, etc. during the transmission of parameter data; the channel between each participant and the server is used to transmit model parameters, etc.; the channel between each participant and the key generation center is used to transmit each key pair, and the channel between the server and the key generation center is used to transmit data such as the ciphertext of the model parameters after operation.

[0069] Step 2: parameter distribution and key generation, including initializing multi-key homomorphic encryption security parameters and public parameters by the key generation center, and sending the parameters to participants a1 and a2. Participants a1 and a2 generate different key pairs through the public parameters.

[0070] Specifically, step 2 includes the following steps:

[0071] Step 2.1: The key generation center determines the security parameter λ, which is used to generate the public parameter.

[0072] Step 2.2, select a λ-bit modulus n = pq, where p = 2p'+1, q = 2q'+1, and p' and q' are different prime numbers, and then select a random parameter of order pp'qq' Make g p'q' (mod n 2 )=1+kn, where k∈[1,n-1]. The plaintext space is Z n , error distribution Φ∈R, distribution χ=χ(λ) on R is the key distribution, so its public parameters pp=(n,k,g,Φ,a), where a is a random vector in Indicates that the elements in the vector belong to Z n The k-dimensional vector of , and the master private key mk = (p', q').

[0073] Step 2.3: The key generation center sends the public parameter pp to participants a1 and a2. Participants a1 and a2 generate different key pairs (PK1, SK1) and (PK2, SK2) based on the public parameter pp, where private key SK1 = s1, SK2 = s2, and parameters s1 and s2 are obtained from Randomly selected, and the public key

[0074] Step 3: The server generates initial model parameters and sends them to participants a1 and a2 participating in this round of training.

[0075] Specifically, step 3 includes the following steps:

[0076] Step 3.1: The server initializes the model parameter w0.

[0077] Step 3.2: The server sends the initial model parameter w0 to participants a1 and a2.

[0078] Step 4: Participants a1 and a2 perform local model training in parallel, including randomly selecting and using local data sets for training, and adding noise that satisfies differential privacy to the training gradient to protect local model parameters and update the model parameters.

[0079] Specifically, step 4 includes the following steps:

[0080] Step 4.1: Participants a1 and a2 obtain initial model parameters.

[0081] Step 4.2: Participants a1 and a2 randomly select local data sets to participate in training.

[0082] Participants a1 and a2 randomly select several data sets from their respective data sets to form the data sets for this round of batch training.

[0083] Step 4.3: Participants a1 and a2 perform gradient calculation on the initial model parameters and the selected data set, and obtain the gradient parameters according to the loss function L. And the gradient parameter Clipping is performed to obtain clipping gradient parameters

[0084] Step 4.4: After obtaining the gradient values ​​corresponding to all data, participants a1 and a2 add Laplace noise to all gradient values, and sum and average the gradient values ​​processed by differential privacy to obtain the average gradient parameter of the local model after adding noise for this batch.

[0085] Step 4.5: Use the optimization algorithm stochastic gradient descent to update the model parameters. Where ω is the step size or learning rate, w i are the model parameters held by parties a1 and a2.

[0086] Step 4.6: Each participant repeats steps 4.2 to 4.6 until the local model parameters that meet the conditions are trained.

[0087] Step 5: After training a model that meets the preset conditions, participants a1 and a2 encrypt the local model parameters using the public key obtained in step 2, and upload their own public keys and the ciphertext of the model parameters to the server.

[0088] Specifically, step 5 includes the following steps:

[0089] Step 5.1: Participants a1 and a2 use their respective public keys PK1 and PK2 to encrypt local model parameters w1 and w2 to obtain ciphertext Contains two values ​​(A i ,B i ), where A i =g r (mod n 2 ), B i =g r (1+mn)(mod n 2 ), r is the number of participants from Z n A randomly selected number in , i=1,2.

[0090] Step 5.2: Participants a1 and a2 upload the encrypted model parameters to the server. The server receives the ciphertext set sent by all participants as

[0091] Step 6: The server ciphers the local model parameters of participants a1 and a2 Aggregate to obtain the global model encrypted by the multi-key homomorphic encryption algorithm And distribute the encrypted global model to participants a1 and a2.

[0092] Specifically, step 6 includes the following steps:

[0093] Step 6.1: After receiving the local model parameters W uploaded by all participants, the server * After that, the KeyEn algorithm will be used to cipher the parameter texts sent by all participants. Convert to ciphertext under product public key PK encryption Without changing the underlying plaintext,

[0094] Specifically, the KeyEn algorithm is used for the public key PK of the participant. i The given ciphertext (A i ,B i ), the server uses a random message τ i ∈Z n Blind the ciphertext Then And the public key PK of each participant i Sent to the key generation center.

[0095] The key generation center calculates the product public key And decrypt the ciphertext using the master private key Then use the product public key to encrypt the blinded plaintext Finally, (C i ,D i ) is sent back to the server.

[0096] The master private key decryption algorithm is as follows: given a ciphertext c = (A, B), the algorithm can decrypt c to get m through mk, PK, pp. First, calculate k -1 (mod n ), where k -1 represents the inverse of k modulo n, and then calculates Define δ as the inverse of p'q' modulo n, let v = a r (mod n), and finally get the plaintext

[0097] Finally, the server uses the property of additive homomorphism to remove τ i Get the ciphertext encrypted by the product public key PK

[0098] Step 6.2: The server performs aggregation operations. in Represents an addition operation in a homomorphic encryption scheme.

[0099] Step 6.3: The server executes the TranDec algorithm to encrypt the aggregate model parameters Convert to 2 using the public key PK of the participating party i Encrypted aggregate model parameter ciphertext

[0100] Step 6.4: The server aggregates the model parameter ciphertext Sent to participants a1 and a2.

[0101] Step 7: Participants a1 and a2 use their respective private keys to decrypt the aggregated encrypted global model and update the local model.

[0102] Specifically, step 7 includes the following steps:

[0103] Step 7.1: Each participant receives the aggregate model parameter ciphertext Then use their respective private keys SK i Decryption Get global model parameters Finally Used to update the local model;

[0104] The specific decryption algorithm is: given the ciphertext c = (A, B) and SK = a, through the formula The plaintext m can be obtained.

[0105] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0106] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: The following steps are involved: Step 1: Building a federated learning framework: Agricultural insurance companies, central servers, and key generation centers form a horizontal and vertical federated learning framework. Step 2: Parameter distribution and key generation: The key generation center initializes the multi-key homomorphic encryption security parameters and public parameters, and sends the parameters to each participant. Each participant generates a different key pair based on the public parameters. Step 3: The server generates initial model parameters and sends them to all participants in this round of training; Step 4: Each participant conducts local model training in parallel; randomly selects and uses local data sets for training, and adds noise that satisfies differential privacy to the training gradient to protect local model parameters and implement model parameter updates; Step 5: After training a model that meets the preset conditions, each participant encrypts the local model parameters using the public key obtained in step 2, and uploads its own public key and the ciphertext of the model parameters to the server; Step 6: The server aggregates the ciphertext of the local model parameters of each participant to obtain a global model encrypted by a multi-key homomorphic encryption algorithm, and distributes the encrypted global model parameters to each participant; Step 7: Each participant uses their own private key to decrypt the encrypted global model after aggregation and update the local model.

2. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential is characterized in that: In step 1, trusted transmission channels are established between the participants, between the participants and the central server, and between the participants and the key generation center. The channel between the participants and the server is used to transmit the initial model parameters and the trained model parameters. The channel between the participants and the key generation center is used to transmit the key pairs, and the channel between the server and the key generation center is used to transmit the operated model parameter ciphertext and the product public key PK.

3. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 2 includes the following steps: Step 2.1, the key generation center determines the security parameter λ, which is used to generate the public parameter; Step 2.2, select a λ-bit modulus n = pq, where p = 2p'+1, q = 2q'+1, and p' and q' are different prime numbers, and then select a random parameter of order pp'qq' Make g p’q’ (mod n 2 )=1+kn, where k∈[1,n-1]; the plaintext space is Z n , error distribution Φ∈R, distribution x=x(λ) on R is the key distribution, so its public parameter pp=(n,k,g,Φ,a), where a is a random vector in Indicates that the elements in the vector belong to Z n The k-dimensional vector of , and the master private key mk = (p', q'); Step 2.3: The key generation center sends the public parameter pp to each participant, and each participant i generates a different key pair (PK i ,SK i ), where the private key SK i =s i , parameter s i For Randomly selected, and the public key 4. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 3 includes the following steps: Step 3.1, the server initializes the model parameters; Step 3.2: The server sends the initial model parameters to each participant.

5. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 4 includes the following steps: Step 4.1, each participant obtains initial model parameters; Step 4.2: Each participant randomly selects a local data set to participate in training; Among them, each participant randomly selects several data sets from their own data sets to form the data sets for this round of batch training; Step 4.3: Each participant performs gradient calculation on the initial model parameters and the selected data set, and obtains the gradient parameters according to the loss function L. And the gradient parameter Clipping is performed to obtain clipping gradient parameters Step 4.4: After obtaining the gradient values ​​corresponding to all data, each participant adds Laplace noise to all gradient values, and sums and averages the gradient values ​​processed by differential privacy to obtain the average gradient parameter of the local model after adding noise for this batch. Step 4.5: Use the optimization algorithm stochastic gradient descent to update the model parameters. Where ω is the step size or learning rate, w i The model parameters held by each participant; Step 4.6: Each participant repeats steps 4.2 to 4.6 until the local model parameters that meet the conditions are trained.

6. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 5 includes the following steps: Step 5.1: Each participant uses their own public key PK i For the local model parameter w i Encrypt and get the ciphertext Contains two values ​​(A i ,B i ), where A i =g r (mod n 2 ), B i =g r (1+mn) (modn 2 ), r is the number of participants from Z n A randomly selected number in Step 5.2: Each participant uploads the encrypted model parameters to the server. The server receives the ciphertext set sent by all participants as Where t is the number of participants.

7. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 6 includes the following steps: Step 6.1: After receiving the local model parameters W uploaded by all participants, the server * After that, the KeyEn algorithm will be used to cipher the parameter texts sent by all participants. Convert to the ciphertext Enc under the product public key PK encryption PK (w i ), without changing the underlying plaintext, where Specifically, the KeyEn algorithm is used for the public key PK of the participant. i The given ciphertext (A i ,B i ), the server uses a random message τ i ∈Z n Blind the ciphertext Then And the public key PK of each participant i Send to the key generation center; The key generation center calculates the product public key And decrypt the ciphertext using the master private key Then use the product public key to encrypt the blinded plaintext Then (C i ,D i ) is sent back to the server; The master private key decryption algorithm is as follows: given a ciphertext c = (A, B), the algorithm decrypts c through mk, PK, and pp to obtain m. First, calculate where k -1 represents the inverse of k modulo n, and then calculates k -1 (mod n), define δ as the inverse of p'q' modulo n, let v = a r (mod n), get the plaintext Finally, the server uses the property of additive homomorphism to remove τ i Get the ciphertext encrypted by the product public key PK Step 6.2: The server performs aggregation operations. Where ° represents the addition operation in the homomorphic encryption scheme; Step 6.3: The server executes the TranDec algorithm to encrypt the aggregate model parameters Convert to t participants' public keys PK i Encrypted aggregate model parameter ciphertext Step 6.4: The server aggregates the model parameter ciphertext Sent to all parties.

8. According to claim 1, a method for protecting agricultural insurance data privacy based on multi-key homomorphic encryption and Laplace differential, characterized in that: Step 7 includes the following steps: Each participant receives the aggregate model parameter ciphertext Then use their respective private keys SK i Decryption Get global model parameters Finally Used to update the local model; The specific decryption algorithm is: given the ciphertext c = (A, B) and SK = a, through the formula Get the plaintext m.

Citation Information

Patent Citations

  • Federal learning data privacy protection method and device and readable storage medium

    CN118445844A