Inverted dictionary-based big data symmetric searchable encryption method and device
By employing a symmetric searchable encryption method for big data based on an inverted dictionary, using TF-IDF and Kmeans clustering to extract keywords, and combining AES and HMAC to verify data integrity, the problem of communication and storage overhead caused by server lazy computation is solved, thereby improving the security and reliability of privacy data.
Patent Information
- Application Number
- CN202311068747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-08-23
AI Technical Summary
In existing technologies, lazy computation by servers leads to increased communication and storage overhead, slower response times, and requires data owners to be online for extended periods in single-write, multi-read scenarios, resulting in significant communication and storage overhead.
A symmetric searchable encryption method for big data based on inverted dictionaries is adopted. Keywords are extracted by combining the TF-IDF algorithm with K-means clustering, an inverted dictionary is built, and file data is encrypted with the AES algorithm. HMAC message verification code is added to generate node sequence and index sequence. The file name corresponding to the target keyword is queried using a cloud server, and the data integrity is verified by Merkle tree and HMAC message verification code.
It reduces the storage overhead of the user manager and cloud server, improves the security and reliability of privacy data protection, solves the communication and storage overhead problems caused by server lazy computing, and reduces the online needs of data owners in single-write and multi-read scenarios.
Smart Images

Figure CN119513903B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information security, and particularly relates to a symmetric searchable encryption method and device based on inverted dictionary big data. BACKGROUND
[0002] In the face of user security cloud storage problems in big data scenarios, traditional encryption schemes can only guarantee the confidentiality of user data, and cannot support fast query and retrieval of data. Homomorphic encryption schemes have both data confidentiality and retrievability, but the computational overhead is too large, and they cannot be used in cloud big data scenarios. Therefore, searchable encryption technology is needed to use cryptographic algorithms and assumption models to simultaneously achieve the protection of user data and the function of querying data.
[0003] Searchable encryption technology is that a user applies to a server based on a search trapdoor, and the server searches for ciphertext data associated with the trapdoor information according to a search credential, as shown in FIG. 1. Figure 1 According to different cryptographic algorithms used in searching, searchable encryption schemes can be divided into asymmetric searchable encryption (ASE) and symmetric searchable encryption (SSE). In symmetric searchable encryption, both parties use the same key, and only the user who has the key can encrypt and decrypt the data. This process can be divided into four steps: data encryption, trapdoor generation, data search, and data decryption.
[0004] Based on the application characteristics of large amounts of data in cloud storage systems, symmetric searchable encryption technology design schemes with higher search efficiency are generally used. For user privacy problems in cloud environments, the main schemes include the SWP (Single Wire Protocol) scheme, the Z-IDX scheme, and the SSE-1 scheme.
[0005] The SWP scheme uses word-by-word encryption to process data and can achieve controlled retrieval, i.e., locating keywords during retrieval. However, its defects are that single-word queries need to scan the entire file, which is time-consuming and occupies a large amount of server computing resources, and there is a threat of statistical attacks in terms of security.
[0006] The Z-IDX scheme uses a Bloom filter as a file index to efficiently track keywords in the file. However, its defects are that the file index space is too large, for example, a file containing only a single word and having a length of 9 bytes has an encrypted index of 90 bytes, and during server querying, each file is calculated and judged, with an operation time of O(n), which is inefficient.
[0007] The SSE-1 scheme constructs a keyword-related linked list, uses a more efficient inverted dictionary structure for fast retrieval, and stores data based on an AT array, avoiding the drawbacks of searching each file individually during keyword queries, thus achieving high efficiency.
[0008] Under the honest and curious model of the server, on the one hand, cloud servers may perform lazy computation to save computing resources, and the returned data may be unrelated to the search keywords. On the other hand, cloud servers may be attacked, resulting in data being tampered with or deleted.
[0009] The searchable encryption system protects data integrity by performing the following two phases: 1. Server storage phase, which verifies the integrity of data stored in cloud storage;
[0010] II. Verification of the integrity of the query results during the server's return of query results.
[0011] The verification of the above-mentioned data integrity proof is divided into the Data Possession Proof (PDP) mechanism and the Data Recovery Proof (POR) mechanism.
[0012] Existing data ownership verification mechanisms include MAC authentication code-based PDP mechanisms, RSA signature-based PDP mechanisms, BLS signature-based PDP mechanisms, PDP mechanisms that support dynamic operations, PDP mechanisms that support multiple copies, and privacy-preserving PDP mechanisms.
[0013] In the MAC authentication code-based PDP mechanism, the simplest method is for the user to use the MAC function call... k () generates a verification metadata set MAC = {mac i} 1≤i≤n The data is then stored on a remote node along with the file. Finally, the key information k and file information are sent to the verifier. During verification, the verifier sends the block index of the data block to be verified to the remote server. The remote server returns the specified data block and its corresponding MAC value as a response. The verifier calculates the MAC value of the data block using their private key and determines whether file F is complete by comparing it with the MAC value in the returned evidence. The drawback of this technique is that with each verification request, the method requires the remote server to return a portion of the data content in F, which not only leads to privacy leaks of the data file but also incurs significant communication overhead and computational costs.
[0014] For query result integrity verification, the typical verifiable ciphertext search technology at present is the verifiable search method based on Merkle hash tree. The Merkle hash tree is a binary balanced tree, and the main idea is to calculate a hash value for each leaf node, and then calculate the hash value of the intermediate node to the upper layer by using the hash value of the child node. In this way, a hash value unique root node is obtained by constructing the whole tree from bottom to top. Since the leaf node hash value is calculated from the stored data, any change in the data of the node will cause the root node hash value to change. When searching, a search path is generated on the Merkle tree, and the hash values of the sibling nodes of all nodes on the path are returned as authentication information. If the hash values of the nodes on the path can be calculated to reconstruct the root node hash value, the data information in the search result can be verified by comparing the reconstructed hash value with the locally stored root node hash value.
[0015] The use scenarios of searchable encryption technology mainly include single-write single-read (S / S), single-write multi-read (S / M), multi-write single-read (M / S) and multi-write multi-read (M / M). In actual research, most schemes belong to single-write single-read (S / S) and single-write multi-read (S / M) schemes. It is assumed that the system has a single data owner (DO) and multiple data users (DU). Before the DU reads the file, the DU needs to apply for an access credential to the DO, and then the DO generates different access credentials and search credential information for each DU i (i∈1,2,...,n) generates different access credentials and search credential information, and then the DU uses the search credential to generate a search trapdoor according to the search keyword, and sends the search information to the cloud server for encrypted search.
[0016] The disadvantage of this process is that the DU needs to apply for an access credential to the DO every time the DU queries. However, the interaction between the DU and the DO increases the communication overhead during the search, and requires the DO to be always online. In addition, the query characteristics of the DU when using data will be leaked to the DO.
[0017] In summary, in the prior art, the server performs lazy computation to save computing resources, and returns a partial solution to the user, which easily increases additional communication and storage overhead, and the response speed is slow. In addition, in the single-write multi-read scenario, the data owner needs to be online for a long time, and the storage overhead of the user and the communication overhead between layers are large, which need to be solved urgently. SUMMARY
[0018] The application provides a big data symmetric searchable encryption method and device based on inverted dictionary to solve the problems of server performing lazy computation, easily increasing additional communication and storage overhead, slow response speed, and the data owner needing to be online for a long time in the single-write multi-read scenario.
[0019] The first aspect embodiment of the application provides a symmetric searchable encryption method based on inverted dictionary big data, comprising the following steps: receiving file data uploaded by a user and a target password, controlling a user manager to extract at least one keyword in the plaintext data by using a TF-IDF algorithm combined with a Kmeans clustering method, and establishing an inverted dictionary based on the at least one keyword; encrypting the file data by using a preset AES algorithm to obtain encrypted file data, constructing at least one encrypted linked list by using a preset AES algorithm, a pseudo-random generator and the inverted dictionary, adding a preset HMAC message authentication code at the end of each encrypted linked list, and filling noise into the encrypted linked list by using the target password to generate a node sequence and an index sequence of the at least one keyword; querying a file name corresponding to a target keyword in the at least one keyword by using a cloud server, combining the node sequence and the index sequence and using the target password, obtaining encrypted file data corresponding to the target keyword according to the query result, and decrypting and viewing the encrypted file data.
[0020] Optionally, in an embodiment of the application, after querying the file name corresponding to the target keyword in the at least one keyword, the method further comprises: based on a preset Merkle tree, verifying the data possession of a target file name in the file name corresponding to the target keyword to determine the storage state of file data corresponding to the target file name; and using the preset HMAC message authentication code in the encrypted linked list to prove the integrity of the file data corresponding to the target keyword.
[0021] Optionally, in an embodiment of the application, the method in which the user manager extracts at least one keyword in the plaintext data by using the TF-IDF algorithm combined with the Kmeans clustering method and establishes an inverted dictionary based on the at least one keyword comprises: calculating the TF-IDF value of each word in the plaintext data, extracting the at least one keyword in the plaintext data according to the TF-IDF value of each word, classifying the at least one keyword in the plaintext data based on the Kmeans clustering algorithm, and obtaining the inverted dictionary according to the classification result.
[0022] Optionally, in an embodiment of the present application, the constructing at least one encrypted linked list by using the preset AES algorithm, the pseudo-random generator and the inverted dictionary, adding a preset HMAC message authentication code at the end of each encrypted linked list, and filling noise in the encrypted linked list by using the target password to generate the node sequence and the index sequence of the at least one keyword comprises: generating an address key based on the target password, encrypting the inverted dictionary by using the address key to generate the encrypted linked list; randomly generating at least one noise value, filling each empty position in the encrypted linked list by using the at least one noise value to obtain the node sequence and the index sequence.
[0023] Optionally, in an embodiment of the present application, the querying the file name corresponding to each keyword in the at least one keyword by using the cloud server, combining the node sequence and the index sequence with the target password comprises: searching the at least one keyword by using a preset trapdoor function according to the node sequence and the index sequence to obtain the file name corresponding to the target keyword.
[0024] The second aspect embodiment of the present application provides a device for searchable symmetric encryption based on inverted dictionary big data, comprising: an extraction module configured to receive file data uploaded by a user and a target password, control a user manager to extract at least one keyword in plaintext data by using a TF-IDF algorithm combined with a Kmeans clustering method, and establish an inverted dictionary based on the at least one keyword; an encryption module configured to encrypt the file data by using a preset AES algorithm to obtain encrypted file data, construct at least one encrypted linked list by using a preset AES algorithm, a pseudo-random generator and the inverted dictionary, add a preset HMAC message authentication code at the end of each encrypted linked list, and fill noise in the encrypted linked list by using the target password to generate a node sequence and an index sequence of the at least one keyword; and a query module configured to query a file name corresponding to a target keyword in the at least one keyword by using a cloud server, combining the node sequence and the index sequence with the target password, and obtaining encrypted file data corresponding to the target keyword according to a query result and decrypting and viewing the encrypted file data.
[0025] Optionally, in an embodiment of the present application, the device further comprises: a verification module configured to perform data possession verification on a target file name in the file name corresponding to the target keyword based on a preset Merkle tree after querying the file name corresponding to the target keyword in the at least one keyword to determine a storage state of file data corresponding to the target file name; and a proof module configured to prove the integrity of the file data corresponding to the target keyword by using the preset HMAC message authentication code in the encrypted linked list.
[0026] Optionally, in an embodiment of the present application, the extracting module comprises: a calculating unit configured to calculate a TF-IDF value of each word in the plaintext data, and extract the at least one keyword in the plaintext data according to the TF-IDF value of each word; and a classifying unit configured to classify the at least one keyword in the plaintext data based on the Kmeans clustering algorithm, and obtain the inverted dictionary according to the classification result.
[0027] Optionally, in an embodiment of the present application, the encrypting module comprises: a generating unit configured to generate an address key based on the target password, and encrypt the inverted dictionary by using the address key to generate the encrypted linked list; and a filling unit configured to randomly generate at least one noise value, and fill each empty position in the encrypted linked list by using the at least one noise value to obtain the node sequence and the index sequence.
[0028] Optionally, in an embodiment of the present application, the querying module comprises: a retrieving unit configured to retrieve the at least one keyword by using a preset trapdoor function according to the node sequence and the index sequence to obtain the file name corresponding to the target keyword.
[0029] The third aspect of the embodiments of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the symmetric searchable encryption method based on inverted dictionary big data as described in the above embodiments.
[0030] The fourth aspect of the embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the symmetric searchable encryption method based on inverted dictionary big data as described above.
[0031] Therefore, the embodiments of the present application have the following beneficial effects:
[0032] Embodiments of the present application can receive user uploaded file data and target password in a C / S distributed structure, control the user manager to extract at least one keyword in the plaintext data by combining the TF-IDF algorithm and the Kmeans clustering method, establish an inverted dictionary; encrypt the file data by using a preset AES algorithm to obtain encrypted file data, and use the preset AES algorithm to construct an encrypted chain table, add an HMAC message authentication code at the end of each encrypted chain table, and fill the encrypted chain table with noise through the target password to generate a node sequence and an index sequence; the cloud server queries the file name corresponding to the target keyword through the target password, thereby reducing the storage overhead and interlayer communication overhead of the user manager and the cloud server, and effectively improving the security and reliability of privacy data protection. Thus, the problems of server lazy calculation, additional communication and storage overhead, slow response speed, and the need for data owner to be online for a long time in a single-write multi-read scenario are solved.
[0033] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0034] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the accompanying drawings, wherein:
[0035] Figure 1 A searchable encryption technology process schematic diagram;
[0036] Figure 2 A C / S three-layer architecture schematic diagram of the present application;
[0037] Figure 3 An organization architecture schematic diagram of a big data symmetric searchable encryption method based on an inverted dictionary according to an embodiment of the present application;
[0038] Figure 4 A software structure schematic diagram of a big data symmetric searchable encryption method based on an inverted dictionary according to an embodiment of the present application;
[0039] Figure 5 A flowchart of a big data symmetric searchable encryption method based on an inverted dictionary according to an embodiment of the present application;
[0040] Figure 6 A data possession proof logic schematic diagram based on a Merkle tree according to an embodiment of the present application;
[0041] Figure 7 A calculation flowchart of an HMAC function according to an embodiment of the present application;
[0042] Figure 8 An execution logic schematic diagram of a large data symmetric searchable encryption method based on an inverted dictionary is provided for an embodiment of the present application;
[0043] Figure 9 A technical route schematic diagram of a large data symmetric searchable encryption method based on an inverted dictionary is provided for an embodiment of the present application;
[0044] Figure 10 An example diagram of a large data symmetric searchable encryption device based on an inverted dictionary according to an embodiment of the present application;
[0045] Figure 11 A structural schematic diagram of an electronic device provided for an embodiment of the present application.
[0046] In the figure, 10 is a large data symmetric searchable encryption device based on an inverted dictionary, 100 is an extraction module, 200 is an encryption module, 300 is a query module, 1101 is a memory, 1102 is a processor, and 1103 is a communication interface. DETAILED DESCRIPTION
[0047] The embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0048] The large data symmetric searchable encryption method and device based on an inverted dictionary of the embodiments of the present application are described below with reference to the accompanying drawings. In view of the problems mentioned in the above background art, the present application provides a large data symmetric searchable encryption method based on an inverted dictionary, in which, in the C / S distributed structure, the file data uploaded by a user and a target password are received, the user manager extracts at least one keyword in the plaintext data by using the method combining the TF-IDF algorithm and the Kmeans clustering to establish an inverted dictionary; the file data is encrypted by using a preset AES algorithm to obtain encrypted file data, and a preset AES algorithm is used to construct a chain table, an HMAC message authentication code is added at the end of each chain table, and the encrypted chain table is filled with noise through the target password to generate a node sequence and an index sequence; the cloud server queries the file name corresponding to the target keyword through the target password, thereby reducing the storage overhead of the user manager and the cloud server for additional maintenance and the communication overhead between layers, and effectively improving the security and reliability of the privacy data protection. Thus, the problems of the server performing lazy calculation, easily increasing additional communication and storage overhead, slow response speed, and the need for the data owner to be online for a long time in a single-write multi-read scenario are solved.
[0049] In order to facilitate the skilled person to understand the large data symmetric searchable encryption method based on inverted dictionary of the present application, the logical architecture, software structure, security requirements and optimization direction of the large data symmetric searchable encryption method based on inverted dictionary of the present application are briefly introduced and explained as follows.
[0050] I. Logical architecture
[0051] Those skilled in the art should understand that the C / S structure mode refers to the client / server mode, which is a mode of computer software cooperation. The server is responsible for data management, and the client is responsible for completing the interaction task with the user.
[0052] Based on the idea of the C / S structure, the present application proposes the concept of separating data management and user interaction, and designs a three-layer structure as shown in Figure 2 which completes the interaction between users through a trusted security mechanism, realizes the mechanism of multi-user sharing data, quickly applies for access, and has strong functionality; its computing power and storage capacity also share the computing pressure of the cloud server, reduce the storage pressure and computing difficulty of the user local, facilitate the deployment and construction of the user node, and make the system have the characteristics of strong interaction, fast response speed, safe access mode, fast response speed, and easy processing of large data.
[0053] At the same time, although the cloud server has strong storage capacity and computing capacity, it has the risk of information leakage and spying, cannot perform plaintext operation, and has a large overhead for protecting the large data set in the cloud server; the introduction of the secure user manager ensures the security of the plaintext encryption and index establishment process, the user information data set stored locally is small and easy to protect, which greatly reduces the difficulty of ensuring the security of the system.
[0054] According to the actual application scene, the C / S distributed structure of the large data symmetric searchable encryption method based on inverted dictionary for protecting data integrity in the present application mainly consists of a cloud server, a secure user manager and a user, as shown in Figure 3 .
[0055] Among them, the cloud server is the storage and computing layer of the architecture, which can be composed of one or more distributed cloud servers, wherein a large amount of private data of users is stored in the form of ciphertext, parallel computing is realized, and the search query and statistical analysis functions of the user are met;
[0056] The secure user manager is the user interaction layer of the architecture, which is responsible for distributing accounts and granting identities for users, recording the identities of users and the permissions for querying the cloud server, i.e. only the owner of the data and the user authorized by the owner can search and analyze the corresponding private data, complete the access control and authorization hosting, support the joint query of users, and regularly check the possession of files in the cloud server.
[0057] In addition, each user of each system has a corresponding identity account, can become a data owner, send data to the system and store the data, can obtain search statistical results of the data, and can browse the content of the entire data; meanwhile, the user can apply for a use permission of the data to other data owners, become a data user, can obtain search statistical results of the data of others, and cannot browse the content of the text.
[0058] Therefore, the C / S distributed structure of the application provides a new access model as a searchable encryption scheme, can solve the predicament that the data owner needs to be online for a long time in a single-write multi-read (S / M) scenario, supports personalized joint query, attribute classification and other functions, and reduces the storage overhead of the user and the communication overhead between layers.
[0059] II. Software structure
[0060] The application builds a searchable encryption demonstration software system, supports multiple search modes, and can be classified into single-keyword search and multi-keyword search according to the number of keywords, and can be classified into single-user data search and multi-user data joint search according to the search object.
[0061] The application can also set a permission model for the user, and the corresponding permission operations that the user can perform on the data are different according to the identity.
[0062] Among them, the data owner can perform four operations of storing data, viewing and deleting data, searching and statistical analysis of data, and allowing / rejecting other users to use the data.
[0063] The data user can perform two operations of applying to use the data of other users and searching and statistical analysis of the data.
[0064] The application supports various statistical analysis operations on the data of the user, including obtaining all documents containing a keyword, obtaining the correlation degree of the document and the keyword, word frequency analysis, semantic analysis, and establishing a model, and the like, as shown in the following table. Figure 4
[0065] III. Security requirements
[0066] The application meets the following security requirements:
[0067] 1. The third-party cloud platform cannot obtain any information about the plaintext through the ciphertext file;
[0068] 2. The third-party cloud platform cannot privately search for keywords in the file without legal authentication of the user query;
[0069] 3. The third-party cloud platform cannot privately obtain, collect and remember the keywords searched by the user and the corresponding relationship between the keywords and the ciphertext files;
[0070] 4. The third-party cloud platform cannot privately tamper with, add or delete the ciphertext files.
[0071] Four, optimization direction:
[0072] 1. Static symmetric searchable encryption scheme
[0073] In the symmetric searchable encryption scheme, the user generates trapdoor information through the keyword and the password, and completes the ciphertext retrieval in the cloud. In view of the application characteristics of large data volume in the cloud storage system, the application adopts the SSE technology with higher search efficiency to establish a static SSE scheme.
[0074] 2. Scene adaptive capacity expansion: single-write multi-read (S / M) scene
[0075] In the single-data owner and multiple-data user single-write multi-read (S / M) scene, only the DO has the modification right of the data, and other DUs need to obtain the authorization of the DO when querying the data set. The application records the ownership right and the use right of each piece of data through the reference secure user manager, so that the DU only needs to apply for an access credential before accessing the database, avoiding the need to apply for an access credential every time the query is performed. The DO only needs to reply to the result (Yes / No) of the application of the DU, and the number of transmitted bits is very small, and the user manager generates the access credential for the DU, which greatly saves the information transmission cost between users.
[0076] The DO and the DU do not directly establish a connection, which effectively prevents the leakage of query characteristics when the DU uses the data, and increases the security. The user manager established on the user side can quickly respond and quickly complete the interactive operation between users. The user manager provides the execution of the smart contract for the DO, which can directly reply to the DU according to the pre-set application judgment condition of the DO for the DU, so that the DO does not have to be online all the time, and the authorization process is executed by the agent, which can further reduce the communication cost and the application response time, and effectively improves the security, the communication cost, the response speed, the practicability and other performances.
[0077] 3. Search method structure optimization: inverted dictionary structure
[0078] According to the organization mode of the index, the application adopts the inverted dictionary, which is used as a classic data structure of full-text search to search the storage location of a keyword in a document, and has better search efficiency than the positive index. The index structure is mainly composed of two parts of a keyword dictionary and an inverted list. The keyword dictionary contains a term composed of a keyword and a list pointer, and the inverted list records the position information of the keyword in different documents. When the index structure is established, the file is extracted to obtain the keyword, and the inverted dictionary of the keyword is constructed according to the keyword dictionary and the inverted list thereof. Compared with the positive index, the inverted dictionary has better search efficiency.
[0079] 4. Query mode expansion: single keyword / multiple keyword query
[0080] In order to expand the expression ability of the query statement and strive to search more accurate query results through one query, most searchable encryption schemes only support single keyword search. The scheme is easy to construct and convenient for analysis. On this basis, the application additionally provides a multiple keyword query mode to more specifically meet the search needs of users and facilitate the construction of more convenient and flexible query statements.
[0081] 5. Query result optimization: result sorting and custom query
[0082] In the application, the results of searchable encryption can be returned according to the keyword frequency level defined by the user, and the relevance of any document to the keyword can be intuitively displayed. The query results are arranged in ascending / descending order according to the frequency of occurrence in the corresponding document. The above custom query function can be used in both single keyword and multiple keyword modes, and a visualization statistical result can be generated for the query result in combination with a drawing tool.
[0083] Specifically, Figure 5 A flowchart of a large data symmetric searchable encryption method based on an inverted dictionary provided by an embodiment of the application.
[0084] As Figure 5 shown, the large data symmetric searchable encryption method based on the inverted dictionary includes the following steps:
[0085] In step S501, the file data and the target password uploaded by the user are received, the TF-IDF algorithm and the Kmeans clustering method are combined by the control user manager to extract at least one keyword in the plaintext data, and the inverted dictionary is established based on the at least one keyword.
[0086] In the embodiments of the present application, the user can send a creation request to the secure user manager, upload the plaintext file data, and set a login password, and then the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm and the Kmeans clustering method can be used to extract the keywords in the file uploaded by the user, so as to establish the inverted dictionary.
[0087] Optionally, in an embodiment of the present application, the control user manager extracts at least one keyword in the plaintext data by using the TF-IDF algorithm combined with the Kmeans clustering method, and establishes the inverted dictionary based on the at least one keyword, including: calculating the TF-IDF value of each word in the plaintext data, extracting the at least one keyword in the plaintext data according to the TF-IDF value of each word; classifying the at least one keyword in the plaintext data based on the Kmeans clustering algorithm, and obtaining the inverted dictionary according to the classification result.
[0088] Since the words with higher occurrence times are more important relative to the document, the embodiments of the present application support both single-keyword and multi-keyword query modes, so it is necessary to first extract the keywords in different documents before establishing the inverted dictionary.
[0089] It can be understood that the embodiments of the present application introduce common stop words in English language based on natural language processing, such as meaningless words a, an, the, etc., which are not used as keywords, so as to reduce the number of keywords, greatly reduce the search complexity, improve the keyword search and extraction performance, and match the cloud big data application scenario.
[0090] It should be noted that for the remaining words, the embodiments of the present application can use the method of combining the TF-IDF algorithm with the Kmeans clustering to extract the keywords in the document, and divide them into several categories (such as strong, medium, and weak) according to the importance, so that the importance can be sorted during the query.
[0091] Specifically, the TF-IDF algorithm mainly includes two parts of word frequency (TF, Term Frequency) and inverse document frequency (IDF, Inverse Document Frequency).
[0092] The expression of the word frequency TF is as follows:
[0093]
[0094] In the formula, c(w i ) represents the number of times w i occurs in the document.
[0095] In a real scenario, the more a word appears in a document, the more important it is not necessarily. For example, in a document, "the" appears 100 times, and "bee" appears 10 times, which shows that the latter is more important to the document. Therefore, the importance can be measured by inverse document frequency when the number of occurrences is the same, and the mathematical expression is as follows:
[0096]
[0097] In the formula, N d represents the total number of documents in the corpus, represents the total number of documents in which w i appears.
[0098] Therefore, the embodiment of the present application reduces the weight of a word that appears in a large number of documents. The more a word appears in a document, the lower the inverse document frequency, that is, the lower the importance.
[0099] After calculating the TF-IDF value of each word appearing in the document, the embodiment of the present application can further classify the extracted keywords into several categories by Kmeans clustering algorithm, and different categories represent different importance of the word to the document. The specific process is as follows:
[0100] (1) Randomly select k word class centers;
[0101] (2) According to the distance of the TF-IDF value of each word from the three word class centers, cluster them respectively;
[0102] (3) Recalculate the center of each class;
[0103] (4) Repeat steps (1)-(3) until convergence.
[0104] Therefore, the embodiment of the present application extracts keywords by TF-IDF algorithm and Kmeans clustering method, constructs (word, importance) tuple, and establishes inverted dictionary according to the tuple, which effectively guarantees the search demand of the user and improves the search efficiency.
[0105] In step S502, the file data is encrypted by using a preset AES algorithm to obtain encrypted file data, at least one encrypted chain table is constructed by using a preset AES algorithm, a pseudo-random generator and the inverted dictionary, a preset HMAC message authentication code is added at the end of each encrypted chain table, and the encrypted chain table is filled with noise by using a target password to generate a node sequence and an index sequence of at least one keyword.
[0106] After the inverted dictionary is constructed, further, the embodiment of the application can also use the AES algorithm to respectively encrypt the user-uploaded file in plaintext form by the user server.
[0107] Since the AES algorithm requires a key key and an initial vector IV, the user server can generate a 16-bit key key and an initial vector IV by a pseudo-random number generator, encrypt the user-uploaded plaintext file, and respectively output to the file in ciphertext form, thereby providing reliable data basis for subsequent implementation of symmetric searchable encryption.
[0108] Then, after the inverted dictionary is constructed, the embodiment of the application can add a HMAC message authentication code controlled by the user key as the end of the encryption chain at the end of each encryption chain table of the inverted dictionary structure, thereby generating a new inverted dictionary, i.e., an encryption chain table, and further guarantee the transmission safety of the keyword information based on the above-mentioned user login password to fill the encryption chain table with noise.
[0109] Optionally, in an embodiment of the application, at least one encryption chain table is constructed using a preset AES algorithm, a pseudo-random generator, and an inverted dictionary, a preset HMAC message authentication code is added at the end of each encryption chain table, and the encryption chain table is filled with noise by a target password, to generate a node sequence and an index sequence of at least one keyword, including: generating an address key based on the target password, encrypting the inverted dictionary using the address key, and generating an encryption chain table; randomly generating at least one noise value, filling each empty position in the encryption chain table with the at least one noise value, to obtain the node sequence and the index sequence.
[0110] It should be noted that after the inverted dictionary of the keywords other than the stop words (nonsense dictionary) is generated based on the file content of the user, and the position of each word in the file list is recorded, the embodiment of the application can use the user password password as a seed, generate a key key_s for establishing the address chain between the nodes in the inverted dictionary using the KDF (Key Derivation Function, key derivation function) and the HMAC function, traverse the inverted dictionary, encrypt the keyword-file name information in the inverted dictionary using key_s to obtain an encryption chain table, i.e., an encryption chain table, and encrypt the position of each keyword using different keys to record the position of each keyword and the key used for encryption in the form of a pointer.
[0111] After the effective information is encrypted and stored in the above-mentioned encryption chain table, the embodiment of the present application can generate a noise value to fill the empty part of the encryption chain table randomly, so as to obtain a node sequence A; further, the embodiment of the present application can generate an index sequence T, that is, an encrypted node address list, so as to facilitate the taking of the node sequence A.
[0112] Thus, the embodiment of the present application hides the effective information in the node sequence A and the index sequence T by adding meaningless random numbers as noise, thereby realizing the secure storage of the node sequence and the index sequence on the server side and effectively protecting the communication information.
[0113] In step S504, the cloud server is used to query the file name corresponding to the target keyword in the at least one keyword by combining the node sequence and the index sequence through the target password, and to obtain the encrypted file data corresponding to the target keyword according to the query result, and to decrypt and view the encrypted file data.
[0114] After obtaining the node sequence and the index sequence, further, the embodiment of the present application can also generate a corresponding key by calling keygen through the server after the user inputs the password and the keyword, and open the node sequence and the index sequence file, so as to find the file name corresponding to the keyword stored in the index establishment stage according to the trapdoor information, thereby ensuring the security of the private data.
[0115] Optionally, in an embodiment of the present application, the cloud server is used to query the file name corresponding to each keyword in the at least one keyword by combining the node sequence and the index sequence through the target password, including: searching the at least one keyword through a preset trapdoor function according to the node sequence and the index sequence, to obtain the file name corresponding to the target keyword.
[0116] The embodiment of the present application can use the trapdoor function and the pseudo-random number generator to perform the ciphertext retrieval query.
[0117] Specifically, the embodiment of the present application can generate key_y and key_z keys through the KDF and HMAC functions by the password input by the user, so as to restore the trapdoor according to the keyword input by the user and key_z, key_y, and hide the keyword.
[0118] The embodiments of the present application hide the information in the node sequence A and the index sequence T by using the build_array function and the look_up_table function in the process of establishing the index; the build_array function hides the current node address by using the key_s with a pseudo-random number algorithm; the look_up_table function hides the position of the keyword in the index sequence T by using the key_z, hides the address information of the keyword in the node sequence A by using the key_s, and hides the keyword by using the key_y.
[0119] In the actual retrieval process, the user inputs the password to generate the keys key_s, key_y and key_z, thereby restoring the hidden information in the node sequence A and the index sequence T; if there is no password, the random number needs to be traversed by brute force cracking, thereby meeting the functional requirements of the user's search query and statistical analysis, and effectively guaranteeing the security and reliability of information query and transmission.
[0120] Optionally, in an embodiment of the present application, after the file name corresponding to the target keyword in the at least one keyword is queried, the method further comprises: based on the preset Merkle tree, performing data possession verification on the target file name in the file name corresponding to the target keyword, to determine the storage state of the file data corresponding to the target file name; and using the preset HMAC message authentication code in the encrypted chain table to prove the integrity of the file data corresponding to the target keyword.
[0121] It should be noted that the embodiments of the present application can also perform data possession proof and integrity proof of the query result by using the Merkle tree and the HMAC message authentication code, respectively, and the specific process is as follows:
[0122] 1. Data possession proof based on the Merkle tree:
[0123] Those skilled in the art can understand that the Merkle tree based on the hash function is commonly used in the blockchain to quickly induce and verify the existence and integrity of the block data, and the data possession proof based on the Merkle tree can quickly verify whether an element is in a given set, while not revealing any other information.
[0124] Therefore, in the embodiments of the present application, in order to check whether the file of the user in the cloud server is lost, a Merkle tree structure of the user document needs to be maintained at the cloud server side, the secure user manager side acts as a verifier, and the hash value of the root node of the Merkle tree is stored. The verifier sends a random file possession proof request to the cloud server at regular intervals, and the cloud server returns the path information from the file after receiving the request, that is, the possession proof. The verifier compares the root node, and if the root node values in the returned path information are equal, it can be verified that the possession proof is valid. If the root node values are not equal, the possession proof is invalid.
[0125] In the calculation process, the cloud server cannot forge a path information with an unchanged root node hash value, so the path information can be used as a mark of the cloud server holding the document.
[0126] For example, as shown in Figure 6 If it is necessary to query whether doc1 is stored in the server side, the server needs to return the Merkle proof of doc1, that is, Hash0-2 and Hash1-2. The user manager calculates the root hash value by means of the information to confirm whether it is consistent with the expected result.
[0127] It should be noted that in the data possession proof technology based on the Merkle tree, the user document Merkle tree structure can also be maintained at the secure user manager, that is, the verifier side, and the cloud server is applied for a random document possession proof at regular intervals, that is, the server is sent the document number and the hash value of the sibling node on the path of the document. If the cloud server holds the file, the root node of the Merkle tree can be calculated by calculating the hash value of the file and the path information, and the root node value is returned to the verifier. If the file is lost, the root node value cannot be calculated, and the possession of the document is verified.
[0128] Therefore, in the embodiments of the present application, the data possession proof mechanism based on the Merkle tree can verify the possession of the file in the cloud server, ensure the integrity of the data storage, and detect the loss of the file in the cloud server in time. The server only needs to store some hash values, and the storage overhead is small. When the user manager side verifies, only a small number of hash values need to be calculated (if the number of uploaded files is n, only hash values need to be calculated). Compared with similar data possession proof mechanisms, the mechanism effectively avoids the huge communication overhead and data security problem caused by the transmission of data by the verifier. When the mechanism is applied to the searchable encryption system, the storage overhead of the verifier and the cloud server is greatly reduced.
[0129] 2. Query result integrity proof based on HMAC message authentication code
[0130] In order to prevent the cloud server under the partial honest and curious model from performing lazy computation and returning a partial solution, an embodiment of the application adds a HMAC message authentication code controlled by the user key as the end of the encrypted chain at the end of each encrypted chain table based on the inverted dictionary structure.
[0131] Since the cloud server cannot obtain the user key, when the cloud server only returns part of the content of the chain table where the keyword is located without addressing to the end of the chain table, the secure user manager layer can detect the malicious behavior of the cloud server. This mechanism does not increase the additional communication overhead between layers, and the increase in storage overhead is negligible, ensuring the integrity of the returned results of the cloud server.
[0132] Specifically, the HMAC algorithm in the embodiment of the application uses a hash operation to generate a message digest as output with a key and a message as input, and the security thereof is based on the Hash encryption algorithm, and requires that the two parties of communication share a key, agree on an algorithm, and perform Hash operation on a message to form a fixed-length authentication code.
[0133] The embodiment of the application adopts the HMAC-SHA256 algorithm, that is, the HMAC algorithm using SHA-256 to generate a hash value, as shown in Figure 7 The mathematical expression of the HMAC-SHA256 algorithm is as follows:
[0134]
[0135] SHA256 is the SHA-256 encryption algorithm, and the output hash value length is 256-bit; B is the plaintext grouping length of the Hash function, which is 512-bit in the SHA-256 algorithm; k is the key; m is the message to be authenticated; k' represents another key derived from the original key k (if k is shorter than B, zero is filled to the right until it is the same as B; if k is longer than B, perform a SHA256 hash calculation on k); ipad is internally padded (512-bit constant); opad is externally padded (512-bit constant).
[0136] Therefore, under the partial honest and curious model of the cloud server, the embodiment of the application can prevent the server from performing lazy computation to save computing resources and returning a partial solution to the user, and by improving the original storage structure, the additional communication and storage overhead is avoided to achieve the query result integrity verification, effectively improving the response speed and further saving the storage resources.
[0137] As can be seen from the above, the core technology of the inverted dictionary big data symmetric searchable encryption method based on the application mainly includes two parts of index establishment and ciphertext retrieval, and the specific execution steps are as follows:
[0138] 1. Indexing:
[0139] In the embodiment of the present application, the user uploads data and encrypts to establish an index stage, which is completed by the user server, and the user establishes an index symbol definition as follows:
[0140] SUO: C = Enc_BuildIndex (M)
[0141] The general process of establishing an index in the embodiment of the present application is as follows:
[0142] (1) Use the user server pseudo-random number to generate a 16-bit key and an initial vector IV to encrypt the filenames input by the user to obtain the encrypted file outfilenames:
[0143] Encode (filenames, key, IV) → outfilenames
[0144] (2) Generate three keys key_s, key_y and key_z according to the password input by the user:
[0145] keygen (password) → key_s, key_y, key_z
[0146] (3) Perform initialization, input file name, traverse file and other operations in sequence to generate a file name list for each keyword in the file to obtain an inverted dictionary:
[0147] intialization (filenames) → word_dict
[0148] (4) Use key_s to encrypt the keyword-file name information in word_dict to obtain node sequence A, and fill the empty part of A, and put the first keyword-key-occurrence of the encrypted information into keyword_key_pair:
[0149] build_array (word_dict, key_s) → A, keyword_key_pair
[0150] (5) Use the three keys generated according to the password to encrypt keyword_key_pair to obtain index sequence T, and fill the empty part of T with noise:
[0151] look_up_table (keyword_key_pair, key_s, key_y, key_z) → T
[0152] Wherein, C: outfilenames is the list of ciphertext form of filenames, M: filenames is the list of plaintext form of filenames uploaded by the user, key_s is used to establish the key of address chain between nodes in the inverted dictionary, key_y and key_z are used to construct the trapdoor function, word_dict is the generated inverted dictionary, keyword_key_pair represents each statistical keyword, the key of the first address and the number of occurrences, A is the established node sequence, and T is the list of encrypted node addresses.
[0153] 2. Ciphertext retrieval:
[0154] The embodiment of the application can perform ciphertext retrieval operation after the user inputs password and keyword, and the server finds and returns the filenames containing the keyword. After receiving the password, the server calls keygen to generate corresponding keys key_s, key_y and key_z. The server opens A and T files, and finds the filenames corresponding to the keywords stored in the index establishment stage according to the trapdoor information in sequence, wherein the symbol definition of ciphertext retrieval is as follows:
[0155] SUO: C = Search (P, K)
[0156] The retrieval part in the embodiment of the application has the following approximate process:
[0157] (1) According to the password input by the user, the three keys used in the index establishment process are restored:
[0158] keygen (password) → key_s, key_y, key_z
[0159] (2) According to the keyword input by the user and key_z, key_y, the trapdoor is restored, and the keyword is hidden:
[0160] Trapdoor (keyword, key_z, key_y) → trapdoor
[0161] (3) According to the A and T generated in the index establishment, and according to the password generated trapdoor, the file list corresponding to the keyword is obtained:
[0162] Serch_single (A, T, trapdoor, keyword) → list_of_docs
[0163] Wherein, C is the file name containing the keyword found by the server, P is the password input by the user, K represents the keyword input by the user, key_s is used to establish the address chain between nodes in the inverted dictionary, key_y and key_z are used to construct the trapdoor function, A is the established node sequence, and T is the encrypted node address list.
[0164] The following application will introduce the execution logic of the symmetric searchable encryption method based on inverted dictionary big data in combination with the accompanying drawings.
[0165] Figure 8 The execution logic diagram of the symmetric searchable encryption method based on inverted dictionary big data.
[0166] As Figure 8 shown, the symmetric searchable encryption method based on inverted dictionary big data of the application mainly includes five working stages of user establishment, user uploading data and establishing encryption index, user searching keyword, application using data of other users and data possession verification. Specifically, when the application performs different operations, the execution process of each working stage is as follows:
[0167] 1. User establishment stage:
[0168] User: Send a creation request to the secure user manager, and set a login password password ID ;
[0169] User manager: After receiving the request of the user, record the identity information ID and password of the user ID , store (ID, password ID ) into the user information database (User Database).
[0170] 1 User→SUO: password ID
[0171]
[0172] 2. User uploading data and encryption index establishment stage:
[0173] User: upload the data M to be stored in the cloud to the user manager in the form of plaintext;
[0174] User manager: record the serial number ID for the data M uploaded by the user M , encrypt the data M by using the AES algorithm and generate index to obtain the ciphertext and index information C (index establishment module), and generate the pseudo-random number generation algorithm to generate the ID CAccess password of data, add serial number ID of data M in the permission list of user ID M Store into user data permission database, upload ciphertext C to cloud server;
[0175] Cloud server: receive ciphertext data C from user manager, and return the storage location loc of ciphertext C to user manager C ;
[0176] User manager: receive the location loc of ciphertext in cloud server C , store the corresponding relationship (ID M , password, loc C ) into data index database.
[0177] 1 User→SUO: M
[0178] 2 SUO: C = Enc_BuildIndex (M)
[0179] 2' SUO: generateRandom (password)
[0180]
[0181] 3 SUO→CS: C
[0182]
[0183] 5 CS→SUO: loc C
[0184]
[0185] 3, user retrieval keyword stage:
[0186] User: send the data serial number ID M to be queried and the single / multiple keywords keyword to user manager;
[0187] User manager: first, according to the identity ID of the sending information user, query the user data permission database to judge whether the user has the permission to use data ID M ;
[0188] If the corresponding user has no permission, return error information to the user;
[0189] If applicable, a trapdoor function is used to retrieve the keyword (retrieval module). This is based on the ID in the data index. M The information is sent to the cloud server to retrieve the location of the data storage. C And the required parameter trapdoor for retrieval;
[0190] Cloud server: Received loc C After trapdoor, for internal storage in loc C The location data is retrieved, and a list of documents containing the keywords is returned (list_of_docs).
[0191] User Manager: After receiving list_of_docs, it returns the query results to the user based on the user's statistical needs.
[0192] 1 User→SUO: ID M keyword
[0193]
[0194] if Yes, continue; if No, error
[0195] (1) No: 3 SUO → User: error
[0196] (2)Yes: 2′SUO: Search_SUO(password)
[0197]
[0198] 3 SUO→CS:loc C trapdoor
[0199] 4 CS: list_of_docs=Search_CS(CS_loc C (C), trapdoor)
[0200] 5 CS→SUO: list_of_docs
[0201] 6 SUO→User:list_of_docs
[0202] 4. Requesting to use other users' data stage:
[0203] Applicant User ID1: Sends the data sequence number ID to the user manager that they wish to apply for. M ;
[0204] User Manager: Based on the received data sequence number ID MQuery in the user data authority library, find the data owner of ID M is user ID2. Send the applicant's identity ID1 and the request of applying for using the data to user ID2;
[0205] Owner user ID2: for the application request of user ID1, can choose to agree or refuse the application, return the result Yes / No to the user manager;
[0206] User manager:
[0207] If the application result is No, directly return the application result to user ID1;
[0208] If the application result is Yes, add the applicant user ID2 to the authority list of data ID M , and return the application result to user ID1.
[0209] 1 Applier (ID1) → SUO: ID M
[0210]
[0211] 3 SUO→Owner (ID2) : ID1
[0212] 4 Owner (ID2) → SUO: Yes / No
[0213] (1) No: 5 SUO→Applier (ID1) : No
[0214]
[0215] 6 SUO→Applier (ID1) : Yes
[0216] 5, data possession verification phase:
[0217] User: input the file data serial number ID M that needs to be verified and send it to the user manager;
[0218] User manager: upload the user's query request for the corresponding file ID M to the cloud server;
[0219] Cloud server: if the cloud server holds the file ID M , it can generate the corresponding Merkle proof and return it to the user manager;
[0220] User manager: verify the Merkle proof of the cloud server and return the verification result Yes / No to the user;
[0221] If the return result is Yes, it proves that the cloud server correctly holds the file;
[0222] If the return result is No, it cannot prove that the cloud server holds the file, and needs to be re-uploaded.
[0223] 1 User→SUO: ID M
[0224] 2 SUO→CS: ID M
[0225] 3 CS→SUO: Merkle(ID M )
[0226] 4 SUO: Merkle(ID M )→Yes / No
[0227] if Yes, continue; if No, error
[0228] In addition, for the large data symmetric searchable encryption method based on inverted dictionary, the application realizes and builds a searchable encryption demonstration system, so as to facilitate the related encryption operation of the person skilled in the art, which includes four interfaces of user login interface, index creation interface, ciphertext retrieval interface and possession verification interface, as follows:
[0229] 1. User login interface:
[0230] In the user login interface, the user can log in by inputting the username and password; it can also complete the authorization of other users by inputting the user name to be authorized;
[0231] 2. Index creation interface:
[0232] In the index creation interface, the user uploads the data to be stored, and the data is encrypted and indexed by a secure user, and the ciphertext data is uploaded to the cloud server;
[0233] 3. Ciphertext retrieval interface:
[0234] In the ciphertext retrieval interface, based on the currently logged-in user, the user can perform single-keyword / multi-keyword retrieval on the files that the user has the right to access, wherein the scope of the retrieval files includes the files uploaded by the user and the files authorized by other users for the user, the association strength between the document and the keyword can be obtained and sorted according to the association strength, and a visual graph of the relevant statistical results is generated;
[0235] 4. Possession verification interface:
[0236] At the holding verification interface, a file name needing to verify the holding is input by a user, and then the cloud server returns a Merkle proof of the file, proving that the cloud server correctly stores the file.
[0237] It can be understood that the embodiments of the application realize a data sharing community and a user interactive interface at an application layer based on the inverted dictionary big data symmetric searchable encryption technology, as shown in Figure 9 The core functions such as index establishment, data encryption and ciphertext retrieval are completed by a three-layer architecture of a C / S distributed structure, namely a user, a secure user manager and a cloud server. In addition, the application satisfies three security models, can resist a non-adaptive selected keyword attack, and realizes ciphertext possession and result integrity proof by using a Merkle technology and an HMAC message authentication code, thereby ensuring the security of private data and the accuracy of system operation.
[0238] According to the inverted dictionary big data symmetric searchable encryption method based on the embodiments of the application, by receiving file data and a target password uploaded by a user in a C / S distributed structure, a user manager is controlled to extract at least one keyword in plaintext data by using a TF-IDF algorithm combined with a Kmeans clustering method, to establish an inverted dictionary; file data is encrypted by using a preset AES algorithm to obtain encrypted file data, and an encrypted chain table is constructed by using a preset AES algorithm and the like, an HMAC message authentication code is added at the end of each encrypted chain table, and the encrypted chain table is filled with noise by using the target password, to generate a node sequence and an index sequence; a cloud server is used to query a file name corresponding to a target keyword by using the target password, thereby reducing the storage overhead of the user manager and the cloud server maintained additionally, and the communication overhead between layers, and effectively improving the security and reliability of private data protection.
[0239] Secondly, the inverted dictionary big data symmetric searchable encryption device based on the embodiments of the application is described with reference to the accompanying drawings.
[0240] Figure 10 is a block schematic diagram of the inverted dictionary big data symmetric searchable encryption device based on the embodiments of the application.
[0241] As shown in Figure 10 The inverted dictionary big data symmetric searchable encryption device 10 includes an extraction module 100, an encryption module 200 and a query module 300.
[0242] The extraction module 100 is configured to receive file data and a target password uploaded by a user, control a user manager to extract at least one keyword in plaintext data by using a TF-IDF algorithm combined with a Kmeans clustering method, and establish an inverted dictionary based on the at least one keyword.
[0243] The encryption module 200 is configured to encrypt the file data by using a preset AES algorithm to obtain encrypted file data, to construct at least one encrypted chain table by using the preset AES algorithm, a pseudo-random generator, and an inverted dictionary, to add a preset HMAC message authentication code at the end of each encrypted chain table, and to fill the encrypted chain table with noise by using a target password to generate a node sequence and an index sequence of at least one keyword.
[0244] The query module 300 is configured to query a file name corresponding to a target keyword in the at least one keyword by using the cloud server, the target password, the node sequence, and the index sequence, to obtain encrypted file data corresponding to the target keyword according to a query result, and to decrypt and view the encrypted file data.
[0245] Optionally, in an embodiment of the present application, the inverted dictionary big data symmetric searchable encryption device 10 further comprises a verification module and a proof module.
[0246] The verification module is configured to perform data possession verification on a target file name in the file name corresponding to the target keyword based on a preset Merkle tree after querying the file name corresponding to the target keyword, to determine a storage state of file data corresponding to the target file name.
[0247] The proof module is configured to perform integrity proof on the file data corresponding to the target keyword by using the preset HMAC message authentication code in the encrypted chain table.
[0248] Optionally, in an embodiment of the present application, the extraction module 100 comprises a calculation unit and a classification unit.
[0249] The calculation unit is configured to calculate a TF-IDF value of each word in the plaintext data, and to extract at least one keyword in the plaintext data according to the TF-IDF value of each word.
[0250] The classification unit is configured to classify the at least one keyword in the plaintext data based on a Kmeans clustering algorithm, and to obtain the inverted dictionary according to a classification result.
[0251] Optionally, in an embodiment of the present application, the encryption module 200 comprises a generation unit and a padding unit.
[0252] The generation unit is configured to generate an address key based on the target password, to encrypt the inverted dictionary by using the address key, and to generate the encrypted chain table.
[0253] The padding unit is configured to randomly generate at least one noise value, to fill each empty position in the encrypted chain table by using the at least one noise value, and to obtain the node sequence and the index sequence.
[0254] Optionally, in an embodiment of the present application, the query module 300 comprises a retrieval unit configured to retrieve at least one keyword by a preset trapdoor function according to the node sequence and the index sequence, to obtain a file name corresponding to the target keyword.
[0255] It should be noted that the foregoing explanation and description of the embodiment of the method for symmetric searchable encryption based on inverted dictionary big data is also applicable to the embodiment of the device for symmetric searchable encryption based on inverted dictionary big data, which will not be described here again.
[0256] According to the device for symmetric searchable encryption based on inverted dictionary big data provided in the embodiment of the present application, by receiving file data and a target password uploaded by a user in a C / S distributed structure, the user manager is controlled to extract at least one keyword in the plaintext data by using a method combining a TF-IDF algorithm and Kmeans clustering, to establish an inverted dictionary; the file data is encrypted by using a preset AES algorithm to obtain encrypted file data, and an encrypted chain table is constructed by using the preset AES algorithm and the like, an HMAC message authentication code is added at the end of each encrypted chain table, and the encrypted chain table is filled with noise by using the target password, to generate a node sequence and an index sequence; the cloud server is used to query a file name corresponding to a target keyword by using the target password, thereby reducing storage overheads of the user manager and the cloud server for additional maintenance, and communication overheads between layers, and effectively improving security and reliability of privacy data protection.
[0257] Figure 11 The structure schematic diagram of the electronic device provided in the embodiment of the present application is shown in FIG. 1. The electronic device can comprise:
[0258] The memory 1101, the processor 1102, and a computer program stored in the memory 1101 and executable on the processor 1102.
[0259] The processor 1102 implements the method for symmetric searchable encryption based on inverted dictionary big data provided in the above embodiment when executing the program.
[0260] Further, the electronic device further comprises:
[0261] The communication interface 1103 is configured to communicate between the memory 1101 and the processor 1102.
[0262] The memory 1101 is configured to store the computer program executable on the processor 1102.
[0263] The memory 1101 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least one disk memory.
[0264] If the memory 1101, the processor 1102 and the communication interface 1103 are implemented independently, the communication interface 1103, the memory 1101 and the processor 1102 can be connected with each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 11 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0265] Optionally, in a specific implementation, if the memory 1101, the processor 1102 and the communication interface 1103 are integrated on a chip, the memory 1101, the processor 1102 and the communication interface 1103 can complete communication between each other through an internal interface.
[0266] The processor 1102 can be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.
[0267] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the above-mentioned symmetric searchable encryption method based on inverted dictionary big data.
[0268] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0269] Moreover, the terms "first", "second", "third", etc. are used herein only to describe different steps or categories of steps in a claim for patent purposes, and are not to be construed as indicating or implying relative importance of one step to another or a quantity of steps. Thus, features defined with "first", "second" or "third" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "N" is at least two, such as, for example, two, three, etc., unless specifically defined otherwise.
[0270] Any process or method descriptions or blocks in flow charts described herein and elsewhere can be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps in the process, and alternate implementations are possible. In some embodiments, the processes or methods described in flow charts can be substantially represented in computer readable medium that can be executed by a processing unit of a computer system.
[0271] Logic and / or steps represented in flow charts described herein and elsewhere can be embodied in computer readable medium, which can be executed by a processing unit of a computer system, or in combination with other instructions and / or data in computer readable medium to achieve the comparable results. For the purpose of this application, "computer readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable medium include the following: an electrical connection having one or more wires (electrical apparatus), a portable computer diskette (magnetic apparatus), a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash memory), an optical fiber (optical apparatus), and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via the optically scanning of the paper or other suitable medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and stored in a computer memory to execute the computer program.
[0272] It should be understood that parts of the present application can be realized in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. If realized in hardware and in another embodiment, any one or a combination of the following technologies known in the art can be used: discrete logic circuit with logic gate circuit for implementing logic functions on data signals, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA), etc.
[0273] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by a program instructing the relevant hardware, and the program can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0274] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software functional module. The integrated module, if realized in the form of a software functional module and sold or used as an independent product, can also be stored in a computer readable storage medium.
[0275] The above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.
Claims
1. A method for symmetric searchable encryption based on inverted dictionary big data, characterized in that, The method comprises the following steps: Receiving user uploaded file data and target password, controlling the user manager to extract at least one keyword in the plaintext data by using the method combining TF-IDF algorithm and Kmeans clustering, and establishing an inverted dictionary based on the at least one keyword; Using a preset AES algorithm to encrypt the file data to obtain encrypted file data, using a preset AES algorithm, a pseudo-random generator and the inverted dictionary to construct at least one encrypted link table, adding a preset HMAC message authentication code at the end of each encrypted link table, and filling noise into the encrypted link table through the target password to generate a node sequence and an index sequence of the at least one keyword; Using a cloud server to query the file name corresponding to the target keyword in the at least one keyword by combining the node sequence and the index sequence through the target password, and obtaining the encrypted file data corresponding to the target keyword according to the query result and decrypting and viewing the encrypted file data; Wherein, the method of using a preset AES algorithm, a pseudo-random generator and the inverted dictionary to construct at least one encrypted link table, adding a preset HMAC message authentication code at the end of each encrypted link table, and filling noise into the encrypted link table through the target password to generate a node sequence and an index sequence of the at least one keyword comprises: Generating an address key based on the target password, encrypting the inverted dictionary using the address key to generate the encrypted link table; Randomly generating at least one noise value, filling each empty position in the encrypted link table through the at least one noise value to obtain the node sequence and the index sequence; The method of using a cloud server to query the file name corresponding to each keyword in the at least one keyword by combining the node sequence and the index sequence through the target password comprises: Retrieving the at least one keyword through a preset trapdoor function according to the node sequence and the index sequence to obtain the file name corresponding to the target keyword.
2. The method of claim 1, wherein, After querying the file name corresponding to the target keyword in the at least one keyword, it further comprises: Based on a preset Merkle tree, verifying the data possession of the target file name in the file name corresponding to the target keyword to determine the storage state of the file data corresponding to the target file name; Using the preset HMAC message authentication code in the encrypted link table to prove the integrity of the file data corresponding to the target keyword.
3. The method of claim 1, wherein, The method of controlling the user manager to extract at least one keyword in the plaintext data by using the method combining TF-IDF algorithm and Kmeans clustering, and establishing an inverted dictionary based on the at least one keyword comprises: Calculating the TF-IDF value of each word in the plaintext data, extracting the at least one keyword in the plaintext data according to the TF-IDF value of each word; Classifying the at least one keyword in the plaintext data based on the Kmeans clustering algorithm, and obtaining the inverted dictionary according to the classification result.
4. A symmetric searchable encryption apparatus based on inverted dictionary big data, characterized in that, Comprise: The extraction module is configured to receive file data uploaded by a user and a target password, control a user manager to extract at least one keyword in the plaintext data by using a TF-IDF algorithm combined with a Kmeans clustering method, and establish an inverted dictionary based on the at least one keyword; The encryption module is configured to encrypt the file data by using a preset AES algorithm to obtain encrypted file data, construct at least one encrypted link table by using a preset AES algorithm, a pseudo-random generator and the inverted dictionary, add a preset HMAC message authentication code at the end of each encrypted link table, and fill noise into the encrypted link table by using the target password to generate a node sequence and an index sequence of the at least one keyword; The query module is configured to query a file name corresponding to a target keyword in the at least one keyword by using a cloud server, combining the node sequence and the index sequence and using the target password, obtain encrypted file data corresponding to the target keyword according to a query result, and decrypt and view the encrypted file data. The encryption module includes: A generation unit configured to generate an address key based on the target password, encrypt the inverted dictionary by using the address key, and generate the encrypted link table; A filling unit configured to randomly generate at least one noise value, fill each empty position in the encrypted link table by using the at least one noise value, and obtain the node sequence and the index sequence. The query module includes: A retrieval unit configured to retrieve the at least one keyword by using a preset trapdoor function according to the node sequence and the index sequence, and obtain a file name corresponding to the target keyword.
5. The apparatus of claim 4, wherein, Further including: A verification module configured to, after querying the file name corresponding to the target keyword in the at least one keyword, verify data possession of a target file name in the file name corresponding to the target keyword based on a preset Merkle tree, and determine a storage state of file data corresponding to the target file name; A proof module configured to prove the integrity of the file data corresponding to the target keyword by using the preset HMAC message authentication code in the encrypted link table.
6. The apparatus of claim 4, wherein, The extraction module includes: A calculation unit configured to calculate a TF-IDF value of each term in the plaintext data, extract the at least one keyword in the plaintext data according to the TF-IDF value of each term, and establish the inverted dictionary based on the at least one keyword; A classification unit configured to classify the at least one keyword in the plaintext data based on the Kmeans clustering algorithm, and obtain the inverted dictionary according to a classification result.
7. An electronic device, comprising: A memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the symmetric searchable encryption method based on an inverted dictionary big data as claimed in any one of claims 1-3. The program is executed by the processor to implement the symmetric searchable encryption method based on an inverted dictionary big data as claimed in any one of claims 1-3.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Multi-keyword plaintext and ciphertext retrieving method and device oriented to cloud storage
CN103593476A
Word2vec and ASPE-based efficient fuzzy searchable encryption method
CN114398660A