Verifiable wildcard ciphertext retrieval method based on TCBF-UBBT

Through the verifiable wildcard ciphertext retrieval method based on TCBF-UBBT, the problem of insufficient balance between storage space and search efficiency of the wildcard searchable encryption scheme in the existing technology is solved, and efficient ciphertext retrieval and data integrity verification are achieved. Suitable for search needs of high-length keywords.

CN118690073AActive Publication Date: 2024-09-24TAIYUAN UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202410751399.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-24
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Existing wildcard searchable encryption schemes cannot simultaneously take into account low storage space overhead and high search efficiency, especially when dealing with the retrieval requirements of long-length keywords.

Method used

A verifiable wildcard ciphertext retrieval method based on TCBF-UBBT is used to generate public parameters and master private keys through a trusted authority. The data owner encrypts the keywords and constructs an access control tree. The cloud server constructs the storage structure, and the user passes the replacement The key performs a cryptographic search, the blockchain verification contract performs integrity verification, and the end user decrypts the symmetric key to obtain the document plaintext.

Benefits of technology

It improves search efficiency and saves space while ensuring data confidentiality and integrity. It is also suitable for wildcard search in one-to-many application scenarios, with flexible functions and high search consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690073A
    Figure CN118690073A
Patent Text Reader

Abstract

The invention belongs to the field of cloud computing mode security, and particularly relates to a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT. Comprising the following steps: S100, a trusted authorization mechanism generates a public parameter and a main private key according to a system security parameter; s200, transmitting the verification key and the replacement key to a trusted authorization mechanism; s300, the cloud server constructs a storage structure; s400, generating a corresponding attribute private key; s500, encrypting the queried keyword by using the replacement key to search; s600, transmitting the encrypted keyword to a cloud server for wildcard character search; s700, the cloud server matches a storage structure according to the encrypted keywords to obtain a keyword set and searches a corresponding ciphertext document and a message verification code; s800, the search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword on the index according to the keyword set; s900, the block chain verification contract carries out integrity verification; and S1000, the user decrypts the symmetric key by using the attribute key according to the access strategy tree, and uses the symmetric key to solve the document plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of cloud computing model security, and specifically is a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT. Background Art

[0002] Since the "on-demand service" business model provided by cloud services has the advantages of high reliability, flexible configuration and low price, it has attracted many users to choose to outsource their data to cloud service platforms. At the same time, the data outsourcing method also separates data ownership from management rights, which in turn leads to huge threats to user privacy. Ciphertext retrieval technology provides a method to support cloud service platforms to perform keyword retrieval on ciphertexts while ensuring data confidentiality and query confidentiality. Wildcard searchable encryption is an important score for fuzzy keyword retrieval, allowing users to use wildcards to represent uncertain characters in query keywords. Traditional wildcard searchable encryption schemes are in urgent need of optimization in terms of keyword storage, ciphertext retrieval efficiency, and meeting user retrieval needs. In this regard, domestic and foreign researchers have optimized the storage method of keywords, the time overhead of ciphertext retrieval, and the functional expansion of retrieval, trying to design efficient and secure ciphertext retrieval schemes (Huang Yicai et al. A review of symmetric searchable encryption research in cloud environments [J]. Journal of Electronics and Information Technology, 2023).

[0003] (1) Keyword storage method: Zhang, X. et al. proposed a wildcard searchable encryption scheme based on tree index to improve search accuracy and security (Zhang, X., Zhao, B., Qin, J., Hou, W., Su, Y.,&Yang, H. (2021). Practical wildcard searchable encryption with tree-basedindex. International Journal of Intelligent Systems, 36(12), 7475–7499); Yan Xixi et al. proposed a multi-keyword fuzzy search encryption scheme based on blockchain, which uses an R-HashMap and sensitive hash function to build a secure index and uses blockchain to verify data to reduce time overhead (Yan Xixi, Feng Suwei, Tang Yongli, et al. Multi-keyword fuzzy search encryption scheme based on blockchain [J]. Journal of Electronics & Information Technology, 2023, 45(04): 1346-1355.); Zhao Bo proposed an OBBT (Ordered Binary Bitmap Tree, ordered binary bitmap tree) structure, which realizes a sublinear time wildcard searchable encryption scheme with no false positives through order-preserving encryption and hexadecimal encoding, combined with the constructed OBBT structure (Zhao Bo. Research on encryption scheme supporting non-exact keyword search [D]. Shandong University, 2023).

[0004] (2) Efficiency of ciphertext retrieval: Wang Lai et al. designed a fast search method based on Bloom filter and B+ tree. The method has high spatial filtering characteristics and can achieve 99% filtering efficiency without decryption (Wang Lai, Zhou Tengda, Wang Zhengfei, et al. Electronic medical record ciphertext search based on Bloom filter and B+ tree to build inverted index [J]. Computer Applications and Software, 2021, 38(04): 276-280+333.); Xu Ke et al. designed a hybrid counting Bloom filter (HyCBF) to maintain the data name prefix and prefix tag in the same counting Bloom filter while maintaining the logical uniqueness of the two. Independence, and the HyCBF-assisted binary data name search (HyBS) method is used to achieve efficient search, which has obvious advantages in search performance and update speed, and the storage efficiency is also improved to a certain extent (Xu Ke, Li Yanbiao, Xie Gaogang, et al. Efficient data name search method based on hybrid counting Bloom filter [J]. Computer Research and Development, 2023, 60(05): 1136-1150.); Sun Wenpeng et al. proposed two new verifiable data structures based on Bloom filter and bitmap by combining Bloom filter and Merkle hash tree, which efficiently support batch processing and verification of different queries (Sun Wenpeng, Wang Shuo, Li Jing. A lightweight, efficient and verifiable query method for blockchain systems[J]. Small and Micro Computer Systems, 2024(4):1-9).

[0005] (3) Functional expansion: Chatterjee, S. et al. proposed a scheme to simplify the problem of secure wildcard search into a Boolean search. The search time is sublinear in the number of keywords and attempts to eliminate the problem of false positives (Chatterjee, S., Kesarwani, M., Modi, J., Mukherjee, S., Parshuram Puria, SK, & Shah, A. Secure and efficient wildcard search over encrypted data. International Journal of Information Security [J], 2021, 20 (2), 199-244.); LING Huaze et al. used round-robin index to support multi-keyword wildcard search, which can realize the function of supporting keyword search with multiple spelling errors with higher accuracy (LING Huaze, XUE Kaiping, David SL WEI, LI Ruidong. An efficient multi-user multi-keyword fuzzy search scheme over encrypted cloud storage [J]. Journal of University of Science and Technology of China, 2021, 51 (7): 562-576); Li, Y. et al. proposed a novel inner product encryption scheme to support wildcard search requirements, eliminating redundant parameters and additional complex calculations, ensuring its practicality and efficiency (Li, Y., Ning, J., & Chen, J.. Secure and Practical Wildcard Searchable Encryption System Based on InnerProduct. IEEE Transactions on Services Computing[J], 2023,16(3): 2178-2190).

[0006] In summary, although wildcard searchable encryption mechanisms have made great progress, current solutions still cannot take into account both low storage space overhead and high search efficiency; in addition, there is a problem of being unable to meet user needs for retrieving long-length keywords. Summary of the invention

[0007] In order to ensure the confidentiality and integrity of data during the search process, the present invention provides a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT.

[0008] The present invention adopts the following technical solution: a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT, comprising: S100: The trusted authority generates public parameters and a master private key according to the system security parameters; S200: The data owner calculates the correlation between the extracted keywords and the corresponding documents to form a score set, encrypts the documents using a symmetric key to generate a ciphertext document set, encrypts the ciphertext documents using a verification key to generate a message verification code, encrypts the keywords using a replacement key to form a keyword set, constructs an access control tree to encrypt the symmetric key and generate a table structure index of the encrypted keywords-symmetric key ciphertext; transmits the verification key and the replacement key to a trusted authorization agency, transmits the score set, the ciphertext document set, the message verification code set and the keyword set to a cloud server, and transmits the index structure to a search contract; S300: The cloud server constructs a storage structure to store the ciphertext, message verification code, and document score corresponding to the keyword; S400: The trusted authority generates a corresponding attribute private key according to the registration request information provided by the user, and forwards the attribute private key, the verification key and the replacement key to the user; S500: The user wants to search for documents corresponding to a keyword, uses a replacement key to encrypt the queried keyword for search, and passes the encrypted keyword to the search contract; S600: The blockchain receives the keywords to be queried from the user, and transmits the encrypted keywords to the cloud server for wildcard search; S700: The cloud server obtains a keyword set according to the encrypted keyword matching storage structure and searches for the corresponding ciphertext document and message verification code, sends the keyword set to the search contract, and sends the corresponding ciphertext document and message verification code to the verification contract; S800: The search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword on the index according to the keyword set, and transmits the ciphertext of the symmetric key to the user; S900: The blockchain verification contract performs integrity verification based on the user's verification key, the cloud server's ciphertext document, and the message verification code; S1000: The user uses the attribute key to decrypt the symmetric key according to the access policy tree, and uses the symmetric key to decrypt the document plaintext.

[0009] In some embodiments, step S100 includes: S101: Constructing multiplicative cyclic groups and ; S102: Select two hash functions and ; S103: Select a random number ,calculate .

[0010] S104: Exploitation and , and , , , as well as Generate public parameters PK and master private key MK.

[0011] In some embodiments, step S200 includes: S201: The data owner scores the correlation between a keyword in the extracted keyword set and a document in the plaintext document set: S202: The data owner randomly selects a symmetric key as the symmetric encryption key of the plaintext document, encrypts the document, and forms an encrypted document set when all documents are encrypted. After the documents are encrypted, the corresponding scores form a document score set; S203: The data owner randomly selects a verification key to perform encryption operation on the ciphertext document to generate a message verification code set; S204: Encrypt the keywords using the replacement key to form a keyword set; S205: For symmetric keys, the data owner defines an access structure tree , let Y represent the access structure tree For all leaf nodes in the data, the data owner calculates the ciphertext encrypted with the symmetric key; S206: Index generation; S207: The data owner uploads the ciphertext document set, message verification code set, document score set, and encrypted keyword set to the cloud server; the data owner uploads the table structure index to the search contract; the data owner sends the replacement key and verification key to the trusted authorization agency.

[0012] In some embodiments, step S300 includes: S301: Update UBBT storage structure; a) UBBT search structure initialization; Set up a collection Records the existence of a UBBT of a specific length. ,in and As pointers to the left subtree and the right subtree respectively; For a given set of encrypted keywords, first determine each encrypted keyword in the set one by one, according to The relationship is converted into an encrypted feature array, and the length of the array is determined to be l , then the height of the binary tree that needs to be constructed or updated is l , if the set Does not exist , then this l As Store in a collection and set ; For each encrypted feature array, find its length l correspond The location is the root node, recorded as layer 0, initialize an empty string, recorded as the binary search record ; Start constructing a subtree, each child node is an 18-bit bitmap: according to the encrypted feature array The i-th position in Value, where ,if ,but , and determine whether the left node of the i-th layer exists: If it exists, then the left node of the i-th layer The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all 0 values ​​to link to the left subtree pointer of the i-1 layer node, and set the left and right pointers of the node to empty, then the left node in the i-th layer Position is set to 1; if ,but , and determine whether the right node of the i-th layer exists. If so, then the right node of the i-th layer The position is set to 1; if it does not exist, you need to initialize an 18-bit all-0 bitmap to link to the right subtree pointer of the i-1 layer node, and set the left and right pointers of the node to NULL, then the right node at the i-th layer will be The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is cascaded at the last layer; S302: construct a BSBD subtree; At a) the UBBT search structure is initialized, corresponding to each , an empty dictionary is created for it, and the keys of the dictionary are sorted from small to large; when the b) subtree construction is executed to the leaf node, if the leaf node is an old node, it is directly added On the contrary, if the leaf node is a newly generated node, you need to add , the left pointer of the leaf node points to this position, according to the mapping rule of converting 0 to h and i to z, Mapping bit by bit ,join in , the right pointer of the leaf node points to this position, add ; S303: Setting a two-bit counting Bloom filter TCBF; After each execution of S302, the obtained Input to the counting Bloom filter, there are three cases mapped to the set flag: marked as 0, marked as 1, and marked as 2. The preset operations performed at this time are as follows: When the mark is 0: it means that this bit has never had a hash collision, and an add 1 operation is performed on this bit, that is, this bit can be directly cascaded to the leaf node; When the mark is 1: it means that this bit has been mapped before. Check whether the record pointed to by the left pointer of the cascade leaf node is If not, add 1 to this bit; a hash collision occurs in this mapping, which means that this bit can no longer uniquely represent the information corresponding to a feature array, and the link between this bit and the storage set array is released; When the mark is 2: it means that a hash collision has occurred before this bit, and it is impossible to uniquely represent the information corresponding to a feature array; S304: Set an inverted index, set the key to the encrypted keyword, and set the corresponding value range to the storage set array. Each time the array is modified, sort the entire storage set documents from large to small according to the document score.

[0013] In some embodiments, step S400 includes: S401: When a data user sends a registration request, a trusted authority authenticates the user's identity; S402: The trusted authority generates an attribute private key for the corresponding attribute set of the data user; S403: The trusted authority issues an attribute private key, a replacement search key, and a verification key to the data user.

[0014] In some embodiments, step S500 includes: S501: The data user selects a keyword to be queried, and then encrypts the keyword using a replacement search key issued by a trusted authority to generate a search token; S502: The data user sends the generated search token to the search contract.

[0015] In some embodiments, step S600 includes: sending a search token sent by a data user to a search contract, calling a smart contract, and passing the search token to a cloud server for a wildcard search; if the data user does not have sufficient balance to pay, the system rolls back.

[0016] In some embodiments, step S700 includes: S701: For the search token, check whether there is a ? bit by bit, convert the ? into 0 and i respectively, and then store the converted encrypted keywords in a set; S702: Wildcard search; S703: Send the wildcard search result of S702 to the search contract and the storage structure respectively, and the storage structure performs a document search according to each element of the wildcard search result; S704: Send the searched ciphertext document set and message verification code set to the verification contract.

[0017] In some embodiments, step S800 includes: S801: The search contract receives the search token sent by the cloud server and performs a search; S802: Wait for the encrypted keyword set for fuzzy search sent by the server, then search the encrypted keywords in the array bit by bit, and return the ciphertext of the searched symmetric key to the data user.

[0018] In some embodiments, step S900 includes: the data user sends the verification key and the verification contract address to the verification contract, and the cloud server calls the verification key in the contract. The function passes in a message verification code set and a ciphertext document set, and uses a smart contract to verify the correctness of the result returned by the cloud server.

[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) Through the improved unbalanced structure UBBT, only one node of each layer needs to be constructed each time, which significantly saves space. At the same time, the bitmap of the root node is evenly divided to ensure the consistency of the search at each layer.

[0020] (2) By using the TCBF structure, leaf nodes can usually be accessed directly, effectively reducing repeated searches of the tree structure.

[0021] (3) The block dictionary updated by the improved binary search results clarifies the search range of the block corresponding to each leaf node. At the same time, using a string as a key has a wider range than encoding it into a number. At the same time, the records corresponding to each length UBBT are stored in the same dictionary, and block search is performed during the search, which makes the function more flexible. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The model and process of the method of the present invention; Figure 2 It is a schematic diagram of the structure of a two-bit counting Bloom filter-unbalanced binary bitmap tree TCBF-UBBT. DETAILED DESCRIPTION

[0023] The present invention integrates blockchain and CP-ABE technology, and designs a verifiable wildcard ciphertext retrieval scheme based on TCBF-UBBT. This scheme provides identity authentication function while ensuring the confidentiality and integrity of data during the search process, and improves the search efficiency. It is suitable for realizing wildcard search in one-to-many application scenarios.

[0024] like Figure 1 As shown in the figure, it mainly includes the following five entities: Data Owner (DO), Data User (DU), Cloud Service Provider (CSP), Trusted Authority (TA), Blockchain (BC) (1) TA: TA is fully trustworthy and is responsible for generating the system's public parameters and master private key, and generating the corresponding attribute private key based on the attributes of the DU.

[0025] (2) CSP: CSP is semi-honest and curious, has strong computing and storage capabilities, and provides data storage and access functions.

[0026] (3) BC: BC is completely trustworthy. The content stored on the chain will not be modified. It is responsible for storing and verifying data.

[0027] (4) DO: DO is honest and trustworthy. It is responsible for setting the access control policy with encrypted data, encrypting the data according to this policy, uploading it to CS, and setting a trapdoor to send it to the search contract for storage.

[0028] (5) DU: DU is untrusted and is responsible for generating encryption keys for edge node conversions; it verifies whether the user identity is legitimate and can only decrypt the ciphertext when the attributes meet the access control policy of DO.

[0029] A verifiable wildcard ciphertext retrieval method based on TCBF-UBBT includes: S100: The trusted authority generates public parameters and a master private key according to system security parameters.

[0030] Specifically, step S100 includes: S101: Construct a multiplication cyclic group.

[0031] definition , yes Two multiplicative cyclic groups on , with order p being a large safe prime number, let g be the group The generator of bilinear map .

[0032] S102: Select two hash functions.

[0033] The selected hash functions are collision-resistant hash functions and pseudorandom functions , .

[0034] S103: Select a random number ,calculate .

[0035] S104: Generate public parameters PK and master private key MK.

[0036] .

[0037] S200: The data owner calculates the correlation between the extracted keywords and the corresponding documents to form a score set, encrypts the documents with a symmetric key to generate a ciphertext document set, and encrypts the ciphertext document with a verification key to generate a message verification code; encrypts the keywords with a replacement key to form a keyword set, constructs an access control tree to encrypt the symmetric key, and generates a table structure index of the encrypted keyword-symmetric key ciphertext. The verification key and replacement key are passed to the trusted authorization agency, the score set, ciphertext document set, message verification code set, and keyword set are passed to the cloud server, and the index structure is passed to the blockchain.

[0038] Specifically, step S200 includes: S201: Rating calculation DO Adoption Algorithm, for the plaintext document set A document in , for the extracted keyword set A keyword and Documentation The correlation score is calculated according to the following formula.

[0039] In the formula, Indicates keywords In the documentation The number of times it appears in Representation Document The total number of words in, n represents the document set The number of documents contained in ; Represents a collection of documents Contains keywords The number of documents; and and the score of a document .

[0040] S202: Document Encryption DO randomly selects a symmetric key As a symmetric encryption key for plaintext documents, use Encrypted Document ,get , when all documents are encrypted, an encrypted document set C is formed.

[0041] After the document is encrypted, the corresponding score Change to Indicates that all Constructing the document scoring set .

[0042] S203: Message verification code generation DO randomly selects a verification key For encrypted documents After the operation, the verification code set is generated .

[0043] S204: Constructing a Trapdoor Select pseudo-random permutation function . Pseudo-random permutation key .

[0044] The feature array is constructed for the keywords in the keyword set as follows: establish a 1-1 mapping relationship between characters and numbers, map numbers 0-9 to 1-10, English letters a-z to 11-36, and wildcards ? to ?. According to this mapping relationship, the keywords The keywords in are mapped bit by bit to obtain the feature array ; Perform pseudo-random permutation encryption on the feature array ; The feature array can be converted into a string, the value of each bit can be extracted, and a 1-1 mapping relationship between the array characters and the string characters can be established. Characters 1-10 can be mapped separately. , characters 11-36 are mapped to , the wildcard character ? is mapped to ?, concatenated into a string, remember the conversion ,For example: ,but .

[0045] The specific encryption details are as follows: For feature arrays , for each layer, select the key , for Perform pseudo-random permutation in the permutation space composed of , the encrypted feature array , through conversion, to form the converted encrypted keywords , forming an encrypted keyword set .

[0046] S205: Symmetric key encryption For the key ,DO defines the access structure tree , first start from the root node r of the tree Each node x is assigned an order The polynomial (Leaf nodes is a constant), let Represents the threshold value of node x, set , starting from the root node r of the tree, DO randomly selects , set the , then select random coefficients to determine the polynomial; for any node x, set , then from Select coefficients to determine the polynomial , let Y represent the access structure tree For all leaf nodes in , DO calculates the key The encrypted ciphertext, where s is the attribute value of the random number As shown in the formula: .

[0047] S206: Index Generation DO for each keyword set Each keyword in the calculation , DO will , Send the transaction to the search contract address and , calling the smart contract Function stores security index. If the DO account does not have enough money to pay , system rollback, For the fees collected.

[0048] The search contract defines a lookup table I, which allows efficient location and search of ciphertext information. Each entry in the lookup table is associated with a keyword and contains a key-value pair table. , where the field Used to locate entries in the lookup table, fields Used to obtain ciphertext information, give a , it will immediately return the corresponding Domain, command , , can be obtained ,in .

[0049] The index structure here is<address,value> The table is constructed, and the specific method of generating Tran(fsk(Twj)) is in S204, and the generation of CK1 is in S205. The specific index structure is a structure in which a string is used as an address to find the corresponding value, but both address and value are strings. The implementation is similar to a data structure such as a map.

[0050] S207: Data transmission DO will ciphertext document set C, message verification code set , document scoring set , Encrypted Keyword Set Upload to CSP.

[0051] DO uploads the security index I to the search contract.

[0052] S300: The cloud server constructs an OBBT-UBBT storage structure to store the ciphertext, message verification code and document score corresponding to the keyword.

[0053] Specifically, step S300 includes: S301: Update UBBT storage structure; a) UBBT search structure initialization; Set up a collection Records the existence of a UBBT of a specific length. ,in and As pointers to the left subtree and the right subtree respectively; For a given set of encrypted keywords, first determine each encrypted keyword in the set one by one, according to The relationship is converted into an encrypted feature array, and the length of the array is determined to be l , then the height of the binary tree that needs to be constructed or updated is l , if the set Does not exist , then this l As Store in a collection and set ; For each encrypted feature array, find its length l correspond The location is the root node, recorded as layer 0, initialize an empty string, recorded as the binary search record ; Start constructing the subtree, each child node is an 18-bit bitmap: First construct the first layer of nodes; according to the encrypted feature array The i-th position in Value, where ,if ,but , and determine whether the left node of the first layer exists: If it exists, then the left node of the first layer The position is set to 1; if it does not exist, you need to initialize an 18-bit all-0 bitmap to link to the left subtree pointer of the root node, set the left and right pointers of the node to null, and then set the left node of the first layer Position is set to 1; if ,but , and determine whether the right node of the first layer exists. If it exists, then the right node of the first layer The position is set to 1; if it does not exist, initialize an 18-bit bitmap with all 0 values ​​to link to the right subtree pointer of the root node, set the left and right pointers of the node to NULL, and then the right node at the first level The position is set to 1.

[0054] Similarly, according to the encrypted feature array The i-th position in Value, where ,if ,but , and determine whether the left node of the i-th layer exists: If it exists, then the left node of the i-th layer The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all 0 values ​​to link to the left subtree pointer of the i-1 layer node, and set the left and right pointers of the node to empty, then the left node in the i-th layer Position is set to 1; if ,but , and determine whether the right node of the i-th layer exists. If so, then the right node of the i-th layer The position is set to 1; if it does not exist, you need to initialize an 18-bit all-0 bitmap to link to the right subtree pointer of the i-1 layer node, and set the left and right pointers of the node to NULL, then the right node at the i-th layer will be The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is cascaded at the last layer; S302: construct a BSBD subtree; At a) the UBBT search structure is initialized, corresponding to each , an empty dictionary is created for it, and the keys of the dictionary are sorted from small to large; when the b) subtree construction is executed to the leaf node, if the leaf node is an old node, it is directly added On the contrary, if the leaf node is a newly generated node, you need to add , the left pointer of the leaf node points to this position, according to the mapping rule of converting 0 to h and i to z, Mapping bit by bit ,join in , the right pointer of the leaf node points to this position, add ; S303: Setting a two-bit counting Bloom filter TCBF; After each execution of S302, the obtained Input to the counting Bloom filter, there are three cases mapped to the set flag: marked as 0, marked as 1, and marked as 2. The preset operations performed at this time are as follows: When the mark is 0: it means that this bit has never had a hash collision, and an add 1 operation is performed on this bit, that is, this bit can be directly cascaded to the leaf node; When the mark is 1: it means that this bit has been mapped before. Check whether the record pointed to by the left pointer of the cascade leaf node is If not, add 1 to this bit; a hash collision occurs in this mapping, which means that this bit can no longer uniquely represent the information corresponding to a feature array, and the link between this bit and the storage set array is released; When the mark is 2: it means that a hash collision has occurred before this bit, and it is impossible to uniquely represent the information corresponding to a feature array; S304: Document storage Set up an inverted index, setting the key to , the corresponding value range is set to the storage set array , and maintain a sorting algorithm, that is, each time the array is modified, it is sorted according to the document score Sort the entire storage set of documents from largest to smallest to ensure that documents with higher scores are accessed first.

[0055] S400: The trusted authority generates a corresponding attribute private key according to the registration request information provided by the user, and forwards the attribute private key, the verification key and the replacement key to the user.

[0056] Specifically, step S400 includes: S401: Request for registration When a user DU sends a registration request, TA authenticates the user's identity.

[0057] S402: Key Generation TA generates attribute private key for the corresponding attribute set S of user DU. , TA chooses , and for , TA selects , calculate the corresponding attribute private key, as shown in the formula .

[0058] S403: Key issuance TA issues attribute private key to DU , Replace search key , Verify key .

[0059] S500: The user wants to search for documents corresponding to a keyword, uses a replacement key to encrypt the queried keyword for search, and passes the encrypted keyword to the search contract.

[0060] Specifically, S500 includes: S501: Generate a search token DU selects the keyword w to be queried, and then uses the replacement search key issued by TA Encrypt keyword w and generate search token .

[0061] S502: Token sending DU sends the generated search token to the search contract.

[0062] S600: The blockchain receives keywords to be queried from the user and transmits the encrypted keywords to the cloud server for wildcard search.

[0063] Specifically, step S6 includes: Search token sent by DU . Send it to the search contract, call the smart contract, and send the search token Passed to CSP for wildcard search; if DU does not have enough balance to pay , the system rolls back.

[0064] S700: The cloud server matches the TCBF-UBBT storage structure according to the encrypted keywords to obtain the keyword set and searches for the corresponding ciphertext document and message verification code, sends the keyword set to the search contract, and sends the corresponding ciphertext document and message verification code to the verification contract.

[0065] Step S700 includes: S701: Wildcard keyword expansion for , check whether ? exists bit by bit, convert ? into 0 and i respectively, for example: 202? is converted into 2020 and 202i, and then the converted encrypted keywords are stored in a set.

[0066] S702: Wildcard search The document search algorithm is composed of Query and Matching and Subinterval search composition.

[0067] a ) Query Set up a mapping relationship. Mapping , Mapping , take out the encrypted keywords from the set one by one, perform the above mapping transformation bit by bit, and input the transformation result into the two-bit counting Bloom filter There are three situations when you query: I) Marked as 0: indicates that the record corresponding to this keyword no longer exists and is returned directly .

[0068] II) Marked as 1: This indicates that there has been no hash collision at this bit. This bit is directly accessed through the link to directly cascade the leaf node, and then proceed according to c) Subrange search.

[0069] III) Marked as 2: This means that this bit has a hash collision and needs to be accessed structure, according to the layer-by-layer matching algorithm.

[0070] b ) match First determine the length of the array l’ , then you need to search for a height of l’ Binary tree of ; then compare the sets If it does not exist in the collection , it proves that there is no keyword of this length. On the contrary, if it is found , start matching as follows.

[0071] Initialize an empty string and record it as a binary search record First, match the first layer nodes; according to the encrypted feature array No. 1 in Value, if , determine whether the left node of the first layer exists: if it exists, then determine the left node of the first layer Is the position 1? If the result is 1, then , if the left node does not exist, then the keyword does not exist; if , determine whether the right node of the first layer exists, if it exists, then determine the right node of the first layer Is the position 1? If the result is 1, then , if the right node does not exist, then the keyword does not exist.

[0072] Similarly, according to the encrypted feature array The i-th position in Value, if , determine whether the left node of the i-th layer exists: if it exists, then determine the left node of the i-th layer Is the position 1? If the result is 1, then , if the left node does not exist, then the keyword does not exist; if , determine whether the right node of the first layer exists, if it exists, then determine the right node of the i-th layer Is the position 1? If the result is 1, then If the right node does not exist, the keyword does not exist; until the leaf node is found, then proceed to c) Subrange search.

[0073] c ) Subrange Search For each keyword that is searched for a leaf node, enter the cascade of the leaf node. Search within the subrange. The character ? is equivalent to any character from az to 0-9. For example, ab? can match ab0, ab1, ab2, ..., abz. Then search and match according to the key value. If the match is successful, check whether the value is 1. If it is 1, add the string corresponding to the key to a set. inside.

[0074] S800: The blockchain search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword on the index according to the keyword set, and passes the ciphertext of the symmetric key to the user.

[0075] Step S800 includes: S801: Index query The search contract receives the search token sent by the CSP to search.

[0076] S802: The result is sent.

[0077] Waiting for the encrypted keyword set for fuzzy search sent by the server , and then search the encryption keywords in the array bit by bit, and convert the ciphertext of the searched symmetric key into Return to DU.

[0078] S900: The blockchain verification contract performs integrity verification based on the user's verification key, the cloud server's ciphertext document, and the message verification code.

[0079] Step S900 includes: DU will verify the key And verify the contract address Sent to the verification contract, CSP calls the contract Function passes in message verification code set And the redacted document set , use smart contracts to verify the correctness of the results returned by CSP, let It represents the verification contract deposit. It is verified by verifying the contract. DU does not need to verify it by itself, which reduces the user's computing overhead.

[0080] S1000: The user uses the attribute key to decrypt the symmetric key according to the access policy tree, and uses the symmetric key to decrypt the document plaintext.

[0081] Step S10 includes: DU receives the key ciphertext After that, check your own private key Whether the access strategy tree defined by DO is satisfied , through a bottom-up recursive algorithm, decrypt the attribute value of the root node: a) First solve the attribute value of the leaf node: b) For non-leaf nodes x, for all child nodes z of x, call And save the output as ,make For any A set of child nodes z of size . If such a set does not exist, the node does not satisfy the condition and returns .

[0082] The specific calculation is as follows. The Lagrangian coefficient of each sub-node is as follows: Calculate the attribute value of node x through its child nodes: c) Symmetric key decryption The root node attribute calculated recursively is recorded as , calculate the symmetric key Symmetric key obtained by DU decryption , using a symmetric key Decrypt documents in a ciphertext document set Get the set of plaintext documents containing the query keywords .

Claims

1. A verifiable wildcard ciphertext retrieval method based on TCBF-UBBT, characterized in that: include: S100: The trusted authority generates public parameters and a master private key according to the system security parameters; S2 00: The data owner calculates the correlation between the extracted keywords and the corresponding documents to form a score set, encrypts the documents with symmetric keys to generate a ciphertext document set, encrypts the ciphertext documents with verification keys to generate message verification codes, encrypts the keywords with replacement keys to form a keyword set, constructs an access control tree to encrypt the symmetric keys, and generates a table structure index of encrypted keywords-symmetric key ciphertexts; passes the verification key and replacement key to the trusted authorization agency, passes the score set, ciphertext document set, message verification code set, and keyword set to the cloud server, and passes the index structure to the search contract; S300: The cloud server constructs a storage structure to store the ciphertext, message verification code, and document score corresponding to the keyword; S400: The trusted authority generates a corresponding attribute private key according to the registration request information provided by the user, and forwards the attribute private key, the verification key and the replacement key to the user; S500: The user wants to search for documents corresponding to a keyword, uses a replacement key to encrypt the queried keyword for search, and passes the encrypted keyword to the search contract; S600: The search contract receives the keywords to be queried from the user and transmits the encrypted keywords to the cloud server for wildcard search; S700: The cloud server obtains a keyword set according to the encrypted keyword matching storage structure and searches for the corresponding ciphertext document and message verification code, sends the keyword set to the search contract, and sends the corresponding ciphertext document and message verification code to the verification contract; S800: The blockchain search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword on the index according to the keyword set, and transmits the ciphertext of the symmetric key to the user; S900: The blockchain verification contract performs integrity verification based on the user's verification key, the cloud server's ciphertext document, and the message verification code; S1000: The user uses the attribute key to decrypt the symmetric key according to the access policy tree, and uses the symmetric key to decrypt the document plaintext.

2. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1 is characterized in that: The step S100 includes: S101: Constructing multiplicative cyclic groups and ; S102: Select two hash functions and ; S103: Select a random number ,calculate . S104: Exploitation and , and , , , as well as Generate public parameters PK and master private key MK.

3. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S200 includes: S201: The data owner scores the correlation between a keyword in the extracted keyword set and a document in the plaintext document set: S202: The data owner randomly selects a symmetric key as the symmetric encryption key of the plaintext document, encrypts the document, and forms an encrypted document set when all documents are encrypted. After the documents are encrypted, the corresponding scores form a document score set; S203: The data owner randomly selects a verification key to perform encryption operation on the ciphertext document to generate a message verification code set; S204: Encrypt the keywords using the replacement key to form a keyword set; S205: For symmetric keys, the data owner defines an access structure tree , let Y represent the access structure tree For all leaf nodes in the data, the data owner calculates the ciphertext encrypted with the symmetric key; S206: Index generation; S207: The data owner uploads the ciphertext document set, message verification code set, document score set, and encrypted keyword set to the cloud server; the data owner uploads the table structure index to the search contract; the data owner sends the replacement key and verification key to the trusted authorization agency.

4. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S300 includes: S301: Update UBBT storage structure; a) UBBT search structure initialization; Set up a collection Records the existence of a UBBT of a specific length. ,in and As pointers to the left subtree and the right subtree respectively; For a given set of encrypted keywords, first determine each encrypted keyword in the set one by one, according to The relationship is converted into an encrypted feature array, and the length of the array is determined to be l , then the height of the binary tree that needs to be constructed or updated is l , if the set Does not exist , then this l As Store in a collection and set ; For each encrypted feature array, find its length l correspond The location is the root node, recorded as layer 0, initialize an empty string, recorded as the binary search record ; Start constructing a subtree, each child node is an 18-bit bitmap: according to the encrypted feature array The i-th position in Value, where ,if ,but , and determine whether the left node of the i-th layer exists: If it exists, then the left node of the i-th layer The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all 0 values ​​to link to the left subtree pointer of the i-1 layer node, and set the left and right pointers of the node to empty, then the left node in the i-th layer Position is set to 1; if ,but , and determine whether the right node of the i-th layer exists. If so, then the right node of the i-th layer The position is set to 1; if it does not exist, you need to initialize an 18-bit all-0 bitmap to link to the right subtree pointer of the i-1 layer node, and set the left and right pointers of the node to NULL, then the right node at the i-th layer will be The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is cascaded at the last layer; S302: construct a BSBD subtree; At a) the UBBT search structure is initialized, corresponding to each , an empty dictionary is created for it, and the keys of the dictionary are sorted from small to large; when the b) subtree construction is executed to the leaf node, if the leaf node is an old node, it is directly added On the contrary, if the leaf node is a newly generated node, you need to add , the left pointer of the leaf node points to this position, according to the mapping rule of converting 0 to h and i to z, Mapping bit by bit ,join in , the right pointer of the leaf node points to this position, add ; S303: Setting a two-bit counting Bloom filter TCBF; After each execution of S302, the obtained Input to the counting Bloom filter, there are three cases mapped to the set flag: marked as 0, marked as 1, and marked as 2. The preset operations performed at this time are as follows: When the mark is 0: it means that this bit has never had a hash collision, and an add 1 operation is performed on this bit, that is, this bit can be directly cascaded to the leaf node; When the mark is 1: it means that this bit has been mapped before. Check whether the record pointed to by the left pointer of the cascade leaf node is If not, add 1 to this bit; a hash collision occurs in this mapping, which means that this bit can no longer uniquely represent the information corresponding to a feature array, and the link between this bit and the storage set array is released; When the mark is 2: it means that a hash collision has occurred before this bit, and it is impossible to uniquely represent the information corresponding to a feature array; S304: Set an inverted index, set the key to the encrypted keyword, and set the corresponding value range to the storage set array. Each time the array is modified, sort the entire storage set documents from large to small according to the document score.

5. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S400 includes: S401: When a data user sends a registration request, a trusted authority authenticates the user's identity; S402: The trusted authority generates an attribute private key for the corresponding attribute set of the data user; S403: The trusted authority issues an attribute private key, a replacement search key, and a verification key to the data user.

6. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S500 includes: S501: The data user selects a keyword to be queried, and then encrypts the keyword using a replacement search key issued by a trusted authority to generate a search token; S502: The data user sends the generated search token to the search contract.

7. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S600 includes: sending the search token sent by the data user to the search contract, calling the smart contract, and passing the search token to the cloud server for wildcard search; if the data user does not have enough balance to pay, the system rolls back.

8. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S700 includes: S701: For the search token, check whether there is a ? bit by bit, convert the ? into 0 and i respectively, and then store the converted encrypted keywords in a set; S702: Wildcard search; S703: Send the wildcard search result of S702 to the search contract and the storage structure respectively, and the storage structure performs a document search according to each element of the wildcard search result; S704: Send the searched ciphertext document set and message verification code set to the verification contract.

9. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1 is characterized in that: The step S800 includes: S801: The search contract receives the search token sent by the cloud server and performs a search; S802: Wait for the encrypted keyword set for fuzzy search sent by the server, then search the encrypted keywords in the array bit by bit, and return the ciphertext of the searched symmetric key to the data user.

10. The TCBF-UBBT-based verifiable wildcard ciphertext retrieval method according to claim 1, characterized in that: The step S900 includes: the data user sends the verification key and the verification contract address to the verification contract, and the cloud server calls the verification key in the contract. The function passes in a message verification code set and a ciphertext document set, and uses a smart contract to verify the correctness of the result returned by the cloud server.

Citation Information

Patent Citations

  • Searchable encryption method based on wildcard character in cloud storage safety

    CN107256248A

  • Searchable encryption method and system for supporting fuzzy retrieval of word morphology and word meaning in cloud environments

    CN108712366A

  • Multi-keyword sorting searchable encryption method and device, equipment and storage medium

    CN113094573A

  • Multi-dimensional data encryption range query method and device, storage medium and electronic equipment

    CN117494174A

Cited By

  • Multi-keyword searchable encryption method and system based on block chain

    CN120124089A

  • Blockchain-based multi-keyword searchable encryption method and system

    CN120124089B

  • Quantum key-based searchable encrypted document management method and device, and medium

    CN121456916A