An Efficient Anonymous Query Method Based on Hash PSI in Federated Learning
By introducing a semi-honest third-party hash PSI method into federated learning, and optimizing the query process using additive secret sharing and hash functions, the problem of insufficient efficiency and security of existing PIR anonymous queries is solved, and efficient and secure anonymous queries are achieved.
Patent Information
- Application Number
- CN202310724610.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-18
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-06-18
AI Technical Summary
Existing PIR anonymous queries are inefficient and insecure in federated learning, especially in semi-honest security models, where public-key encryption and ciphertext transmission result in excessive computational and communication overhead and pose a risk of data leakage.
We adopt a hash PSI method based on a semi-honest third party. By sharing an additive secret and using a hash function, we generate a shared secret using the Diffie-Hellman protocol. We also optimize the query process by combining the obfuscation_level parameter, thereby reducing encryption operations and improving security.
It improves query efficiency, reduces computation and communication overhead, enhances data security, avoids leakage of sensitive database data, and optimizes the anonymous query process in federated learning.
Smart Images

Figure CN116894051B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of efficient anonymous query methods based on hash PSI in federated learning. Background Technology
[0002] Anonymous querying, or Private Information Retrieval (PIR), is a highly practical technique and application in secure multi-party computation. It protects user query privacy and, consequently, the query results. In a PIR query, the queryer's keywords or customer ID information are hidden. The data query service provider provides matching query results but cannot determine which specific query object they correspond to.
[0003] Federated learning is an application of privacy-preserving computation in the field of machine learning. It can fuse data from multiple parties without disclosing their private information, and then use machine learning algorithms to train more accurate models for prediction. Federated learning falls under the scope of secure computation and typically combines various secure computation techniques, such as multi-party secure computation, homomorphic encryption, and differential privacy.
[0004] In multi-party computation, the semi-honest security model is a general multi-party computation security model. In the semi-honest model, the attacker strictly follows the protocol flow of multi-party computation, but is curious about the privacy data of other participants and attempts to reconstruct the privacy data of other participants through the received intermediate data.
[0005] PSI stands for Private Set Intersection. It refers to a technique used by two or more entities, each with its own private set of data, to calculate the common intersection of all their data without revealing the contents of their respective private sets to the others. PSI can be implemented in various ways, including through public-key encryption or unintentional transmission.
[0006] Hash PSI is a type of PSI privacy intersection technique that is highly efficient, but it is vulnerable to brute-force attacks when the plaintext input space is limited, so its application is not widespread. However, in a semi-honest security model, the security problem can be solved by introducing a semi-honest third party and adding a random salt value to the hash calculation, while maintaining its efficiency.
[0007] Secret sharing is a common technique in cryptography used to split private, secret data into multiple parts in a suitable manner. Each part is managed by different participants. A single participant cannot recover the secret information; only through the collaboration of several participants can the secret message be recovered. More importantly, if any participant within a certain range fails, the secret can still be fully recovered.
[0008] Common secret sharing schemes include Shamir secret sharing and Additive secret sharing.
[0009] Secret sharing is often used to construct secure multi-party computation protocols, such as SPDZ and ABY3.
[0010] Federated learning is a concept that has emerged in recent years and is a popular area of privacy-preserving computing. Proposed by Google in 2017, it integrates data from multiple users and uses machine learning algorithms to train more accurate models, thereby providing better recommendations and other services to users. To better protect user privacy, users do not need to transmit their private data to intermediary service providers like Google. All machine learning training computations are completed locally on the user's machine. Users only need to transmit the final results, such as gradients, to the intermediary service provider, which then integrates the results and sends the new model to all users. All users then undergo a new round of learning and training, repeating the process until a satisfactory model is output.
[0011] Federated learning, by eliminating data silos and combining data from various sources to train better predictive models and provide better services while protecting user data privacy, has attracted widespread attention since its inception, with many internet and financial companies venturing into the field.
[0012] On the other hand, PIR anonymous query is a widely used multi-party secure computation protocol, currently applied in federated learning. However, due to the large amount of public-key encryption and ciphertext transmission involved, it can easily become a performance bottleneck in federated learning. Furthermore, using PIR anonymous query in federated learning requires performing PSI privacy intersection among the participants. Since PSI often requires a large amount of public-key computation and ciphertext transmission, this part can also easily become a performance bottleneck.
[0013] Currently, common PIR protocols are mainly divided into single-server PIR and multi-server PIR.
[0014] (1) Single-database computational PIR: This type of PIR is often based on public-key cryptography, OT, homomorphic encryption, etc., and requires a lot of ciphertext operations and ciphertext transmission. For example, [ACLS 2018].
[0015] (2) Multi-server PIR, also known as information-theoretically secure PIR, involves the queryer sharing their query request as a secret and sending it to multiple servers for processing. Each server processes the shared query request and generates a response. The query client then merges these responses to obtain the final answer. This type of solution typically requires backing up the privacy database to multiple servers and ensures that the servers do not collude when processing query requests. A specific example is [Cappos 2013].
[0016] (3) PIR schemes in federated learning, such as privacy-based intersection, OT transmission of encryption keys, and symmetric encryption PIR in FATE [Webank2023].
[0017] ·[ACLS 2018] S.Angel, H.Chen, K.Laine, S.Setty, PIR with compressedqueries and amortized query processing, IEEE Symposium on Security and Privacy (S&P), 2018.
[0018] ·[Cappos 2013] J.Cappos, Avoiding theoretical optimality to efficiently and privately retrieve security updates, International Conference onFinancial Cryptography and Data Security(FC), 2013.
[0019] ·[Webank2023]Webank.2023.Federated AI Technology Enabler.https: / / github.com / FederatedAI / FATE.Last Accessed March 27th, 2023.
[0020] The disadvantages of a single server are: it involves a large amount of computationally expensive encryption calculations, and is usually linearly related to the database, resulting in low overall computational efficiency. Some PIR schemes also involve a large amount of encrypted transmission, which also causes significant communication overhead.
[0021] The disadvantages of multi-server PIR are: it requires sharing the privacy database with multiple untrusted servers, which poses a risk of data leakage, and the database requires additional complex coding.
[0022] The PIR scheme in federated learning has several drawbacks: the PIR phase requires extensive symmetric encryption computations and ciphertext transmission; furthermore, if the PSI dataset exhibits specific patterns, such as an age concentration between 20 and 40, PIR carries a risk of data leakage; and the higher the security level settings, the greater the communication and computational overhead. Additionally, the PSI portion relies on public-key encryption, which also incurs significant computational and communication costs.
[0023] In summary, the efficiency and security of PIR anonymous query still need to be improved. Summary of the Invention
[0024] To improve the efficiency and security of PIR stealth queries, this application provides an efficient stealth query method based on hash PSI in federated learning.
[0025] The technical solution adopted by this invention to achieve its technical objective is: an efficient anonymous query method based on hash PSI in federated learning, wherein the federated learning participants are A and B, and a semi-honest third party C, and A possesses the privacy dataset SET. A Party B possesses the privacy dataset SET B Party A and Party B use a hash-based PSI with a semi-honest third party for privacy-preserving intersection; including the following steps:
[0026] S1, A, and B secretly share a secret ss, and use ss as a hash salt to calculate the hash value H of their respective privacy datasets. A =H(x+ss), x∈SET A and H B =H(y+ss), y∈SET B And respectively set the hash value H A and H B Send to C;
[0027] S2, C calculates the hash index set IntHash = H of the privacy intersection I. A ∩H B And send the hash index set IntHash of I to A;
[0028] S3 and B generate the database DB to be queried;
[0029] S4 and B perform addition on the database DB to be queried, secretly sharing the result to obtain DB = share1 + share2, and then send share1 to A and share2 to C;
[0030] S5 and A use the hash index set IntHash of I to filter share1 and obtain share11;
[0031] S6 and C use the hash index set IntHash of I to filter share2, obtain share22, and return it to A;
[0032] S7, A calculates share11 + share22 to obtain the privacy intersection I, corresponding to the data DB to be queried. I .
[0033] Furthermore, in the above-mentioned efficient anonymous query method based on hash PSI in federated learning: in step S1:
[0034] Use SHA256 as the hash function H;
[0035] Parties A and B use the Diffie-Hellman protocol to share a secret, obtaining a random shared secret ss.
[0036] Furthermore, in the above-mentioned efficient anonymous query method based on hash PSI in federated learning, step S3 includes:
[0037] Parties A, B, and C shall negotiate an obfuscation_level as the security level parameter according to the following rules:
[0038] If Party B possesses the privacy dataset SET B When the size of the privacy intersection I is much larger than the size of the privacy intersection I, obfuscation_level is a number greater than 1; otherwise, obfuscation_level = -1.
[0039] If obfuscation_level = -1, then the database to be queried, DB, is SET. B ;
[0040] Otherwise, C randomly selects a hash index set {index}, which contains the hash indexes of privacy intersection I, and the size of the hash index set {index} is the size of the hash indexes of privacy intersection I multiplied by obfuscation_level;
[0041] C sends the hash index set {index} to B;
[0042] B filters the SET using the received hash index set {index}. B Generate the database DB to be queried.
[0043] This invention introduces a semi-honest third party, enabling anonymous queries on the original database through additive secret sharing alone. This eliminates the large amount of encryption computation required by mainstream solutions, greatly improving efficiency.
[0044] The PSI component in this invention uses hash PSI based on a semi-honest third party, which greatly improves computational efficiency compared to public key-based PSI.
[0045] Compared to existing federated learning anonymous query schemes, this invention further enhances security because the database provider cannot obtain the query index, and semi-honest third parties and the querying party can only obtain partial fragments of the database to be queried, making it impossible to restore the original database.
[0046] In addition, compared with the solution based on query index secret sharing, the present invention eliminates the risk of sensitive data leakage because the database holder does not need to copy the entire database to the other party.
[0047] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0048] Appendix Figure 1 This is a flowchart of Embodiment 1 of the present invention. Detailed Implementation
[0049] This embodiment presents an efficient anonymous query method based on hash PSI in federated learning. The participants in the federated learning are A and B, and a semi-honest third party C. A possesses the privacy dataset SET. A Party B possesses the privacy dataset SET B Party A and Party B use hash PSI based on a semi-honest third party to perform privacy-preserving intersection.
[0050] In the federated learning scenario of this embodiment, anonymous queries require prior privacy intersection calculations, as the size of the privacy data on both sides is not significantly different. Considering that federated learning primarily uses a semi-honest security model, we can use hash-based privacy intersection calculations to maximize overall efficiency, while using the hash of the data as an index to query the privacy data.
[0051] To improve the efficiency of anonymous queries, this embodiment uses additive secret share to share the database to be queried. During the query, only addition and subtraction operations need to be performed on the database. Compared with mainstream solutions that require the use of large-scale public keys or symmetric encryption, the computational efficiency is greatly improved.
[0052] To improve communication efficiency, this embodiment sets an obfuscation_level parameter. Only when this parameter is -1 does the database holder need to secretly share the entire database. When obfuscation_level is a number greater than 1, the database only needs to secretly share a random dataset of privacy intersection size × obfuscation_level, thereby improving communication efficiency and striking a balance between security and communication efficiency.
[0053] In terms of security, since the database holder only knows the index set of the dataset to be queried, it cannot infer the index of the privacy intersection dataset, making it more secure than anonymous queries in existing federated learning. Furthermore, semi-honest third parties, only able to obtain the sharded shares after the database secrets are shared, cannot recover sensitive data from the database.
[0054] The anonymous query in the federated learning of this embodiment realizes the anonymous query of the privacy intersection of the participants. The privacy intersection part of this invention is an efficient hash privacy intersection based on a semi-honest third party. The specific method steps are as follows.
[0055] Step S1: Parties A and B perform privacy-preserving intersection using a hash PSI based on a semi-honest third party, assuming SHA256 is used as the hash function H. Parties A and B first share a secret using the Diffie-Hellman protocol, obtaining a random shared secret ss. Party A then calculates H. A =H(x+ss), x∈SET A B calculates H B =H(y+ss), y∈SET B And each of them will H A H B Send to C.
[0056] In this step, for the participants in federated learning, the first step is to perform privacy intersection between the two parties using a hash PSI method based on a semi-honest third party. Specifically, the two parties share a secret to obtain a shared secret ss, and use ss as a hash salt to obtain the hash value of their respective privacy data. The hash value is then sent to the semi-honest third party.
[0057] Step S2, C: Calculate the hash of the privacy intersection I, IntHash = H A ∩H B And send it to A. Party A, Party B, and Party C negotiate an obfuscation_level as a security level parameter. If obfuscation_level = -1, then Party B uses the entire SET. BAs the dataset to be queried, if obfuscation_level is a number greater than 1, then C will randomly select a hash index set {index}, which contains the hash indexes of the privacy intersection I, and the size of the set is the size of I multiplied by obfuscation_level.
[0058] Step S3, B generates the database DB to be queried.
[0059] In this step, the semi-honest third party and the participating parties negotiate and set the obfuscation query parameter `obfuscation_level`. If `obfuscation_level` = -1, then an obfuscated query is performed on the entire database. If the database size is much larger than the privacy intersection, `obfuscation_level` can be set to a positive number greater than 1, randomly selecting a database containing the privacy intersection to be queried. The third party sends the hash of the selected database as an index `{index}` to the privacy database holder.
[0060] Specifically, parties A, B, and C will negotiate an `obfuscation_level` as the security level parameter according to the following rules:
[0061] If Party B possesses the privacy dataset SET B When the size of the data set is much larger than the privacy intersection I, obfuscation_level is a number greater than 1; otherwise, obfuscation_level = -1. In this embodiment, party B possesses the privacy dataset SET. B If the size of the privacy intersection I is hundreds to thousands of times larger, it is considered that Party B possesses the privacy dataset SET. B The size of the privacy intersection I is much larger. In this case, the obfuscation_level can be determined by negotiation, such as 50. In practice, this parameter is set based on experience and gradually improved. If party B has the privacy dataset SET B The size of the intersection of privacy and privacy is much larger than that of privacy intersection I. If the size difference is within 100 times, this parameter is set to -1.
[0062] If obfuscation_level = -1, then the database to be queried, DB, is SET. B ;
[0063] Otherwise, C randomly selects a hash index set {index}, which contains the hash indexes of privacy intersection I, and the size of the hash index set {index} is the size of the hash indexes of privacy intersection I multiplied by obfuscation_level;
[0064] C sends the hash index set {index} to B;
[0065] B filters the SET using the received hash index set {index}. B Generate the database DB to be queried.
[0066] In step S4, B performs addition on the database DB to be queried, and secretly shares the result to obtain DB = share1 + share2. Then, share1 is sent to A, and share2 is sent to C.
[0067] In this step, the database holder performs an addition operation on the database to be queried to obtain share1 and share2 through a secret sharing process, and sends them to the querying party and the semi-honest third party, respectively. The secret sharing shares use data hash as an index.
[0068] Step S4: A uses the index set IntHash of the privacy intersection I to filter share1, obtaining share11. In other words, the data query party uses the privacy intersection hash as the query index {index} to filter and obtain the database secret shared shard share1, thus obtaining share11.
[0069] Step S5, C uses the index set IntHash of the privacy intersection I to filter share2, obtain share22, and return it to A.
[0070] In this step, the semi-honest third party uses the privacy intersection hash as the query index {index} to filter the shared shard share2 after the database secret sharing, obtains the new shared data shard share22, and returns it to the data query party.
[0071] Step 6: Calculate share11 + share22 to obtain the privacy intersection I corresponding to the data DB to be queried. I This step involves calculating share11 + share22 to obtain the final anonymous query result.
[0072] This embodiment has the following characteristics:
[0073] A semi-honest third party is introduced, and the database to be queried is secretly shared with both the semi-honest third party and the querying party.
[0074] Using the intermediate data from privacy intersection as an index, we can filter and query the shards after the database secret sharing.
[0075] Efficiency is further improved by using PSI based on semi-honest third parties and hashing.
[0076] This embodiment has the following technical effects:
[0077] By introducing a semi-honest third party, the original database can be anonymously queried using only additive secret sharing, eliminating the large amount of encryption computation required by mainstream solutions and greatly improving efficiency.
[0078] The PSI component of the invention uses hash PSI based on a semi-honest third party, which greatly improves computational efficiency compared to public-key based PSI.
[0079] Compared to existing federated learning anonymous query schemes, security is further improved because the database provider cannot obtain the query index, and semi-honest third parties and querying parties can only obtain partial shards of the database to be queried, making it impossible to restore the original database.
[0080] Furthermore, compared to solutions based on secret sharing of query indexes, the database holder does not need to copy the entire database to the other party, eliminating the risk of sensitive data leakage.
Claims
1. An efficient anonymous query method based on hash PSI in federated learning, where the participants in the federated learning are A and B, and a semi-honest third party C, and A possesses the privacy dataset SET. A Party B possesses the privacy dataset SET B Its features are: Party A and Party B use a hash-based PSI with a semi-honest third party to perform a privacy-preserving intersection; including the following steps: S1, A, and B secretly share a secret ss, and use ss as a hash salt to calculate the hash value H of their respective privacy datasets. A =H(x+ss), x∈SET A and H B =H(y+ss), y∈SET B And respectively set the hash value H A and H B Send to C; S2, C calculates the hash index set IntHash = H of the privacy intersection I. A ∩H B And send the hash index set IntHash of I to A; S3 and B generate the database DB to be queried; S4 and B perform addition on the database DB to be queried, and secretly share the result to obtain DB = share1 + share2. They then send share1 to A and share2 to C. S5 and A use the hash index set IntHash of I to filter share1 and obtain share11; S6 and C use the hash index set IntHash of I to filter share2, obtain share22, and return it to A; S7, A calculates share11 + share22 to obtain the privacy intersection I, corresponding to the data DB to be queried. I .
2. The efficient anonymous query method based on hash PSI in federated learning according to claim 1, characterized in that: In step S1: Use SHA256 as the hash function H; Parties A and B use the Diffie-Hellman protocol to share a secret, obtaining a random shared secret SS.
3. The efficient anonymous query method based on hash PSI in federated learning according to claim 1, characterized in that: Step S3 includes: Parties A, B, and C shall negotiate an obfuscation_level as the security level parameter according to the following rules: If Party B possesses the privacy dataset SET B When the size of the privacy intersection I is much larger than the size of the privacy intersection I, obfuscation_level is a number greater than 1; otherwise, obfuscation_level = -1. If obfuscation_level = -1, then the database to be queried, DB, is SET. B ; Otherwise, C randomly selects a hash index set {index}, which contains the hash indexes of privacy intersection I, and the size of the hash index set {index} is the size of the hash indexes of privacy intersection I multiplied by obfuscation_level; C sends the hash index set {index} to B; B filters the SET using the received hash index set {index}. B Generate the database DB to be queried.
Citation Information
Patent Citations
National secret and index confusion-based hidden trace query method and device
CN114547668A
Information hiding tracing query method and system based on block chain and casual transmission expansion
CN116010401A