A lightweight searchable encryption method for smart home control and query
By introducing a lightweight searchable encryption method in the smart home system and using servers to store and manage encrypted data, the data security and privacy protection problems of the smart home system are solved, efficient data access control and search are achieved, and the security and efficiency of the system are improved.
Patent Information
- Application Number
- CN202310501976.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Smart home systems face data leakage and unsafe communication problems in terms of data security and privacy protection, and existing technologies are difficult to effectively protect user privacy and security.
The lightweight searchable encryption method is adopted, and the server serves as the encrypted data storage place and command transfer station to realize encrypted search, and uses the public key and symmetric key mechanism for authentication and data encryption and decryption, and build an index structure for permission control and data access management.
It improves data security and privacy protection, reduces the risk of data leakage, reduces the computing and storage burden of smart devices, and enhances the controllability of data access and search efficiency.
Smart Images

Figure CN116545616B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cryptography, and in particular to a lightweight searchable encryption method for solving smart home control and query problems. Background Art
[0002] With the continuous development of searchable encryption technology, the data security smart home theory based on this field is gradually applied to real life. The typical settings of traditional smart homes are as follows: Figure 1 As shown, by networking various devices and systems in the home, intelligent management and monitoring of home, security and energy aspects are achieved.
[0003] However, as smart homes become more and more popular, while improving the quality of life, they also bring some security and privacy issues. The promulgation of the "Personal Information Protection Law of the People's Republic of China" in 2021 illustrates the importance of data security and privacy protection. In terms of data security and privacy protection, smart homes mainly face four aspects: data leakage, software vulnerabilities, insecure communications, and account theft. We do not consider software vulnerabilities and account theft. For data leakage, smart home devices usually need to collect and process a large amount of user data, such as family members' personal information, family living habits, etc. If this data is hacked or stolen by malware, it may lead to user privacy leakage and property loss; for insecure communications, smart home devices usually need to communicate with other devices or the Internet through wireless networks. If these communications are not encrypted or the encryption is not secure, they will face the risk of being hacked or eavesdropped. Summary of the Invention
[0004] The purpose of the present invention is to provide a lightweight searchable encryption method for smart home control and query, so as to solve the problems raised in the above background technology.
[0005] The technical solution of the present invention is: a lightweight searchable encryption method for smart home control and query, comprising the following steps:
[0006] S1. Initialization. Before the smart home system with searchable encryption is enabled, the server, home, and mobile device are initialized respectively. The server is denoted as Server, the home is denoted as Home, and the mobile device is denoted as Mobile.
[0007] S2. On the server side, receive the Mobile registration information, allocate database and data structure space for it, build a filter, add the user's permissions to the filter based on the information during Mobile registration, and share a key with Home for mutual authentication between the service provider and the home gateway;
[0008] S3, on the Home side, generates a teammate identification ID number for each smart device and shares a key with the server. It then collects various types of data, cleans and converts the data format, builds an index, and encrypts and uploads the data.
[0009] In the search phase, the mobile device first generates a token using multiple keywords based on its search requirements and sends it along with the permissions to the server.
[0010] S5. The filter verifies the legitimacy of the permissions and records them as evidence in case of problems. It then uses the token to search the constructed index structure to obtain the corresponding complete data set. The server performs a conjunction operation on these sets to obtain the union result and returns it. This filter is recorded as Filter.
[0011] S6. Finally, Mobile decrypts the data file according to the ciphertext negotiated in the initialization phase;
[0012] S7, update phase, that is, if Mobile wants to obtain real-time data, it will encrypt the device ID number to which the real-time data belongs and forward it through the Server. Then Home receives the update signal, decrypts the encrypted device ID number, and then follows the same process as the data collection in the initialization phase, sending the new data and new index to the Server, and sending the new data to Mobile as the new data it wants to see.
[0013] Preferably, in S2, S will generate a public key pub s and private key pri s , and M generates a symmetric key sk m , then S sends pub s To M, M uses the public key to encrypt the key msg = Enc (pub s ,sk m ), returns the encrypted information to S, and S decrypts DeEnc(pri s ,msg) to get the key.
[0014] Preferably, in S3, the identity of M is recorded as id m , and randomly generate a mask, then generate an authentication message Then the message is encrypted using the symmetric key Enc(sk m ,msg id ) and sends it to S. After receiving it, S decrypts it, removes the mask, and XORs the remaining part to get the ID m In this way, even if the identity remains unchanged, the message sent to S each time is different, which improves the security after the authentication message is stolen.
[0015] Preferably, in S4, M and H share the key offline. mh , used to encrypt and decrypt uploaded and requested files, and H and S also share another key to verify whether the smart home device is a legitimate device. H uses the inverted index to build the data structure and encrypts the index and sends it to S.
[0016] Preferably, in S6, M prepares multiple keywords and uses sk m Encrypt it, compress all ciphertexts using Horner's rule, and use w i ,i∈[n] represents different keywords, and the process is as follows:
[0017] p(R)=w n R n +w n-1 R n-1 +…+w1R
[0018] p(R)=(...(w n R+w n-1 )R+…)R
[0019] In this way, no matter how many keywords M prepares, the values sent to S are only p(R) and R; the process of S recovering data is as follows:
[0020] p(R)=p(R) / R
[0021] w1=p(R)modR
[0022] p(R)=(p(R)-w1) / R
[0023] w2=p(R)modR
[0024]
[0025] Get all the encrypted keywords to be searched; then from Index[w i ],i∈[n], get the files corresponding to all keywords i Sets, perform conjunction operations on these sets file1∧file2…∧file n , and returns the result to M, which decrypts the content to obtain the required data.
[0026] Preferably, in S7, the update instruction is set to command, which includes the device ID number encrypted using the shared key of H and M, recorded as ID cWhen S finds it is a command, it extracts the encrypted ID from it and forwards it to H's gateway, which executes DeEnc(key mh ,ID c ) Get the device ID p , and encrypt the new content, build a new index, and send it to S and M at the same time.
[0027] Preferably, H represents a series of devices in a home, S represents a cloud server, and M represents a mobile device.
[0028] The present invention provides a lightweight searchable encryption method for smart home control and query through improvements. Compared with the existing technology, it has the following improvements and advantages:
[0029] First, this invention uses searchable encryption, with the server serving as the encrypted data storage and command transfer station, to achieve encrypted search on mobile devices. This improves security, prevents malicious snooping, and provides search results that are almost identical to those of plaintext. This not only ensures data privacy and reduces the risk of data leakage, but also improves efficiency compared to traditional decryption-before-search solutions.
[0030] Second, the present invention implements data access authority verification and fine-grained authorization of data access rights, enhancing data controllability and effectively preventing access by unauthorized users. Furthermore, the data accessible to mobile devices can be restricted based on their permissions, thereby ensuring the proper use of data.
[0031] Third: This invention encrypts the data and stores it in the server, transferring more calculations to the server, reducing the computing overhead of home smart devices; it shifts the calculations of smart devices to how to improve people's quality of life, and frees up the storage space of the smart devices themselves, which can be used to store data that cannot be uploaded to the cloud, expanding the original significance of smart devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present invention will be further explained below in conjunction with the accompanying drawings and examples:
[0033] Figure 1 It is a simple flow chart of the present invention;
[0034] Figure 2 It is a timing diagram of the present invention. DETAILED DESCRIPTION
[0035] The present invention is described in detail below, clearly and completely describing the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0036] The present invention provides a lightweight searchable encryption method for smart home control and query through improvement. The technical solution of the present invention is:
[0037] like Figure 1-Figure 2 As shown, a lightweight searchable encryption method for smart home control and query includes the following steps:
[0038] S1. Initialization. Before the smart home system with searchable encryption is enabled, the server, home, and mobile device are initialized respectively. The server is denoted as Server, the home is denoted as Home, and the mobile device is denoted as Mobile.
[0039] S2. On the server side, receive the Mobile registration information, allocate database and data structure space for it, build a filter, add the user's permissions to the filter based on the information during Mobile registration, and share a key with Home for mutual authentication between the service provider and the home gateway;
[0040] S3, on the Home side, generates a teammate identification ID number for each smart device and shares a key with the server. It then collects various types of data, cleans and converts the data format, builds an index, and encrypts and uploads the data.
[0041] In the search phase, the mobile device first generates a token using multiple keywords based on its search requirements and sends it along with the permissions to the server.
[0042] S5. The filter verifies the legitimacy of the permissions and records them as evidence in case of problems. It then uses the token to search the constructed index structure to obtain the corresponding complete data set. The server performs a conjunction operation on these sets to obtain the union result and returns it. Because the home will encrypt the data and store it on the server, this process does not require the home's participation. The filter is recorded as Filter.
[0043] S6. Finally, Mobile decrypts the data file according to the ciphertext negotiated in the initialization phase;
[0044] S7, update phase, that is, if Mobile wants to obtain real-time data, it will encrypt the device ID number to which the real-time data belongs and forward it through the Server. Then Home receives the update signal, decrypts the encrypted device ID number, and then follows the same process as the data collection in the initialization phase, sending the new data and new index to the Server, and sending the new data to Mobile as the new data it wants to see.
[0045] The present invention realizes encrypted search on Mobile through searchable encryption and uses the server as the encrypted data storage and command transfer station, thereby improving security, preventing malicious personnel from snooping, and achieving search results that are almost consistent with plain text. This not only ensures data privacy and reduces the risk of data leakage, but also improves efficiency compared to the traditional solution of decrypting first and then searching.
[0046] In the following description, H represents a series of devices in a home, S represents a cloud server, and M represents a mobile device.
[0047] Furthermore, in S2, S will generate a public key pub s and private key pri s , and M generates a symmetric key sk m , then S sends pub s To M, M uses the public key to encrypt the key msg = Enc (pub s ,sk m ), returns the encrypted information to S, and S decrypts DeEnc(pri s ,msg) to get the key.
[0048] Furthermore, in S3, the identity of M is recorded as id m , and randomly generate a mask, then generate an authentication message Then the message is encrypted using the symmetric key Enc(sk m ,msg id ) and sends it to S. After receiving it, S decrypts it, removes the mask, and XORs the remaining part to get the ID m In this way, even if the identity remains unchanged, the message sent to S each time is different, which improves the security after the authentication message is stolen.
[0049] Furthermore, in S4, M and H share the key offline. mh , used to encrypt and decrypt uploaded and requested files, and H and S also share another key to verify whether the smart home device is a legitimate device. The exchange process of various keys has been explained in the previous article and will not be repeated here. H uses the inverted index to build the data structure and encrypts the index and sends it to S.
[0050] The present invention realizes data access authority verification and fine-grained authorization of data access rights, enhances data controllability, and effectively prevents access by unauthorized users; and can limit the data accessible to the mobile according to the different mobile permissions, thereby ensuring the reasonable use of data.
[0051] Furthermore, in S6, M prepares multiple keywords and uses sk m Encrypt it, compress all ciphertexts using Horner's rule, and use w i ,i∈[n] represents different keywords, and the process is as follows:
[0052] p(R)=w n R n +w n-1 R n-1 +…+w1R
[0053] p(R)=(…(w n R+w n-1 )R+…)R
[0054] In this way, no matter how many keywords M prepares, the values sent to S are only p(R) and R; the process of S recovering data is as follows:
[0055] p(R)=p(R) / R
[0056] w1=p(R)modR
[0057] p(R)=(p(R)-w1) / R
[0058] w2=p(R)modR
[0059]
[0060] Get all the encrypted keywords to be searched; then from Index[w i ],i∈[n], get the files corresponding to all keywords i Sets, perform conjunction operations on these sets file1∧file2…∧file n , and returns the result to M, which decrypts the content to obtain the required data.
[0061] Furthermore, in S7, the update instruction is set to command, which includes the device ID number encrypted using the shared key of H and M, recorded as ID c When S finds it is a command, it extracts the encrypted ID from it and forwards it to H's gateway, which executes DeEnc(key mh,ID c ) Get the device ID p , and encrypt the new content, build a new index, and send it to S and M at the same time.
[0062] By encrypting the data and storing it in the server, more computing power is transferred to the server, reducing the computing overhead of home smart devices. The computing power of smart devices is shifted to improving people's quality of life, and the storage space of the smart devices themselves is freed up to store data that cannot be uploaded to the cloud, expanding the original significance of smart devices.
[0063] The above description is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A lightweight searchable encryption method for smart home control and query, characterized by: The following steps are involved: S1. Initialization. Before the smart home system with searchable encryption is enabled, the server, home, and mobile device are initialized respectively. The server is denoted as Server, the home is denoted as Home, and the mobile device is denoted as Mobile. S2. On the server side, receive the Mobile registration information, allocate database and data structure space for it, build a filter, add the user's permissions to the filter based on the information during Mobile registration, and share a key with Home for mutual authentication between the service provider and the home gateway; S3, on the Home side, generates a teammate identification ID number for each mobile device and shares a key with the Server. It then collects various types of data, cleans and converts the data format, builds an index, and encrypts and uploads the data. In the search phase, Mobile first generates a token using multiple keywords based on its search requirements and sends it along with the permissions to the server. Specifically, Mobile and Host share a key offline for encryption and decryption of uploaded and requested files. Host and Server also share another key for verifying the legitimacy of smart home devices. Host uses an inverted index to construct a data structure and encrypts the index before sending it to Server. S5. The filter verifies the legitimacy of the permissions and records them as evidence in case of problems. It then uses the token to search the constructed index structure to obtain the corresponding complete data set. The server performs a conjunction operation on these sets to obtain the union result and returns it. This filter is recorded as Filter. S6. Finally, Mobile decrypts the data file based on the ciphertext negotiated in the initialization phase. Specifically: M prepares multiple keywords and uses sk m Encrypt it, compress all ciphertexts using Horner's rule, and use w i ,i∈[n] represents different encryption keywords, and the process is as follows: p(R)=w n R n +w n-1 R n-1 +…+w1R p(R)=(…(w n R+w n-1 )R+…)R In this way, no matter how many keywords M prepares, the values sent to S are only p(R) and R; the process of S recovering data is as follows: p(R)=p(R) / R w1=p(R)modR p(R)=(p(R)-w1) / R w2=p(R)mod R Get all the encrypted keywords to be searched; then from Index[w i ],i∈[n], get the files corresponding to all keywords i Sets, perform conjunction operations on these sets file1∧file2…∧file n , and returns the result to M, who decrypts the contents to get the required data; S7, the update phase, that is, when the Mobile wants to obtain real-time data, it encrypts the device ID number to which the real-time data belongs and forwards it through the Server. Then, the Home receives the update signal, decrypts the encrypted device ID number, and then follows the same process as the data collection in the initialization phase, sending the new data and new index to the Server, and then sending the new data to the Mobile as the new data it wants to see; The H represents a series of devices in a home, the S represents a cloud server, and the M represents a mobile device.
2. A lightweight searchable encryption method for smart home control and query according to claim 1, characterized in that: In S2, S will generate a public key pub s and private key pri s , and M generates a symmetric key sk m , then S sends pub s To M, M uses the public key to encrypt the key msg = Enc (pub s ,sk m ), returns the encrypted information to S, and S decrypts DeEnc(pri s ,msg) to get the key.
3. A lightweight searchable encryption method for intelligent home control and query according to claim 2, characterized in that: In S3, the identity of M is recorded as id m , and randomly generate a mask, then generate an authentication message Then the message is encrypted using the symmetric key Enc(sk m ,msg id ) and sends it to S. After receiving it, S decrypts it, removes the mask, and XORs the remaining part to get the ID m In this way, even if the identity remains unchanged, the message sent to S each time is different, which improves the security after the authentication message is stolen.
4. A lightweight searchable encryption method for intelligent home control and query according to claim 3, characterized in that: In the S7, the update instruction is set to command, which includes the device ID number encrypted using the shared key of H and M, recorded as ID c When S finds it is a command, it extracts the encrypted ID from it and forwards it to H's gateway, which executes DeEnc(key mh ,ID c ) Get the device ID p , and encrypt the new content, build a new index, and send it to S and M at the same time.
Citation Information
Patent Citations
Intelligent household safe access method and system based on searchable cipher text
CN102882687A
Mediated and searchable encryption method
CN106850652A