A secret query method and system
By employing commutative encryption, data security is protected for both the queryer and the data provider during the data query process, resolving the issue of data leakage between the queryer and the provider and ensuring security throughout the data query process.
Patent Information
- Application Number
- CN202211004951.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-08-22
AI Technical Summary
During the data query process, how can we protect the data security of both the queryer and the data provider, and prevent the data provider from learning the queryer's true query objectives and the queryer from learning other data from the data provider?
By employing a commutative encryption method, through the ciphertext exchange between the first and second parties, it is ensured that the querying party can only obtain the query results for the target data, and cannot obtain other data. The data provider cannot know the querying party's true query intent.
It protects the data security of both the queryer and the data provider during the data query process, conceals the queryer's true query intent, prevents data leakage, and ensures the data security of all parties.
Smart Images

Figure CN115329359B_ABST
Abstract
Description
Technical Field
[0001] This manual relates to the field of information security technology, and in particular to a method and system for secret querying. Background Technology
[0002] Data plays an increasingly important role in today's world, and in many application scenarios, it has become a resource that requires protection. In data query-related business scenarios, parties with data query needs will use data identifiers to query data providers who possess the data or have the capability to acquire it. In some cases, to protect the data security of both the querying party and the data provider, during the data query process, it is necessary to prevent the data provider from knowing the queryer's true query target, such as the data identifier of the actual data to be queried (e.g., data ID), and also to prevent the queryer from knowing any other data from the data provider besides the data to be queried—that is, not to disclose data unrelated to the query.
[0003] Therefore, this specification provides a secret query method and system that can protect the data security of both the querying party and the data provider during the data query process. Summary of the Invention
[0004] One aspect of this specification provides a secret query method applied to a first party. The method includes: encrypting a target data identifier using a first encryption method to determine a first ciphertext; obtaining a second ciphertext, the second ciphertext being obtained by another party encrypting the first ciphertext using a second encryption method; the first encryption method and the second encryption method satisfying a commutative law; decrypting the second ciphertext using a first decryption method to determine a target key, the first decryption method corresponding to the first encryption method; sending a plurality of query identifiers to a second party, the plurality of query identifiers including the target data identifier and one or more other data identifiers; obtaining a plurality of result ciphertexts from the second party, the plurality of result ciphertexts being obtained by encrypting a plurality of query results corresponding to the plurality of query identifiers; and determining a query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0005] Another aspect of the embodiments of this specification provides a secret query system deployed on a first party. The system includes: a first ciphertext determination module, configured to encrypt a target data identifier to determine a first ciphertext based on a first encryption method; a first-party second ciphertext acquisition module, configured to acquire a second ciphertext, the second ciphertext being obtained by another party encrypting the first ciphertext based on a second encryption method; the first encryption method and the second encryption method satisfy a commutative law; a target key acquisition module, configured to decrypt the second ciphertext based on a first decryption method to determine a target key, the first decryption method corresponding to the first encryption method; a query identifier sending module, configured to send a plurality of query identifiers to a second party, the plurality of query identifiers including the target data identifier and one or more other data identifiers; a result ciphertext receiving module, configured to acquire a plurality of result ciphertexts from the second party, the plurality of result ciphertexts being obtained by encrypting a plurality of query results corresponding to the plurality of query identifiers; and a query result determination module, configured to determine a query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0006] Another aspect of the embodiments of this specification provides a secret query apparatus, including at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; and the at least one processor is used to execute the computer instructions to implement a secret query method provided in the embodiments of this specification.
[0007] Another aspect of the embodiments of this specification provides another secret query method applied to a second party. The method includes obtaining a first ciphertext, which is obtained by another party encrypting a target data identifier among a plurality of query identifiers based on a first encryption method; obtaining a second ciphertext, which is obtained by encrypting the first ciphertext based on a second encryption method, wherein the first encryption method and the second encryption method satisfy the commutative law; receiving a plurality of query identifiers from a first party; obtaining a plurality of corresponding query results based on the plurality of query identifiers; and obtaining a plurality of corresponding result ciphertexts based on encrypting the plurality of query results, including: for each query identifier, encrypting the corresponding query result based on a corresponding symmetric encryption key to obtain the corresponding result ciphertext, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier based on the second encryption method; sending the plurality of result ciphertexts to the first party so that the first party decrypts the second ciphertext to obtain a target key; and determining the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0008] Another aspect of the embodiments of this specification provides another secret query system deployed by a second party, the system comprising: a first ciphertext acquisition module for acquiring first ciphertext, the first ciphertext being obtained by encrypting a target data identifier among a plurality of query identifiers by another party based on a first encryption method; a second-party second ciphertext acquisition module for acquiring second ciphertext, the second ciphertext being obtained by encrypting the first ciphertext based on a second encryption method, the first encryption method and the second encryption method satisfying a commutative law; a query identifier receiving module for receiving a plurality of query identifiers from a first party; a query result acquisition module for acquiring a plurality of corresponding query results based on the plurality of query identifiers; a result ciphertext acquisition module for obtaining a plurality of corresponding result ciphertexts based on encrypting the plurality of query results, including: for each query identifier, encrypting the corresponding query result based on a corresponding symmetric encryption key to obtain the corresponding result ciphertext, the corresponding symmetric encryption key being obtained by encrypting the query identifier based on the second encryption method; and a result ciphertext sending module for sending the plurality of result ciphertexts to the first party, so that the first party can decrypt the second ciphertext to obtain a target key, and determine the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0009] Another aspect of the embodiments of this specification provides a secret query apparatus, including at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; and the at least one processor is used to execute the computer instructions to implement another secret query method provided in the embodiments of this specification. Attached Figure Description
[0010] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein:
[0011] Figure 1-1 These are exemplary application scenario diagrams of a secret query system according to some embodiments of this specification;
[0012] Figure 1-2 These are exemplary application scenario diagrams of a secret query system according to other embodiments of this specification;
[0013] Figure 2 This is an exemplary interactive flowchart of a secret query method according to some embodiments of this specification;
[0014] Figure 3 This is an exemplary flowchart illustrating the process of obtaining multiple encrypted results according to some embodiments of this specification;
[0015] Figure 4 This is an exemplary interactive flowchart of a secret query method according to other embodiments of this specification;
[0016] Figure 5 This is an exemplary block diagram of a secret query system according to some embodiments of this specification;
[0017] Figure 6 This is an exemplary block diagram of a secret query system according to other embodiments of this specification. Detailed Implementation
[0018] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this specification. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0019] It should be understood that the terms “system,” “device,” “unit,” and / or “module” used herein are one way to distinguish different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.
[0020] As indicated in this specification and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0021] Flowcharts are used in this specification to illustrate the operations performed by the system according to embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0022] In data query scenarios, clients with data query needs will seek specific data from data providers who possess the data or have the capability to acquire it. The queried data can be of various types, such as data values, text, and images.
[0023] In some embodiments, the querying party may initiate a data query request to the data provider and send a query identifier of the data to be queried to the data provider. After receiving the query request and the query identifier of the data to be queried, the data provider may query the corresponding data in the database based on the query identifier to obtain the query results, and the data provider may return the query results to the querying party, thereby realizing the data query.
[0024] In some cases, during data retrieval, both the querying party and the data provider wish to protect their data security. This requires preventing the data provider from knowing the query target, such as the query identifier (e.g., data ID) of the data to be queried—that is, not disclosing the query intent to the data provider—and also preventing the querying party from knowing any other data from the data provider besides the data to be queried—that is, not disclosing data unrelated to the query. Based on this, some embodiments of this specification provide a secret query method to ensure the data security of both the querying party and the data provider while performing the data query.
[0025] It should be noted that in some embodiments of this specification, the terms "first party," "second party," and "other party" are used to distinguish different participants involved in the data query method, such as the querying party, the data provider, or other third parties. However, "first party," "second party," and "other party" are only used to distinguish the participants and do not impose any restrictions on them. The technical solutions disclosed in the embodiments of this specification are explained in detail below through the interpretation of the accompanying drawings.
[0026] Figure 1-1 and Figure 1-2 This is an exemplary application scenario diagram of a secret query system according to some embodiments of this specification.
[0027] In some application scenarios, the first party may have a data query requirement, while the second party may possess the data or have the ability to acquire it. The functions implemented by the participants in a secret query, such as the first party, the second party, or other participants, can be achieved through the processing devices of those participants.
[0028] The processing device may include one or more sub-processing devices (e.g., a single-core processing device or a multi-core multi-chip processing device). In some embodiments, the processing device may include various types of processors, systems, platforms, etc., or any combination thereof.
[0029] like Figure 1-1 As shown, the first party can determine the query identifier for the data to be queried and initiate a data query request to the second party. The query identifier may include a data identifier used to indicate the data; each data item can have a corresponding data identifier, and the corresponding data can be found from a database or other data storage based on the data identifier. The data identifier can be any feasible data format, such as a data ID.
[0030] After receiving a data query request from the first party, the second party can return the query results to the first party, thus completing the data query. During this process, it is necessary to ensure that the second party is unaware of the first party's true query intent, and that the first party can only access the data to be queried, and not any other data from the second party.
[0031] In some embodiments, such as Figure 1-2 As shown, the first party can send multiple query identifiers to the second party, such as ID_0, ID_1, ID_2, ... These multiple query identifiers include the data identifier of the first party's actual data to be queried, such as ID_0 (the data identifier of the first party's actual data to be queried is called the target data identifier), and also include one or more other data identifiers (data identifiers other than the target data identifier are called other data identifiers), such as ID_1, ID_2, ... These other data identifiers can serve to confuse the first party's query intent, making it impossible for the second party to know the first party's true query intent.
[0032] In some embodiments, after receiving multiple query identifiers, the second party can obtain multiple query results corresponding to the multiple query identifiers, such as data of various types. The second party can obtain the query results corresponding to the data identifiers through various feasible methods, such as searching for the corresponding data based on the data identifiers in a local or other local database.
[0033] In some embodiments, the second party may encrypt the obtained query results using a cryptographic encryption algorithm to obtain multiple ciphertexts corresponding to multiple query results such as Value_0, Value_1, Value_2..., such as Cv_0, Cv_1, Cv_2..., and send them to the first party. This achieves the following: the first party can obtain the query result corresponding to the target data identifier (referred to as the target query result) such as the data value "12032" based on the key it obtained and the multiple ciphertexts, while the first party cannot know the query results corresponding to other data identifiers (referred to as other query results), thereby avoiding the disclosure of other plaintext data from the data provider.
[0034] Figure 2 This is an exemplary interactive flowchart of a secret query method according to some embodiments of this specification.
[0035] In some embodiments, the illustrated interaction flow can be collaboratively executed by the processing devices of the parties involved in the data query. For ease of explanation, the steps in flow 200 of this specification (e.g., steps 202, 204, 206, 208, 210, 212) are mainly described using the execution of the first party as an example. For instance, the portion of the interaction flow executed by the first party (such as the steps in flow 200) can be stored in the first party's storage device (such as the built-in storage unit of the processing device or an external storage device) in the form of a program or instruction. The portion of the interaction flow executed by the second party or other parties can be stored in the storage device of the second party or other parties in the form of a program or instruction. When the program or instruction is executed, it can realize the secret query process. In some embodiments, flow 200 can be implemented by a secret query system 500. It should be noted that the other parties involved in flow 200 can be other participating parties besides the first party, such as the second party or other third parties.
[0036] Step 202: Encrypt the target data identifier using the first encryption method to determine the first ciphertext.
[0037] In some embodiments, step 202 may be performed by the first ciphertext determination module 510.
[0038] The encryption method used by the first party to encrypt the target data identifier is called the first encryption method, and the ciphertext obtained by encryption is called the first ciphertext.
[0039] Step 204: Obtain the second ciphertext.
[0040] In some embodiments, step 204 may be performed by the first party's second ciphertext acquisition module 520.
[0041] The first party can send the first ciphertext to the other party.
[0042] Other parties can encrypt the first ciphertext. The encryption method used by other parties to encrypt the first ciphertext is called the second encryption method, and the resulting ciphertext is called the second ciphertext. The first encryption method and the second encryption method satisfy the commutative law.
[0043] An encryption method is said to satisfy the commutative law if B(A(msg)) = A(B(msg)) (where msg represents the original data, and B(x) and A(x) represent the encryption of data x using encryption methods B and A, respectively). Encryption methods A and B can be the same encryption algorithm using different encryption keys, or they can be different encryption algorithms that satisfy the commutative law.
[0044] The commutative encryption algorithms discussed in this specification can be any existing or future commutative encryption algorithms, such as RSA, ECC, etc.
[0045] As an example: the first encryption method can be to encrypt the target data identifier ID_0 based on the key Pk_a using the encryption algorithm E to obtain the first ciphertext C0, that is, E(ID_0,Pk_a)=C0; the second encryption method can be to encrypt the first ciphertext C0 based on the key Pk_b using the encryption algorithm E to obtain the second ciphertext C1, that is, E(C0,Pk_b)=C1, or E(E(ID_0,Pk_a),Pk_b)=C1. The first encryption method and the second encryption method satisfy: E(E(ID_0,Pk_a),Pk_b)=E(E(ID_0,Pk_b),Pk_a).
[0046] The encryption keys for the first encryption method and the second encryption method can be generated based on various feasible methods.
[0047] The first party can obtain the second ciphertext generated by the other party.
[0048] Step 206: Decrypt the second ciphertext using the first decryption method to determine the target key.
[0049] In some embodiments, step 206 may be performed by the target key acquisition module 530.
[0050] In the embodiments of this specification, the decryption method corresponding to the first encryption method is referred to as the first decryption method.
[0051] In some embodiments, the first party may decrypt the acquired second ciphertext based on the first decryption method, and the decryption result is called the first decryption result.
[0052] As an example, decrypting the second ciphertext based on the first encryption method E(ID_0,Pk_a) and the corresponding first decryption method is as follows: decrypting the second ciphertext based on the decryption key d1 using the decryption algorithm D, i.e., D(C1,d1), or D(E(E(ID_0,Pk_a),Pk_b),d1). The decryption key corresponding to the encryption algorithm can be generated when generating the encryption key.
[0053] Since the first and second encryption methods satisfy the commutative law, we know that D(E(E(ID_0,Pk_a),Pk_b),d1)=D(E(E(ID_0,Pk_b),Pk_a),d1)=E(ID_0,Pk_b). Therefore, the first decryption result can be E(ID_0,Pk_b), which is the result obtained by encrypting the target data identifier based on the second encryption method.
[0054] The first party can use the first decryption result as the target key (which can be represented by Cid_0) for subsequent decryption of the result ciphertext.
[0055] It should be noted that there is no order restriction between the aforementioned steps 202, 204, and 206 and the following steps 208 and 210. For example, steps 202, 204, and 206 can be executed before, after, or simultaneously with steps 208 and 210.
[0056] Step 208: Send multiple query identifiers to a second party, the multiple query identifiers including the target data identifier and one or more other data identifiers.
[0057] In some embodiments, step 208 may be performed by the query identifier sending module 540.
[0058] The first party may determine one or more other data identifiers, such as ID_1, ID_2, ..., by various feasible methods (e.g., random assignment or user-specified assignment).
[0059] The first party may send multiple query identifiers to the second party. The multiple query identifiers sent include the target data identifier (e.g., ID_0) and one or more other data identifiers (e.g., ID_1, ID_2, ...).
[0060] Since the second party receives multiple query identifiers and does not know which one is the target data identifier that the first party actually needs to query, the first party's true query intent can be concealed from the second party.
[0061] Step 210: Obtain multiple ciphertext results from the second party.
[0062] In some embodiments, step 210 may be performed by the result ciphertext receiving module 550.
[0063] After receiving multiple query identifiers sent by the first party, the second party can perform data searches based on the query identifiers and obtain multiple query results corresponding to the multiple query identifiers.
[0064] As an example, the multiple query results obtained by the second party corresponding to ID_0, ID_1, and ID_2 are as follows: Value_0: "12032", Value_1: "13547", and Value_2: "14356".
[0065] The second party can encrypt each query result to obtain the ciphertext of each query result.
[0066] In some embodiments, encrypting the query results by the second party may include: directly encrypting the query results to obtain the corresponding ciphertext.
[0067] In some embodiments, encrypting the query results by the second party may also include encrypting the query results and related information together to obtain the corresponding ciphertext.
[0068] In some embodiments, the relevant information in the query results can be used to: reflect the correspondence between the query results and the data identifiers and / or verify the correctness of the query results (e.g., whether they are complete, whether they are correct, etc.).
[0069] In some embodiments, the relevant information of the query results may include one or more of the following: information reflecting the correspondence between the query results and the data identifier (e.g., the data identifier corresponding to the query results, identifiers that correspond to both the data identifier and the query results, such as number, order, etc.), and information that can verify the correctness of the query results (e.g., the MD5 checksum of the query results).
[0070] In some embodiments, the second party can obtain multiple result ciphertexts by encrypting multiple query results so that the first party can obtain the target query result, i.e. the query result corresponding to the target data identifier, based on the target key it has obtained and the multiple result ciphertexts, and the first party cannot obtain other query results or cannot obtain other correct query results.
[0071] For more details on how the second party encrypts multiple query results to obtain multiple ciphertexts, please refer to [link to relevant documentation]. Figure 3 And related explanations.
[0072] The first party can obtain multiple encrypted results obtained by the second party.
[0073] Step 212: Determine the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0074] In some embodiments, step 212 may be performed by the query result determination module 560.
[0075] In some embodiments, the first party may obtain from the second party the correspondence between each query identifier and each result ciphertext. For example, the first party may obtain from the second party the query identifier corresponding to the result ciphertext (e.g., obtaining a key-value pair including the query identifier and the corresponding result ciphertext), the identifier corresponding to both the query identifier and the result ciphertext (e.g., a number), the order of the multiple result ciphertexts corresponding to the order of the multiple query identifiers (which can be determined when obtaining the multiple result ciphertexts), or other information reflecting the correspondence between the query identifier and the result ciphertext.
[0076] In some embodiments, the first party may determine the ciphertext to be decrypted from among the multiple ciphertexts obtained; this ciphertext is called the target ciphertext. In some embodiments, specifically, the first party may determine the ciphertext corresponding to the target data identifier, i.e., the target ciphertext, based on the obtained correspondence between each query identifier and each ciphertext.
[0077] As an example, the first party can obtain multiple key-value pairs from the second party, including the query identifier and the corresponding result ciphertext: “ID_0=Cv_0(****)”, “ID_1=Cv_1(****)”, “ID_2=Cv_2(****)”. Based on these multiple key-value pairs, the first party can know that the result ciphertext corresponding to the target data identifier ID_0, i.e., the target result ciphertext, is Cv_0(****).
[0078] In some embodiments, the first party can decrypt the target result ciphertext based on the acquired target key Cid_0, and can obtain the target query result by successfully decrypting it, such as D. ec (Cv_0,Cid_0)=Value_0,D ec This indicates the decryption algorithm.
[0079] In some embodiments, the first party may decrypt multiple ciphertexts obtained from the second party based on a target key, such as D. ec (Cv_ k ,Cid_0),D ec Indicates the decryption algorithm, Cv_ k This is the encrypted result for each query identifier, where k takes values of 0, 1, 2, ... to indicate different query identifiers.
[0080] In some embodiments, the first party may determine the target query result based on the data result of decrypting multiple result ciphertexts.
[0081] In some embodiments, the first party can successfully decrypt one of the multiple result ciphertexts based on the target key, obtaining the successfully decrypted data result, while the first party will fail to decrypt the other result ciphertexts among the multiple result ciphertexts. The result ciphertext that the first party can successfully decrypt is the target result ciphertext, and the first party can obtain the target query result, such as D, based on the successfully decrypted data result. ec (Cv_0,Cid_0) = Value_0, where Value_0 is the target query result.
[0082] In some embodiments, the first party can obtain multiple corresponding data results by decrypting multiple ciphertexts, including successfully decrypted data results (i.e., correct data results) and other undecrypted data results (e.g., incorrect data results). The first party can verify the obtained data results to determine the successfully decrypted data results among the multiple data results, and can obtain the target query result based on the data results.
[0083] As mentioned above, in some embodiments, the second party may encrypt the query result and related information together to obtain the corresponding ciphertext of the result. The related information of the query result can be used to reflect the correspondence between the query result and the data identifier and / or to verify the correctness of the query result (e.g., whether it is complete, whether it is correct, etc.). Based on this, in some embodiments, if the first party successfully decrypts the ciphertext of the result, the decrypted data result may include the corresponding query result and related information of the query result. In some embodiments, if the first party obtains related information of the query result, such as an MD5 checksum, in a certain data result, it can verify the query result in the data result based on the related information of the query result.
[0084] In some embodiments, if the first party obtains relevant information about the query result in a certain data result, and verifies the query result in the data result based on the relevant information about the query result, and obtains that the verification result of a certain data result is that the query result is correct, or in addition to verifying that the query result is the target query result, then the data result is a successfully decrypted data result, and the first party can use the query result in the data result as the target query result.
[0085] Through the above embodiments, the first party can obtain the target key by decrypting the second ciphertext, and use the target key to decrypt the ciphertext of the result obtained from the second party to obtain the target query result. Simultaneously, the first party cannot decrypt other result ciphertexts to obtain other query results or cannot obtain correct other query results. Therefore, it is possible to conceal the true query intent of the first party (such as the querying party) from the second party, and to ensure that other plaintext data of the second party (such as the data provider) is not disclosed to the first party, effectively guaranteeing the data security of all parties involved in the data query.
[0086] Figure 3 This is an exemplary flowchart illustrating the process of obtaining multiple encrypted results according to some embodiments of this specification.
[0087] In some embodiments, each query identifier has a corresponding encryption key, which can be obtained by encrypting the query identifier.
[0088] In some embodiments, the method for encrypting the query identifier may be the same as the second encryption method. For example, E(ID_k,Pk_b)=Cid_ k Cid_ k That is, the encryption key corresponding to the data identifier ID_k.
[0089] The encryption key corresponding to each query identifier can be generated by a party other than the first party (such as a second party or other third parties).
[0090] In some embodiments, for each query identifier, the second party may perform symmetric encryption on the query result corresponding to the query identifier based on the encryption key corresponding to the query identifier to obtain the corresponding ciphertext. For example, it can be represented as E nc (Value_k,Cid_ k )=Cv_ k E nc Cid_ represents a symmetric encryption algorithm. k This represents the encryption key corresponding to data identifier ID_k, and Value_k represents the data corresponding to data identifier ID_k. k This represents the ciphertext of the result corresponding to Value_k.
[0091] Symmetric encryption refers to the use of the same encryption key (called the symmetric encryption key) for encryption and the decryption key used to decrypt the encryption result.
[0092] Figure 4 This is an exemplary interactive flowchart of a secret query method according to other embodiments of this specification.
[0093] In some embodiments, the illustrated interaction flow can be collaboratively executed by the processing devices of the parties involved in the data query. For ease of explanation, the steps in process 400 of this specification (e.g., steps 402, 404, 406, 408, 410, 412) are mainly described using the execution of the second party as an example. In some embodiments, process 400 can be implemented by the secret query system 600. It should be noted that the other parties involved in process 400 can be other participants besides the second party, such as the first party or other third parties.
[0094] Step 402: Obtain the first ciphertext.
[0095] In some embodiments, step 402 may be performed by the first ciphertext acquisition module 610.
[0096] In some embodiments, the other party may encrypt the target data identifier to determine the first ciphertext based on the first encryption method, and the second party may obtain the first ciphertext from the other party.
[0097] For more details about the first ciphertext, please refer to [link / reference]. Figure 2 And its related descriptions.
[0098] Step 404: Obtain the second ciphertext.
[0099] In some embodiments, step 404 may be performed by the second-party second ciphertext acquisition module 620.
[0100] In some embodiments, the second party may encrypt the first ciphertext to obtain the second ciphertext.
[0101] In some embodiments, other third parties may encrypt the first ciphertext to obtain the second ciphertext, and the second party may obtain the second ciphertext from other parties.
[0102] In some embodiments, the first party may obtain a second ciphertext from the second party or other third parties.
[0103] The first party can decrypt the obtained second ciphertext to obtain the target key using the first decryption method corresponding to the first encryption method.
[0104] For more details regarding the second ciphertext and how the first party obtains the target key, please refer to [link / reference]. Figure 2 And its related descriptions.
[0105] Step 406: Receive multiple query identifiers from the first party.
[0106] In some embodiments, step 406 may be performed by the query identifier receiving module 630.
[0107] The first party may send multiple query identifiers to the second party. These multiple query identifiers include the target data identifier (e.g., ID_0) and multiple other data identifiers (e.g., ID_1, ID_2, ...).
[0108] For more details on multiple query identifiers, please refer to [link / reference]. Figure 2 And its related descriptions.
[0109] Step 408: Obtain multiple corresponding query results based on the multiple query identifiers.
[0110] In some embodiments, step 408 may be performed by the query result retrieval module 640.
[0111] After receiving multiple query identifiers sent by the first party, the second party can perform data searches based on the query identifiers and obtain multiple query results corresponding to the multiple query identifiers.
[0112] For more details on multiple query results, please refer to [link / reference]. Figure 2 And its related descriptions.
[0113] Step 410: Based on encrypting the multiple query results, obtain the corresponding multiple result ciphertexts.
[0114] In some embodiments, step 410 may be performed by the result ciphertext acquisition module 650.
[0115] In some embodiments, for each query identifier, the second party may encrypt the corresponding query result using the corresponding symmetric encryption key to obtain the corresponding ciphertext.
[0116] In some embodiments, for each query identifier, the corresponding symmetric encryption key can be obtained by encrypting the query identifier.
[0117] For more details on encrypting multiple query results to obtain corresponding ciphertext results, please refer to [link to relevant documentation]. Figure 2 , Figure 3 And its related descriptions.
[0118] Step 412: Send the encrypted results to the first party.
[0119] In some embodiments, step 412 may be performed by the result encrypted sending module 660.
[0120] The first party can determine the target query result based on the target key and multiple result ciphertexts, that is, the query result corresponding to the target data identifier. Simultaneously, the first party cannot obtain other query results or cannot obtain correct other query results.
[0121] For more details regarding the second party sending multiple encrypted results to the first party, and the first party determining the target query result based on the target key and the multiple encrypted results, please refer to [link to relevant documentation]. Figure 2 And its related descriptions.
[0122] It should be noted that the above descriptions of the various processes are for illustrative purposes only and do not limit the scope of this specification. Those skilled in the art can make various modifications and changes to the processes under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, changes to the process steps in this specification may include adding preprocessing steps, storage steps, or adding steps for interaction between other third-party systems and the first or second party (e.g., using third-party system A interacting with the first party's processing device to implement encryption and decryption steps performed by the first party: obtaining a first ciphertext based on encrypting the target data identifier, determining the target key based on decrypting the second ciphertext, and obtaining the target query result based on the target key and multiple result ciphertexts; or using third-party system B interacting with the second party's processing device to implement encryption steps performed by the second party: obtaining a second ciphertext based on encrypting the first ciphertext, obtaining the encryption key corresponding to the query identifier based on encrypting the query identifier, and obtaining multiple corresponding result ciphertexts based on encrypting the multiple query results).
[0123] Figure 5 This is an exemplary block diagram of a secret query system according to some embodiments of this specification.
[0124] The secret query system 500 can be deployed on a first-party platform. For example... Figure 5As shown, the system 500 may include a first ciphertext determination module 510, a first-party second ciphertext acquisition module 520, a target key acquisition module 530, a query identifier sending module 540, a result ciphertext receiving module 550, and a query result determination module 560.
[0125] In some embodiments, the first ciphertext determination module 510 can be used to encrypt the target data identifier based on the first encryption method to determine the first ciphertext.
[0126] In some embodiments, the first-party second ciphertext acquisition module 520 can be used to acquire second ciphertext, which is obtained by another party encrypting the first ciphertext using a second encryption method. The first encryption method and the second encryption method satisfy the commutative law.
[0127] In some embodiments, the target key acquisition module 530 can be used to decrypt the second ciphertext based on a first decryption method to determine the target key, wherein the first decryption method corresponds to the first encryption method.
[0128] In some embodiments, the query identifier sending module 540 can be used to send a plurality of query identifiers to a second party, the plurality of query identifiers including the target data identifier and one or more other data identifiers.
[0129] In some embodiments, the result ciphertext receiving module 550 can be used to obtain multiple result ciphertexts from a second party, the multiple result ciphertexts being obtained based on encrypting multiple query results corresponding to the multiple query identifiers.
[0130] In some embodiments, the query result determination module 560 can be used to determine the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0131] For a detailed description of each module of the system shown above, please refer to the flowchart section of this manual, for example... Figure 2 and Figure 3 And related explanations.
[0132] Figure 6 This is an exemplary block diagram of a secret query system according to other embodiments of this specification.
[0133] The Secret Access System 600 can be deployed on a second-party platform. For example... Figure 6 As shown, system 600 may include a first ciphertext acquisition module 610, a second ciphertext acquisition module 620, a query identifier receiving module 630, a query result acquisition module 640, a result ciphertext acquisition module 650, and a result ciphertext sending module 660.
[0134] In some embodiments, the first ciphertext acquisition module 610 can be used to acquire a first ciphertext, which is obtained by another party encrypting the target data identifier among the plurality of query identifiers based on a first encryption method.
[0135] In some embodiments, the second ciphertext acquisition module 620 can be used to acquire second ciphertext, which is obtained by encrypting the first ciphertext based on a second encryption method, wherein the first encryption method and the second encryption method satisfy the commutative law.
[0136] In some embodiments, the query identifier receiving module 630 may be used to receive multiple query identifiers from a first party.
[0137] In some embodiments, the query result acquisition module 640 can be used to acquire multiple corresponding query results based on the multiple query identifiers.
[0138] In some embodiments, the result ciphertext acquisition module 650 can be used to obtain multiple result ciphertexts based on encrypting the multiple query results, including: for each query identifier, encrypting the corresponding query result based on the corresponding symmetric encryption key to obtain the corresponding result ciphertext, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier based on the second encryption method.
[0139] In some embodiments, the result ciphertext sending module 660 may be used to send the plurality of result ciphertexts to a first party, so that the first party can decrypt the second ciphertext to obtain a target key, and determine a query result corresponding to a target data identifier based on the target key and the plurality of result ciphertexts.
[0140] For a detailed description of each module of the system shown above, please refer to the flowchart section of this manual, for example... Figure 4 And related explanations.
[0141] It should be understood that Figure 5 and Figure 6The systems and modules shown can be implemented in various ways. For example, in some embodiments, the systems and modules can be implemented by hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the methods and systems described above can be implemented using computer-executable instructions and / or included in processor control code, for example, on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The systems and modules of this specification can be implemented not only by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., but also by software, for example, executed by various types of processors, or by a combination of the aforementioned hardware circuits and software (e.g., firmware).
[0142] It should be noted that the above description of the secret query system and its modules is for convenience only and should not be construed as limiting this specification to the embodiments described. It is understood that those skilled in the art, after understanding the principles of the system, may arbitrarily combine the modules or construct subsystems connected to other modules without departing from these principles. For example, in some embodiments, the result encrypted text acquisition module 650 and the result encrypted text sending module 660 may be different modules within the same system, or a single module may implement the functions of two or more of the aforementioned modules. For example, modules may share a storage module, or each module may have its own separate storage module. Such variations are all within the scope of this specification.
[0143] This specification also provides a secret query device, including at least one storage medium and at least one processor. The at least one storage medium is used to store computer instructions. The at least one processor is used to execute the computer instructions to implement a secret query method. The method includes: encrypting a target data identifier based on a first encryption method to determine a first ciphertext; obtaining a second ciphertext, the second ciphertext being obtained by another party encrypting the first ciphertext based on a second encryption method; the first encryption method and the second encryption method satisfying the commutative law; decrypting the second ciphertext based on a first decryption method to determine a target key, the first decryption method corresponding to the first encryption method; sending a plurality of query identifiers to a second party, the plurality of query identifiers including the target data identifier and one or more other data identifiers; obtaining a plurality of result ciphertexts from the second party, the plurality of result ciphertexts being obtained by encrypting a plurality of query results corresponding to the plurality of query identifiers; and determining a query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0144] This specification also provides another secret query device, including at least one storage medium and at least one processor. The at least one storage medium is used to store computer instructions. The at least one processor is used to execute the computer instructions to implement a secret query method. The method includes: obtaining a first ciphertext, which is obtained by encrypting a target data identifier among a plurality of query identifiers by another party based on a first encryption method; obtaining a second ciphertext, which is obtained by encrypting the first ciphertext based on a second encryption method, wherein the first encryption method and the second encryption method satisfy the commutative law; receiving a plurality of query identifiers from a first party; obtaining a plurality of corresponding query results based on the plurality of query identifiers; obtaining a plurality of corresponding result ciphertexts based on encrypting the plurality of query results, including: for each query identifier, encrypting the corresponding query result based on a corresponding symmetric encryption key to obtain the corresponding result ciphertext, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier based on the second encryption method; sending the plurality of result ciphertexts to the first party so that the first party decrypts the second ciphertext to obtain a target key, and determining the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
[0145] The beneficial effects that the embodiments of this specification may bring include, but are not limited to: by sending multiple query identifiers to the second party from the first party, and by the first party and the second party encrypting the target data identifiers using a first encryption method and a second encryption method that satisfy the commutative law to obtain second ciphertext, and by the second party encrypting multiple query results corresponding to multiple query identifiers to obtain multiple result ciphertexts, the first party can obtain the target key based on the obtained second ciphertext, and obtain the target query result based on the target key and the obtained multiple result ciphertexts. This achieves the concealment of the true query intent of the first party (such as the querying party) from the second party during the data query process, and ensures that other plaintext data of the second party (such as the data provider) is not disclosed to the first party, effectively guaranteeing the data security of all parties involved in the data query. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may occur can be any one or a combination of the above, or any other possible beneficial effects.
[0146] The basic concepts have been described above. Obviously, for those skilled in the art, the detailed disclosure above is merely illustrative and does not constitute a limitation of this specification. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this specification. Such modifications, improvements, and corrections are suggested in this specification and therefore remain within the spirit and scope of the exemplary embodiments described herein.
[0147] Furthermore, this specification uses specific terms to describe embodiments thereof. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Moreover, certain features, structures, or characteristics in one or more embodiments of this specification can be appropriately combined.
[0148] Furthermore, those skilled in the art will understand that various aspects of this specification can be described and illustrated in several patentable ways or situations, including any new and useful combination of processes, machines, products, or substances, or any new and useful improvements thereof. Accordingly, various aspects of this specification can be implemented entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. All of the above hardware or software may be referred to as a “data block,” “module,” “engine,” “unit,” “component,” or “system.” Furthermore, various aspects of this specification may be represented as a computer product located on one or more computer-readable media, including computer-readable program code.
[0149] Computer storage media may contain a propagated data signal containing computer program code, for example, on baseband or as part of a carrier wave. This propagated signal may take various forms, including electromagnetic, optical, and suitable combinations thereof. Computer storage media can be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, apparatus, or device to enable communication, propagation, or transmission of a program for use. The program code located on the computer storage medium can be propagated through any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.
[0150] The computer program code required for the operation of each part of this manual can be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc.; conventional procedural programming languages such as C, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP; dynamic programming languages such as Python, Ruby, and Groovy; or other programming languages. This program code can run entirely on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as Software as a Service (SaaS).
[0151] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this specification are not intended to limit the order of the processes and methods described herein. Although various examples have been discussed in the foregoing disclosure of some embodiments of the invention that are currently considered useful, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments; rather, the claims are intended to cover all modifications and equivalent combinations that conform to the spirit and scope of the embodiments described herein. For example, while the system components described above can be implemented using hardware devices, they can also be implemented solely using software solutions, such as installing the described system on existing servers or mobile devices.
[0152] Similarly, it should be noted that, in order to simplify the description disclosed herein and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of embodiments in this specification may sometimes combine multiple features into a single embodiment, drawing, or description thereof. However, this method of disclosure does not imply that the subject matter of this specification requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of a single embodiment disclosed above.
[0153] In some embodiments, numbers describing the quantity of components and attributes are used. It should be understood that such numbers used in the description of embodiments are modified in some examples with the terms "approximately," "approximately," or "generally." Unless otherwise stated, "approximately," "approximately," or "generally" indicates that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may be changed depending on the characteristics required by individual embodiments. In some embodiments, numerical parameters should take into account specified significant digits and employ a general method of digit reservation. Although the numerical ranges and parameters used to confirm their breadth of range in some embodiments of this specification are approximate values, in specific embodiments, such values are set as precisely as feasible.
[0154] For each patent, patent application, patent application publication, and other material, such as articles, books, specifications, publications, and documents, referenced in this specification, the entire contents of which are incorporated herein by reference. This excludes historical application documents that are inconsistent with or conflict with the content of this specification, as well as documents that limit the broadest scope of the claims in this specification (currently or subsequently appended to this specification). It should be noted that in the event of any inconsistency or conflict between the descriptions, definitions, and / or terminology used in the supplementary materials to this specification and the content of this specification, the descriptions, definitions, and / or terminology used in this specification shall prevail.
[0155] Finally, it should be understood that the embodiments described in this specification are merely illustrative of the principles of the embodiments described herein. Other variations may also fall within the scope of this specification. Therefore, alternative configurations of the embodiments described herein are intended to be illustrative rather than limiting, and should be considered consistent with the teachings of this specification. Accordingly, the embodiments described herein are not limited to those explicitly introduced and described herein.
Claims
1. A secret lookup method, applied to a first party, the method comprising: The target data identifier is encrypted using the first encryption method to determine the first ciphertext; Obtain the second ciphertext, which is obtained by another party encrypting the first ciphertext using a second encryption method; The first encryption method and the second encryption method satisfy the commutative law; The target key is determined by decrypting the second ciphertext using the first decryption method, where the first decryption method corresponds to the first encryption method. Send multiple query identifiers to a second party, wherein the multiple query identifiers include the target data identifier and one or more other data identifiers; Multiple ciphertext results are obtained from a second party, wherein the multiple ciphertext results are obtained by encrypting multiple query results corresponding to the multiple query identifiers; Based on the target key and the multiple result ciphertexts, the query result corresponding to the target data identifier is determined.
2. The method according to claim 1, comprising: For a given query identifier: the corresponding result ciphertext is obtained by encrypting the corresponding query result using the corresponding symmetric encryption key, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier by another party using the second encryption method.
3. The method according to claim 1, wherein determining the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts includes: Obtain the correspondence between the multiple query identifiers and the multiple result ciphertexts from the second party, and determine the target result ciphertext accordingly; The query result corresponding to the target data identifier is determined by decrypting the ciphertext of the target result based on the target key.
4. The method according to claim 1, wherein determining the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts includes: Based on the target key, the multiple result ciphertexts are decrypted, and the query result corresponding to the target data identifier is determined based on the decrypted data result.
5. A secret query system, deployed on a first party, the system comprising: The first ciphertext determination module is used to encrypt the target data identifier based on the first encryption method to determine the first ciphertext. A first-party second-ciphertext acquisition module is used to acquire second ciphertext, which is obtained by another party encrypting the first ciphertext using a second encryption method; the first encryption method and the second encryption method satisfy the commutative law. The target key acquisition module is used to decrypt the second ciphertext based on the first decryption method to determine the target key, wherein the first decryption method corresponds to the first encryption method; A query identifier sending module is used to send multiple query identifiers to a second party, wherein the multiple query identifiers include the target data identifier and one or more other data identifiers; The result ciphertext receiving module is used to obtain multiple result ciphertexts from a second party, wherein the multiple result ciphertexts are obtained by encrypting multiple query results corresponding to the multiple query identifiers; The query result determination module is used to determine the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
6. A secret query device, the device comprising at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is configured to execute at least a portion of the computer instructions to implement the method as described in any one of claims 1 to 4.
7. A secret lookup method applied to a second party, the method comprising: Obtain the first ciphertext, which is obtained by another party encrypting the target data identifier based on the first encryption method; Obtain the second ciphertext, which is obtained by encrypting the first ciphertext using the second encryption method, wherein the first encryption method and the second encryption method satisfy the commutative law; Receive multiple query identifiers from a first party; The plurality of query identifiers includes the target data identifier and one or more other data identifiers; Based on the multiple query identifiers, obtain the corresponding multiple query results; The multiple query results are encrypted to obtain multiple corresponding ciphertexts, including: for each query identifier, the corresponding query result is encrypted using the corresponding symmetric encryption key to obtain the corresponding ciphertext, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier using the second encryption method; The multiple ciphertexts of the results are sent to the first party so that the first party can decrypt the second ciphertext to obtain the target key, and determine the query result corresponding to the target data identifier based on the target key and the multiple ciphertexts of the results.
8. A secret query system, deployed in a second party, the system comprising: The first ciphertext acquisition module is used to acquire the first ciphertext, which is obtained by another party encrypting the target data identifier based on the first encryption method. The second-party second-ciphertext acquisition module is used to acquire the second ciphertext, which is obtained by encrypting the first ciphertext based on the second encryption method, and the first encryption method and the second encryption method satisfy the commutative law. A query identifier receiving module is used to receive multiple query identifiers from a first party; the multiple query identifiers include the target data identifier and one or more other data identifiers; The query result acquisition module is used to acquire multiple corresponding query results based on the multiple query identifiers; The result ciphertext acquisition module is used to obtain multiple result ciphertexts based on encrypting the multiple query results, including: for each query identifier, encrypting the corresponding query result based on the corresponding symmetric encryption key to obtain the corresponding result ciphertext, wherein the corresponding symmetric encryption key is obtained by encrypting the query identifier based on the second encryption method; The result ciphertext sending module is used to send the plurality of result ciphertexts to the first party, so that the first party can decrypt the second ciphertext to obtain the target key, and determine the query result corresponding to the target data identifier based on the target key and the plurality of result ciphertexts.
9. A secret query device, the device comprising at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is configured to execute at least a portion of the computer instructions to implement the method as described in claim 7.
Citation Information
Patent Citations
Methods and related products for querying list and for providing list query service
CN112989027A
Data query method and device based on multi-party security computing
CN113886887A