An encryptable search method for data sharing
By employing elliptic curve cryptography and bit commitment techniques, an encrypted search protocol under a malicious model was designed, which solves the problems of high computational complexity and inability to resist malicious attacks in existing technologies, and achieves efficient, secure, and confidential search.
Patent Information
- Application Number
- CN202610554667.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-17
Smart Images

Figure CN122412477A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an encrypted search method. Background Technology
[0002] Faced with the increasingly severe risks of data breaches and unauthorized access, building a secure and confidential search mechanism has significant theoretical and practical value. Traditional retrieval requires downloading and decrypting all data, consuming enormous bandwidth and computing power. Against this backdrop, cryptography has become crucial for achieving secure and efficient data utilization. Secure multi-party computation (MPC), a core direction in information security, was pioneered by Professor Andrew Yao through the Millionaire's Problem, providing the first theoretical model for multi-party privacy collaboration. Its research scope has expanded to include encrypted search and string matching. Encrypted search technology allows direct searching on encrypted data; users input keywords to return encrypted indexes of matching files, preventing third parties from knowing the search content. This resolves the contradiction between encrypted storage and data availability, enabling data owners to securely retrieve encrypted information. Extensive research has been conducted to address existing problems, such as encrypted search technology based on blockchain, single / multi-keyword encrypted search, string matching, and text similarity analysis. MPC models are mainly divided into semi-honest and malicious models. Existing protocols mostly target the semi-honest model, but the malicious model is more practical due to its closer relevance to reality (participants may act maliciously).
[0003] Luo YL et al.'s paper, "Privacy-preserving protocols for string matching," proposes two PPSE protocols based on modular exponentiation and homomorphic encryption for string matching. Each character is encoded into its corresponding ASCII binary number, and the ElGamal encryption algorithm is used for encryption calculation. (in For strings The number of characters, For strings The number of characters, For strings and strings The number of binary bits corresponding to the ASCII code of each character. (For large prime numbers), the average computational complexity is relatively high.
[0004] Zhang Kaixin et al.'s paper, "Confidential Computation for String Matching," designs a confidentiality determination protocol for string pattern matching and a confidentiality matching protocol containing wildcards based on a novel encoding method (encoding the confidential string into a vector, where each element is represented by a two-digit decimal number corresponding to the character in the universal set) and the Paillier homomorphic encryption algorithm. However, this protocol is only applicable to semi-honest models. In Protocol 1, all participants need to perform encrypted calculations on the decimal number corresponding to each character in their string, resulting in a computational complexity of O(n log n). (in For strings The number of characters, For strings The number of characters (in this case, the number of characters) is converted into two decimal digits for encryption calculation, and every two characters are compared by addition. Therefore, the average computational complexity of Protocol 1 is relatively high.
[0005] Kang Jia et al.'s "Secure Multi-Party Computation of String Pattern Matching" Protocol 2 utilizes the Goldwasser-Micali homomorphic encryption algorithm to design a character-crossing pattern matching protocol, XORing each character with its corresponding binary ASCII value for computation. Its computational complexity is relatively high. Protocol 4 uses a symmetric cryptographic algorithm to compute the string pattern matching problem, without encryption / decryption operations, achieving a computational complexity of only [missing information]. ,in For strings The number of characters, For strings The number of characters, Indicates the number of XOR operations to be performed. For safety parameters. Summary of the Invention
[0006] This invention aims to address the problems of high computational complexity and inability to resist malicious attacks in existing secure search methods.
[0007] An encrypted search method for data sharing, where both parties in the search possess a set of keywords. Alice and having a set of keywords to query Bob; the method includes:
[0008] Preparation phase steps: Using the elliptic curve cryptography algorithm, select the generator as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send to Bob; Bob selects the private key. ,calculate Obtain the public key ,right Make a bit commitment, encrypt get Choose a random number and Generate commitment value ,Will Send to Alice;
[0009] Encrypted search steps: (1) Alice uses the public key Keyword set Encrypt to obtain , Alice will Send to Bob; (2) Bob uses the public key Treatment of query keyword set Encrypt to obtain , ,Will and Send to Alice; (3) Alice from Choose any One, requiring Bob to disclose his corresponding [item / person]. Through public key verify After verification, proceed to the next step; (4) Bob from Choose any One, demanding Alice to disclose its corresponding Bob's public key verification After successful verification, proceed to the next step; (5) Alice uses the public key Keyword set Encrypt to obtain , ,Will and Transform into a matrix and T represents transpose, calculate And send the result to Bob; (6) Bob uses the public key right Encrypt to obtain , ,Will and Transform into a matrix and ,calculate And will send to Alice; (7) Bob via private key Decryption is performed when hour, The number of 1s Right now Bob searched the results and obtained... ,like ,but ,like ,but , the results and Send to Alice; (8) Alice sends via private key Decryption is performed when hour, Alice searched the results and obtained... ;pass , , calculate ,when ,calculate and :like ,but Search successful; if ,but Search failed.
[0010] Furthermore, the calculation as follows:
[0011] .
[0012] Furthermore, the calculation as follows:
[0013] .
[0014] Furthermore, in step (8) when The agreement was terminated at that time.
[0015] Furthermore, in steps (3) and (4), the protocol is stopped if the verification fails.
[0016] Furthermore, in step (8), Alice successfully completes the search and sends the result to Bob.
[0017] An encrypted search method for data sharing, where both parties in the search possess a set of keywords. Alice and having a set of keywords to query Bob; the method includes:
[0018] Preparation phase steps: Using the elliptic curve cryptography algorithm, select the generator as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send to Bob;
[0019] Encrypted search steps: Step 1, Alice uses the public key Keyword set Encrypt to obtain , ,in Alice will Convert to matrix Step 2: Bob uses the public key and sends it to Bob. Treatment of query keyword set Encrypt to obtain , ,in ;Will Transform into a matrix to obtain T represents transpose; calculate And send the result to Alice; Step 3, Alice decrypts the result of the matrix multiplication, when hour, The number of 1s is Alice searches the matrix results and... Send to Bob; Step 4, Bob receives ,judge or ,like Search successful.
[0020] Furthermore, the calculation as follows:
[0021] .
[0022] Furthermore, if the search is successful, the results will be returned to Alice.
[0023] Beneficial effects:
[0024] This invention enables searches under confidential conditions. The method described herein has low complexity, is computationally convenient and fast, and thus improves the efficiency of confidential searches. Furthermore, the encrypted search scheme under the malicious model of this invention can effectively resist malicious attacks and has very high security. Attached Figure Description
[0025] Figure 1 This is a flowchart of Protocol 1;
[0026] Figure 2 This is a flowchart of Protocol 2. Detailed Implementation
[0027] The protocols for "Confidential Computation of String Matching" and "Secure Multi-Party Computation of String Pattern Matching" are both vulnerable to malicious attacks. To address these shortcomings (low computational efficiency and limitation to semi-honest models), this invention designs an encrypted search protocol for data sharing under malicious models. This protocol is highly efficient and resistant to malicious attacks. For ease of explanation, the fundamental knowledge involved in this invention will first be explained.
[0028] Elliptic curve cryptography:
[0029] Elliptic curve cryptography (ECC) is an asymmetric encryption method based on elliptic curve mathematics. It leverages the difficulty of solving the discrete logarithm problem to ensure security, achieving high strength with short keys. It is widely used in efficient and secure communication and data protection.
[0030] Preparation: Select an elliptic curve And randomly select a point on the elliptic curve, and use that point as the base point. Choose a large number. Used as the private key, and a public key is generated using the base point and a large number. And generate a random integer. .
[0031] Encryption: Encrypting plaintext Encoding to A little bit The process of encrypting plaintext is as follows:
[0032] (1)
[0033] Deciphering:
[0034] (2)
[0035] Point Decoding will yield the plaintext. .
[0036] Segmentation-selection method:
[0037] The cut-and-choose method is commonly used in MPC (Multi-Process Computation) scenarios involving malicious adversaries. It involves one party constructing and sending a large amount of data, while the other party randomly selects half of this data, requiring the first party to open and verify its correctness. The second party then uses the unverified half of the data for confidential computation. For example:
[0038] Input: The input information of participants A and B is as follows:
[0039] (1) Input vector of participant A , Each vector has Yes, that is Total vectors, with Check the input Is the value in .
[0040] (2) Participant B input , and a set of parameters .
[0041] Output: If the sender does not receive any output, the receiver will receive the following information:
[0042] (1) Receiver R in vector Obtain the first Yes, that is ;
[0043] (2) Receiver R from vector In each pair ,Right now .in , , Receiver R output .
[0044] Bit commitment:
[0045] Alice promised Bob a message. This must be met: Bob cannot obtain [something] during the commitment phase. Any information; during the revelation phase, Alice can prove to Bob that what she promised was indeed true. And she couldn't deceive Bob.
[0046] Commitment Phase: Alice generates random numbers , Calculate the commitment value ,Will , Send it to Bob.
[0047] Revealing Phase: Alice will , Send to Bob, Bob calculates. And verify whether it equals the received amount. .
[0048] Bob only has and Because it relies on the one-way nature of hash functions, it is impossible to deduce... .
[0049] Alice sent after making the promise. and To successfully deceive, she must find another group. , Make Relying on the collision resistance of hash functions, Alice actually cannot find such a... , . Specific implementation method one:
[0051] The encrypted search method for data sharing described in this embodiment is an encrypted search scheme under a semi-honest model.
[0052] In the field of secure multi-party computation, research on semi-honest model protocols provides a core framework for building protocols resistant to malicious attacks. Security protocols under malicious models are often implemented by embedding adversarial mechanisms (such as zero-knowledge proofs, commitment schemes, and verifiable secret sharing) into the semi-honest protocol architecture.
[0053] Description of the problem of encrypted search:
[0054] Alice has a keyword set , The keywords; Bob has the set of keywords to be queried. , Keywords.
[0055] and There are three types of relationships:
[0056] (1) When When, it means All elements are in middle;
[0057] (2) When hour( The number of elements in is less than ),express There are some elements in middle;
[0058] (3) When When, it means The elements in are not middle.
[0059] The agreement mainly addresses the first scenario, specifically how to determine... All elements are in middle.
[0060] Alice and Bob secretly conducted calculations. , , Then the value of 1 The total number of elements counted is the keyword set. and the set of keywords to be queried The similarity is represented by the function sim; [The last part, "judging," appears to be incomplete and requires further context. Is it equal to the set of keywords to be queried? The number of elements in, if , then it means All elements are in In the middle; if This means Not all elements are present. In the middle; if This means All elements are not present In the middle. Only when If the search is successful, the corresponding file will be returned; otherwise, the search will fail.
[0061] For example: Suppose Alice has a set of keywords. Bob has a set of keywords to be queried. Alice and Bob each performed encryption to obtain the matrix. sum matrix Alice and Bob calculated: The result contains 3 occurrences of the number 1, indicating the target keyword set. The number of elements in it is also 3, therefore Search successful.
[0062] like Figure 1 As shown, the encrypted search process for the semi-honest model corresponding to Protocol 1 is as follows:
[0063] Input: Alice has a set of keywords Bob has a set of keywords to be queried. .
[0064] Output: or .
[0065] Preparation phase: Using the elliptic curve cryptography algorithm, the generator is selected as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send it to Bob.
[0066] Encrypted search phase:
[0067] Step 1: Alice uses the public key Keyword set Encrypt to obtain The encryption process is as follows: ,in .
[0068] Alice will Convert to matrix And send it to Bob.
[0069] Step 2: Bob uses the public key Treatment of query keyword set Encrypt to obtain The encryption process is as follows: ,in .
[0070] Will Transform into a matrix to obtain .
[0071] The result of multiplying the two matrices is as follows:
[0072]
[0073] Send the results to Alice.
[0074] Step 3: Alice decrypts the result of the matrix multiplication. hour, The number of 1s is Alice searches the matrix results and... Send it to Bob.
[0075] Step 4, Bob received ,judge or The result will be returned to Alice.
[0076] The agreement has ended.
[0077] Correctness analysis:
[0078] In the semi-honest model, Alice and Bob follow the execution process of Protocol 1, and both parties can secretly calculate the correct result. The specific analysis is as follows:
[0079] (1) Due to the intractability of the Elliptic Curve Discrete Logarithm Problem (ECDLP), Bob is unable to obtain the public key sent by Alice. and encryption set Derive the private key or keyword set .
[0080] (2) Alice cannot obtain Bob will The encrypted matrix and The result of multiplying the transformed matrices was sent to Alice, but Alice could not determine its nature after decryption. The content is as follows.
[0081] (3) After Alice decrypts, for In this case, it will not be based on the number obtained and Bob's own data. Specific Implementation Method Two:
[0083] The encrypted search method for data sharing described in this embodiment is an encrypted search scheme under a malicious model.
[0084] Malicious Behavior Analysis:
[0085] This study investigates malicious attack patterns in the semi-honest model protocol, constructs defense mechanisms to address vulnerabilities, and achieves attack blocking / real-time monitoring. The malicious behavior of participants in Protocol 1 is analyzed as follows:
[0086] (1) In steps 1 and 2 of protocol 1, Alice and Bob may provide or use false ciphertext. Alice may send incorrect ciphertext to Bob in step 1, and Bob may calculate and send incorrect result to Alice in step 2 using incorrect ciphertext.
[0087] (2) Alice can decrypt the calculation result in step 3. Thus obtain Bob can only passively wait for Alice to send him the results, and Alice may tell Bob the wrong results.
[0088] (3) Only Bob knows In step 4, Alice will Send to Bob, Bob calculates. Is it equal to Alice can only wait for Bob to return the result, and Bob may tell Alice an incorrect result.
[0089] Solution approach:
[0090] (1) To address the malicious behavior of Alice and Bob potentially providing or using false ciphertext, a split-selection method is used to verify the correctness of Alice and Bob's ciphertext.
[0091] (2) For malicious behavior where only one party has the private key and Alice may send the wrong result to Bob, both parties need to have their own public and private keys. Both parties calculate separately, and the final result is obtained by decrypting with their respective private keys.
[0092] (3) For what only Bob knows Furthermore, Bob might inform Alice of incorrect results, which could be resolved using bit authentication. During the preparation phase, Bob... Make a commitment, in Alice's calculation Is it equal to At that time, a commitment disclosure will be made.
[0093] like Figure 2 As shown, the malicious model corresponding to Protocol 2 can be encrypted and searched as follows:
[0094] Input: Alice has a set of keywords Bob has a set of keywords to be queried. .
[0095] Output: or .
[0096] Preparation phase:
[0097] Using the elliptic curve cryptography algorithm, the generator is selected as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send to Bob; Bob selects the private key. ,calculate Obtain the public key ,right Make a bit commitment, encrypt get Choose a random number and Generate commitment value ,Will Send to Alice.
[0098] Encrypted search phase:
[0099] (1) Alice uses the public key Keyword set Encrypt to obtain The encryption process is as follows: ,in .
[0100] Alice will Send it to Bob.
[0101] (2) Bob uses the public key Treatment of query keyword set Encrypt to obtain The encryption process is as follows: ,in .
[0102] Will and Send to Alice.
[0103] (3) Alice from Choose any One, requiring Bob to disclose his corresponding [item / person]. Through public key verify If the verification passes, proceed to the next step; otherwise, terminate the protocol.
[0104] (4) Bob from Choose any One, demanding Alice to disclose its corresponding Bob's public key verification If the verification passes, proceed to the next step; otherwise, terminate the protocol.
[0105] (5) Alice uses the public key Keyword set Encryption is performed, and the encryption process is as follows: ,get ,Will and Transform into a matrix and .calculate The results are as follows:
[0106]
[0107] Send the results to Bob.
[0108] (6) Bob uses the public key right Encryption is performed; the encryption process is as follows: ,get ,Will and Transform into a matrix and .calculate The results are as follows:
[0109]
[0110] Send the results to Alice.
[0111] (7) Bob uses his private key Decryption is performed when hour, The number of 1s Right now Bob searched the results and obtained... ,like ,but ,like ,but , the results and Send to Alice.
[0112] (8) Alice uses her private key Decryption is performed when hour, Alice searched the results and obtained... .
[0113] pass , , calculate ,when ,calculate and :like ,but ;like ,but .when If so, the agreement will be terminated.
[0114] Send the results to Bob.
[0115] The agreement has ended.
[0116] Proof of integrity:
[0117] We use an ideal-practice paradigm to prove that Protocol 2 is secure.
[0118] Theorem 1: Protocol 2 (denoted as) It is safe.
[0119] Proof: To prove that during execution At times, the security of malicious actors exists, and strategies acceptable to both parties in actual implementation need to be considered. This is transformed into the corresponding strategy pair in the ideal protocol. Furthermore, it is necessary to ensure that the outputs of the parties in both agreements are computationally indistinguishable. Given that at most one party can be dishonest, it is necessary to analyze both honest and dishonest scenarios separately.
[0120] Scenario 1: honest, dishonest.
[0121] In this scenario, the protocol determines The agreement will be executed and results will be output in strict accordance with its terms, and will not cause any issues with the agreement. Termination. At this point, the key lies in dealing with the adversary in the actual model. adversary mapped to the ideal model However, due to Cannot be directly simulated Decision-making behavior under specific inputs requires actual invocation of this transformation process. .
[0122] when When being honest, execute the agreement. ,So:
[0123] (3)
[0124] in .
[0125] If we can construct the policy pairs in the ideal model To make its output the same as If environmental calculations are indistinguishable, then when When honest, execute the agreement. It is safe.
[0126] In the ideal model, imitate Actions, sending real information to TTP And allow subsequent message passing, ensuring Finally, the information was obtained. Dishonesty. The messages sent to TTP depend on its policy, which needs to be consistent with... Consistent, therefore a call is required. decision making. Will Send to Obtain their privacy data And then send this to TTP. Subsequently... and All obtained from TTP ( Only Results can only be obtained if the protocol is not interrupted.
[0127] Receive TTP sent Generate a , It needs to be consistent with the actual implementation of the agreement. Obtained The calculation is indistinguishable and passed to Final output The result.
[0128] (1) Random selection satisfy Then use Simulation Protocol: Disguised as and Interact with it, and use it to generate and publish. .
[0129] (2) Step 4 of the announcement of the agreement Require The information released.
[0130] (3) and Execute the remainder of the agreement, Get the corresponding .
[0131] (4) use Call Output You can then obtain:
[0132] (4)
[0133] for In elliptic curve cryptography, , Then we have:
[0134] (5)
[0135] Scenario 2: dishonest, honest.
[0136] The agreement stipulates The agreement will be executed (the agreement will not be terminated). And output it as specified. At this point, you only need to include the adversary in the actual model. Transformed into an adversary under an ideal model . The output depends on its strategy and the data obtained. .according to Whether or not the declassification results are released can be divided into two situations.
[0137] if When the results are not published:
[0138] (6)
[0139] in ; Represents a null value.
[0140] if The results were published and verified. Will receive ,at this time:
[0141] (7)
[0142] In the ideal model, Adhere to the protocol and output the results. enter Call Simulate its execution to obtain messages And forward it to TTP to obtain If in the actual agreement If the valid decryption results are published, then in the ideal model... Instruct TTP to Send; otherwise, Instruct TTP not to send results. receive .
[0143] based on As a result, the call Enter all messages to obtain the actual agreement execution. Calculation indistinguishable .
[0144] (1) Random selection Make Subsequently, use Simulation Protocol: Playing Roles and Interact with it, providing it with the necessary information and receiving its messages. Meanwhile, Generate itself (and) (The system is basically consistent) Elliptic curve cryptography public key, based on Calculate and publish the corresponding ciphertext .
[0145] (2) Step 3 of the announcement of the agreement Require The information released ( Dress up as )let verify.
[0146] (3) calculate Send it to .
[0147] (4) At this time Received Having the key information needed to execute the protocol, it can decide on the output based on this, without needing to consider further details. Subsequent malicious acts. But Can it be obtained? Then it is uncertain. The option is to terminate the agreement, that is, not to... Share the decryption results.
[0148] (5) use Call , What to output? That's what the output will be. If... In the ideal model Tell TTP not to give The sending result is defined as:
[0149] (8)
[0150] if In the ideal model, tell TTP to The sending result is defined as:
[0151] (9)
[0152] In both practical protocols and ideal models, in these two cases and The outputs are the same. It only requires proof that... and They are computationally indistinguishable because they are both ciphertexts encrypted using an elliptic curve cryptography system.
[0153] This invention can be applied to all scenarios for electricity meter testing. In one embodiment, it adopts an integrated structure of multi-station three-mode testing + dual-meter comparison + electricity theft detection, solving the pain points of traditional electricity meter testing methods such as single method, large error, and limited functionality. By combining three modes of judgment—current detection, dual-meter metering comparison, and standard load verification—it has both fault diagnosis and electricity theft monitoring functions, achieving high-precision, multi-scenario, and uninterrupted power supply testing. It has significant technological advantages in the field of electricity meter verification and can completely replace conventional single-function testing devices.
[0154] This device is suitable for electricity meter testing needs in all scenarios, including power supply business halls, metering verification rooms, and on-site electricity inspections. It boasts advantages such as convenient installation, comprehensive testing, intuitive results, and efficient operation and maintenance, significantly improving metering verification efficiency and anti-electricity theft detection capabilities. The product has a mature structure, is easy to deploy in batches, has outstanding engineering application value, stable market demand, and broad prospects for promotion.
[0155] The claims of this invention are clearly laid out, logically structured, and provide stable protection, forming a complete technical protection chain from the overall device, detection components, dual-meter comparison, load verification to electricity theft identification. The independent claims define the core multi-station detection scheme, while the dependent claims refine key structural features. The invention demonstrates strong stability and high protection strength, with ample support from the technical solutions and embodiments, clear boundaries for infringement determination, and a solid legal foundation.
[0156] The technical solution of this invention is practical and innovative, with clear market application scenarios and stable and reliable legal rights. Its core innovation is highly aligned with the needs of accurate verification of electricity meters and anti-electricity theft, and has strong engineering transformation and practical value, as well as good maintenance value.
[0157] To illustrate the effects of the present invention, this embodiment introduces Luo YL et al.'s "Privacy-preserving protocols for string matching" (referred to as reference
[17] ), Zhang Kaixin et al.'s "Secure multi-party computation of string matching" (referred to as reference
[18] ), and Kang Jia et al.'s "Secure multi-party computation of string pattern matching" (referred to as reference
[19] ) for comparison and explanation.
[0158] Table 1. Comparison of computational complexity, communication complexity, and resistance to malicious attacks.
[0159] As shown in Table 1, for reference
[17] , the computational complexity and communication complexity of the protocol 1 of this invention are reduced; compared with reference
[18] , the computational complexity of the protocol 2 of this invention is slightly worse, but the number of communication rounds is significantly reduced; for the two protocols of reference
[19] , protocol 2 has high computational complexity, while protocol 4 uses symmetric cryptography algorithms to greatly reduce computational complexity, but it cannot resist attacks from malicious adversaries. Specific implementation method three:
[0161] This embodiment is a computer storage medium storing a computer program, which is loaded and executed by a processor to implement an encrypted search method for data sharing.
[0162] It should be understood that the storage media described in this embodiment include, but are not limited to, magnetic storage media and optical storage media; the magnetic storage media include, but are not limited to, RAM, ROM, and other storage media such as hard disks and USB flash drives. Specific implementation method four:
[0164] This embodiment is a data-sharing encrypted search device. The device includes a processor and a memory. The memory stores a computer program, which is loaded and executed by the processor to implement a data-sharing encrypted search method.
[0165] It should be understood that the device described in this embodiment includes, but is not limited to, devices including processors and memory, and may also include other devices corresponding to units or modules with information acquisition, information interaction, and control functions, such as signal acquisition devices. The device includes, but is not limited to, PCs, workstations, and mobile devices.
Claims
1. A data-sharing encrypted search method, characterized in that: Both parties participating in the search have keyword sets. Alice and having a set of keywords to query Bob; the method includes: Preparation phase steps: Using the elliptic curve cryptography algorithm, select the generator as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send to Bob; Bob selects the private key. ,calculate Obtain the public key ,right Make a bit commitment, encrypt get Choose a random number and Generate commitment value ,Will Send to Alice; Encrypted search steps: (1) Alice uses the public key Keyword set Encrypt to obtain , Alice will Send to Bob; (2) Bob uses the public key Treatment of query keyword set Encrypt to obtain , ,Will and Send to Alice; (3) Alice from Choose any One, requiring Bob to disclose his corresponding [item / person]. Through public key verify After verification, proceed to the next step; (4) Bob from Choose any One, demanding Alice to disclose its corresponding Bob's public key verification After successful verification, proceed to the next step; (5) Alice uses the public key Keyword set Encrypt to obtain , ,Will and Transform into a matrix and T represents transpose, calculate And send the result to Bob; (6) Bob uses the public key right Encrypt to obtain , ,Will and Transform into a matrix and ,calculate And will send to Alice; (7) Bob via private key Decryption is performed when hour, The number of 1s Right now Bob searched the results and obtained... ,like ,but ,like ,but , and Send to Alice; (8) Alice sends via private key Decryption is performed when hour, Alice searched the results and obtained... ;pass , , calculate ,when ,calculate and :like ,but Search successful; if ,but Search failed.
2. The encrypted search method for data sharing according to claim 1, characterized in that: Calculated as follows: 。 3. The encrypted search method for data sharing according to claim 1, characterized in that: Calculated as follows: 。 4. A data sharing encrypted search method according to any one of claims 1 to 3, characterized in that: In step (8) when The agreement was terminated at that time.
5. The encrypted search method for data sharing according to claim 4, characterized in that: In steps (3) and (4), the protocol is stopped if the verification fails.
6. The encrypted search method for data sharing according to claim 5, characterized in that: In step (8), Alice successfully completed the search and sent the results to Bob.
7. An encrypted search method for data sharing, wherein the two parties participating in the search are those who possess a keyword set. Alice and having a set of keywords to query Bob; the method includes: Preparation phase steps: Using the elliptic curve cryptography algorithm, select the generator as... Alice chooses the private key. ,calculate Obtain the public key Choose a hash function ,Will as well as Send to Bob; Encrypted search steps: Step 1, Alice uses the public key Keyword set Encrypt to obtain , ,in Alice will Convert to matrix And send it to Bob; Step 2, Bob uses the public key Treatment of query keyword set Encrypt to obtain , ,in ;Will Transform into a matrix to obtain T represents transpose; calculate And send the result to Alice; Step 3, Alice decrypts the result of the matrix multiplication, when hour, The number of 1s is Alice searches the matrix results and... Send to Bob; Step 4, Bob receives ,judge or ,like Search successful.
8. The encrypted search method for data sharing according to claim 7, characterized in that: Calculated as follows: 。 9. A data sharing encrypted search method according to claim 7 or 8, characterized in that: If the search is successful, the results will be returned to Alice.