Federated learning method and system based on multi-key
By using a multi-key scheme in federated learning to re-encrypt and decrypt model gradient data, combined with the identity verification of trusted servers, the problem of privacy data leakage in traditional federated learning is solved, and higher information security and computing are achieved. efficiency.
Patent Information
- Application Number
- CN202411104056.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-13
AI Technical Summary
Homomorphic encryption schemes in traditional federated learning cannot resist collusion attacks between internal devices and servers, leading to the risk of privacy data leakage.
Using a multi-key scheme, the model gradient ciphertext is received through the cloud server for re-encryption, an aggregated ciphertext group is generated, decrypted using the server's private key, and distributed to the participants. At the same time, the participants use the private key and random secret factors to encrypt the data to ensure Data confidentiality, with authentication and decryption assistance through trusted servers.
Effectively resist collusion attacks by malicious devices and servers, ensure the confidentiality of gradient data, reduce the computing overhead of participants, and improve information security.
Smart Images

Figure CN118643919B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated learning, and in particular to a multi-key based federated learning method and system. Background Art
[0002] Machine learning can fully explore the intrinsic connection and effective value of massive heterogeneous IoT data, greatly improving the intelligence of IoT systems. Traditional machine learning methods require large-scale collection of raw data from device terminals to train machine learning models, thereby providing various intelligent services such as health assessment, financial risk prediction, and personalized recommendations. However, the data from device terminals is often sensitive in IoT scenarios, and unrestricted use may lead to serious privacy leakage, which hinders the development of IoT technology. Federated Learning (FL), as a new distributed learning framework, enables IoT devices to realize multi-party collaborative training models by exchanging model updates under the coordination of a central server, thus protecting local privacy data. Although federated learning has the characteristics of privacy protection, it faces the risk of indirect privacy leakage. For example, an adversary can launch a model deduction attack by intercepting the gradient during the training process to recover some private information in the data set; for another example, the server can also infer some private information of the participants from the received local updates.
[0003] In response to information security issues in federated learning, relevant scholars have proposed to protect the confidentiality of model updates through homomorphic encryption technology to avoid the leakage of private information. However, all participants in these schemes share the same encryption public key and decryption key. In this way, the encrypted model update of a participant can be decrypted by any other participant. Therefore, traditional homomorphic encryption schemes in federated learning cannot resist attacks from internal devices and collusion attacks between devices and servers. Therefore, how to design a secure federated learning security scheme is an important issue that has yet to be solved. Summary of the invention
[0004] The present invention provides a multi-key based federated learning method and system to improve the security of private data of each participant in federated learning.
[0005] To this end, the present invention provides the following technical solutions:
[0006] A multi-key federated learning method, the method comprising:
[0007] The cloud server receives the model gradient ciphertext sent by each participant;
[0008] Calculating the model gradient ciphertext using a proxy key to generate a re-encrypted ciphertext;
[0009] Aggregate all re-encrypted ciphertexts to obtain an aggregated ciphertext group;
[0010] Decrypting the aggregated ciphertext group using a server private key to obtain aggregated gradient data, and encrypting the aggregated gradient data to obtain aggregated gradient ciphertext;
[0011] The aggregate gradient ciphertext is distributed to each participant.
[0012] Optionally, the method further includes: the trusted server generates the server private key and the server public key for the cloud server, and sends the server private key to the cloud server through a secure channel.
[0013] Optionally, the method further comprises:
[0014] The participant sends identity information to the trusted server for registration;
[0015] The trusted server generates a user private key and a user public key for the participant, and sends the user private key and the user public key to the participant.
[0016] Optionally, the method further comprises:
[0017] The participant calculates a server proxy key using its own user private key and the public key of the cloud server, and sends the server proxy key to the cloud server;
[0018] The cloud server calculates a user proxy key using its own server private key and the user public key of the participant, and sends the user proxy key to the participant.
[0019] Optionally, the method further comprises:
[0020] After receiving the aggregate gradient ciphertext, the participant generates an outsourced decryption key, and uses the outsourced decryption key to calculate the aggregate gradient ciphertext to obtain the outsourced decryption ciphertext;
[0021] Sending a decryption assistance application to the trusted server, wherein the decryption assistance application includes the outsourced decryption ciphertext and the user agent key;
[0022] After receiving the auxiliary decryption information sent by the trusted server, the aggregated gradient data is calculated according to the outsourced decryption key.
[0023] Optionally, the method further comprises:
[0024] After receiving the decryption assistance application, the trusted server determines whether the participant exits the current task;
[0025] If not, using the user proxy key to calculate the proxy re-encrypted ciphertext, and calculating the auxiliary decryption information according to the proxy re-encrypted ciphertext;
[0026] The auxiliary decryption information is sent to the participant.
[0027] Optionally, the trusted server generates the server private key and the server public key for the cloud server, and generates the user private key and the user public key for the participant using a PKI key algorithm.
[0028] Optionally, the method further includes: the participant encrypts the gradient data using its own user private key and a random secret factor to generate the model gradient ciphertext.
[0029] A multi-key based federated learning system, the system comprising: a cloud server, and one or more terminal devices as participants;
[0030] The cloud server is used to receive the model gradient ciphertext sent by each participant; use the proxy key to calculate the model gradient ciphertext to generate a re-encrypted ciphertext; aggregate all the re-encrypted ciphertexts to obtain an aggregated ciphertext group; use the server private key to decrypt the aggregated ciphertext group to obtain aggregated gradient data, encrypt the aggregated gradient data to obtain an aggregated gradient ciphertext; and distribute the aggregated gradient ciphertext to each terminal device.
[0031] Optionally, the system also includes: a trusted server, used to generate the server private key and server public key for the cloud server, and send the server private key to the cloud server through a secure channel; generate a user private key and a user public key for the terminal device, and send the user private key and the user public key to the terminal device.
[0032] Optionally, the terminal device is further configured to generate an outsourced decryption key after receiving the aggregated gradient ciphertext, calculate the aggregated gradient ciphertext using the outsourced decryption key to obtain an outsourced decrypted ciphertext, and send the outsourced decrypted ciphertext and a user agent key to the trusted server; after receiving the auxiliary decryption information sent by the trusted server, calculate the aggregated gradient data according to the outsourced decryption key;
[0033] The trusted server is also used to, after receiving the decryption assistance application sent by the terminal device, use the user proxy key to calculate the proxy re-encrypted ciphertext, calculate the auxiliary decryption information based on the proxy re-encrypted ciphertext; and send the auxiliary decryption information to the participant.
[0034] A computer-readable storage medium stores a computer program, which executes the steps of the multi-key-based federated learning method when executed by a processor.
[0035] The multi-key-based federated learning method and system provided by the present invention realize the confidentiality protection of uploaded gradient data by designing an efficient and secure multi-key homomorphic encryption algorithm; by adopting the proxy re-encryption technology, the ciphertext under different public keys is converted into encrypted data under the public key, ensuring that the cloud server can realize the decryption of the gradient ciphertext.
[0036] Furthermore, participants use their own private keys and random secret factors to encrypt local gradient data, which can resist collusion attacks launched by malicious devices and servers.
[0037] Furthermore, information security is further enhanced by verifying the identities of federated modeling participants.
[0038] Furthermore, in order to reduce the client decryption overhead, part of the decryption calculation is coordinated to the trusted server calculation, and the terminal device of each participant only needs a small amount of calculation, which effectively reduces the calculation overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 is a flow chart of iterative training of a model by a participant in an embodiment of the present invention;
[0041] Figure 2 It is a flow chart of the multi-key-based federated learning method provided by the present invention;
[0042] Figure 3 It is a flow chart of the decryption process of the received aggregate gradient ciphertext by the participants in the multi-key-based federated learning method of the present invention;
[0043] Figure 4 It is a structural schematic diagram of a multi-key-based federated learning system provided by the present invention;
[0044] Figure 5 It is a flow chart of data interaction in the multi-key based federated learning system provided by the present invention. DETAILED DESCRIPTION
[0045] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0046] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] In view of the problem that traditional homomorphic encryption schemes in existing federated learning cannot resist attacks from internal devices and collusion attacks between devices and servers, an embodiment of the present invention provides a multi-key based federated learning method and system. By adopting proxy re-encryption technology, the cloud server re-encrypts the model gradient ciphertext sent by each participant to generate a re-encrypted ciphertext, aggregates all the re-encrypted ciphertexts to obtain an aggregated ciphertext group, and then decrypts it to obtain aggregated gradient data. The cloud server encrypts the aggregated gradient data and distributes the generated aggregated gradient ciphertext to each participant, so that the participant can continue model training.
[0048] In some embodiments, a trusted server may generate corresponding private keys and public keys for the cloud server and each participant. For example, the corresponding keys may be generated using, but not limited to, key algorithms such as PKI (Public Key Infrastructure). Unlike existing homomorphic encryption methods, all participants do not share the same private key and public key, but the trusted server may generate its private key and public key for each participant, that is, different participants have different private keys and public keys. As a trusted node, the trusted server can generate and store the keys of all participants in the system.
[0049] The following uses the PKI key algorithm as an example to explain the process of generating public and private keys for the cloud server and the participants through the trusted server. The main steps include:
[0050] (1) Perform initialization operations
[0051] Given two p The multiplicative cyclic group of G and G 1, g yes G The generator of . Define the bilinear pairing map ,calculate . Define a hash function .
[0052] (2) Select a random number and As the first and second parts of the server private key respectively, As the server private key, where It means in the model The set of integers in the sense of is a prime number, and the elements in the set range from 0 to , It is a model The set of integers except 0 in the sense of the server public key. At the same time, the server public key is calculated, including the first part of the server public key: , the second part of the server public key: ; The server private key Sent to the cloud server through a secure channel.
[0053] (3) Trusted servers and participants The symmetric key can be obtained in advance through a key negotiation protocol (such as the Diffie-Hellman key negotiation protocol) , and then based on the symmetric key Generate the user private key and user public key of the participant. For example, the public and private keys of the participant can be generated during the registration process of the participant.
[0054] In a non-limiting embodiment, the process of generating a user private key and a user public key may include the following steps (11) to (14):
[0055] (11) Participants Randomly select random numbers As the first part of the private key, the first part of the public key is calculated based on the private key .
[0056] (12) Participants will provide their identity information Sent to a trusted server for registration.
[0057] (13) The trusted server randomly selects a random number , based on identity information Generate the second part of the private key of the participant , and calculate the second public key based on the private key ;Will Through symmetric key Encrypt to get ciphertext , send the ciphertext to the participants .
[0058] (14) Participants Through symmetric key Decryption ,get . Participants save private keys and the public key .
[0059] Furthermore, the participants It can also be verified Is it true? If so, save the public key and private key .
[0060] In another non-limiting embodiment, the user private key and the user public key may be generated entirely by the trusted server for the participant. For example, a process of generating the user private key and the user public key may include the following steps (21) to (23):
[0061] (21) The participants will provide their identity information Sent to a trusted server for registration.
[0062] (22) The trusted server randomly selects a random number , based on identity information Generate private keys for participants , and calculate the public key of the participating party based on the private key ;Will Through symmetric key Encrypt to get ciphertext , send the ciphertext to the participants .
[0063] (23) Participants Via symmetric key Decryption ,get . Participants save private keys and the public key .
[0064] Furthermore, the participants It can also be verified Is it true? If so, save the public key and private key .
[0065] Furthermore, the trusted server may also add the ID (Identity document) of the successfully registered party to the URL (User Resource List).
[0066] The calculation of the proxy key requires the cloud server and the participating party to calculate it based on their own private key and the other party's public key, as follows:
[0067] (1) Participants Using your own private key and the public key of the cloud server Calculate the server proxy key , and send it to the cloud server.
[0068] (2) The cloud server uses its own private key x and participants P i The public key Calculate the user agent key , and send it to the participants P i .
[0069] It should be noted that the above is only an exemplary description of generating the cloud server and participant keys. The embodiment of the present invention is not limited to this method. Other algorithms can also be used to generate the relevant keys of the cloud server and each participant. The embodiment of the present invention is not limited to this.
[0070] The multi-key-based federated learning method and system provided in the embodiment of the present invention can be applied to a variety of scenarios. For example, the participants can be, but are not limited to, terminal devices of the Internet of Things, Internet of Vehicles, medical institutions, government agencies, etc. The terminal device has local data and can participate in federated learning for model training, and can upload the model gradient data obtained based on local data training to the cloud server. The cloud server, as a trusted node, is responsible for organizing the participants to carry out federated learning tasks.
[0071] In the embodiment of the present invention, each participant trains the model based on local data, and the algorithm and training process used in the model training are not limited in the embodiment of the present invention. For example, in some embodiments, the objective function gradient value can be updated by using, but not limited to, the FR (Fletcher-Reeves) conjugate gradient method. The FR conjugate gradient algorithm has the advantages of small storage requirements, high stability, fast global convergence, and no need for any external parameters to support calculations.
[0072] The following uses the FR conjugate gradient algorithm as an example to illustrate the model training process.
[0073] like Figure 1 FIG. 1 is a flowchart of the iterative training of the model by the participants in an embodiment of the present invention, including the following steps:
[0074] Step 101, initialization: When performing the first training, let the number of iterations , initialize the gradient value ,in is the objective function The partial derivative of .
[0075] Step 102: Participants input local data according to the initialization model data i Forming the variable matrix , perform model training and obtain the gradient value.
[0076] Among them, when the participants obtain the initialization model, they can also obtain the gradient threshold , number of iterations k =(1,2,…, K ) and other information.
[0077] Step 103, determine whether the gradient value is less than the gradient threshold, that is ; If yes, stop the iteration; otherwise, execute step 103.
[0078] Step 104, let , determine the k Iteration search direction and step length .
[0079] First, the update search direction is calculated. For the variable matrix , calculate the objective function Variable Matrix The partial derivatives of constitute the negative gradient matrix of the variable matrix with respect to the objective function.
[0080] If the number of iterations is equal to 1, the search direction Equal to the direction of the negative gradient matrix of the objective function, that is: .
[0081] Otherwise, search direction It is equal to the combination of the negative gradient matrix direction this time and the search direction of the previous iteration, that is:
[0082] (1)
[0083] Secondly, update the iteration step size and the variable matrix .
[0084] Specifically, the objective function is calculated with respect to the iteration step size The partial derivative of , that is: let , we can conclude .
[0085] Update The variable matrix calculated by the iteration ,Right now: .
[0086] Step 105, calculate the gradient value according to the updated iteration step size and variable matrix, that is, Then, return to step 103 to determine whether the iteration stop condition is met, that is: ; If the condition is not met, execute step 104 and continue the iteration process; otherwise, stop the iteration process.
[0087] The gradient data obtained at this time is the gradient data that needs to be uploaded. The participants need to encrypt the gradient data, generate model gradient ciphertext, and upload the model gradient ciphertext to the cloud server.
[0088] With the aforementioned participants Saved private key and the public key For example, for the participants Gradient data grad i Encryption is performed.
[0089] For example, in a non-limiting embodiment, the model gradient ciphertext may be generated in the following manner:
[0090] Randomly select random numbers , using the random secret factor and the user's private key , calculate the model gradient ciphertext : , is the first part of the model gradient ciphertext, is the second part of the model gradient ciphertext, grad i For the participants The gradient data.
[0091] like Figure 2 The figure shows a flow chart of the multi-key based federated learning method provided by the present invention.
[0092] In this embodiment, the encryption and decryption process in each step is illustrated by combining the key generated by the PKI key algorithm.
[0093] The federated learning method mainly includes the following steps:
[0094] Step 201: The cloud server receives the model gradient ciphertext sent by each participant.
[0095] Step 202: Calculate the model gradient ciphertext using the server proxy key to generate a re-encrypted ciphertext.
[0096] Using the above model gradient ciphertext : For example, first pass the server proxy key Calculate the proxy re-encrypted ciphertext and get , calculate the re-encrypted ciphertext:
[0097] .
[0098] Step 203: Aggregate all re-encrypted ciphertexts to obtain an aggregated ciphertext group.
[0099] For example, the re-encrypted ciphertexts of m device terminals are aggregated to obtain the following aggregated ciphertext group:
[0100] .
[0101] Step 204: Decrypt the aggregated ciphertext group using the server private key to obtain aggregated gradient data, and encrypt the aggregated gradient data to obtain aggregated gradient ciphertext.
[0102] Utilizing private keys y Decrypting the Aggregate Ciphertext Group , get the aggregate gradient data .
[0103] Aggregate gradient data Encryption is performed, for example, by randomly selecting a nonce , calculate the aggregate gradient ciphertext
[0104] Step 205: Distribute the aggregated gradient ciphertext to each participant.
[0105] Correspondingly, each participant decrypts the aggregated gradient ciphertext to obtain aggregated gradient data and starts the next round of model training.
[0106] Furthermore, in order to reduce the computational overhead of the participants, after receiving the above-mentioned aggregated gradient ciphertext, each participant can also coordinate part of the decryption calculation to the trusted server to complete.
[0107] like Figure 3 As shown, it is a flow chart of the decryption process of the received aggregate gradient ciphertext by the participants in the multi-key federated learning method of the present invention, which includes the following steps:
[0108] Step 301: The participant receives the aggregated gradient ciphertext sent by the cloud server.
[0109] Step 302: The participant generates an outsourced decryption key, and uses the outsourced decryption key to calculate the aggregated gradient ciphertext to obtain the outsourced decryption ciphertext.
[0110] For example, you can randomly generate outsourced decryption keys , calculate the aggregate gradient ciphertext, and get the outsourced decrypted ciphertext as follows:
[0111] .
[0112] in, g yes G The generator of G are of the same order p The multiplicative cyclic group of is a prime number.
[0113] Step 303: The participant sends a decryption assistance application to the trusted server. The decryption assistance application includes an outsourced decryption ciphertext and a user agent key and sends them to the trusted server.
[0114] The outsourced decryption ciphertext obtained in step 302 is and the User Agent Key Sent to a trusted server.
[0115] Accordingly, after receiving the decryption assistance application, the trusted server determines whether the participant has exited the current task. For example, the trusted server can check whether the participant exists in the user list URL according to the user list URL recorded when the user registered.
[0116] If not, it means that the participant has not registered or has exited. The trusted server can return false Message or invite participants to register 。
[0117] If so, the trusted server can use the user proxy key to calculate the proxy re-encrypted ciphertext, and calculate the auxiliary decryption information based on the proxy re-encrypted ciphertext; then send the auxiliary decryption information to the participating parties.
[0118] For example, a trusted server uses a user agent key Calculate the outsourced decrypted ciphertext and first obtain the proxy re-encrypted ciphertext:
[0119] ;
[0120] Then, the auxiliary decryption information is calculated ;
[0121] Then, the auxiliary decryption information Sent to the participants.
[0122] Accordingly, in step 304, after receiving the auxiliary decryption information sent by the trusted server, the participant calculates the aggregated gradient data according to the outsourced decryption key.
[0123] The outsourced decryption key is the outsourced decryption key randomly generated by the participant in step 302 above. , using the outsourced decryption key For the above auxiliary decryption information Calculate and obtain aggregate gradient data.
[0124] It should be noted that based on the PKI key algorithm, the intermediate value can be calculated first: Then, by solving the discrete logarithm problem, Solve to get aggregate gradient data .
[0125] In embodiments using other key algorithms such as RSA cryptographic algorithm, ElGamal cryptographic algorithm, identity-based cryptographic algorithm, attribute-based cryptographic algorithm, etc., the auxiliary decryption information sent by the trusted server can also be decrypted using the outsourced decryption key generated in step 302 to directly obtain the final aggregated gradient data. , this embodiment of the present invention is not limited to this.
[0126] The multi-key-based federated learning method provided by the present invention realizes the confidentiality protection of uploaded gradient data by designing an efficient and secure multi-key homomorphic encryption algorithm; by adopting the proxy re-encryption technology, the ciphertext under different public keys is converted into encrypted data under the public key, ensuring that the cloud server can realize the decryption of the gradient ciphertext.
[0127] Accordingly, an embodiment of the present invention also provides a federated learning system based on multiple keys, such as Figure 4 The figure is a structural diagram of a multi-key based federated learning system provided by the present invention.
[0128] The multi-key based federated learning system 400 includes: a cloud server 40, and one or more terminal devices 41 as participants.
[0129] The cloud server 40 is used to receive the model gradient ciphertext sent by each participant; use the proxy key to calculate the model gradient ciphertext to generate a re-encrypted ciphertext; aggregate all the re-encrypted ciphertexts to obtain an aggregated ciphertext group; use the server private key to decrypt the aggregated ciphertext group to obtain aggregated gradient data, encrypt the aggregated gradient data to obtain an aggregated gradient ciphertext; and distribute the aggregated gradient ciphertext to each terminal device 41.
[0130] In some embodiments, the federated learning system 400 may further include: a trusted server 42, which is used to generate a server private key and a server public key for the cloud server 40, and send the server private key to the cloud server 40 through a secure channel; generate a user private key and a user public key for the terminal device 41, and send the user private key and the user public key to the terminal device 41. For example, a corresponding key may be generated for the terminal device 41 when the terminal device 41 registers with the trusted server 42. For details, please refer to the description in the above method embodiment of the present invention, which will not be repeated here.
[0131] In order to reduce the computational overhead of the terminal device 41, in some embodiments, the terminal device 41 can also generate an outsourced decryption key after receiving the aggregated gradient ciphertext sent by the cloud server 40, use the outsourced decryption key to calculate the aggregated gradient ciphertext, obtain the outsourced decrypted ciphertext, send the outsourced decrypted ciphertext and the user proxy key to the trusted server 42, and the trusted server 42 assists in decryption, for example, use the user proxy key to calculate the proxy re-encrypted ciphertext, calculate the auxiliary decryption information based on the proxy re-encrypted ciphertext; then, send the decrypted auxiliary decryption information to the terminal device 41. Accordingly, after receiving the auxiliary decryption information sent by the trusted server 42, the terminal device 41 can calculate the aggregated gradient data based on the outsourced decryption key.
[0132] like Figure 5 As shown, a flow chart of data interaction in some embodiments of the multi-key based federated learning system provided by the present invention is shown.
[0133] In step 501, the trusted server sends the generated server private key and server public key to the cloud server;
[0134] In step 502, the trusted server sends the generated private key and user public key to the cloud server;
[0135] In step 503, the cloud server sends the user agent key generated by the terminal device to the terminal device;
[0136] Accordingly, in step 504, the terminal device sends the server proxy key generated for the cloud server to the terminal device.
[0137] In the embodiment of the present invention, there is no limitation on the algorithms for generating various keys.
[0138] In step 505, the terminal device sends the model gradient ciphertext encrypted by the gradient data obtained through training to the cloud server. Correspondingly, the cloud server receives the model gradient ciphertext sent by each terminal device.
[0139] In step 506, the cloud server uses the proxy key to calculate the model gradient ciphertext to generate a re-encrypted ciphertext; aggregates all the re-encrypted ciphertexts to obtain an aggregated ciphertext group; uses the server private key to decrypt the aggregated ciphertext group to obtain aggregated gradient data, and encrypts the aggregated gradient data to obtain an aggregated gradient ciphertext.
[0140] In step 507, the cloud server distributes the aggregated gradient ciphertext to each participant. Correspondingly, the participant receives the aggregated gradient ciphertext.
[0141] In step 508, the terminal device uses the outsourced decryption key to calculate the aggregated gradient ciphertext to generate the outsourced decrypted ciphertext.
[0142] In step 509, the terminal device sends a decryption assistance request to the trusted server, wherein the decryption assistance request includes the outsourced decryption ciphertext and the user agent key.
[0143] In step 510, after receiving the decryption assistance request, the trusted server calculates the auxiliary decryption information according to the proxy re-encrypted ciphertext.
[0144] In step 511, the trusted server sends the auxiliary decryption information to the terminal device.
[0145] In step 512, the terminal device calculates the auxiliary decryption information according to the outsourced decryption key to obtain aggregated gradient data.
[0146] The terminal device can perform the next round of model training based on the aggregated gradient data, and then repeat the above steps 505 to 512 until the federated learning is completed.
[0147] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0148] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0149] In several embodiments provided by the present invention, it should be understood that the disclosed device can be implemented in other ways.
[0150] The present invention also provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and the computer program can be executed when it is run. Figure 1 or Figure 2 or Figure 3 The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory, etc.
[0151] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means.
[0152] The embodiments of the present invention are described in detail above. The present invention is described in detail using specific implementation methods herein. The description of the above embodiments is only used to help understand the method and system of the present invention. It is only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should belong to the scope of protection of the present invention, and the content of this specification should not be understood as limiting the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-key based federated learning method, characterized in that: The method comprises: The cloud server receives the model gradient ciphertext sent by each participant; Calculating the model gradient ciphertext using a proxy key to generate a re-encrypted ciphertext; Aggregate all re-encrypted ciphertexts to obtain an aggregated ciphertext group; Decrypting the aggregated ciphertext group using a server private key to obtain aggregated gradient data, and encrypting the aggregated gradient data to obtain aggregated gradient ciphertext; Distributing the aggregate gradient ciphertext to each participant; The trusted server generates the server private key and the server public key for the cloud server, and sends the server private key to the cloud server through a secure channel; The participant sends identity information to the trusted server for registration; The trusted server generates a user private key and a user public key for the participant, and sends the user private key and the user public key to the participant; The participant calculates a server proxy key using its own user private key and the public key of the cloud server, and sends the server proxy key to the cloud server; The cloud server calculates a user proxy key using its own server private key and the user public key of the participant, and sends the user proxy key to the participant; The trusted server generates the server private key and the server public key for the cloud server using a PKI key algorithm, and generates the user private key and the user public key for the participant.
2. The multi-key federated learning method according to claim 1, characterized in that: The method further comprises: After receiving the aggregate gradient ciphertext, the participant generates an outsourced decryption key, and uses the outsourced decryption key to calculate the aggregate gradient ciphertext to obtain the outsourced decryption ciphertext; Sending a decryption assistance application to the trusted server, wherein the decryption assistance application includes the outsourced decryption ciphertext and the user agent key; After receiving the auxiliary decryption information sent by the trusted server, the aggregated gradient data is calculated according to the outsourced decryption key.
3. The multi-key federated learning method according to claim 2, characterized in that: The method further comprises: After receiving the decryption assistance application, the trusted server determines whether the participant exits the current task; If not, using the user proxy key to calculate the proxy re-encrypted ciphertext, and calculating the auxiliary decryption information according to the proxy re-encrypted ciphertext; The auxiliary decryption information is sent to the participant.
4. The multi-key federated learning method according to any one of claims 1 to 3, characterized in that: The method further comprises: The participant uses its own user private key and random secret factor to encrypt the gradient data to generate the model gradient ciphertext.
5. A multi-key federated learning system, characterized in that the system comprises: A cloud server and one or more terminal devices as participants; The cloud server is used to receive the model gradient ciphertext sent by each participant; The model gradient ciphertext is calculated using a proxy key to generate a re-encrypted ciphertext; all re-encrypted ciphertexts are aggregated to obtain an aggregated ciphertext group; the aggregated ciphertext group is decrypted using a server private key to obtain aggregated gradient data, the aggregated gradient data is encrypted to obtain an aggregated gradient ciphertext; and the aggregated gradient ciphertext is distributed to each terminal device; The system further comprises: The trusted server is used to generate the server private key and the server public key for the cloud server, and send the server private key to the cloud server through a secure channel; generate a user private key and a user public key for the terminal device, and send the user private key and the user public key to the terminal device; The trusted server generates the server private key and the server public key for the cloud server using a PKI key algorithm, and generates the user private key and the user public key for the participant.
6. The multi-key federated learning system according to claim 5, characterized in that: The terminal device is further configured to generate an outsourced decryption key after receiving the aggregated gradient ciphertext, calculate the aggregated gradient ciphertext using the outsourced decryption key to obtain the outsourced decrypted ciphertext, and send the outsourced decrypted ciphertext and the user agent key to the trusted server; after receiving the auxiliary decryption information sent by the trusted server, calculate the aggregated gradient data according to the outsourced decryption key; The trusted server is also used to, after receiving the decryption assistance application sent by the terminal device, use the user proxy key to calculate the proxy re-encrypted ciphertext, calculate the auxiliary decryption information based on the proxy re-encrypted ciphertext; and send the auxiliary decryption information to the participant.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-key based federated learning method according to any one of claims 1 to 4 are performed.
Citation Information
Patent Citations
Federated learning training data privacy enhancement method and system
CN110572253A
Longitudinal federated learning linear regression and logistic regression model training method and device
CN113505894A
Federal learning method and federal learning system
CN117634633A
Federal learning-based intelligent network connection vehicle track prediction method and related device
CN118337367A
Federal learning privacy protection method and system
CN118381600A
