Homomorphic encryption communication method and system for Internet of Things
By combining SHE and FHE encryption methods, using the TRIVIUM algorithm to generate TRIVIUM keys, and performing data analysis on a cloud server, the problems of high computational overhead and large ciphertext size in IoT communication are solved, achieving efficient and secure narrowband communication.
Patent Information
- Application Number
- CN202411286763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-11-01
AI Technical Summary
Existing fully homomorphic encryption has high computational overhead and large ciphertext size in IoT communication, which affects narrowband communication services.
An encryption method combining SHE and FHE is adopted, and a TRIVIUM key is generated through the TRIVIUM algorithm. Data analysis is performed on the cloud server to reduce the communication overhead and ciphertext size of IoT devices.
It reduces communication overhead for IoT devices, minimizes the impact on narrowband communication services, improves data processing speed and security, and prevents privacy data leaks.
Smart Images

Figure CN118890142A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to an Internet of Things homomorphic encryption communication method and system. Background Art
[0002] With the popularity of Internet of Things (IOT) devices such as smart sensors, smart wearable devices and smart home appliances, people can easily obtain various monitoring data, such as location information, exercise records and heart rate data, and can analyze and calculate the data through cloud services. However, since the data collected by IoT devices usually contains a large amount of personal information, unauthorized access to cloud services that are not absolutely secure usually leads to the leakage of personal information or privacy, thus causing security risks.
[0003] In order to ensure the security of private data, homomorphic encryption (HE) technology is used so that data can be processed without leaking private content, and the calculation results can be guaranteed to be the same as those calculated directly on the original text. Homomorphic encryption is a special data encryption technology that allows calculations to be performed directly on encrypted data without decrypting the data first, which is particularly important for protecting privacy and achieving secure data sharing.
[0004] At present, the mainstream uses Fully Homomorphic Encryption (FHE) for IoT encrypted communication. This type of encryption algorithm supports addition and multiplication operations on ciphertext at the same time, and supports unlimited ciphertext operations. However, due to the characteristics of high computational overhead and large ciphertext volume of FHE, the communication overhead generated by this encryption method is very large, and the occupation of communication links will affect the normal narrowband communication services of the IoT. Therefore, it will face challenges when used in IoT scenarios where computing power resources are generally limited. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an Internet of Things homomorphic encryption communication method and system, which is used to solve the problem that the current use of fully homomorphic encryption communication has high overhead and affects the narrowband communication services of the Internet of Things.
[0006] In a first aspect of an embodiment of the present invention, a homomorphic encryption communication method for an Internet of Things is provided, comprising:
[0007] The user end generates a SHE public key and a SHE private key as well as an FHE public key and an FHE private key, and encrypts the SHE private key with the FHE public key;
[0008] The user sends the SHE public key to the IoT device and sends the SHE private key encrypted with the FHE public key to the cloud server.
[0009] The IoT device generates a TRIVIUM key, encrypts the plaintext using the TRIVIUM algorithm to obtain the TRIVIUM ciphertext, and encrypts the TRIVIUM key using the SHE public key;
[0010] The IoT device sends the TRIVIUM ciphertext and the TRIVIUM key encrypted with the SHE public key to the cloud server;
[0011] The cloud server converts the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, and converts the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key;
[0012] The cloud server analyzes the FHE ciphertext and sends the analysis results to the user end;
[0013] The user end uses the FHE private key to decrypt the analysis result to obtain plain text.
[0014] In a second aspect of an embodiment of the present invention, there is provided an Internet of Things homomorphic encryption communication system, including:
[0015] The user terminal is used to generate a public key and a private key of SHE and a public key and a private key of FHE, encrypt the SHE private key by using the FHE public key, send the SHE public key to the IoT device, send the SHE private key encrypted by the FHE public key to the cloud server, receive the analysis result sent by the cloud server, and decrypt the analysis result by using the FHE private key to obtain a plain text;
[0016] The IoT device is used to generate a TRIVIUM key, encrypt the plaintext using the TRIVIUM algorithm to obtain a TRIVIUM ciphertext, encrypt the TRIVIUM key using the SHE public key, and send the TRIVIUM ciphertext and the TRIVIUM key encrypted with the SHE public key to the cloud server;
[0017] The cloud server is used to convert the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, convert the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key, analyze the FHE ciphertext, and send the analysis result to the user terminal.
[0018] In a third aspect of an embodiment of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect of the embodiment of the present invention when executing the computer program.
[0019] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method provided in the first aspect of the embodiment of the present invention are implemented.
[0020] In the embodiment of the present invention, by using the TRIVIUM algorithm to encrypt IoT data, the volume of ciphertext can be reduced, the communication overhead of IoT devices can be reduced, and the impact on the narrowband communication service of IoT devices can be reduced. By analyzing IoT data through a cloud server, the resource occupation of the IoT and the user end can be reduced, and the data processing speed can be improved. The cloud server converts the SHE ciphertext into FHE ciphertext, so that the IoT devices no longer need to use the full-pass encryption algorithm for communication. At the same time, the server converts the TRIVIUM ciphertext into FHE ciphertext for direct analysis, which can avoid the leakage of privacy data and ensure communication security. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a process flow of fully homomorphic encryption communication provided by one embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a flow chart of a homomorphic encryption communication method for the Internet of Things provided by one embodiment of the present invention;
[0024] Figure 3 A timing diagram of a homomorphic encryption communication method for the Internet of Things provided by one embodiment of the present invention;
[0025] Figure 4 A schematic diagram of the structure of an Internet of Things homomorphic encryption communication system provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] It should be understood that the term "including" and other similar expressions in the specification or claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions, such as a process, method, system, or device including a series of steps or units is not limited to the listed steps or units. In addition, "first" and "second" are used to distinguish different objects, not to describe a specific order.
[0028] It can be understood that the traditional process of IoT encrypted communication based on Fully Homomorphic Encryption (FHE) is as follows: Figure 1 As shown, it includes: (1) the user generates FHE public and private keys; (2) the FHE public key is sent to the IoT device and cloud service; (3) the IoT device uses FHE to encrypt plaintext; (4) the IoT device sends the FHE ciphertext to the cloud server; (5) the cloud server analyzes the FHE ciphertext; (6) the cloud server sends the analysis results to the data analyst; (7) the user decrypts the analysis results. However, this type of scheme using FHE for encrypted communication generates a large ciphertext volume and a large communication overhead, which will have a great impact on narrowband communication services such as the Internet of Things. Therefore, it is necessary to propose a solution to reduce the communication overhead on IoT devices.
[0029] See also Figure 2 , a flowchart of a homomorphic encryption communication method for an Internet of Things provided by an embodiment of the present invention includes:
[0030] S201, the user end generates a SHE public key and a SHE private key as well as an FHE public key and an FHE private key, and encrypts the SHE private key by using the FHE public key;
[0031] The user end is a user terminal, such as a mobile phone, tablet computer, notebook or other terminal device, which can be used to receive monitoring data sent by the Internet of Things device and receive data analysis results sent by the cloud server.
[0032] SHE refers to the Somewhat Homomorphic Encryption (SHE) algorithm, which can perform a limited number of operations on the ciphertext, supporting any combination of additions or multiplications up to a certain number of times. Operations exceeding the specified number will produce invalid results. Compared with the FHE algorithm, the SHE encryption algorithm runs faster and can obtain a smaller ciphertext at the cost of a limited number of operations.
[0033] FHE refers to the Fully Homomorphic Encryption (FHE) algorithm, which supports both addition and multiplication operations on ciphertext and can support unlimited ciphertext operations. FHE is end-to-end encryption during data processing and transmission, which can keep data encrypted during processing and transmission.
[0034] Among them, a short vector s in the lattice cipher is selected as the SHE private key; a random variable a and a noise vector e are selected, and b=as+e is calculated, then the SHE public key is expressed as (a,b).
[0035] S202, the user end sends the SHE public key to the IoT device, and sends the SHE private key encrypted by the FHE public key to the cloud service end;
[0036] The IoT devices refer to various physical devices and sensors that enable data interaction through the Internet, such as GPS devices, sports watches, heart rate monitoring bracelets, temperature sensors, etc. IoT devices usually have wireless communication modules and can upload monitoring data through the Internet and send the monitoring data to user terminals or cloud servers.
[0037] The cloud service end refers to a cloud server, which can receive monitoring data uploaded by IoT devices and store and analyze the monitoring data.
[0038] After the user sends the SHE public key to the IoT device, the IoT device can encrypt data based on the SHE public key, reducing the volume of ciphertext and reducing the occupancy of the communication link.
[0039] After the SHE private key encrypted by the FHE public key is sent to the cloud server, the cloud server can decrypt the ciphertext data encrypted by the SHE public key based on the SHE private key.
[0040] S203, the IoT device generates a TRIVIUM key, encrypts the plaintext using the TRIVIUM algorithm to obtain a TRIVIUM ciphertext, and encrypts the TRIVIUM key using the SHE public key;
[0041] TRIVIUM is a lightweight stream cipher algorithm with a linear feedback shift register (LFSR) at its core, but unlike traditional LFSR registers, TRIVIUM uses a very large state space and generates the key stream through a combination of three independent linear feedback shift registers.
[0042] The three registers are: T (Trivial), 64 bits long; K (Key), 89 bits long; L (LFSR), 115 bits long. These three registers together constitute the state of TRIVIUM, and each register contains a feedback function.
[0043] Based on the TRIVIUM algorithm, a TRIVIUM key can be generated, and the ciphertext obtained by encrypting the plaintext with the TRIVIUM algorithm can be decrypted by the TRIIVIUM key.
[0044] In some embodiments, the TRIVIUM key is set as follows: an 80-bit key is filled into the first 80 bits of a T register, an 80-bit initialization vector is filled into the first 80 bits of a K register, and the remaining bits are set to 0.
[0045] The plaintext is IoT device monitoring data, such as GPS location, heart rate, temperature and other monitoring data. The plaintext is encrypted by the TRIVIUM algorithm to ensure the transmission security of the plaintext data.
[0046] The plaintext bits are XORed with the key stream bits to obtain the TRIVIUM ciphertext bits, and the key stream bits are obtained by combining three independent linear feedback shift registers.
[0047] The TRIVIUM key is encrypted using the SHE (semi-homomorphic encryption) public key, and the encrypted key is sent to the cloud server so that the cloud server can decrypt the TRIVIUM ciphertext based on the TRIVIUM key.
[0048] The TRIVIUM key is encoded as a polynomial or vector as the message m, a noise vector e' and a random vector r are randomly selected, and the TRIVIUM key after public key encryption is represented as (u, v), and u = ra + e', v = rb + e' + m, where the SHE public key is (a,,b).
[0049] Correspondingly, the SHE (semi-homomorphic encryption) private key decryption process is:
[0050] Decrypt the ciphertext (u, v) using the private key s:
[0051] m=v-us=(rb+e′+m)-(ra+e′)s=m+(r(as+e)+e′-r(as+e))s;
[0052] Since as+e=b, the noise terms cancel each other out, resulting in the original plaintext message m.
[0053] In some embodiments, the process of decrypting the TRIVIUM ciphertext based on the TRIVIUM key is:
[0054] Based on the key stream bits, the TRIVIUM ciphertext bits are XORed inversely to obtain the plaintext bits.
[0055] S204, the IoT device sends the TRIVIUM ciphertext and the TRIVIUM key encrypted by the SHE public key to the cloud service end;
[0056] In this embodiment, the IoT device directly establishes a communication connection with the cloud server (usually a wireless connection, such as 4G / 5G, WiFi, etc.), and can encrypt the IoT monitoring data using the TRIVIUM algorithm, and then send both the TRIVIUM ciphertext and the TRIVIUM key to the cloud server, which then analyzes the monitoring data.
[0057] S205, the cloud server converts the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, and converts the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key;
[0058] The cloud server decrypts the TRIVIUM key encrypted by the SHE public key according to the SHE private key and converts it into the FHE-encrypted TRIVIUM key, and converts the TRIVIUM ciphertext into FHE ciphertext according to the TRIVIUM key.
[0059] S206, the cloud server analyzes the FHE ciphertext and sends the analysis result to the user end;
[0060] Since homomorphic encryption can directly calculate ciphertext, it allows direct analysis of ciphertext, thus avoiding the leakage of private information. The cloud server directly performs data analysis on FHE ciphertext, such as analyzing data change characteristics to determine the user's health status, and obtains FHE ciphertext analysis results, which are also FHE encrypted.
[0061] It can be understood that since the cloud server has sufficient computing resources and fast data processing speed, the cloud server can perform computational analysis on the IoT monitoring data, which can reduce the occupation of user-side resources and improve the data processing speed.
[0062] S207: The user end decrypts the analysis result using the FHE private key to obtain plain text.
[0063] The analysis result is FHE-encrypted ciphertext data, which can be decrypted by the FHE private key of the user end to obtain the corresponding plaintext.
[0064] In this embodiment, by introducing the TRIVIUM algorithm to encrypt and transmit IoT device data, it is possible to reduce computing overhead, reduce the size of ciphertext, and thus reduce the communication overhead of IoT devices, avoiding affecting the normal narrowband communication services of IoT. At the same time, sending IoT device data to the cloud server, and performing data analysis by the cloud server, can improve data processing efficiency and reduce the occupation of user-side resources. At the same time, converting TRIVIUM ciphertext into FHE ciphertext for analysis and sending it to the user side can avoid the risk of privacy data leakage and ensure data communication security.
[0065] In another embodiment, if Figure 3 As shown, Figure 3 The timing diagram of the IoT homomorphic encryption communication method is shown in the figure. In the figure, the user end automatically generates SHE public key and private key as well as FHE public key and private key, and encrypts the SHE private key with the FHE public key, and then sends the SHE public key to the IoT device, and sends the encrypted SHE private key to the cloud service end;
[0066] The IoT device generates a TRIVIUM key based on the TRIVIUM algorithm, encrypts the IoT device data plaintext to obtain the TRIVIUM ciphertext, encrypts the TRIVIUM key with the SHE public key, and then sends the TRIVIUM ciphertext and the TRIVIUM key encrypted with the SHE public key to the cloud server;
[0067] The cloud server converts the received TRIVIUM key encrypted by the SHE public key into a TRIVIUM key encrypted by the FHE public key, and converts the TRIVIUM ciphertext into FHE ciphertext according to the TRIVIUM key encrypted by the FHE public key, and then directly performs data analysis on the FHE ciphertext and sends the analysis results to the user end;
[0068] After receiving the data analysis results, the client parses them according to its own FHE private key to obtain the plaintext.
[0069] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0070] Figure 4 A schematic diagram of the structure of an Internet of Things homomorphic encryption communication system provided by an embodiment of the present invention, the system includes:
[0071] The user terminal 410 is used to generate a SHE public key and a SHE private key as well as a FHE public key and a FHE private key, encrypt the SHE private key by using the FHE public key, send the SHE public key to the IoT device, send the SHE private key encrypted by the FHE public key to the cloud server, receive the analysis result sent by the cloud server, and decrypt the analysis result by using the FHE private key to obtain a plain text;
[0072] The public key and private key of SHE are generated as follows:
[0073] Select a short vector s in the lattice cipher as the SHE private key;
[0074] Select a random variable a and a noise vector e, and calculate b=as+e, then the SHE public key is expressed as (a,b).
[0075] The IoT device 420 is used to generate a TRIVIUM key, encrypt the plaintext by the TRIVIUM algorithm to obtain a TRIVIUM ciphertext, encrypt the TRIVIUM key by the SHE public key, and send the TRIVIUM ciphertext and the TRIVIUM key encrypted by the SHE public key to the cloud server;
[0076] Wherein, encrypting the TRIVIUM key by the SHE public key includes:
[0077] The TRIVIUM key is encoded as a polynomial or vector as the message m, a noise vector e' and a random vector r are randomly selected, and the TRIVIUM key encrypted by the SHE public key is represented as (u, v), and u = ra + e', v = rb + e' + m, where the SHE public key is (a, b).
[0078] The encrypting of the plaintext by the TRIVIUM algorithm to obtain the TRIVIUM ciphertext includes:
[0079] The plaintext bits are XORed with the keystream bits to obtain the TRIVIUM ciphertext bits, wherein the keystream bits are obtained by combining three independent linear feedback shift registers.
[0080] The cloud server 430 is used to convert the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, convert the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key, analyze the FHE ciphertext, and send the analysis result to the user terminal.
[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0082] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0083] A person of ordinary skill in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it implements part or all of the processes in steps S201 to S207. The storage medium includes ROM / RAM, etc.
[0084] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A homomorphic encryption communication method for the Internet of Things, characterized in that: include: The user end generates a SHE public key and a SHE private key, as well as an FHE public key and an FHE private key, and encrypts the SHE private key with the FHE public key; The user sends the SHE public key to the IoT device and sends the SHE private key encrypted with the FHE public key to the cloud server. The IoT device generates a TRIVIUM key, encrypts the plaintext using the TRIVIUM algorithm to obtain the TRIVIUM ciphertext, and encrypts the TRIVIUM key using the SHE public key; The IoT device sends the TRIVIUM ciphertext and the TRIVIUM key encrypted with the SHE public key to the cloud server; The cloud server converts the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, and converts the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key; The cloud server analyzes the FHE ciphertext and sends the analysis results to the user. The user end uses the FHE private key to decrypt the analysis result to obtain plain text.
2. The method according to claim 1, characterized in that The user end generates a SHE public key and a SHE private key including: Select a short vector s in the lattice cipher as the SHE private key; Select a random variable a and a noise vector e, and calculate b=as+e, then the SHE public key is expressed as (a,b).
3. The method according to claim 1, characterized in that The encryption of the TRIVIUM key by the SHE public key includes: The TRIVIUM key is encoded as a polynomial or vector as the message m, a noise vector e' and a random vector r are randomly selected, and the TRIVIUM key encrypted by the SHE public key is represented as (u, v), and u = ra + e', v = rb + e' + m, where the SHE public key is (a, b).
4. The method according to claim 1, characterized in that The TRIVIUM ciphertext obtained by encrypting the plaintext by the TRIVIUM algorithm includes: The plaintext bits are XORed with the keystream bits to obtain the TRIVIUM ciphertext bits, wherein the keystream bits are obtained by combining three independent linear feedback shift registers.
5. An Internet of Things homomorphic encryption communication system, characterized in that: include: The user terminal is used to generate a SHE public key and a SHE private key as well as a FHE public key and a FHE private key, encrypt the SHE private key by using the FHE public key, send the SHE public key to the IoT device, send the SHE private key encrypted by the FHE public key to the cloud server, receive the analysis result sent by the cloud server, and decrypt the analysis result by using the FHE private key to obtain a plain text; The IoT device is used to generate a TRIVIUM key, encrypt the plaintext using the TRIVIUM algorithm to obtain a TRIVIUM ciphertext, encrypt the TRIVIUM key using the SHE public key, and send the TRIVIUM ciphertext and the TRIVIUM key encrypted with the SHE public key to the cloud server; The cloud server is used to convert the TRIVIUM key encrypted by the SHE public key into the TRIVIUM key encrypted by the FHE public key, convert the TRIVIUM ciphertext into the FHE ciphertext based on the TRIVIUM key encrypted by the FHE public key, analyze the FHE ciphertext, and send the analysis result to the user terminal.
6. The system according to claim 5, characterized in that The generating of the SHE public key and the SHE private key comprises: Select a short vector s in the lattice cipher as the SHE private key; Select a random variable a and a noise vector e, and calculate b=as+e, then the SHE public key is expressed as (a,b).
7. The system according to claim 5, characterized in that The encryption of the TRIVIUM key by the SHE public key includes: The TRIVIUM key is encoded as a polynomial or vector as the message m, a noise vector e' and a random vector r are randomly selected, and the TRIVIUM key encrypted by the SHE public key is represented as (u, v), and u = ra + e', v = rb + e' + m, where the SHE public key is (a, b).
8. The system according to claim 5, characterized in that The TRIVIUM ciphertext obtained by encrypting the plaintext by the TRIVIUM algorithm includes: The plaintext bits are XORed with the keystream bits to obtain the TRIVIUM ciphertext bits, wherein the keystream bits are obtained by combining three independent linear feedback shift registers.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the Internet of Things homomorphic encryption communication method as described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the steps of an Internet of Things homomorphic encryption communication method as described in any one of claims 1 to 4 are implemented.
