A data query method, device, equipment and storage medium

Through elliptic curve encryption technology, target points and candidate points are generated for data encryption and decryption, solving the data query efficiency and security issues, and achieving an efficient and secure data query process.

CN117743384BActive Publication Date: 2024-12-06BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311766837.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2024-12-06
Estimated Expiration
2043-12-20

AI Technical Summary

Technical Problem

When the existing data query methods ensure security, as the amount of data increases, the query efficiency and response time will be significantly reduced, and there is a risk of data leakage during the data interaction, which will affect the economic losses and reputation of the data holder.

Method used

Using elliptic curve encryption technology, the target points and candidate points on the elliptic curve are generated through the asymmetric encryption key between the data holder and the data query party, and used to encrypt and decrypt candidate data ciphertext to ensure the security of data queries. Sex and efficiency.

Benefits of technology

Anonymous data query is realized, which reduces data transmission between the data holder and the data query party, improves the efficiency and security of data query, avoids the leakage of data usage requirements, and protects the privacy of the data holder.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117743384B_ABST
    Figure CN117743384B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data query method, device, equipment and storage medium, which relates to the field of data processing technology. The data query method includes: obtaining a target point on an elliptic curve from a data query party; wherein the target point is a point on the elliptic curve generated by using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder; encrypting each candidate data according to the holder private key of the data holder, the query party public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext; feeding back each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried. The above technical solution can improve the efficiency and security of data query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of data processing technology, and in particular to a data query method, device, equipment and storage medium. Background Art

[0002] With the rapid development of Internet technology, enterprises need to share data. In the process of data exchange between different enterprises, the security of data exchange is particularly important, especially for some data with strict security requirements. Once the content of data exchange is leaked, it will cause serious economic losses and reputation crisis to the data holder.

[0003] Moreover, under the premise of ensuring the security of query data, the query efficiency of existing traditional query methods will continue to decrease as the amount of data increases, and the query response time will become slower and slower, which urgently needs to be improved. Summary of the invention

[0004] The present disclosure provides a data query method, apparatus, device and storage medium.

[0005] According to one aspect of the present disclosure, a data query method is provided, which is performed by a data holder, and the method includes:

[0006] Obtaining a target point on the elliptic curve from the data querying party; wherein the target point is a point on the elliptic curve generated using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder;

[0007] Encrypting each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain a candidate data ciphertext;

[0008] Feedback each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried.

[0009] According to one aspect of the present disclosure, a data query method is provided, which is performed by a data query party, and the method includes:

[0010] Generate a target point on the elliptic curve using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder;

[0011] Sending the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0012] The target number of the data to be queried, the private key of the data querying party and the public key of the holder are used to decrypt the candidate data ciphertext fed back by the data holder to obtain the data to be queried.

[0013] According to one aspect of the present disclosure, there is provided a data query device, which is configured at a data holder, and the device includes:

[0014] A target point acquisition module is used to acquire a target point on the elliptic curve from a data query party; wherein the target point is a point on the elliptic curve generated by using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder;

[0015] A candidate data encryption module, used to encrypt each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0016] The data ciphertext sending module is used to feed back each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried.

[0017] According to one aspect of the present disclosure, a data query device is provided, which is configured at a data query party, and the device includes:

[0018] A target point generation module, used to generate a target point on the elliptic curve using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder;

[0019] A target point sending module is used to send the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the query party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0020] The decryption module is used to use the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext fed back by the data holder to obtain the data to be queried.

[0021] According to another aspect of the present disclosure, an electronic device is provided, the electronic device comprising:

[0022] at least one processor; and

[0023] a memory communicatively connected to the at least one processor; wherein,

[0024] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method provided by any embodiment of the present disclosure.

[0025] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided by any embodiment of the present disclosure.

[0026] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method provided according to any embodiment of the present disclosure is implemented.

[0027] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0029] Figure 1 is a flow chart of a data query method provided according to an embodiment of the present disclosure;

[0030] Figure 2 is a flow chart of another data query method provided according to an embodiment of the present disclosure;

[0031] Figure 3 is a flow chart of another data query method provided according to an embodiment of the present disclosure;

[0032] Figure 4 is a flow chart of another data query method provided according to an embodiment of the present disclosure;

[0033] Figure 5 is a structural schematic diagram of a data query device provided according to an embodiment of the present disclosure;

[0034] Figure 6 is a structural schematic diagram of another data query device provided according to an embodiment of the present disclosure;

[0035] Figure 7 It is a block diagram of an electronic device used to implement the data query method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] Figure 11 is a flow chart of a data query method provided according to an embodiment of the present disclosure. The method is applicable to the case where the data to be queried is provided to the data query party. The method can be executed by a data query device, which can be implemented in software and / or hardware and can be integrated into the electronic device of the data holder. Figure 1 As shown, the data query method of this embodiment may include:

[0037] S101, obtaining a target point on an elliptic curve from a data query party; wherein the target point is a point on the elliptic curve generated using a target number of the data to be queried, a query party public key of the data query party, and a holder public key of the data holder;

[0038] S102, encrypting each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain a candidate data ciphertext;

[0039] S103, feeding back the ciphertext of each candidate data to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried.

[0040] In the disclosed embodiment, the data holder may have multiple candidate data in the database, each candidate data has a corresponding candidate number, and the candidate number of each candidate data may be automatically incremented for the convenience of querying each candidate data. The data holder may have a holder private key and a holder public key. The holder private key is kept by the data holder itself, and the holder public key can be sent to the data query party; the data query party may have a query party private key and a query party public key. The query party private key is also kept by the data query party itself, and the query party public key can be sent to the data holder. The holder private key and the holder public key are a set of asymmetric encryption keys, and the query party private key and the holder public key are another set of asymmetric encryption keys. Both sets of asymmetric encryption keys can be generated based on the same elliptic curve.

[0041] When the data query party has a data query requirement, the candidate number corresponding to the data to be queried can be obtained as the target number, and the target number of the data to be queried, the query party's public key and the holder's public key are used to generate the target point on the elliptic curve. When the i-th piece of data needs to be queried, the target number i is obtained, and the query party's public key PKb, the holder's public key PKa and the target number i are used to generate the target point Xi on the elliptic curve.

[0042] The data holder obtains the target point from the data query party. N pieces of data M(1), M(2), ...M(N) can all be used as candidate data, and the candidate data include the target data M(i) to be queried; for each piece of candidate data, the candidate data is encrypted according to the holder's private key, the query party's public key, the target point and the candidate number of the candidate data to obtain the candidate data ciphertext. When the i-th piece of data needs to be queried, the j-th candidate data is encrypted according to the holder's private key SKa, the query party's public key PKb, the target point Xi and the candidate number j of the j-th candidate data to obtain the j-th candidate data ciphertext Cj; where j is the candidate number of the candidate data, and its value is [1,N].

[0043] The data holder feeds back each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party's private key and the holder's public key to decrypt only the target data ciphertext corresponding to the target number, but cannot decrypt other candidate data ciphertexts except the target data ciphertext. In other words, the data query party can only view the target data to be used through decryption, but cannot obtain other candidate data from the data holder through decryption. The data query party wants to obtain a certain piece of data M(i) from the data holder, but does not want the data holder to know which piece of data it wants. The data query party can notify the data holder to obtain N pieces of data M(1), M(2),...M(N), among which the target data M(i) to be queried is. The data holder takes all N pieces of data as candidate data, generates candidate data ciphertexts for each candidate data, and feeds them back to the data query party. The data query party can only select one piece of data from these N candidate data ciphertexts to decrypt and view.

[0044] Through the above processing, the data holder only needs to have one holder public key and send one holder public key to the data query party to realize data query. Compared with the data holder generating a corresponding asymmetric key pair for each candidate data and sending the public key sequence of each candidate data to the data query party, the data transmission between the data holder and the data query party can be reduced, thereby improving the data query efficiency; and, by obtaining the target point from the data query party, the data holder can avoid the data query party's data usage requirements from being leaked to the data holder, compared with obtaining the target number itself. In other words, anonymous query of the data holder is realized, so that the data holder cannot know which data the data query party needs to use.

[0045] According to the technical solution provided by the disclosed embodiment, the data holder obtains the target point on the elliptic curve from the data query party, decrypts each candidate data according to the holder's private key, the query party's public key, the target point and the candidate number of each candidate data to obtain the candidate data ciphertext, and feeds back each candidate data ciphertext to the data query party, so that the data query party only decrypts the candidate data ciphertext corresponding to the target number, which not only reduces the data transmission between the data holder and the data query party, but also avoids the leakage of the data query party's data usage requirements to the data holder, thereby improving the efficiency and security of data query.

[0046] In an optional implementation, the data holder's private key is generated based on elliptic curve parameters and the holder's public key; the data queryer's private key is generated based on elliptic curve parameters and the queryer's public key.

[0047] In the disclosed embodiment, the data holder can generate a large integer as the holder's private key, multiply the holder's private key by the base point of the specified elliptic curve to obtain a point on the elliptic curve as the holder's public key, and send the holder's public key to the data query party. The data query party can also generate a large integer as the query party's private key, multiply the query party's private key by the base point of the specified elliptic curve to obtain another point on the elliptic curve as the query party's public key, and send the query party's public key to the data holder. By generating the holder's private key, the holder's public key, the query party's private key, and the query party's public key based on the same elliptic curve, data queries can be performed based on the characteristics of the elliptic curve in the future, thereby improving the efficiency and security of data queries.

[0048] Figure 2 is a flow chart of another data query method provided according to an embodiment of the present disclosure. Figure 2 , the data query method of this embodiment may include:

[0049] S201, obtaining a target point on an elliptic curve from a data query party; wherein the target point is a point on the elliptic curve generated using a target number of the data to be queried, a query party public key of the data query party, and a holder public key of the data holder;

[0050] S202, for each candidate data of the data holder, using the holder's private key of the data holder, the querying party's public key, the target point and the candidate number of the candidate data, to generate a candidate point on the elliptic curve for the candidate data;

[0051] S203, using the candidate point to generate a candidate encryption key for the candidate data;

[0052] S204, using the candidate encryption key to encrypt the candidate data to obtain a ciphertext of the candidate data;

[0053] S205, feeding back the ciphertexts of the candidate data to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the ciphertexts of the candidate data to obtain the data to be queried.

[0054] In this embodiment, the data holder obtains the target point Xi on the elliptic curve from the data query party; for each candidate data, the data holder uses the private key SKa of the data holder, the public key PKb of the query party, the target point Xi and the candidate number j of the candidate data to generate a candidate point Yj on the elliptic curve for the candidate data; the candidate point Yj is used to generate a candidate encryption key Kj for the candidate data; the candidate encryption key Kj is used to encrypt the candidate data to obtain the candidate data ciphertext Cj; wherein, j is [1, N], and N is the number of candidate data in the data holder. The data holder generates a candidate point on the elliptic curve for each candidate data by combining the target point, generates a candidate encryption key for each candidate data by using each candidate point, and encrypts the corresponding candidate data by using the candidate encryption key to obtain each candidate data ciphertext, so that the data query party can only decrypt the candidate data ciphertext corresponding to the target point, but cannot decrypt other candidate data ciphertexts, thereby protecting other candidate data ciphertexts from being leaked.

[0055] In an optional implementation, the target point is generated in the following manner: multiplying the target number by the holder's public key to obtain a first intermediate point on the elliptic curve; and subtracting the first intermediate point from the querying party's public key to obtain the target point on the elliptic curve.

[0056] In the embodiment of the present disclosure, the target point on the elliptic curve can be obtained by the following formula:

[0057] Xi=PKb-i×PKa;

[0058] Among them, Xi is the target point, i is the target number, PKa and PKb are the public key of the holder and the public key of the querying party respectively, and i×PKa is the first intermediate point. Points on the elliptic curve support addition and multiplication operations, and subtraction operations can be achieved by multiplying with -1. Through operations on the elliptic curve, the target point on the elliptic curve is generated by combining the public key of the holder, the public key of the querying party and the target number, which facilitates the subsequent decryption of the candidate data ciphertext corresponding to the target number and realizes the query of the candidate data corresponding to the target number.

[0059] In an optional implementation, for each candidate data among the data holders, the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data are used to generate a candidate point on the elliptic curve for the candidate data, including: for each candidate data among the data holders, multiplying the candidate number of the candidate data by the holder's public key to obtain a second intermediate point on the elliptic curve, and adding the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve; multiplying the data holder's private key by the third intermediate point on the elliptic curve to obtain a candidate point on the elliptic curve.

[0060] For each candidate data, the candidate point on the elliptic curve can be generated for the candidate data using the following formula:

[0061] Yj = SKa × (Xi + j × PKa);

[0062] Among them, SKa and PKa are the holder's private key and the holder's public key respectively, Xi is the target point, Yj is the candidate point of the j-th candidate data on the elliptic curve, and j is the candidate number of the j-th candidate data. Through the above processing, the corresponding candidate point on the elliptic curve can be generated for each candidate data. By combining the candidate number to perform operations on the elliptic curve on the holder's private key, the holder's public key, and the target point to obtain the candidate point, the efficiency of candidate point generation can be improved, and it is also convenient for the subsequent decryption of the candidate data ciphertext corresponding to the target point based on the characteristics of the elliptic curve.

[0063] In an optional implementation, the use of the candidate point to generate a candidate encryption key for the candidate data includes: encoding the candidate point and elliptic curve parameters to obtain a candidate encoding result; and using a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data.

[0064] For each candidate data, the candidate point and elliptic curve parameters of the candidate data can be encoded separately to obtain a binary string, the binary strings of the two can be concatenated to obtain a candidate encoding result, and the candidate encoding result can be processed using a key generation function to obtain a candidate encryption key for the candidate data. Among them, the elliptic curve parameters may include at least one of the following: coefficients, base points or prime orders of the elliptic curve equation. By introducing elliptic curve parameters in the candidate encryption key generation process, the complexity of the candidate encryption key can be further improved, thereby improving the security of the subsequent candidate data ciphertext.

[0065] In an optional implementation, the use of a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data includes: using a hash function to process the candidate encoding result to obtain a candidate symmetric key for the candidate data; the length of the candidate symmetric key is equal to or greater than a preset length threshold.

[0066] The preset length threshold may be a specified value, such as 256 bits. In the case of a symmetric encryption function, a hash function such as (SHA-512) may be used to process the binary string of the candidate encoding result to obtain a 512-bit output as a candidate symmetric key. By generating a candidate symmetric key with a length that meets the requirements for the candidate data, on the one hand, the security of the candidate symmetric key can be improved, and on the other hand, by using symmetric encryption technology to encrypt the candidate point, the encryption efficiency of the candidate point can also be improved.

[0067] According to the technical solution provided by the disclosed embodiment, the data holder generates candidate points on the elliptic curve for each candidate data by using the holder's private key, the querying party's public key, the target point and the candidate number of the candidate data, uses the candidate points to generate candidate encryption keys for the candidate data, and uses the candidate encryption key to encrypt the candidate data to obtain the candidate data ciphertext, thereby making full use of the characteristics of the elliptic curve to realize anonymous data query and improve the efficiency and security of data query.

[0068] In an optional implementation, the data to be queried is determined in the following manner: using the target number to select a target data ciphertext from each candidate data ciphertext; using the data query party's private key and the holder's public key to generate a reference point on the elliptic curve; using the reference point to generate a reference decryption key, and using the reference decryption key to decrypt the target data ciphertext to obtain the data to be queried.

[0069] The data query party obtains each candidate encryption result from the data holder, and can obtain the data to be queried through the following processing: select the target data ciphertext from each candidate data ciphertext using the target number; generate the reference point Z on the elliptic curve through the following formula:

[0070] Z = SKb × PKa;

[0071] Among them, SKb and PKa are the private key of the querying party and the public key of the holder respectively, and Z is the reference point. Optionally, the reference point and the elliptic curve parameters are encoded to obtain a reference encoding result; the reference encoding result is processed using a key generation function to obtain a reference encryption key. Further, the reference encoding result is processed using a key generation function to obtain a reference encryption key, including: using a hash function to process the reference encoding result to obtain a reference symmetric key; wherein the length of the reference symmetric key is the same as the length of the candidate symmetric key. The encoding method and key generation function used by the reference encryption key are the same as the encoding method and key generation function used by each candidate encryption key.

[0072] In the embodiment of the present disclosure, the candidate points satisfy the following relationship:

[0073] Yj=SKa×(Xi+j×PKa)=SKa×(PKb-i×PKa+j×PKa);

[0074] Only when the target number i is equal to the candidate number j, Yj=SKa×PKb; based on the characteristics of the elliptic curve, the following relationship holds: SKa×PKb=SKb×PKa; therefore, using the reference point Z (Z=SKb×PKa) can only decrypt the target data ciphertext, but cannot decrypt other candidate data ciphertexts except the target data ciphertext, thereby protecting other candidate data ciphertexts from being leaked.

[0075] Figure 3 1 is a flow chart of a data query method provided according to an embodiment of the present disclosure. The method is applicable to the case of querying data to a data holder. The method can be executed by a data query device, which can be implemented in software and / or hardware and can be integrated into an electronic device of the data query party. Figure 3 As shown, the data query method of this embodiment may include:

[0076] S301, generating a target point on the elliptic curve using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder;

[0077] S302, sending the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0078] S303, using the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext fed back by the data holder to obtain the data to be queried.

[0079] In the disclosed embodiment, the data holder may have multiple candidate data in the database, each candidate data has a corresponding candidate number, and the candidate number of each candidate data may be self-incremented for the convenience of querying each candidate data. The data holder may have a holder private key and a holder public key, and the data querying party may have a querying party private key and a querying party public key, and the holder private key, the holder public key, the querying party private key, and the holder public key may all be generated based on the same elliptic curve.

[0080] The data query party wants to obtain a certain piece of data M(i) from the data holder, but does not want the data holder to know which piece of data it wants. The data query party can notify the data holder to obtain N pieces of data M(1), M(2), ... M(N), among which the target data M(i) to be queried is. The data query party can use the candidate number i corresponding to the data to be queried M(i) as the target number, and use the target number of the data to be queried, the query party's public key and the holder's public key to generate the target point on the elliptic curve. The data query party can also send the target point to the data holder, so that the data holder uses the holder's private key, the query party's public key, the target point and the candidate number of the candidate data to encrypt the corresponding candidate data to obtain the candidate data ciphertext, and feed back each candidate data ciphertext to the data query party.

[0081] The data query party uses the target number of the data to be queried, the query party's private key and the holder's public key to decrypt only the target data ciphertext corresponding to the target number, but cannot decrypt other candidate data ciphertexts except the target data ciphertext, that is, the data query party can only view the target data to be used by decryption, but cannot obtain other candidate data in the data holder by decryption. Through the above processing, the data holder only needs to have a holder's public key and send a holder's public key to the data query party to realize data query. Compared with the data holder generating a corresponding asymmetric key pair for each candidate data and sending the public key sequence of each candidate data to the data query party, the data transmission between the data holder and the data query party can be reduced, thereby improving the data query efficiency; and the data query party generates the target point on the elliptic curve by using the target number of the data to be queried, the query party's public key and the holder's public key, and sends the target point to the data holder. Compared with sending the target number itself to the data holder, it can also avoid the data query party's data usage requirements from being leaked to the data holder, that is, an anonymous query of the data holder is realized, so that the data holder cannot know which data the data query party needs to use.

[0082] According to the technical solution provided by the disclosed embodiment, the data query party generates a target point on the elliptic curve by using the target number, the query party's public key and the holder's public key, and feeds back the target point to the data holder, so that the data holder uses the target point to encrypt each candidate data separately to obtain the candidate data ciphertext; the data query party also decrypts the candidate data ciphertext to obtain the data to be queried, which not only reduces the data transmission between the data query party and the data holder, but also avoids the leakage of the data query party's data usage requirements to the data holder, thereby improving the efficiency and security of data query.

[0083] In an optional implementation, the data query party's query private key is generated based on elliptic curve parameters and the query party's public key; the data holder's holder private key is generated based on elliptic curve parameters and the holder's public key.

[0084] In the disclosed embodiment, the data querying party can generate a large integer as the querying party private key, multiply the querying party private key with the base point of the specified elliptic curve to obtain another point on the elliptic curve as the querying party public key, and send the querying party public key to the data holder. The data holder can also generate a large integer as the holder private key, multiply the holder private key with the base point of the specified elliptic curve to obtain a point on the elliptic curve as the holder public key, and send the holder public key to the data querying party. By generating the holder private key, the holder public key, the querying party private key, and the querying party public key based on the same elliptic curve, data queries can be performed based on the characteristics of the elliptic curve in the future, thereby improving the efficiency and security of data queries.

[0085] Figure 4 is a flowchart of another data query method provided according to an embodiment of the present disclosure. Figure 4 , the data query method of this embodiment may include:

[0086] S401, generating a target point on the elliptic curve using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder;

[0087] S402, sending the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0088] S403, selecting a target data ciphertext from each candidate data ciphertext using the target number;

[0089] S404, using the data query party's private key and the holder's public key to generate a reference point on the elliptic curve;

[0090] S405, generating a reference decryption key using the reference point;

[0091] S406: Decrypt the target data ciphertext using the reference decryption key to obtain the data to be queried.

[0092] In this embodiment, the data query party uses the target number of the data to be queried to generate a target point Xi on the elliptic curve, and sends the target point to the data holder, so that the data holder uses the holder's private key SKa, the query party's public key PKb, the target point Xi and the candidate number j of the candidate data for each candidate data, and encrypts the candidate data to obtain the candidate data ciphertext Cj.

[0093] The data query party obtains each candidate data ciphertext from the data holder, selects the i-th copy from each candidate data ciphertext as the target data ciphertext, and uses the query party's private key and the holder's public key to generate a reference point Z on the elliptic curve. The reference point Z on the elliptic curve can be generated by the following formula:

[0094] Z = SKb × PKa;

[0095] Among them, SKb and PKa are the query party's private key and the holder's public key respectively, and Z is the reference point. The data query party can also use the reference point Z to generate a reference decryption key, and use the reference decryption key to decrypt the target data ciphertext to obtain the data to be queried. The data query party generates a reference point on the elliptic curve using the query party's private key and the holder's public key, uses the reference point to generate a reference decryption key, and uses the reference decryption key to decrypt the target data ciphertext to obtain the target data, so that the data query party can only decrypt the target data ciphertext, but cannot decrypt other candidate data ciphertexts, thereby improving the security of data query.

[0096] In an optional implementation, the target point on the elliptic curve is generated using the target number of the data to be queried, the query party's public key, and the data holder's holder's public key, including: multiplying the target number with the holder's public key to obtain a first intermediate point on the elliptic curve; subtracting the first intermediate point from the query party's public key to obtain the target point on the elliptic curve.

[0097] In the embodiment of the present disclosure, the target point on the elliptic curve can be obtained by the following formula:

[0098] Xi=PKb-i×PKa;

[0099] Among them, Xi is the target point, i is the target number, PKa and PKb are the public key of the holder and the public key of the querying party respectively, and i×PKa is the first intermediate point. Points on the elliptic curve support addition and multiplication operations, and subtraction operations can be achieved by multiplying with -1. Through operations on the elliptic curve, the target point on the elliptic curve is generated by combining the public key of the holder, the public key of the querying party and the target number, which facilitates the subsequent decryption of the candidate data ciphertext corresponding to the target number and realizes the query of the candidate data corresponding to the target number.

[0100] In an optional implementation, the use of the reference point to generate a reference decryption key includes: encoding the reference point and elliptic curve parameters to obtain a reference encoding result; and using a key generation function to process the reference encoding result to obtain a reference decryption key.

[0101] In this embodiment, the reference point and the elliptic curve parameter can be encoded separately to obtain a binary string, the binary strings of the two can be concatenated to obtain a reference encoding result, and the reference encoding result can be processed using a key generation function to obtain a reference encryption key. Among them, the elliptic curve parameter may include at least one of the following: the coefficient, base point or prime order of the elliptic curve equation. By introducing the elliptic curve parameter in the reference encryption key generation process, the complexity of the reference encryption key can be further improved, thereby improving the reliability of data query.

[0102] In an optional implementation, the use of a key generation function to process the reference encoding result to obtain a reference decryption key includes: using a hash function to process the reference encoding result to obtain a reference decryption key; the length of the reference encryption key is equal to or greater than a preset length threshold.

[0103] The preset length threshold may be a specified value, for example, 256 bits. In the case of a symmetric encryption function, a hash function such as (SHA-512) may be used to process the binary string of the reference encoding result to obtain a 512-bit output as a reference symmetric key. By generating a reference symmetric key with a length that meets the requirements, on the one hand, the security of the reference symmetric key can be improved, and on the other hand, by using symmetric encryption technology to encrypt the reference point, the encryption efficiency of the reference point can also be improved.

[0104] According to the technical solution provided by the disclosed embodiment, a data query party selects a target data ciphertext from various candidate data ciphertexts by using a target number; a reference point on an elliptic curve is generated by using a private key of the query party and a public key of the holder, a reference decryption key is generated by using the reference point, and the reference decryption key is used to decrypt the target data ciphertext to obtain the data to be queried, thereby making full use of the characteristics of the elliptic curve to realize anonymous data query and improve the efficiency and security of data query.

[0105] In an optional implementation, the candidate data ciphertext is determined in the following manner: for each candidate data among the data holders, a candidate point on an elliptic curve is generated for the candidate data using the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data; the candidate point is used to generate a candidate encryption key for the candidate data; and the candidate encryption key is used to encrypt the candidate data to obtain the candidate data ciphertext.

[0106] In this embodiment, for each candidate data, the data holder can use the holder's private key SKa, the query party's public key PKb, the target point Xi and the candidate number j of the candidate data to generate a candidate point Yj on the elliptic curve for the candidate data; use the candidate point Yj to generate a candidate encryption key Kj for the candidate data; use the candidate encryption key Kj to encrypt the candidate data to obtain the candidate data ciphertext Cj. The data holder encrypts the candidate data separately through the above process to obtain each candidate data ciphertext, so that the data query party can only decrypt the candidate data ciphertext corresponding to the target point, but cannot decrypt other candidate data ciphertexts, thereby protecting other candidate data ciphertexts from being leaked.

[0107] In an optional implementation, the candidate points are determined in the following manner: for each candidate data of the data holder, the candidate number of the candidate data is multiplied by the public key of the holder to obtain the second intermediate point on the elliptic curve, and the target point is added to the second intermediate point to obtain the third intermediate point on the elliptic curve; the private key of the data holder is multiplied by the third intermediate point on the elliptic curve to obtain the candidate point on the elliptic curve.

[0108] For each candidate data, the candidate point on the elliptic curve can be generated for the candidate data using the following formula:

[0109] Yj = SKa × (Xi + j × PKa);

[0110] Among them, SKa and PKa are the holder's private key and the holder's public key respectively, Xi is the target point, and Yj is the candidate point of the j-th candidate data on the elliptic curve. In this embodiment, the candidate points satisfy the following relationship:

[0111] Yj=SKa×(Xi+j×PKa)=SKa×(PKb-i×PKa+j×PKa);

[0112] Only when the target number i is equal to the candidate number j, Yj=SKa×PKb; based on the characteristics of the elliptic curve, the following relationship holds: SKa×PKb=SKb×PKa; therefore, using the reference point Z (Z=SKb×PKa) can only decrypt the target data ciphertext, but cannot decrypt other candidate data ciphertexts except the target data ciphertext, thereby protecting other candidate data ciphertexts from being leaked.

[0113] By combining the candidate number with the holder's private key, the holder's public key, and the target point to perform operations on the elliptic curve to obtain the candidate point, the efficiency of generating the candidate point can be improved, and it is also convenient for the subsequent decryption of the candidate data ciphertext corresponding to the target point based on the characteristics of the elliptic curve.

[0114] In an optional implementation, the use of the candidate point to generate a candidate encryption key for the candidate data includes: encoding the candidate point and elliptic curve parameters to obtain a candidate encoding result; and using a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data.

[0115] For each candidate data, the candidate points and elliptic curve parameters of the candidate data can be encoded to obtain a candidate encoding result, and the candidate encoding result can be processed using a key generation function to obtain a candidate encryption key for the candidate data. By introducing elliptic curve parameters in the candidate encryption key generation process, the complexity of the candidate encryption key can be further improved, thereby improving the security of subsequent candidate data ciphertexts. It should be noted that the length of the reference symmetric key can be the same as the length of the candidate symmetric key, and the generation method of the reference encryption key can be the same as the generation method of each candidate encryption key.

[0116] In an optional implementation, the adopting a key generation function to process the candidate encoding result to obtain the candidate encryption key of the candidate data includes: adopting a hash function to process the candidate encoding result to obtain the candidate symmetric key of the candidate data; the length of the candidate symmetric key is equal to or greater than a preset length threshold. By generating a candidate symmetric key with a length that meets the requirement for the candidate data, not only can the security of the candidate symmetric key be improved, but also by adopting a symmetric encryption technology to encrypt the candidate point, the encryption efficiency of the candidate point can be improved.

[0117] Figure 5 1 is a schematic diagram of a data query device according to an embodiment of the present disclosure. This embodiment is applicable to the case where the data to be queried is provided to the data query party. The device can be implemented in software and / or hardware and can be integrated into the electronic device of the data holder. Figure 5 As shown, the data query device 500 of this embodiment may include:

[0118] The target point acquisition module 510 is used to acquire a target point on the elliptic curve from the data query party; wherein the target point is a point on the elliptic curve generated by using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder;

[0119] The candidate data encryption module 520 is used to encrypt each candidate data according to the data holder's private key, the query party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0120] The data ciphertext sending module 530 is used to feed back each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried.

[0121] In an optional implementation, the target point is generated in the following manner:

[0122] Multiplying the target number by the holder's public key to obtain a first intermediate point on the elliptic curve;

[0123] The target point on the elliptic curve is obtained by subtracting the first intermediate point from the querying party public key.

[0124] In an optional implementation, the candidate data encryption module 520 includes:

[0125] A candidate point unit, for generating a candidate point on an elliptic curve for each candidate data of a data holder, using a holder private key of the data holder, a public key of the querying party, the target point and a candidate number of the candidate data;

[0126] A candidate key unit, configured to generate a candidate encryption key for the candidate data using the candidate point;

[0127] The candidate data encryption unit is used to encrypt the candidate data using the candidate encryption key to obtain the candidate data ciphertext.

[0128] In an optional implementation, the candidate point unit includes:

[0129] The intermediate public key subunit is used to multiply the candidate number of each candidate data of the data holder by the public key of the holder to obtain a second intermediate point on the elliptic curve, and add the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve;

[0130] The candidate point subunit is used to multiply the data holder's private key by the third intermediate point on the elliptic curve to obtain a candidate point on the elliptic curve.

[0131] In an optional implementation, the candidate key unit includes:

[0132] A candidate encoding subunit, used for encoding the candidate points and elliptic curve parameters to obtain a candidate encoding result;

[0133] The candidate key subunit is used to use a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data.

[0134] In an optional implementation manner, the candidate key subunit is specifically used for:

[0135] A hash function is used to process the candidate encoding result to obtain a candidate symmetric key for the candidate data; the length of the candidate symmetric key is equal to or greater than a preset length threshold.

[0136] In an optional implementation manner, the data to be queried is determined in the following manner:

[0137] Selecting a target data ciphertext from each candidate data ciphertext using the target number;

[0138] Generate a reference point on the elliptic curve using the data query party's private key and the holder's public key;

[0139] The reference point is used to generate a reference decryption key, and the reference decryption key is used to decrypt the target data ciphertext to obtain the data to be queried.

[0140] In an optional implementation, the data holder's private key is generated based on elliptic curve parameters and the holder's public key; the data queryer's private key is generated based on elliptic curve parameters and the queryer's public key.

[0141] According to the technical solution of the disclosed embodiment, the data holder obtains the target point on the elliptic curve from the data query party, uses the holder's private key, the query party's public key, the target point and the candidate number of the candidate data to generate a candidate point on the elliptic curve for each candidate data, generates a candidate encryption key using the candidate point, and encrypts the candidate data using the candidate encryption key to obtain the candidate data ciphertext, and feeds back each candidate data ciphertext to the data query party, so that the data query party can decrypt it to obtain the data to be queried, thereby making full use of the characteristics of the elliptic curve to realize anonymous data query and improve the efficiency and security of data query.

[0142] Figure 61 is a schematic diagram of a data query device according to an embodiment of the present disclosure. This embodiment is applicable to the case of querying data on a data holder. The device can be implemented in software and / or hardware and can be integrated into an electronic device of the data query party. Figure 6 As shown, the data query device 600 of this embodiment may include:

[0143] The target point generation module 610 is used to generate a target point on the elliptic curve using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder;

[0144] The target point sending module 620 is used to send the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the query party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext;

[0145] The decryption module 630 is used to decrypt the candidate data ciphertext fed back by the data holder by using the target number of the data to be queried, the private key of the data querying party and the public key of the holder to obtain the data to be queried.

[0146] In an optional implementation, the target point generating module 610 includes:

[0147] An intermediate public key unit, used to multiply the target number by the holder's public key to obtain a first intermediate point on the elliptic curve;

[0148] A target point unit is used to obtain a target point on the elliptic curve by subtracting the first intermediate point from the querying party public key.

[0149] In an optional implementation, the decryption module 630 includes:

[0150] A target ciphertext unit, used to select a target data ciphertext from each candidate data ciphertext using the target number;

[0151] A reference point unit, used to generate a reference point on the elliptic curve using a private key of a data querying party and a public key of the holder;

[0152] a decryption key unit, configured to generate a reference decryption key using the reference point;

[0153] The data decryption unit is used to use the reference decryption key to decrypt the target data ciphertext to obtain the data to be queried.

[0154] In an optional implementation, the decryption key unit includes:

[0155] A reference encoding subunit, used for encoding the reference point and the elliptic curve parameter to obtain a reference encoding result;

[0156] The decryption key subunit is used to process the reference encoding result using a key generation function to obtain a reference decryption key.

[0157] In an optional implementation manner, the decryption key subunit is specifically used for:

[0158] A hash function is used to process the reference encoding result to obtain a reference decryption key; the length of the reference encryption key is equal to or greater than a preset length threshold.

[0159] In an optional implementation manner, the candidate data ciphertext is determined by:

[0160] For each candidate data of the data holder, a candidate point on the elliptic curve is generated for the candidate data by using the holder private key of the data holder, the querying party public key, the target point and the candidate number of the candidate data;

[0161] Generating a candidate encryption key for the candidate data using the candidate point;

[0162] The candidate data is encrypted using the candidate encryption key to obtain a ciphertext of the candidate data.

[0163] In an optional implementation, the candidate points are determined in the following manner:

[0164] For each candidate data of the data holder, multiply the candidate number of the candidate data by the holder's public key to obtain a second intermediate point on the elliptic curve, and add the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve;

[0165] The candidate point on the elliptic curve is obtained by multiplying the holder private key of the data holder and the third intermediate point on the elliptic curve.

[0166] In an optional implementation, the data query party's query private key is generated based on elliptic curve parameters and the query party's public key; the data holder's holder private key is generated based on elliptic curve parameters and the holder's public key.

[0167] According to the technical solution of the disclosed embodiment, a data query party generates a target point on an elliptic curve and sends the target point to a data holder, so that the data holder uses the holder's private key, the query party's public key, the target point and the candidate number of the candidate data to encrypt each candidate data to obtain a candidate data ciphertext; the data query party also uses the target number to select a target data ciphertext from each candidate data ciphertext, and decrypts the target data ciphertext to obtain the data to be queried, thereby making full use of the characteristics of the elliptic curve to realize anonymous data query and improve the efficiency and security of data query.

[0168] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0169] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0170] Figure 7 It is a block diagram of an electronic device used to implement the data query method of the embodiment of the present disclosure.

[0171] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0172] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0173] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0174] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), an image processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a data query method. For example, in some embodiments, the data query method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the data query method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data query method in any other appropriate manner (e.g., by means of firmware).

[0175] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0176] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0177] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0178] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0179] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0180] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0181] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.

[0182] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.

[0183] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0184] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data query method, performed by a data holder, comprising: Obtaining a target point on the elliptic curve from the data querying party; wherein the target point is a point on the elliptic curve generated using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder; For each candidate data of the data holder, a candidate point on the elliptic curve is generated for the candidate data by using the holder private key of the data holder, the querying party public key, the target point and the candidate number of the candidate data; Generating a candidate encryption key for the candidate data using the candidate point; Encrypting the candidate data using the candidate encryption key to obtain a candidate data ciphertext; Feedback each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried.

2. The method according to claim 1, wherein: The target point is generated in the following way: Multiplying the target number by the holder's public key to obtain a first intermediate point on the elliptic curve; The target point on the elliptic curve is obtained by subtracting the first intermediate point from the querying party public key.

3. The method according to claim 1, wherein: For each candidate data of the data holder, using the holder's private key of the data holder, the querying party's public key, the target point and the candidate number of the candidate data, generating a candidate point on the elliptic curve for the candidate data, including: For each candidate data of the data holder, multiply the candidate number of the candidate data by the holder's public key to obtain a second intermediate point on the elliptic curve, and add the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve; The candidate point on the elliptic curve is obtained by multiplying the holder private key of the data holder and the third intermediate point on the elliptic curve.

4. The method according to claim 1, wherein: The step of using the candidate point to generate a candidate encryption key for the candidate data includes: Encoding the candidate points and elliptic curve parameters to obtain candidate encoding results; The candidate encoding result is processed using a key generation function to obtain a candidate encryption key for the candidate data.

5. The method according to claim 4, wherein: The adopting a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data includes: A hash function is used to process the candidate encoding result to obtain a candidate symmetric key for the candidate data; the length of the candidate symmetric key is equal to or greater than a preset length threshold.

6. The method according to claim 1 or 2, wherein: The data to be queried is determined in the following manner: Selecting a target data ciphertext from each candidate data ciphertext using the target number; Generate a reference point on the elliptic curve using the data query party's private key and the holder's public key; The reference point is used to generate a reference decryption key, and the reference decryption key is used to decrypt the target data ciphertext to obtain the data to be queried.

7. The method according to claim 1 or 2, wherein: The data holder's private key is generated according to the elliptic curve parameters and the holder's public key; the data queryer's private key is generated according to the elliptic curve parameters and the queryer's public key.

8. A data query method, performed by a data query party, the method comprising: Generate a target point on the elliptic curve using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder; Sending the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext; Decrypting the candidate data ciphertext fed back by the data holder using the target number of the data to be queried, the private key of the data querying party and the public key of the holder to obtain the data to be queried; The candidate data ciphertext is determined in the following manner: For each candidate data of the data holder, a candidate point on the elliptic curve is generated for the candidate data by using the holder private key of the data holder, the querying party public key, the target point and the candidate number of the candidate data; Generating a candidate encryption key for the candidate data using the candidate point; The candidate data is encrypted using the candidate encryption key to obtain a ciphertext of the candidate data.

9. The method according to claim 8, wherein: The method of using the target number of the data to be queried, the querying party public key of the data querying party, and the holder public key of the data holder to generate the target point on the elliptic curve includes: Multiplying the target number by the holder's public key to obtain a first intermediate point on the elliptic curve; The target point on the elliptic curve is obtained by subtracting the first intermediate point from the querying party public key.

10. The method according to claim 8 or 9, wherein: The method of using the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext fed back by the data holder to obtain the data to be queried includes: Selecting a target data ciphertext from each candidate data ciphertext using the target number; Generate a reference point on the elliptic curve using the data query party's private key and the holder's public key; generating a reference decryption key using the reference point; The reference decryption key is used to decrypt the target data ciphertext to obtain the data to be queried.

11. The method according to claim 10, wherein: The step of using the reference point to generate a reference decryption key comprises: Encoding the reference point and the elliptic curve parameters to obtain a reference encoding result; The reference encoding result is processed using a key generation function to obtain a reference decryption key.

12. The method according to claim 11, wherein: The adopting a key generation function to process the reference encoding result to obtain a reference decryption key includes: A hash function is used to process the reference encoding result to obtain a reference decryption key; the length of the reference decryption key is equal to or greater than a preset length threshold.

13. The method according to claim 8, wherein: The candidate points are determined in the following manner: For each candidate data of the data holder, multiply the candidate number of the candidate data by the holder's public key to obtain a second intermediate point on the elliptic curve, and add the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve; The candidate point on the elliptic curve is obtained by multiplying the holder private key of the data holder and the third intermediate point on the elliptic curve.

14. The method according to claim 8 or 9, wherein: The data query party's query private key is generated according to the elliptic curve parameters and the query party's public key; the data holder's holder private key is generated according to the elliptic curve parameters and the holder's public key.

15. A data query device, configured at a data holder, comprising: A target point acquisition module is used to acquire a target point on the elliptic curve from a data query party; wherein the target point is a point on the elliptic curve generated by using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder; A candidate data encryption module, used to encrypt each candidate data according to the data holder's private key, the querying party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext; A data ciphertext sending module is used to feed back each candidate data ciphertext to the data query party, so that the data query party uses the target number of the data to be queried, the query party private key of the data query party and the holder public key to decrypt the candidate data ciphertext to obtain the data to be queried; Wherein, the candidate data encryption module includes: A candidate point unit, for generating a candidate point on an elliptic curve for each candidate data of a data holder, using a holder private key of the data holder, a public key of the querying party, the target point and a candidate number of the candidate data; A candidate key unit, configured to generate a candidate encryption key for the candidate data using the candidate point; The candidate data encryption unit is used to encrypt the candidate data using the candidate encryption key to obtain the candidate data ciphertext.

16. The device according to claim 15, wherein: The candidate point unit comprises: The intermediate public key subunit is used to multiply the candidate number of each candidate data of the data holder by the public key of the holder to obtain a second intermediate point on the elliptic curve, and add the target point to the second intermediate point to obtain a third intermediate point on the elliptic curve; The candidate point subunit is used to multiply the data holder's private key by the third intermediate point on the elliptic curve to obtain a candidate point on the elliptic curve.

17. The device according to claim 15, wherein: The candidate key unit comprises: A candidate encoding subunit, used for encoding the candidate points and elliptic curve parameters to obtain a candidate encoding result; The candidate key subunit is used to use a key generation function to process the candidate encoding result to obtain a candidate encryption key for the candidate data.

18. A data query device, configured to be executed by a data query party, the device comprising: A target point generation module, used to generate a target point on the elliptic curve using the target number of the data to be queried, the query party public key of the data query party and the holder public key of the data holder; A target point sending module is used to send the target point to the data holder, so that the data holder encrypts each candidate data according to the data holder's private key, the query party's public key, the target point and the candidate number of the candidate data in the data holder to obtain the candidate data ciphertext; A decryption module, used to decrypt the candidate data ciphertext fed back by the data holder by using the target number of the data to be queried, the private key of the data querying party and the public key of the holder to obtain the data to be queried; The candidate data ciphertext is determined in the following manner: For each candidate data of the data holder, a candidate point on the elliptic curve is generated for the candidate data by using the holder private key of the data holder, the querying party public key, the target point and the candidate number of the candidate data; Generating a candidate encryption key for the candidate data using the candidate point; The candidate data is encrypted using the candidate encryption key to obtain a ciphertext of the candidate data.

19. The device according to claim 18, wherein: The target point generation module comprises: An intermediate public key unit, used to multiply the target number by the holder's public key to obtain a first intermediate point on the elliptic curve; A target point unit is used to obtain a target point on the elliptic curve by subtracting the first intermediate point from the querying party public key.

20. The device according to claim 18 or 19, wherein: The decryption module comprises: A target ciphertext unit, used to select a target data ciphertext from each candidate data ciphertext using the target number; A reference point unit, used to generate a reference point on the elliptic curve using a private key of a data querying party and a public key of the holder; a decryption key unit, configured to generate a reference decryption key using the reference point; The data decryption unit is used to use the reference decryption key to decrypt the target data ciphertext to obtain the data to be queried.

21. The device according to claim 20, wherein: The decryption key unit comprises: A reference encoding subunit, used for encoding the reference point and the elliptic curve parameter to obtain a reference encoding result; The decryption key subunit is used to process the reference encoding result using a key generation function to obtain a reference decryption key.

22. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 14.

23. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-14.

24. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 14.