A symmetric searchable encryption method and system based on LSM
By adopting LSM-based symmetric searchable encryption method and class inverted indexing technology in distributed storage scenarios of multi-server nodes, the problems of low query storage performance and no data addition or deletion in the existing technology are solved, and efficient and secure multi-function query and dynamic data management are realized.
Patent Information
- Application Number
- CN202110775401.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-09
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-07-09
AI Technical Summary
When the prior art realizes secure storage and efficient multi-function query of large-scale data, there are problems such as low query storage performance, low storage utilization rate, and no data addition and deletion, especially in distributed storage scenarios with multiple server nodes.
Using a symmetric searchable encryption method based on LSM, combined with class inverted indexing and block storage technology, a distributed dense state retrieval system is designed to support dynamic data addition and deletion, and optimize performance through mixed storage and query solutions.
It realizes efficient and accurate multi-functional query of encrypted data, supports dynamic addition and deletion of data, ensures the security of data storage, and improves storage and query performance.
Smart Images

Figure CN113626836B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security, and in particular relates to a symmetric searchable encryption method and system based on LSM. Background Art
[0002] The explosive growth of data volume has promoted the rapid development of cloud service technology. Therefore, people choose to outsource local data storage to cloud servers to relieve the pressure of local storage and reduce local computing resources, so that massive data information can be better shared and utilized. However, the privacy information of user data will be obtained by honest and curious cloud servers, and cloud servers are also vulnerable to attacks and leak sensitive data information. The recent frequent cloud storage security incidents have made the issue of secure data storage a focus of attention. Data owners choose to encrypt data before uploading it to cloud servers. Although this method can ensure the security of data storage, it also brings obstacles to the flexible use of data.
[0003] To this end, researchers are committed to exploring SSE methods that can protect data privacy and security while supporting accurate and efficient multi-functional query operations. At present, this method has achieved certain results in the dynamic update of encrypted data, the expansion of query methods, the optimization of query results, and security optimization. Among them, an efficient searchable encryption scheme can be achieved by establishing a secure index. For example, a symmetric searchable encryption method based on an inverted index can support single-keyword search in sublinear time and is suitable for static queries. In addition to supporting efficient single-keyword queries, some researchers have now implemented the expansion of encrypted data query functions based on different index construction methods, such as joint queries and Boolean queries. For example, a Chinese patent (application number: CN201780065527.4, publication number: CN109923549A) proposes a searchable symmetric encryption system and method for processing inverted indexes. Chinese Patent (Application Number: CN202110083023.3, Publication Number: CN112800445A), this invention supports Boolean query operations, improves the accuracy of query results and saves transmission bandwidth; supports data updates and verifies the integrity of query results.
[0004] In the real-world scenario of achieving secure storage of large-scale data and efficient and multifunctional query, a single server node has a simple structure but limited processing capabilities. With the continuous development of cloud service technology, in order to better handle large-scale data resources, researchers have proposed distributed storage of multiple server nodes, which reduces the security risks of single server node storage and can improve query efficiency by supporting parallel search.
[0005] In order to improve retrieval performance and achieve linear optimal search time, most SSE solutions have designed an SSE method based on an inverted index table. Although this method has a fast query speed, it either does not support data addition and deletion, or the index structure is complex, consumes a lot of time and space, and the addition and deletion operations are inflexible. At the same time, in order to avoid data information leakage and statistical analysis attacks on the server, the inverted index structure needs to be filled, which results in a waste of space. In addition, this method limits the keywords that users can use in the query, and because the inverted index table is stored sequentially at random locations on the disk, when the posting list corresponding to the query keyword contains tens of thousands of documents, it will cause significant delays.
[0006] Although most SSE schemes are constructed with optimal search time in theory, their implementation effect on large data sets is not so obvious. This is because factors such as I / O latency, low storage utilization, and differences in the distribution of actual data sets can reduce the actual performance of theoretically effective SSE schemes. In existing research on searchable encryption technology, only the scenario of storing encrypted data in memory is usually considered, and the impact of physical disk I / O on performance in large-scale data scenarios is not fully considered, making it difficult to actually apply it in large-scale confidential data storage and retrieval scenarios. At the same time, the current distributed storage solutions that support multiple server nodes also have problems with low query efficiency and single query support when managing large-scale confidential data.
[0007] The focus of subsequent research is to support multi-functional query operations while ensuring data privacy. Among the many SSE solutions that implement extended query functions on encrypted data, there are problems such as low query storage performance, low storage utilization, and no support for data addition and deletion. Summary of the invention
[0008] In view of the problems existing in the prior art, the purpose of the present invention is to provide a symmetric searchable encryption method and system based on LSM. The present invention realizes efficient and accurate multifunctional query of encrypted data based on the SSE method, supports dynamic addition and deletion of data, and does not leak too much data information to the server, thereby ensuring the security of data storage.
[0009] In order to effectively improve the locality of reading and writing of secret indexes, the present invention proposes a secret data indexing method based on the LSM data organization model. And the idea of block-based inverted index is adopted, which effectively reduces the size of the secret index and improves the performance of secret data retrieval. A distributed secret retrieval system based on a full peer-to-peer architecture is designed, and the generated encrypted index and encrypted data are evenly distributed on each node. The nodes can perform insertion, query and calculation functions in parallel, and support data addition and deletion. Efficient storage and retrieval of large-scale secret data indexes are achieved.
[0010] At the same time, the present invention takes into account that in real-world scenarios, user data includes both sensitive data and data that does not require high privacy. For this part of data that does not require high security, it is not necessary to use the same operations as sensitive data, and it is better to store and query directly in plain text. Therefore, the present invention designs and implements a hybrid storage and hybrid query solution for plaintext and ciphertext.
[0011] The technical solution of the present invention is:
[0012] A symmetric searchable encryption method based on LSM, the steps of which include:
[0013] 1) The client creates a database table, sets the field name and attributes in the database table, determines the encrypted field and the encrypted index field, and then fills the data information in the data set into the corresponding fields; wherein the multiple documents to be uploaded by the client constitute the data set;
[0014] 2) constructing an encrypted index for the encrypted index field, encrypting the data in the encrypted field using a symmetric encryption algorithm, generating a verification set Xset, wherein the information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keyword w of document i; uploading the encrypted index and the encrypted data to the server node allocated by the server side;
[0015] 3) The client uses the symmetric key and query keyword to generate a corresponding query token and sends it to the server;
[0016] 4) After receiving the query token, the server performs a query operation on the encrypted database and returns the query result to the client;
[0017] 5) The client receives the query result returned by the server and decrypts it.
[0018] Furthermore, the method for constructing the encrypted index is:
[0019] 21) Set the optimal cache block number blockNum and cache block size blockSize according to the data set;
[0020] 22) Setting the index structure of the encrypted index, which includes three fields: pkey, ckey, and value; wherein pkey is a label generated according to the keyword w, value stores the document ID value of the document containing the keyword w, and ckey is the block number of the cache block storing the value information;
[0021] 23) Segmenting the corresponding data information in the encrypted index field to obtain a keyword and a document ID set of the document containing the keyword, and storing them in the corresponding pkey field and value field respectively; and storing the value field in the cache block;
[0022] 24) Determine whether the current cache block is full. If it is full, upload the current cache block to the corresponding server node for storage.
[0023] Furthermore, pkey = F k (w, c), where w is the keyword, c is the counter value, F is the encryption algorithm, and k is the randomly generated encryption key; if the number of document ids corresponding to the keyword w is more than blcokSize*blockNum, then after uploading blockNum full cache blocks corresponding to the keyword w to the server, add 1 to the counter value c, generate a new label pkey accordingly, and then store the remaining document ids.
[0024] Furthermore, when the server receives the deletion request submitted by the client, it executes the corresponding deletion operation on the encrypted database.
[0025] Furthermore, when the client receives a query request, the client first generates a query token based on the keywords in the query request using an encryption algorithm, a randomly generated key, and a counter value c; then the query token is transmitted to the server for query, and the server returns the encrypted query result to the client; then the client decrypts the received query result.
[0026] Furthermore, to support Boolean queries, the information stored in value is a (e, y) pair; wherein e represents the encrypted value of the document id of the document containing the keyword w, and y is the combined encrypted value of the keyword w and the corresponding document id.
[0027] Furthermore, when the client receives a query of a Boolean expression, it first determines the keyword w1 with the least corresponding document id in the Boolean expression, then generates a query token for the keyword w1, and generates xtoken by combining the keyword w1 with the remaining query keywords in the Boolean expression, where xtoken = Fp(Kz, w1) * Fp(Kx, wi), i = 2...n, n is the number of keywords in the Boolean expression; the token and xtoken are transmitted to the server; the server searches according to the query token transmitted by the client, and obtains all (e, y) pairs corresponding to the keyword w1; then the xtoken and y values are calculated to obtain the calculation result Fp(K I,id)*Fp(kx,wi), i=2…n, and verify the filter calculation results in the Xset table; then process the query results according to the Boolean expression and return them to the client.
[0028] A symmetric searchable encryption system based on LSM, characterized in that it includes a client and a server; wherein the client includes a database table creation module, an index construction module and a data processing module; the server includes a data storage module, a data query module and a plurality of server nodes;
[0029] The database table creation module is used to create a database table and set the field names and attributes in the database table, determine the encrypted fields and encrypted index fields, and then fill the data information in the data set into the corresponding fields; wherein the multiple documents to be uploaded by the client constitute the data set;
[0030] The index building module is used to build an encrypted index for the encrypted index field, encrypt the data in the encrypted field using a symmetric encryption algorithm, and generate a verification set Xset. The information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keywords of document i;
[0031] The data processing module is used to upload the encrypted index and encrypted data to the server node assigned by the server; and generate a corresponding query token using the symmetric key and the query keyword and send it to the server, and decrypt the query result returned by the server;
[0032] The data storage module is used to distribute the received encrypted index and encrypted data to the server node for storage;
[0033] The data query module is used to perform a query operation on the encrypted database according to the received query token and return the query result to the client;
[0034] The server node is used to store encrypted indexes and encrypted data.
[0035] A client, characterized in that it includes a database table creation module, an index construction module and a data processing module, wherein the database table creation module is used to create a database table and set the field name and attributes in the database table, determine the encrypted field and the encrypted index field, and then fill the data information in the data set into the corresponding fields; wherein multiple documents to be uploaded by the client constitute the data set; the index construction module is used to construct an encrypted index for the encrypted index field, encrypt the data in the encrypted field using a symmetric encryption algorithm, and generate a verification set Xset, the information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keyword of document i; the data processing module is used to upload the encrypted index and encrypted data to the server node allocated by the server; and generate a corresponding query token using a symmetric key and a query keyword and send it to the server, and decrypt the query result returned by the server.
[0036] A server side, characterized in that it includes a data storage module, a data query module and multiple server nodes; wherein the data storage module is used to distribute the encrypted index and encrypted data uploaded by the client to the server node for storage; the data query module is used to perform query operations on the encrypted database according to the received query token and return the query results to the client; the server node is used to store the encrypted index and encrypted data.
[0037] The key points of the present invention include:
[0038] 1. During the index construction process, an inverted index and block storage based on the LSM (Log-Structured Merge) mechanism are used, and the size and number of cache blocks can be set according to data sets of different sizes. The value data is first stored in the local cache block, and when the cache block is full, it is uploaded to the corresponding server node for storage. The entire index framework can be divided into three parts to find data, pkey, ckey, and value; representing keywords, block numbers, and id sets respectively. When querying, you only need to enter keywords, generate query tokens, and access the disk once to return all query results. It greatly improves space utilization and query efficiency.
[0039] 2. To expand the query function and realize Boolean query, this paper further optimizes the framework designed in this paper based on the design ideas of the representative framework oxt. That is, the data structure Tset involved in oxt is stored in blocks based on LSM, and the elements in Xset are stored using Bloom filters. The storage methods of the two structures effectively improve the storage space utilization and query efficiency. It meets the query needs of users and improves the query accuracy. It efficiently supports complex logical combination queries of secret data. This method can support Boolean retrieval of multiple keywords, which improves the practicality of the secret retrieval system.
[0040] 3. Distributed storage is implemented based on a fully peer-to-peer architecture. The encrypted indexes and encrypted data generated under this framework are evenly distributed on different nodes. Insertion, query and calculation functions can be performed in parallel between nodes. Data addition and deletion are supported, as well as Boolean queries. Storage security and query performance are improved.
[0041] At the same time, when the database table is established in the initialization phase, by setting the attributes of the field, that is, whether the field corresponds to an encrypted field or a plain text field, mixed queries can be supported in response to different query requirements of users during query.
[0042] The advantages of the present invention are as follows:
[0043] 1. The present invention draws on the design idea of quasi-inverted index to construct the index, realizes sublinear search time, ensures that the information leaked to the cloud server is minimal, and avoids space waste caused by padding;
[0044] 2. In response to the query performance degradation caused by I / O latency, low storage utilization, and differences in the distribution of actual data sets, this study refers to the working principle of the LSM method and adopts a block storage method for encrypted indexes. Taking into account the principle of disk locality, this study implements streaming addition and deletion in units of data blocks / files.
[0045] 3. Support multi-functional query of encrypted data, providing users with practical search functions;
[0046] 4. Considering the fact that a single-node server has a simple structure but limited processing power, this paper proposes a distributed storage based on a fully peer-to-peer architecture; the encrypted indexes and data are randomly and evenly distributed on each node, and each node has its own calculation, storage, and query operation module. When querying, each node can perform related calculations and search operations in parallel and independently, realizing efficient parallel storage and query of large-scale data, satisfying users' optimal processing of data with different security levels.
[0047] 5. During the index construction process, encrypted fields and plaintext fields are set separately, and indexes are generated for the corresponding fields to support mixed queries. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic flow diagram of the method of the present invention;
[0049] Figure 2 It is a schematic diagram of the index structure designed by the present invention;
[0050] Figure 3 It is a query diagram for any Boolean expression. DETAILED DESCRIPTION
[0051] The present invention is further described in detail below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention but not to limit the scope of the present invention.
[0052] The present invention refers to the index structure of the SSE scheme based on the inverted index table, and proposes a new index construction method to achieve the space waste and query delay caused by padding while retaining the sublinear query time of the inverted index. Specifically: a single keyword will generate multiple labels, which correspond one to one with each document ID containing the keyword. In other words, if there are T documents with a certain keyword, then the keyword will generate T independent labels in the new index construction scheme, while only 1 label will be generated in the traditional SSE scheme based on the inverted index. The new index construction method can avoid padding and support parallel search, thereby significantly saving storage space and query time for large data sets.
[0053] In addition, the disk has the characteristics of slow random read and write and fast sequential read and write. The core idea of LSM is to consider the principle of disk locality, and use memory and sequential disk access to replace random disk access to improve read and write update performance. Therefore, the present invention adopts a data organization model based on LSM to optimize the disk read and write performance, and designs a block storage solution, the essence of which is to write data into the local cache block in sequence, and then reduce the number of blocks by periodically merging blocks when the blocks are full, which can effectively reduce the size of the dense index. In addition, the data in the block is always ordered, and users only need to perform sequential disk read and write instead of random access, which effectively improves the retrieval efficiency.
[0054] In order to improve the scalability of storage, the present invention adopts distributed storage based on a full peer-to-peer architecture. During the index construction process, the key value value is generated according to the document ID of the document to be uploaded in the client and stored in the local cache block. When the block is full, the encrypted index block and the encrypted document / file collection are uploaded to the cloud server and randomly and evenly stored on multiple server nodes. The encrypted index storage blocks in the server nodes are periodically compacted, which greatly improves the utilization of storage space.
[0055] The system structure constructed by the present invention includes two entities, the client and the server. The main functions of the client are to initialize the entire system, generate a random key, generate an encrypted index and encrypted data, generate a query token (trapdoor) and submit a query request to the server, receive the query result returned by the server and decrypt the query result using the random key. The server is responsible for saving the encrypted index and encrypted data uploaded by the client, executing the query request initiated by the client in parallel and returning the query result.
[0056] The client's functions include the following four aspects:
[0057] (1) Preprocessing the data set consisting of the documents to be uploaded by the client, first creating a database table, setting the names and attributes of the fields, determining the encrypted fields and encrypted index fields, and then filling the data information into the corresponding fields;
[0058] (2) Build an index. Build an encrypted index for the encrypted index field. The index building process is as follows: Figure 2 As shown in the figure, the data in the encrypted field is encrypted using a symmetric encryption algorithm, and a verification set Xset is generated. Xset stores the combined values of all keywords and document IDs in the data set for subsequent result verification. The formula for the combined value is expressed as Fp(K I ,id)*Fp(Kx,w),i=1~n,K I , Kx is a random key, w is a keyword, and Fp is an encryption algorithm; the encrypted index and encrypted data are uploaded to a server node assigned by the server for storage, and the client only stores the encryption and decryption keys; each document in the data set is processed, and each document can correspond to multiple keywords in advance. For example, document A contains n keywords w1,...wn, and the id of document A is A and the n keywords as a combined value;
[0059] (3) Generate a corresponding query token (trapdoor) using the symmetric key and query keyword, and submit it to the server as a query request;
[0060] (4) Receive the query results sent back by the server and decrypt them.
[0061] The server-side functions include the following two aspects:
[0062] (1) After receiving the encrypted data and encrypted index submitted by the client, the server randomly and evenly stores them in each server node of the server;
[0063] (2) After receiving the query (or delete) request submitted by the client, the server performs the query (or delete) operation on the encrypted data through the encrypted index and returns the query result to the client.
[0064] In the client function (2), an index is constructed for the index field in the database table according to the design idea of the present invention. The index construction process can be described in detail as follows:
[0065] (1) First, the present invention sets two parameters, namely, the optimal number of blocks, blockNum, and the block size, blockSize, according to the data set.
[0066] (2) The entire index structure contains three fields: pkey, ckey, and value; pkey is determined by the keyword w, the counter value c, and the encryption algorithm F, and the formula is expressed as: F k (w, c), k is a randomly generated encryption key, and the counter value c gradually increases from 0. Setting the counter value c can effectively improve security, that is, it can avoid leaking the number of document IDs corresponding to the keyword; ckey corresponds to the block number and points to the current corresponding storage block. The maximum value of ckey can be blockNum; value stores blockSize encrypted document ID values; when a cache block is full, ckey will increase by 1.
[0067] (3) Use the word segmenter to segment the corresponding data information in the index field to obtain the keywords and the corresponding document ID set, and generate the corresponding three fields locally on the client. To support Boolean queries, the value stores the (e, y) pair, where e represents the encrypted value of the document ID containing the keyword, and the formula is: Enc(ke,id); y is the combined encrypted value of the keyword w and the document ID, which is used for subsequent calculation and verification operations, and the formula is: Fp(K I ,id)*(Fp(Kz,w)) -1 The value in Value is stored in blocks.
[0068] (4) Determine whether the value in the cache block is full. If it is full, upload the cache block to the corresponding server node for storage. The server node will periodically merge and compact the encrypted index storage block stored in the node.
[0069] (5) If the number of document IDs corresponding to the keyword is greater than blcokSize*blockNum, then after uploading the corresponding blockNum storage blocks to the server, the counter value c is increased by 1, a new label pkey is generated accordingly, and the remaining document IDs are stored.
[0070] After the index is built, the process of keyword-based query operations can be described in detail as follows:
[0071] (1) The client generates a query token based on the keyword to be queried, using an encryption algorithm, a randomly generated key, and a counter value c. The query token is calculated in the same way as the pkey in the index field;
[0072] (2) The generated query token is transmitted to the server, and the query is performed in parallel on the index structure table of each server node, and the encrypted query result is returned to the client.
[0073] (3) The client uses the corresponding symmetric encryption algorithm and key to decrypt the encrypted query results.
[0074] Figure 3 The query process for any Boolean expression can be described as:
[0075] (1) Assuming that the number of documents containing keyword w1 is minimal, any Boolean query expression can be expressed as in, Can be converted into three forms:
[0076] w2∧……
[0077] A∧B∧……
[0078]
[0079] (2) A, B, etc. represent expressions of OR and NOT operations. OR query can use the characteristics of sets to obtain query results; the NOT operation performs the opposite operation before making a query judgment.
[0080] (3) The client generates a query token for keyword w1. The generation method is the same as pkey, which is determined by the encryption algorithm, random key, keyword w1 and counter value c. c starts from 0 and gradually increases until the latest query token has no query results. At the same time, the keyword w1 and the remaining query keywords generate xtoken. The formula is: Fp(Kz,w1)*Fp(Kx,wi),i=2……n. The token and xtoken are transmitted to the server.
[0081] (4) The server searches the index structure table Tset between nodes in parallel based on the query token passed by the client to obtain all (e, y) pairs corresponding to the keyword w1. The xtoken and y values are calculated to obtain the calculation result: Fp(K I ,id)*Fp(Kx,wi), i=2…n; and verify the screening calculation results in the Xset table. Use the properties of the set to get the results of the or query operation. If there is a keyword for the negation operation, remove the document containing the keyword and keep the document without the keyword.
[0082] (5) Finally, the encrypted query result is returned to the client, which then decrypts it.
[0083] The specific implementation language of the present invention is the Java programming language. Java has its own Crypto software package to provide encryption algorithms. The use of multiple different hash encryption algorithms provided by the BouncyCastle third-party library for random processing of keys effectively prevents hackers from using the "running dictionary" method to crack passwords. The framework of this article is implemented based on a symmetric searchable encryption method, and uses symmetric searchable encryption algorithms (AES_CBC and AES_CTR) for encryption / decryption.
[0084] In terms of security, the index construction method in this paper makes the query work of the server depend on the size of the result set (regardless of the database size), and ensures that the leakage to the server during the query process is limited to the document set obtained by the query (the document set is encrypted) and some global parameters of the system, such as the total data size and the number of documents. During the query, the server will infer the user's access mode and query mode. The index construction method in this paper can effectively deal with and resolve inference attacks.
[0085] In order to better express the LSM-based symmetric searchable encryption method proposed in the present invention, the present invention will be further explained below with reference to the functional flow of multi-function query and in combination with a specific implementation example.
[0086] Boolean query expressions For example, the query process is as follows:
[0087] (1) First, a single keyword query operation is used to obtain the query result of keyword w1, and the scope of screening verification is narrowed to the document ID containing keyword w1. Here, it is assumed that the number of document IDs corresponding to w1 is the least.
[0088] (2) The client uses the encryption algorithm, the counter value c, and the keyword w1 to generate a query token for a single keyword query. The value of c starts at 0 and increases gradually. Multiple query tokens are generated for the keyword w1 and transmitted to the server until the newly generated query token has no query results.
[0089] (3) The client uses the keyword w1 and the remaining keywords w2, w3, and w4 to generate xtoken and transmit it to the server.
[0090] (4) The server uses the query token generated by the client to search in parallel in the Tset table of each node to obtain all (e, y) pairs corresponding to the keyword w1. e is represented by Enc(ke, id), and y is represented by Fp(KI ,id)*Fp(kz,w1) -1 .
[0091] (5) The xtoken corresponding to the keywords w1, w2, w3, and w4 is expressed as: Fp(kz, w1)*Fp(Kx, wi), i=2, 3, 4; xtoken is calculated with y to obtain the result: Fp(K I ,id)*Fp(Kx,wi),i=2,3,4;
[0092] (6) Substitute the calculation results into Xset for verification, retain the documents containing keywords w2 and w3, use the characteristics of the set to obtain the query result of w2∨w3, and remove the documents containing keyword w4. Finally, the query result of the entire Boolean query expression is obtained.
[0093] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.
Claims
1. A symmetric searchable encryption method based on LSM, the steps of which include: 1) The client creates a database table, sets the field name and attributes in the database table, determines the encrypted field and encrypted index field, and then fills the data information in the data set into the corresponding fields; The multiple documents to be uploaded by the client constitute the data set; 2) constructing an encrypted index for the encrypted index field, and encrypting the data in the encrypted field using a symmetric encryption algorithm, Generate a verification set Xset, the information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keyword of document i; upload the encrypted index and encrypted data to the server node allocated by the server; wherein the method for constructing the encrypted index is: 21) set the number of cache blocks blockNum and the size of cache blocks blockSize according to the data set; 22) set the index structure of the encrypted index, which includes three fields: pkey, ckey, value; wherein pkey is a label generated according to keyword w, value stores the document id value of the document containing keyword w, and ckey is the block number of the cache block storing value information; 23) perform word segmentation on the corresponding data information in the encrypted index field, obtain the keyword and the document id set of the document containing the keyword, and store them in the corresponding pkey field and value field respectively; store the value field in the cache block; 24) determine whether the current cache block is full, and if it is full, upload the current cache block to the corresponding server node for storage; 3) The client uses the symmetric key and query keyword to generate a corresponding query token and sends it to the server; 4) After receiving the query token, the server performs a query operation on the encrypted database and returns the query result to the client; 5) The client receives the query result returned by the server and decrypts it.
2. The method according to claim 1, characterized in that pkey=F k (w, c), where w is the keyword, c is the counter value, F is the encryption algorithm, and k is the randomly generated encryption key; if the number of document ids corresponding to the keyword w is more than blcokSize*blockNum, then after uploading blockNum full cache blocks corresponding to the keyword w to the server, add 1 to the counter value c, generate a new label pkey accordingly, and then store the remaining document ids.
3. The method according to claim 1, characterized in that When the server receives the deletion request submitted by the client, it executes the corresponding deletion operation on the encrypted database.
4. The method according to any one of claims 1 to 3, characterized in that: When a client receives a query request, it first generates a query token based on the keyword in the query request using an encryption algorithm, a randomly generated key, and a counter value c; The query token is then sent to the server for query, and the server returns the encrypted query result to the client. The client then decrypts the received query results.
5. The method according to claim 1, characterized in that To support Boolean queries, the information stored in value is a (e, y) pair; where e represents the encrypted value of the document id of the document containing the keyword w, and y is the combined encrypted value of the keyword w and the corresponding document id.
6. The method according to claim 5, characterized in that When the client receives a Boolean expression query, it first determines the keyword w1 with the least corresponding document id in the Boolean expression, then generates a query token for the keyword w1, and generates xtoken by combining the keyword w1 with the remaining query keywords in the Boolean expression, where xtoken = Fp(Kz, w1) * Fp(Kx, wi), i = 2...n, n is the number of keywords in the Boolean expression; the token and xtoken are transmitted to the server; the server searches according to the query token passed in by the client and obtains all (e, y) pairs corresponding to the keyword w1; then the xtoken is calculated with the y value respectively to obtain the calculation result Fp(Kz, w1)*Fp(Kx, wi) I ,id)*Fp(Kx,wi), i=2…n, and verify the screening calculation results in the verification set Xset; then process the query results according to the Boolean expression and return them to the client; where K I , Kx is the random key, wi is the i-th keyword, and Kz is the remaining query keywords.
7. A symmetric searchable encryption system based on LSM, characterized in that: It includes a client and a server; wherein the client includes a database table creation module, an index construction module and a data processing module; the server includes a data storage module, a data query module and a plurality of server nodes; The database table creation module is used to create a database table and set the field names and attributes in the database table, determine the encrypted fields and encrypted index fields, and then fill the data information in the data set into the corresponding fields; The multiple documents to be uploaded by the client constitute the data set; The index building module is used to build an encrypted index for the encrypted index field, encrypt the data in the encrypted field using a symmetric encryption algorithm, and generate a verification set Xset. The information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keyword of document i; wherein the method for building the encrypted index is as follows: 21) setting the number of cache blocks blockNum and the size of cache blocks blockSize according to the data set; 22) setting the index structure of the encrypted index, which includes three fields: pkey, ckey, and value; wherein pkey is a label generated according to keyword w, value stores the document id value of the document containing keyword w, and ckey is the block number of the cache block storing value information; 23) performing word segmentation on the corresponding data information in the encrypted index field to obtain the keyword and the document id set of the document containing the keyword, and store them in the corresponding pkey field and value field respectively; storing the value field in the cache block; 24) judging whether the current cache block is full, and if it is full, uploading the current cache block to the corresponding server node for storage; The data processing module is used to upload the encrypted index and encrypted data to the server node assigned by the server; and generate a corresponding query token using the symmetric key and the query keyword and send it to the server, and decrypt the query result returned by the server; The data storage module is used to distribute the received encrypted index and encrypted data to the server node for storage; The data query module is used to perform a query operation on the encrypted database according to the received query token and return the query result to the client; The server node is used to store encrypted indexes and encrypted data.
8. A client, characterized in that: It includes database table creation module, index construction module and data processing module, among which, The database table creation module is used to create a database table and set the field names and attributes in the database table, determine the encrypted fields and encrypted index fields, and then fill the data information in the data set into the corresponding fields; wherein the multiple documents to be uploaded by the client constitute the data set; The index building module is used to build an encrypted index for the encrypted index field, encrypt the data in the encrypted field using a symmetric encryption algorithm, and generate a verification set Xset. The information stored in the verification set Xset is the combination value corresponding to each document in the data set, wherein the combination value of document i is generated according to the document id of document i and the keyword of document i; wherein the method for building the encrypted index is as follows: 21) setting the number of cache blocks blockNum and the size of cache blocks blockSize according to the data set; 22) setting the index structure of the encrypted index, which includes three fields: pkey, ckey, and value; wherein pkey is a label generated according to keyword w, value stores the document id value of the document containing keyword w, and ckey is the block number of the cache block storing value information; 23) performing word segmentation on the corresponding data information in the encrypted index field to obtain the keyword and the document id set of the document containing the keyword, and store them in the corresponding pkey field and value field respectively; storing the value field in the cache block; 24) judging whether the current cache block is full, and if it is full, uploading the current cache block to the corresponding server node for storage; The data processing module is used to upload the encrypted index and encrypted data to the server node allocated by the server side; and use the symmetric key and the query keyword to generate a corresponding query token and send it to the server side, and decrypt the query result returned by the server side.
9. A server, characterized in that: It includes a data storage module, a data query module and multiple server nodes; wherein, The data storage module is used to distribute the encrypted index and encrypted data uploaded by the client according to claim 8 to the server node for storage; The data query module is used to perform a query operation on the encrypted database according to the received query token and return the query result to the client; The server node is used to store encrypted indexes and encrypted data.
Citation Information
Patent Citations
Searchable symmetric encryption system and method of processing inverted index
CN109923549A
Forward and backward secure and verifiable Boolean query method for ciphertext data
CN112800445A
High-efficiency static hash table implement method and system
CN106326475A
Systems and methods for client-side and field-level encryption with dynamic schema databases
US20200394317A1