Search method and device based on elliptic curve cryptography, equipment and storage medium
By using elliptic curve cryptography's private key segmentation and encryption methods, the problem of inefficiency in searchable encryption schemes is solved, achieving efficient search and flexible user access control, and reducing user revocation costs.
Patent Information
- Application Number
- CN202210737369.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-06-27
AI Technical Summary
In existing searchable encryption schemes, bilinear pairing is computationally inefficient, affecting search efficiency, and the adjustment cost required when a user cancels an action is high.
Elliptic curve cryptography is used, and the private key is divided into two parts: an auxiliary key and a user key, which are respectively controlled by the cloud server and the user. A security index table and a trapdoor search are generated through the elliptic curve encryption algorithm to achieve pre-decryption and final decryption.
It improves search efficiency, reduces the cost of user undoing, does not affect other users, does not require bilinear pairing operations, and supports relevance sorting.
Smart Images

Figure CN115134084B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of information security, in particular, to an elliptic curve cryptography-based search method and device, equipment and storage medium. BACKGROUND
[0002] With the advent of the cloud computing and big data era, data sharing has become the direction of future development. Multi-user searchable encryption well solves the contradiction between confidentiality and ease of use in data sharing. In the existing searchable encryption scheme in the data sharing scenario, broadcast encryption or attribute-based encryption is often used to control the search permission or decryption permission of users. Both of these two methods use the low-efficiency cryptographic element of bilinear pair, which affects the efficiency of the searchable encryption scheme. At the same time, when a user is revoked, the broadcast encryption or attribute-based encryption scheme needs to be adjusted accordingly, which is costly and cannot meet the application requirements in terms of cost and efficiency. Therefore, how to improve the search efficiency of the searchable encryption scheme is a problem to be solved by those skilled in the art. SUMMARY
[0003] The purpose of the present disclosure is to provide an elliptic curve cryptography-based search method, device, equipment and storage medium to improve the search efficiency of the searchable encryption scheme.
[0004] To achieve the above-mentioned purpose, the present disclosure provides an elliptic curve cryptography-based search method, which comprises:
[0005] The cloud server receives an encrypted document and a security index table sent by a first user; each item of data of the security index table comprises an encrypted keyword and associated encrypted document information; the encrypted document information is generated by an elliptic curve encryption algorithm and a public key encryption; the private key of the elliptic curve encryption algorithm comprises two parts of an auxiliary key and a user key;
[0006] Receiving a search trapdoor generated by a second user according to a search keyword;
[0007] Comparing the search trapdoor with the encrypted keywords in the security index table to find matching encrypted target document information; finding the auxiliary key corresponding to the second user from an authorized user list, and pre-decrypting the encrypted target document information using the auxiliary key, and sending the pre-decryption result to the second user;
[0008] Receiving a target document identifier sent by the second user; the target document identifier is obtained by the second user decrypting the pre-decryption result using the user key;
[0009] Send a target encrypted document corresponding to the target document identifier to the second user, so that the second user decrypts the target encrypted document to obtain a plaintext document.
[0010] To achieve the above object, the present disclosure further provides a search device based on elliptic curve cryptography, comprising:
[0011] The first receiving module is configured to receive an encrypted document and a security index table sent by a first user; each piece of data of the security index table comprises an encrypted keyword and associated encrypted document information; the encrypted document information is generated by an elliptic curve encryption algorithm and a public key encryption; a private key of the elliptic curve encryption algorithm comprises two parts of an auxiliary key and a user key;
[0012] The second receiving module is configured to receive a search trapdoor generated by a second user according to a search keyword;
[0013] The comparison module is configured to compare the search trapdoor with the encrypted keywords in the security index table to find matching encrypted target document information;
[0014] The pre-decryption module is configured to find an auxiliary key corresponding to the second user from an authorized user list and pre-decrypt the encrypted target document information by using the auxiliary key;
[0015] The first sending module is configured to send the pre-decryption result to the second user;
[0016] The third receiving module is configured to receive a target document identifier sent by the second user; the target document identifier is obtained by the second user after decrypting the pre-decryption result by using the user key;
[0017] The second sending module is configured to send a target encrypted document corresponding to the target document identifier to the second user, so that the second user decrypts the target encrypted document to obtain a plaintext document.
[0018] To achieve the above object, the present disclosure further provides an electronic device, comprising:
[0019] The memory is configured to store a computer program;
[0020] The processor is configured to implement the steps of the above search method based on elliptic curve cryptography when executing the computer program.
[0021] To achieve the above object, the present disclosure further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above search method based on elliptic curve cryptography.
[0022] It can be known through the above scheme that the disclosure provides a search method, device and equipment based on elliptic curve cryptography and a storage medium; in the scheme, the cloud server searches for the matching encrypted target document information after receiving the search trapdoor sent by the second user, and pre-decrypts the encrypted target document information by using the auxiliary key corresponding to the second user in the authorized user list, and the second user decrypts the pre-decryption result by using the user key to obtain the target document identifier; after the cloud server returns the corresponding target encrypted document to the second user, the second user decrypts the target encrypted document to obtain the plaintext document; it can be seen that the scheme does not involve bilinear pair operation when implementing searchable encryption scheme, and the search efficiency is improved; in the scheme, the private key is divided into two parts of keys, which are used by the cloud server and the second user respectively, the decryption permission of each user can be flexibly controlled, and when the user is revoked, only the corresponding information needs to be deleted from the authorized user list, the revocation cost is small, and other users are not affected, nor is the existing ciphertext data affected. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings are included to provide a further understanding of the disclosure and constitute a part of the specification, and are used to explain the disclosure together with the specific embodiments below, but do not constitute a limitation on the disclosure. In the drawings:
[0024] Figure 1 A system structure schematic diagram provided by an embodiment of the disclosure;
[0025] Figure 2 A search method flowchart based on elliptic curve cryptography provided by an embodiment of the disclosure;
[0026] Figure 3 An overall flowchart provided by an embodiment of the disclosure;
[0027] Figure 4 A search device structure schematic diagram based on elliptic curve cryptography provided by an embodiment of the disclosure;
[0028] Figure 5 A terminal device structure block diagram provided by an embodiment of the disclosure;
[0029] Figure 6 A server device structure block diagram provided by an embodiment of the disclosure. DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the disclosure. Obviously, the described embodiments are only part of the embodiments of the disclosure, not all the embodiments. Based on the embodiments in the disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the disclosure.
[0031] For the convenience of understanding, the system architecture used in the present solution is described first, see Figure 1 A system structure schematic diagram provided for the disclosed embodiment, the system mainly includes three entities: a first user, a cloud server and a second user; the first user is a data owner DO uploading a document, the data owner is responsible for generating system parameters, system keys, user keys and auxiliary keys, then encrypting the document, generating a secure index, and uploading the two to the cloud server CS, uploading the auxiliary key to the cloud server, and uploading the user key to the second user; the cloud server is responsible for storing the encrypted document, the secure index and the auxiliary key uploaded by the data owner, and providing search service and pre-decryption service for legitimate users; the second user is a legitimate user DU searching for a document, which is responsible for generating a search trapdoor of a keyword and uploading it to the cloud server, and decrypting the returned search result. The system is suitable for the scenario of data owner sharing data to multiple legitimate users in a cloud storage environment. The data owner uploads the encrypted data to the cloud server for storage, and the legitimate user downloads the search result decrypted from the ciphertext to the local after searching on the ciphertext. The cloud server cannot obtain any information of the plaintext data.
[0032] See Figure 2 The search method provided by the disclosed embodiment based on elliptic curve cryptography includes:
[0033] S101, the cloud server receives the encrypted document and the secure index table sent by the first user; each data of the secure index table includes: an encrypted keyword and associated encrypted document information; the encrypted document information is generated by elliptic curve encryption algorithm and public key encryption; the private key of the elliptic curve encryption algorithm includes two parts of auxiliary key and user key;
[0034] In the present embodiment, the cloud server needs to receive the encrypted document and the secure index table sent by the first user, and the second user needs to upload a search trapdoor to the cloud server when searching, so that the cloud server searches in the secure index table through the search trapdoor, and finally returns the corresponding encrypted document to the second user. The first user is a data owner uploading a document, and the second user is a legitimate user searching for a document.
[0035] It should be noted that before the cloud server in this solution receives the encrypted document and security index table sent by the first user, the first user needs to generate system parameters, a system key, a user key, and an auxiliary key. The system key includes: a pseudo-random permutation function key, a public key and a private key for the elliptic curve cryptography algorithm, and the private key for the elliptic curve cryptography algorithm includes both an auxiliary key and a user key. The first user also needs to send the pseudo-random permutation function key and the user key to the second user through a secure channel, and send the second user's identification information and auxiliary key to the cloud server through a secure channel, so that the cloud server can store the second user's identification information and auxiliary key in the authorized user list.
[0036] This solution first requires that the input system's documents have a predefined keyword set, i.e., a document set. It contains N documents, each of which is: F i =(P i KW i ), where P i It is a plaintext document, KW i It is the set of document keywords. Assume the set of keywords for all documents contains M distinct keywords, denoted as .
[0037] Before uploading the system to the cloud server, the data owner first needs to establish the system and generate system parameters, a system key, a user key, and an auxiliary key. The system parameters include a pseudo-random permutation function f and elliptic curve system parameters, specifically the finite field F. q Size q, define elliptic curve E(F) q The equation has two variables a, b ∈ F. q ;E(F q The base point G = (x) on the ) G y G (G≠0), where x G and y G It is F q The system consists of two elements; the order n of G and other optional parameters (such as the cofactor h of n). The data owner discloses the system parameters (q, a, b, G, n, h, f). The data owner generates the system key K = (s, d) based on the security parameters. o P o ), where s is the key for the pseudo-random permutation function, used to encrypt the key and generate the key for the search trapdoor, and is used in conjunction with the pseudo-random permutation function f; (d o P o P is a public-private key pair for the elliptic curve cryptography algorithm. o The private key is d o P o =[d oG E (F q ), P o and d o are kept secret by the data owner.
[0038] The data owner needs to determine the authorized legitimate user first when generating the user key and the auxiliary key, if the legitimate user is the user i with the identification information UID i , the data owner can randomly select the corresponding auxiliary key d i1 and the user key d i2 , and d i1 , d i2 E [1, n-1], so that d i1 +d i2 =d o (mod n); and the data owner also needs to send (s, d i2 ) to the user i through a secure channel, so that the user i encrypts the search keyword through s, and decrypts the pre-decrypted document information through d i2 ; the data owner also needs to send (UID i , d i1 ) to the cloud server through a secure channel, so that the cloud server stores it in the authorized user list, and the user i pre-decrypts when searching data through the auxiliary key of the user i.
[0039] It can be understood that when the target user is revoked, the cloud server only needs to delete the identification information and the auxiliary key corresponding to the target user from the authorized user list, for example, when the user j is revoked, (UID j , d j1 ) needs to be deleted from the authorized user list, so that the cloud server cannot find the corresponding (UID j , d j1 ) in the authorized user list when the user j searches the document, that is, the user j is identified as an illegal user, at this time, it is not necessary to perform subsequent pre-decryption and other operations, and prompt information is sent to the user j, prompting the user j that there is no right to obtain the corresponding document. It can be seen that the process is simple when the user revocation operation is performed in this way, no adjustment of the password scheme is involved, the search efficiency is improved, and the revocation cost is reduced.
[0040] Further, the first user generates encrypted documents and a secure index table in the following manner, and sends the obtained encrypted documents and the secure index table to the cloud server for storage.
[0041] 1. The first user assigns a corresponding document identifier and a symmetric encryption key to each document in the document set, and encrypts the corresponding document through the symmetric encryption key to generate an encrypted document;
[0042] This solution applies to document sets. Each document F in i Each data owner needs to assign a Document Identifier (FID) to their data. i And generate a symmetric encryption key k i It then runs the symmetric encryption algorithm SKE (SecretKey Encryption) on document F. i Encryption is performed to obtain an encrypted document.
[0043] 2. The first user searches for document information of several related documents containing each keyword; the document information includes: document identifier of the related document, symmetric encryption key of the related document, and relevance score of each keyword to the related document; each keyword is encrypted using a pseudo-random permutation function and the corresponding key to generate encrypted keywords for each data item in the secure index table; the document information of several related documents corresponding to each keyword is encrypted using an elliptic curve cryptography algorithm and a public key to generate encrypted document information for each data item in the secure index table.
[0044] This scheme first requires building an inverted index table of "keyword-document" for the document set when generating the secure index table, and then encrypting the inverted index table to obtain the secure index table. When building the inverted index structure, it is necessary to consider each keyword w... j Find the contents of w j t documents In this embodiment, the keyword w will be included. j The t documents are called with the keyword w j The corresponding associated documents are then used to determine the document information ID of each associated document. j , with the keyword w j Combined with the document information of the corresponding associated documents, an inverted index table with M rows is constructed, where the data in the j-th row is:
[0045] Each associated document's document information includes: the associated document's document identifier, the associated document's symmetric encryption key, and the relevance score between the keyword and the associated document. For example: keyword w j The first associated document is Then associated documents Document information for: Following this logic, we can obtain the results for each keyword w. j Document information for the corresponding associated documents.
[0046] In the embodiment, the TFxIDF algorithm (Term Frequency Inverse document frequency, a commonly used weighting technique for information retrieval and data mining) can be used to calculate the relevance score Score of the keyword and each associated document. Considering that the IDF of different documents is constant for a single keyword, the Score in the scheme only takes TF, such as: wherein is the frequency of w j in the document.
[0047] After obtaining the inverted index table in the scheme, it needs to be encrypted to obtain a secure index table of M rows, wherein the jth row of data is: In the scheme, each keyword is encrypted by using a pseudo-random permutation function f and its key, to obtain f s (w j ), and then each document information is encrypted by using an elliptic curve encryption algorithm and a public key P o , such as the document information ciphertext:
[0048]
[0049] S102, receiving a search trap door generated by a second user according to a search keyword;
[0050] In the embodiment, the search trap door is generated by encrypting the search keyword by using a pseudo-random permutation function and a corresponding key by the second user. For example, when the user i needs to query the keyword w, the search trap door calculated is T w = f s (w), which is sent to the cloud server for searching.
[0051] S103, comparing the search trap door with the encrypted keywords in the secure index table to find the matching encrypted target document information; finding the auxiliary key corresponding to the second user from the authorized user list, and pre-decrypt the encrypted target document information by using the auxiliary key, and sending the pre-decryption result to the second user;
[0052] In the embodiment, when the cloud server searches according to the search trap door, it needs to traverse the secure index table, compare the search trap door of the user with the encrypted keywords, and if the same encrypted keyword as the search trap door is not found in the secure index table after traversal, it means that the matching document is not found, the search fails, and the output stops, and sends a prompt information that the matching document is not found to the second user; if the same encrypted keyword as the search trap door is found in the secure index table, it means that the matching is successful. For example, if the search trap door is the same as the encrypted keyword f s (w j )If the comparison is successful, find the auxiliary key d s (w j )corresponding to each encrypted target document information, and find the auxiliary key d i1 corresponding to the second user from the authorized user list, and use it to pre-decrypt each encrypted target document information ciphertext to obtain a pre-decrypted result. It should be noted that the pre-decryption process is related to the specific algorithm. If the SM2 encryption algorithm is used, the ciphertext is in the form of C=C1||C2||C3, the cloud server calculates P1=[d i1 ]C1, and returns P1 and the corresponding t pre-decrypted target document information to the user i.
[0053] S104, receiving the target document identifier sent by the second user; the target document identifier is obtained by the second user decrypting the pre-decrypted result using the user key;
[0054] In this embodiment, after the second user receives the pre-decrypted result sent by the cloud server, the second user needs to decrypt the pre-decrypted result using the user key to obtain the decrypted document identifier, the symmetric encryption key corresponding to each decrypted document identifier, and the relevance score corresponding to each decrypted document identifier; the relevance scores corresponding to each decrypted document identifier are arranged in descending order, and the first predetermined number of decrypted document identifiers in the sorting result are used as the target document identifier.
[0055] Among them, after the user i receives the pre-decrypted result, the user i continues to decrypt the pre-decrypted result using the user key d i2 , and the decrypted document information obtained includes: the decrypted document identifier, the symmetric encryption key corresponding to each decrypted document identifier, and the relevance score corresponding to each decrypted document identifier. If the SM2 encryption algorithm is used, the user i calculates P2=P1+[d i2 ]C1=(x2, y2), and then continues to complete the subsequent decryption steps to obtain the plaintext document information. Moreover, when determining the target document identifier, the user i can sort the relevance scores corresponding to each decrypted document identifier in descending order from large to small, and return the first k document identifiers as the target document identifier to the cloud server.
[0056] S105, sending the target encrypted document corresponding to the target document identifier to the second user, so that the second user decrypts the target encrypted document to obtain the plaintext document.
[0057] In the embodiment, after the cloud server receives the target document identifier sent by the second user, the corresponding target encrypted document needs to be sent to the second user according to the correspondence between each document identifier and the encrypted document. After the second user receives the target encrypted document sent by the cloud server, the target encrypted document is decrypted to generate a plaintext document by using the symmetric encryption key corresponding to the target encrypted document. When decrypting, the symmetric encryption algorithm SKE needs to be run to decrypt to obtain the plaintext document set.
[0058] Referring to Figure 3 The overall flowchart provided by the embodiment of the disclosure is provided. The data owner DO (the first user) performs system establishment and key generation steps, authorizes users, and then sends an auxiliary key to the cloud server CS through a secure channel and sends a user key to the legitimate user DU (the second user) through a secure channel. The data owner assigns identifiers to all documents, encrypts the document set by using a symmetric algorithm, calculates the relevance score of the keyword and the document to construct document information, establishes an inverted index, encrypts the keyword and the document information to generate a secure index table, and sends the encrypted document and the secure index table to the cloud server. When searching, the legitimate user calculates a search trapdoor and sends it to the cloud server. The cloud server searches the secure index list, finds the corresponding t encrypted document information ciphertext, and sends the pre-decryption result to the legitimate user after pre-decryption. The legitimate user continues to decrypt the pre-decryption result to obtain the plaintext of the document information, sorts and obtains the top k document identifiers, and sends them to the cloud server. The cloud server returns the corresponding k document ciphertexts to the legitimate user according to the top k document identifiers. The legitimate user decrypts the document plaintext set by using the symmetric algorithm.
[0059] The scheme adopts an elliptic curve encryption algorithm on the basis of symmetric searchable encryption (SSE), and encrypts the symmetric encryption key of the encrypted document by using the elliptic curve encryption algorithm. This way of using the elliptic curve encryption algorithm to replace attribute-based encryption to protect the encryption key of the document does not involve a bilinear pair operation, and improves the overall efficiency of the system. The decryption private key of the elliptic curve encryption algorithm is divided into two parts in the scheme, which are respectively mastered by the user and the cloud server. Therefore, each user has a different user key, so that the decryption permissions of multiple users can be flexibly controlled, and each user has an independent key, and the users do not affect each other. The user revocation cost of the scheme is small. Only the identification information and the auxiliary key of the corresponding user need to be deleted from the authorized user list, which does not affect other users and does not affect the existing ciphertext data. The scheme also has the function of relevance sorting of search results, so that the user can autonomously select a plurality of result outputs according to the relevance, and improve the user experience.
[0060] Referring to Figure 4The search device based on an elliptic curve cipher provided in the embodiment of the present disclosure has the structure as shown in the figure. The device is applied to a cloud server and comprises:
[0061] The first receiving module 11 is configured to receive an encrypted document and a security index table sent by a first user. Each piece of data in the security index table comprises an encrypted keyword and associated encrypted document information. The encrypted document information is generated by an elliptic curve encryption algorithm and a public key encryption. The private key of the elliptic curve encryption algorithm comprises two parts of an auxiliary key and a user key.
[0062] The second receiving module 12 is configured to receive a search trapdoor generated by a second user according to a search keyword.
[0063] The comparison module 13 is configured to compare the search trapdoor with the encrypted keywords in the security index table to find matched encrypted target document information.
[0064] The pre-decryption module 14 is configured to find the auxiliary key corresponding to the second user from an authorized user list and pre-decrypt the encrypted target document information by using the auxiliary key.
[0065] The first sending module 15 is configured to send the pre-decryption result to the second user.
[0066] The third receiving module 16 is configured to receive a target document identifier sent by the second user. The target document identifier is obtained by the second user after decrypting the pre-decryption result by using the user key.
[0067] The second sending module 17 is configured to send a target encrypted document corresponding to the target document identifier to the second user, so that the second user decrypts the target encrypted document to obtain a plaintext document.
[0068] In the embodiment of the present disclosure, the search device further comprises:
[0069] The deletion module is configured to delete the identification information and the auxiliary key corresponding to the target user from the authorized user list when the target user is revoked.
[0070] The embodiment of the present disclosure further provides a search system based on an elliptic curve cipher, which comprises:
[0071] The first user is configured to send an encrypted document and a security index table to a cloud server. Each piece of data in the security index table comprises an encrypted keyword and associated encrypted document information. The encrypted document information is generated by an elliptic curve encryption algorithm and a public key encryption. The private key of the elliptic curve encryption algorithm comprises two parts of an auxiliary key and a user key.
[0072] The cloud server is configured to receive the encrypted document and the security index table sent by the first user, receive a search trapdoor generated by a second user according to a search keyword, compare the search trapdoor with the encrypted keyword in the security index table, find the matched encrypted target document information, find the auxiliary key corresponding to the second user from the authorized user list, pre-decrypt the encrypted target document information by using the auxiliary key, and send the pre-decryption result to the second user; and receive the target document identifier sent by the second user, and send the target encrypted document corresponding to the target document identifier to the second user.
[0073] The second user is configured to generate a search trapdoor according to a search keyword and send the search trapdoor to the cloud server, receive the pre-decryption result sent by the cloud server, decrypt the pre-decryption result by using the user key to obtain a target document identifier, and send the target document identifier to the cloud server; receive the target encrypted document sent by the cloud server, and decrypt the target encrypted document to obtain a plaintext document.
[0074] In the embodiments of the present disclosure, the first user is specifically configured to generate a system parameter, a system key, a user key, and an auxiliary key; the system key includes a key of a pseudo-random permutation function, a public key and a private key of an elliptic curve encryption algorithm, and the private key of the elliptic curve encryption algorithm includes two parts of the auxiliary key and the user key; the key of the pseudo-random permutation function and the user key are sent to the second user through a secure channel, and the identification information of the second user and the auxiliary key are sent to the cloud server through a secure channel, so that the cloud server stores the identification information of the second user and the auxiliary key in the authorized user list.
[0075] In the embodiments of the present disclosure, the cloud server is further configured to delete the identification information and the auxiliary key corresponding to the target user from the authorized user list when the target user is revoked.
[0076] In the embodiments of the present disclosure, the first user is specifically configured to assign a corresponding document identifier and a symmetric encryption key to each document in a document set, encrypt the corresponding document by using the symmetric encryption key to generate an encrypted document, find document information of a plurality of associated documents containing each keyword, the document information includes a document identifier of the associated document, a symmetric encryption key of the associated document, and a relevance score of each keyword and the associated document, encrypt each keyword by using a pseudo-random permutation function and a corresponding key to generate an encrypted keyword of each data in the security index table, and encrypt the document information of a plurality of associated documents corresponding to each keyword by using an elliptic curve encryption algorithm and a public key to generate encrypted document information of each data in the security index table.
[0077] In the embodiments of the present disclosure, the search trapdoor is generated by encrypting the search keyword using a pseudo-random permutation function and a corresponding key by the second user.
[0078] In the embodiments of the present disclosure, the second user is further configured to receive the pre-decryption result, and decrypt the pre-decryption result using the user key to obtain the decrypted document identifiers, the symmetric encryption key corresponding to each decrypted document identifier, and the relevance score corresponding to each decrypted document identifier; and arrange the relevance scores corresponding to the decrypted document identifiers in descending order, and take the top predetermined number of decrypted document identifiers in the sorting result as the target document identifiers.
[0079] In the embodiments of the present disclosure, the second user is further configured to receive the target encrypted document sent by the cloud server, and decrypt the target encrypted document using the symmetric encryption key corresponding to the target encrypted document to generate a plaintext document.
[0080] The embodiments of the present disclosure further disclose an electronic device, which comprises a memory configured to store a computer program, and a processor configured to execute the computer program to implement the search method based on elliptic curve cryptography in the above method embodiments.
[0081] Specifically, the electronic device can be a terminal device, such as a mobile phone, a computer, or the like, when performing the operation performed by the first user or the second user. Referring to Figure 5 , the embodiments of the present disclosure provide a structure block diagram of a terminal device 20. As shown in Figure 5 , the terminal device 20 can include a processor 21 and a memory 22. The terminal device 20 can further include one or more of a multimedia component 23, an input / output (I / O) interface 24, and a communication component 25.
[0082] The processor 21 is configured to control overall operations of the terminal device 20 to complete all or part of the steps of the first user or the second user performing operations described above. The memory 22 is configured to store various types of data to support operations of the terminal device 20, which can include, for example, instructions for any application or method operating on the terminal device 20, and application-related data, such as contact data, sent and received messages, pictures, audio, video, and the like. The memory 22 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 23 can include a screen and an audio component. The screen can be, for example, a touch screen, and the audio component is configured to output and / or input audio signals. For example, the audio component can include a microphone configured to receive external audio signals. The received audio signals can be further stored in the memory 22 or transmitted through the communication component 25. The audio component also includes at least one speaker configured to output audio signals. The I / O interface 24 provides an interface between the processor 21 and other interface modules, which can be a keyboard, a mouse, a button, and the like. The buttons can be virtual buttons or physical buttons. The communication component 25 is configured to perform wired or wireless communication between the terminal device 20 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 25 can include a Wi-Fi module, a Bluetooth module, an NFC module.
[0083] In an exemplary embodiment, the terminal device 20 can be implemented by one or more Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic elements for performing the search method executed by the first user or the second user.
[0084] In particular, the electronic device can be a server when performing the operation performed by the cloud server. Referring to Figure 6 , a structural block diagram of a server device 30 is provided. As shown in Figure 6 , the server device 30 includes a processor 31, which can be one or more in number, and a memory 32 for storing computer programs executable by the processor 31. The computer programs stored in the memory 32 can include one or more than one module each corresponding to a set of instructions. In addition, the processor 31 can be configured to execute the computer programs to perform the search method performed by the cloud server as described above.
[0085] In addition, the server device 30 can further include a power supply component 33, which can be configured to perform power management of the server device 30, and a communication component 34, which can be configured to implement communication of the server device 30, such as wired or wireless communication. In addition, the server device 30 can further include an input / output (I / O) interface 35. The server device 30 can operate based on an operating system stored in the memory 32, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, etc.
[0086] In another exemplary embodiment, a computer readable storage medium including program instructions is also provided, which when executed by a processor, implements the steps of the search method based on elliptic curve cryptography as described above. The storage medium can include a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, and various other media that can store program codes.
[0087] As to the apparatus, system, device and storage in the above-mentioned embodiments, the specific manner of performing operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
[0088] The preferred embodiments of the present disclosure are described in detail above with reference to the drawings, but the present disclosure is not limited to the specific details in the above-mentioned embodiments. Within the technical concept range of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all belong to the protection range of the present disclosure.
[0089] In addition, it should be noted that each specific technical feature described in the above-mentioned specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, various possible combinations will not be described again in the present disclosure.
[0090] In addition, various different embodiments of the present disclosure can also be combined in any manner, as long as they do not deviate from the idea of the present disclosure, and they should also be considered as disclosed by the present disclosure.
Claims
1. An elliptic curve cryptography based search method, characterized by, The search method comprises: The first user generates system parameters, a system key, a user key and an auxiliary key; wherein the system key comprises a key of a pseudo-random permutation function, a public key and a private key of an elliptic curve encryption algorithm; The first user sends the key of the pseudo-random permutation function and the user key to a second user through a secure channel, and sends identification information of the second user and the auxiliary key to a cloud server through a secure channel, so that the cloud server stores the identification information of the second user and the auxiliary key in an authorized user list; The cloud server receives an encrypted document and a secure index table sent by the first user; each piece of data of the secure index table comprises an encrypted keyword and associated encrypted document information; the encrypted document information is generated by encryption using an elliptic curve encryption algorithm and a public key; the private key of the elliptic curve encryption algorithm comprises two parts of an auxiliary key and a user key; A search trapdoor generated by the second user according to a search keyword is received; The search trapdoor is compared with the encrypted keywords in the secure index table to find matching encrypted target document information; the auxiliary key corresponding to the second user is found from the authorized user list, and the auxiliary key is used to pre-decrypt the encrypted target document information, and the pre-decryption result is sent to the second user; A target document identifier sent by the second user is received; the target document identifier is obtained by the second user after decrypting the pre-decryption result using the user key; A target encrypted document corresponding to the target document identifier is sent to the second user, so that the second user decrypts the target encrypted document to obtain a plaintext document; The generation method of the target document identifier comprises: The second user receives the pre-decryption result and decrypts the pre-decryption result using the user key to obtain a decrypted document identifier, a symmetric encryption key corresponding to each decrypted document identifier, and a relevance score corresponding to each decrypted document identifier; The relevance scores corresponding to each decrypted document identifier are arranged in descending order, and the first predetermined number of decrypted document identifiers in the sorting result are taken as target document identifiers; Further comprising: When a target user is revoked, the cloud server deletes the identification information and the auxiliary key corresponding to the target user from the authorized user list.
2. The search method of claim 1, wherein, The generation method of the encrypted document and the secure index table comprises: The first user assigns a corresponding document identifier and a symmetric encryption key to each document in a document set, and encrypts the corresponding document using the symmetric encryption key to generate an encrypted document; The first user finds document information of a plurality of associated documents containing each keyword; the document information comprises a document identifier of the associated document, a symmetric encryption key of the associated document, and a relevance score of each keyword and the associated document; The encryption key of each item of data in the secure index table is generated by encrypting each keyword using a pseudo-random permutation function and a corresponding key; and the encrypted document information of each keyword is generated by encrypting the document information of a plurality of associated documents using an elliptic curve encryption algorithm and a public key.
3. The search method of claim 1, wherein, The search trapdoor is generated by encrypting a search keyword using a pseudo-random permutation function and a corresponding key by the second user.
4. The search method according to any one of claims 1 to 3, characterized in that, The method for generating the plaintext document includes: The second user receives the target encrypted document sent by the cloud server, and decrypts the target encrypted document using a symmetric encryption key corresponding to the target encrypted document to generate a plaintext document.
5. An elliptic curve cryptography based search apparatus, characterized by comprising: It includes: The first receiving module is configured to generate system parameters, a system key, a user key, and an auxiliary key by a first user; the system key includes a key of a pseudo-random permutation function, a public key, and a private key of an elliptic curve encryption algorithm; the first user sends the key of the pseudo-random permutation function and the user key to a second user through a secure channel, and sends identification information of the second user and the auxiliary key to a cloud server through a secure channel, so that the cloud server stores the identification information of the second user and the auxiliary key in an authorized user list; the first receiving module receives an encrypted document and a secure index table sent by the first user; each item of data in the secure index table includes an encrypted keyword and associated encrypted document information; the encrypted document information is generated by encryption using an elliptic curve encryption algorithm and a public key; the private key of the elliptic curve encryption algorithm includes two parts of an auxiliary key and a user key; The second receiving module is configured to receive a search trapdoor generated by the second user according to a search keyword; The comparison module is configured to compare the search trapdoor with the encrypted keywords in the secure index table to find matching encrypted target document information; The pre-decryption module is configured to find an auxiliary key corresponding to the second user from the authorized user list, and pre-decrypt the encrypted target document information using the auxiliary key; The first sending module is configured to send a pre-decryption result to the second user; The third receiving module is configured to receive a target document identifier sent by the second user; the target document identifier is obtained by the second user by decrypting the pre-decryption result using a user key; the method for generating the target document identifier includes: the second user receives the pre-decryption result, and decrypts the pre-decryption result using the user key to obtain a decrypted document identifier, a symmetric encryption key corresponding to each decrypted document identifier, and a relevance score corresponding to each decrypted document identifier; the relevance scores corresponding to each decrypted document identifier are arranged in descending order, and the first predetermined number of decrypted document identifiers in the sorted result are used as target document identifiers; The second sending module is configured to send a target encrypted document corresponding to the target document identifier to the second user, so that the second user decrypts the target encrypted document to obtain a plaintext document; It also includes: A deleting module, configured to, when the target user is revoked, delete, by the cloud server, the identification information and the auxiliary key corresponding to the target user from the authorized user list.
6. An electronic device, comprising: The application relates to a computer readable storage medium, comprising: A memory, configured to store a computer program; A processor, configured to execute the computer program to implement the steps of the search method based on the elliptic curve cryptography according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the search method based on the elliptic curve cryptography according to any one of claims 1 to 4.
Citation Information
Patent Citations
Certificateless searchable encryption method based on edge computing
CN112543099A
Lightweight searchable encryption method and device based on elliptic curve
CN112560075A
Document searching method, system and equipment and readable storage medium
CN113158245A
Data access control method based on searchable encryption and computer equipment
CN114257446A