WO2022143157A1 - 一种密钥协商的方法及其相关设备 - Google Patents

一种密钥协商的方法及其相关设备 Download PDF

Info

Publication number
WO2022143157A1
WO2022143157A1 PCT/CN2021/137945 CN2021137945W WO2022143157A1 WO 2022143157 A1 WO2022143157 A1 WO 2022143157A1 CN 2021137945 W CN2021137945 W CN 2021137945W WO 2022143157 A1 WO2022143157 A1 WO 2022143157A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
information
central
public key
key information
Prior art date
Application number
PCT/CN2021/137945
Other languages
English (en)
French (fr)
Inventor
王德海
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21913898.9A priority Critical patent/EP4258627A4/en
Priority to US18/259,876 priority patent/US20240073006A1/en
Publication of WO2022143157A1 publication Critical patent/WO2022143157A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/045Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0471Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying encryption by an intermediary, e.g. receiving clear information at the intermediary and encrypting the received information at the intermediary before forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/061Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • H04L9/0841Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN

Definitions

  • the present application relates to the field of smart home equipment, and more particularly, to a method for key negotiation and related equipment.
  • HiChain related components can be integrated on sensitive devices.
  • HiChain related components can generate public and private key related information of the device, and can perform key negotiation with other devices to improve the security of information transmission.
  • HiChain related components have HiChain related components.
  • Sensitive devices have larger memory than non-sensitive devices. For non-sensitive devices, due to their relatively small memory, HiChain-related components are usually not integrated, so public and private key related information cannot be generated, and thus cannot be negotiated with other devices.
  • the terminal device needs to control the home device through the cloud.
  • the terminal device sends information to the sensitive device through the cloud, since the sensitive device can perform key negotiation with the opposite terminal device, the information sent by the terminal device to the sensitive device through the cloud can be encrypted.
  • the terminal device sends information to the non-sensitive device through the cloud, since the non-sensitive device itself does not have the capability of the key agreement terminal, the information sent by the terminal device to the sensitive device through the cloud cannot be encrypted.
  • the cloud can know the specific content of the information, and there is a risk of information leakage; and the information may be tampered with, which reduces security, cannot guarantee the accuracy of user control over non-sensitive devices, and affects user experience.
  • the present application provides a method for key negotiation and a related device.
  • the first central device can negotiate with the second electronic device to generate and share information.
  • the key is used to encrypt information, which improves the security of information transmission between the second electronic device and the first electronic device, ensures the accuracy of the user's control of the first electronic device, and improves the user experience.
  • a method for key negotiation includes: a first central device generates public key information of a first electronic device and private key information of the first electronic device, and the first electronic device passes the first electronic device through the first electronic device.
  • a hub device is connected to the network; the first hub device reports the first mode of the first electronic device to the cloud device, and the first mode is that the first electronic device supports key agreement capability and the first electronic device is the hub mode;
  • the first hub device obtains public key information of the second electronic device, the public key information is sent by the second electronic device based on the first mode of the first electronic device; the first hub device is based on the first mode of the first electronic device
  • the private key information and the public key information of the second electronic device perform key negotiation with the second electronic device to generate a first shared key.
  • the first electronic device cannot integrate HiChain related components, cannot generate public and private key related information by itself, and does not have the ability to negotiate secret keys, and the first electronic device is in the central mode.
  • the first central device replaces the first electronic device to generate public key information and private key information of the first electronic device.
  • key information and instead of the first electronic device, negotiate with the second electronic device to generate the first shared key. Since the cloud cannot know the shared key, it cannot know the information transmitted between the second electronic device and the first central device, and cannot tamper with the information, thereby improving the information (for example, the information between the second electronic device and the central device) control commands) transmission security.
  • STS negotiation can be performed between the second electronic device and the first central device based on the public key information and private key information of the first electronic device, and the public key information and private key information of the second electronic device, through encryption.
  • An algorithm (such as an elliptic curve algorithm, etc.) generates a first shared key, and uses the public key information of the other party for identity authentication. Further, the second electronic device and the first central device may store the first shared key respectively.
  • the first central device may be an electronic device capable of end-to-end key negotiation.
  • the first central device may be a routing device, such as a wireless switch for a wireless network, a WiFi wireless router, an optical network terminal, a WiFi wireless repeater or a CPE terminal, a portable terminal hotspot, and the like.
  • the first central device may be a device with a routing function, such as wireless routers, smart TVs, large-screen devices, smart air conditioners, mobile phones, tablet computers, notebooks, large-screen TVs, and smart homes. Single product, PDA, POS, vehicle computer, etc.
  • the first electronic device may include devices such as smart lights, smart sockets, and smart refrigerators in the home that are irrelevant or weakly related to the user's personal privacy.
  • the second electronic device used by the user may also be referred to as a control end device, and the control end device may be, for example, a mobile phone, a PDA, a notebook computer, a wearable electronic device, etc. used by the user.
  • the user controls the first electronic device in the home through the second electronic device.
  • a communication connection based on a communication protocol such as WIFI and Bluetooth may be established between the first electronic device and the first central device.
  • the hub mode can be understood as the first electronic device needs to communicate with a device in the external network (for example, a second electronic device) through the first hub device, and the device in the external network needs to send a message to the first electronic device.
  • the first central device forwards it to the first electronic device.
  • the first electronic device needs to send information to a device on the external network, it needs to first send the information to the first hub device, and then the first hub device forwards the information to the device on the external network.
  • the method further includes: the first central device sends the first shared key to the first electronic device.
  • the method further includes: the first central device receives the first information through the cloud device , the first information is encrypted by the second electronic device based on the first shared key; the first central device sends the first information to the first electronic device.
  • the information sent by the second electronic device to the first electronic device can be encrypted using the shared key on the second electronic device, and the encrypted information is transmitted to the central device through the cloud.
  • the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of information (such as control commands) transmission between the second electronic device and the central device, ensuring that The accuracy of the user's control of the first electronic device improves the user experience.
  • the first central device receives the first information encrypted by using the first shared key, it does not need to decrypt the first information, and directly sends the first information to the first electronic device, thereby reducing the reduction of the first central device.
  • the method further includes: the first central device receives first information through the cloud device, and the first information is performed by the second electronic device based on the first shared key If encrypted, the first central device decrypts the first information by using the first shared key to obtain second information; the first central device sends the second information to the first electronic device.
  • the first central device receives the first information encrypted with the first shared key, the first information is decrypted to obtain the second information, and the second information is sent to the first electronic device, thereby improving the efficiency of the process. the efficiency of information transmission.
  • the method before the first central device generates the public key information of the first electronic device and the private key information of the first electronic device, the method further includes: the first central device receiving Registration information sent by the first electronic device, where the registration information includes: a first identification code of the first electronic device and that the first electronic device does not have a key negotiation capability.
  • the registration information includes: a first identification code of the first electronic device and that the first electronic device does not have a key negotiation capability.
  • the fact that the first electronic device does not have the key negotiation capability indicates that the first electronic device cannot generate its own public key information and private key information, and does not have the end-to-end key negotiation capability.
  • the first identification code of the first electronic device may include a PIN code of the first electronic device.
  • the first electronic device may be connected to the first central device by means of authcode.
  • the registration information may further include the ID of the first electronic device and the like.
  • the obtaining, by the first central device, the public key information of the second electronic device includes: the first central device conducts a key with the second electronic device based on the first identification code Negotiate to generate a second shared key; the first central device receives the public key information of the second electronic device through the cloud device, and the public key information of the second electronic device is shared by the second electronic device based on the second The key is encrypted; the first central device uses the second shared key to decrypt the public key information of the second electronic device.
  • the public key information of the second electronic device is transmitted using the second shared key negotiated by the first central device and the second electronic device, which improves the security and efficiency of transmission of the public key information of the second electronic device .
  • the second electronic device and the first central device may perform SPEKE negotiation based on the PIN code of the first electronic device, generate a second shared key, and store the second shared key respectively.
  • the method further includes: the first central device sends the public key information of the first electronic device to the second electronic device through the cloud device, the public key information of the first electronic device The key information is encrypted by the first hub device based on the second shared key.
  • the public key information of the first electronic device is transmitted by using the second shared key negotiated by the first central device and the second electronic device, which improves the security and efficiency of the transmission of the public key information of the first electronic device .
  • the method before the first central device sends the public key information of the first electronic device to the second electronic device through the cloud device, the method further includes: the first central device according to the first registration information , it is determined that the first electronic device does not have the key agreement capability.
  • the method before the first central device generates the public key information of the first electronic device and the private key information of the first electronic device, the method further includes: the first central device receiving A central detection message sent by the first electronic device; the first central device sends a response message in response to the central detection message to the first electronic device, and the response message is used to make the first electronic device pass the The first central device is connected to the network.
  • the first hub device can send a hub detection message to the first electronic device, so that the first electronic device is connected to the first hub device, and then utilizes The first central device communicates with the second electronic device in the external network, which ensures the stability and efficiency of information transmission.
  • a method for key negotiation is provided.
  • the method is applied to a system for key negotiation.
  • the system includes: a first central device, a first electronic device, a second electronic device, and a cloud device.
  • the method It includes: the first electronic device is communicated and connected to the cloud device through the first central device; it is characterized in that: the first central device generates the public key information of the first electronic device and the private key information of the first electronic device, the The first electronic device is connected to the network through the first central device; the first central device reports the first mode of the first electronic device to the cloud device, and the first mode is that the first electronic device supports key negotiation capability and
  • the first electronic device is a hub mode; the second electronic device obtains the first mode of the first electronic device from the cloud device; the second electronic device is based on the first mode of the first electronic device, and sends the data to the cloud device through the cloud device.
  • the first central device sends the public key information of the second electronic device; the first central device obtains the public key information of the second electronic device; the first central device sends the first electronic device to the second electronic device through the cloud device
  • the public key information of the device; the second electronic device obtains the public key information of the first electronic device; the first hub device and the second electronic device are based on the public key information of the second electronic device and the public key information of the first electronic device.
  • key information perform key negotiation, and generate a first shared key, wherein the first electronic device cannot integrate HiChain related components, cannot generate public key and private key related information by itself, and does not have the capability of key negotiation.
  • the first central device replaces the first electronic device to generate public key information and private key information of the first electronic device , and instead of the first electronic device, negotiate with the second electronic device to generate the first shared key. Since the cloud cannot know the shared key, it cannot know the information previously transmitted between the second electronic device and the central device, and cannot tamper with the information, thereby improving the information (such as control commands) between the second electronic device and the central device. Transmission security.
  • STS negotiation can be performed between the second electronic device and the first central device based on the public key information and private key information of the first electronic device, and the public key information and private key information of the second electronic device, through encryption.
  • An algorithm (such as an elliptic curve algorithm, etc.) generates a first shared key, and uses the public key information of the other party for identity authentication. Further, the second electronic device and the first central device may store the first shared key respectively.
  • the first central device may be an electronic device capable of end-to-end key negotiation.
  • the first central device may be a routing device, such as a wireless switch for a wireless network, a WiFi wireless router, an optical network terminal, a WiFi wireless repeater or a CPE terminal, a portable terminal hotspot, and the like.
  • the first central device may be a device with a routing function, such as wireless routers, smart TVs, large-screen devices, smart air conditioners, mobile phones, tablet computers, notebooks, large-screen TVs, and smart homes. Single product, PDA, POS, vehicle computer, etc.
  • the first electronic device may include devices such as smart lights, smart sockets, and smart refrigerators in the home that are irrelevant or weakly related to the user's personal privacy.
  • the second electronic device used by the user may also be referred to as a control end device, and the control end device may be, for example, a mobile phone, a PDA, a notebook computer, a wearable electronic device, etc. used by the user.
  • the user controls the first electronic device in the home through the second electronic device.
  • the method further includes: the second electronic device sends first information to the first central device through the cloud device, where the first information is generated by the second electronic device based on the The first shared key is encrypted; the cloud device forwards the first information to the first hub device based on the first mode; the first hub device decrypts the first information by using the first shared key to obtain the second information; the first central device sends the second information to the first electronic device.
  • the information sent by the second electronic device to the first electronic device can be encrypted using the shared key on the second electronic device, and the encrypted information is transmitted to the central device through the cloud.
  • the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of information (such as control commands) transmission between the second electronic device and the central device, ensuring that The accuracy of the user's control of the first electronic device improves the user experience.
  • the method further includes: the second electronic device sends first information to the first central device through the cloud device, where the first information is generated by the second electronic device based on the The first shared key is encrypted; the cloud device forwards the first information to the first hub device based on the first mode; the first hub device sends the first shared key to the first electronic device; The first central device sends the first information to the first electronic device.
  • the cloud since the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the information (such as control commands) between the second electronic device and the central device. The security of transmission, and the efficiency of information transmission is improved.
  • the method before the first central device generates the public key information of the electronic device and the private key information of the electronic device, the method further includes: the first electronic device reports to the first electronic device The central device sends first registration information, where the first registration information includes that the first electronic device does not have a key negotiation capability. Before the first central device sends the public key information of the first electronic device to the second electronic device through the cloud device, the method further includes: the first central device determines the first electronic device according to the first registration information Not capable of key negotiation.
  • the first mode further includes that the first electronic device accesses the network through the first hub device; the second electronic device sends the first hub device to the first hub device through the cloud device
  • the public key information of the second electronic device includes: the second electronic device sends the public key information of the second electronic device to the cloud device; the cloud device sends the public key information of the second electronic device based on the first mode forwarded to the first central device.
  • the method further includes: the first electronic device reports to the first electronic device
  • the central device sends second registration information, the second registration information also includes the first identification code of the first electronic device; the second electronic device obtains the first identification code; the second electronic device and the first central device are based on The first identification code performs key negotiation to generate a second shared key; the second electronic device sends the public key information of the second electronic device to the first central device through the cloud device, including: the second electronic device Send the public key information of the second electronic device to the first central device through the cloud device, where the public key information of the second electronic device is encrypted by the second shared key; the cloud device sends the second electronic device
  • the public key information of the second electronic device is forwarded to the first hub device; the first hub device decrypts the public key information of the second electronic device based on the second shared key to obtain the public key information of the second electronic device; the first hub device decrypts the
  • the first central device and the second electronic device may perform key negotiation, generate a second shared key, and use the second shared key to exchange the public key information of the second electronic device and the first electronic device's public key information.
  • the public key information improves the security and efficiency of public key information transmission.
  • the first identification code of the first electronic device may include a PIN code of the first electronic device.
  • the second electronic device and the first central device may perform SPEKE negotiation based on the PIN code of the first electronic device, generate a second shared key, and store the second shared key respectively.
  • the system further includes a second central device, and the first electronic device is heartbeat connected to the second central device: the method further includes: the first electronic device determines the first electronic device through the heartbeat connection The hub device is unavailable; the first electronic device is disconnected from the first hub device; the first electronic device sends a hub detection message to the second hub device; the second hub device sends a response to the first device and a second response message in the central detection message, where the second response message is used to enable the first electronic device to access the network through the second central device.
  • the link between the first hub device and the first electronic device is disconnected
  • the first electronic device will be re-connected or registered to the second hub device, and the control commands for the first electronic device transmitted between the second hub device and the second electronic device through the cloud are replaced by the first hub device.
  • the shared key negotiated by an electronic device is used for encryption, or the shared key negotiated by the second central device and the second electronic device is used for encryption. Since the cloud cannot know the shared key, it cannot know the control command, and cannot tamper with the control command, thereby improving the security of the transmission of the control command. In addition, the reliability of the control command transmission is guaranteed, and the efficiency of the control command transmission is improved.
  • the unavailability of the first central device includes: the first central device is powered off, moved away, fails, the link between the first central device and the cloud is disconnected, or the connection between the first central device and the first electronic device is disconnected. The link is disconnected, etc.
  • the system further includes a third electronic device
  • the third electronic device is communicatively connected to the second electrical device
  • the method further includes: the third electronic device generates the third electronic device The public key information of the device and the private key information of the third electronic device; the second electronic device sends the public key information of the first electronic device to the third electronic device; the third electronic device sends the second electronic device the The public key information of the third electronic device; the second electronic device uploads the public key information of the third electronic device to the cloud device; the first central device obtains the public key information of the third electronic device from the cloud device.
  • the first central device and the third electronic device perform key negotiation according to the public key information of the third electronic device and the public key information of the first electronic device to generate a third shared key.
  • the second electronic device (main control end device) and the third electronic device (slave control end device) correspond to different accounts respectively, the public key information corresponding to the second electronic device and the third electronic device are different, and the corresponding private key information Also different.
  • the third electronic device and the first hub device can perform end-to-end key negotiation to generate a third public key Secret key. After the user switches the electronic device, the accuracy of the user's control of the first electronic device is also ensured, and the user experience is improved.
  • the method further includes: the third electronic device sends third information to the first central device through the cloud device, where the third information is generated by the third electronic device based on the The third shared key is encrypted; the cloud device forwards the third information to the first hub device based on the first mode; the first hub device uses the third shared key to decrypt the third information , and obtain fourth information; the first central device sends the fourth information to the first electronic device.
  • the third electronic device when the third electronic device sends information to the first electronic device, the third electronic device can use the third shared key for encryption, and the encrypted information is transmitted to the first central device through the cloud.
  • the security of information transmission is improved. After the user switches the electronic device, the accuracy of the user's control of the first electronic device is ensured, and the user experience is improved.
  • the method further includes: the second electronic device and the third electronic device perform key negotiation to generate a fourth shared key; the second electronic device communicates with the third electronic device
  • Sending the public key information of the first electronic device includes: the second electronic device sending the public key information of the first electronic device to the third electronic device, where the public key information of the first electronic device is shared by the fourth electronic device The key is encrypted; the third electronic device decrypts the public key information of the first electronic device based on the fourth shared key, and obtains the public key information of the first electronic device.
  • the third electronic device sending the public key information of the third electronic device to the second electronic device includes: the third electronic device sending the public key information of the third electronic device to the second electronic device, and the third electronic device sends the public key information of the third electronic device to the second electronic device.
  • the public key information of the device is encrypted by the fourth shared key; the second electronic device decrypts the public key information of the third electronic device based on the fourth shared key to obtain the public key information of the third electronic device.
  • the public key information of the first electronic device and the public key information of the third electronic device are exchanged using the fourth shared key negotiated by the second electronic device and the third electronic device, which improves the transmission efficiency of public key information. Safety and efficiency.
  • the method further includes a fourth electronic device, the fourth electronic device is communicatively connected to the second electrical device, and the method further includes: the second electronic device sends a message to the fourth electronic device
  • the device sends the private key information of the second electronic device and the public key information of the second electronic device;
  • the second electronic device uploads the public key information of the first electronic device to the cloud device;
  • the cloud device obtains the public key information of the first electronic device;
  • the first central device and the fourth electronic device perform key negotiation according to the public key information of the second electronic device and the public key information of the first electronic device, and generate Fifth shared key.
  • the second electronic device (main control terminal device) and the fourth electronic device (slave control terminal device) correspond to the same account
  • the public key information corresponding to the second electronic device and the fourth electronic device are the same
  • the corresponding private key is also the same.
  • the third electronic device and the first hub device can perform end-to-end key negotiation to generate the fifth shared secret key. After the user switches the electronic device, the accuracy of the user's control of the first electronic device is also ensured, and the user experience is improved.
  • the method further includes: the fourth electronic device sends fifth information to the first central device through the cloud device, where the fifth information is generated by the fourth electronic device based on the The fifth shared key is encrypted; the cloud device forwards the fifth information to the first hub device based on the first mode; the first hub device uses the fifth shared key to decrypt the fifth information , and obtain sixth information; the first central device sends the sixth information to the first electronic device.
  • the fourth electronic device when the fourth electronic device sends information to the first electronic device, the fourth electronic device can use the fifth shared key for encryption, and the encrypted information is transmitted to the first central device through the cloud.
  • the security of information transmission is improved. After the user switches the electronic device, the accuracy of the user's control of the first electronic device is ensured, and the user experience is improved.
  • the second electronic device may send private key information and public key information corresponding to the account of the second electronic device to the fourth electronic device by means of a trust ring.
  • a communication apparatus including a unit for performing each step in the above first aspect or any possible implementation manner of the first aspect.
  • a communication device comprising at least one processor and a memory, the processor and the memory being coupled, the memory storing program instructions that are executed when the program instructions stored in the memory are executed by the processor A method in a possible implementation manner of the above first aspect or any one of the first aspects.
  • a communication device in a fifth aspect, includes at least one processor and an interface circuit, where the at least one processor is configured to execute the method in the first aspect or any of the possible implementations of the first aspect .
  • a hub device in a sixth aspect, includes any of the communication devices provided in the third aspect, the fourth aspect, or the fifth aspect.
  • a computer program product in a seventh aspect, includes a computer program, and when executed by a processor, the computer program is used to execute the method in the first aspect or any possible implementation manner of the first aspect , or used to execute the method in the second aspect or any possible implementation manner of the second aspect.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, and when the computer program is executed, is used to execute the first aspect or any possible implementation of the first aspect The method in the mode, or the method in any possible implementation mode for performing the second aspect or the third aspect.
  • a chip in a ninth aspect, includes: a processor for calling and running a computer program from a memory, so that a communication device installed with the chip executes the first aspect or any possible implementation of the first aspect The method in the mode, or the method in the second aspect or any possible implementation mode of the second aspect is performed.
  • the central device replaces the first electronic device to negotiate with the second electronic device, and replaces the first electronic device to negotiate with the second electronic device.
  • An electronic device generates a shared key
  • the information sent by the second electronic device to the first electronic device can be encrypted using the shared key on the second electronic device, and the encrypted information is transmitted to the central device through the cloud. Since the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of information (such as control commands) transmission between the second electronic device and the central device, ensuring that The accuracy of the user's control of the first electronic device improves the user experience.
  • FIG. 1 is a schematic scene diagram of an example of a user controlling a fifth electronic device and a first electronic device at home through a central device.
  • FIG. 2 is a schematic flowchart of a method for a user to control a fifth electronic device through a second electronic device in the prior art.
  • FIG. 3 is a schematic flowchart of a method for a user to control a first electronic device through a second electronic device in the prior art.
  • FIG. 4 is a schematic diagram of an example of a communication system provided by the present application and applicable to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of an example of a method for key negotiation provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an example of a process of generating a second shared key through SPEKE negotiation between the second electronic device and the first central device through the PIN code of the first electronic device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an example of a process of generating a first shared key through end-to-end negotiation between a second electronic device and a first hub device according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another example of a communication system provided by the present application and applicable to an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of another example of a method for key negotiation provided by an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of another example of a method for key negotiation provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another example of a communication system applicable to an embodiment of the present application provided by an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of another example of a method for key negotiation provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of an example of a communication system applicable to the embodiment of the present application provided by the embodiment of the present application.
  • FIG. 14 is a schematic flowchart of an example of a method for key negotiation provided by an embodiment of the present application.
  • FIG. 15 is a schematic block diagram of an example of the structure of a hub device provided by an embodiment of the present application.
  • FIG. 16 is a schematic block diagram of an example of the structure of a communication device provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • GSM Global System of Mobile communication
  • CDMA Code Division Multiple Access
  • CDMA Wideband Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • GSM Global System of Mobile communication
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • GPRS General Packet Radio Service
  • LTE Long Term Evolution
  • FDD Frequency Division Duplex
  • TDD Time Division Duplex
  • UMTS Universal Mobile Telecommunication System
  • WiMAX Worldwide Interoperability for Microwave Access
  • 5G 5th Generation
  • 5G 5th Generation
  • New Radio New Radio
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • the hub reduces the risk of the home equipment in the home being exposed to the network.
  • the strong security protection capability makes the cloud unable to control the first device in the home device, and unable to perceive the specific operation of the user on the first device.
  • the central service is only deployed on specific devices in the home. These devices can be called central devices.
  • the central devices can be Huawei routers at home, Huawei large screens, Huawei artificial intelligence (artificial intelligence, AI) speakers, etc.
  • the central device may be an electronic device capable of end-to-end key negotiation.
  • the central device may be a routing device, such as a wireless switch used in a wireless network, a WiFi wireless router, an optical network terminal, a WiFi wireless repeater, or a customer premise equipment (CPE) ) terminal, portable terminal hotspot, etc.
  • the central device may be a device with a routing function, such as wireless routers, smart TVs, large-screen devices, smart air conditioners, mobile phones, tablet computers, notebooks, large-screen TVs, and smart home items , personal digital assistant (personal digital assistant, PDA), point of sales (point of sales, POS), car computer, etc.
  • PDA personal digital assistant
  • PDA point of sales
  • POS point of sales
  • car computer etc.
  • hub devices there may be multiple hub devices.
  • one of them is the main hub device, and the others are backup hub devices.
  • a backup central device can work normally instead of the main central device.
  • household devices in a family may include sensitive devices and non-sensitive devices.
  • Sensitive devices can integrate HiChain related components, and can generate public and private key related information of the sensitive device by themselves, and its memory is larger than that of non-sensitive devices.
  • Non-sensitive devices have relatively small memory and cannot integrate HiChain related components, so they cannot generate public and private key related information by themselves.
  • sensitive devices may include home cameras, cordless phones, personal digital assistants (PDAs), notebook computers, printers, and other devices related to users' personal privacy.
  • the non-sensitive devices may include devices such as smart lights, smart sockets, and smart refrigerators in the home that are irrelevant or weakly related to the user's personal privacy, which is not limited in this embodiment of the present application.
  • users control sensitive devices at home through a central device.
  • the user sends a control command to the sensitive device through the electronic device used, the control command is sent to the central device through the cloud (for example, a smart home cloud), and the central device then forwards the control command (or also called control information) to the sensitive device. , so as to realize the user's control of sensitive equipment.
  • the user's control commands for sensitive devices through the central device are based on end-to-end authentication and encryption. That is to say, the control command is encrypted based on the electronic device used by the user (for example, the application (application, APP) of the mobile phone used by the user) and the sensitive device.
  • the cloud just forwards the control command and cannot perceive the control.
  • the specific content of the command can effectively prevent the control command from being tampered with, avoid information leakage and counterfeiting caused by the control command being exposed to the cloud, and the operator of the cloud service can prove his negligence and increase security.
  • the electronic device used by the user may be a device that communicates with a cloud device.
  • the electronic device may be a mobile phone, a PDA, a notebook computer, a wearable electronic device, etc. used by the user.
  • the user can use the electronic device to control the sensitive device and the non-sensitive device, that is, use the electronic device to send information to the non-sensitive device and the sensitive device through the cloud and the central device.
  • the non-sensitive device is referred to as the first electronic device
  • the electronic device used by the user is referred to as the second electronic device
  • the sensitive device is referred to as the fifth electronic device for description.
  • the second electronic device used by the user may also be referred to as a control end device
  • the control end device may be, for example, a mobile phone, a PDA, a notebook computer, a wearable electronic device, etc. used by the user.
  • FIG. 1 is a schematic scene diagram of an example of a user controlling the fifth electronic device and the first electronic device in the home through a central device.
  • the hub device (referred to as hub device A for distinction) can manage multiple fifth electronic devices and multiple first electronic devices, and FIG. 1 shows one fifth electronic device and one first electronic device device scene.
  • the user's control command for the fifth electronic device is transmitted to the central device A through the communication link between the second electronic device (such as a mobile phone) used by the user and the central device A, and then sent to the fifth electronic device through the central device A , so that the user can control the fifth electronic device.
  • the communication link between the second electronic device used by the user and the central device A may be a cloud transmission link established based on a cellular network protocol, such as a communication link established based on 5G or 4G communication technology.
  • FIG. 2 is a schematic flowchart of a method 100 for a user to use a second electronic device to control a fifth electronic device in the scenario shown in FIG. 1 .
  • the fifth electronic device (eg, fifth electronic device 1 ) in the user's home first registers with the central device A, and establishes a communication connection with the central device A.
  • a communication connection based on a communication protocol such as wireless-fidelity (WIFI) and Bluetooth may be established between the fifth electronic device and the central device A.
  • WIFI wireless-fidelity
  • the fifth electronic device will also report to the central device A that it has a key negotiation capability, and the key negotiation capability can be understood as the fifth electronic device itself has the capability of generating public key information and private key information and End-to-end key negotiation capability.
  • the fifth electronic device in the user's home is registered or connected to the cloud device, for example, information such as its own identification, device ID and the like is reported to the cloud device.
  • the central device A sends registration information to the cloud device to register on the cloud device (in this embodiment of the present application, the cloud device may be referred to as a home cloud), and the registration information includes: the central device type identifier, the information of the fifth electronic device The logo and the mode of the fifth electronic device.
  • the mode of the fifth electronic device includes that the fifth electronic device is a hub mode and the fifth electronic device supports end-to-end key negotiation capability.
  • the hub device type identifier is used to indicate that the device is a hub device.
  • the hub mode can be understood as the fifth electronic device needs to communicate with the device in the external network through the hub device A, and the device in the external network (for example, the second electronic device) needs to communicate with the fifth electronic device When sending information, it needs to be sent to the central device A first, and then the central device A forwards it to the fifth electronic device.
  • the fifth electronic device needs to send information to the devices in the external network, it needs to send the information to the central device A first, and then the central device A forwards the information to the devices in the external network.
  • the central device A Since in S101, the central device A has already learned that the fifth electronic device has the key negotiation capability, the central device A can determine that it does not need to perform the key negotiation process instead of the first electronic device, that is, the central device A only needs to perform the key negotiation process. information transfer process.
  • the second electronic device acquires information of the fifth electronic device from the cloud device and the fifth electronic device supports end-to-end key negotiation capability.
  • the information of the fifth electronic device includes that the fifth electronic device is in the hub mode.
  • the fifth electronic device generates public key and private key information of the fifth electronic device by itself.
  • the second electronic device generates public key and private key information of the second electronic device by itself.
  • the second electronic device acquires the personal identification number (personal identification number, PIN) code of the fifth electronic device input by the user on the APP of the second electronic device.
  • PIN personal identification number
  • the second electronic device and the fifth electronic device perform a simple password exponential key exchange (simple password exponential key exchange, SPEKE) negotiation based on the PIN code of the fifth electronic device to generate a shared key A.
  • SPEKE simple password exponential key exchange
  • the second electronic device performs public key exchange using the generated shared key A. After determining that the fifth electronic device is in the hub mode, the second electronic device will perform the operation of adding the fifth electronic device to the device security protection list, and request to exchange public keys with the fifth electronic device. The second electronic device encrypts its own public key information with the shared key A to obtain a public key exchange message, and the public key exchange message carries the identifier of the fifth electronic device.
  • the second electronic device first sends the public key exchange message to the cloud device, the cloud device then forwards the public key exchange message to the central device A, and the central device A forwards the public key exchange message to the fifth electronic device, After the fifth electronic device receives the public key exchange message, it uses the shared key A to decrypt, and determines that the device identification carried in the message is the identification of the fifth electronic device, and the fifth electronic device obtains the information of the second electronic device. public key information.
  • the fifth electronic device may also store public key information of the second electronic device based on the account of the second electronic device.
  • the fifth electronic device after acquiring the public key information of the second electronic device, the fifth electronic device encrypts the public key information of the fifth electronic device with the shared key A to obtain a public key exchange message, and the fifth electronic device encrypts the public key information of the fifth electronic device with the shared key A to obtain a public key exchange message.
  • the public key exchange message is sent to the central device A, the central device A forwards the public key exchange message to the cloud device, the cloud device then forwards the public key exchange message to the second electronic device, and the second electronic device receives the message.
  • the public key information of the fifth electronic device can be obtained, that is, the public key exchange process is completed.
  • the second electronic device may also store public key information of the fifth electronic device based on the identification of the fifth electronic device.
  • an end-to-end station, STS) negotiation based on the public key information and private key information of the fifth electronic device, and the public key information and private key information of the second electronic device, an end-to-end station, STS) negotiation, generate a shared key B through an encryption algorithm (such as an elliptic curve algorithm, etc.), and further, use the exchanged public key information for identity authentication.
  • an end-to-end station, STS an end-to-end station, STS negotiation, generate a shared key B through an encryption algorithm (such as an elliptic curve algorithm, etc.), and further, use the exchanged public key information for identity authentication.
  • the second electronic device sends the control command encrypted by the shared key B to the fifth electronic device through the cloud device and the central device A.
  • the user's control command to the fifth electronic device is encrypted on the second electronic device by using the shared key B, and the encrypted control command is transmitted to the central device A through the forwarding of the cloud device. Since the cloud cannot know the key, it cannot perceive the specific content of the control command.
  • the central device A then forwards the encrypted control command to the fifth electronic device, and the fifth electronic device uses the shared key B to decrypt the control command.
  • the user can control the fifth electronic device at home through the central device A.
  • S111 can be understood as a process in which the second electronic device and the fifth electronic device conduct end-to-end STS negotiation based on the exchanged public key information, and generate a shared key B through an encryption algorithm.
  • the specific process can refer to the following figure The specific process shown in FIG. 7 will not be repeated here.
  • the first electronic device due to its relatively small memory, it cannot integrate HiChain related components, such as identity authentication components and end-to-end encryption negotiation capabilities.
  • HiChain related components such as identity authentication components and end-to-end encryption negotiation capabilities.
  • the ability of the electronic device (such as the mobile phone used by the user) to perform end-to-end key negotiation, the user's control command for the first electronic device is sent to the central device A through the cloud, and the central device A then forwards the control command to the first electronic device. equipment.
  • FIG. 3 shows a schematic diagram of a method 200 for the second electronic device to control the first electronic device in the scenario shown in FIG. 1 .
  • Figure 3 shows a schematic diagram of a method 200 for the second electronic device to control the first electronic device in the scenario shown in FIG. 1 .
  • the first electronic device in the user's home first accesses or registers with the central device A, and establishes a communication connection with the central device A. For example, a communication connection based on communication protocols such as WIFI and Bluetooth may be established between the first electronic device and the central device A.
  • the first electronic device may also report information such as its own identification, device ID, and the like to the central device A.
  • the first electronic device in the user's home is registered or connected to the cloud device, for example, information such as its own identification, device ID and the like is reported to the cloud device.
  • the hub device A sends registration information to the cloud device to register on the cloud device, where the registration information includes: the hub device type identifier, the identifier of the first electronic device, and the mode of the first electronic device.
  • the mode of the first electronic device includes that the first electronic device is a hub mode.
  • the hub mode can be understood as the first electronic device needs to communicate with a device in the external network (for example, a second electronic device) through the hub device A, and the device in the external network needs to communicate with the first electronic device.
  • the hub mode can be understood as the first electronic device needs to communicate with a device in the external network (for example, a second electronic device) through the hub device A, and the device in the external network needs to communicate with the first electronic device.
  • the central device A forwards it to the first electronic device.
  • the first electronic device needs to send information to a device on the external network, it needs to first send the information to the central device A, and then the central device A forwards the information to the device on the external network.
  • the second electronic device acquires the information of the first electronic device from the cloud device and the first electronic device is in the hub mode.
  • the information of the non-sensitive device may include information such as an identifier of the first electronic device, a device ID, and the like.
  • the second electronic device sends a control command to the first electronic device through the cloud device and the central device A.
  • the second electronic device forwards the control command to the central device A through the cloud, and the central device A then forwards the control command to the first electronic device, thereby realizing the user's control command through the central device.
  • Device A controls the first electronic device in the home.
  • the control command is not encrypted end-to-end, the cloud can perceive the specific control command, and the leakage and counterfeiting of information (such as control commands) cannot be avoided.
  • the cloud can learn the control command and may tamper with it. This control command reduces security and risks leaking user privacy. Furthermore, the accuracy of the user's control of the first electronic device cannot be guaranteed, which affects the user experience.
  • the present application provides a method for key negotiation, in the process that the first electronic device communicates with the second electronic device through the central device, the central device replaces the first electronic device and negotiates with the second electronic device, And instead of the first electronic device to generate a shared key, the information sent by the second electronic device to the first electronic device can be encrypted on the second electronic device using the shared key, and the encrypted information is transmitted to the central device through the cloud . Since the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of information (such as control commands) transmission between the second electronic device and the central device, ensuring that The accuracy of the user's control of the first electronic device improves the user experience.
  • the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of information (such as control commands) transmission between the second electronic device and the central device, ensuring that The accuracy of the user's control of the first electronic device improves the user experience
  • FIG. 4 is a schematic structural diagram of an example of a wireless communication system applicable to an embodiment of the present application.
  • the central device can manage multiple first electronic devices, and FIG. 4 shows a scenario of a first electronic device (non-sensitive device) and a fifth electronic device (sensitive device).
  • the user's control command for the first electronic device is transmitted to the central device through the communication link between the second electronic device (such as a smart phone) used by the user and the central device (for distinction, called the first central device), and then passes The first central device is sent to the first electronic device, so that the user can control the first electronic device.
  • the communication link between the second electronic device and the first central device may be a cloud transmission link established based on a cellular network protocol.
  • a communication connection based on communication protocols such as WIFI and Bluetooth can be established between the fifth electronic device and the first central device.
  • the number of the central device and the number of the first electronic device are not limited.
  • there may also be multiple central devices and more first electronic devices and further, in the scenario shown in FIG. 4 , there may also be multiple fifth electronic devices. This is not limited in the embodiments of the present application.
  • HiChain related components can also be replaced by other components or referred to as other names, as long as the components can complete key generation, key negotiation, encryption and decryption processing, etc., the embodiments of the present application There is no restriction here.
  • the related components of HiChain will be taken as an example for description.
  • FIG. 5 is a schematic flowchart of the method 300 for key negotiation provided by the present application in the architecture shown in FIG. 4 . As shown in FIG. 5 , the method 300 includes: S301 to S312.
  • a second electronic device for example, an APP on a mobile phone
  • public key information represented by cpk1
  • private key information represented by cpk2
  • the public key information and the private key information correspond to the account number of the second electronic device.
  • the first electronic device accesses or registers with the first central device.
  • the first electronic device may be connected to the first central device by means of authcode.
  • authcode can be understood as a function that uses XOR operation to encrypt and decrypt, and the function of authcode is to provide encryption protection for the transmitted data.
  • the encrypted data is decrypted in reverse using authcode to restore the data.
  • the information transmitted between the first electronic device and the first central device can be encrypted using the authcode function.
  • a communication connection based on communication protocols such as WIFI and Bluetooth may be established between the first electronic device and the first central device.
  • the first electronic device may also send information such as its own personal identification number (PIN), device ID, and the like to the first central device. Moreover, in S302, the first electronic device may also report to the first central device that it does not have the key agreement capability.
  • PIN personal identification number
  • the fact that the first electronic device does not have the key negotiation capability means that the first electronic device cannot generate its own public key information and private key information, and does not have the end-to-end key negotiation capability.
  • the first identification code of the first electronic device includes a PIN code of the first electronic device.
  • the first electronic device accesses or registers with the cloud device, for example, for example, reports or registers its own identity, device attributes and other information to the cloud device.
  • the first central device can determine to perform the key negotiation process instead of the first electronic device, and the key negotiation process needs to use the public key information and private key information of the first electronic device. Therefore, the first central device Public key information (represented by csk1 ) and private key information (represented by csk2 ) of the first electronic device may be generated instead of the first electronic device.
  • the first central device can generate public key information and private key information by itself, and then associate the public key information and private key information with the device ID of the first electronic device and the device ID of the first electronic device.
  • the public key information and private key information are the public key information and private key information of the first electronic device generated by the first central device.
  • the first central device sends registration information to the cloud device to register on the cloud device (in this embodiment of the present application, the cloud device may also be referred to as a home cloud), and the registration information includes: the central device type identifier, the first electronic device The identity of the device and the mode of the first electronic device.
  • the mode of the first electronic device includes that the first electronic device is a hub mode and that the first electronic device supports key negotiation capability.
  • the hub device type identifier is used to indicate that the device is a hub device.
  • the hub mode can be understood as the first electronic device needs to communicate with a device in the external network (for example, a second electronic device) through the first hub device, and the device in the external network needs to communicate with the first electronic device When sending information, it needs to be sent to the first central device first, and then the first central device forwards it to the first electronic device.
  • the first electronic device needs to send information to a device on the external network, it needs to first send the information to the first hub device, and then the first hub device forwards the information to the device on the external network.
  • step S303 may be replaced by S305, that is, S303 is an optional step.
  • the second electronic device acquires the information of the first electronic device from the cloud device and the first electronic device supports the end-to-end key negotiation capability.
  • the information of the first electronic device includes that the first electronic device is in the hub mode.
  • the second electronic device obtains the PIN code of the first electronic device input by the user on the APP of the second electronic device.
  • the second electronic device and the first central device perform SPEKE negotiation based on the PIN code of the first electronic device, generate a second shared key, and store the second shared key respectively.
  • SPEKE negotiation based on the PIN code of the first electronic device
  • the process of generating the second shared key through SPEKE negotiation between the second electronic device and the first central device through the PIN code of the first electronic device reference may be made to the specific process shown in FIG. 6 in the following figure, which will not be repeated here.
  • the second electronic device sends the public key information of the second electronic device encrypted by the second shared key to the first central device through the cloud device. For example, after determining that the first electronic device is in the hub mode, the second electronic device will perform an operation of adding the first electronic device to the device security protection list, and request to exchange public keys with the first electronic device. The second electronic device encrypts its own public key information with the second shared key to obtain a public key exchange message, where the public key exchange message carries the identifier of the first electronic device. The second electronic device first sends the public key exchange message to the cloud device, and the cloud device then forwards the public key exchange message to the first central device.
  • the first central device After receiving the public key exchange message, the first central device uses the second shared key to decrypt it, determines that the device identifier carried in the message is the identifier of the first electronic device, and then performs the public key information exchange instead of the first electronic device. exchange. In this way, the first central device obtains the public key information of the second electronic device.
  • the first electronic device may also store public key information of the second electronic device based on the account of the second electronic device.
  • the first central device sends the public key information of the first electronic device encrypted by the second shared key to the second electronic device through the cloud device. For example, after acquiring the public key information of the second electronic device, the first central device encrypts the public key information of the first electronic device with the second shared key to obtain a public key exchange message, and the first central device encrypts the public key information of the first electronic device with the second shared key.
  • the public key exchange message is first sent to the cloud device, and the cloud device forwards the public key exchange message to the second electronic device. After the second electronic device receives the public key exchange message, it can obtain the first electronic device.
  • the public key information is completed, that is, the public key exchange process is completed.
  • STS negotiation is performed between the second electronic device and the first central device, and an encryption algorithm is used to perform STS negotiation. (eg elliptic curve algorithm, etc.) to generate a first shared key, and use the exchanged public key information to perform identity authentication. Further, the second electronic device and the first central device may store the first shared key respectively.
  • an encryption algorithm eg elliptic curve algorithm, etc.
  • the process of S311 is a process in which the second electronic device and the first central device perform STS negotiation, and use an encryption algorithm to generate the first shared key. That is, the second electronic device and the first central device maintain the same first shared key.
  • the second electronic device and the first central device complete the end-to-end password negotiation process.
  • FIG. 7 For the specific process, reference may be made to the specific process shown in FIG. 7 in the following figure, which will not be repeated here.
  • the first central device may also encrypt and send the first shared key to the first electronic device through the authcode function. It should be understood that S312 is an optional step.
  • the second electronic device sends the information encrypted by the first shared key to the first electronic device through the cloud device and the first central device.
  • the information may include a control command of the second electronic device to the first electronic device.
  • the information is encrypted on the second electronic device using the first shared key, and the encrypted message is transmitted to the cloud device, and the cloud device The encrypted information is forwarded to the first central device. Since the cloud cannot know the shared key, it cannot know the specific content of the information, and cannot tamper with the information, thereby improving the security of the information, ensuring the accuracy of the user's control of the first electronic device, and improving the user experience.
  • the information to be sent by the user is encrypted on the second electronic device using the first shared key, and the encrypted information is transmitted to the cloud device, and the cloud device
  • the first central device can decrypt the control information by using the first shared key, and encrypt the decrypted information by using the authcode function and send it to the first electronic device.
  • the first electronic device decrypts the encrypted information by using the authcode function, so as to obtain the specific content of the information, and perform corresponding operations according to the specific content of the information.
  • the first central device can decrypt the information by using the first shared key, and encrypt the decrypted information by using the authcode function and send it to the first electronic device.
  • the first central device may not decrypt the information, but send the information encrypted by the first shared key to the first electronic device after being encrypted by the authcode function.
  • the first electronic device decrypts the information by using the authcode function and the first shared key, so as to obtain the specific content of the information, and perform corresponding operations according to the specific content of the information.
  • the first electronic device can directly communicate with the second electronic device through the cloud device by using the first shared key.
  • the information that the user needs to send is encrypted on the second electronic device using the first shared key, and the encrypted information is transmitted to the cloud device, and the cloud device will use the first shared key to encrypt the information.
  • the encrypted information is forwarded to the first electronic device, and after receiving the encrypted information, the first electronic device decrypts the information using the first shared key, thereby obtaining the specific content of the information, according to the specific content of the information Take the appropriate action.
  • the reliability of information transmission is guaranteed and the efficiency of information transmission is improved.
  • the central device may be replaced by the first central device, which is not repeated here for brevity.
  • S308 specifically includes: S3081 to S3088.
  • the second electronic device sends a SPEKE negotiation request message to the first central device through the cloud device.
  • the first central device generates a random number salt value 1 (represented by salt1) according to the SPEKE negotiation request message.
  • the first central device sends the salt1 to the second electronic device through the cloud device.
  • the second electronic device generates the second public key (represented by pk2) and the second private key (represented by sk2) of SPEKE on the side of the second electronic device according to the PIN code represented by salt1 and the first electronic device, and generates
  • the random challenge value is 2 (represented by challenge2).
  • the second electronic device sends a SPEKE negotiation request response message to the first central device through the cloud device, where the SPEKE negotiation request response message carries pk2 and challenge2.
  • the first central device generates the first SPEKE public key (represented by pk1) and the first SPEKE private key (sk1) on the side of the first central device according to salt1 and the PIN code of the first electronic device, and generates the first SPEKE private key (sk1) according to pk2 and sk1 Shared secret 1 (SharedSecret1), shared secret 1 (SharedSecret1) plus salt1 to derive session key 1 (SessionKey1) and session key 2 (SessionKey2); the first hub device generates a random challenge value 1 (represented by challenge1) ).
  • SessionKey2 and two challenge values (challenge1 and challenge2), generate the credentials of the first hub device: hash-based message authentication code (HMAC1), and finally generate the second shared secret according to SessionKey1, SessionKey2 and salt1 key.
  • HMAC1 hash-based message authentication code
  • the second shared key may be a data encryption key (DataEncKey).
  • the first central device sends a SPEKE negotiation message to the second electronic device through the cloud device.
  • the message includes: pk1, HMAC1.
  • the second electronic device generates a shared secret 2 (SharedSecret2) according to pk1 and sk2, uses the shared secret 2 and salt1 to derive a session key 3 (SessionKey3) and a session key 4 (SessionKey4), and uses SessionKey3 and SessionKey4 to verify HMAC1, after passing the verification, generates a second shared key according to session key 3 (SessionKey3), session key 4 (SessionKey4) and salt1.
  • a shared secret 2 SharedSecret2
  • SessionKey3 and SessionKey4 uses SessionKey3 and SessionKey4 to verify HMAC1, after passing the verification, generates a second shared key according to session key 3 (SessionKey3), session key 4 (SessionKey4) and salt1.
  • the process of generating the first shared key through SPEKE negotiation between the second electronic device and the fifth electronic device through the PIN code of the fifth electronic device is similar to the process shown in FIG. 6, and the difference lies in S108 In the middle, SPEKE negotiation is performed between the second electronic device and the fifth electronic device, and SPEKE negotiation is performed based on the PIN code of the fifth electronic device.
  • the process shown in FIG. 6 is that SPEKE negotiation is performed between the second electronic device and the first central device, and the SPEKE negotiation is performed based on the PIN code of the first electronic device.
  • the process of generating the first shared key through SPEKE negotiation between the second electronic device and the fifth electronic device through the PIN code of the fifth electronic device may refer to the specific flow description shown in FIG. 6 , and details are not repeated here.
  • the specific process 400 included in S311 includes: S401 to S407.
  • the first central device generates a random number salt value (represented by salt); based on the private key information (csk2) of the first electronic device and the public key information (cpk1) of the second electronic device, a shared key 3 (represented by SharedKey3) is generated ), generate session key 3 (represented by SessionKey3) based on salt and SharedKey3, use the long-term identity of the first hub device (represented by lsk1) to sign the device identity and session information, obtain signature 1 (represented by sign1), and use SessionKey3 encrypts sign1 to obtain authentication data 1 (represented by authData1).
  • the first central device sends an STS negotiation message to the second electronic device through the cloud device, and the message carries: salt, authData1.
  • the second electronic device generates a shared key 4 (represented by SharedKey4) based on the private key information (represented by csk1) of the second electronic device and the public key information (represented by cpk2) of the first electronic device, based on SharedKey4 and Salt derives session key 4 (represented by SessionKey4), decrypts authData1 and verifies sign1, uses the long-term identity of the second electronic device (represented by lsk2) to sign the identity and session information, obtains signature 2 (represented by sign2), and uses the session The key 4 encrypts sign2, and challenge3 is used as the information at the time of encryption to obtain authentication data 2 (represented by authData2).
  • the second electronic device sends an STS negotiation and verification request to the first central device through the cloud device, and the request carries authData2.
  • the first hub device decrypts authData2 and verifies sign2, generates a session ID, and generates a first shared key (DataEncKey) based on session key 3 and salt.
  • the first central device stores the session ID, the first shared key, and the universally unique identifier (UUID) of the first central device.
  • the first central device returns an STS negotiation authentication result (authRet) to the second electronic device through the cloud device, carrying the session ID and session key 3.
  • the second electronic device decrypts the negotiated authentication result and verifies the error code, decrypts to obtain a session ID, and generates a first shared key (DataEncKey) based on session key 3 and salt; the second electronic device saves the session ID corresponding to the device ID and the first shared key.
  • DataEncKey a first shared key
  • the processes from S401 to S407 are processes in which the second electronic device and the first central device perform STS negotiation, and use an encryption algorithm to generate the first shared key. That is, the second electronic device and the first central device maintain the same first shared key.
  • the process for the second electronic device and the fifth electronic device to perform STS negotiation and negotiation to generate the second shared key is similar to the process shown in FIG. 7, the difference is that the second electronic device and the fifth electronic device in S111 are The STS negotiation between the fifth electronic devices is based on the public key information of the fifth electronic device.
  • the process shown in FIG. 7 is the STS negotiation between the second electronic device and the first central device, which is based on the public key information of the first electronic device, that is, the first central device replaces the first electronic device and the second electronic device. STS negotiation between them.
  • the process of generating the second shared key by the second electronic device and the fifth electronic device through STS negotiation can be described with reference to the specific flow shown in Fig. 7 , and details are not repeated here.
  • FIG. 8 is a schematic structural diagram of another example of a wireless communication system applicable to an embodiment of the present application.
  • the scenario shown in FIG. 8 includes one primary hub device (first hub device) and one backup hub device (second hub device).
  • the number of the backup central device and the number of the first electronic device are not limited.
  • FIG. 9 is a schematic flowchart of a method 500 for key negotiation provided by the present application in the architecture shown in FIG. 8 . As shown in FIG. 9 , the method 500 includes: S501 to 518 .
  • the first central device when the first central device is in an unavailable state (for example, the first central device is powered off, moved away, fails, the link between the first central device and the cloud is disconnected, or the first central device and the first electronic device are disconnected) The link between the devices is down, etc.).
  • the first electronic device will access or register with the second central device.
  • the first electronic device may be connected to the second central device by means of authcode.
  • the first electronic device may also send its own PIN code to the second central device.
  • the first electronic device may also report to the second central device that it does not have the key agreement capability.
  • the first electronic device may encrypt the first shared key with the authcode function and send it to the second central device.
  • the second hub device sends registration information to the cloud device to register with the cloud device, where the registration information includes: the hub device type identifier, the identifier of the first electronic device, and the mode of the first electronic device.
  • the mode of the first electronic device is the hub mode.
  • the mode of the first electronic device may further include that the first electronic device supports an end-to-end key negotiation capability.
  • the first electronic device supports end-to-end key negotiation because the first central device has reported the first electronic device to the cloud device before. Therefore, after the second electronic device determines the information of the first electronic device, it can be determined that the first electronic device supports the end-to-end key negotiation capability. Since the first shared key has been generated between the second electronic device and the first electronic device, after the second electronic device acquires the identifier of the first electronic device, it can determine the control command sent to the first electronic device The first shared key needs to be used for encryption.
  • the second electronic device sends the information encrypted by the first shared key to the first electronic device through the cloud device and the second central device.
  • the second electronic device when the user needs to send information to the first electronic device through the second electronic device, the second electronic device encrypts the information by using the first shared key, and transmits the encrypted information to the cloud device, and the cloud device sends the encrypted information to the cloud device.
  • the encrypted information is forwarded to the second central device.
  • the second central device can use the first shared key to decrypt the information, and encrypt the decrypted information with the authcode function and send it to the first electronic device.
  • the first electronic device uses the authcode function to encrypt the information. Decryption is performed to obtain the specific content of the information, and corresponding operations are performed according to the information.
  • the second central device may not decrypt the information, but send the information encrypted with the first shared key to the first electronic device after encrypting with the authcode function.
  • the first electronic device decrypts the information by using the authcode function and the first shared key, thereby obtaining the specific content of the information, and performing corresponding operations according to the information.
  • FIG. 10 in the architecture shown in FIG. 10 , in the architecture shown in FIG. 10 , in the architecture shown in FIG. 10 , in the architecture shown in FIG. A schematic flowchart of a method 600 for key negotiation. As shown in FIG. 10 , the method 600 includes: S601 to S615. It should be understood that the process shown in FIG. 10 may be performed after the process shown in FIG. 5 .
  • the first central device when the first central device is in an unavailable state (for example, the first central device is powered off, moved away, fails, the link between the first central device and the cloud is disconnected, or the first central device and the first electronic device are disconnected) The link between the devices is disconnected, etc.), the heartbeat between the second hub device and the first hub device is disconnected, and the second hub device becomes the active state.
  • the first central device since the first central device will periodically send a heartbeat message to the second central device, after receiving the heartbeat message, the second central device will periodically send a heartbeat response to the first central device message, after the first central device receives the heartbeat response message, it can determine that the second central device is in an available state.
  • the first central device does not receive the heartbeat response message within a period of time, it may be determined that the second central device is in an unavailable state. If the second central device does not receive the heartbeat message within a period of time, it may be determined that the first central device is in an unavailable state.
  • the heartbeat disconnection between the second central device and the first central device can be understood as: the first central device judges whether the second central device is a heartbeat response message sent by the second central device by judging whether the second central device is Available state; the second central device determines whether the first central device is in an available state by judging the heartbeat message sent by the first central device.
  • the first central device will periodically send a heartbeat message to the first electronic device. After receiving the heartbeat message, the first electronic device will periodically send a heartbeat response message to the first central device. After receiving the heartbeat response message, the central device can determine that the first electronic device is available. If the first electronic device does not receive the heartbeat message sent by the first central device within a period of time, the first electronic device may determine that the first central device is in an unavailable state. If the first central device does not receive the heartbeat response message sent by the first electronic device within a period of time, the first central device may determine that the first electronic device is in an unavailable state.
  • the first electronic device sends a hub detection packet to the second hub device.
  • the central detection message can be sent by broadcast or multicast.
  • the second central device after receiving the central detection message, the second central device sends a response message to the first electronic device, so that the first electronic device and the second central device are connected.
  • the first electronic device accesses or registers with the second central device, and sends its own PIN code to the second central device, and, in S605, the first electronic device It is also possible to report to the second central device that it does not have the key negotiation capability.
  • the second central device can determine that the negotiation process of the key should be performed instead of the first electronic device, and the negotiation process of the key needs to use the public key information and private key information of the first electronic device. Therefore, the second central device can Instead of the first electronic device, generate public key information and private key information of the first electronic device.
  • the second hub device sends registration information to the cloud device to register with the cloud device, where the registration information includes: a hub device type identifier, an identifier of the first electronic device, and a mode of the first electronic device.
  • the mode of the first electronic device includes that the first electronic device is a hub mode and the first electronic device supports end-to-end key negotiation capability.
  • S605 may not be performed, and instead the steps are S515 to S518 in the method 500.
  • the first electronic device can encrypt the already generated first shared key through the authcode function and then sent to the second central device, the second central device does not need to re-execute STS negotiation with the second electronic device to generate a new shared key. In this way, the complexity of the process can be reduced and signaling overhead can be saved.
  • the fifth electronic device when the first hub device is unavailable, the fifth electronic device will access or register with the second hub device.
  • the hub device A shown in FIG. 2 is the second hub device, which is not repeated here for brevity.
  • the first hub device in a scenario where a first hub device and a second hub device exist, when the link between the first hub device and the first electronic device is disconnected, the first electronic device will Re-access or register to the second hub device, the control command for the first electronic device transmitted between the second hub device and the second electronic device through the cloud, and the first hub device is used to replace the negotiated share of the first electronic device
  • the key is encrypted, or the shared key negotiated between the second central device and the second electronic device is used for encryption. Since the cloud cannot know the shared key, it cannot know the control command, and cannot tamper with the control command, thereby improving the security of the transmission of the control command. In addition, the reliability of the control command transmission is guaranteed, and the efficiency of the control command transmission is improved.
  • FIG. 11 is a schematic structural diagram of another example of a wireless communication system applicable to an embodiment of the present application.
  • the central device can manage multiple first electronic devices and fifth electronic devices, and FIG. 11 shows a scene of one first electronic device and one fifth electronic device.
  • the control end device includes a master control end device (second electronic device) and a plurality of slave control end devices (third electronic device).
  • Figure 11 shows a scenario of a slave console device.
  • the master control terminal device and the slave control terminal device correspond to different accounts, respectively, the public key information corresponding to the slave control terminal device and the master control terminal device are not the same, and the corresponding private key information is also different. Are not the same.
  • the master control device may be a smartphone used by the user, and the slave control device may be a PAD used by the user.
  • the communication links between the master control end device and the slave control end device and the first central device respectively may be cloud transmission links established based on a cellular network protocol.
  • a communication connection based on communication protocols such as WIFI and Bluetooth can be established between the first electronic device and the first central device.
  • the number of third electronic devices is not limited.
  • Fig. 12 shows a schematic flowchart of the method 700 for key negotiation provided by the present application in the architecture shown in Fig. 11 . 12 shows a situation in which the second electronic device (master control end device) and the third electronic device (slave control end device) correspond to different accounts respectively. As shown in FIG. 12 , the method 700 includes: S701 to S725.
  • the third electronic device generates public key information and private key information of the third electronic device.
  • the public key information and the private key information correspond to the account of the third electronic device.
  • the second electronic device encrypts the public key information of the first electronic device using the fourth shared key negotiated by SPEKE in S715, and sends the encrypted public key information of the first electronic device to the third electronic device .
  • the third electronic device may store the public key information of the first electronic device.
  • the third electronic device encrypts the public key information of the third electronic device using the fourth shared key negotiated by SPEKE in S715 and sends it to the second electronic device. Further, the second electronic device may store the public key information of the third electronic device.
  • the second electronic device encrypts the public key information of the third electronic device with the fifth encryption key and uploads it to the cloud device.
  • the fifth encryption key here is generated by the second electronic device using public key information and private key information of the second electronic device.
  • the public key information of the second electronic device previously stored by the cloud device is. After the second electronic device uploads the public key information of the third electronic device to the cloud device, the public key information stored in the cloud device will change. Therefore, the cloud device will send a public key change event notification to the central device for sending The central device notifies itself that the stored public key information has changed.
  • the first central device after receiving the notification of the public key change event, acquires the encrypted public key information of the third electronic device from the cloud device.
  • the second electronic device can also send its own public key information and private key information to the first central device by means of a secure clone (Secclone), and the first central device can use the public key information and private key of the second electronic device information to generate a fifth decryption key.
  • the second electronic device may also encrypt its own public key information and private key information with the first shared key or the second public key key negotiated with the first central device and send it to the second electronic device. a central device.
  • the first central device uses the fifth decryption key generated by the public key information and private key information of the second electronic device to decrypt the obtained encrypted
  • the public key information of the third electronic device is decrypted to obtain the public key information of the third electronic device.
  • Steps S723 to S725 are similar to S311 to S313 in the method 300 , and the description of the corresponding specific steps can refer to the description of the corresponding steps in S311 to S313 in the above method 300 , which is not repeated here for brevity.
  • S311 to S313 are the interactions between the second electronic device (ie, the console device in the method 300 ) and the first hub device
  • S723 to S725 are the interactions between the third electronic device and the first hub device
  • the first central device and the third electronic device perform key negotiation and generate a shared secret key according to the public key information of the third electronic device and the public key information of the first electronic device as the third shared key.
  • the specific steps are the same.
  • the information sent by the user to the first electronic device uses the shared key on the third electronic device Encryption is performed, the encrypted information is transmitted to the cloud device, and the cloud device forwards the encrypted information to the central device. Since the cloud cannot know the shared key, the information cannot be obtained, and the information cannot be tampered with, thereby improving the security of information transmission. After the user switches the control terminal device, the accuracy of the user's control of the first electronic device is ensured, and the user experience is improved.
  • FIG. 13 is a schematic structural diagram of another example of a wireless communication system applicable to this embodiment of the present application.
  • the central device can manage multiple first electronic devices and fifth electronic devices, and FIG. 13 shows a scene of one first electronic device and one fifth electronic device.
  • the control end device includes a master control end device (the second electronic device) and a plurality of slave control end devices (the first electronic device).
  • Figure 13 shows a scenario of a slave console device.
  • the central device can manage multiple first electronic devices and fifth electronic devices
  • FIG. 13 shows a scene of one first electronic device and one fifth electronic device.
  • the control end device includes a master control end device (the second electronic device) and a plurality of slave control end devices (the first electronic device).
  • Figure 13 shows a scenario of a slave console device.
  • FIG. 13 shows a slave console device.
  • the second electronic device (master control end device) and the fourth electronic device (slave control end device) correspond to the same account, then the public keys corresponding to the second electronic device and the fourth electronic device respectively
  • the information is the same, and the corresponding private key information is also the same.
  • FIG. 14 is a schematic flowchart of the method 800 for key negotiation provided by the present application in the architecture shown in FIG. 13 . As shown in FIG. 14 , the method 800 includes: S801 to S821.
  • the second electronic device sends the private key information and public key information corresponding to the account of the second electronic device to the fourth electronic device by means of a trust ring.
  • the second electronic device encrypts the public key information of the first electronic device with the sixth encryption key and uploads it to the cloud device.
  • the sixth encryption key here is generated by the second electronic device using the public key information and the private key information of the second electronic device.
  • the public key information of the second electronic device previously stored by the cloud device is. After the second electronic device uploads the public key information of the first electronic device to the cloud device, the public key information stored in the cloud device will change. Therefore, the cloud device will send a public key change event notification to the fourth electronic device, using to notify the fourth electronic device that the stored public key information has changed.
  • the fourth electronic device after receiving the notification of the public key change event, acquires the encrypted public key information of the first electronic device from the cloud device.
  • the fourth electronic device generates a sixth decryption key by using the public key information and the private key information of the second electronic device, and decrypts the obtained encrypted public key information of the first electronic device to obtain the first electronic device.
  • the public key information of the device is not limited to the public key information of the device.
  • Steps S819 to S821 are similar to S311 to S313 in the method 700 , and the description of the corresponding specific steps may refer to the description of the corresponding steps in S311 to S313 in the above method 300 , which is not repeated here for brevity.
  • the difference is that S311 to S313 are the interactions between the second electronic device and the first hub device, while S819 to S821 are the interactions between the fourth electronic device and the second middle device.
  • the first The shared secret key generated by the key negotiation between the central device and the fourth electronic device according to the public key information of the fourth electronic device and the public key information of the first electronic device is the fifth shared key.
  • the specific steps are the same.
  • the second electronic device may also send the public key information of the first electronic device to the fourth electronic device by means of a trust ring, without using the public key information of the first electronic device.
  • Upload the public key information of the first electronic device to the cloud device that is, if the second electronic device sends the public key information of the first electronic device to the fourth electronic device by means of a trust ring, the method 800 may not include S815 to: S818.
  • the main control terminal uploads the public key information of the first electronic device to the cloud device
  • other fourth electronic devices also need to use the public key information of the first electronic device
  • they can easily obtain the first electronic device from the cloud.
  • the public key information of an electronic device reduces the complexity for other devices to obtain the public key information of the first electronic device.
  • the trust ring method is account-based, it is a way to transmit information related to the account between the APPs on these different devices when the APPs on different devices have the same account.
  • the trust ring method Does not focus on interactions between devices. Since the first electronic device does not have an account, the public key information of the first electronic device is not related to the account of the second electronic device.
  • the second electronic device when the second electronic device and the fourth electronic device correspond to the same account In this case, the second electronic device generally does not use the trust ring to send content unrelated to the account, that is, the second electronic device will upload the public key information of the first electronic device to the cloud device, and the fourth electronic device will send the information from the cloud obtained on the device.
  • the fourth electronic device For the interaction process between the electronic device or the third electronic device and the fifth electronic device, reference may be made to the description of the specific process of the method 100 shown in FIG. 2 , and the second electronic device shown in FIG. 2 is the fourth electronic device Or it is a third electronic device, which is not repeated here for brevity.
  • the central device in the process of the first electronic device communicating with the second electronic device through the central device, the central device replaces the first electronic device, negotiates with the second electronic device, and replaces the first electronic device.
  • the device generates a key, and the control command of the second electronic device to the first electronic device can be encrypted on the second electronic device by using the key, and the encrypted control command is transmitted to the central device through the cloud. Since the cloud cannot know the key, it cannot know the control command, nor can the control command be tampered with, etc., thus improving the security of the control command transmission between the second electronic device and the central device, and ensuring that the user is aware of the first electronic device.
  • the accuracy of device control improves user experience.
  • predefinition may be implemented by pre-saving corresponding codes, forms or other means that can be used to indicate relevant information in the device (the application does not limit its specific implementation means) .
  • Embodiments of the key agreement method provided by the embodiments of the present application are described above with reference to FIG. 1 to FIG. 14 , and related devices provided by the embodiments of the present application are described below.
  • each device including the above-mentioned first central device, second central device, second electronic device, third electronic device, and fourth electronic device
  • each function may be divided into various function modules, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that, the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the communication device (the above-mentioned first central device, second central device, second electronic device, third electronic device, or fourth electronic device) provided by the embodiment of the present application is used to execute the above-mentioned key negotiation method, and thus can achieve The same effect as the above implementation method.
  • the hub device may include a processing module, a storage module and a communication module.
  • the processing module can be used to control and manage the actions of the central device. For example, it can be used to support the central device to perform the steps performed by the processing unit.
  • the memory module can be used to support the storage of program codes and data, etc.
  • the communication module can be used to support the communication between the central device and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • FIG. 15 shows a schematic diagram of the hardware structure of an example of a communication apparatus 900 provided by the present application.
  • the communication apparatus 900 may be the above-mentioned first central device, second central device, second electronic device, third electronic device or Fourth electronic device.
  • the communication device 900 may include a processor 910 , an external memory interface 920 , an internal memory 921 , a universal serial bus (USB) interface 930 , a charge management module 940 , a power management module 941 , and a battery 942 , Antenna 1, Antenna 2, wireless communication module 950, etc.
  • USB universal serial bus
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the communication apparatus 900 .
  • the communication apparatus 900 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • Processor 910 may include one or more processing units.
  • the processor 910 may include an application processor (AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • AP application processor
  • ISP image signal processor
  • controller a video Codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • NPU neural-network processing unit
  • different processing units may be independent components, or may be integrated in one or more processors.
  • the communication device 900 may also include one or more processors 910 .
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.
  • the processor 910 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 930 is an interface that conforms to the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 2530 can be used to connect a charger to charge the communication device 900, and can also be used to transmit data between the communication device 900 and peripheral devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the communication apparatus 900 .
  • the communication apparatus 900 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the wireless communication function of the communication device 900 may be implemented by the antenna 1, the antenna 2, the wireless communication module 950, and the like.
  • the wireless communication module 950 can provide Wi-Fi (including Wi-Fi perception and Wi-Fi AP), Bluetooth (Bluetooth, BT), and wireless data transmission modules (eg, 433MHz, 868MHz, 915MHz) applied on the communication device 900 and other wireless communication solutions.
  • the wireless communication module 950 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 950 receives electromagnetic waves via the antenna 1 or the antenna 2 (or, the antenna 1 and the antenna 2 ), filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 910 .
  • the wireless communication module 950 can also receive the signal to be sent from the processor 910 , perform frequency modulation on it, amplify the signal, and then convert it into an electromagnetic wave and radiate it through the antenna 1 or the antenna 2 .
  • the external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the communication device 900.
  • the external memory card communicates with the processor 910 through the external memory interface 920 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 921 may be used to store one or more computer programs including instructions.
  • the processor 910 can execute the above-mentioned instructions stored in the internal memory 921, so that the communication device 900 can execute the method for key negotiation provided in some embodiments of the present application, various applications and data processing.
  • the internal memory 921 may include a code storage area and a data storage area. Among them, the code storage area can store the operating system.
  • the data storage area may store data and the like created during use of the communication device 900 .
  • the internal memory 921 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 910 may cause the communication device 900 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 921 and/or the instructions stored in the memory provided in the processor 910 Methods for key agreement, and other applications and data processing.
  • the communication apparatus 900 includes, but is not limited to, routing devices, such as wireless switches for wireless networks, WiFi wireless routers, optical network terminals, WiFi wireless repeaters or CPE terminals, portable terminal hotspots, and the like.
  • the communication device 900 may be a device with a routing function, such as wireless routers, smart TVs, large-screen devices, smart air conditioners, mobile phones, tablet computers, notebooks, large-screen TVs, smart home items, PDAs, POS, and in-vehicle computers , cameras, cordless phones, PDAs, notebook computers, printers, and other devices, which are not limited in the embodiments of the present application.
  • FIG. 16 shows a schematic block diagram of another example of a communication apparatus 1000 provided by an embodiment of the present application
  • the communication apparatus 1000 may correspond to the first hub device and the second hub described in each of the embodiments in the foregoing method 300 to method 800 device, second electronic device, third electronic device or fourth electronic device. It can also be a chip or component applied to the first central device, the second central device, the second electronic device, the third electronic device or the fourth electronic device, and each module or unit of the communication apparatus 1000 is respectively used to execute the above method. Actions or processing procedures performed by the first central device, the second central device, the above-mentioned second electronic device, the third electronic device, or the fourth electronic device described in each of the embodiments from 300 to 800, as shown in FIG. 16
  • the communication apparatus 1000 may include: a processing unit 1100 and a communication unit 1200 .
  • the communication apparatus 1000 may further include a storage unit 1300 .
  • the communication unit 1200 may include a receiving unit (module) and a sending unit (module), configured to perform the steps of receiving information and sending information by the first central device or the second central device in the foregoing method embodiments.
  • the storage unit 1300 is used to store the instructions executed by the processing unit 1100 and the communication unit 1200 .
  • the processing unit 1100, the communication unit 1200 and the storage unit 1300 are connected in communication, the storage unit 1300 stores instructions, the processing unit 1100 is used to execute the instructions stored in the storage unit, and the communication unit 1200 is used to perform specific signal sending and receiving under the driving of the processing unit 1100.
  • the communication unit 1200 may be a transceiver, an input/output interface or an interface circuit, etc., for example, may be implemented by the wireless communication module 950 in the embodiment shown in FIG. 15 .
  • the storage unit may be a memory, for example, may be implemented by the external memory interface 920 and the internal memory 921 in the embodiment shown in FIG. 15 .
  • the processing unit 1100 may be implemented by the processor 910 in the embodiment shown in FIG. 15 , or may be implemented by the processor 910 , the external memory interface 920 , and the internal memory 921 .
  • the communication apparatus 1000 shown in FIG. 16 may be the first central device, the second central device, the second electronic device, the third electronic device or the fourth electronic device, or the first central device and the second central device , the second electronic device, the third electronic device or the fourth electronic device may include the communication apparatus 1000 shown in FIG. 16 .
  • each unit in the device can be implemented in the form of software calling through the processing element; also all can be implemented in the form of hardware; some units can also be implemented in the form of software calling through the processing element, and some units can be implemented in the form of hardware.
  • each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
  • the processing element may also be called a processor, which may be an integrated circuit with signal processing capability.
  • each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
  • a unit in any of the above apparatuses may be one or more integrated circuits configured to implement the above methods, eg, one or more application specific integrated circuits (ASICs), or, one or more A plurality of digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • FPGAs field programmable gate arrays
  • the processing element can be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can invoke programs.
  • CPU central processing unit
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • An embodiment of the present application further provides a system for key agreement, the system includes: the second electronic device, the first electronic device, the first central device, and the cloud device provided in the foregoing method embodiments.
  • the system may further include: at least one of the second central device, the third electronic device, and the fourth electronic device provided in the above method embodiments.
  • Embodiments of the present application further provide a computer-readable storage medium for storing computer program codes, where the computer program includes instructions for executing any of the key negotiation methods provided by the above embodiments of the present application.
  • the readable medium may be a read-only memory (read-only memory, ROM) or a random access memory (random access memory, RAM), which is not limited in this embodiment of the present application.
  • the present application also provides a computer program product comprising instructions that, when executed, cause the second electronic device, the first hub device, the second hub device, the third electronic device or the fourth electronic device to The electronic device performs corresponding operations corresponding to the above-mentioned methods.
  • An embodiment of the present application further provides a chip located in a communication device, the chip includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit, etc.
  • the processing unit can execute computer instructions, so that the communication device executes any one of the key negotiation methods provided by the above embodiments of the present application.
  • the computer instructions are stored in a storage unit.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit can also be a storage unit in the terminal located outside the chip, such as ROM or other storage units that can store static information and instructions. Types of static storage devices, random RAM, etc.
  • the processor mentioned in any one of the above may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the program execution of the above-mentioned transmission method of feedback information.
  • the processing unit and the storage unit can be decoupled, respectively disposed on different physical devices, and connected in a wired or wireless manner to implement the respective functions of the processing unit and the storage unit, so as to support the system chip to implement the above embodiments various functions in .
  • the processing unit and the memory may also be coupled on the same device.
  • the communication device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be ROM, programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM) , EEPROM) or flash memory.
  • Volatile memory can be RAM, which acts as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate Synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous link dynamic random access memory direct memory bus random access memory Access memory
  • direct rambus RAM direct rambus RAM
  • the methods in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer programs or instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer program or instructions may be stored in or transmitted over a computer-readable storage medium.
  • the computer-readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server that integrates one or more available media.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art or the parts of the technical solutions, and the computer software products are stored in a readable storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned readable storage medium includes: U disk, removable hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供了一种密钥协商的方法及其相关设备,该方法包括:第一中枢设备生成第一电子设备的公钥信息和私钥信息,第一电子设备通过第一中枢设备接入网络;第一中枢设备向云端设备上报第一电子设备的第一模式;第一中枢设备获取第二电子设备的公钥信息,第一中枢设备根据第一电子设备的私钥信息和第二电子设备的公钥信息与第二电子设备进行密钥协商,生成第一共享密钥。第一电子设备上不能集成HiChain相关组件。本申请提供的方法,在第一电子设备通过中枢设备与第二电子设备进行信息传输的过程中,利用该共享密钥加密信息,可以避免云端设备对该信息的获取以及篡改等,提高了信息传输的安全性。

Description

一种密钥协商的方法及其相关设备
本申请要求于2020年12月31日提交国家知识产权局、申请号为202011639061.4、申请名称为“一种密钥协商的方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及智能家居设备领域,更为具体的,涉及一种密钥协商的方法及其相关设备。
背景技术
目前,家庭中的家居设备可以包括敏感设备和非敏感设备两种类型。敏感设备上可以集成HiChain相关组件,HiChain相关组件可以生成设备的公钥和私钥相关信息,可以与其它设备进行密钥协商,以提升信息传输的安全性;通常来说,具备HiChain相关组件的敏感设备其内存相对于非敏感设备而言较大。而对于非敏感设备由于内存相对较小,通常不集成HiChain相关组件,因此无法生成公钥和私钥相关信息,进而无法与其它设备进行密钥协商。
在一些场景下,终端设备需要通过云端对家居设备进行控制。当终端设备通过云端向敏感设备发送信息时,由于敏感设备可以和对端的终端设备进行密钥协商,因此,终端设备通过云端向敏感设备发送信息可以加密。当终端设备通过云端向非敏感设备发送信息时,由于非敏感设备本身不具备密钥协端的能力,终端设备通过云端向敏感设备发送信息不能进行加密。在这种情况下,云端可以获知该信息的具体内容,存在信息泄漏的风险;并且可能篡改该信息,降低了安全性,不能保证用户对于非敏感设备控制的准确性,影响了用户体验。
发明内容
本申请提供了一种密钥协商的方法及其相关设备,在第一电子设备通过中枢设备与第二电子设备进行信息传输的过程中,第一中枢设备可以和第二电子设备进行协商生成共享密钥,利用该密钥加密信息,提高了第二电子设备和第一电子设备之间信息传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
第一方面,提供了一种密钥协商的方法,该方法包括:第一中枢设备生成第一电子设备的公钥信息和该第一电子设备的私钥信息,该第一电子设备通过该第一中枢设备接入网络;该第一中枢设备向云端设备上报第一电子设备的第一模式,该第一模式为该第一电子设备支持密钥协商能力和该第一电子设备为中枢模式;该第一中枢设备获取第二电子设备的公钥信息,该公钥信息为该第二电子设备基于该第一电子设备的该第一模式发送的;该第一中枢设备根据第一电子设备的私钥信息和该第二电子设备的公钥信息,与该第二电子设备进行密钥协商,生成第一共享密钥。其中,而第一电 子设备不能集成HiChain相关组件,其自身不能生成公钥和私钥相关信息以及不具备秘钥协商的能力,第一电子设备为中枢模式。
第一方面提供的密钥协商的方法,在第一电子设备通过中枢设备与第二电子设备进行通信的过程中,第一中枢设备代替第一电子设备生成第一电子设备的公钥信息和私钥信息,并代替第一电子设备,与第二电子设备进行协商生成第一共享密钥。由于云端不能获知该共享密钥,因此不能获知第二电子设备和第一中枢设备之间传输的信息,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性。
示例性的,第二电子设备和第一中枢设备之间可以基于第一电子设备的公钥信息和私钥信息,以及第二电子设备的公钥信息和私钥信息,进行STS协商,通过加密算法(例如椭圆曲线算法等)生成第一共享密钥,并利用对方的公钥信息进行身份认证。进一步的,第二电子设备和第一中枢设备可以分别保存该第一共享密钥。
示例性的,第一中枢设备可以为具备端到端密钥协商能力的电子设备。在一种可能的实施方式中,第一中枢设备可以为路由设备,例如为用于无线网络的无线交换机,WiFi无线路由器、光网络终端、WiFi无线中继器或CPE终端、便携式终端热点等。在另一种可能的实施方式中,第一中枢设备可以为具有路由功能的设备,例如包括无线路由器,智能电视、大屏设备、智能空调,手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、POS、车载电脑等。
示例性的,第一电子设备可以包括家中的智能灯、智能插座、智能冰箱等与用户个人隐私不相关或者弱相关的设备。
示例性的,用户使用的第二电子设备也可以称为控制端设备,该控制端设备例如可以为用户使用的手机、PDA、笔记本电脑、可穿戴电子设备等。用户通过该第二电子设备控制家中的第一电子设备。
示例性的,第一电子设备与第一中枢设备之间可以建立基于WIFI、蓝牙等通信协议的通信连接。
在本申请中,中枢模式可以理解为该第一电子设备需要通过第一中枢设备与外网中的设备(例如为第二电子设备)进行通信,外网中的设备需要向第一电子设备发送信息时,需要先发给第一中枢设备,由第一中枢设备转发给第一电子设备。第一电子设备需要向外网中的设备发送信息时,需要将信息先发给第一中枢设备,再由第一中枢设备转发给外网中的设备。
在第一方面一种可能的实现方式中,该方法还包括:第一中枢设备向该第一电子设备发送该第一共享密钥。
在第一方面一种可能的实现方式中,在第一中枢设备向所述第一电子设备发送第一共享密钥之后,该方法还包括:该第一中枢设备通过该云端设备接收第一信息,该第一信息是由该第二电子设备基于该第一共享密钥进行加密的;该第一中枢设备向该第一电子设备发送该第一信息。在该实现方式中,第二电子设备向第一电子设备发送的信息,在第二电子设备上便可以利用该共享密钥进行加密,加密后的信息通过云端传输给中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制 命令)传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。并且,第一中枢设备接收利用第一共享密钥加密后的第一信息时,不需要对该第一信息进行解密,直接将该第一信息发送给第一电子设备,降低了第一中枢设备资源的开销以及第一信息传输的安全性。
在第一方面一种可能的实现方式中,该方法还包括:该第一中枢设备通过该云端设备接收第一信息,该第一信息是由该第二电子设备基于该第一共享密钥进行加密的,该第一中枢设备利用该第一共享密钥对该第一信息进行解密,得到第二信息;该第一中枢设备向该第一电子设备发送该第二信息。在该实现方式中,第一中枢设备接收利用第一共享密钥加密后的第一信息时,该第一信息进行解密得到第二信息,将该第二信息发送给第一电子设备,提高了信息传输的效率。
在第一方面一种可能的实现方式中,在该第一中枢设备生成第一电子设备的公钥信息和该第一电子设备的私钥信息之前,该方法还包括:该第一中枢设备接收该第一电子设备发送的注册信息,该注册信息包括:该第一电子设备的第一识别码、以及该第一电子设备不具备密钥协商能力。其中,第一电子设备不具备密钥协商能力指示第一电子设备不能生成自己的公钥信息和私钥信息,并且,不具备端到端密钥协商能力。
示例性的,第一电子设备的第一识别码可以包括第一电子设备的PIN码。
示例性的,第一电子设备可以通过authcode方式接入到第一中枢设备上。
可选的,该注册信息还可以包括第一电子设备的ID等。
在第一方面一种可能的实现方式中,该第一中枢设备获取该第二电子设备的公钥信息,包括:该第一中枢设备基于该第一识别码与该第二电子设备进行密钥协商,生成第二共享密钥;该第一中枢设备通过该云端设备接收该第二电子设备的公钥信息,该第二电子设备的公钥信息是由该第二电子设备基于该第二共享密钥加密的;该第一中枢设备利用该第二共享密钥解密该第二电子设备的公钥信息。在该实现方式中,利用第一中枢设备和第二电子设备协商的第二共享密钥传输该第二电子设备的公钥信息,提高了第二电子设备的公钥信息传输的安全性和效率。
示例性的,第二电子设备和第一中枢设备可以基于第一电子设备PIN码进行SPEKE协商,生成第二共享密钥,并分别保存第二共享密钥。
在第一方面一种可能的实现方式中,该方法还包括:该第一中枢设备通过该云端设备向该第二电子设备发送该第一电子设备的公钥信息,该第一电子设备的公钥信息是由该第一中枢设备基于该第二共享密钥加密的。在该实现方式中,利用第一中枢设备和第二电子设备协商的第二共享密钥传输该第一电子设备的公钥信息,提高了第一电子设备的公钥信息传输的安全性和效率。
在第一方面一种可能的实现方式中,在第一中枢设备通过云端设备向第二电子设备发送第一电子设备的公钥信息之前,该方法还包括:第一中枢设备根据第一注册信息,确定第一电子设备不具备密钥协商能力。
在第一方面一种可能的实现方式中,在该第一中枢设备生成第一电子设备的公钥信息和该第一电子设备的私钥信息之前,该方法还包括:该第一中枢设备接收该第一电子设备发送的中枢探测报文;该第一中枢设备向该第一电子设备发送响应于该中枢探测报文的响应报文,该响应报文用于使得该第一电子设备通过该第一中枢设备接入 网络。在该实现方式中,当主中枢设备不可用时,第一中枢设备(备用中枢设备)可以通过向第一电子设备发送中枢探测报文,使得第一电子设备接入到第一中枢设备上,进而利用第一中枢设备和外网中的第二电子设备进行通信,保证了信息传输的稳定性和效率。
第二方面,提供了一种密钥协商的方法,该方法应用于一种密钥协商的系统,该系统包括:第一中枢设备、第一电子设备、第二电子设备以及云端设备,该方法包括:该第一电子设备通过该第一中枢设备与云端设备通信连接;其特征在于;该第一中枢设备生成该第一电子设备的公钥信息和该第一电子设备的私钥信息,该第一电子设备通过该第一中枢设备接入网络;该第一中枢设备向该云端设备上报该第一电子设备的第一模式,该第一模式为该第一电子设备支持密钥协商能力和该第一电子设备为中枢模式;该第二电子设备从该云端设备获取该第一电子设备的该第一模式;第二电子设备基于该第一电子设备的第一模式,通过该云端设备向该第一中枢设备发送第二电子设备的公钥信息;该第一中枢设备获取该第二电子设备的公钥信息;该第一中枢设备通过该云端设备向该第二电子设备发送第一电子设备的公钥信息;该第二电子设备获取该第一电子设备的公钥信息;该第一中枢设备和该第二电子设备根据第二电子设备的公钥信息和该第一电子设备的公钥信息,进行密钥协商,生成第一共享密钥,其中,而第一电子设备不能集成HiChain相关组件,其自身不能生成公钥和私钥相关信息以及不具备秘钥协商的能力。
第二方面提供的方法,在第一电子设备通过第一中枢设备与第二电子设备进行通信的过程中,第一中枢设备代替第一电子设备生成第一电子设备的公钥信息和私钥信息,并代替第一电子设备,与第二电子设备进行协商生成第一共享密钥。由于云端不能获知该共享密钥,因此不能获知第二电子设备和中枢设备之前传输的信息,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性。
示例性的,第二电子设备和第一中枢设备之间可以基于第一电子设备的公钥信息和私钥信息,以及第二电子设备的公钥信息和私钥信息,进行STS协商,通过加密算法(例如椭圆曲线算法等)生成第一共享密钥,并利用对方的公钥信息进行身份认证。进一步的,第二电子设备和第一中枢设备可以分别保存该第一共享密钥。
示例性的,第一中枢设备可以为具备端到端密钥协商能力的电子设备。在一种可能的实施方式中,第一中枢设备可以为路由设备,例如为用于无线网络的无线交换机,WiFi无线路由器、光网络终端、WiFi无线中继器或CPE终端、便携式终端热点等。在另一种可能的实施方式中,第一中枢设备可以为具有路由功能的设备,例如包括无线路由器,智能电视、大屏设备、智能空调,手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、POS、车载电脑等。
示例性的,第一电子设备可以包括家中的智能灯、智能插座、智能冰箱等与用户个人隐私不相关或者弱相关的设备。
示例性的,用户使用的第二电子设备也可以称为控制端设备,该控制端设备例如可以为用户使用的手机、PDA、笔记本电脑、可穿戴电子设备等。用户通过该第二电子设备控制家中的第一电子设备。
在第二方面一种可能的实现方式中,该方法还包括:该第二电子设备通过该云端设备向该第一中枢设备发送第一信息,该第一信息是由该第二电子设备基于该第一共享密钥进行加密的;该云端设备基于该第一模式,将该第一信息转发至该第一中枢设备;该第一中枢设备利用该第一共享密钥对该第一信息进行解密,得到第二信息;该第一中枢设备向该第一电子设备发送该第二信息。在该实现方式中,第二电子设备向第一电子设备发送的信息,在第二电子设备上便可以利用该共享密钥进行加密,加密后的信息通过云端传输给中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
在第二方面一种可能的实现方式中,该方法还包括:该第二电子设备通过该云端设备向该第一中枢设备发送第一信息,该第一信息是由该第二电子设备基于该第一共享密钥进行加密的;该云端设备基于该第一模式,将该第一信息转发至该第一中枢设备;该第一中枢设备向该第一电子设备发送该第一共享密钥;该第一中枢设备向该第一电子设备发送该第一信息。在该实现方式中,由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性,并且,提高了信息传输的效率。
在第二方面一种可能的实现方式中,在该第一中枢设备生成该电子设备的公钥信息和该电子设备的私钥信息之前,该方法还包括:该第一电子设备向该第一中枢设备发送第一注册信息,该第一注册信息包括该第一电子设备不具备密钥协商能力。在该第一中枢设备通过该云端设备向该第二电子设备发送第一电子设备的公钥信息之前,该方法还包括:该第一中枢设备根据该第一注册信息,确定该第一电子设备不具备密钥协商能力。
在第二方面一种可能的实现方式中,该第一模式还包括该第一电子设备通过该第一中枢设备接入网络;该第二电子设备通过该云端设备向该第一中枢设备发送第二电子设备的公钥信息,包括:该第二电子设备将该第二电子设备的公钥信息发送给该云端设备;该云端设备基于该第一模式,将该第二电子设备的公钥信息转发给该第一中枢设备。
在第二方面一种可能的实现方式中,在该第一中枢设备生成该电子设备的公钥信息和该电子设备的私钥信息之前,该方法还包括:该第一电子设备向该第一中枢设备发送第二注册信息,该第二注册信息还包括该第一电子设备的第一识别码;该第二电子设备获取该第一识别码;该第二电子设备和该第一中枢设备基于该第一识别码,进行密钥协商,生成第二共享密钥;该第二电子设备通过该云端设备向该第一中枢设备发送第二电子设备的公钥信息,包括:该第二电子设备通过该云端设备向该第一中枢设备发送该第二电子设备的公钥信息,该第二电子设备的公钥信息是由该第二共享密钥加密的;该云端设备将该第二电子设备的公钥信息转发至该第一中枢设备;该第一中枢设备基于该第二共享密钥,解密该第二电子设备的公钥信息,获取第二电子设备的公钥信息;该第一中枢设备通过该云端设备向该第二电子设备发送第一电子设备的公钥信息,包括:该第一中枢设备通过该云端设备向该第二电子设备发送该第一电子 设备的公钥信息,该第一电子设备的公钥信息是由该第二共享密钥加密的;该云端设备将该第一电子设备的公钥信息转发至该第二电子设备;该第二电子设备基于该第二共享密,钥解密该第一电子设备的公钥信息,获取第一电子设备的公钥信息。在该实现方式中,第一中枢设备和第二电子设备可以进行密钥协商,生成第二共享密钥,利用第二共享密钥交换该第二电子设备的公钥信息和第一电子设备的公钥信息,提高了公钥信息传输的安全性和效率。
示例性的,第一电子设备的第一识别码可以包括第一电子设备的PIN码。
示例性的,第二电子设备和第一中枢设备可以基于第一电子设备PIN码进行SPEKE协商,生成第二共享密钥,并分别保存第二共享密钥。
在第二方面一种可能的实现方式中,该系统还包括第二中枢设备,该第一电子设备与该第二中枢设备心跳连接:该方法还包括:第一电子设备通过心跳连接确定第一中枢设备不可用;该第一电子设备断开与该第一中枢设备的连接;该第一电子设备向该第二中枢设备发送中枢探测报文;该第二中枢设备向该第一设备发送响应于该中枢探测报文的第二响应报文,该第二响应报文用于使得该第一电子设备通过该第二中枢设备接入网络。在该实现方式中,在存在第一中枢设备(主中枢设备)和第二中枢设备(备用中枢设备)的场景中,在第一中枢设备与第一电子设备之间的链路断掉的情况下,第一电子设备会重新接入或者注册到第二中枢设备上,第二中枢设备和第二电子设备之间通过云端传输的对于第一电子设备的控制命令,利用第一中枢设备代替第一电子设备协商好的共享密钥进行加密,或者利用第二中枢设备和第二电子设备协商好的共享密钥进行加密。由于云端不能获知该共享密钥,因此不能获知该控制命令,不能对该控制命令进行篡改等,从而提高了控制命令传输的安全性。并且,保障了控制命令传输的可靠性,提高控制命令传输的效率。
示例性的,第一中枢设备不可用包括:第一中枢设备下电、搬离、出现故障、第一中枢设备与云端之间的链路断掉或者第一中枢设备与第一电子设备之间的链路断掉等。
在第二方面一种可能的实现方式中,该系统还包括第三电子设备,该第三电子设备与该第二电设备通信连接,该方法还包括:该第三电子设备生成该第三电子设备的公钥信息和该第三电子设备的私钥信息;该第二电子设备向第三电子设备发送该第一电子设备的公钥信息;该第三电子设备向该第二电子设备发送该第三电子设备的公钥信息;该第二电子设备将该第三电子设备的公钥信息上传到该云端设备;该第一中枢设备从该云端设备获取该第三电子设备的公钥信息。该第一中枢设备和该第三电子设备根据第三电子设备的公钥信息和该第一电子设备的公钥信息,进行密钥协商,生成第三共享密钥。第二电子设备(主控制端设备)和第三电子设备(从属控制端设备)分别对应不同的账号,第二电子设备和第三电子设备分别对应的公钥信息不同,分别对应的私钥信息也不同。
在该实现方式中,在用户从第二电子设备切换至第三电子设备控制该第一电子设备时,第三电子设备和第一中枢设备可以进行端到端密钥协商,生成第三公钥秘钥。在用户切换电子设备后,也保证用户对于第一电子设备控制的准确性,提高用户体验。
在第二方面一种可能的实现方式中,该方法还包括:该第三电子设备通过该云端 设备向该第一中枢设备发送第三信息,该第三信息是由该第三电子设备基于该第三共享密钥进行加密的;该云端设备基于该第一模式,将该第三信息转发至该第一中枢设备;该第一中枢设备利用该第三共享密钥对该第三信息进行解密,得到第四信息;该第一中枢设备向该第一电子设备发送该第四信息。在该实现方式中,第三电子设备向第一电子设备发送信息时,在第三电子设备上便可以利用该第三共享密钥进行加密,加密后的信息通过云端传输给第一中枢设备。从而提高了信息传输的安全性。在用户切换电子设备后,保证用户对于第一电子设备控制的准确性,提高用户体验。
在第二方面一种可能的实现方式中,该方法还包括:该第二电子设备和该第三电子设备进行密钥协商,生成第四共享密钥;该第二电子设备向第三电子设备发送该第一电子设备的公钥信息,包括:该第二电子设备向该第三电子设备发送该第一电子设备的公钥信息,该第一电子设备的公钥信息是由该第四共享密钥加密的;该第三电子设备基于该第四共享密钥,解密该第一电子设备的公钥信息,获取第一电子设备的公钥信息。该第三电子设备向该第二电子设备发送该第三电子设备的公钥信息,包括:该第三电子设备向该第二电子设备发送该第三电子设备的公钥信息,该第三电子设备的公钥信息是由该第四共享密钥加密的;该第二电子设备基于该第四共享密钥,解密该第三电子设备的公钥信息,获取第三电子设备的公钥信息。在该实现方式中,利用第二电子设备和第三电子设备协商的第四共享密钥交换该第一电子设备的公钥信息和第三电子设备的公钥信息,提高了公钥信息传输的安全性和效率。
在第二方面一种可能的实现方式中,该方法还包括第四电子设备,该第四电子设备与该第二电设备通信连接,该方法还包括:该第二电子设备向该第四电子设备发送该第二电子设备的私钥信息和该第二电子设备的公钥信息;该第二电子设备将该第一电子设备的公钥信息上传到该云端设备;该第四电子设备从该云端设备获取该第一电子设备的公钥信息;该第一中枢设备和该第四电子设备根据第二电子设备的公钥信息和该第一电子设备的公钥信息,进行密钥协商,生成第五共享密钥。其中,第二电子设备(主控制端设备)和第四电子设备(从属控制端设备)对应相同的账号,第二电子设备和第四电子设备分别对应的公钥信息相同,分别对应的私钥信息也相同。
在该实现方式中,在用户从第二电子设备切换至第四电子设备控制该第一电子设备时,第三电子设备和第一中枢设备可以进行端到端密钥协商,生成第五共享密钥。在用户切换电子设备后,也保证用户对于第一电子设备控制的准确性,提高用户体验。
在第二方面一种可能的实现方式中,该方法还包括:该第四电子设备通过该云端设备向该第一中枢设备发送第五信息,该第五信息是由该第四电子设备基于该第五共享密钥进行加密的;该云端设备基于该第一模式,将该第五信息转发至该第一中枢设备;该第一中枢设备利用该第五共享密钥对该第五信息进行解密,得到第六信息;该第一中枢设备向该第一电子设备发送该第六信息。在该实现方式中,第四电子设备向第一电子设备发送信息时,在第四电子设备上便可以利用该第五共享密钥进行加密,加密后的信息通过云端传输给第一中枢设备。从而提高了信息传输的安全性。在用户切换电子设备后,保证用户对于第一电子设备控制的准确性,提高用户体验。
示例性的,第二电子设备可以通过信任环的方式向第四电子设备发送第二电子设备的账号对应的私钥信息和公钥信息。
第三方面,提供了一种通信装置,该通信装置包括用于执行以上第一方面或者第一方面的任意一方面可能的实现方式中的各个步骤的单元。
第四方面,提供了一种通信装置,该通信装置包括至少一个处理器和存储器,该处理器和存储器耦合,该存储器存储有程序指令,当该存储器存储的程序指令被该处理器执行时执行以上第一方面或者第一方面的任意一方面可能的实现方式中的方法。
第五方面,提供了一种通信装置,该通信装置包括至少一个处理器和接口电路,该至少一个处理器用于执行以上第一方面或者第一方面中的任意一方面可能的实现方式中的方法。
第六方面,提供了一种中枢设备,该中枢设备包括上述第三方面、第四方面或者第五方面提供的任一种通信装置。
第七方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序在被处理器执行时,用于执行第一方面或者第一方面中的任意可能的实现方式中的方法,或者用于执行第二方面或者第二方面中的任意可能的实现方式中的方法。
第八方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序被执行时,用于执行第一方面或者第一方面中的任意可能的实现方式中的方法,或者,用于执行第二方面或者第人方面中的任意可能的实现方式中的方法。
第九方面,提供了一种芯片,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的通信设备执行第一方面或者第一方面中的任意可能的实现方式中的方法,或者执行第二方面或者第二方面中的任意可能的实现方式中的方法。
本申请提供的密钥协商的方法及相关设备,在第一电子设备通过中枢设备与第二电子设备进行通信的过程中,中枢设备代替第一电子设备与第二电子设备进行协商,并代替第一电子设备生成共享密钥,第二电子设备向第一电子设备发送的信息,在第二电子设备上便可以利用该共享密钥进行加密,加密后的信息通过云端传输给中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
附图说明
图1是一例用户通过中枢设备对于家中的第五电子设备和第一电子设备进行控制的示意性场景图。
图2是现有技术中用户通过第二电子设备对于第五电子设备进行控制的方法的示意性流程图。
图3是现有技术中用户通过第二电子设备对于第一电子设备进行控制的方法的示意性流程图。
图4是本申请提供的一例适用于本申请实施例的通信系统的示意图。
图5是本申请实施例提供的一例密钥协商的方法的示意性流程图。
图6是本申请实施例提供的一例第二电子设备和第一中枢设备通过第一电子设备的PIN码进行SPEKE协商生成第二共享密钥过程的示意图。
图7是本申请实施例提供的一例第二电子设备和第一中枢设备通过进行端到端协商生成第一共享密钥过程的示意图。
图8是本申请提供的另一例适用于本申请实施例的通信系统的示意图。
图9是本申请实施例提供的另一例密钥协商的方法的示意性流程图。
图10是本申请实施例提供的又一例密钥协商的方法的示意性流程图。
图11本申请实施例提供的另一例适用于本申请实施例的通信系统的示意图。
图12是本申请实施例提供的另一例密钥协商的方法的示意性流程图。
图13本申请实施例提供的一例适用于本申请实施例的通信系统的示意图。
图14是本申请实施例提供的一例密钥协商的方法的示意性流程图。
图15是本申请实施例提供的一例中枢设备结构的示意性框图。
图16是本申请实施例提供的一例通信装置结构的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,GSM)系统、码分多址(Code Division Multiple Access,CDMA)系统、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)系统、通用分组无线业务(General Packet Radio Service,GPRS)、长期演进(Long Term Evolution,LTE)系统、LTE频分双工(Frequency Division Duplex,FDD)系统、LTE时分双工(Time Division Duplex,TDD)、通用移动通信系统(Universal Mobile  Telecommunication System,UMTS)、全球互联微波接入(Worldwide Interoperability for Microwave Access,WiMAX)通信系统、第五代(5th Generation,5G)系统或新无线(New Radio,NR)等。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
中枢作为家庭中家居设备的代理通信出口,收敛了家庭中的家居设备暴露在网络上的风险,同时也使得用户对于家居设备的控制和管理提供了一个可扩展的安全节点,提供对家居设备更强的安全保护能力,使云端无法控制家居设备中的第一设备,并且无法感知用户对于第一设备的具体操作。目前中枢服务仅在家庭中特定的设备上部署,这些设备被可以被称为中枢设备,例如中枢设备可以为家中的华为路由器、华为大屏、华为人工智能(artificial intelligence,AI)音箱等。
应理解,在本申请实施例中,中枢设备可以为具备端到端密钥协商能力的电子设备。在一种可能的实施方式中,中枢设备可以为路由设备,例如为用于无线网络的无线交换机,WiFi无线路由器、光网络终端、WiFi无线中继器或用户前置设备(customer premise equipment,CPE)终端、便携式终端热点等。在另一种可能的实施方式中,中枢设备可以为具有路由功能的设备,例如包括无线路由器,智能电视、大屏设备、智能空调,手机、平板电脑、笔记本、大屏电视、智能家居单品、个人数字助理(personal digital assistant,PDA)、销售终端(point of sales,POS)、车载电脑等。
还应理解,在本申请实施例中,中枢设备可以有多个,在这个多个中枢设备中,其中一个为主中枢设备,其他的为备用中枢设备,在主中枢设备出现故障不能正常工作时,某一个备用中枢设备便可以代替主中枢设备正常工作。
在本申请实施例中,家庭中的家居设备可以包括敏感设备和非敏感设备。敏感设备上可以集HiChain相关组件,并且可以自己生成该敏感设备的公钥和私钥相关信息,其内存相对于非敏感设备而言较大。而非敏感设备内存相对较小,不能集成HiChain相关组件,因此其自身不能生成公钥和私钥相关信息。例如,敏感设备可以包括家中的摄像头、无绳电话、个人数字处理(personal digital assistant,PDA)、笔记本电脑、打印机等与用户个人隐私相关的设备。非敏感设备可以包括家中的智能灯、智能插座、智能冰箱等与用户个人隐私不相关或者弱相关的设备,本申请实施例对此并不限定。
目前,用户通过中枢设备对于家中的敏感设备进行控制。用户通过使用的电子设备向敏感设备发送控制命令,该控制命令通过云端(例如为智能家居云)发送给中枢设备,中枢设备再将该控制命令(或者也可以称为控制信息)转发给敏感设备,从而实现用户对于敏感设备的控制。用户通过中枢设备对于敏感设备的控制命令,是基于 端到端认证和加密的。也就是说,该控制命令是基于用户使用的电子设备(例如为用户使用的手机的应用程序(application,APP)和与敏感设备之间进行加密的,云端只是转发该控制命令,不能感知该控制命令的具体内容,可以有效避免该控制命令被篡改,避免了因控制命令暴露在云端而导致的信息泄露和仿冒,对于云服务的运营方可以自证清白,增加了安全性。
应理解,在本申请实施例中,用户使用的电子设备可以是和云端设备进行通信的设备。例如,该电子设备可以为用户使用的手机、PDA、笔记本电脑、可穿戴电子设备等。用户可以利用该电子设备实现对于敏感设备和非敏感设备的控制,即利用该电子设备,通过云端和中枢设备向非敏感设备和敏感设备发送信息。
下文的描述中,将非敏感设备称为第一电子设备,用户使用的电子设备称为第二电子设备,敏感设备称为第五电子设备进行说明。在本申请实施例中,用户使用的第二电子设备也可以称为控制端设备,该控制端设备例如可以为用户使用的手机、PDA、笔记本电脑、可穿戴电子设备等。
图1所示的为一例用户通过中枢设备对于家中的第五电子设备和第一电子设备进行控制的示意性场景图。如图1所示的,中枢设备(为了区分,称为中枢设备A)可以管理多个第五电子设备和多个第一电子设备,图1所示为一个第五电子设备和一个第一电子设备的场景。用户对于第五电子设备的控制命令,通过用户使用的第二电子设备(例如为手机)与中枢设备A之间的通信链路传输至中枢设备A,再通过中枢设备A发送至第五电子设备,从而实现用户对于第五电子设备的控制。其中,用户使用的第二电子设备与中枢设备A之间的通信链路可以是基于蜂窝网络协议建立的云端传输链路,例如为基于5G或者4G通信技术建立的通信链路。
图2所示的为在图1所示的场景中用户利用第二电子设备对于第五电子设备进行控制的方法100的示意性流程图。
如图2所示的,在S101中,用户家中的第五电子设备(例如为第五电子设备1)首先注册到中枢设备A上,与中枢设备A建立通信连接。例如,第五电子设备与中枢设备A之间可以建立基于无线保真(wireless-fidelity,WIFI)、蓝牙等通信协议的通信连接。并且,在S101中,第五电子设备还会向中枢设备A上报自己具备密钥协商能力,所述密钥协商能力可以理解为第五电子设备自己具有生成公钥信息和私钥信息的能力以及端到端的秘钥协商能力。
S102,用户家中的第五电子设备注册或者接入到云端设备上,例如向云端设备上报自己的标识、设备ID等信息。
在S103中,中枢设备A向云端设备发送注册信息,注册到云端设备上(本申请实施例中,云端设备可以称为家居云),该注册信息包括:中枢设备类型标识、第五电子设备的标识以及第五电子设备的模式。第五电子设备的模式包括该第五电子设备为中枢模式以及该第五电子设备支持端到端的密钥协商能力。其中,中枢设备类型标识用于指示该设备为中枢设备。在本申请实施例中,中枢模式可以理解为该第五电子设备需要通过中枢设备A与外网中的设备进行通信,外网中的设备(例如为第二电子设备)需要向第五电子设备发送信息时,需要先发给中枢设备A,由中枢设备A转发给第五电子设备。第五电子设备需要向外网中的设备发送信息时,需要将信息先发给 中枢设备A,再由中枢设备A转发给外网中的设备。由于在S101中,中枢设备A已经获知该第五电子设备具备密钥协商能力,因此,中枢设备A便可以确定不需要代替第一电子设备进行密钥的协商过程,即中枢设备A只需要进行信息的转发过程即可。
S104,第二电子设备从云端设备获取该第五电子设备的信息以及该第五电子设备支持端到端的密钥协商能力。例如,该第五电子设备的信息包括该第五电子设备为中枢模式。
在S105中,第五电子设备自己生成第五电子设备的公钥和私钥信息。
在S106中,第二电子设备自己生成第二电子设备的公钥和私钥信息。
在S107中,第二电子设备获取用户在第二电子设备的APP上输入第五电子设备的个人识别码(personal identification number,PIN)码。
在S108中,第二电子设备和第五电子设备基于第五电子设备PIN码进行简单的密码指数密钥交换(simple password exponential key exchange,SPEKE)协商,生成共享密钥A。第二电子设备和第五电子设备通过第五电子设备PIN码进行SPEKE协商生成共享密钥A的过程可以参考下图中图6所示的具体流程,这里不再赘述。
在S109中,第二电子设备利用生成的共享密钥A,进行公钥交换。第二电子设备在确定该第五电子设备为中枢模式后,会执行该第五电子设备添加到设备安全保护列表操作,并请求与第五电子设备进行公钥交换。第二电子设备将自己的公钥信息通过共享密钥A进行加密,得到公钥交换报文,公钥交换报文中携带第五电子设备的标识。第二电子设备将该公钥交换报文先发送给云端设备,云端设备再将该公钥交换报文转发给中枢设备A,中枢设备A将该公钥交换报文转发给第五电子设备,第五电子设备收到该公钥交换报文后,利用共享密钥A进行解密,确定报文中携带的设备标识为第五电子设备的标识,第五电子设备便获取到了第二电子设备的公钥信息。第五电子设备还可以基于第二电子设备的账号,保存第二电子设备的公钥信息。
在S110中,第五电子设备在获取到第二电子设备的公钥信息后,将第五电子设备的公钥信息利用共享密钥A进行加密,得到公钥交换报文,第五电子设备将该公钥交换报文发送给中枢设备A,中枢设备A将该公钥交换报文先转发给云端设备,云端设备再将该公钥交换报文转发给第二电子设备,第二电子设备收到该公钥交换报文后,便可以获取该第五电子设备的公钥信息,即完成了公钥交换过程。第二电子设备还可以基于第五电子设备的标识,保存该第五电子设备的公钥信息。
在S111中,第二电子设备和第五电子设备之间基于第五电子设备的公钥信息和私钥信息,以及第二电子设备的公钥信息和私钥信息,进行端到端(station to station,STS)协商,通过加密算法(例如椭圆曲线算法等)生成共享密钥B,进一步的,并利用交换的公钥信息进行身份认证。
在S112中,在身份认证通过后,第二电子设备通过云端设备和中枢设备A,向第五电子设备发送利用共享密钥B加密后的控制命令。具体的,用户对于第五电子设备的控制命令在第二电子设备上通过该共享密钥B进行加密,经过加密的控制命令通过云端设备的转发传输至中枢设备A。由于云端不能获知该密钥,因此不能感知该控制命令的具体内容。中枢设备A再将加密后的控制命令转发至第五电子设备,第五电子设备利用该共享密钥B解密该控制命令。从而实现了用户通过中枢设备A对于家中的 第五电子设备进行控制。
其中,S111可以理解为第二电子设备和第五电子设备基于交换的公钥信息,进行端到端STS协商,通过加密算法生成称为共享密钥B的过程,其具体流程可以参考下图中图7所示的具体流程,这里不再赘述。
而对于第一电子设备,由于其内存相对较小,自身不能集成HiChain相关组件,例如,不能集成身份认证组件以及端到端加密协商的能力,因此,第一电子设备没有与用户使用的第二电子设备(例如为用户使用的手机)进行端到端密钥协商的能力,用户对于第一电子设备的控制命令通过云端发送给中枢设备A,中枢设备A再将该控制命令转发给第一电子设备。
图3所示的为在图1所示的场景中,第二电子设备对于第一电子设备进行控制的方法200的示意性。如图3所示的:
在S201中,用户家中的第一电子设备首先接入或者注册到中枢设备A,与中枢设备A建立通信连接。例如,第一电子设备与中枢设备A之间可以建立基于WIFI、蓝牙等通信协议的通信连接。在S101中,第一电子设备还可以向中枢设备A上报自己的标识、设备ID等信息。
S202,用户家中的第一电子设备注册或者接入到云端设备上,例如向云端设备上报自己的标识、设备ID等信息。
在S203中,中枢设备A向云端设备发送注册信息,注册到云端设备上,该注册信息包括:中枢设备类型标识、第一电子设备的标识、第一电子设备的模式。第一电子设备的模式包括该第一电子设备为中枢模式。在本申请实施例中,中枢模式可以理解为该第一电子设备需要通过中枢设备A与外网中的设备(例如为第二电子设备)进行通信,外网中的设备需要向第一电子设备发送信息时,需要先发给中枢设备A,由中枢设备A转发给第一电子设备。第一电子设备需要向外网中的设备发送信息时,需要将信息先发给中枢设备A,再由中枢设备A转发给外网中的设备。
S204,第二电子设备从云端设备获取该第一电子设备的信息以及该第一电子设备为中枢模式。例如,该非敏感设的信息可以包括该第一电子设备的标识、设备ID等信息。
在S205中,第二电子设备通过云端设备和中枢设备A向第一电子设备发送控制命令。
具体的,用户对于第一电子设备的控制命令,第二电子设备将该控制命令通过云端转发至中枢设备A,中枢设备A再将该控制命令转发给第一电子设备,从而实现了用户通过中枢设备A对于家中的第一电子设备进行控制。
但是,对于第一电子设备而言,该控制命令没有进行端到端加密,云端可以感知具体的控制命令,不能避免信息(例如控制命令)的泄露和仿冒,云端可以获知该控制命令并且可能篡改该控制命令,降低了安全性,存在泄漏用户隐私的风险。并且,不能保证用户对于第一电子设备控制的准确性,影响了用户体验。
有鉴于此,本申请提供了一种密钥协商的方法,在第一电子设备通过中枢设备与第二电子设备进行通信的过程中,中枢设备代替第一电子设备与第二电子设备进行协商,并代替第一电子设备生成共享密钥,第二电子设备向第一电子设备发送的信息, 在第二电子设备上便可以利用该共享密钥进行加密,加密后的信息通过云端传输给中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了第二电子设备和中枢设备之间信息(例如控制命令)传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
下面结合具体的例子说明本申请提供的密钥协商的方法。
图4是一例适用于本申请实施例的无线通信系统的架构示意图。如图4所示的,中枢设备可以管理多个第一电子设备,图4所示为一个第一电子设备(非敏感设备)和一个第五电子设备(敏感设备)的场景。用户对于第一电子设备的控制命令,通过用户使用的第二电子设备(例如智能手机)与中枢设备(为了区分,称为第一中枢设备)之间的通信链路传输至中枢设备,再通过第一中枢设备发送至第一电子设备,从而实现用户对于第一电子设备的控制。其中,第二电子设备与第一中枢设备之间的通信链路可以是基于蜂窝网络协议建立的云端传输链路。第五电子设备与第一中枢设备之间可以建立基于WIFI、蓝牙等通信协议的通信连接。
应该理解,在本申请实施例中,对于中枢设备的个数和第一电子设备的个数不作限制。例如,在图4所示的场景中,还可以存在多个中枢设备,以及更多的第一电子设备,进一步的,在图4所示的场景中,还可以包括多个第五电子设备。本申请实施例中在此不作限制。
还应理解,在本申请实施例中,HiChain相关组件也可以替换为其他组件或者称为其它名称,只要该组件可以完成密钥生成、密钥协商以及加解密处理等即可,本申请实施例在此不作限制。下文的描述中,将以HiChain相关组件为例进行说明。
图5所示的为在如图4所示的架构中,本申请提供的密钥协商的方法300示意性流程图。如图5所示的,该方法300包括:S301至S312。
S301,用户使用的第二电子设备(例如为手机上的某个APP)生成该第二电子设备的公钥信息(用cpk1表示)和私钥信息(用cpk2表示)。该公钥信息和私钥信息对应于该第二电子设备的账号。
S302,第一电子设备(例如为第一电子设备1)接入或者注册到第一中枢设备上。例如,在本申请实施例中,第一电子设备可以通过authcode方式接入到第一中枢设备上。其中,authcode可以理解为使用异或运算进行加密和解密的函数,authcode函数的作用就是给传递的数据提供加密保护作用。在数据到达终端时,在利用authcode把加密的数据进行反向解密,还原数据。换句话说,在第一电子设备和第一中枢设备之间传输的信息可以利用authcode函数进行加密。其中,第一电子设备与第一中枢设备之间可以建立基于WIFI、蓝牙等通信协议的通信连接。在S202中,第一电子设备还可以自己的个人识别码(personal identification number,PIN)、设备ID等信息发送给第一中枢设备。并且,在S302中,第一电子设备还可以向第一中枢设备上报自己不具备密钥协商能力。在本申请实施例中,第一电子设备不具备密钥协商能力意味着第一电子设备不能生成自己的公钥信息和私钥信息,并且,不具备端到端密钥协商能力。
可选的,在本申请实施例中,第一电子设备的第一识别码包括第一电子设备的PIN码。
S303,第一电子设备接入或者注册到云端设备上,例如,例如向云端设备上报或 者注册自己的标识、设备属性等信息。
在S304中,在第一电子设备注册到第一中枢设备上以后,由于第一中枢设备已经获知该第一电子设备不具备密钥协商能力以及不具有生成公钥信息和私钥信息的能力,因此,第一中枢设备便可以确定要代替第一电子设备进行密钥的协商过程,而密钥的协商过程需要用到第一电子设备的公钥信息和私钥信息,因此,第一中枢设备可以代替第一电子设备生成第一电子设备的公钥信息(用csk1表示)和私钥信息(用csk2表示)。具体的,第一中枢设备可以自己生成一个公钥信息和私钥信息,然后将该公钥信息和私钥信息与第一电子设备的设备ID相关联,与第一电子设备的设备ID相关联的公钥信息和私钥信息即为第一中枢设备生成的第一电子设备的公钥信息和私钥信息。
在S305中,第一中枢设备向云端设备发送注册信息,注册到云端设备上(本申请实施例中,云端设备也可以称为家居云),该注册信息包括:中枢设备类型标识、第一电子设备的标识以及第一电子设备的模式。第一电子设备的模式包括该第一电子设备为中枢模式以及该第一电子设备支持密钥协商能力。其中,中枢设备类型标识用于指示该设备为中枢设备。在本申请实施例中,中枢模式可以理解为该第一电子设备需要通过第一中枢设备与外网中的设备(例如第二电子设备)进行通信,外网中的设备需要向第一电子设备发送信息时,需要先发给第一中枢设备,由第一中枢设备转发给第一电子设备。第一电子设备需要向外网中的设备发送信息时,需要将信息先发给第一中枢设备,再由第一中枢设备转发给外网中的设备。应理解,在本申请实施例中,S303这个步骤可以由S305代替,即S303为可选的步骤。
在S306中,第二电子设备从云端设备获取该第一电子设备的信息以及该第一电子设备支持端到端的密钥协商能力。例如,该第一电子设备的信息包括该第一电子设备为中枢模式。
在S307中,第二电子设备获取用户在第二电子设备的APP上输入第一电子设备的PIN码。
在S308中,第二电子设备和第一中枢设备基于第一电子设备PIN码进行SPEKE协商,生成第二共享密钥,并分别保存第二共享密钥。第二电子设备和第一中枢设备通过第一电子设备的PIN码进行SPEKE协商生成第二共享密钥的过程可以参考下图中图6所示的具体流程,这里不再赘述。
在S309中,第二电子设备通过云端设备,向第一中枢设备发送经过第二共享密钥加密后的第二电子设备的公钥信息。例如,第二电子设备在确定该第一电子设备为中枢模式后,会执行第一电子设备添加到设备安全保护列表操作,并请求与第一电子设备进行公钥交换。第二电子设备将自己的公钥信息通过第二共享密钥进行加密,得到公钥交换报文,公钥交换报文中携带第一电子设备的标识。第二电子设备将该公钥交换报文先发送给云端设备,云端设备再将该公钥交换报文转发给第一中枢设备。第一中枢设备收到该公钥交换报文后,利用第二共享密钥进行解密,确定报文中携带的设备标识为第一电子设备的标识,则代替第一电子设备进行公钥信息的交换。这样,第一中枢设备便获取了第二电子设备的公钥信息。第一电子设备还可以基于第二电子设备的账号,保存第二电子设备的公钥信息。
在S310中,第一中枢设备通过云端设备,向第二电子设备发送经过第二共享密钥加密后的第一电子设备的公钥信息。例如,第一中枢设备在获取到第二电子设备的公钥信息后,将第一电子设备的公钥信息利用第二共享密钥进行加密,得到公钥交换报文,第一中枢设备将该公钥交换报文先发送给云端设备,云端设备再将该公钥交换报文转发给第二电子设备,第二电子设备收到该公钥交换报文后,便可以获取该第一电子设备的公钥信息,即完成了公钥交换过程。
在S311中,第二电子设备和第一中枢设备之间基于第一电子设备的公钥信息和私钥信息,以及第二电子设备的公钥信息和私钥信息,进行STS协商,通过加密算法(例如椭圆曲线算法等)生成第一共享密钥,并利用交换的公钥信息进行身份认证。进一步的,第二电子设备和第一中枢设备可以分别保存该第一共享密钥。
换句话说,S311的过程为第二电子设备和第一中枢设备进行STS协商,利用加密算法生成第一共享密钥的过程。也就是说,第二电子设备和第一中枢设备维护相同的第一共享密钥。在S314之后,第二电子设备和第一中枢设备便完成了端到端的密码协商过程。其具体流程可以参考下图中图7所示的具体流程,这里不再赘述。
在S312中,第一中枢设备还可以将该第一共享密钥通过authcode函数加密发送给该第一电子设备。应理解,S312为可选的步骤。
在S313中,第二电子设备通过云端设备和第一中枢设备向第一电子设备发送经过第一共享密钥加密的信息。例如,该信息可以包括第二电子设备对于第一电子设备的控制命令。
具体的,在S313中,用户利用第二电子设备向第一电子设备发送信息时,该信息在第二电子设备上利用第一共享密钥进行加密,加密后的消息传输至云端设备,云端设备将该加密后的信息转发给第一中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息的具体内容,不能对该信息进行篡改等,从而提高了信息的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
在本申请实施例中,如果上述方法300不包括S312,在S313中,用户需要发送的信息在第二电子设备上利用第一共享密钥进行加密,加密后的信息传输至云端设备,云端设备将该加密后的信息转发给第一中枢设备后,第一中枢设备可以利用该第一共享密钥对该控信息进行解密,将解密后的信息利用authcode函数加密发送给第一电子设备。第一电子设备接收到该加密后的信息后,利用authcode函数进行解密,从而获取该信息的具体内容,根据信息的具体内容执行相应的操作。
在本申请实施例中,如果上述方法300包括S312,在S313中,用户需要发送的信息在第二电子设备上利用第一共享密钥进行加密,加密后的信息传输至云端设备,云端设备将加密后的信息转发给第一中枢设备后,第一中枢设备可以利用第一共享密钥对该信息进行解密,将解密后的信息利用authcode函数加密发送给第一电子设备。或者,第一中枢设备也可以不对该信息进行解密,而是将利用第一共享密钥加密后的信息再利用authcode函数加密后发送给第一电子设备。第一电子设备接收到该加密后的信息后,利用authcode函数和第一共享密钥对该信息进行解密,从而获取信息的具体内容,根据信息的具体内容执行相应的操作。
可选的,在本申请实施例中,如果上述方法300包括S312,在S313中,由于第 一电子设备已经获取了该第一共享密钥,在第一中枢设备出现故障不能使用的情况下,该第一电子设备可以利用该第一共享密钥,直接通过云端设备与第二电子设备进行通信。换句话说,在第一中枢设备出现故障不能使用的情况下,用户需要发送的信息在第二电子设备上利用第一共享密钥进行加密,加密后的信息传输至云端设备,云端设备将该加密后的信息转发给该第一电子设备,第一电子设备接收到该加密后的信息后,利用第一共享密钥对该信息进行解密,从而获取该信息的具体内容,根据信息的具体内容执行相应的操作。从而保障了信息传输的可靠性,提高信息传输的效率。
在图4所示的场景中,对于第五电子设备而言,第五电子设备的控制命令的处理流程可以参考图2所示的方法100的具体流程的描述,图2中所示的第一中枢设备可以替换为第一中枢设备,为了简洁,这里不再赘述。
下面结合图6,说明第二电子设备和第一中枢设备基于第一电子设备PIN码进行SPEKE协商生成第二共享密钥的方法,即方法S300中的S308中包括的具体流程。如图6所示的,S308具体包括:S3081至S3088。
S3081,第二电子设备通过云端设备,向第一中枢设备发送SPEKE协商请求消息。
S3082,第一中枢设备根据SPEKE协商请求消息,生成随机数盐值1(用salt1表示)。
在S3083中,第一中枢设备通过云端设备,向第二电子设备发送该salt1。
在S3084中,第二电子设备根据salt1表示、第一电子设备的PIN码生成第二电子设备侧的SPEKE的第二公钥(用pk2表示)和第二私钥(用sk2表示),并生成随机挑战值2(用challenge2表示)。
S3085,第二电子设备通过云端设备向第一中枢设备上发送SPEKE协商请求响应消息,该SPEKE协商请求响应消息携带pk2和challenge2。
在S3086中,第一中枢设备根据salt1与第一电子设备的PIN码生成第一中枢设备侧的第一SPEKE公钥(用pk1表示)和第一SPEKE私钥(sk1),根据pk2和sk1生成共享密钥1(SharedSecret1),共享密钥1(SharedSecret1)再加上salt1派生出会话密钥1(SessionKey1)、会话密钥2(SessionKey2);第一中枢设备生成随机挑战值1(用challenge1表示)。然后根据SessionKey2和两个挑战值(challenge1和challenge2)生成第一中枢设备侧的凭证:哈希消息认证码(hash-based message authentication code,HMAC1),最后根据SessionKey1、SessionKey2以及salt1生成第二共享密钥。例如,该第二共享密钥可以为数据加密密钥(DataEncKey)。
S3087,第一中枢设备通过云端设备向第二电子设备上发送SPEKE协商消息。该消息包括:pk1、HMAC1。
S3088,第二电子设备根据pk1、sk2生成共享密钥2(SharedSecret2),使用共享密钥2及salt1派生出会话密钥3(SessionKey3)、会话密钥4(SessionKey4),并利用SessionKey3、SessionKey4验证HMAC1,验证通过后,根据会话密钥3(SessionKey3)、会话密钥4(SessionKey4)以及salt1生成第二共享密钥。
应该理解,在方法100中的S108中,第二电子设备和第五电子设备通过第五电子设备PIN码进行SPEKE协商生成第一共享密钥的过程和图6所示的流程类似,区别在于S108中是第二电子设备和第五电子设备之间进行SPEKE协商,并且是基于第五 电子设备的PIN码进行SPEKE协商。而图6所示的流程为第二电子设备和第一中枢设备之间进行SPEKE协商,并且,是基于第一电子设备的PIN码进行SPEKE协商。第二电子设备和第五电子设备通过第五电子设备PIN码进行SPEKE协商生成第一共享密钥的过程可以参考图6所示的具体流程描述,这里不再赘述。
下面结合图7,说明第二电子设备和第一中枢设备进行STS协商,利用加密算法生成第一共享密钥的具体流程400,即方法300中的S311包括的具体流程。如图7所示的,S311包括的具体流程400包括:S401至S407。
S401,第一中枢设备生成随机数盐值(用salt表示);基于第一电子设备的私钥信息(csk2)、第二电子设备的公钥信息(cpk1)生成共享密钥3(用SharedKey3表示),基于salt和SharedKey3生成会话密钥3(用SessionKey3表示),使用第一中枢设备的长效身份标识(用lsk1表示)签名设备身份和会话信息,得到签名1(用sign1表示),并使用SessionKey3加密sign1,得到认证数据1(用authData1表示)。
在S402中,第一中枢设备通过云端设备向第二电子设备发送STS协商消息,该消息携带:salt、authData1。
在S403中,第二电子设备基于第二电子设备的私钥信息(用csk1表示)、第一电子设备的公钥信息(用cpk2表示)生成共享密钥4(用SharedKey4表示),基于SharedKey4和salt派生会话密钥4(用SessionKey4表示),解密authData1并验证sign1,使用第二电子设备的长效身份标识(用lsk2表示)签名身份和会话信息,得到签名2(用sign2表示),使用会话密钥4加密sign2,challenge3作为加密时的信息,得到认证数据2(用authData2表示)。
在S404中,第二电子设备通过云端设备向第一中枢设备发送STS协商验证请求,该请求携带authData2。
在S405中,第一中枢设备解密authData2并验证sign2,生成会话ID,基于会话密钥3和salt生成第一共享密钥(DataEncKey)。第一中枢设备保存会话ID、第一共享密钥、第一中枢设备的通用唯一识别码(universally unique identifier,UUID)。
在S406中,第一中枢设备通过云端设备向第二电子设备返回STS协商认证结果(authRet),携带会话ID和会话密钥3。
在S407中,第二电子设备解密协商认证结果并验证错误码,解密获得会话ID,基于会话密钥3和salt生成第一共享密钥(DataEncKey);第二电子设备保存设备ID对应的会话ID和该第一共享密钥。
换句话说,S401至S407的过程为第二电子设备和第一中枢设备进行STS协商,利用加密算法生成第一共享密钥的过程。也就是说,第二电子设备和第一中枢设备维护相同的第一共享密钥。
应该理解,在方法100的S111中,第二电子设备和第五电子设备进行STS协商协商生成第二共享密钥的过程和图7所示的流程类似,区别在于S111中是第二电子设备和第五电子设备之间进行STS协商,基于的是第五电子设备的公钥信息。而图7所示的流程为第二电子设备和第一中枢设备之间进行STS协商,基于的是第一电子设备的公钥信息,即第一中枢设备代替第一电子设备与第二电子设备之间进行STS协商。第二电子设备和第五电子设备通过STS协商生成第二共享密钥的过程可以参考图7所 示的具体流程描述,这里不再赘述。
可选的,在本申请实施例中,如果在图4所示的场景中,除了图4中所示的第一中枢设备(即主中枢设备)之外,还存在一个或者多个第二中枢设备(即备用中枢设备)。例如,图8是另一例适用于本申请实施例的无线通信系统的架构示意图。如图8所示的场景中包括一个主中枢设备(第一中枢设备)和一个备用中枢设备(第二中枢设备)。
应该理解,在本申请实施例中,对于备用中枢设备的个数和第一电子设备的个数不作限制。例如,在图8所示的场景中,还可以存在多个备用的中枢设备,以及更多的第一电子设备,本申请实施例中在此不作限制。
图9所示的为在如图8所示的架构中,本申请提供的密钥协商的方法500示意性流程图。如图9所示的,该方法500包括:S501至518。
其中,S501至S513对应的具体步骤的描述可以参考上述方法300中S301至S313中对应步骤的描述,为了简洁,这里不再赘述。
S514,在第一中枢设备为不可用的状态时(例如第一中枢设备下电、搬离、出现故障、第一中枢设备与云端之间的链路断掉或者第一中枢设备与第一电子设备之间的链路断掉等)。第一电子设备会接入或者注册到第二中枢设备上。例如,在本申请实施例中,第一电子设备可以通过authcode方式接入到第二中枢设备上。在S514中,第一电子设备还可以自己的PIN码发送给第二中枢设备。并且,在S514中,第一电子设备还可以向第二中枢设备上报自己不具备密钥协商能力。
在S515中,第一电子设备可以将该第一共享密钥通过authcode函数加密后发送给该第二中枢设备。
在S516中,第二中枢设备向云端设备发送注册信息,注册到云端设备上,该注册信息包括:中枢设备类型标识、第一电子设备的标识以及第一电子设备的模式。其中,第一电子设备的模式为中枢模式。可选的,在S516中,第一电子设备的模式还可以包括该第一电子设备支持端到端的密钥协商能力。
在S517中,第二电子设备从云端设备获取该第一电子设备的信息后,由于之前第一中枢设备已经向该云端设备上报过该第一电子设备第一电子设备支持端到端的密钥协商能力,因此,在第二电子设备确定该第一电子设备的信息后,便可以确定该第一电子设备支持端到端的密钥协商能力。由于第二电子设备已经与该第一电子设备之间生成了第一共享密钥,在第二电子设备获取该第一电子设备的标识后,便可以确定向该第一电子设备发送的控制命令需要利用该第一共享密钥进行加密。
在S518中,第二电子设备通过云端设备和第二中枢设备向第一电子设备发送经过第一共享密钥加密的信息。
具体的,在S518中,用户需要通过第二电子设备向第一电子设备发送信息时,第二电子设备利用第一共享密钥加密信息,将该加密后的信息传输至云端设备,云端设备将该加密后的信息转发给第二中枢设备。第二中枢设备可以利用该第一共享密钥对该信息进行解密,将解密后的信息利用authcode函数加密发送给第一电子设备,第一电子设备接收到该加密后的信息后,利用authcode函数进行解密,从而获取该信息的具体内容,根据信息执行相应的操作。或者,第二中枢设备也可以不对该信息进行解 密,而是将利用第一共享密钥加密后的信息再利用authcode函数加密后发送给该第一电子设备。该第一电子设备接收到该加密后的信息后,利用authcode函数和第一共享密钥对该信息进行解密,从而获取该信息的具体内容,根据信息执行相应的操作。
在如图8所示的架构中,可选的,作为另外一种可能的实现方式,如图10所示的,图10所示的为在图8所示的架构中,本申请提供的密钥协商的方法600示意性流程图。如图10所示的,该方法600包括:S601至S615。应理解,图10所示的流程可以在图5所示的流程之后执行。
S601,在第一中枢设备为不可用的状态时(例如第一中枢设备下电、搬离、出现故障、第一中枢设备与云端之间的链路断掉或者第一中枢设备与第一电子设备之间的链路断掉等),第二中枢设备和第一中枢设备之间的心跳断连,第二中枢设备变成主用状态。在本申请实施例中,由于第一中枢设备会向第二中枢设备周期性的发送心跳报文,第二中枢设备收到该心跳报文后,会周期性的向第一中枢设备发送心跳响应报文,第一中枢设备收到该心跳响应报文后,便可以确定第二中枢设备为可用状态。如果第一中枢设备在一段时间内没有收到该心跳响应报文,则可以确定第二中枢设备为不可用状态。如果第二中枢设备在一段时间内没有收到该心跳报文,则可以确定该第一中枢设备为不可用状态。在本申请实施例中,第二中枢设备和第一中枢设备之间的心跳断连可以理解为:第一中枢设备通过判断第二中枢设备发送的心跳响应报文,判断第二中枢设备是否为可用状态;第二中枢设备通过判断第一中枢设备发送的心跳报文,判断第一中枢设备是否为可用状态。
在本申请实施例中,第一中枢设备和第一电子设备之间也存在周期性的心跳报文的发送、接收,以及周期性的心跳响应报文的发送和接收。具体的,第一中枢设备会向第一电子设备周期性的发送心跳报文,第一电子设备收到该心跳报文后,会周期性的向第一中枢设备发送心跳响应报文,第一中枢设备收到该心跳响应报文后,便可以确定第一电子设备为可用状态。如果第一电子设备在一段时间内没有收到第一中枢设备发送的该心跳报文,则第一电子设备可以确定该第一中枢设备为不可用状态。第一中枢设备在一段时间内没有收到第一电子设备发送的心跳响应报文,则第一中枢设备可以确定该第一电子设备为不可用状态。
S602,第一电子设备确定主用中枢设备为不可用的状态时,第一电子设备从第一中枢设备上下线。
S603,第一电子设备向第二中枢设备发送中枢探测报文。例如,该中枢探测报文可以通过可以通过广播或者组播方式的发送的。
S604,第二中枢设备接到该中枢探测报文后,向第一电子设备发送响应报文,使第一电子设备和第二中枢设备相连接。
S605,第一电子设备接收到该响应报文后,接入或者注册到该第二中枢设备上,并将可以自己的PIN码发送给第二中枢设备,并且,在S605中,第一电子设备还可以向第二中枢设备上报自己不具备密钥协商能力。
S606,在第一电子设备注册到第二中枢设备上以后,由于第二中枢设备已经获知该第一电子设备不具备密钥协商能力以及不具有生成公钥信息和私钥信息的能力,因此,第二中枢设备便可以确定要代替第一电子设备进行密钥的协商过程,而密钥的协 商过程需要用到第一电子设备的公钥信息和私钥信息,因此,第二中枢设备便可以代替第一电子设备生成第一电子设备的公钥信息和私钥信息。
在S607中,第二中枢设备向云端设备发送注册信息,注册到云端设备上,该注册信息包括:中枢设备类型标识、第一电子设备的标识以及第一电子设备的模式。该第一电子设备的模式包括该第一电子设备为中枢模式以及该第一电子设备支持端到端的密钥协商能力。
在S607之后,S608至S615对应的具体步骤的描述可以参考上述方法300中S306至S313中对应步骤的描述,为了简洁,这里不再赘述。
可选的,在方法600中,作为另外的一种可能的实现方式,在S605之后,可以不用执行S606至S615,取而代之的步骤为方法500中的S515至S518。换句话说,在S605之后,如果第一中枢设备与第二电子设备已经通过STS协商生成了第一共享密钥,则第一电子设备可以将该已经生成的第一共享密钥通过authcode函数加密后发送给该第二中枢设备,第二中枢设备不用在和第二电子设备重新进行STS协商生成新的共享密钥。这样可以降低流程的复杂度,节省信令开销。
在图8所示的场景中,对于第五电子设备而言,第一中枢设备为不可用的状态时,第五电子设备将接入或者注册到第二中枢设备上,对于第五电子设备的控制命令的处理流程可以参考图2所示的方法100的具体流程的描述,图2中所示的中枢设备A即为该第二中枢设备,为了简洁,这里不再赘述。
本申请提供的密钥协商的方法,在存在第一中枢和第二中枢设备的场景中,在第一中枢设备与第一电子设备之间的链路断掉的情况下,第一电子设备会重新接入或者注册到第二中枢设备上,第二中枢设备和第二电子设备之间通过云端传输的对于第一电子设备的控制命令,利用第一中枢设备代替第一电子设备协商好的共享密钥进行加密,或者利用第二中枢设备和第二电子设备协商好的共享密钥进行加密。由于云端不能获知该共享密钥,因此不能获知该控制命令,不能对该控制命令进行篡改等,从而提高了控制命令传输的安全性。并且,保障了控制命令传输的可靠性,提高控制命令传输的效率。
图11是另一例适用于本申请实施例的无线通信系统的架构示意图。如图11所示的,中枢设备可以管理多个第一电子设备和第五电子设备,图11所示为一个第一电子设备和一个第五电子设备的场景。其中,在图11所示的例子中,控制端设备包括一个主控制端设备(第二电子设备)和多个从属控制端设备(第三电子设备)。图11所示为一个从属控制端设备的场景。在图11所示的例子中,主控制端设备和从属控制端设备分别对应不同的账号,则从属控制端设备和主控制端设备分别对应的公钥信息不相同,分别对应的私钥信息也不相同。例如,主控制端设备可以为用户使用的智能手机,从属控制设备为用户使用的PAD等。主控制端设备以及从属控制端设备分别与第一中枢设备之间的通信链路可以是基于蜂窝网络协议建立的云端传输链路。第一电子设备与第一中枢设备之间可以建立基于WIFI、蓝牙等通信协议的通信连接。
应该理解,在本申请实施例中,对于第三电子设备的个数不作限制。例如,在图11所示的场景中,还可以存在多个第三电子设备,本申请实施例中在此不作限制。
作为一种可能的实现方式,图12所示的为在如图11所示的架构中,本申请提供 的密钥协商的方法700示意性流程图。其中,图12所示为第二电子设备(主控制端设备)和第三电子设备(从属控制端设备)分别对应不同的账号的情况。如图12所示的,该方法700包括:S701至S725。
其中,S701至S713对应的具体步骤的描述可以参考上述方法300中S301至S313中对应步骤的描述,为了简洁,这里不再赘述。
S714,第三电子设备生成该第三电子设备的公钥信息和私钥信息。该公钥信息和私钥信息对应于该第三电子设备的账号。
在S715中,第三电子设备控制第一电子设备时(例如第二电子设备将中枢下的第一电子设备分享给第三电子设备进行控制时),第三电子设备和第二电子设备之间进行SPEKE协商,生成第四共享密钥。S715的具体过程可以参考方法300中对S308的描述,为了简洁,这里不再赘述。
在S716中,第二电子设备利用S715中SPEKE协商完成的第四共享密钥对第一电子设备的公钥信息进行加密,将加密后的第一电子设备的公钥信息发送给第三电子设备。进一步的,第三电子设备可以保存该第一电子设备的公钥信息。
在S717中,第三电子设备利用S715中SPEKE协商完成的第四共享密钥将第三电子设备的公钥信息加密后发送给第二电子设备。进一步的,第二电子设备可以保存该第三电子设备的公钥信息。
在S718中,第二电子设备将第三电子设备的公钥信息利用第五加密密钥加密后上传到云端设备。这里的第五加密密钥为第二电子设备利用第二电子设备的公钥信息和私钥信息生成的。
在S719中,云端设备之前存储的为第二电子设备的公钥信息。在第二电子设备将第三电子设备的公钥信息上传到云端设备后,云端设备储存的公钥信息会发生变化,因此,云端设备会向中枢设备发送公钥变化事件的通知,用于向中枢设备通知自己存储的公钥信息发生了变化。
在S720中,第一中枢设备收到该公钥变化事件的通知后,从云端设备获取加密后的第三电子设备的公钥信息。
S721,由于第一中枢设备从云端获取的第三电子设备的公钥信息是利用S718中的第五加密密钥进行加密的。因此,第二电子设备还可以将自己的公钥信息和私钥信息通过安全克隆(Secclone)的方式发送给第一中枢设备,第一中枢设备可以利用第二电子设备的公钥信息和私钥信息生成第五解密密钥。可选的,在S721中,第二电子设备还可以将自己的公钥信息和私钥信息利用和第一中枢设备协商的第一共享密钥或者第二公钥密钥进行加密后发送给第一中枢设备。
S722,第一中枢设备获取到该第二电子设备的公钥信息和私钥信息后,利用第二电子设备的公钥信息和私钥信息生成的第五解密密钥,对获取的加密后的第三电子设备的公钥信息进行解密,得到该第三电子设备的公钥信息。
S723至S725的步骤与方法300中的S311至S313类似,对应的具体步骤的描述可以参考上述方法300中S311至S313中对应步骤的描述,为了简洁,这里不再赘述。区别在于S311至S313为第二电子设备(即方法300中的控制端设备)和第一中枢设备之间的交互,而S723至S725为第三电子设备和第一中枢设备之间的交互,另外, S723中,第一中枢设备和第三电子设备根据第三电子设备的公钥信息和第一电子设备的公钥信息,进行密钥协商生成的共享秘钥为第三共享密钥。除此之外,具体的步骤都是相同的。
本申请提供的密钥协商的方法,在用户从第二电子设备切换至第三电子设备控制该第一电子设备时,用户向第一电子设备发送的信息在第三电子设备上利用共享密钥进行加密,加密后的信息传输至云端设备,云端设备将该加密后的信息转发给中枢设备。由于云端不能获知该共享密钥,因此不能获知该信息,不能对该信息进行篡改等,从而提高了信息传输的安全性。在用户切换控制端设备后,保证用户对于第一电子设备控制的准确性,提高用户体验。
作为另外一种可能的实现方式,图13是另一例适用于本申请实施例的无线通信系统的架构示意图。如图13所示的,中枢设备可以管理多个第一电子设备和第五电子设备,图13所示为一个第一电子设备和一个第五电子设备的场景。其中,在图13所示的例子中,控制端设备包括一个主控制端设备(第二电子设备)和多个从属控制端设备(第电子设备)。图13所示为一个从属控制端设备的场景。在图13所示的例子中,第二电子设备(主控制端设备)和第四电子设备(从属控制端设备)对应相同的账号,则第二电子设备和第四电子设备分别对应的公钥信息相同,分别对应的私钥信息也相同。
图14所示的为在如图13所示的架构中,本申请提供的密钥协商的方法800示意性流程图。如图14所示的,该方法800包括:S801至S821。
其中,S801至S813对应的具体步骤的描述可以参考上述方法300中S301至S313中对应步骤的描述,为了简洁,这里不再赘述。
S814,第二电子设备通过信任环的方式向第四电子设备发送第二电子设备的账号对应的私钥信息和公钥信息。
在S815中,第二电子设备将第一电子设备的公钥信息利用第六加密密钥加密后上传到云端设备。这里的第六加密密钥为第二电子设备利用第二电子设备的公钥信息和私钥信息生成的。
在S816中,云端设备之前存储的为第二电子设备的公钥信息。在第二电子设备将第一电子设备的公钥信息上传到云端设备后,云端设备储存的公钥信息会发生变化,因此,云端设备会向第四电子设备发送公钥变化事件的通知,用于向第四电子设备通知自己存储的公钥信息发生了变化。
在S817中,第四电子设备收到该公钥变化事件的通知后,从云端设备获取该加密后的第一电子设备的公钥信息。
在S818中,第四电子设备利用第二电子设备的公钥信息和私钥信息生成第六解密密钥,对获取的加密后的第一电子设备的公钥信息进行解密,得到该第一电子设备的公钥信息。
S819至S821的步骤与方法700中的S311至S313类似,对应的具体步骤的描述可以参考上述方法300中S311至S313中对应步骤的描述,为了简洁,这里不再赘述。区别在于S311至S313为第二电子设备和第一中枢设备之间的交互,而S819至S821为第四电子设备和第二中设备之间的交互,除此之外,另外,S819中,第一中枢设备 和第四电子设备根据第四电子设备的公钥信息和第一电子设备的公钥信息,进行密钥协商生成的共享秘钥为第五共享密钥。除此之外,具体的步骤都是相同的。
可选的,作为另一种可能的实现方式,在方法800中,在S814中,第二电子设备也可以通过信任环的方式向第四电子设备发送第一电子设备的公钥信息,而不用将第一电子设备的公钥信息上传到云端设备,即如果第二电子设备通过信任环的方式向第四电子设备发送第一电子设备的公钥信息的情况下,方法800可以不包括S815至S818。
应理解,如果主控制端将第一电子设备的公钥信息上传到云端设备,这样其他的第四电子设备也需要利用该第一电子设备的公钥信息时,可以方便的从云端获取该第一电子设备的公钥信息,降低其他设备获取该第一电子设备的公钥信息的复杂度。进一步的,由于信任环的方式是基于账号的,是在不同设备上的APP具有相同账号的情况下,这些不同设备上的APP之间传输与该账号相关信息的一种方式,信任环的方式不关注设备之间的交互。由于第一电子设备是没有账号的,第一电子设备的公钥信息并不是和第二电子设备的账号相关的,因此,一般情况下,在第二电子设备和第四电子设备对应相同账号的情况下,第二电子设备一般不会利用信任环的方式发送与该账号无关的内容,即第二电子设备会将第一电子设备的公钥信息上传到云端设备,让第四电子设备从云端设备上获取。
在图11或者图13所示的场景中,对于第五电子设备而言,当第二电子设备将中枢下的第五电子设备分享给第四电子设备或者第三电子设备进行控制时,第四电子设备或者第三电子设备、和第五电子设备之间的交互流程可以参考图2所示的方法100的具体流程的描述,图2中所示的第二电子设备即为该第四电子设备或者为第三电子设备,为了简洁,这里不再赘述。
本申请提供的密钥协商的方法,在第一电子设备通过中枢设备与第二电子设备进行通信的过程中,中枢设备代替第一电子设备,与第二电子设备进行协商,并代替第一电子设备生成密钥,第二电子设备对于第一电子设备的控制命令在第二电子设备上便可以利用该密钥进行加密,加密的控制命令通过云端传输给中枢设备。由于云端不能获知该密钥,因此不能获知该控制命令,不能对该控制命令进行篡改等,从而提高了第二电子设备和中枢设备之间的控制命令传输的安全性,保证用户对于第一电子设备控制的准确性,提高用户体验。
应理解,上述只是为了帮助本领域技术人员更好地理解本申请实施例,而非要限制本申请实施例的范围。本领域技术人员根据所给出的上述示例,显然可以进行各种等价的修改或变化,例如,上述方法300至方法800中某些步骤可以不必须的,或者可以新加入某些步骤等。或者上述任意两种或者任意多种实施例的组合。这样的修改、变化或者组合后的方案也落入本申请实施例的范围内。
还应理解,本申请实施例中的方式、情况、类别以及实施例的划分仅是为了描述的方便,不应构成特别的限定,各种方式、类别、情况以及实施例中的特征在不矛盾的情况下可以相结合。
还应理解,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实 施过程构成任何限定。
还应理解,上文对本申请实施例的描述着重于强调各个实施例之间的不同之处,未提到的相同或相似之处可以互相参考,为了简洁,这里不再赘述。
还应理解,本申请实施例中,“预定义”可以通过在设备(中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。
上述结合图1-图14描述了本申请实施例提供的密钥协商的方法的实施例,下面描述本申请实施例提供的相关设备。
本实施例可以根据上述方法,对各个设备(包括上述的第一中枢设备、第二中枢设备、第二电子设备、第三电子设备以及第四电子设备)进行功能模块的划分。例如,可以对应各个功能,划分为各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
需要说明的是,上述方法实施例涉及的各步骤的相关内容,均可以援引到对应功能模块的功能描述,此处不再赘述。
本申请实施例提供的通信装置(上述的第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备),用于执行上述密钥协商的方法,因此可以达到与上述实现方法相同的效果。在采用集成的单元的情况下,中枢设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对中枢设备的动作进行控制管理。例如,可以用于支持中枢设备执行处理单元执行的步骤。存储模块可以用于支持存储程序代码和数据等。通信模块,可以用于支持中枢设备与其他设备的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
示例性地,图15示出了本申请提供的一例通信装置900的硬件结构示意图,该通信装置900可以为上述的第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备。如图15所示,通信装置900可包括处理器910,外部存储器接口920,内部存储器921,通用串行总线(universal serial bus,USB)接口930,充电管理模块940,电源管理模块941,电池942,天线1,天线2,无线通信模块950等。
可以理解的是,本申请实施例示意的结构并不构成对通信装置900的具体限定。在本申请另一些实施例中,通信装置900可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器910可以包括一个或多个处理单元。例如:处理器910可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字 信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,通信装置900也可以包括一个或多个处理器910。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
在一些实施例中,处理器910可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口930是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口2530可以用于连接充电器为通信装置900充电,也可以用于通信装置900与外围设备之间传输数据。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对通信装置900的结构限定。在本申请另一些实施例中,通信装置900也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
通信装置900的无线通信功能可以通过天线1,天线2以及无线通信模块950等实现。
无线通信模块950可以提供应用在通信装置900上的包括Wi-Fi(包括Wi-Fi感知和Wi-Fi AP),蓝牙(bluetooth,BT),无线数传模块(例如,433MHz,868MHz,915MHz)等无线通信的解决方案。无线通信模块950可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块950经由天线1或者天线2(或者,天线1和天线2)接收电磁波,将电磁波信号滤波以及调频处理,将处理后的信号发送到处理器910。无线通信模块950还可以从处理器910接收待发送的信号,对其进行调频,放大,经天线1或者天线2转为电磁波辐射出去。
外部存储器接口920可以用于连接外部存储卡,例如Micro SD卡,实现扩展通信装置900的存储能力。外部存储卡通过外部存储器接口920与处理器910通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器921可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器910可以通过运行存储在内部存储器921的上述指令,从而使得通信装置900执行本申请一些实施例中所提供的密钥协商的方法,以及各种应用以及数据处理等。内部存储器921可以包括代码存储区和数据存储区。其中,代码存储区可存储操作系统。数据存储区可存储通信装置900使用过程中所创建的数据等。此外,内部存储器921可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器910可以通过运行存储在内部存储器921的指令,和/或存储在设置于处理器910中的存储器的指令,来使得通信装置900执行本申请实施例中所提供的密钥协商的方法,以及其他应用及数据处理。
通信装置900包括但不限于路由设备,例如为用于无线网络的无线交换机,WiFi无线路由器、光网络终端、WiFi无线中继器或CPE终端、便携式终端热点等。或者, 通信装置900可以为具有路由功能的设备,例如包括无线路由器,智能电视、大屏设备、智能空调,手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、POS、车载电脑、摄像头、无绳电话、PDA、笔记本电脑、打印机等设备,本申请实施例对此并不限定。
应理解,通信装置900执行上述相应步骤的具体过程请参照前文中结合图5、图6、图7、图9、图10、图12和图14中各个实施例中描述第二电子设备、第一中枢设备、第二中枢设备、第三电子设备或者第四电子设备执行步骤的相关描述,为了简洁,这里不加赘述。
图16示出了本申请实施例的提供的另一例通信装置1000的示意性框图,该通信装置1000可以对应上述方法300至方法800中的各个实施例中描述的第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备。也可以是应用于第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备的芯片或组件,并且,该通信装置1000各模块或单元分别用于执行上述方法300至方法800中的各个实施例中描述的第一中枢设备、第二中枢设备、上述的第二电子设备、第三电子设备或者第四电子设备所执行的各动作或处理过程,如图16所示,该通信装置1000可以包括:处理单元1100和通信单元1200。可选的,该通信装置1000还可以包括存储单元1300。
应理解,通信装置1000中各单元执行上述相应步骤的具体过程请参照前文中结合图5、图6、图7、图9、图10、图12和图14中各个实施例中描述的第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备执行步骤的相关描述,为了简洁,这里不加赘述。
可选的,通信单元1200可以包括接收单元(模块)和发送单元(模块),用于执行前述各个方法实施例中第一中枢设备或者第二中枢设备接收信息和发送信息的步骤。存储单元1300用于存储处理单元1100和通信单元1200执行的指令。处理单元1100、通信单元1200和存储单元1300通信连接,存储单元1300存储指令,处理单元1100用于执行存储单元存储的指令,通信单元1200用于在处理单元1100的驱动下执行具体的信号收发。
应理解,通信单元1200可以是收发器、输入/输出接口或接口电路等,例如可以由图15所示实施例中的无线通信模块950实现。存储单元可以是存储器,例如,可以由图15所示实施例中的外部存储器接口920和内部存储器921实现。处理单元1100可以由图15所示实施例中处理器910,或者可以由处理器910、以及外部存储器接口920、内部存储器921实现。
还应理解,图16所示的通信装置1000可以为第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备,或者,第一中枢设备、第二中枢设备、第二电子设备、第三电子设备或者第四电子设备可以包括图16所示的通信装置1000。
还应理解,以上装置中单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。例如,各个单元 可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。这里该处理元件又可以称为处理器,可以是一种具有信号处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。在一个例子中,以上任一装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA),或这些集成电路形式中至少两种的组合。再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
本申请实施例还提供了一种密钥协商的系统,该系统包括:上述方法实施例中提供的第二电子设备、第一电子设备、第一中枢设备和云端设备,可选的,该系统还可以包括:上述方法实施例中提供的第二中枢设备、第三电子设备、第四电子设备中的至少一个。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序代码,该计算机程序包括用于执行上述本申请实施例提供的任意一种密钥协商的方法的指令。该可读介质可以是只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM),本申请实施例对此不做限制。
本申请还提供了一种计算机程序产品,该计算机程序产品包括指令,当该指令被执行时,以使得该第二电子设备、第一中枢设备、第二中枢设备、第三电子设备或者第四电子设备执行对应于上述方法中的对应的操作。
本申请实施例还提供了一种位于通信装置中的芯片,该芯片包括:处理单元和通信单元,该处理单元,例如可以是处理器,该通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行计算机指令,以使所述通信装置执行上述本申请实施例提供的任一种密钥协商的方法。
可选地,该计算机指令被存储在存储单元中。
可选地,该存储单元为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是该终端内的位于该芯片外部的存储单元,如ROM或可存储静态信息和指令的其他类型的静态存储设备,随机RAM等。其中,上述任一处提到的处理器,可以是一个CPU,微处理器,ASIC,或一个或多个用于控制上述的反馈信息的传输方法的程序执行的集成电路。该处理单元和该存储单元可以解耦,分别设置在不同的物理设备上,通过有线或者无线的方式连接来实现该处理单元和该存储单元的各自的功能,以支持该系统芯片实现上述实施例中的各种功能。或者,该处理单元和该存储器也可以耦合在同一个设备上。
其中,本实施例提供的通信装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是RAM,其用作外部高速缓存。RAM有多种不同的类型,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
在本申请中可能出现的对各种消息/信息/设备/网元/系统/装置/动作/操作/流程/概念等各类客体进行了赋名,可以理解的是,这些具体的名称并不构成对相关客体的限定,所赋名称可随着场景,语境或者使用习惯等因素而变更,对本申请中技术术语的技术含义的理解,应主要从其在技术方案中所体现/执行的功能和技术效果来确定。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请的实施例中的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器等数据存储设备。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显 示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (22)

  1. 一种密钥协商的方法,其特征在于,包括:
    第一中枢设备生成第一电子设备的公钥信息和所述第一电子设备的私钥信息,所述第一电子设备通过所述第一中枢设备接入网络;
    所述第一中枢设备向云端设备上报第一电子设备的第一模式,所述第一模式包括所述第一电子设备支持密钥协商能力;
    所述第一中枢设备获取第二电子设备的公钥信息,所述公钥信息为所述第二电子设备基于所述第一电子设备的所述第一模式发送的;
    所述第一中枢设备根据所述第一电子设备的私钥信息和所述第二电子设备的公钥信息,与所述第二电子设备进行密钥协商,生成第一共享密钥。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一中枢设备向所述第一电子设备发送所述第一共享密钥。
  3. 根据权利要求2所述的方法,其特征在于,在所述第一中枢设备向所述第一电子设备发送所述第一共享密钥之后,所述方法还包括:
    所述第一中枢设备通过所述云端设备接收第一信息,所述第一信息是由所述第二电子设备基于所述第一共享密钥进行加密的;
    所述第一中枢设备向所述第一电子设备发送所述第一信息。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一中枢设备通过所述云端设备接收第一信息,所述第一信息是由所述第二电子设备基于所述第一共享密钥进行加密的;
    所述第一中枢设备利用所述第一共享密钥对所述第一信息进行解密,得到第二信息;
    所述第一中枢设备向所述第一电子设备发送所述第二信息。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,在所述第一中枢设备生成第一电子设备的公钥信息和所述第一电子设备的私钥信息之前,所述方法还包括:
    所述第一中枢设备接收所述第一电子设备发送的注册信息,所述注册信息包括:所述第一电子设备的第一识别码、以及所述第一电子设备不具备密钥协商能力。
  6. 根据权利要求5所述的方法,其特征在于,所述第一中枢设备获取所述第二电子设备的公钥信息,包括:
    所述第一中枢设备基于所述第一识别码与所述第二电子设备进行密钥协商,生成第二共享密钥;
    所述第一中枢设备通过所述云端设备接收所述第二电子设备的公钥信息,所述第二电子设备的公钥信息是由所述第二电子设备基于所述第二共享密钥加密的;
    所述第一中枢设备利用所述第二共享密钥解密所述第二电子设备的公钥信息。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    所述第一中枢设备通过所述云端设备向所述第二电子设备发送所述第一电子设备的公钥信息,所述第一电子设备的公钥信息是由所述第一中枢设备基于所述第二共享密钥加密的。
  8. 根据权利要求7所述的方法,其特征在于,在所述第一中枢设备通过所述云端 设备向所述第二电子设备发送所述第一电子设备的公钥信息之前,所述方法还包括:
    所述第一中枢设备根据第一注册信息,确定所述第一电子设备不具备密钥协商能力。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,其特征在于,在所述第一中枢设备生成第一电子设备的公钥信息和所述第一电子设备的私钥信息之前,所述方法还包括:
    所述第一中枢设备接收所述第一电子设备发送的中枢探测报文;
    所述第一中枢设备向所述第一电子设备发送响应于所述中枢探测报文的响应报文,所述响应报文用于使得所述第一电子设备通过所述第一中枢设备接入网络。
  10. 一种密钥协商的方法,所述方法应用于一种密钥协商的系统,所述系统包括:第一中枢设备、第一电子设备、第二电子设备以及云端设备,其特征在于;所述方法包括:
    所述第一中枢设备生成所述第一电子设备的公钥信息和所述第一电子设备的私钥信息,所述第一电子设备通过所述第一中枢设备与所述云端设备通信连接;
    所述第一中枢设备向所述云端设备上报所述第一电子设备的第一模式,所述第一模式包括所述第一电子设备支持密钥协商能力;
    所述第二电子设备从所述云端设备获取所述第一电子设备的所述第一模式;
    第二电子设备通过所述云端设备向所述第一中枢设备发送第二电子设备的公钥信息;
    所述第一中枢设备获取所述第二电子设备的公钥信息;
    所述第一中枢设备通过所述云端设备向所述第二电子设备发送第一电子设备的公钥信息;
    所述第二电子设备获取所述第一电子设备的公钥信息;
    所述第一中枢设备和所述第二电子设备根据所述第二电子设备的公钥信息和所述第一电子设备的公钥信息,进行密钥协商,生成第一共享密钥。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备通过所述云端设备向所述第一中枢设备发送第一信息,所述第一信息是由所述第二电子设备基于所述第一共享密钥进行加密的;
    所述云端设备将所述第一信息转发至所述第一中枢设备;
    所述第一中枢设备利用所述第一共享密钥对所述第一信息进行解密,得到第二信息;
    所述第一中枢设备向所述第一电子设备发送所述第二信息。
  12. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    所述第一中枢设备向所述第一电子设备发送所述第一共享密钥;
    所述第二电子设备通过所述云端设备向所述第一中枢设备发送第一信息,所述第一信息是由所述第二电子设备基于所述第一共享密钥进行加密的;
    所述云端设备将所述第一信息转发至所述第一中枢设备;
    所述第一中枢设备向所述第一电子设备发送所述第一信息:
    第一电子设备根据第一共享密钥对第一信息进行解密。
  13. 根据权利要求10至12中任一项所述的方法,其特征在于,在所述第一中枢设备生成所述电子设备的公钥信息和所述电子设备的私钥信息之前,所述方法还包括,
    所述第一电子设备向所述第一中枢设备发送第一注册信息,所述第一注册信息包括所述第一电子设备不具备密钥协商能力;
    在所述第一中枢设备通过所述云端设备向所述第二电子设备发送第一电子设备的公钥信息之前,所述方法还包括:
    所述第一中枢设备根据所述第一注册信息,确定所述第一电子设备不具备密钥协商能力。
  14. 根据权利要求10至13中任一项所述的方法,其特征在于,所述第一模式还包括所述第一电子设备通过所述第一中枢设备接入网络;
    所述第二电子设备通过所述云端设备向所述第一中枢设备发送第二电子设备的公钥信息,包括:
    所述第二电子设备将所述第二电子设备的公钥信息发送给所述云端设备;
    所述云端设备基于所述第一模式,将所述第二电子设备的公钥信息转发给所述第一中枢设备。
  15. 根据权利要求10至14中任一项所述的方法,其特征在于,在所述第一中枢设备生成所述电子设备的公钥信息和所述电子设备的私钥信息之前,所述方法还包括:
    所述第一电子设备向所述第一中枢设备发送第二注册信息,所述第二注册信息还包括所述第一电子设备的第一识别码;
    所述第二电子设备获取所述第一识别码;
    所述第二电子设备和所述第一中枢设备基于所述第一识别码,进行密钥协商,生成第二共享密钥;
    所述第二电子设备通过所述云端设备向所述第一中枢设备发送第二电子设备的公钥信息,包括:
    所述第二电子设备通过所述云端设备向所述第一中枢设备发送所述第二电子设备的公钥信息,所述第二电子设备的公钥信息是由所述第二共享密钥加密的;
    所述云端设备将所述第二电子设备的公钥信息转发至所述第一中枢设备;
    所述第一中枢设备基于所述第二共享密钥,解密所述第二电子设备的公钥信息,获取第二电子设备的公钥信息;
    所述第一中枢设备通过所述云端设备向所述第二电子设备发送第一电子设备的公钥信息,包括:
    所述第一中枢设备通过所述云端设备向所述第二电子设备发送所述第一电子设备的公钥信息,所述第一电子设备的公钥信息是由所述第二共享密钥加密的;
    所述云端设备将所述第一电子设备的公钥信息转发至所述第二电子设备;
    所述第二电子设备基于所述第二共享密,钥解密所述第一电子设备的公钥信息,获取第一电子设备的公钥信息。
  16. 根据权利要求10至15中任一项所述的方法,其特征在于,所述系统还包括第二中枢设备,所述第一电子设备与所述第一中枢设备心跳连接,所述方法还包括:
    所述第一电子设备通过心跳连接确定所述第一中枢设备不可用;
    所述第一电子设备断开与所述第一中枢设备的连接;
    所述第一电子设备向所述第二中枢设备发送中枢探测报文;
    所述第二中枢设备向所述第一电子设备发送响应于所述中枢探测报文的第二响应报文,所述第二响应报文用于使得所述第一电子设备通过所述第二中枢设备接入网络。
  17. 根据权利要求10至16中任一项所述的方法,其特征在于,所述系统还包括第三电子设备,所述第三电子设备与所述第二电设备通信连接,所述方法还包括:
    所述第三电子设备生成所述第三电子设备的公钥信息和所述第三电子设备的私钥信息;
    所述第二电子设备向第三电子设备发送所述第一电子设备的公钥信息;
    所述第三电子设备向所述第二电子设备发送所述第三电子设备的公钥信息;
    所述第二电子设备将所述第三电子设备的公钥信息上传到所述云端设备;
    所述第一中枢设备从所述云端设备获取所述第三电子设备的公钥信息;
    所述第一中枢设备和所述第三电子设备根据所述第三电子设备的公钥信息和所述第一电子设备的公钥信息,进行密钥协商,生成第三共享密钥。
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备和所述第三电子设备进行密钥协商,生成第四共享密钥;
    所述第二电子设备向第三电子设备发送所述第一电子设备的公钥信息,包括:
    所述第二电子设备向所述第三电子设备发送所述第一电子设备的公钥信息,所述第一电子设备的公钥信息是由所述第四共享密钥加密的;
    所述第三电子设备基于所述第四共享密钥,解密所述第一电子设备的公钥信息,获取第一电子设备的公钥信息;
    所述第三电子设备向所述第二电子设备发送所述第三电子设备的公钥信息,包括:
    所述第三电子设备向所述第二电子设备发送所述第三电子设备的公钥信息,所述第三电子设备的公钥信息是由所述第四共享密钥加密的;
    所述第二电子设备基于所述第四共享密钥,解密所述第三电子设备的公钥信息,获取第三电子设备的公钥信息。
  19. 根据权利要求10至18中任一项所述的方法,其特征在于,所述系统还包括第四电子设备,所述第四电子设备与所述第二电设备通信连接,所述方法还包括:
    所述第二电子设备向所述第四电子设备发送所述第二电子设备的私钥信息和所述第二电子设备的公钥信息;
    所述第二电子设备将所述第一电子设备的公钥信息上传到所述云端设备;
    所述第四电子设备从所述云端设备获取所述第一电子设备的公钥信息;
    所述第一中枢设备和所述第四电子设备根据所述第二电子设备的公钥信息和所述第一电子设备的公钥信息,进行密钥协商,生成第五共享密钥。
  20. 一种中枢设备,其特征在于,包括:处理器及存储器;所述处理器和存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时执行如权利要求1至9中任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储了计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述 处理器执行如权利要求1至8中任一项所述的方法,或者执行如权利要求10至19中任一项所述的方法。
  22. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的通信设备执行如权利要求1至8中任一项所述的方法,或者,执行如权利要求10至19中任一项所述的方法。
PCT/CN2021/137945 2020-12-31 2021-12-14 一种密钥协商的方法及其相关设备 WO2022143157A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21913898.9A EP4258627A4 (en) 2020-12-31 2021-12-14 KEY NEGOTIATION METHOD AND CORRESPONDING ASSOCIATED DEVICE
US18/259,876 US20240073006A1 (en) 2020-12-31 2021-12-14 Key negotiation method and related device thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011639061.4 2020-12-31
CN202011639061.4A CN114697017B (zh) 2020-12-31 2020-12-31 一种密钥协商的方法及其相关设备

Publications (1)

Publication Number Publication Date
WO2022143157A1 true WO2022143157A1 (zh) 2022-07-07

Family

ID=82136280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137945 WO2022143157A1 (zh) 2020-12-31 2021-12-14 一种密钥协商的方法及其相关设备

Country Status (4)

Country Link
US (1) US20240073006A1 (zh)
EP (1) EP4258627A4 (zh)
CN (1) CN114697017B (zh)
WO (1) WO2022143157A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116795741B (zh) * 2023-08-28 2023-11-10 凡澈科技(武汉)有限公司 存储器数据防删除篡改方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019206685A1 (en) * 2018-04-26 2019-10-31 Siemens Aktiengesellschaft Cryptographic key exchange or key agreement involving a device without network access
CN111464486A (zh) * 2019-01-22 2020-07-28 阿里巴巴集团控股有限公司 信息交互方法、装置以及计算设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9191209B2 (en) * 2013-06-25 2015-11-17 Google Inc. Efficient communication for devices of a home network
CN103929299B (zh) * 2014-04-28 2017-05-10 王小峰 地址即公钥的自安全轻量级网络报文传输方法
CN108306793B (zh) * 2016-10-09 2021-01-22 杭州萤石网络有限公司 智能设备、智能家居网关、建立连接的方法及系统
CN111585749B (zh) * 2016-10-26 2023-04-07 创新先进技术有限公司 数据传输方法、装置、系统及设备
CN110519760B (zh) * 2019-07-24 2021-02-09 华为技术有限公司 网络接入方法、装置、设备及存储介质
CN111049799B (zh) * 2019-11-13 2022-01-21 华为终端有限公司 控制方法、装置和系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019206685A1 (en) * 2018-04-26 2019-10-31 Siemens Aktiengesellschaft Cryptographic key exchange or key agreement involving a device without network access
CN111464486A (zh) * 2019-01-22 2020-07-28 阿里巴巴集团控股有限公司 信息交互方法、装置以及计算设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4258627A4

Also Published As

Publication number Publication date
CN114697017A (zh) 2022-07-01
CN114697017B (zh) 2024-01-16
EP4258627A4 (en) 2024-06-05
US20240073006A1 (en) 2024-02-29
EP4258627A1 (en) 2023-10-11

Similar Documents

Publication Publication Date Title
CN108886685B (zh) 一种终端匹配方法、装置
US20230199495A1 (en) User plane integrity protection
JP7286785B2 (ja) プロトコルデータユニットセッションの確立
JP7075495B2 (ja) 無線リソースの設定
US11924184B2 (en) Protection of communications through user equipment relay
WO2022135187A1 (zh) Wi-Fi直连下数据传输的方法和电子设备
WO2020054365A1 (ja) 通信装置、通信方法及びプログラム
EP4152791A1 (en) Electronic device and method for electronic device to provide ranging-based service
US20220060897A1 (en) 5G-4G Authentication Data Coexistence
WO2018113113A1 (zh) 一种双系统终端wifi共享的方法和装置
CN116963054B (zh) Wlan多链路tdls密钥导出
US20240244681A1 (en) Communication method, apparatus, and system
WO2022143157A1 (zh) 一种密钥协商的方法及其相关设备
CN111971988B (zh) 支持不同无线通信系统之间的互通和/或移动性
WO2021169995A1 (zh) 一种通信方法、通信装置以及通信系统
WO2021196047A1 (zh) 密钥处理方法和装置
US9253814B1 (en) Wireless communication device and method for interacting with a wireless hotspot
US20230079012A1 (en) Communication method and communication apparatus
WO2023072272A1 (zh) 通信方法和装置
US11665206B2 (en) Methods providing management of emergency sessions and related devices and nodes
WO2013020489A1 (zh) 传输增强调度信息的方法、基站和用户设备
CN112087816A (zh) 安全激活状态确定方法及相关产品
WO2024164112A1 (zh) 应用间通信方法、通信系统、应用间通信装置及车辆
WO2023218759A1 (ja) 通信装置およびその制御方法、通信システム
WO2023098209A1 (zh) 一种数据传输保护方法、设备及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21913898

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18259876

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2021913898

Country of ref document: EP

Effective date: 20230703

NENP Non-entry into the national phase

Ref country code: DE