Security audit device, method, system and medium for federated learning

By employing homomorphic encryption and zero-knowledge proof technologies, the risk of data leakage in the federated learning system is mitigated, enabling security auditing and filing, ensuring data transmission compliance, preventing secondary leaks, and improving system security.

CN115150050BActive Publication Date: 2024-11-22CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110339630.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-30
Publication Date
2024-11-22
Estimated Expiration
2041-03-30

AI Technical Summary

Technical Problem

The federated learning system has risks of data leakage, including improper key management, lack of auditing of data outreach, and lack of process documentation, which increases the possibility of privacy data breaches.

Method used

By employing homomorphic encryption and zero-knowledge proof technologies, a token for external distribution is generated by encrypting sample data and performing zero-knowledge proofs to ensure data compliance. The hash value is then stored in the filing database for verification purposes, avoiding the risk of secondary leakage caused by plaintext audits.

Benefits of technology

It enables data auditing without accessing plaintext, ensuring data transmission compliance, timely interception of illegal data, preservation of the chain of evidence, prevention of data leakage, and improvement of the security of federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115150050B_ABST
    Figure CN115150050B_ABST
Patent Text Reader

Abstract

The present disclosure provides a security audit device, method, system and storage medium for federated learning, wherein the security audit device is applied to the first participant system participating in federated learning, and includes: a first encryption and decryption unit, which is used to encrypt the sample data sent by the first federated learning algorithm module to generate an encrypted sample; a first outbound audit verification unit, which is used to perform zero-knowledge proof and obtain a first outbound license TOKEN based on the first zero-knowledge evidence sent by the first federated learning algorithm module; a first secure communication gateway, which is used to perform verification based on the first outbound license TOKEN, and if the verification passes, the encrypted sample and the corresponding encrypted information are sent to another participant system. The device, method, system and storage medium disclosed in the present disclosure can provide process audit and filing functions for federated learning, timely intercept illegal and non-compliant data transmission, avoid accidental data leakage, and improve security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a security audit device, method, system and storage medium for federated learning. Background Art

[0002] Federated Learning refers to the computational process in which multiple data owners can train models and obtain the final model without the original data leaving the local area, and ensure that the gap between the model effect and the aggregate training effect is small enough. The outstanding feature of federated learning is that it achieves the purpose of secure cooperative modeling without leaking each other's private data in the cooperative method. Its main forms include horizontal federated learning and vertical federated learning. In the vertical federated learning scenario, federated learning usually consists of an active party and several passive participants. Because there are problems of distrust and leakage between the active party and the passive party, the two parties usually use cryptographic techniques such as homomorphic encryption and secure multi-party computing in the federated learning process to ensure that the data sent by one party to the other party can be operated on the other end but cannot be decrypted to obtain plain text. However, in practical applications, due to various uncertain factors such as human and accidental factors, from a management perspective, the federated learning system may still have the risk of leakage. Summary of the invention

[0003] In view of this, a technical problem to be solved by the present invention is to provide a security audit device, method, system and storage medium for federated learning.

[0004] According to a first aspect of the present disclosure, there is provided a security audit device for federated learning, which is applied to a first participant system participating in federated learning, and includes: a first encryption and decryption unit, used to encrypt sample data sent by a first federated learning algorithm module to generate an encrypted sample; a first outbound audit verification unit, used to perform zero-knowledge proof on the encrypted sample based on a first zero-knowledge evidence sent by the first federated learning algorithm module, so as to obtain a first outbound license TOKEN corresponding to the encrypted sample; a first secure communication gateway, used to verify the encrypted sample and the first TOKEN to be verified sent by the first federated learning algorithm module based on the first outbound license TOKEN, and if the verification is successful, send the encrypted sample and the corresponding encrypted information to another participant system.

[0005] Optionally, the first key management unit is used to generate a homomorphic encryption key pair and a corresponding first key ID; the first encryption and decryption unit is also used to obtain the homomorphic encryption key pair according to the first key ID to encrypt the sample data.

[0006] Optionally, the first zero-knowledge evidence includes: the first key ID, the random number sequence, the encrypted sample and homomorphic operation verification data; the first outbound audit verification unit is used to obtain the homomorphic encryption key pair according to the first key ID, to encrypt the random number sequence to obtain random number sequence encrypted data; using the homomorphic encryption key pair, to perform homomorphic operation on the encrypted sample and the random number sequence encrypted data to obtain a homomorphic operation encryption result; if the homomorphic operation encryption result is the same as the homomorphic operation verification data, it is determined that the zero-knowledge proof is successful, the first outbound license TOKEN is generated, and the first hash value of the encrypted sample and the corresponding first outbound license TOKEN are stored in the first filing database.

[0007] Optionally, the first secure communication gateway is used to receive the encrypted sample, the first TOKEN to be verified and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module; generate a first hash value to be verified for the encrypted sample; if a first outbound license TOKEN identical to the first TOKEN to be verified can be obtained in the first filing database, then based on the first outbound license TOKEN, obtain the corresponding first hash value in the first filing database; if this first hash value is the same as the first hash value to be verified, the verification is passed, and the encrypted sample and the public key are sent.

[0008] Optionally, the first process filing module is used to store the first zero-knowledge evidence and the corresponding zero-knowledge proof result in the first filing database.

[0009] According to a second aspect of the present disclosure, a security audit device for federated learning is provided, which is applied to a second participant system participating in federated learning, including: a second secure communication gateway, used to receive an encrypted sample and a public key of a homomorphic encryption key pair, store the encrypted sample in a secure data sandbox and determine the object ID of the encrypted sample, store the public key in a second key management unit and determine the second key ID of the public key; a second outbound audit verification unit, used to perform zero-knowledge proof on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module after the second federated learning algorithm module completes the federated learning, so as to obtain a second outbound license TOKEN corresponding to the learning result encrypted data; the second secure communication gateway is also used to verify the learning result encrypted data and the second TOKEN to be verified sent by the second federated learning algorithm module based on the second outbound license TOKEN, and if the verification passes, return the learning result encrypted data.

[0010] Optionally, the second zero-knowledge evidence includes: the second key ID, multiple encrypted samples, calculation operation information and learning result encrypted data; the second outbound audit verification unit is used to obtain the public key according to the second key ID, and perform preset operations on the multiple encrypted samples to obtain the encrypted data to be verified; if the encrypted data to be verified is the same as the learning result encrypted data, it is determined that the zero-knowledge proof is successful, and a second outbound license TOKEN is generated, and the second hash value of the learning result encrypted data and the corresponding second outbound license TOKEN are stored in the second filing database.

[0011] Optionally, the second secure communication gateway is used to receive the learning result encrypted data, the second TOKEN to be verified and the public key sent by the second federated learning algorithm module; generate a second hash value to be verified for the learning result encrypted data; if a second outbound license TOKEN identical to the second TOKEN to be verified can be obtained in the second filing database, then based on the second outbound license TOKEN, obtain the corresponding second hash value in the second filing database; if this second hash value is the same as the second hash value to be verified, the verification is passed and the learning result encrypted data is returned.

[0012] Optionally, the second process filing module is used to store the second zero-knowledge evidence and the corresponding zero-knowledge proof result.

[0013] According to a third aspect of the present disclosure, a security audit system for federated learning is provided, comprising: the security audit device for federated learning as described above, and the security audit device for federated learning as described above.

[0014] According to a fourth aspect of the present disclosure, a security audit method for federated learning is provided, which is applied to a first participant system participating in federated learning, including: encrypting sample data sent by a first federated learning algorithm module to generate an encrypted sample; performing zero-knowledge proof on the encrypted sample based on a first zero-knowledge evidence sent by the first federated learning algorithm module to obtain a first outbound license TOKEN corresponding to the encrypted sample; verifying the encrypted sample and the first TOKEN to be verified sent by the first federated learning algorithm module based on the first outbound license TOKEN, and if the verification passes, sending the encrypted sample and the corresponding encrypted information to another participant system.

[0015] Optionally, encrypting the sample data sent by the first federated learning algorithm module includes: generating a homomorphic encryption key pair and a corresponding first key ID; obtaining the homomorphic encryption key pair according to the first key ID to encrypt the sample data.

[0016] Optionally, the first zero-knowledge evidence includes: the first key ID, the random number sequence, the encrypted sample and homomorphic operation verification data; the zero-knowledge proof of the encrypted sample includes: obtaining the homomorphic encryption key pair according to the first key ID to encrypt the random number sequence to obtain random number sequence encrypted data; using the homomorphic encryption key pair to perform homomorphic operation on the encrypted sample and the random number sequence encrypted data to obtain a homomorphic operation encryption result; if the homomorphic operation encryption result is the same as the homomorphic operation verification data, it is determined that the zero-knowledge proof is successful, the first outbound license TOKEN is generated, and the first hash value of the encrypted sample and the corresponding first outbound license TOKEN are stored in the first filing database.

[0017] Optionally, the verification processing of the encrypted sample and the first TOKEN to be verified sent by the first federated learning algorithm module based on the first outbound license TOKEN includes: receiving the encrypted sample, the first TOKEN to be verified and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module; generating a first hash value to be verified for the encrypted sample; if the first outbound license TOKEN identical to the first TOKEN to be verified can be obtained in the first filing database, then obtaining the corresponding first hash value in the first filing database based on the first outbound license TOKEN, if the first hash value is the same as the first hash value to be verified, the verification is passed; sending the encrypted sample and the corresponding encryption information to another participant system includes: sending the encrypted sample and the public key.

[0018] Optionally, the first zero-knowledge evidence and the corresponding zero-knowledge proof result are stored.

[0019] According to a fifth aspect of the present disclosure, a security audit method for federated learning is provided, which is applied to a second participant system participating in federated learning, including: receiving an encrypted sample and a public key of a homomorphic encryption key pair, storing the encrypted sample in a secure data sandbox and determining the object ID of the encrypted sample, storing the public key in a second key management unit and determining the second key ID of the public key; after the second federated learning algorithm module completes the federated learning, performing zero-knowledge proof on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module, so as to obtain a second outbound license TOKEN corresponding to the learning result encrypted data; verifying the learning result encrypted data and the second TOKEN to be verified sent by the second federated learning algorithm module based on the second outbound license TOKEN, and returning the learning result encrypted data if the verification passes.

[0020] Optionally, the second zero-knowledge evidence includes: the second key ID, multiple encrypted samples, calculation operation information and learning result encrypted data; the zero-knowledge proof of the learning result encrypted data to be sent includes: obtaining the public key according to the second key ID, and performing a preset operation on the multiple encrypted samples to obtain the encrypted data to be verified; if the encrypted data to be verified is the same as the learning result encrypted data, it is determined that the zero-knowledge proof is successful, and a second outbound license TOKEN is generated, and the second hash value of the learning result encrypted data and the corresponding second outbound license TOKEN are stored in the second filing database.

[0021] Optionally, the verification of the learning result encrypted data and the second TOKEN to be verified sent by the second federated learning algorithm module based on the second outbound license TOKEN includes: receiving the learning result encrypted data, the second TOKEN to be verified and the public key sent by the second federated learning algorithm module; generating a second hash value to be verified for the learning result encrypted data; if the second outbound license TOKEN identical to the second TOKEN to be verified can be obtained in the second filing database, then obtaining the corresponding second hash value in the second filing database based on the second outbound license TOKEN; if the second hash value is the same as the second hash value to be verified, the verification passes and the learning result encrypted data is returned.

[0022] Optionally, the second zero-knowledge evidence and the corresponding zero-knowledge proof result are stored.

[0023] According to a sixth aspect of the present disclosure, a security audit device for federated learning is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method as described above based on instructions stored in the memory.

[0024] According to a seventh aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor as described above.

[0025] The security auditing device, method, system and storage medium for federated learning disclosed in the present invention can provide process auditing and filing functions for federated learning. During the auditing process, there is no need to access plain text, which can avoid the risk of secondary leakage. It can preserve the chain of evidence to prove that there is no leakage problem during the interaction process. It can intercept illegal and non-compliant data transmission in time to avoid accidental data leakage and improve security. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0027] Figure 1 is a module diagram according to a first embodiment of a security audit device for federated learning;

[0028] Figure 2 is a module diagram according to a second embodiment of a security audit device for federated learning;

[0029] Figure 3 is a module diagram according to a third embodiment of a security audit device for federated learning;

[0030] Figure 4 is a module schematic diagram according to a fourth embodiment of a security audit device for federated learning;

[0031] Figure 5 is a flowchart of an embodiment of a security audit method for federated learning according to the present disclosure;

[0032] Figure 6 is a flowchart of another embodiment of a security audit method for federated learning according to the present disclosure;

[0033] Figure 7 4 is a module diagram of a fifth embodiment of a security audit device for federated learning. DETAILED DESCRIPTION

[0034] The present disclosure is described more fully below with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are described. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0035] In existing technologies, federated learning systems may have the risk of information leakage, including the following aspects:

[0036] 1. Lack of key management: Existing federated learning systems usually rely on user programs to generate and maintain public-private key pairs for encryption and decryption. If the private key is leaked accidentally or maliciously, the other party can use the communication data of both parties during the federated learning process through the interface, causing the privacy of the training samples to be leaked.

[0037] 2. Lack of auditing of data outbound transmission: Although encrypted data is used for communication between both parties in the federated learning process, such as homomorphic encryption, there is still the possibility that the federated learning system may directly send plaintext or improperly encrypted ciphertext to the other party without permission. For example: the configuration manager misconfigures the encryption parameters, or the programmer introduces code errors when updating the system, or it is invaded or tampered with by malicious viruses. The key to solving such problems is to audit the data content while sending the data out to ensure its compliance, specifically to ensure that the outbound content must be ciphertext, and the other party either cannot decrypt it, or can decrypt it but cannot contain any local useful information. In addition, it should be noted that this audit must be conducted without touching the plaintext, otherwise, due to the loopholes and security risks of the audit system itself, the plaintext data may be leaked again.

[0038] 3. Lack of process records: Many federated learning systems do not record the training process information. If data leakage does occur in the future, they cannot prove that there was no leakage fault in their historical training process.

[0039] From the above, we can see that the existing federated learning system may have the risk of information leakage.

[0040] In one embodiment, Figure 1 As shown, the present disclosure provides a security audit device 10 for federated learning, which is applied to a first participant system 11 participating in federated learning. The first participant system 11 can be an active party in a vertical federated learning scenario. The security audit device 10 includes a first encryption and decryption unit 11, a first outbound audit verification unit 12, and a first secure communication gateway 13.

[0041] The first encryption and decryption unit 11 encrypts the sample data sent by the first federated learning algorithm module 02 to generate an encrypted sample. The sample database 03 is used to store the sample data. The first outbound audit verification unit 12 performs zero-knowledge proof on the encrypted sample according to the first zero-knowledge evidence sent by the first federated learning algorithm module 02 to obtain a first outbound license TOKEN corresponding to the encrypted sample.

[0042] The first secure communication gateway 13 verifies the encrypted sample and the first to-be-verified TOKEN sent by the first federated learning algorithm module 02 based on the first outbound license TOKEN. If the verification is successful, the encrypted sample and the corresponding encrypted information are sent to the other participant system. The other participant system may be a passive participant in the vertical federated learning scenario, etc.

[0043] Adding security audit devices to the systems of participants in federated learning, and using homomorphic encryption and zero-knowledge proof technology to ensure the compliance of data sent externally by participants in federated learning; at the same time, since zero-knowledge proof does not require access to plain text, the risk of secondary leakage caused by plain text auditing is avoided; adding security audit devices to the systems of participants in federated learning can intercept communication data and conduct compliance reviews, which can promptly intercept illegal and non-compliant data transmission and avoid accidental data leakage.

[0044] like Figure 2 As shown, the first key management unit 14 generates a homomorphic encryption key pair and a corresponding first key ID. The first key management unit 14 generates a public-private key pair for homomorphic encryption to prevent the private key from being leaked, which can be used by the first encryption and decryption unit 11. The first encryption and decryption unit 11 obtains the homomorphic encryption key pair according to the first key ID to encrypt the sample data.

[0045] For example, the first encryption and decryption unit 11 obtains the corresponding private key from the first key management unit 14 according to the first key ID for encryption, and returns the encrypted sample. The functions of the first key management unit 14 and the first encryption and decryption unit 11 are usually fixed, so it is easier to conduct code review or use hardware to implement it. Therefore, although it may be exposed to plain text, it is generally considered that there is no risk of leakage.

[0046] In one embodiment, the first zero-knowledge evidence includes a first key ID, a random number sequence, an encrypted sample, and homomorphic operation verification data. The first outbound audit verification unit 12 obtains a homomorphic encryption key pair according to the first key ID to encrypt the random number sequence and obtain random number sequence encrypted data. The first outbound audit verification unit 12 uses the homomorphic encryption key pair to perform homomorphic operations on the encrypted sample and the random number sequence encrypted data to obtain a homomorphic operation encryption result. A variety of existing methods can be used to perform homomorphic operations on the encrypted sample and the random number sequence encrypted data using the homomorphic encryption key pair.

[0047] If the homomorphic operation encryption result is the same as the homomorphic operation verification data, the first outbound audit verification unit 12 determines that the zero-knowledge proof is successful, generates a first outbound license TOKEN, and stores the first hash value of the encrypted sample and the corresponding first outbound license TOKEN in the first filing database. The first outbound audit verification unit 12 needs to ensure the security compliance of the outbound data and ensure that the outbound content must be ciphertext. The first process filing module 16 stores the first zero-knowledge evidence and the corresponding zero-knowledge proof result in the first filing database 15.

[0048] The first secure communication gateway 13 receives the encrypted sample, the first token to be verified, and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module 02. The first secure communication gateway 13 generates a first hash value to be verified for the encrypted sample. If the first outbound license TOKEN identical to the first token to be verified can be obtained in the first filing database 15, the first hash value corresponding to the first outbound license TOKEN is obtained in the first filing database 15. If the first hash value is identical to the first hash value to be verified, the verification is passed, and the encrypted sample and the public key are sent.

[0049] In one embodiment, during the federated learning process, the active party encrypts the data and sends it to the passive party, and then the passive party performs appropriate homomorphic computing operations on the encrypted data, and finally sends it back to the active party, which decrypts it and obtains the result. Since the active party holds the private key, it only needs to ensure that the key will not be leaked and that the outgoing data is ciphertext to ensure security. Because the data sent by the passive party is usually obtained by the encrypted domain operation of the received active party homomorphically encrypted data and local data, and since the outgoing data can be decrypted by the other party, the passive party not only needs to ensure that it is ciphertext, but also must ensure that the outgoing data does not carry local useful information.

[0050] The first key management unit 14 receives a request to generate a homomorphic encryption key (a user program sends a generation request, and the user program can be the first federated learning algorithm module 02, etc.). The first key management unit 14 generates a key pair<e,d> , returns the key pair ID (first key ID). The first encryption and decryption unit 11 performs homomorphic encryption on the data X (sample data) to obtain [X]. Submit the data (first zero-knowledge evidence) used to perform the zero-knowledge proof process to the first outbound audit verification unit 12 to obtain the outbound license TOKEN. While performing the outbound audit verification, the first process filing module 16 saves the outbound data [X], [X+A], A, and the key pair ID to the first filing database 15 for future verification.

[0051] The first process record module 16 saves the evidence information submitted to the first outbound audit verification unit 12 during the interaction process to the first record database 15, thereby preserving the chain of evidence. When a leak occurs in the future and the compliance of the process needs to be investigated, these process data can be presented to the regulatory authorities to prove that there is no leak in the interaction process. i +A i 】、A i 、

【X i As evidence, A i It is a random number sequence agreed upon by both parties, which can be generated by a seed, for example.

[0052] The first outgoing audit verification unit 12 encrypts A i , we get [A i The first outgoing audit verification unit 12 requests the first encryption and decryption unit 11 to calculate ( It indicates the equivalent ciphertext operation of performing addition ("+") on the plaintext in the homomorphic encryption cipher, that is, ), and compare the result with [X i +A i 】, if they are consistent, an outbound license TOKEN (first outbound license TOKEN) is generated, otherwise, the verification fails. The first outbound audit verification unit 12 compares the outbound license TOKEN with

X i

[0053] In one embodiment, Figure 3 As shown, the present disclosure provides a security audit device 20 for federated learning, which is applied to the second participant system 04 participating in the federated learning. The second participant system 04 can be a passive party in the vertical federated learning scenario. The security audit device 20 includes a second secure communication gateway 21, a second outbound audit verification unit 22, a secure data sandbox 23, and a second key management unit 24. The second secure communication gateway 21 receives the encrypted sample and the public key of the homomorphic encryption key pair sent by the active party participating in the federated learning, stores the encrypted sample in the secure data sandbox 23 and determines the object ID of the encrypted sample, stores the public key in the second key management unit 24 and determines the second key ID of the public key.

[0054] After the second federated learning algorithm module 05 completes the federated learning, the second outbound audit verification unit 22 performs zero-knowledge proof on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module 05, so as to obtain the second outbound license TOKEN corresponding to the learning result encrypted data. The second secure communication gateway 21 verifies the learning result encrypted data sent by the second federated learning algorithm module and the second TOKEN to be verified based on the second outbound license TOKEN, and returns the learning result encrypted data if the verification passes. The second sample database 06 is used to store the received encrypted samples.

[0055] The second secure communication gateway 21 will save the received data to the secure data sandbox 23 according to the agreed format of the two parties, thereby proving that the data source is external. The secure data sandbox 23 can be a variety of existing secure sandboxes, and return the ID list corresponding to all data to the user program (the second federated learning algorithm module 05, etc.). The data in the secure data sandbox 23 can be verified by the second outbound audit verification unit 22.

[0056] like Figure 4 As shown, the second zero-knowledge evidence includes a second key ID, multiple encrypted samples, operation information, and encrypted learning result data. The second outbound audit verification unit 22 obtains a public key according to the second key ID, and performs a preset operation on the multiple encrypted samples to obtain the encrypted data to be verified. If the encrypted data to be verified is the same as the encrypted learning result data, the second outbound audit verification unit 22 determines that the zero-knowledge proof is successful, generates a second outbound license TOKEN, and stores the second hash value of the encrypted learning result data and the corresponding second outbound license TOKEN in the second filing database 26.

[0057] The second secure communication gateway 21 receives the learning result encrypted data, the second to-be-verified TOKEN and the public key sent by the second federated learning algorithm module 05. The second secure communication gateway 21 generates a second to-be-verified hash value of the learning result encrypted data. If the second outbound license TOKEN identical to the second to-be-verified TOKEN can be obtained in the second filing database 26, the corresponding second hash value is obtained in the second filing database 26 based on the second outbound license TOKEN. If the second hash value is identical to the second to-be-verified TOKEN, the verification is passed, and the second secure communication gateway 21 returns the learning result encrypted data.

[0058] In one embodiment, the second secure communication gateway 21 intercepts the homomorphic encrypted data sent by the active party according to the protocol, such as [Xi] and the public key e. The second secure communication gateway 21 saves [Xi] to the secure data sandbox 23, and the public key e is saved to the second key management unit 24. [Xi], as well as the object ID and key ID of [Xi] in the secure data sandbox 23 are returned to the user program, including the second federated learning algorithm module 05, etc.

[0059] The second federated learning algorithm module 05 completes the homomorphic encryption calculation. When the federated learning is completed and the encrypted data needs to be sent out, the evidence is submitted to the second outbound audit verification unit 22 for zero-knowledge proof. For example, the second federated learning algorithm module 05 needs to submit the IDs of [Y], [X1] and [X2] in the secure data sandbox 23, the key ID, and the operation type "+" as evidence. The second outbound audit verification unit 22 verifies the Is it the same as [Y]? If yes, provide an outbound token.

[0060] The second process filing module 25 stores the second zero-knowledge evidence and the corresponding zero-knowledge proof result in the second filing database 26. The second process filing module 25 is used to save the evidence information submitted to the second outbound audit verification unit 22 during the interaction process into the process filing database, so as to preserve the chain of evidence. When a leakage problem occurs in the future and it is necessary to trace the compliance of the process, these process data can be presented to the regulatory authorities to prove that there is no leakage problem in the interaction process. The second process filing module 25 saves the second zero-knowledge evidence of the passive party: the second key ID, the encrypted data to be sent [Y] (assuming ), used to calculate [X] of [Y] 1 】 and

X 2

[0061] In one embodiment, in an existing federated learning system, Secureboot is an implementation method of the XGBoost algorithm in a federated learning scenario. XGBoost is a CART-based boosting model that can integrate many tree models to form a strong classifier. Taking the two-way vertical Secureboost algorithm as an example, the existing SecureBoost algorithm process is:

[0062] Assume that the active party is Alice and the passive party is Bob, and the input sample feature is x i =[a i ,b i ] T, i is the user number, a i is the characteristic held by Alice, b i is the characteristic held by Bob. i and g i They represent the Hessian and gradient information of the loss function L, respectively, and [ ] represents the data after homomorphic encryption. The homomorphic encryption algorithm here adopts the Paillier algorithm.

[0063] 1. Alice and Bob use the Private Set Intersection (PSI) method to determine the set of sample IDs they share;

[0064] 2. Alice generates a homomorphically encrypted public and private key pair<e,d> ;

[0065] 3. Alice calculates h i , g i , and use the public key e to perform homomorphic encryption to obtain [h i 】 and

g i

h i

g i

[0066] 4. Alice sends the ID set of the node to be split to Bob;

[0067] 5. Bob filters out the corresponding [h i 】 and

g i

h i

g i

H j,k

G j,k

[0068]

[0069]

[0070] Among them, Ω j It is the set of IDs of samples contained in the jth interval divided by the possible value range [kmin, kmax] of the kth feature according to the aggregation granularity s.

[0071] 6. Alice uses the private key to decrypt [H j,k 】 and

G j,k

[0072] 7. Alice adds feature v best The result is returned to Bob, who finds the segmentation threshold corresponding to the jth interval of the kth feature and creates a lookup table to save this information.

[0073] Using the security audit technical solution for federated learning disclosed in this disclosure, the SecureBoost algorithm process after security audit and filing improvement is as follows:

[0074] 1. Alice and Bob use the Private Set Intersection (PSI) method to determine the set of sample IDs that they both share.

[0075] 2. Alice's federated learning module applies to the encryption center for the generation of a homomorphic encryption public-private key pair, and the homomorphic encryption center generates a key pair<e,d> , and then returns the public key e and the secret key object ID to the federated learning module. The federated learning module on Alice's side sends the public key e to Bob through a specific channel (see below).

[0076] 3. The security gateway on Bob's side intercepts the public key e and saves it to the encryption center. The encryption center returns the public key e and the secret key object ID to the federated learning module on Bob's side;

[0077] 4. Alice’s federated learning module calculates h i , g i , and use the public key e to perform homomorphic encryption to obtain [h i 】 and

g i

h i

g i

h i

h i +A i The key object ID is submitted to the outbound audit module of the party, and the information is also saved in the record database. The outbound audit module applies to the encryption module to use the public key corresponding to the key object ID to calculate [A i

h i +A i

h iThe hash value of

h i

h i

h i

[0078] 5. Bob's security gateway intercepts all [h i 】 and

g i

h i

g i

h i

g i

[0079] 6. The federated learning module on Alice's side sends the ID set contained in the current split node to Bob through a specific channel (see below for details).

[0080] 7. Bob's security gateway returns the received ID set directly to Bob. Bob filters out the corresponding [h i 】 and

g i

h i

g i

H j,k

G j,k

[0081]

[0082]

[0083] Among them, Ω j is the possible value range of the kth feature according to the aggregation granularity s [k min ,k max ] is the set of sample IDs contained in the j-th interval divided by .

[0084] 8. Then the federated learning module on Bob's side will send [H j,k 】,

G j,k

H j,k

[0085] 9. Security Gateway Computing j,k 】 and

G j,k

H j,k

G j,k

[0086] 10. Alice's federated learning module requests the encryption module to use the private key d to decrypt [H j,k 】 and

G j,k

[0087] 11. Alice adds feature v best The result is returned to Bob, who finds the segmentation threshold corresponding to the jth interval of the kth feature and creates a lookup table to save this information.

[0088] The above scheme also includes the sending of some non-sensitive data, such as Alice's public key e, the sample ID set information of the current node to be split sent by Alice, and the feature v sent by Alice. best Generally, technicians can find other appropriate methods to audit the outbound transmission of this data. For example:

[0089] 1) The security gateway can query the key center whether the key data e to be sent is a legal public key, thereby confirming whether the data can be sent.

[0090] 2) Alice can randomly generate all sample IDs in her own security sandbox, so that these data can be exempted from external audits. At the same time, in order to prevent Alice from encoding specific information through the arrangement of the ID set, the security gateway can randomly shuffle the order of the ID set elements sent.

[0091] 3) For feature v best=<k,j> Since the amount of communication data is usually small, a plain text audit can be used, such as having monitoring personnel regularly check the v best The rationality of the v best The rationality of the calculation is reviewed, so that the safety risk can be minimized.

[0092] In one embodiment, the present disclosure provides a security audit system for federated learning, including a security audit device for federated learning as in any of the above embodiments, deployed on an active party and a passive party.

[0093] Figure 5 FIG. 1 is a flow chart of an embodiment of a security audit method for federated learning according to the present disclosure, which is applied to a first participant system participating in federated learning, such as Figure 5 As shown:

[0094] Step 501: Encrypt the sample data sent by the first federated learning algorithm module to generate an encrypted sample.

[0095] Step 502: Perform zero-knowledge proof on the encrypted sample according to the first zero-knowledge evidence sent by the first federated learning algorithm module to obtain a first outbound license TOKEN corresponding to the encrypted sample.

[0096] Step 503: Verify the encrypted sample sent by the first federated learning algorithm module and the first token to be verified based on the first outbound license TOKEN. If the verification is successful, send the encrypted sample and the corresponding encrypted information to the other participant system.

[0097] In one embodiment, there are multiple methods for encrypting the sample data sent by the first federated learning algorithm module, such as generating a homomorphic encryption key pair and a corresponding first key ID, and obtaining the homomorphic encryption key pair according to the first key ID to encrypt the sample data.

[0098] The first zero-knowledge evidence includes the first key ID, the random number sequence, the encrypted sample, and the homomorphic operation verification data, etc. Obtain the homomorphic encryption key pair according to the first key ID to encrypt the random number sequence and obtain the random number sequence encrypted data; use the homomorphic encryption key pair to perform homomorphic operation on the encrypted sample and the random number sequence encrypted data to obtain the homomorphic operation encryption result; if the homomorphic operation encryption result is the same as the homomorphic operation verification data, it is determined that the zero-knowledge proof is successful, generate the first outbound license TOKEN, and store the first hash value of the encrypted sample and the corresponding first outbound license TOKEN in the first filing database.

[0099] Receive the encrypted sample, the first token to be verified, and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module; generate the first hash value to be verified of the encrypted sample; if the first outbound license TOKEN identical to the first token to be verified can be obtained in the first filing database, then obtain the corresponding first hash value in the first filing database based on the first outbound license TOKEN, and if the first hash value is the same as the first hash value to be verified, the verification is passed. Sending the encrypted sample and the corresponding encrypted information to another participant system includes sending the encrypted sample and the public key. Store the first zero-knowledge evidence and the corresponding zero-knowledge proof result.

[0100] Figure 6 FIG. 1 is a flow chart of another embodiment of a security audit method for federated learning according to the present disclosure, which is applied to a second participant system participating in federated learning, such as Figure 6 As shown:

[0101] Step 601, receiving an encrypted sample and a public key of a homomorphic encryption key pair, storing the encrypted sample in a secure data sandbox and determining an object ID of the encrypted sample, storing the public key in a second key management unit and determining a second key ID of the public key.

[0102] Step 602, after the second federated learning algorithm module completes the federated learning, zero-knowledge proof is performed on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module to obtain a second outbound license TOKEN corresponding to the learning result encrypted data.

[0103] Step 603: Verify the encrypted learning result data and the second to-be-verified TOKEN sent by the second federated learning algorithm module based on the second outbound license TOKEN. If the verification is successful, return the encrypted learning result data.

[0104] In one embodiment, the second zero-knowledge evidence includes a second key ID, multiple encrypted samples, operation information, and encrypted learning result data. The public key is obtained according to the second key ID to perform a preset operation on the multiple encrypted samples to obtain the encrypted data to be verified; if the encrypted data to be verified is the same as the encrypted learning result data, it is determined that the zero-knowledge proof is successful, a second outbound license TOKEN is generated, and the second hash value of the encrypted learning result data and the corresponding second outbound license TOKEN are stored in the second filing database.

[0105] Receive the learning result encrypted data, the second to-be-verified TOKEN and the public key sent by the second federated learning algorithm module. Generate a second to-be-verified hash value of the learning result encrypted data. If the second outbound license TOKEN identical to the second to-be-verified TOKEN can be obtained in the second filing database, then obtain the corresponding second hash value in the second filing database based on the second outbound license TOKEN. If the second hash value is identical to the second to-be-verified TOKEN, the verification is successful and the learning result encrypted data is returned. Store the second zero-knowledge evidence and the corresponding zero-knowledge proof result.

[0106] Figure 7 FIG. 4 is a schematic diagram of a module according to a fifth embodiment of a security audit device for federated learning. Figure 7 As shown, the apparatus may include a memory 71, a processor 72, a communication interface 73, and a bus 77. The memory 71 is used to store instructions, the processor 72 is coupled to the memory 71, and the processor 72 is configured to execute the above-mentioned security audit method for federated learning based on the instructions stored in the memory 71.

[0107] The memory 71 may be a high-speed RAM memory, a non-volatile memory, etc. The memory 71 may also be a memory array. The memory 71 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The processor 72 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the security audit method for federated learning disclosed in the present invention.

[0108] In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions, which implement the method in any of the above embodiments when the instructions are executed by a processor.

[0109] The security auditing device, method, system and storage medium for federated learning in the above-mentioned embodiments can provide process auditing and filing functions for federated learning. There is no need to access plain text during the auditing process, which can avoid the risk of secondary leakage. It can preserve the chain of evidence to prove that there is no leakage problem during the interaction process. It can intercept illegal and non-compliant data transmission in time to avoid accidental data leakage and improve security.

[0110] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0111] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A security audit device for federated learning, applied to a first party system participating in federated learning, comprising: A first encryption and decryption unit, used to encrypt the sample data sent by the first federated learning algorithm module to generate an encrypted sample; A first outbound audit verification unit, configured to perform zero-knowledge proof on the encrypted sample according to the first zero-knowledge evidence sent by the first federated learning algorithm module, so as to obtain a first outbound license TOKEN corresponding to the encrypted sample; The first secure communication gateway is used to verify the encrypted sample and the first to-be-verified TOKEN sent by the first federated learning algorithm module based on the first outbound license TOKEN. If the verification is successful, the encrypted sample and the corresponding encrypted information are sent to another participant system.

2. The apparatus of claim 1, further comprising: A first key management unit, used to generate a homomorphic encryption key pair and a corresponding first key ID; The first encryption and decryption unit is further used to obtain the homomorphic encryption key pair according to the first key ID to encrypt the sample data.

3. The device as claimed in claim 2, wherein: The first zero-knowledge evidence includes: the first key ID, a random number sequence, the encrypted sample, and homomorphic operation verification data; The first outbound audit verification unit is used to obtain the homomorphic encryption key pair according to the first key ID, so as to encrypt the random number sequence and obtain random number sequence encrypted data; use the homomorphic encryption key pair to perform homomorphic operation on the encrypted sample and the random number sequence encrypted data to obtain a homomorphic operation encryption result; if the homomorphic operation encryption result is the same as the homomorphic operation verification data, it is determined that the zero-knowledge proof is successful, the first outbound license TOKEN is generated, and the first hash value of the encrypted sample and the corresponding first outbound license TOKEN are stored in the first filing database.

4. The device according to claim 3, wherein: The first secure communication gateway is used to receive the encrypted sample, the first TOKEN to be verified and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module; Generate a first to-be-verified hash value of the encrypted sample; If the first outbound license TOKEN that is identical to the first TOKEN to be verified can be obtained in the first filing database, then the corresponding first hash value is obtained in the first filing database based on the first outbound license TOKEN. If this first hash value is identical to the first hash value to be verified, the verification is passed, and the encrypted sample and the public key are sent.

5. The device according to any one of claims 3 to 4, further comprising: The first process filing module is used to store the first zero-knowledge evidence and the corresponding zero-knowledge proof result in the first filing database.

6. A security audit device for federated learning, applied to a second party system participating in federated learning, comprising: A second secure communication gateway, configured to receive an encrypted sample and a public key of a homomorphic encryption key pair, store the encrypted sample in a secure data sandbox and determine an object ID of the encrypted sample, store the public key in a second key management unit and determine a second key ID of the public key; A second outbound audit verification unit is used to perform zero-knowledge proof on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module after the second federated learning algorithm module completes the federated learning, so as to obtain a second outbound license TOKEN corresponding to the learning result encrypted data; The second secure communication gateway is further used to verify the learning result encrypted data and the second TOKEN to be verified sent by the second federated learning algorithm module based on the second outbound license TOKEN, and if the verification is successful, return the learning result encrypted data.

7. The device according to claim 6, wherein: The second zero-knowledge evidence includes: the second key ID, a plurality of the encrypted samples, operation information and learning result encrypted data; The second outbound audit verification unit is used to obtain the public key according to the second key ID, and to perform preset operations on multiple encrypted samples to obtain the encrypted data to be verified; if the encrypted data to be verified is the same as the learning result encrypted data, it is determined that the zero-knowledge proof is successful, and a second outbound license TOKEN is generated, and the second hash value of the learning result encrypted data and the corresponding second outbound license TOKEN are stored in the second filing database.

8. The device according to claim 7, wherein: The second secure communication gateway is used to receive the learning result encrypted data, the second TOKEN to be verified and the public key sent by the second federated learning algorithm module; Generate a second to-be-verified hash value of the learning result encrypted data; If a second outbound license TOKEN identical to the second TOKEN to be verified can be obtained in the second filing database, a corresponding second hash value is obtained in the second filing database based on the second outbound license TOKEN. If the second hash value is identical to the second hash value to be verified, the verification passes and the learning result encrypted data is returned.

9. The device according to any one of claims 6 to 8, further comprising: The second process filing module is used to store the second zero-knowledge evidence and the corresponding zero-knowledge proof result.

10. A security audit system for federated learning, comprising: A security audit device for federated learning as described in any one of claims 1 to 5, and a security audit device for federated learning as described in any one of claims 6 to 9.

11. A security audit method for federated learning, applied to a first-party system participating in federated learning, comprising: Encrypting the sample data sent by the first federated learning algorithm module to generate an encrypted sample; According to the first zero-knowledge evidence sent by the first federated learning algorithm module, perform zero-knowledge proof on the encrypted sample to obtain a first outbound license TOKEN corresponding to the encrypted sample; The encrypted sample and the first to-be-verified TOKEN sent by the first federated learning algorithm module are verified based on the first outbound license TOKEN. If the verification passes, the encrypted sample and the corresponding encrypted information are sent to another participant system.

12. The method according to claim 11, wherein encrypting the sample data sent by the first federated learning algorithm module comprises: Generate a homomorphic encryption key pair and the corresponding first key ID; The homomorphic encryption key pair is obtained according to the first key ID to encrypt the sample data.

13. The method of claim 12, wherein: The first zero-knowledge evidence includes: the first key ID, a random number sequence, the encrypted sample, and homomorphic operation verification data; and the zero-knowledge proof of the encrypted sample includes: Obtaining the homomorphic encryption key pair according to the first key ID to encrypt the random number sequence to obtain random number sequence encrypted data; Using the homomorphic encryption key pair, performing homomorphic operation on the encrypted sample and the random number sequence encrypted data to obtain a homomorphic operation encryption result; If the homomorphic operation encryption result is the same as the homomorphic operation verification data, it is determined that the zero-knowledge proof is successful, the first outbound license TOKEN is generated, and the first hash value of the encrypted sample and the corresponding first outbound license TOKEN are stored in the first filing database.

14. The method according to claim 13, wherein the verifying process of the encrypted sample and the first to-be-verified TOKEN sent by the first federated learning algorithm module based on the first outbound license TOKEN comprises: Receive the encrypted sample, the first TOKEN to be verified, and the public key of the homomorphic encryption key pair sent by the first federated learning algorithm module; Generate a first to-be-verified hash value of the encrypted sample; If a first outbound license TOKEN identical to the first TOKEN to be verified can be obtained in the first filing database, then based on the first outbound license TOKEN, a corresponding first hash value is obtained in the first filing database. If the first hash value is identical to the first hash value to be verified, the verification is successful. The sending of the encrypted sample and the corresponding encrypted information to another participant system comprises: The encrypted sample and the public key are sent.

15. The method according to any one of claims 11 to 14, further comprising: The first zero-knowledge evidence and the corresponding zero-knowledge proof result are stored.

16. A security audit method for federated learning, applied to a second party system participating in federated learning, comprising: Receiving an encrypted sample and a public key of a homomorphic encryption key pair, storing the encrypted sample in a secure data sandbox and determining an object ID of the encrypted sample, storing the public key in a second key management unit and determining a second key ID of the public key; After the second federated learning algorithm module completes the federated learning, a zero-knowledge proof is performed on the learning result encrypted data to be sent according to the second zero-knowledge evidence sent by the second federated learning algorithm module to obtain a second outbound license TOKEN corresponding to the learning result encrypted data; The learning result encrypted data and the second to-be-verified TOKEN sent by the second federated learning algorithm module are verified based on the second outbound license TOKEN. If the verification is successful, the learning result encrypted data is returned.

17. The method of claim 16, wherein: The second zero-knowledge evidence includes: the second key ID, the plurality of the encrypted samples, the computing operation information and the learning result encrypted data; the zero-knowledge proof of the learning result encrypted data to be sent includes: Obtaining the public key according to the second key ID, so as to perform a preset operation on the plurality of encrypted samples to obtain the encrypted data to be verified; If the encrypted data to be verified is the same as the learning result encrypted data, it is determined that the zero-knowledge proof is successful, a second outbound license TOKEN is generated, and a second hash value of the learning result encrypted data and the corresponding second outbound license TOKEN are stored in a second filing database.

18. The method according to claim 17, wherein the verifying the learning result encrypted data and the second to-be-verified TOKEN sent by the second federated learning algorithm module based on the second outbound license TOKEN comprises: Receive the learning result encrypted data, the second TOKEN to be verified and the public key sent by the second federated learning algorithm module; Generate a second to-be-verified hash value of the learning result encrypted data; If a second outbound license TOKEN identical to the second TOKEN to be verified can be obtained in the second filing database, a corresponding second hash value is obtained in the second filing database based on the second outbound license TOKEN. If the second hash value is identical to the second hash value to be verified, the verification passes and the learning result encrypted data is returned.

19. The method according to any one of claims 16 to 18, further comprising: The second zero-knowledge evidence and the corresponding zero-knowledge proof result are stored.

20. A security audit device for federated learning, comprising: Memory; and a processor coupled to the memory, the processor being configured to execute the method according to any one of claims 11 to 15 and / or the method according to any one of claims 16 to 19 based on instructions stored in the memory.

21. A computer-readable storage medium storing computer instructions, wherein the instructions are executed by a processor to perform the method according to any one of claims 11 to 15 and / or the method according to any one of claims 16 to 19.