Searchable encryption method for wireless medical sensor network based on sgx

By using a searchable encryption method based on SGX to generate an encrypted index tree and verification tags, and by using an SGX proxy server to verify search results, the problem of multi-keyword and range search for encrypted data in wireless medical sensor networks is solved, and secure and verifiable search results are achieved.

CN119402857BActive Publication Date: 2025-11-04CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411540277.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-11-04
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Existing keyword-based search technologies cannot achieve deterministic multi-keyword and range searches on encrypted data in wireless medical sensor networks.

Method used

The method employs a searchable encryption approach based on SGX. By generating an encrypted index tree and verification tags, and utilizing an SGX proxy server to verify search results in a trusted execution environment, it ensures data security and privacy. Furthermore, it reduces computational load and communication overhead through an attribute hierarchical structure.

Benefits of technology

It enables the verifiability of multi-keyword and range search results for wireless medical sensor network data, prevents cloud servers from dishonestly returning results, ensures data security and privacy, and reduces computational load and communication overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402857B_ABST
    Figure CN119402857B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of ciphertext data search, and relates to a searchable encryption method for a wireless medical sensor network based on SGX, which comprises the following steps: a DO generates a key set SK and an encrypted index tree I and uploads them to an SGX proxy server; the SGX proxy server generates a verification tag σ I , uploads it to a cloud server together with the I, generates a search trapdoor TD and sends it to the SGX proxy server; the SGX proxy server generates a verification trapdoor σ TD , sends it to the cloud server together with the TD, searches on the I according to the TD, obtains a search result, generates a verification proof σ s , and sends it to the SGX proxy server to verify the search result; if the verification is passed, the search result is sent to the DU, which receives and decrypts the search result; the present application generates the verification tag σ I and the verification trapdoor σ TD , generates the verification proof σ I according to σ TD and σ s , and verifies the search result through σ s , so that the search result is verifiable and the verification efficiency is relatively good.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of ciphertext data search, and particularly relates to a searchable encryption method for a wireless medical sensor network based on SGX. BACKGROUND

[0002] A wireless medical sensor network (WMSN) is a network composed of various intelligent medical sensors located on or around the body of a patient for real-time health monitoring and support. These sensors are portable, small interconnected devices that can be worn or implanted in individuals' bodies to observe important symptoms of patients. These networks are particularly helpful for the elderly who need continuous care without hospitalization. Monitoring can be done at home and data can be wirelessly transmitted to the hospital. In emergency situations such as heart disease, immediate action can be taken. In addition, this technology enables medical devices to operate without wires or cables, enhancing the mobility of these devices. Other applications include monitoring people with Alzheimer's disease, monitoring the elderly at home, making preliminary assessments of diseases before detailed diagnosis, etc.

[0003] With the widespread use of WMSN, more and more WMSN data is collected by intelligent medical sensors worn on the body. In order to better record the physical health information of patients and more accurately understand the physical condition of patients, this new data collection method is widely used in the medical field to record physiological parameters such as blood sugar, heart rate, and other related health indicators in real time. However, with the accumulation of WMSN data, how to safely and effectively manage, store, and search it has become an important challenge in the field of medical information. In order to protect the security of data, an important measure is to encrypt the WMSN recorded data for storage, and then search and query the encrypted stored WMSN recorded data. Many existing keyword-based search technologies are widely used for plaintext data and cannot be directly used for ciphertext data. Searchable encryption technology provides a method for keyword search on ciphertext.

[0004] Searchable encryption technology is a scheme that allows users to search and query encrypted data. At present, a searchable encryption method based on a hierarchical index tree is proposed in patent CN202211062637.4, which can realize multi-keyword search and range search.

[0005] However, when performing multi-keyword search and range search on the text data recorded by WMSN, the above existing technology cannot guarantee that the search results of the range search are determined. SUMMARY

[0006] To solve the above-mentioned problems of the prior art, the application adopts a searchable encryption method for a wireless medical sensor network based on SGX, which comprises:

[0007] S1, a data owner DO generates a key set, collects health data by using a sensor, obtains a WMSN record data set, generates an encrypted index tree and a ciphertext data set according to the WMSN record data set and the key set, and uploads the key set, the encrypted index tree and the ciphertext data set to an SGX proxy server; the WMSN record data set includes a plurality of WMSN records, and each WMSN record includes ID information and a plurality of attributes; wherein WMSN is a wireless medical sensor network;

[0008] S2, the SGX proxy server generates a verification tag according to the key set and the encrypted index tree in a trusted execution environment, and uploads the encrypted index tree, the verification tag and the ciphertext data set to a cloud server;

[0009] S3, the DO transmits the key set to an authorized data user DU through a secure channel, and the DU generates a corresponding search trapdoor according to a search request of the DU and the key set, and sends the search trapdoor to the SGX proxy server;

[0010] S4, the SGX proxy server generates a corresponding verification trapdoor according to the search trapdoor, and sends the search trapdoor and the verification trapdoor to the cloud server;

[0011] S5, the cloud server searches on the encrypted index tree according to the search trapdoor and the ciphertext data set, obtains a search result and a verification tag thereof and generates a verification proof according to the verification tag and the verification trapdoor, and sends the search result and the verification proof to the SGX proxy server;

[0012] S6, the SGX proxy server verifies the search result according to the verification proof, and if the verification is passed, sends the search result to the DU, the DU receives and decrypts the search result, and completes the data search; otherwise, refuses to receive the search result sent by the cloud server;

[0013] S7, the data owner DO synchronously updates the encrypted index tree when deleting or adding a WMSN record.

[0014] Generating the encrypted index tree includes:

[0015] S11, extracting attribute values of the WMSN record data set to construct an attribute value set W={W1,...,W r ,...,W R}; if the range of the attribute value set W r of an attribute r is large, an attribute partition tree of the attribute r is constructed;

[0016] S12, generating an index vector of each WMSN record according to the attribute partition tree and the attribute value set;

[0017] S13, constructing a plaintext index tree according to the index vector of each WMSN record;

[0018] S14, encrypting the plaintext index tree according to the key set to generate an encrypted index tree.

[0019] The attribute includes a numerical attribute and a non-numerical attribute; constructing an attribute partition tree of the numerical attribute includes:

[0020] Step 1, determining a maximum value range of the attribute value of the numerical attribute, taking the maximum value range as a root node of the attribute partition tree; dividing the root node to obtain a plurality of sub-ranges, and taking each sub-range as a node of a second layer of the attribute partition tree;

[0021] Step 2, dividing each node of a previous layer of the attribute partition tree to obtain a child node of each node of the previous layer, and taking the child node of each node of the previous layer as a node of a current layer of the attribute partition tree;

[0022] Step 3, repeating step 2 until a single attribute value node is divided, taking the single attribute value as a leaf node, and obtaining the attribute partition tree of the numerical attribute;

[0023] Constructing an attribute partition tree of the non-numerical attribute includes:

[0024] Step 1, determining a maximum semantic of the attribute value of the non-numerical attribute using a semantic inclusion relationship, taking the maximum semantic as a root node of the attribute partition tree; dividing the root node according to the semantic inclusion relationship and a semantic parallel relationship to obtain a plurality of sub-semantics, and taking each sub-semantic as a node of a second layer of the attribute partition tree;

[0025] Step 2, dividing each node of a previous layer of the attribute partition tree to obtain a child node of each node of the previous layer, and taking the child node of each node of the previous layer as a node of a current layer of the attribute partition tree;

[0026] Step 3, repeating step 2 until a minimum semantic attribute value node is divided, taking the minimum semantic attribute value as a leaf node, and obtaining the attribute partition tree of the non-numerical attribute.

[0027] Generating the index vector of each WMSN record according to the attribute partition tree and the attribute value set includes: for an attribute r * , establishing a path * for each attribute value of the attribute r wherein, is a j b th node of a b * th layer of the attribute partition tree; representing each node in the path of each attribute value by a vector to obtain the attribute r *vector representation of each attribute value of the attribute r'; generating the vector representation of each attribute value of the attribute r' according to the position in the attribute value set for the attribute r' which is not constructed attribute partition tree; combining the vector representations of attribute values belonging to the same WMSN record to obtain the index vector of each WMSN record.

[0028] constructing the plaintext index tree according to the index vector of each WMSN record comprises:

[0029] S131, constructing the root node of the plaintext index tree;

[0030] S132, dividing the index vector n of a WMSN record into h index sub-vectors;

[0031] S133, judging whether there is a same index sub-vector under the root node of the plaintext index tree as the first index sub-vector If yes, directly executing step S134; otherwise, adding a same index sub-vector under the root node as the first index sub-vector and executing step S134;

[0032] S134, judging whether there is a same index sub-vector under the node of the i-1 layer of the plaintext index tree as the i-th index sub-vector, if yes, directly executing step S135; otherwise, adding a same index sub-vector under the node as the i-th index sub-vector and executing step S135;

[0033] S135, judging whether the current plaintext index tree contains all index sub-vectors of the index vector n, if yes, adding the ID information of the WMSN record corresponding to the index vector n at the node corresponding to the last index sub-vector; otherwise, returning to step S134;

[0034] S136, repeating steps S132-S135 until all index vectors of the WMSN records are added to obtain the plaintext index tree.

[0035] The key set comprises: SK i = (M i,1 , M i,2 , S i ); wherein, SK i is the key set of the i-th layer of the plaintext index tree, M i,1 and M i,2 are two invertible matrices, S i is a randomly generated dimension vector, M i,1 , M i,2 and S i ​​dimensions; encrypting the plaintext index tree according to the key set to generate an encrypted index tree comprises:

[0036] S141, multiplying the index vector D u of each node u in the plaintext index tree by a random number β not equal to 0 to obtain a vector D u ′;

[0037] S142, generating a random vector {D i ′, D u1 ′} of the node u according to the M u2 and M i,1 of the layer where the node u is located; i,2 and calculating the encrypted index vector E u1 ′ of the node u according to the random vector {D u2 ′, D u ′} of the node u; to obtain the encrypted index tree.

[0038] The key set further comprises: (K, α); wherein K is a pseudo-random function seed key, is a set of real numbers encoded using λ bits, and α is a random number selected; the encrypted index tree comprises a plurality of encrypted indexes, each encrypted index being a vector composed of the encrypted index vectors E k on a path from a root node to a leaf node in the encrypted index tree; generating a verification tag according to the key set and the encrypted index tree comprises: marking each bit of the encrypted index I k using a string L∈{0,1}* to obtain a mark of each bit l of the encrypted index I k ; generating a verification tag of the lth bit of the encrypted index I according to the mark and the key set. composing a vector of the verification tags of each bit l of the encrypted index I k ; composing a vector of the verification tags of the first bit of the encrypted index I k ; generating a verification tag of the encrypted index I k according to the vector and the vector wherein is a pseudo-random number generated by the mark .

[0039] Generating a verification trapdoor comprises: marking each bit of the search trapdoor TD l using a string L∈{0,1}*; obtaining a mark According to the label And the key set generates a verification trapdoor The verification trapdoor of the search trapdoor TD each bit is combined into a vector Combined into a vector The verification trapdoor of the search trapdoor first bit is combined into a vector According to the vector And the vector Generate a verification trapdoor Wherein, The label The generated pseudo-random number.

[0040] The generation of the verification proof includes: the cloud server obtains a polynomial function f, and obtains a verification proof σ And the verification trapdoor homomorphically executes the function f on the verification label s =(y0,y1,y2), wherein y0, y1, y2 are polynomial coefficients of the function f,

[0041] The SGX proxy server verifies the search result according to the verification proof, which includes:

[0042] The SGX proxy server parses the verification proof σ s Into y0, y1, y2, calculates the matching score of the verification label of the encrypted index of the search result And the verification trapdoor of the search trapdoor The pseudo-random number Combined into a vector The pseudo-random number Combined into a vector The evaluation value of the polynomial function f on And Judge whether the equation F1: score s =y0 and the equation Is established, if the equations F1 and F2 are established, the verification is successful, otherwise the verification fails; wherein N is the number of bits of the encrypted index.

[0043] Beneficial effects:

[0044] ​1、The application combines homomorphic message authentication code technology and searchable encryption method based on hierarchical index tree, generates verification label and verification trapdoor according to encrypted index tree and search trapdoor respectively, generates verification proof according to verification label and verification trapdoor, and verifies search result through verification proof, realizes verifiable search result of multi-keyword search and range search, and prevents cloud server from dishonestly returning search result; 2, the application generates verification label and verification trapdoor by using the trusted execution environment of SGX proxy server, and verifies search result according to verification proof in SGX proxy server, which guarantees the security and privacy of data; 3, the application reduces the dimension of index vector through attribute hierarchical structure (i.e. attribute division tree), reduces the amount of calculation and communication overhead, and realizes nonlinear search efficiency according to the construction of encrypted index tree based on attribute division tree; 4, the application adds random number when generating search trapdoor, so that there is no connectivity between queries, i.e. except DO, other subjects cannot generate new search trapdoor according to previous search trapdoor, and cloud server cannot also infer the relationship between search trapdoors, which reduces the risk of data leakage; 5, the application also provides a dynamic updating method of data, which can flexibly handle the increase and deletion of WMSN without local storage index tree, and reduces the risk of local index tree leakage. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 The structural diagram of the searchable encryption method for wireless medical sensor network based on SGX provided by the embodiment of the application is shown in the figure.

[0046] Figure 2 The WMSN record data schematic diagram provided by the embodiment of the application is shown in the figure.

[0047] Figure 3 The heart rate attribute division tree structure diagram provided by the embodiment of the application is shown in the figure.

[0048] Figure 4 The index vector schematic diagram provided by the embodiment of the application is shown in the figure.

[0049] Figure 5 The plaintext index tree structure diagram provided by the embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.

[0051] As Figure 1As shown, a searchable encryption method for wireless medical sensor networks based on SGX includes:

[0052] S1. The data owner (DO) generates a key set, collects physical health data using sensors, obtains a WMSN record dataset, generates an encrypted index tree and a ciphertext dataset based on the WMSN record dataset and the key set, and uploads the key set, encrypted index tree, and ciphertext dataset to the SGX proxy server; where SGX (Software Guard Extensions) is a software protection extension.

[0053] Specifically, the data owner DO generates and outputs a key set SK=(K,α,M1,M2,S) based on a random security parameter λ, where (K,α) is used for verification, (M1,M2,S) is used to generate the encryption index and trapdoor, and K is a pseudo-random function. The seed key, α is a randomly selected value, and M1 and M2 are two... An invertible matrix, S is randomly generated. A dimensional vector, where It is the dimension of the sub-index vector at the i-th level in the index tree; the WMSN record dataset is D = {D1, D2, ..., D...} N The encrypted dataset is C = {C1, C2, ..., C}. N}, where N represents the total number of WMSN records, and D n This represents the nth WMSN record; extract all attribute values ​​from the WMSN record dataset D to construct an attribute value set W = {W1, W2, ..., W...} R}, R represents the total number of attribute types, W r This represents the set of attribute values ​​for the r-th attribute type.

[0054] In one embodiment, WMSN record data such as Figure 2 As shown, a WMSN record has four attributes: age, gender, heart rate, and blood sugar. Each attribute has multiple attribute values, and each attribute in a WMSN record corresponds to a specific attribute value. In addition, each WMSN record has its own ID information.

[0055] Generating an encrypted index tree includes:

[0056] S11. Extract attribute values ​​from the WMSN record dataset and construct an attribute value set W = {W1, ..., W...} r ,...,W R}; If the set of attribute values ​​W for attribute r r If the range is large, then construct an attribute partitioning tree for attribute r;

[0057] S12. Generate an index vector for each WMSN record based on the attribute partitioning tree and the attribute value set;

[0058] S13. Construct a plaintext index tree based on the index vector of each WMSN record;

[0059] S14. Encrypt the plaintext index tree according to the key set to generate an encrypted index tree.

[0060] In one embodiment, when the set of attribute values ​​W for attribute r r When the number of possible values ​​in the property is greater than 2, construct the property partitioning tree for property r.

[0061] from Figure 2 As can be seen, the gender attribute only has two attribute values, male and female, which is easy to represent. However, the age, heart rate, and blood sugar attributes have many attribute values. In order to achieve range search within the attribute domain and reduce the length of the index vector, DO constructs attribute partitioning trees for different types of attributes, including numerical attributes and non-numerical attributes.

[0062] Constructing an attribute partitioning tree for numerical attributes includes:

[0063] Step 1: Determine the maximum range of values ​​for the numerical attribute and use the maximum range as the root node of the attribute partitioning tree; divide the root node to obtain multiple sub-ranges, and use each sub-range as a node of the second level of the attribute partitioning tree.

[0064] Step 2: Divide each node in the upper level of the attribute partitioning tree to obtain the child nodes of each node in the upper level, and use the child nodes of each node in the upper level as the nodes of the current level of the attribute partitioning tree.

[0065] Step 3: Repeat step 2 until nodes with a single attribute value are identified. Use the single attribute value as a leaf node to obtain the attribute partitioning tree for the numerical attribute.

[0066] Figure 3 As shown, in one embodiment, for a numerical attribute class, taking heart rate as an example, firstly, the maximum range of heart rate attribute values ​​that can encompass all WMSN records is determined. In this embodiment, the maximum range is determined to be [41, 150]. [41, 150] is used as the root node of the heart rate attribute partitioning tree. The root node [41, 150] is partitioned according to the medically recognized low heart rate, normal heart rate, and high heart rate, resulting in three child nodes: low heart rate [40, 60], normal heart rate [61-100], and high heart rate [101, 150]. Then, these three child nodes are further partitioned until only one specific attribute value remains. This attribute value is used as a leaf node, and each leaf node represents the attribute value of the heart rate attribute in a specific WMSN record.

[0067] For non-numeric attribute classes, determine the semantics of the attribute values, use semantic inclusion relationships to define the value range, and select the largest semantic value as the root node; divide the attribute into layers according to semantic inclusion relationships and semantic parallel relationships to obtain the attribute partitioning tree.

[0068] Constructing an attribute partitioning tree for non-numeric attributes includes:

[0069] Step 1: Use semantic inclusion relation to determine the maximum semantic of the attribute value of non-numeric attributes, and take the maximum semantic as the root node of the attribute partitioning tree; divide the root node according to semantic inclusion relation and semantic parallel relation to obtain multiple sub-semantics, and take each sub-semantic as a node of the second level of the attribute partitioning tree.

[0070] Step 2: Divide each node in the upper level of the attribute partitioning tree to obtain the child nodes of each node in the upper level, and use the child nodes of each node in the upper level as the nodes of the current level of the attribute partitioning tree.

[0071] Step 3: Repeat step 2 until the node with the smallest semantic attribute value is identified. Use the smallest semantic attribute value as the leaf node to obtain the attribute partitioning tree for non-numerical attributes.

[0072] In one embodiment, DO generates an index vector for WMSN records using an attribute partitioning tree and an attribute value set. An index vector for a WMSN record consists of attribute values ​​of multiple attributes. In this embodiment, age, gender, heart rate, and blood sugar are used as examples.

[0073] The index vector for each WMSN record is generated based on the attribute partitioning tree and the set of attribute values, including: for attribute r, which has been used to construct the attribute partitioning tree. * , for attribute r * Establish a path for each attribute value. in, For the attribute partitioning tree, the j-th element of the b-th level b Bit nodes; represent each node in the path of each attribute value as a vector to obtain attribute r. * The vector representation of each attribute value; for attribute r′ for which no attribute partitioning tree has been constructed, the vector representation of each attribute value of attribute r′ is generated based on its position in the attribute value set; the vector representations of attribute values ​​belonging to the same WMSN record are combined to obtain the index vector of each WMSN record.

[0074] For each attribute value in the attribute partitioning tree, construct a vector representation of the path, including:

[0075] Assign a vector to each node in the attribute partitioning tree. A node includes a root node, child nodes, and leaf nodes. When a node is located at the j-th node of the b-th level of the attribute partitioning tree... b The bit is represented as Where j b ∈J b J b Let b represent the total number of nodes at level b, where b = {1, 2, ..., B}, and B represents the total number of levels in the attribute partitioning tree; if node There are K child nodes in the b-th layer, and the nodes It is a node The kth child node is the node. Assign K-dimensional vectors And this K-dimensional vector The k-th dimension has a value of 1, and the other dimensions have values ​​of 0.

[0076] like Figure 4 As shown, in one embodiment, the heart rate attribute partitioning tree is used for illustration, and the path corresponding to the attribute value "59" is P59 = (a 1,1 ,a 2,1 ,a 3,2 ,a 4,19 = ("41-150","40-60","51-60","59"), defaults to root node a 1,1 ="41-150" assigns a 1-dimensional vector A 1,1 =1; node a 2,1 ="41-60" is node a 1,1 =The first child node of "41-150", node a 1,1 ="41-150" has 3 child nodes, so it is node a. 2,1 ="41-60" Assign a 3-dimensional vector A 2,1 =100; Next, process the next level node in the path, node a 3,2 ="51-60" is node a 2,1 =The second child node of "41-60", and the node with the most child nodes in the parent level. 2,3 ="101-150" has 5 child nodes, so it is node a. 3,2 ="51-60" assigns a 5-dimensional vector A 3,2 =01000; Node a 4,20 ="59" is node a 2,3 If the 9th child node of "101-150" is a node whose parent node has 10 child nodes, then that node is node a. 4,19 ="59" is assigned a 10-dimensional vector A 4,19 =0000000010, thus obtaining the vector representation of the attribute value "59" as (A1,1 ,A 2,1 ,A 3,2 ,A 4,19 )=1100010000000000010, the index vector of the WMSN is composed of the vector representation of the age, gender, heart rate, and blood glucose of the WMSN record, wherein the gender has only two attribute values of male and female, and no attribute partition tree is constructed due to the small cardinality, but the vector representation is based on the position of the attribute value set.

[0077] The construction of the plaintext index tree according to the index vector of each WMSN record comprises the following steps.

[0078] S131, constructing a root node of the plaintext index tree;

[0079] S132, dividing the index vector n of a WMSN record into h index sub-vectors;

[0080] S133, judging whether there is a same first index sub-vector under the root node of the plaintext index tree If yes, directly executing step S134; otherwise, adding a same first index sub-vector under the root node and executing step S134;

[0081] S134, judging whether there is a same i-th index sub-vector under the node of the i-1-th layer of the plaintext index tree If yes, directly executing step S135; otherwise, adding a same i-th index sub-vector under the node and executing step S135;

[0082] S135, judging whether all index sub-vectors of the index vector n are contained in the current plaintext index tree, if yes, adding the ID information of the WMSN record corresponding to the index vector n at the node corresponding to the last index sub-vector; otherwise, returning to step S134;

[0083] S136, repeating steps S132-S135 until all index vectors of the WMSN records are added, and obtaining the plaintext index tree.

[0084] In one embodiment, as Figure 5 ​As shown, DO constructs the plaintext index tree according to the index vector of the WMSN record data set D, specifically, there are 5 index vectors, [100010001], [100110001], [110001001], [110001111], [110010111], and the 5 index vectors are processed by using the split vector parameter h, in this embodiment, h = 3, to obtain 3 index sub-vectors [100, 010, 001], [100, 110, 001], [110, 001, 001], [110, 001, 111], [110, 010, 111] corresponding to the 5 index vectors respectively.

[0085] The root node Root of the index tree is constructed, first, the index vector [100010001] is added, it is judged whether there is a child node with the same value as the first index sub-vector under the root node Root of the index tree, obviously, the root node Root has no child node for

[100] , then a child node with the value

[100] is added under the node Root, then a child node with the value

[010] is added under the branch of the child node

[100] to find the child node for the second index sub-vector

[010] , then a child node with the value

[001] is added under the branch of the child node

[010] to find the child node for

[001] , at this time, the index sub-vectors of the first WMSN are all added, the ID information of the WMSN is attached at the last child node

[001] which is the leaf node, ID = 1; after the four index vectors are added, when the index vector [110010111] is added, it is first judged whether there is a child node for

[110] under the root node Root, it has been added before, then the branch of the child node

[110] is entered to find whether there is a child node for

[010] , if not,

[010] is added and a child node

[111] is created in

[010] , finally, the ID information is attached, ID = 5.

[0086] The plaintext index tree is encrypted, the root node Root of the index tree is started to be hierarchically traversed, the child key of each layer is expressed as SK i = {S i ,M i,1 ,M i,2}, wherein S i is a randomly generated l-dimensional vector, M i,1 ,M i,2 are two invertible matrices, is the dimension of the index vector of each node of the plaintext index tree. The plaintext index tree T is encrypted to obtain the encrypted index tree I, T is the plaintext index tree composed of the index vector D u of each node u. DO encrypts the plaintext index tree T according to the child key SK i as follows:

[0087] Step 1, D u Multiplying by a non-zero random number β yields vector D. u ′=D u ·β.

[0088] Step 2: Based on the SK of the layer where node u is located i S in i Two random vectors {D} are generated for node u. u1 ′,D u2 When the vector S of the i-th layer is '}, i [i] = 0, then D u1 ′=D u2 ′=D u ′;When S i [i] = 1, then D u1 ′+D u2 ′=D u ′,D u1 ′ and D u2 Let's set two random values ​​such that their sum equals D. u ′.

[0089] Step 3: Using SK i M in i,1 and M i,2 Calculate D using matrix multiplication. u The final encrypted index vector

[0090] E u This represents the encrypted index vector of node u in the encrypted index tree I; for a WMSN record, the encrypted index I is... i Composed of h encrypted index vectors E u The composition is equivalent to a vector consisting of encrypted index vectors along a path from the root node to a leaf node in the encrypted index tree.

[0091] In a trusted execution environment, the S2 and SGX proxy servers generate verification tags based on the key set and the encrypted index tree, and upload the encrypted index tree, verification tags, and ciphertext dataset to the cloud server.

[0092] Furthermore, the specific steps for generating verification tags based on the key set and the encryption index tree are as follows:

[0093] I kl For encrypted index I k The l-th bit will encrypt the index I. k Each element is labeled with a string L, where L∈{0,1}* represents the set of all possible strings consisting of 0s and 1s, thus obtaining the label. The SGX proxy server generates a verification tag for each bit of the encrypted index I kl The corresponding verification tag is calculated: wherein The generated pseudo-random number, F is a pseudo-random function K The verification tag for each bit of the encrypted index I k is generated by multiplying the bit l by the pseudo-random number F The verification tag for each bit of the encrypted index I k is generated by multiplying the bit l by the pseudo-random number F The verification tag for each bit of the encrypted index I is generated by multiplying the bit l by the pseudo-random number F The verification tag for each bit of the encrypted index I is generated by multiplying the bit l by the pseudo-random number F and the vector The verification tag for each bit of the encrypted index I k is generated by multiplying the bit l by the pseudo-random number F wherein corresponds to a leaf node of the encrypted index tree I.

[0094] S3, the DO transmits the key set to the authorized data user DU through a secure channel, and the DU generates a corresponding search trapdoor according to its own search request and the key set, and sends the search trapdoor to the SGX proxy server;

[0095] Further, the corresponding search trapdoor is generated by:

[0096] The attribute keywords in the search request are obtained, and the position vector q is obtained by combining the attribute partition tree and the attribute value set according to the attribute keywords; wherein, for the attribute category not specified by the data user, all attribute value position vectors of the attribute category are set to 1; for the attribute category to be searched, the bit of the corresponding attribute value position vector is set to 1, and the bits of the remaining attribute value position vectors are set to 0;

[0097] The query vector Q is obtained by inverting the position vector q, and the query vector Q is processed using the segmentation vector parameter h to obtain h query sub-vectors q i in order; wherein, each attribute value position in the query vector Q corresponds to an attribute value set, and for the attribute with complex relationship, the attribute partition tree is used for representation; the sub-key SK i is used to encrypt q i to generate the search trapdoor

[0098] The encryption process is as follows:

[0099] Step 1, multiply q i by a random number β not equal to 0: q i ′=q i ·β;

[0100] Step 2, according to SK i S i Generate two random vectors {q i1 ', q i2 '} When S i [i] = 0, q i1 ' = q i2 ' = q i ' When S i [i] = 1, q i1 ' + q i2 ' = q i ' Where q i1 ' and q i2 ' are set to two random values that satisfy the sum of the two values equal to q i '.

[0101] Step 3, encrypt q i using matrix multiplication with the inverse of M i,1 and M i,2 in SK i , generate search trapdoor The complete search trapdoor is TD = {TD1, TD2,..., TD h}.

[0102] S4, the SGX proxy server generates the corresponding verification trapdoor according to the search trapdoor, and sends the search trapdoor and the verification trapdoor to the cloud server (Cloud Server);

[0103] Further, the step of generating the verification trapdoor is specifically as follows:

[0104] Each bit of the search trapdoor is marked by a string L, L ∈ {0, 1} * ; TD l is the lth bit of the search trapdoor, TD l is marked as The verification trapdoor where is a pseudo-random number generated by marking The verification trapdoor of the search trapdoor is expressed as where, is the vector composed of the verification trapdoor of each bit of the search trapdoor TD , and is the vector composed of the verification trapdoor of the first bit of the search trapdoor.

[0105] S5, the cloud server searches on the encrypted index tree according to the search trapdoor and the ciphertext data set, obtains the search result and its verification label and according to the verification label and the search result and the verification proof are sent to the SGX proxy server;

[0106] Hierarchical traversal is performed on the encrypted index tree, starting from the root node, the encrypted index vector E of the node of the i-th layer of the encrypted index tree I is calculated u and sequentially matched with the i-th search trapdoor TD i The standard inner product is performed, and if the result is 0, it indicates that the node matches the search trapdoor TD i , otherwise it does not match; then, in the branch of the matched node, matching screening is performed, and the encrypted index of all child nodes of the node is sequentially matched with the i+1-th search trapdoor TD i+1 The standard inner product is performed, and the search is performed according to the above rule until the last layer. Finally, the node matched in the last layer of the encrypted index tree points to the ID information of the WMSN encrypted data matched with the data user DU query; and the final search result is obtained according to the ID information and the ciphertext data set.

[0107] Further, the Eval algorithm of the homomorphic message authentication code (HMAC) is called to generate the verification proof: The specific steps are as follows:

[0108] The cloud server obtains a polynomial function f, and homomorphically executes the function f on the verification tag and the verification trapdoor to output the verification proof σ s =(y0, y1, y2), wherein y0, y1, y2 are polynomial coefficients of the function f,

[0109] The function f can be regarded as a circuit composed of addition and multiplication gates. The algorithm processes f as follows: for each gate f g , given two tags Run the subroutine to obtain a new tag σ, and then pass the new tag as input to the next gate of the circuit f, and the tag obtained at the last gate of f is the final output. The specific subroutine GateEval(f g , σ (1) , σ (2) ) is defined as follows: let wherein i=1, 2 and d i >1; when f g :=+: the algorithm calculates the coefficients (y0, …, y (1) ) of the polynomial y(x)=y (2) (x)+y d (x) where d=max(d1, d2), which can be obtained by simply adding two coefficient vectors, that is, when f g:=×: Algorithm for calculating polynomial y(x)=y (1) (x)·y (2) The coefficients of (x) (y0,…,y) d ), where d = d1·d2. That is Where m = 0, ..., d. Finally, the algorithm returns the coefficient vector σ = (y0, ..., y0) of the polynomial of degree d. d ).

[0110] The S6 and SGX proxy servers verify the search results based on the verification certificate. If the verification is successful, the search results are sent to the DU. The DU receives and decrypts the search results to complete the data search.

[0111] Furthermore, the specific steps for the SGX proxy server to verify search results are as follows:

[0112] The SGX proxy server will verify the proof σ s Parse the data as y0, y1, and y2, and calculate the matching score between the verification tags of the encrypted index of the search results and the verification trapdoors of the search trapdoors. Configuration parameter set And call the verification function Ver(SK,P,score) s ,σ s This is used to determine the authenticity of the data. Specifically, the verification function uses pseudo-random numbers... Composition vector Pseudo-random numbers Composition vector Calculate the polynomial function f pairs and Evaluation value Determine the score of equation F1: s =y0 and the equation Whether it is true or false; if both equations F1 and F2 are true, the verification is successful; otherwise, the verification fails; where N is the number of bits in the encryption index.

[0113] In one embodiment, DO dynamically updates the data stored in the cloud server. When deleting or adding WMSN records, it achieves this by synchronously updating the nodes of the encrypted index tree on the cloud server. It should be noted that the index update is only based on the ID of the WMSN encrypted data and does not require access to the WMSN data content.

[0114] Specifically, when DO adds a WMSN, it first encrypts the WMSN record to be added, and at the same time generates an encrypted index and search trapdoor for the WMSN record using the method mentioned above. Then, it sends an add data request, sending the encrypted WMSN record, the ID of the WMSN record, the encrypted index, and the search trapdoor to the cloud server.

[0115] After the cloud server receives the adding data request of the DO, the cloud server searches the encrypted index tree using the search trapdoor of the WMSN record to be added based on the matching query method mentioned in the above embodiment. The cloud server searches from the root node of the encrypted index tree, and sequentially performs the standard inner product between the encrypted index of the node at the i-th layer of the encrypted index tree and the i-th sub-search trapdoor of the search trapdoor of the WMSN record to be added. If the result is 0, it indicates that the node and the attribute value of the WMSN to be added are the same. Then, the matching screening is performed in the branch of the node, and the encrypted index of all the child nodes of the node is sequentially subjected to the standard inner product with the i+1-th search trapdoor of the search trapdoor of the WMSN record to be added, and so on. During the searching process, if the encrypted index tree is searched to the v-th layer, there is only one node with the standard inner product of 0, and the inner product of the child node of the node with the standard inner product of 0 and the v+1-th search trapdoor is not 0. Then, the node is the largest attribute matching node of the WMSN record to be added in the encrypted index tree. Starting from the v+1-th sub-vector of the encrypted index of the WMSN record to be added, the child node is added to the largest attribute matching node according to the construction rule of the index tree, and then the leaf node is obtained by continuing to add under the child node until all the sub-search trapdoors are added, and the ID of the WMSN record to be added is attached to the leaf node, and the update of the encrypted index tree is completed.

[0116] Specifically, the DO needs to delete the discarded medical record in the cloud server to avoid the waste of storage resources and the reduction of search efficiency. In the face of massive WMSN data, the ID of a certain record is usually not specified for deletion, and more is to delete the corresponding record according to the attribute value meeting the attribute. When the DO deletes the WMSN record, first, determine which attribute value data to delete, for example, age = 61 and heart rate = 100. According to the condition of deleting data, the DO generates the corresponding search trapdoor according to the above method, and sends the search trapdoor to the cloud server. After receiving the deletion data request of the DO, the cloud server searches the encrypted index tree according to the above search request query method. When the last layer is searched, there is a node that meets the requirements, and the ID of the node points to the encrypted WMSN ID that meets the deletion data request. The cloud server needs to delete the node at the last layer of the encrypted index tree and delete the encrypted WMSN with the corresponding ID in the ciphertext data set.

[0117] The above embodiments further illustrate the purpose, technical solutions and advantages of the present application. It should be understood that the above embodiments are only preferred embodiments of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made to the present application within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A searchable encryption method for wireless medical sensor networks based on SGX, characterized in that, include: S1. The data owner (DO) generates a key set, collects health data using sensors, obtains a WMSN record dataset, generates an encrypted index tree and a ciphertext dataset based on the WMSN record dataset and the key set, and uploads the key set, encrypted index tree, and ciphertext dataset to the SGX proxy server; the WMSN record dataset includes multiple WMSN records, each WMSN record includes ID information and multiple attributes; where WMSN is a wireless medical sensor network; In a trusted execution environment, the S2 and SGX proxy servers generate verification tags based on the key set and the encrypted index tree, and upload the encrypted index tree, verification tags, and ciphertext dataset to the cloud server. S3 and DO transmit the key set to the authorized data user DU through a secure channel. DU generates the corresponding search trapdoor based on its own search request and key set, and sends the search trapdoor to the SGX proxy server. The S4 and SGX proxy servers generate corresponding verification traps based on the search traps and send the search traps and verification traps to the cloud server. S5, the cloud server searches the encrypted index tree based on the search trapdoor and the encrypted dataset to obtain the search results and their verification tags. And based on the verification label The verification trapdoor generates a verification certificate, and the search results and verification certificate are sent to the SGX proxy server; The S6 and SGX proxy servers verify the search results based on the verification certificate. If the verification is successful, the search results are sent to the DU. The DU receives and decrypts the search results to complete the data search; otherwise, it refuses to receive the search results sent by the cloud server. S7. The data owner (DO) deletes or adds WMSN records and updates the encrypted index tree synchronously.

2. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 1, characterized in that, Generating an encrypted index tree includes: S11. Extract attribute values ​​from the WMSN record dataset and construct an attribute value set W = {W1, ..., W...} r ,...,W R }; If the set of attribute values ​​W for attribute r r If the range is large, then construct an attribute partitioning tree for attribute r; S12. Generate an index vector for each WMSN record based on the attribute partitioning tree and the attribute value set; S13. Construct a plaintext index tree based on the index vector of each WMSN record; S14. Encrypt the plaintext index tree according to the key set to generate an encrypted index tree.

3. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 2, characterized in that, Attributes include numeric attributes and non-numeric attributes; Constructing an attribute partitioning tree for numerical attributes includes: Step 1: Determine the maximum range of values ​​for the numerical attribute and use the maximum range as the root node of the attribute partitioning tree; divide the root node to obtain multiple sub-ranges, and use each sub-range as a node of the second level of the attribute partitioning tree. Step 2: Divide each node in the upper level of the attribute partitioning tree to obtain the child nodes of each node in the upper level, and use the child nodes of each node in the upper level as the nodes of the current level of the attribute partitioning tree. Step 3: Repeat step 2 until nodes with a single attribute value are identified. Use the single attribute value as a leaf node to obtain the attribute partitioning tree for the numerical attribute. Constructing an attribute partitioning tree for non-numeric attributes includes: Step 1: Use semantic inclusion relation to determine the maximum semantic of the attribute value of non-numeric attributes, and take the maximum semantic as the root node of the attribute partitioning tree; divide the root node according to semantic inclusion relation and semantic parallel relation to obtain multiple sub-semantics, and take each sub-semantic as a node of the second level of the attribute partitioning tree. Step 2: Divide each node in the upper level of the attribute partitioning tree to obtain the child nodes of each node in the upper level, and use the child nodes of each node in the upper level as the nodes of the current level of the attribute partitioning tree. Step 3: Repeat step 2 until the node with the smallest semantic attribute value is identified. Use the smallest semantic attribute value as the leaf node to obtain the attribute partitioning tree for non-numerical attributes.

4. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 2, characterized in that, The index vector for each WMSN record is generated based on the attribute partitioning tree and the set of attribute values, including: for attribute r, which has been used to construct the attribute partitioning tree. * , for attribute r * Establish a path for each attribute value. in, For the attribute partitioning tree, the j-th element of the b-th level b Bit nodes; represent each node in the path of each attribute value as a vector to obtain attribute r. * The vector representation of each attribute value; for attribute r′ for which no attribute partitioning tree has been constructed, the vector representation of each attribute value of attribute r′ is generated based on its position in the attribute value set; the vector representations of attribute values ​​belonging to the same WMSN record are combined to obtain the index vector of each WMSN record.

5. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 2, characterized in that, Constructing a plaintext index tree based on the index vector of each WMSN record includes: S131. Construct the root node of the plaintext index tree; S132. Divide the index vector n of a WMSN record into h index sub-vectors; S133. Determine if the root node of the plaintext index tree has a child node that is identical to the first index subvector. If so, proceed directly to step S134; otherwise, add a child node under the root node that is the same as the first indexed subvector. And proceed to step S134; S134. Determine the node at level i-1 of the plaintext index tree. Check if there are any child nodes with the same index subvector as the i-th index. If so, proceed directly to step S135; otherwise, check the node... Add a child node with the same index as the i-th index subvector. And proceed to step S135; S135. Determine whether the current plaintext index tree contains all the index subvectors of index vector n. If yes, add the ID information of the WMSN record corresponding to index vector n at the node corresponding to the last index subvector; otherwise, return to step S134. S136. Repeat steps S132 to S135 until the index vectors of all WMSN records are added, thus obtaining the plaintext index tree.

6. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 2, characterized in that, The key set includes: SK i =(M i,1 M i,2 ,S i ); among them, SK i M is the key set of the i-th level of the plaintext index tree. i,1 and M i,2 For two An invertible matrix, S i Randomly generated dimensional vector, For M i,1 M i,2 and S i The dimensions; encrypting the plaintext index tree based on the key set to generate the encrypted index tree includes: S141. The index vector D of each node u in the plaintext index tree... u Multiplying by a non-zero random number β yields vector D. u ′; S142, Based on the S of the layer where node u is located i Generate a random vector {D} for node u u1 ′,D u2 ′}, based on the M of the layer where node u is located i,1 and M i,2 and the random vector {D} of node u u1 ′,D u2 The encrypted index vector of node u is computed. Obtain the encrypted index tree.

7. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 1, characterized in that, The key set also includes: (K, α); where K is a pseudo-random function. Seed key, The set of real numbers is encoded using λ bits, where α is a randomly selected number; the encrypted index tree consists of multiple encrypted indices, each of which is an encrypted index vector E along a path from the root node to a leaf node in the encrypted index tree. u The vector is composed of key sets and encryption index trees; verification labels are generated based on the key set and encryption index tree, including: using the string L∈{0,1}* to mark the encryption index I. k Each bit yields the encrypted index I. k The mark of each 'l' According to the tag Generate encrypted index I with key set k The l-th verification tag Encrypt index I k Verification tag for each l Composition vector Encrypt index I k First verification label Composition vector According to the vector sum vector Generate encrypted index I k Verification tags in, For marking Generated pseudo-random numbers.

8. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 7, characterized in that, Generating the verification trapdoor involves: using the string L∈{0,1}* markers to search for the trapdoor TD. l Each one; get marked According to the tag Generate a verification trapdoor with the key set Verify the trapdoor for each bit of the search trapdoor TD. Combined into vectors Combine the first verification trapdoor of the search trapdoor into a vector. According to the vector sum vector Generate a verification trapdoor in, For marking Generated pseudo-random numbers.

9. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 8, characterized in that, Generating the verification proof includes: obtaining a linear polynomial function f from the cloud server, and verifying the label. By homomorphically executing the function f on the verification trapdoor, we obtain the verification proof σ. s = (y0, y1, y2), where y0, y1, y2 are the polynomial coefficients of the function f.

10. The searchable encryption method for wireless medical sensor networks based on SGX according to claim 9, characterized in that, The SGX proxy server verifies the search results based on the verification credentials, including: The SGX proxy server will verify the proof σ s Parse into y0, y1, y2, and calculate the verification tag of the encrypted index of the search results. Matching score of the verification trapdoor and the search trapdoor Pseudo-random numbers Combined into vectors Pseudo-random numbers Combined into vectors Calculate the polynomial function f pairs and Evaluation value Determine the score of equation F1: s =y0 and the equation If both equations F1 and F2 are true, the verification is successful; otherwise, the verification fails. Here, N is the number of bits in the encryption index.

Citation Information

Patent Citations

  • Dynamic searchable encryption method for massive high-dimensional medical data

    CN115422432A

  • Multi-user searchable encryption method and encryption system in Internet of Vehicles environment

    CN111556495A

  • Pairing-free searchable encryption method supporting revocation and verification

    CN114793176A