A verifiable wildcard ciphertext retrieval method based on TCBF-UBBT

The TCBF-UBBT verifiable wildcard ciphertext retrieval method solves the problems of insufficient storage space and search efficiency in existing solutions, and realizes efficient wildcard search and data integrity verification, which is suitable for data retrieval in cloud computing mode.

CN118690073BActive Publication Date: 2026-08-25TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing wildcard searchable encryption schemes cannot simultaneously achieve low storage overhead and search efficiency, nor can they meet users' needs for retrieving long keywords.

Method used

The method employs a verifiable wildcard encrypted retrieval method based on TCBF-UBBT. Public parameters and master private keys are generated by a trusted authorized institution. Data owners encrypt and construct indexes, which are then stored and searched on cloud servers. The blockchain is used for verification, and users decrypt documents using attribute private keys. This approach achieves data confidentiality and integrity while improving search efficiency.

Benefits of technology

While ensuring data confidentiality and integrity, the improved UBBT structure and TCBF filter reduce storage space and search time, support efficient wildcard search, and are suitable for one-to-many application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690073B_ABST
    Figure CN118690073B_ABST
Patent Text Reader

Abstract

The application belongs to the field of cloud computing mode security, and particularly relates to a verifiable wildcard ciphertext search method based on TCBF-UBBT. The method comprises the following steps: S100, a trusted authority generates public parameters and a main private key according to system security parameters; S200, a verification key and a permutation key are transmitted to the trusted authority; S300, a cloud server constructs a storage structure; S400, corresponding attribute private keys are generated; S500, the queried keyword is encrypted by using the permutation key for searching; S600, the encrypted keyword is transmitted to the cloud server for wildcard search; S700, the cloud server matches the storage structure according to the encrypted keyword to obtain a keyword set and search for corresponding ciphertext documents and message authentication codes; S800, a search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword on the index according to the keyword set; S900, a blockchain verification contract performs integrity verification; S1000, a user decrypts the symmetric key according to an access policy tree by using the attribute key, and uses the symmetric key to decrypt the document plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cloud computing security, specifically a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT. Background Technology

[0002] The "on-demand service" business model offered by cloud services boasts advantages such as high reliability, flexible configuration, and low cost, attracting many users to outsource their data to cloud service platforms. However, this outsourcing also separates data ownership from management, leading to significant threats to user privacy. Encrypted text retrieval technology provides a method for cloud service platforms to perform keyword retrieval on encrypted text while ensuring data and query confidentiality. Wildcard searchable encryption is a crucial component of fuzzy keyword retrieval, allowing users to use wildcards to represent uncertain characters in query keywords. Traditional wildcard searchable encryption schemes urgently need optimization in terms of keyword storage, encrypted retrieval efficiency, and meeting user retrieval needs. To address this, domestic and international researchers have optimized keyword storage methods, encrypted retrieval time overhead, and retrieval function expansion, attempting to design efficient and secure encrypted 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-based index. 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 and Information Technology, 2023, 45(04):1346-1355.); Zhao Bo proposed an OBBT (Ordered Binary Bitmap) scheme. The Tree (ordered binary bitmap tree) structure, combined with the constructed OBBT structure, achieves a wildcard searchable encryption scheme with no false positives and sublinear time through order-preserving encryption and hexadecimal encoding (Zhao Bo. Research on Encryption Schemes Supporting Inexact Keyword Search [D]. Shandong University, 2023).

[0004] (2) Efficiency of encrypted text retrieval: Wang Lai et al. designed a fast search method based on Bloom filter and B+ tree. This method has high spatial filtering characteristics and can achieve a filtering efficiency of 99% without decryption (Wang Lai, Zhou Tengda, Wang Zhengfei, et al. Electronic medical record encrypted text search based on Bloom filter and B+ tree 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 their logical independence. The method of binary data name lookup (HyBS) assisted by HyCBF is used to achieve efficient lookup, which has obvious advantages in lookup performance and update speed, and also improves storage efficiency (Xu Ke, Li Yanbiao, Xie Gaogang, et al. Efficient data name lookup 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 respectively 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 Microcomputer 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 Boolean search, with sublinear search time in terms of the number of keywords, and attempted 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 achieve 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 the need for wildcard search, eliminating redundant parameters and additional complex calculations, and 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, while wildcard searchable encryption mechanisms have made significant progress, current solutions still cannot simultaneously achieve low storage overhead and high search efficiency; furthermore, they cannot meet users' needs for retrieving long keywords. Summary of the Invention

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

[0008] This invention adopts the following technical solution: a verifiable wildcard ciphertext retrieval method based on TCBF-UBBT, comprising: S100: The trusted authorized agency generates public parameters and a master private key based on the system security parameters; S200: The data owner calculates the relevance between extracted keywords and corresponding documents to form a score set, encrypts documents using a symmetric key to generate a ciphertext document set, encrypts ciphertext documents using a verification key to generate a message verification code, encrypts keywords using a substitution key to form a keyword set, constructs an access control tree to encrypt the symmetric key, and generates a table structure index of encrypted keywords-symmetric key ciphertext; the verification key and substitution key are passed to a trusted authorization authority, 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 search contract; S300: The cloud server constructs a storage structure to store the encrypted text corresponding to keywords, message verification codes, and document ratings; S400: The trusted authorization authority generates the corresponding attribute private key based on the registration request information provided by the user, and forwards the attribute private key, verification key and replacement key to the user; S500: When a user wants to search for a document corresponding to a certain keyword, the user encrypts the keyword using a substitution key and then sends the encrypted keyword to the search contract. S600: The blockchain receives keywords sent by users for querying and transmits the encrypted keywords to the cloud server for wildcard search; S700: The cloud server obtains a keyword set by matching the encrypted keywords with the storage structure, searches for the corresponding encrypted document and message verification code, sends the keyword set to the search contract, and sends the corresponding encrypted 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 in the index based on 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 encrypted 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 plaintext of the document.

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

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

[0011] In some embodiments, step S200 includes: S201: The data owner scores the degree of relevance between a specific keyword in the extracted keyword set and a specific document in the plaintext document set. S202: The data owner randomly selects a symmetric key as the symmetric encryption key for the plaintext document, encrypts the document, and forms an encrypted document set after all documents are encrypted. The corresponding scores of the encrypted documents constitute a document score set. S203: The data owner randomly selects a verification key to perform encryption operations on the encrypted document and generates a message verification code set; S204: Use the substitution key to encrypt keywords to form a keyword set; S205: For symmetric keys, the data owner defines the access structure tree. Let Y represent the access tree structure. In all leaf nodes, the data owner calculates the ciphertext encrypted with the symmetric key; S206: Index generation; S207: The data owner uploads the encrypted document set, message verification code set, document rating 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 a trusted authorized agency.

[0012] In some embodiments, step S300 includes: S301: Update UBBT storage structure; a) Initialize the UBBT search structure; Set a collection A UBBT of a specific length already exists, and its ,in and These serve as pointers to the left and right subtrees, respectively. Given a set of encrypted keywords, first, examine each encrypted keyword in the set one by one, according to... The relation is converted into an encrypted feature array, and the array length is determined. l The height of the binary tree that needs to be constructed or updated is... l If set It does not exist in Then this l As Store in a collection and set ; For each array of encrypted features, find the one with length [missing information]. l correspond The current location is the root node, denoted as level 0. An empty string is initialized and denoted as the binary search record. ; Begin constructing the subtree, where each child node is an 18-bit bitmap: based on the encrypted feature array. The i-th position Value, of which ,if ,but And determine if the left node of the i-th level exists: if it exists, then the left node of the i-th level... The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all zeros and link it to the left subtree pointer of the (i-1)th level node, then set the left and right pointers of that node to null, and then the left node at level i... The position is set to 1; if ,but And determine if the right node of the i-th level exists. If it exists, then the right node of the i-th level... The position is set to 1; if it does not exist, an 18-bit bitmap with all zeros needs to be initialized first and linked to the right subtree pointer of the node at level i-1. The left and right pointers of this node are then set to null, and the right node at level i will be... The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is concatenated in the last layer; S302: Construct the BSBD subtree; While initializing the UBBT search structure in a) corresponding to storing each... If so, create an empty dictionary, sorting the keys in ascending order; when subtree construction reaches a leaf node (b), if the leaf node is an old node, add it directly. Conversely, if the leaf node is a newly generated node, then it needs to be added. 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, the left pointer of the leaf node will... Bitwise mapping ,join in The right pointer of the leaf node points to this position; add... ; S303: Set a two-digit counting Bloom filter (TCBF); After each execution of S302, the result will be... When input into a counting Bloom filter, there are three possible values ​​for the set flag: 0, 1, or 2. The preset operation performed in this case is as follows: When marked as 0: it means that this bit has never had a hash collision. Incrementing 1 on this bit means that this bit can be directly cascaded to a leaf node. When marked as 1: This means that this bit has already been mapped before. Check if the record pointed to by the left pointer of the cascaded leaf node is... If not, increment this bit by 1; this time a hash collision occurs, which means that this bit can no longer uniquely represent the information corresponding to a feature array, so release the link of this bit to the storage set array; When marked as 2: it means that this bit has previously caused a hash collision and cannot uniquely represent the information corresponding to a feature array; S304: Set up an inverted index, set the key to the encrypted keyword, and set the corresponding value range to the storage set array. Whenever the array is modified, sort the documents in the entire storage set from largest to smallest according to the document score.

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

[0014] In some embodiments, step S500 includes: S501: Data users select the keywords to be queried, and then use the substitution search key issued by a trusted authorized agency to encrypt the keywords and 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 the data user to the search contract, invoking the smart contract to pass the search token to the cloud server for wildcard search; and rolling back the system if the data user does not have sufficient balance to pay.

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

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

[0018] In some embodiments, step S900 includes: the data user sending the verification key and the verification contract address to the verification contract, and the cloud server calling the function in the contract. The function takes a set of message verification codes and a set of encrypted documents as input, and uses a smart contract to verify the correctness of the results returned by the cloud server.

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

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

[0021] (3) The block dictionary updated by the results of the improved binary search clarifies the search range of the block corresponding to each leaf node. At the same time, using strings as keys is wider than encoding them as numbers. Also, the records corresponding to each length UBBT are stored in the same dictionary. Block search is performed during the search, making the function more flexible. Attached Figure Description

[0022] Figure 1 This describes the model and process of the method of the present invention; Figure 2 This is a schematic diagram of the structure of a two-bit counting Bloom filter-unbalanced binary bitmap tree (TCBF-UBBT). Detailed Implementation

[0023] This invention integrates blockchain and CP-ABE technologies to design a verifiable wildcard encrypted retrieval scheme based on TCBF-UBBT. This scheme ensures the confidentiality and integrity of data during the search process, provides authentication functionality, and improves search efficiency. It is suitable for wildcard search in one-to-many application scenarios.

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

[0025] (2) CSP: CSP is semi-honest and curious, with powerful computing and storage capabilities, providing 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 the data.

[0027] (4) DO: The DO is honest and trustworthy, responsible for setting up access control policies for encrypted data, encrypting the data according to the policy, uploading it to CS, and setting trapdoors to send it to the search contract for storage.

[0028] (5) DU: DU is untrusted and is responsible for generating the encryption key for the transformation of edge nodes; it verifies whether the user's identity is legitimate and can only decrypt the ciphertext if the attributes meet the access control policy of DO.

[0029] Verifiable wildcard ciphertext retrieval methods based on TCBF-UBBT include: S100: Trusted authorized agencies generate public parameters and master private keys based on system security parameters.

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

[0031] definition , yes Let g be a group of two multiplicative cyclic groups, with order p being a large safe prime. The generators are defined as bilinear mappings. .

[0032] S102: Select two hash functions.

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

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

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

[0036] .

[0037] S200: The data owner calculates the relevance between extracted keywords and corresponding documents to form a score set; encrypts 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 keywords using a substitution key to form a keyword set; constructs an access control tree to encrypt the symmetric key; and generates a table structure index of encrypted keywords-symmetric key ciphertext. The verification key and substitution key are then transmitted to a trusted authorization authority, the score set, ciphertext document set, message verification code set, and keyword set are transmitted to the cloud server, and the index structure is transmitted to the blockchain.

[0038] Specifically, step S200 includes: S201: Scoring Calculation DO adopts Algorithm, for plaintext document sets A document in China For the already extracted keyword set A certain keyword and documents The score for the degree of relevance is calculated according to the following formula.

[0039] In the formula, Keywords In the document The number of times it appears in; Document The total number of words in the document set, where n represents the document set. The number of documents contained therein; Represents a collection of documents Contains keywords The number of documents; and And the rating of a particular document .

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

[0041] The corresponding rating will be encrypted after the document is encrypted. Change to It means that all Composition of document rating set .

[0042] S203: Message Verification Code Generation DO randomly selects the verification key Perform on encrypted documents After the operation, a set of decryption codes is generated. .

[0043] S204: Constructing a trapdoor Selecting a pseudo-random permutation function Pseudo-random key permutation .

[0044] Construct a feature array for the keywords in the keyword set as follows: Establish a 1-to-1 mapping between characters and numbers, mapping numbers 0-9 to 1-10 respectively, English letters a, b, and c to 11-36 respectively, and wildcards ? to ?. Based on this mapping, assign the keywords... The keywords in the array 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, each digit can be extracted, and a 1-to-1 mapping relationship can be established between the array characters and the string characters, mapping characters 1-10 respectively. Characters 11-36 are mapped to... The wildcard '?' is mapped to '?', concatenated into a string, and then converted to '?'. ,For example: ,but .

[0045] The specific encryption details are as follows: For feature array Select a key for each layer For those by Pseudo-random permutations are performed within the permutation space to make... The encrypted feature array Through conversion, the encrypted keywords are formed. This constitutes a set of encrypted keywords. .

[0046] S205: Symmetric Key Encryption For the key DO defines the access tree structure First, start the tree from the root node r. Each node x is assigned an order polynomials for (leaf nodes) (where 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 selection Then select from them The polynomial is determined by a set of random coefficients; for any node x, set... Then from Select The coefficients determine the polynomial. Let Y represent the access tree structure. DO computes the key for all leaf nodes. The encrypted ciphertext, in the following formula, has s as the attribute value of the random number. As shown in the formula: .

[0047] S206: Index Generation DO for each keyword set Calculate each keyword in DO will , Send the transaction to the search contract address and Calling smart contracts The function stores a secure index if the DO account does not have sufficient funds to pay. System rollback The fees collected.

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

[0049] The index structure here is composed of<address,value> The table is constructed, and the specific method for generating Tran(fsk(Twj)) is in S204, while the generation of CK1 is in S205. The entire index structure is a structure that uses a string as the address to find the corresponding value, except that both the address and the value are strings. The implementation is similar to a data structure like a map.

[0050] S207: Data Transmission DO will include the encrypted document set C and the message verification code set. Document rating set Encrypted keyword set Upload to CSP.

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

[0052] S300: The cloud server constructs an OBBT-UBBT storage structure to store the encrypted text corresponding to keywords, message verification codes, and document ratings.

[0053] Specifically, step S300 includes: S301: Update UBBT storage structure; a) Initialize the UBBT search structure; Set a collection A UBBT of a specific length already exists, and its ,in and These serve as pointers to the left and right subtrees, respectively. Given a set of encrypted keywords, first, examine each encrypted keyword in the set one by one, according to... The relation is converted into an encrypted feature array, and the array length is determined. l The height of the binary tree that needs to be constructed or updated is... l If set It does not exist in Then this l As Store in a collection and set ; For each array of encrypted features, find the one with length [missing information]. l correspond The current location is the root node, denoted as level 0. An empty string is initialized and denoted as the binary search record. ; Begin constructing the subtree, where each child node is an 18-bit bitmap: First, construct the first-level nodes; based on the encrypted feature array... The i-th position Value, of which ,if ,but And determine if the left node of the first level exists: if it exists, then the left node of the first level... Set the position to 1; if it does not exist, you need to first initialize an 18-bit bitmap with all zeros linked to the left subtree pointer of the root node, set the left and right pointers of that node to null, and then set the left node of the first level. The position is set to 1; if ,but And determine if the right node of the first level exists. If it exists, then the right node of the first level... Set the position to 1; if it does not exist, initialize an 18-bit bitmap with all zeros linked to the right subtree pointer of the root node, and set the left and right pointers of this node to null. Then, it will be the right node at level 1. The position is set to 1.

[0054] And so on, based on the encrypted feature array The i-th position Value, of which ,if ,but And determine if the left node of the i-th level exists: if it exists, then the left node of the i-th level... The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all zeros and link it to the left subtree pointer of the (i-1)th level node, then set the left and right pointers of that node to null, and then the left node at level i... The position is set to 1; if ,but And determine if the right node of the i-th level exists. If it exists, then the right node of the i-th level... The position is set to 1; if it does not exist, an 18-bit bitmap with all zeros needs to be initialized first and linked to the right subtree pointer of the node at level i-1. The left and right pointers of this node are then set to null, and the right node at level i will be... The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is concatenated in the last layer; S302: Construct the BSBD subtree; While initializing the UBBT search structure in a) corresponding to storing each... If so, create an empty dictionary, sorting the keys in ascending order; when subtree construction reaches a leaf node (b), if the leaf node is an old node, add it directly. Conversely, if the leaf node is a newly generated node, then it needs to be added. 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, the left pointer of the leaf node will... Bitwise mapping ,join in The right pointer of the leaf node points to this position; add... ; S303: Set a two-digit counting Bloom filter (TCBF); After each execution of S302, the result will be... When input into a counting Bloom filter, there are three possible values ​​for the set flag: 0, 1, or 2. The preset operation performed in this case is as follows: When marked as 0: it means that this bit has never had a hash collision. Incrementing 1 on this bit means that this bit can be directly cascaded to a leaf node. When marked as 1: This means that this bit has already been mapped before. Check if the record pointed to by the left pointer of the cascaded leaf node is... If not, increment this bit by 1; this time a hash collision occurs, which means that this bit can no longer uniquely represent the information corresponding to a feature array, so release the link of this bit to the storage set array; When marked as 2: it means that this bit has previously caused a hash collision and cannot 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. It also maintains a sorting algorithm, that is, whenever the array is modified, it is sorted according to the document rating. Sort the documents in the entire storage set from largest to smallest to ensure that documents with higher ratings are accessed first.

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

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

[0057] S402: Key Generation TA generates attribute private keys for the corresponding attribute set S of user DU, and... TA chose And for TA selected Calculate the corresponding attribute private key, as shown in the formula. .

[0058] S403: Key Issuance TA issues attribute private keys to DU Replacement search key , verification key .

[0059] S500: When a user wants to search for a document corresponding to a certain keyword, the user encrypts the keyword using a substitution key and then passes the encrypted keyword to the search contract.

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

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

[0062] S600: The blockchain receives keywords sent by users for querying and transmits the encrypted keywords to the cloud server for wildcard search.

[0063] Specifically, step S6 includes: Search token sent by DU Send the search token to the search contract, which then invokes the smart contract to process the search token. Passed to CSP for wildcard search; if DU does not have sufficient balance to pay. The system was rolled back.

[0064] S700: The cloud server obtains a keyword set by matching the encrypted keywords with the TCBF-UBBT storage structure, searches for the corresponding encrypted document and message verification code, sends the keyword set to the search contract, and sends the corresponding encrypted document and message verification code to the verification contract.

[0065] Step S700 includes: S701: Wildcard Keyword Expansion for Check each digit for the presence of a '?' and convert the '?' to 0 and i respectively. For example, 202? is converted to 2020 and 202i. Then, store the converted encrypted keywords in a set.

[0066] S702: Wildcard Search Document search algorithms are Query and Matching and Sub-interval search constitutes the process.

[0067] a) Query Set up a mapping relationship. Mapped to , Mapped to The encrypted keywords are taken out sequentially from the set, and the above mapping transformation is performed bit by bit. The result of the transformation is then input into a two-bit counting Bloom filter. When performing a query, there are three possible outcomes: I) Marked as 0: This indicates that the record corresponding to this keyword does not exist, and the process should be returned directly. .

[0068] II) Marked as 1: This indicates that no hash collision has occurred at this position. Direct access to this position via a link directly cascades to the leaf node, and then proceeds according to c). Sub-range search.

[0069] III) Marked as 2: This means that a hash collision has occurred at this bit, and access is required. The structure is based on a layer-by-layer matching algorithm.

[0070] b) match First, determine the array length. l’ Then the search height needs to be [value]. l’ A binary tree; then compare the sets. If it does not exist in the set If the keyword does not exist, it proves that no keyword of that length exists; otherwise, if a keyword of that length is found... The following matching process will begin.

[0071] Initialize an empty string and denote it as the binary search record. First, match the nodes at level 1; then, based on the encrypted feature array... The first one in Value, if Determine if the left node of the first level exists: if it exists, then determine the left node of the first level. Check if the position is 1. If the result is 1, then... If the left node does not exist, then the keyword does not exist; if Check if the right node of the first level exists. If it exists, then check the right node of the first level. Check if the position is 1. If the result is 1, then... If the right node does not exist, then the keyword does not exist.

[0072] And so on, based on the encrypted feature array The i-th position Value, if Determine if the left node of the i-th level exists: if it exists, then determine if the left node of the i-th level exists. Check if the position is 1. If the result is 1, then... If the left node does not exist, then the keyword does not exist; if First, determine if the right node of the first level exists. If it does, then determine the right node of the i-th level. Check if the position is 1. If the result is 1, then... If the right node does not exist, then the keyword does not exist; continue searching until a leaf node is found, and then proceed according to c). Sub-range search.

[0073] c) Sub-range search For each keyword found in a leaf node, proceed to the next cascade of that leaf node. The search is performed within the sub-range. The '?' character is equivalent to 'az' or any character from 0-9. For example, 'ab?' can match 'ab0', 'ab1', 'ab2', ..., 'abz'. Then, the search is performed based on the key value. If a match is found, the value is checked to see if it is 1. If it is 1, the string corresponding to the key is added to a set. inside.

[0074] S800: The blockchain search contract finds the ciphertext of the symmetric key corresponding to the encrypted keyword in the index based on the keyword set, and then transmits 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 perform a search.

[0076] S802: Result sent.

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

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

[0079] Step S900 includes: DU will verify the key and verify the contract address Send to the verification contract, and the CSP calls the function in the contract. Function input message verification code set and encrypted document collection Use smart contracts to verify the correctness of the results returned by the CSP. This indicates that the verification contract margin is verified through the verification contract, eliminating the need for DU to perform the verification itself and reducing the user's computational 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 plaintext of the document.

[0081] Step S10 includes: DU received the key ciphertext Then, check your own attribute private key. Does it satisfy the access policy tree defined by DO? The root node's attribute values ​​are decrypted using a bottom-up recursive algorithm. a) First, solve for the attribute values ​​of the leaf nodes: b) For a non-leaf node x, and for all its child nodes z, call... And save the output as ,make For any The set of child nodes z of size. If such a set does not exist, the node does not satisfy the condition, and return the value. .

[0082] The specific calculations are as follows, and the Lagrange coefficients formed by each child node are as follows: Calculate the attribute value of node x using its child nodes: c) Symmetric key decryption The root node attributes calculated recursively are denoted as... Calculate the symmetric key The symmetric key obtained by DU decryption Using symmetric keys Decrypt documents in the encrypted document set Get a set of plaintext documents containing the searched keywords. .

Claims

1. A verifiable wildcard ciphertext retrieval method based on TCBF-UBBT, characterized in that, include: S100: The trusted authorized agency generates public parameters and a master private key based on the system security parameters; S2 00: The data owner calculates the relevance between extracted keywords and corresponding documents to form a score set, encrypts documents using a symmetric key to generate a ciphertext document set, encrypts ciphertext documents using a verification key to generate a message verification code, encrypts keywords using a substitution key to form a keyword set, constructs an access control tree to encrypt the symmetric key, and generates a table structure index of encrypted keywords-symmetric key ciphertext; the verification key and substitution key are passed to a trusted authorization authority, 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 search contract; S300: The cloud server constructs a storage structure to store the encrypted text corresponding to keywords, message verification codes, and document ratings; Step S300 includes: S301: Update UBBT storage structure; a) Initialize the UBBT search structure; Set a collection A UBBT of a specific length already exists, and its ,in and These serve as pointers to the left and right subtrees, respectively. Given a set of encrypted keywords, first, examine each encrypted keyword in the set one by one, according to... The relation is converted into an encrypted feature array, and the array length is determined. l The height of the binary tree that needs to be constructed or updated is... l If set It does not exist in Then this l As Store in a collection and set ; For each array of encrypted features, find the one with length [missing information]. l correspond The current location is the root node, denoted as level 0. An empty string is initialized and denoted as the binary search record. ; Begin constructing the subtree, where each child node is an 18-bit bitmap: based on the encrypted feature array. The i-th position in Value, of which ,if ,but And determine if the left node of the i-th level exists: if it exists, then the left node of the i-th level... The position is set to 1; if it does not exist, first initialize an 18-bit bitmap with all zeros and link it to the left subtree pointer of the (i-1)th level node, then set the left and right pointers of that node to null, and then the left node at level i... The position is set to 1; if ,but And determine if the right node of the i-th level exists. If it exists, then the right node of the i-th level... The position is set to 1; if it does not exist, an 18-bit bitmap with all zeros needs to be initialized first and linked to the right subtree pointer of the node at level i-1. The left and right pointers of this node are then set to null, and the right node at level i will be... The position is set to 1; until the last layer is filled, the block dictionary corresponding to this interval is concatenated in the last layer; S302: Construct the BSBD subtree; S303: Set a two-digit counting Bloom filter (TCBF); S304: Set up 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 documents in the entire storage set from largest to smallest according to the document score. S400: The trusted authorization authority generates the corresponding attribute private key based on the registration request information provided by the user, and forwards the attribute private key, verification key and replacement key to the user; S500: When a user wants to search for a document corresponding to a certain keyword, the user encrypts the keyword using a substitution key and then sends the encrypted keyword to the search contract. S600: The search contract receives keywords sent by the user and transmits the encrypted keywords to the cloud server for wildcard search; S700: The cloud server obtains a keyword set by matching the encrypted keywords with the storage structure and searches for the corresponding encrypted document and message verification code. It then sends the keyword set to the search contract and the corresponding encrypted 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 in the index based on 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 encrypted 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 plaintext of the document.

2. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S100 includes: S101: Constructing a multiplicative cyclic group and ; S102: Select two hash functions and ; S103: Select a random number ,calculate , where g is the group The generator of , e() is a bilinear mapping; S104: Utilization and , and , , , as well as Generate public parameter PK and master private key MK.

3. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S200 includes: S201: The data owner scores the degree of relevance between a specific keyword in the extracted keyword set and a specific document in the plaintext document set. S202: The data owner randomly selects a symmetric key as the symmetric encryption key for the plaintext document, encrypts the document, and forms an encrypted document set after all documents are encrypted. The corresponding scores of the encrypted documents constitute a document score set. S203: The data owner randomly selects a verification key to perform encryption operations on the encrypted document and generates a message verification code set; S204: Use the substitution key to encrypt keywords to form a keyword set; S205: For symmetric keys, the data owner defines the access structure tree. Let Y represent the access tree structure. In all leaf nodes, the data owner calculates the ciphertext encrypted with the symmetric key; S206: Index generation; S207: The data owner uploads the encrypted document set, message verification code set, document rating 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 a trusted authorized agency.

4. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, The S302 construction of the BSBD subtree includes: While initializing the UBBT search structure in a) corresponding to storing each... If so, create an empty dictionary, sorting the keys in ascending order; when subtree construction reaches a leaf node (b), if the leaf node is an old node, add it directly. Conversely, if the leaf node is a newly generated node, then it needs to be added. 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, the left pointer of the leaf node will... Bitwise mapping ,join in The right pointer of the leaf node points to this position; add... ; in For feature array , It is encrypted using pseudo-random permutation. Convert the feature array to string format; The S303 is equipped with a two-digit counting type Bloom filter (TCBF), including: After each execution of S302, the result will be... When the input is fed into a counting Bloom filter, there are three possible values ​​for the set flag: 0, 1, or 2. The preset operation performed in this case is as follows: When marked as 0: it means that this bit has never had a hash collision. Incrementing 1 on this bit means that this bit can be directly cascaded to a leaf node. When marked as 1: This means that this bit has already been mapped before. Check if the record pointed to by the left pointer of the cascaded leaf node is... If not, increment this bit by 1; this time a hash collision occurs, which means that this bit can no longer uniquely represent the information corresponding to a feature array, so release the link of this bit to the storage set array; When marked as 2: it means that this bit has previously caused a hash collision and cannot uniquely represent the information corresponding to a feature array.

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

6. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S500 includes: S501: Data users select the keywords to be queried, and then use the substitution search key issued by a trusted authorized agency to encrypt the keywords and generate a search token; S502: The data user sends the generated search token to the search contract.

7. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S600 includes: sending a search token sent by the data user to the search contract, calling the smart contract to pass 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 verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S700 includes: S701: For the search token, check each bit for the existence of ?, convert ? to 0 and i respectively, and then store the converted encrypted keywords in a set; S702: Wildcard search; S703: Send the results of the wildcard search in S702 to the search contract and the storage structure respectively. The storage structure performs document search based on each element of the wildcard search results. S704: Send the searched set of encrypted documents and message verification codes to the verification contract.

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

10. The verifiable wildcard ciphertext retrieval method based on TCBF-UBBT according to claim 1, characterized in that, Step S900 includes: the data user sending the verification key and verification contract address to the verification contract, and the cloud server calling the function in the contract. The function takes a set of message verification codes and a set of encrypted documents as input, and uses a smart contract to verify the correctness of the results returned by the cloud server.

Citation Information

Patent Citations

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

    CN108712366A

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

    CN117494174A