Flexible keyword data merging method based on search encryption
Through a flexible keyword data merging method based on search encryption, the problems of high complexity of multi-keyword search and difficult data update consistency are solved, and efficient and secure keyword data merging and update are achieved.
Patent Information
- Application Number
- CN202510249409.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art has high complexity in multi-keyword search, making it difficult for users to flexibly merge keyword data, and it is difficult to ensure the consistency of merging when data is updated.
A flexible keyword data merging method based on search encryption is adopted. By defining the set of attribute values and a hyper-incremental sequence, keyword scores are generated, cyclically divided into clusters, building a plain text full binary tree, and designing encryption algorithms, trap gate generation algorithms, search algorithms and update algorithms to realize merge searchable encryption.
It realizes users to efficiently determine keyword collections, reduces search complexity, ensures the security and consistency of data merging, and is suitable for practical application scenarios such as Internet of Things devices.
Smart Images

Figure CN120180470A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a flexible keyword data merging method based on searchable encryption, and belongs to the technical field of network security. Background Art
[0002] Encrypting data is an important way to protect data privacy. However, encrypted data appears as a bunch of meaningless garbled characters to the cloud server, thus destroying the searchability of the data. Although users can download all the data to the local and then decrypt it, the computational, storage, and communication overhead required for this process cannot be borne by lightweight devices on the user side. Therefore, it is necessary to explore methods that can perform searches on ciphertext.
[0003] Searchable encryption technology provides a method to balance security and efficiency; this technology requires users to generate indexes and send them to the cloud server to achieve searches; in recent years, searchable encryption technology has been richly developed in terms of dynamics and security; in addition to considering the development of the dynamics and security of symmetric searchable encryption in the protocol itself, combined with actual application requirements, enriching search semantics has become an independent research interest, such as multi-keyword search; multi-keyword search considers the situation where users may need to search for multiple keywords simultaneously or contain a certain keyword among them.
[0004] In the literature Secure, Dynamic, and Efficient Keyword Search with Flexible Merging for Cloud Storage, an update algorithm supporting merging was proposed for the repetitive invocation of multi-keyword search algorithms, and it became mergeable searchable encryption. In the multi-keyword search model, for the same query, users need to repeatedly call the search algorithm and the update algorithm to ensure that the search results are accurate and up-to-date; and inevitably, the complexity of searching for multiple keywords is greater than the complexity of searching for multiple single keywords. To solve this problem, for a keyword set, users are allowed to call a merging algorithm to merge the data of all keywords in the set together and define it as a new keyword stored in the encrypted database, so that users can achieve searching for multiple keywords with the complexity of searching for a single keyword; for the data update situation caused by data addition or deletion, the concept of merge consistency was proposed, that is, after the data is updated, the merged generated data set will also be updated correspondingly.
[0005] However, the method proposed in this literature requires the user to first define the set of keywords to be merged and generate a merging key based on this set. However, in many practical application scenarios, when the number of keywords with a certain feature is large, it is unrealistic for the user to list all the keywords one by one to form a keyword set. For example, when the user is required to call all the data generated by all the Internet of Things devices in area A, all the Internet of Things device IDs in area A need to be searched. However, it is unrealistic for the user to remember all the Internet of Things device IDs and the devices they are responsible for. At the same time, the user may also need to call all the temperature information in areas A, B, and C. At this time, all the device IDs of the temperature sensors need to be searched to obtain all the temperature data. Therefore, for Internet of Things devices, the user needs to flexibly merge all the data generated by the Internet of Things devices according to actual needs. Therefore, it is very important to design a flexible keyword data merging method to efficiently solve the problems of the user determining the keyword set and searching, merging, and updating keyword data. Summary of the Invention
[0006] In view of the above problems, the technical problem to be solved by the present invention is to provide a flexible keyword data merging method based on searchable encryption that enables the user to efficiently determine the keyword set and ensures security while enabling the user to efficiently implement data merging.
[0007] To solve the above problems, the technical solution adopted by the present invention is as follows:
[0008] The flexible keyword data merging method based on searchable encryption of the present invention adopts the following steps:
[0009] S1. Define an attribute value set according to the specific meaning represented by the keyword, and establish a one-to-one mapping between a super-increasing sequence and the attribute value set to obtain a keyword score;
[0010] S2. Sort the keyword scores in ascending order to obtain a keyword score sequence. At the same time, determine a critical value ω, and then circularly divide the keyword score sequence to form a subset, named a cluster;
[0011] S3. Select a value as the number of target keywords included in the cluster, and then add dummy keywords to each cluster until it is filled;
[0012] S4. Regard several clusters as leaf nodes, construct a plaintext full binary tree, and assign a node ID to each node in it. At the same time, assign an ID to the keywords in each cluster;
[0013] S5. Design an encryption algorithm for the plaintext full binary tree, and the obtained ciphertext full binary tree is a key-value pair table;
[0014] S6. Design a trapdoor generation algorithm, a search algorithm, and an update algorithm for the ciphertext full binary tree based on the key-value pair table;
[0015] S7. Design a combined searchable encryption using the encryption algorithm of the plaintext full binary tree, the trapdoor generation algorithm, the search algorithm, and the update algorithm for the ciphertext full binary tree.
[0016] In step S2 of the present invention, the dichotomy method is used to cyclically divide the keyword score sequence until the number of keyword scores contained in each finally divided subsequence does not exceed the critical value ω; then, the keywords represented by the keyword scores in each sequence are used to form a subset; according to the properties of the super-increasing sequence, the scores of all keywords are different.
[0017] The encryption algorithm design of the plaintext full binary tree in step S5 of the present invention is specifically as follows: using clusters as leaf nodes, encrypting layer by layer from bottom to top using the first chain structure until the root node; for the keywords in each cluster, encrypting them using the second chain structure; after encryption, in addition to the corresponding node ciphertext value / keyword ciphertext value for each node / keyword, other ciphertext information is included and stored as a key-value pair; the finally obtained ciphertext full binary tree is a key-value pair table.
[0018] The ciphertext full binary tree of the present invention can locate the ciphertext corresponding to a node according to any node ID, and starting from this node, search for all its child nodes until the leaf nodes represented by each cluster, so as to obtain all the keyword information in this cluster; or directly obtain the corresponding key-value pair information according to the keyword information; the steps of the encryption algorithm of the plaintext full binary tree are as follows:
[0019] S301. Select an encryption key k for encrypting the plaintext full binary tree according to the required security strength t ;
[0020] S302. The encryption of the first chain structure is specifically as follows: given the leaf node ID: CT corresponding to a certain cluster, select a cluster key k clst , a random number u, and an ID: CT γ , determine the pseudo-random functions H1 and H2 to be used, and the encryption formula for the leaf node is as follows:
[0021]
[0022] The encryption formula for the parent node of the leaf node is:
[0023]
[0024] The encryption formula for the parent node of the non-leaf node is:
[0025]
[0026] In the formula, CT P represents the ID of the parent node, CT L and CT R represent the IDs of the left and right child nodes of the node respectively, u L and u R are the node random numbers corresponding to them, r L and r R are the filled random numbers;
[0027] S303. The encryption of the chain structure II is specifically as follows: Given a certain cluster, assuming that the keywords it contains are sorted by keyword scores as: w1,…,w γ , select node IDs for each keyword in the cluster: CT i , where the node CT γ of the γ-th keyword is the random number selected in S302, and select a pseudo-random function H; the encryption formula for each keyword is:
[0028]
[0029] In the formula, k1 is the encryption key used by the pseudo-random function H, r i0 is the filled random number, CT i-1 is the node ID corresponding to the (i - 1)-th keyword.
[0030] The trapdoor generation algorithm of the ciphertext full binary tree in the present invention determines the decryption information of the fewest nodes according to the data range covered by the user's search, and uses it as the trapdoor. The executor of the trapdoor generation algorithm is the user, the input is the range value of the keyword attributes that the user wants to merge, and finally the corresponding ciphertext node ID is output, and it is sent to the cloud server together with the encryption key k t of the ciphertext full binary tree as the trapdoor;
[0031] The executor of the search algorithm is the cloud server. The cloud server inputs the trapdoor and the key-value pair table represented by the ciphertext full binary tree, and finally outputs the search result, that is, all the keyword information H(k1, w i ) decrypted;
[0032] In the update algorithm, when adding keywords, there is no need to reconstruct the full binary tree structure. The executor of the update algorithm is the user. The user determines the encryption tree node information bound to the updated information, and then converts the updated information into key-value pairs by using the encryption method of the chain structure II and adds them to the ciphertext full binary tree.
[0033] The mergeable search encryption of the present invention includes an initialization algorithm, a search protocol, a merge protocol, and an update protocol;
[0034] The ciphertext full binary tree generated by the encryption algorithm for the plaintext full binary tree is part of the output of the initialization algorithm; the outputs of the trapdoor generation algorithm and the search algorithm for the ciphertext full binary tree are process values in the search protocol and the update protocol; the update algorithm for the ciphertext full binary tree is part of the output of the update protocol.
[0035] The initialization algorithm of the present invention runs the encryption algorithm for the plaintext full binary tree on all keywords to obtain a ciphertext full binary tree, and sends the ciphertext full binary tree to the front-end cloud server; at the same time, each keyword and the data corresponding to it are set as key-value pairs, which are the indexes of the keywords, and then all keyword indexes are encrypted to obtain encrypted indexes, and the encrypted indexes are sent to the back-end cloud server;
[0036] In the search protocol, the user first runs the trapdoor generation algorithm for the ciphertext full binary tree on the keyword to be searched, generates a search trapdoor for the ciphertext full binary tree and sends it to the front-end cloud server. The front-end cloud server runs the search algorithm for the ciphertext full binary tree to obtain the search result, that is, the search trapdoor of the keyword, and sends the search key generated according to the search trapdoor of the keyword to the back-end cloud server. The back-end cloud server determines the information of the target keyword index in the encrypted index according to the search key, returns the encrypted target keyword index to the user, and the user decrypts the target keyword index to finally obtain the data;
[0037] In the merge protocol, the user first runs the trapdoor generation algorithm for the ciphertext full binary tree on the keywords to be merged, generates a search trapdoor for the ciphertext full binary tree and sends it to the front-end cloud server. The front-end cloud server runs the search algorithm for the ciphertext full binary tree to obtain the search result, that is, the search trapdoor of the keyword, and sends the merge key generated according to the search trapdoor of the keyword to the back-end cloud server; the back-end cloud server determines the information of several keyword indexes that the user wants to merge in the encrypted index according to the merge key, and merges these keyword indexes together to generate a new keyword index;
[0038] In the update protocol, the user first sends the information to be updated to the front-end and back-end cloud servers, and then the front-end cloud server runs the update algorithm for the ciphertext full binary tree to update the ciphertext full binary tree. At the same time, the front-end cloud server generates an update key, and the back-end cloud server updates the corresponding keyword index in the encrypted index according to the update key.
[0039] In S1 of the present invention, the keyword is a device, the attributes include the type, brand and deployment location of the device, and the attribute value set is to define different values in each attribute as the attribute value set of the attribute, so as to obtain a complete attribute value set for the keyword;
[0040] The keyword score is specifically: take a super-increasing sequence a1, a2, …, and this sequence satisfies a i >∑j<i a j Establish a one-to-one correspondence between the complete set of attribute values and the super-increasing sequence.
[0041] The positive effects of the present invention are as follows: The plaintext full binary tree constructed by the present invention enables users to better manage all device information; by adopting the super-increasing sequence method, the attribute information of the device is transformed from uncertain multi-dimensional information into one-dimensional parameters, which is conducive to the management of device attributes.
[0042] The encryption algorithm for the plaintext full binary tree constructed by the present invention can deliver the device management information to the front-end cloud server for hosting, without disclosing specific device privacy information, and at the same time can search, add, delete, etc. the device information in a secure manner, which is suitable for the flexible management requirements of device information in real life.
[0043] The trapdoor generation algorithm and search algorithm for the ciphertext full binary tree constructed by the present invention enable users to quickly determine the target device set in a non-enumerative manner of the attribute value range, which is convenient for the management of a large number of devices with the same attributes in real life.
[0044] The present invention adopts the encryption algorithm for the plaintext full binary tree, the trapdoor generation algorithm, search algorithm and update algorithm for the ciphertext full binary tree to obtain the combined searchable encryption, which can realize the aggregation and merging of data in the target device set in the cloud, and any data update in the target device set will be reflected in the merged data, realizing the timely update and consistency of the data.
[0045] In terms of protecting the data of the device and reducing the user's overhead, it enables users to search and manage the device ciphertext information stored in the front-end and back-end cloud servers in a secure manner, and outsources this process to the cloud server, reducing the local computing burden of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Attached Figure 1 is the flowchart of the present invention;
[0047] Attached Figure 2 is the schematic diagram of the model structure of the present invention;
[0048] Attached Figure 3 is the schematic diagram of the full binary tree structure constructed based on clusters of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0049] The present invention will be further described in detail below with reference to the drawings and the corresponding actual application scenarios of the Internet of Things.
[0050] As Figure 1 , 2 shown, a flexible keyword data merging method based on searchable encryption adopts the following steps:
[0051] S1. Use keywords to represent devices in the Internet of Things, abstract information such as the brand, type, and deployment location of the devices as attributes, define different values in each attribute as the set of attribute values of the attribute, and finally obtain a complete set of attribute values for the keyword; then take a super-increasing sequence a1, a2, …, which satisfies a i >∑ j<i a j ; Establish a one-to-one correspondence between the complete set of attribute values and the super-increasing sequence, and based on this mapping relationship, obtain the score of each keyword;
[0052] Specifically, for example: There are 4 types of devices A, B, C, D, 5 brands with values α, β, γ, δ, ε, and 11 values for the deployment location, denoted as one, two, …, eleven. Therefore, a super-increasing sequence containing 4 + 5 + 11 = 20 numbers is generated, assumed to be 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096,
[0053] 8192, 16384, 32768, 65536, 131072, 262144, 524288. The correspondence between the super-increasing sequence and the attributes is shown in the following table:
[0054] 1 2 4 8 16 A B C D a 32 64 128 256 512 β γ δ ε one 1024 2048 4096 8192 16384 two three four five six 32768 65536 131072 262144 524288 seven eight nine ten eleven
[0055] According to the correspondence relationship, if a device with an attribute of (A, α, one, two) has a corresponding keyword score of 1 + 16 + 512 + 1024 = 1553, and a device with a keyword score of 33314, then according to the calculation properties of the super-increasing sequence, after solving, it should include 32768, 512, 32, 2, that is, the corresponding device with the attribute of (B, β, one, seven).
[0056] As shown in the appendix Figure 2 Devices usually include drones and sensors, etc.; the data collection of these devices generally shows periodicity, such as the monitoring of temperature data in the industrial production line process; and generally each device has its own main responsible area, such as deploying sensors in a fixed location to collect temperature and humidity, and the drone has a built-in flight path; before these Internet of Things devices are actually deployed by users, they will be assigned specific responsible areas, and an attribute set will be generated in combination with the functions of the devices themselves. The attribute set will be recorded and encrypted by the user and uploaded to the front-end cloud server. At the same time, the data upload address will be set in the Internet of Things device as the address of each back-end cloud server, and it is required that all data be encrypted for transmission.
[0057] User: The user is responsible for the deployment and maintenance of numerous devices in the Internet of Things, and will also interact with the front-end and back-end cloud servers according to requirements to query, merge, and update the data of specific devices or specific device collections. For example, query the temperature conditions of different parts of an industrial production line;
[0058] Cloud servers: Include front-end cloud servers and back-end servers; The front-end cloud server is responsible for sharing the user's computing and communication overhead, and can generally be regarded as a small server deployed locally; The back-end cloud server mainly stores all the encrypted data uploaded by the Internet of Things devices; All back-end cloud servers store the same encrypted data, that is, each back-end cloud server stores all the encrypted data. Generally, the number of back-end cloud servers is set to 2. The front-end cloud server and the back-end cloud server will cooperate with the user's actual needs to perform relevant search, merge, or update tasks;
[0059] S2. According to the keyword scores obtained in S1, sort the keyword scores in ascending order to obtain a keyword score sequence, and at the same time determine a critical value ω; Use the binary search method to perform circular partitioning on the keyword score sequence until the number of keyword scores contained in each finally partitioned subsequence does not exceed the critical value ω; Then form a subset with the keywords represented by the keyword scores in each sequence, named a cluster;
[0060] Specifically: For a keyword score sequence with 10 numbers and a critical value of 3, the first partition results in 2 sequences, each with 5 keyword scores. Since 5>3, it does not meet the requirements and needs to be further partitioned. Four sequences are obtained, with 3, 2, 3, and 2 keyword scores respectively. At this time, the partitioning requirements are met, so finally 4 subsequences are obtained; Then form subsets with the corresponding keywords, that is, four subsets (clusters) are obtained, containing 3, 2, 3, and 2 keywords respectively;
[0061] S3. Select a value greater than the critical value ω as the number of target keywords contained in the cluster, and then add dummy keywords to each cluster until it is filled; Specifically: The number of target keywords is 20, and then add dummy keywords to each cluster until each cluster contains 20 keywords;
[0062] S4. Regard the several clusters obtained in S3 as leaf nodes, construct a plaintext full binary tree, and assign a node ID to each node (including each keyword in the cluster), as shown in the appendix Figure 3 shown, node ID: CT1~CT 175 ;
[0063] S5. Design an encryption algorithm for the plaintext full binary tree. Specifically: taking clusters as leaf nodes, encrypting layer by layer from bottom to top using a chain structure until the root node; for the keywords in each cluster, encrypting them using a second chain structure, which plays a good intermediary role and avoids multiple interactions between the cloud server and the user during the search process; after encryption, in addition to the corresponding node ciphertext value / keyword ciphertext value for each node / keyword, other ciphertext information is included and stored as key-value pairs; the final obtained ciphertext full binary tree is a key-value pair table.
[0064] The ciphertext full binary tree can locate the ciphertext corresponding to a node according to the ID of any node, and starting from this node, search for all its child nodes until the leaf nodes represented by each cluster, and then all the keyword information in the cluster can be obtained. As shown in the appendix Figure 3 When the user wants to search for CT 75 ~CT 120 , only the nodes CT 75 ~CT 80 and the node CT 171 are needed; the corresponding key-value pair information can also be directly obtained based on the keyword information; the steps of the encryption algorithm for the plaintext full binary tree are as follows:
[0065] S301. Select an encryption key k for encrypting the plaintext full binary tree according to the required security strength t ;
[0066] The encryption of the first chain structure is specifically as follows: given the leaf node ID corresponding to a certain cluster: CT, select a cluster key k clst , a random number u, and an ID: CT γ , determine the pseudo-random functions H1 and H2 to be used, and the encryption formula for the leaf node is as follows:
[0067]
[0068] The encryption formula for the parent node of the leaf node is:
[0069]
[0070] The encryption formula for the parent node of the non-leaf node is:
[0071]
[0072] In the formula, CT P represents the ID of the parent node, CT L and CT R respectively represent the IDs of the left and right child nodes of this node, u L and u Ris the corresponding node random number, r L and r R is the filled random number;
[0073] S303. The encryption of the chain structure 2 is as follows: Given a certain cluster, assuming that the keywords it contains are sorted by keyword scores as: w1,…,w γ , select node IDs: CT i for each keyword in the cluster, where the node CT γ of the γ-th keyword is the random number selected in S302, and select a pseudo-random function H; the encryption formula for each keyword is:
[0074]
[0075] In the formula, k1 is the encryption key used by the pseudo-random function H, r i0 is the filled random number, and CT i-1 is the node ID corresponding to the (i - 1)-th keyword.
[0076] S6. Design a trapdoor generation algorithm, a search algorithm, and an update algorithm for the ciphertext full binary tree based on the key-value pair table; specifically:
[0077] The trapdoor generation algorithm for the ciphertext full binary tree determines the decryption information of the fewest nodes according to the data range covered by the user's search, and uses it as the trapdoor. The executor of the trapdoor generation algorithm is the user, the input is the range value of the keyword attributes that the user wants to merge, and the final output is the corresponding ciphertext node ID, which is sent to the cloud server together with the encryption key k t of the ciphertext full binary tree; for example, if the trapdoor information for searching CT 75 ~CT 120 is CT 75 ~CT 80 , node CT 171 and key k t .
[0078] The executor of the search algorithm is the cloud server. The cloud server inputs the trapdoor and the key-value pair table represented by the ciphertext full binary tree, and finally outputs the search result, that is, all the keyword information H(k1, w i ) decrypted; still taking the search for CT 75 ~CT 120 as an example: For CT 75 ~CT 80 , calculate H1(k t , CT i ) to obtain H(k1, w i ); for CT 171 , calculate H1(k t , CT171 ) and H2(k t , CT 171 ), the ciphertext CT can be obtained by decryption 165 and CT 166 , and further decryption can obtain CT 80 ~CT 120 corresponding to all H1(k t , CT i );
[0079] When adding keywords in the update algorithm, there is no need to reconstruct the full binary tree structure. The executor of the update algorithm is the user. The user determines the encrypted tree node information bound to the updated information, and then converts the updated information into key-value pairs by using the encryption method of chain structure two and adds them to the ciphertext full binary tree; for example, if you want to add new node information at CT 85 , and the corresponding keyword is w′, use r 85,0 in the ciphertext value of its corresponding node as the new node ID, and generate a key k 85,1 , and calculate that's it;
[0080] S7. Design a combined searchable encryption by using the encryption algorithm of the plaintext full binary tree, the trapdoor generation algorithm, the search algorithm and the update algorithm of the ciphertext full binary tree; the combined searchable encryption includes an initialization algorithm, a search protocol, a merge protocol and an update protocol; the ciphertext full binary tree generated by the encryption algorithm of the plaintext full binary tree is part of the output of the initialization algorithm; the outputs of the trapdoor generation algorithm and the search algorithm of the ciphertext full binary tree are the process values in the search protocol and the update protocol; the update algorithm of the ciphertext full binary tree is part of the output of the update protocol; in addition to searching for keyword data, the combined searchable encryption also has the functions of merging keyword data and consistent update. For example, when the user wants to merge the ciphertext keyword index (w1, f1, f2) and the keyword index (w2, f3, f4), where f1, f2 and f3, f4 are the data corresponding to w1 and w2 respectively, after running the merge protocol, finally a new keyword index (w1 + w2, f1, f2, f3, f4) will be added to the encrypted index; when the user wants to update the keyword index (w1, f1, f2) to (w1, f1, f2, f5), after running the update protocol, finally the backend cloud server will update the keyword index (w1, f1, f2) in the encrypted index to (w1, f1, f2, f5), and at the same time update the keyword index (w1 + w2, f1, f2, f3, f4) in the encrypted index to (w1 + w2, f1, f2, f3, f4, f5).
[0081] The executor of the initialization algorithm is the user. Run the encryption algorithm of the plaintext full binary tree in S5 to generate a ciphertext full binary tree, and send the ciphertext full binary tree to the front end cloudServer; then for each keyword w i with the value of H(k1, w i ) as the key, use the additive symmetric homomorphic encrypt encrypt w i corresponding data to generate an encrypted index, that is, encrypt the d-th data m i with H(k1, w d ) as the key into where h1 is a hash function, sk d is the encryption key, f is a keyed pseudorandom function, and M is a large secure integer; finally, send the encrypted index l = {(H(k1, w), (H(k1, w)))} to the backend cloud server;
[0082] The search protocol executors are the user and the cloud server. For the keyword w i to be searched, the user runs the trapdoor generation algorithm in S6 to generate the search trapdoor of the encrypted full binary tree, that is, the corresponding encrypted node ID and the encryption key k t of the encrypted full binary tree, and sends it to the front-end cloud server; the front-end cloud server runs the search algorithm in S6 to obtain the search result, that is, the search trapdoor H(k i , w i ), then uses the distributed point function D with H(k1, w i ) as the input to generate two search keys and This function satisfies that only the rest when x ≠ H(k1, w i ); send the search keys to the backend cloud server, and the two backend cloud servers respectively use the search keys and the encrypted index I as the input to calculate each Finally, the front-end cloud server receives the calculation results of the two backend cloud servers, restores and returns it to the user; finally, the user decrypts I(H(k1, w i ), that is, calculates d for the d-th data Enc(m Finally, the decrypted data is obtained;
[0083] The merge protocol executors are the user and the cloud server. For the keyword set {w j} to be merged, the user first calls the trapdoor generation algorithm in S6, sends the generated trapdoor to the front-end cloud server, and at the same time calculates the key secret sharing value △ jSend it to the backend cloud server; then the frontend cloud server calls the search algorithm in S6 to obtain the search results, that is, all keyword information H(k1, w) participating in the merger, where w ∈ {w j}, and use all h(k1, w j ) as input, and use the distributed multi-point function MD to generate two search keys and This function satisfies that only w ∈ {w j}, and the rest When Send the merger key to the backend cloud server; the two backend cloud servers use the merger key and the encrypted index as input to calculate Then each backend cloud server sends the calculation result to the other backend cloud server; each backend cloud server adds the received value to its own calculated value to obtain the final merged index ∑I(H(k1, w)) + △, where w ∈ {w j};
[0084] The executors of the update protocol are the user and the cloud server. If the user wants to add or delete the keyword w * , then send the corresponding information H(k1, w * ) to the frontend cloud server, and send the corresponding encrypted index to the two backend cloud servers; to ensure security, several false keyword indexes can be appropriately added and deleted; then call the above merger protocol to ensure that after the keyword is updated, the merged index is also updated accordingly;
[0085] If a user wants to change the data information corresponding to a keyword, the keyword index information to be updated is sent to the front-end cloud server. Then the front-end cloud server randomizes it, generates another random number vector, and randomly divides the randomized updated keyword index information and the random number vector into two parts to obtain an update vector and a blinding vector, which are sent to two back-end cloud servers respectively. At the same time, the random number vector is sent to the user. The user generates two secret parameter vectors based on the random number vector. One is randomly divided into two balanced vectors 1, and the other is randomly divided into two balanced vectors 2, which are sent to two back-end cloud servers respectively. The two back-end cloud servers call the merging protocol described above to add the update vector to the encrypted index respectively to generate new index information. If the keyword does not participate in the merging protocol, the update is completed. Otherwise, the merged index needs to be further updated, that is, the two back-end cloud servers also call the merging protocol described above to process the blinding vector to generate a new blinding vector. Then the new index information and the new blinding vector are added with the balanced vector 1 and the balanced vector 2 respectively and returned to the front-end cloud server. The front-end cloud server de-blinds the received data, then performs addition to restore the complete encrypted index and sends it to the two back-end cloud servers respectively. The back-end cloud servers replace the original merged index with it, and finally complete the update of the encrypted index, realizing flexible keyword data merging.
[0086] In terms of storing and managing device attribute information, the plaintext full binary tree constructed by the present invention enables users to better manage all device information; by adopting the super-increasing sequence method, the attribute information of the device is transformed from uncertain multi-dimensional information into one-dimensional parameters, which is beneficial to the management of device attributes.
[0087] In terms of protecting device privacy information, the encryption algorithm for the plaintext full binary tree constructed by the present invention can deliver the management information of the device to the front-end cloud server for trusteeship, without disclosing specific device privacy information, and can perform operations such as searching, adding, and deleting device information in a secure manner, meeting the requirements of flexible management of device information in real life.
[0088] In terms of quickly determining the target device set, the trapdoor generation algorithm and search algorithm for the ciphertext full binary tree constructed by the present invention enable users to quickly determine the target device set in a non-enumerative manner of attribute value range, facilitating the management of a large number of devices with the same attributes in real life.
[0089] In terms of searching and managing the data of the target device set, the present invention adopts the encryption algorithm for the plaintext full binary tree, the trapdoor generation algorithm, search algorithm, and update algorithm for the ciphertext full binary tree to obtain combined searchable encryption, which can realize the summary and merging of data in the target device set in the cloud, and any data update in the target device set will be reflected in the merged data, realizing the timely update and consistency of the data.
[0090] In terms of protecting the data of the device and reducing the user's overhead, enable the user to search for and manage the encrypted device information stored in the front-end and back-end cloud servers in a secure manner, and outsource this process to the cloud server to reduce the computing burden on the user's local side.
Claims
1. A flexible keyword data merging method based on search encryption, characterized in that: Use the following steps: S1. Define the attribute value set according to the specific meaning represented by the keyword, and establish a one-to-one mapping between the super-increasing sequence and the attribute value set to obtain the keyword score; S2. Sort the keyword scores in ascending order to obtain a keyword score sequence, determine a critical value ω, and then cyclically divide the keyword score sequence into a subset, which is named a cluster; S3, select a value as the target number of keywords contained in the cluster, and then add fake keywords to each cluster until it is filled; S4. Consider several clusters as leaf nodes, construct a plaintext full binary tree, assign a node ID to each node, and assign an ID to the keyword in each cluster; S5. Design an encryption algorithm for the plaintext full binary tree. The obtained ciphertext full binary tree is a key-value pair table. S6. Design the trapdoor generation algorithm, search algorithm and update algorithm for the ciphertext full binary tree based on the key-value pair table; S7. Design a merged searchable encryption using the encryption algorithm of the plaintext full binary tree, the trapdoor generation algorithm of the ciphertext full binary tree, the search algorithm and the update algorithm.
2. The method for flexible keyword data merging based on search encryption according to claim 1, characterized in that: In S2, the keyword score sequence is divided cyclically using a binary method until the number of keyword scores contained in each subsequence finally divided does not exceed the critical value ω; then the keywords represented by the keyword scores in each sequence form a subset; Due to the nature of the super-increasing sequence, all keywords have different scores.
3. The method for flexible keyword data merging based on search encryption according to claim 1, characterized in that: The encryption algorithm design for the plaintext full binary tree in S5 is as follows: clusters are used as leaf nodes, and chain structure one is used to encrypt layer by layer from bottom to top until the root node; for each keyword in the cluster, it is encrypted with chain structure two; After encryption, each node / keyword includes other ciphertext information in addition to the corresponding node ciphertext value / keyword ciphertext value, which is stored as a key-value pair; the final ciphertext full binary tree is a key-value pair table.
4. The method for flexible keyword data merging based on search encryption according to claim 3, characterized in that: The ciphertext full binary tree can locate the ciphertext corresponding to any node according to the node ID, and start from the node to search all its descendant nodes until the leaf node represented by each cluster, and then obtain all the keyword information in the cluster; or directly obtain the corresponding key-value pair information according to the keyword information; The encryption algorithm steps of the plaintext full binary tree are as follows: S301. Select an encryption key k for the full binary tree of encrypted plaintext according to the required security strength. t ; S302, the encryption of chain structure 1 is as follows: given a leaf node ID corresponding to a cluster: CT, a cluster key k is selected. clst , a random number u and an ID: CT γ , determine the pseudo-random functions H1 and H2 used, and the encryption formula of the leaf node is as follows: The encryption formula of the parent node of the leaf node is: The encryption formula for the parent node of a non-leaf node is: In the formula, CT P Indicates the ID of the parent node, CT L and CT R Respectively represent the IDs of the left and right child nodes of the node, u L and u R The corresponding node random number, r L and r R is the random number for filling; S303, the encryption of chain structure 2 is as follows: given a cluster, assuming that the keywords it contains are sorted according to the keyword scores: w1,…,w γ , select a node ID for each keyword in the cluster: CT i , where the node CT of the γth keyword γ For the random number selected in S302, a pseudo-random function H is selected; the encryption formula for each keyword is: In the formula, k1 is the encryption key used by the pseudo-random function H, r i0 is the random number filled, CT i-1 is the node ID corresponding to the i-1th keyword.
5. The method for flexible keyword data merging based on search encryption according to claim 4, characterized in that: The trapdoor generation algorithm for the ciphertext full binary tree determines the decryption information of the least nodes according to the data range covered by the user's search, and uses it as the trapdoor. The executor of the trapdoor generation algorithm is the user, and the input is the keyword attribute range value that the user wants to merge. Finally, the corresponding ciphertext node ID is output and combined with the encryption key k of the ciphertext full binary tree. t Sent to the cloud server as a trapdoor; The executor of the search algorithm is the cloud server, which inputs the trapdoor and the key-value pair table represented by the ciphertext full binary tree, and finally outputs the search results, that is, all the keyword information H(k1,w i ); When adding keywords in the update algorithm, there is no need to reconstruct the full binary tree structure. The executor of the update algorithm is the user. The user determines the encrypted tree node information bound to the updated information, and then uses the chain structure two encryption method to convert the updated information into a key-value pair and add it to the ciphertext full binary tree.
6. The method for flexible keyword data merging based on search encryption according to claim 5, characterized in that: Merge searchable encryption includes initialization algorithm, search protocol, merge protocol and update protocol; The ciphertext full binary tree generated by the encryption algorithm for the plaintext full binary tree is part of the output of the initialization algorithm; The outputs of the trapdoor generation algorithm and the search algorithm for the ciphertext full binary tree are the process values in the search protocol and the update protocol; the update algorithm for the ciphertext full binary tree is a partial output of the update protocol.
7. The method for flexible keyword data merging based on search encryption according to claim 6, characterized in that: The initialization algorithm is to run the encryption algorithm on the plaintext full binary tree for all keywords to obtain the ciphertext full binary tree, and send the ciphertext full binary tree to the front-end cloud server; at the same time, each keyword and its corresponding data are set as a key-value pair, that is, the index of the keyword, and then encrypt all keyword indexes to obtain encrypted indexes, and send the encrypted indexes to the back-end cloud server; The search protocol is that the user first runs a trapdoor generation algorithm for the ciphertext full binary tree on the keyword he wants to search, generates a search trapdoor for the ciphertext full binary tree and sends it to the front-end cloud server. The front-end cloud server runs the search algorithm for the ciphertext full binary tree to obtain the search result, that is, the search trapdoor for the keyword, and sends the search key generated based on the search trapdoor for the keyword to the back-end cloud server. The back-end cloud server determines the information of the target keyword index in the encrypted index based on the search key, and returns the encrypted target keyword index to the user. The user then decrypts the target keyword index to finally obtain the data. The merging protocol is that the user first runs the trapdoor generation algorithm for the ciphertext full binary tree on the keywords that he wants to merge, generates the search trapdoor for the ciphertext full binary tree and sends it to the front-end cloud server. The front-end cloud server runs the search algorithm for the ciphertext full binary tree to obtain the search result, that is, the search trapdoor for the keyword, and sends the merge key generated based on the keyword search trapdoor to the back-end cloud server. The backend cloud server determines the information of several keyword indexes that the user wants to merge in the encrypted index based on the merge key, and merges these keyword indexes together to generate a new keyword index; The update protocol is that the user first sends the information he wants to update to the front-end and back-end cloud servers, and then the front-end cloud server runs the update algorithm for the ciphertext full binary tree to update the ciphertext full binary tree. At the same time, the front-end cloud server generates an update key, and the back-end cloud server updates the corresponding keyword index in the encrypted index based on the update key.
8. The method for flexible keyword data merging based on search encryption according to claim 1, characterized in that: In S1, the keyword is device, the attributes include the type, brand and deployment location of the device, and the attribute value set is a set of attribute values that define different values in each attribute as the attribute value of the attribute, so as to obtain a complete attribute value set for the keyword; The keyword score is as follows: take a super increasing sequence a1, a2, ..., which satisfies a i >∑ j<i a j , establish a one-to-one correspondence between the complete attribute value set and the super-increasing sequence.
