Lightweight forward and backward secure public key authentication encryption keyword search method and system

Through elliptic curve cipher operation and inverted index structure, combined with public key and private key management, the problems of forward and backward privacy protection in public key authentication encryption are solved, and lightweight search and data updates are realized, reducing the Calculate costs and improve efficiency.

CN118509262BActive Publication Date: 2024-11-15QINGDAO UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410968682.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-15
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

Existing public key authentication encryption and keyword search pose security threats in the face of forward privacy and backward privacy, and the calculation volume is large, making it difficult to achieve lightweight search efficiency.

Method used

Using cipher operations such as scalar multiplication on the elliptic curve, combined with the inverted index structure, data ciphertext and update token are generated through public and private key management between trusted institutions and cloud servers, and data owners support cloud servers. Data on it is securely updated and matched by searching for traps to ensure forward and backward security.

Benefits of technology

It realizes forward and backward privacy protection of cloud server data, reduces computing costs, improves search efficiency, resists internal keyword guessing attacks, and supports data updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509262B_ABST
    Figure CN118509262B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of data security technology, and discloses a lightweight forward and backward secure public key authentication encryption keyword search method and system, the method comprising: obtaining public parameters from a trusted institution, each entity of a cloud server, a data owner, and a data user generates their own public key and private key, and shares the public key with other entities; the data owner uses the cloud server public key, the data owner private key, and the data user public key to encrypt his own data, generates data ciphertext and sends it to the trusted institution, and sends the update token to the trusted institution at the same time, and the data accepted by the trusted institution is forwarded to the cloud server; the cloud server receives the search trap sent by the data user; the search trap is matched with the data ciphertext to obtain the result ciphertext that the data user wants to search, and the result ciphertext is sent to the data user. The present invention realizes the forward privacy and backward privacy of the ciphertext data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data security, and in particular relates to a lightweight forward and backward secure public key authentication encryption keyword search method and system. Background Art

[0002] While cloud services bring a lot of convenience to users, cloud servers may also analyze and speculate on the data stored by users, leaking information to some unauthorized users, which will bring about privacy and stability issues. Encrypting data is a direct and effective way to protect data privacy and confidentiality. However, when data is stored in the form of ciphertext on the cloud server, the ciphertext form of the data destroys the semantic relationship, inclusion relationship, and order relationship that the data can provide for search, making it difficult for users to retrieve the data they want to query using traditional search technology. Searchable encryption technology can safely and efficiently retrieve the data you want from ciphertext data.

[0003] Searchable encryption means that there is no need to download all ciphertext files from the cloud server. When a user needs to search for a keyword, the search trap for the keyword can be sent to the cloud server. After receiving the search trap, the cloud server matches it with each ciphertext file. If the match is successful, it means that the keyword is contained in the file. Finally, the cloud returns all successfully matched files to the user.

[0004] Searchable encryption can generally be divided into two categories: symmetric searchable encryption and public key searchable encryption. In public key searchable encryption technology, the public key is used to encrypt plaintext information and retrieve target ciphertext, and the private key is used to decrypt the ciphertext information and generate keyword trapdoors. Compared with symmetric searchable encryption, the public key searchable encryption algorithm is more complex, and the data encryptor does not need to negotiate keys with the data sharer, which makes the scheme more suitable for multi-user data sharing and has a wider application scenario. However, public key searchable encryption is insecure under internal keyword guessing attacks. The introduction of public key authenticated encryption and keyword search can effectively resist internal keyword guessing attacks. The data sender not only needs to encrypt the keyword, but also authenticate it, so as to ensure that the encrypted keyword obtained by the verifier can only be generated by the sender.

[0005] Existing public key authentication encryption and keyword search do not support two specific security threats caused by data owners adding or deleting encrypted data uploaded to the cloud server, namely forward privacy and backward privacy. Most existing schemes based on bilinear mapping are more computationally intensive and time-consuming than schemes based on other common cryptographic operations.

[0006] Therefore, how to protect the forward privacy and backward privacy of data and achieve lightweight search is a problem that technicians in this field need to solve. Summary of the invention

[0007] In view of the deficiencies in the prior art, the present invention provides a lightweight forward and backward secure public key authentication encryption keyword search method to protect the forward privacy and backward privacy of ciphertext data.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0009] First, the present invention provides a lightweight forward and backward secure public key authentication encryption keyword search method, comprising:

[0010] Obtain public parameters from a trusted institution, and each entity, including cloud servers, data owners, and data users, generates their own public and private keys, and shares the public keys with other entities;

[0011] The data owner uses the cloud server public key, the data owner private key and the data user public key to encrypt the data owner's own data, generate data ciphertext, and send the data ciphertext to the trusted organization. The trusted organization processes the data ciphertext and forwards it to the cloud server. It can also generate an update token based on the keyword to be updated and send it to the trusted organization, which then forwards it to the cloud server.

[0012] The cloud server receives the search trap generated by the cloud server public key, the data owner public key and the data user private key and sends it to the data user. The cloud server uses the private key of the cloud server and matches the search trap with the data ciphertext based on the search algorithm to obtain the result ciphertext that the data user wants to search for, and sends the result ciphertext to the data user.

[0013] Furthermore, the public parameters and the public and private keys of the cloud server, data owner, and data user are obtained by the following method:

[0014] 1) Given a security parameter χ, generate a prime-order elliptic curve group and obtain the public parameter , where G is the elliptic curve group, P is the generator of the elliptic curve group G, o is the order of the elliptic curve group G, and f 1 、f 2 、f 3 There are three hash functions;

[0015] 2) Select a random number s and calculate the server's public key PK CS =sP and private key SK CS =s;

[0016] 3) Select a random number a 1 、a 2 、a 3 , generate a random key and , calculate the public key of the data owner and private key , ,in , d is a positive integer, msk is the master key, are the shares of the 1st, 2nd, ..., i-th public keys respectively;

[0017] 4) Select a random number b 1 、b 2 、b 3 , calculate the public key of the data user and private key .

[0018] Furthermore, the data received by the trusted institution is forwarded to the cloud server through the following method:

[0019] The data received by the trusted institution is the data ciphertext and update token from the data owner;

[0020] The data ciphertext is obtained by encrypting the data that the data owner wants to outsource to the cloud server;

[0021] The update token is an update token generated by the data owner according to the data that the data owner wants to modify.

[0022] Furthermore, the cloud server public key PK is used CS , data owner's private key SK DO and data user public key PK DU The specific steps to encrypt the data owner's own data and generate data ciphertext are as follows:

[0023] 1) Get the current time t from the system clock and encode t into T according to the 0 encoding algorithm;

[0024] 2) Calculation and ,in and is the key hash value, f 1 is a hash function, , They are the first and second private key shares of the data owner respectively. , and They are the first, second, and third public key shares of the data user respectively;

[0025] 3) Randomly select number r 1 、r 2 ,calculate , w is the keyword data, Q is the keyword encryption result;

[0026] 4) Calculate , , , is the result of keyword encryption in the hash function f 3 The hash value below;

[0027] 5) For each element y in T, calculate , is the element y under the hash function H 1 The hash value below;

[0028] 6) For each keyword or document pair (w,f), calculate the label , , , and set the backward security key , where i is a positive integer, 1≤i≤d, R, Z, S are pseudo-random functions, is the key k tag The pseudo-random function value of the logical OR value of the keyword w and the file identifier f, is the key k tag The pseudo-random function value of the file identifier f is: is the key k tag The pseudo-random function value of the keyword w is: is the key sk i-1 and i in the hash function H 2 The hash function value under

[0029] 7) Calculation , where j, d are positive integers, j = 1, 2, 3, It's a label, sk 0 ,sk 1 ,sk 2 ,...,sk d is the backward security key, is a pierceable pseudo-random function, Is the exclusive OR operator. If i<d, calculate ,in is the backward security key sk l-1 and l in the hash function H 2 The hash value under, l is a positive integer, i+1≤l≤d, calculate ;

[0030] where psk 1 ,psk 2 ,...,psk i is the public key, sk i ,sk i+1 ,...,sk dis the backward security key, is a pierceable pseudo-random function;

[0031] 8) Obtain data ciphertext .

[0032] Furthermore, the update token is a public key of the cloud server PK CS , data owner's private key SK DO and data user public key PK DU The generated ones include add tokens for adding keywords and delete tokens for deleting keywords;

[0033] The added token is generated by encrypting the keyword kw to be added in the same way as the data ciphertext is generated;

[0034] The deletion token is obtained by processing the label in the data ciphertext of the keyword kw to be deleted.

[0035] Further, the token is added through the following strategy: according to the keyword kw that you want to add, calculate , Q kw The encryption result of the keyword kw is obtained, and the remaining steps are the same as the steps 4) to 8) of generating the data ciphertext as described in claim 4, and the token is increased. .

[0036] Furthermore, the deletion token is obtained through the following strategy: Generate the corresponding tag according to the keyword you want to delete , calculate the public key , backward security key and the master key , i and d are positive integers, is a pierceable pseudo-random function, The input is the backward security key sk i and tags The pierceable pseudo-random function value, is the backward security key sk i and the positive integer i+1 in the hash function H 2 The hash function value under is the backward security key sk i+1 and d in the hash function H 2 The hash function value under generates a deletion token , psk 1 ,psk 2 ,...,psk i+1 is the public key.

[0037] Furthermore, the cloud server public key PK is used CS, data owner public key SK DU And data user private key PK DO , the search trapdoor is obtained through the following strategy:

[0038] 1) Get the current time from the system clock , according to the 1 encoding algorithm Encoded ;

[0039] 2) Calculation and , and is the key hash value, are the 1st, 2nd and 3rd private key shares of the data user, and They are the first and second public key shares of the data owner respectively;

[0040] 3) Calculate the trapdoor value , is the keyword data you want to search for. are the first and second private key shares of the data user;

[0041] 4) Calculate the trapdoor value , where y is The 1-coded value, , is y in the hash function H 1 The hash value below;

[0042] 5) Get the search trap .

[0043] Further, the result ciphertext is obtained by the following strategy: if T in the data ciphertext C and the search trap ST If the intersection is an empty subset, the data ciphertext and the search trapdoor do not match, and the resulting ciphertext is empty. Otherwise, the resulting ciphertext res can be obtained.

[0044] Specifically, the result ciphertext res is obtained through the following strategy:

[0045] 1) Calculate the ciphertext auxiliary value , S.K. CS It is the private key of the cloud server;

[0046] 2) Randomly select elements ,calculate , is the ciphertext auxiliary value in the hash function f 3 The hash value under, if the equality holds, the result ciphertext res is obtained, if the equality does not hold, the result is empty.

[0047] Secondly, the present invention also provides a lightweight forward and backward secure public key authentication encryption keyword search system, characterized in that it is used to implement the lightweight forward and backward secure public key authentication encryption keyword search method as described above, and the system includes:

[0048] The data owner encrypts the keyword data according to the set encryption policy and the cloud server public key, the data owner's private key and the data user's public key to obtain the data ciphertext, and uploads the data ciphertext to the trusted institution; based on the keyword data to be updated, an update token is generated and uploaded to the trusted institution;

[0049] Data users generate search traps based on the set trap generation strategy and the cloud server public key, data owner public key, and data user private key, and obtain the data ciphertext in the cloud server by uploading the search trap to the cloud server;

[0050] The cloud server is used to store the data ciphertext, match the search trap received from the data user with the data ciphertext from the data owner according to the search algorithm, obtain the data ciphertext that the data user wants to search, and send it to the data user;

[0051] A trusted institution is used to generate secure public parameters. Based on these parameters, data owners, data users and cloud servers generate their own keys; after processing the data owner's ciphertext, it is forwarded to the cloud server; and the data owner's update token is forwarded to the cloud server.

[0052] Compared with the prior art, the present invention has the advantages of:

[0053] (1) The present invention can implement keyword search with public key authentication encryption in the systems of cloud servers, trusted institutions, data users, and data users, and supports data owners to update the ciphertext of data uploaded to the cloud server.

[0054] (2) The present invention has more comprehensive security: first, public key authentication encryption can effectively resist internal keyword guessing attacks; second, it can achieve forward security, ensuring that the files containing keywords newly added by the data owner will not be linked to the trapdoors generated by the previous search for the same keywords, thereby safely adding keywords; third, it can achieve backward security, ensuring that the search for keywords cannot be linked to files containing keywords that have been previously deleted, thereby safely deleting keywords.

[0055] (3) The present invention constructs a scheme based on cryptographic operations such as scalar multiplication on elliptic curves, reduces the expensive computational cost caused by bilinear pairing, and utilizes the inverted index data structure to improve search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0057] Figure 1 is a flow chart of the method of the present invention;

[0058] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0060] Existing public key authentication encryption keyword search does not support data update, and it is necessary to increase the data content of ciphertext and trapdoor to ensure the forward privacy and backward privacy of the data, such as: adding 0-encoded ciphertext data and 1-encoded search trapdoors, and labels generated based on pierceable encryption. These can all help improve the security of the scheme. The public key authentication encryption scheme based on bilinear pairing has a large amount of calculation and takes a long time, while cryptographic operations such as scalar multiplication based on elliptic curves can reduce the calculation cost, and the inverted index data structure can also effectively improve the search efficiency of the scheme. To this end, the present application provides a public key authentication encryption method and system that supports forward and backward security and keyword search, which can support data updates in public key authentication encryption keyword search systems, improve the security protection effect of encrypted data, improve search efficiency, and reduce search costs.

[0061] like Figure 1 As shown, this embodiment discloses a public key authentication encryption method that supports forward and backward security and keyword search, and the method is applied to data owners, data users, cloud servers and trusted institutions.

[0062] Specifically, the method includes:

[0063] S1. Obtain public parameters from a trusted organization. Each entity, including cloud servers, data owners, and data users, generates their own public and private keys and shares the public keys with other entities.

[0064] In this embodiment, the public parameters are generated by an algorithm by a trusted institution, such as the Setup algorithm. Specifically, the trusted institution selects security parameters and calculates and generates the public parameters. The public key and private key of the cloud server, the public key and private key of the data owner, and the public key and private key of the data user are generated by a key generation algorithm based on the public parameters, such as the KeyGen algorithm and the OwnerKeyGen algorithm. Specifically, the cloud server selects a random number and calculates and generates the public key and private key of the cloud server. The data owner selects a random number and generates a random key. and , calculate and generate the public key and private key of the data owner. The data user selects a random number and calculates the public key and private key of the data user.

[0065] As a preferred implementation, the public parameters and the public and private keys of the cloud server, the data owner, and the data user are obtained by the following method:

[0066] 1) Given a security parameter χ, generate a prime-order elliptic curve group and obtain the public parameter , where G is the elliptic curve group, P is the generator of the elliptic curve group G, o is the order of the elliptic curve group G, and f 1 、f 2 、f 3 There are three hash functions, namely , , , KW Space is the keyword space, q is a large prime number, is a remainder class ring modulo q, , hlen is the length of the string, is a set of positive integers;

[0067] 2) Choose a random number , calculate the server's public key PK CS =sP and private key SK CS =s;

[0068] 3) Select a random number a 1 、a 2 、a 3 , generate a random key and , calculate the public key of the data owner and private key , ,in , d is a positive integer, msk is the master key, are the shares of the 1st, 2nd, ..., i-th public keys respectively;

[0069] 4) Select a random number , calculate the public key of the data user and private key .

[0070] S2. The data owner uses the cloud server public key, the data owner private key and the data user public key to encrypt the data owner's own data, generate data ciphertext, and send the data ciphertext to the trusted organization. The trusted organization processes the data ciphertext and forwards it to the cloud server. It can also generate an update token based on the keyword to be updated and send it to the trusted organization, which forwards it to the cloud server.

[0071] In this embodiment, the user data plaintext may be: electronic medical records, product information and other data. The data received by the trusted institution is the data ciphertext and update token from the data owner, for example, data ciphertext C and update token Token. Specifically, the data ciphertext is the data user encrypting the data that he wants to outsource to the cloud server, and the update token is the update token generated by the data user according to the data that he wants to modify.

[0072] (1) The data ciphertext is generated by a ciphertext generation algorithm, such as the CipGen algorithm. Specifically, the current time t obtained by the system clock is encoded with 0, and the data ciphertext is calculated and generated.

[0073] As a specific implementation method, the cloud server public key PK is used CS , data owner's private key SK DO and data user public key PK DU The specific steps to encrypt the data owner's own data and generate data ciphertext are as follows:

[0074] 1) Get the current time t from the system clock and encode t into T according to the 0 encoding algorithm;

[0075] 2) Calculation and ,in and is the key hash value, f 1 is a hash function, , They are the first and second private key shares of the data owner respectively. , and They are the first, second, and third public key shares of the data user respectively;

[0076] 3) Randomly select number ,calculate , w is the keyword data, Q is the keyword encryption result;

[0077] 4) Calculate , , , is the result of keyword encryption in the hash function f 3 The hash value below;

[0078] 5) For each element y in T, calculate , is the element y under the hash function H 1 The hash value below;

[0079] 6) For each keyword or document pair (w,f), calculate the label , , , and set the backward security key , where i is a positive integer, 1≤i≤d, R, Z, S are pseudo-random functions, , , , and yes the length of the string, is the key k tag The pseudo-random function value of the logical OR value of the keyword w and the file identifier f, is the key k tag The pseudo-random function value of the file identifier f is: is the key k tag The pseudo-random function value of the keyword w is: is the key sk i-1 and i in the hash function H 2 The hash function value under

[0080] 7) Calculation , where j, d are positive integers, j = 1, 2, 3, It's a label, sk 0 ,sk 1 ,sk 2 ,...,sk d is the backward security key, is a pierceable pseudo-random function, Is the exclusive OR operator. If i<d, calculate ,in is the backward security key sk l-1 and l in the hash function H 2 The hash value under, l is a positive integer, i+1≤l≤d, calculate ;

[0081] where psk 1 ,psk2 ,...,psk i is the public key, sk i ,sk i+1 ,...,sk d is the backward security key, is a pierceable pseudo-random function;

[0082] 8) Obtain data ciphertext .

[0083] Among them, the 0 encoding algorithm is a coding method to solve the millionaire's problem (MP), which represents an n-bit binary string as , where n is large enough to cover all possible values. Note that this scheme only considers integer values; in the 0 encoding algorithm, is defined to contain at most A collection of elements , so that ; d is a positive integer in the owner key generation algorithm; if there is an additional key space K p and a pair of algorithms that satisfy the following properties , then a pseudo-random function is a puncturable pseudorandom function (PRF), where With a The PRF key K and a The element X is taken as input and a punctured key is output. , Piercing Key and elements As input, output element .

[0084] (2) The token is updated using the cloud server public key PK CS , data owner's private key SK DO and data user public key PK DU The generated tokens include the add tokens for adding keywords and the delete tokens for deleting keywords. The update tokens are generated by the update algorithm, such as the Update algorithm. Specifically, the data owner generates the update token based on the keywords that he wants to update.

[0085] Adding a token is done by encrypting the keyword kw you want to add in the same way as generating data ciphertext, for example: Adding a token Token add Specifically, according to the keyword kw that you want to add, the addition token is generated by calculation.

[0086] To delete a token, you need to process the label in the ciphertext of the keyword kw you want to delete, for example:del Specifically, generate corresponding tags based on the keywords you want to delete. , calculate and generate a delete token.

[0087] As a preferred implementation, the token is added by the following strategy: according to the keyword kw to be added, calculate , Q kw It is the encryption result of keyword kw. The remaining steps are the same as steps 4)-8) of generating data ciphertext recorded above, and the added token is obtained:

[0088] .

[0089] As a preferred implementation, the deletion token is obtained through the following strategy:

[0090] Generate corresponding tags based on the keywords you want to delete , calculate the public key , backward security key and the master key , i and d are positive integers, is a pierceable pseudo-random function, The input is the backward security key sk i and tags The pierceable pseudo-random function value, is the backward security key sk i and the positive integer i+1 in the hash function H 2 The hash function value under is the backward security key sk i+1 and d in the hash function H 2 The hash function value below generates a deletion token , psk 1 ,psk 2 ,...,psk i+1 is the public key.

[0091] S3. The cloud server receives the search trap generated by the cloud server public key, the data owner public key and the data user private key and sent by the data user; the cloud server private key is used to match the search trap with the data ciphertext based on the search algorithm to obtain the result ciphertext that the data user wants to search, and the result ciphertext is sent to the data user.

[0092] In this embodiment, the search trap can be generated by the user according to the keyword that the data user wants to search, for example: ST. The result ciphertext can be empty or can be the data ciphertext that matches the search trap, for example: or res.

[0093] The search trapdoor is generated by a trapdoor generation algorithm, such as the Trapdoor algorithm. Specifically, the system clock is used to obtain the current time Perform 1 encoding and calculate to generate data ciphertext.

[0094] The result ciphertext is obtained by the search algorithm, for example, the algorithm Search. Specifically, for T in the data ciphertext C and the search trap ST The intersection is used for judgment. If the intersection is empty, the search trap and the data ciphertext do not match. If the intersection is not empty, the result ciphertext res can be calculated or .

[0095] Generally, the scheme in which user data is stored and searched in ciphertext form is called a public key authentication encryption and keyword search scheme. The scheme provided in this embodiment can realize keyword search by using a corresponding algorithm; and the encrypted data and search trap of this embodiment have 0-coded and 1-coded data and labels, thereby protecting the forward privacy and backward privacy of the encrypted data. The cryptographic operation based on the elliptic curve and the inverted index can reduce the computing cost and improve the search efficiency.

[0096] As a preferred implementation, the cloud server public key PK is used CS , data owner public key SK DU And data user private key PK DO , the search trapdoor is obtained through the following strategy:

[0097] 1) Get the current time from the system clock , according to the 1 encoding algorithm Encoded ;

[0098] 2) Calculation and , and is the key hash value, are the 1st, 2nd and 3rd private key shares of the data user, and They are the first and second public key shares of the data owner respectively;

[0099] 3) Calculate the trapdoor value , is the keyword data you want to search for. are the first and second private key shares of the data user;

[0100] 4) Calculate the trapdoor value , where y is The 1-coded value, , is y in the hash function H1 The hash value below;

[0101] 5) Get the search trap .

[0102] Among them, the 1-coding algorithm is a coding method to solve the millionaire's problem (MP), which represents an n-bit binary string as , where n is large enough to cover all possible values. Note that the present invention only considers integer values; in the 1 encoding algorithm, k is defined as a maximum of A collection of elements , so that .

[0103] More specifically, the resulting ciphertext is obtained through the following strategy:

[0104] If T in the data ciphertext C and the search trap ST If the intersection is an empty subset, the data ciphertext and the search trapdoor do not match, and the resulting ciphertext is empty. Otherwise, the resulting ciphertext res can be obtained.

[0105] Specifically, the result ciphertext res is obtained through the following strategy:

[0106] 1) Calculate the ciphertext auxiliary value , S.K. CS It is the private key of the cloud server;

[0107] 2) Randomly select elements ,calculate , is the ciphertext auxiliary value in the hash function f 3 The hash value under, if the equality holds, the result ciphertext res is obtained, if the equality does not hold, the result is empty.

[0108] In this embodiment, the data owner can generate data ciphertext based on the cloud server public key, the data owner private key and the data user public key, and the ciphertext generation algorithm, and generate an update token based on the cloud server public key, the data owner private key and the data user public key, and the update algorithm; the data user can generate a search trap based on the cloud server public key, the data owner public key and the data user private key, and the trapdoor generation algorithm; the cloud server can obtain the result ciphertext based on the cloud server private key and the search algorithm. Among them, the algorithm includes: setting algorithm, owner key generation algorithm, key generation algorithm, ciphertext generation algorithm, trapdoor generation algorithm, search algorithm, and update algorithm, thereby realizing keyword search with public key authentication encryption. In addition, the time of the data ciphertext and the time of the search trapdoor are encoded with 0 and 1, and the tags generated based on the puncturable encryption can realize the forward security and backward security of the keyword search, and support data update. The cryptographic operation based on the elliptic curve and the inverted index in this application can achieve low computing cost and high search efficiency.

[0109] It can be seen that this embodiment can improve the efficiency of the algorithm in searching for keywords and reduce the computational cost of the solution. It also supports data updates for public key authentication encryption and keyword search under a multi-data owner model, effectively protecting the forward and backward privacy of encrypted keywords, and facilitating solution expansion and subsequent maintenance.

[0110] Based on the above embodiments, it should be noted that the setup algorithm (Setup), key generation algorithm (KeyGen), owner key generation algorithm (OwnerKeyGen), ciphertext generation algorithm (CipGen), trapdoor generation algorithm (TrapdoorGen), search algorithm (Search) and update algorithm (Update) provided in this application can realize keyword search of public key authentication encryption, thereby achieving lightweight search and forward and backward security.

[0111] Algorithm 1: Setup algorithm. The input of this algorithm is: security parameters , the output is: public parameter PP. The purpose of this algorithm is to use security parameter generation. The generation of public and private keys of cloud servers, data owners and data users requires public parameters. The detailed implementation of the algorithm can be found in the steps recorded above.

[0112] Algorithm 2: Key Generation Algorithm (KeyGen). The input of this algorithm is: public parameter PP, and the output is: public parameter PP. The purpose of this algorithm is to use public parameters to generate the public key and private key of the cloud server and the public key and private key of the data user. The detailed implementation of the algorithm can be found in the steps recorded above.

[0113] Algorithm 3: Owner Key Generation Algorithm (OwnerKeyGen). The input of this algorithm is: public parameter PP and positive integer d, and the output is: public parameter PP. The purpose of this algorithm is to use the public parameters to generate the public key and private key of the data owner. The detailed implementation of the algorithm can be found in the steps recorded above.

[0114] Algorithm 4: Ciphertext generation algorithm (CipGen). The input of this algorithm is: public parameter PP, public key PK of the cloud server CS , the data owner’s private key SK DO and SK spe , the public key PK of the data user DU , keyword w, the output is: ciphertext C. The purpose of this algorithm is for the data owner to generate data ciphertext based on the keyword data. The detailed implementation of the algorithm can be found in the steps recorded above.

[0115] Algorithm 5: Trapdoor Generation Algorithm (TrapdoorGen). The input of this algorithm is: public parameter PP, public key PK of the cloud server CS , the public key PK of the data owner DO , the data user's private key SK DU , Keywords , the output is: search trapdoor ST. The purpose of this algorithm is for data users to generate search trapdoors based on the keyword data they want to search for. The detailed implementation of the algorithm can be found in the steps recorded above.

[0116] Algorithm 6: Search algorithm. The input of this algorithm is: public parameter PP, private key SK of the cloud server CS , ciphertext C, search trapdoor ST, and the output is: search result. The purpose of this algorithm is that the cloud server obtains the result ciphertext by matching the data ciphertext with the search trapdoor.

[0117] Specifically, when executing the search algorithm, if T in the data ciphertext C and the search trap ST If the intersection is an empty subset, the data ciphertext and the search trap do not match, and the resulting ciphertext is empty; otherwise, the calculation ; Randomly select elements ,calculate

[0118] ;

[0119] If the equation holds true, the result ciphertext res is obtained; if the equation does not hold true, the result ciphertext is empty.

[0120] In order to compare integers T and , x can be encoded as a set using the 1-encoding algorithm , use the 0 encoding algorithm to encode y as a set .if ,but ,otherwise, .

[0121] Algorithm 7: Update algorithm. The input of this algorithm is: public parameter PP, public key PK of the cloud server CS , the data owner’s private key SK DO and SKspe, the public key PK of the data user DU , keyword kw, and the output is: update token Token. The purpose of this algorithm is for the data owner to generate an update token based on the keyword he wants to update. Among them, the addition token is generated by encrypting the keyword kw he wants to add in the same way as generating the data ciphertext, and the deletion token is obtained by processing the label in the data ciphertext of the keyword kw he wants to delete.

[0122] Specifically, when executing the update algorithm, when generating an increase token Token add When calculating the keyword kw you want to add The remaining steps are the same as those in the algorithm CipGen, and the token is increased. ; When the deletion token Token is generated del Generate corresponding tags based on the keywords you want to delete , calculate the public key , backward security key and the master key , generate a delete token: .

[0123] It can be seen that each algorithm sets the calculation steps that data owners, data users, cloud servers, and trusted institutions need to complete. Therefore, when data owners, data users, cloud servers, and trusted institutions perform a certain algorithm, they execute the calculation steps they need to perform respectively according to the settings in the corresponding algorithm.

[0124] like Figure 2 As shown, as another embodiment of the present invention, a lightweight forward and backward secure public key authentication encryption keyword search system is provided, which is used to implement the lightweight forward and backward secure public key authentication encryption keyword search method and system as described above.

[0125] The system includes:

[0126] The data owner encrypts the keyword data according to the set encryption policy and the cloud server public key, the data owner's private key and the data user's public key to obtain the data ciphertext, and uploads the data ciphertext to the trusted institution; based on the keyword data to be updated, an update token is generated and uploaded to the trusted institution;

[0127] Data users generate search traps based on the set trap generation strategy and the cloud server public key, data owner public key, and data user private key, and obtain the data ciphertext in the cloud server by uploading the search trap to the cloud server;

[0128] The cloud server is used to store the data ciphertext. It matches the search trap received from the data user with the data ciphertext from the data owner according to the search algorithm, obtains the data ciphertext that the data user wants to search, and sends it to the data user.

[0129] A trusted institution is used to generate secure public parameters. Based on these parameters, data owners, data users and cloud servers generate their own keys; after processing the data owner's ciphertext, it is forwarded to the cloud server; and the data owner's update token is forwarded to the cloud server.

[0130] With the help of the above algorithm, the system can be safely deployed in a non-collusive semi-honest cloud server, and the privacy of system parameters and user data from untrusted cloud servers can be guaranteed during deployment and use.

[0131] Specifically, the solution involves the following four terminals: the data owner terminal DO used by the data owner, the data user terminal DU used by the data user, the cloud server CS, and the trusted institution TA. The data owner transmits the data owner data and its own public key PK through the data owner terminal. DO To the trusted institution, and pass its own public key PK DO To the data user; the data user sends the search trap ST to the cloud server through the data user terminal and passes its own public key PK DU To the data owner; the cloud server sends its own public key PK CS Delivered to data users and data owners. The cloud server stores data owners’ data and data users’ public keys PK DU And the data owner's public key PK DO , receiving the encrypted data from the data owner and the search trapdoor from the data user, and executing the secure computing algorithm to complete the keyword search process.

[0132] The following is an introduction to the scheme using the public key authentication encryption system as an example. The scheme implementation process includes:

[0133] Step 1: The data owner first encrypts the keyword using the current system time, the data owner's private key, and the public keys of the cloud server and the data user, and then he sends the generated data ciphertext to the trusted organization.

[0134] Step 2: The trusted institution processes the index ciphertexts sent by the data owner into an inverted index data structure and forwards it to the cloud server.

[0135] Step 3: The data user uses the current system time, the data user's private key, and the public keys of the cloud server and the data owner to encrypt the keywords to be searched to generate a search trap, and uploads it to the cloud server.

[0136] Step 4: After receiving the search trap, the cloud server performs the search and returns the search results to the data user.

[0137] Step 5: The data owner generates an update token using the data owner's private key and the public keys of the cloud server and the data user, and then he sends the generated update token to the trusted authority.

[0138] It can be seen that according to the present embodiment, the keyword search can be performed by designing the same corresponding algorithm to realize the relevant operation, and the scheme has high scalability. Specifically, based on each algorithm, different types of expression searches can be further combined to construct, which is suitable for various keyword searches. In terms of the security of the scheme, the 0 encoding algorithm and the 1 encoding algorithm are used to encode the time to achieve forward security. In addition, backward security is achieved by using the labels generated by puncture encryption. The public key authentication encryption scheme itself can resist internal keyword guessing attacks, so the privacy of the data can be protected. In addition, unlike the bilinear pairing operation, the scheme uses an elliptic curve-based operation, so the computational cost of the scheme is greatly reduced. In addition, the encrypted data is processed using the inverted index data structure, so the scheme has high search efficiency.

[0139] In summary, the scheme uses 0-coding algorithm, 1-coding algorithm and pierceable encryption to achieve system security, which greatly protects the forward and backward privacy issues brought about by data updates. At the same time, the scheme uses cryptographic operations based on elliptic curves and inverted index structures. This can effectively reduce computing costs and improve search efficiency.

[0140] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.

Claims

1. A lightweight forward and backward secure public key authentication encryption keyword search method, characterized in that: include: Obtain public parameters from a trusted institution, and each entity, including cloud servers, data owners, and data users, generates their own public and private keys, and shares the public keys with other entities; The data owner uses the cloud server public key, the data owner private key and the data user public key to encrypt the data owner's own data, generate data ciphertext, and send the data ciphertext to the trusted organization. The trusted organization processes the data ciphertext and forwards it to the cloud server. It can also generate an update token based on the keyword to be updated and send it to the trusted organization, which then forwards it to the cloud server. Specifically, the cloud server public key PK is used CS , data owner's private key SK DO and data user public key PK DU The specific steps to encrypt the data owner's own data and generate data ciphertext are as follows: 1) Get the current time t from the system clock and encode t into T according to the 0 encoding algorithm; 2) Calculation where λ and μ are key hash values, f1 is the hash function, They are the first and second private key shares of the data owner respectively. and They are the first, second, and third public key shares of the data user respectively; 3) Randomly select numbers r1 and r2 and calculate w is the keyword data, Q is the keyword encryption result, and P is the generator of the elliptic curve group G; 4) Calculate C1 = r1PK CS , C2=r2PK CS , C3=f3(Q), f3(Q) is the hash value of the keyword encryption result under the hash function f3; 5) For each element y in T, calculate C4=H1(y), where H1(y) is the hash value of element y under hash function H1; 6) For each keyword or document pair (w, f), calculate the label And set the backward security key sk i =H2(sk i-1 , i), where i is a positive integer, 1≤i≤d, R, Z, S are pseudo-random functions, is the key k tag The pseudo-random function value of the logical OR value of the keyword w and the file identifier f, is the key k tag The pseudo-random function value of the file identifier f is: is the key k tag The pseudo-random function value of the keyword w, H2(sk i-1 , i) is the key sk i-1 and the hash function value of i under the hash function H2, k tag is a random key; 7) Calculate where j, d are positive integers, j = 1, 2, 3, τ j is a tag, sk0, sk1, sk2,..., sk d is a backward secure key, is a puncturable pseudorandom function, is an exclusive - or operator. If i < d, calculate sk l = H2(sk l-1 , l), where H2(sk l-1 , l) is the hash value of the backward secure key sk l-1 and l under the hash function H2. l is a positive integer, i + 1 ≤ l ≤ d, calculate where psk1, psk2, ..., psk i is the public key, sk i ,sk i+1 , ..., sk d is the backward security key, is a pierceable pseudo-random function; 8) Obtain data ciphertext The cloud server receives the search trap generated by the cloud server public key, the data owner public key and the data user private key and sends it to the data user. The cloud server uses the private key of the cloud server and matches the search trap with the data ciphertext based on the search algorithm to obtain the result ciphertext that the data user wants to search for, and sends the result ciphertext to the data user.

2. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 1 is characterized in that: The public parameters and the public and private keys of the cloud server, data owner, and data user are obtained through the following methods: 1) Given a security parameter χ, generate a prime-order elliptic curve group and obtain public parameters PP = {G, P, o, f1, f2, f3}, where G is the elliptic curve group, P is the generator of the elliptic curve group G, o is the order of the elliptic curve group G, and f1, f2, and f3 are three hash functions; 2) Select a random number s and calculate the server's public key PK CS =sP and private key SK CS =s; 3) Select random numbers a1, a2, a3 and generate random keys sk0 and k tag , calculate the public key of the data owner and private key SK spe =(msk,psk1,psk2,…,psk i ), where msk = (sk0, d), d is a positive integer, msk is the master key, psk1, psk2, ..., psk i are the shares of the 1st, 2nd, ..., i-th public keys respectively; 4) Select random numbers b1, b2, b3 and calculate the public key of the data user and private key 3. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 2 is characterized in that: The data received by the trusted institution is forwarded to the cloud server through the following methods: The data received by the trusted institution is the data ciphertext and update token from the data owner; The data ciphertext is obtained by encrypting the data that the data owner wants to outsource to the cloud server; The update token is an update token generated by the data owner according to the data that the data owner wants to modify.

4. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 1 is characterized in that: The update token is a public key of the cloud server PK CS , data owner's private key SK DO and data user public key PK DU The generated ones include add tokens for adding keywords and delete tokens for deleting keywords; The added token is generated by encrypting the keyword kw to be added in the same way as the data ciphertext is generated; The deletion token is obtained by processing the label in the data ciphertext of the keyword kw to be deleted.

5. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 4 is characterized in that: The token is obtained through the following strategy: According to the keyword kw you want to add, calculate Qkw is the encryption result of keyword kw, and the remaining steps are the same as the method of steps 4)-8) of generating data ciphertext as described in claim 4 to obtain the added token.

6. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 4 is characterized in that: The deletion token is obtained through the following strategy: Generate the corresponding label τ according to the keyword you want to delete d , calculate the public key Backward security key sk i+1 =H2(sk i , i+1) and the master key msk i+1 =H2(sk i+1 , d), i and d are positive integers, is a pierceable pseudo-random function, The input is the backward security key sk i and label τ d The pierceable pseudo-random function value, H2(sk i , i+1) is the backward security key sk i and the hash function value of the positive integer i+1 under the hash function H2, H2(sk i+1 , d) is the backward security key sk i+1 The hash function value of d under the hash function H2 generates the deletion token Token del =(T d ,msk i+1 , psk1, psk2, …, psk i+1 ), psk1, psk2, ..., psk i+1 is the public key.

7. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 4 is characterized in that: Using cloud server public key PK CS , data owner public key SK DU And data user private key PK DO , the search trapdoor is obtained through the following strategy: 1) Get the current time t' from the system clock, and encode t' into T' according to the 1 encoding algorithm; 2) Calculation and λ′ and v′ are key hash values, are the 1st, 2nd and 3rd private key shares of the data user, and They are the first and second public key shares of the data owner respectively; 3) Calculate the trap value W′ is the keyword data you want to search for. are the first and second private key shares of the data user; 4) Calculate the trapdoor value ST2 = H1(y), where y is the 1-encoded value of t′, y∈T′, and H1(y) is the hash value of y under the hash function H1; 5) Obtain the search trapdoor ST = (T', ST1, ST2).

8. The lightweight forward and backward secure public key authentication encryption keyword search method according to claim 7, characterized in that: The result ciphertext is obtained by the following strategy: if the intersection of T in the data ciphertext C and T′ in the search trap ST is an empty subset, the data ciphertext and the search trap do not match, and the result ciphertext is empty; otherwise, the result ciphertext res can be obtained; Specifically, the result ciphertext res is obtained through the following strategy: 1) Calculate the ciphertext auxiliary value Q′=SK CS (C1+ST1C2), SK CS It is the private key of the cloud server; 2) Randomly select an element y∈T∩T′ and calculate f3(Q′) is the hash value of the ciphertext auxiliary value under the hash function f3. If the equation holds, the result ciphertext res is obtained. If the equation does not hold, the result is empty.

9. A lightweight forward and backward secure public key authentication encryption keyword search system, characterized in that: A system for implementing a lightweight forward and backward secure public key authentication encryption keyword search method as described in any one of claims 1 to 8, the system comprising: The data owner encrypts the keyword data according to the set encryption policy and the cloud server public key, the data owner's private key and the data user's public key to obtain the data ciphertext, and uploads the data ciphertext to the trusted institution; based on the keyword data to be updated, an update token is generated and uploaded to the trusted institution; Data users generate search traps based on the set trap generation strategy and the cloud server public key, data owner public key, and data user private key, and obtain the data ciphertext in the cloud server by uploading the search trap to the cloud server; The cloud server is used to store the data ciphertext, match the search trap received from the data user with the data ciphertext from the data owner according to the search algorithm, obtain the data ciphertext that the data user wants to search, and send it to the data user; A trusted institution is used to generate secure public parameters. Based on these parameters, data owners, data users and cloud servers generate their own keys; after processing the data owner's ciphertext, it is forwarded to the cloud server; and the data owner's update token is forwarded to the cloud server.