End-to-end communication encryption method, device, storage medium and terminal equipment

Through negotiation between the client and the gateway device to generate a shared key and encrypt the communication data, the problem of low communication security in the smart home system is solved, end-to-end encrypted communication is achieved, and information security is improved.

CN114531225BActive Publication Date: 2024-09-17SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011205007.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-02
Publication Date
2024-09-17
Estimated Expiration
2040-11-02

AI Technical Summary

Technical Problem

The communication security of existing smart home systems is not high. The keys of the cloud platform are unified for all devices or similar devices. As a result, once a security incident occurs on the cloud platform, multiple users and devices will be affected.

Method used

Using the end-to-end communication encryption method, the user and the gateway device negotiate to generate a shared key, and use the shared key to encrypt the communication data, ensuring that the communication data can only be parsed by the user and the gateway device, improving the security of communication information. Security.

Benefits of technology

Through the direct negotiation and generation of encryption keys between the user end and the gateway device, end-to-end encrypted communication is realized, preventing external devices from parsing communication data, and significantly improving the security of communication information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114531225B
    Figure CN114531225B
Patent Text Reader

Abstract

The present invention relates to an end-to-end communication encryption method, storage medium and terminal device, the method comprising: a user terminal receives first negotiation information sent by a gateway device, the first negotiation information includes a gateway public key configured by the gateway device; the user terminal determines a user shared key corresponding to the user terminal based on the gateway public key and a user private key configured by itself; the user terminal encrypts the communication data to be transmitted based on the user shared key, and sends the encrypted communication data to the gateway device. The shared key is generated by negotiation between the user terminal and the gateway device, and the user terminal and the gateway device are bidirectionally authenticated. The user terminal uses the shared key to encrypt the communication data to be transmitted, thereby realizing end-to-end encrypted communication between the user terminal and the gateway device. Since the encryption key is generated by direct negotiation between the two ends, their communication data cannot be parsed by devices other than the user terminal and the gateway device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an end-to-end communication encryption method, device, storage medium and terminal equipment. Background Art

[0002] Existing smart home systems generally use encryption authentication between home devices and cloud platforms, encryption authentication between users and cloud platforms, and the cloud platform key is the same for all devices or devices of the same type. Therefore, if a security incident occurs on the cloud platform, it will affect many users and devices.

[0003] Therefore, how to improve the security of smart home system communication is an urgent problem to be solved. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, an object of the present invention is to provide an end-to-end communication encryption method, apparatus, storage medium and terminal device, aiming to solve the problem of low communication security of existing smart home systems.

[0005] In a first aspect of an embodiment of the present invention, there is provided an end-to-end communication encryption method, which is applied to a user end in a communication system, wherein the communication system further includes a gateway device, and the method includes:

[0006] Receiving first negotiation information sent by the gateway device, where the first negotiation information includes a gateway public key configured by the gateway device;

[0007] Based on the gateway public key and the user private key configured by itself, determine the user shared key corresponding to the user end;

[0008] The communication data to be transmitted is encrypted based on the user shared key, and the encrypted communication data is sent to the gateway device.

[0009] In a second aspect of an embodiment of the present invention, there is provided an end-to-end communication encryption method, which is applied to a gateway device in a communication system, wherein the communication system further includes a user end, and the method includes:

[0010] Receiving first negotiation information sent by the user terminal, where the first negotiation information includes a user public key configured by the user terminal;

[0011] Determine the gateway shared key corresponding to the gateway device based on the user's public key and the gateway private key configured by itself;

[0012] The communication data to be transmitted is encrypted based on the gateway shared key, and the encrypted communication data is sent to the user end.

[0013] According to a third aspect of an embodiment of the present invention, there is provided an end-to-end communication encryption device, which is applied to a user end in a communication system, wherein the communication system further includes a gateway device, and the device includes:

[0014] A receiving unit, configured to receive first negotiation information sent by a gateway device, where the first negotiation information includes a gateway public key configured by the gateway device;

[0015] A determination unit, used to determine a user shared key corresponding to the user end based on the gateway public key and the user private key configured by the gateway;

[0016] The encryption unit is used to encrypt the communication data to be transmitted based on the user shared key and send the encrypted communication data to the gateway device.

[0017] In a fourth aspect of an embodiment of the present invention, there is provided an end-to-end communication encryption device, which is applied to a gateway device in a communication system, wherein the communication system further includes a user end, and the device includes:

[0018] A receiving unit, configured to receive first negotiation information sent by a user terminal, where the first negotiation information includes a user public key configured by the user terminal;

[0019] A determination unit, based on a user public key and a gateway private key configured by itself, determines a gateway shared key corresponding to the gateway device;

[0020] The encryption unit encrypts the communication data to be transmitted based on the gateway shared key and sends the encrypted communication data to the user end.

[0021] In a fifth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores an end-to-end communication encryption program. The end-to-end communication encryption program is executed by a processor to implement the steps in the above-mentioned end-to-end communication encryption method.

[0022] A sixth aspect of an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and an end-to-end encryption program stored in the memory and executable on the processor. When the processor executes the end-to-end communication encryption program, it implements the steps in the above-mentioned end-to-end communication encryption method.

[0023] Beneficial effects: The present invention provides an end-to-end communication encryption method, which generates a shared key through negotiation between a user terminal and a gateway device, and the user terminal uses the shared key to encrypt the transmitted communication data, thereby realizing end-to-end encrypted communication between the user terminal and the gateway device. Since the encryption key between the user terminal and the gateway device is directly negotiated and generated by the two ends, their communication data cannot be parsed by devices other than the user terminal and the gateway device, thereby improving the security of the communication information. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.

[0025] Figure 1 The communication architecture diagram between the existing home system and the user terminal;

[0026] Figure 2 A flow chart of an end-to-end communication encryption method provided by an embodiment of the present invention;

[0027] Figure 3 A flow chart of two-way authentication between a user terminal and a gateway device provided in an embodiment of the present invention;

[0028] Figure 4 A communication architecture diagram between a home system and a user terminal provided in an embodiment of the present invention;

[0029] Figure 5 A communication architecture diagram between another home system and a user terminal provided by an embodiment of the present invention;

[0030] Figure 6 A schematic diagram of the terminal device structure provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly understood.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0033] like Figure 1 As shown, the communication between the existing home system and the user terminal mostly adopts the method of establishing an encrypted authentication connection between the user terminal and the cloud platform. The home system establishes an encrypted authentication connection with the cloud platform. The user sends instructions for controlling the home appliances in the home system to the cloud server through the mobile device in his hand (such as a smart phone, IPD and other handheld terminals). The cloud server analyzes the received control instructions and forwards the analysis results to the device end. The device end performs corresponding actions according to the received control instructions.

[0034] For example, a user wants to turn on the air conditioner at home through a mobile phone when he is not at home. At this time, the user can send an air conditioner start-up command through the application software on the mobile phone. The air conditioner start-up command is received by the cloud server, and the cloud server parses the start-up command to obtain the home gateway address of the air conditioner corresponding to the start-up command, and sends the start-up command to the corresponding home gateway, which sends the start-up command to the air conditioner to realize remote start of the air conditioner.

[0035] Since user data is parsed by a cloud server and a cloud server faces many devices, once a cloud server has security problems, such as system vulnerabilities or illegal intrusions, the information of many users can be easily stolen.

[0036] Based on this, the present invention provides a solution that can solve the above technical problems, and its details will be described in subsequent embodiments.

[0037] See also Figure 2 , Figure 2 A flow chart of an end-to-end communication encryption method provided by an embodiment of the present invention. An end-to-end communication encryption method provided by this embodiment can be applied to a communication system, wherein the communication system includes a user terminal and a gateway device.

[0038] The end-to-end communication encryption method provided by the present invention will be described in detail below, taking the user end and the smart home system gateway device as an example. The smart home system gateway device (smart home gateway G) is the control center of the smart home system, responsible for connecting various devices in the centralized home (such as smart TVs, smart air conditioners, smart refrigerators, etc.) to form a relatively closed smart home system. The smart home gateway G is responsible for analyzing and processing home device data, issuing control instructions, and a series of scenarios and automation services. The entire smart home system provides services to the outside through the smart home gateway G so that users can interact with the home system when they are not at home.

[0039] Generally, there are two situations in the home network where the user end and the gateway device are located: Figure 4 The first scenario shown is that the user's home network has a public IP. At this time, the user terminal can directly perform encrypted communication C0 with the home gateway G through the public IP.

[0040] For example, if a user's home is equipped with a China Telecom, China Mobile or China Unicom broadband network, the user applies to the corresponding network operator to open a public IP. After the public IP is opened, the smart home gateway G in the home network can be directly accessed by other devices (authenticated) in the network without going through other proxy servers (cloud servers). Since the encryption keys between the user end and the smart home gateway G are directly negotiated and generated by the two ends, their communication data cannot be parsed by devices other than the user end and the smart home gateway.

[0041] like Figure 5 The second scenario shown is that the user's home network does not have a public IP. At this time, the user terminal first establishes an encrypted transmission path C1 with the cloud server, and the home gateway G also establishes an encrypted transmission path C2 with the cloud server. Then the user terminal directly establishes an encrypted transmission path C3 with the home gateway G through the cloud bridge. It can be seen that the communication between the user terminal and the gateway is encrypted twice. Similarly, since the encryption keys of the user terminal and the smart home gateway G are directly negotiated and generated by the two ends, their communication data cannot be parsed by devices other than the user terminal and the smart home gateway.

[0042] In the method provided in this embodiment, the execution subject is the user end, and the specific steps are as follows:

[0043] S10. Receive first negotiation information sent by a gateway device, where the first negotiation information includes a gateway public key configured by the gateway device.

[0044] Specifically, the gateway device Gateway can generate a gateway public key and a gateway private key (g.publicKey, g.privateKey) through the Diffie-Hellman function Curve25519, and send the gateway public key (g.publicKey) as the first negotiation information to the user end. The user end can decrypt the encrypted information sent by the gateway device through the obtained gateway public key.

[0045] In this embodiment, Curve25519 is a relatively high-level function among the current Diffie-Hellman functions and is applicable to a wide range of scenarios. Curve25519 is an elliptic curve that provides 128-bit security and is designed for the elliptic curve Diffie-Hellman (ECDH) key agreement scheme.

[0046] Furthermore, given a user's 32-byte secret key, curve25519 calculates the user's 32-byte public key. Given the user's 32-byte secret key and another user's 32-byte public key, curve25519 calculates a 32-byte shared key for both users. This key can then be used to authenticate the two users and encrypt information. By using Curve25519 to generate keys, the reliability of the keys can be improved.

[0047] S20: Determine the user shared key corresponding to the user end based on the gateway public key and the user private key configured by itself.

[0048] Specifically, first, the user end generates a user public key and a user private key (u.publicKey, u.privateKey) through the Diffie-Hellman function Curve25519. The user end saves the user private key and the gateway public key sent by the obtained gateway device as a user shared key. It is easy to understand that the user shared key is recorded as sharedKey = curve25519 (u.privateKey, g, publicKey). The user shared key corresponds to the user end. In other words, the user end can use the user shared key to encrypt the communication data to be sent.

[0049] In one implementation of this embodiment, the user end can send the user public key (u.privateKey) to the gateway device, and the gateway device saves the user public key (u.privateKey) and the gateway private key held by itself as a gateway shared key, that is, shareKey = curve25519 (g.privateKey, u.publicKey). It is easy to understand that the gateway shared key corresponds to the gateway device, that is, the gateway device can use the gateway shared key to encrypt the communication data sent to the user end and decrypt the received encrypted data.

[0050] S30, encrypting the communication data to be transmitted based on the user shared key, and sending the encrypted communication data to the gateway device.

[0051] Specifically, when the user terminal holds a user shared key and needs to communicate with the gateway device, the user terminal can use the user shared key to encrypt the communication data to be transmitted through the AEAD (authenticated encryption with associated data) associated data authentication encryption algorithm ChaCha20-Poly1305 and transmit it to the gateway device. It is easy to understand that since the user shared key used by the user terminal includes the gateway public key of the gateway device, when the gateway device receives the encrypted data sent by the user terminal, it can use its own gateway private key to decrypt it. It can be seen from this that the user terminal encrypts the communication data to be transmitted through the user shared key, and the gateway device uses the gateway private key for decryption after receiving the encrypted communication data. The keys are all generated by direct negotiation between the user terminal and the gateway device, so the communication data between them cannot be easily parsed by other devices.

[0052] like Figure 3 As shown, in one implementation of this embodiment, after the user terminal holds the user shared key, before the encrypted information is transmitted, an authentication process between the user terminal and the gateway device is also included, wherein the authentication process steps are as follows:

[0053] S21. Receive a first digital signature encrypted and sent by a gateway device using a gateway shared key, and perform user-side verification on the first digital signature using a gateway certificate public key configured by the gateway device.

[0054] Specifically, the gateway device Gateway and the user end User both hold a one-machine-one-secret certificate issued by the digital signature algorithm ED25519 during registration. The one-machine-one-secret certificate of the gateway device is {g.id, g.cert.publicKey, g.cert.privateKey}, and the one-machine-one-secret certificate of the user end is {u.id, u.cert.publicKey, u.cert.privateKey}. After the gateway device and the user end are bound, the user end saves the gateway device's gateway ID address (g.id) and certificate public key (g.cert.publicKey), while the gateway device saves the user's user ID address (u.id) and certificate public key (u.cert.publicKey). In other words, by establishing a binding relationship, the user end saves the gateway device's ID address and certificate public key, while the gateway saves the user end's ID address and certificate public key. The gateway device and the user end save each other's ID address and certificate public key respectively, which can facilitate subsequent identity authentication.

[0055] In this embodiment, after the user terminal and the gateway device generate a shared key and establish a binding, the gateway device digitally signs the user terminal's public key (u.publicKey), the user's ID address (u.id), and the gateway's public key (g.publicKey) through the certificate private key (g.cert.privateKey) it holds, and the resulting digital signature is the first digital signature. The gateway device encrypts the first digital signature with the gateway shared key and sends it to the user terminal. After receiving the first digital signature, the user terminal uses the gateway's certificate public key (g.cert.publicKey) it holds to perform a user terminal verification, wherein the user terminal verification refers to verifying the identity of the gateway device at the user terminal.

[0056] S22. When the user end passes the verification, the user end sends the second digital signature encrypted with the user shared key to the gateway device, so that the gateway device performs a gateway verification on the second digital signature.

[0057] Specifically, after the user-side verification is passed, the user-side uses the private key of the certificate (u.cert.privateKey) held by the user to digitally sign the public key of the gateway (g.publicKey), the gateway (g.id), and the public key of the user (u.publicKey), and the obtained digital signature is the second digital signature. The user-side encrypts the second digital signature with the user shared key and sends it to the gateway device. After receiving the second digital signature, the gateway device uses the public key of the user's certificate (u.cert.publicKey) held by itself to perform a gateway-side verification on it, wherein the gateway-side verification refers to the verification of the user's identity at the gateway device. It should be noted that what is described in this embodiment is that the user-side first verifies the identity of the gateway device, and after the verification is passed, the gateway device verifies the identity of the user-side. Of course, the gateway device can also first verify the identity of the user-side, and after the verification is passed, the user-side verifies the identity of the gateway device.

[0058] S23, receiving the gateway verification result returned by the gateway device. When the gateway verification result is passed, the user end triggers an operation of encrypting the communication data to be transmitted based on the gateway shared key.

[0059] In this embodiment, the user terminal authenticates the (bound) smart gateway device in the home network and the smart gateway device authenticates the user terminal (i.e., two-way authentication) to confirm that the other party does not forge their identity, thereby improving the security of communication information.

[0060] Based on the above end-to-end communication encryption method, the present invention also provides an end-to-end communication encryption device, which is applied to a user end in a communication system, the communication system also includes a gateway device, and the device includes:

[0061] A receiving unit, configured to receive first negotiation information sent by a gateway device, where the first negotiation information includes a gateway public key configured by the gateway device;

[0062] A determination unit, used to determine a user shared key corresponding to the user end based on the gateway public key and the user private key configured by the gateway;

[0063] The encryption unit is used to encrypt the communication data to be transmitted based on the user shared key and send the encrypted communication data to the gateway device.

[0064] Based on the above end-to-end communication encryption method, the present invention also provides another end-to-end communication encryption device, which is applied to a gateway device in a communication system, the communication system also includes a user end, and the device includes:

[0065] A receiving unit, configured to receive first negotiation information sent by a user terminal, where the first negotiation information includes a user public key configured by the user terminal;

[0066] A determination unit, based on a user public key and a gateway private key configured by itself, determines a gateway shared key corresponding to the gateway device;

[0067] The encryption unit encrypts the communication data to be transmitted based on the gateway shared key and sends the encrypted communication data to the user end.

[0068] Based on the above-mentioned end-to-end communication encryption method, the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the end-to-end communication encryption method of the above-mentioned embodiment.

[0069] Based on the above end-to-end communication encryption method, the present invention also provides a terminal device, such as Figure 6As shown, it includes at least one processor (processor) 30 and a memory (memory) 31, and may also include a communications interface (CommunicationsInterface) 32 and a bus 33. Among them, the processor 30, the memory 31 and the communication interface 32 can communicate with each other through the bus 33. The communication interface 32 can transmit information. The processor 30 can call the logic instructions in the memory 31 to execute the method in the above embodiment. In addition, the logic instructions in the above memory 31 can be implemented in the form of software functional units and can be stored in a readable storage medium when sold or used as an independent product. The memory 31, as a readable storage medium, can be configured to store software programs, such as program instructions or modules corresponding to the method in the embodiment of the present invention. The processor 30 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 31, that is, implementing the method in the above embodiment. The memory 31 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 31 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, can also be a transient storage medium. In addition, the specific process of loading and executing the above storage medium and the multiple instruction processors in the terminal has been described in detail in the above method, and will not be described here one by one.

[0070] In summary, the present invention provides an end-to-end communication encryption method, storage medium and terminal device. Applied to the user end in a communication system, the communication system includes a user end and a gateway device, and the method includes: receiving a first negotiation message sent by the gateway device, the first negotiation message includes a gateway public key configured by the gateway device; determining a user shared key corresponding to the user end based on the gateway public key and the user private key configured by itself; encrypting the communication data to be transmitted based on the user shared key, and sending the encrypted communication data to the gateway device. A shared key is generated through negotiation between the user end and the gateway device, and the user end and the gateway device are bidirectionally authenticated. The user end uses the shared key to encrypt the communication data to be transmitted, thereby realizing end-to-end encrypted communication between the user end and the gateway device. Since the encryption keys of the user end and the gateway device are directly negotiated and generated by the two ends, their communication data cannot be parsed by devices other than the user end and the gateway device, thereby improving the security of the communication information.

[0071] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. An end-to-end communication encryption method, characterized in that: The method is applied to a user terminal in a communication system, wherein the communication system further includes a gateway device, and the method includes: Receiving first negotiation information sent by the gateway device, where the first negotiation information includes a gateway public key configured by the gateway device; Determine the user shared key corresponding to the user terminal based on the gateway public key and the user private key configured by itself; Encrypting the communication data to be transmitted based on the user shared key, and sending the encrypted communication data to the gateway device; The encrypting the communication data to be transmitted based on the user shared key includes: Based on the user shared key, encrypting the communication data to be transmitted by an associated data authentication encryption algorithm; The gateway device is a smart home system gateway device, which serves as the control center of the smart home system and is responsible for connecting various devices in the centralized home; The communication system also includes a cloud server. The communication system does not have a public IP. The user terminal first establishes an encrypted transmission path with the cloud server, and the home gateway also establishes an encrypted transmission path with the cloud server. Then the user terminal directly establishes an encrypted transmission path with the home gateway through the cloud bridge.

2. The method according to claim 1, characterized in that The method further comprises: The second negotiation information carrying the user public key configured by itself is sent to the gateway device, so that the gateway device determines the gateway shared key corresponding to the gateway device based on the user public key and the gateway private key configured by itself.

3. The method according to claim 2, characterized in that Before encrypting the communication data to be transmitted based on the user shared key, the method further includes: Receiving a first digital signature encrypted and sent by the gateway device using the gateway shared key, and performing user-side verification on the first digital signature using the gateway certificate public key configured by the gateway itself; When the user end verification passes, sending the second digital signature encrypted with the user shared key to the gateway device, so that the gateway device performs gateway end verification on the second digital signature; The gateway-side verification result returned by the gateway device is received, and when the gateway-side verification result is verification passed, an operation of encrypting the communication data to be transmitted based on the user shared key is triggered.

4. The method according to claim 3, characterized in that The first digital signature includes the certificate private key configured by the gateway device itself, the user public key, the user terminal ID address and the gateway public key.

5. The method according to claim 3, characterized in that The second digital signature includes the private key of the client's certificate, the gateway public key, the gateway device ID address and the user public key.

6. An end-to-end communication encryption method, characterized in that: A gateway device applied to a communication system, wherein the communication system further comprises a user terminal, and the method comprises: Receiving first negotiation information sent by the user terminal, where the first negotiation information includes a user public key configured by the user terminal; Determine the gateway shared key corresponding to the gateway device based on the user public key and the gateway private key configured by itself; Encrypting the communication data to be transmitted based on the gateway shared key, and sending the encrypted communication data to the user terminal; The encrypting the communication data to be transmitted based on the gateway shared key includes: Based on the gateway shared key, encrypting the communication data to be transmitted by an associated data authentication encryption algorithm; The gateway device is a smart home system gateway device, which serves as the control center of the smart home system and is responsible for connecting various devices in the centralized home; The communication system also includes a cloud server. The communication system does not have a public IP. The user terminal first establishes an encrypted transmission path with the cloud server, and the home gateway also establishes an encrypted transmission path with the cloud server. Then the user terminal directly establishes an encrypted transmission path with the home gateway through the cloud bridge.

7. The method according to claim 6, characterized in that The method further comprises: The second negotiation information carrying the gateway public key configured by itself is sent to the user terminal, so that the user terminal determines the user shared key corresponding to the user terminal based on the gateway public key and the user private key configured by itself.

8. The method according to claim 7, characterized in that Before encrypting the communication data to be transmitted based on the gateway shared key, the method further includes: Receiving a first digital signature encrypted and sent by the user terminal using the user shared key, and performing gateway-side verification on the received first digital signature using the certificate public key of the user terminal configured by itself; When the gateway end verifies the information, the gateway end sends the second digital signature encrypted with the gateway shared key to the user end, so that the user end performs a user end verification on the second digital signature; The user terminal verification result returned by the user terminal is received, and when the user terminal verification result is verification passed, an operation of encrypting the communication data to be transmitted based on the gateway shared key is triggered.

9. The method according to claim 8, characterized in that The first digital signature includes the private key of the client's certificate, the gateway public key, the gateway device ID address and the user public key.

10. The method according to claim 8, characterized in that The second digital signature includes the certificate private key configured by the gateway device itself, the user public key, the user terminal ID address and the gateway public key.

11. A device for end-to-end communication encryption, characterized in that: The device is applied to a user terminal in a communication system, wherein the communication system further includes a gateway device, and the device includes: A receiving unit, configured to receive first negotiation information sent by the gateway device, wherein the first negotiation information includes a gateway public key configured by the gateway device; A determination unit, configured to determine a user shared key corresponding to the user terminal based on the gateway public key and a user private key configured by the gateway; An encryption unit, used for encrypting the communication data to be transmitted based on the user shared key, and sending the encrypted communication data to the gateway device; The encrypting the communication data to be transmitted based on the user shared key includes: Based on the user shared key, encrypting the communication data to be transmitted by an associated data authentication encryption algorithm; The gateway device is a smart home system gateway device, which serves as the control center of the smart home system and is responsible for connecting various devices in the centralized home; The communication system also includes a cloud server. The communication system does not have a public IP. The user terminal first establishes an encrypted transmission path with the cloud server, and the home gateway also establishes an encrypted transmission path with the cloud server. Then the user terminal directly establishes an encrypted transmission path with the home gateway through the cloud bridge.

12. A device for end-to-end communication encryption, characterized in that: A gateway device applied to a communication system, wherein the communication system further includes a user terminal, and the device includes: A receiving unit, configured to receive first negotiation information sent by the user terminal, wherein the first negotiation information includes a user public key configured by the user terminal; A determination unit, which determines a gateway shared key corresponding to the gateway device based on the user public key and the gateway private key configured by the unit; An encryption unit, encrypting the communication data to be transmitted based on the gateway shared key, and sending the encrypted communication data to the user terminal; The encrypting the communication data to be transmitted based on the gateway shared key includes: Based on the gateway shared key, encrypting the communication data to be transmitted by an associated data authentication encryption algorithm; The gateway device is a smart home system gateway device, which serves as the control center of the smart home system and is responsible for connecting various devices in the centralized home; The communication system also includes a cloud server. The communication system does not have a public IP. The user terminal first establishes an encrypted transmission path with the cloud server, and the home gateway also establishes an encrypted transmission path with the cloud server. Then the user terminal directly establishes an encrypted transmission path with the home gateway through the cloud bridge.

13. A computer-readable storage medium, characterized in that: The computer readable storage medium The material stores an end-to-end communication encryption program, and when the end-to-end communication encryption program is executed by the processor, the steps in the end-to-end communication encryption method as described in any one of claims 1 to 5 are implemented, and / or the steps in the end-to-end communication encryption method as described in any one of claims 6 to 11 are implemented.

14. A terminal device, characterized in that: The terminal device includes a processor, a memory, and an end-to-end communication encryption program stored in the memory and executable on the processor. When the processor executes the end-to-end communication encryption program, it implements the steps in the end-to-end communication encryption method as described in any one of claims 1-5, and / or implements the steps in the end-to-end communication encryption method as described in any one of claims 6-11.