Communication methods, communication devices, and terminals
Patent Information
- Application Number
- JP2026517744
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-10-14
AI Technical Summary
【0109】 以下は、実施形態を説明するために使用される添付図面を簡単に説明する。
Smart Images

Figure 2026534225000001_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technologies, and in particular, relates to the field of communications in scenarios such as short-range communication technologies, for example, intelligent vehicles, smart homes, intelligent terminals, and smart manufacturing, and specifically relates to a communication method, a communication apparatus, and a terminal. Background Art
[0002] With the continuous development of communication technologies, smart application scenarios such as smart homes, intelligent cockpits, intelligent driving, smart manufacturing, and smart transportation have emerged. In the era of mobile Internet, communication tools are more convenient to use than conventional computers, particularly desktop workstations and servers.
[0003] A wireless short-range communication system has roaming requirements for convenience. Multi-hop networking is required in many scenarios such as wireless BMS networks, smart home networks, and low-power consumption networks for smart manufacturing. Typical network topologies include a star network topology, a tree network topology, a mesh network topology, and the like. When a node needs to join a new network, a node already in the network (referred to as an in-network node for short) may send network information to the node that needs to join the network (referred to as a network access node for short). However, with the improvement of network security performance, security protection needs to be implemented for information transmitted in the network, and parameters (for example, a key) used for security protection also need to be provided to the node that newly accesses the network, so that the node that newly accesses the network can obtain the information that is transmitted in the network and on which security protection is implemented.
[0004] In networks involving wireless communication modes, keys typically cannot be transmitted directly over wireless signals. Therefore, how to ensure communication security in the process of providing network keys to network access nodes is a hot topic studied by those skilled in the art. [Overview of the project] [Means for solving the problem]
[0005] Embodiments of this application provide a communication method, communication device, and terminal for improving communication security and network availability in the process of providing network keys to network access nodes.
[0006] According to a first aspect, one embodiment of the present application provides a communication method. The method includes the following:
[0007] The first node sends a topology configuration message to the second node, which contains information about the first network. The first node determines a first key derivation function (KDF) through agreement with the second node, and the first KDF is a KDF supported by the second node. The first node verifies the first information with the second node based on the first KDF, and if the verification of the first information is successful, it sends the network key of the first network to the second node via encryption.
[0008] In some solutions, the network key of the first network is used to implement security protections for messages transmitted within the first network. For example, the network key of the first network is used to implement security protections for network layer messages transmitted between nodes within the network, and these security protections include encryption, integrity protection, and authenticated encryption. Alternatively, the network key of the first network is used to derive a session key, and then the security key is used for session security protection.
[0009] Optionally, the first network includes a first node. Alternatively, the first node may obtain information about the first network. Optionally, the method may be implemented by a hardware module or software module of the first node. The information about the first network may include one or more of the following: the identifier of the security algorithm of the first network, the identity (ID) of the first network, the topology type of the first network, the network priority of the first network, the address assignment scheme of the first network, etc. The security algorithm may include one or more of the following: an encryption algorithm, an integrity protection algorithm, an authenticated encryption algorithm, etc.
[0010] In this embodiment of the present application, in the process of a second node joining a first network, the first node, which is already in the first network, may send a topology configuration message to the second node, and the information about the first network carried in the topology configuration message mainly includes some attribute information of the network. However, with respect to some confidential information of the first network, such as the network key, the first node does not need to include the confidential information directly in the topology configuration message, but needs to send the confidential information to the second node using an encrypted transmission method.
[0011] Furthermore, before the network key of the first network is transmitted through encryption, the first and second nodes must perform information verification (e.g., verification of the first information), that is, verify whether the first information shared between the first and second nodes has been tampered with. For example, the first information may include information transmitted between the first and second nodes, such as information contained in a topology configuration message and / or one or more types of information described later. The first information may also further include parameters and keys predetermined between the first and second nodes.
[0012] Specifically, during information verification, any node must first generate a verification value and send it to the peer for verification. The generation of the verification value depends on the security algorithm. Since there are various types of nodes in the network, the security capabilities of the nodes participating in the network may differ. In this application, the first KDF may be obtained by agreement between the first node and the second node, and the first information is verified based on the first KDF. This can be adapted when multiple nodes with different security capabilities participate in the network, and as a result, the network can be applied to scenarios in which different types of devices are used, thereby improving the network's capacity.
[0013] In this application, messages transmitted by and received by the first node may be transmitted via wireless signals. When the first node is connected to the second node, the method of connection between the first node and the second node may be a wireless connection. Since wireless connections are easily attacked by attackers, the solution provided in this embodiment of this application can greatly improve communication security in the case of wireless transmission.
[0014] In a possible implementation of the first embodiment, the method further includes the step of sending the ID of the network key of the first network to the second node. Optionally, the network key of the first network may be a number, a string, or the like. Alternatively, optionally, the ID of the network key of the first network may be derived based on the network key of the first network.
[0015] In some solutions, the ID of the first network's network key and the network key of the first network may be carried in the same message.
[0016] In a possible implementation of the first embodiment, the information transmitted between the first node and the second node includes information contained in the topology configuration message. In other words, the first information includes information contained in the topology configuration message.
[0017] Optionally, a topology configuration message may contain multiple pieces of information. In this case, the first piece of information may contain several pieces of information within the topology configuration message. Alternatively, optionally, the first piece of information may contain all the information within the topology configuration message, or the topology configuration message as a whole.
[0018] In a possible implementation of the first embodiment, the step of verifying first information with a second node based on a first KDF includes the steps of receiving a first verification value from the second node and verifying the first verification value based on at least the first KDF and information contained in the topology configuration message. The first verification value is associated with at least the first KDF and information contained in the topology configuration message. Furthermore, successful verification of the first information includes successful verification of the first verification value. Optionally, the first verification value may be contained in or carried in a third message.
[0019] In the aforementioned implementation, the second node may generate a verification value based on information contained in at least the first KDF and topology configuration message, and the first node may verify the verification value based on the same information contained in the first KDF and topology configuration message. If the verification is successful, it indicates that the information contained in the topology configuration message received by the second node matches the information sent to the second node by the first node, i.e., the information has not been tampered with. In this way, it can be determined that the information received by the second node is accurate, which indicates that the communication environment between the second node and the first node is secure, thereby improving communication security.
[0020] In a possible implementation of the first embodiment, the first KDF may be the KDF with the highest priority among the KDFs supported by the second node. Optionally, the first KDF may be a KDF supported by both the first and second nodes. In this case, the first KDF may be a KDF supported by both the first and second nodes, and may be the KDF with the highest priority.
[0021] In another possible implementation of the first embodiment, the first node may select a first KDF from KDFs supported by both the second node and the first node, and present the selected first KDF to the second node. The first node is responsible for the KDF selection, and the computational load may be concentrated on the first node side. This is applicable to scenarios where the first node has stronger computing power and can increase the network access speed. For example, in some wireless systems, authorization nodes create a network and connect to other authorization nodes to form the network, and terminal nodes join the network created by the authorization nodes by accessing the authorization nodes. Thus, in-network nodes typically have stronger communication or computing power than network access nodes. Therefore, since the in-network nodes are responsible for the computation during selection, the KDF selection speed can be increased and the delay of the network access process can be reduced.
[0022] In addition, when a KDF is selected based on priority, the first node may select a KDF, and other nodes in the network may select a KDF based on the same priority. This helps to unify the KDF selection criteria for nodes in the network.
[0023] In another possible implementation of the first embodiment, the step of determining the first KDF through agreement with a second node includes the steps of receiving the second node's KDF capability from the second node and transmitting instruction information for the first KDF to the second node. The second node's KDF capability indicates the KDF supported by the second node.
[0024] In some scenarios, the KDF capabilities of the second node and the instruction information of the first KDF also belong to the first information. In this way, the first and second nodes can verify whether the information has been tampered with, thereby improving security.
[0025] In another possible implementation of the first aspect, the step of determining the first KDF through agreement with the second node comprises a step of receiving a first message from the second node, and a step of transmitting a second message to the second node. The first message includes KDF capabilities of the second node, and the second message includes at least indication information of the first KDF. It should be understood that the first message and the second message may further include other information.
[0026] In another possible implementation of the first aspect, the information transmitted between the first node and the second node includes one or more of information included in the second message, information included in a topology configuration message, and the like. Similarly, in a process in which the second message includes a plurality of pieces of information, the information included in the second message herein may be partial information in the second message, or all information (or referred to as the entire second message).
[0027] In another possible implementation of the first aspect, the step of verifying first information together with the second node based on the first KDF is a step of receiving a third message from the second node, where the third message includes a first verification value, and a step of verifying the first verification value based on the first KDF, the first key, the information included in the second message, and the information included in the topology configuration message. The first verification value is associated with the first KDF, the first key, the information included in the second message, and the information included in the topology configuration message, and the first key may be a key obtained through agreement between the first node and the second node. Further, successfully verifying the first information includes successfully verifying the first verification value.
[0028] In this implementation, the first information may be understood as the information included in the second message and the information included in the topology configuration message. Alternatively, the first information may be understood as the first key, the information included in the second message, and the information included in the topology configuration message.
[0029] In another possible implementation of the first aspect, the step of verifying the first information together with the second node based on the first KDF comprises a step of receiving a third message from the second node, wherein the third message includes a first verification value, and a step of verifying the first verification value based on the first KDF, the first parameter, the information contained in the second message, and the information contained in the topology configuration message. The first verification value is associated with the first KDF, the first parameter, the information contained in the second message, and the information contained in the topology configuration message, and the value of the first parameter is predefined. For example, the first parameter is 128-bit data, and all of the 128 bits are 0. Further, successfully verifying the first information includes successfully verifying the first verification value.
[0030] In this implementation, the first information is the information contained in the second message and the information contained in the topology configuration message. Alternatively, the first information is the first parameter, the information contained in the second message, and the information contained in the topology configuration message.
[0031] In another possible implementation of the first aspect, the method further comprises a step of transmitting the KDF capability of the first node to the second node, wherein the KDF capability of the first node indicates the KDF supported by the first node, and a step of receiving indication information of the first KDF from the second node. In some scenarios, the KDF capability of the first node, the indication information of the first KDF, and the like also belong to the first information.
[0032] In another possible implementation of the first aspect, security protection is performed in the process of verifying the first information together with the second node based on the first KDF, so as to further improve security.
[0033] For example, the first piece of information is verified by verifying a first verification value. In one example, the first verification value is encrypted during the transmission process. For example, the message carrying the first verification value is encrypted at the access layer. In another example, the first verification value may be encrypted based on a key to form a ciphertext, and the second node may transmit the ciphertext of the first verification value. In yet another example, the parameters involved in generating the first verification value include a key. Furthermore, the key involved in generating the first verification value may be obtained through agreement between the first and second nodes, or it may be a shared key pre-configured between the first and second nodes.
[0034] In another possible implementation of the first embodiment, the method further includes the step of sending a first random number to a second node. The random number may belong to the first information for determining whether the message carrying the random number has been tampered with.
[0035] Optionally, the first random number may be included in the second message, that is, the second message may include the first random number.
[0036] In another possible implementation of the first aspect, the method further includes the steps of generating a second validation value based on a first KDF, information contained in a third message, information contained in the first message, information contained in a topology configuration message, and a first key, and transmitting the second validation value to a second node.
[0037] Furthermore, the method further includes the step of receiving a second random number from a second node. Optionally, the second random number is included in a third message.
[0038] Optionally, the second verification value is carried in a fifth message sent from the first node to the second node. Furthermore, security protection may be implemented in the process of receiving the third message and sending the fifth message.
[0039] In another possible implementation of the first embodiment, the method is: The process further includes the step of determining a first key through agreement with a second node based on a first key agreement algorithm. The first key (DH key) or a key derived from the first key is used to implement security protection for information transmitted between the first node and the second node. In other words, the first key may be used directly for information encryption in the communication process. Alternatively, and at will, the first key may be used to derive another key, and a key derived from the first key may be used for information encryption in the communication process. In this implementation, the first key agreement algorithm is an algorithm supported by the second node, and further, may be the key agreement algorithm with the highest priority among the key agreement algorithms supported by the second node. This can be adapted to scenarios in which nodes with different key agreement capabilities participate in the first network.
[0040] Optionally, the first key agreement algorithm also belongs to the key agreement algorithms supported by the first node. In other words, the first key agreement algorithm is the one with the highest priority and is supported by both the first and second nodes.
[0041] An exemplary process for obtaining the first key through agreement is as follows: The first node and the second node each determine their private keys. The first node determines its first public key based on its private key and the public key determined based on the first key agreement algorithm, and provides the first public key to the second node. The second node determines its second public key based on its private key and the public key determined based on the first key agreement algorithm, and provides the second public key to the first node. The first node determines its first key based on its private key and the second public key, and the second node determines its first key based on its private key and the first public key. If the exchanged public keys have not been tampered with, the first keys determined by the two nodes will match.
[0042] Optionally, the first public key may be carried in the second message, and the second public key may be carried in either the first or third message.
[0043] In another possible implementation of the first embodiment, the first key agreement algorithm may be determined through agreement between a first node and a second node. That is, the first and second nodes may determine the first key agreement algorithm through agreement to facilitate subsequent key agreement. Alternatively, the first key agreement algorithm may be configured by the first node. For example, an identifier for the first key agreement algorithm may be carried in a key configuration message. For example, the first key agreement algorithm is the key agreement algorithm used by the first network.
[0044] In an implementation for determining a key agreement algorithm, the communication method further includes the steps of: transmitting the key agreement algorithm capability of a first node to a second node, wherein the key agreement algorithm capability of the first node indicates a key agreement algorithm supported by the first node; and receiving instruction information for the first key agreement algorithm transmitted by the second node.
[0045] Optionally, the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
[0046] In another implementation for determining a key agreement algorithm, the communication method further includes the steps of receiving the key agreement algorithm capability of the second node from the second node, wherein the key agreement algorithm capability of the second node includes a key agreement algorithm supported by the second node, and transmitting instruction information for the first key agreement algorithm to the second node.
[0047] Optionally, the key agreement algorithm capability of the second node is included in the first message, and the instruction information for the first key agreement algorithm is included in the second message.
[0048] In another possible implementation of the first embodiment, the step of sending the network key of the first network to the second node via encryption is: The steps include: deriving the encryption key from the first key, The steps include: encrypting the key of the first network layer based on the encryption key to obtain the ciphertext of the network key of the first network; The steps include sending the ciphertext of the network key of the first network to the second node, and Includes.
[0049] In this implementation, the first node and the second node obtain a key through agreement, and the secure transmission of the network key of the first network can be implemented based on that key.
[0050] Optionally, this implementation may be carried out when access layer encryption is not enabled between the first and second nodes. For example, the first and second nodes establish an access layer connection. When encryption of the access layer connection is not enabled, the first and second nodes obtain a first key through agreement based on a first key agreement algorithm in order to encrypt the network key. Optionally, the key agreement algorithm is further determined before the first key is determined.
[0051] In another possible implementation of the first embodiment, the method further includes the step of establishing an access layer connection to the second node before transmitting the network key of the first network to the second node via encryption. Furthermore, when encryption of the access layer connection between the first node and the second node is not enabled, the first node and the second node perform the method of the first embodiment. For example, when the access layer connection is not enabled, the first node and the second node determine a first key derivation function KDF by agreement.
[0052] Optionally, when encryption is enabled for the access layer connection, the first node may directly transmit the network key of the first network over the encrypted access layer without agreeing to the KDF or verifying the first information.
[0053] In another possible implementation of the first embodiment, encryption of the access layer connection between a first node and a second node is enabled, and the method further includes the step of sending a fourth message to the second node, the fourth message comprising the network key of the first network, and the fourth message being encrypted at the access layer.
[0054] In this implementation, before joining the first network, the second node first establishes an access layer connection to the first node. When messages are encrypted at the access layer, the first node may securely transmit the network key of the first network based on the access layer encryption mechanism. For example, the first node may encrypt a fourth message at the access layer established by the first node.
[0055] Optionally, the fourth message may further include the network key ID of the first network.
[0056] In another possible implementation of the first embodiment, information regarding the security algorithm of the first network does not need to be carried in the topology configuration message. For example, information regarding the security algorithm of the first network may be carried further in a second message or the like.
[0057] In another possible implementation of the first embodiment, the security algorithm of the first network is pre-configured on the first node and is comprised of the first node by, for example, an authorization node or a control node.
[0058] In another possible implementation of the first embodiment, the security algorithm of the first network is obtained through agreement between the first node and the second node. For example, the communication method further includes the steps of: receiving security capability information of the second node from the second node, wherein the security capability information of the second node indicates the security algorithms supported by the second node; and determining the security algorithm of the first network, wherein the security algorithm of the first network is the security algorithms supported by the second node and the first node. Furthermore, the first node may provide the second node with an identifier for the determined security algorithm of the first network. This example is illustrated by using an example in which the first node selects the first key agreement algorithm. In some scenarios, the second node may, alternatively, select the security algorithm of the first network based on the security capability information of the first node.
[0059] Furthermore, the above implementation may be performed when a new node joins the first network for the first time. For example, before a second node joins the first network, if the first node is the only node in the first network, the first and second nodes agree on the session security key for the first network. As another example, the first node may be an authorization node, and the authorization node may create the first network (in this case, the first node is the only node in the first network). In this case, when the first second node performs the procedure to join the first network, the first and second nodes agree on the session security key for the first network.
[0060] In another possible implementation of the first embodiment, the method applies when the second node supports the security algorithm of the first network. Furthermore, the first or second node may determine whether the second node supports the security algorithm of the first network based on the identifier of the security algorithm used in the first network and the security capabilities of the second node.
[0061] If the second node does not support the security algorithm of the first network, the second node may choose to terminate the procedure for joining the first network, or it may choose not to join the first network, or it may indicate to the second node that joining the first network has failed, for example, by sending a failure instruction code. If the second node does support the security algorithm of the first network, the second node continues the procedure for joining the first network.
[0062] It should be noted that the second node may, at any stage, check whether it supports the security algorithm of the first network. For example, after receiving the identifier of the security algorithm of the first network, the second node may check whether it supports the security algorithm of the first network. If it is checked that the second node does not support the security algorithm of the first network, the current procedure for joining the first network is terminated. For example, messages related to joining the first network may be transmitted to the first node (e.g., sent to and / or received from the first node).
[0063] For the first node, the first node may receive security capability information from the second node, and the security capability information of the second node indicates the security algorithms supported by the second node. If the second node does not support the security algorithms of the first network, a second message may be sent to the second node, and the second message indicates that joining the first network has failed. Alternatively, the procedure for adding the second node to the first network may be terminated. For example, messages related to joining the first network do not have to be transmitted to the second node (e.g., sent to and / or received from the second node).
[0064] Conversely, if the second node supports the security algorithm of the first network, the first node continues to perform the procedure for adding the second node to the first network. For example, if the second node supports the security algorithm of the first network, the step of sending the network key of the first network to the second node via encryption is performed; that is, when the second node supports the security algorithm of the first network, the step of sending the network key of the first network to the second node via encryption is performed.
[0065] According to a second aspect, one embodiment of the present application provides a communication method, the method including the following:
[0066] The second node receives a topology configuration message from the first node, which contains information about the first network. The second node determines a first key derivation function (KDF) through agreement with the first node, generates a first verification value based on the first KDF and the first information, and sends the first verification value to the first node, where the first KDF is a KDF jointly supported by the second node, and the first information contains information transmitted between the first node and the second node. The second node receives the network key of the first network transmitted by the first node through encryption. The network key of the first network is used to implement security protections to the network layer between nodes in the first network.
[0067] Optionally, the method may be performed by a hardware or software module on a second node.
[0068] In a possible implementation of the second embodiment, the information transmitted between the first node and the second node includes information contained in the topology configuration message.
[0069] In a possible implementation of the second embodiment, the first KDF may be the KDF with the highest priority among the KDFs supported by the second node. Optionally, the first KDF may be a KDF supported by both the first and second nodes. In this case, the first KDF may be a KDF supported by both the first and second nodes, and may be the KDF with the highest priority.
[0070] In a possible implementation of the second aspect, the step of determining the first KDF through agreement with the second node is: The process includes the steps of transmitting the KDF capabilities of the second node to the first node and receiving the instruction information for the first KDF from the first node. In some scenarios, the KDF capabilities of the second node and the instruction information for the first KDF also belong to the first information. In this way, the first and second nodes can verify whether the information has been tampered with, thereby improving security.
[0071] In another possible implementation of the second embodiment, the second node may select a first KDF from KDFs supported by both the second node and the first node, and indicate the selected first KDF to the second node. For example, the second node receives the first node's KDF capability from the first node and transmits the indication information for the first KDF to the first node. The first node's KDF capability indicates the KDFs supported by the first node.
[0072] The KDF capability of the first node may be carried in a topology configuration message, and the instruction information for the first KDF may be carried in a first message or a third message. Alternatively, the KDF capability of the first node may be carried in a second message, and the instruction information for the first KDF may be carried in a third message.
[0073] In some scenarios, the KDF capability of the first node may be transmitted via broadcast or multicast before the network access device establishes a connection, and as a result, the second node acquires the KDF capability of the first node when scanning for the first node (i.e., after receiving the broadcast or multicast message) and carries the specified first KDF when initiating a connection to the first node, thereby reducing signaling overhead.
[0074] In some scenarios, the first node provides its KDF capabilities to the second node. When the second node does not support any of the KDFs supported by the first node, the second node does not need to perform the subsequent steps associated with "joining the first network," thereby reducing signaling overhead and computational consumption. In addition, when the second node terminates the "joining the first network" procedure, the first node usually does not need to actively indicate to the first node that the join has failed (or terminated).
[0075] In another possible implementation of the second aspect, the information transmitted between the first node and the second node includes the information contained in the second message and / or the information contained in the topology configuration message.
[0076] In another possible implementation of the second aspect, the step of generating a first verification value based on at least a first KDF, information contained in a second message, and information contained in a topology configuration message includes the step of generating a first verification value based on information contained in a second message and information contained in a topology configuration message, and the step of sending a third message to a first node, the third message containing the first verification value.
[0077] In another possible implementation of the second aspect, the step of generating a first verification value based on the first KDF and the first information is: The step of generating a first validation value based on a first KDF, a first key, information contained in a second message, and information contained in a topology configuration message, wherein the first key is obtained through agreement between a first node and a second node.
[0078] The step of sending a first validation value to a first node includes the step of sending a third message to the first node, the third message containing the first validation value.
[0079] In another possible implementation of the second aspect, the step of generating a first verification value based on the first KDF and the first information is: A step of generating a first validation value based on a first KDF, a first parameter, information contained in a second message, and information contained in a topology configuration message, wherein the first key is obtained through agreement between a first node and a second node, and the value of the first parameter is predefined.
[0080] The step of sending a first validation value to a first node includes the step of sending a third message to the first node, the third message containing the first validation value.
[0081] The value of the first parameter is predefined; for example, all 128 bits are 0.
[0082] In another possible implementation of the second aspect, the method further includes the step of receiving a first random number from a second node, the first random number being used to participate in generating a validation value or to derive a key, etc.
[0083] Optionally, a second random number may be included in the second message. Furthermore, the first information may include the second random number in the second message, i.e., the first random number may be involved in the generation of the first verification value.
[0084] In another possible implementation of the second aspect, the method is: The steps include receiving a second validation value from a first node, the second validation value being associated with a first KDF and at least one of the following information: information contained in a third message, information contained in a first message, information contained in a topology configuration message, and a first key; and verifying a first validation value based on the first KDF and the same information.
[0085] For example, the second validation value is associated with the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. The second node validates the second validation value based on the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key.
[0086] Optionally, the second verification value may be carried in a message for transmission, or, for example, in a fifth message for transmission.
[0087] In another possible implementation of the second aspect, the method is: The step of determining a first key based on a first key agreement algorithm, wherein the first key or a key derived from the first key is used to implement security protection for information transmitted between a first node and a second node.
[0088] In another possible implementation of the second aspect, the method is: The step further includes determining a first key agreement algorithm through agreement with a first node, wherein the first key agreement algorithm is a key agreement algorithm supported by a second node.
[0089] In another possible implementation of the second aspect, the step of determining the first key agreement algorithm through agreement with the first node is: A step of receiving the key agreement algorithm capability of a first node from a first node, wherein the key agreement algorithm capability of the first node includes a key agreement algorithm supported by the first node. A step of sending instruction information for a first key agreement algorithm to a first node, wherein the first key agreement algorithm is a key agreement algorithm supported by a second node, and Includes.
[0090] Optionally, the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
[0091] In another possible implementation of the second aspect, the step of determining the first key agreement algorithm through agreement with the first node is: A step of transmitting the key agreement algorithm capability of a second node to a first node, wherein the key agreement algorithm capability of the second node includes a key agreement algorithm supported by the second node. A step of receiving instruction information for a first key agreement algorithm from a first node, wherein the first key agreement algorithm is a key agreement algorithm supported by a second node, and Includes.
[0092] Optionally, the key agreement algorithm capability of the second node is included in the first message, and the instruction information for the first key agreement algorithm is included in the second message.
[0093] In another possible implementation of the second embodiment, the step of receiving the network key of the first network transmitted by the first node through encryption includes the step of receiving the ciphertext of the network key of the first network.
[0094] The method is, The steps include: deriving the encryption key from the first key, The steps include: decrypting the ciphertext of the network key of the first network layer based on the encryption key to obtain the network key of the first network; and It also includes.
[0095] In another possible implementation of the second aspect, the method is: A step of establishing an access layer connection to a first node, wherein access layer encryption is enabled. It also includes.
[0096] The step of receiving the network key of the first network transmitted by the first node through encryption is: A step of receiving a fourth message, wherein the fourth message includes the network key of the first network, and the fourth message is encrypted at the access layer. The steps include: decrypting the fourth message at the access layer to obtain the network key of the first network; Includes.
[0097] Optionally, each of the first and second nodes may include an access layer, and the fourth message may be encrypted in the access layer of the first node, or the second node may decrypt the fourth message in its access layer to obtain the network key of the first network.
[0098] In another possible implementation of the second aspect, the method is: A step of transmitting security capability information of a second node to a first node, further comprising the step of the security capability information of the second node indicating security algorithms supported by the second node.
[0099] In another possible implementation of the second aspect, the network key of the first network is transmitted when the second node supports the security algorithm of the first network.
[0100] The method further includes the step of receiving a second message from a first node, the second message indicating that the second node was unable to join the first network.
[0101] According to a third aspect, one embodiment of the present application provides a communication device. The communication device includes a communication unit and a processing unit. The communication device is configured to perform a method according to any one of the implementations of the first aspect or any one of the implementations of the second aspect.
[0102] According to a fourth aspect, one embodiment of the present application provides a communication device. The communication device includes a processor. When the processor invokes a computer program or instruction in memory, a method according to any one of the implementations of the first aspect is performed, or a method according to any one of the implementations of the second aspect is performed.
[0103] According to a fifth aspect, one embodiment of the present application provides a communication device including a logic circuit and an interface, wherein the logic circuit is coupled to the interface.
[0104] The interface is configured to accept data to be processed, and the logic circuit processes the data according to the method in either the first or second implementation to obtain the processed data. The interface is further configured to output the processed data.
[0105] According to a sixth aspect, one embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium is configured to store instructions or computer programs. When an instruction or computer program is executed, a method according to any one of the implementations of the first aspect or any one of the implementations of the second aspect is performed.
[0106] According to the seventh aspect, one embodiment of the present application provides a computer program product. When an instruction or computer program within the computer program product is executed, a method according to any one of the implementations of the first aspect or any one of the implementations of the second aspect is executed.
[0107] According to the eighth aspect, one embodiment of the present application provides a terminal, which includes a communication device according to any one of the third to fifth aspects. Furthermore, the terminal may be an intelligent terminal, or a means of transport such as a vehicle, an unmanned aerial vehicle, or a robot.
[0108] According to the ninth aspect, one embodiment of the present application provides a communication system. The communication system includes a first node and a second node. The first node is configured to perform a method according to any one of the implementations of the first aspect. The second node is configured to perform a method according to any one of the implementations of the second aspect.
[0109] The following is a brief description of the attached drawings used to illustrate the embodiments. [Brief explanation of the drawing]
[0110] [Figure 1] This is a diagram showing the architecture of a communication system according to one embodiment of this application. [Figure 2] This is a schematic flowchart of a communication method according to one embodiment of this application. [Figure 3] This is a diagram illustrating the association procedure without a security context. [Figure 4] This is a diagram illustrating the association procedure with a security context. [Figure 5] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 6] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 7] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 8] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 9] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 10] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 11] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 12] This is a schematic flowchart of another communication method according to one embodiment of this application. [Figure 13]This is a diagram showing the structure of another communication device according to one embodiment of this application. [Figure 14] This is a diagram showing the structure of another communication device according to one embodiment of this application. [Modes for carrying out the invention]
[0111] The embodiments of this application will be described in detail below with reference to the attached drawings.
[0112] The following describes nodes first. A node is a device with communication capabilities and includes, but is not limited to, one or more of the following: user equipment, network devices, industrial devices, etc. User equipment includes, but is not limited to, handheld terminals, wearable devices, means of transport, in-vehicle devices, sensing devices, smart home devices, or leisure and entertainment devices. Handheld terminals include, but are not limited to, mobile phones, tablets, and notebook computers. Wearable devices include, but are not limited to, headsets, smart bands, smartwatches, or smart glasses. Means of transport include, but are not limited to, vehicles, ships, aircraft, rail transport (e.g., subways and high-speed rail), or logistics robots (e.g., automated guided vehicles, AGVs). In-vehicle devices include, but are not limited to, domain controllers (DCs), screens, microphones, speakers, electronic keys, keyless entry, start system controllers, battery management systems (BMS), battery packs, or batteries. Sensing devices include, but are not limited to, cameras, radar, lidar, light sensors, temperature sensors, or humidity sensors. Smart home devices include, but are not limited to, projectors, smart TVs, smart refrigerators, smart home gateways, or security devices. Leisure and entertainment devices include, for example, virtual reality (VR) devices, mixed reality (MR) devices, massage chairs, home theaters, game control devices, or 4D cinema cockpits.
[0113] Network devices include, but are not limited to, routers, switches, or base stations. Industrial devices include, for example, industrial robots or mechanical arms.
[0114] The nodes in the embodiments of this application may be used in a variety of scenarios, such as intelligent vehicles, smart homes, intelligent terminals, smart manufacturing, or smart exhibition halls. In some application scenarios or some network types, devices with similar communication capabilities may not be referred to as nodes. However, for the sake of clarity, in the embodiments of this application, devices with communication capabilities are collectively referred to as nodes.
[0115] It should be understood that the communication methods, communication devices, communication systems, nodes, etc. in the embodiments of this application are applicable to multiple networks, for example, wired communication networks, wireless communication networks, or networks formed by a combination of wired and wireless communication. For example, wireless communication networks include networks connected by using technologies such as SparkLink (or NearLink) 802.11b / g, Bluetooth®, Zigbee, radio frequency identification (RFID) technology, ultra-wideband (UWB) technology, or wireless short-range communication systems, or long-range connectivity technologies including wireless access types such as Long Term Evolution-based communication technologies, 5th generation mobile networks or 5th generation wireless systems (5th-Generation, abbreviated as 5G or 5G technology), global System for mobile communications (GSM), general packet radio service (GPRS), and universal mobile telecommunications system (UMTS). As another example, a wired communication network includes networks connected by using one or more of the following communication technologies: fiber optic connectivity, automotive wired communication technology, Controller Area Network (CAN), Local Interconnect Network (LIN), CAN Flexible Data-Rate (CAN FD), or automotive Ethernet.
[0116] Figure 1 is a diagram of the architecture of a communication system according to one embodiment of the present application. The communication system 10 may include a first node 101 and a second node 102.
[0117] Each of the first node 101 and the second node 102 has communication capabilities. These communication capabilities may include wireless communication capabilities, such as connectivity using short-range wireless communication technology (described later). In addition, the first node 101 and the second node 102 may establish a connection (as shown in Figure 1, the first node 101 is connected to the second node 102 via a solid line). These communication connections may include direct connections, connections through intermediate nodes (e.g., control nodes), etc. In the solution shown in Figure 1, the connection between any two nodes may be a wired connection, a wireless connection, or a combination thereof. Since the network model includes multiple layers, it should be understood that connections in this specification may include connections between peer entities at several layers within a node, such as access layer connections.
[0118] The first node 101 belongs to the first network 103. Of course, the first network 103 may include other nodes in addition to the first node 101. The topology formed by multiple nodes may be a star topology, a tree topology, a mesh topology, etc. In other words, the topology of the first network may include one of the star topology, tree topology, mesh topology, etc. In the first network, a node's message may be transmitted to another node in the network. To ensure security, in some scenarios, as network security performance improves, security protection needs to be implemented for information transmitted within the network. Security protection parameters including the network key of the first network are used as an example. The network key of the first network may be configured for nodes in the first network. Nodes in the first network may encrypt and decrypt transmitted messages based on the network key.
[0119] Security parameters, including the network key of the first network, are still used as an example. In the process of a new node (e.g., a second node) joining the first network, the network key of the first network must be sent to the second node so that the second node can retrieve information encrypted based on the network key in the first network. For example, the first node may configure the network key of the first network for the second node.
[0120] In embodiments of this application, the first node may securely transmit the security parameters of the first network (e.g., a key) to the second node so that the second node can securely obtain the security parameters of the first network, thereby improving network availability. A security parameter that is a network key is used as an example. The first node may obtain the first key through agreement with the second node, encrypt the network key based on the first key to form a ciphertext, and transmit the network key in the form of a ciphertext. Alternatively, when the first and second nodes have established an access layer connection and encrypted transmission is enabled for data transmission at the access layer, the message carrying the network key may be encrypted at the access layer before being transmitted to the second node.
[0121] Furthermore, before the first node transmits the network key of the first network through encryption, the first node must verify the information received by the second node to ensure that the information transmitted between the two nodes is accurate and not vulnerable to attack; in other words, it must verify whether the information received by the second node has been tampered with.
[0122] In some solutions, a verification value must be generated first during information verification, and the generation of the verification value depends on a security algorithm. Since a network has various types of nodes, the security capabilities of the nodes participating in the network may differ. However, in this application, the algorithm used for verification may be obtained through agreement between the first node and the second node. This can be adapted when multiple nodes with different security capabilities participate in the network, and as a result, the network can be applied to scenarios in which different types of devices are used, thereby improving the network's capacity.
[0123] The following describes the methods provided in the embodiments of this application by using examples.
[0124] Figure 2 is a schematic flowchart of a communication method according to one embodiment of the present application. Optionally, the method may be implemented based on the communication system shown in Figure 1. The communication method shown in Figure 2 may include one or more steps from steps S201 to S204. For the sake of clarity in this specification, the sequence S201 to S204 is used for illustrative purposes and should be understood as not intended to limit the execution of the sequence. The execution sequence, execution time, number of executions, etc., of the aforementioned one or more steps are not limited to the embodiments of this application. Steps S201 to S204 are specifically as follows:
[0125] Step S201: The first node sends a topology configuration message to the second node.
[0126] In response, the second node may receive topology configuration messages from the first node. Optionally, the first network includes the first node. Alternatively, the first node may obtain information about the first network.
[0127] The topology configuration message contains information about the first network. This information may include one or more of the following: the identifier of the security algorithm of the first network, the identity (ID) of the first network, the topology type of the first network, the network priority of the first network, and the address assignment scheme of the first network. The security algorithm may include one or more of the following: an encryption algorithm, an integrity protection algorithm, an authenticated encryption algorithm, etc. Optionally, the first network includes a first node. Alternatively, the first node may obtain information about the first network. In some solutions, information about the security algorithm of the first network does not need to be carried in the topology configuration message. For example, information about the security algorithm of the first network may be carried further in a second message, such as the network key configuration message.
[0128] In some possible implementations, the security algorithm identifier indicates the security algorithm used by the first network, and the security algorithm identifier may include, but is not limited to, the algorithm name, number, or field value. For example, the security algorithm may include the first cryptographic algorithm and / or the first integrity protection algorithm. Alternatively, for example, the security algorithm may include the first authenticated cryptographic algorithm.
[0129] In possible implementations, a second node may send a message to a first node, the message may include a first field, the value of which may indicate the security algorithm of the first network. Table 1 provides a table of possible security algorithm information. It may include four cryptographic algorithms, each corresponding to a 4-bit data segment. For example, the algorithm names may be exemplary names ENC0, ENC1, ENC2, and ENC (which may be adaptively designed based on the algorithms supported in a particular implementation process), and the value corresponding to the algorithm with the algorithm name "ENC0" is 0000. See Table 1 for other cases. Table 1 is used as an example. When the value of the first field is 0000, 0000 may be considered an identifier for the security algorithm of the first network, and the value may indicate that the security algorithm used by the first network includes the cryptographic algorithm with the algorithm name "ENC0".
[0130] Similarly, the first field may include multiple fields, for example, field 1 and field 2. Field 1 indicates an encryption algorithm, and field 2 indicates an integrity protection algorithm. For example, when the value of field 1 is 000 and the value of field 2 is 010, it indicates that the security algorithm of the first network includes an encryption algorithm with algorithm name "ENC0" and an integrity protection algorithm with algorithm name "INT1".
[0131] Similarly, if the value of the first field is 1000, it indicates that the security algorithm of the first network includes the authentication cryptographic algorithm with the algorithm name "AUTH1".
[0132] [Table 1]
[0133] Please understand that in the algorithm information table presented in this application, the algorithm name, the value corresponding to the algorithm, and the number of algorithms included in each algorithm are merely examples.
[0134] Optionally, the identifier of the security algorithm of the first network may be included in the topology configuration message. Of course, this application is also applicable when the identifier is transmitted via a separate message.
[0135] In some possible implementations, the security algorithm of the first network is pre-configured on the first node, and is configured on the first node by, for example, an authorization node or a control node.
[0136] In some possible implementations, the first network may be created by an authorization node. When the first node applying to join the first network joins the first network via the authorization node, the security algorithm of the first network may be configured by the authorization node or determined through agreement between the authorization node and the first network access device. Optionally, the authorization node may be the first node. The first node applying to join the first network may, in this case, be the second node.
[0137] In one implementation example, the security algorithm for the first network is obtained through agreement between the first node and the second node. For example, the communication method further includes the steps of: receiving security capability information of the second node from the second node, wherein the security capability information of the second node indicates the security algorithms supported by the second node; and determining the security algorithm for the first network, wherein the security algorithm for the first network is the security algorithms supported by the second node and the first node. Furthermore, the first node may provide the second node with an identifier for the determined security algorithm for the first network. This example is illustrated by using an example in which the first node selects the first key agreement algorithm. In some scenarios, the second node may, alternatively, select the security algorithm for the first network based on the security capability information of the first node.
[0138] Furthermore, the above implementation, in which the security algorithm of the first network is determined through agreement between the first and second nodes, may also be performed when a new node first joins the first network. For example, if the first node is the only node in the first network before the second node joins the first network, the first and second nodes agree on the session security key for the first network. As another example, the first node may be an authorization node, and the authorization node may create the first network (in this case, the first node is the only node in the first network). In this case, when the first second node performs the procedure to join the first network, the first and second nodes agree on the session security key for the first network.
[0139] In possible implementations, the method shown in Figure 2 may be implemented when the second node supports the security algorithm of the first network. In some solutions, the first or second node may decide whether the second node supports the security algorithm of the first network based on the identifier of the security algorithm used in the first network and the security capabilities of the second node.
[0140] For the second node, if the second node does not support the security algorithm of the first network, the second node may choose to terminate the procedure for joining the first network, or it may not join the first network at all, or it may further indicate to the first node that joining the first network has failed, for example, by sending a failure cause instruction code. If the second node does support the security algorithm of the first network, the second node continues the procedure for joining the first network. Note that the second node may check at any stage whether it supports the security algorithm of the first network. For example, after receiving the identifier of the security algorithm of the first network, the second node checks whether it supports the security algorithm of the first network. If it is checked that the second node does not support the security algorithm of the first network, the current procedure for joining the first network is terminated. For example, messages related to joining the first network may be transmitted to the first node (e.g., sent to and / or received from the first node). For example, if the topology configuration message contains an identifier for the security algorithm of the first network, after receiving the topology configuration message, the second node may decide whether the second node supports the security algorithm of the first network. If the second node supports the security algorithm of the first network, some or all of the subsequent steps S202 to S204 are carried out. Otherwise, the procedure may be terminated, i.e., some or all of steps S202 to S204 may not be carried out.
[0141] For the first node, the first node may receive security capability information from the second node, and the security capability information of the second node indicates the security algorithms supported by the second node. If the second node does not support the security algorithms of the first network, a second message may be sent to the second node, and the second message indicates that joining the first network has failed. Alternatively, the procedure for adding the second node to the first network may be terminated. For example, messages related to joining the first network do not have to be transmitted to the second node (e.g., sent to and / or received from the second node).
[0142] Conversely, if the second node supports the security algorithm of the first network, the first node continues to perform the procedure for adding the second node to the first network. For example, if the second node supports the security algorithm of the first network, the subsequent steps are performed, which include step S204. In other words, step S204 is performed when the second node supports the security algorithm of the first network.
[0143] Note that in step S201, the topology configuration message does not necessarily have to be sent by the first node to the second node in a point-to-point manner. In some solutions, the first node may send the topology configuration message via broadcast or multicast. The topology configuration message may be considered sent to the second node when the second node is within range to receive the topology configuration message.
[0144] Step S202: The first and second nodes determine the first KDF through agreement.
[0145] A Key Derivation Function (KDF) can derive one segment of information from another segment of information. In some solutions, a KDF may take a key (or another weak key material) as input and output security key material based on a special function. During derivation, a KDF typically adds a parameter as a cryptographic factor, which is called a salt. In some solutions, a KDF may be implemented based on a hash function, such as SHA1, SHA256, or SHA512. In some other solutions, a KDF may include one or more of the following algorithms: crypt (or a variation thereof), password-based key derivation function (PBKDF), Bcrypt (Blowfish crypt), Scrypt, Argon2 algorithm, etc.
[0146] Table 2 is a KDF information diagram according to one embodiment of the present application. For example, it may include four KDFs, which may be referred to as KDF0, KDF1, KDF2, and KDF3, respectively, and the values corresponding to the four KDFs may be shown in Table 2.
[0147] [Table 2]
[0148] Specifically, the first KDF is the KDF supported by the second node. Below, we will describe several methods for determining the first KDF using examples.
[0149] Method 1: The first node may select a first KDF from the KDFs supported by the second node and indicate the selected first KDF to the second node. For example, the first node receives the second node's KDF capabilities from the second node, and the second node's KDF capabilities indicate the KDFs supported by the second node. After determining the first KDF, the first node sends the instruction information for the first KDF to the second node.
[0150] See Table 3. The KDF capability information of the second node may indicate that the second node supports three KDFs, namely KDF0, KDF1, and KDF2. For example, the KDF capability information of the second node may include "KDF0, KDF1, and KDF2" or "0000, 0001, and 0010". The first node may select one (or more) of the KDF0, KDF1, and KDF2 supported by the second node as the KDF to be used for subsequent verification, i.e., the first KDF. Of course, the names, identifiers, and numbers of KDFs in this specification are merely examples. Optionally, the first node may select the KDF with the highest priority from the KDFs supported by the second node as the first KDF.
[0151] [Table 3]
[0152] Furthermore, the first KDF may also be a KDF supported by the first node. Since information validation must subsequently be performed based on the KDF, the first node must also support the KDF in order to validate the first information or to generate validated values for the first information. For example, the first KDF is the KDF with the highest priority among the KDFs supported by both the first and second nodes.
[0153] See Table 3 for further information. The first node supports four KDFs, namely KDF0, KDF1, KDF2, and KDF3. The first node may select one (or more) of KDF0, KDF1, and KDF2, which are supported by both the first and second nodes, as the KDF to be used for subsequent verification, i.e., the first KDF.
[0154] In possible implementations, the KDF capability of the second node is carried in a message sent by the second node to the first node, referred to as the first message for ease of distinction. The instruction information for the first KDF is carried in a message sent by the first node to the second node, referred to as the second message for ease of distinction. Furthermore, the first and second messages belong to the network layer, and they may be encapsulated in entities of the next layer during transmission. For example, the first and second messages may be information sent when the first and second nodes establish a network layer connection.
[0155] Method 2: The second node may select a first KDF from the KDFs supported by both the second node and the first node, and indicate the selected first KDF to the second node. For example, the second node receives the first node's KDF capabilities from the first node and indicates the KDFs supported by the first node to the first node's KDF capabilities. Referring to Table 3, the first node may indicate to the second node that the first node supports four KDFs, namely KDF0, KDF1, KDF2, and KDF3. The second node may select one (or more) of the KDF0, KDF1, and KDF2 supported by the first node as the KDF to be used for subsequent verification, i.e., the first KDF. Furthermore, the selected KDF may also be supported by the second node. Optionally, the second node may select the KDF with the highest priority from among the KDFs supported by both the first and second nodes as the first KDF.
[0156] In some scenarios, if the first and second nodes do not jointly support KDF, either the first or second node may terminate the procedure, for example, by no longer performing subsequent procedures, discarding received messages, or severing the link.
[0157] Step S203: The first node and the second node verify the first information based on the first KDF.
[0158] For example, the first information may include information transmitted between the first node and the second node, such as information contained in a topology configuration message and / or one or more types of information transmitted before the verification operation is performed, such as information contained in the first message and information contained in the second message. Optionally, the first information may include all information in the transmitted messages, or only some of the information in the transmitted messages. For example, the first information may include information contained in a topology configuration message. A topology configuration message may contain multiple pieces of information. During verification, some pieces of information in the topology configuration message, the topology type of the first network, or the identifier of the security algorithm of the first network may be verified. Alternatively, optionally, during verification, all messages in the topology configuration message may be verified, or in other words, all information contained in the topology configuration message as a whole may be verified.
[0159] Furthermore, the first information may include parameters and keys predetermined between the first node and the second node. For example, the first information may include one or more of the first key, an encryption key derived from the first key, an authentication encryption key derived from the first key, an integrity protection key derived from the first key, or the first parameters.
[0160] In some scenarios, if the verification of the first piece of information is successful, the first or second node may continue the procedure to add the second node to the first network, for example, the subsequent step S204. If the verification of the first piece of information fails, the first or second node may interrupt or terminate the procedure to add the second node to the first network, or, for example, may not perform step S204.
[0161] The following sections describe several possible implementations for verifying the first piece of information, using examples.
[0162] Implementation form 1: The second node generates a first verification value based on the first information, sends the first verification value to the first node, and the first node performs the verification. The first information includes information received by or sent to the first node by the second node before the first verification value is generated, e.g., information in a topology configuration message, or the second node's KDF capability, or the second node's key agreement algorithm capability. Alternatively, optionally, the first information includes information shared by the first and second nodes before the first verification value is generated, e.g., parameters pre-configured by the first and second nodes, a first key obtained through agreement between the first and second nodes, or a session security key derived from the first key (i.e., one or more of the encryption key, integrity protection key, and authentication encryption key).
[0163] In possible implementations, the first verification value is associated with the first KDF and one or more of the following information: the first parameter, the first key, the information contained in the first message, the information contained in the second message, and the information contained in the topology configuration message. The first parameter is a parameter predefined by the first and second nodes, and the value of the first parameter may be fixed or changeable. The first key is a key pre-shared by the first and second nodes, e.g., a key obtained through agreement, a pre-configured key, or a key derived from a originally shared key. The topology configuration message may include information about the first network, an identifier for the security algorithm of the first network, etc. The second message may include the first public key (optional), the first random number (optional), the selected key agreement algorithm (optional), the selected KDF (considered to be instruction information for the first KDF), etc.
[0164] The aforementioned implementation forms offer several possible scenarios. Below, we will describe some possible designs using examples.
[0165] Design 1: The second node may generate a first verification value based on the first KDF, the first key, the information contained in the second message, and the information contained in the topology configuration message, and send the first verification value to the first node. Furthermore, the first node may verify the first verification value based on the same parameters and the first KDF. For example, the first node may obtain a first test value based on the first KDF and the same parameters, and compare whether the first test value is the same as the first verification value. If the first test value is the same as the first verification value, it indicates that the verification of the first verification value was successful. Otherwise, it indicates that the verification failed.
[0166] For example, the first verification value may satisfy the following equation: first verification value = KDF(DH key, second message content, topology configuration message content). The KDF is the KDF determined through agreement between the first and second nodes, the DH key represents a key predetermined between the first and second nodes (considered to be the first key), the second message content = first random number|| first public key|| selected key agreement algorithm|| selected key derivation function, and the topology configuration message content = encryption algorithm|| integrity protection algorithm. It should be understood that "||" represents the connection or concatenation of information. For example, if the first random number is 0x11111111 and the first public key is 0x00000000, then the first random number|| first public key is 0x1111111100000000.
[0167] Design 2: The second node may generate a first validation value based on the first KDF, the first parameters, the information contained in the second message, and the information contained in the topology configuration message, and send the first validation value to the first node. Furthermore, the first node may validate the first validation value based on the same parameters and the first KDF.
[0168] For example, the first verification value may satisfy the following equation: first verification value = KDF(ZERO, second message content, topology configuration message content). The KDF is determined through agreement between the first node and the second node, where ZERO represents N bits of 0, for example, 128 bits are all 0, the second message content = selected key derivation function, and the topology configuration message content = encryption algorithm|| integrity protection algorithm.
[0169] It should be noted that in certain implementation processes, more or fewer parameters may be involved in the generation of the first verification value. Design 1 is used as an example. The content of the second message may be obtained by concatenating only some of the information within the second message. As another example, the first public key, the selected key agreement algorithm, etc., are information in a key agreement scenario. In some implementation processes, the first node and the second node do not agree on a key. In this case, parameters such as the first public key and the selected key agreement algorithm are not involved in the generation of the first verification value.
[0170] Design 3: The first verification value is related to the first key and the information contained in the topology configuration message. For example, the first verification value may be expressed as first verification value = KDF(DH key, topology configuration message content). Similarly, the first verification value is related to the first key and the information contained in the topology configuration message. For example, the first verification value may be expressed as first verification value = KDF(DH key, second message content).
[0171] Design 4: The first verification value is related to the first parameter and the information contained in the topology configuration message. For example, the first verification value may be expressed as first verification value = KDF(ZERO, topology configuration message content).
[0172] The four designs described above are merely examples to illustrate the behavior of the first verifier. In a particular implementation process, more information may be involved in the generation of the first verifier. For example, the KDF may receive further algorithmic instructions to indicate the functions used internally. In addition, the parameter sequence, representation (e.g., KDF() represents the KDF algorithm), etc., are merely examples and are not intended to limit any particular implementation form.
[0173] In possible implementations, the first verification value is carried in a third message sent from the second node to the first node, and furthermore, the third message follows the first message. The first random number may be carried in a message sent from the first node to the second node, for example, the second message, and the second message may precede the third message.
[0174] Implementation Mode 2: The first node generates a second verification value based on the first information, sends the second verification value to the second node, and the second node performs the verification.
[0175] In possible implementations, the second verification value is associated with the first KDF and one or more of the following information: the first parameter, the first key, the information contained in the first message, the information contained in the second message, the information contained in the third message, and the information contained in the topology configuration message. The first message may contain one or more of the following: KDF capability, key agreement algorithm capability, etc. The third message may contain one or more of the following: the second public key, the second random number, and the first verification value, etc.
[0176] The following are some possible examples.
[0177] Example 1: The first node may generate a second verification value based on the first KDF, the first key, the information contained in the first message, the information contained in the third message, and the information contained in the topology configuration message, and send the second verification value to the second node. Furthermore, the second node may verify the second verification value based on the same parameters and the first KDF. For example, the second node may obtain a second test value based on the first KDF and the same parameters, and compare whether the second test value is the same as the second verification value. If the second test value is the same as the second verification value, it indicates that the verification of the second verification value was successful. Otherwise, it indicates that the verification failed.
[0178] For example, the second verification value may satisfy the following equation: second verification value = KDF(DH key, third message content, first message content, topology configuration message content). The KDF is determined through agreement between the first and second nodes, the DH key represents a key predetermined between the first and second nodes (considered to be the first key), the third message content = second random number|| second public key|| first verification value, the first message content = key agreement algorithm capability|| key derivation function capability, and the topology configuration message content = encryption algorithm|| integrity protection algorithm.
[0179] Example 2: The first node may generate a second validation value based on the first KDF, the first parameters, the information contained in the first message, the information contained in the third message, and the information contained in the topology configuration message, and send the second validation value to the second node. Furthermore, the second node may validate the first validation value based on the same parameters and the first KDF.
[0180] For example, the second verification value may satisfy the following equation: second verification value = KDF(ZERO, third message content, first message content, topology configuration message content). The KDF is determined through agreement between the first and second nodes, where ZERO represents N bits of 0, for example, 128 bits are all 0, the third message content = second random number|| second public key|| first verification value, the first message content = key agreement algorithm capability|| key derivation function capability, and the topology configuration message content = encryption algorithm|| integrity protection algorithm.
[0181] Note that in certain implementation processes, more or fewer parameters may be involved in generating the second validation value.
[0182] Example 3: The second validation value is related to the first key, the information contained in the third message, the first key, and the information contained in the topology configuration message. For example, the second validation value may be expressed as second validation value = KDF(DH key, third message content, topology configuration message content).
[0183] Example 4: The second validation value is related to the first parameter, the information contained in the third message, and the information contained in the topology configuration message. For example, the second validation value may be expressed as second validation value = KDF(ZERO, content of the third message, content of the topology configuration message).
[0184] Example 5: The second validation value is related to the information contained in the first key and topology configuration message. For example, the second validation value may be expressed as second validation value = KDF(DH key, third message content, topology configuration message content).
[0185] Example 6: The second validation value is related to the information contained in the first parameter and topology configuration message. For example, the second validation value may be expressed as second validation value = KDF(ZERO, third message content, topology configuration message content).
[0186] In another possible implementation, to further enhance security, security protection is performed in the process of verifying the first information by the first and second nodes based on the first KDF. For example, security protection may be applied to the first and / or second verification values. The first verification value is used as an example. In one example, the first verification value is encrypted in the transmission process. For example, the message carrying the first verification value is encrypted at the access layer. In another example, the first verification value (or the message carrying the first verification value) may be encrypted based on a key to form a ciphertext, and the second node may send the ciphertext. In yet another example, the first verification value is not easily deciphered because the parameters involved in generating the first verification value include a key.
[0187] Step S204: The first node transmits the network key of the first network to the second node via encryption. In response, the second node receives the network key of the first network from the first node.
[0188] Optionally, the network key NetKey of the first network may be encrypted in the following manner: NetKey is carried in a message, and the first node encrypts the entire message based on the encryption key.
[0189] The network key of the first network is used to implement security protections for messages between nodes within the first network, for example, for one or more of the following: encryption, integrity protection, or authenticated encryption. Here, the network key of the first network is used directly for encryption, integrity protection, or authenticated encryption, etc. Alternatively, encryption keys, integrity protection keys, authenticated encryption keys, etc., may be derived first from the network key of the first network, and then security protections may be implemented for messages based on these derived keys. For example, the encryption key Kenc may be derived in the following way: Kenc = KDF(NetKey, algorithm identifier, "enc"), where NetKey is the network key of the first network, the algorithm identifier indicates the KDF algorithm used for derivation, and "enc" may be considered a salt of the KDF, and since the identifier is related to the encryption key, peer devices can also derive consistent encryption keys based on the same salt. Similarly, the integrity protection key Kint may be derived in the following manner: Kint = KDF(NetKey, algorithm identifier, "int"), where the algorithm identifier indicates the KDF algorithm used for derivation (which may be different from or the same as the algorithm used to derive the encryption key), and "int" may be considered the salt of the KDF. Similarly, the authentication encryption key Kac may be derived in the following manner: Kac = KDF(NetKey, algorithm identifier, "auth enc"), where the algorithm identifier indicates the KDF algorithm used for derivation, and "auth enc" may be considered the salt of the KDF. Note that the encryption key Kenc, the integrity protection key Kint, and the integrity protection key Kint may be used to implement security protections for messages within the first network.
[0190] In possible implementations, the first node may further transmit the network key ID of the first network to the second node. Optionally, the network key of the first network may be a number, a string, etc. Alternatively, optionally, the network key ID of the first network may be derived based on the network key of the first network. In some solutions, the network key ID of the first network and the network key of the first network may be carried in the same message.
[0191] For example, after the network key of the first network is sent to the second node, the first and second nodes may implement security protections for the network layer between the first and second nodes based on the network key of the first network.
[0192] The following lists two implementations in which the first node transmits the network key of the first network through encryption.
[0193] Implementation Mode 1: When a message is encrypted at the access layer, the first node encrypts the network key of the first network based on the access layer encryption mechanism for transmission. Specifically, the first node sends a fourth message to the second node, the fourth message contains the network key of the first network, and the fourth message is encrypted at the access layer. In this case, once the first and second nodes first establish an access layer connection and access layer encryption is enabled, the message carrying the network key of the first network layer may be encrypted at the access layer of the first node during transmission. Therefore, the message carrying the network key of the first network is encrypted at the access layer. Correspondingly, when the second node receives the fourth message, the fourth message may be decrypted at the access layer of the second node in order to obtain the network key of the first network.
[0194] Implementation form 2: The first and second nodes may encrypt the network key of the first network based on a key shared in advance (for example, before the key is transmitted) in order to obtain the ciphertext. During transmission, the first node sends the ciphertext of the network key of the first network to the second node. In response, the second node may obtain the ciphertext and decrypt it based on the shared key in order to obtain the network key of the first network.
[0195] The two encrypted transmission methods described above are merely examples, and it should be understood that other methods for transmitting the network key of the first network through encryption may be included in a particular implementation process. In addition, the two methods described above may be combined when they are not mutually exclusive. For example, after the first and second nodes have established an access layer connection, if the access layer connection is not enabled, the network key of the first network is encrypted on the key in order to obtain a ciphertext in order to carry out encrypted transmission of the network key of the first network. For example, if the access layer connection is not enabled, the key is obtained by exchange based on a key agreement algorithm, and the network key of the first network is encrypted (directly or indirectly) on the key. If the access layer connection is enabled, the network key of the first network is encrypted based on an access layer encryption mechanism for transmission.
[0196] In possible implementations, the shared key may be a key obtained through agreement between the first node and the second node, or it may be a key derived based on a key obtained through agreement between the first node and the second node.
[0197] The following describes the process of obtaining a key through agreement between a first node and a second node. In some solutions, the first node may determine the first key through agreement with the second node based on a first key agreement algorithm. The first key is used to implement security protection for information transmitted between the first node and the second node. Optionally, the first key may be used directly for information encryption in the communication process. Alternatively, optionally, the first key may be used to derive another key, and the key derived from the first key may be used for information encryption in the communication process.
[0198] The first key agreement algorithm is an algorithm supported by both the first and second nodes. An exemplary process for obtaining the first key through agreement is as follows: The first and second nodes each determine their private keys. The first node determines its first public key based on its private key and the public key determined based on the first key agreement algorithm, and provides the first public key to the second node. The second node determines its second public key based on its private key and the public key determined based on the first key agreement algorithm, and provides the second public key to the first node. The first node determines its key based on its private key and the second public key, and this key is called DHkey for ease of distinction. The second node determines its DHkey based on its private key and the first public key. If the exchanged public keys have not been tampered with, the DHkeys determined by the second and first nodes will match. Optionally, the first public key may be carried in the second message, and the second public key may be carried in either the first or third message.
[0199] Optionally, DHkey may be involved in the generation of the verification value, i.e., DHkey may be the first key. Here, DHkey may be used directly as input to the first KDF, or another secret value may be calculated based on DHkey and then used as input to the first KDF.
[0200] Furthermore, DHkey is used to derive another key, which may include, but is not limited to, an encryption key, an integrity key, and an integrity key. For example, encryption key = KDF(DHkey, algorithm identifier, encryption key identifier), where the algorithm identifier indicates the algorithm used in the KDF (or is used to specify a particular KDF), and the encryption key identifier is used to identify that the derived key is an encryption key. For example, the encryption key identifier is "enc". Similarly, integrity key == KDF(DHkey, algorithm identifier, integrity key identifier), where the integrity key identifier is, for example, "int". Similarly, authenticated encryption key = KDF(DHkey, algorithm identifier, authenticated encryption key identifier), where the authenticated encryption key identifier is, for example, "auth enc".
[0201] For example, an encryption key may be used to encrypt the network key of a first network. Furthermore, integrity protection may be further applied to the message carrying the network key of the first network based on an integrity protection key. In another example, an authentication encryption key may be used to encrypt the network key of a first network, and integrity protection may be applied to the network key of the first network.
[0202] In possible implementations, the first key agreement algorithm used by the first and second nodes in the DHkey agreement process may also be obtained through agreement. Two methods for determining the first key agreement algorithm are listed below.
[0203] Method 1: The first node notifies the second node of the key agreement algorithms supported by the first node, and the first node selects the key agreement algorithm to be used for key agreement, i.e., determines the first key agreement algorithm. Specifically, the first node transmits its key agreement algorithm capability to the second node, which indicates the key agreement algorithms supported by the first node. The first node receives the instruction information for the first key agreement algorithm transmitted by the second node. Referring to Table 4, the second node may select one (or more) of the three key agreement algorithms KE0, KE1, and KE2, supported by both the first and second nodes, as the first key agreement algorithm.
[0204] [Table 4]
[0205] Optionally, messages transmitted during key agreement algorithm agreement may be the same messages as the aforementioned messages carrying other parameters. In this way, signaling overhead can be reduced. For example, the key agreement algorithm capability of the second node is included in the first message, and the instruction information for the first key agreement algorithm is included in the second message.
[0206] Method 2: The second node notifies the first node of the key agreement algorithms supported by the second node, and the second node selects the key agreement algorithm to be used for key agreement. Specifically, the second node sends the first node's key agreement algorithm capability to the first node, and the second node's key agreement algorithm capability indicates the key agreement algorithms supported by the second node. The second node receives the instruction information for the first key agreement algorithm sent by the first node. Referring to Table 4, the second node may select one (or more) of the three key agreement algorithms KE0, KE1, and KE2, which are supported by both the first and second nodes, as the first key agreement algorithm.
[0207] In possible implementations, before the first node sends the network key to the second node via encryption, the first node may receive a request message from the second node indicating a request for the network key of the first network. In response, the first node may send the network key to the second node via encryption in response to the request message.
[0208] Furthermore, after the first node sends the network key for the first network to the second node, the second node may send a network key configuration complete message to the first node to indicate that the key configuration is complete. Additionally, the first and second nodes may initiate the wireless adjacency protocol.
[0209] In the embodiment shown in Figure 2, during the process of a second node joining the first network, the first node, which is already in the first network, may send the network key of the first network to the second node using an encrypted transmission method, thereby ensuring the secure delivery of the network key. The second node can also securely transmit information within the first network based on the network key.
[0210] Furthermore, before transmitting the key through encryption, the first node may send a topology configuration message to the second node, and the information about the first network contained in the topology configuration message mainly consists of some attribute information of the network. The first and second nodes may obtain a Key Factor Document (KDF) through agreement, and based on the KDF, verify that the information contained in the topology configuration message has not been tampered with and determine that the communication environment between the first and second nodes is secure. In this process, the first and second nodes obtain a first KDF through agreement. This can be adapted when multiple nodes with different security capabilities participate in the network, and as a result, the network can be applied to scenarios where different types of devices are used, thereby improving the network's capacity.
[0211] Access layer connectivity is mentioned in the solution described above. Below, we describe two signaling procedures for establishing access layer connectivity. Optionally, the procedure for establishing access layer connectivity may also be called an access procedure or an association procedure. Specifically, an association is the process by which two nodes obtain matching communication keys and establish a connection. Below, as an example for explanation, we use the procedure in which a terminal node accesses an authorization node. The authorization node is either the first or second node. Correspondingly, the terminal node may be either the second or first node.
[0212] Figure 3 is a diagram of an association procedure without a security context, including authentication and security context procedures. For ease of distinction, the messages (or information) exchanged in the association process are represented below as T1 to T5, respectively. Prior to the association procedure, there is no security context for the terminal node and the authorization node, no session key is obtained through agreement, and no security context is provided. During the association, the terminal node sends message T1, which includes the terminal node's ID, the first key agreement parameter, and the third new parameter. The authorization node determines the second key agreement parameter and the fourth new parameter, and determines the first key based on the first and second key agreement parameters. Furthermore, the authorization node determines the first key (e.g., key K). KE The second key (e.g., key Kgt) may be determined based on the third new parameter and the fourth new parameter. Optionally, the authorization node may derive a session key from the second key (or first key) to enforce security protection for the message. The authorization node provides the terminal node with the second key agreement parameter and the fourth new parameter via message T2. Optionally, message T2 carries authentication information (i.e., first authentication information) to verify the key, identity information, or message integrity. The terminal node obtains the first or second key in the same manner. Furthermore, the terminal node also derives a session key from the second key (or first key) to enforce security protection for subsequent messages. In this way, the terminal node and the authorization node obtain keys agreed through agreement. The terminal node may further generate second authentication information and include it in message T3 for transmission to the authorization node. The authorization node verifies the second authentication information. If verification is successful, the authorization node sends message T4 to the terminal node to complete the association. Optionally, the terminal node responds with message T5 to indicate that the association is complete.
[0213] It should be understood that in certain implementation processes, more messages may be exchanged in the association procedure, or more or fewer parameters may be carried in the messages. For example, the third and fourth new parameters may not be carried, and the second key may be obtained based on the first key and counter when the second key is obtained. As another example, the first or second authentication information may not be carried. As yet another example, optionally, message T1 may further carry one or more of the following: the security capabilities of the terminal node (indicating the security algorithms supported by the terminal node), instructions for the key agreement algorithm, etc. As yet another example, message T2 may further carry the length of the authentication information, the length of the session key, the ID of the second key (or the ID of the first key), instructions for the security algorithm, etc. As yet another example, message T4 may further carry one or more of the following: a temporary ID assigned to the authorization node by the terminal node, the validity period of the second key, the validity period of the first key, etc. When a terminal node belongs to a communication group, the authorization node may further include one or more of the following in message T4: the communication group key, the ID of the group key, the group security algorithm, and the validity period of the group key.
[0214] The security context described above is a group of information included in communication security-related parameters, such as one or more of the following: keys, new parameters, key agreement parameters, information about security algorithms, and terminal identification information. Information about security algorithms includes one or more of the following: instructions for the security algorithm, the version of the security algorithm, etc.
[0215] For example, one type of security context may include one or more of the following information: a fixed ID of the terminal node, a temporary ID of the terminal node, a shared key (e.g., represented as Kgt), the expiration date of the shared key, the identifier of the shared key (e.g., Kgt ID), instructions for the key agreement algorithm, instructions for the signaling plane encryption algorithm, instructions for the signaling plane integrity protection algorithm, the signaling plane encryption key, the signaling plane integrity protection key, instructions for the user plane encryption algorithm, instructions for the user plane integrity protection algorithm, instructions for the user plane authentication encryption algorithm, the user plane encryption key, the user plane integrity protection key, the user plane authentication encryption key, a key derivation counter (counter), COUNTERg, a global frame number (GFN), a group key (e.g., represented as GK), the identifier of the GK (GK ID), a group algorithm (Galgorithm), the expiration date of the group key (GK expiration), and a group global frame number (GGFN).
[0216] Figure 4 is a diagram of the association procedure with a security context. For ease of distinction, messages (or information) are represented as T6 to T8 below. Before the association procedure, the authorization node obtains the security context of the terminal node. See the previous explanation for the contents of the association context. During the association, the terminal node sends message T7 to the authorization node, which carries the terminal node's identification information (optionally, temporary or fixed identification information) and optionally the Kgt ID. Optionally, integrity protection may be performed on message T7 based on the integrity protection key.
[0217] The authorization node obtains an integrity protection key shared with the terminal node based on the terminal node's identification information and checks the integrity of the association message based on the integrity protection key. If the integrity check of the association request message is successful, the authorization node sends message T7, and an association is established between the authorization node and the terminal node. Optionally, if the authorization node successfully checks the integrity of the association request message, the authorization node may further assign a temporary ID to the terminal node. In this case, message T7 may carry the temporary ID assigned to the terminal node by the authorization node.
[0218] It will be understood that the integrity protection key may be included in the security context, and that "check the integrity of the association message based on the integrity protection key" may be replaced with "check the integrity of the association message based on the security context." Furthermore, the security context may include directive information for the integrity protection algorithm and the integrity protection key. The authorization node may check the integrity of message T6 based on the integrity protection key and the specified integrity protection algorithm. Optionally, the integrity protection key herein may be a signaling plane integrity protection algorithm.
[0219] Furthermore, the authorization node implements integrity protection for message T7 based on the signaling plane integrity protection algorithm and the signaling plane integrity protection key Ks.int. Optionally, when signaling plane cryptographic protection is enabled, the authorization node may further implement cryptographic protection for message T7 based on the signaling plane cryptographic algorithm and the signaling plane cryptographic key Ks.enc.
[0220] Optionally, the terminal node responds with message T8 to indicate that the association is complete. In some scenarios, if message T7 is encrypted, the terminal node decrypts message T7. If integrity protection is in place for message T7, the terminal node verifies the integrity of message T7. If the integrity verification is successful, the association is complete, and the terminal node may send message T8 to the authorization node.
[0221] The embodiment shown in Figure 2 provides several possible solutions. Several possible designs are described below with reference to Figures 5, 6, 7, 8, or 9, using examples. It should be understood that the logic, terminology, etc., in the embodiments shown in Figures 5, 6, 7, 8, or 9 should be referred to in the preceding description. Furthermore, in some of the figures of this application, information indicated by messages is enclosed in parentheses in the accompanying drawings. However, this does not represent a strict limitation on message content. For example, the topology configuration message shown in Figure 5 is shown as a security algorithm, but in a specific implementation process, the topology configuration message may carry an identifier for the security algorithm. Hereinafter, the first node is a node already in the first network and is referred to as an in-network device in some solutions. The second node is a node that needs to join the first network and is referred to as a network access device in some scenarios. The first network may be a mesh network. Of course, this application is also applicable when the first network is a network of a different topology type.
[0222] In a possible design, when transmitting the network key, the first node encrypts the network key based on an access layer encryption mechanism. Figure 5 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include steps S502, S504, and S505, or further include steps S501 and / or S503. Steps S501 and S502 are specifically as follows:
[0223] Step S501: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node.
[0224] The topology configuration message may include information about the first network. For example, the topology configuration message may include information about the first network. As another example, the topology configuration information may further indicate the security algorithms used by the first network. For example, the topology configuration message may include the encryption algorithms and integrity protection algorithms used by the first network. Alternatively, the topology configuration message may include the authentication encryption algorithms used by the first network.
[0225] Step S502: The first node and the second node establish an access layer connection.
[0226] For example, the first node and the second node may be connected using the procedure shown in Figure 3 or Figure 4, and encryption of the access layer connection between the first node and the second node may be enabled.
[0227] Step S503: The second node sends a key request message to the first node. In response, the first node receives a key request message from the second node.
[0228] The key request message contains instructional information indicating the network key for the first network.
[0229] Step S504: The first node sends the network key of the first network to the second node. In response, the second node receives the network key of the first network.
[0230] Specifically, the first node includes the network key of the first network in the fourth message, and the fourth message is encrypted at the access layer. Correspondingly, upon receiving the fourth message at the access layer, the second node may decrypt the fourth message at the access layer based on the key in order to obtain the network key of the first network.
[0231] Optionally, before transmission, the first node may determine the first network to which it will participate and determine the network key for that first network.
[0232] Step S505: The first node and the second node implement security protections to the network layer based on the network key of the first network.
[0233] In the embodiment shown in Figure 5, the first node secretly transmits the network key of the first network based on an access layer encryption mechanism, thereby improving the security of the network key of the first network. The network key of the first network is used for network layer security protection, thereby improving the security of information transmitted across the network layer between nodes.
[0234] In another possible design, the first and second nodes may obtain a first key through consensus and derive an encryption key from the first key. In the process of sending the network key to the second node, the first node may encrypt the network key based on the encryption key. Correspondingly, the second node may obtain the network key through decryption based on the encryption key.
[0235] Figure 6 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include steps S602 to S608, step S610, and step S611, or it may further include steps S601 and / or step S609. Steps S601 to S509 are specifically as follows:
[0236] Step S601: The first node sends a topology configuration message. In response, the second node receives a topology configuration message.
[0237] Step S602: The first node and the second node establish an access layer connection.
[0238] Optionally, encryption of the access layer connection between the first node and the second node may be enabled, thereby further improving the security of network key distribution. Alternatively, encryption of the access layer connection between the first node and the second node may not be enabled. In this case, the first node may then encrypt the network key for transmission based on the encryption key derived from the first key.
[0239] Step S603: The first node sends the first public key to the second node. In response, the second node receives the first public key from the first node.
[0240] Specifically, the first node generates a first private key, generates a corresponding first public key based on a first key agreement algorithm, and sends the first public key to the second node. Optionally, the first key agreement algorithm may be selected by either the first or second node.
[0241] Step S604: The second node sends the second public key to the first node. In response, the first node receives the second public key from the second node.
[0242] Specifically, the second node generates a second private key, generates a corresponding second public key based on the first key agreement algorithm, and sends the second public key to the first node.
[0243] Step S605: The first node determines the first key.
[0244] Specifically, the first node determines the first key based on the first private key, the second public key, and the first key consensus algorithm.
[0245] Step S606: The second node determines the first key.
[0246] Specifically, the second node determines the first key based on the first private key, the second public key, and the first key consensus algorithm.
[0247] Step S607: The first node determines the encryption key based on the first key.
[0248] Specifically, the first node derives another key, such as an encryption key, based on the first key. Furthermore, the first node may further derive an integrity protection key from the first key.
[0249] Step S608: The second node determines the encryption key based on the first key.
[0250] Please refer to step S607.
[0251] Step S609: The second node sends a key request message to the first node. In response, the first node receives a key request message from the second node.
[0252] Step S610: The first node sends the network key for the first network to the second node.
[0253] Specifically, the first node determines the network key (NetKey) of the first network in which the first node participates. Once the network key of the first network is transmitted, it is encrypted based on the encryption key used for transmission.
[0254] For example, the first node may encrypt the network key NetKey of the first network based on the encryption key, obtain the ciphertext of NetKey, and send the ciphertext to the second node. In response, the second node may decrypt the ciphertext based on the encryption key in order to obtain the network key NetKey of the first network.
[0255] In certain implementation processes, it should be understood that the network key NetKey of the first network may be encrypted in the following way: NetKey is carried in the fourth message, and the first node encrypts the fourth message based on the encryption key.
[0256] Step S611: The first node and the second node implement security protection for the network layer based on the network key of the first network.
[0257] In the embodiment shown in Figure 6, the first node and the second node obtain a first key through agreement, derive an encryption key based on the first key, and secretly transmit the network key of the first network, thereby improving the privacy of the network key of the first network. The network key of the first network is used for network layer security protection, thereby improving the security of information transmitted in the network layer between nodes.
[0258] Furthermore, the key agreement algorithm used during key agreement may also be obtained through agreement, and as a result, this method is applicable to nodes with different key agreement capabilities, thereby improving the network's ability to accommodate multiple types of nodes and enhancing network availability.
[0259] In some possible implementations, before transmitting the key for the first network, the first node may verify information shared by the first and second nodes (e.g., previously transmitted information or predefined information). If the shared information has not been tampered with, the first node transmits the network key for the first network to the second node, thereby improving the privacy of the network key for the first network and improving the communication security of the nodes.
[0260] Figure 7 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include some or all of steps S701 to S716. Please understand that only the sequence of steps S701 to S716 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S701 to S716 are specifically as follows:
[0261] Step S701: The first node sends a topology configuration message.
[0262] Specifically, the first node may include information in the topology configuration message indicating the security algorithms used by the first network. For example, the topology configuration message may include the encryption algorithms and integrity protection algorithms used by the first network. Alternatively, the topology configuration message may include the authentication encryption algorithms used by the first network.
[0263] In some possible solutions, when the first network access device joins the first network via a mesh authorization node, the security algorithm of the first network is configured by the authorization node or determined through agreement between the authorization node and the first network access device.
[0264] It will be understood that the first node may send a topology configuration message, and in response, the second node may receive a topology configuration message from the first node.
[0265] Step S702: The second node determines whether the security algorithm of the first network is supported.
[0266] The security algorithm for the first network is the security algorithm indicated by the first node in the topology configuration message.
[0267] If the second node supports the security algorithm sent by the first node, the subsequent steps are performed. If the second node does not support the security algorithm sent by the first node, the process terminates, i.e., the subsequent steps are not performed.
[0268] Step S703: The first node and the second node establish an access layer connection.
[0269] For example, the first node is connected to the second node by using the procedure shown in Figure 3 or Figure 4.
[0270] Optionally, encryption of the access stratum connection between the first node and the second node may be enabled, which can further improve the security of network key distribution. Alternatively, encryption of the access stratum connection between the first node and the second node is not enabled. In this case, the first node may then encrypt the network key based on an encryption key derived from the first key for transmission.
[0271] Step S704: The second node sends a first message to the first node.
[0272] The first message carries key agreement algorithm capabilities and key derivation function capabilities. The key agreement algorithm capabilities indicate key agreement algorithms supported by the second node, and the key derivation function capabilities indicate key derivation functions supported by the second node.
[0273] It should be understood that the names of messages in this specification are only used to distinguish different messages. In a specific implementation process, the names of messages may be designed in another manner. For example, the first message may be referred to as a security request message, or the first message may be a network layer connection handshake message or a hello message.
[0274] It will be appreciated that the second node sends the first message to the first node, and correspondingly, the first node receives the first message from the second node.
[0275] In possible implementations, the first node selects the key agreement algorithm and key derivation function with the highest priority based on the second node's key agreement algorithm and key derivation function capabilities. Of course, in some solutions, the key agreement algorithm and key derivation function selected by the second node are also the key agreement algorithm and key derivation function supported by the first node.
[0276] Furthermore, the first node may generate a first private key and a first public key based on a selected key agreement algorithm. Optionally, the first node may further generate a first random number.
[0277] Step S705: The first node sends the second message to the second node.
[0278] The second message carries the first public key, and further indicates the key agreement algorithm and key derivation function selected by the first node. It should be understood that the name of the second message may be designed in a different manner. For example, the first message may be called a security response message, or the second message may be a network layer connection handshake message or hello message.
[0279] Furthermore, when the first node generates the first random number, the first random number is carried in a second message sent to the second node.
[0280] It will be understood that the first node may send a second message to the second node, and in response, the second node may receive a second message from the first node.
[0281] Step S706: The second node determines the first key.
[0282] For example, a second node may generate a second private key and compute a first key based on the key agreement algorithm selected by the first node, the second private key, and the first public key. Optionally, the first key may be called the agreement key, DH key, etc.
[0283] Step S707: The second node determines the first validation value.
[0284] In possible implementations, the first verification value is KDF(DH key, second message content, topology configuration message content). The DH key is the first key determined in step S506, and the KDF used to generate the first verification value is the KDF selected by the first node.
[0285] In addition, the content of the second message may include some or all of the information in the second message, or it may include information obtained by processing some or all of the information in the second message. For example, when the second message includes the first random number, the first public key, the selected key agreement algorithm, and the selected key derivation function, then the content of the second message = first random number || first public key || selected key agreement algorithm || selected key derivation function.
[0286] Similarly, the topology configuration message content may include some or all of the information within the topology configuration message, or it may include information obtained by processing some or all of the information within the topology configuration message.
[0287] In another possible implementation, the first verification value is KDF(DH key, first random number, topology configuration message content).
[0288] Step S708: The second node sends a third message to the first node.
[0289] The third message carries the second public key and the first verification value. The second public key may be determined by the second node based on the second private key. Specifically, the second node generates the second private key and generates the corresponding second public key based on the selected key agreement algorithm. Furthermore, the second node generates a second random number, which is carried in the third message sent to the second node.
[0290] It should be understood that the name of the third message may be designed in a different way. For example, the third message may be called a security verification request message, or it may be a network layer connection handshake message or hello message.
[0291] It will be understood that the second node may send a third message to the first node, and in response, the first node may receive a third message from the second node. Optionally, the first node may verify the first validation value. Furthermore, if the first node successfully verifies the first validation value, the subsequent steps are performed, for example, step S709 and some or all of the subsequent steps are performed. Otherwise, the procedure terminates.
[0292] Step S709: The first node determines the first key.
[0293] For example, the first node computes a first key based on the first private key, the second public key, and a selected key agreement algorithm.
[0294] Step S710: The first node determines the second validation value.
[0295] In a possible implementation, the second verification value = KDF(DH key, third message content, second message content, and topology configuration message content). The DH key is the first key determined in step S709, and the KDF used to generate the first verification value is the KDF selected by the first node.
[0296] In addition, the third message content includes part or all of the information in the third message, or the third message content includes information obtained by processing part or all of the information in the third message. For example, when the third message includes the second random number, the second public key, and the first verification value, the third message content = second random number || second public key || first verification value.
[0297] Similarly, the topology configuration message content includes part or all of the information in the topology configuration message, or the topology configuration message content includes information obtained by processing part or all of the information in the topology configuration message.
[0298] In another possible implementation, the first verification value = KDF(DH key, second random number, topology configuration message content).
[0299] Step S711: The first node transmits a fifth message to the second node.
[0300] The fifth message carries the second verification value.
[0301] Step S712: The first node determines an encryption key based on the first key.
[0302] Furthermore, the first node may further derive an integrity protection key or an authenticated encryption key based on the first key.
[0303] Step S713: The second node determines an encryption key based on the first key.
[0304] Specifically, the first node derives an encryption key based on the first key.
[0305] Furthermore, the first node may further derive an integrity protection key or an authenticated encryption key based on the first key.
[0306] Step S714: The second node sends a key request message to the first node. In response, the first node receives a key request message from the second node.
[0307] Step S715: The first node sends a network key configuration message to the second node.
[0308] The network key configuration message contains the network key for the first network. Optionally, the network key configuration message may further contain the ID of the network key for the first network. Optionally, the fifth message may be the network key configuration message, or a network key configuration message encapsulated in the access layer.
[0309] Optionally, the first node may determine the network key NetKey of the first network in which it participates and include the NetKey in the key configuration message to send to the second node.
[0310] Optionally, the first node may derive an encryption key based on the first key, and the network key configuration message may be encrypted based on the encryption key and then transmitted. Correspondingly, the second node may decrypt the ciphertext based on the encryption key in order to obtain the network key NetKey of the first network.
[0311] Furthermore, the first node may further derive an integrity protection key from the first key. Optionally, integrity protection is performed on the network key configuration message based on the integrity protection key.
[0312] Optionally, the first node may derive an authentication encryption key based on the first key, and the network key configuration message may be authenticated and encrypted based on the authentication encryption key.
[0313] Furthermore, the second node may send a sixth message to the first node, which indicates that the network key configuration is complete.
[0314] Step S716: The first node and the second node implement security protections to the network layer based on the network key of the first network.
[0315] Furthermore, the first and second nodes may initiate a wireless neighbor protocol.
[0316] In the embodiment shown in Figure 7, during the process of a first node joining a first network, the first and second nodes agree on a key agreement algorithm and a key derivation function. The key agreement algorithm is used to determine a first key, which is used to implement security protections for information transmitted between nodes, and the key derivation function is used to verify information transmitted between the two nodes to ensure that the transmitted information is not tampered with. In this way, the first node can distribute the network key of the first network in a secure environment, thereby improving network security. Furthermore, various security algorithms are agreed upon, thereby improving the network's ability to support multiple types of nodes and improving network availability.
[0317] Figure 8 is a schematic flowchart of another communication method according to one embodiment of this application. The communication method may include some or all of steps S801 to S813. Please understand that only the sequence of steps S801 to S813 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S801 to S813 are specifically as follows:
[0318] Step S801: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node.
[0319] Step S802: The second node determines whether the security algorithm of the first network is supported.
[0320] Step S803: The first node and the second node establish an access layer connection.
[0321] Step S804: The second node sends the first message to the first node. In response, the first node receives the first message.
[0322] The first message carries the key agreement algorithm capability.
[0323] Step S805: The first node sends the second message to the second node. In response, the second node receives the second message.
[0324] The second message carries the first public key, and further indicates the key agreement algorithm selected by the first node. Optionally, the second message further carries the first random number.
[0325] Step S806: The second node determines the first key.
[0326] Step S807: The second node sends a third message to the first node. In response, the first node receives the third message.
[0327] The third message carries the second public key. Furthermore, the third message carries the second random number.
[0328] Step S808: The first node determines the first key.
[0329] Step S809: The second node determines the encryption key based on the first key.
[0330] Step S810: The first node determines the encryption key based on the first key.
[0331] Step S811: The second node sends a key request message to the first node. In response, the first node receives the key request message.
[0332] Step S812: The first node sends the network key of the first network to the second node.
[0333] Specifically, when the network key for the first network is transmitted, the network key is encrypted based on the encryption key used for transmission.
[0334] Step S813: The first node and the second node implement security protections to the network layer based on the network key of the first network.
[0335] In the embodiment shown in Figure 8, the first and second nodes may determine a key agreement algorithm through consensus and determine a first key based on the key agreement algorithm. The first key is used to implement security protection for information transmitted between nodes. If the parameters transferred by the first and second nodes in the key agreement process have not been tampered with, the second and first nodes can determine a matching first key, and as a result, the second node can decrypt the ciphertext to obtain the network key of the first network. In this way, the first node can distribute the network key of the first network in a secure environment, thereby improving network security. Furthermore, the key agreement algorithm is agreed upon, thereby improving the network's ability to support multiple types of nodes and improving network availability.
[0336] Figure 9 is a schematic flowchart of another communication method according to an embodiment of the present application. The communication method may include some or all of steps S901 to S916. Please understand that only the sequence of steps S901 to S916 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S901 to S916 are specifically as follows:
[0337] Step S901: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node.
[0338] The topology configuration message may include information about the first network and the key agreement algorithm capabilities of the first node.
[0339] Step S902: The second node determines whether the security algorithm of the first network is supported. See Step S702 for further details.
[0340] Step S903: The first node and the second node establish an access layer connection. See Step S703 for further details.
[0341] Step S904: The second node sends the first message to the first node. In response, the first node may receive the first message from the second node.
[0342] The first message carries the second public key, the key consensus algorithm selected by the second node, and the key consensus algorithm capability of the second node. The second public key is generated by the second node based on the selected key consensus algorithm and the second private key generated by the second node.
[0343] Optionally, the first message further carries a second random number.
[0344] Step S905: The first node sends a second message to the second node. In response, the second node may receive a second message from the first node.
[0345] The second message carries the first public key, and further indicates the key derivation function selected by the first node. Additionally, the second message carries the first random number.
[0346] Step S906: The second node determines the first key.
[0347] For example, the second node computes the first key based on the key agreement algorithm selected by the first node, the second private key, and the first public key.
[0348] Step S907: The first node determines the first key.
[0349] For example, the first node computes a first key based on the first private key, the second public key, and a selected key agreement algorithm.
[0350] Step S908: The second node determines the first validation value.
[0351] In possible implementations, the first verification value is KDF(DH key, second message content, topology configuration message content). The DH key is the first key determined in step S906, and the KDF used to generate the first verification value is the KDF selected by the second node.
[0352] In another possible implementation, the first validation value = KDF(DH key, first random number, topology configuration message content). Of course, in a particular implementation process, more or fewer parameters may be involved in generating the first validation value.
[0353] Step S909: The second node sends a third message to the first node.
[0354] The third message carries the first verification value. See step S508 for further explanation.
[0355] Step S910: The first node determines the second validation value.
[0356] In a possible implementation, the second validation value = KDF(DH key, third message content, second message content, and topology configuration message content). In another possible implementation, the first validation value = KDF(DH key, second random number, topology configuration message content). Of course, in a particular implementation process, more or fewer parameters may be involved in generating the first validation value.
[0357] Step S911: The first node sends the fifth message to the second node. In response, the second node receives the fifth message from the first node. The fifth message carries the second validation value.
[0358] Step S912: The first node determines the encryption key based on the first key.
[0359] Step S913: The second node determines the encryption key based on the first key.
[0360] Step S914: The second node sends a key request message to the first node. In response, the first node receives the key request message.
[0361] Step S915: The first node sends the network key of the first network to the second node.
[0362] Specifically, the first node determines the network key (NetKey) of the first network in which the first node participates. Once the network key of the first network is transmitted, it is encrypted based on the encryption key used for transmission.
[0363] Step S916: Implement security protection for the network layer based on the network key of the first network.
[0364] For further details regarding the embodiment shown in Figure 9, please refer to the embodiment shown in Figure 7.
[0365] Figure 10 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include some or all of steps S1001 to S1011. Please understand that only the sequence of steps S1001 to S1011 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S1001 to S1011 are specifically as follows:
[0366] Step S1001: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node.
[0367] Please refer to the explanation for step S701.
[0368] Step S1002: The second node determines whether the security algorithm of the first network is supported. See Step S702 for further details.
[0369] Step S1003: The first node and the second node establish an access layer connection.
[0370] Encryption of the access layer connection between the first node and the second node is enabled. See step S703 for further details.
[0371] Step S1004: The second node sends the first message to the first node. In response, the first node may receive the first message from the second node.
[0372] The first message carries the KDF capability of the second node. Optionally, the first message further carries a second random number.
[0373] Step S1005: The first node sends a second message to the second node. In response, the second node may receive a second message from the first node.
[0374] The second message further indicates the key derivation function selected by the first node. Furthermore, the second message further carries the first random number.
[0375] Step S1006: The second node determines the first validation value.
[0376] In possible implementations, the first validation value = KDF(first parameter, second message content, topology configuration message content). The first parameter is a parameter defined in advance (for example, before the first validation value is generated), e.g., ZERO. The KDF used to generate the first validation value is the KDF selected by the second node.
[0377] In another possible implementation, the first validation value = KDF(first parameter, first random number, topology configuration message content). Of course, in a particular implementation process, more or fewer parameters may be involved in generating the first validation value.
[0378] Step S1007: The second node sends a third message to the first node.
[0379] The third message carries the first verification value. See step S708 for further explanation.
[0380] Step S1008: The first node verifies the first validation value.
[0381] For example, the first node computes a first key based on the first private key, the second public key, and a selected key agreement algorithm.
[0382] Step S1009: The second node sends a key request message to the first node. In response, the first node receives the key request message.
[0383] Step S1010: The first node sends the network key of the first network to the second node.
[0384] Specifically, the first node includes the network key of the first network in the fourth message, and the fourth message is encrypted at the access layer. Correspondingly, upon receiving the fourth message at the access layer, the second node may decrypt the fourth message at the access layer based on the key in order to obtain the network key of the first network.
[0385] Step S1011: The first and second nodes implement security protections to the network layer based on the network key of the first network.
[0386] In the embodiment shown in Figure 8, the first node secretly transmits the network key of the first network based on an access layer encryption mechanism. Before the key is transmitted, the first and second nodes may obtain a Key Definition Function (KDF) through agreement and, based on the KDF, verify that the information contained in the topology configuration message has not been tampered with, thereby determining that the communication environment between the first and second nodes is secure. In this process, the first and second nodes obtain a first KDF through agreement. This can be adapted when multiple nodes with different security capabilities participate in the network, and as a result, the network can be applied to scenarios where different types of devices are used, thereby improving the network's capacity.
[0387] Figure 11 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include some or all of steps S1101 to S1115. Please understand that only the sequence of steps S1101 to S1115 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S1101 to S1115 are specifically as follows:
[0388] Step S1101: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node. See the explanation for Step S701.
[0389] Step S1102: The first node and the second node establish an access layer connection. Encryption is enabled for the access layer connection between the first node and the second node. See step S703 for further details.
[0390] Step S1103: The second node sends the first message to the first node. In response, the first node may receive the first message from the second node.
[0391] The first message carries the security capabilities of the second node. The security capabilities of the second node indicate the security algorithms, key agreement algorithms, and KDFs supported by the second node.
[0392] Optionally, the first message further carries a second random number.
[0393] Step S1104: The first node sends a second message to the second node. In response, the second node may receive a second message from the first node.
[0394] The second message carries the first public key, and the second message further indicates the key agreement algorithm and key derivation function selected by the first node.
[0395] For example, the first node selects the key derivation function and the key agreement algorithm with the highest priority based on the security algorithm capabilities of the network access device. The first node generates a first private key and determines a first public key based on the selected key agreement algorithm.
[0396] Furthermore, the second message further indicates the security algorithm of the first network. Optionally, the second message further carries the first random number.
[0397] In a possible implementation, if the security algorithm supported by the second node does not include the security algorithm of the first network, the first node sends a failure message to the second node, where the cause value is carried.
[0398] Step S1105: The second node determines the first key.
[0399] For example, a second node may generate a second private key and compute a first key based on the key agreement algorithm selected by the first node, the second private key, and the first public key. Optionally, the first key may be called a network key, DH key, etc.
[0400] Step S1106: The second node determines the first validation value.
[0401] In possible implementations, the first verification value is KDF(DH key, second message content, topology configuration message content). The DH key is the first key determined in step S1105, and the KDF used to generate the first verification value is the KDF selected by the first node.
[0402] In another possible implementation, the first verification value is KDF(DH key, first random number, topology configuration message content).
[0403] Step S1107: The second node sends a third message to the first node. In response, the first node receives a third message from the first node. The third message carries the second public key and the first validation value.
[0404] Step S1108: The first node determines the first key.
[0405] Step S1109: The first node determines the second validation value.
[0406] In possible implementations, the second verification value is KDF (DH key, third message content, second message content, and topology configuration message content). The DH key is the first key determined in step S1105, and the KDF used to generate the first verification value is the KDF selected by the first node.
[0407] In another possible implementation, the first verification value is KDF(DH key, second random number, topology configuration message content).
[0408] Step S1110: The first node sends the fifth message to the second node. In response, the second node receives the fifth message from the first node. The fifth message carries the second validation value.
[0409] Step S1111: The first node determines the encryption key based on the first key.
[0410] Step S1112: The second node determines the encryption key based on the first key.
[0411] Step S1113: The second node sends a key request message to the first node. In response, the first node receives the key request message.
[0412] Step S1114: The first node sends the network key of the first network to the second node.
[0413] Specifically, when the network key for the first network is transmitted, the network key is encrypted based on the encryption key used for transmission.
[0414] Step S1115: The first and second nodes implement security protections to the network layer based on the network key of the first network.
[0415] In the embodiment shown in Figure 11, during the process of a first node joining a first network, the first and second nodes agree on a key agreement algorithm and a key derivation function. The key agreement algorithm is used to determine a first key, which is used to implement security protections for information transmitted between nodes, and the key derivation function is used to verify information transmitted between the two nodes to ensure that the transmitted information is not tampered with. In this way, the first node can distribute the network key of the first network in a secure environment, thereby improving network security. Furthermore, various security algorithms are agreed upon, thereby improving the network's ability to support multiple types of nodes and improving network availability.
[0416] Figure 12 is a schematic flowchart of another communication method according to one embodiment of the present application. The communication method may include some or all of steps S1201 to S1210. Please understand that only the sequence of steps S1201 to S1210 will be used below as an example for illustrative purposes. In a particular implementation process, the opportunities to perform some steps may be modified. Steps S1201 to S1210 are specifically as follows:
[0417] Step S1201: The first node sends a topology configuration message. In response, the second node may receive a topology configuration message from the first node.
[0418] Please refer to the explanation for step S1001.
[0419] Step S1202: The first node and the second node establish an access layer connection.
[0420] Encryption of the access layer connection between the first node and the second node is enabled. See step S703 for further details.
[0421] Step S1203: The second node sends the first message to the first node. In response, the first node may receive the first message from the second node.
[0422] The first message carries the KDF capability of the second node. Optionally, the first message further carries a second random number.
[0423] Step S1204: The first node sends a second message to the second node. In response, the second node may receive a second message from the first node.
[0424] The second message further indicates the key derivation function and the security algorithm of the first network selected by the first node. Furthermore, the second message further carries the first random number.
[0425] Step S1205: The second node determines the first validation value.
[0426] In possible implementations, the first validation value = KDF(first parameter, second message content, topology configuration message content). The first parameter is a parameter defined in advance (for example, before the first validation value is generated), e.g., ZERO. The KDF used to generate the first validation value is the KDF selected by the second node.
[0427] In another possible implementation, the first validation value = KDF(first parameter, first random number, topology configuration message content). Of course, in a particular implementation process, more or fewer parameters may be involved in generating the first validation value.
[0428] Step S1206: The second node sends a third message to the first node.
[0429] The third message carries the first verification value. See step S708 for further explanation.
[0430] Step S1207: The first node verifies the first validation value.
[0431] For example, the first node computes a first key based on the first private key, the second public key, and a selected key agreement algorithm.
[0432] Step S1208: The second node sends a key request message to the first node. In response, the first node receives the key request message.
[0433] Step S1209: The first node sends the network key of the first network to the second node.
[0434] Specifically, the first node includes the network key of the first network in the fourth message, and the fourth message is encrypted at the access layer. Correspondingly, upon receiving the fourth message at the access layer, the second node may decrypt the fourth message at the access layer based on the key in order to obtain the network key of the first network.
[0435] Step S1210: The first node and the second node implement security protections to the network layer based on the network key of the first network.
[0436] In the embodiment shown in Figure 12, the first node secretly transmits the network key of the first network based on an access layer encryption mechanism. Before the key is transmitted, the first and second nodes may obtain a Key Definition Function (KDF) through agreement and, based on the KDF, verify that the information contained in the topology configuration message has not been tampered with to determine that the communication environment between the first and second nodes is secure. In this process, the first and second nodes obtain a first KDF through agreement. This can be adapted when multiple nodes with different security capabilities participate in the network, and as a result, the network can be applied to scenarios where different types of devices are used, thereby improving the network's capacity.
[0437] The above describes in detail the method according to the embodiment of this application. The following provides the apparatus according to the embodiment of this application.
[0438] It should be understood that the division into units within a device provided in the embodiments of this application is merely a logical functional division. In actual implementation, all or some of the units may be integrated into a single physical entity or may be physically separated. In addition, the units within the device may be implemented in the form of software invoked by a processor. For example, the device includes a processor. The processor is connected to memory. The memory stores instructions. The processor invokes the instructions stored in memory to perform one of the aforementioned methods or to realize the functionality of the units within the device. The processor is, for example, a general-purpose processor, e.g., a Central Processing Unit (CPU) or a microprocessor. The memory is either in-device memory or external memory. Alternatively, the units within the device may be implemented in the form of hardware circuits, or the functionality of some or all of the units may be implemented by designing hardware circuits. Hardware circuits may be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), and the functionality of some or all of the aforementioned units is implemented by designing the logical relationships between the elements in the circuit. As another example, in a different implementation, the hardware circuit may be implemented by a programmable logic device (PLD). A field programmable gate array (FPGA) is used as an example, and the field programmable gate array may contain a large number of logic gate circuits, and the connections between the logic gate circuits are configured based on a configuration file, implementing some or all of the functions of the aforementioned unit.All units within the aforementioned device may be implemented in the form of software invoked by the processor, or all units may be implemented in the form of hardware circuits, or some units may be implemented in the form of software invoked by the processor and the rest may be implemented in the form of hardware circuits.
[0439] In embodiments of this application, the processor is a circuit having signal processing capabilities. In one implementation, the processor may be a circuit capable of reading and executing instructions, such as a Central Processing Unit (CPU), a microprocessor, a graphics processing unit (GPU) (which may be understood as a microprocessor), or a digital signal processor (DSP). In another implementation, the processor may implement specific functions based on the logical relationships of hardware circuits. The logical relationships of hardware circuits may be fixed or reconfigurable. For example, the processor may be an application-specific integrated circuit (ASIC) or an FPGA implemented by hardware circuits, such as a programmable logic device (PLD). In reconfigurable hardware circuits, the process by which the processor loads a configuration document to realize the hardware circuit configuration may be understood as the process by which the processor loads instructions to realize some or all of the functions of the unit. In addition, the processor may alternatively be a hardware circuit designed for artificial intelligence, or it may be understood as an ASIC, such as a Neural Network Processing Unit (NPU), a Tensor Processing Unit (TPU), or a Deep Learning Processing Unit (DPU).
[0440] The units within the aforementioned device may be one or more processors (or processing circuits) configured to perform the aforementioned method, such as a CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, or FPGA, or a combination of at least two of these processor forms.
[0441] In addition, all or some of the units within the aforementioned device may be integrated or implemented independently. In one implementation configuration, these units are integrated together and implemented in the form of a system-on-a-chip (SOC). The SOC may include at least one processor configured to perform one of the methods or to realize the functions of the units within the device. The type of at least one processor may vary. For example, the at least one processor may include a CPU and an FPGA, or a CPU and an artificial intelligence processor, or a CPU and a GPU.
[0442] The following is a list of some possible devices.
[0443] Figure 13 is a diagram of the structure of a communication device according to one embodiment of the present application. Optionally, the communication device 130 may be an independent device, such as a node. Alternatively, the communication device 130 may be a component within an independent device (e.g., a node), such as a chip or integrated circuit. The communication device 130 is configured to perform a communication method, for example, the communication method shown in one or more embodiments of Figures 2, 5, 6, 7, 8, 9, 10, 11, or 12. Furthermore, in some scenarios, the communication device is further configured to perform an association procedure shown in Figure 3 or 4.
[0444] As shown in Figure 13, the communication device 130 may include a communication unit 1301 and a processing unit 1302. The communication unit 1301 is configured to perform one or more operations such as transmitting, receiving, waiting, transmitting, establishing a connection, and responding, and is further configured to perform other operations of the communication method. The processing unit 1302 is configured to perform one or more operations such as processing, calculating, deciding, generating, updating, encrypting, and decrypting, and is further configured to perform other operations of the communication method.
[0445] In a possible design, the communication device 130 includes a communication unit 1301 and a processing unit 1302. The communication device 130 is configured to perform the first node-side method in the communication method described above.
[0446] In possible implementations, the communication unit 1301 is: A topology configuration message is sent to the second node, and the topology configuration message contains information about the first network. The first KDF is determined through agreement with the second node, and the first KDF is a KDF supported by both the first and second nodes. It is configured in this way.
[0447] The communication unit 1301 and the processing unit 1302 are configured to verify the first information together with the second node based on the first KDF.
[0448] The communication unit 1301 is further configured to transmit the network key of the first network to the second node via encryption once it has successfully verified the first information. The network key of the first network is used to implement security protections for the first network. For example, the network key of the first network is used to implement security protections for the network layer between nodes within the first network.
[0449] Optionally, the communication device 130 is the first node, or the communication device 130 is included in the first node and the first network includes the first node.
[0450] In possible implementations, the communication unit 1301 is further configured to transmit the network key ID of the first network to the second node.
[0451] In possible implementations, the information transmitted between the first node and the second node includes the information contained in the topology configuration message.
[0452] In a possible implementation of the first embodiment, the communication unit 1301 is further configured to receive a first verification value from a second node, and the processing unit 1302 verifies the first verification value based on information contained in at least a first KDF and topology configuration message. The first verification value is associated with information contained in at least a first KDF and topology configuration message.
[0453] Furthermore, successful verification of the first piece of information includes successful verification of the first verification value. Optionally, the first verification value may be included in the third message or carried in the third message.
[0454] In possible implementations, the first KDF may be the KDF with the highest priority among the KDFs supported by the second node. Optionally, the first KDF may be a KDF supported by both the first and second nodes. In this case, the first KDF may be a KDF supported by both the first and second nodes, and may be the KDF with the highest priority.
[0455] In possible implementations, the communication device 130 may select a first KDF from KDFs supported by both the second node and the first node, and present the selected first KDF to the second node.
[0456] In possible implementations, the communication unit 1301 is further configured to receive the KDF capability of the second node from the second node and to transmit instruction information for the first KDF to the second node. The KDF capability of the second node indicates the KDF supported by the second node.
[0457] In some scenarios, the KDF capabilities of the second node and the instruction information of the first KDF also belong to the first information. In this way, the first and second nodes can verify whether the information has been tampered with, thereby improving security.
[0458] In possible implementations, the communication unit 1301 is further configured to receive a first message from a second node and send a second message to the second node. The first message includes the KDF capability of the second node, and the second message includes at least the instruction information for the first KDF. It should be understood that the first and second messages may further include other information.
[0459] In possible implementations, the information transmitted between the first node and the second node includes one or more of the information contained in the second message, the information contained in the topology configuration message, and so on.
[0460] In possible implementations, the communication unit 1301 is further configured to receive a third message from a second node and verify a first verification value based on a first KDF, a first key, information contained in the second message, and information contained in a topology configuration message. The third message contains a first verification value, which is associated with a first KDF, a first key, information contained in the second message, and information contained in a topology configuration message, and the first key may be a key obtained through agreement between the first node and the second node. Furthermore, successful verification of the first information includes successful verification of the first verification value.
[0461] In possible implementations, the communication unit 1301 is further configured to receive a third message from a second node and verify a first verification value based on the first KDF, a first parameter, information contained in the second message, and information contained in the topology configuration message. The third message contains a first verification value, which is associated with the first KDF, a first parameter, information contained in the second message, and information contained in the topology configuration message, and the value of the first parameter is predefined. For example, the first parameter is 128 bits of data, and all 128 bits are zero. Furthermore, successful verification of the first information includes successful verification of the first verification value.
[0462] In possible implementations, the communication unit 1301 is further configured to transmit the KDF capability of the first node to the second node, the KDF capability of the first node instructs the KDF supported by the first node, and to receive instruction information for the first KDF from the second node. In some scenarios, the KDF capability of the first node, the instruction information for the first KDF, etc., also belong to the first information.
[0463] In possible implementations, security protection is implemented in the process of verifying the first information together with the second node based on the first KDF to further improve security.
[0464] In possible implementations, the communication unit 1301 is further configured to send a first random number to a second node. The random number may belong to the first information for determining whether the message carrying the random number has been tampered with.
[0465] In possible implementations, the processing unit 1302 is further configured to generate a second verification value based on the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. The communication unit 1301 is further configured to transmit the second verification value to the second node.
[0466] Furthermore, the communication unit 1301 is further configured to receive a second random number from the second node. Optionally, the second random number is included in a third message.
[0467] Optionally, the second verification value is carried in a fifth message sent from the first node to the second node. Furthermore, security protection may be implemented in the process of receiving the third message and sending the fifth message.
[0468] In possible implementations, the communication unit 1301 and the processing unit are further configured to determine the first key through agreement with a second node based on a first key agreement algorithm. The first key (DH key) or a key derived from the first key is used to implement security protection for information transmitted between the first node and the second node.
[0469] In possible implementations, the first key agreement algorithm may be determined through agreement between the communication device 130 and the second node.
[0470] In another possible implementation, the communication unit 1301 is further configured to transmit the key agreement algorithm capability of the first node to the second node and to receive instruction information for the first key agreement algorithm transmitted by the second node.
[0471] Optionally, the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
[0472] In another possible implementation, the communication unit 1301 is further configured to receive the key agreement algorithm capability of the second node from the second node and to transmit instruction information for the first key agreement algorithm to the second node.
[0473] Optionally, the key agreement algorithm capability of the second node is included in the first message, and the instruction information for the first key agreement algorithm is included in the second message.
[0474] In another possible implementation, the processing unit 1302 is further configured to derive an encryption key from the first key in order to obtain the ciphertext of the network key of the first network, and to encrypt the key of the first network layer based on the encryption key.
[0475] The communication unit 1301 is further configured to transmit the ciphertext of the network key of the first network to the second node.
[0476] In another possible implementation, the communication unit 1301 and the processing unit 1302 are further configured to establish an access layer connection to the second node and to enable access layer encryption between the first node and the second node.
[0477] The communication unit 1301 is further configured to send a fourth message to a second node, the fourth message containing the network key for the first network, and the first message being encrypted at the access layer.
[0478] In another possible implementation, the communication unit 1301 is further configured to transmit an identifier of the security algorithm of the first network to a second node.
[0479] In another possible implementation, the communication unit 1301 is further configured to receive security capability information of the second node from the second node, and the processing unit 1302 is further configured to determine the security algorithm of the first network. Furthermore, the communication unit 1301 is further configured to provide the second node with an identifier for the determined security algorithm of the first network.
[0480] In another possible design, the communication device 130 includes a communication unit 1301 and a processing unit 1302. The communication device 130 is configured to perform a second node-side method of the communication method described above.
[0481] In possible implementations, the communication unit 1301 is configured to receive topology configuration messages from the first node. The communication unit 1301 and the processing unit 1302 are configured to determine a first key derivation function (KDF) through agreement with the first node, such that the first KDF is supported by both the first and second nodes. The processing unit 1302 is further configured to generate a first verification value based on the first KDF and the first information. The communication unit 1301 is further configured to send the first verification value to the first node and to receive the network key of the first network sent by the first node through encryption. The network key of the first network is used to implement security protections to the network layer between nodes in the first network.
[0482] In possible implementations, the information transmitted between the first node and the second node includes information contained in the topology configuration message. The processing unit 1302 is further configured to generate a first verification value based on at least the first KDF and the information contained in the topology configuration message, and the communication unit 1301 is further configured to transmit the first verification value to the first node. Optionally, the first verification value may be carried in a third message transmitted to the first node.
[0483] In possible implementations, the first KDF may be the KDF with the highest priority among the KDFs supported by the second node. Optionally, the first KDF may be a KDF supported by both the first and second nodes. In this case, the first KDF may be a KDF supported by both the first and second nodes, and may be the KDF with the highest priority.
[0484] In possible implementations, the communication unit 1301 is further configured to transmit the KDF capability of the second node to the first node and to receive instruction information for the first KDF from the first node. In some scenarios, the KDF capability of the second node and the instruction information for the first KDF also belong to the first information. In this way, the first and second nodes can verify whether the information has been tampered with, thereby improving security.
[0485] In possible implementations, the communication device 130 may select a first KDF from KDFs supported by both the second node and the first node, and present the selected first KDF to the second node.
[0486] In possible implementations, the information transmitted between the first node and the second node includes the information contained in the second message and / or the information contained in the topology configuration message.
[0487] In possible implementations, the processing unit 1302 is further configured to generate a first verification value based on the information contained in the second message and the information contained in the topology configuration message. The communication unit 1301 is further configured to send a third message to the first node, the third message containing the first verification value.
[0488] In possible implementations, the processing unit 1302 is further configured to generate a first verification value based on a first KDF, a first key, information contained in a second message, and information contained in a topology configuration message. The communication unit 1301 is further configured to send a third message to the first node, the third message containing the first verification value. The first key is obtained through agreement between the first node and the second node.
[0489] In possible implementations, the processing unit 1302 is further configured to generate a first verification value based on a first KDF, a first parameter, information contained in a second message, and information contained in a topology configuration message. The communication unit 1301 is further configured to send a third message to a first node, the third message containing the first verification value. The value of the first parameter is predefined, for example, all 128 bits are 0.
[0490] In possible implementations, the communication unit 1301 is further configured to receive a first random number from a second node, which is used to generate a verification value or to derive a key, etc. Optionally, a second random number may be included in the second message. Furthermore, the first information may include a second random number in the second message, i.e., the first random number may be used to generate a first verification value.
[0491] In a possible implementation, the communication unit 1301 is further configured to receive a fifth message from a first node, the fifth message containing a second verification value, the second verification value being associated with a first KDF and at least one of the following pieces of information: the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. The processing unit 1302 is further configured to verify the first verification value based on the first KDF and the same information.
[0492] For example, the second validation value is associated with the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. The second node validates the second validation value based on the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key.
[0493] In possible implementations, the processing unit 1302 is further configured to determine a first key based on a first key agreement algorithm. The first key, or a key derived from the first key, is used to implement security protection for information transmitted between the first node and the second node.
[0494] In possible implementations, the communication unit 1301 and processing unit 1302 are further configured to determine a first key agreement algorithm through agreement with a first node, the first key agreement algorithm being a key agreement algorithm supported by a second node.
[0495] In another possible implementation, the communication unit 1301 is further configured to receive the key agreement algorithm capability of the first node from the first node and to transmit instruction information for the first key agreement algorithm to the first node. Optionally, the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
[0496] In another possible implementation, the communication unit 1301 is further configured to transmit the key agreement algorithm capability of the second node to the first node and to receive instruction information for the first key agreement algorithm from the first node. Optionally, the key agreement algorithm capability of the second node is included in the first message, and the instruction information for the first key agreement algorithm is included in the second message.
[0497] In another possible implementation, the communication unit 1301 is further configured to receive the ciphertext of the network key of the first network. The processing unit 1302 is further configured to derive an encryption key from the first key in order to obtain the network key of the first network, and to decrypt the ciphertext of the network key of the first network layer based on the encryption key.
[0498] In another possible implementation, the communication unit 1301 and processing unit 1302 are further configured to establish an access layer connection to the first node and enable access layer encryption. The communication unit 1301 is further configured to receive a fourth message, the fourth message containing the network key of the first network, and the fourth message is encrypted at the access layer. The processing unit 1302 is further configured to decrypt the fourth message at the access layer to obtain the network key of the first network.
[0499] In another possible implementation, the communication unit 1301 is further configured to receive an identifier for the security algorithm of the first network from the first node.
[0500] In another possible implementation, the communication unit 1301 is further configured to transmit security capability information of the second node to the first node.
[0501] In another possible implementation, the communication unit 1301 is further configured to receive a second message from the first node, the second message indicating that the second node was unable to join the first network.
[0502] Figure 14 shows the structure of another communication device according to one embodiment of the present application. The communication device 140 may be an independent device, for example, a node, or a component included in an independent device, for example, a chip, a software module, or an integrated circuit. The communication device 140 may include at least one processor 1401 and a communication interface 1402. Optionally, the communication device may further include at least one memory 1403. Furthermore, optionally, the communication device may further include a connection line 1404. The processor 1401, the communication interface 1402, and / or the memory 1403 are connected via the connection line 1404 and / or communicate with each other via the connection line 1404 to transfer control signals and / or data signals.
[0503] Processor 1401 is a module for performing arithmetic and / or logical operations, and may specifically include one or more of the following modules: filters, modems, power amplifiers, low noise amplifiers (LNAs), baseband processors, radio frequency processors, radio frequency circuits, central processing units (CPUs), application processors (APs), microcontroller units (MCUs), electronic control units (ECUs), graphics processing units (GPUs), microprocessor units (MPUs), application-specific integrated circuits (ASICs), image signal processors (ISPs), digital signal processors (DSPs), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), coprocessors, etc.
[0504] The communication interface 1402 may be configured to provide information input or information output to at least one processor, or to receive signals transmitted from an external source and / or transmit signals to an external source.
[0505] For example, the communication interface 1402 may include an interface circuit.
[0506] For example, the communication interface 1402 may include a wired link interface such as an Ethernet cable, or it may be a wireless link interface (Wi-Fi, Bluetooth, Universal Wireless Transmission, Automotive Short-Range Communication Technology, or another Short-Range Wireless Communication Technology).
[0507] Optionally, the communication interface 1402 may further include a radio frequency transmitter, an antenna, etc. When the communication interface 1402 includes an antenna, one or more antennas may be present.
[0508] In possible designs, if the communication device 140 is a separate device, the communication interface 1402 may include a receiver and a transmitter. The receiver and transmitter may be the same component or different components. When the receiver and transmitter are the same component, the component may be called a transceiver.
[0509] In another possible design, if the communication device 140 is a chip or circuit, the communication interface 1402 may include an input interface and an output interface, and the input interface and the output interface may be the same interface or different interfaces.
[0510] Optionally, the functionality of communication interface 1402 may be implemented by a transceiver circuit or a dedicated transceiver chip.
[0511] Memory 1403 is configured to provide a storage space, which may store data, such as an operating system and computer programs. Memory 1403 may be one or a combination of random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), etc.
[0512] The functions and operations of the modules or units within the communication device 140 listed above are merely illustrative examples.
[0513] The functional units within the communication device 140 may be configured to perform the aforementioned communication methods, for example, the communication methods shown in Figures 2, 5, 6, 7, 8, 9, 10, 11, or 12.
[0514] Optionally, processor 1401 may be a processor specifically configured to perform the method described above (referred to as a dedicated processor for ease of distinction), or a processor that performs the method described above by calling a computer program (referred to as a dedicated processor for ease of distinction). Optionally, at least one processor may further include both a dedicated processor and a general-purpose processor.
[0515] If the communication device 140 includes at least one memory 1403, and the processor 1401 performs the aforementioned communication method by calling a computer program, the computer program may be stored in the memory 1403.
[0516] One embodiment of the present application further provides a chip comprising a logic circuit and a communication interface. The communication interface is configured to receive or transmit signals, and the logic circuit is configured to receive or transmit signals via the communication interface. The chip is configured to perform the aforementioned communication methods, for example, the communication methods shown in Figures 2, 5, 6, 7, 8, 9, 10, 11, or 12.
[0517] One embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When an instruction is executed in at least one processor (or communication device), the aforementioned communication method, for example, the communication method shown in Figures 2, 5, 6, 7, 8, 9, 10, 11, or 12, is executed.
[0518] One embodiment of this application further provides a computer program product. The computer program product includes computer instructions, which are used to execute the aforementioned communication methods, for example, the communication methods shown in Figures 2, 5, 6, 7, 8, 9, 10, 11, or 12.
[0519] One embodiment of this application further provides a terminal comprising a communication device 130 and / or a communication device 140.
[0520] In possible implementations, a terminal may include a terminal node, and the terminal may be an intelligent terminal, or a means of transport such as a vehicle, unmanned aerial vehicle, or robot.
[0521] It should be noted that in embodiments of this application, the terms “example” or “for example” are used to indicate that an example, illustration, or explanation is being given. Any embodiment or design scheme described as “example” or “for example” in this application should not be described as being preferable or having more advantages than another embodiment or design scheme. More precisely, the use of terms such as “example” or “for example” is intended to present the relevant concepts in a particular way.
[0522] In embodiments of this application, “at least one” means one or more, and “more” means two or more. “At least one of the following items (elements)” or similar expressions means any combination of these items, including any single item (element) or any combination of multiple items (elements).
[0523] For example, at least one item (part) among a, b, or c may represent a, b, c, (a and b), (a and c), (b and c), or (a, b, and c), and a, b, and c may be singular or plural. The term "and / or" describes the relationship between related objects and indicates that three relationships may exist. For example, A and / or B may represent the following three cases: that only A exists, that both A and B exist, and that only B exists, and A and B may be singular or plural. The letter " / " generally indicates an "or" relationship between related objects.
[0524] In addition, unless otherwise stated, ordinal numbers such as "First" and "Second" in the embodiments of this application are used to distinguish between multiple subjects, but are not intended to limit the order, chronological order, priority, or importance of the multiple subjects. As another example, the First Node and the Second Node are used merely to facilitate the description of new parameters in different implementation forms and do not represent different execution behaviors, importance, structures, etc.
[0525] In addition, messages in this application may be considered as types of information, and message names may be randomly replaced. For example, a topology configuration message may also be called topology configuration service data information. The names of other messages and information may also have other designs. Details are not described one by one in this specification.
[0526] Depending on the context, the term “when” as used in the embodiments described above may be interpreted as “in the case of,” “after,” “in response to a decision,” or “in response to detection.” The foregoing description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the scope of the concepts and principles of the present application shall fall within the scope of protection of the present application.
[0527] Those skilled in the art will understand that all or part of the steps of the embodiment may be performed by hardware or a program that instructs related hardware. The program may be stored on a computer-readable storage medium. The storage medium may be read-only memory, a magnetic disk, an optical disk, and the like. [Explanation of Symbols]
[0528] 10 Communication Systems 101 First Node 102 Second node 103 The First Network 130 Communication equipment 1301 Communication Unit 1302 Processing Unit 140 Communication equipment 1401 Processor 1402 Communication Interface 1403 memory 1404 Connection Line
Claims
1. A communication method applied to the first node, A step of sending a topology configuration message to a second node, wherein the topology configuration message includes information about the first network, A step of determining a first key derivation function (KDF) through agreement with the second node, wherein the first KDF is a KDF supported by the second node, A step of verifying first information together with the second node based on the first KDF, wherein the first information is information transmitted between the first node and the second node, When the verification of the first information is successful, the network key of the first network is transmitted to the second node via encryption. Methods that include...
2. The information transmitted between the first node and the second node includes the information contained in the topology configuration message. The step of verifying the first information together with the second node based on the first KDF is: A step of receiving a third message from the second node, wherein the third message includes a first verification value, and the first verification value is associated with at least the first KDF and the information contained in the topology configuration message, A step of verifying the first verification value based at least on the first KDF and the information contained in the topology configuration message. The method according to claim 1, wherein successful verification of the first information includes successful verification of the first verification value.
3. The step of determining the first KDF through agreement with the second node is: A step of receiving a first message from the second node, wherein the first message includes the KDF capability of the second node, and the KDF capability of the second node indicates the KDF supported by the second node. A step of sending a second message to the second node, wherein the second message includes at least instruction information for the first KDF. The method according to claim 1, including the method described in claim 1.
4. The method according to claim 3, wherein the information transmitted between the first node and the second node includes information contained in the second message and / or information contained in the topology configuration message.
5. The step of verifying the first information together with the second node based on the first KDF is: A step of receiving a third message from the second node, wherein the third message includes a first validation value, the first validation value is associated with the first KDF, the first key, the information contained in the second message, and the information contained in the topology configuration message, and the first key is obtained through agreement between the first node and the second node. A step of verifying the first verification value based on the first KDF, the first key, the information contained in the second message, and the information contained in the topology configuration message, The method according to claim 4, wherein successful verification of the first information includes successful verification of the first verification value.
6. The step of verifying the first information together with the second node based on the first KDF is: A step of receiving a third message from the second node, wherein the third message includes a first verification value, the first verification value is associated with the first KDF, a first parameter, the information contained in the second message, and the information contained in the topology configuration message, and the value of the first parameter is predefined. A step of verifying the first verification value based on the first KDF, the first parameter, the information contained in the second message, and the information contained in the topology configuration message, The method according to claim 4, wherein successful verification of the first information includes successful verification of the first verification value.
7. The method according to any one of claims 3 to 6, wherein the second message further includes a first random number.
8. The aforementioned method, A step of generating a second verification value based on the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key, The steps include sending the second verification value to the second node and The method according to claim 5 or 6, further comprising:
9. The aforementioned method, A step of determining a first key agreement algorithm through agreement with the second node, wherein the first key agreement algorithm is a key agreement algorithm supported by the second node, A step of determining a first key based on a first key agreement algorithm, wherein the first key or a key derived from the first key is used to implement security protection over the information transmitted between the first node and the second node. The method according to any one of claims 3 to 7, further comprising:
10. The step of determining the first key agreement algorithm through agreement with the second node is: A step of transmitting the key agreement algorithm capability of the first node to the second node, wherein the key agreement algorithm capability of the first node indicates a key agreement algorithm supported by the first node. The steps include receiving instruction information for the first key agreement algorithm transmitted by the second node, and The method according to claim 9, including the method described in claim 9.
11. The method according to claim 10, wherein the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
12. The step of determining the first key agreement algorithm through agreement with the second node is: A step of receiving the key agreement algorithm capability of the second node from the second node, wherein the key agreement algorithm capability of the second node includes the key agreement algorithm supported by the second node, The steps include: transmitting instruction information for the first key agreement algorithm to the second node; The method according to claim 9, including the method described in claim 9.
13. The method according to claim 12, wherein the key agreement algorithm capability of the second node is included in the first message, and the instruction information of the first key agreement algorithm is included in the second message.
14. The step of transmitting the network key of the first network to the second node through encryption is: The steps include: deriving an encryption key from the first key; The steps include: encrypting the key of the first network layer based on the encryption key and obtaining the ciphertext of the network key of the first network; The steps include: transmitting the ciphertext of the network key of the first network to the second node; The method according to any one of claims 9 to 13, including the method described in any one of claims 9 to 13.
15. Before transmitting the network key of the first network to the second node via encryption, the method further includes the step of establishing an access layer connection to the second node, wherein encryption of the access layer connection is enabled. The method according to any one of claims 1 to 14, the method comprising the step of transmitting the network key of the first network to the second node through encryption, the step of transmitting a fourth message to the second node, the fourth message comprising the network key of the first network, and the fourth message being encrypted at the access layer.
16. The aforementioned method, The information relating to the first network includes an identifier for the security algorithm of the first network, The security algorithm includes an encryption algorithm and / or an integrity protection algorithm, or the security algorithm includes an authenticated encryption algorithm. The method according to any one of claims 1 to 15, further comprising:
17. The session security algorithm of the first network is pre-configured at the first node, or Before sending the topology configuration message to the second node, the method A step of receiving security capability information of the second node from the second node, wherein the security capability information of the second node indicates a security algorithm supported by the second node. A step of determining the security algorithm of the first network, wherein the security algorithm of the first network is a session security algorithm supported by the second node, and The method according to claim 16, further comprising:
18. The method according to claim 17, wherein the first node is an authorization node, and the first node is the only node in the first network before the second node joins the first network.
19. A communication method applied to a second node, Steps include receiving a topology configuration message from a first node, wherein the topology configuration message includes information about the first network, A step of determining a first key derivation function KDF through agreement with the first node, wherein the first KDF is a KDF supported by the second node, A step of generating a first verification value based on the first KDF and first information, wherein the first information includes information transmitted between the first node and the second node. The steps include sending the first verification value to the first node, The steps include receiving the network key of the first network transmitted by the first node through encryption, and Methods that include...
20. The method according to claim 19, wherein the information transmitted between the first node and the second node includes the information contained in the topology configuration message.
21. The step of determining the first KDF through agreement with the second node is: A step of sending a first message to the first node, wherein the first message includes the KDF capability of the second node, and the KDF capability of the second node indicates the KDF supported by the second node. A step of receiving a second message from the first node, wherein the second message includes instruction information for the first KDF, and The method according to claim 19, including the method described in claim 19.
22. The method according to claim 21, wherein the information transmitted between the first node and the second node includes information contained in the second message and / or information contained in the topology configuration message.
23. The step of generating the first verification value based on the first KDF and the first information is: A step of generating a first validation value based on the first KDF, the first key, the information contained in the second message, and the information contained in the topology configuration message, wherein the first key is obtained through agreement between the first node and the second node, The step of sending the first verification value to the first node is: The method according to claim 22, comprising the step of sending a third message to the first node, wherein the third message includes the first verification value.
24. The step of generating the first verification value based on the first KDF and the first information is: A step of generating a first validation value based on the first KDF, a first parameter, the information contained in the second message, and the information contained in the topology configuration message, wherein the first key is obtained through agreement between the first node and the second node, and the value of the first parameter is predefined, The step of sending the first verification value to the first node is: The method according to claim 22, comprising the step of sending a third message to the first node, wherein the third message includes the first verification value.
25. The method according to any one of claims 21 to 24, wherein the second message further includes a first random number.
26. The aforementioned method, A step of receiving a second verification value from the first node, wherein the second verification value is associated with the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. A step of verifying the second validation value based on the first KDF, the information contained in the third message, the information contained in the first message, the information contained in the topology configuration message, and the first key. The method according to claim 23 or 24, further comprising:
27. The aforementioned method, A step of determining a first key agreement algorithm through agreement with the first node, wherein the first key agreement algorithm is a key agreement algorithm supported by the second node, A step of determining a first key based on a first key agreement algorithm, wherein the first key or a key derived from the first key is used to implement security protection over the information transmitted between the first node and the second node. The method according to any one of claims 21 to 26, further comprising:
28. The step of determining the first key agreement algorithm through agreement with the first node is: A step of receiving the key agreement algorithm capability of the first node from the first node, wherein the key agreement algorithm capability of the first node includes a key agreement algorithm supported by the first node. A step of transmitting instruction information for the first key agreement algorithm to the first node, wherein the first key agreement algorithm is the key agreement algorithm supported by the second node, and The method according to claim 27, including the method described in claim 27.
29. The method according to claim 28, wherein the key agreement algorithm capability of the first node is included in the topology configuration message, and the instruction information for the first key agreement algorithm is included in the first message.
30. The step of determining the first key agreement algorithm through agreement with the first node is: A step of transmitting the key agreement algorithm capability of the second node to the first node, wherein the key agreement algorithm capability of the second node includes the key agreement algorithm supported by the second node. A step of receiving instruction information for the first key agreement algorithm from the first node, wherein the first key agreement algorithm is the key agreement algorithm supported by the second node, and The method according to claim 27, including the method described in claim 27.
31. The method according to claim 30, wherein the key agreement algorithm capability of the second node is included in the first message, and the instruction information of the first key agreement algorithm is included in the second message.
32. The step of receiving the network key of the first network transmitted by the first node through encryption includes the step of receiving the ciphertext of the network key of the first network, The aforementioned method, The steps include: deriving an encryption key from the first key; The steps include: decrypting the ciphertext of the network key of the first network layer based on the encryption key, and obtaining the network key of the first network; The method according to any one of claims 27 to 31, further comprising:
33. The aforementioned method, A step of establishing an access layer connection to the first node, further comprising the step of enabling encryption of the access layer connection, The step of receiving the network key of the first network transmitted by the first node through encryption is: A step of receiving a fourth message, wherein the fourth message includes the network key of the first network, and the fourth message is encrypted at the access layer. The steps include: decrypting the fourth message at the access layer and obtaining the network key of the first network; The method according to any one of claims 19 to 32, including the method described in any one of claims.
34. The aforementioned method, The information relating to the first network includes an identifier for the security algorithm of the first network, The security algorithm includes an encryption algorithm and / or an integrity protection algorithm, or the security algorithm includes an authenticated encryption algorithm. The method according to any one of claims 19 to 33, further comprising:
35. The aforementioned method, The method according to any one of claims 19 to 34, further comprising the step of transmitting security capability information of the second node to the first node, wherein the security capability information of the second node indicates a security algorithm supported by the second node.
36. A communication device comprising a communication unit and a processing unit, wherein the communication device is configured to perform the method described in any one of claims 1 to 18.
37. A communication device comprising a communication unit and a processing unit, wherein the communication device is configured to perform the method described in any one of claims 19 to 35.
38. A communication device comprising a processor and a communication interface, A communication device wherein, when the processor calls a computer program or instruction in memory, the method according to any one of claims 1 to 18 is performed, or the method according to any one of claims 19 to 35 is performed.
39. A chip comprising a processor and a communication interface, The processor is a chip configured to perform the method described in any one of claims 1 to 18, or the method described in any one of claims 19 to 35.
40. A communication system comprising a first node and a second node, The first node comprises the communication device described in claim 36, A communication system comprising the communication device described in claim 37, wherein the second node is a communication device as described in claim 37.
41. A terminal comprising a communication device according to claim 36, or a communication device according to claim 37, or a communication device according to claim 38, or a chip according to claim 39, or a communication system according to claim 40.
42. A computer-readable storage medium, wherein the computer-readable storage medium is configured to store instructions or computer programs. A computer-readable storage medium in which, when the instruction or the computer program is executed, the method according to any one of claims 1 to 18 is performed, or the method according to any one of claims 19 to 35 is performed.