Big data symmetric searchable encryption method and device based on inverted dictionary
By adopting a big data symmetric searchable encryption method based on inverted dictionary in the cloud storage system, the problem of inefficient data query retrieval efficiency and increased overhead in the cloud storage system is solved, and efficient privacy data protection and reliable query process are achieved.
Patent Information
- Application Number
- CN202311068747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-08-23
AI Technical Summary
The prior art is difficult to realize the rapid query and retrieval of data in cloud storage systems, and at the same time, there is the problem of increased communication and storage overhead caused by lazy server computing and slow response speed, especially in the case of single-write and multiple-reading, data owners are required to be online for a long time.
The big data symmetric searchable encryption method based on the inverted dictionary is adopted, and the keywords are extracted through the combination of TF-IDF algorithm and Kmeans clustering method, and the inverted dictionary is established. The file data is encrypted using the AES algorithm, an encrypted linked list is constructed, the HMAC message verification code is added, and the target password is filled with noise, node sequences and index sequences are generated, and the cloud server is used for querying.
It reduces the storage overhead for additional maintenance of user managers and cloud servers, as well as the communication overhead between layers, improves the security and reliability of privacy data protection, solves the problem of slow response speed caused by lazy server computing, and reduces the online demand of data owners in single-write and multiple-read scenarios.
Smart Images

Figure CN119513903A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a symmetric searchable encryption method and device based on inverted dictionary big data. Background Art
[0002] Faced with the problem of user secure cloud storage in big data scenarios, traditional encryption schemes can only ensure the confidentiality of user data, but cannot support fast query and retrieval of data; homomorphic encryption schemes have both data confidentiality and retrievability, but their computational overhead is too large and does not support use in cloud big data scenarios. Therefore, it is necessary to introduce searchable encryption technology, which uses 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 users apply to the server based on the search trap, and the server searches for the ciphertext data associated with the trap information based on the search credentials, such as Figure 1 As shown. Depending on the cryptographic algorithm used during the search, searchable encryption schemes can be divided into asymmetric searchable encryption (ASE) and symmetric searchable encryption schemes (SSE). In symmetric searchable encryption, both parties use the same key, and only users with the key can encrypt and decrypt data. The 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, a symmetric searchable encryption technology design scheme with higher search efficiency is generally adopted. In response to the privacy issues of users in cloud environments, the main schemes include the SWP (Single Wire Protocol) scheme, the Z-IDX scheme, and the SSE-1 scheme.
[0005] Among them, the SWP scheme uses word-by-word encryption to process data, which can achieve controlled retrieval, that is, locate keywords during retrieval. However, its disadvantage is that the query of a single word requires scanning the entire file, which is time-inefficient and occupies a large amount of server computing resources. In addition, there is a threat of statistical attacks on security.
[0006] The Z-IDX solution uses Bloom filters as file indexes to efficiently track keywords in files. However, its drawback is that the file index space is too large. For example, a file containing only a single word and a length of 9 bytes has an encrypted index of 90 bytes. In addition, when querying the server, calculations are performed on each file, and the operation time is O(n), which is inefficient.
[0007] The SSE-1 solution constructs a keyword-related linked list, uses a more efficient inverted dictionary structure for fast retrieval, and stores data based on the AT array, thus avoiding the defects of searching files one by one during keyword search and having high efficiency.
[0008] In the partially honest and curious model of servers, on the one hand, the cloud server may perform lazy computing to save computing resources, and the returned data has no correlation with the search keywords. On the other hand, the cloud server may be attacked, causing the data to be tampered with or deleted.
[0009] The protection of data integrity by the searchable encryption system is carried out in two stages: 1. Server storage stage, which verifies the data integrity proof in the cloud storage;
[0010] 2. When the server returns the query results, the integrity of the query results is verified.
[0011] The verification of the above data integrity proof is divided into the data possession proof PDP mechanism and the data recoverability proof mechanism POR (Proof Of Reserves) mechanism.
[0012] Existing data possession proof mechanisms include PDP mechanism based on MAC authentication code, PDP mechanism based on RSA signature, PDP mechanism based on BLS signature, PDP mechanism supporting dynamic operation, PDP mechanism supporting multiple copies and PDP mechanism protecting privacy.
[0013] In the PDP mechanism based on MAC authentication code, the simplest method is for the user to use the call function MAC k () Generate verification metadata set MAC for data file F = {mac i} 1≤i≤n , and then store it together with the file on the remote node, and finally send the key information k and file information to the verifier; during verification, the verifier sends the block index of the data block to be verified to the remote server, and 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 through the private key, and determines whether the file F is complete by comparing the MAC value in the returned evidence. The disadvantage of this technology is that this method requires the remote server to return part of the data content in F for each verification request, which not only causes the privacy leakage of the data file, but also requires a large communication overhead and computing cost.
[0014] For query result integrity verification, the current typical verifiable ciphertext search technology is the verifiable search method based on the Merkle hash tree. The Merkle hash tree is a binary balanced tree. The main idea is to calculate a hash value for each leaf node, and then use the hash value of the child node to calculate the hash value of the intermediate node in the upper layer. In this way, the entire tree is constructed from the bottom up to obtain a root node with a unique hash value. Since the leaf node hash value is calculated from the stored data, any change in the data in the node will cause the change of the root node hash value. When the search is performed again, a search path will be generated on the Merkle tree, and the hash values of the sibling nodes of all nodes on the path will be returned as authentication information. If the hash values of each node on the path can be calculated to reconstruct the root node hash value, by comparing the reconstructed hash value with the locally stored root node hash value, it can be verified whether the data information in the search results has been tampered with.
[0015] The application scenarios of searchable encryption technology mainly include single write single read (S / S), single write multiple read (S / M), multiple write single read (M / S) and multiple write multiple read (M / M). In actual research, most schemes belong to single write single read (S / S) and single write multiple read (S / M) schemes, assuming that the system has a single data owner (Data Owner, DO) and multiple data users (Data Users, DU). Before DU reads a file, it needs to apply for access credentials from DO. Then DO is a credential for each DU. i (i∈1,2,...,n) generates different access credentials and search credential information, and then DU uses the search credentials to generate a search trap based on the search keywords and sends the search information to the cloud server for encrypted search.
[0016] The disadvantage of this process is that DU needs to apply for access credentials from DO every time it queries, but the interaction between DU and DO increases the communication overhead during search, and requires DO to be online at all times, and the query characteristics of DU when using data will be leaked to DO.
[0017] To sum up, in the existing technology, in order to save computing resources, the server performs lazy calculations and returns local solutions to users, which easily increases additional communication and storage overhead and has a slow response speed. In addition, in a single-write and multiple-read scenario, the data owner is required to be online for a long time, and the user's local storage overhead and inter-layer communication overhead are large, which needs to be solved urgently. Summary of the invention
[0018] The present application provides a symmetric searchable encryption method and device for big data based on an inverted dictionary to solve the problems of lazy computing on the server, easy addition of additional communication and storage overhead, slow response speed, and the need for data owners to be online for a long time in a single-write and multiple-read scenario.
[0019] The first aspect of the present application provides a symmetric searchable encryption method based on inverted dictionary big data, comprising the following steps: receiving file data and a target password uploaded by a user, controlling a user manager to extract at least one keyword from plaintext data using a method combining a TF-IDF algorithm and Kmeans clustering, and establishing an inverted dictionary based on the at least one keyword; encrypting the file data using a preset AES algorithm to obtain encrypted file data, constructing at least one encrypted linked list using a preset AES algorithm, a pseudo-random generator and the inverted dictionary, adding a preset HMAC message verification code at the end of each encrypted linked list, and performing noise filling on the encrypted linked list using 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 a target keyword in the at least one keyword using the target password in combination with the node sequence and the index sequence, and obtaining the encrypted file data corresponding to the target keyword according to the query result, and decrypting and viewing the encrypted file data.
[0020] Optionally, in one embodiment of the present application, after querying the file name corresponding to the target keyword in the at least one keyword, it also includes: based on a 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 status of the file data corresponding to the target file name; using the preset HMAC message verification code in the encryption linked list to perform integrity proof on the file data corresponding to the target keyword.
[0021] Optionally, in one embodiment of the present application, the control user manager uses a method combining the TF-IDF algorithm and Kmeans clustering to extract at least one keyword from the plaintext data, and establishes an inverted dictionary based on the at least one keyword, including: calculating the TF-IDF value of each word in the plaintext data, and extracting the at least one keyword from the plaintext data according to the TF-IDF value of each word; based on the Kmeans clustering algorithm, classifying the at least one keyword in the plaintext data, and obtaining the inverted dictionary according to the classification result.
[0022] Optionally, in one embodiment of the present application, the preset AES algorithm, the pseudo-random generator and the inverted dictionary are used to construct at least one encrypted linked list, a preset HMAC message verification code is added at the end of each encrypted linked list, and the encrypted linked list is noise-filled using the target password to generate a node sequence and an index sequence of the at least one keyword, including: generating an address key based on the target password, encrypting the inverted dictionary 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 with the at least one noise value to obtain the node sequence and the index sequence.
[0023] Optionally, in one 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 through the target password in combination with the node sequence and the index sequence, including: according to the node sequence and the index sequence, the at least one keyword is retrieved through a preset trapdoor function to obtain the file name corresponding to the target keyword.
[0024] The second aspect of the present application provides a symmetric searchable encryption device based on inverted dictionary big data, including: an extraction module, used to receive file data and a target password uploaded by a user, control the user manager to use a method combining the TF-IDF algorithm and Kmeans clustering to extract at least one keyword in the plaintext data, and establish an inverted dictionary based on the at least one keyword; an encryption module, used to encrypt the file data using a preset AES algorithm to obtain encrypted file data, use the preset AES algorithm, a pseudo-random generator and the inverted dictionary to construct at least one encrypted linked list, add a preset HMAC message verification code at the end of each encrypted linked list, and perform noise filling on the encrypted linked list through the target password to generate a node sequence and index sequence of the at least one keyword; a query module, used to use the cloud server through the target password, combined with the node sequence and the index sequence, to query the file name corresponding to the target keyword in the at least one keyword, and obtain the encrypted file data corresponding to the target keyword according to the query result, and decrypt the encrypted file data for viewing.
[0025] Optionally, in one embodiment of the present application, it also includes: a verification module, which is used to perform data possession verification on the target file name in the file names 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, so as to determine the storage status of the file data corresponding to the target file name; and a proof module, which is used to use the preset HMAC message verification code in the encryption linked list to perform integrity proof on the file data corresponding to the target keyword.
[0026] Optionally, in one embodiment of the present application, the extraction module includes: a calculation unit, used to calculate the 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; a classification unit, used 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 one embodiment of the present application, the encryption module includes: a generation unit, used to generate an address key based on the target password, and use the address key to encrypt the inverted dictionary to generate the encrypted linked list; a filling unit, used to randomly generate at least one noise value, and fill each empty position in the encrypted linked list with the at least one noise value to obtain the node sequence and the index sequence.
[0028] Optionally, in one embodiment of the present application, the query module includes: a retrieval unit, configured to retrieve the at least one keyword according to the node sequence and the index sequence by using a preset trapdoor function to obtain a file name corresponding to the target keyword.
[0029] The third aspect of the present application provides an electronic device, including: 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 embodiment.
[0030] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned symmetric searchable encryption method based on inverted dictionary big data.
[0031] Therefore, the embodiments of the present application have the following beneficial effects:
[0032] The embodiment of the present application can receive the file data and target password uploaded by the user in the C / S distributed structure, control the user manager to use the method combining the TF-IDF algorithm with the Kmeans clustering to extract at least one keyword in the plaintext data to establish an inverted dictionary; use the preset AES algorithm to encrypt the file data to obtain the encrypted file data, use the preset AES algorithm to build an encrypted chain list, add the HMAC message verification code at the end of each encrypted chain list, and fill the encrypted chain list with noise through the target password to generate a node sequence and an index sequence; use the cloud server to query 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, as well as the communication overhead between layers, and effectively improving the security and reliability of privacy data protection. Thus, the server performs lazy calculations, which easily increases additional communication and storage overhead, has a slow response speed, and in a single-write-multiple-read scenario, requires the data owner to be online for a long time.
[0033] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0035] Figure 1 It is a schematic diagram of the searchable encryption technology process;
[0036] Figure 2 This is a schematic diagram of the C / S three-layer architecture of this application;
[0037] Figure 3 A schematic diagram of the organizational structure of a symmetric searchable encryption method based on inverted dictionary big data of the present application;
[0038] Figure 4 A schematic diagram of the software structure of a symmetric searchable encryption method for big data based on an inverted dictionary of the present application;
[0039] Figure 5 A flowchart of a symmetric searchable encryption method based on inverted dictionary big data provided according to an embodiment of the present application;
[0040] Figure 6 A logical diagram of data possession proof based on a Merkle tree is provided for one embodiment of the present application;
[0041] Figure 7 A schematic diagram of a calculation flow of an HMAC function provided for an embodiment of the present application;
[0042] Figure 8 A schematic diagram of execution logic of a symmetric searchable encryption method for big data based on an inverted dictionary provided for one embodiment of the present application;
[0043] Fig. 9 A schematic diagram of a technical route for a symmetric searchable encryption method based on an inverted dictionary big data provided for an embodiment of the present application;
[0044] Fig.10 This is an example diagram of a symmetric searchable encryption device based on inverted dictionary big data according to an embodiment of the present application;
[0045] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0046] In the figure, 10-a symmetric searchable encryption device based on inverted dictionary big data, 100-an extraction module, 200-an encryption module, 300-a query module, 1101-a memory, 1102-a processor, and 1103-a communication interface. DETAILED DESCRIPTION
[0047] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0048] The following describes the symmetric searchable encryption method and device based on inverted dictionary big data of the embodiment of the present application with reference to the accompanying drawings. In view of the problems mentioned in the above background technology, the present application provides a symmetric searchable encryption method based on inverted dictionary big data, in which the file data and target password uploaded by the user are received in the C / S distributed structure, and the user manager is controlled to extract at least one keyword in the plaintext data by combining the TF-IDF algorithm with the Kmeans clustering method to establish an inverted dictionary; the file data is encrypted using the preset AES algorithm to obtain encrypted file data, and an encrypted chain list is constructed using the preset AES algorithm, and at the end of each encrypted chain list, an HMAC message verification code is added, and the encrypted chain list is filled with noise through the target password to generate a node sequence and an index sequence; the cloud server is used to query 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, as well as the communication overhead between layers, and effectively improving the security and reliability of privacy data protection. Thus, the server performs lazy calculations, which easily increases additional communication and storage overhead, has a slow response speed, and in a single-write-multiple-read scenario, requires the data owner to be online for a long time.
[0049] In order to facilitate technical personnel to understand the symmetric searchable encryption method based on inverted dictionary big data of the present application, the logical architecture, software structure, security requirements and optimization direction of the symmetric searchable encryption method based on inverted dictionary big data of the present application are briefly introduced and explained as follows.
[0050] 1. 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 in which computer software works in collaboration. The server is responsible for data management, and the client is responsible for completing the interactive tasks with the user.
[0052] Drawing on the idea of the C / S structure, this application proposes the concept of separating data management from user interaction and designs a three-layer structure, such as Figure 2 As shown in the figure, it completes the interaction between users through a trusted security organization, realizes a mechanism for multi-user data sharing, 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 user's local storage pressure and computing difficulty, and facilitate the deployment and construction of user nodes, making the system highly interactive, fast in response speed, with a secure access mode, fast in response speed, and conducive to processing large amounts of data.
[0053] At the same time, although cloud servers have powerful storage and computing capabilities, they have the risk of information leakage and snooping, and cannot perform plain text operations. The cost of protecting large data sets in cloud servers is high; the introduction of a secure user manager ensures the security of the plain text encryption and indexing process, and the user information data set stored locally is small and easy to protect, which greatly reduces the difficulty of ensuring system security.
[0054] According to the actual application scenario, the C / S distributed structure based on the inverted dictionary big data symmetric searchable encryption method for protecting data integrity in this application mainly consists of three parts: cloud server, secure user manager and user, such as Figure 3 shown.
[0055] Among them, the cloud server, as the storage and computing layer of the architecture, can be composed of one or more distributed cloud servers, which store a large amount of user's private data in encrypted form and can be calculated in parallel to meet the user's search query and statistical analysis functions;
[0056] As the user interaction layer of the architecture, the secure user manager is responsible for distributing accounts and granting identities to users, recording user identities and permissions to query the cloud server. That is, only the data owner and users authorized by the owner as data users can search and count the corresponding private data, complete access control and authorization hosting, support user joint queries, and regularly check the ownership of files in the cloud server.
[0057] In addition, each user of the system has a corresponding identity account and can become a data owner, send data to the system and store it, obtain data search statistics, and browse the content of all data; at the same time, they can apply for data usage rights from other data owners and become data users. They can obtain other people's data search statistics, but cannot browse the text content.
[0058] Therefore, the C / S distributed structure of the present application provides a new access model as a searchable encryption solution, which can solve the dilemma of requiring data owners to be online for a long time in the single-write and multiple-read (S / M) scenario, support personalized joint query, attribute classification and other functions, and reduce the user's local storage overhead and communication overhead between layers.
[0059] 2. Software Structure:
[0060] This application has built a searchable encryption demonstration software system that supports multiple search modes. According to the number of keywords, it can be divided into single keyword query and multi-keyword query. According to the search object, it can be divided into single user data query and multi-user data joint query.
[0061] This application can also set a permission model for users. Depending on the identity, the corresponding permissions that users can perform on the data are also different:
[0062] Among them, the data owner can perform four operations: store data, view and delete data, retrieve and perform statistical analysis on data, and allow / deny other users to use data;
[0063] Data users can apply to use other users' data and perform two operations: search and statistical analysis on the data.
[0064] This application supports a variety of statistical analysis operations for user data, including obtaining all documents containing keywords, obtaining the relevance between documents and keywords, word frequency analysis, semantic analysis, and model building, etc. Figure 4 shown.
[0065] 3. Safety requirements:
[0066] This application meets the following security requirements:
[0067] 1. The third-party cloud platform cannot obtain any relevant information about the plaintext through the ciphertext file;
[0068] 2. Third-party cloud platforms cannot conduct keyword searches on files without legitimate authentication of users;
[0069] 3. Third-party cloud platforms cannot privately obtain, collect, and memorize user search keywords and the corresponding relationship between the corresponding keywords and ciphertext files;
[0070] 4. Third-party cloud platforms cannot tamper with, add, or delete encrypted files without permission.
[0071] 4. Optimization direction:
[0072] 1. Static symmetric searchable encryption scheme
[0073] In the symmetric searchable encryption scheme, users generate trapdoor information through keywords and passwords and complete ciphertext retrieval in the cloud; in view of the application characteristics of large amounts of data in cloud storage systems, this application adopts SSE technology with higher search efficiency to establish a static SSE scheme;
[0074] 2. Expanded scenario adaptability: Single-write and multiple-read (S / M) scenarios
[0075] In a scenario with a single data owner and multiple data users (S / M), only DO has the right to modify the data, and other DUs need to obtain DO's authorization when querying the data set. This application records the ownership and usage rights of each piece of data by referencing a secure user manager, so that DU only needs to apply for access credentials once before accessing the database, avoiding the need to apply for access credentials every time it queries; DO only needs to reply to the result (Yes / No) of DU's application, and the number of bits transmitted is very small. The user manager generates access credentials for DU, which greatly saves the overhead of transmitting information between users.
[0076] There is no direct connection between DO and DU, which effectively prevents the leakage of query features when DU uses data and increases security; the user manager established on the user side can respond quickly and quickly complete the interactive operations between users; the user manager provides smart contract execution for DO, and can directly reply to DU according to the application judgment conditions preset by DO for DU, so that DO does not have to be online all the time to execute the authorization process on its behalf, and can further reduce communication overhead and application response time, effectively improving its security, communication overhead, response speed, practicality and other performance.
[0077] 3. Search method structure optimization: inverted dictionary structure
[0078] According to the organization of the index, this application adopts an inverted dictionary, which is a classic data structure for full-text search. It is used to search for the storage location of a keyword in a document, and has better search efficiency than a decent index. The index structure mainly consists of two parts: a keyword dictionary and an inverted list. The dictionary contains the terms and list pointers composed of keywords. The inverted list records the location information of the keyword in different documents. When establishing the index structure, the keywords are first extracted from the file, and an inverted dictionary of keywords is constructed based on the keyword dictionary and its inverted list. It has better search efficiency than a decent index.
[0079] 4. Query mode expansion: single keyword / multi-keyword query
[0080] In order to expand the expressive power of query statements and strive to obtain more accurate query results through a single query, most searchable encryption schemes only support single keyword search, which is easy to build and analyze. On this basis, this application additionally provides a multi-keyword query mode to meet the user's search needs in a more targeted manner and facilitate the construction of more convenient and flexible query statements.
[0081] 5. Query result optimization: result sorting and custom query
[0082] In this application, for searchable encrypted results, the corresponding results can be returned according to the user-defined keyword frequency level. At the same time, the relevance of any document to the keyword can be intuitively displayed, and the query results can be sorted in ascending / descending order according to the frequency of appearance in the corresponding document. The above custom query functions can be used in both single keyword and multi-keyword modes, and can be combined with drawing tools to generate visual statistical results for the query results.
[0083] Specifically, Figure 5 A flowchart of a symmetric searchable encryption method for big data based on an inverted dictionary provided in an embodiment of the present application.
[0084] like Figure 5 As shown, the inverted dictionary-based big data symmetric searchable encryption method includes the following steps:
[0085] In step S501, file data and a target password uploaded by a user are received, and the user manager is controlled to extract at least one keyword from the plaintext data by combining the TF-IDF algorithm with the Kmeans clustering method, and an inverted dictionary is established based on the at least one keyword.
[0086] In an embodiment of the present application, a user can send a creation request to a secure user manager, upload plaintext file data, and set a login password, and then use the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm and Kmeans clustering method to extract keywords from the files uploaded by the user, thereby establishing an inverted dictionary.
[0087] Optionally, in one embodiment of the present application, the user manager is controlled to use a method combining the TF-IDF algorithm and Kmeans clustering to extract at least one keyword in the plaintext data, and establish an inverted dictionary based on the at least one keyword, including: calculating the TF-IDF value of each word in the plaintext data, and extracting the at least one keyword in the plaintext data according to the TF-IDF value of each word; based on the Kmeans clustering algorithm, classifying at least one keyword in the plaintext data, and obtaining an inverted dictionary according to the classification result.
[0088] Since words with higher occurrence frequency have higher importance relative to the document, the embodiment of the present application supports two query modes: single keyword and multiple keyword. Therefore, before establishing an inverted dictionary, it is necessary to first extract keywords from different documents.
[0089] It can be understood that the embodiments of the present application are based on natural language processing and introduce common stop words in the English language, such as a, an, the and other meaningless words, which are not used as keywords, thereby reducing the number of keywords, greatly reducing the search complexity, improving the keyword search extraction performance, and matching it with the cloud big data application scenario.
[0090] It should be noted that for the remaining words, the embodiments of the present application may use a method combining the TF-IDF algorithm and Kmeans clustering to extract keywords from the document and divide them into several categories (such as strong, medium, weak) according to their importance, so that they can be sorted according to their importance when querying.
[0091] Specifically, the TF-IDF algorithm mainly includes two parts: term frequency (TF) and inverse document frequency (IDF).
[0092] Among them, the expression of word frequency TF is as follows:
[0093]
[0094] In the formula, c(w i ) indicates w i The number of times it appears in this document.
[0095] In real life, the more times a word appears in a document, the less important it is. For example, in a document, "the" appears 100 times, while "bee" appears 10 times. Obviously, the latter is more important to the document. Therefore, the importance of the word can be measured by the inverse document frequency when the number of occurrences is the same. The mathematical expression is as follows:
[0096]
[0097] Where N d represents the total number of documents in the corpus, Indicates the appearance of w i The total number of documents.
[0098] Therefore, the embodiments of the present application reduce the weight of words that appear in a large number of documents. The more documents a word appears in, the lower its inverse document frequency is, that is, the lower its importance is.
[0099] After calculating the TF-IDF value for each word that appears in the document, the embodiment of the present application can further divide the extracted keywords into several categories through the Kmeans clustering algorithm. Different categories represent different importance of words to the document. The specific process is as follows:
[0100] (1) Randomly select the centers of k word classes;
[0101] (2) Cluster each word based on its TF-IDF value and the distance from the three word class centers;
[0102] (3) Recalculate the center of each class;
[0103] (4) Repeat steps (1) to (3) until convergence.
[0104] Therefore, the embodiment of the present application extracts keywords through the TF-IDF algorithm and the Kmeans clustering method, constructs a (word, importance) tuple, and establishes an inverted dictionary (inverted dictionary) based on the tuple, which effectively ensures that the user's search needs are met and improves search efficiency.
[0105] In step S502, the file data is encrypted using a preset AES algorithm to obtain encrypted file data, and at least one encrypted linked list is constructed using the preset AES algorithm, a pseudo-random generator, and the inverted dictionary. At the end of each encrypted linked list, a preset HMAC message verification code is added, and the encrypted linked list is noise-filled using a target password to generate a node sequence and an index sequence of at least one keyword.
[0106] After constructing the inverted dictionary, the embodiment of the present application can further encrypt the plain text files uploaded by the user using the AES algorithm through the user server.
[0107] Since the AES algorithm requires a key and an initial vector IV, the user server can generate a 16-bit key and initial vector IV through a pseudo-random number generator, encrypt the plaintext files uploaded by the user, and output them into ciphertext files respectively, thereby providing a reliable data basis for the subsequent implementation of symmetric searchable encryption.
[0108] Then, after establishing the inverted dictionary, the embodiment of the present application can add an HMAC message verification code controlled by the user key as the end of the encryption chain at the end of each encryption chain list in the inverted dictionary structure, thereby generating a new inverted dictionary, i.e., an encryption chain list, and fill the encryption chain list with noise based on the login password of the above-mentioned user, so as to further ensure the transmission security of information such as keywords.
[0109] Optionally, in one embodiment of the present application, at least one encrypted linked list is constructed using a preset AES algorithm, a pseudo-random generator and an inverted dictionary, a preset HMAC message verification code is added at the end of each encrypted linked list, and the encrypted linked list is noise-filled using 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 encrypted linked list; randomly generating at least one noise value, and filling each empty position in the encrypted linked list with at least one noise value to obtain a node sequence and an index sequence.
[0110] It should be noted that, after generating an inverted dictionary for keywords other than stop words (meaningless dictionary) according to the user's file content and recording the position of each word in the file list, the embodiment of the present application can use the user password as a seed, and use KDF (Key Derivation Function) and HMAC function to generate a key key_s for establishing an address chain between nodes in the inverted dictionary, traverse the inverted dictionary, and use key_s to encrypt the keyword-file name information in the inverted dictionary to obtain an encrypted linked list, i.e., an encrypted linked list, and encrypt the position of each keyword with a different key, and record the position of each keyword and the key used for encryption in the form of a pointer.
[0111] After the embodiment of the present application encrypts the valid information and stores it in the above-mentioned encrypted linked list, since the empty array is very easy to expose the valid information, the embodiment of the present application can randomly generate noise values to fill the empty part of the encrypted linked list, thereby obtaining the node sequence A; further, the embodiment of the present application can generate an index sequence T, that is, an encrypted node address list, to facilitate the access to the node sequence A.
[0112] Therefore, the embodiment of the present application hides the valid information in the node sequence A and the index sequence T by adding meaningless random numbers as noise, thereby achieving secure storage of the node sequence and the index sequence on the server side and providing effective security protection for the communication information.
[0113] In step S504, the cloud server is used to query the file name corresponding to the target keyword in at least one keyword through the target password in combination with the node sequence and the index sequence, and the encrypted file data corresponding to the target keyword is obtained according to the query result, and the encrypted file data is decrypted and viewed.
[0114] After obtaining the node sequence and index sequence, further, the embodiments of the present application can also generate corresponding keys and open the node sequence and index sequence files by calling keygen through the server based on the user inputting passwords and keywords, so as to find the file names corresponding to the keywords stored in the indexing stage in sequence according to the trapdoor information, thereby ensuring the security of privacy data.
[0115] Optionally, in one embodiment of the present application, a cloud server is used to query the file name corresponding to each keyword in at least one keyword through a target password in combination with a node sequence and the index sequence, including: according to the node sequence and the index sequence, at least one keyword is retrieved through a preset trapdoor function to obtain the file name corresponding to the target keyword.
[0116] The embodiments of the present application can utilize a trapdoor function and a pseudo-random number generator to perform ciphertext retrieval queries.
[0117] Specifically, the embodiments of the present application can generate key_y and key_z keys through the password password input by the user through KDF and HMAC functions, so as to restore the trapdoor according to the keywords keyword and key_z, key_y input by the user and hide the keywords.
[0118] In the process of establishing an index, the embodiment of the present application uses a key to hide the information in the node sequence A and the index sequence T through the build_array function and the look_up_table function; the build_array function uses key_s to hide the current node address using a pseudo-random number algorithm; the look_up_table function uses key_z to hide the position of the keyword in the index sequence T, uses the above-mentioned key_s to hide the address information of the keyword in the node sequence A, and uses key_y to hide the keyword.
[0119] In the actual retrieval process, the user enters the password password to generate the keys key_s, key_y, key_z, thereby restoring the hidden information in the node sequence A and the index sequence T. If there is no password, brute force cracking is required to traverse random numbers, thereby meeting the user's search query, statistical analysis and other functional requirements, effectively ensuring the security and reliability of information query and transmission.
[0120] Optionally, in one embodiment of the present application, after querying the file name corresponding to the target keyword in at least one keyword, it also includes: based on a 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 status of the file data corresponding to the target file name; using the preset HMAC message verification code in the encryption linked list to perform integrity proof on the file data corresponding to the target keyword.
[0121] It should be noted that the embodiments of the present application can also use Merkle trees and HMAC message authentication codes to respectively prove data possession and query result integrity. The specific process is as follows:
[0122] 1. Data possession proof based on Merkle tree:
[0123] It can be understood by those skilled in the art that Merkle trees based on hash functions are often used in blockchains to quickly summarize and verify the existence and integrity of block data. Data possession proof based on Merkle trees can quickly verify whether an element is in a given set without leaking any other information.
[0124] Therefore, in an embodiment of the present application, in order to check whether the user's files in the cloud server are lost, a Merkle tree structure of the user document needs to be maintained on the cloud server side. The secure user manager side acts as a verifier and stores the hash value of the Merkle tree root node. The verifier periodically sends a possession proof request for a random file to the cloud server. After receiving the request, the cloud server returns the path information where the file is located, that is, the possession proof; the verifier compares the root nodes. 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] During the calculation process, since the cloud server cannot forge a path information with an unchanged root node hash value, the path information can be used as a sign that the cloud server holds the document.
[0126] For example, Figure 6 As shown, if you need to check whether doc1 is stored on the server, the server needs to return the Merkle proof of doc1, that is, Hash0-2, Hash1-2. The user manager uses this information to calculate the root hash value and confirm whether it is consistent with the predicted result.
[0127] It should be noted that in the data possession proof technology based on the Merkle tree, technical personnel in this field can also maintain the Merkle tree structure of user documents in a secure user manager, i.e., the verifier, and regularly apply to the cloud server for proof of possession of random documents, i.e., send the document number and the hash value of the sibling node on the path where the document is located to the server. 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 can be returned to the verifier; if the file is lost, the root node value cannot be calculated to verify the possession of the document.
[0128] Therefore, in the embodiment of the present application, the data possession proof mechanism based on the Merkle tree can verify the possession of files in the cloud server, ensure the integrity of data storage, and detect the loss of files in the cloud server in a timely manner; and the server only needs to store some additional hash values, the storage overhead is small, and the user manager only needs to calculate a few hash values during verification (if the number of uploaded files is n, only need to calculate Hash value), compared with similar data possession proof mechanisms, this mechanism effectively avoids the huge communication overhead and data security issues caused by the verifier transmitting data. Applying this mechanism to the searchable encryption system greatly reduces the storage overhead of the verifier and cloud server for additional maintenance.
[0129] 2. Proof of query result integrity based on HMAC message authentication code:
[0130] In order to prevent the cloud server under the partially honest and curious model from performing lazy calculations and returning local solutions, the embodiment of the present application adds an HMAC message authentication code controlled by the user key as the end of the encryption chain at the end of each encryption chain list based on the inverted dictionary structure.
[0131] Since the cloud server cannot obtain the user's key, when the cloud server only returns part of the linked list where the keyword is located without addressing to the end of the linked list, 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 also negligible, ensuring the integrity of the results returned by the cloud server.
[0132] Specifically, the HMAC algorithm in the embodiment of the present application utilizes a hash operation, takes a key and a message as input, generates a message digest as output, and its security is based on the hash encryption algorithm, and requires the communicating parties to share a key, agree on an algorithm, and perform a hash operation on the message to form an authentication code of a fixed length.
[0133] The present application embodiment adopts the HMAC-SHA256 algorithm, that is, the HMAC algorithm that uses SHA-256 to generate a hash value, such as Figure 7 As shown, the mathematical expression of the HMAC-SHA256 algorithm is as follows:
[0134]
[0135] Among them, SHA256 is the SHA-256 encryption algorithm, and its output hash value length is 256-bit; B is the plaintext block 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, it is padded to the right with zeros until it is the same as B; if k is longer than B, a SHA256 hash calculation is performed on k); ipad internal padding (512-bit constant); opad external padding (512-bit constant).
[0136] Therefore, the embodiments of the present application can prevent the server from performing lazy calculations to save computing resources and returning local solutions to users under a partially honest and curious model of cloud servers. By improving the original storage structure and avoiding adding additional communication and storage overhead, the integrity verification of query results is achieved, which effectively improves the response speed and further saves storage resources.
[0137] In summary, the core technology of the inverted dictionary big data symmetric searchable encryption method of the present application mainly includes two parts: indexing and ciphertext retrieval. The specific execution steps are as follows:
[0138] 1. Create an index:
[0139] In the embodiment of the present application, the user uploads data and encrypts and creates an index, which is completed by the user server, and the symbol definition of the user creating the index is 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 key and initial vector IV to encrypt the filenames input by the file 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 based on the password entered 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 and obtain an inverted dictionary:
[0147] initialization(filenames)→word_dict
[0148] (4) Use key_s to encrypt the keyword-file name information in word_dict to obtain the node sequence A, fill the remaining part of A, and put the first keyword-key-occurrence number 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 the index sequence T, and fill the remaining part of T with noise:
[0151] look_up_table(keyword_key_pair,key_s,key_y,key_z)→T
[0152] Among them, C:outfilenames is the ciphertext file name list, M:filenames is the plaintext file name list uploaded by the user, key_s is used to establish the key for the 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 encrypted node address list.
[0153] 2. Ciphertext retrieval:
[0154] The embodiment of the present application can perform a ciphertext search operation after the user enters a password and a keyword, and the server searches and returns the file name containing the keyword. After receiving the password, the server calls keygen to generate the corresponding keys key_s, key_y, key_z; the server opens the A and T files, and finds the file names corresponding to the keywords stored in the indexing stage in turn according to the trapdoor information, wherein the symbolic definition of ciphertext search is as follows:
[0155] SUO: C = Search (P, K)
[0156] The general process of the search part in the embodiment of this application is as follows:
[0157] (1) Restore the three keys used in the indexing process based on the password entered by the user:
[0158] keygen(password)→key_s, key_y, key_z
[0159] (2) Restore the trapdoor based on the keyword keyword, key_z, and key_y entered by the user, and hide the keyword:
[0160] Trapdoor(keyword,key_z,key_y)→trapdoor
[0161] (3) Based on A and T generated when building the index and the trapdoor generated by the password, the file list corresponding to the keyword is obtained:
[0162] Serch_single(A, T, trapdoor, keyword) → list_of_docs
[0163] Among them, C is the file name containing the keyword found by the server, P is the password entered by the user, K represents the keyword entered by the user, key_s is used to establish the key for 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 inverted dictionary big data symmetric searchable encryption method in conjunction with the accompanying drawings.
[0165] Figure 8 The figure is a schematic diagram of the execution logic of the symmetric searchable encryption method for big data based on inverted dictionary.
[0166] like Figure 8 As shown, the symmetric searchable encryption method based on inverted dictionary big data of the present application mainly includes five working stages: user establishment, user uploading data and establishing encryption index, user searching for keywords, applying to use other users' data and data possession verification. Specifically, when the present application performs different operations, the execution process of each working stage is as follows:
[0167] 1. User establishment stage:
[0168] User: Send a create request to the secure user manager and set the login password password ID ;
[0169] User Manager: After receiving the user's request, record the user's identity information ID and password ID , (ID, password ID ) is stored in the user database (User Database).
[0170] 1 User→SUO:password ID
[0171]
[0172] 2. The user uploads data and encrypts and creates an index:
[0173] User: uploads the data M to be stored in the cloud to the user manager in plain text;
[0174] User Manager: The data M uploaded by the user has a serial number of ID M , use the AES algorithm to encrypt the data M and generate an index to obtain the ciphertext and index information C (establish an index module), and use the pseudo-random number generation algorithm to generate a unique ID CThe access password of the data is password, and the serial number ID of the data M is added to the permission list of the user ID. M Store it in the User-Data Database, and upload the ciphertext C to the cloud server;
[0175] Cloud Server: receives the encrypted data C from the user manager and returns the storage location of the encrypted data C to the user manager. C ;
[0176] User Manager: Receive the location of the ciphertext in the cloud server loc C , the corresponding relationship (ID M ,password,loc C ) is stored in the 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 search keyword stage:
[0186] User: Enter the data serial number ID you want to query M , and the query single / multiple keywords are sent to the user manager;
[0187] User Manager: First, based on the identity ID of the user sending the message, query the user ID's usage data permission list in the user data permission library to determine whether it has the permission to use the data ID M authority;
[0188] If the corresponding user does not have permission, an error message is returned to the user;
[0189] If yes, then use the trapdoor function to search for the keyword (search module). M The information is sent to the cloud server to retrieve the location where the data is stored. C and retrieve the required parameters trapdoor;
[0190] Cloud server: received loc C After trapdoor, for the internal storage in loc C The data at the location is retrieved and a list of documents containing the keyword, list_of_docs, is returned;
[0191] User Manager: After receiving list_of_docs, it feeds back the query results to the user according to the user's statistical requirements.
[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. Application for using other users’ data:
[0203] Applicant User ID1: Send the data serial number ID you want to apply for to the user manager M ;
[0204] User Manager: According to the received data sequence ID MQuery in the user data permission library and find the ID M The data owner is user ID2. The applicant's identity ID1 and a request to use the data are sent to user ID2;
[0205] Owner user ID2: For the application request of user ID1, you can choose to approve or reject the application and return the result Yes / No to the user manager;
[0206] User Manager:
[0207] If the application result is No, the application result will be directly returned to user ID1;
[0208] If the application result is Yes, the applicant user ID2 will be added to the data ID M The permission list is then returned 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 stage:
[0217] User: Enter the file data serial number that needs to be verified as ID M Send to User Manager;
[0218] User Manager: Assign users to corresponding file IDs M The query request is uploaded to the cloud server;
[0219] Cloud Server: If the cloud server holds the file ID M , the corresponding Merkle proof can be generated and returned to the user manager;
[0220] User Manager: Verifies the Merkle proof of the cloud server and returns the verification result Yes / No to the user;
[0221] If the returned result is Yes, it proves that the cloud server holds the file correctly;
[0222] If the returned result is No, it cannot be proved that the cloud server holds the file and needs to be uploaded again.
[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 symmetric searchable encryption method based on inverted dictionary big data, this application implements and builds a searchable encryption demonstration system to facilitate technical personnel in this field to perform related encryption operations, including four interfaces: user login interface, index creation interface, ciphertext retrieval interface, and possession verification interface, as described below:
[0229] 1. User login interface:
[0230] In the user login interface, users can log in by entering their username and password; they can also authorize other users by entering the user name they want to authorize;
[0231] 2. Create index interface:
[0232] In the index creation interface, users upload the data to be stored, and a secure user encrypts and indexes the data, and uploads the encrypted data to the cloud server;
[0233] 3. Ciphertext search interface:
[0234] In the ciphertext search interface, based on the currently logged in user, you can search for files you have permission to in single keyword or multiple keyword modes. The search range includes files you have uploaded and files authorized by other users. You can get the correlation strength between documents and keywords and sort them according to the correlation strength. At the same time, a visualization graph of relevant statistical results is generated.
[0235] 4. Hold the verification interface:
[0236] In the possession verification interface, the user enters the name of the file whose possession needs to be verified, and the cloud server returns the Merkle proof of the file, proving that the file is correctly stored in the cloud server.
[0237] It can be understood that the embodiments of the present application realize the data sharing community and user interaction interface at the application level based on the inverted dictionary big data symmetric searchable encryption technology, such as Fig. 9 As shown, the core functions such as indexing, data encryption and ciphertext retrieval are completed through the three-layer architecture of the C / S distributed structure, namely users, secure user managers and cloud servers. In addition, this application meets three security models, can resist non-adaptive selected keyword attacks, and realizes ciphertext possession and result integrity proof by using Merkel technology and HMAC message authentication code, ensuring the security of privacy data and the accuracy of system operation.
[0238] According to the symmetric searchable encryption method for big data based on an inverted dictionary proposed in an embodiment of the present application, in a C / S distributed structure, file data and a target password uploaded by a user are received, and a user manager is controlled to extract at least one keyword from 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 using a preset AES algorithm to obtain encrypted file data, and an encrypted linked list is constructed using a preset AES algorithm, and at the end of each encrypted linked list, an HMAC message verification code is added, and the encrypted linked list is noise-filled using the target password to generate a node sequence and an index sequence; the cloud server is used to query the file name corresponding to the target keyword using the target password, thereby reducing the storage overhead of the user manager and the cloud server for additional maintenance, as well as the communication overhead between layers, and effectively improving the security and reliability of privacy data protection.
[0239] Secondly, the symmetric searchable encryption device based on inverted dictionary big data proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0240] Fig.10 It is a block diagram of a symmetric searchable encryption device based on inverted dictionary big data according to an embodiment of the present application.
[0241] like Fig.10 As shown, 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 used to receive the file data and target password uploaded by the user, control the user manager to extract at least one keyword from the plaintext data by combining the TF-IDF algorithm with the Kmeans clustering method, and establish an inverted dictionary based on the at least one keyword.
[0243] The encryption module 200 is used to encrypt the file data using a preset AES algorithm to obtain encrypted file data, construct at least one encryption chain list using the preset AES algorithm, a pseudo-random generator and an inverted dictionary, add a preset HMAC message verification code at the end of each encryption chain list, and perform noise filling on the encryption chain list using a target password to generate a node sequence and index sequence of at least one keyword.
[0244] The query module 300 is used to use the cloud server through the target password, combined with the node sequence and the index sequence, to query the file name corresponding to the target keyword in at least one keyword, and obtain the encrypted file data corresponding to the target keyword according to the query result, and decrypt the encrypted file data for viewing.
[0245] Optionally, in one embodiment of the present application, the inverted dictionary big data symmetric searchable encryption device 10 of the embodiment of the present application further includes: a verification module and a proof module.
[0246] Among them, the verification module is used to perform data possession verification on the target file name in the file name corresponding to the target keyword based on the preset Merkle tree after querying the file name corresponding to the target keyword in at least one keyword, so as to determine the storage status of the file data corresponding to the target file name.
[0247] The certification module is used to use the preset HMAC message verification code in the encryption chain list to prove the integrity of the file data corresponding to the target keyword.
[0248] Optionally, in one embodiment of the present application, the extraction module 100 includes: a calculation unit and a classification unit.
[0249] The calculation unit is used to calculate the TF-IDF value of each word in the plain text data, and extract at least one keyword in the plain text data according to the TF-IDF value of each word.
[0250] The classification unit is used to classify at least one keyword in the plain text data based on the Kmeans clustering algorithm, and obtain an inverted dictionary according to the classification result.
[0251] Optionally, in one embodiment of the present application, the encryption module 200 includes: a generation unit and a filling unit.
[0252] The generating unit is used to generate an address key based on the target password, encrypt the inverted dictionary using the address key, and generate an encrypted linked list.
[0253] The filling unit is used to randomly generate at least one noise value, and fill each vacancy in the encryption linked list with the at least one noise value to obtain a node sequence and an index sequence.
[0254] Optionally, in one embodiment of the present application, the query module 300 includes: a retrieval unit, configured to retrieve at least one keyword according to the node sequence and the index sequence by using a preset trapdoor function to obtain a file name corresponding to the target keyword.
[0255] It should be noted that the aforementioned explanation of the embodiment of the symmetric searchable encryption method based on inverted dictionary big data is also applicable to the symmetric searchable encryption device based on inverted dictionary big data of this embodiment, and will not be repeated here.
[0256] According to the inverted dictionary big data symmetric searchable encryption device proposed in the embodiment of the present application, by receiving file data and target passwords uploaded by users in a C / S distributed structure, controlling the user manager to use a method combining the TF-IDF algorithm with Kmeans clustering to extract at least one keyword in the plaintext data to establish an inverted dictionary; using a preset AES algorithm to encrypt the file data to obtain encrypted file data, using the preset AES algorithm to construct an encrypted linked list, at the end of each encrypted linked list, adding an HMAC message verification code, and filling the encrypted linked list with noise through the target password to generate a node sequence and an index sequence; using the cloud server to query 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, as well as the communication overhead between layers, and effectively improving the security and reliability of privacy data protection.
[0257] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0258] A memory 1101 , a processor 1102 , and a computer program stored in the memory 1101 and executable on the processor 1102 .
[0259] When the processor 1102 executes the program, the symmetric searchable encryption method based on inverted dictionary big data provided in the above embodiment is implemented.
[0260] Furthermore, the electronic device further comprises:
[0261] A communication interface 1103, used for communication between the memory 1101 and the processor 1102;
[0262] The memory 1101 is used to store computer programs that can be executed on the processor 1102 .
[0263] The memory 1101 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as 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 to each other through a bus and communicate with 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. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this 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 communicate with each other through an internal interface.
[0266] The processor 1102 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0267] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned symmetric searchable encryption method based on inverted dictionary big data.
[0268] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0269] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0270] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0271] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0272] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0273] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0274] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0275] The storage medium mentioned above may 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 can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A symmetric searchable encryption method for big data based on an inverted dictionary, characterized in that: The following steps are involved: Receive the file data and target password uploaded by the user, control the user manager to extract at least one keyword from the plaintext data by using a method combining the TF-IDF algorithm with the Kmeans clustering, and establish an inverted dictionary based on the at least one keyword; Encrypt the file data using a preset AES algorithm to obtain encrypted file data, construct at least one encrypted chain list using the preset AES algorithm, a pseudo-random generator, and the inverted dictionary, add a preset HMAC message verification code at the end of each encrypted chain list, and perform noise padding on the encrypted chain list using the target password to generate a node sequence and an index sequence of the at least one keyword; The cloud server uses the target password, in combination with the node sequence and the index sequence, to query the file name corresponding to the target keyword in the at least one keyword, obtain the encrypted file data corresponding to the target keyword according to the query result, and decrypt the encrypted file data for viewing.
2. The method according to claim 1, characterized in that After searching for a file name corresponding to a target keyword in the at least one keyword, the method further includes: Based on a preset Merkle tree, data possession verification is performed on a target file name in the file name corresponding to the target keyword to determine a storage status of the file data corresponding to the target file name; The preset HMAC message verification code in the encryption chain table is used to prove the integrity of the file data corresponding to the target keyword.
3. The method according to claim 1, characterized in that The control user manager uses a method combining TF-IDF algorithm and Kmeans clustering to extract at least one keyword from the plaintext data, and establishes an inverted dictionary based on the at least one keyword, including: Calculating the TF-IDF value of each word in the plaintext data, and extracting at least one keyword in the plaintext data according to the TF-IDF value of each word; Based on the Kmeans clustering algorithm, the at least one keyword in the plaintext data is classified, and the inverted dictionary is obtained according to the classification result.
4. The method according to claim 3, characterized in that The method uses a preset AES algorithm, a pseudo-random generator and the inverted dictionary to construct at least one encrypted chain list, adds a preset HMAC message verification code at the end of each encrypted chain list, and performs noise filling on the encrypted chain list through the target password to generate a node sequence and an index sequence of the at least one keyword, including: Generate an address key based on the target password, and use the address key to encrypt the inverted dictionary to generate the encrypted linked list; At least one noise value is randomly generated, and each vacancy in the encryption linked list is filled with the at least one noise value to obtain the node sequence and the index sequence.
5. The method according to claim 4, characterized in that The using the cloud server to query the file name corresponding to each keyword in the at least one keyword by using the target password in combination with the node sequence and the index sequence includes: According to the node sequence and the index sequence, the at least one keyword is retrieved by using a preset trapdoor function to obtain a file name corresponding to the target keyword.
6. A symmetric searchable encryption device based on inverted dictionary big data, characterized in that: include: An extraction module, used to receive file data and target password uploaded by a user, control the user manager to extract at least one keyword from the plaintext data by using a method combining a TF-IDF algorithm and a Kmeans clustering, and establish an inverted dictionary based on the at least one keyword; An encryption module, used to encrypt the file data using a preset AES algorithm to obtain encrypted file data, construct at least one encryption chain list using the preset AES algorithm, a pseudo-random generator and the inverted dictionary, add a preset HMAC message verification code at the end of each encryption chain list, and perform noise filling on the encryption chain list using the target password to generate a node sequence and an index sequence of the at least one keyword; The query module is used to use the cloud server to query the file name corresponding to the target keyword in the at least one keyword through the target password, combined with the node sequence and the index sequence, and obtain the encrypted file data corresponding to the target keyword according to the query result, and decrypt the encrypted file data for viewing.
7. The device according to claim 6, characterized in that Also includes: A verification module, configured to perform data possession verification on a target file name in the file names 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, so as to determine a storage status of the file data corresponding to the target file name; The certification module is used to use the preset HMAC message verification code in the encryption chain table to perform integrity certification on the file data corresponding to the target keyword.
8. The device according to claim 6, characterized in that The extraction module comprises: a calculation unit, configured to calculate a TF-IDF value of each word in the plaintext data, and extract at least one keyword in the plaintext data according to the TF-IDF value of each word; A classification unit is used 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.
9. An electronic device, characterized in that: include: 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 any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the symmetric searchable encryption method based on inverted dictionary big data as described in any one of claims 1-5.
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
Searchable encryption technology method based on block chain
CN115314295A
Multi-keyword searchable encryption method with verifiable ciphertext retrieval result
CN116127498A
Symmetrical searchable encryption system and method based on alliance chain
CN116633625A
Cited By
A computer software security encryption management system and method
CN119783142A
Software development test data security verification method based on block chain
CN121389199A
Blockchain-based software development test data security verification method
CN121389199B
