[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2022041141A1 - 一种通信方法及相关装置 - Google Patents

一种通信方法及相关装置 Download PDF

Info

Publication number
WO2022041141A1
WO2022041141A1 PCT/CN2020/112249 CN2020112249W WO2022041141A1 WO 2022041141 A1 WO2022041141 A1 WO 2022041141A1 CN 2020112249 W CN2020112249 W CN 2020112249W WO 2022041141 A1 WO2022041141 A1 WO 2022041141A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
node
group
communication
communication group
Prior art date
Application number
PCT/CN2020/112249
Other languages
English (en)
French (fr)
Inventor
王勇
陈璟
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20950811.8A priority Critical patent/EP4195580A4/en
Priority to KR1020237009722A priority patent/KR20230051592A/ko
Priority to CN202080103262.4A priority patent/CN115885496B/zh
Priority to CN202311484258.9A priority patent/CN117749355A/zh
Priority to JP2023514142A priority patent/JP2023541563A/ja
Priority to PCT/CN2020/112249 priority patent/WO2022041141A1/zh
Publication of WO2022041141A1 publication Critical patent/WO2022041141A1/zh
Priority to US18/176,289 priority patent/US20230208625A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/083Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
    • H04L9/0833Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP] involving conference or group key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/84Vehicles

Definitions

  • the present invention relates to the field of communication technology, especially the field of short-range communication technology, such as cockpit domain communication. Specifically, it relates to a communication method and related devices.
  • Unicast is a way of communication between two interested nodes, which belongs to point-to-point communication.
  • Broadcast is a point-to-multipoint communication that a node sends to all nodes in the subnet. Multicast is between the two.
  • a node (for example, the first node) sends a message to a node in a communication group, and all nodes in the communication group can receive the message, which belongs to point-to-multipoint. communication.
  • Multicast technology is one of the key technologies in computer networks. No matter in the application layer, network layer or media access layer, multicast has been widely used, such as media broadcasting, multi-party conference, array detection and so on.
  • unicast messages can be achieved by unicast keys, and a pair of Private Temporary Keys (PTK) can be established between two nodes to ensure one-to-one unicast security.
  • PTK Private Temporary Keys
  • Unicast messages need to be protected, and multicast messages also need to be protected. Only the group members in the communication group know the group key used for encryption and decryption, so as to ensure that only group members can interpret the encrypted messages, and non-group members cannot obtain them. Packet content to protect the security of multicast communication.
  • the protection of multicast messages relies on the group key, so the protection of the group key is critical.
  • the leakage of the group key allows attackers to monitor messages in the group through the group key, resulting in data leakage and threats to user privacy and security.
  • this situation is likely to cause important data leakage of the vehicle, or the vehicle communicates with a node that has stolen the group key, jeopardizing the safety of the vehicle.
  • the embodiment of the present application discloses a communication method and a related device, which can protect the privacy of a group key and improve the security in a multicast communication process.
  • an embodiment of the present application discloses a communication method, including:
  • the group key of the first communication group is the communication group where the second node is located; the group key of the first communication group is based on the first freshness parameter and the first communication group. Obtained from at least one of the identification IDs of a communication group;
  • a first association establishment message is sent to the second node, wherein the first association establishment message includes the first protection key.
  • the group key of the first communication group where the second node is located can be determined, and then the shared key of the first node and the second node is used to encrypt the group key.
  • the first protection key is obtained, and the first protection key is carried in the association establishment message and sent to the second node. It can be seen that since the protection key carried in the association establishment message is obtained by encrypting the group key with the shared key, the privacy of the group key can be protected regardless of whether the first association establishment message is encrypted or not.
  • the group key can be used to encrypt the multicast message, so as to protect the multicast message, prevent non-group members from obtaining the communication content, and improve the performance of the group. security of broadcast communications.
  • the first node can send the group key to the second node through the protection key in the association establishment message, and the distribution process of the group key can be integrated into the process of establishing the association between the first node and the second node.
  • An additional key distribution process is required, which saves the overhead of network resources and improves the efficiency of multicast communication.
  • the first node and the second node share the shared key.
  • the shared key is a secret value shared between the first node and the second node.
  • the shared key can be generated by both parties through the same key acquisition method, or it can be pre-defined or pre-defined in the nodes of both parties.
  • the configuration can also be sent by a trusted device to the first node and the second node respectively.
  • the first node and the second node can generate a key S by exchanging public keys.
  • the value of the key S generated by the first node is the same as the value of the key S generated by the second node, so the key S can be used as the first node.
  • other keys can also be obtained through the key derivation algorithm KDF according to the original shared key. Since the method for deriving keys between the second node and the second node can be the same, the obtained The key is also a shared key.
  • the group key of the first communication group is encrypted based on the shared key between the first node and the second node to obtain a first protection key keys, including:
  • the first protection key is obtained by encrypting the group key of the first communication group based on the shared key and the second freshness parameter between the first node and the second node.
  • the above describes an encryption method. Since the value of the freshness parameter is different, the first protection key obtained by encrypting the group key of the first communication group each time is also different, thereby improving the privacy of the group key. sex.
  • the group key of the first communication group is encrypted based on the shared key between the first node and the second node to obtain the first protection keys, including:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • the group key of the first communication group is encrypted by the first intermediate key to obtain the first protection key.
  • the above describes yet another encryption method.
  • the first node generates the first intermediate key by using the shared key and the second freshness parameter, and encrypts the group key by using the first intermediate key.
  • the group key of the first communication group is encrypted based on the shared key between the first node and the second node to obtain the first protection keys, including:
  • the first intermediate key is generated through the first key derivation algorithm KDF; the first KDF belongs to the support of the second node the KDF;
  • XOR processing is performed on the first intermediate key and the group key of the first communication group to obtain the first protection key.
  • the above describes another encryption method.
  • the first node generates the first intermediate key by using the shared key and the second freshness parameter. Since the original value can be obtained after two XOR processing, the first node will An intermediate key is XORed with the group key of the first communication group. Further optionally, after receiving the first protection key, the second node generates the same first intermediate key by using the shared key and the value of the second new freshness parameter, and combines the first intermediate key and the first protection key. After XOR processing, the key of the first communication group can be obtained.
  • the shared key is an encryption key between the first node and the second node, and the second freshness parameter is a random number;
  • the first association establishment message includes the second freshness parameter.
  • the above describes the possible situation of sharing the key and the freshness parameter.
  • the encryption key between the first node and the second node can be shared, so the encryption key pair group between the first node and the second node can be used. key to encrypt.
  • the second freshness parameter may be a random number (number once, NONCE). Among them, NONCE is a random value that is used only once (or non-repeating).
  • the second freshness parameter can be sent to the second receptionist in the first association establishment message, so that the second node can decrypt the first protection key according to the second freshness parameter to obtain the group key of the first communication group.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent the value of the first communication group based on the shared key. The number of times the group key was encrypted.
  • the second freshness parameter may be the value of the first counter, and the first counter is used to represent the number of times the group key of the first communication group is encrypted based on the shared key .
  • the value of the used counter is different, so that the first protection key obtained by encrypting the same group key of the first communication group each time is also the same different, thereby improving the privacy of the group key.
  • the determining the group key of the first communication group includes:
  • the group key of the first communication group is generated through the second KDF.
  • the method for determining the group key of the first communication group is described above.
  • the group key of the communication group can be determined according to the ID of the communication group.
  • the group key of the first communication group can be generated by the KDF. Further optionally, if the ID of the first communication group does not have a corresponding group key (for example, when a communication group is newly created), the group key of the first communication group may be generated through KDF.
  • the method further includes:
  • the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; wherein, the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm ;
  • the first association establishment message further includes information for indicating the group security algorithm.
  • the first association establishment message also includes a group security algorithm, and the security algorithm is determined from an algorithm supported by all nodes in the group.
  • the group security algorithm is an algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm includes:
  • the group security algorithm is determined according to an algorithm selection policy, and the algorithm selection policy includes at least one of a priority-based algorithm selection policy and an order-based algorithm selection policy.
  • the group security algorithm includes a third KDF algorithm, and the method further includes:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the session key can be derived from the group key according to the type of the session key, which is used for encryption during the session.
  • the key type includes one of a signaling plane encryption key, a user plane encryption key, a signaling plane security key, or a user plane security key or multiple; or, the type of the session key corresponds to a scenario in which the session key is applied.
  • the group key of the first communication group is encrypted based on the shared key between the first node and the second node to obtain a protection key
  • the method further includes:
  • the second association establishment message belongs to the signaling plane message between the first node and the second node.
  • the method includes:
  • a key update message is sent to the second node, the key update message including the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the method for updating the group key is described above. After it is determined that the conditions for updating the group key are satisfied, the first key can be determined, and the first key is encrypted with the shared key and sent to the second node through a key update message. It can be seen that since the protection key carried in the key update message is obtained by encrypting the first key with the shared key, the privacy of the first key can be protected regardless of whether the key update message is encrypted or not. .
  • the key update message may be a multicast message sent by the first node to the second node in the first communication group, or may be a unicast message between the first node and the second node. Further optionally, when the key update message is a unicast message, the first node may also send a unicast message to other second nodes in the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; the first key application Within the validity period of the first key from the activation time of the first key.
  • the key update message can indicate the update time of the first target key and/or the validity period of the first target key, which is helpful for determining when to apply the first target key according to requirements.
  • the method further includes:
  • the first key is applied at the activation time of the first key.
  • the determining that an update confirmation message is received from at least one second node belonging to the first communication group includes:
  • encrypting the first key with a shared key between the first node and the second node to obtain a second protection key comprising: :
  • the second protection key is obtained by encrypting the first key based on the shared key between the first node and the second node and a fourth freshness parameter.
  • the above describes a method for encrypting the first key. Since the value of the freshness parameter is different, the second protection key obtained by encrypting the first key each time is also different, thereby improving the group key. privacy.
  • encrypting the first key with a shared key between the first node and the second node to obtain a second protection key comprising: :
  • the second intermediate key is generated by the first key derivation algorithm KDF;
  • the first key is encrypted by the second intermediate key to obtain the first protection key.
  • encrypting the first key with a shared key between the first node and the second node to obtain a second protection key comprising: :
  • a second intermediate key is generated through the first key derivation algorithm KDF; the first KDF belongs to the support of the second node the KDF;
  • XOR processing is performed on the second intermediate key and the first key to obtain the second protection key.
  • the updated conditions include:
  • the difference between the frame number of the current communication frame and the marked frame number is greater than or equal to the first threshold; wherein, the frame number of the current communication frame and the marked frame number are in the same counting cycle;
  • the frame number of the key update or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time;
  • the difference between the marked frame number and the frame number of the current communication frame is less than or equal to a second threshold; wherein, the frame number of the current communication frame is in the next count period of the marked frame number; so
  • the marked frame number is the frame number that needs to be re-keyed or the marked frame number is the frame number of the communication frame encrypted by the first application of the group key of the first communication group;
  • the validity period of the group key of the first communication group has reached or the usage duration of the group key of the first communication group has reached a third threshold
  • At least one second node in the first communication group leaves the first communication group.
  • the above describes the conditions for updating the group key.
  • 1 The group freshness parameter (such as the frame number) of the access point is about to be repeated or reversed (or exceeded before the reversal) When a certain threshold of the group key expires); 2When the validity period of the group key expires or the use time of the group key exceeds the threshold; 3When the members of the group change.
  • an embodiment of the present application discloses a communication method, including:
  • the first association establishment message including a first protection key
  • a group key of the first communication group is obtained; wherein the first communication group is where the second node is located communication group.
  • the first node and the second node share the shared key.
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the first protection key ,include:
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the second freshness parameter and the first protection key.
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the first protection key ,include:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • a group key of the first communication group is obtained.
  • the shared key is an encryption key between the first node and the second node, and the second freshness parameter is a random number;
  • the first association establishment message includes the second freshness parameter.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent the value of the first communication group based on the shared key. The number of times the group key was encrypted.
  • the first association establishment message further includes information used to indicate a group security algorithm; the group security algorithm belongs to those supported by the nodes in the first communication group. an algorithm; the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm.
  • the group security algorithm is an algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm corresponds to an algorithm selection strategy
  • the algorithm selection strategy includes at least one of a priority-based algorithm selection strategy and an order-based algorithm selection strategy.
  • the group security algorithm includes a third KDF algorithm, and the method further includes:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one of a signaling plane encryption key, a user plane encryption key, a signaling plane security key, or a user plane security key or multiple; or, the type of the session key corresponds to a scenario in which the session key is applied.
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the first protection key Before, also included:
  • the method further includes:
  • the second association establishment message includes the group key of the first communication group; the second association establishment message belongs to the first node and the second node Signaling plane messages between;
  • the signaling plane encryption key between the first node and the second node and the second association are established message to obtain the group key of the first communication group.
  • the method further includes:
  • the first key is obtained based on the shared key between the first node and the second node and the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; the first key applies Within the validity period of the first key from the activation time of the first key.
  • the Methods after the first key is obtained based on the shared key between the first node and the second node and the second protection key, the Methods also include:
  • the first key is applied at the activation time of the first key.
  • the obtaining the first key based on the shared key between the first node and the second node and the second protection key includes:
  • the first key is obtained based on the shared key and the fourth freshness parameter and the second protection key between the first node and the second node.
  • an embodiment of the present application provides a communication apparatus, where the communication apparatus includes a unit for executing the method described in the first aspect or any possible implementation manner of the first aspect.
  • the device specifically includes:
  • a receiving unit configured to receive an association request message from the second node
  • a processing unit configured to determine a group key of a first communication group, wherein the first communication group is the communication group where the second node is located; the group key of the first communication group is based on the first freshness Determined by at least one of the parameters and the identification ID of the first communication group;
  • the processing unit configured to encrypt the group key of the first communication group based on the shared key between the first node and the second node to obtain a first protection key
  • a sending unit configured to send a first association establishment message to the second node, wherein the first association establishment message includes the first protection key.
  • the processing unit is specifically configured to:
  • the first protection key is obtained by encrypting the group key of the first communication group based on the shared key and the second freshness parameter between the first node and the second node.
  • the processing unit is specifically configured to:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • the first communication key is encrypted by the first intermediate key to obtain the first protection key.
  • the processing unit is specifically configured to:
  • the first intermediate key is generated through the first key derivation algorithm KDF; the first KDF belongs to the support of the second node the KDF;
  • XOR processing is performed on the first intermediate key and the group key of the first communication group to obtain the first protection key.
  • the shared key is an encryption key between the first node and the second node, and the second freshness parameter is a random number;
  • the first association establishment message includes the second freshness parameter.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent the value of the first communication group based on the shared key. The number of times the group key was encrypted.
  • the processing unit is specifically configured to:
  • the group key of the first communication group is generated through the second KDF.
  • the processing unit is further configured to:
  • the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; wherein, the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm ;
  • the first association establishment message further includes information for indicating the group security algorithm.
  • the group security algorithm is an algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm includes:
  • the group security algorithm is determined according to an algorithm selection policy, and the algorithm selection policy includes at least one of a priority-based algorithm selection policy and an order-based algorithm selection policy.
  • the group security algorithm includes a third KDF algorithm
  • the processing unit is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one of a signaling plane encryption key, a user plane encryption key, a signaling plane security key, or a user plane security key or multiple; or, the type of the session key corresponds to a scenario in which the session key is applied.
  • the processing unit is further configured to:
  • encryption is enabled on signaling plane messages between the first node and the second node; the sending unit is further configured to:
  • the processing unit is further configured to determine that a condition for updating the group key of the first communication group is met;
  • the processing unit is further configured to determine the first key according to at least one of the third freshness parameter and the identification ID of the first communication group;
  • the processing unit is further configured to encrypt the first key based on the shared key between the first node and the second node to obtain a second protection key;
  • the sending unit is further configured to send a key update message to the second node, where the key update message includes the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; the first key application Within the validity period of the first key from the activation time of the first key.
  • the processing unit is also used for:
  • the first key is applied at the activation time of the first key.
  • the processing unit is specifically used for:
  • the processing unit is specifically used for:
  • the second protection key is obtained by encrypting the key based on the shared key between the first node and the second node and a fourth freshness parameter.
  • the updated conditions include:
  • the difference between the frame number of the current communication frame and the marked frame number is greater than or equal to the first threshold; wherein, the frame number of the current communication frame and the marked frame number are in the same counting cycle;
  • the frame number of the key update or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time;
  • the difference between the marked frame number and the frame number of the current communication frame is less than or equal to a second threshold; wherein, the frame number of the current communication frame is in the next count period of the marked frame number; so
  • the marked frame number is the frame number that needs to be re-keyed or the marked frame number is the frame number of the communication frame encrypted by the first application of the group key of the first communication group;
  • the validity period of the group key of the first communication group has reached or the usage duration of the group key of the first communication group has reached a third threshold
  • At least one second node in the first communication group leaves the first communication group.
  • an embodiment of the present application provides a communication apparatus, where the communication apparatus includes a unit for executing the method described in the second aspect or any possible implementation manner of the second aspect.
  • the device specifically includes:
  • a sending unit configured to send an association request message to the first node
  • a receiving unit configured to receive a first association establishment message from the first node, where the first association establishment message includes a first protection key
  • a processing unit configured to obtain a group key of the first communication group based on the shared key between the first node and the second node and the first protection key; wherein the first communication group is the The communication group in which the second node is located.
  • the first node and the second node share the shared key.
  • the processing unit is specifically used for:
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the second freshness parameter and the first protection key.
  • the processing unit is specifically used for:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • a group key of the first communication group is obtained.
  • the shared key is an encryption key between the first node and the second node, and the second freshness parameter is a random number;
  • the first association establishment message includes the second freshness parameter.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent the value of the first communication group based on the shared key. The number of times the group key was encrypted.
  • the first association establishment message further includes information used to indicate a group security algorithm; the group security algorithm belongs to those supported by the nodes in the first communication group. an algorithm; the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm.
  • the group security algorithm is an algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm corresponds to an algorithm selection strategy
  • the algorithm selection strategy includes at least one of a priority-based algorithm selection strategy and an order-based algorithm selection strategy.
  • the processing unit is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one of a signaling plane encryption key, a user plane encryption key, a signaling plane security key, or a user plane security key or multiple; or, the type of the session key corresponds to a scenario in which the session key is applied.
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the first protection key Before, also included:
  • the receiving unit is further configured to receive a second association establishment message from the first node;
  • the second association establishment message includes a group of the first communication group key;
  • the second association establishment message belongs to the signaling plane message between the first node and the second node;
  • the processing unit is further configured to decrypt the second association establishment message by using a signaling plane encryption key between the first node and the second node to obtain a group key of the first communication group.
  • the receiving unit is further configured to receive a key update message from the first node; wherein the key update message includes a second protection key;
  • the processing unit is further configured to obtain the first key based on the shared key between the first node and the second node and the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; the first key application Within the validity period of the first key from the activation time of the first key.
  • the processing unit is further configured to:
  • the first key is applied at the activation time of the first key.
  • the processing unit is specifically configured to:
  • the first key is obtained based on the shared key and the fourth freshness parameter and the second protection key between the first node and the second node.
  • an embodiment of the present application further provides a communication device, the communication device includes at least one processor and a communication interface, the communication interface is used for sending and/or receiving data, the at least one processor is used for calling at least one A computer program stored in a memory to cause the apparatus to implement the first aspect or any possible implementation of the first aspect, or the method described in the second aspect or any possible implementation of the second aspect.
  • an embodiment of the present application further provides a communication system, where the communication system includes a first node and a second node, wherein the first node is the third aspect or any possible implementation manner of the third aspect
  • the second node is the device described in the fourth aspect or any possible implementation manner of the fourth aspect.
  • an embodiment of the application itself provides a chip system
  • the chip system communication device includes at least one processor and a communication interface
  • the communication interface is used for sending and/or receiving data
  • the at least one processor is used for calling A computer program stored in at least one memory, so that the device where the chip system is located implements the first aspect or any possible implementation of the first aspect, or implements the second aspect or any possible implementation of the second aspect method described.
  • an embodiment of the present application discloses a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on one or more processors, executes a first A method described in the aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect.
  • the embodiments of the present application disclose a computer program product, when the computer program product runs on one or more processors, executes the first aspect or any possible implementation manner of the first aspect, Or the method described in the second aspect or any possible implementation manner of the second aspect.
  • an embodiment of the present application discloses a terminal, where the terminal includes a first node (for example, a car cockpit domain controller CDC) and/or a second node (for example, a camera, a screen, a microphone, a sound, a radar, a at least one of modules such as electronic key, keyless entry or starting system controller), wherein the first node is the device described in the third aspect or any possible implementation manner of the third aspect, the first node The second node is the device described in the fourth aspect or any one of the possible implementation manners of the fourth aspect.
  • a first node for example, a car cockpit domain controller CDC
  • a second node for example, a camera, a screen, a microphone, a sound, a radar, a at least one of modules such as electronic key, keyless entry or starting system controller
  • the terminal may be a vehicle, a drone, a robot, a device in a smart home scenario, a device in a smart manufacturing scenario, or the like.
  • FIG. 1 is a schematic diagram of the architecture of a communication system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a usage scenario of a communication method provided by an embodiment of the present application
  • FIG. 3 is a flowchart of a communication method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a method for encrypting a group key provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of another method for encrypting a group key provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a method for determining a group security algorithm provided by an embodiment of the present application
  • FIG. 8 is a schematic diagram of a communication scenario provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a scenario for updating a group key provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another scenario for updating a group key provided by an embodiment of the present application.
  • FIG. 11 is a flowchart of another communication method provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of another communication apparatus provided by an embodiment of the present application.
  • a node is an electronic device with the ability to send and receive data.
  • a node may be a cockpit domain device, or a module in a cockpit device (eg, a cockpit domain controller (CDC), camera, screen, microphone, audio, electronic key, keyless entry, or start one or more of the modules such as the system controller).
  • a cockpit domain controller e.g, a cockpit domain controller (CDC)
  • camera screen, microphone, audio, electronic key, keyless entry, or start one or more of the modules such as the system controller.
  • CDC cockpit domain controller
  • the node can also be a data transfer device, such as a router, repeater, bridge or switch; it can also be a terminal device, such as various types of user equipment (UE), mobile phone (mobile phone) phone), tablet computer (pad), desktop computer, headset, stereo, etc.; can also include machine intelligence equipment, such as self-driving (self-driving) equipment, transportation safety (transportation safety) equipment, virtual reality (virtual reality, VR) ) terminal equipment, augmented reality (AR) terminal equipment, machine type communication (MTC) equipment, industrial control (industrial control) equipment, remote medical (remote medical) equipment, smart grid (smart grid) equipment , smart city (smart city) devices; can also include wearable devices (such as smart watches, smart bracelets, pedometers, etc.) and so on.
  • the names of devices with similar data sending and receiving capabilities may not be called nodes, but for convenience of description, the electronic devices with data sending and receiving capabilities are collectively referred to as nodes in the embodiment
  • the shared key is the same secret value stored in the nodes of both parties.
  • the shared key can be generated by both parties through the same key acquisition method, or it can be pre-defined or pre-configured in the nodes of both parties, or it can be a Trusted devices (such as key distribution center (key distribution center, KDC)) sent to the first node and the second node respectively.
  • KDC key distribution center
  • the vehicle's cockpit domain controller (CDC) and the owner's mobile phone are two nodes that can communicate through short-range communication technology.
  • the shared key can be generated by exchanging the public key.
  • the shared key can be used to verify the identities of both nodes when the mobile phone requests to pair with the CDC of the vehicle again.
  • the cockpit domain controller (CDC) of the vehicle and the on-board radar device are two nodes that can communicate with each other.
  • the car factory staff has pre-configured the communication between the CDC and the on-board radar. Shared key, through which the security of the communication between the vehicle's CDC and the roof radar can be guaranteed.
  • nodes can obtain other keys through key derivation based on the original shared key. Since the method of deriving the key by the nodes of both parties can be the same, the key derived from the original shared key can also be regarded as a shared key.
  • the first node uses the shared key Kdh
  • the key is derived to obtain the session key Kenc
  • the second node also uses the same method to derive the session key Kenc. Since the shared key Kdh is a secret value shared by the first node and the second node, the derived session key Kenc can also be regarded as a shared key between the first node and the second node.
  • Multicast technology aims to send a certain information to a certain group of nodes, such a group of nodes can be regarded as a communication group.
  • a communication group is also called a target group, or a multicast group.
  • the first node When a node (for example, called the first node) sends information to multiple target nodes, the first node can only send one piece of data, and the destination address of the data is the multicast group address. , can receive the above data sent by the first node. Therefore, the multicast mode solves the repeated transmission of data and the repeated occupation of bandwidth in the case of unicast, and also solves the waste of bandwidth resources in the broadcast mode.
  • Security algorithms may include encryption algorithms, integrity protection algorithms, and key derivation algorithms, among others.
  • the encryption algorithm includes a symmetric encryption algorithm and an asymmetric encryption algorithm.
  • the encryption key of the symmetric encryption algorithm is the same as the decryption key, and the encryption key of the asymmetric encryption algorithm is different from the decryption key.
  • hash algorithms there is a class of hash algorithms that do not require a key.
  • Common symmetric encryption algorithms mainly include data encryption standard (DES), triple data encryption algorithm (3DES), advanced encryption standard (AES), etc.
  • Common asymmetric algorithms mainly include RSA encryption algorithm, data structure analysis algorithm (DSA), etc.
  • Hash algorithms mainly include secure hash algorithm (secure hash algorithm1, SHA-1), message digest (message digest, MD) algorithm (such as MD2, MD4) or MD5, etc.) etc.
  • the integrity protection algorithm is an algorithm used to protect the integrity of a message, and may also be called a MAC (message authentication code, MAC) algorithm or a complete protection algorithm.
  • MAC messages authentication code
  • MAC message authentication code
  • the integrity protection algorithm implemented by a hash algorithm is called a hash-based message authentication code (HMAC) algorithm, and the hash algorithm can be MD5, SHA-1, SHA-256 etc., these different HMAC implementations are usually labeled: HMAC-MD5, HMAC-SHA1, HMAC-SHA256, etc.
  • the MAC algorithm implemented based on a cipher algorithm can be called a cipher-based message authentication code (CMAC) algorithm, and the cipher algorithm can be AES, because the working mode of AES block encryption has ECB, There are four types of CBC, CFB and OFB.
  • the integrity protection algorithms implemented based on the block encryption algorithms of different working modes can be respectively called: ECB-MAC algorithm, CBC-MAC algorithm and so on.
  • the One-key CBC-MAC (OMAC) is improved from the CBC-MAC algorithm.
  • the integrity protection algorithm may also include Galois message authentication code mode (GMAC), Zu Chong's cipher algorithm (such as ZUC128, ZUC256, etc.), MD algorithm (such as MD2, MD4 or MD5, etc.).
  • GMAC Galois message authentication code mode
  • Zu Chong's cipher algorithm such as ZUC128, ZUC256, etc.
  • MD algorithm such as MD2, MD4 or MD5, etc.
  • the data can be encrypted and the message authentication code can be generated for the given original text. Therefore, the authentication encryption algorithm can be used as both an encryption algorithm and a security algorithm.
  • the AES algorithm based on GMAC and counter encryption mode AES-Galois/counter mode, AES-GCM
  • AES-CMAC/counter Mode AES-CCM
  • Authentication encryption and in the process of authentication encryption, a MAC can be generated to protect the integrity of the message.
  • KDF key derivation function
  • a secret value also known as a key derivation algorithm.
  • DK new secret value
  • Key the new secret value DK derived from the secret value Key
  • Commonly used key derivation algorithms include password-based key derivation function (PBKDF), scrypt algorithm, etc.
  • PBKDF password-based key derivation function
  • the PBKDF algorithm includes the first generation PBKDF1 and the second generation PBKDF2.
  • some KDF algorithms use a hash algorithm to hash the input secret value in the process of deriving a key, so the KDF function can also receive an algorithm identifier as an input to indicate which hash algorithm to use.
  • KDF KDF
  • Second KDF KDF
  • Third KDF can be different KDFs or the same KDF.
  • the freshness parameter is used to generate keys and authentication parameters, etc. It can also be called freshness or freshness parameters, which can include a random number (number once, NONCE), counter value (counter), serial number (number), frame number, etc. at least one of the.
  • NONCE is a random value that is used only once (or non-repeating).
  • the freshness parameters generated at different times are usually different, that is, the specific value of the freshness parameter will change each time the freshness parameter is generated, so that the freshness parameter used for generating the key (or authentication parameter, etc.) this time Different from the freshness parameter used when the key (or authentication parameter, etc.) was generated last time, the security of the generated key can be improved.
  • the freshness parameter can be a random number obtained by the node through a random number generator.
  • the freshness parameter may be the packet data convergence protocol count (packet data convergence protocol count, PDCP COUNT), and the PDCP COUNT may include the upstream PDCP COUNT and the downstream PDCP COUNT, and each time the second node sends an upstream PDCP data packet, the The uplink PDCP COUNT is incremented by 1, and the downlink PDCP COUNT is incremented by 1 every time the first node sends a downlink PDCP data packet. Since PDCP COUNT is always changing, the key generated by PDCP COUNT each time is different from the key generated by PDCP COUNT last time.
  • packet data convergence protocol count packet data convergence protocol count
  • Protocol Data unit is the data unit transmitted between the peer layers in the communication process.
  • each layer entity can establish the PDU of this layer entity, and the PDU contains the data from the upper layer.
  • the information of the entity, and the additional information of the entity of the current layer are then passed to the next layer.
  • the information of the current layer entity may not be attached, such as transparent transmission.
  • the LLC entity can create LLC PDUs, and the MAC entity can create MAC PDUs.
  • the protocol data units transmitted in the communication system are collectively referred to as communication frames in the embodiments of the present application.
  • the control-type protocol data unit may also be referred to as a control frame or a management frame
  • the data-type protocol data unit may also be referred to as a data frame.
  • the communication frame may be a media access control (MAC) data frame.
  • MAC media access control
  • serial number also called the serial number
  • the value of the serial number is indicated by n bits
  • the serial number of the next communication frame is the serial number of the previous communication frame plus 1. For example, if the value of the sequence number of the communication frame A is 192, the value of the sequence number of the next communication frame B is 193, and so on. It is worth noting that when the sequence number exceeds its maximum representation value and is reversed to zero (SN rollover), the sequence number value of the subsequent communication frame will be smaller than the sequence number of the previous communication frame.
  • the sequence number of the first communication frame is 0 and increases by 1 each time, and the sequence number will be reversed and returned to zero each time it increases to 0xFF. That is to say, the serial number has the characteristic of periodicity. For a serial number containing n bits, the serial number will be repeated every 2 n communication frames, so the communication frame does not have a unique serial number, but it is in each serial number. It is unique in the cycle (SN cycle).
  • the frame number (Frame Number, FN) is indicated by N bits, and the N bits include bits used to indicate the sequence number of the communication frame as low-order n bits, and bits used to indicate the record value as high-order (Nn) bits.
  • the initial value of the record value is 0 or a specified value, and when the serial number of the communication frame is rolled over, the record value is incremented by 1. For example, taking the frame number as 32 bits and the sequence number as 8 bits, assuming that the record value is 0x00 0000, and the sequence number of the communication frame is 0xFF, the current frame number is 0x0000 00FF.
  • the sequence number value of the next data packet is reversed after adding 1, so the sequence number value of the next protocol data unit is 0x00, and because the sequence number returns to zero, the recorded value becomes 0x00 0001, so the next frame number is 0x0000 0100. It can be understood that since the frame number is a number of N bits, the frame number also has a count cycle (FN cycle), and when the frame number exceeds the maximum value, the frame number will also be reversed (FN rollover).
  • PCDP COUNT includes the hyper frame number (Hyper Frame Number, HFN) part and the serial number part of the protocol data unit, where the start value of the hyper frame number is set. It is 0 or the specified value. When the sequence number of the protocol data unit is reversed to zero, the superframe number is incremented by 1.
  • the node can maintain multiple frame numbers. For example, the node can maintain the frame number of the uplink communication frame and the frame number of the downlink communication frame respectively.
  • the node sends an uplink communication frame it can be based on the change of the sequence number of the communication frame.
  • the frame number of the uplink communication is incremented by 1.
  • the frame number of the downlink communication frame can be adjusted according to the change of the serial number of the communication frame.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application, including a first node 101 , a first communication group 102 , a second node 103 , and a second node 104 . in:
  • the first communication group 102 includes a plurality of second nodes, and both the second node 103 and the second node 104 are nodes belonging to the first communication group 103 . It can be understood that the first communication group 102 may have one second node, or there may be multiple second nodes. Here, only two second nodes are included in the first communication group 102 as an example for description, which is not limited to this application.
  • the first node 101 may also be called a master node or an access point (access point, AP), and correspondingly, the second node 103 or the second node 104 in the first communication group 102 may be called a slave node .
  • the first node 101 may perform multicast communication with the nodes in the first communication group 102, and may also perform unicast communication with the second node 103 (or the second node 104) in the first communication group.
  • the communication data link may include various types of connection media, such as long-distance connection technologies including Global System for Mobile Communications (GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Universal Mobile Telecommunications System (UMTS) and other wireless access type technologies.
  • GSM Global System for Mobile Communications
  • GPRS General Packet Radio Service
  • UMTS Universal Mobile Telecommunications System
  • Another example can also be short-range connection technologies including 802.11b/g, Bluetooth (Blue Tooth), Zigbee (Zigbee), Radio Frequency Identification (Radio Frequency Identification, RFID) and Ultra Wideband (Ultra Wideband, UWB) technology, vehicle Wireless short-distance transmission technology, etc.
  • 802.11b/g Bluetooth (Blue Tooth), Zigbee (Zigbee), Radio Frequency Identification (Radio Frequency Identification, RFID) and Ultra Wideband (Ultra Wideband, UWB) technology, vehicle Wireless short-distance transmission technology, etc.
  • Bluetooth Bluetooth
  • Zigbee Zigbee
  • Radio Frequency Identification Radio Frequency Identification
  • UWB Ultra Wideband
  • the first node 101 can perform multicast communication with multiple second nodes in the first communication group 102, and the communication message needs to be encrypted to ensure that only members in the group can interpret the encrypted message, and non-group members cannot obtain it. Packet content to protect the security of multicast communication.
  • the first node 101 needs to send the group key to the second node 103, so that the second node 103 can use the group key to decrypt the multicast message.
  • the first node 101 can encrypt the signaling message containing the group key with the encryption key on the signaling plane (for example, the unicast key PTK between the first node 101 and the second node 103) and send it to the second node. 103.
  • the signaling message containing the group key with the encryption key on the signaling plane (for example, the unicast key PTK between the first node 101 and the second node 103) and send it to the second node. 103.
  • the second node 103 is used as an example for illustration.
  • the first node 101 also needs to send the group key to the second node 104, so that the second node 104 needs to send the group key to the second node 104.
  • 104 decrypts the multicast message using the group key.
  • FIG. 2 is a schematic diagram of a usage scenario of a communication method provided by an embodiment of the present application.
  • the cockpit domain controller (cockpit domain controller, CDC) 201 of the vehicle is the control center in the smart cockpit device, and can be regarded as the first node 101 .
  • the camera 202 and the camera 203 are vehicle camera devices. For the convenience of control, the camera 202 and the camera 203 are configured as a communication group.
  • the CDC 201 can perform multicast communication with the camera 202 and the camera 203 through wireless fidelity (Wireless Fidelity, Wi-Fi) technology.
  • wireless fidelity Wireless Fidelity, Wi-Fi
  • the CDC201 can encrypt the signaling message containing the group key with the encryption key of the signaling plane of the CDC201 and the camera 203 and send it to the camera 203 .
  • the CDC 201 can encrypt the signaling message including the group key with the encryption key of the signaling plane of the CDC 201 and the camera 203 and send it to the camera 202 .
  • the above method relies on the encryption of the signaling plane message to protect the group key. If the encryption of the signaling plane message is not enabled, the group key cannot be protected, which may easily lead to the leakage of the group key.
  • the attacking device 204 can monitor the multicast communication. If the encryption of the messages on the signaling plane is not enabled, the attacker obtains the group key by monitoring the signaling message carrying the group key, and then steals or monitors the information of the multicast communication. content, and can even attack CDC201, endangering the safety of the vehicle.
  • FIG. 3 is a schematic flowchart of a communication method provided by an embodiment of the present application. The method can be implemented based on the architecture shown in FIG. 1, and the method includes but is not limited to the following steps:
  • Step S301 The second node sends an association request message to the first node.
  • the second node may connect to the network via a wireless link (eg, one of Wi-Fi, Bluetooth, Zigbee or other short-range wireless links, etc., such as a vehicle-mounted short-range wireless communication link) or a wired link (eg, optical fiber)
  • a wireless link eg, one of Wi-Fi, Bluetooth, Zigbee or other short-range wireless links, etc., such as a vehicle-mounted short-range wireless communication link
  • a wired link eg, optical fiber
  • the association request message may include the device identifier of the second node.
  • the device identifier of the node may be an identification (identification, ID), a media access control (media access control, MAC) address, a domain name, a domain address, or other self-defined identifiers.
  • the first node may send an access message or a broadcast message
  • the second node may receive an access message or a broadcast message from the first node. Based on the access message or the broadcast message, the second node sends the first association request message to the first node.
  • the access message or broadcast message of the first node may include at least one of the identity of the first node, description information of the first node, or information used to indicate access of other nodes, and the like.
  • the first association request message may also include information of the security algorithm supported by the second node (or the security capability (Sec Capabilities) of the second node), and the information of the security algorithm may be the name, identifier of the security algorithm. Or predefined symbols and so on.
  • the information of the security algorithm supported by the second node can be used by the first node to determine the security algorithm (or unicast security algorithm) between the first node and the second node, the group security algorithm of the first communication group, etc. one or more.
  • the second node may send a security context request message to the second node, where the security context request message includes the information of the unicast security algorithm determined by the first node and the first node. Identity authentication information, the first identity authentication information is used by the second node to authenticate the identity of the first node. Further, the second node may feed back a security context response message to the first node, where the security context response message includes second identity authentication information, and the second identity authentication information is used by the first node to verify the identity of the second node.
  • Step S302 The first node determines the group key of the first communication group.
  • the first communication group is the communication group to which the second node belongs.
  • the first node may obtain the device identification of the second node in advance, so that the communication group to which the second node belongs may be determined according to the device identification of the second node. That is, there is a correspondence between the device identifier of the second node and the communication group.
  • the corresponding relationship can refer to Table 1.
  • Table 1 is a possible communication group information table provided by this embodiment of the application.
  • the first node may be pre-configured or pre-defined with the corresponding relationship shown in the communication group information table. The specific configuration and definition methods are not limited to be performed in the form of a table, and the corresponding relationship shall prevail.
  • the communication group information table includes the ID of the communication group and the nodes included in the communication group.
  • information such as a group key or a group algorithm of the communication group may also be included.
  • the first node can determine the group key of the first communication group in which it belongs according to the device identification of the second node. For example, if the device identification of the second node is "E0", the first node determines that the ID is "GID1". The group key for the communication group.
  • Communication group ID Included nodes group key group algorithm GID1 E0, E1, E2 GK1 - GID2 E3, E4 GK2 Complete Algorithm: ZUC GID3 E5, E6, E7 GK3 Complete Algorithm: AES-CCM GID4 E6, E7, E8 - -
  • the first node can at least determine or obtain the group key of the first communication group through the following methods:
  • Method 1 The first node determines the group key of the first communication group according to the ID of the first communication group, wherein there is a correspondence between the ID of the first communication group and the group key of the first communication group. Specifically, a correspondence relationship between the ID of the communication group and the group key is pre-defined or pre-configured in the first node, so the first node can determine the group key of the first communication group according to the ID of the first communication group. For example, referring to Table 1, the first node may determine that the group key of the communication group is "GK1" according to the ID "GID1" of the communication group.
  • Method 2 The first node obtains a random number NONCEa, and uses NONCEa as the group key of the first communication group.
  • Method 3 The first node generates the group key of the first communication group through the second KDF according to at least one of the first freshness parameter and the ID of the first communication group.
  • the first freshness parameter is a freshness parameter acquired (or generated) by the first node, and the number of the first freshness parameter may be one or more.
  • the second KDF may be the KDF algorithm with the highest priority in the first node.
  • the first node generates the group key of the first communication group through the second KDF according to at least one of the first freshness parameter and the ID of the first communication group, which may be implemented in the following manner:
  • Implementation mode 2 The first node generates the group key of the first communication group by using the second KDF according to the first freshness parameter.
  • the first freshness parameter is the freshness parameter NONCEg1 and the freshness parameter NONCEg2
  • the ID of the first communication group is GID
  • the parameters of the GK participating in the generation may also include other information, such as one or more of the length of the generated key, the identifier of the hash algorithm used, and so on.
  • the first node may generate the identification GK ID of the group key GK. Further, the first node can also establish a corresponding relationship between the GK ID and the ID of the first communication group, so that the corresponding GK ID can be determined by the ID of the first communication group when the group key is determined next time, so as to obtain the indication of the GK ID. the group key GK.
  • the first node may first determine whether the first communication group has a corresponding group key. If there is a corresponding group key, the group key of the first communication group is determined by the method described in the above method 1; if there is no corresponding group key, the first communication group is determined by the method described in the above method 2 or method 3.
  • a group key for a communication group For example, when a communication group is newly created, since the newly created communication group does not yet have a corresponding group key, the group key of the first communication group can be determined by the method described in the second method or the third method.
  • Step S303 The first node encrypts the group key of the first communication group based on the shared key between the first node and the second node to obtain a first protection key.
  • the shared key is a secret value shared between the first node and the second node.
  • the first node and the second node can generate a key S by exchanging public keys.
  • the value of the key S generated by the first node is the same as the value of the key S generated by the second node, so the key S can be used as the first node. Shared key between the node and the second node.
  • the first node encrypts the group key of the first communication group based on the shared key between the first node and the second node, which may include at least the following implementations:
  • Embodiment 1 The first node uses the shared key to encrypt the group key to obtain the first protection key.
  • FIG. 4 is a schematic diagram of a possible group key encryption provided by an embodiment of the present application.
  • the first node uses the shared key 402 to encrypt the group key 401 of the first communication group,
  • the first protection key 403 is obtained.
  • the shared key may be a unicast key between the first node and the second node.
  • the first node uses a unicast encryption key to encrypt the group key of the first communication group based on the unicast encryption algorithm.
  • the first node may use the shared key and the second freshness parameter to encrypt the group key to obtain the first protection key.
  • the second freshness parameter is one or more of NONCE, counter value, frame number, etc. acquired (or generated) by the first node, for example, may be a random number NONCEk generated by the first node, or may also be The public key exchanged between the first node and the second node, etc. Since the value of the freshness parameter is different, the first protection key obtained by encrypting the same group key of the first communication group each time is also different, thereby improving the privacy of the group key.
  • the counter is used to represent the number of times the group key of the first communication group is encrypted based on the shared key.
  • Implementation solution 3 The first node generates a first intermediate key according to the shared key, and encrypts the group key by using the first intermediate key to obtain the first protection key.
  • FIG. 5 is a schematic diagram of a possible group key encryption provided by an embodiment of the present application.
  • the first node generates a first intermediate key 503 according to the shared key 504, and uses the first intermediate key 503 encrypts the group key 501 to obtain the first protection key 502 .
  • Embodiment 4 The first node generates a first intermediate key according to the shared key and the second freshness parameter, and uses the first intermediate key to encrypt the group key to obtain the first protection key.
  • the first counter may be used to represent the number of times the first node generates the first intermediate key Kg according to the shared key Kdh. It should be noted here that since the generated first intermediate key Kg is used for The group key is encrypted, so the number of times the intermediate key is generated can also characterize the number of times the group key is encrypted. For example, taking the counter value starting from 1 as an example, when the first intermediate key is generated according to the shared key Kdh and the value of the first counter counter1, the counter value is 1.
  • counter1 is 2.
  • the first node may update the shared key Kdh, and the first counter may restart counting after updating Kdh.
  • the generated first intermediate key fails to successfully encrypt the group key of the first communication group, or if the group key of the first communication group fails to be sent successfully, participate in generating the first intermediate key again
  • the value of the first counter of the key may be the value of the previous counter.
  • the group key is encrypted to obtain the first protection key.
  • the first node generates the first intermediate key through the first KDF according to the shared key Kgt (the shared key Kgt may be specifically derived from the shared key Kdh) and the random number NONCK (or the counter value counter).
  • the first node encrypts the group key of the first communication group by using the first intermediate key, which may be specifically: the first node performs XOR processing on the group key of the first communication group and the first intermediate key, Obtain the first protection key.
  • the first protection key GKc obtained by the encryption of the first node can satisfy the following formula: where GK is the group key of the first communication group, is XOR processing, and Kg is the first intermediate key. Since the original value can be obtained after performing XOR twice, the first node XOR the first intermediate key with the group key of the first communication group, and the second node can generate the first protection key after receiving the first protection key.
  • the key of the first communication group can be obtained by performing XOR processing on the first intermediate key and the first protection key. It can be understood that "exclusive OR" can be a specific encryption processing method.
  • the first node may confirm that encryption is not enabled on the signaling plane messages between the first node and the second node, and encrypt the group key of the first communication group if the signaling plane messages are not encrypted. Obtain the first protection key. If the encryption of the signaling plane messages between the first node and the second node is enabled, the first node sends a second association establishment message to the second node, wherein the second association establishment message includes the group key of the first communication group, Since the second association establishment message belongs to the signaling plane message between the first node and the second node, the group key can be protected by encrypting the signaling plane message.
  • Step S304 The first node sends a first association establishment message to the second node.
  • the first node sends the first association establishment message to the second node, and correspondingly, the second node receives the first association establishment message from the first node, and the association establishment message includes the first protection key.
  • the first node sends the first association establishment message 404 to the second node, and the second node receives the association establishment message 404 from the first node.
  • the first node sends the first association establishment message 505 to the second node, and the second node receives the association establishment message 505 from the first node.
  • the first association establishment message may further include a second freshness parameter, where the second freshness parameter may be used by the second node to decrypt the first protection key.
  • the second node may also obtain a counter value corresponding to the value of the counter in the first node, so the first association establishment message may This second freshness parameter is not included.
  • the value of the first counter of the first node is used as the second freshness parameter, and the value of the first counter represents the number of times the group key is encrypted.
  • the second node also acquires the value of the second counter, where the value of the second counter is used to represent the number of times the group key is decrypted, and the value of the first counter corresponds to the value of the first counter, so the first association is established
  • the second freshness parameter may not be included in the message.
  • the first association establishment message further includes a message authentication code, where the message authentication code is used by the second node to authenticate the integrity of the first association establishment message.
  • the first node can encrypt the first association establishment message by using an encryption key, and correspondingly, the second node can use the corresponding decryption key to decrypt the first association establishment message, so as to obtain the first association establishment message. content in .
  • Step S305 The second node obtains the group key of the first communication group based on the shared key between the first node and the second node and the first protection key.
  • the second node may decrypt the first protection key based on the shared key between the first node and the second node, and then obtain the group key of the first communication group.
  • the shared key is a secret value shared between the first node and the second node, so the second node can use the shared key to decrypt the first protection key to obtain the group key of the first communication group.
  • the first node decrypts the first protection key based on the shared key between the first node and the second node, which may include at least the following implementations: plan:
  • Embodiment 1 The second node uses the shared key to decrypt the first protection key to obtain the group key of the first communication group. For example, referring to FIG. 4 , the first node uses the shared key 402 to decrypt the first protection key 403 to obtain the group key 401 of the first communication group.
  • Embodiment 2 The second node can use the shared key and the second freshness parameter to decrypt the first protection key to obtain the group key of the first communication group.
  • Embodiment 3 The second node generates the first intermediate key according to the shared key, and uses the first intermediate key to decrypt the first protection key to obtain the group key of the first communication group. For example, referring to FIG. 5 , the first node generates the first intermediate key 503 according to the shared key 504 , and uses the first intermediate key 503 to decrypt the first protection key 502 to obtain the group key 501 of the first communication group.
  • the first counter may be used to represent the number of times the first node generates the first intermediate key Kg according to the shared key Kdh.
  • the second node uses the first intermediate key to decrypt the first protection key. Specifically, the second node performs XOR processing on the first protection key and the first intermediate key to obtain the first communication.
  • the group key for the group For example, the second node decrypts the first protection key GKc to obtain the group key GK of the first communication group, which can satisfy the following formula:
  • the second node may also send an association complete message to the first node, where the association complete message is used to indicate that the association is successfully established by the first node.
  • the second node may encrypt the association complete message by using an encryption key, and correspondingly, the first node may decrypt the association complete message by using the corresponding decryption key, so as to obtain the data content in the association complete message.
  • the association complete message includes a message authentication code, and the message authentication code is used by the first node to verify the integrity of the association complete message.
  • the first association establishment message further includes information indicating a group security algorithm of the first communication group.
  • the first node can determine the group security algorithm of the first communication group, and the group security algorithm belongs to the algorithm supported by the nodes in the group, which can also be called a group algorithm, and can include a group encryption algorithm, a group security algorithm (or a group security algorithm). Integrity Protection Algorithm), or one or more of the Group KDF Algorithm, etc.
  • the "decryption" in the above implementation may be an independent step, or may be a description of a function. That is, another piece of information can be obtained by decrypting the information, or another piece of information can be obtained through the information in a decrypted manner.
  • the first node determines the group security algorithm of the first communication group in at least the following situations:
  • Case 1 The first node is preconfigured or defined with a group security algorithm corresponding to the first communication group, so the first node can determine the corresponding group security algorithm according to the identifier of the first communication group (eg, the number of the first communication group).
  • the group security algorithm e.g., the number of the first communication group.
  • FIG. 6 is a schematic diagram of a method for determining a group security algorithm provided by an embodiment of the present application. It can be seen that the ID corresponding to the ID of the communication group can be determined according to the ID of the communication group. group algorithm.
  • the group security algorithm corresponding to the communication group whose group identifier (group identify, GID) is GID2 is the Zu Chongzhi cipher algorithm (ZUC).
  • the group security algorithm is the algorithm with the highest priority among the algorithms supported by the nodes in the first communication group.
  • the first node may determine the group security algorithm according to an algorithm selection policy, and the algorithm selection policy includes at least one of a priority-based algorithm selection policy and an order-based algorithm selection policy.
  • the priority-based algorithm selection strategy as the first algorithm selection strategy as an example, referring to the information in the area 602, it can be known that the node E0 is a node in the communication group whose ID is GID1, and the communication group GID1 includes nodes E0, node E1, node E2.
  • the first node can obtain the information of the security capabilities (Sec Capabilities) of the nodes in the group.
  • the complete security algorithms supported by the node E0 are AES-CCM, ZUC and AES-GCM, and the complete security algorithms supported by the node E1.
  • the security algorithms are AES-CCM and AES-GCM
  • the security algorithms supported by node E2 are AES-CCM and AES-GCM
  • the nodes in the group support AES-CCM and AES-GCM.
  • the order-based algorithm selection policy may determine a security algorithm with an earlier order according to a pre-defined or pre-configured order. Further optionally, if the priorities of the two algorithms supported by the nodes in the communication group are the same, the security algorithm with the highest order may be selected.
  • the group security algorithm of the first communication group includes a third KDF algorithm.
  • the first node may generate the session key of the first communication group by using the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the first node may determine the group key of the first communication group where the second node is located, and then use the The shared key encrypts the group key to obtain the first protection key, and the first protection key is carried in the association establishment message and sent to the second node. It can be seen that since the protection key carried in the association establishment message is obtained by encrypting the group key with the shared key, the privacy of the group key can be protected regardless of whether the first association establishment message is encrypted or not.
  • the group key can be used to encrypt the multicast message, so as to protect the multicast message, prevent non-group members from obtaining the communication content, and improve the performance of the group. security of broadcast communications.
  • the first node can send the group key to the second node through the protection key in the association establishment message, and the distribution process of the group key can be integrated into the process of establishing the association between the first node and the second node.
  • An additional key distribution process is required, which saves the overhead of network resources and improves the efficiency of multicast communication.
  • FIG. 7 is another communication method provided by an embodiment of the present application.
  • the communication method may be implemented based on the architecture shown in FIG. 1, and the method includes at least the following steps:
  • Step S701 The first node determines that the condition for updating the group key of the first communication group is satisfied.
  • the conditions for updating the group key of the first communication group include at least one of the following conditions:
  • Condition 1 The difference between the frame number of the current communication frame and the marked frame number is greater than or equal to the first threshold; the frame number of the current communication frame and the marked frame number are in the same counting cycle; the marked frame number is the need for key update
  • the frame number or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time.
  • the frame number of the communication frame includes the record value and the sequence number of the communication frame, and the frame number can be used to encrypt the communication frame during the transmission process of the communication frame.
  • the communication frame can be a MAC data frame, and the sequence number It can be a MAC serial number (MAC serial number, MAC SN).
  • FIG. 8 is a schematic diagram of a possible communication scenario provided by an embodiment of the present application.
  • the first node may send a multicast message to multiple nodes in a communication group, and the multicast message is sent in the form of a communication frame.
  • FIG. 8 is a schematic diagram of a possible communication scenario provided by an embodiment of the present application.
  • the frame number 801 is a 32-bit number
  • the frame number 801 includes a record value of the upper 22 bits and a sequence number of the lower 10 bits.
  • the sequence value of the lower 10 bits corresponds to the sequence number of the current communication frame 803 . Since the number of bits of the frame number is limited, the frame number will be reversed when it reaches the maximum value. For example, in the communication process shown in Figure 8, the value of the frame number 801 is 0x00000000.
  • the frame The number is also continuously accumulated.
  • the frame number value reaches the maximum value (for example, the value of frame number 804 is 0xFFFFFFFF)
  • the frame number is reversed (rollover), and the count starts from 0 again, for example, the value of frame number 804 is 0x00000000.
  • the frame number reaches frame number 0x00000001 again, if the group key 802 has not been updated, the key and frame number used when encrypting two different communication frames (communication frame 803 and communication frame 806) All are the same, which can easily lead to the cracking of the key and threaten the security of communication.
  • the group key needs to be updated before the frame number reaches the last frame number encrypted by using the group key 802 to avoid affecting the privacy of the group key.
  • the frame number is only 32 bits as an example here, and the size of the frame number is pre-configured according to requirements in the specific implementation process, which is not limited in this application.
  • the first node may record the marked frame number, for example, the marked frame number may be the frame number that needs to be updated or the marked frame number may also be the first application of the group key of the first communication group for encrypted communication The frame number of the frame.
  • the first node may update the group key before the frame number is accumulated to the last frame number encrypted using the group key, for example, 10 frames in advance to update the group key.
  • the first node may also indicate the time to apply the new key, for example, may indicate to apply the new group key 5 frames in advance.
  • the group of the first communication group needs to be updated. key. For example, taking the frame number marked as the frame number of the communication frame encrypted by the first application of the group key of the first communication group as an example, see FIG.
  • the communication frame 901 is the first encrypted communication frame using the group key 902
  • the frame number of the communication frame is 0x00000001
  • the first node can mark the frame number (that is, mark the frame number as 0x00000001), if The first node needs to update the group key 10 frames in advance, and the preset first threshold is 0xFFFF FFF5. That is to say, if the frame number of the current communication frame reaches 0xFFFF FFF6, the difference between the frame number of the current communication frame and the marked frame number reaches 0xFFFF FFF5, so the first node can update the first node when the frame number reaches 0xFFFF FFF6.
  • the group key for the communication group if the frame number of the current communication frame reaches 0xFFFF FFF6, the difference between the frame number of the current communication frame and the marked frame number reaches 0xFFFF FFF5, so the first node can update the first node when the frame number reaches 0xFFFF FFF6.
  • the time to apply the new group key can be indicated when the group key is updated.
  • the new group key can be applied 5 frames ahead of the marked frame number, then the first node can reach 0xFFFF FFFB when the frame number reaches 0xFFFF FFFB.
  • the communication frame 905 is encrypted with the new group key 904 and frame number 0xFFFF FFFB. In this way, when the frame number of the communication frame is reversed and then reaches the marked frame number 0x00000001, the key for encrypting the communication frame 905 is already the new group key 904, so that the security of the communication will not be affected.
  • the multiple thresholds involved in this application may be specified in the protocol, or pre-defined or pre-configured in the node, or may be determined by the node according to security requirements.
  • the first threshold may be obtained according to a protocol, or preset in the first node, or may be determined by the first node according to security requirements.
  • Condition 2 The difference between the frame number of the marked frame and the frame number of the current communication frame is less than or equal to the second threshold; wherein, the frame number of the current communication frame is in the next counting cycle of the marked frame number; the marked frame number is the key that needs to be processed
  • the updated frame number or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time.
  • the first node needs to update the group key before the marked frame number and the frame number of the current communication frame are less than or equal to the second threshold. For example, taking the frame number marked as the frame number of the communication frame encrypted by the first application of the group key of the first communication group as an example, see FIG.
  • the communication frame 1001 is the communication frame encrypted by the group key 1002 for the first time
  • the frame number of the communication frame is 0x5555 6666
  • the first node can mark the frame number (that is, mark the frame number as 0x5555 6666 ), if the first node needs to update the group key 10 frames in advance, the second threshold is 10.
  • the start time of the new group key can be determined when the group key is updated.
  • the new key can be applied 5 frames in advance of the marked frame number, and the first node can, when the frame number reaches 0x5555 6661,
  • the communication frame 1004 is encrypted by starting a new group key 1005 and frame number 0x5555 6661. In this way, when the frame number of the communication frame reaches the marked frame number 0x5555 6666, the key for encrypting the communication frame 1006 is already the new group key 1005, so that the security of the communication will not be affected.
  • Condition 3 The validity period of the group key of the first communication group has reached or the usage duration of the group key of the first communication group has reached the third threshold.
  • the group key of the first communication group may have a validity period, and when the validity period of the group key of the first communication group arrives, the group key of the first communication group needs to be updated.
  • the validity period of the group key of the first communication group may be a specific time, or the validity period may also be the frame number of the communication frame, or the validity period may be a counter value or the like.
  • the validity period of the group key of the first communication group may be 08:08:08 on July 06, 2020, which may indicate the valid date and time of the group key of the first communication group to July 06, 2020 08:08:08 or an invalid date and time starts from 08:08:08 on July 06, 2020.
  • the first node can update the group key.
  • the first node may update the group key of the first communication group in advance before the validity period arrives, for example, update the group key of the first communication group when there are 10 minutes left before the time corresponding to the validity period.
  • the group key of the first communication group may have a duration of use.
  • the duration of use of the group key of the first communication group reaches (greater than or equal to) a third threshold, the group key of the first communication group needs to be updated.
  • the third threshold may be specified in the protocol, or pre-defined or pre-configured in the first node, or the threshold may be determined by the first node according to security requirements. For example, it is specified in the protocol that the third threshold is 24 hours, and when the group key of the first communication group reaches 24 hours, the group key of the first communication group needs to be updated.
  • the first node predefines a third threshold value of 1000 communication frames (specifically, it may include 1000 management frames and 1000 data frames), when the group key of the first communication group is used to encrypt 1000 management frames Or when 1000 data frames are encrypted, the group key of the first communication group needs to be updated.
  • a third threshold value of 1000 communication frames specifically, it may include 1000 management frames and 1000 data frames
  • Condition 4 At least one second node in the first communication group leaves the first communication group.
  • the first node needs to update the group key, so that the communication between the first node and the second node in the first communication group has Privacy.
  • the first communication group GID1 includes 3 second nodes, which are the second node E0 and the second node E2 respectively.
  • the second node E2 due to its aging function, sends a message to the first node to indicate that the application to exit (exit ) request message of the first communication group, then the first node confirms that after the second node E2 exits the first communication group (for example, the first node is in the communication group information table as shown in Table 1, and the nodes included in the communication group GID1 After deleting the second node E2), the first node can update the group key of the first communication group. For another example, when the first node receives a configuration message sent by the upper management node, the configuration message instructs the first node to remove the second node E1 from the first communication group, and the first node confirms that the second node E1 is removed.
  • the first node After the first communication group (for example, after the first node is in the communication group information table as shown in Table 1, after the second node E1 is deleted from the nodes included in the communication group GID1), the first node can update the information of the first communication group. group key.
  • the first node may also be configured to update the group key when a second node joins the first communication group or when a second node leaves the first communication group.
  • the first communication group GID2 includes two second nodes, namely the second node E3 and the second node E4, and the administrator adds the second node E9 in the first communication group (for example, as shown in Table 1)
  • the first node can update the master key.
  • the first node when the first node receives a configuration message, the configuration message instructs the first node to add the second node E10 to the first communication group GID2, then the first node confirms that the second node E9 joins the first communication group GID2 (for example, after In the communication group information table shown in Table 1, after adding the second node E10 to the nodes included in the communication group GID2), the first node can update the group key of the first communication group.
  • Step S702 The first node determines the first key according to at least one of the third freshness parameter and the identification ID of the first communication group.
  • the first node determines the first key according to at least one of the third freshness parameter and the identification ID of the first communication group, including at least the following two methods:
  • Method 1 The first node obtains a third freshness parameter, and uses the third freshness parameter as the first key.
  • Method 2 The first node generates the first key through the second KDF according to at least one of the third freshness parameter and the ID of the first communication group.
  • the third freshness parameter is a freshness parameter acquired (or generated) by the first node, and the number of the third freshness parameter may be one or more.
  • the second KDF may be the KDF algorithm with the highest priority in the first node.
  • the first node generates the first key, which may be implemented in the following manner:
  • the first key is used to replace the group key of the first communication group as a new group key of the first communication group.
  • Step S703 The first node encrypts the first key based on the shared key between the first node and the second node to obtain a second protection key.
  • the first node encrypts the first key based on the shared key between the first node and the second node, which may at least include the following implementations:
  • Embodiment 1 The first node uses the shared key to encrypt the first key to obtain the second protection key.
  • the first node may use the shared key and the fourth freshness parameter to encrypt the first key to obtain the second protection key.
  • the fourth freshness parameter is one or more of random values, counter values, frame numbers, etc. obtained (or generated) by the first node.
  • Implementation solution 3 The first node generates a second intermediate key according to the shared key, and encrypts the first key by using the second intermediate key to obtain a second protection key.
  • Embodiment 4 The first node generates a second intermediate key according to the shared key and the fourth freshness parameter, and uses the second intermediate key to encrypt the first key to obtain a second protection key.
  • the first counter may be used to represent the number of times the first node generates the second intermediate key Kg according to the shared key Kdh.
  • the first node encrypts the first key by using the second intermediate key.
  • the first node may perform XOR processing on the first key and the first intermediate key to obtain the first protection key.
  • the second protection key GKc2 encrypted by the first node can satisfy the following formula: where NGK is the first key, For XOR processing, Kg2 is the second intermediate key. Since the original value can be obtained after two XOR processing, the first node XOR the second intermediate key with the first key, and the second node can generate the same second protection key after receiving the second protection key.
  • the first key can be obtained by XOR processing the second intermediate key and the second protection key.
  • the first node may confirm that encryption is not enabled for signaling plane messages between the first node and the second node, and in the case where encryption is not enabled for signaling plane messages, the first key is encrypted to obtain the second protection. key.
  • the key update message includes the first key, because the key update message belongs to the communication between the first node and the second node. Therefore, the first key can be protected by encryption of the signaling plane message.
  • Step S704 The first node sends a key update message to the second node.
  • the key update message includes the above-mentioned second protection key. It can be understood that the first node sends a key update message to the second node, and correspondingly, the second node receives the key update message from the first node.
  • the key update request message further includes a fourth freshness parameter, where the fourth freshness parameter is used by the second node to decrypt the second protection key to obtain the first key.
  • the key update request is further used to indicate the activation time of the first key and/or the validity period of the first key.
  • the activation time of the first key is used to indicate the time when the first key is applied, and the validity period of the first key is used to indicate the period of use of the first key.
  • the key update request includes the activation time of the first key and the validity period of the first key, the first key is applied to the validity period of the first key starting from the activation time of the first key. Inside.
  • the key update message may be a multicast message sent by the first node to the second node in the first communication group, or may be a unicast message between the first node and the second node.
  • the key update message is a multicast message
  • the shared key used by the first node to encrypt the first key is the group key of the first communication group (or derived from the group key. the session key of the first communication group).
  • the first node may also send the key update message to other second nodes in the first communication group.
  • the first node can encrypt the key update message by using an encryption key, and correspondingly, the second node can use the corresponding decryption key to decrypt the key update message, so that the data in the key update message can be obtained.
  • the key update message includes a message authentication code, and the message authentication code is used by the second node to verify the integrity of the key update message.
  • Step S705 The second node obtains the first key based on the shared key between the first node and the second node and the second protection key.
  • the second node may decrypt the second protection key based on the shared key between the first node and the second node, and then obtain the group key of the first communication group.
  • the first node decrypts the second protection key based on the shared key between the first node and the second node, which may at least include the following implementations plan:
  • Embodiment 1 The second node uses the shared key to decrypt the second protection key to obtain the first key.
  • Embodiment 2 The second node can use the shared key and the fourth freshness parameter to decrypt the first protection key to obtain the first key.
  • Embodiment 3 The second node generates a second intermediate key according to the shared key, and uses the second intermediate key to decrypt the second protection key to obtain the first key.
  • Implementation scheme 4 The second node generates a second intermediate key according to the shared key and the fourth freshness parameter, and uses the second intermediate key to decrypt the second protection key to obtain the first key.
  • the second node uses the second intermediate key to decrypt the second protection key, specifically, the second node performs XOR processing on the second protection key and the second intermediate key to obtain the first encryption key. key.
  • the second node decrypts the second protection key GKc2 according to the second intermediate key Kg2 to obtain the first key NGK, which can satisfy the following formula:
  • the "decryption" in the above implementation may be an independent step, or may be a description of a function. That is, another piece of information can be obtained by decrypting the information, or another piece of information can be obtained through the information in a decrypted manner.
  • Steps S706 to S709 are as follows:
  • Step S706 The second node sends an update confirmation message to the first node.
  • the second node sends an update confirmation message to the first node, and correspondingly, the first node receives the update confirmation message from the first node.
  • the first communication group includes one or more second nodes
  • the first node may send a key update message to the one or more second nodes, and correspondingly, the first node may receive the one or more second nodes.
  • the update confirmation message of the second node is not limited to one or more second nodes
  • the second node may encrypt the update confirmation message by using an encryption key, and correspondingly, the first node may use the corresponding decryption key to decrypt the update confirmation message, so as to obtain the data content in the update confirmation message.
  • the update confirmation message includes a message authentication code, and the message authentication code is used by the first node to verify the integrity of the update confirmation message.
  • Step S707 The first node determines to receive an update confirmation message from at least one second node in the first communication group.
  • the first node after receiving the update confirmation messages from all the nodes in the first communication group, the first node indicates that the new key can be applied for confirmation.
  • the first node may receive an update confirmation message from at least one node within a preset time period, and if it receives an update confirmation message from at least one second node within a preset time period, it indicates that the confirmation can be applied. new key.
  • the first node may reconnect with it through a unicast message.
  • the first communication group includes the second node A and the second node B, and the first node sends a key update message to the second node A and the second node B, if the first node receives the update message from the second node A After the confirmation message, it is confirmed that the new key can be applied; for the second node B, the first node can reconnect with the second node B, or can also send the encrypted new key to the second node B.
  • Step S708 The first node applies the first key at the activation time of the first key.
  • the start time of the first key may be pre-defined or pre-configured, or may be indicated by the first node in the key update message. For example, it is pre-defined in the first node that the first key is applied in the fifth communication frame after sending the key update message. For another example, the first node indicates in the key update message to apply the first key when the frame number reaches 0xFFFF FFFF6 new key. The first node may apply the first key as a new group key for the first communication group at the activation time of the first key.
  • Step S709 The second node applies the first key at the activation time of the first key.
  • the start time of the first key may be pre-defined or pre-configured, or may be indicated by the first node in the key update message. For example, it is pre-defined in the second node that the first key is applied after the fifth communication frame after receiving the key update message. For another example, the first node indicates in the key update message that the frame number reaches 0xFFFF FFFF6 to apply the new key. The second node may apply the first key as a new group key for the first communication group at the activation time of the first key.
  • the first key can be determined, and the first key is encrypted with the shared key and sent to the second node through a key update message. It can be seen that since the protection key carried in the key update message is obtained by encrypting the first key with the shared key, the privacy of the first key can be protected regardless of whether the key update message is encrypted or not. .
  • the method in the embodiment shown in FIG. 7 may be a subsequent step of the method in the embodiment shown in FIG. 3 .
  • the communication method shown in FIG. 7 can be used to update the group key of the first communication group.
  • the method for determining the first key in the embodiment shown in FIG. 7 is consistent with the method for determining the key for the first communication group in FIG. 3 .
  • the embodiment shown in FIG. 7 The method for encrypting the first key in FIG. 3 is consistent with the method for encrypting the group key in FIG. 3 .
  • FIG. 3 The method embodiment shown in FIG. 3 above includes many possible implementation solutions. Some implementation solutions are illustrated below with reference to FIG. 11 and FIG. 12 respectively. For related concepts or operations or logical relationships, reference may be made to the corresponding descriptions in the embodiment shown in FIG. 3 , and thus will not be repeated here.
  • FIG. 11 is a schematic flowchart of a communication method provided by an embodiment of the present application. The method may be implemented based on the architecture shown in FIG. 1, and the method includes but is not limited to the following steps:
  • Step S1101 The second node sends an association request message to the first node.
  • the first association request message may include the device identifier of the second node (specifically, the ID of the second node), and the information of the security algorithm supported by the second node (or the security capabilities (Sec Capabilities) of the second node). ) and the freshness parameter NONCEe obtained by the second node.
  • the second node sends the first association request message to the first node, and correspondingly, the first node receives the first association request message from the second node.
  • Step S1102 The first node sends a security context request message to the second node.
  • the security context request message includes the first identity authentication information AUTHa.
  • the security context request message may also include the freshness parameter NONCEa obtained from the first node, the information algorithm1 of the target security algorithm (the unicast security algorithm of the first node and the second node), and the message authentication code MAC1, etc. one or more of the.
  • the target security algorithm in the security context request message belongs to the set of security algorithms indicated by the security algorithm information supported by the second node.
  • the target security algorithm includes one or more of an encryption algorithm, a complete guarantee algorithm, and a KDF, and the target security algorithm is used to indicate a security algorithm used when the first node communicates with the second node.
  • the message authentication code MAC1 in the security context request message is used to protect the integrity of the security context request message.
  • the message authentication code MAC1 may be generated based on a security key and a security algorithm according to part or all of the data in the security context request message.
  • the first node sends a security context request message to the second node, and accordingly, the second node receives the security context request message from the first node.
  • Step S1103 The second node verifies the identity of the first node according to the first identity authentication information.
  • the first identity authentication information is generated by the first node according to the shared key, so the second node can use the shared key to verify the first identity authentication information, thereby verifying the identity of the first node.
  • the second node may also verify the integrity of the security context request message according to the message authentication code MAC1.
  • the second The node may disconnect from the first node, or may also not perform subsequent communication steps.
  • Step S1104 The second node sends a security context response message to the first node.
  • the security context response message includes the second identity authentication information AUTHe.
  • the security context response message may further include a message authentication code MAC1 and the like.
  • the message authentication code MAC2 in the security context response message is used to protect the integrity of the security context response message.
  • the message authentication code MAC2 may be generated based on a security key and a security algorithm according to part or all of the data in the security context response message.
  • the second node sends a security context response message to the first node, and accordingly, the first node receives the security context response message from the second node.
  • the second node can encrypt the security context response message by using an encryption key, and correspondingly, the first node can use the corresponding decryption key to decrypt the security context response message, so as to obtain the data in the security context response message. content.
  • Step S1105 The first node verifies the identity of the second node according to the second identity authentication information.
  • the second identity authentication information is generated by the second node according to the shared key, so the first node also has the shared key and can use the shared key to verify the second identity authentication information, thereby verifying the identity of the second node .
  • the first node may also verify the integrity of the security context response message according to the message authentication code MAC2.
  • the verification of the identity information of the second node fails or the verification of the integrity of the security context response message fails, it means that the identity of the second node is not credible, or the communication with the second node is not secure, so the first The node may disconnect from the second node, or may also not perform subsequent communication steps.
  • Step S1106 The first node determines the group key of the first communication group.
  • the first node can at least determine the group key of the first communication group through the following methods:
  • Method 1 The first node determines the group key of the first communication group according to the ID of the first communication group, wherein there is a correspondence between the ID of the first communication group and the group key of the first communication group.
  • Method 2 The first node obtains a random number NONCEa, and uses NONCEa as the group key of the first communication group.
  • the parameters of the GK participating in the generation may also include other information, such as one or more of the length of the generated key, the identifier of the hash algorithm used, and so on.
  • Step S1107 The first node encrypts the group key of the first communication group based on the shared key between the first node and the second node to obtain a first protection key.
  • Embodiment 1 The first node uses the shared key to encrypt the group key to obtain the first protection key.
  • Embodiment 2 The first node may use the shared key and the second freshness parameter to encrypt the group key to obtain the first protection key.
  • Implementation solution 3 The first node generates a first intermediate key according to the shared key, and encrypts the group key by using the first intermediate key to obtain the first protection key.
  • Embodiment 4 The first node generates a first intermediate key according to the shared key and the second freshness parameter, and uses the first intermediate key to encrypt the group key to obtain the first protection key.
  • the first node encrypts the group key of the first communication group by using the first intermediate key, which may be specifically: the first node XORs the group key of the first communication group with the first intermediate key. processing to obtain the first protection key.
  • the first protection key GKc obtained by the encryption of the first node can satisfy the following formula: where GK is the group key of the first communication group, is XOR processing, and Kg is the first intermediate key.
  • the communication method shown in FIG. 11 may further include step S1108, and the step S1108 is as follows:
  • Step S1108 The first node determines a group security algorithm.
  • the group of security algorithms belongs to the algorithms supported by all nodes in the group.
  • the first node determines the group security algorithm of the first communication group in at least the following situations:
  • Case 1 There is a group security algorithm corresponding to the first communication group in the first node, so the first node can determine the corresponding group security algorithm according to the identifier of the first communication group (eg, the serial number of the first communication group).
  • the group security algorithm As an example, referring to FIG. 6, FIG. 6 is a schematic diagram of a method for determining a group security algorithm provided by an embodiment of the present application. It can be seen that the ID corresponding to the ID of the communication group can be determined according to the ID of the communication group. group algorithm. For example, referring to the information in area 601, it can be known that the group security algorithm corresponding to the communication group whose group identifier (group identify, GID) is GID2 is the Zu Chongzhi cipher algorithm (ZUC).
  • the first node may determine the group security algorithm according to an algorithm selection policy, and the algorithm selection policy includes at least one of a priority-based algorithm selection policy and an order-based algorithm selection policy.
  • the node E0 is a node in the communication group whose ID is GID1. Including node E0, node E1, node E2.
  • the first node can obtain the information of the security capabilities (Sec Capabilities) of the nodes in the group.
  • the complete security algorithms supported by the node E0 are AES-CCM, ZUC and AES-GCM, and the complete security algorithms supported by the node E1.
  • the security algorithms are AES-CCM and AES-GCM
  • the security algorithms supported by node E2 are AES-CCM and AES-GCM
  • the algorithms supported by all nodes in the group are AES-CCM and AES-GCM.
  • the priority of AES-GCM is 1, and it can be seen from area 605 that the priority of AES-GCM is 3, so AES-CCM can be determined as the group completion guarantee algorithm.
  • the order-based algorithm selection policy may determine a security algorithm with an earlier order according to a pre-defined or pre-configured order. Further, if the priorities of the two algorithms supported by the nodes in the communication group are the same, the security algorithm with the highest order can be selected.
  • the group security algorithm includes a third KDF algorithm.
  • the first node may generate the session key of the first communication group by using the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • Step S1109 The first node sends an association establishment message to the second node.
  • the first association establishment message includes the first protection key GKc and the group security algorithm Galgorithm of the first communication group.
  • the first association establishment message may also include the second freshness parameter NONCEk, the validity period GK expiration of the group key of the first communication group, the activation time timer of the group key of the first communication group, and the message authentication code MAC3. one or more of the following.
  • the second freshness parameter can be used by the second node to decrypt the first protection key.
  • the validity period of the group key of the first communication group is used to indicate the usage period of the group key of the first communication group.
  • the activation time of the group key of the first communication group is used to indicate the timing of applying the group key of the first communication group.
  • the message authentication code MAC3 in the association establishment message is used by the second node to verify the integrity of the association establishment message.
  • the first node sends the first association establishment message to the second node, and correspondingly, the second node receives the first association establishment message from the first node.
  • the first node can encrypt the first association establishment message by using an encryption key, and correspondingly, the second node can use the corresponding decryption key to decrypt the first association establishment message, so as to obtain the information in the first association establishment message. data content.
  • Step S1110 The second node decrypts the first protection key based on the shared key between the first node and the second node to obtain the group key of the first communication group.
  • the communication method shown in FIG. 11 may further include step S1111, and the step S1111 is as follows:
  • Step S1111 The second node sends an association complete message to the first node.
  • the association complete message is used to indicate that the first node association is established successfully. It can be understood that the second node sends an association complete message to the first node, and correspondingly, the first node can receive an association complete message from the second node.
  • the first node can encrypt the first association establishment message by using an encryption key, and correspondingly, the second node can use the corresponding decryption key to decrypt the first association establishment message, so as to obtain the information in the first association establishment message. data content.
  • the association complete message includes a message authentication code MAC4, where the message authentication code MAC4 is used by the first node to verify the integrity of the association complete message.
  • FIG. 12 is a schematic flowchart of a communication method provided by an embodiment of the present application. The method can be implemented based on the architecture shown in FIG. 1, and the method includes but is not limited to the following steps:
  • Step S1201 The second node sends an association request message to the first node.
  • Step S1202 The first node sends a security context request message to the second node.
  • Step S1203 The second node verifies the identity of the first node according to the first identity authentication information.
  • Step S1204 The second node sends a security context response message to the first node.
  • Step S1205 The first node verifies the identity of the second node according to the second identity authentication information.
  • Step S1206 The first node determines the group key of the first communication group.
  • Step S1207 The first node determines whether encryption is enabled for the signaling plane message between the first node and the second node.
  • the first node may perform step S1208 or the subsequent steps.
  • the first node may perform step S1212 or the subsequent steps.
  • Step S1208 The first node encrypts the group key of the first communication group based on the shared key between the first node and the second node to obtain a first protection key.
  • Step S1209 The first node determines a group security algorithm.
  • Step S1210 The first node sends a first association establishment message to the second node.
  • Step S1211 The second node decrypts the first protection key based on the shared key between the first node and the second node to obtain the group key of the first communication group.
  • Step S1212 The first node sends a second association establishment message to the second node.
  • the first node sends a second association establishment message to the second node, where the second association establishment message includes the group of the first communication group Since the second association establishment message belongs to the signaling plane message between the first node and the second node, the group key can be protected by encrypting the signaling plane message.
  • Step S1213 The second node sends an association complete message to the first node.
  • the association complete message is used to indicate that the first node association is established successfully. It can be understood that the second node sends an association complete message to the first node, and correspondingly, the first node can receive an association complete message from the second node.
  • the first node can encrypt the first association establishment message by using an encryption key, and correspondingly, the second node can use the corresponding decryption key to decrypt the first association establishment message, so as to obtain the information in the first association establishment message. data content.
  • the association complete message includes a message authentication code, and the message authentication is used by the first node to verify the integrity of the association complete message.
  • FIG. 13 is a schematic structural diagram of a communication apparatus 130 provided by an embodiment of the present application.
  • the apparatus 130 may be a node, or may be a device in a node, such as a chip or an integrated circuit, and the apparatus 130 may be It includes a receiving unit 1301 , a processing unit 1302 and a sending unit 1303 . Among them, the description of each unit is as follows:
  • a receiving unit 1301, configured to receive an association request message from the second node
  • the processing unit 1302 is configured to determine the group key of the first communication group, wherein the first communication group is the communication group where the second node is located; the group key of the first communication group is based on the first fresh determined by at least one of a sex parameter and an identification ID of the first communication group;
  • the processing unit 1302 is configured to encrypt the group key of the first communication group based on the shared key between the first node and the second node to obtain a first protection key;
  • the sending unit 1303 is configured to send a first association establishment message to the second node, wherein the first association establishment message includes the first protection key.
  • the processing unit 1302 is specifically configured to:
  • the first protection key is obtained by encrypting the group key of the first communication group based on the shared key and the second freshness parameter between the first node and the second node.
  • the processing unit 1302 is specifically configured to:
  • the first intermediate key is generated through the first key derivation algorithm KDF; the first KDF belongs to the support of the second node the KDF;
  • XOR processing is performed on the first intermediate key and the group key of the first communication group to obtain the first protection key.
  • the shared key is an encryption key between the first node and the second node
  • the second freshness parameter is a random number
  • the first association The second freshness parameter is included in the setup message.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent that the group key of the first communication group is performed based on the shared key. Number of times to encrypt.
  • the processing unit 1302 is specifically configured to:
  • a group key of the first communication group is generated through the second KDF.
  • processing unit 1302 is further configured to:
  • the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; wherein, the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm ;
  • the first association establishment message further includes information for indicating the group security algorithm.
  • the group security algorithm is the algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the processing unit 1302 is specifically configured to determine the group security algorithm according to an algorithm selection strategy, where the algorithm selection strategy includes a priority-based algorithm selection strategy and an order-based algorithm selection strategy at least one of .
  • the group security algorithm includes a third KDF algorithm
  • the processing unit is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one or more of a signaling plane encryption key, a user plane encryption key, a signaling plane security key or a user plane security key; Or, the type of the session key corresponds to a scenario in which the session key is applied.
  • processing unit 1302 is further configured to:
  • encryption is enabled on signaling plane messages between the first node and the second node; the sending unit 1303 is further configured to:
  • the processing unit 1302 is further configured to determine that a condition for updating the group key of the first communication group is met;
  • the processing unit 1302 is further configured to determine the first key according to at least one of the third freshness parameter and the identification ID of the first communication group;
  • the processing unit 1302 is further configured to encrypt the first key based on the shared key between the first node and the second node to obtain a second protection key;
  • the sending unit 1303 is further configured to send a key update message to the second node, where the key update message includes the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; Within the validity period of the first key starting from the activation time of the first key.
  • processing unit 1302 is further configured to:
  • the first key is applied at the activation time of the first key.
  • the processing unit 1302 is specifically configured to:
  • the processing unit 1302 is specifically configured to:
  • the second protection key is obtained by encrypting the key based on the shared key between the first node and the second node and a fourth freshness parameter.
  • the updated conditions include:
  • the difference between the frame number of the current communication frame and the marked frame number is greater than or equal to the first threshold; wherein, the frame number of the current communication frame and the marked frame number are in the same counting cycle;
  • the frame number of the key update or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time;
  • the difference between the marked frame number and the frame number of the current communication frame is less than or equal to a second threshold; wherein, the frame number of the current communication frame is in the next count period of the marked frame number; so
  • the marked frame number is the frame number that needs to be re-keyed or the marked frame number is the frame number of the communication frame encrypted by the first application of the group key of the first communication group;
  • the validity period of the group key of the first communication group reaches or the usage duration of the group key of the first communication group reaches the third threshold
  • At least one second node in the first communication group leaves the first communication group.
  • each unit may also correspond to the corresponding description of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the apparatus 130 may be the first node in the embodiment shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the division of multiple units is only a logical division based on functions, and is not intended to limit the specific structure of the apparatus.
  • some functional modules may be subdivided into more small functional modules, and some functional modules may also be combined into one functional module, but no matter whether these functional modules are subdivided or combined, the device will The general process performed is the same.
  • the receiving unit 1301 and the sending unit 1303 in the above-mentioned apparatus 130 may also be combined into a communication unit.
  • each unit corresponds to its own program code (or program instruction), and when the program code corresponding to each of these units runs on the processor, the unit executes the corresponding process to realize the corresponding function.
  • FIG. 14 is a schematic structural diagram of a communication apparatus 140 provided by an embodiment of the present application.
  • the apparatus 140 may be a node, or may be a device in the node, such as a chip or an integrated circuit, and the apparatus 140 may be It includes a sending unit 1401 , a receiving unit 1402 and a processing unit 1403 . Among them, the description of each unit is as follows:
  • a sending unit 1401, configured to send an association request message to the first node
  • a receiving unit 1402 configured to receive a first association establishment message from the first node, where the first association establishment message includes a first protection key;
  • the processing unit 1403 is configured to obtain the group key of the first communication group based on the shared key between the first node and the second node and the first protection key; wherein the first communication group is The communication group where the second node is located.
  • the first node and the second node share the shared key.
  • the processing unit 1403 is specifically configured to:
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the second freshness parameter and the first protection key.
  • the processing unit 1403 is specifically configured to:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • a group key of the first communication group is obtained.
  • the shared key is an encryption key between the first node and the second node
  • the second freshness parameter is a random number
  • the first association The second freshness parameter is included in the setup message.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent that the group key of the first communication group is performed based on the shared key. The number of times to encrypt.
  • the first association establishment message further includes information for indicating a group security algorithm; the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; the The group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm, and a group KDF algorithm.
  • the group security algorithm is the algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm corresponds to an algorithm selection strategy
  • the algorithm selection strategy includes at least one of a priority-based algorithm selection strategy and an order-based algorithm selection strategy.
  • processing unit 1403 is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one or more of a signaling plane encryption key, a user plane encryption key, a signaling plane security key or a user plane security key;
  • the type of the session key corresponds to a scenario in which the session key is applied.
  • the receiving unit 1402 is further configured to receive a second association establishment message from the first node; the second association establishment message includes the group key of the first communication group; the second association establishment message belongs to the signaling plane message between the first node and the second node;
  • the processing unit 1403 is further configured to decrypt the second association establishment message through the encryption key of the signaling plane between the first node and the second node to obtain the group key of the first communication group .
  • the receiving unit 1402 is further configured to receive a key update message from the first node; wherein the key update message includes a second protection key;
  • the processing unit 1403 is further configured to obtain the first key based on the shared key between the first node and the second node and the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; Within the validity period of the first key starting from the activation time of the first key.
  • processing unit 1403 is further configured to:
  • the first key is applied at the activation time of the first key.
  • the processing unit 1403 is specifically configured to:
  • the first key is obtained based on the shared key and the fourth freshness parameter and the second protection key between the first node and the second node.
  • each unit may also correspond to the corresponding description of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the apparatus 140 may be the second node in the embodiment shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • FIG. 15 is a schematic structural diagram of a communication apparatus 150 provided by an embodiment of the present application.
  • the communication apparatus 150 may be a node or a device in a node, such as a chip or an integrated circuit.
  • the apparatus 150 may include at least one memory 1501 and at least one processor 1502 .
  • a bus 1503 may also be included.
  • a communication interface 1504 may also be included, wherein the memory 1501 , the processor 1502 and the communication interface 1504 are connected through a bus 1503 .
  • the memory 1501 is used to provide a storage space, and the storage space can store data such as an operating system and a computer program.
  • the memory 1501 may be random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read-only memory One or more combinations of memory (compact disc read-only memory, CD-ROM), etc.
  • the processor 1502 is a module that performs arithmetic operations and/or logical operations, and can specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (microprocessor unit, MPU), One or more of processing modules such as Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), and Complex Programmable Logic Device (CPLD) The combination.
  • CPU central processing unit
  • GPU graphics processing unit
  • MPU microprocessor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • CPLD Complex Programmable Logic Device
  • the communication interface 1504 is used to receive and/or send data to the outside, and may be a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, etc.) interface.
  • the communication interface 1504 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 1502 in the device 150 is configured to read the computer program stored in the memory 1501 to execute the aforementioned communication method, such as the communication method described in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the processor 1502 in the device 150 is configured to read the computer program stored in the memory 1501 to perform the following operations:
  • the group key of the first communication group is the communication group where the second node is located; the group key of the first communication group is based on the first freshness parameter and the first communication group. Determined by at least one of the identification IDs of a communication group;
  • a first association establishment message is sent to the second node through the communication interface 1504, wherein the first association establishment message includes the first protection key.
  • the processor 1502 is specifically configured to:
  • the first protection key is obtained by encrypting the group key of the first communication group based on the shared key and the second freshness parameter between the first node and the second node.
  • the processor 1502 is specifically configured to:
  • the first intermediate key is generated through the first key derivation algorithm KDF; the first KDF belongs to the support of the second node the KDF;
  • XOR processing is performed on the first intermediate key and the group key of the first communication group to obtain the first protection key.
  • the shared key is an encryption key between the first node and the second node
  • the second freshness parameter is a random number
  • the first association The second freshness parameter is included in the setup message.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent that the group key of the first communication group is performed based on the shared key. The number of times to encrypt.
  • the processor 1502 is specifically configured to:
  • the group key of the first communication group is generated through the second KDF.
  • the processor 1502 is further configured to:
  • the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; wherein, the group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm and a group KDF algorithm ;
  • the first association establishment message further includes information for indicating the group security algorithm.
  • the group security algorithm is the algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the processor 1502 is specifically configured to determine the group security algorithm according to an algorithm selection strategy, where the algorithm selection strategy includes a priority-based algorithm selection strategy and an order-based algorithm selection strategy at least one of.
  • the group security algorithm includes a third KDF algorithm
  • the processing unit is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one or more of a signaling plane encryption key, a user plane encryption key, a signaling plane security key or a user plane security key;
  • the type of the session key corresponds to a scenario in which the session key is applied.
  • the processor 1502 is further configured to:
  • encryption is enabled on signaling plane messages between the first node and the second node; the processor 1502 is further configured to:
  • the processor 1502 is further configured to:
  • a key update message is sent to the second node via the communication interface 1504, the key update message including the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; Within the validity period of the first key starting from the activation time of the first key.
  • the processor 1502 is further configured to:
  • the first key is applied at the activation time of the first key.
  • the processor 1502 is specifically configured to:
  • the processor 1502 is specifically configured to:
  • the second protection key is obtained by encrypting the first key based on the shared key between the first node and the second node and a fourth freshness parameter.
  • the updated conditions include:
  • the difference between the frame number of the current communication frame and the marked frame number is greater than or equal to the first threshold; wherein, the frame number of the current communication frame and the marked frame number are in the same counting cycle;
  • the frame number of the key update or the marked frame number is the frame number of the communication frame encrypted by applying the group key of the first communication group for the first time;
  • the difference between the marked frame number and the frame number of the current communication frame is less than or equal to a second threshold; wherein, the frame number of the current communication frame is in the next count period of the marked frame number; so
  • the marked frame number is the frame number that needs to be re-keyed or the marked frame number is the frame number of the communication frame encrypted by the first application of the group key of the first communication group;
  • the validity period of the group key of the first communication group has reached or the usage duration of the group key of the first communication group has reached a third threshold
  • At least one second node in the first communication group leaves the first communication group.
  • each unit may also correspond to the corresponding description of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the apparatus 150 may be the first node in the embodiment shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • FIG. 16 is a schematic structural diagram of a communication apparatus 160 provided by an embodiment of the present application.
  • the communication apparatus 160 may be a node or a device in a node, such as a chip or an integrated circuit.
  • the apparatus 160 may include at least one memory 1601 and at least one processor 1602 .
  • a bus 1603 may also be included.
  • a communication interface 1604 may also be included, wherein the memory 1601 , the processor 1602 and the communication interface 1604 are connected through a bus 1603 .
  • the memory 1601 is used to provide a storage space, and data such as an operating system and computer programs can be stored in the storage space.
  • the memory 1601 may be one or a combination of more of RAM, ROM, EPROM, CD-ROM, and the like.
  • the processor 1602 is a module that performs arithmetic operations and/or logical operations, and may specifically be one or a combination of processing modules such as CPU, GPU, MPU, ASIC, FPGA, and CPLD.
  • the communication interface 1604 is used to receive and/or transmit data to the outside, and may be a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, etc.) interface.
  • the communication interface 1604 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 1602 in the device 160 is configured to read the computer program stored in the memory 1601, and to execute the aforementioned communication method, such as the communication method described in Fig. 3, Fig. 7, Fig. 11 or Fig. 12.
  • the processor 1602 in the device 160 is configured to read the computer program stored in the memory 1601 to perform the following operations:
  • a group key of the first communication group is obtained; wherein the first communication group is where the second node is located communication group.
  • the first node and the second node share the shared key.
  • the processor 1602 is specifically configured to:
  • the group key of the first communication group is obtained based on the shared key between the first node and the second node and the second freshness parameter and the first protection key.
  • the processor 1602 is specifically configured to:
  • the first intermediate key is generated by the first key derivation algorithm KDF;
  • a group key of the first communication group is obtained.
  • the shared key is an encryption key between the first node and the second node
  • the second freshness parameter is a random number
  • the first association The second freshness parameter is included in the setup message.
  • the second freshness parameter is a value of a first counter
  • the first counter is used to represent that the group key of the first communication group is performed based on the shared key. The number of times to encrypt.
  • the first association establishment message further includes information for indicating a group security algorithm; the group security algorithm belongs to the algorithm supported by the nodes in the first communication group; the The group security algorithm includes at least one of a group encryption algorithm, a group integrity protection algorithm, and a group KDF algorithm.
  • the group security algorithm is the algorithm with the highest priority among the algorithms supported by the nodes in the first communication group
  • the determining group security algorithm corresponds to an algorithm selection strategy
  • the algorithm selection strategy includes at least one of a priority-based algorithm selection strategy and an order-based algorithm selection strategy.
  • the processor 1602 is further configured to:
  • the session key of the first communication group is generated by the third KDF algorithm according to the type of the group key and the session key of the first communication group.
  • the key type includes one or more of a signaling plane encryption key, a user plane encryption key, a signaling plane security key or a user plane security key;
  • the type of the session key corresponds to a scenario in which the session key is applied.
  • the processor 1602 is further configured to:
  • a second association establishment message is received from the first node through the communication interface 1604; the second association establishment message includes the group key of the first communication group; the second association establishment message belongs to the first node and the Describe the signaling plane message between the second nodes;
  • Decrypt the second association establishment message by using the encryption key of the signaling plane between the first node and the second node to obtain the group key of the first communication group.
  • the processor 1602 is further configured to:
  • the first key is obtained based on the shared key between the first node and the second node and the second protection key.
  • the first key is used to replace the group key of the first communication group.
  • the key update message is further used to indicate the activation time of the first key and the validity period of the first key; Within the validity period of the first key starting from the activation time of the first key.
  • the processor 1602 is further configured to:
  • the first key is applied at the activation time of the first key.
  • the processor 1602 is specifically configured to:
  • the first key is obtained based on the shared key and the fourth freshness parameter and the second protection key between the first node and the second node.
  • each unit may also correspond to the corresponding description of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the apparatus 160 may be the second node in the embodiment shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on one or more processors, the execution of FIG. 3 and FIG. 7 is performed. , the method described in any one of the embodiments shown in FIG. 11 or FIG. 12 .
  • An embodiment of the present application further provides a chip system, and the chip system communication device includes at least one processor and a communication interface, where the communication interface is used for sending and/or receiving data, and the at least one processor is used for calling at least one A computer program stored in the memory, when the computer program runs on one or more processors, executes the method described in any one of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • An embodiment of the present application further provides a terminal, where the terminal includes a first node (for example, a car cockpit domain controller CDC) and/or a second node (for example, a camera, a screen, a microphone, a sound, a radar, an electronic key, at least one of the modules such as keyless entry or startup system controller), wherein the first node includes the device described in the embodiment shown in FIG. 13 or FIG. 15 , and the second node includes the above-mentioned FIG. 13 or FIG. 15 The device described in the illustrated embodiment.
  • a first node for example, a car cockpit domain controller CDC
  • a second node for example, a camera, a screen, a microphone, a sound, a radar, an electronic key, at least one of the modules such as keyless entry or startup system controller
  • the terminal may be a vehicle, a drone, a robot, a device in a smart home scenario, a device in a smart manufacturing scenario, or the like.
  • An embodiment of the present application further provides a smart cockpit product, where the smart cockpit product includes a first node (for example, a car cockpit domain controller CDC), where the first node is shown in FIG. 3 , FIG. 7 , FIG. 11 , or FIG. 12 . the first node in any of the embodiments shown.
  • the smart cockpit product further includes a second node (for example, at least one of a camera, a screen, a microphone, a sound, a radar, an electronic key, a keyless entry and a start system controller, etc.), the second node is the second node in any one of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • An embodiment of the present application also provides a vehicle, the vehicle includes a first node (eg, a cockpit domain controller CDC). Further, the vehicle further includes a second node (for example, at least one of modules such as a camera, a screen, a microphone, a sound, a radar, an electronic key, a keyless entry or a starting system controller), wherein the above-mentioned first node is a graph of 3.
  • the first node in any of the embodiments shown in FIG. 7 , FIG. 11 , or FIG. 12
  • the second node in any of the embodiments shown in FIG. 3 , FIG. 7 , FIG. 11 or FIG. 12 .
  • the above-mentioned vehicle can also be replaced with an intelligent terminal such as a drone, a robot, or a transportation tool.
  • Embodiments of the present application further provide a computer program product, when the computer program product runs on one or more processors, any one of the implementations shown in FIG. 3 , FIG. 7 , FIG. 11 , or FIG. 12 can be performed.
  • the communication method described in the example is not limited to.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer program product may be stored in or transmitted over a computer-readable storage medium.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media integrated.
  • Useful media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • the modules in the device embodiments of the present application may be combined, divided, and deleted according to actual needs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例提供一种通信方法及装置,应用于支持短距离通信的节点中,例如蓝牙或者车载短距通信系统中,该方法包括:接收来自第二节点的关联请求消息;确定第一通信组的组密钥,其中,第一通信组为第二节点所在的通信组;基于第一节点与第二节点之间的共享密钥对第一通信组的组密钥进行加密,得到第一保护密钥;向第二节点发送第一关联建立消息,该第一关联建立消息包括第一保护密钥。采用本申请实施例,能够提高组播通信的安全性。该方案进一步可用于提升自动驾驶或高级驾驶辅助系统ADAS能力,可应用于车联网,例如车辆外联V2X、车间通信长期演进技术LTE-V、车辆-车辆V2V等。

Description

一种通信方法及相关装置 技术领域
本发明涉及通信技术领域,尤其短距通信技术领域,例如座舱域通信。具体涉及一种通信方法及相关装置。
背景技术
在信息化飞速发展的今天,通信技术已经深入了人们的生活。节点的通信过程中,存在有单播、广播、组播三种通信方式。
单播是相互感兴趣的节点双方进行通信的方式,属于点对点通信。广播是节点向子网内所有节点发送消息,属于点对多点的通信。组播则介于两者之间,某一节点(例如称为第一节点)向某一通信组中的节点发送消息,存在于该通信组的节点都可以接收到消息,属于点对多点通信。组播技术是计算机网络中的关键技术之一,无论在应用层,网络层还是媒体接入层,组播都得到了广泛的应用,例如媒体广播、多方会议、阵列探测等等。
在通信过程中,为了防止数据泄露、保护通信安全,需要对通信过程中的消息进行安全保护。单播消息的加密可以通过单播密钥来实现,两个节点之间可以建立一对私有临时密钥(Private Temporary Key,PTK)来保证一对一的单播安全。单播消息需要保护,组播消息也需要保护,只有通信组中的组成员知道加密和解密用的组密钥,这样才能够确保只有组成员才能解读被加密的报文,非组成员无法获得报文内容,保护组播通信的安全性。
对组播消息的保护依赖于组密钥,因此对组密钥的保护至关重要。对于通信系统来说,组密钥泄露使得攻击者可以通过组密钥监听组内消息,导致数据泄漏,使得用户隐私及安全受到威胁。尤其对于车载通信系统,这种情况容易造成车辆的重要数据泄露、或者车辆与窃取了组密钥的节点进行通信,危及车辆安全。
可以看出,如何保护组密钥的私密性、提高组播通信过程中的安全性是本领域技术人员正在研究的技术问题。
发明内容
本申请实施例公开了一种通信方法及相关装置,能够保护组密钥的私密性,提高组播通信过程中的安全性。
第一方面,本申请实施例公开了一种通信方法,包括:
接收来自第二节点的关联请求消息;
确定第一通信组的组密钥,其中,所述第一通信组为所述第二节点所在的通信组;所述第一通信组的组密钥为根据第一新鲜性参数和所述第一通信组的标识ID中的至少一项得到的;
基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥;
向所述第二节点发送第一关联建立消息,其中,所述第一关联建立消息包括所述第一保护密钥。
上述方法中,在接收来自第二节点的关联请求后,可以确定第二节点所在的第一通信组的组密钥,然后使用第一节点与第二节点的共享密钥对组密钥进行加密得到第一保护密钥,将第一保护密钥携带在关联建立消息中发送给第二节点。可以看出,由于关联建立消息中携带的保护密钥是通过共享密钥对组密钥进行加密得到的,因此无论第一关联建立消息是否被加密,都可以保护组密钥的私密性。这样一来,第一节点与第一通信组进行组播通信时,可以使用该组密钥对组播消息进行加密,从而对组播消息进行保护,避免非组成员获得通信内容,提高了组播通信的安全性。
进一步的,第一节点可以在关联建立消息中将组密钥通过保护密钥发送给第二节点,将组密钥的分发流程融合在第一节点与第二节点建立关联的流程中,因此不需要额外的密钥分发的流程,节省了网络资源的开销,提高了组播通信的效率。
在第一方面的一种可能的实施方法中,所述第一节点和所述第二节点共享所述共享密钥。
可以看出,共享密钥是第一节点与第二节点之间共享的一个秘密值,共享密钥可以是双方通过相同的密钥获取方法生成的,也可以是在双方节点中预先定义或者预先配置的,还可以是一个可信设备分别发送给第一节点和第二节点的。例如,第一节点和第二节点可以通过交换公钥生成密钥S,第一节点生成的密钥S与第二节点生成的密钥S的值是相同的,因此密钥S可以作为第一节点与第二节点之间的共享密钥。此外,还可以根据原有的共享密钥通过密钥派生算法KDF得到其他的密钥,由于第二节点与第二节点进行派生密钥的方法可以是相同的,因此根据共享密钥派生得到的密钥也是共享密钥。
在第一方面的一种可能的实施方法中,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥,包括:
基于第一节点与所述第二节点之间的所述共享密钥和第二新鲜性参数对所述第一通信组的组密钥进行加密,得到所述第一保护密钥。
上述说明了一种加密的方法,由于新鲜性参数的值是不同的,使得每一次加密第一通信组的组密钥得到的第一保护密钥也是不同的,从而提高了组密钥的私密性。
在第一方面的又一种可能的实施方法中,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥,包括:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
通过第一中间密钥对第一通信组的组密钥进行加密,得到第一保护密钥。
上述说明了又一种加密的方法,第一节点通过共享密钥和第二新鲜性参数生成第一中间密钥,通过第一中间密钥进行对组密钥加密。
在第一方面的又一种可能的实施方法中,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥,包括:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;所述第一KDF属于所述第二节点支持的KDF;
将所述第一中间密钥和所述第一通信组的组密钥执行异或处理,得到所述第一保护密钥。
上述说明了又一种加密的方法,第一节点通过共享密钥和第二新鲜性参数生成第一中间密钥,由于进行两次异或处理后可以得到原本的值,因此第一节点将第一中间密钥与第一通信组的组密钥进行异或。进一步可选的,第二节点接收第一保护密钥后,通过共享密钥和第二新新鲜性参数的值生成相同的第一中间密钥,将第一中间密钥和第一保护密钥进行异或处理则可以得到第一通信组的密钥。
在第一方面的又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
上述说明了共享密钥与新鲜性参数的可能情况,第一节点与第二节点之间的加密密钥可以是共享的,因此可以通过第一节点与第二节点之间的加密密钥对组密钥进行加密。第二新鲜性参数可以为随机数(number once,NONCE)。其中,NONCE是一个只被使用一次的(或者说非重复的)随机数值。该第二新鲜性参数可以在第一关联建立消息中发送给第二接待你,便于第二节点根据该第二新鲜性参数解密第一保护密钥,得到第一通信组的组密钥。
在第一方面的又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
上述说明了新鲜性参数的可能情况,第二新鲜性参数可以为第一计数器的值,第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。这样一来,每次使用共享密钥对组密钥进行加密时,使用的计数器的值都是不同的,使得每一次加密相同的第一通信组的组密钥得到的第一保护密钥也是不同的,从而提高了组密钥的私密性。
在第一方面的又一种可能的实施方法中,所述确定第一通信组的组密钥,包括:
根据所述第一通信组的ID确定所述第一通信组的组密钥,所述第一通信组的ID与所述第一通信组的组密钥之间存在对应关系;
或者,根据所述第一新鲜性参数和所述第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。
上述说明了确定第一通信组的组密钥的方式,一方面,第一通信组的ID与组密钥之间存在对应关系,因此可以根据通信组的ID确定通信组的组密钥。另一方面,可以通过KDF生成第一通信组的组密钥。进一步的可选的,若第一通信组的ID没有对应的组密钥(例如新创建了一个通信组时),则可以通过KDF生成第一通信组的组密钥。
在第一方面的又一种可能的实施方法中,所述方法还包括:
确定组安全算法,所述组安全算法属于所述第一通信组中的节点支持的算法;其中,所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项;
所述第一关联建立消息中还包括用于指示所述组安全算法的信息。
可以看出,第一关联建立消息中还包括组安全算法,该安全算法是在组内所有节点均支持的算法中确定的。
在第一方面的又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法,包括:
根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在第一方面的又一种可能的实施方法中,所述组安全算法包括第三KDF算法,所述方法还包括:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
可以看出,使用组KDF算法,根据会话密钥类型可以从组密钥推演出会话密钥,用于会话过程中的加密。
在第一方面的又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在第一方面的又一种可能的实施方法中,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到保护密钥之前,还包括:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在第一方面的又一种可能的实施方法中,所述方法还包括:
若所述第一节点与所述第二节点之前的信令面消息开启加密,则向所述第二节点发送第二关联建立消息,其中,所述第二关联建立消息中包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息。
可以看出,对与信令面加密开启和关闭两种场景,可以使用不同的保护方法。具体地,若确定信令面的消息开启加密,对于信令面开启加密时,可以不对组密钥进行加密,而是通过信令面的消息的加密对组密钥进行保护,避免额外的加密数据计算,提高了组密钥分发的效率。
在第一方面的又一种可能的实施方法中,所述方法包括:
确定满足更新所述第一通信组的组密钥的条件;
根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥;
基于所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥;
向所述第二节点发送密钥更新消息,所述密钥更新消息包括所述第二保护密钥。
在第一方面的又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
上述说明了更新组密钥的方式,确定满足更新组密钥的条件后,可以确定第一密钥,将第一密钥使用共享密钥加密后,通过密钥更新消息发送给第二节点。可以看出,由于密钥更新消息中携带的保护密钥是通过共享密钥对第一密钥进行加密得到的,因此无论密钥更新消息是否被加密,都可以保护第一密钥的私密性。可选的,该密钥更新消息可以是第一节点向第一通信组中的第二节点发送的组播消息,还可以是第一节点与第二节点之间的单播消息。进一步的可选的,在密钥更新消息为单播消息的情况下,第一节点还可以向第一通信组的其他第二节点发送单播消息。
在第一方面的又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥 的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
可以看出,密钥更新消息可以指示第一目标密钥的更新时间和/或第一目标密钥的有效期,有利于按需求来决定何时应用第一目标密钥。
在第一方面的又一种可能的实施方法中,所述向所述第二节点发送密钥更新消息之后,还包括:
确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息。
在所述第一密钥的启动时间应用所述第一密钥。
在第一方面的又一种可能的实施方法中,所述确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息,包括:
确定接收到来自属于所述第一通信组中的全部第二节点的更新确认消息。
在第一方面的又一种可能的实施方法中,所述通过所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥,包括:
基于第一节点与所述第二节点之间的共享密钥和第四新鲜性参数对所述第一密钥进行加密,得到所述第二保护密钥。
上述说明了一种对第一密钥进行加密的方法,由于新鲜性参数的值是不同的,使得每一次加密第一密钥得到的第二保护密钥也是不同的,从而提高了组密钥的私密性。
在第一方面的又一种可能的实施方法中,所述通过所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥,包括:
根据第一节点与所述第二节点之间的共享密钥和第四新鲜性参数,通过第一密钥派生算法KDF生成第二中间密钥;
通过第二中间密钥对第一密钥进行加密,得到第一保护密钥。
在第一方面的又一种可能的实施方法中,所述通过所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥,包括:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第二中间密钥;所述第一KDF属于所述第二节点支持的KDF;
将所述第二中间密钥和第一密钥执行异或处理,得到所述第二保护密钥。
在第一方面的又一种可能的实施方法中,所述更新的条件包括:
当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,所述当前通信帧的帧号与所述标记帧号在同一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述标记帧号与所述当前通信帧的帧号的差值小于或者等于第二阈值;其中,所述当前通信帧的帧号在所述标记帧号的下一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长到达第三阈值;
或者,所述第一通信组中的至少一个第二节点离开所述第一通信组。
上述说明了更新组密钥的条件,当满足以下条件之一时,可以确定需要更新组密钥:①接入点的组新鲜性参数(比如帧号)即将重复或者反转(或超过反转之前的某个阈值)时;②组密钥有效期到期或者组密钥使用时长超过阈值时;③组内成员发生变动时。
第二方面,本申请实施例公开了一种通信方法,包括:
向第一节点发送关联请求消息;
接收来自所述第一节点的第一关联建立消息,所述第一关联建立消息包括第一保护密钥;
基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥;其中,所述第一通信组为所述第二节点所在的通信组。
在第二方面的一种可能的实施方法中,所述第一节点和所述第二节点共享所述共享密钥。
在第二方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥,包括:
基于所述第一节点与第二节点之间的共享密钥和第二新鲜性参数以及所述第一保护密钥,得到第一通信组的组密钥。
在第二方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥,包括:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
基于所述第一中间以及所述第一保护密钥,得到所述第一通信组的组密钥。
在第二方面的又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在第二方面的又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在第二方面的又一种可能的实施方法中,所述第一关联建立消息中还包括用于指示组安全算法的信息;所述组安全算法属于所述第一通信组中的节点支持的算法;所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项。
在第二方面的又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法对应于算法选择策略,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在第二方面的又一种可能的实施方法中,所述组安全算法包括第三KDF算法,所述方法还包括:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在第二方面的又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面 加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在第二方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥之前,还包括:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在第二方面的又一种可能的实施方法中,所述方法还包括:
接收来自所述第一节点的第二关联建立消息;所述第二关联建立消息包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息;
若所述第一节点与所述第二节点之前的信令面消息开启加密,则通过所述第一节点与所述第二节点之间的信令面加密密钥以及所述第二关联建立消息,得到所述第一通信组的组密钥。
在第二方面的又一种可能的实施方法中,所述方法还包括:
接收来自所述第一节点的密钥更新消息;其中,所述密钥更新消息包括第二保护密钥;
基于所述第一节点与所述第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥。
在第二方面的又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在第二方面的又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在第二方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥之后,所述方法还包括:
向所述第一节点发送更新确认消息;
在所述第一密钥的启动时间应用所述第一密钥。
在第二方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥,包括:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数以及所述第二保护密钥,得到所述第一密钥。
第三方面,本申请实施例提供了一种通信装置,所述通信装置包括用于执行第一方面或者第一方面任意一种可能的实施方式所描述的方法的单元。
在第三方面的一种可能的实施方法中,所述装置具体包括:
接收单元,用于接收来自第二节点的关联请求消息;
处理单元,用于确定第一通信组的组密钥,其中,所述第一通信组为所述第二节点所在的通信组;所述第一通信组的组密钥为根据第一新鲜性参数和所述第一通信组的标识ID中的至少一项确定的;
所述处理单元,用于基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥;
发送单元,用于向所述第二节点发送第一关联建立消息,其中,所述第一关联建立消息包括所述第一保护密钥。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第二新鲜性参数对所述第一通信组的组密钥进行加密,得到所述第一保护密钥。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
通过第一中间密钥对第一通信密钥进行加密,得到第一保护密钥。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;所述第一KDF属于所述第二节点支持的KDF;
将所述第一中间密钥和所述第一通信组的组密钥执行异或处理,得到所述第一保护密钥。
在第三方面的又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在第三方面的又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
根据所述第一通信组的ID确定所述第一通信组的组密钥,所述第一通信组的ID与所述第一通信组的组密钥之间存在对应关系;
或者,根据所述第一新鲜性参数和所述第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。
在第三方面的又一种可能的实施方法中,所述处理单元,还用于:
确定组安全算法,所述组安全算法属于所述第一通信组中的节点支持的算法;其中,所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项;
所述第一关联建立消息中还包括用于指示所述组安全算法的信息。
在第三方面的又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法,包括:
根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在第三方面的又一种可能的实施方法中,所述组安全算法包括第三KDF算法,所述处理单元,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在第三方面的又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面 加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在第三方面的又一种可能的实施方法中,所述处理单元,还用于:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在第三方面的又一种可能的实施方法中,所述第一节点与所述第二节点之间的信令面消息开启加密;所述发送单元,还用于:
向所述第二节点发送第二关联建立消息,其中,所述第二关联建立消息中包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息。
在第三方面的又一种可能的实施方法中,所述处理单元,还用于确定满足更新所述第一通信组的组密钥的条件;
所述处理单元,还用于根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥;
所述处理单元,还用于基于所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥;
所述发送单元,还用于向所述第二节点发送密钥更新消息,所述密钥更新消息包括所述第二保护密钥。
在第三方面的又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在第三方面的又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在第三方面的又一种可能的实施方法中,所述处理单元,还用于:
确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息。
在所述第一密钥的启动时间应用所述第一密钥。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
确定接收到来自属于所述第一通信组中的全部第二节点的更新确认消息。
在第三方面的又一种可能的实施方法中,所述处理单元,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数对所述密钥进行加密,得到所述第二保护密钥。
在第三方面的又一种可能的实施方法中,所述更新的条件包括:
当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,所述当前通信帧的帧号与所述标记帧号在同一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述标记帧号与所述当前通信帧的帧号的差值小于或者等于第二阈值;其中,所述当前通信帧的帧号在所述标记帧号的下一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长到达第三阈值;
或者,所述第一通信组中的至少一个第二节点离开所述第一通信组。
第四方面,本申请实施例提供了一种通信装置,所述通信装置包括用于执行第二方面或者第二方面任意一种可能的实施方式所描述的方法的单元。
在第四方面的一种可能的实施方法中,所述装置具体包括:
发送单元,用于向第一节点发送关联请求消息;
接收单元,用于接收来自所述第一节点的第一关联建立消息,所述第一关联建立消息包括第一保护密钥;
处理单元,用于基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥;其中,所述第一通信组为所述第二节点所在的通信组。
在第四方面的又一种可能的实施方法中,所述第一节点和所述第二节点共享所述共享密钥。
在第四方面的又一种可能的实施方法中,所述处理单元,具体用于:
基于所述第一节点与第二节点之间的共享密钥和第二新鲜性参数以及所述第一保护密钥,得到第一通信组的组密钥。
在第四方面的又一种可能的实施方法中,所述处理单元,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
基于所述第一中间以及所述第一保护密钥,得到所述第一通信组的组密钥。
在第四方面的又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在第四方面的又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在第四方面的又一种可能的实施方法中,所述第一关联建立消息中还包括用于指示组安全算法的信息;所述组安全算法属于所述第一通信组中的节点支持的算法;所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项。
在第四方面的又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法对应于算法选择策略,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在第四方面的又一种可能的实施方法中,所述处理单元,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在第四方面的又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥 的类型对应所述会话密钥应用的场景。
在第四方面的又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥之前,还包括:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在第四方面的又一种可能的实施方法中,所述接收单元,还用于接收来自所述第一节点的第二关联建立消息;所述第二关联建立消息包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息;
所述处理单元,还用于通过所述第一节点与所述第二节点之间的信令面加密密钥解密所述第二关联建立消息,得到所述第一通信组的组密钥。
在第四方面的又一种可能的实施方法中,所述接收单元,还用于接收来自所述第一节点的密钥更新消息;其中,所述密钥更新消息包括第二保护密钥;
所述处理单元,还用于基于所述第一节点与所述第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥。
在第四方面的又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在第四方面的又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在第四方面的又一种可能的实施方法中,所述处理单元,还用于:
向所述第一节点发送更新确认消息;
在所述第一密钥的启动时间应用所述第一密钥。
在第四方面的又一种可能的实施方法中,所述处理单元,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数以及所述第二保护密钥,得到所述第一密钥。
第五方面,本申请实施例还提供一种通信装置,所述通信装置包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现第一方面或第一方面任意一种可能的实施方式,或者第二方面或第二方面任意一种可能的实施方式所描述的方法。
第六方面,本申请实施例还提供一种通信系统,该通信系统包括第一节点和第二节点,其中,该第一节点为上述第三方面或第三方面的任意一种可能的实施方式所描述的装置,该第二节点为上述第四方面或第四方面的任意一种可能的实施方式所描述的装置。
第七方面,本身申请实施例提供一种芯片系统,所述芯片系统通信装置包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述芯片系统所在的装置实现第一方面或第一方面任意一种可能的实施方式,又或者实现第二方面或第二方面任意一种可能的实施方式所描述的方法。
第八方面,本申请实施例公开了一种计算机可读存储介质,所述计算机可读存储介质 中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行第一方面或第一方面的任意一种可能的实施方式、或者第二方面或第二方面的任意一种可能的实施方式所描述的方法。
第九方面,本申请实施例公开了一种计算机程序产品,当所述计算机程序产品在一个或多个处理器上运行时,执行第一方面或第一方面的任意一种可能的实施方式、或者第二方面或第二方面的任意一种可能的实施方式所描述的方法。
第十方面,本申请实施例公开了一种终端,所述终端包括第一节点(例如,汽车座舱域控制器CDC)和/或第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),其中所述第一节点为上述第三方面或第三方面的任意一种可能的实施方式所描述的装置,所述第二节点为上述第四方面或第四方面的任意一种可能的实施方式所描述的装置。
进一步可选的,所述终端可以为车辆、无人机、机器人、智能家居场景中的设备、智能制造场景中的设备等。
可以理解的,本申请第二方面、第三方面、第四方面的技术方案与第一方面的技术方案相对应,相关的有益效果可以参考第一方面的有益效果,因此不再赘述。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的一种通信系统的架构示意图;
图2是本申请实施例提供的一种通信方法的使用场景示意图;
图3是本申请实施例提供的一种通信方法的流程图;
图4是本申请实施例提供的一种对组密钥进行加密的方法的示意图;
图5是本申请实施例提供的又一种对组密钥进行加密的方法的示意图;
图6是本申请实施例提供的一种确定组安全算法的方法示意图
图7是本申请实施例提供的又一种通信方法的流程图;
图8是本申请实施例提供的一种通信场景的示意图;
图9是本申请实施例提供的一种更新组密钥的场景示意图;
图10是本申请实施例提供的又一种更新组密钥的场景示意图;
图11是本申请实施例提供的又一种通信方法的流程图;
图12是本申请实施例提供的又一种通信方法的流程图;
图13是本申请实施例提供的一种通信装置的结构示意图;
图14是本申请实施例提供的又一种通信装置的结构示意图;
图15是本申请实施例提供的又一种通信装置的结构示意图;
图16是本申请实施例提供的又一种通信装置的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。需要说明的是,本申请中, “示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
下面先对本申请涉及到的相关技术和专业术语进行简单的介绍以方便理解。
一、节点(node)
节点是具有数据收发能力的电子设备。例如,节点可以为汽车座舱(Cockpit Domain)设备,或者汽车座舱设备中的一个模块(例如座舱域控制器(cockpit domain controller,CDC)、摄像头、屏幕、麦克风、音响、电子钥匙、无钥匙进入或启动系统控制器等模块中的一个或者多个)。在具体实施过程中,节点还可以是数据中转设备,例如路由器、中继器、桥接器或交换机;也可以是一个终端设备,例如各种类型的用户设备(user equipment,UE)、手机(mobile phone)、平板电脑(pad)、台式电脑、耳机、音响等;还可以包括机器智能设备,如无人驾驶(self-driving)设备、运输安全(transportation safety)设备、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、机器类型通信(machine type communication,MTC)设备、工业控制(industrial control)设备、远程医疗(remote medical)设备、智能电网(smart grid)设备、智慧城市(smart city)设备;还可以包括可穿戴设备(如智能手表,智能手环,计步器等)等等。在某些技术场景中,具备相类似数据收发能力的设备的名称也可能不称为节点,但是为了方便描述,本申请实施例中将具有数据收发能力的电子设备统称为节点。
二、共享密钥(shared key,SK)
共享密钥是通信双方的节点中保存的相同的秘密值,共享密钥可以是双方通过相同的密钥获取方法生成的,也可以是在双方节点中预先定义或者预先配置的,还可以是一个可信设备(如密钥分发中心(key distribution center,KDC))分别发送给第一节点和第二节点的。
例如,车辆的座舱域控制器(cockpit domain controller,CDC)与车主的手机是可以通过短距通信技术通信的两个节点。当车主需要通过手机与车辆的CDC进行配对时,可以先通过交换公钥生成共享密钥,如通过密钥协商算法在手机与车辆的CDC之间交换密钥协商算法参数生成共享密钥等。该共享密钥可以用于后续该手机再次请求与车辆的CDC进行配对时,验证双方节点的身份。
再如,车辆的座舱域控制器(cockpit domain controller,CDC)与车载雷达设备是可以进行通信的两个节点,汽车厂工作人员在部署CDC和车载雷达时已经预先配置CDC和车载雷达之间的共享密钥,通过该共享密钥,可以保证车辆的CDC与车顶雷达进行通信的安全性。
此外,节点可以根据原有的共享密钥通过密钥派生得到其他的密钥。由于双方的节点进行派生密钥的方法可以是相同的,因此根据原有的共享密钥派生得到的密钥也可以看作是共享密钥,例如,第一节点使用共享密钥Kdh,通过密钥派生得到会话密钥Kenc,相应的,第二节点也使用相同的方法派生得到会话密钥Kenc。由于共享密钥Kdh是第一节点与第二节点共享的一个秘密值,因此派生得到会话密钥Kenc也可以看作为第一节点与第二节点之间的共享密钥。
三、组播通信
组播技术旨在将某一信息发送到某一组节点中,这样一组节点可以看作是一个通信组。在某些场景中,也将这样的通信组称为目标组,或者组播组。在某一节点(例如称为第一节点)向多个目标节点发送信息时,第一节点可以只发送一份数据,数据的目的地址是组播组地址,这样,凡是属于该组的目标节点,都可以接收到第一节点发送的上述数据。因此,组播方式解决了单播情况下数据的重复发送及带宽的重复占用,也解决了广播方式下带宽资源的浪费。
四、安全算法
安全算法可以包括加密算法、完整性保护算法和密钥派生算法等等。
其中,加密算法包括对称加密算法和非对称加密算法。通常来说,对称加密算法的加密密钥与解密密钥相同,非对称加密算法的加密密钥与解密密钥不同,此外,还有一类不需要密钥的散列算法。常见的对称加密算法主要有数据加密标准(data encryption standard,DES)、三重数据加密算法(triple data encryption algorithm,3DES)、高级加密标准(advanced encryption standard,AES)等,常见的非对称算法主要有RSA加密算法、数据结构分析算法(data structure analysis,DSA)等,散列算法主要有安全散列算法(secure hash algorithm1,SHA-1)、信息摘要(message digest,MD)算法(如MD2、MD4或MD5等)等。
完整性保护算法是用于保护消息完整性的算法,也可以称为MAC(message authentication code,MAC)算法或者完保算法。例如,通过哈希算法来实现的完整性保护算法称为基于哈希的消息认证码(hash-based message authentication code,HMAC)算法,其中的哈希算法可以为MD5、SHA-1、SHA-256等等中的一个,这些不同的HMAC实现通常标记为:HMAC-MD5,HMAC-SHA1,HMAC-SHA256等等。再如,基于密码算法来实现的MAC算法可以称为基于密码的消息认证码(cipher-based message authentication code,CMAC)算法,其中的密码算法可以为AES,由于AES分组加密的工作模式有ECB,CBC,CFB,OFB四种,基于不同的工作的模式的分组加密算法来实现的完整性保护算法可以分别称为:ECB-MAC算法、CBC-MAC算法等等。进一步的,单密钥消息认证码(One-key CBC-MAC,OMAC)是从CBC-MAC算法改进而来。此外,完整性保护算法还可以包括伽罗瓦消息验证码(Galois message authentication code mode,GMAC)、祖冲之密码算法(如ZUC128、ZUC256等)、MD算法(如MD2、MD4或MD5等)。
在一些具体场景中,通过认证加密算法,对与给定的原文既可以加密数据也可以生成消息认证码,因此认证加密算法既可以作为加密算法也可以作为完保算法。例如,基于GMAC和计数加密模式的AES算法(AES-Galois/counter mode,AES-GCM)和基于CMAC和计数加密模式的AES算法(AES-CMAC/counter Mode,AES-CCM)等可以对消息进行认证加密,而进行认证加密的过程中能够生成MAC来保护消息的完整性。
密钥派生算法(key derivation function,KDF)用于从一个秘密值中派生出一个或多个秘密值,又称为密钥导出算法。例如,通过秘密值Key派生的新的秘密值DK可以表示为:DK=KDF(Key)。常用的密钥派生算法有基于密码的密钥派生函数(password-based key derivation function,PBKDF)、斯克里普特(scrypt)算法等,其中PBKDF算法又包括第一代PBKDF1和第二代PBKDF2。可选的,一些KDF算法在派生密钥过程中,使用哈希算法 对输入的秘密值进行哈希变化,因此KDF函数还可以接收算法标识作为输入,用于指示使用何种哈希算法。
这里需要说明的是,本申请各个实施例中,为了方便描述各个密钥派生过程使用的KDF,因此使用“第一KDF”“第二KDF”和“第三KDF”进行描述,该“第一KDF”“第二KDF”和“第三KDF”可以是不同的KDF,也可以是相同的KDF。
五、新鲜性参数
新鲜性参数用于生成密钥和认证参数等,也可以称为新鲜度或新鲜参数,可以包括随机数(number once,NONCE)、计数值(counter)、序列号(number)、帧号等等中的至少一个。其中,NONCE是一个只被使用一次的(或者说非重复的)随机数值。不同时刻生成的新鲜性参数通常不同,即新鲜性参数的具体取值,在每生成一次新鲜性参数时会发生变化,从而使得这一次生成密钥(或者认证参数等)所使用的新鲜性参数与上一次生成密钥(或者认证参数等)时所使用的新鲜性参数不同的,可以提高生成的密钥的安全性。
例如,新鲜性参数可以是节点通过随机数发生器(random number generator)获取的随机数。
再如,新鲜性参数可以是分组数据汇聚协议计数值(packet data convergence protocol count,PDCP COUNT),而PDCP COUNT又可以包括上行PDCP COUNT和下行PDCP COUNT,第二节点每发送一个上行PDCP数据包则上行PDCP COUNT加1,第一节点每发送一个下行PDCP数据包则下行PDCP COUNT加1。由于PDCP COUNT是一直在变化的,使得每次通过PDCP COUNT生成的密钥与上次通过PDCP COUNT生成的密钥是不同的。
六、帧号
协议数据单元(Protocol Data Unit,PDU)是通信过程中对等层次之间传递的数据单位,在通信系统的协议栈中,每一层实体都可以建立本层实体的PDU,PDU中包含来自上层实体的信息,以及当前层实体附加的信息,然后被传送到下一层。某些场景中,也可以不附加当前层实体的信息,例如透传。例如,对于逻辑链路控制(Logical Link Control,LLC)和介质访问控制(Media Access Control,MAC)两个子层,LLC实体可以建立LLC PDU,MAC实体可以建立MAC PDU。为了方便描述,本申请实施例中将通信系统中传递的协议数据单元统称为通信帧。具体的,控制类型协议数据单元又可以称为控制帧或者管理帧,数据类型协议数据单元又可以称为数据帧。例如,通信帧可以为媒体接入控制(media access control,MAC)数据帧。
节点通过网络收发的通信帧有其相对应的序号(serial number,SN),也称为序列号,该序号的值通过n个比特指示,下一个通信帧的序号为上一个通信帧的序号加1。举例而言,假设通信帧A的序号的值为192,则下一个通信帧B的序号的值为193,依此类推。值得注意的是,当序号超出其最大表示值而反转归零(SN rollover)时,会造成后面的通信帧的序号值反而会小于前面的通信帧的序号的情况。例如,以序号为8比特为例,第一个通信帧的序号为0且每次增加1,每当增加到0xFF时该序号会反转归零。也就是说,序号有周期性的特质,对于包含n个比特的序号来说,每经过2 n个的通信帧时,序号会重复,因此通信帧并非拥有独一无二的序号,但是其在每一序号周期(SN cycle)中是唯一的。
本申请各个实施例中,帧号(Frame Number,FN)通过N个比特指示,所述N个比特包括用于指示通信帧的序号的比特作为低阶n位,以及用于指示记录值的比特作为高阶的(N-n)位。其中,记录值的初始值为0或为指定的值,且当通信帧的序号反转归零(rollover)时,记录值会加1。举例而言,以帧号为32比特、序号为8比特为例,假设记录值为0x00 0000,且通信帧的序号的值为0xFF,则当前帧号为0x0000 00FF。而下一个数据包的序号值加1后发生反转,因此下一个的协议数据单元的序号的值为0x00,而由于序号返转归零,使得记录值变为0x00 0001,因此下一个帧号为0x0000 0100。可以理解的,由于帧号是N个比特的数字,因此帧号也存在计数周期(FN cycle),当帧号超过最大值时,帧号也会产生反转(FN rollover)。
可选的,该帧号的设置也可以参考PCDP COUNT的相关定义,PCDP COUNT中包括超帧号(Hyper Frame Number,HFN)部分和协议数据单元的序号部分,其中超帧号起始值被设为0或为指定的值,当协议数据单元的序号反转归零时,超帧号加1。
可选的,节点中可以维护多个帧号,例如,节点可以分别维护上行通信帧的帧号和下行通信帧的帧号,当节点发送一个上行通信帧时,可以根据通信帧的序号变化将上行通信的帧号加1,当节点发送一个下行通信帧时,可以根据通信帧的序号变化调整下行的通信帧的帧号。
下面对本申请实施例的系统架构和业务场景进行描述。需要说明的是,本申请描述的系统架构及业务场景是为了更加清楚的说明本申请的技术方案,并不构成对于本申请提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请提供的技术方案对于类似的技术问题,同样适用。
请参见图1,图1是本申请实施例提供的一种通信系统的架构示意图,包括第一节点101、第一通信组102、第二节点103和第二节点104。其中:
第一通信组102中包括多个第二节点,第二节点103和第二节点104均为属于第一通信组103的节点。可以理解的,第一通信组102中可以有一个第二节点,也可以有多个第二节点,此处仅以第一通信组102中含有两个第二节点为例进行说明,并不限定本申请。可选的,第一节点101也可以称为主节点或者接入点(access point,AP),相应的,第一通信组102中的第二节点103、或者第二节点104可以称为从节点。
第一节点101可以与第一通信组102中的节点之间可以进行组播通信,也可以与第一通信组内的第二节点103(或者第二节点104)之间进行单播通信。可选的,通信的数据链路可以包括各种类型的连接介质,例如可以为远距离连接技术包括全球移动通信系统(Global System for Mobile communications,GSM)、通用分组无线业务(General Packet Radio Service,GPRS)、通用移动通信系统(Universal Mobile Telecommunications System,UMTS)等无线接入类型技术。再如还可以为近距离连接技术包括802.11b/g、蓝牙(Blue Tooth)、紫蜂(Zigbee)、无线射频识别技术(Radio Frequency Identification,RFID)和超宽带(Ultra Wideband,UWB)技术、车载无线短距传输技术等。当然,不排除还有其他技术可以用于支撑第一节点101与第二节点进行通信。
第一节点101可以与第一通信组102中的多个第二节点进行组播通信,而通信的消息 需要进行加密,确保只有组内的成员才能解读被加密的报文,非组成员无法获得报文内容,保护组播通信的安全性。对于组内的第二节点103,第一节点101需要将组密钥发送给第二节点103,便于第二节点103使用组密钥解密组播消息。
第一节点101可以将包含组密钥的信令消息,通过信令面的加密密钥(例如第一节点101与第二节点103之间的单播密钥PTK)加密后发送给第二节点103。
需要说明的是,为了方便描述,此处以第二节点103进行示例进行说明,对于组内的第二节点104,第一节点101也需要将组密钥发送给第二节点104,便于第二节点104使用组密钥解密组播消息。
例如,请参见图2,图2是本申请实施例提供的一种通信方法的使用场景示意图。车辆的座舱域控制器(cockpit domain controller,CDC)201是智能座舱设备中的控制中心,可以看作为第一节点101。摄像头202与摄像头203是车辆摄像设备,为了便于控制,将摄像头202与摄像头203配置为一个通信组。CDC201可以通过无线保真(Wireless Fidelity,Wi-Fi)技术与摄像头202和摄像头203进行组播通信。在组播通信之前,CDC201可以将包含组密钥的信令消息,通过CDC201与摄像头203的信令面的加密密钥加密后发送给摄像头203。相应的,CDC201可以将包含组密钥的信令消息,通过CDC201与摄像头203的信令面的加密密钥加密后发送给摄像头202。
但是,上述方法依赖信令面消息的加密来对组密钥进行保护,对于信令面消息不开启加密的情况,组密钥无法得到保护,容易导致组密钥泄露。
例如,参见图2,攻击设备204可以监听组播通信,若信令面消息不开启加密,则攻击者通过监听携带组密钥的信令消息获取组密钥,进而窃取或者监听组播通信的内容,甚至可以向CDC201发起攻击,危及车辆安全。
请参见图3,图3是本申请实施例提供的一种通信方法的流程示意图,该方法可以基于图1所示的架构来实现,该方法包括但不限于如下步骤:
步骤S301:第二节点向第一节点发送关联请求消息。
具体地,第二节点可以通过无线链路(例如Wi-Fi、蓝牙、Zigbee或者其他短距无线链路等中的一个,例如车载短距无线通信链路)或者有线链路(例如光纤)向第一节点发送第一关联请求消息。相应的,第一节点接收来自第二节点的第一关联请求消息。
可选的,关联请求消息中可以包括第二节点的设备标识。节点的设备标识可以为身份标识(identification,ID)、媒体存取控制(media access control,MAC)地址、域名、域地址或其他自定义的标识。
在该方法中,第一节点可以发送接入消息或者广播消息,第二节点接收来自第一节点的接入消息或者广播消息。基于接入消息或者广播消息,第二节点向第一节点发送第一关联请求消息。具体的,第一节点的接入消息或者广播消息中可以包含第一节点的身份标识、该第一节点的描述信息或者用于指示其它节点接入的信息等等中的至少一项。
可选的,第一关联请求消息中还可以包括第二节点支持的安全算法的信息(或者说第二节点的安全能力(Sec Capabilities)),该安全算法的信息可以是安全算法的名称、标识或者预先定义的符号等等。该第二节点支持的安全算法的信息可以用于第一节点确定第一节 点与第二节点之间的安全算法(或者说单播安全算法)、第一通信组的组安全算法等等中的一项或者多项。
进一步可选的,第二节点接收来自第一节点的关联请求消息后,可以向第二节点发送安全上下文请求消息,该安全上下文请求消息包括第一节点确定的单播安全算法的信息和第一身份认证信息,该第一身份认证信息用于第二节点认证第一节点的身份。进一步的,第二节点可以向第一节点反馈安全上下文响应消息,该安全上下文响应消息中包括第二身份认证信息,该第二身份认证信息用于第一节点验证第二节点的身份。
步骤S302:第一节点确定第一通信组的组密钥。
具体地,第一通信组为第二节点所属的通信组。可选的,第一节点可以预先获取第二节点的设备标识,从而可以根据第二节点的设备标识确定第二节点所属的通信组。即,所述第二节点的设备标识与通信组之间存在对应关系。例如,该对应关系可以参见表1,表1为本申请实施例提供的一种可能的通信组信息表,第一节点中可以预先配置或者预先定义有该通信组信息表所展示的对应关系,具体的配置和定义方式不限定以表的方式进行,以能体现所述对应关系为准。该通信组信息表中包括通信组的ID、通信组包含的节点。可选的,还可以包括该通信组的组密钥、或者组算法等等信息。第一节点可以根据第二节点的设备标识,确定其所在的第一通信组的组密钥,例如,若第二节点的设备标识为“E0”,则第一节点确定ID为“GID1”的通信组的组密钥。
表1通信组信息表
通信组ID 包含的节点 组密钥 组算法
GID1 E0、E1、E2 GK1 -
GID2 E3、E4 GK2 完保算法:ZUC
GID3 E5、E6、E7 GK3 完保算法:AES-CCM
GID4 E6、E7、E8 - -
可选的,第一节点至少可以通过以下方法确定或者获得第一通信组的组密钥:
方法一:第一节点根据第一通信组的ID确定第一通信组的组密钥,其中第一通信组的ID与第一通信组的组密钥之间存在对应关系。具体的,第一节点中预先定义或者预先配置有通信组的ID与组密钥的对应关系,因此第一节点可以根据第一通信组的ID确定第一通信组的组密钥。例如,参见表1,第一节点根据通信组的ID“GID1”,可以确定通信组的组密钥为“GK1”。
方法二:第一节点获取一个随机数NONCEa,将NONCEa作为第一通信组的组密钥。
方法三:第一节点根据第一新鲜性参数和第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。其中,第一新鲜性参数是第一节点获取(或者说生成)的新鲜性参数,第一新鲜性参数的数量可以是一个,也可以是多个。可选的,第二KDF可以为第一节点中优先级最高的KDF算法。第一节点根据第一新鲜性参数和第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥,具体可以有如下实现方式:
实现方式一:第一节点根据第一新鲜性参数和第一通信组的ID,通过第二KDF生成第一通信组的组密钥。例如,以第一新鲜性参数为一个新鲜性参数NONCEg、第一通信组的ID为GID为例,生成的第一通信组的组密钥满足如下公式:GK=第二KDF(NONCEg, GID)。
实现方式二:第一节点根据第一新鲜性参数,通过第二KDF生成第一通信组的组密钥。例如,以第一新鲜性参数为新鲜性参数NONCEg1和新鲜性参数NONCEg2、第一通信组的ID为GID为例,生成的第一通信组的组密钥满足如下公式:GK=KDF(NONCEg1,NONCEg2)。
实现方式三:第一节点根据第一通信组的组ID,通过第二KDF生成第一通信组的组密钥。例如,生成的第一通信组的组密钥满足如下公式:GK=KDF(GID)。
可选的,参与生成的GK的参数还可以包括其他信息,例如生成的密钥的长度、使用的哈希算法的标识等等中的一个或者多个。
可选的,第一节点可以生成组密钥GK的标识GK ID。进一步的,第一节点还可以将GK ID与第一通信组的ID建立对应关系,便于下一次确定组密钥时可以通过第一通信组的ID确定对应的GK ID,从而获取GK ID所指示的组密钥GK。
需要说明的是,在确定第一通信组的组密钥之前,第一节点可以先确定第一通信组是否有对应的组密钥。若存在对应的组密钥,则通过上述方法一所描述的方法确定第一通信组的组密钥;若不存在对应的组密钥,则通过上述方法二或者方法三所描述的方法确定第一通信组的组密钥。例如,新创建了一个通信组时,由于新创建的通信组还没有对应的组密钥,此时可以通过上述方法二或者方法三所描述的方法确定第一通信组的组密钥。
步骤S303:第一节点基于第一节点与第二节点之间的共享密钥对第一通信组的组密钥进行加密,得到第一保护密钥。
具体地,共享密钥是第一节点与第二节点之间共享的一个秘密值。例如,第一节点和第二节点可以通过交换公钥生成密钥S,第一节点生成的密钥S与第二节点生成的密钥S的值是相同的,因此密钥S可以作为第一节点与第二节点之间的共享密钥。
可选的,第一节点基于第一节点与第二节点之间的共享密钥对第一通信组的组密钥进行加密,至少可以包括以下几种实施方案:
实施方案一:第一节点使用共享密钥对组密钥进行加密,得到第一保护密钥。例如,参见图4,图4是本申请实施例提供的一种可能的对组密钥进行加密的示意图,第一节点使用共享密钥402,对第一通信组的组密钥401进行加密,得到第一保护密钥403。
可选的,该共享密钥可以是第一节点与第二节点之间的单播密钥。例如,第一节点使用单播的加密密钥,基于单播的加密算法对第一通信组的组密钥进行加密。
实施方案二:第一节点可以使用共享密钥和第二新鲜性参数对组密钥进行加密,得到第一保护密钥。其中,第二新鲜性参数是第一节点获取(或者生成)的NONCE、计数器值、帧号等等中的一个或者多个,例如,可以是第一节点生成的随机数NONCEk,或者还可以是第一节点与第二节点之间交换的公钥等。由于新鲜性参数的值是不同的,使得每一次加密相同的第一通信组的组密钥得到的第一保护密钥也是不同的,从而提高了组密钥的私密性。其中,所述计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
实现方案三:第一节点根据共享密钥生成第一中间密钥,使用第一中间密钥对组密钥进行加密,得到第一保护密钥。例如,参见图5,图5是本申请实施例提供的一种可能的 对组密钥进行加密的示意图,第一节点根据共享密钥504生成第一中间密钥503,使用第一中间密钥503对组密钥501进行加密,得到第一保护密钥502。
实施方案四:第一节点根据共享密钥和第二新鲜性参数生成第一中间密钥,使用第一中间密钥对组密钥进行加密,得到第一保护密钥。
例如,第一节点根据共享密钥Kdh和第一计数器的值counter1,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(kdh,counter1)。其中,第一计数器可以用于表征第一节点根据共享密钥Kdh生成第一中间密钥Kg的次数,这里需要说明的是,由于生成的第一中间密钥Kg用于对第一通信组的组密钥进行加密,因此生成中间密钥的次数也可以表征对组密钥加密的次数。例如,以计数器值从1开始为例,第一次根据共享密钥Kdh和第一计数器的值counter1生成第一中间密钥时,counter值为1,相应的,当第二次根据共享密钥Kdh和第一计数器的值counter1生成第一中间密钥Kg时,counter1为2。进一步可选的,当第一计数器的值大于或者等于预先定义或者预先配置的某一阈值时,第一节点可以更新共享密钥Kdh,更新Kdh后第一计数器可以重新开始计数。
在一种可能的设计中,若生成的第一中间密钥未能成功加密第一通信组的组密钥,或者第一通信组的组密钥未能成功发送时,再次参与生成第一中间密钥的第一计数器的值可以就为上一次的计数器的值。
再如,第一节点根据会话密钥Kenc和随机数NONCEk,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk),然后通过该Kg对第一通信组的组密钥进行加密,得到第一保护密钥。再如,第一节点根据共享密钥Kgt(该共享密钥Kgt具体可以为根据共享密钥Kdh推演出来的)和随机数NONCK(或者计数器值counter),通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk(或者counter)),然后通过该Kg对第一通信组的组密钥进行加密,得到第一保护密钥。
其中,第一节点使用第一中间密钥对第一通信组的组密钥进行加密,具体可以为:第一节点将第一通信组的组密钥与第一中间密钥进行异或处理,得到第一保护密钥。例如:第一节点加密得到的第一保护密钥GKc,可以满足如下公式:
Figure PCTCN2020112249-appb-000001
其中GK为第一通信组的组密钥,
Figure PCTCN2020112249-appb-000002
为异或处理,Kg为第一中间密钥。由于进行两次异或处理后可以得到原本的值,因此第一节点将第一中间密钥与第一通信组的组密钥进行异或,第二节点接收第一保护密钥后,可以生成相同的第一中间密钥,将第一中间密钥和第一保护密钥进行异或处理则可以得到第一通信组的密钥。可以理解为,“异或”可以为一种具体的加密处理方式。
可选的,第一节点可以确认第一节点与第二节点之间的信令面消息不开启加密,在信令面消息不开启加密的情况下,对第一通信组的组密钥进行加密得到第一保护密钥。若第一节点与第二节点之前的信令面消息开启加密,则第一节点向第二节点发送第二关联建立消息,其中,第二关联建立消息中包括第一通信组的组密钥,由于第二关联建立消息属于第一节点与第二节点之间的信令面消息,因此可以通过信令面消息加密对组密钥进行保护。
步骤S304:第一节点向第二节点发送第一关联建立消息。
可以理解的,第一节点向第二节点发送第一关联建立消息,相应的,第二节点接收来自第一节点的第一关联建立消息,该关联建立消息中包括第一保护密钥。例如,参见图4, 第一节点向第二节点发送第一关联建立消息404,第二节点接收来自第一节点的关联建立消息404。再如,参见图5,第一节点向第二节点发送第一关联建立消息505,第二节点接收来自第一节点的关联建立消息505。
可选的,第一关联建立消息中还可以包括第二新鲜性参数,该第二新鲜性参数可以用于第二节点对第一保护密钥进行解密。
进一步可选的,在第二新鲜性参数为计数器的值的情况下,第二节点中也可以获取有与第一节点中的计数器的值相对应的计数器值,因此第一关联建立消息中可以不包括该第二新鲜性参数。例如,第一节点的第一计数器的值作为第二新鲜性参数,该第一计数器的值表征对组密钥加密的次数。第二节点中也获取有第二计数器的值,该第二计数器的值用于表征对组密钥进行解密的次数,该第一计数器的值与第一计数器的值对应,因此第一关联建立消息中可以不包括该第二新鲜性参数。
可选的,第一关联建立消息中还包括消息认证码,该消息认证码用于第二节点认证第一关联建立消息的完整性。
进一步可选的,第一节点可以通过加密密钥对第一关联建立消息进行加密,相应的,第二节点可以使用相应的解密密钥解密第一关联建立消息,从而可以获取第一关联建立消息中的内容。
步骤S305:第二节点基于第一节点与第二节点之间的共享密钥以及第一保护密钥,得到第一通信组的组密钥。可选的,第二节点可以基于第一节点与第二节点之间的共享密钥解密第一保护密钥,进而得到第一通信组的组密钥。
具体地,共享密钥是第一节点与第二节点之间共享的一个秘密值,因此第二节点可以使用该共享密钥解密第一保护密钥,得到第一通信组的组密钥。
可选的,对应于第一节点对组密钥的加密方式,第一节点基于第一节点与第二节点之间的共享密钥对第一保护密钥进行解密,至少可以包括以下几种实施方案:
实施方案一:第二节点使用共享密钥对第一保护密钥进行解密,得到第一通信组的组密钥。例如,参见图4,第一节点使用共享密钥402,对第一保护密钥403进行解密,得到第一通信组的组密钥401。
实施方案二:第二节点可以使用共享密钥和第二新鲜性参数对第一保护密钥进行解密,得到第一通信组的组密钥。
实施方案三:第二节点根据共享密钥生成第一中间密钥,使用第一中间密钥对第一保护密钥进行解密,得到第一通信组的组密钥。例如,参见图5,第一节点根据共享密钥504生成第一中间密钥503,使用第一中间密钥503对第一保护密钥502进行解密,得到第一通信组的组密钥501。
实现方案四:第二节点根据共享密钥和第二新鲜性参数生成第一中间密钥,使用第一中间密钥对第一保护密钥进行解密,得到第一通信组的组密钥。例如,第二节点根据共享密钥Kdh和第一计数器的值counter1,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(kdh,counter1)。其中,第一计数器可以用于表征第一节点根据共享密钥Kdh生成第一中间密钥Kg的次数。再如,第二节点根据会话密钥Kenc和第二新鲜性参数NONCEk,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk)。再如,第一 节点根据共享密钥Kgt和随机数NONCK(或者计数器值counter),通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk(或者counter))。
可选的,第二节点使用第一中间密钥对第一保护密钥进行解密,具体可以为,第二节点将第一保护密钥与第一中间密钥进行异或处理,得到第一通信组的组密钥。例如:第二节点解密第一保护密钥GKc得到第一通信组的组密钥GK,可以满足如下公式:
Figure PCTCN2020112249-appb-000003
可选的,第二节点还可以向第一节点发送关联完成消息,该关联完成消息用于指示第一节点关联建立成功。可选的,第二节点可以通过加密密钥对关联完成消息进行加密,相应的,第一节点可以使用相应的解密密钥解密关联完成消息,从而可以获取关联完成消息中的数据内容。可选的,该关联完成消息中包括消息认证码,该消息认证码用于第一节点验证关联完成消息的完整性。
可选的,第一关联建立消息中还包含指示第一通信组的组安全算法的信息。具体的,第一节点可以确定第一通信组的组安全算法,该组安全算法属于组内节点支持的算法,也可以称为组算法,可以包括组加密算法、组完保算法(或者说组完整性保护算法)、或者组KDF算法等中的一个或者多个。
需要说明的是,上述实现中的“解密”可以是一个独立的步骤,也可以是一种功能的说明。即,可以通过对信息进行解密得到另外一个信息,也可以以解密的方式通过信息得到另外一个信息。
进一步的可选的,第一节点确定第一通信组的组安全算法至少有以下几种情况:
情况一:第一节点中预先配置或定义了第一通信组对应的组安全算法,因此第一节点可以根据第一通信组的标识(例如第一通信组的编号)确定对应的组安全算法。例如,以组完保算法为例,参见图6,图6是本申请实施例提供的一种确定组安全算法的方法示意图,可以看出,根据通信组的ID可以确定通信组的ID对应的组算法。例如,参见区域601中的信息可知,组标号(group identify,GID)为GID2的通信组对应的组完保算法为祖冲之密码算法(ZUC)。可选的,组安全算法为第一通信组中的节点支持的算法中优先级最高的算法。
情况二:第一节点可以根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。参见图6,以第一算法选择策略为基于优先级的算法选择策略为例,参见区域602中的信息可知,节点E0是ID为GID1的通信组中的一个节点,该通信组GID1中包括节点E0、节点E1、节点E2。第一节点可以获取组内的节点的安全能力(Sec Capabilities)的信息,参见区域603中的信息可知,节点E0支持的完保算法为AES-CCM、ZUC和AES-GCM,节点E1支持的完保算法为AES-CCM和AES-GCM,节点E2支持的安全算法为AES-CCM和AES-GCM,组内节点都支持的AES-CCM和AES-GCM,参见区域604可知,AES-CCM的优先级为1,参见区域605可知,AES-GCM的优先级为3,因此可以将AES-CCM确定为组完保算法。
可选的,基于顺序的算法选择策略,可以根据预先定义或者预先配置的顺序确定顺序较前的安全算法。进一步可选的,若通信组中的节点支持的两个算法的优先级相同,可以选择顺序靠前的安全算法。
进一步可选的,第一通信组的组安全算法包括第三KDF算法。第一节点可以根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。其中,会话密钥的类型可以包括信令面加密密钥、信令面完保密钥、用户面加密密钥、用户面完保密钥等中的一个或者多个。例如,以信令面加密密钥为例,根据第一通信组的组密钥GK和信令面加密密钥的密钥类型“enc”,通过第三KDF生成信令面的加密密钥Kenc,如:Kenc=第三KDF(GK,“enc”)。再如,第三KDF中具体可以包括多种哈希算法,可以通过算法标识指示使用何种哈希算法,因此,生成的加密密钥Kenc还可以满足如下公式:Kenc=第三KDF(GK,密钥类型,算法标识)。进一步的,会话密钥的类型可以对应所述会话密钥应用的场景,本申请仅以以上四种类型为例,具体实现中还可以包括其他的会话密钥类型。
在图3所示的实施例中,第一节点在接收来自第二节点的关联请求后,可以确定第二节点所在的第一通信组的组密钥,然后使用第一节点与第二节点的共享密钥对组密钥进行加密得到第一保护密钥,将第一保护密钥携带在关联建立消息中发送给第二节点。可以看出,由于关联建立消息中携带的保护密钥是通过共享密钥对组密钥进行加密得到的,因此无论第一关联建立消息是否被加密,都可以保护组密钥的私密性。这样一来,第一节点与第一通信组进行组播通信时,可以使用该组密钥对组播消息进行加密,从而对组播消息进行保护,避免非组成员获得通信内容,提高了组播通信的安全性。
进一步的,第一节点可以在关联建立消息中将组密钥通过保护密钥发送给第二节点,将组密钥的分发流程融合在第一节点与第二节点建立关联的流程中,因此不需要额外的密钥分发的流程,节省了网络资源的开销,提高了组播通信的效率。
参见图7,图7是本申请实施例提供的又一种通信方法,该通信方法可以基于图1所示的架构来实现,该方法至少包括以下步骤:
步骤S701:第一节点确定满足更新所述第一通信组的组密钥的条件。
具体的,第一通信组的组密钥更新的条件包括以下条件中的至少一个:
条件1:当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,当前通信帧的帧号与标记帧号在同一轮计数周期;标记帧号为需要进行密钥更新的帧号或者标记帧号为第一次应用第一通信组的组密钥进行加密的通信帧的帧号。
其中,通信帧的帧号包括记录值和通信帧的序号,该帧号可以用于在通信帧的传递过程中对通信帧进行加密,可选的,该通信帧可以为MAC数据帧,该序号可以为MAC序列号(MAC serial number,MAC SN)。参见图8,图8是本申请实施例提供的一种可能的通信场景示意图,第一节点可以向通信组内的多个节点发送组播消息,组播消息以通信帧的形式进行发送。为了方便描述,图8中仅以向第二节点发送组播消息为例,其中,组播消息可以通过组密钥和帧号进行加密,例如,第一节点发送的通信帧803可以使用帧号801和组密钥802进行加密。其中,帧号801为32比特位的数字,帧号801包含高22位的记录值和低10位的序列号,该低10位的序列值与当前通信帧803的序号对应。由于帧号的位数是有限的,因此帧号在达到最大值时会产生反转,例如,在图8所示的通信过程中,帧号801的值为0x00000000,当通信帧不断发送,帧号也不断累加,当帧号值达到最大值 后(如帧号804的值为0xFFFFFFFF),帧号反转(rollover),重新从0开始计数,例如帧号804的值为0x00000000。但是,当帧号重新达到帧号0x00000001时,若组密钥802还未更新,则使得对两个不同的通信帧(通信帧803和通信帧806)进行加密时,使用的密钥和帧号都是相同的,容易导致密钥被破解,威胁通信的安全性。因此,需要在帧号到达上一次使用组密钥802进行加密的帧号之前,更新组密钥,避免影响组密钥的私密性。需要说明的是,此处仅以帧号为32比特进行示例,具体实现过程中按照需求预先配置帧号的大小,本申请对此不做限定。
具体的,第一节点可以记录标记帧号,例如,标记帧号可以为需要进行密钥更新的帧号或者标记帧号还可以为第一次应用第一通信组的组密钥进行加密的通信帧的帧号。第一节点可以在帧号累加到上一次使用组密钥进行加密的帧号之前更新组密钥,例如,提前10帧更新组密钥。进一步的,第一节点还可以指示应用新密钥的时间,例如可以指示提前5帧应用新的组密钥。
具体的,若当前通信帧的帧号与标记帧号在同一轮计数周期,则当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值时,需要更新第一通信组的组密钥。例如,以标记帧号为第一次应用第一通信组的组密钥进行加密的通信帧的帧号为例,参见图9,图9是本申请实施例提供的一种更新组密钥的场景示意图,其中,通信帧901是第一次使用组密钥902进行加密的通信帧,该通信帧的帧号为0x00000001,第一节点可以标记该帧号(即标记帧号为0x00000001),若第一节点需要提前10帧更新组密钥,则预设第一阈值为0xFFFF FFF5。也即是说,若当前通信帧的帧号到达0xFFFF FFF6时,当前通信帧的帧号与标记帧号的差值达到0xFFFF FFF5,因此第一节点可以在帧号到达0xFFFF FFF6时,更新第一通信组的组密钥。进一步可选的,更新组密钥时可以指示应用新的组密钥的时间,例如,可以在标记帧号的提前5帧应用新的组密钥,则第一节点可以在帧号到达0xFFFF FFFB时,通过新的组密钥904和帧号0xFFFF FFFB对通信帧905进行加密。这样一来,当通信帧的帧号反转,然后到达标记帧号0x00000001时,对通信帧905进行加密的密钥已经为新的组密钥904,从而不会影响通信的安全性。
需要说明的是,本申请中涉及的多个阈值,可以是协议中规定的,或者在节点中预先定义或预先配置的,又或者可以是节点根据安全性需求来确定的。例如,第一阈值可以是根据协议规定得到的,或者在第一节点中预设的,又或者可以是第一节点根据安全性需求来确定的。
条件2:标记帧号与当前通信帧的帧号的差值小于或者等于第二阈值;其中,当前通信帧的帧号在标记帧号的下一轮计数周期;标记帧号为需要进行密钥更新的帧号或者标记帧号为第一次应用第一通信组的组密钥进行加密的通信帧的帧号。
可以理解的,若当前通信帧的帧号在标记帧号的下一轮计数周期,当标记帧号与当前通信帧的帧号小于或者等于第二阈值前,第一节点需要更新组密钥。例如,以标记帧号为第一次应用第一通信组的组密钥进行加密的通信帧的帧号为例,参见图10,图10是本申请实施例提供的又一种更新组密钥的场景示意图,其中,通信帧1001是第一次使用组密钥1002进行加密的通信帧,该通信帧的帧号为0x5555 6666,第一节点可以标记该帧号(即标记帧号为0x5555 6666),若第一节点需要提前10帧更新组密钥,则第二阈值为10。也 即是说,若当前通信帧的帧号反转归0后,到达0x5555 665A时,标记帧号与当前通信帧的帧号的差值为10,因此当在帧号到达0x5555 665A时,第一节点开始更新第一通信组的组密钥。进一步可选的,更新组密钥时可以确定新的组密钥的启动时间,例如,可以在标记帧号的提前5帧应用新密钥,则第一节点可以在帧号到达0x5555 6661时,启动新的组密钥1005和帧号0x5555 6661对通信帧1004进行加密。这样一来,当通信帧的帧号到达标记帧号0x5555 6666时,对通信帧1006进行加密的密钥已经为新的组密钥1005,从而不会影响通信的安全性。
条件3:第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长到达第三阈值。
可选的,第一通信组的组密钥可以存在有效期,当第一通信组的组密钥的有效期到达时,需要更新第一通信组的组密钥。例如,第一通信组的组密钥的有效期可以为具体的时间,或者该有效期也可以为通信帧的帧号,又或者该有效期为计数器值等等。例如,第一通信组的组密钥的有效期可以为2020年07月06日的08时08分08秒,可以指示第一通信组的组密钥的有效期有效的日期时间到2020年07月06日的08时08分08秒或者无效的日期时间从2020年07月06日的08时08分08秒后开始,因此,若当前时间为该有效期,则第一节点可以更新组密钥。可选的,第一节点可以在有效期到达之前提前更新第一通信组的组密钥,例如,当距离有效期对应的时间还剩10分钟时更新第一通信组的组密钥。
可选的,第一通信组的组密钥可以存在使用时长,当第一通信组的组密钥的使用时长达到(大于或者大于等于)第三阈值时,需要更新第一通信组的组密钥。进一步可选的,该第三阈值可以是协议中规定的,或者在第一节点中预先定义或预先配置的,又或者该阈值可以是第一节点根据安全性需求来确定的。例如,协议中规定该第三阈值为24小时,当第一通信组的组密钥达到24小时时,则需要更新第一通信组的组密钥。再如,第一节点中预先定义有第三阈值为1000个通信帧(具体可以包括1000个管理帧和1000个数据帧),当使用该第一通信组的组密钥加密了1000个管理帧或者加密了1000个数据帧时,需要更新第一通信组的组密钥。
条件4:第一通信组中的至少一个第二节点离开第一通信组。
可以理解的,若通信组中存在有一个第二节点离开(leave)第一通信组,则第一节点需要更新组密钥,使得第一节点与第一通信组中的第二节点的通信具有私密性。例如,第一通信组GID1中包括3个第二节点,分别为第二节点E0-第二节点E2,其中,第二节点E2由于功能老化,因此向第一节点发送用于指示申请退出(exit)第一通信组的请求消息,则第一节点确认第二节点E2退出第一通信组后(例如第一节点在如表1所示的通信组信息表中,在通信组GID1所包含的节点中删除第二节点E2后),第一节点可以更新第一通信组的组密钥。再如,第一节点接收到上层管理节点发送的配置消息,该配置消息指示第一节点将第二节点E1移除(remove)第一通信组,则第一节点确认第二节点E1被移除第一通信组后(例如第一节点在如表1所示的通信组信息表中,在通信组GID1所包含的节点中删除第二节点E1后),第一节点可以更新第一通信组的组密钥。
进一步的,第一节点还可以配置为,当存在一个第二节点加入第一通信组时或者存在一个第二节点离开第一通信组时,更新组密钥。例如,第一通信组GID2中包括2个第二 节点,分别为第二节点E3和第二节点E4,而管理人员在第一通信组中增加第二节点E9(例如在如表1所示的通信组信息表中,在通信组GID2所包含的节点中添加第二节点E9后),第一节点可以更新主密钥。再如,第一节点接收到配置消息,该配置消息指示第一节点将第二节点E10加入第一通信组GID2,则第一节点确认第二节点E9加入第一通信组GID2后(例如在如表1所示的通信组信息表中,在通信组GID2所包含的节点中添加第二节点E10后),第一节点可以更新第一通信组的组密钥。
步骤S702:第一节点根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥。
具体的,第一节点根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥,至少包括以下两种方法:
方法一:第一节点获取一个第三新鲜性参数,将该第三新鲜性参数作为第一密钥。
方法二:第一节点根据第三新鲜性参数和第一通信组的ID中的至少一项,通过第二KDF生成第一密钥。其中,第三新鲜性参数是第一节点获取(或者说生成)的新鲜性参数,第三新鲜性参数的数量可以是一个,也可以是多个。可选的,第二KDF可以为第一节点中优先级最高的KDF算法。第一节点生成第一密钥,具体可以有如下实现方式:
实现方式一:第一节点根据第三新鲜性参数和第一通信组的ID,通过第二KDF生成第一密钥。例如,以第三新鲜性参数为一个新鲜性参数NONCEg3、第一通信组的ID为GID为例,生成的第一密钥NGK满足如下公式:NGK=KDF(NONCEg3,GID)。
实现方式二:第一节点根据第三新鲜性参数,通过第二KDF生成第一密钥。例如,以第三新鲜性参数为新鲜性参数NONCEg3和新鲜性参数NONCEg4为例,生成的第一密钥NGK满足如下公式:NGK=KDF(NONCEg3,NONCEg4)。
可选的,该第一密钥用于替换第一通信组的组密钥,作为第一通信组的新的组密钥。
步骤S703:第一节点基于第一节点与第二节点之间的共享密钥对第一密钥进行加密,得到第二保护密钥。
具体地,第一节点基于第一节点与第二节点之间的共享密钥对第一密钥进行加密,至少可以包括以下几种实施方案:
实施方案一:第一节点使用共享密钥对第一密钥进行加密,得到第二保护密钥。
实施方案二:第一节点可以使用共享密钥和第四新鲜性参数对第一密钥进行加密,得到第二保护密钥。其中,第四新鲜性参数是第一节点获取(或者生成)的随机数值、计数器值、帧号等等中的一个或者多个。
实现方案三:第一节点根据共享密钥生成第二中间密钥,使用第二中间密钥对第一密钥进行加密,得到第二保护密钥。
实施方案四:第一节点根据共享密钥和第四新鲜性参数生成第二中间密钥,使用第二中间密钥对第一密钥进行加密,得到第二保护密钥。例如,第一节点根据共享密钥Kdh和第一计数器的值counter1,通过KDF生成第二中间密钥Kg2,如:Kg2=KDF(kdh,counter1)。其中,第一计数器可以用于表征第一节点根据共享密钥Kdh生成第二中间密钥Kg的次数。再如,第一节点根据会话密钥Kenc和第四新鲜性参数NONCEk2,通过KDF生成第二中间密钥Kg2,如:Kg2=KDF(Kenc,NONCEk2)。
可选的,第一节点使用第二中间密钥对第一密钥进行加密,具体可以为,第一节点将第一密钥与第一中间密钥进行异或处理,得到第一保护密钥。例如:第一节点加密得到的第二保护密钥GKc2,可以满足如下公式:
Figure PCTCN2020112249-appb-000004
其中NGK为第一密钥,
Figure PCTCN2020112249-appb-000005
为异或处理,Kg2为第二中间密钥。由于进行两次异或处理后可以得到原本的值,因此第一节点将第二中间密钥与第一密钥进行异或,第二节点接收第二保护密钥后,可以生成相同的第二中间密钥,将第二中间密钥和第二保护密钥进行异或处理则可以得到第一密钥。
可选的,第一节点可以确认第一节点与第二节点之间的信令面消息不开启加密,在信令面消息不开启加密的情况下,对第一密钥进行加密得到第二保护密钥。可选的,若第一节点与第二节点之前的信令面消息开启加密,则密钥更新消息中包括第一密钥,由于密钥更新消息属于第一节点与第二节点之间的信令面消息,因此可以通过信令面消息加密对第一密钥进行保护。
步骤S704:第一节点向第二节点发送密钥更新消息。
具体地,密钥更新消息包含上述第二保护密钥。可以理解的,第一节点向第二节点发送密钥更新消息,相应的,第二节点接收来自第一节点的密钥更新消息。
可选的,密钥更新请求消息中还包括第四新鲜性参数,该第四新鲜性参数用于第二节点解密第二保护密钥得到第一密钥。
可选的,密钥更新请求中还用于指示第一密钥的启动时间和/或第一密钥的有效期。其中,第一密钥的启动时间用于指示应用所述第一密钥的时间,第一密钥的有效期用于指示第一密钥使用的期限。进一步的,当密钥更新请求中包括第一密钥的启动时间和第一密钥的有效期的情况下,第一密钥应用于从第一密钥的启动时间开始的第一密钥的有效期内。
可选的,该密钥更新消息可以是第一节点向第一通信组中的第二节点发送的组播消息,还可以是第一节点与第二节点之间的单播消息。可选的,在密钥更新消息为组播消息的情况下,第一节点对第一密钥进行加密时使用的共享密钥为第一通信组的组密钥(或者根据组密钥派生得到的第一通信组的会话密钥)。进一步的可选的,在密钥更新消息为单播消息的情况下,第一节点还可以向第一通信组的其他第二节点发送该密钥更新消息。
可选的,第一节点可以通过加密密钥对密钥更新消息进行加密,相应的,第二节点可以使用相应的解密密钥来解密密钥更新消息,从而可以获取密钥更新消息中的数据内容。可选的,该密钥更新消息中包括消息认证码,该消息认证码用于第二节点验证密钥更新消息的完整性。
步骤S705:第二节点基于第一节点与第二节点之间的共享密钥以及第二保护密钥,得到第一密钥。可选的,第二节点可以基于第一节点与第二节点之间的共享密钥解密第二保护密钥,进而得到第一通信组的组密钥。
具体地,对应于第一节点对第一密钥的加密方式,第一节点基于第一节点与第二节点之间的共享密钥对第二保护密钥进行解密,至少可以包括以下几种实施方案:
实施方案一:第二节点使用共享密钥对第二保护密钥进行解密,得到第一密钥。
实施方案二:第二节点可以使用共享密钥和第四新鲜性参数对第一保护密钥进行解密,得到第一密钥。
实施方案三:第二节点根据共享密钥生成第二中间密钥,使用第二中间密钥对第二保 护密钥进行解密,得到第一密钥。
实现方案四:第二节点根据共享密钥和第四新鲜性参数生成第二中间密钥,使用第二中间密钥对第二保护密钥进行解密,得到第一密钥。
可选的,第二节点使用第二中间密钥对第二保护密钥进行解密,具体可以为,第二节点将第二保护密钥与第二中间密钥进行异或处理,得到第一密钥。例如:第二节点根据第二中间密钥Kg2解密第二保护密钥GKc2得到第一密钥NGK,可以满足如下公式:
Figure PCTCN2020112249-appb-000006
需要说明的是,上述实现中的“解密”可以是一个独立的步骤,也可以是一种功能的说明。即,可以通过对信息进行解密得到另外一个信息,也可以以解密的方式通过信息得到另外一个信息。
可选的,图7所示的实施例还包括步骤S706-步骤S709中的部分或者全部步骤,步骤S706-步骤S709如下:
步骤S706:第二节点向第一节点发送更新确认消息。
可以理解的,第二节点向第一节点发送更新确认消息,相应的,第一节点接收到来自第一节点的更新确认消息。
可选的,第一通信组中包括一个或者多个第二节点,第一节点可以向一个或者多个第二节点发送密钥更新消息,相应的,第一节点可以接收该一个或者多个第二节点的更新确认消息。
可选的,第二节点可以通过加密密钥对更新确认消息进行加密,相应的,第一节点可以使用相应的解密密钥来解密更新确认消息,从而可以获取更新确认消息中的数据内容。可选的,该更新确认消息中包括消息认证码,该消息认证码用于第一节点验证更新确认消息的完整性。
步骤S707:第一节点确定接收到第一通信组中至少一个第二节点的更新确认消息。
具体的,当确认接收到第一通信组中的至少一个第二节点的更新确认消息时,表明确认可以应用新的密钥。
可选的,第一节点在接收到第一通信组中的全部节点中的更新确认消息后,表明确认可以应用新的密钥。
进一步可选的,第一节点可以在预设长度的时间段内接收来自至少一个节点的更新确认消息,若预设时间段内接收到至少一个第二节点的更新确认消息,则表明确认可以应用新密钥。可选的,对于未收到其更新确认消息的节点,第一节点可以通过单播消息与其进行重新连接。例如,第一通信组中包括第二节点A和第二节点B,第一节点向第二节点A和第二节点B发送密钥更新消息,若第一节点接收到来自第二节点A的更新确认消息后,表明确认可以应用新密钥;对于第二节点B,第一节点可以与第二节点B进行重新连接,或者还可以向第二节点B发送经过加密处理的新密钥。
步骤S708:第一节点在第一密钥的启动时间应用第一密钥。
具体的,第一密钥的启动时间可以是预先定义或者预先配置的,也可以是第一节点在密钥更新消息指示的。例如,第一节点中预先定义有,在发送密钥更新消息后的第五个通信帧应用第一密钥,再如,第一节点在密钥更新消息中指示在帧号到达0xFFFF FFFF6时应 用新密钥。第一节点可以在第一密钥的启动时间,应用该第一密钥作为第一通信组的新的组密钥。
步骤S709:第二节点在第一密钥的启动时间应用第一密钥。
具体的,第一密钥的启动时间可以是预先定义或者预先配置的,也可以是第一节点在密钥更新消息指示的。例如,第二节点中预先定义有,在接收到密钥更新消息后的第五个通信帧后应用第一密钥,再如,第一节点在密钥更新消息中指示在帧号到达0xFFFF FFFF6时应用新密钥。第二节点可以在第一密钥的启动时间,应用该第一密钥作为第一通信组的新的组密钥。
在图7所示的实施例中,确定满足更新组密钥的条件后,可以确定第一密钥,将第一密钥使用共享密钥加密后,通过密钥更新消息发送给第二节点。可以看出,由于密钥更新消息中携带的保护密钥是通过共享密钥对第一密钥进行加密得到的,因此无论密钥更新消息是否被加密,都可以保护第一密钥的私密性。
可选的,图7所示的实施例中的方法可以为图3所示的实施例中的方法的后续步骤。可以理解的,第一节点使用图3所示的通信方法确定第一通信组的密钥的情况下,可以使用图7所示的通信方法更新第一通信组的组密钥。可以理解的,在这种情况下,图7所示的实施例中的确定第一密钥的方法和图3中确定第一通信组的密钥的方法保持一致,图7所示的实施例中的对第一密钥进行加密的方法和图3中对组密钥进行加密的方法保持一致。
以上图3所示的方法实施例中包含了很多可能的实现方案,下面分别结合图11、图12对其中的部分实现方案进行举例说明,需要说明的是,图11、图12未解释到的相关概念或者操作或者逻辑关系可以参照图3所示实施例中的相应描述,因此不再赘述。
请参见图11,图11是本申请实施例提供的一种通信方法的流程示意图,该方法可以基于图1所示的架构来实现,该方法包括但不限于如下步骤:
步骤S1101:第二节点向第一节点发送关联请求消息。
具体的,第一关联请求消息中可以包括第二节点的设备标识(具体可以为第二节点的ID)、第二节点支持的安全算法的信息(或者说第二节点的安全能力(Sec Capabilities))和第二节点获取的新鲜性参数NONCEe。
第二节点向第一节点发送第一关联请求消息,相应的,第一节点接收来自第二节点的第一关联请求消息。
具体描述还可以参见步骤S301中的内容。
步骤S1102:第一节点向第二节点发送安全上下文请求消息。
具体的,安全上下文请求消息中包括第一身份认证信息AUTHa。可选的,安全上下文请求消息中还可以包括第一节点中获取的新鲜性参数NONCEa、目标安全算法(第一节点与第二节点的单播安全算法)的信息algorithm1和消息认证码MAC1等中的一项或者多项。
其中,第一身份认证信息用于第二节点验证第一节点的身份,该第一身份认证信息为第一节点根据第一节点与第二节点之间的共享密钥生成的。例如,以共享密钥为第一节点与第二节点之间的预共享密钥(pre-shared key,PSK)为例,第一节点通过PSK生成的AUTHa满足如下公式:AUTHa=KDF(PSK)。进一步可选的,参与生成KDF的参数还可以包括 第二节点中获取的新鲜性参数NONCEe、第一节点中获取的新鲜性参数NONCEa、关联请求消息等等中的一项或者多项,例如:AUTHa=KDF(PSK,NONCEa,关联请求消息),此处不再一一例举。
安全上下文请求消息中的目标安全算法属于第二节点支持的安全算法的信息指示的安全算法的集合。可选的,该目标安全算法包括加密算法、完保算法、KDF中的一项或者多项,该目标安全算法用于指示第一节点与第二节点通信时所使用的安全算法。
安全上下文请求消息中的消息认证码MAC1用于保护安全上下文请求消息的完整性。可选的,该消息认证码MAC1可以为根据安全上下文请求消息中的部分或者全部数据,基于完保密钥和完保算法生成的。
可以理解的,第一节点向第二节点发送安全上下文请求消息,相应的,第二节点就接收来自第一节点的安全上下文请求消息。
步骤S1103:第二节点根据第一身份认证信息验证第一节点的身份。
具体的,第一身份认证信息为第一节点根据共享密钥生成的,因此第二节点可以使用该共享密钥验证第一身份认证信息,从而验证第一节点的身份。
在一种可能的实施方案中,根据协议规定,第一节点使用什么方法生成第一身份认证信息,第二节点也使用相同的方法生成检验值,若校验值与第一身份认证信息相同,则验证第一节点的身份通过。例如,第二节点根据第二节点中存储的PSK生成校验值check1,即check1=KDF(PSK),然后比较check1与第一身份认证信息AUTHa的值,若check1与AUTHa相同,则认证通过。
可选的,安全上下文请求消息中包括消息认证码MAC1的情况下,第二节点还可以根据消息认证码MAC1验证安全上下文请求消息的完整性。
可选的,若验证第一节点的身份信息不通过或验证安全上下文请求消息的完整性不通过,则说明第一节点的身份不可信、或者说明与第一节点的通信不安全,因此第二节点可以断开与第一节点的连接,或者还可以不再执行后续的通信步骤。
步骤S1104:第二节点向第一节点发送安全上下文响应消息。
具体的,安全上下文响应消息中包括第二身份认证信息AUTHe。可选的,安全上下文响应消息中还可以包括消息认证码MAC1等等。
其中,第二身份认证信息用于第一节点验证第二节点的身份,该第二身份认证信息为第二节点根据第一节点与第二节点之间的共享密钥生成的。例如,以共享密钥为PSK为例,第二节点通过PSK生成的AUTHe满足如下公式:AUTHe=KDF(PSK)。进一步可选的,参与生成KDF的参数还可以包括第二节点中获取的新鲜性参数NONCEe、第一节点中获取的新鲜性参数NONCEa、安全上下文请求消息等等中的一项或者多项,例如:AUTHa=KDF(PSK,NONCEe,安全上下文请求消息),此处不再一一例举。
安全上下文响应消息中的消息认证码MAC2用于保护安全上下文响应消息的完整性。可选的,该消息认证码MAC2可以为根据安全上下文响应消息中的部分或者全部数据,基于完保密钥和完保算法生成的。
可以理解的,第二节点向第一节点发送安全上下文响应消息,相应的,第一节点就接收来自第二节点的安全上下文响应消息。可选的,第二节点可以通过加密密钥对安全上下 文响应消息进行加密,相应的,第一节点可以使用相应的解密密钥来解密安全上下文响应消息,从而可以获取安全上下文响应消息中的数据内容。
步骤S1105:第一节点根据第二身份认证信息验证第二节点的身份。
具体的,第二身份认证信息为第二节点根据共享密钥生成的,因此第一节点也具有该共享密钥且可以使用该共享密钥验证第二身份认证信息,从而验证第二节点的身份。
在一种可能的实施方案中,根据协议规定,第二节点使用什么方法生成第二身份认证信息,第一节点也使用相同的方法生成检验值,若校验值与第二身份认证信息相同,则验证第二节点的身份通过。例如,第一节点根据第一节点中存储的PSK生成校验值check2,即check2=KDF(PSK),然后比较check2与第一身份认证信息AUTHe的值,若check2与AUTHe相同,则认证通过。
可选的,安全上下文响应消息中包括消息认证码MAC2的情况下,第一节点还可以根据消息认证码MAC2验证安全上下文响应消息的完整性。
可选的,若验证第二节点的身份信息不通过或验证安全上下文响应消息的完整性不通过,则说明第二节点的身份不可信、或者说明与第二节点的通信不安全,因此第一节点可以断开与第二节点的连接,或者还可以不再执行后续的通信步骤。
步骤S1106:第一节点确定第一通信组的组密钥。
具体地,第一节点至少可以通过以下方法确定第一通信组的组密钥:
方法一:第一节点根据第一通信组的ID确定第一通信组的组密钥,其中第一通信组的ID与第一通信组的组密钥之间存在对应关系。
方法二:第一节点获取一个随机数NONCEa,将NONCEa作为第一通信组的组密钥。
方法三:第一节点根据第一新鲜性参数和第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。例如,以第一新鲜性参数为一个新鲜性参数NONCEg、第一通信组的ID为GID为例,生成的第一通信组的组密钥满足如下公式:GK=KDF(NONCEg,GID)。再如,以第一新鲜性参数为新鲜性参数NONCEg1和新鲜性参数NONCEg2、第一通信组的ID为GID为例,生成的第一通信组的组密钥满足如下公式:GK=KDF(NONCEg1,NONCEg2)。再如,生成的第一通信组的组密钥满足如下公式:GK=KDF(GID)。可选的,参与生成的GK的参数还可以包括其他信息,例如生成的密钥的长度、使用的哈希算法的标识等等中的一个或者多个。
具体描述还可以参见步骤S302中的内容。
步骤S1107:第一节点基于第一节点与第二节点之间的共享密钥对第一通信组的组密钥进行加密,得到第一保护密钥。
具体的,至少可以包括以下几种实施方案:
实施方案一:第一节点使用共享密钥对组密钥进行加密,得到第一保护密钥。
实施方案二:第一节点可以使用共享密钥和第二新鲜性参数对组密钥进行加密,得到第一保护密钥。
实现方案三:第一节点根据共享密钥生成第一中间密钥,使用第一中间密钥对组密钥进行加密,得到第一保护密钥。
实施方案四:第一节点根据共享密钥和第二新鲜性参数生成第一中间密钥,使用第一 中间密钥对组密钥进行加密,得到第一保护密钥。
例如,第一节点根据共享密钥Kdh和第一计数器的值counter1,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(kdh,counter1),其中,第一计数器可以用于表征第一节点根据共享密钥Kdh生成第一中间密钥Kg的次数。再如,第一节点根据会话密钥Kenc和第二新鲜性参数NONCEk,通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk)。再如,第一节点根据共享密钥Kgt和随机数NONCK(或者计数器值counter),通过第一KDF生成第一中间密钥Kg,如:Kg=第一KDF(Kenc,NONCEk(或者counter))。
可选的,第一节点使用第一中间密钥对第一通信组的组密钥进行加密,具体可以为:第一节点将第一通信组的组密钥与第一中间密钥进行异或处理,得到第一保护密钥。例如:第一节点加密得到的第一保护密钥GKc,可以满足如下公式:
Figure PCTCN2020112249-appb-000007
其中GK为第一通信组的组密钥,
Figure PCTCN2020112249-appb-000008
为异或处理,Kg为第一中间密钥。
具体描述请参见步骤S303中的内容。
可选的,图11所示的通信方法还可以包括步骤S1108,该步骤S1108具体如下:
步骤S1108:第一节点确定组安全算法。
具体地,该组安全算法属于组内所有节点均支持的算法。可选的,第一节点确定第一通信组的组安全算法至少有以下几种情况:
情况一:第一节点中存在第一通信组对应的组安全算法,因此第一节点可以根据第一通信组的标识(例如第一通信组的编号)确定对应的组安全算法。例如,以组完保算法为例,参见图6,图6是本申请实施例提供的一种确定组安全算法的方法示意图,可以看出,根据通信组的ID可以确定通信组的ID对应的组算法。例如,参见区域601中的信息可知,组标号(group identify,GID)为GID2的通信组对应的组完保算法为祖冲之密码算法(ZUC)。
情况二:第一节点可以根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
以第一算法选择策略为基于优先级的算法选择策略为例,参见图6,例如,参见区域602中的信息可知,节点E0是ID为GID1的通信组中的一个节点,该通信组GID1中包括节点E0、节点E1、节点E2。第一节点可以获取组内的节点的安全能力(Sec Capabilities)的信息,参见区域603中的信息可知,节点E0支持的完保算法为AES-CCM、ZUC和AES-GCM,节点E1支持的完保算法为AES-CCM和AES-GCM,节点E2支持的安全算法为AES-CCM和AES-GCM,组内节点都支持的算法为AES-CCM和AES-GCM,参见区域604可知,AES-CCM的优先级为1,参见区域605可知,AES-GCM的优先级为3,因此可以将AES-CCM确定为组完保算法。
可选的,基于顺序的算法选择策略,可以根据预先定义或者预先配置的顺序确定顺序较前的安全算法。进一步的,若通信组中的节点支持的两个算法的优先级相同,可以选择顺序靠前的安全算法。
可选的,组安全算法包括第三KDF算法。第一节点可以根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。其中,会话密钥的类型可以包括信令面加密密钥、信令面完保密钥、用户面加密密钥、用户面完保密钥等中的一个或者多个。例如,以信令面加密密钥为例,根据第一通信组的组密钥GK和 信令面加密密钥的密钥类型“enc”,通过第三KDF生成信令面的加密密钥Kenc,如:Kenc=第三KDF(GK,“enc”)。进一步的,会话密钥的类型可以对应所述会话密钥应用的场景,本申请仅以上述四种类型为例,具体实现中还可以包括其他的会话密钥类型。
步骤S1109:第一节点向第二节点发送关联建立消息。
可选的,第一关联建立消息中包括第一保护密钥GKc和第一通信组的组安全算法Galgorithm。
可选的,第一关联建立消息中还可以包括第二新鲜性参数NONCEk、第一通信组的组密钥的有效期GK expiration、第一通信组的组密钥的启动时间timer、消息认证码MAC3等等中的一项或者多项。其中,该第二新鲜性参数可以用于第二节点对第一保护密钥进行解密。第一通信组的组密钥的有效期用于指示该第一通信组的组密钥的使用期限。第一通信组的组密钥的启动时间用于指示应用该第一通信组的组密钥的时机。
关联建立消息中的消息认证码MAC3用于第二节点验证关联建立消息的完整性。
可以理解的,第一节点向第二节点发送第一关联建立消息,相应的,第二节点接收来自第一节点的第一关联建立消息。可选的,第一节点可以通过加密密钥对第一关联建立消息进行加密,相应的,第二节点可以使用相应的解密密钥解密第一关联建立消息,从而可以获取第一关联建立消息中的数据内容。
步骤S1110:第二节点基于第一节点与第二节点之间的共享密钥解密第一保护密钥,得到第一通信组的组密钥。
具体描述请参见步骤S305中的内容。
可选的,图11所示的通信方法还可以包括步骤S1111,该步骤S1111具体如下:
步骤S1111:第二节点向第一节点发送关联完成消息。
具体的,该关联完成消息用于指示第一节点关联建立成功。可以理解的,第二节点向第一节点发送关联完成消息,相应的,第一节点可以接收来自第二节点的关联完成消息。可选的,第一节点可以通过加密密钥对第一关联建立消息进行加密,相应的,第二节点可以使用相应的解密密钥解密第一关联建立消息,从而可以获取第一关联建立消息中的数据内容。可选的,该关联完成消息中包括消息认证码MAC4,该消息认证码MAC4用于第一节点验证关联完成消息的完整性。
请参见图12,图12是本申请实施例提供的一种通信方法的流程示意图,该方法可以基于图1所示的架构来实现,该方法包括但不限于如下步骤:
步骤S1201:第二节点向第一节点发送关联请求消息。
具体描述请参见步骤S1101中的内容。
步骤S1202:第一节点向第二节点发送安全上下文请求消息。
具体描述请参见步骤S1102中的内容。
步骤S1203:第二节点根据第一身份认证信息验证第一节点的身份。
具体描述请参见步骤S1103中的内容。
步骤S1204:第二节点向第一节点发送安全上下文响应消息。
具体描述请参见步骤S1104中的内容。
步骤S1205:第一节点根据第二身份认证信息验证第二节点的身份。
具体描述请参见步骤S1105中的内容。
步骤S1206:第一节点确定第一通信组的组密钥。
具体描述请参见步骤S1106中的内容。
步骤S1207:第一节点确定第一节点与第二节点之间的信令面消息是否开启加密。
具体的,第一节点确定第一节点与第二节点之前的信令面消息不开启加密,则第一节点可以执行步骤S1208或者以及之后的步骤。
第一节点确定第一节点与第二节点之前的信令面消息开启加密,则第一节点可以执行步骤S1212或者以及之后的步骤。
步骤S1208:第一节点基于第一节点与第二节点之间的共享密钥对第一通信组的组密钥进行加密,得到第一保护密钥。
具体描述请参见步骤S1107中的内容。
步骤S1209:第一节点确定组安全算法。
具体描述请参见步骤S1108中的内容。
步骤S1210:第一节点向第二节点发送第一关联建立消息。
具体描述请参见步骤S1109中的内容。
步骤S1211:第二节点基于第一节点与第二节点之间的共享密钥解密第一保护密钥,得到第一通信组的组密钥。
具体描述请参见步骤S1110中的内容。
步骤S1212:第一节点向第二节点发送第二关联建立消息。
具体的,若第一节点与第二节点之前的信令面消息开启加密,则第一节点向第二节点发送第二关联建立消息,其中,第二关联建立消息中包括第一通信组的组密钥,由于第二关联建立消息属于第一节点与第二节点之间的信令面消息,因此可以通过信令面消息加密对组密钥进行保护。
步骤S1213:第二节点向第一节点发送关联完成消息。
具体的,该关联完成消息用于指示第一节点关联建立成功。可以理解的,第二节点向第一节点发送关联完成消息,相应的,第一节点可以接收来自第二节点的关联完成消息。可选的,第一节点可以通过加密密钥对第一关联建立消息进行加密,相应的,第二节点可以使用相应的解密密钥解密第一关联建立消息,从而可以获取第一关联建立消息中的数据内容。可选的,该关联完成消息中包括消息认证码,该消息认证用于第一节点验证关联完成消息的完整性。
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。
请参见图13,图13是本申请实施例提供的一种通信装置130的结构示意图,该装置130可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置130可以包括接收单元1301、处理单元1302和发送单元1303。其中,各个单元的描述如下:
接收单元1301,用于接收来自第二节点的关联请求消息;
处理单元1302,用于确定第一通信组的组密钥,其中,所述第一通信组为所述第二节 点所在的通信组;所述第一通信组的组密钥为根据第一新鲜性参数和所述第一通信组的标识ID中的至少一项确定的;
所述处理单元1302,用于基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥;
发送单元1303,用于向所述第二节点发送第一关联建立消息,其中,所述第一关联建立消息包括所述第一保护密钥。
在又一种可能的实施方法中,所述处理单元1302,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第二新鲜性参数对所述第一通信组的组密钥进行加密,得到所述第一保护密钥。
在又一种可能的实施方法中,所述处理单元1302,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;所述第一KDF属于所述第二节点支持的KDF;
将所述第一中间密钥和所述第一通信组的组密钥执行异或处理,得到所述第一保护密钥。
在又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在又一种可能的实施方法中,所述处理单元1302,具体用于:
根据所述第一通信组的ID确定所述第一通信组的组密钥,所述第一通信组的ID与所述第一通信组的组密钥之间存在对应关系;
或者,根据所述第一新鲜性参数和所述第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。
在又一种可能的实施方法中,所述处理单元1302,还用于:
确定组安全算法,所述组安全算法属于所述第一通信组中的节点支持的算法;其中,所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项;
所述第一关联建立消息中还包括用于指示所述组安全算法的信息。
在又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
在又一种可能的实施方法中,所述处理单元1302,具体用于根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在又一种可能的实施方法中,所述组安全算法包括第三KDF算法,所述处理单元,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、 信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在又一种可能的实施方法中,所述处理单元1302,还用于:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在又一种可能的实施方法中,所述第一节点与所述第二节点之间的信令面消息开启加密;所述发送单元1303,还用于:
向所述第二节点发送第二关联建立消息,其中,所述第二关联建立消息中包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息。
在又一种可能的实施方法中,所述处理单元1302,还用于确定满足更新所述第一通信组的组密钥的条件;
所述处理单元1302,还用于根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥;
所述处理单元1302,还用于基于所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥;
所述发送单元1303,还用于向所述第二节点发送密钥更新消息,所述密钥更新消息包括所述第二保护密钥。
在又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在又一种可能的实施方法中,所述处理单元1302,还用于:
确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息。
在所述第一密钥的启动时间应用所述第一密钥。
在又一种可能的实施方法中,所述处理单元1302,具体用于:
确定接收到来自属于所述第一通信组中的全部第二节点的更新确认消息。
在又一种可能的实施方法中,所述处理单元1302,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数对所述密钥进行加密,得到所述第二保护密钥。
在又一种可能的实施方法中,所述更新的条件包括:
当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,所述当前通信帧的帧号与所述标记帧号在同一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述标记帧号与所述当前通信帧的帧号的差值小于或者等于第二阈值;其中,所述当前通信帧的帧号在所述标记帧号的下一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长 到达第三阈值;
或者,所述第一通信组中的至少一个第二节点离开所述第一通信组。
需要说明的是,各个单元的实现还可以对应参照图3、图7、图11或图12所示的实施例的相应描述。该装置130可以为图3、图7、图11或图12所示的实施例中的第一节点。
可以理解的,本申请各个装置实施例中,对多个单元的划分仅是一种根据功能进行的逻辑划分,不作为对装置具体的结构的限定。在具体实现中,其中部分功能模块可能被细分为更多细小的功能模块,部分功能模块也可能组合成一个功能模块,但无论这些功能模块是进行了细分还是组合,装置在通信过程中所执行的大致流程是相同的。例如,上述装置130中的接收单元1301、发送单元1303也可以合并为通信单元。通常,每个单元都对应有各自的程序代码(或者说程序指令),这些单元各自对应的程序代码在处理器上运行时,使得该单元执行相应的流程从而实现相应功能。
请参见图14,图14是本申请实施例提供的一种通信装置140的结构示意图,该装置140可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置140可以包括发送单元1401、接收单元1402和处理单元1403。其中,各个单元的描述如下:
发送单元1401,用于向第一节点发送关联请求消息;
接收单元1402,用于接收来自所述第一节点的第一关联建立消息,所述第一关联建立消息包括第一保护密钥;
处理单元1403,用于基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥;其中,所述第一通信组为所述第二节点所在的通信组。
在又一种可能的实施方法中,所述第一节点和所述第二节点共享所述共享密钥。
在又一种可能的实施方法中,所述处理单元1403,具体用于:
基于所述第一节点与第二节点之间的共享密钥和第二新鲜性参数以及所述第一保护密钥,得到第一通信组的组密钥。
在又一种可能的实施方法中,所述处理单元1403,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
基于所述第一中间以及所述第一保护密钥,得到所述第一通信组的组密钥。
在又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在又一种可能的实施方法中,所述第一关联建立消息中还包括用于指示组安全算法的信息;所述组安全算法属于所述第一通信组中的节点支持的算法;所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项。
在又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法对应于算法选择策略,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在又一种可能的实施方法中,所述处理单元1403,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥解密所述第一保护密钥,得到第一通信组的组密钥之前,还包括:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在又一种可能的实施方法中,所述接收单元1402,还用于接收来自所述第一节点的第二关联建立消息;所述第二关联建立消息包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息;
所述处理单元1403,还用于通过所述第一节点与所述第二节点之间的信令面加密密钥解密所述第二关联建立消息,得到所述第一通信组的组密钥。
在又一种可能的实施方法中,所述接收单元1402还用于接收来自所述第一节点的密钥更新消息;其中,所述密钥更新消息包括第二保护密钥;
所述处理单元1403,还用于基于所述第一节点与所述第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥。
在又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在又一种可能的实施方法中,所述处理单元1403,还用于:
向所述第一节点发送更新确认消息;
在所述第一密钥的启动时间应用所述第一密钥。
在又一种可能的实施方法中,所述处理单元1403,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数以及所述第二保护密钥,得到所述第一密钥。
需要说明的是,各个单元的实现还可以对应参照图3、图7、图11或图12所示的实施例的相应描述。该装置140可以为图3、图7、图11或图12所示的实施例中的第二节点。
请参见图15,图15是本申请实施例提供的一种通信装置150的结构示意图,该通信装置150可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等。该装置150可以包括至少一个存储器1501和至少一个处理器1502。可选的,还可以包含总线1503。进一步可选的,还可以包括通信接口1504,其中,存储器1501、处理器1502和通信接口1504通过总线1503相连。
其中,存储器1501用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1501可以是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)等等中的一种或者多种的组合。
处理器1502是进行算术运算和/或逻辑运算的模块,具体可以是中央处理器(central processing unit,CPU)、图片处理器(graphics processing unit,GPU)、微处理器(microprocessor unit,MPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA)、复杂可编程逻辑器件(Complex programmable logic device,CPLD)等处理模块中的一种或者多种的组合。
通信接口1504用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙、通用无线传输等)接口。可选的,通信接口1504还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该装置150中的处理器1502用于读取所述存储器1501中存储的计算机程序,用于执行前述的通信方法,例如图3、图7、图11或图12所描述的通信方法。
举例来说,该装置150中的处理器1502用于读取所述存储器1501中存储的计算机程序,用于执行以下操作:
通过通信接口1504接收来自第二节点的关联请求消息;
确定第一通信组的组密钥,其中,所述第一通信组为所述第二节点所在的通信组;所述第一通信组的组密钥为根据第一新鲜性参数和所述第一通信组的标识ID中的至少一项确定的;
基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥;
通过通信接口1504向所述第二节点发送第一关联建立消息,其中,所述第一关联建立消息包括所述第一保护密钥。
在又一种可能的实施方法中,所述处理器1502,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第二新鲜性参数对所述第一通信组的组密钥进行加密,得到所述第一保护密钥。
在又一种可能的实施方法中,所述处理器1502,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;所述第一KDF属于所述第二节点支持的KDF;
将所述第一中间密钥和所述第一通信组的组密钥执行异或处理,得到所述第一保护密钥。
在又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数 器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在又一种可能的实施方法中,所述处理器1502,具体用于:
根据所述第一通信组的ID确定所述第一通信组的组密钥,所述第一通信组的ID与所述第一通信组的组密钥之间存在对应关系;
或者,根据所述第一新鲜性参数和所述第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。
在又一种可能的实施方法中,所述处理器1502,还用于:
确定组安全算法,所述组安全算法属于所述第一通信组中的节点支持的算法;其中,所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项;
所述第一关联建立消息中还包括用于指示所述组安全算法的信息。
在又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
在又一种可能的实施方法中,所述处理器1502,具体用于根据算法选择策略确定所述组安全算法,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在又一种可能的实施方法中,所述组安全算法包括第三KDF算法,所述处理单元,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在又一种可能的实施方法中,所述处理器1502,还用于:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在又一种可能的实施方法中,所述第一节点与所述第二节点之间的信令面消息开启加密;所述处理器1502,还用于:
通过通信接口1504向所述第二节点发送第二关联建立消息,其中,所述第二关联建立消息中包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息。
在又一种可能的实施方法中,所述处理器1502,还用于:
确定满足更新所述第一通信组的组密钥的条件;
根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥;
基于所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥;
通过通信接口1504向所述第二节点发送密钥更新消息,所述密钥更新消息包括所述第二保护密钥。
在又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间 和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在又一种可能的实施方法中,所述处理器1502,还用于:
确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息。
在所述第一密钥的启动时间应用所述第一密钥。
在又一种可能的实施方法中,所述处理器1502,具体用于:
确定接收到来自属于所述第一通信组中的全部第二节点的更新确认消息。
在又一种可能的实施方法中,所述处理器1502,具体用于:
基于第一节点与所述第二节点之间的共享密钥和第四新鲜性参数对所述第一密钥进行加密,得到所述第二保护密钥。
在又一种可能的实施方法中,所述更新的条件包括:
当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,所述当前通信帧的帧号与所述标记帧号在同一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述标记帧号与所述当前通信帧的帧号的差值小于或者等于第二阈值;其中,所述当前通信帧的帧号在所述标记帧号的下一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
或者,所述第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长到达第三阈值;
或者,所述第一通信组中的至少一个第二节点离开所述第一通信组。
需要说明的是,各个单元的实现还可以对应参照图3、图7、图11或图12所示的实施例的相应描述。该装置150可以为图3、图7、图11或图12所示的实施例中的第一节点。
请参见图16,图16是本申请实施例提供的一种通信装置160的结构示意图,该通信装置160可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等。该装置160可以包括至少一个存储器1601和至少一个处理器1602。可选的,还可以包含总线1603。进一步可选的,还可以包括通信接口1604,其中,存储器1601、处理器1602和通信接口1604通过总线1603相连。
其中,存储器1601用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1601可以是RAM、ROM、EPROM、CD-ROM等等中的一种或者多种的组合。
处理器1602是进行算术运算和/或逻辑运算的模块,具体可以是CPU、GPU、MPU、ASIC、FPGA、CPLD等处理模块中的一种或者多种的组合。
通信接口1604用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙等)接口。可选的,通信接口1604还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该装置160中的处理器1602用于读取所述存储器1601中存储的计算机程序,用于执 行前述的通信方法,例如图3、图7、图11或图12所描述的通信方法。
举例来说,该装置160中的处理器1602用于读取所述存储器1601中存储的计算机程序,用于执行以下操作:
通过通信接口1604向第一节点发送关联请求消息;
通过通信接口1604接收来自所述第一节点的第一关联建立消息,所述第一关联建立消息包括第一保护密钥;
基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥;其中,所述第一通信组为所述第二节点所在的通信组。
在又一种可能的实施方法中,所述第一节点和所述第二节点共享所述共享密钥。
在又一种可能的实施方法中,所述处理器1602,具体用于:
基于所述第一节点与第二节点之间的共享密钥和第二新鲜性参数以及所述第一保护密钥,得到第一通信组的组密钥。
在又一种可能的实施方法中,所述处理器1602,具体用于:
根据第一节点与所述第二节点之间的共享密钥和第二新鲜性参数,通过第一密钥派生算法KDF生成第一中间密钥;
基于所述第一中间以及所述第一保护密钥,得到所述第一通信组的组密钥。
在又一种可能的实施方法中,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
在又一种可能的实施方法中,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
在又一种可能的实施方法中,所述第一关联建立消息中还包括用于指示组安全算法的信息;所述组安全算法属于所述第一通信组中的节点支持的算法;所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项。
在又一种可能的实施方法中,所述组安全算法为第一通信组中的节点支持的算法中优先级最高的算法;
或者,所述确定组安全算法对应于算法选择策略,所述算法选择策略包括基于优先级的算法选择策略、基于顺序的算法选择策略中的至少一项。
在又一种可能的实施方法中,所述处理器1602,还用于:
根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
在又一种可能的实施方法中,所述密钥类型包括信令面加密密钥、用户面加密密钥、信令面完保密钥或者用户面完保密钥中的一个或者多个;或者,所述会话密钥的类型对应所述会话密钥应用的场景。
在又一种可能的实施方法中,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥之前,还包括:
确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
在又一种可能的实施方法中,所述处理器1602,还用于:
通过通信接口1604接收来自所述第一节点的第二关联建立消息;所述第二关联建立消息包括第一通信组的组密钥;所述第二关联建立消息属于所述第一节点与所述第二节点之间的信令面消息;
通过所述第一节点与所述第二节点之间的信令面加密密钥解密所述第二关联建立消息,得到所述第一通信组的组密钥。
在又一种可能的实施方法中,所述处理器1602,还用于:
通过通信接口1604接收来自所述第一节点的密钥更新消息;其中,所述密钥更新消息包括第二保护密钥;
基于所述第一节点与所述第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥。
在又一种可能的实施方法中,所述第一密钥用于替换所述第一通信组的组密钥。
在又一种可能的实施方法中,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
在又一种可能的实施方法中,所述处理器1602,还用于:
向所述第一节点发送更新确认消息;
在所述第一密钥的启动时间应用所述第一密钥。
在又一种可能的实施方法中,所述处理器1602,具体用于:
基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数以及所述第二保护密钥,得到所述第一密钥。
需要说明的是,各个单元的实现还可以对应参照图3、图7、图11或图12所示的实施例的相应描述。该装置160可以为图3、图7、图11或图12所示的实施例中的第二节点。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行图3、图7、图11或图12所示的任意一种实施例所述的方法。
本申请实施例还提供了一种芯片系统,所述芯片系统通信装置包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行图3、图7、图11或图12所示的任意一种实施例所述的方法。
本申请实施例还提供了一种终端,所述终端包括第一节点(例如,汽车座舱域控制器CDC)和/或第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),其中所述第一节点包含上述图13或者图15所示实施例所描述的装置,所述第二节点包含上述图13或者图15所示实施例所描述的装置。
进一步可选的,所述终端可以为车辆、无人机、机器人、智能家居场景中的设备、智能制造场景中的设备等。
本申请实施例还提供一种智能座舱产品,所述智能座舱产品包括第一节点(例如,汽车座舱域控制器CDC),所述第一节点为图3、图7、图11或图12所示的任意一种实施例 中的第一节点。进一步的,所述智能座舱产品还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入及启动系统控制器等模块中的至少一个),所述第二节点为图3、图7、图11或图12所示任意一种实施例中的第二节点。
本申请实施例还提供一种车辆,所述车辆包括第一节点(例如,汽车座舱域控制器CDC)。进一步的,所述车辆还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),其中上述第一节点为图3、图7、图11或图12所示的任意一种实施例中的第一节点,上述第二节点为图3、图7、图11或图12所示的任意一种实施例中的第二节点。可替换的,上述车辆还可以替换为无人机、机器人等智能终端或者运输工具。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在一个或多个处理器上运行时,可以执行如图3、图7、图11或图12所示的任意一种实施例所描述的通信方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机产品(例如计算机成程序或计算机指令)的形式实现。在计算机上加载和执行该计算机程序产品时,可以全部或部分地实现本申请实施例所描述的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其它可编程装置。该计算机程序产品可以存储在计算机可读存储介质中,或者通过计算机可读存储介质进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本申请方法实施例中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请装置实施例中的模块可以根据实际需要进行合并、划分和删减。

Claims (30)

  1. 一种通信方法,其特征在于,包括:
    接收来自第二节点的关联请求消息;
    确定第一通信组的组密钥,其中,所述第一通信组为所述第二节点所在的通信组;所述第一通信组的组密钥为根据第一新鲜性参数和所述第一通信组的标识ID中的至少一项得到的;
    基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥;
    向所述第二节点发送第一关联建立消息,其中,所述第一关联建立消息包括所述第一保护密钥。
  2. 根据权利要求1中所述的方法,其特征在于,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到第一保护密钥,包括:
    基于第一节点与所述第二节点之间的所述共享密钥和第二新鲜性参数对所述第一通信组的组密钥进行加密,得到所述第一保护密钥。
  3. 根据权利要求2所述的方法,其特征在于,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
  4. 根据权利要求2所述的方法,其特征在于,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述确定第一通信组的组密钥,包括:
    根据所述第一通信组的ID确定所述第一通信组的组密钥,所述第一通信组的ID与所述第一通信组的组密钥之间存在对应关系;
    或者,根据所述第一新鲜性参数和所述第一通信组的ID中的至少一项,通过第二KDF生成所述第一通信组的组密钥。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:
    确定组安全算法,所述组安全算法属于所述第一通信组中的节点支持的算法;其中,所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项;
    所述第一关联建立消息中还包括用于指示所述组安全算法的信息。
  7. 根据权利要求6中所述的方法,其特征在于,所述组安全算法包括第三KDF算法,所述方法还包括:
    根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述基于第一节点与所述第二节点之间的共享密钥对所述第一通信组的组密钥进行加密,得到保护密钥之前,所述方法还包括:
    确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述方法包括:
    确定满足更新所述第一通信组的组密钥的条件;
    根据第三新鲜性参数和第一通信组的标识ID中的至少一项确定第一密钥;
    基于所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥;
    向所述第二节点发送密钥更新消息,所述密钥更新消息包括所述第二保护密钥。
  10. 根据权利要求9所述的方法,其特征在于,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
  11. 根据权利要求10所述的方法,其特征在于,所述向所述第二节点发送密钥更新消息之后,还包括:
    确定接收到来自属于所述第一通信组中的至少一个第二节点的更新确认消息;
    在所述第一密钥的启动时间应用所述第一密钥。
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述通过所述第一节点与第二节点之间的共享密钥对所述第一密钥进行加密,得到第二保护密钥,包括:
    基于第一节点与所述第二节点之间的所述共享密钥和第四新鲜性参数对所述第一密钥进行加密,得到所述第二保护密钥。
  13. 根据权利要求9-12所述的方法,其特征在于,所述更新所述第一通信组的组密钥的条件包括:
    当前通信帧的帧号与标记帧号的差值大于或者等于第一阈值;其中,所述当前通信帧的帧号与所述标记帧号在同一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
    或者,所述标记帧号与所述当前通信帧的帧号的差值小于或者等于第二阈值;其中,所述当前通信帧的帧号在所述标记帧号的下一轮计数周期;所述标记帧号为需要进行密钥更新的帧号或者所述标记帧号为第一次应用所述第一通信组的组密钥进行加密的通信帧的帧号;
    或者,所述第一通信组的组密钥的有效期到达或者所述第一通信组的组密钥使用时长到达第三阈值;
    或者,所述第一通信组中的至少一个第二节点离开所述第一通信组。
  14. 一种通信方法,其特征在于,包括:
    向第一节点发送关联请求消息;
    接收来自所述第一节点的第一关联建立消息,所述第一关联建立消息包括第一保护密钥;
    基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥;其中,所述第一通信组为所述第二节点所在的通信组。
  15. 根据权利要求14中所述的方法,其特征在于,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥,包括:
    基于所述第一节点与第二节点之间的共享密钥和第二新鲜性参数以及所述第一保护密钥,得到第一通信组的组密钥。
  16. 根据权利要求15所述的方法,其特征在于,所述共享密钥为所述第一节点与所述第二节点之间的加密密钥,所述第二新鲜性参数为随机数;所述第一关联建立消息中包括所述第二新鲜性参数。
  17. 根据权利要求15所述的方法,其特征在于,所述第二新鲜性参数为第一计数器的值,所述第一计数器用于表征基于所述共享密钥对所述第一通信组的组密钥进行加密的次数。
  18. 根据权利要求14-17任一项所述的方法,其特征在于,所述第一关联建立消息中还包括用于指示组安全算法的信息;所述组安全算法属于所述第一通信组中的节点支持的算法;所述组安全算法包括组加密算法、组完整性保护算法和组KDF算法中的至少一项。
  19. 根据权利要求18中所述的方法,其特征在于,所述组安全算法包括第三KDF算法,所述方法还包括:
    根据所述第一通信组的组密钥和会话密钥的类型,通过所述第三KDF算法生成所述第一通信组的会话密钥。
  20. 根据权利要求14-19任一项所述的方法,其特征在于,所述基于所述第一节点与第二节点之间的共享密钥以及所述第一保护密钥,得到第一通信组的组密钥之前,还包括:
    确认所述第一节点与所述第二节点之间的信令面消息不开启加密。
  21. 根据权利要求14-20任一项所述的方法,其特征在于,所述方法还包括:
    接收来自所述第一节点的密钥更新消息;其中,所述密钥更新消息包括第二保护密钥;
    基于所述第一节点与所述第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥。
  22. 根据权利要求21所述的方法,其特征在于,所述密钥更新消息还用于指示所述第一密钥的启动时间和所述第一密钥的有效期;所述第一密钥应用于从所述第一密钥的启动时间开始的所述第一密钥的有效期内。
  23. 根据权利要求22所述的方法,其特征在于,所述基于所述第一节点与第二节点之间的共享密钥以及所述第二保护密钥,得到第一密钥之后,所述方法还包括:
    向所述第一节点发送更新确认消息;
    在所述第一密钥的启动时间应用所述第一密钥。
  24. 一种通信装置,其特征在于,所述通信装置包括用于执行权利要求1-13中任一项所述的方法的单元。
  25. 一种通信装置,其特征在于,所述通信装置包括用于执行权利要求14-23中任一项所述的方法的单元。
  26. 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述芯片系统所在的装置实现如权利要求1-13中任一项所述的方法。
  27. 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述芯片系统所在的装置实现如权利要求14-23中任一项所述的方法。
  28. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行如权利要求1-13中任一项所述的方法。
  29. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行如权利要求14-23中任一项所述的方法。
  30. 一种通信系统,其特征在于,包括:
    第一节点,所述第一节点包含如权利要求24所述的通信装置;
    第二节点,所述第二节点包含如权利要求25所述的通信装置。
PCT/CN2020/112249 2020-08-28 2020-08-28 一种通信方法及相关装置 WO2022041141A1 (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
EP20950811.8A EP4195580A4 (en) 2020-08-28 2020-08-28 COMMUNICATION METHOD AND ASSOCIATED DEVICE
KR1020237009722A KR20230051592A (ko) 2020-08-28 2020-08-28 통신 방법 및 관련 장치
CN202080103262.4A CN115885496B (zh) 2020-08-28 2020-08-28 一种通信方法及相关装置
CN202311484258.9A CN117749355A (zh) 2020-08-28 2020-08-28 一种通信方法及相关装置
JP2023514142A JP2023541563A (ja) 2020-08-28 2020-08-28 通信方法および関係する装置
PCT/CN2020/112249 WO2022041141A1 (zh) 2020-08-28 2020-08-28 一种通信方法及相关装置
US18/176,289 US20230208625A1 (en) 2020-08-28 2023-02-28 Communication method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/112249 WO2022041141A1 (zh) 2020-08-28 2020-08-28 一种通信方法及相关装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/176,289 Continuation US20230208625A1 (en) 2020-08-28 2023-02-28 Communication method and related apparatus

Publications (1)

Publication Number Publication Date
WO2022041141A1 true WO2022041141A1 (zh) 2022-03-03

Family

ID=80352448

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/112249 WO2022041141A1 (zh) 2020-08-28 2020-08-28 一种通信方法及相关装置

Country Status (6)

Country Link
US (1) US20230208625A1 (zh)
EP (1) EP4195580A4 (zh)
JP (1) JP2023541563A (zh)
KR (1) KR20230051592A (zh)
CN (2) CN117749355A (zh)
WO (1) WO2022041141A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230065987A1 (en) * 2021-09-02 2023-03-02 Rivian Ip Holdings, Llc Ephemeral key exchange between vehicle software nodes

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1668005A (zh) * 2005-02-21 2005-09-14 西安西电捷通无线网络通信有限公司 一种适合有线和无线网络的接入认证方法
CN101884194A (zh) * 2007-12-05 2010-11-10 佳能株式会社 通信装置及其控制方法
CN101884193A (zh) * 2007-12-05 2010-11-10 佳能株式会社 通信装置、其控制方法和存储介质
CN102761830A (zh) * 2011-04-27 2012-10-31 华为终端有限公司 多播密钥更新、发送方法、接入点设备、终端设备和系统
US20170180120A1 (en) * 2015-03-16 2017-06-22 Kabushiki Kaisha Toshiba Management apparatus, computer program product, system, device, and method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461253B2 (en) * 2005-11-22 2008-12-02 Motorola, Inc. Method and apparatus for providing a key for secure communications
CN101242323B (zh) * 2007-02-06 2010-12-08 华为技术有限公司 设备间管道的建立方法和家庭网络系统
WO2015058378A1 (zh) * 2013-10-23 2015-04-30 华为技术有限公司 用户设备之间进行安全通信的方法及装置
CN106027233A (zh) * 2016-04-28 2016-10-12 江苏大学 一种车载网群组协商通信协议设计方法
KR20190056661A (ko) * 2017-11-17 2019-05-27 (주)이씨스 차량 네트워크에서 기지국 기반 보안 통신 방법
US10939288B2 (en) * 2018-01-14 2021-03-02 Qualcomm Incorporated Cellular unicast link establishment for vehicle-to-vehicle (V2V) communication
DE102018214354A1 (de) * 2018-08-24 2020-02-27 Robert Bosch Gmbh Erstes fahrzeugseitiges Endgerät, Verfahren zum Betreiben des ersten Endgeräts, zweites fahrzeugseitiges Endgerät und Verfahren zum Betreiben des zweiten fahrzeugseitigen Endgeräts
CN109005539B (zh) * 2018-09-06 2021-12-14 东北大学 基于加密Mix-Zone的VANETs中车辆节点位置隐私保护方法
CN110933672B (zh) * 2019-11-29 2021-11-30 华为技术有限公司 一种密钥协商方法及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1668005A (zh) * 2005-02-21 2005-09-14 西安西电捷通无线网络通信有限公司 一种适合有线和无线网络的接入认证方法
CN101884194A (zh) * 2007-12-05 2010-11-10 佳能株式会社 通信装置及其控制方法
CN101884193A (zh) * 2007-12-05 2010-11-10 佳能株式会社 通信装置、其控制方法和存储介质
CN102761830A (zh) * 2011-04-27 2012-10-31 华为终端有限公司 多播密钥更新、发送方法、接入点设备、终端设备和系统
US20170180120A1 (en) * 2015-03-16 2017-06-22 Kabushiki Kaisha Toshiba Management apparatus, computer program product, system, device, and method

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP4195580A4 (en) 2023-09-27
JP2023541563A (ja) 2023-10-03
CN115885496A (zh) 2023-03-31
US20230208625A1 (en) 2023-06-29
CN117749355A (zh) 2024-03-22
KR20230051592A (ko) 2023-04-18
EP4195580A1 (en) 2023-06-14
CN115885496B (zh) 2023-10-20

Similar Documents

Publication Publication Date Title
US10869192B2 (en) System and method of counter management and security key update for device-to-device group communication
CN112740733B (zh) 一种安全接入方法及装置
US8094822B2 (en) Broadcast encryption key distribution system
JP5607749B2 (ja) ユーザ端末間の安全な接続の構築方法及びシステム
WO2022111187A1 (zh) 终端认证方法、装置、计算机设备及存储介质
US20200228977A1 (en) Parameter Protection Method And Device, And System
WO2020052414A1 (zh) 一种数据保护方法、设备及系统
US20230327857A1 (en) Communication Method and Apparatus
US20220417015A1 (en) Key update method and related apparatus
EP2515468B1 (en) Method and system for establishing security connection between switch equipments
US20230208625A1 (en) Communication method and related apparatus
WO2022021256A1 (zh) 一种关联控制方法及相关装置
US20240023175A1 (en) Pairing method and apparatus
CN116530117A (zh) 一种WiFi安全认证方法及通信装置
WO2020140929A1 (zh) 一种密钥生成方法、ue及网络设备
US20230171602A1 (en) Communication Method and Apparatus
US20230099065A1 (en) Key obtaining method and related apparatus
WO2023230929A1 (zh) 通信方法及相关装置

Legal Events

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

Ref document number: 20950811

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202080103262.4

Country of ref document: CN

ENP Entry into the national phase

Ref document number: 2023514142

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 202337014419

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 2020950811

Country of ref document: EP

Effective date: 20230307

ENP Entry into the national phase

Ref document number: 20237009722

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE