WO2022021256A1 - 一种关联控制方法及相关装置 - Google Patents

一种关联控制方法及相关装置 Download PDF

Info

Publication number
WO2022021256A1
WO2022021256A1 PCT/CN2020/106006 CN2020106006W WO2022021256A1 WO 2022021256 A1 WO2022021256 A1 WO 2022021256A1 CN 2020106006 W CN2020106006 W CN 2020106006W WO 2022021256 A1 WO2022021256 A1 WO 2022021256A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
identity
authentication
association
blacklist
Prior art date
Application number
PCT/CN2020/106006
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 JP2023505821A priority Critical patent/JP2023535474A/ja
Priority to CN202080104749.4A priority patent/CN116235467A/zh
Priority to EP20946596.2A priority patent/EP4184854A4/en
Priority to KR1020237005663A priority patent/KR20230038571A/ko
Priority to PCT/CN2020/106006 priority patent/WO2022021256A1/zh
Publication of WO2022021256A1 publication Critical patent/WO2022021256A1/zh
Priority to US18/160,118 priority patent/US20230239693A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • H04L9/0841Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols
    • H04L9/0844Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these involving Diffie-Hellman or related key agreement protocols with user authentication or key authentication, e.g. ElGamal, MTI, MQV-Menezes-Qu-Vanstone protocol or Diffie-Hellman protocols using implicitly-certified keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • H04W12/082Access security using revocation of authorisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/66Trust-dependent, e.g. using trust scores or trust relationships
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/71Hardware identity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the present invention relates to the technical field of communication, and in particular, to the technical field of short-range communication, such as cockpit domain communication. Specifically, it relates to an association control method and related device for communication security management.
  • the attackers will deliberately attack the defects of the network protocol implementation or use brutal means to consume them.
  • the resources of the attacked object (such as the control center in the vehicle) are exhausted, so that the attacked object cannot provide normal services, stop responding or even crash.
  • the authentication flood (Auth Flood) attack is one of the DOS attacks.
  • the attacker will send a large number of request frames to the associated node. As a result, the node is paralyzed and cannot continue to provide normal services, thereby affecting the communication between other nodes and the node. Therefore, in order to ensure the security of communication, the association control of nodes is very important.
  • a whitelist or blacklist technology can be used to limit the nodes that request association. Specifically, if the identifier of node A is in the whitelist of node B, node B will receive the association request from node A. , and then make an association. Correspondingly, if the identifier of the node C is in the blacklist of the node B, the node B may not receive the association request from the node C, or refuse to perform the association. Specifically, for example, in the process of Bluetooth communication, by establishing a whitelist, the Bluetooth device can be associated with a specific Bluetooth device (ie, a Bluetooth device listed in the whitelist).
  • whitelists or blacklists are usually filtered by identifiers (such as device addresses), and attackers can modify their own identifiers to trusted identifiers, so that nodes cannot identify illegal attackers, resulting in the possibility that nodes may establish a relationship with attackers. association, which threatens the data security of the node.
  • identifiers such as device addresses
  • attackers can modify their own identifiers to trusted identifiers, so that nodes cannot identify illegal attackers, resulting in the possibility that nodes may establish a relationship with attackers. association, which threatens the data security of the node.
  • the embodiments of the present application disclose an association control method and a related device, which can prevent a node from establishing an association with an illegal attacker and protect the data security of the node.
  • an association control method which includes:
  • the shared key of the second node is generated; wherein, the shared key can be regarded as the first secret value shared between the first node and the second node;
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the identity of the second node needs to be verified according to the shared key between the first node and the second node.
  • the attacker modifies the identity identifier and bypasses the step of "determining the identity is credible", since it is difficult to forge the identity verification information, it is still unable to pass the identity verification of the first node, thereby avoiding the node and the illegal
  • the attacker establishes an association, which improves the data security of the node.
  • the number of verification failures will be updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined as credible. .
  • their association requests can no longer be processed (such as sending an authentication request), thereby preventing the nodes from crashing due to processing a large number of requests, and ensuring that the services provided by the nodes are performed normally.
  • the determining that the identity of the second node is credible includes:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the node associated with the request can be controlled according to the blacklist or whitelist, so that the untrusted second node does not need to be authenticated. On the one hand, it can prevent the crash due to processing a large number of requests and ensure the normal operation of the service. . On the other hand, since it will not be associated with a node that has not been authenticated, the association of the node with an illegal attacker is avoided, and the data security of the node is improved.
  • the determining that the identity of the second node is credible includes:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication response further includes second integrity verification data, and the second integrity verification data is used to verify the first authentication response.
  • message integrity the method further includes:
  • the method before the receiving the first association request from the second node, the method further includes:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first association threshold can limit the capacity of the service that the node can provide.
  • the node can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the node, ensuring the node Stable operation of the provided services.
  • the method further includes:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response may be sent to the second node, where the association response is used to instruct the first node to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • the method further includes:
  • the first authentication failure counter is reset.
  • the method further includes:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the node from establishing association with an illegal attacker and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • the method further includes:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times it is, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the first blacklist exceeds a certain threshold, it can be permanently added to the first blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here. In yet another possible implementation manner of the first aspect, if the identity of the second node is not trusted, the step of sending the first authentication request to the second node is not performed.
  • the embodiments of the present application also provide an association method, including:
  • the first identity authentication information is verified according to the shared key between the second node and the first node; wherein the shared key is a secret value shared between the first node and the second node;
  • a first authentication response is sent to the first node, and the first authentication response includes the second identity authentication information; wherein the second identity authentication information is generated according to the shared key.
  • the first association request is sent to the first node.
  • the identity authentication information of the first node is verified by the shared key, and after the verification is passed, the second identity authentication information is sent to the first node.
  • the second identity authentication information Can be used by the first node to verify the identity of the second node.
  • the determining that the identity of the first node is credible includes:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated node can be controlled according to the blacklist or whitelist, and the node can be controlled not to send an association request to the untrusted first node, thereby avoiding the establishment of association between the node and an illegal attacker, and improving the data security of the node. sex.
  • the determining that the identity of the first node is credible includes:
  • the type of the shared key of the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication request further includes first integrity verification data, and the first integrity verification data is used to verify the message integrity;
  • the method also includes:
  • the determining that the identity of the first node is credible, before sending the first association request to the first node further includes:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • the association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the node can associate with. When the second association threshold is exceeded, the node can no longer associate with other nodes, so as to avoid affecting the communication of other nodes associated with the node and ensure the service provided by the node. Stable operation.
  • the method further includes:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the second node receives the first association response from the first node, and the association response is used to indicate the first node.
  • a node is associated with the second node.
  • the first response message can inform the second node that the association has been successful, and subsequent communication can be performed.
  • the method further includes:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • the method further includes:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the verification of the identity authentication information of the first node fails, the number of times of failure to verify the identity of the first node is updated, and the number of times of the verification failure can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the node from establishing an association with an illegal attacker, and improving the data security of the node.
  • the method further includes:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the node from establishing association with an illegal attacker and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • the method further includes:
  • a second association request is sent to the first node.
  • the authentication of the authentication information may also fail. Therefore, if the number of verification failures for the first node has not exceeded the preset second threshold, an association request can be re-sent to the first node to request association with this node, thereby improving the robustness of the system and ensuring the node Stable operation of the provided services.
  • the method further includes:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the method further includes:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times the identifier of the 1st node is added to the second blacklist and the type of the first node is related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request is no longer sent to the first node to avoid wasting the resources of the node.
  • an association control device including:
  • a communication unit for receiving the first association request from the second node
  • a processing unit configured to determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication unit, where the first authentication request includes first identity authentication information, and the first authentication request is An identity authentication information is generated according to the shared key of the first node and the second node;
  • the communication unit is further configured to receive a first authentication response from the second node, where the first authentication response includes second identity authentication information;
  • the processing unit is further configured to verify the second identity authentication information according to the shared key
  • the processing unit is further configured to update a first authentication failure counter if the verification of the second identity authentication information fails, where the first authentication failure counter represents the number of times of verification failures for the second node.
  • the above-mentioned device verifies the identity of the second node according to the shared key with the second node. In this way, even if the attacker modifies the identity identification and bypasses the above-mentioned step of determining the identity of the device, because it is difficult to forge the identity verification information, the identity verification of the above-mentioned device is still impossible, thereby avoiding the above-mentioned device and illegal The attacker establishes an association, which improves the data security of the node.
  • the above-mentioned device will update the number of verification failures, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined as a credible.
  • the above-mentioned apparatus can no longer process its association request (eg, send an authentication request), thereby preventing the above-mentioned apparatus from crashing due to processing a large number of requests, and ensuring normal service.
  • the processing unit is specifically configured to:
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above device controls the nodes associated with the request according to the blacklist or whitelist, so that the untrusted second node does not need to be authenticated.
  • the association between the above device and an illegal attacker is avoided, and the data security of the above device is improved.
  • processing unit 702 is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication response further includes second integrity verification data, and the second integrity verification data is used to verify the first authentication response. message integrity;
  • the processing unit is specifically used for:
  • processing unit is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • a first association threshold is preset in the above device, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the service capacity that the above-mentioned device can provide.
  • the above-mentioned device can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the above-mentioned device, ensuring that Stable operation of the services provided by the above devices.
  • the communication unit is further configured to:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • processing unit is further configured to:
  • the first authentication failure counter is reset.
  • processing unit is further configured to:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • processing unit is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times it is, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the first blacklist exceeds a certain threshold, it can be permanently added to the first blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here. This application does not specifically limit the number of device types, which can be designed according to specific scenarios.
  • the step of sending the first authentication request to the second node is not performed.
  • an association device including:
  • a processing unit which determines that the identity of the first node is credible, and sends a first association request to the first node through the communication unit;
  • the communication unit is further configured to receive a first authentication request from the first node, where the first authentication request includes first identity authentication information;
  • the processing unit is further configured to verify the first identity authentication information according to the shared key between the second node and the first node;
  • the communication unit is further configured to send a first authentication response to the first node if the verification of the first identity authentication information is passed, where the first authentication response includes the second identity authentication information; wherein, The second identity authentication information is generated according to the shared key.
  • the above-mentioned device after confirming that the identity of the first node is credible, sends the first association request to the first node. Then, according to the first identity authentication information in the first authentication request, the identity authentication information of the first node is verified by the shared key, and after the verification is passed, the second identity authentication information is sent to the first node.
  • the second identity authentication information It can be used for the first node to verify the identity of the above-mentioned device.
  • the processing unit is specifically configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to a blacklist or a whitelist, and the above device can be controlled not to send an association request to an untrusted first node, thereby preventing the above device from establishing an association with an illegal attacker, and improving the performance of the above device. data security.
  • processing unit is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication request further includes first integrity verification data, and the first integrity verification data is used to verify the authenticity of the first authentication request. message integrity;
  • the processing unit is also used for:
  • processing unit is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the above device, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the device can be associated with.
  • the device can no longer be associated with other nodes, so as to avoid affecting the communication of other nodes associated with the device, ensuring that the device provided by the device provides stable operation of the service.
  • the communication unit is further configured to:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the above-mentioned device can receive the first association response from the first node, and the association response is used to indicate the above-mentioned
  • the apparatus establishes an association with the second node. Further, the first response message can inform that the above-mentioned apparatus has been successfully associated, and subsequent communication can be performed.
  • processing unit is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • processing unit is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above-mentioned apparatus from establishing an association with an illegal attacker, and improving the data security of the above-mentioned apparatus.
  • processing unit is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • the processing unit is further configured to determine that the value of the second authentication failure counter is less than a second threshold
  • the communication unit is further configured to send a second association request to the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the processor is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the processor is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times the identifier of the 1 is added to the second blacklist and the type of the first node is related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • an embodiment of the present application further provides a communication device, the device includes at least one processor and a communication interface, and the at least one processor is configured to invoke at least one computer program stored in a memory, so that the device implements The method described in the first aspect or any possible implementation manner of the first aspect.
  • the at least one processor is configured to invoke a computer program stored in at least one memory to perform the following operations:
  • the second node Determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication interface, where the first authentication request includes first identity authentication information, and the first identity authentication information is based on the first authentication request.
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the above-mentioned device verifies the identity of the second node according to the shared key with the second node. In this way, even if the attacker modifies the identity identification and bypasses the above-mentioned step of determining the identity of the device, because it is difficult to forge the identity verification information, the identity verification of the above-mentioned device is still impossible, thereby avoiding the above-mentioned device and illegal The attacker establishes an association, which improves the data security of the above-mentioned device.
  • the above-mentioned device will update the number of verification failures, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined as a believable.
  • the above-mentioned apparatus can no longer process its association request (eg, send an authentication request), thereby preventing the above-mentioned apparatus from crashing due to processing a large number of requests, and ensuring normal service.
  • the processor is specifically configured to:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above device controls the nodes associated with the request according to the blacklist or whitelist, so that there is no need to perform identity authentication on the untrusted second node.
  • the association between the above device and an illegal attacker is avoided, and the data security of the above device is improved.
  • the processor is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication response further includes second integrity verification data, and the second integrity verification data is used to verify the first authentication response. message integrity;
  • the processor is further configured to determine that the message integrity check of the first authentication response passes.
  • the processor is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • a first association threshold is preset in the above device, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the capacity of the service that the node can provide.
  • the above-mentioned device can no longer receive or process the association request, so as to avoid affecting the communication of other nodes associated with the above-mentioned device, ensuring the above-mentioned The stable operation of the services provided by the device.
  • the processor is further configured to:
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • the processor is further configured to:
  • the first authentication failure counter is reset.
  • the processor is further configured to:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above-mentioned apparatus from establishing association with an illegal attacker, and improving the data security of the above-mentioned apparatus.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • the processor is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the blacklist may be related to the number of times the second node joins the blacklist. The length of the list will also get longer and longer. Further optionally, when the number of times it is added to the blacklist exceeds a certain threshold, it can be permanently added to the blacklist.
  • the validity period of the blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the above apparatus may also predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here.
  • the step of sending the first authentication request to the second node is not performed.
  • an embodiment of the present application further provides a communication device, the device includes at least one processor and a communication interface, and the at least one processor is configured to invoke at least one computer program stored in a memory, so that the device implements The method described in the first aspect or any possible implementation manner of the first aspect.
  • the at least one processor is configured to invoke a computer program stored in at least one memory to perform the following operations:
  • the first identity authentication information is verified according to the shared key between the second node and the first node; wherein the shared key is a secret value shared between the first node and the second node;
  • a first authentication response is sent to the first node, and the first authentication response includes the second identity authentication information; wherein the second identity authentication information is generated according to the shared key.
  • the above-mentioned device after confirming that the identity of the first node is credible, sends the first association request to the first node. Then, according to the first identity authentication information in the first authentication request, the identity authentication information of the first node is verified by the shared key, and after the verification is passed, the second identity authentication information is sent to the first node.
  • the second identity authentication information It can be used for the first node to verify the identity of the above-mentioned device.
  • the processor is further configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to a blacklist or a whitelist, and the above device can be controlled not to send an association request to an untrusted first node, thereby preventing the above device from establishing an association with an illegal attacker, and improving the performance of the above device. data security.
  • the processor is further configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication request further includes first integrity verification data, and the first integrity verification data is used to verify the authenticity of the first authentication request. message integrity;
  • the processor is further configured to determine that the message integrity check of the first authentication request passes.
  • the processor is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the above device, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the device can be associated with.
  • the device can no longer be associated with other nodes, so as to avoid affecting the communication of other nodes associated with the device, ensuring that the device provided by the device provides stable operation of the service.
  • the processor is further configured to:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the above-mentioned device receives the first association response from the first node, and the association response is used to indicate the first node. Associate with the second node. Further, the first response message can inform that the above-mentioned apparatus has been successfully associated, and subsequent communication can be performed.
  • the processor is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • the processor is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the device by modifying the identity and other identities, thereby preventing the device from establishing association with an illegal attacker, and improving the data security of the device.
  • the processor is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above-mentioned apparatus from establishing association with an illegal attacker and improving the data security of the above-mentioned apparatus.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • the processor is further configured to:
  • a second association request is sent to the first node.
  • the authentication of the authentication information may also fail. Therefore, if the number of verification failures for the first node has not exceeded the preset second threshold, an association request can be re-sent to the first node to request association with the first node, thereby improving the robustness of the system and ensuring Stable operation of the services provided by the above devices.
  • the processor is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the processor is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times the identifier of the 1 is added to the second blacklist and the type of the first node is related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the above apparatus may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • the embodiments of the present application further provide an association control method, the method comprising:
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the message integrity verification after confirming that the identity of the second node is credible, it is also necessary to perform message integrity verification on the authentication response message from the second node before performing the association. If the message integrity verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, thereby preventing attackers from tampering with data in the authentication process (such as identity authentication information). ), thereby preventing the node from establishing association with illegal attackers, and improving the data security of the node.
  • the determining that the identity of the second node is credible includes:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the node requesting association can be controlled according to the blacklist or whitelist, so that the untrusted second node does not need to be authenticated, which avoids the establishment of association between the node and an illegal attacker, and improves the data security of the node. sex.
  • the determining that the identity of the second node is credible includes:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the method before the receiving the first association request from the second node, the method further includes:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • the first association threshold is preset in the node, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the capacity of the service that the node can provide.
  • the node can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the node, and ensure that the node has Stable operation of the provided services.
  • the first authentication response further includes second identity authentication information
  • the method further includes:
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the identity of the second node is verified according to the shared key with the second node. If the verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined to be credible. For nodes that are not confirmed as trusted, their association requests can no longer be processed (such as sending an authentication request), thereby preventing nodes from crashing due to processing a large number of requests, and ensuring normal service.
  • the method further includes:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response may be sent to the second node, where the association response is used to instruct the first node to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • the method further includes:
  • the first authentication failure counter is reset.
  • the method further includes:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the node from establishing association with an illegal attacker and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • the method further includes:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times it is, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the blacklist exceeds a certain threshold, it can be permanently added to the blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here.
  • the identity of the second node is not trusted, the step of sending the first authentication request to the second node is not performed.
  • the embodiments of the present application also provide an association method, including:
  • a first authentication response is sent to the first node, and the first authentication response includes second integrity check data.
  • the first node after confirming that the identity of the second node is credible, the first node also needs to be authenticated (for example, through identity verification information, etc.) before communication is performed.
  • authenticated for example, through identity verification information, etc.
  • the determining that the identity of the first node is credible includes:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated node can be controlled according to the blacklist or whitelist, and the node can be controlled not to send an association request to the untrusted first node, thereby avoiding the establishment of association between the node and an illegal attacker, and improving the data security of the node. sex.
  • the determining that the identity of the first node is credible includes:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the determining that the identity of the first node is credible, before sending the first association request to the first node further includes:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the node, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the node can associate with.
  • the node can no longer associate with other nodes, so as to avoid affecting the communication of other nodes associated with the node and ensure the service provided by the node. Stable operation.
  • the method further includes:
  • a first association response is received from the first node, where the first association response is used to instruct the first node to establish an association with the second node.
  • the second node receives the first association response from the first node, and the association response is used to indicate the first node.
  • a node is associated with the second node.
  • the first response message can inform the second node that the association has been successful, and subsequent communication can be performed.
  • the method further includes:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • the method further includes:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of authentication failures for the first node.
  • the message integrity verification of the first authentication response fails, it means that the first authentication response message is no longer complete or has been modified by an attacker, so update the number of times the identity of the first node failed to be verified, The number of verification failures can be used to subsequently determine whether the identity of the first node is credible.
  • the first authentication request message further includes first identity verification information, and if the verification of the integrity of the message of the first authentication response is passed, send the message to the The first node sends a first authentication response, including:
  • the first identity verification information is verified according to the shared key with the first node
  • the first authentication response is sent to the first node.
  • the method further includes:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the verification of the identity authentication information of the first node fails, the number of times of failure to verify the identity of the first node is updated, and the number of times of verification failure can be used to subsequently determine whether the identity of the node is credible, so that more Nodes that fail this verification can no longer be determined to be trusted. For nodes that are not confirmed as credible, the association request can no longer be sent to them, thereby ensuring that the services provided by the nodes are performed normally.
  • the method further includes:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the node from establishing association with an illegal attacker and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • the method further includes:
  • a second association request is sent to the first node.
  • the authentication of the authentication information may also fail. Therefore, if the number of verification failures for the first node has not exceeded the preset second threshold, an association request can be re-sent to the first node to request association with this node, thereby improving the robustness of the system and ensuring the node Stable operation of the provided services.
  • the method further includes:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, so as to avoid association with an untrusted node and ensure the security of communication.
  • the method further includes:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times that the identifier of the first node is added to the second blacklist and the type of the first node are related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • the embodiments of the present application further provide an association control device, including:
  • a communication unit for receiving the first association request from the second node
  • a processing unit configured to determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication unit, where the first authentication request includes first integrity verification data;
  • the communication unit is further configured to receive a first authentication response from the second node, where the first authentication response includes second integrity check data;
  • the processing unit is further configured to verify the message integrity of the first authentication response according to the second integrity verification data
  • the processing unit is further configured to update a first authentication failure counter if the verification of the integrity of the message of the first authentication response fails, where the first authentication failure counter represents a verification failure for the second node. frequency.
  • the above-mentioned device after confirming that the identity of the second node is credible, the above-mentioned device also needs to perform message integrity verification on the message from the second node before performing the association. If the message integrity verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, thereby preventing attackers from tampering with data in the authentication process (such as identity authentication information). ), thereby preventing the above-mentioned apparatus from establishing an association with an illegal attacker, and improving the data security of the above-mentioned apparatus.
  • the processing unit is specifically configured to:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above device controls the node requesting association according to the blacklist or whitelist, thereby eliminating the need to perform identity authentication on the untrusted second node, preventing the node from establishing association with an illegal attacker, and improving the data security of the node.
  • the processing unit is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • processing unit is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • a first association threshold is preset in the above device, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the service capacity that the above-mentioned device can provide.
  • the above-mentioned device can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the above-mentioned device, ensuring that Stable operation of the services provided by the above devices.
  • processing unit is further configured to:
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the device verifies the identity of the second node according to the shared key with the second node. If the verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined to be credible. For nodes that are not confirmed as trusted, their association requests can no longer be processed (such as sending an authentication request), thereby preventing nodes from crashing due to processing a large number of requests, and ensuring normal service.
  • the communication unit is further configured to:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • processing unit is further configured to:
  • the first authentication failure counter is reset.
  • processing unit is further configured to:
  • the value of the first authentication failure counter is greater than or equal to a first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • processing unit is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times it is, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the first blacklist exceeds a certain threshold, it can be permanently added to the first blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here.
  • the step of sending the first authentication request to the second node is not performed.
  • an association device including:
  • a processing unit configured to determine that the identity of the first node is credible, and send a first association request to the first node through the communication unit;
  • the communication unit is further configured to receive a first authentication request from the first node, where the first authentication request includes first identity authentication information and first integrity check data;
  • the processing unit is further configured to verify the message integrity of the first authentication request according to the first integrity verification data
  • the communication unit is further configured to send a first authentication response to the first node if the verification of the message integrity of the first authentication request is passed, and the first authentication response includes a second integrity check. test data.
  • the above-mentioned device after confirming that the identity of the second node is credible, the above-mentioned device also needs to authenticate the first node (for example, through identity verification information, etc.) before communicating.
  • the first node for example, through identity verification information, etc.
  • the processing unit is specifically configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to a blacklist or a whitelist, and the above device can be controlled not to send an association request to an untrusted first node, thereby preventing the above device from establishing an association with an illegal attacker, and improving the performance of the above device. data security.
  • the processing unit is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the processing unit is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the above device, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the device can be associated with.
  • the device can no longer be associated with other nodes, so as to avoid affecting the communication of other nodes associated with the device, ensuring that the device provided by the device provides stable operation of the service.
  • the communication unit is further configured to:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the above-mentioned device can receive the first association response from the first node, and the association response is used to indicate the above-mentioned
  • the apparatus establishes an association with the second node. Further, the first response message can inform that the above-mentioned apparatus has been successfully associated, and subsequent communication can be performed.
  • the processing unit is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • the processing unit is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of authentication failures for the first node.
  • the message integrity verification of the first authentication response fails, it means that the first authentication response message is no longer complete or has been modified by an attacker, so update the number of failed verifications for the first node, The number of verification failures can be used to subsequently determine whether the identity of the first node is credible.
  • the first authentication request message further includes first identity authentication information
  • the processing unit is further configured to check if the message integrity of the first authentication response is The verification is passed, then the first identity verification information is verified according to the shared key with the first node;
  • the communication unit is further configured to send the first authentication response to the first node if the verification of the first identity verification information is passed.
  • the processing unit is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the processing unit is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist can be 10 days, and when the identity of a first node is added to the blacklist for 10 days, it can be removed from the blacklist.
  • the processing unit is further configured to determine that the value of the second authentication failure counter is less than a second threshold
  • the communication unit is further configured to send a second association request to the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the processing unit is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the processing unit is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. It is related to the number of times that the identifier of 1 is added to the second blacklist and the type of the first node.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the 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 at least one processor is configured to invoke at least one computer program stored in a memory, so that the The apparatus implements the method described in the seventh aspect or any possible implementation manner of the seventh aspect.
  • an embodiment of the present application further provides a communication device, the device includes at least one processor and a communication interface, the at least one processor is configured to invoke at least one computer program stored in a memory, so that the device The method described in the eighth aspect or any one possible implementation manner of the eighth aspect is implemented.
  • 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 of the third aspect manner, or the device described in the fifth aspect or any possible implementation manner of the fifth aspect, the second node is the fourth aspect or any possible implementation manner of the fourth aspect, or the foregoing
  • the communication system includes a first node and a second node, wherein the first node is the third aspect or any possible implementation of the third aspect manner, or the device described in the fifth aspect or any possible implementation manner of the fifth aspect, the second node is the fourth aspect or any possible implementation manner of the fourth aspect, or the foregoing.
  • 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 any possible implementation of the ninth aspect or the ninth aspect.
  • the second node is any possible implementation manner of the tenth aspect or the tenth aspect, or the apparatus described in the twelfth aspect.
  • 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 the first
  • the method described in 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 is performed, or the seventh aspect or the seventh aspect is performed.
  • an embodiment of the present application discloses a chip system, the chip system includes at least one processor, a memory, and an interface circuit, where the interface circuit is configured to provide information input/output for the at least one processor, the memory
  • a computer program is stored in the computer, and when the computer program runs on one or more processors, it executes the method described in the first aspect, any possible implementation manner of the first aspect, or executes the second aspect or the first aspect.
  • an embodiment of the present application discloses a vehicle, the vehicle includes a first node (for example, a car cockpit domain controller CDC), wherein the first node is the third aspect or any of the third aspects A possible implementation manner, or the apparatus described in the above fifth aspect or any one possible implementation manner of the above fifth aspect. Further, the vehicle 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 or a starting system controller, etc.), and the second node is the above-mentioned The device described in the fourth aspect or any possible implementation manner of the fourth aspect, or the above sixth aspect or any one possible implementation manner of the above sixth aspect.
  • a first node for example, a car cockpit domain controller CDC
  • the first node is the third aspect or any of the third aspects A possible implementation manner, or the apparatus described in the above fifth aspect or any one possible implementation manner of the above fifth aspect.
  • the vehicle further includes a second node (for example
  • an embodiment of the present application discloses a vehicle, the vehicle includes a first node (for example, a car cockpit domain controller CDC), wherein the first node is any of the ninth aspect or the ninth aspect above A possible implementation manner, or the device described in the eleventh aspect above. Further, the vehicle 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 or a starting system controller, etc.), and the second node is the above-mentioned The tenth aspect or any possible implementation manner of the tenth aspect, or the device described in the twelfth aspect.
  • a first node for example, a car cockpit domain controller CDC
  • the first node is any of the ninth aspect or the ninth aspect above A possible implementation manner, or the device described in the eleventh aspect above.
  • the vehicle further includes a second node (for example, at least one of a camera, a screen, a microphone, a sound,
  • 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 an association control method provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of an association control method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a blacklist and a whitelist provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another association control method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another association control method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another associated control device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of another associated device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another associated control device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of another associated device provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
  • FIG. 14 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
  • a node may be a data transfer device, such as a router, repeater, bridge or switch, or a terminal device, such as various types of user equipment (UE), mobile phone (mobile phone) ), tablet computer (pad), desktop computer, headset, stereo, etc., and can also include machine intelligent 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 this embodiment of the present application.
  • the shared key is the same secret value stored in the nodes of both parties.
  • the shared key can be pre-defined or pre-configured in the nodes of both parties, or it can be generated by both parties through the same key acquisition method, or it can be A trusted device (such as KDC) sent to the first node and the second node respectively.
  • 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 have pre-configured the sharing between the CDC and the on-board radar when deploying the CDC and on-board radar. Key, through the shared key, the security of the communication between the vehicle's CDC and the roof radar can be guaranteed.
  • the cockpit domain controller (CDC) of the vehicle and the mobile phone of the vehicle owner are two nodes that can communicate.
  • the shared key can be obtained through the key acquisition method, such as exchanging the parameters of the key agreement algorithm between the mobile phone and the CDC of the vehicle to generate a key through a key agreement algorithm.
  • the shared key can be used to verify the identities of both nodes when the mobile phone requests the CDC of the associated vehicle again.
  • Key derivation is the process of deriving one or more secret values from a secret value, and the algorithm used to derive the key is called the key derivation function (KDF), also known as the key derivation algorithm.
  • KDF key derivation function
  • DK new secret value derived from the secret value Key
  • DK KDF(Key)
  • PBKDF password-based key derivation function
  • scrypt algorithm etc.
  • the PBKDF algorithm includes the first generation PBKDF1 and the second generation PBKDF2.
  • 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.
  • association indicates the process of establishing a connection between the first node and the second node. In some specific technical scenarios, the “association” may also be described as "access”.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application, including a first node 101 and a second node 102 .
  • the first node 101 may be requested to associate by the second node 202, and after the association is successful, the first node 101 may communicate with the second node 102 through a data link.
  • the data link for the communication between the first node 101 and the second node 102 may include various types of connection media, such as a wireless link, which may specifically be wireless fidelity (wireless fidelity, Wi-Fi), Bluetooth , zigbee and other wireless links (such as general wireless short-distance transmission technology), etc., and then there are wired links, such as optical fiber links.
  • the first node 101 may be the initiator of the communication, and may be referred to as a master node or an access point (access point, AP).
  • the second node 102 is the receiver of the communication and may be referred to as a slave node.
  • the first node 101 and the second node 102 may be devices of the same type, or may be devices of different types.
  • FIG. 2 is a schematic diagram of a usage scenario of an association control method provided by an embodiment of the present application.
  • the cockpit domain controller (cockpit domain controller, CDC) 201 is the control center in the smart cockpit device, and can be regarded as the first node 101 .
  • the smart phone 202 is a device capable of transmitting and receiving data, and can be regarded as the second node 102 .
  • the CDC 201 can be associated with other Bluetooth devices through Bluetooth, and the smart phone 202 supports the Bluetooth function, so the CDC 201 can be requested to be associated.
  • nodes are easily attacked by attackers. For example, an attacker can forge the identity of the second node and request to associate with the first node. If the attacker successfully associates, the data security of the first node will be threatened. Especially in the process of vehicle communication, if the CDC201 receives the association of the attacker, it will easily lead to the leakage of vehicle data, or even be attacked by the attacker, jeopardizing the driving safety. Another example is that an attacker sends a large number of request frames to a node. When the node receives a large number of request frames that exceed its processing capacity, the node will be paralyzed and cannot continue to provide normal services, thereby affecting the communication between other nodes and the node. . To solve this problem, the embodiments of the present application provide the following association control method.
  • FIG. 3 is a schematic flowchart of an association control method provided by an embodiment of the present application.
  • the association control method may be implemented based on the communication system shown in FIG. 1, and the method at least includes the following steps:
  • Step S301 The second node determines that the identity of the first node is credible.
  • the second node can determine that the identity of the first node is credible by at least the following three methods:
  • Method 1 Determine that the identity of the first node is credible through a blacklist and/or a whitelist.
  • FIG. 4 is a schematic diagram of a blacklist and a whitelist provided by an embodiment of the present application.
  • the blacklist 401 and the whitelist 402 store the identifiers of multiple nodes, wherein the identifiers of the nodes may be the identifiers of the nodes. (identification, ID), media access control (media access control, MAC) address, domain name, domain address or other self-defined identifiers, for example, the identifier in the blacklist 401 "00-00-00-AA-AA-AA ” is the identifier of a node.
  • the blacklist may also include one or more of the joining time, expiration time, number of times of joining the blacklist, etc. of the identifier of the node.
  • the whitelist may also include the identifier of the node.
  • the blacklist in the second node is referred to as the second blacklist
  • the whitelist in the second node is referred to as the second whitelist. It can be understood that the identity of the node cannot be in both the second whitelist and the second blacklist at the same time.
  • the second node may determine whether the identity of the first node is credible by determining whether the identity of the first node is in the second whitelist or the second blacklist.
  • Implementation mode 1 The second node determines that the identity of the first node is in the second whitelist, then it can indicate that the identity of the first node is credible.
  • Implementation mode 2 The second node determines that the identity of the first node is not in the second blacklist, then it can indicate that the identity of the first node is credible.
  • the second node may acquire the identifier of the first node by acquiring the input information, or acquire the identifier of the first node by receiving a message broadcast by the first node.
  • the first node may broadcast a message, and the broadcast message may include the identifier of the first node.
  • the second node may confirm the first node according to the identifier of the first node, the second blacklist or the second whitelist. Whether the identity of the node is trusted.
  • the second node stores a correspondence between the identifiers of one or more other nodes and the key configuration type, and the key configuration type may be a pre-configured type and a password generation type.
  • the pre-configuration type indicates that the shared key between the first node and the second node is pre-configured or pre-defined. For example, the OEM staff pre-configures the shared key between the CDC and the microphone when assembling the vehicle.
  • the password generation type also referred to as "password access type" indicates that the shared key between the first node and the second node is the shared key generated according to the password when the association is established through password access.
  • nodes of different key configuration types may have different ways to determine the identity trustworthiness, which specifically includes the following two situations:
  • Implementation mode 3 For the first node whose key configuration type is pre-configured, if it is confirmed that the identifier of the first node is in the second whitelist, it indicates that the identity of the node is credible. Optionally, if the identity of the first node is in the second blacklist, the identity of the first node is not credible. For example, see Table 1. Table 1 is a possible correspondence between node identifiers and key configuration types provided by this embodiment of the present application.
  • node A1 requests Since the key configuration type of the node A1 is a pre-configured type, and referring to the whitelist 402, it can be seen that the identity of the node A1 is in the whitelist 402, so it can be confirmed that the identity of the node A1 is credible.
  • Implementation Mode 4 For the first node whose key configuration type is password generation, if it is confirmed that the identity of the first node is not in the second blacklist, it indicates that the identity of the first node is credible. For example, referring to Table 1, if the node A2 identified as "77-77-77-GG-GG-GG" requests association, since the key configuration type of the node A2 is the password generation type, and referring to Figure 4, it can be seen that the node A2's key configuration type is the password generation type. The identity is not in the blacklist 401, so it can be confirmed that the identity of the node A2 is credible.
  • Method 2 It is determined that the identity of the first node is credible by acquiring the second confirmation indication information.
  • the second node acquires second confirmation indication information, where the second confirmation indication information indicates that the identity of the first node is credible.
  • the second confirmation indication information is the indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be confirmation of the output prompt information, for example:
  • Implementation mode 5 The second node outputs second prompt information to remind the user that a request to associate with the first node is required. After receiving the user's confirmation operation and obtaining the second confirmation indication information, the identity of the first node can be determined to be credible. Further optionally, if the second node receives the user's rejection operation after outputting the second prompt information, it can be confirmed that the identity of the first node is not credible.
  • Method 3 Determine that the identity of the first node is credible through the black and/or white list and the confirmation indication information.
  • the second node may determine that the identity of the first node is credible by confirming the indication information. Specifically, when the identifier of the first node is not in the second blacklist, or when the identifier of the first node is neither in the second blacklist nor in the second whitelist, obtain the second confirmation indication information, the The second confirmation indication information indicates that the identity of the first node is trustworthy.
  • different key configuration types can also be handled differently, for example:
  • Implementation mode 6 For the first node whose key configuration type is password generation, if the identifier of the first node is not in the second blacklist and not in the second whitelist, obtain second confirmation indication information, the confirmation indication information Indicates that the identity of the first node is credible. Optionally, if the second confirmation indication information is not obtained, it can be confirmed that the identity of the second node is not credible.
  • the second node may pre-define or be configured with a second association threshold, where the second association threshold is used to represent the number of nodes currently associated, and the second node may confirm that the identity of the first node is credible before or after confirming that the identity of the first node is credible.
  • the associated quantity of the second node may be confirmed periodically or aperiodically. That is, the method includes the following steps: confirming whether the number of nodes currently associated with the second node is less than or equal to (or less than) a second association threshold or determining whether the number of nodes currently associated with the second node is greater than (or greater than or equal to) the second association threshold .
  • the second node may not send an association request to the first node or may subsequently cancel the association with the first node to avoid affecting the second node and other nodes communication, which ensures the stable operation of the services provided by the second node.
  • Step S302 The second node sends a first association request to the first node.
  • the second node may send the first association request message to the first node through a wireless link (such as one of Wi-Fi, Bluetooth, Zigbee or other short-range wireless links, etc.) or a wired link (such as optical fiber) .
  • a wireless link such as one of Wi-Fi, Bluetooth, Zigbee or other short-range wireless links, etc.
  • a wired link such as optical fiber
  • the first node receives the first association request from the second node.
  • the first node may be pre-defined or configured with a first association threshold, where the first association threshold is used to represent the number of nodes currently associated, before or after the first node receives the first association request message from the second node. , or can periodically or aperiodically confirm the number of nodes currently associated with the first node, that is, the method may include the following steps: determining whether the number of nodes currently associated with the first node is less than or equal to (or less than) the first association threshold Or determine whether the number of nodes currently associated with the first node is greater than (or greater than or equal to) the first association threshold.
  • the first association threshold may limit the service capacity that the first node can provide.
  • the first node may no longer receive or process association requests Therefore, the above-mentioned first association request will not be received or processed, so as to avoid affecting the communication between the first node and other associated nodes, and ensure the stable operation of the service provided by the first node.
  • the first association request message may include at least one of the identity of the second node or a freshness parameter acquired (or generated) by the second node, and the like.
  • the freshness parameter may include at least one of a random number (number once, NONCE), a counter (counter), a sequence number (number), and the like.
  • the freshness parameter in the first association request message is referred to as the first freshness parameter.
  • Step S303 The first node determines that the identity of the second node is credible.
  • the first node can determine that the identity of the second node is credible in at least the following three ways:
  • Method 1 Determine that the identity of the second node is credible through a blacklist and/or a whitelist.
  • the blacklist in the first node is referred to as the first blacklist
  • the whitelist in the first node is referred to as the first whitelist. It can be understood that, in the first node, the identifier of a node cannot be in both the first white list and the first black list at the same time.
  • the first node may determine whether the identity of the second node is credible by determining whether the identity of the second node is in the first whitelist or the first blacklist. There are two specific cases:
  • Case 1 The first node determines that the identity of the second node is in the first whitelist, then it can indicate that the identity of the second node is credible.
  • Case 2 The first node determines that the identity of the second node is not in the first blacklist, then it can indicate that the identity of the second node is credible. Optionally, if the identifier of the second node is in the first blacklist, it indicates that the identity of the second node is not credible, and the first node may discard the first association request or ignore the request and not perform subsequent steps.
  • the first association request message includes the identity of the second node, and the first node may obtain the identity of the second node by receiving the first association request message.
  • the first node stores a correspondence between the identifiers of one or more other nodes and the key configuration type
  • the key configuration type may be a pre-configured type and a password generation type.
  • the pre-configuration type indicates that the shared key between the first node and the second node is pre-configured or pre-defined. For example, the OEM staff pre-configures the shared key between the CDC and the microphone when assembling the vehicle.
  • the password generation type indicates that the shared key between the first node and the second node is associated by means of password access, and then the shared key is generated according to the password.
  • nodes of different key configuration types can have different ways to determine the identity trustworthiness, and the specific implementation can have the following two cases:
  • Case 3 For the second node whose key configuration type is pre-configured, if it is confirmed that the identifier of the second node is in the first whitelist, it indicates that the identity of the second node is credible.
  • Case 4 For the second node whose key configuration type is password generation, if it is confirmed that the identity of the second node is not in the first blacklist, it indicates that the identity of the node is credible. Optionally, if the identity of the node is in the first blacklist, then the identity of the second node is untrustworthy, and the first node may discard the first association request or ignore the request and not perform subsequent steps.
  • Manner 2 It is determined that the identity of the second node is credible by acquiring the first confirmation indication information.
  • the first node acquires first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first confirmation indication information is indication information obtained according to a confirmation operation input by the user, and the confirmation operation may be confirmation of the output prompt information. For example:
  • Case 5 The first node outputs the first prompt information to remind the user that the second node needs to be associated. After receiving the user's confirmation operation and obtaining the first confirmation indication information, the identity of the second node can be determined to be credible. Further optionally, if the first node receives the user's rejection operation after outputting the first prompt information, it can confirm that the identity of the second node is not credible, and the first node can discard the first association request or ignore the request. The subsequent steps are not performed.
  • Manner 3 Determine that the identity of the second node is credible through the black and/or white list and the confirmation indication information.
  • the first node may determine that the identity of the second node is credible by confirming the indication information. Specifically, when the identifier of the second node is not in the first blacklist, or when the identifier of the second node is neither in the first blacklist nor in the first whitelist, the first confirmation indication information is obtained, and the first confirmation indication information is obtained.
  • a confirmation indication information indicates that the identity of the second node is trustworthy.
  • different key configuration types can also be handled differently, for example:
  • Case 6 For the second node whose key configuration type is password generation, if the identifier of the second node is not in the first blacklist and not in the first whitelist, obtain the first confirmation indication information, the confirmation indication information indicates The identity of the second node is trusted. Optionally, if the first confirmation indication information is not obtained, it can be confirmed that the identity of the second node is untrustworthy, and the first node can discard the first association request or ignore the request and not perform subsequent steps.
  • Step S304 The first node sends a first authentication request to the second node.
  • the first authentication request may include first identity verification information.
  • the first identity verification information is generated by the first node according to the shared key with the second node.
  • the shared key may be a pre-shared key PSK between the first node and the second node.
  • the first identity verification information may be generated by the first node according to the shared key and the first freshness parameter.
  • the first authentication request further includes a second freshness parameter
  • the second freshness parameter may be a random number obtained (or generated by the second node), a random number (number once, NONCE), a counter (counter). ), at least one of a serial number (number), and the like.
  • the first authentication request may further include first integrity check data and the like.
  • the first integrity verification data is verification data generated according to a symmetric key and an integrity protection algorithm, and is used by the second node to verify the message integrity of the first authentication request.
  • the verification data may also be referred to as a message authentication code (message authentication code, MAC).
  • Step S305 The second node verifies the first identity authentication information according to the shared key between the second node and the first node.
  • the second node since the first identity authentication information is generated by the first node according to the shared key between the first node and the second node, the second node also has the shared key and can verify all the information according to the shared key. Check whether the first identity authentication information is correct.
  • the second node should also use the same parameters to generate the verification information. If the verification information is the same as the first identity authentication information If the information is the same, the verification is considered to be passed.
  • the first identity authentication information is generated through KDF, so the second node can generate check information through KDF, which is also called a check value check1. The second node verifies whether the first identity authentication information is correct through the verification information.
  • the second node verifies the message integrity of the first authentication request to prevent the first authentication request.
  • the first authentication request includes first integrity check data
  • the second node may check the message integrity of the first authentication request according to the first integrity check data.
  • the second node can update the number of times the integrity check fails for the first node, and the number of times the integrity check fails can be used for subsequent determination of the first node. Whether the identity of a node can be trusted. Further optionally, the number of times that the second node fails to update the integrity check of the first node may be in the following two cases:
  • the second node indicates the number of authentication failures for the first node through the second authentication failure counter.
  • the verification for the first node may include message integrity check and identity verification. Therefore, if the message integrity check of the first authentication request fails or the identity verification of the second node fails, the second node may The failure counter is incremented by 1, and the second authentication failure counter can be used to subsequently confirm whether the identity of the first node is credible.
  • Case 2 The second node uses the second integrity check counter to represent the number of times the integrity check of the first node fails. If the message integrity check for the first authentication request fails, the second node can check the second integrity check. The verification counter is incremented by 1, and the second complete verification counter can be used to subsequently confirm whether the identity of the first node is credible.
  • Step S306 If the verification of the first identity authentication information by the second node is passed, a first authentication response is sent to the first node.
  • the first authentication response may include second identity verification information.
  • the second identity verification information is generated by the second node according to the shared key with the second node.
  • the shared key may be a pre-shared key PSK between the first node and the second node.
  • the second identity verification information may be generated by the second node according to the shared key and the second freshness parameter.
  • the first association request may further include second integrity check data and the like.
  • the second integrity check data is check data generated according to a symmetric key and an integrity protection algorithm, and is used by the first node to check the message integrity of the first association request.
  • the verification data may also be referred to as a message authentication code (message authentication code, MAC).
  • Step S307 The first node verifies the second identity authentication information according to the shared key.
  • the first node since the second identity authentication information is generated according to the shared key between the first node and the second node, the first node also has the shared key and can verify the second identity according to the shared key. Whether the authentication information is correct.
  • the first node should also use the same parameters to generate the verification information. If the verification information is the same as the first identity authentication information If the information is the same, the verification is considered to be passed.
  • the second identity authentication information is generated by KDF, so the first node can generate verification information, also called check value check2, through KDF, and then verify whether the second identity authentication information is correct through the verification information.
  • the first node verifies the message integrity of the first authentication response to prevent the content in the first authentication response from being tampered with by an attacker.
  • the first authentication response includes second integrity verification data, and the first node can verify the message integrity of the first authentication response according to the second integrity verification data.
  • the first node may update the number of times the integrity check fails for the second node, and the number of times the integrity check fails may be used for subsequent determination of the first node. Whether the identity of the second node is credible. Further optionally, the number of times that the first node fails to update the integrity check of the second node may be in the following two cases:
  • the first node indicates the number of times of authentication failures for the second node through the first authentication failure counter.
  • the verification for the second node includes message integrity check and identity verification, so if the message integrity check of the first authentication response fails or the identity verification for the second node fails, the first node may declare the first authentication failure
  • the counter is incremented by 1, and the first authentication failure counter can be used to subsequently confirm whether the identity of the second node is credible.
  • Scenario 2 The first node uses the first integrity check counter to represent the number of times the integrity check fails for the second node. If the message integrity check for the first authentication response fails, the first node can check the first integrity check. The verification counter is incremented by 1, and the first complete verification counter can be used to subsequently confirm whether the identity of the second node is credible.
  • Step S308 If the first node fails to verify the second identity authentication information, update the first authentication failure counter.
  • the first authentication failure counter represents the number of authentication failures for the second node. For example, if the verification of the second identity authentication information fails, the first authentication failure counter may be incremented by 1, and the number of verification failures may be used to subsequently determine whether the identity of the second node is credible.
  • step S501 is specifically as follows:
  • Step S501 If the value of the first authentication failure counter exceeds the first threshold, the first node adds the identifier of the second node to the first blacklist.
  • the first authentication failure counter is used to represent the number of times of authentication failures for the second node, which may be greater than or equal to the first threshold when exceeding the first threshold. If the value of the first authentication failure counter exceeds the first threshold, it indicates that the second node has failed the authentication for many times. Therefore, the second node may be an attacker who frequently sends association requests. Therefore, the identifier of the second node is added to the first A blacklist. After being added to the first blacklist, the identity of the second node will not be determined to be credible, thereby preventing the node from establishing association with an illegal attacker and improving the data security of the node.
  • the identifier of the node cannot be in both the first blacklist and the first whitelist, the identifier of the second node is added to the first blacklist, if the identifier of the second node is in the first whitelist. , the identifier of the first node needs to be removed from the first whitelist.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the first blacklist can be 20 days, and when the identifier of the second node is added to the first blacklist for 20 days, it can be removed from the blacklist.
  • the identification of the second node to be added to the first blacklist exceeds the first duration
  • the identification of the second node is removed from the first blacklist, and the first duration and the identification of the second node are added to the first blacklist.
  • the number of times is related to the device type of the second node.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The time will also get longer.
  • a set value for example, more than 10 times
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here.
  • the present application does not limit the number of specific device types, and various types of devices can be defined and corresponding blacklists and validity periods of the blacklists can be set according to actual needs.
  • the first blacklist may also include multiple groups of blacklists, which are respectively used for more specific and detailed device management.
  • step S502 shown in FIG. 5
  • step S502 is specifically as follows:
  • Step S502 If the verification of the second identity authentication information is passed, the first node sends a first association response to the second node.
  • the first node may send a first association response to the second node, where the first association response is used to indicate that the first node and the second node Make connections. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • association control method described in this embodiment of the present application may further include step S503 or steps 503 to 504 shown in FIG. 5 , and the details of steps 503 to 504 are as follows:
  • Step S503 If the verification of the first identity authentication information fails, the second node updates the second authentication failure counter.
  • the second authentication failure counter represents the number of authentication failures for the first node. If the verification of the identity authentication information of the first node fails, the second authentication failure counter may be incremented by 1, and the second authentication failure counter may be used to subsequently determine whether the identity of the first node is credible.
  • Step S504 If the value of the second authentication failure counter exceeds the second threshold, the second node adds the identifier of the first node to the second blacklist.
  • the first node may be an attacker who frequently sends verification requests.
  • the identifier of the first node is added to the second blacklist. After being added to the second blacklist, the identity of the first node will not be determined to be credible, thereby preventing the second node from establishing association with an illegal attacker and improving the data security of the second node.
  • the identifier of the first node cannot be in both the second blacklist and the second whitelist, after adding the identifier of the first node to the second blacklist, if the identifier of the first node is in the second blacklist, In the second whitelist, the identifier of the first node needs to be removed from the second whitelist.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration can be regarded as the validity period of the blacklist.
  • the second duration of the second blacklist may be 10 days, and when the identifier of a first node is added to the second blacklist for 10 days, it may be removed from the second blacklist.
  • the second duration is related to at least one of the number of times the identifier of the first node is added to the second blacklist and the type of the first node.
  • the validity period of the second blacklist can be related to the number of times that the first node joins the blacklist. The more times a node joins the second blacklist, the longer its duration in the second blacklist will be. . Further optionally, when the number of times it is added to the second blacklist exceeds a set value (for example, more than 15 times), it can be permanently added to the second blacklist and cannot be removed.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the second node may send a second association request to the first node.
  • the authentication process of the identity authentication information due to some parameters being lost or incorrectly transmitted during the transmission process, the authentication of the identity authentication information may also fail. Therefore, if the number of verification failures on the first node has not exceeded the preset second threshold, an association request can be re-sent to the first node to request association with the first node, thereby improving the robustness of the system and ensuring This ensures the stable operation of the services provided by the node.
  • the third confirmation indication information may be obtained, and the third confirmation indication information may be indication information obtained according to a confirmation operation input by the user, and the confirmation operation may be an output confirmation of the prompt message.
  • the second node may output prompt information to remind the user that the verification fails and the association request needs to be re-initiated, and after receiving the user's confirmation operation and obtaining the third confirmation indication information, sends the second association request to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the identity of the second node is verified according to the shared key with the second node.
  • the attacker modifies the identity identifier and bypasses the step of "determining the identity is credible", since it is difficult to forge the identity verification information, it is still unable to pass the identity verification of the first node, thereby avoiding the node and the illegal
  • the attacker establishes an association, which improves the data security of the node.
  • the number of verification failures will be updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined as credible. .
  • their association requests can no longer be processed (such as sending an authentication request), thereby preventing nodes from crashing due to processing a large number of requests, and ensuring normal service.
  • FIG. 6 is a schematic flowchart of an association control 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 S601 The second node determines that the identity of the first node is credible.
  • step S301 For details, refer to the relevant description of step S301.
  • Step S602 The second node sends a first association request to the first node.
  • Step S603 The first node determines that the identity of the second node is credible.
  • step S303 For details, refer to the relevant description of step S303.
  • Step S604 The first node sends a first authentication request to the second node.
  • the first authentication request includes first integrity check data and the like.
  • the first integrity verification data is verification data generated according to a key and an integrity protection algorithm, and is used by the second node to verify the message integrity of the first authentication request.
  • the verification data may also be referred to as a message authentication code (message authentication code, MAC).
  • CMAC Cipher-based Message Authentication Code
  • the first authentication request may include first identity verification information.
  • the first identity verification information is generated by the first node according to the shared key between the first node and the second node.
  • the shared key may be a pre-shared key between the first node and the second node.
  • the first identity verification information may be generated by the first node according to the shared key and the first freshness parameter.
  • Step S605 The second node verifies the message integrity of the first authentication request.
  • the first authentication request includes first integrity check data
  • the second node can check the message integrity of the first authentication request according to the first integrity check data, so as to prevent the content of the first authentication request from being Tampering by attackers.
  • the second node in what way the first node generates the first integrity check data, the second node also uses the same way to generate the check value, if the generated check value is the same as the first integrity check value
  • the verification data is the same, and the message integrity is passed.
  • the first integrity check data MAC1 is obtained by the first node through the shared key K1 and part or all of the data data1 other than MAC1 in the first authentication request according to the CMAC algorithm, then the second node generates it in the same way
  • the check value check3: check3 CMAC(K1, data1), if check3 is the same as MAC1, it means that the data data1 in the first authentication request has not been tampered with, and the integrity verification of the first authentication request is passed.
  • step S606 which is specifically as follows:
  • Step S606 If the message integrity check of the first authentication request fails, the second node updates the second authentication failure counter.
  • the second node can use the second authentication failure counter to represent the number of times of authentication failures for the first node. Therefore, if the message integrity check for the first authentication request fails, the second node can use the second authentication failure counter. The value is incremented by 1, and the second authentication failure counter can be used to subsequently confirm whether the identity of the first node is credible.
  • step S607 which is specifically as follows:
  • Step S607 If the value of the second authentication failure counter exceeds the second threshold, the second node adds the identifier of the first node to the second blacklist.
  • the second authentication failure counter represents the number of times of authentication failures for the first node, which may be greater than or equal to the second threshold when exceeding the second threshold. If the number of failed message integrity verifications for the first authentication request exceeds the second threshold, it can indicate that the message from the first node may have been tampered with by the attacker for many times or was originally wrong data. Adding the second blacklist prevents the second node from establishing an association with an illegal attacker and improves the data security of the second node.
  • the second node may send a second association request to the first node.
  • third confirmation indication information may be obtained, and the third confirmation indication information may be indication information obtained according to a confirmation operation input by the user, and the confirmation operation may be an Confirmation of the output prompt message.
  • the second node may output prompt information to remind the user that the verification fails and the association request needs to be re-initiated, and after receiving the user's confirmation operation and obtaining the third confirmation indication information, sends the second association request to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • step S608 which is specifically as follows:
  • Step S608 The second node verifies the first identity authentication information according to the shared key between the second node and the first node.
  • step S305 For details, refer to the relevant description of step S305.
  • step S609 which is specifically as follows:
  • Step S609 If the verification of the first identity authentication information fails, the second node updates the second authentication failure counter.
  • the second authentication failure counter represents the number of authentication failures for the first node. If the verification of the identity authentication information of the first node fails, the value of the second authentication failure counter may be incremented by 1, and the second authentication failure counter may be used to subsequently determine whether the identity of the first node is credible.
  • step S610 which is specifically as follows:
  • Step S610 If the value of the second authentication failure counter exceeds the second threshold, the second node adds the identifier of the first node to the second blacklist.
  • the second authentication failure counter represents the number of times of authentication failures for the first node, which may be greater than or equal to the second threshold when exceeding the second threshold. If the value of the second authentication failure counter exceeds the second threshold, it indicates that the first node has failed the authentication for many times. Therefore, the first node may be an attacker who frequently sends authentication requests. Therefore, the identifier of the first node is added to the first node. Second blacklist. After being added to the second blacklist, the identity of the first node will not be determined to be credible, thereby preventing the second node from establishing association with an illegal attacker and improving the data security of the node.
  • the second node may send a second association request to the first node.
  • third confirmation indication information may be obtained, and the third confirmation indication information may be indication information obtained according to a confirmation operation input by the user, and the confirmation operation may be an Confirmation of the output prompt message.
  • the second node can output third prompt information to remind the user that the authentication of the first node fails and needs to re-initiate the association request, and after receiving the user's confirmation operation and obtaining the third confirmation indication information, send the first node to the first node.
  • Association request In this way, it is up to the user to verify the identity of the first node that needs to be re-associated, which can avoid association with an untrusted node and ensure the security of communication.
  • the second node may also perform the operations of step S608 or step S608-step S610 first, and then perform the operations of step S605 or step S605-step S607. That is to say, the second node may verify the message integrity of the first authentication request after verifying the first identity authentication information according to the shared key.
  • Step S611 The second node sends a first authentication response to the first node.
  • the first authentication response may further include second integrity check data and the like.
  • the second integrity check data is check data generated according to a symmetric key and an integrity protection algorithm, and is used by the first node to check the message integrity of the first association request.
  • the verification data may also be referred to as a message authentication code (message authentication code, MAC).
  • MAC2 message authentication code
  • the second node sends the first authentication response to the first node. Further optionally, if the message integrity check of the first authentication request is passed, and the verification of the first identity authentication information by the second node is passed, the first authentication response is sent to the first node.
  • the first authentication response may further include second identity verification information.
  • the second identity verification information is generated by the second node according to the shared key with the first node.
  • the shared key may be a pre-shared key PSK between the first node and the second node.
  • the second identity verification information may be generated by the second node according to the shared key and the second freshness parameter.
  • Step S612 The first node verifies the message integrity of the first authentication response.
  • the first authentication response includes second integrity verification data
  • the first node can verify the message integrity of the first authentication response according to the second integrity verification data, so as to prevent the content of the first authentication response from being Tampering by attackers.
  • the first node in what way the second node generates the second integrity check data, the first node also uses the same way to generate the check value, if the generated check value is the same as the second integrity check value If the verification data is the same, the message integrity is passed.
  • the second integrity check data MAC2 is obtained by the second node through the shared key K1 and part or all of the data data2 other than MAC2 in the first authentication response according to the CMAC algorithm, then the second node generates the data in the same way
  • the check value check4: check4 CMAC(K1, data2), if check4 is the same as MAC2, it means that the data data2 in the first authentication response has not been tampered with, and the integrity verification of the first authentication response is passed.
  • the first node can use the first authentication failure counter to represent the number of authentication failures for the second node. Therefore, if the message integrity check on the first authentication response fails, the first node can use the first authentication failure counter The value is incremented by 1, and the first authentication failure counter can be used to subsequently confirm whether the identity of the second node is credible.
  • step S614 which is specifically as follows:
  • Step S614 If the value of the first authentication failure counter exceeds the first threshold, the first node adds the identifier of the second node to the first blacklist.
  • the first authentication failure counter represents the number of times of authentication failures for the second node, which may be greater than or equal to the first threshold when exceeding the first threshold. If the value of the first authentication failure counter exceeds the first threshold, it can indicate that the message from the second node may have been tampered with by the attacker for many times or is originally wrong data, so the identifier of the second node is added to the first blacklist, It avoids establishing association with illegal attackers and improves the data security of nodes.
  • step S615 which is as follows:
  • Step S615 The first node verifies the second identity authentication information according to the shared key.
  • association control method shown in FIG. 6 further includes step S616 or step S616-step S617, and the details of step S616-step S617 are as follows:
  • Step S616 If the message integrity check of the first authentication response fails, the first node updates the first authentication failure counter.
  • Step S617 If the value of the first authentication failure counter exceeds the first threshold, the first node adds the identifier of the second node to the first blacklist.
  • step S501 For details, refer to the relevant description of step S501.
  • the first node may also perform the operations of step S615 or step S615-step S617 first, and then perform the operations of step S612 or step S612-step S613. That is to say, the first node may verify the message integrity of the first authentication response after verifying the second identity authentication information according to the shared key.
  • step S618, which is specifically as follows:
  • Step S618 The first node sends a first association response to the second node.
  • the first association response is used to instruct the first node to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • the first node sends the first association response to the second node. Further optionally, if the message integrity check of the first authentication response is passed, and the verification of the second identity authentication information by the first node is passed, the first node sends the first association response to the second node.
  • FIG. 7 is a schematic structural diagram of an association control apparatus 70 provided by an embodiment of the present application.
  • the apparatus 70 may be a node, or may be a device in a node, such as a chip or an integrated circuit.
  • the apparatus 70 A communication unit 701 and a processing unit 702 may be included. Among them, the description of each unit is as follows:
  • a communication unit 701 configured to receive a first association request from a second node
  • the processing unit 702 is configured to determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication unit 701, where the first authentication request includes first identity authentication information, and the The first identity authentication information is generated according to the shared key of the first node and the second node;
  • the communication unit 701 is further configured to receive a first authentication response from the second node, where the first authentication response includes second identity authentication information;
  • the processing unit 702 is further configured to verify the second identity authentication information according to the shared key
  • the processing unit 702 is further configured to update a first authentication failure counter if the verification of the second identity authentication information fails, where the first authentication failure counter represents the number of times of verification failures for the second node.
  • the device 70 verifies the identity of the second node according to the shared key with the second node. In this way, even if the attacker modifies the identity identifier and bypasses the above-mentioned step of the device 70 to determine that the identity is credible, since it is difficult to forge the identity verification information, the identity verification of the above-mentioned device still cannot be passed, thereby avoiding the above-mentioned device and the Illegal attackers establish associations, which improves the data security of nodes.
  • the above-mentioned device 70 will update the number of verification failures, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that nodes that fail to pass multiple verifications can no longer be determined. for credible.
  • the above-mentioned apparatus 70 may no longer process the association request thereof (eg, send an authentication request), thereby preventing the above-mentioned apparatus 70 from crashing due to processing a large number of requests and ensuring normal service.
  • the division of the above-mentioned multiple units is only a logical division based on functions, and does not limit the specific structure of the apparatus 70 .
  • some of the 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 70 is in the associated control
  • the general process performed in the process is the same.
  • the above-mentioned communication unit 701 can also be transformed into a receiving unit and a sending unit, the receiving unit is used to realize the function of receiving messages in the communication unit 701 , and the sending unit is used to realize the function of sending messages in the communication unit 701 .
  • 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.
  • processing unit 702 is specifically configured to:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above-mentioned device 70 controls the node requesting association according to the blacklist or whitelist, so that the untrusted second node does not need to be authenticated. On the other hand, since no association is established with a node that has not undergone identity authentication, the association between the above-mentioned apparatus 70 and an illegal attacker is avoided, and the data security of the above-mentioned apparatus 70 is improved.
  • the processing unit is specifically used for:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication response further includes second integrity verification data, where the second integrity verification data is used to verify message integrity of the first authentication response;
  • the processing unit 702 is specifically used for:
  • processing unit 702 is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • a first association threshold is preset in the above device, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the service capacity that the above-mentioned device can provide.
  • the above-mentioned device can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the above-mentioned device, ensuring that Stable operation of the services provided by the above devices.
  • the communication unit 701 is further configured to:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • processing unit 702 is further configured to:
  • the first authentication failure counter is reset.
  • processing unit 702 is further configured to:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • processing unit 702 is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times it is, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the first blacklist exceeds a certain threshold, it can be permanently added to the first blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered as high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here. This application does not specifically limit the number of device types, which can be designed according to specific scenarios.
  • the step of sending the first authentication request to the second node is not performed.
  • each unit may also correspond to the corresponding description of an embodiment shown in FIG. 3 or FIG. 5 .
  • the apparatus 70 may be the first node in the embodiment shown in FIG. 3 or FIG. 5 .
  • FIG. 8 is a schematic structural diagram of an association apparatus 80 provided by an embodiment of the present application.
  • the apparatus 80 may be a node, or may be a device in a node, such as a chip or an integrated circuit, and the apparatus 80 may be It includes a processing unit 801 and a communication unit 802 . Among them, the description of each unit is as follows:
  • the processing unit 801 determines that the identity of the first node is credible, and sends a first association request to the first node through the communication unit 802;
  • the communication unit 802 is further configured to receive a first authentication request from the first node, where the first authentication request includes first identity authentication information;
  • the processing unit 801 is further configured to verify the first identity authentication information according to the shared key between the second node and the first node;
  • the communication unit 802 is further configured to send a first authentication response to the first node if the verification of the first identity authentication information is passed, where the first authentication response includes the second identity authentication information; wherein , the second identity authentication information is generated according to the shared key.
  • the above-mentioned device after confirming that the identity of the first node is credible, sends the first association request to the first node. Then, according to the first identity authentication information in the first authentication request, the identity authentication information of the first node is verified by the shared key, and after the verification is passed, the second identity authentication information is sent to the first node.
  • the second identity authentication information It can be used for the first node to verify the identity of the above-mentioned device.
  • the division of the above-mentioned multiple units is only a logical division based on functions, and does not limit the specific structure of the apparatus 80 .
  • some of the 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 80 is in the associated control
  • the general process performed in the process is the same.
  • the above-mentioned communication unit 802 can also be transformed into a receiving unit and a sending unit, the receiving unit is used to realize the function of receiving messages in the communication unit 802, and the sending unit is used to realize the function of sending messages in the communication unit 802.
  • 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.
  • processing unit 801 is specifically configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to a blacklist or a whitelist, and the above device can be controlled not to send an association request to an untrusted first node, thereby preventing the above device from establishing an association with an illegal attacker, and improving the performance of the above device. data security.
  • processing unit 801 is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication request further includes first integrity verification data, where the first integrity verification data is used to verify message integrity of the first authentication request;
  • the processing unit 801 is further configured to:
  • processing unit 801 is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the above device, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the device can be associated with.
  • the device can no longer be associated with other nodes, so as to avoid affecting the communication of other nodes associated with the device, ensuring that the device provided by the device provides stable operation of the service.
  • the communication unit 802 is further configured to:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the above-mentioned device can receive the first association response from the first node, and the association response is used to indicate the above-mentioned
  • the apparatus establishes an association with the second node. Further, the first response message can inform that the above-mentioned apparatus has been successfully associated, and subsequent communication can be performed.
  • processing unit 801 is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • processing unit 801 is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above-mentioned apparatus from establishing an association with an illegal attacker, and improving the data security of the above-mentioned apparatus.
  • processing unit 801 is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • processing unit 801 is further configured to determine that the value of the second authentication failure counter is less than a second threshold
  • the communication unit 802 is further configured to send a second association request to the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the processor is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • the processor is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times the identifier of the 1 is added to the second blacklist and the type of the first node is related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • each unit may also correspond to the corresponding description of an embodiment shown in FIG. 3 or FIG. 5 .
  • the apparatus 80 may be the second node in the embodiment shown in FIG. 3 or FIG. 5 .
  • FIG. 9 is a schematic structural diagram of a communication apparatus 90 provided by an embodiment of the present application.
  • the communication apparatus 90 may be a node, or may be a device in a node, such as a chip or an integrated circuit.
  • the apparatus 90 may include at least one memory 901 and at least one processor 902 .
  • a bus 903 may also be included.
  • a communication interface 904 may also be included, wherein the memory 901 , the processor 902 and the communication interface 904 are connected through a bus 903 .
  • the memory 901 is used to provide a storage space, and data such as an operating system and a computer program can be stored in the storage space.
  • the memory 901 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 902 is a module that performs arithmetic operations and/or logical operations, and specifically can be a central processing unit (central processing unit, CPU), a graphics processing unit (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
  • graphics processing unit graphics processing unit
  • microprocessor microprocessor unit, MPU
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • CPLD Complex Programmable Logic Device
  • the communication interface 904 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 1104 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 902 in the device 90 is configured to read the computer program stored in the memory 901 for executing the aforementioned association control method, such as the association control method described in FIG. 3 or FIG. 5 .
  • the processor 902 in the device 90 is configured to read the computer program stored in the memory 901 to perform the following operations:
  • the second node Determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication interface 904, where the first authentication request includes first identity authentication information, and the first identity authentication information is based on The shared key of the first node and the second node is generated; wherein, the shared key can be regarded as the first secret value shared between the first node and the second node;
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the device 90 verifies the identity of the second node according to the shared key with the second node. In this way, even if the attacker modifies the identity identifier and bypasses the step of determining that the identity is credible by the above-mentioned device 90, since it is difficult to forge the identity verification information, the identity verification of the above-mentioned device 90 cannot be passed, thereby avoiding the above-mentioned device 90. 90 is associated with an illegal attacker, which improves the data security of the above-mentioned device 90 .
  • the above-mentioned device 90 will update the number of verification failures, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined. for credible.
  • the above-mentioned apparatus 90 may no longer process the association request thereof (eg, send an authentication request), thereby preventing the above-mentioned apparatus 90 from crashing due to processing a large number of requests and ensuring normal service.
  • processor 902 is specifically configured to:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above-mentioned device 90 controls the node requesting association according to the blacklist or whitelist, so that the untrusted second node does not need to be authenticated.
  • the association between the above-mentioned apparatus 90 and an illegal attacker is avoided, and the data security of the above-mentioned apparatus 90 is improved.
  • processor 902 is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication response further includes second integrity verification data, where the second integrity verification data is used to verify message integrity of the first authentication response;
  • the processor 902 is further configured to determine that the message integrity check of the first authentication response passes.
  • processor 902 is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • the device 90 is preset with a first association threshold, and when the number of associated nodes is less than or equal to the preset first association threshold, the association request from the second node can be received.
  • the first threshold can limit the service capacity that the node can provide.
  • the above-mentioned device 90 can no longer receive or process the association request, so as to avoid affecting the communication of other nodes associated with the above-mentioned device 90 and ensure This ensures the stable operation of the services provided by the above-mentioned device 90 .
  • processor 902 is further configured to:
  • a first association response is sent to the second node through the communication interface 904, where the first association response is used to instruct the first node to establish a relationship with the second node association.
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus 90 to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • processor 902 is further configured to:
  • the first authentication failure counter is reset.
  • processor 902 is further configured to:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above-mentioned apparatus 90 from establishing association with an illegal attacker, and improving the data security of the above-mentioned apparatus 90 .
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • processor 902 is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the blacklist may be related to the number of times the second node joins the blacklist. The length of the list will also get longer and longer. Further optionally, when the number of times it is added to the blacklist exceeds a certain threshold, it can be permanently added to the blacklist.
  • the validity period of the blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered to be low-risk devices. If the second node belongs to mobile phones, computers, etc., it can be considered to be high-risk devices.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the above-mentioned apparatus 90 may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here.
  • the step of sending the first authentication request to the second node is not performed.
  • each unit may also correspond to the corresponding description of an embodiment shown in FIG. 3 or FIG. 5 .
  • the communication device 90 may be the first node in the embodiment shown in FIG. 3 or FIG. 5 .
  • FIG. 10 is a schematic structural diagram of a communication apparatus 100 provided by an embodiment of the present application.
  • the communication apparatus 100 may be a node or a device in a node, such as a chip or an integrated circuit.
  • the apparatus 100 may include at least one memory 1001 and at least one processor 1002 .
  • a bus 1003 may also be included.
  • a communication interface 1004 may also be included, wherein the memory 1001 , the processor 1002 and the communication interface 1004 are connected through a bus 1003 .
  • the memory 1001 is used to provide a storage space, and data such as an operating system and a computer program can be stored in the storage space.
  • the memory 1001 may be one or a combination of more of RAM, ROM, EPROM, CD-ROM, and the like.
  • the processor 1002 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 1004 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 1104 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 1002 in the device 100 is configured to read the computer program stored in the memory 1001 to execute the aforementioned association control method, such as the association control method described in FIG. 3 or FIG. 5 .
  • the processor 1002 in the device 100 is configured to read the computer program stored in the memory 1001 to perform the following operations:
  • the first identity authentication information is verified according to the shared key between the second node and the first node; wherein the shared key is a secret value shared between the first node and the second node;
  • a first authentication response is sent to the first node, and the first authentication response includes the second identity authentication information; wherein the second identity authentication information is generated according to the shared key.
  • the apparatus 100 after confirming that the identity of the first node is credible, the apparatus 100 sends the first association request to the first node. Then, according to the first identity authentication information in the first authentication request, the identity authentication information of the first node is verified by the shared key, and after the verification is passed, the second identity authentication information is sent to the first node.
  • the second identity authentication information It can be used for the first node to verify the identity of the above-mentioned apparatus 100 .
  • processor 1002 is further configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to the blacklist or whitelist, and the above-mentioned apparatus 100 can be controlled not to send an association request to the untrusted first node, thereby preventing the above-mentioned apparatus 100 from establishing an association with an illegal attacker, and improving the performance of the system.
  • processor 1002 is further configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • the first authentication request further includes first integrity verification data, where the first integrity verification data is used to verify message integrity of the first authentication request;
  • the processor is further configured to determine that the message integrity check of the first authentication request passes.
  • processor 1002 is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • the apparatus 100 is preset with a second association threshold, and when the number of associated nodes is less than or equal to the preset second association threshold, an association request can be sent to the first node.
  • the second threshold can limit the number of nodes that the above-mentioned apparatus 100 can associate with.
  • the above-mentioned apparatus 100 can no longer associate with other nodes, so as to avoid affecting the communication of other nodes associated with the above-mentioned apparatus 100, ensuring the above-mentioned Stable operation of the services provided by the device 100 .
  • processor 1002 is further configured to:
  • a first association response is received from the first node, the first association response being used to instruct the first node to establish an association with the second node.
  • the above-mentioned apparatus 100 receives the first association response from the first node, and the association response is used to indicate the first A node is associated with a second node. Further, the first response message can inform the above-mentioned apparatus 100 that the association has been successful, and subsequent communication can be performed.
  • processor 1002 is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • processor 1002 is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the above-mentioned apparatus 100 updates the number of times of failure to verify the identity of the first node, and the number of times of verification failure can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the device 100 by modifying an identity such as an identity, thereby preventing the device 100 from establishing an association with an illegal attacker, and improving the data security of the device 100 .
  • processor 1002 is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above-mentioned apparatus 100 from establishing association with an illegal attacker and improving the data security of the above-mentioned apparatus 100 .
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • processor 1002 is further configured to:
  • a second association request is sent to the first node.
  • the authentication of the authentication information may also fail. Therefore, if the number of verification failures for the first node has not exceeded the preset second threshold, an association request can be re-sent to the first node to request association with the first node, thereby improving the robustness of the system and ensuring Stable operation of the services provided by the above-mentioned apparatus 100 .
  • the processor 1002 is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • processor 1002 is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. At least one of the number of times the identifier of the 1 is added to the second blacklist and the type of the first node is related.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the above-mentioned apparatus 100 may further predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here.
  • the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • each module may also correspond to the corresponding description of an embodiment shown in FIG. 3 or FIG. 5 .
  • the communication apparatus 100 may be the second node in the embodiment shown in FIG. 3 or FIG. 5 .
  • FIG. 11 is a schematic structural diagram of an association control apparatus 110 provided by an embodiment of the present application.
  • the apparatus 110 may be a node, or may be a device in a node, such as a chip or an integrated circuit.
  • the apparatus 110 A communication unit 1101 and a processing unit 1102 may be included. Among them, the description of each unit is as follows:
  • a communication unit 1101 configured to receive a first association request from a second node
  • the processing unit 1102 is configured to determine that the identity of the second node is credible, and send a first authentication request to the second node through the communication unit 1101, where the first authentication request includes first integrity verification data ;
  • the communication unit 1101 is further configured to receive a first authentication response from the second node, where the first authentication response includes second integrity verification data;
  • the processing unit 1102 is further configured to verify the message integrity of the first authentication response according to the second integrity verification data
  • the processing unit 1102 is further configured to update a first authentication failure counter if the verification of the message integrity of the first authentication response fails, where the first authentication failure counter represents a verification failure for the second node number of times.
  • the above-mentioned device after confirming that the identity of the second node is credible, the above-mentioned device also needs to perform message integrity verification on the authentication response message from the second node before performing the association. If the message integrity verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, thereby preventing attackers from tampering with data in the authentication process (such as identity authentication information). ), thereby preventing the above-mentioned apparatus from establishing an association with an illegal attacker, and improving the data security of the above-mentioned apparatus.
  • processing unit 1102 is specifically configured to:
  • first confirmation indication information represents that the identity of the second node is credible, wherein the identity of the second node is not in the first blacklist
  • first confirmation indication information where the first confirmation indication information indicates that the identity of the second node is credible; wherein the identifier of the second node is not in the first blacklist and not in the first whitelist.
  • the above device controls the node requesting association according to the blacklist or whitelist, thereby eliminating the need to perform identity authentication on the untrusted second node, preventing the node from establishing association with an illegal attacker, and improving the data security of the node.
  • processing unit 1102 is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the second node is in the first whitelist;
  • the identifier of the second node is not in the first blacklist, the type of the shared key between the first node and the second node is a password generation type, and the identifier of the second node is not in the first whitelist, obtain first confirmation indication information, where the first confirmation indication information indicates that the identity of the second node is credible.
  • processing unit 1102 is further configured to:
  • the first association quantity is less than or equal to a preset first association threshold, wherein the first association quantity represents the number of currently associated nodes.
  • a first association threshold is preset in the above device, and the association request from the second node can be received only when the number of associated nodes is less than or equal to the preset first association threshold.
  • the first threshold can limit the capacity of the services that the above-mentioned device can provide.
  • the above-mentioned device can no longer receive or process association requests, so as to avoid affecting the communication of other nodes associated with the above-mentioned device, ensuring that Stable operation of the services provided by the above devices.
  • processing unit 1102 is further configured to:
  • a first authentication failure counter is updated, and the first authentication failure counter represents the number of times of verification failures for the second node.
  • the device verifies the identity of the second node according to the shared key with the second node. If the verification fails, the number of verification failures is updated, and the number of verification failures can be used to subsequently determine whether the identity of the second node is credible, so that a node that fails multiple verifications can no longer be determined to be credible. For nodes that are not confirmed as trusted, their association requests can no longer be processed (such as sending an authentication request), thereby preventing nodes from crashing due to processing a large number of requests, and ensuring normal service.
  • the communication unit 1101 is further configured to:
  • a first association response is sent to the second node, where the first association response is used to instruct the first node to establish an association with the second node.
  • a first association response can be sent to the second node, and the association response is used to instruct the above-mentioned apparatus to establish an association with the second node. Further, the first response message can be used to inform the second node that the association has been successful and can communicate.
  • processing unit 1102 is further configured to:
  • the first authentication failure counter is reset.
  • processing unit 1102 is further configured to:
  • the value of the first authentication failure counter is greater than or equal to the first threshold, and the identifier of the second node is added to the first blacklist.
  • the number of verification failures for the second node exceeds the preset first threshold, it indicates that the second node has failed the verification for many times, and the second node may be an attacker who frequently sends association requests, so the The identifier of the second node is added to the blacklist. After being added to the blacklist, the identity of the second node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the first blacklist is a predefined or configured first duration.
  • the first duration of the blacklist may be one week, and when the identifier of a second node is added to the blacklist for one week, it may be removed from the blacklist.
  • processing unit 1102 is further configured to:
  • the identifier of the second node is removed from the first blacklist, and the first duration is the same as that of the second node. At least one of the number of times the identifier of the 1 is added to the first blacklist and the type of the second node is related.
  • the validity period of the first blacklist may be related to the number of times the second node joins the first blacklist. The more times the list is listed, the longer it will stay in the first blacklist. Further optionally, when the number of times it is added to the first blacklist exceeds a certain threshold, it can be permanently added to the first blacklist.
  • the validity period of the first blacklist may be related to the device type to which the second node belongs.
  • the second node may obtain the device type of the second node in advance, and determine different blacklist validity periods according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the second node belongs to microphones, speakers, etc., it can be considered as a low-risk device. If the second node belongs to a mobile phone, a computer, etc., it can be considered as a high-risk device.
  • the blacklist validity period for devices is longer than that for low-risk devices.
  • the first node may further predefine the validity period of the blacklist corresponding to the second node, which will not be repeated here. In yet another possible implementation manner, if the identity of the second node is not trusted, the step of sending the first authentication request to the second node is not performed.
  • the division of the above-mentioned multiple units is only a logical division based on functions, and does not limit the specific structure of the apparatus 110 .
  • 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 110 is in the associated control
  • the general process performed in the process is the same.
  • the above-mentioned communication unit can also be transformed into a receiving unit and a sending unit, the receiving unit is used to realize the function of receiving messages in the communication unit, and the sending unit is used to realize the function of sending messages in the 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.
  • each unit may also correspond to the corresponding description with reference to the embodiment shown in FIG. 6 .
  • the apparatus 110 may be the first node in the embodiment shown in FIG. 6 .
  • FIG. 12 is a schematic structural diagram of an association control apparatus 120 provided by an embodiment of the present application.
  • the apparatus 120 may be a node, or may be a device in a node, such as a chip or an integrated circuit.
  • the apparatus 120 A processing unit 1201 and a communication unit 1202 may be included. Among them, the description of each unit is as follows:
  • a processing unit 1201 configured to determine that the identity of the first node is credible, and send a first association request to the first node through the communication unit 1202;
  • the communication unit 1202 is further configured to receive a first authentication request from the first node, where the first authentication request includes first identity authentication information and first integrity verification data;
  • the processing unit 1201 is further configured to verify the message integrity of the first authentication request according to the first integrity verification data
  • the communication unit 1202 is further configured to send a first authentication response to the first node if the verification of the message integrity of the first authentication request passes, where the first authentication response includes a second integrity check. test data.
  • the above-mentioned device after confirming that the identity of the second node is credible, the above-mentioned device also needs to authenticate the first node (for example, through identity verification information, etc.) before communicating.
  • the first node for example, through identity verification information, etc.
  • processing unit 1201 is specifically configured to:
  • second confirmation indication information is obtained, where the second confirmation indication information indicates that the identity of the first node is credible; wherein the identifier of the first node is not in the second blacklist and is not in the second whitelist.
  • the associated nodes can be controlled according to a blacklist or a whitelist, and the above device can be controlled not to send an association request to an untrusted first node, thereby preventing the above device from establishing an association with an illegal attacker, and improving the performance of the above device. data security.
  • processing unit 1201 is specifically configured to:
  • the type of the shared key between the first node and the second node is a pre-configured type, determine that the identifier of the first node is in the second whitelist;
  • Second confirmation indication information If the identifier of the first node is not in the second blacklist, the type of the shared key between the first node and the second node is the password generation type, and the identifier of the first node is not in the second whitelist, obtain Second confirmation indication information, where the second confirmation indication information indicates that the identity of the second node is credible.
  • processing unit 1201 is further configured to:
  • the second association quantity is less than or equal to a preset second association threshold, wherein the second association quantity represents the number of currently associated nodes.
  • a second association threshold is preset in the above device, and an association request can be sent to the first node only when the number of associated nodes is less than or equal to the preset second association threshold.
  • the second threshold can limit the number of nodes that the device can associate with. When the second association threshold is exceeded, the device can no longer associate with other nodes, so as to avoid affecting the communication of other nodes associated with the device. stable operation of the service.
  • the communication unit 1202 is further configured to:
  • a first association response from the first node is received, where the first association response is used to instruct the first node to establish an association with the second node.
  • the above-mentioned device can receive the first association response from the first node, and the association response is used to indicate the above-mentioned
  • the apparatus establishes an association with the second node. Further, the first response message can inform that the above-mentioned apparatus has been successfully associated, and subsequent communication can be performed.
  • processing unit 1201 is further configured to:
  • a second authentication failure counter is reset, the second authentication failure counter representing the number of authentication failures for the first node.
  • processing unit 1201 is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the message integrity verification of the first authentication response fails, it means that the first authentication response message is no longer complete or has been modified by an attacker, so update the number of failed verifications for the first node, The number of verification failures can be used to subsequently determine whether the identity of the first node is credible.
  • the first authentication request message further includes first identity authentication information
  • the processing unit 1201 is further configured to verify the message integrity of the first authentication response if the verification of the message integrity of the first authentication response is passed. , the first identity verification information is verified according to the shared key with the first node;
  • the communication unit 1202 is further configured to send the first authentication response to the first node if the verification of the first identity verification information is passed.
  • processing unit 1201 is further configured to:
  • a second authentication failure counter is updated, and the second authentication failure counter represents the number of times of verification failures for the first node.
  • the processing unit 1201 is further configured to:
  • the identifier of the first node is added to the second blacklist.
  • the number of verification failures for the first node exceeds the preset second threshold, it indicates that the first node has failed the verification for many times, and the first node may be an attacker who frequently sends authentication requests, so the The identifier of the first node is added to the blacklist. After being added to the blacklist, the identity of the first node will not be determined to be credible, thereby preventing the above device from establishing association with an illegal attacker, and improving the data security of the node.
  • the validity period of the second blacklist is a predefined or configured second duration.
  • the second duration of the blacklist may be 10 days, and when the identifier of a first node is added to the blacklist for 10 days, it may be removed from the blacklist.
  • processing unit 1201 is further configured to determine that the value of the second authentication failure counter is less than a second threshold
  • the communication unit is further configured to send a second association request to the first node.
  • the above-mentioned device updates the number of times that the identity of the first node fails to be verified, and the number of verification failures can be used to subsequently determine whether the identity of the node is credible. Therefore, it is difficult for an attacker to bypass the association control of the first node by modifying an identity such as an identity, thereby preventing the above device from establishing an association with an illegal attacker, and improving the data security of the node.
  • processing unit 1201 is further configured to:
  • a second association request is sent to the first node.
  • the third confirmation indication information may be indication information obtained according to the confirmation operation input by the user, and the confirmation operation may be for the output prompt information confirm.
  • prompt information can be output to remind the user that the verification fails and the association request needs to be re-initiated.
  • the second association request is sent to the first node. In this way, the user can verify the identity of the first node that needs to be re-associated, thereby avoiding association with an untrusted node and ensuring the security of communication.
  • processing unit 1201 is further configured to:
  • the time when the identifier of the first node is added to the second blacklist exceeds a second duration, the identifier of the first node is removed from the second blacklist, and the second duration is the same as that of the first node. It is related to the number of times that the identifier of 1 is added to the second blacklist and the type of the first node.
  • the validity period of the second blacklist may be related to the number of times the first node joins the blacklist, and the number of times that a certain first node joins the second blacklist. The more it is, the longer it will be on the second blacklist. Further optionally, when the number of times it is added to the second blacklist exceeds a certain threshold, it can be permanently added to the second blacklist.
  • the validity period of the second blacklist may be related to the device type to which the first node belongs.
  • the first node may obtain the device type of the first node in advance, and determine different validity periods of the second blacklist according to different device types.
  • the device type may include high-risk devices or low-risk devices. If the first node belongs to a smart cockpit controller CDC, a virtual reality device AR, etc., it can be considered as a low-risk device. If the first node belongs to a server, a computer, etc., it can be considered that It is a high-risk device, and the validity period of the blacklist of high-risk devices is longer than that of low-risk devices.
  • the second node may also predefine the validity period of the blacklist corresponding to the first node, which will not be repeated here. a In yet another possible implementation manner, if the identity of the first node is not trusted, the step of sending the first association request to the first node is not performed.
  • the identity authentication request will not be sent to the first node, so as to avoid wasting the resources of the node.
  • the division of the above-mentioned multiple units is only a logical division based on functions, and does not limit the specific structure of the apparatus 120 .
  • some of the 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 120 is associated with control
  • the general process performed in the process is the same.
  • the above-mentioned communication unit can also be transformed into a receiving unit and a sending unit, the receiving unit is used to realize the function of receiving messages in the communication unit, and the sending unit is used to realize the function of sending messages in the 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.
  • each unit may also correspond to the corresponding description with reference to the embodiment shown in FIG. 6 .
  • the device 120 may be the second node in the embodiment shown in FIG. 6 .
  • 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.
  • the communication device 130 may include at least one memory 1301 and at least one processor 1302 .
  • a bus 1303 may also be included.
  • a communication interface 1304 may also be included, wherein the memory 1301 , the processor 1302 and the communication interface 1304 are connected through a bus 1303 .
  • the memory 1301 is used to provide a storage space, and data such as an operating system and a computer program can be stored in the storage space.
  • the memory 1301 may be one or a combination of RAM, ROM, EPROM, CD-ROM, and the like.
  • the processor 1302 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 1304 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 1304 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 1302 in the communication device 130 is configured to read the computer program stored in the memory 1301 to execute the aforementioned association control method, such as the association control method described in FIG. 6 .
  • the specific implementation may correspond to the corresponding description with reference to the embodiment shown in FIG. 6 .
  • the communication apparatus 130 may be the first node in the embodiment shown in FIG. 6 .
  • FIG. 14 is a schematic structural diagram of a communication apparatus 140 provided by an embodiment of the present application.
  • the communication device 140 may include at least one memory 1401 and at least one processor 1402 .
  • a bus 1403 may also be included.
  • a communication interface 1404 may also be included, wherein the memory 1401 , the processor 1402 and the communication interface 1404 are connected through a bus 1403 .
  • the memory 1401 is used to provide a storage space, and data such as an operating system and computer programs can be stored in the storage space.
  • Memory 1401 may be one or a combination of more of RAM, ROM, EPROM, CD-ROM, and the like.
  • the processor 1402 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 1404 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 1304 may further include a transmitter (eg, a radio frequency transmitter, an antenna, etc.), or a receiver, etc., coupled with the interface.
  • the processor 1402 in the communication device 140 is configured to read the computer program stored in the memory 1401 to execute the aforementioned association control method, such as the association control method described in FIG. 6 .
  • the specific implementation may correspond to the corresponding description with reference to the embodiment shown in FIG. 6 .
  • the communication device 140 may be the second node in the embodiment shown in FIG. 6 .
  • 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. 5 is performed. Or the method described in any one of the embodiments shown in FIG. 6 .
  • An embodiment of the present application further provides a chip system, where the chip system includes at least one processor, a memory, and an interface circuit, where the interface circuit is used to provide information input/output for the at least one processor, and the at least one processor
  • a computer program is stored in the memory, and 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. 5 or FIG. 6 .
  • 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), and the first node is any one shown in FIG. 3 , FIG. 5 , or FIG. 6 .
  • a first node in an embodiment.
  • 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. 5 or FIG. 6 .
  • An embodiment of the present application also provides a vehicle, the vehicle includes a first node (eg, a car cockpit domain controller CDC). Further, the vehicle further includes a second node (for example, at least one of a camera, a screen, a microphone, a sound system, a radar, an electronic key, a keyless entry or a starting system controller, etc.), wherein the above-mentioned first node is a 3.
  • the first node in any one of the embodiments shown in FIG. 5 or FIG. 6 and the above-mentioned second node is the second node in any one of the embodiments shown in FIG. 3 , FIG. 5 or FIG. 6 .
  • the embodiments of the present application further provide a computer program product, when the computer program product is run on one or more processors, it can execute any one of the embodiments described in FIG. 3 , FIG. 5 or FIG. 6 . the associated control method.
  • the above-mentioned vehicle may also be replaced with an intelligent terminal such as a drone, a robot, or a transportation tool.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions 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.
  • 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.

Abstract

一种关联方法及装置,应用于短距离通信。方法包括:确定第二节点的身份可信(S303),向第二节点发送第一认证请求(S304),第一认证请求中包括根据共享密钥生成的第一身份认证信息;接收来自第二节点的第一认证响应,第一认证响应中包括第二身份认证信息;根据共享密钥验证第二身份认证信息(S307);若验证失败,则更新第一认证失败计数器(S308)。能够防止节点与非法的攻击者建立关联,保护节点的数据安全。

Description

一种关联控制方法及相关装置 技术领域
本发明涉及通信技术领域,尤其涉及短距离通信技术领域,例如座舱域通信。具体涉及一种用于通信安全管理的关联控制方法及相关装置。
背景技术
在信息化飞速发展的今天,移动终端,不管是手机、平板还是其他可携带式智能终端,都是我们不可缺少的重要个人智能工具,我们在享受着信息化带来的便利的同时,也面临着安全漏洞和隐私泄露的威胁。以智能汽车为例,随着车辆通信的广泛应用,车辆通信也给汽车带来了一系列的安全隐患。例如,通过现有的短距离通信技术(例如无线保真Wi-Fi、蓝牙等),黑客可能入侵车载信息系统,获取车辆信息,甚至远程操控汽车,对用户隐私以及车辆安全具有极高的威胁性,全球数百万台汽车受影响。再如,拒绝服务(Denial of Service,DoS)是车辆通信过程中最常见也最容易收到的一种攻击行为,其攻击者会故意的攻击网络协议实现的缺陷或直接通过野蛮手段残忍地耗尽被攻击对象(例如车辆中的控制中心)的资源,使被攻击对象无法提供正常的服务、停止响应甚至崩溃。其中,身份验证洪水(Auth Flood)攻击是DOS攻击中的一种,攻击者将向关联的节点发送大量的请求帧,当节点收到大量的请求帧,超过所能承受的处理能力时,将导致节点瘫痪,无法继续提供正常服务,进而影响其它节点与该节点的通信。因此,为了保证通信的安全性,节点的关联控制至关重要。
现有技术中,通过白名单或者黑名单技术可以对请求关联的节点做出限制,具体可以为,若A节点的标识在B节点的白名单中,则B节点会接收来自A节点的关联请求,然后进行关联。相应的,若C节点的标识在B节点的黑名单中,则B节点可以不接收来自C节点的关联请求,或者拒绝进行关联。具体例如,蓝牙通信过程中,蓝牙设备通过建立白名单,可以使得该蓝牙设备和特定的蓝牙设备(即白名单中列出的蓝牙设备)建立关联。但是,白名单或者黑名单通常是靠标识(如设备地址)去过滤的,攻击者可以将自己的标识修改为受信任的标识,使节点不能辨别非法的攻击者,导致节点可能与攻击者建立关联,威胁节点的数据安全。
因此,如何防止节点与非法的攻击者建立关联是本领域技术人正在研究的热点问题。
发明内容
本申请实施例公开了一种关联控制方法及相关装置,能够防止节点与非法的攻击者建立关联,保护节点的数据安全。
第一方面,本申请实施例提供一种关联控制方法,该方法包括:
接收来自第二节点的第一关联请求;
确定所述第二节点的身份可信,向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;其中,共享密钥可以看作是第一节点与第二节点之间共享的第一个秘密值;
接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
根据所述共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,在确认第二节点的身份可信后,还需要根据第一节点与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了“确定身份可信”这一步骤,由于难以伪造身份验证信息,还是无法通过第一节点对其的身份验证,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
进一步的,若验证不通过,会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再对其的关联请求进行处理(如发送认证请求),从而防止节点由于处理大量请求而崩溃,保证了节点所提供的服务正常进行。
在第一方面的一种可能的实施方式中,所述确定所述第二节点的身份可信,包括:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述方法中,可以根据通过黑名单或者白名单对请求关联的节点进行控制,从而无需对不可信的第二节点进行身份认证,一方面,可以防止由于处理大量请求而崩溃,保证了服务正常进行。另一方面,由于不会与没有经过身份认证的节点建立关联,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第一方面的又一种可能的实施方式中,所述确定所述第二节点的身份可信,包括:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在第一方面的又一种可能的实施方式中,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;所述方法还包括:
确定所述第一认证响应的消息完整性校验通过。
可以看出,在确认第二节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证响应中的内容被攻击者篡改,从而避免影响对第二节点的身份验证信息的验证,保障了节点所提供的服务的稳定运行。
在第一方面的又一种可能的实施方式中,所述接收来自第二节点的第一关联请求之前,还包括:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
上述方法中,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一关联阈值可以限制节点所能提供的服务的承受量,当超过第一关联阈值时,节点可以不再接收或者处理关联请求,避免影响与该节点关联的其它节点的通信,保障了节点所提供的服务的稳定运行。
在第一方面的又一种可能的实施方式中,所述方法还包括:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在第一方面的又一种可能的实施方式中,所述方法还包括:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障了节点所提供的服务的稳定运行。
在第一方面的又一种可能的实施方式中,若根据所述共享密钥验证所述第二身份信息验证不通过,则更新第一认证失败计数器之后,所述方法还包括:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第一方面的又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在第一方面的又一种可能的实施方式中,所述方法还包括:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越 多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过某一阈值以后,可以永久加入第一黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。在第一方面的又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证,避免浪费节点的资源,影响其它节点的正常关联。
第二方面,本申请实施例还提供一种关联方法,包括:
确定第一节点的身份可信,向所述第一节点发送第一关联请求;
接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;其中,共享密钥是第一节点与第二节点之间共享的一个秘密值;
若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
本申请实施例中,在确认第一节点的身份可信后,再向第一节点发送第一关联请求。然后根据第一认证请求中的第一身份认证信息,通过共享密钥验证第一节点的身份认证信息,在验证通过以后,再向第一节点发送第二身份认证信息,该第二身份认证信息可以用于第一节点验证第二节点的身份。可以看出,再确认身份可信以后,还需要双方身份认证通过才可以进行关联,从而可以使得攻击者难以通过修改标识等身份绕过第二节点对其的身份验证,进而避免了第二节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第二方面的一种可能的实施方式中,所述确定所述第一节点的身份可信,包括:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制节点不向不可信的第一节点发送关联请求,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第二方面的又一种可能的实施方式中,所述确定所述第一节点的身份可信,包括:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的 标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在第二方面的又一种可能的实施方式中,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
所述方法还包括:
确定所述第一认证请求的消息完整性校验通过。
可以看出,在确认第一节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证请求中的内容被攻击者篡改,从而避免影响对第一节点的身份验证信息的验证,保障了节点所提供的服务的稳定运行。
在第二方面的又一种可能的实施方式中,所述确定第一节点的身份可信,向所述第一节点发送第一关联请求之前,还包括:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
上述方法中,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制节点所能关联的节点的数量,当超过第二关联阈值时,节点不能再关联其它节点,避免影响与该节点关联的其它节点的通信,保障了节点所提供的服务的稳定运行。
在第二方面的又一种可能的实施方式中,所述方法还包括:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,第二节点接收到来自第一节点的第一关联响应,该关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以告知第二节点已经关联成功,可以进行后续的通信。
在第二方面的又一种可能的实施方式中,所述方法还包括:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,从而保障了节点所提供的服务的稳定运行。
在第二方面的又一种可能的实施方式中,所述方法还包括:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则更新验证第一节点的身份 失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第二方面的又一种可能的实施方式中,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第二方面的又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在第二方面的又一种可能的实施方式中,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
确定所述第二认证失败计数器的值小于第二阈值,
向所述第一节点发送第二关联请求。
可以理解的是,在身份认证信息验证过程中,由于某些参数在传输过程中被丢失或者传输错误,可能也会导致身份认证信息验证失败。因此,若针对第一节点的验证失败的次数还没有超过预设的第二阈值,可以重新向第一节点发送关联请求,请求与该节点进行关联,从而提高系统的鲁棒性,保障了节点所提供的服务的稳定运行。
在第二方面的又一种可能的实施方式中,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在第二方面的又一种可能的实施方式中,所述方法还包括:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的 次数、所述第一节点的类型中的至少一项有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。
在第二方面的又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
第三方面,本申请实施例还提供一种关联控制装置,包括:
通信单元,用于接收来自第二节点的第一关联请求;
处理单元,用于确定所述第二节点的身份可信,通过所述通信单元向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;
所述通信单元,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
所述处理单元,还用于根据所述共享密钥验证所述第二身份认证信息;
所述处理单元,还用于若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置在确认第二节点的身份可信后,再根据与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了上述装置确定身份可信这一步骤,由于难以伪造身份验证信息,还是无法通过上述装置对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
进一步的,若验证不通过,上述装置会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,上述装置可以不再对其的关联请求进行处理(如发送认证请求),从而防止上述装置由于处理大量请求而崩溃,保证了服务正常进行。
在第三方面的一种可能的实施方式中,所述处理单元,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信, 其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置根据通过黑名单或者白名单对请求关联的节点进行控制,从而使得无需对不可信的第二节点进行身份认证,一方面,可以防止由于处理大量请求而崩溃,保证了服务正常进行。另一方面,由于不会与没有经过身份认证的节点建立关联,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第三方面的又一种可能的实施方式中,所述处理单元702,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在第三方面的又一种可能的实施方式中,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;
所述处理单元,具体用于:
确定所述第一认证响应的消息完整性校验通过。
可以看出,在确认第二节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证响应中的内容被攻击者篡改,从而避免影响对第二节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在第三方面的又一种可能的实施方式中,所述处理单元,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制上述装置所能提供的服务的承受量,当超过第一关联阈值时,上述装置可以不再接收或者处理关联请求,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第三方面的又一种可能的实施方式中,所述通信单元,还用于:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在第三方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障上述装置所提供的服务的稳定运行。
在第三方面的又一种可能的实施方式中,所述处理单元,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第三方面的又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在第三方面的又一种可能的实施方式中,该处理单元,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过某一阈值以后,可以永久加入第一黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。本申请不具体限定设备类型的数量,可以根据具体的场景设计。
在第三方面的又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置的资源,影响其它节点的正常关联。
第四方面,本申请实施例还提供一种关联装置,包括:
处理单元,确定第一节点的身份可信,通过通信单元向所述第一节点发送第一关联请求;
所述通信单元,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
所述处理单元,还用于根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;
所述通信单元,还用于若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
本申请实施例中,上述装置在确认第一节点的身份可信后,再向第一节点发送第一关联请求。然后根据第一认证请求中的第一身份认证信息,通过共享密钥验证第一节点的身份认证信息,在验证通过以后,再向第一节点发送第二身份认证信息,该第二身份认证信息可以用于第一节点验证上述装置的身份。可以看出,再确认身份可信以后,还需要双方身份认证通过才可以进行关联,从而可以使得攻击者难以通过修改标识等身份绕过第二节点对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第四方面的一种可能的实施方式中,所述处理单元,具体用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置不向不可信的第一节点发送关联请求,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第四方面的又一种可能的实施方式中,所述处理单元,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在第四方面的又一种可能的实施方式中,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
所述处理单元,还用于:
确定所述第一认证请求的消息完整性校验通过。
可以看出,在确认第一节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证请求中的内容被攻击者篡改,从而影响对第 一节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在第四方面的又一种可能的实施方式中,所述处理单元,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置所能关联的节点的数量,当超过第二关联阈值时,上述装置不能再关联其它节点,避免影响与该装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第四方面的又一种可能的实施方式中,所述通信单元,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,上述装置可以接收到来自第一节点的第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以告知上述装置已经关联成功,可以进行后续的通信。
在第四方面的又一种可能的实施方式中,所述处理单元,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在第四方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第四方面的又一种可能的实施方式中,所述处理单元,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第四方面的又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有 效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在第四方面的又一种可能的实施方式中,所述处理单元,还用于确定所述第二认证失败计数器的值小于第二阈值;
所述通信单元,还用于向所述第一节点发送第二关联请求。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第四方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在第四方面的又一种可能的实施方式中,该处理器,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型中的至少一项有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。
在第四方面的又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
第五方面,本申请实施例还提供一种通信装置,所述装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现第一方面或者第一方面任意一种可能的实施方式所描述的方法。
在第五方面的一种可能的实施方式中,该至少一个处理器用于调用至少一个存储器中存储的计算机程序,用于执行以下操作:
通过通信接口接收来自第二节点的第一关联请求;
确定所述第二节点的身份可信,通过通信接口向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;其中,共享密钥可以看作是第一节点与第二节点之间共享的第一个秘密值;
通过通信接口接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
根据所述共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置在确认第二节点的身份可信后,再根据与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了上述装置确定身份可信这一步骤,由于难以伪造身份验证信息,还是无法通过上述装置对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
进一步的,若验证不通过,上述装置会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,上述装置可以不再对其的关联请求进行处理(如发送认证请求),从而防止上述装置由于处理大量请求而崩溃,保证了服务正常进行。
在第五方面的又一种可能的实施方式中,该处理器,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置根据通过黑名单或者白名单对请求关联的节点进行控制,从而使得无需对不可信的第二节点进行身份认证,一方面,可以防止由于处理大量请求而崩溃,保证了服务正常进行。另一方面,由于不会与没有经过身份认证的节点建立关联,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第五方面的又一种可能的实施方式中,该处理器,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的 标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在第五方面的又一种可能的实施方式中,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;
该处理器,还用于确定所述第一认证响应的消息完整性校验通过。
可以看出,在确认第二节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证响应中的内容被攻击者篡改,从而避免影响对第二节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在第五方面的又一种可能的实施方式中,该处理器,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制节点所能提供的服务的承受量,当超过第一关联阈值时,上述装置可以不再接收或者处理关联请求,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第五方面的又一种可能的实施方式中,该处理器,还用于:
若对所述第二身份认证信息的验证通过,通过通信接口向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在第五方面的又一种可能的实施方式中,该处理器,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在第五方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第五方面的又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有 效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在第五方面的又一种可能的实施方式中,该处理器,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与黑名单的有效期相关的因素,一方面,黑名单的有效期可以与第二节点加入黑名单的次数有关,某一第二节点加入的黑名单的次数越多,其在黑名单中的时长也会越来越长。进一步的可选的,当其被加入黑名单的次数超过某一阈值以后,可以永久加入黑名单。
另一方面,黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,上述装置还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。
在第五方面的又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置的资源,影响其它节点的正常关联。
第六方面,本申请实施例还提供一种通信装置,所述装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现第一方面或者第一方面任意一种可能的实施方式所描述的方法。
在第六方面的一种可能的实施方式中,该至少一个处理器用于调用至少一个存储器中存储的计算机程序,用于执行以下操作:
确定第一节点的身份可信,向所述第一节点发送第一关联请求;
接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;其中,共享密钥是第一节点与第二节点之间共享的一个秘密值;
若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
本申请实施例中,上述装置在确认第一节点的身份可信后,再向第一节点发送第一关联请求。然后根据第一认证请求中的第一身份认证信息,通过共享密钥验证第一节点的身份认证信息,在验证通过以后,再向第一节点发送第二身份认证信息,该第二身份认证信息可以用于第一节点验证上述装置的身份。可以看出,再确认身份可信以后,还需要双方身份认证通过才可以进行关联,从而可以使得攻击者难以通过修改标识等身份绕过上述装 置对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置不向不可信的第一节点发送关联请求,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在第六方面的又一种可能的实施方式中,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
该处理器,还用于确定所述第一认证请求的消息完整性校验通过。
可以看出,在确认第一节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证请求中的内容被攻击者篡改,从而影响对第一节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置所能关联的节点的数量,当超过第二关联阈值时,上述装置不能再关联其它节点,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对上述装置的身份验证通过,上述装置接收到来自第一节点的第一关联响应,该关联响应用于指示第一节点与第二 节点建立关联。进一步的,该第一响应消息可以告知上述装置已经关联成功,可以进行后续的通信。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过上述装置对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第六方面的又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第二认证失败计数器的值小于第二阈值,
向所述第一节点发送第二关联请求。
可以理解的是,在身份认证信息验证过程中,由于某些参数在传输过程中被丢失或者传输错误,可能也会导致身份认证信息验证失败。因此,若针对第一节点的验证失败的次数还没有超过预设的第二阈值,可以重新向第一节点发送关联请求,请求与第一节点进行关联,从而提高系统的鲁棒性,保障了上述装置所提供的服务的稳定运行。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在第六方面的又一种可能的实施方式中,该处理器,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型中的至少一项有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,上述装置还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。
在第六方面的又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
第七方面,本申请实施例还提供一种关联控制方法,该方法包括:
接收来自第二节点的第一关联请求;
确定所述第二节点的身份可信,向所述第二节点发送第一认证请求,所述第一认证请求中包括第一完整性校验数据;
接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二完整性校验数据;
根据所述第二完整性验证数据验证所述第一认证响应的消息完整性;
若对所述第一认证响应的消息完整性的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,在确认第二节点的身份可信后,进行关联之前还需要对来自第二节点的认证响应消息进行消息完整性验证。若消息完整性验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,从而可以防止攻击者篡改认证过程中的数据(如身份认证信息),进而避免了节点与非法的攻击者建立关联,提 高了节点的数据安全性。
在第七方面的一种可能的实施方式中,所述确定所述第二节点的身份可信,包括:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述方法中,可以根据通过黑名单或者白名单对请求关联的节点进行控制,从而无需对不可信的第二节点进行身份认证,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第七方面的一种可能的实施方式中,所述确定所述第二节点的身份可信,包括:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在第七方面的又一种可能的实施方式中,所述接收来自第二节点的第一关联请求之前,还包括:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,节点中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制节点所能提供的服务的承受量,当超过第一关联阈值时,节点可以不再接收或者处理关联请求,避免影响与该节点关联的其它节点的通信,保障了节点所提供的服务的稳定运行。
在第七方面的又一种可能的实施方式中,所述第一认证响应中还包括第二身份认证信息,所述方法还包括:
若对所述第一认证响应的完整性的验证通过,则根据与第二节点之间的共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
可以看出,在确认第二节点的身份可信之后,若完整性验证通过,则根据与第二节点的共享密钥验证第二节点的身份。若验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再对其的关联请求进行处理(如发送认证请求),从而防止节点由于处理大量请求而崩溃,保证了服务正常进行。
在第七方面的又一种可能的实施方式中,所述方法还包括:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在第七方面的又一种可能的实施方式中,所述方法还包括:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障了节点所提供的服务的稳定运行。
在第七方面的又一种可能的实施方式中,所述方法还包括:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第七方面的又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在第七方面的又一种可能的实施方式中,所述方法还包括:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入黑名单的次数超过某一阈值以后,可以永久加入黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。在第七方面的又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费节点的资源,影响其它节点的正常关联。
第八方面,本申请实施例还提供一种关联方法,包括:
确定第一节点的身份可信,向所述第一节点发送第一关联请求;
接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一完整性检验数据;
根据所述第一完整性验证数据验证所述第一认证请求的消息完整性;
若对所述第一认证请求的消息完整性的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二完整性校验数据。
本申请实施例中,在确认第二节点的身份可信后,在进行通信之前还需要对第一节点进行认证(例如通过身份验证信息等进行验证)。为了防止攻击者篡改认证过程中的数据,需要先对第一认证请求进行消息完整性验证。若消息完整性验证通过,才允许与第一节点可以进行关联,从而可以防止攻击者篡改消息内容,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第八方面的一种可能的实施方式中,所述确定所述第一节点的身份可信,包括:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制节点不向不可信的第一节点发送关联请求,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第八方面的一种可能的实施方式中,所述确定所述第一节点的身份可信,包括:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在第八方面的又一种可能的实施方式中,所述确定第一节点的身份可信,向所述第一节点发送第一关联请求之前,还包括:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,节点中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二 关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制节点所能关联的节点的数量,当超过第二关联阈值时,节点不能再关联其它节点,避免影响与该节点关联的其它节点的通信,保障了节点所提供的服务的稳定运行。
在第八方面的又一种可能的实施方式中,所述方法还包括:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,第二节点接收到来自第一节点的第一关联响应,该关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以告知第二节点已经关联成功,可以进行后续的通信。
在第八方面的又一种可能的实施方式中,所述方法还包括:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了节点所提供的服务的稳定运行。
在第八方面的又一种可能的实施方式中,所述方法还包括:
若对所述第一认证响应的消息完整性的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
通常来说,若对所述第一认证响应的消息完整性验证失败,则说明该第一认证响应消息已经不再完整或者已经被攻击者修改,因此更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定第一节点的身份是否可信。
在第八方面的又一种可能的实施方式中,所述第一认证请求消息中还包括第一身份验证信息,所述若对所述第一认证响应的消息完整性的验证通过,则向所述第一节点发送第一认证响应,包括:
若对所述第一认证响应的消息完整性的验证通过,则根据与第一节点之间的共享密钥验证所述第一身份验证信息;
若对第一身份验证信息的验证通过,则向所述第一节点发送所述第一认证响应。
可以看出,在确认第一节点的身份可信之后,若完整性验证通过,则根据与第一节点的共享密钥验证第一节点的身份。从而可以使得攻击者难以通过修改标识等身份绕过对其的关联控制,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第八方面的又一种可能的实施方式中,所述方法还包括:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信,从而使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再向其发送关联请求,从而保证了节点所提供的服务正常进行。
在第八方面的又一种可能的实施方式中,所述方法还包括:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第八方面的又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在第八方面的又一种可能的实施方式中,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
确定所述第二认证失败计数器的值小于第二阈值,
向所述第一节点发送第二关联请求。
可以理解的是,在身份认证信息验证过程中,由于某些参数在传输过程中被丢失或者传输错误,可能也会导致身份认证信息验证失败。因此,若针对第一节点的验证失败的次数还没有超过预设的第二阈值,可以重新向第一节点发送关联请求,请求与该节点进行关联,从而提高系统的鲁棒性,保障了节点所提供的服务的稳定运行。
在第八方面的又一种可能的实施方式中,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在第八方面的又一种可能的实施方式中,所述方法还包括:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型中的至少一项有有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数 超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。在第八方面的又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
第九方面,本申请实施例还提供一种关联控制装置,包括:
通信单元,用于接收来自第二节点的第一关联请求;
处理单元,用于确定所述第二节点的身份可信,通过所述通信单元向所述第二节点发送第一认证请求,所述第一认证请求中包括第一完整性校验数据;
所述通信单元,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二完整性校验数据;
所述处理单元,还用于根据所述第二完整性验证数据验证所述第一认证响应的消息完整性;
所述处理单元,还用于若对所述第一认证响应的消息完整性的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置在确认第二节点的身份可信后,进行关联之前还需要对来自第二节点的消息进行消息完整性验证。若消息完整性验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,从而可以防止攻击者篡改认证过程中的数据(如身份认证信息),进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第九方面的一种可能的实施方式中,所述处理单元,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置根据通过黑名单或者白名单对请求关联的节点进行控制,从而无需对不可信的第二节点进行身份认证,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第九方面的一种可能的实施方式中,所述处理单元,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在第九方面的又一种可能的实施方式中,所述处理单元,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制上述装置所能提供的服务的承受量,当超过第一关联阈值时,上述装置可以不再接收或者处理关联请求,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第九方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第一认证响应的完整性的验证通过,则根据与第二节点之间的共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
可以看出,上述装置在确认第二节点的身份可信之后,若完整性验证通过,则根据与第二节点的共享密钥验证第二节点的身份。若验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再对其的关联请求进行处理(如发送认证请求),从而防止节点由于处理大量请求而崩溃,保证了服务正常进行。
在第九方面的又一种可能的实施方式中,所述通信单元,还用于:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在第九方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障上述装置所提供的服务的稳定运行。
在第九方面的又一种可能的实施方式中,所述处理单元,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加 入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第九方面的又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在第九方面的又一种可能的实施方式中,该处理单元,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过某一阈值以后,可以永久加入第一黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。
在第九方面的又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置的资源,影响其它节点的正常关联。
第十方面,本申请实施例还提供一种关联装置,包括:
处理单元,用于确定第一节点的身份可信,通过通信单元向所述第一节点发送第一关联请求;
所述通信单元,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息和第一完整性检验数据;
所述处理单元,还用于根据所述第一完整性验证数据验证所述第一认证请求的消息完整性;
所述通信单元,还用于若对所述第一认证请求的消息完整性的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二完整性校验数据。
本申请实施例中,上述装置在确认第二节点的身份可信后,在进行通信之前还需要对第一节点进行认证(例如通过身份验证信息等进行验证)。为了防止攻击者篡改认证过程中的数据,需要先对第一认证请求进行消息完整性验证。若消息完整性验证通过,才允许与第一节点可以进行关联,从而可以防止攻击者篡改消息内容,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第十方面的一种可能的实施方式中,所述处理单元,具体用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置不向不可信的第一节点发送关联请求,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在第十方面的一种可能的实施方式中,所述处理单元,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在第十方面的又一种可能的实施方式中,所述处理单元,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置所能关联的节点的数量,当超过第二关联阈值时,上述装置不能再关联其它节点,避免影响与该装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在第十方面的又一种可能的实施方式中,所述通信单元,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,上述装置可以接收到来自第一节点的第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以告知上述装置已经关联成功,可以进行后续的通信。
在第十方面的又一种可能的实施方式中,所述处理单元,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在第十方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第一认证响应的消息完整性的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
通常来说,若对所述第一认证响应的消息完整性验证失败,则说明该第一认证响应消息已经不再完整或者已经被攻击者修改,因此更新针对第一节点的验证失败的次数,该验证失败的次数可以用于后续确定第一节点的身份是否可信。
在第十方面的又一种可能的实施方式中,所述第一认证请求消息中还包括第一身份验证信息,所述处理单元,还用于若对所述第一认证响应的消息完整性的验证通过,则根据与第一节点之间的共享密钥验证所述第一身份验证信息;
所述通信单元,还用于若对第一身份验证信息的验证通过,则向所述第一节点发送所述第一认证响应。
可以看出,在确认第一节点的身份可信之后,若完整性验证通过,则根据与第一节点的共享密钥验证第一节点的身份。从而可以使得攻击者难以通过修改标识等身份绕过上述装置对其的关联控制,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在第十方面的又一种可能的实施方式中,所述处理单元,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信,从而使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再向其发送关联请求,从而保证了节点所提供的服务正常进行。在第十方面的又一种可能的实施方式中,所述处理单元,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第十方面的又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以 后,可以被移出该黑名单。
在第十方面的又一种可能的实施方式中,所述处理单元,还用于确定所述第二认证失败计数器的值小于第二阈值;
所述通信单元,还用于向所述第一节点发送第二关联请求。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在第十方面的又一种可能的实施方式中,该处理单元,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在第十方面的又一种可能的实施方式中,该处理单元,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。在第十方面的又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
第十一方面,本申请实施例还提供一种通信装置,所述通信装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得 所述装置实现第七方面或者第七方面任意一种可能的实施方式所描述的方法。
第十二方面,本申请实施例还提供一种通信装置,所述装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现第八方面或者第八方面任意一种可能的实施方式所描述的方法。
第十三方面,本申请实施例还提供一种通信系统,该通信系统包括第一节点和第二节点,其中,该第一节点为上述第三方面或第三方面的任意一种可能的实施方式、或者上述第五方面或上述第五方面的任意一种可能的实施方式所描述的装置,该第二节点为上述第四方面或第四方面的任意一种可能的实施方式、或者上述第六方面或上述第六方面的任意一种可能的实施方式所描述的装置。
第十四方面,本申请实施例还提供一种通信系统,该通信系统包括第一节点和第二节点,其中,该第一节点为上述第九方面或第九方面的任意一种可能的实施方式、或者上述第十一方面所描述的装置,该第二节点为上述第十方面或第十方面的任意一种可能的实施方式、或者上述第十二方所描述的装置。
第十五方面,本申请实施例公开了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行第一方面、第一方面的任意一种可能的实施方式所描述的方法,或者执行第二方面或者第二方面的任意一种可能的实施方式所描述的方法,或者执行第七方面或者第七方面的任意一种可能的实施方式所描述的方法,或者执行第八方面或者第八方面的任意一种可能的实施方式所描述的方法。
第十六方面,本申请实施例公开了一种芯片系统,所述芯片系统包括至少一个处理器,存储器和接口电路,该接口电路用于为上述至少一个处理器提供信息输入/输出,该存储器中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行第一方面、第一方面的任意一种可能的实施方式所描述的方法,或者执行第二方面或者第二方面的任意一种可能的实施方式所描述的方法,或者执行第七方面或者第七方面的任意一种可能的实施方式所描述的方法,或者执行第八方面或者第八方面的任意一种可能的实施方式所描述的方法。
第十七方面,本申请实施例公开了一种车辆,所述车辆包括第一节点(例如,汽车座舱域控制器CDC),其中所述第一节点为上述第三方面或第三方面的任意一种可能的实施方式、或者上述第五方面或上述第五方面的任意一种可能的实施方式所描述的装置。进一步的,所述车辆还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),所述第二节点为上述第四方面或第四方面的任意一种可能的实施方式、或者上述第六方面或上述第六方面的任意一种可能的实施方式所描述的装置。
第十八方面,本申请实施例公开了一种车辆,所述车辆包括第一节点(例如,汽车座舱域控制器CDC),其中所述第一节点为上述第九方面或第九方面的任意一种可能的实施方式、或者上述第十一方面所描述的装置。进一步的,所述车辆还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),所述第二节点为上述第十方面或第十方面的任意一种可能的实施方式、或者 上述第十二方面所描述的装置。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的一种通信系统的架构示意图;
图2是本申请实施例提供的一种关联控制方法的使用场景示意图;
图3是本申请实施例提供的一种关联控制方法的流程示意图;
图4是本申请实施例提供的一种黑名单和白名单示意图;
图5是本申请实施例提供的又一种关联控制方法的流程示意图;
图6是本申请实施例提供的又一种关联控制方法的流程示意图;
图7是本申请实施例提供的又一种关联控制装置的结构示意图;
图8是本申请实施例提供的又一种关联装置的结构示意图;
图9是本申请实施例提供的一种通信装置的结构示意图;
图10是本申请实施例提供的又一种通信装置的结构示意图;
图11是本申请实施例提供的又一种关联控制装置的结构示意图;
图12是本申请实施例提供的又一种关联装置的结构示意图;
图13是本申请实施例提供的又一种通信装置的结构示意图;
图14是本申请实施例提供的又一种通信装置的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例进行描述。需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
下面先对本申请涉及到的相关技术和专业术语进行简单的介绍以方便理解。
一、节点(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)
在通信过程中,数据在通信节点之间传递,如果数据要进行保密,就需要通过密钥进行加密。而共享密钥是通信双方的节点中保存的相同的秘密值,共享密钥可以是在双方节点中预先定义或者预先配置的,也可以是双方通过相同的密钥获取方法生成的,还可以是一个可信设备(如KDC)分别发送给第一节点和第二节点的。
例如,车辆的座舱域控制器(cockpit domain controller,CDC)与车载雷达设备是可以进行通信的两个节点,汽车厂工作人员在部署CDC和车载雷达时已经预先配置CDC和车载雷达之间的共享密钥,通过该共享密钥,可以保证车辆的CDC与车顶雷达进行通信的安全性。
再如,车辆的座舱域控制器(cockpit domain controller,CDC)与车主的手机是可以进行通信的两个节点。当车主需要通过手机与车辆的CDC进行关联时,可以通过密钥获取方法获取共享密钥,如通过密钥协商算法在手机与车辆的CDC之间交换密钥协商算法参数生成密钥等。该共享密钥可以用于后续该手机再次请求关联车辆的CDC时,验证双方节点的身份。
三、密钥派生
密钥派生是从一个秘密值中派生出一个或多个秘密值的过程,而用于派生密钥的算法称为密钥派生算法(key derivation function,KDF),又称为密钥导出算法。例如,通过秘密值Key派生的新的秘密值DK可以表示为:DK=KDF(Key)。
常用的密钥派生算法有基于密码的密钥派生函数(password-based key derivation function,PBKDF)、斯克里普特(scrypt)算法等,其中PBKDF算法又包括第一代PBKDF1和第二代PBKDF2。可选的,一些KDF算法在派生密钥过程中,使用哈希算法对输入的秘密值进行哈希变化,因此KDF函数还可以接收算法标识作为输入,用于指示使用何种哈希算法。
另外需要说明的是,本申请各实施例中提到的“认证”、“校验”、“验证”,可以表征检查是否正确或者合理的意思。本申请各实施例中提“关联”表明第一节点与第二节点建立连接的过程,在一些具体的技术场景中,也可以将“关联”描述为“接入”。
下面对本申请实施例的系统架构和业务场景进行描述。需要说明的是,本申请描述的系统架构及业务场景是为了更加清楚的说明本申请的技术方案,并不构成对于本申请提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请提供的技术方案对于类似的技术问题,同样适用。
请参见图1,图1是本申请实施例提供的一种通信系统的架构示意图,包括第一节点101和第二节点102。第一节点101可以被第二节点202请求关联,关联成功后,第一节点101可以通过数据链路与第二节点102进行通信。可选的,第一节点101与第二节点102进行通信的数据链路可以包括各种类型的连接介质,例如无线链路,具体可以为无线保真技术(wireless fidelity,Wi-Fi)、蓝牙、紫蜂(zigbee)以及其他无线链路(如通用无线短距传输技术)等,再如有线链路,如光纤链路等。
可选的,第一节点101可以是通信的发起方,可以称为主节点或者接入点(access point,AP),相应的,第二节点102是通信的接收方,可以称为从节点。
其中,第一节点101和第二节点102可以是相同类型的设备,也可以是不同类型的设备。例如,请参见图2,图2是本申请实施例提供的一种关联控制方法的使用场景示意图。座舱域控制器(cockpit domain controller,CDC)201是智能座舱设备中的控制中心,可以看作为第一节点101。智能手机202是可以具有数据收发能力的设备,可以看作为第二节点102。其中,CDC201可以通过蓝牙被其它蓝牙设备关联,而智能手机202支持蓝牙功能,因此可以请求关联该CDC201。
现有的通信过程中,节点很容易遭受到攻击者的攻击。例如,攻击者可以伪造第二节点的身份,请求关联第一节点,若攻击者成功关联,会导致第一节点的数据安全收到威胁。尤其是在车辆通信过程中,若CDC201接收到攻击者的关联,很容易导致车辆数据泄露,甚至被攻击者攻击,危及驾驶安全。再如,攻击者向节点发送大量的请求帧,当节点收到大量的请求帧超过所能承受的处理能力时,将导致节点瘫痪,无法继续提供正常服务,进而影响其它节点与该节点的通信。为了解决这个问题,本申请实施例提供如下的关联控制方法。
请参见图3,图3是本申请实施例提供的一种关联控制方法的流程示意图,该关联控制方法可以基于图1所示的通信系统来实现,该方法至少包括如下步骤:
步骤S301:第二节点确定第一节点的身份可信。
具体的,第二节点至少可以通过以下三种方法确定第一节点的身份可信:
方法一:通过黑名单和/或白名单来确定第一节点的身份可信。
参见图4,图4是本申请实施例提供的一种黑名单和白名单的示意图,黑名单401和白名单402中存储有多个节点的标识,其中,节点的标识可以为节点的身份标识(identification,ID)、媒体存取控制(media access control,MAC)地址、域名、域地址或其他自定义的标识,例如,黑名单401中的标识“00-00-00-AA-AA-AA”即为某一节点的标识。可选的,黑名单中还可以包括有该节点的标识的加入时间、过期时间、加入黑名单次数等等中的一项或者多项,相应的,白名单中也可以包括有该节点的标识的加入时间、过期时间、密钥配置类型等等中的一项或者多项。为了方便描述,本申请各实施例中,将第二节点中的黑名单称为第二黑名单,将第二节点中的白名单称为第二白名单。可以理解的是,节点的标识不能同时既在第二白名单中,又在第二黑名单中。
第二节点可以通过确定第一节点的标识是否在第二白名单或者第二黑名单中,来确定第一节点的身份是否可信。具体可以有以下两种实现方式:
实现方式一:第二节点确定第一节点的标识在第二白名单中,那么可以表明第一节点的身份可信。
实现方式二:第二节点确定第一节点的标识不在第二黑名单中,那么可以表明第一节点的身份可信。
可选的,第二节点可以通过获取输入的信息来获取第一节点的标识,或者通过接收第一节点广播的消息来获取第一节点的标识。例如,第一节点可以广播消息,广播的消息中 可以包括第一节点的标识,第二节点接收广播的消息后,可以根据第一节点的标识、第二黑名单或者第二白名单确认第一节点的身份是否可信。可选的,第二节点中存储有一个或者多个其它节点的标识和密钥配置类型的对应关系,密钥配置类型可以为预先配置类型和口令生成类型。其中,预先配置类型表明第一节点与第二节点之间的共享密钥是预先配置或者预先定义的,例如,主机厂工作人员在装配车辆时,在CDC与麦克风之间预先配置共享密钥。口令生成类型,也可以称为“口令接入类型”,表明第一节点与第二节点之间的共享密钥是通过口令接入的方式建立关联时根据口令生成的共享密钥。进一步的,不同的密钥配置类型的节点可以有不同的确定身份可信的方式,具体还包括以下两种情况:
实现方式三:对于密钥配置类型为预先配置的第一节点,若确认该第一节点的标识在第二白名单中,则表明该节点的身份可信。可选的,若该第一节点的标识在第二黑名单中,则该第一节点的身份不可信。例如,参见表1,表1是本申请实施例提供的一种可能的节点标识与密钥配置类型的对应关系,若标识为“66-66-66-FF-FF-FF”的节点A1请求关联,由于节点A1的密钥配置类型为预先配置类型,而参见白名单402可知该节点A1的标识在白名单402中,因此可以确认该节点A1的身份可信。
表1节点标识与密钥配置类型的对应关系
标识 密钥配置类型 共享密钥
66-66-66-FF-FF-FF 预先配置 PSK1
00-00-00-AA-AA-AA 口令生成 PSK2
44-44-44-EE-EE-EE 口令生成 PSK3
77-77-77-GG-GG-GG 口令生成 PSK4
实现方式四:对于密钥配置类型为口令生成的第一节点,若确认该第一节点的标识不在第二黑名单中,则表明该第一节点的身份可信。例如,参见表1,若标识为“77-77-77-GG-GG-GG”的节点A2请求关联,由于节点A2的密钥配置类型为口令生成类型,而参见图4可知该节点A2的标识不在黑名单401中,因此可以确认该节点A2的身份可信。
方法二:通过获取第二确认指示信息确定第一节点的身份可信。
第二节点获取第二确认指示信息,该第二确认指示信息表征第一节点的身份可信。第二确认指示信息是根据用户输入的确认操作得到的指示信息,该确认操作可以是对输出的提示信息的确认,例如:
实现方式五:第二节点输出第二提示信息,提醒用户需要请求关联第一节点,在接收到用户确认操作、得到第二确认指示信息后,可以确定该第一节点的身份可信。进一步的可选的,若第二节点输出第二提示信息后,接收到用户的拒绝操作,则可以确认该第一节点的身份不可信。
方法三:通过黑和/或白名单和确认指示信息确定第一节点的身份可信。
当通过黑名单和白名单不能确认第一节点的身份是否可信时,第二节点可以通过确认指示信息来确定第一节点的身份可信。具体的,第一节点的标识不在第二黑名单中的情况 下,或者第一节点的标识既不第二在黑名单也不在第二白名单时的情况下,获取第二确认指示信息,该第二确认指示信息表征第一节点的身份可信。可选的,具体实现过程中,不同的密钥配置类型还可以有不同的处理,例如:
实现方式六:对于密钥配置类型为口令生成的第一节点,若该第一节点的标识不在第二黑名单中且不在第二白名单中,则获取第二确认指示信息,该确认指示信息表明第一节点的身份可信。可选的,若没有获取到第二确认指示信息,则可以确认该第二节点的身份不可信。
可选的,第二节点可以预先定义或者配置有第二关联阈值,该第二关联阈值用于表征当前关联的节点数量,第二节点可以在确认第一节点的身份可信之前或者之后,又或者是可以周期或者非周期的确认第二节点的关联数量。即在该方法中包括以下步骤:确认第二节点当前关联的节点数量是否小于等于(或者小于)第二关联阈值或者确定第二节点当前关联的节点数量是否大于(或者大于等于)第二关联阈值。若当前关联的节点数量大于(或者大于等于)第二关联阈值,第二节点可以不向第一节点发送关联请求或者可以后续取消与第一节点之间的关联,避免影响第二节点与其它节点的通信,保障了第二节点所提供的服务的稳定运行。
步骤S302:第二节点向第一节点发送第一关联请求。
具体的,第二节点可以通过无线链路(例如Wi-Fi、蓝牙、Zigbee或者其他短距无线链路等中的一个)或者有线链路(例如光纤)向第一节点发送第一关联请求消息。
相应的,第一节点接收来自第二节点的第一关联请求。可选的,第一节点可以预先定义或者配置有第一关联阈值,该第一关联阈值用于表征当前关联的节点数量,第一节点在接收来自第二节点的第一关联请求消息之前或者之后,又或者是可以周期或者非周期的确认第一节点当前关联的节点数量,即在该方法中可以包含以下步骤:确定第一节点当前关联的节点数量是否小于等于(或者小于)第一关联阈值或者确定第一节点当前关联的节点数量是否大于(或者大于等于)第一关联阈值。该第一关联阈值可以限制第一节点所能提供的服务的承受量,当第一节点关联的节点数量大于(或者大于等于)第一关联阈值时,第一节点可以不再接收或者处理关联请求,因此不会接收或者处理上述第一关联请求,避免影响第一节点与关联的其它节点的通信,保障了第一节点所提供的服务的稳定运行。
可选的,第一关联请求消息中可以包括第二节点的身份标识或者第二节点获取的(或者生成的)新鲜性参数等等中的至少一个。其中,新鲜性参数可以包括随机数(number once,NONCE)、计数器(counter)、序列号(number)等等中的至少一个。为了方便描述,将第一关联请求消息中的新鲜性参数称为第一新鲜性参数。
步骤S303:第一节点确定第二节点的身份可信。
具体的,第一节点至少可以通过以下三种方式确定第二节点的身份可信:
方法一:通过黑名单和/或白名单来确定第二节点的身份可信。
为了方便描述,本申请各实施例中,将第一节点中的黑名单称为第一黑名单,将第一节点中的白名单称为第一白名单。可以理解的是,在第一节点中,一个节点的标识不能同时既在第一白名单中,又在第一黑名单中。
第一节点可以通过确定第二节点的标识是否在第一白名单或者第一黑名单中,来确定 第二节点的身份是否可信。具体可以有以下两种案例:
案例一:第一节点确定第二节点的标识在第一白名单中,那么可以表明第二节点的身份可信。
案例二:第一节点确定第二节点的标识不在第一黑名单中,那么可以表明第二节点的身份可信。可选的,若第二节点的标识在第一黑名单中,那么表明第二节点的身份不可信,第一节点可以丢弃该第一关联请求或者忽略该请求不进行后面的步骤。
可选的,第一关联请求消息中包括第二节点的身份标识,第一节点可以通过接收第一关联请求消息获取第二节点的身份标识。
可选的,第一节点中存储有一个或者多个其它节点的标识和密钥配置类型的对应关系,密钥配置类型可以为预先配置类型和口令生成类型。其中,预先配置类型表明第一节点与第二节点之间的共享密钥是预先配置或者预先定义的,例如,主机厂工作人员在装配车辆时,在CDC与麦克风之间预先配置共享密钥。口令生成类型表明第一节点与第二节点之间的共享密钥是通过口令接入的方式建立关联,然后根据口令生成的共享密钥。进一步的,不同的密钥配置类型的节点可以有不同的确定身份可信的方式,具体实现时可以有以下两种案例:
案例三:对于密钥配置类型为预先配置的第二节点,若确认该第二节点的标识在第一白名单中,则表明该第二节点的身份可信。
案例四:对于密钥配置类型为口令生成的第二节点,若确认该第二节点的标识不在第一黑名单中,则表明该节点的身份可信。可选的,若该节点的标识在第一黑名单中,则该第二节点的身份不可信,第一节点可以丢弃该第一关联请求或者忽略该请求不进行后面的步骤。
方式二:通过获取第一确认指示信息确定第二节点的身份可信。
第一节点获取第一确认指示信息,该第一确认指示信息表征第二节点的身份可信。具体的,该第一确认指示信息是根据用户输入的确认操作得到的指示信息,该确认操作可以是对输出的提示信息的确认。例如:
案例五:第一节点输出第一提示信息,提醒用户需要关联第二节点,在接收到用户确认操作,得到第一确认指示信息后,可以确定二节点的身份可信。进一步的可选的,若第一节点输出第一提示信息后,接收到用户的拒绝操作,则可以确认该第二节点的身份不可信,第一节点可以丢弃该第一关联请求或者忽略该请求不进行后面的步骤。
方式三:通过黑和/或白名单和确认指示信息确定第二节点的身份可信。
当通过黑名单和白名单不能确认第二节点的身份是否可信时,第一节点可以通过确认指示信息来确定第二节点的身份可信。具体的,第二节点的标识不在第一黑名单中的情况下,或者第二节点的标识既不在第一黑名单也不在第一白名单时的情况下,获取第一确认指示信息,该第一确认指示信息表征第二节点的身份可信。可选的,具体实现过程中,不同的密钥配置类型还可以有不同的处理,例如:
案例六:对于密钥配置类型为口令生成的第二节点,若该第二节点的标识不在第一黑名单中且不在第一白名单中,则获取第一确认指示信息,该确认指示信息表明第二节点的身份可信。可选的,若没有获取到第一确认指示信息,则可以确认该第二节点的身份不可 信,第一节点可以丢弃该第一关联请求或者忽略该请求不进行后面的步骤。
步骤S304:第一节点向第二节点发送第一认证请求。
具体的,第一认证请求中可以包括第一身份验证信息。该第一身份验证信息为第一节点根据与第二节点之间的共享密钥生成的。该共享密钥可以是第一节点与第二节点之间的预共享密钥PSK。
例如,第一节点根据预共享密钥PSK,通过KDF可以生成第一身份认证信息AUTHa,例如:AUTHa=KDF(PSK)。
可选的,在第一关联请求中包括第一新鲜性参数的情况下,该第一身份验证信息可以是第一节点根据共享密钥和第一新鲜性参数生成的。例如,第一节点根据预共享密钥PSK和第一新鲜性参数NONCEe,通过KDF生成第一身份认证信息AUTHa,例如:AUTHa=KDF(PSK,NONCEe)。
可选的,在实际处理中,第一节点生成第一身份认证信息的参数还可以包括其他信息,例如,生成的第一身份认证信息AUTHa可以满足:AUTHa=KDF(PSK,第一关联请求)。
可选的,第一认证请求中还包括第二新鲜性参数,该第二新鲜性参数可以是第二节点获取的(或者生成的)随机数、随机数(number once,NONCE)、计数器(counter)、序列号(number)等等中的至少一个。进一步可选的,在第一认证请求中包括第二新鲜性参数的情况下,第一节点生成的第一身份认证信息AUTHa还可以满足:AUTHa=KDF(PSK,NONCEa,第一关联请求),其中,NONCEa为第一认证请求中的第二新鲜性参数。
可选的,第一认证请求中还可以包括第一完整性校验数据等等。其中,该第一完整性校验数据是根据对称密钥和完整性保护算法生成的校验数据,用于第二节点校验第一认证请求的消息完整性。在具体实现中,该校验数据也可以称为消息认证码(message authentication code,MAC)。
步骤S305:第二节点根据第二节点与第一节点的共享密钥验证第一身份认证信息。
具体的,由于第一身份认证信息是第一节点根据第一节点与第二节点之间的共享密钥生成的,因此第二节点也具有该共享密钥且可以根据该共享密钥来验证所述第一身份认证信息是否正确。
在一种可选的方案中,根据协议规定,第一节点使用什么参数生成第一身份认证信息,则第二节点也应当使用相同的参数生成校验信息,如果校验信息与第一身份认证信息相同,则认为验证通过。例如,第一身份认证信息是通过KDF生成的,因此第二节点可以通过KDF生成校验信息,也称为校验值check1。第二节点通过校验信息验证第一身份认证信息是否正确。下面进行举例说明:
例如,若第一身份认证信息AUTHa为KDF(PSK,NONCEe),则第二节点根据PSK和第一新鲜性参数NONCEe通过KDF得到校验值check1=KDF(PSK,NONCEe),若校验值check1与AUTHa相同,则验证通过。
可选的,在根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息之前或者之后,第二节点校验第一认证请求的消息完整性,防止第一认证请求中的内容被攻击者篡改。例如,第一认证请求中包括第一完整性校验数据,第二节点可以根据该第一完整性校验数据校验第一认证请求的消息完整性。
可选的,若对第一认证请求的消息完整性校验失败,第二节点可以更新针对第一节点的完整性校验失败的次数,该完整性校验失败的次数可以用于后续确定第一节点的身份是否可信。进一步可选的,第二节点更新针对第一节点的完整性校验失败的次数可以有如下两种情况:
情况一:第二节点通过第二认证失败计数器表征针对第一节点的验证失败的次数。其中,针对第一节点的验证可以包括消息完整性校验和身份验证,因此若第一认证请求的消息完整性校验失败或对第二节点的身份验证失败,第二节点可以将第二认证失败计数器加1,该第二认证失败计数器可以用于后续确认第一节点的身份是否可信。
情况二:第二节点通过第二完整校验计数器表征针对第一节点的完整性校验失败的次数,若针对第一认证请求的消息完整性校验失败,第二节点可以将第二完整校验计数器加1,该第二完整校验计数器可以用于后续确认第一节点的身份是否可信。
步骤S306:若第二节点对第一身份认证信息的验证通过,则向第一节点发送第一认证响应。
具体的,第一认证响应中可以包括第二身份验证信息。该第二身份验证信息为第二节点根据与第二节点之间的共享密钥生成的。该共享密钥可以是第一节点与第二节点之间的预共享密钥PSK。
例如,第二节点根据预共享密钥PSK,通过KDF可以生成第二身份认证信息AUTHe,例如:AUTHe=KDF(PSK)。
可选的,在第一认证请求中包括第二新鲜性参数的情况下,该第二身份验证信息可以是第二节点根据共享密钥和第二新鲜性参数生成的。例如,第二节点根据预共享密钥PSK和第二新鲜性参数NONCEa,通过KDF生成第二身份认证信息AUTHe,例如:AUTHe=KDF(PSK,NONCEa)。
可选的,在实际处理中,第二节点生成第二身份认证信息的参数还可以包括其他信息,例如,生成的第二身份认证信息AUTHe可以满足:AUTHe=KDF(PSK,第一认证请求)。
可选的,在第一关联请求中还可以包括第一新鲜性参数的情况下,第二节点生成的第二身份认证信息AUTHe还可以满足:AUTHe=KDF(PSK,NONCEe,第一认证请求),其中,NONCEe为第一关联请求中的第一新鲜性参数。
可选的,第一关联请求中还可以包括第二完整性校验数据等等。其中,该第二完整性校验数据是根据对称密钥和完整性保护算法生成的校验数据,用于第一节点校验第一关联请求的消息完整性。在具体实现中,该校验数据也可以称为消息认证码(message authentication code,MAC)。
步骤S307:第一节点根据共享密钥验证第二身份认证信息。
具体的,由于第二身份认证信息是根据第一节点与第二节点之间的共享密钥生成的,因此第一节点也具有该共享密钥且可以根据该共享密钥来验证所述第二身份认证信息是否正确。
在一种可选的方案中,根据协议规定,第二节点使用什么参数生成第二身份认证信息,则第一节点也应当使用相同的参数生成校验信息,如果校验信息与第一身份认证信息相同,则认为验证通过。例如,第二身份认证信息是通过KDF生成的,因此第一节点可以通过 KDF生成校验信息,也称为校验值check2,然后通过校验信息验证第二身份认证信息是否正确。下面进行举例说明:
例如,若第二身份认证信息AUTHe为KDF(PSK,NONCEa),则第一节点根据PSK和第二新鲜性参数NONCEa通过KDF得到校验值check2=KDF(PSK,NONCEa)。若校验值check2与AUTHe相同,则验证通过,若校验值check2与AUTHe不相同,则验证失败。
可选的,在根据共享密钥验证第二身份认证信息之前或者之后,第一节点校验第一认证响应的消息完整性,防止第一认证响应中的内容被攻击者篡改。具体的,第一认证响应中包括第二完整性校验数据,第一节点可以根据该第二完整性校验数据校验第一认证响应的消息完整性。
可选的,若对第一认证响应的消息完整性校验失败,第一节点可以更新针对第二节点的完整性校验失败的次数,该完整性校验失败的次数可以用于后续确定第二节点的身份是否可信。进一步可选的,第一节点更新针对第二节点的完整性校验失败的次数可以有如下两种情况:
情况一:第一节点通过第一认证失败计数器表征针对第二节点的验证失败的次数。其中,针对第二节点的验证包括消息完整性校验和身份验证,因此若第一认证响应的消息完整性校验失败或者对第二节点的身份验证失败,第一节点可以将第一认证失败计数器加1,该第一认证失败计数器可以用于后续确认第二节点的身份是否可信。
情况二:第一节点通过第一完整校验计数器表征针对第二节点的完整性校验失败的次数,若针对第一认证响应的消息完整性校验失败,第一节点可以将第一完整校验计数器加1,该第一完整校验计数器可以用于后续确认第二节点的身份是否可信。
步骤S308:若第一节点对第二身份认证信息的验证失败,则更新第一认证失败计数器。
具体的,第一认证失败计数器表征针对所述第二节点的验证失败的次数。例如,若对第二身份认证信息的验证失败,则可以将第一认证失败计数器加1,该验证失败的次数可以用于后续确定第二节点的身份是否可信。
可选的,本申请实施例所述的关联控制方法,还可以包括图5所示的步骤S501,步骤S501具体如下:
步骤S501:若第一认证失败计数器的值超过第一阈值,第一节点将第二节点的标识加入第一黑名单。
具体的,第一认证失败计数器用于表征针对第二节点的验证失败的次数,超过第一阈值可以为大于或者等于第一阈值。若第一认证失败计数器的值超过第一阈值,表明该第二节点已经多次验证不通过,因此该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入第一黑名单。在加入第一黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。可理解的,由于节点的标识不能既在第一黑名单中,又在第一白名单中,因此在将第二节点的标识加入第一黑名单,若第二节点的标识在第一白名单中,需要将第一节点的标识移出第一白名单。
可选的,第一黑名单的有效期为预先定义或者配置的第一时长。例如,第一黑名单的 第一时长可以是20天,当第二节点的标识被加入第一黑名单20天以后,可以被移出该黑名单。
可选的,若第二节点的标识加入第一黑名单的时间超过第一时长,则将第二节点的标识移出第一黑名单,该第一时长与第二节点的标识加入第一黑名单的次数、第二节点的设备类型有关。具体的,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过设定值(例如超过10次)以后,可以永久加入第一黑名单,不能被移除。另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。
需要说明的是,本申请不限定具体设备类型的数量,可以根据实际需要,定义多种类型的设备并设置相应的黑名单以及黑名单的有效期。具体的,第一黑名单也可以包含多组黑名单,分别用于进行更具体和细化的设备管理。
可选的,本申请实施例所述的关联控制方法,还可以包括图5所示的步骤S502,步骤S502具体如下:
步骤S502:若对第二身份认证信息的验证通过,第一节点向第二节点发送第一关联响应。
具体的,在确认第二节点的身份可信之后,若身份验证通过,第一节点可以向第二节点发送第一关联响应,该第一关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
可选的,本申请实施例所述的关联控制方法,还可以包括图5所示的步骤S503或者步骤503-步骤504,步骤503-步骤504具体如下:
步骤S503:若对第一身份认证信息的验证失败,第二节点更新第二认证失败计数器。
具体的,第二认证失败计数器表征针对所述第一节点的验证失败的次数。若对所述第一节点的身份认证信息验证失败,则可以将第二认证失败计数器加1,该第二认证失败计数器可以用于后续确定第一节点的身份是否可信。
步骤S504:若第二认证失败计数器的值超过第二阈值,第二节点将第一节点的标识加入第二黑名单。
具体的,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,因此第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入第二黑名单。在加入第二黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了第二节点与非法的攻击者建立关联,提高了第二节点的数据安全性。可理解的,由于第一节点的标识不能既在第二黑名单中,又在第二白名单中,因此在将第一节点的标识加入第二黑名单后,若第一节点的标识在第二白名单中,需要将第一节点的标识移出第二白名单。
可选的,第二黑名单的有效期为预先定义或者配置的第二时长。第二时长可以看作是黑名单的有效期。例如,第二黑名单的第二时长可以是10天,当某第一节点的标识被加入第二黑名单10天以后,可以被移出该第二黑名单。
可选的,该第二时长与第一节点的标识加入第二黑名单的次数、所述第一节点的类型中的至少一项有关。一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过设定值(例如超过15次)以后,可以永久加入第二黑名单,不能被移除。另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。
可选的,若第二节点确定所述第二认证失败计数器的值小于第二阈值,可以向所述第一节点发送第二关联请求。具体的,在身份认证信息验证过程中,由于某些参数在传输过程中被丢失或者传输错误,可能也会导致身份认证信息验证失败。因此,若对第一节点的验证失败的次数还没有超过预设的第二阈值,可以重新向第一节点发送关联请求,请求与该第一节点进行关联,从而提高系统的鲁棒性,保障了节点所提供的服务的稳定运行。
可选的,在第二节点发送第二关联请求之前,可以获取第三确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,第二节点可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在图3或者以及图5所示的实施例中,在确认第二节点的身份可信后,再根据与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了“确定身份可信”这一步骤,由于难以伪造身份验证信息,还是无法通过第一节点对其的身份验证,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
进一步的,若验证不通过,会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再对其的关联请求进行处理(如发送认证请求),从而防止节点由于处理大量请求而崩溃,保证了服务正常进行。
请参见图6,图6是本申请实施例提供的关联控制方法的流程示意图,该方法可以基于图1所示的架构来实现,该方法包括但不限于如下步骤:
步骤S601:第二节点确定第一节点的身份可信。
具体可以参考步骤S301的相关描述。
步骤S602:第二节点向第一节点发送第一关联请求。
具体可以参考步骤S302的相关描述。
步骤S603:第一节点确定第二节点的身份可信。
具体可以参考步骤S303的相关描述。
步骤S604:第一节点向第二节点发送第一认证请求。
具体的,第一认证请求中包括第一完整性校验数据等等。其中,该第一完整性校验数据是根据密钥和完整性保护算法生成的校验数据,用于第二节点校验第一认证请求的消息完整性。在具体实现中,该校验数据也可以称为消息认证码(message authentication code,MAC)。
例如,第一完整性校验数据MAC1可以是根据基于密码的消息认证码(Cipher-based Message Authentication Code,CMAC)算法,通过共享密钥K1、第一认证请求中除了MAC1外的部分或者全部数据data1得到的,例如:MAC1=CMAC(K1,data1)。
可选的,第一认证请求中可以包括第一身份验证信息。该第一身份验证信息为第一节点根据第一节点与第二节点之间的共享密钥生成的。该共享密钥可以是第一节点与第二节点之间的预共享密钥。例如,第一节点根据预共享密钥PSK,通过KDF可以生成第一身份认证信息AUTHa,即:AUTHa=KDF(PSK)。
可选的,在第一关联请求中包括第一新鲜性参数的情况下,该第一身份验证信息可以是第一节点根据共享密钥和第一新鲜性参数生成的。例如,第一节点根据预共享密钥PSK和第一新鲜性参数NONCEe,通过KDF生成第一身份认证信息AUTHa,例如AUTHa=KDF(PSK,NONCEe)。进一步可选的,在实际处理中,第一节点生成第一身份认证信息的参数还可以包括其他信息,例如,生成的第一身份认证信息AUTHa可以满足:AUTHa=KDF(PSK,第一关联请求)。进一步可选的,在第一认证请求中包括第二新鲜性参数的情况下,第一节点生成的第一身份认证信息AUTHa还可以满足:AUTHa=KDF(PSK,NONCEa,第一关联请求),其中,NONCEa为第一认证请求中的第二新鲜性参数。
步骤S605:第二节点校验第一认证请求的消息完整性。
具体的,第一认证请求中包括第一完整性校验数据,第二节点可以根据该第一完整性校验数据校验第一认证请求的消息完整性,防止第一认证请求中的内容被攻击者篡改。
在一种可能的方案中,第一节点通过什么样的方式生成第一完整性校验数据,第二节点也使用相同的方式生成校验值,若生成的校验值与第一完整性校验数据相同,消息完整性通过。例如,第一完整性校验数据MAC1是第一节点根据CMAC算法,通过共享密钥K1、第一认证请求中除了MAC1以外的部分或者全部数据data1得到的,那么第二节点通过相同的方式生成校验值check3:check3=CMAC(K1,data1),若check3与MAC1相同,说明第一认证请求中的数据data1没有被篡改,第一认证请求的完整性验证通过。
可选的,图6所示的关联控制方法还包括步骤S606,具体如下:
步骤S606:若第一认证请求的消息完整性校验失败,第二节点更新第二认证失败计数器。
具体的,第二节点可以通过第二认证失败计数器表征针对第一节点的验证失败的次数,因此若针对第一认证请求的消息完整性校验失败,第二节点可以将第二认证失败计数器的 值加1,该第二认证失败计数器可以用于后续确认第一节点的身份是否可信。
可选的,图6所示的关联控制方法还包括步骤S607,具体如下:
步骤S607:若第二认证失败计数器的值超过第二阈值,第二节点将第一节点的标识加入第二黑名单。
具体的,第二认证失败计数器表征针对所述第一节点的验证失败的次数,超过第二阈值可以为大于或者等于第二阈值。若对第一认证请求的消息完整性验证失败的次数超过第二阈值,可以说明来自第一节点的消息可能多次遭到了攻击者的篡改或者原本就是错误的数据,因此将第一节点的标识加入第二黑名单,避免了第二节点与非法的攻击者建立关联,提高了第二节点的数据安全性。
可选的,若第二节点确定所述第二认证失败计数器的值小于或者等于第二阈值,可以向所述第一节点发送第二关联请求。进一步可选的,在第二节点发送第二关联请求之前,可以获取第三确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,第二节点可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
可选的,图6所示的关联控制方法还包括步骤S608,具体如下:
步骤S608:第二节点根据第二节点与所述第一节点的共享密钥验证第一身份认证信息。
具体可以参考步骤S305的相关描述。
可选的,图6所示的关联控制方法还包括步骤S609,具体如下:
步骤S609:若对第一身份认证信息的验证失败,第二节点更新第二认证失败计数器。
具体的,第二认证失败计数器表征针对所述第一节点的验证失败的次数。若对所述第一节点的身份认证信息验证失败,则可以将第二认证失败计数器的值加1,该第二认证失败计数器可以用于后续确定第一节点的身份是否可信。
可选的,图6所示的关联控制方法还包括步骤S610,具体如下:
步骤S610:若第二认证失败计数器的值超过第二阈值,第二节点将第一节点的标识加入第二黑名单。
具体的,第二认证失败计数器表征针对所述第一节点的验证失败的次数,超过第二阈值可以为大于或者等于第二阈值。若第二认证失败计数器的值超过第二阈值,表明该第一节点已经多次验证不通过,因此该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入第二黑名单。在加入第二黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了第二节点与非法的攻击者建立关联,提高了节点的数据安全性。
可选的,若第二节点确定所述第二认证失败计数器的值小于第二阈值,可以向所述第一节点发送第二关联请求。进一步可选的,在第二节点发送第二关联请求之前,可以获取第三确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,第二节点可以输出第三提示信息,提醒用户对第一节点的身份验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向第一节点发送第二关联请求。这样一来,由用户去验证需要 重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
可选的,具体实施过程中,第二节点也可以先执行步骤S608或者步骤S608-步骤S610的操作再执行步骤S605或者步骤S605-步骤S607的操作。也即是说,第二节点可以先根据共享密钥验证第一身份认证信息之后,再校验第一认证请求的消息完整性。
步骤S611:第二节点向所述第一节点发送第一认证响应。
具体的,第一认证响应中还可以包括第二完整性校验数据等等。其中,该第二完整性校验数据是根据对称密钥和完整性保护算法生成的校验数据,用于第一节点校验第一关联请求的消息完整性。在具体实现中,该校验数据也可以称为消息认证码(message authentication code,MAC)。例如,第二完整性校验数据MAC2可以是根据CMAC算法,通过共享密钥K1、第一认证响应中除了MAC2以外的部分或者全部数据data2得到的,例如:MAC2=CMAC(K1,data2)。
可选的,若第一认证请求的消息完整性校验通过,则第二节点向第一节点发送第一认证响应。进一步可选的,若第一认证请求的消息完整性校验通过,且第二节点对第一身份认证信息的验证通过,则向第一节点发送第一认证响应。
可选的,第一认证响应中还可以包括第二身份验证信息。该第二身份验证信息为第二节点根据与第一节点之间的共享密钥生成的。该共享密钥可以是第一节点与第二节点之间的预共享密钥PSK。例如,第二节点根据预共享密钥PSK,通过KDF可以生成第二身份认证信息AUTHe,例如:AUTHe=KDF(PSK)。
可选的,在第一认证请求中包括第二新鲜性参数的情况下,该第二身份验证信息可以是第二节点根据共享密钥和第二新鲜性参数生成的。例如,第二节点根据预共享密钥PSK和第二新鲜性参数NONCEa,通过KDF生成第二身份认证信息AUTHe,例如:AUTHe=KDF(PSK,NONCEa)。进一步可选的,在实际处理中,第二节点生成第二身份认证信息的参数还可以包括其他信息,例如,生成的第二身份认证信息AUTHe可以满足:AUTHe=KDF(PSK,第一认证请求)。进一步可选的,在第一关联请求中还可以包括第一新鲜性参数的情况下,第二节点生成的第二身份认证信息AUTHe还可以满足:AUTHe=KDF(PSK,NONCEe,第一认证请求),其中,NONCEe为第一关联请求中的第一新鲜性参数。
步骤S612:第一节点校验第一认证响应的消息完整性。
具体的,第一认证响应中包括第二完整性校验数据,第一节点可以根据该第二完整性校验数据校验第一认证响应的消息完整性,防止第一认证响应中的内容被攻击者篡改。
在一种可能的方案中,第二节点通过什么样的方式生成第二完整性校验数据,第一节点也使用相同的方式生成校验值,若生成的校验值与第二完整性校验数据相同,则消息完整性通过。例如,第二完整性校验数据MAC2是第二节点根据CMAC算法,通过共享密钥K1、第一认证响应中除了MAC2以外的部分或者全部数据data2得到的,那么第二节点通过相同的方式生成校验值check4:check4=CMAC(K1,data2),若check4与MAC2相同,说明第一认证响应中的数据data2没有被篡改,第一认证响应的完整性验证通过。
S613:若第一认证响应的消息完整性校验失败,第一节点更新第一认证失败计数器。
具体的,第一节点可以通过第一认证失败计数器表征针对第二节点的验证失败的次数,因此若对第一认证响应的消息完整性校验失败,第一节点可以将第一认证失败计数器的值 加1,该第一认证失败计数器可以用于后续确认第二节点的身份是否可信。
可选的,图6所示的关联控制方法还包括步骤S614,具体如下:
步骤S614:若第一认证失败计数器的值超过第一阈值,第一节点将第二节点的标识加入第一黑名单。
具体的,第一认证失败计数器表征针对所述第二节点的验证失败的次数,超过第一阈值可以为大于或者等于第一阈值。若第一认证失败计数器的值超过第一阈值,可以说明来自第二节点的消息可能多次遭到了攻击者的篡改或者原本就是错误的数据,因此将第二节点的标识加入第一黑名单,避免了与非法的攻击者建立关联,提高了节点的数据安全性。
可选的,图6所示的关联控制方法还包括步骤S615,具体如下:
步骤S615:第一节点根据共享密钥验证第二身份认证信息。
具体可以参考步骤S307的相关描述。
可选的,图6所示的关联控制方法还包括步骤S616或者步骤S616-步骤S617,步骤S616-步骤S617具体如下:
步骤S616:若第一认证响应的消息完整性校验失败,第一节点更新第一认证失败计数器。
具体可以参考步骤S308的相关描述。
步骤S617:若第一认证失败计数器的值超过第一阈值,第一节点将第二节点的标识加入第一黑名单。
具体可以参考步骤S501的相关描述。
可选的,具体实施过程中,第一节点也可以先执行步骤S615或者步骤S615-步骤S617的操作再执行步骤S612或者步骤S612-步骤S613的操作。也即是说,第一节点可以先根据共享密钥验证第二身份认证信息之后,再校验第一认证响应的消息完整性。
可选的,图6所示的关联控制方法还包括步骤S618,具体如下:
步骤S618:第一节点向第二节点发送第一关联响应。
具体的,该第一关联响应用于指示第一节点与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
可选的,若第一认证响应的消息完整性校验通过,则第一节点向第二节点发送第一关联响应。进一步可选的,若第一认证响应的消息完整性校验通过,且第一节点对第二身份认证信息的验证通过,则第一节点向第二节点发送第一关联响应。
在图6所示的实施例中,在确认第二节点的身份可信后,进行关联之前还需要对来自第二节点的认证响应消息进行消息完整性验证。若消息完整性验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,从而可以防止攻击者篡改认证过程中的数据,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。
请参见图7,图7是本申请实施例提供的一种关联控制装置70的结构示意图,该装置70可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置70可以 包括通信单元701和处理单元702。其中,各个单元的描述如下:
通信单元701,用于接收来自第二节点的第一关联请求;
处理单元702,用于确定所述第二节点的身份可信,通过所述通信单元701向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;
所述通信单元701,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
所述处理单元702,还用于根据所述共享密钥验证所述第二身份认证信息;
所述处理单元702,还用于若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置70在确认第二节点的身份可信后,再根据与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了上述装置70确定身份可信这一步骤,由于难以伪造身份验证信息,还是无法通过上述装置对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
进一步的,若验证不通过,上述装置70会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,上述装置70可以不再对其的关联请求进行处理(如发送认证请求),从而防止上述装置70由于处理大量请求而崩溃,保证了服务正常进行。
这里需要说明的是,上述多个单元的划分仅是一种根据功能进行的逻辑划分,不作为对装置70具体的结构的限定。在具体实现中,其中部分功能模块可能被细分为更多细小的功能模块,部分功能模块也可能组合成一个功能模块,但无论这些功能模块是进行了细分还是组合,装置70在关联控制的过程中所执行的大致流程是相同的。例如,上述通信单元701也可以变换为接收单元、发送单元,该接收单元用于实现通信单元701中接收消息的功能,该发送单元用于实现通信单元701中发送消息的功能。通常,每个单元都对应有各自的程序代码(或者说程序指令),这些单元各自对应的程序代码在处理器上运行时,使得该单元执行相应的流程从而实现相应功能。
在一种可能的实施方式中,所述处理单元702,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置70根据通过黑名单或者白名单对请求关联的节点进行控制,从而使得无需对不可信的第二节点进行身份认证,一方面,可以防止由于处理大量请求而崩溃,保证了服务正常进行。另一方面,由于不会与没有经过身份认证的节点建立关联,避免了上述装置70与非法的攻击者建立关联,提高了上述装置70的数据安全性。
在一种可能的实施方式中,所述处理单元,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;
所述处理单元702,具体用于:
确定所述第一认证响应的消息完整性校验通过。
可以看出,在确认第二节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证响应中的内容被攻击者篡改,从而避免影响对第二节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元702,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制上述装置所能提供的服务的承受量,当超过第一关联阈值时,上述装置可以不再接收或者处理关联请求,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述通信单元701,还用于:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在又一种可能的实施方式中,所述处理单元702,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元702,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点 的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在又一种可能的实施方式中,该处理单元702,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过某一阈值以后,可以永久加入第一黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。本申请不具体限定设备类型的数量,可以根据具体的场景设计。
在又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置的资源,影响其它节点的正常关联。
需要说明的是,各个单元的实现还可以对应参照图3或图5所示的一个实施例的相应描述。该装置70可以为图3或图5所示的实施例中的第一节点。
请参见图8,图8是本申请实施例提供的一种关联装置80的结构示意图,该装置80可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置80可以包括处理单元801和通信单元802。其中,各个单元的描述如下:
处理单元801,确定第一节点的身份可信,通过通信单元802向所述第一节点发送第一关联请求;
所述通信单元802,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
所述处理单元801,还用于根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;
所述通信单元802,还用于若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
本申请实施例中,上述装置在确认第一节点的身份可信后,再向第一节点发送第一关联请求。然后根据第一认证请求中的第一身份认证信息,通过共享密钥验证第一节点的身份认证信息,在验证通过以后,再向第一节点发送第二身份认证信息,该第二身份认证信息可以用于第一节点验证上述装置的身份。可以看出,再确认身份可信以后,还需要双方身份认证通过才可以进行关联,从而可以使得攻击者难以通过修改标识等身份绕过第二节点对其的身份验证,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
这里需要说明的是,上述多个单元的划分仅是一种根据功能进行的逻辑划分,不作为对装置80具体的结构的限定。在具体实现中,其中部分功能模块可能被细分为更多细小的功能模块,部分功能模块也可能组合成一个功能模块,但无论这些功能模块是进行了细分还是组合,装置80在关联控制的过程中所执行的大致流程是相同的。例如,上述通信单元802也可以变换为接收单元、发送单元,该接收单元用于实现通信单元802中接收消息的功能,该发送单元用于实现通信单元802中发送消息的功能。通常,每个单元都对应有各自的程序代码(或者说程序指令),这些单元各自对应的程序代码在处理器上运行时,使得该单元执行相应的流程从而实现相应功能。
在一种可能的实施方式中,所述处理单元801,具体用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置不向不可信的第一节点发送关联请求,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在又一种可能的实施方式中,所述处理单元801,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
所述处理单元801,还用于:
确定所述第一认证请求的消息完整性校验通过。
可以看出,在确认第一节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证请求中的内容被攻击者篡改,从而影响对第一节点的身份验证信息的验证,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元801,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置所能关联的节点的数量,当超过第二关联阈值时,上述装置不能再关联其它节点,避免影响与该装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述通信单元802,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,上述装置可以接收到来自第一节点的第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以告知上述装置已经关联成功,可以进行后续的通信。
在又一种可能的实施方式中,所述处理单元801,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元801,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在又一种可能的实施方式中,所述处理单元801,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避 免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在又一种可能的实施方式中,所述处理单元801,还用于确定所述第二认证失败计数器的值小于第二阈值;
所述通信单元802,还用于向所述第一节点发送第二关联请求。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,该处理器,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在又一种可能的实施方式中,该处理器,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型中的至少一项有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。在又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第 一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
需要说明的是,各个单元的实现还可以对应参照图3或图5所示的一个实施例的相应描述。该装置80可以为图3或图5所示的实施例中的第二节点。
请参见图9,图9是本申请实施例提供的一种通信装置90的结构示意图,该通信装置90可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等。该装置90可以包括至少一个存储器901和至少一个处理器902。可选的,还可以包含总线903。进一步可选的,还可以包括通信接口904,其中,存储器901、处理器902和通信接口904通过总线903相连。
其中,存储器901用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器901可以是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CD-ROM)等等中的一种或者多种的组合。
处理器902是进行算术运算和/或逻辑运算的模块,具体可以是中央处理器(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)等处理模块中的一种或者多种的组合。
通信接口904用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙、通用无线传输等)接口。可选的,通信接口1104还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该装置90中的处理器902用于读取所述存储器901中存储的计算机程序,用于执行前述的关联控制方法,例如图3或者图5所描述的关联控制方法。
举例说明,该装置90中的处理器902用于读取所述存储器901中存储的计算机程序,用于执行以下操作:
通过通信接口904接收来自第二节点的第一关联请求;
确定所述第二节点的身份可信,通过通信接口904向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;其中,共享密钥可以看作是第一节点与第二节点之间共享的第一个秘密值;
通过通信接口904接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
根据所述共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证 失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置90在确认第二节点的身份可信后,再根据与第二节点的共享密钥验证第二节点的身份。这样一来,即便攻击者修改了身份标识,绕过了上述装置90确定身份可信这一步骤,由于难以伪造身份验证信息,还是无法通过上述装置90对其的身份验证,进而避免了上述装置90与非法的攻击者建立关联,提高了上述装置90的数据安全性。
进一步的,若验证不通过,上述装置90会更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,上述装置90可以不再对其的关联请求进行处理(如发送认证请求),从而防止上述装置90由于处理大量请求而崩溃,保证了服务正常进行。
在又一种可能的实施方式中,该处理器902,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置90根据通过黑名单或者白名单对请求关联的节点进行控制,从而使得无需对不可信的第二节点进行身份认证,一方面,可以防止由于处理大量请求而崩溃,保证了服务正常进行。另一方面,由于不会与没有经过身份认证的节点建立关联,避免了上述装置90与非法的攻击者建立关联,提高了上述装置90的数据安全性。
在又一种可能的实施方式中,该处理器902,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;
该处理器902,还用于确定所述第一认证响应的消息完整性校验通过。
可以看出,在确认第二节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证响应中的内容被攻击者篡改,从而避免影响对第二节点的身份验证信息的验证,保障了上述装置90所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器902,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置90中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制节点所能提供的服务的承受量,当超过第一关联阈值时,上述装置90可以不再接收或者处理关联请求,避免影响与上述装置90关联的其它节点的通信,保障了上述装置90所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器902,还用于:
若对所述第二身份认证信息的验证通过,通过通信接口904向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置90与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在又一种可能的实施方式中,该处理器902,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障了上述装置90所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器902,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置90与非法的攻击者建立关联,提高了上述装置90的数据安全性。
在又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在又一种可能的实施方式中,该处理器902,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述实施方式说明了与黑名单的有效期相关的因素,一方面,黑名单的有效期可以与第二节点加入黑名单的次数有关,某一第二节点加入的黑名单的次数越多,其在黑名单中的时长也会越来越长。进一步的可选的,当其被加入黑名单的次数超过某一阈值以后,可以永久加入黑名单。
另一方面,黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如, 设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,上述装置90还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。
在又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置90的资源,影响其它节点的正常关联。
需要说明的是,各个单元的具体实现还可以对应参照图3或图5所示的一个实施例的相应描述。该通信装置90可以为图3或图5所示的实施例中的第一节点。
请参见图10,图10是本申请实施例提供的一种通信装置100的结构示意图,该通信装置100可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等。该装置100可以包括至少一个存储器1001和至少一个处理器1002。可选的,还可以包含总线1003。进一步可选的,还可以包括通信接口1004,其中,存储器1001、处理器1002和通信接口1004通过总线1003相连。
其中,存储器1001用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1001可以是RAM、ROM、EPROM、CD-ROM等等中的一种或者多种的组合。
处理器1002是进行算术运算和/或逻辑运算的模块,具体可以是CPU、GPU、MPU、ASIC、FPGA、CPLD等处理模块中的一种或者多种的组合。
通信接口1004用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙等)接口。可选的,通信接口1104还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该装置100中的处理器1002用于读取所述存储器1001中存储的计算机程序,用于执行前述的关联控制方法,例如图3或者图5所描述的关联控制方法。
举例说明,该装置100中的处理器1002用于读取所述存储器1001中存储的计算机程序,用于执行以下操作:
确定第一节点的身份可信,向所述第一节点发送第一关联请求;
接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;其中,共享密钥是第一节点与第二节点之间共享的一个秘密值;
若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
本申请实施例中,上述装置100在确认第一节点的身份可信后,再向第一节点发送第一关联请求。然后根据第一认证请求中的第一身份认证信息,通过共享密钥验证第一节点的身份认证信息,在验证通过以后,再向第一节点发送第二身份认证信息,该第二身份认 证信息可以用于第一节点验证上述装置100的身份。可以看出,再确认身份可信以后,还需要双方身份认证通过才可以进行关联,从而可以使得攻击者难以通过修改标识等身份绕过上述装置100对其的身份验证,进而避免了上述装置100与非法的攻击者建立关联,提高了上述装置100的数据安全性。
在又一种可能的实施方式中,该处理器1002,还用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置100不向不可信的第一节点发送关联请求,避免了上述装置100与非法的攻击者建立关联,提高了上述装置100的数据安全性。
在又一种可能的实施方式中,该处理器1002,还用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
该处理器,还用于确定所述第一认证请求的消息完整性校验通过。
可以看出,在确认第一节点的身份可信之后,除了进行身份验证,还需要对携带身份验证信息的消息做完整性校验,防止第一认证请求中的内容被攻击者篡改,从而影响对第一节点的身份验证信息的验证,保障了上述装置100所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器1002,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置100中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置100所能关联的节点的数量,当超过第二关联阈值时,上述装置100不能再关联其它节点,避免影响与上述装置100关联的其它节点的通信,保障了上述装置100所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器1002,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与 所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对上述装置100的身份验证通过,上述装置100接收到来自第一节点的第一关联响应,该关联响应用于指示第一节点与第二节点建立关联。进一步的,该第一响应消息可以告知上述装置100已经关联成功,可以进行后续的通信。
在又一种可能的实施方式中,该处理器1002,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置100所提供的服务的稳定运行。
在又一种可能的实施方式中,该处理器1002,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置100更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过上述装置100对其的关联控制,进而避免了上述装置100与非法的攻击者建立关联,提高了上述装置100的数据安全性。
在又一种可能的实施方式中,该处理器1002,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了上述装置100与非法的攻击者建立关联,提高了上述装置100的数据安全性。
在又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在又一种可能的实施方式中,该处理器1002,还用于:
确定所述第二认证失败计数器的值小于第二阈值,
向所述第一节点发送第二关联请求。
可以理解的是,在身份认证信息验证过程中,由于某些参数在传输过程中被丢失或者传输错误,可能也会导致身份认证信息验证失败。因此,若针对第一节点的验证失败的次数还没有超过预设的第二阈值,可以重新向第一节点发送关联请求,请求与第一节点进行关联,从而提高系统的鲁棒性,保障了上述装置100所提供的服务的稳定运行。在又一种可能的实施方式中,该处理器1002,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在又一种可能的实施方式中,该处理器1002,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型中的至少一项有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,上述装置100还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。
在又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
需要说明的是,各个模块的具体实现还可以对应参照图3或图5所示的一个实施例的相应描述。该通信装置100可以为图3或图5所示的实施例中的第二节点。
请参见图11,图11是本申请实施例提供的一种关联控制装置110的结构示意图,该装置110可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置110可以包括通信单元1101和处理单元1102。其中,各个单元的描述如下:
通信单元1101,用于接收来自第二节点的第一关联请求;
处理单元1102,用于确定所述第二节点的身份可信,通过所述通信单元1101向所述第二节点发送第一认证请求,所述第一认证请求中包括第一完整性校验数据;
所述通信单元1101,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二完整性校验数据;
所述处理单元1102,还用于根据所述第二完整性验证数据验证所述第一认证响应的消息完整性;
所述处理单元1102,还用于若对所述第一认证响应的消息完整性的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
本申请实施例中,上述装置在确认第二节点的身份可信后,进行关联之前还需要对来自第二节点的认证响应消息进行消息完整性验证。若消息完整性验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,从而可以防止攻击者篡改认证过程中的数据(如身份认证信息),进而避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在一种可能的实施方式中,所述处理单元1102,具体用于:
确定所述第二节点的标识在第一白名单中;
或者,确定所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
上述装置根据通过黑名单或者白名单对请求关联的节点进行控制,从而无需对不可信的第二节点进行身份认证,避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在一种可能的实施方式中,所述处理单元1102,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第二节点的标识在第一白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第二节点的标识在第一白名单中;
若所述第二节点的标识不在第一黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第二节点的标识不在第一白名单中,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述处理单元1102,还用于:
确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第一关联阈值,当关联的节点数量小于或者等于预设的第一关联阈值时,才可以接收来自第二节点的关联请求。该第一阈值可以限制上述装置所能提供的服务的承受量,当超过第一关联阈值时,上述装置可以不再接收或者处理关联请求,避免影响与上述装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元1102,还用于:
若对所述第一认证响应的完整性的验证通过,则根据与第二节点之间的共享密钥验证所述第二身份认证信息;
若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
可以看出,上述装置在确认第二节点的身份可信之后,若完整性验证通过,则根据与第二节点的共享密钥验证第二节点的身份。若验证不通过,则更新验证失败的次数,该验证失败的次数可以用于后续确定第二节点的身份是否可信,使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再对其的关联请求进行处理(如发送认证请求),从而防止节点由于处理大量请求而崩溃,保证了服务正常进行。
在又一种可能的实施方式中,所述通信单元1101,还用于:
若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,可以向第二节点发送第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以用于告知第二节点已经关联成功,可以进行通信。
在又一种可能的实施方式中,所述处理单元1102,还用于:
若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
可以看出,在确认第二节点的身份可信之后,若身份验证通过,需要重置针对第二节点的验证失败的次数,避免影响之后对第二节点的身份的确定,保障上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元1102,还用于:
确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
可以看出,若针对第二节点的验证失败的次数超过预设的第一阈值,表明该第二节点已经多次验证不通过,该第二节点可能是频繁发送关联请求的攻击者,因此将该第二节点的标识加入黑名单。在加入黑名单以后,该第二节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,所述第一黑名单的有效期为预先定义或者配置的第一时长。
可以看出,第一黑名单中存在预先定义或者配置的第一时长,可以看作是黑名单的有效期。例如,黑名单的第一时长可以是一周,当某第二节点的标识被加入黑名单一周以后,可以被移出该黑名单。
在又一种可能的实施方式中,该处理单元1102,还用于:
若所述第二节点的标识加入所述第一黑名单的时间超过第一时长,则将所述第二节点的标识移出所述第一黑名单,所述第一时长与所述第二节点的标识加入所述第一黑名单的次数、所述第二节点的类型中的至少一项有关。
上述方实施方式说明了与第一黑名单的有效期相关的因素,一方面,第一黑名单的有效期可以与第二节点加入第一黑名单的次数有关,某一第二节点加入的第一黑名单的次数越多,其在第一黑名单中的时长也会越来越长。进一步的可选的,当其被加入第一黑名单的次数超过某一阈值以后,可以永久加入第一黑名单。
另一方面,第一黑名单的有效期可以与第二节点所属的设备类型有关,具体的,第二节点可以预先获取第二节点的设备类型,根据不同的设备类型确定不同的黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第二节点属于麦克风、音响等,可以认为是低风险设备,若第二节点属于手机、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第一节点还可以预先定义第二节点对应的黑名单有效期,此处不再赘述。在又一种可能的实施方式中,若所述第二节点的身份不可信,则不执行所述向所述第二节点发送第一认证请求的步骤。
可以看出,若第二节点的身份不可信,则不再执行后续的身份认证步骤,避免浪费上述装置的资源,影响其它节点的正常关联。
这里需要说明的是,上述多个单元的划分仅是一种根据功能进行的逻辑划分,不作为对装置110具体的结构的限定。在具体实现中,其中部分功能模块可能被细分为更多细小的功能模块,部分功能模块也可能组合成一个功能模块,但无论这些功能模块是进行了细分还是组合,装置110在关联控制的过程中所执行的大致流程是相同的。例如,上述通信单元也可以变换为接收单元、发送单元,该接收单元用于实现通信单元中接收消息的功能,该发送单元用于实现通信单元中发送消息的功能。通常,每个单元都对应有各自的程序代码(或者说程序指令),这些单元各自对应的程序代码在处理器上运行时,使得该单元执行相应的流程从而实现相应功能。
需要说明的是,各个单元的实现还可以对应参照图6所示的实施例的相应描述。该装置110可以为图6所示的实施例中的第一节点。
请参见图12,图12是本申请实施例提供的一种关联控制装置120的结构示意图,该装置120可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等,该装置120可以包括处理单元1201和通信单元1202。其中,各个单元的描述如下:
处理单元1201,用于确定第一节点的身份可信,通过通信单元1202向所述第一节点发送第一关联请求;
所述通信单元1202,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息和第一完整性检验数据;
所述处理单元1201,还用于根据所述第一完整性验证数据验证所述第一认证请求的消息完整性;
所述通信单元1202,还用于若对所述第一认证请求的消息完整性的验证通过则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二完整性校验数据。
本申请实施例中,上述装置在确认第二节点的身份可信后,在进行通信之前还需要对第一节点进行认证(例如通过身份验证信息等进行验证)。为了防止攻击者篡改认证过程中的数据,需要先对第一认证请求进行消息完整性验证。若消息完整性验证通过,才允许与第一节点可以进行关联,从而可以防止攻击者篡改消息内容,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在一种可能的实施方式中,所述处理单元1201,具体用于:
确定所述第一节点的标识在第二白名单中;
或者,确定所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
上述方法中,可以根据通过黑名单或者白名单对关联节点进行控制,可以控制上述装置不向不可信的第一节点发送关联请求,避免了上述装置与非法的攻击者建立关联,提高了上述装置的数据安全性。
在又一种可能的实施方式中,所述处理单元1201,具体用于:
若第一节点与所述第二节点的共享密钥的类型为预先配置类型,确定所述第一节点的标识在第二白名单中;
若第一节点与所述第二节点的共享密钥的类型为口令生成类型,确定所述第一节点的标识在第二白名单中;
若所述第一节点的标识不在第二黑名单中、第一节点与所述第二节点的共享密钥的类型为口令生成类型且所述第一节点的标识不在第二白名单中,获取第二确认指示信息,所述第二确认指示信息表征所述第二节点的身份可信。
在又一种可能的实施方式中,所述处理单元1201,还用于:
确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
可以看出,上述装置中预设有第二关联阈值,当关联的节点数量小于或者等于预设的第二关联阈值时,才可以向第一节点发送关联请求。该第二阈值可以限制上述装置所能关联的节点的数量,当超过第二关联阈值时,上述装置不能再关联其它节点,避免影响与该装置关联的其它节点的通信,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述通信单元1202,还用于:
接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
可以看出,在确认第一节点的身份可信之后,若第一节点针对第二节点的身份验证通过,上述装置可以接收到来自第一节点的第一关联响应,该关联响应用于指示上述装置与所述第二节点建立关联。进一步的,该第一响应消息可以告知上述装置已经关联成功,可以进行后续的通信。
在又一种可能的实施方式中,所述处理单元1201,还用于:
重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,在确认第一节点的身份可信之后,若身份验证通过,需要重置针对第一节点的验证失败的次数,避免影响之后对第一节点的身份的确定,保障了上述装置所提供的服务的稳定运行。
在又一种可能的实施方式中,所述处理单元1201,还用于:
若对所述第一认证响应的消息完整性的验证失败,则更新第二认证失败计数器,所述 第二认证失败计数器表征针对所述第一节点的验证失败的次数。
通常来说,若对所述第一认证响应的消息完整性验证失败,则说明该第一认证响应消息已经不再完整或者已经被攻击者修改,因此更新针对第一节点的验证失败的次数,该验证失败的次数可以用于后续确定第一节点的身份是否可信。
在又一种可能的实施方式中,所述第一认证请求消息中还包括第一身份验证信息,所述处理单元1201,还用于若对所述第一认证响应的消息完整性的验证通过,则根据与第一节点之间的共享密钥验证所述第一身份验证信息;
所述通信单元1202,还用于若对第一身份验证信息的验证通过,则向所述第一节点发送所述第一认证响应。
可以看出,在确认第一节点的身份可信之后,若完整性验证通过,则根据与第一节点的共享密钥验证第一节点的身份。从而可以使得攻击者难以通过修改标识等身份绕过上述装置对其的关联控制,进而避免了节点与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,所述处理单元1201,还用于:
若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信,从而使得多次验证不通过的节点可以不再被确定为可信。而对于不被确认为可信的节点,可以不再向其发送关联请求,从而保证了节点所提供的服务正常进行。在又一种可能的实施方式中,所述处理单元1201,还用于:
确定所述第二认证失败计数器的值大于或者等于第二阈值,
将所述第一节点的标识加入所述第二黑名单。
可以看出,若针对第一节点的验证失败的次数超过预设的第二阈值,表明该第一节点已经多次验证不通过,该第一节点可能是频繁发送认证请求的攻击者,因此将该第一节点的标识加入黑名单。在加入黑名单以后,该第一节点的身份将不会被确定为可信,从而避免了上述装置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,所述第二黑名单的有效期为预先定义或者配置的第二时长。
可以看出,第二黑名单中存在预先定义或者配置的第二时长,可以看作是黑名单的有效期。例如,黑名单的第二时长可以是10天,当某第一节点的标识被加入黑名单10天以后,可以被移出该黑名单。
在又一种可能的实施方式中,所述处理单元1201,还用于确定所述第二认证失败计数器的值小于第二阈值;
所述通信单元,还用于向所述第一节点发送第二关联请求。
可以看出,若对所述第一节点的身份认证信息验证失败,则上述装置更新验证第一节点的身份失败的次数,该验证失败的次数可以用于后续确定节点的身份是否可信。从而可以使得攻击者难以通过修改标识等身份绕过第一节点对其的关联控制,进而避免了上述装 置与非法的攻击者建立关联,提高了节点的数据安全性。
在又一种可能的实施方式中,该处理单元1201,还用于:
确定所述第二认证失败计数器的值小于第二阈值;
获取第三确认指示信息;
向所述第一节点发送第二关联请求。
可以看出,在重新发送第二关联请求之前,需要获取确认指示信息,该第三确认指示信息可以是根据用户输入的确认操作得到的指示信息,而该确认操作可以是对输出的提示信息的确认。例如,可以输出提示信息,提醒用户验证失败,需要重新发起关联请求,在接收到用户确认操作,得到第三确认指示信息后,向所述第一节点发送第二关联请求。这样一来,由用户去验证需要重新关联的第一节点的身份,可以避免与不可信的节点关联,保证了通信的安全性。
在又一种可能的实施方式中,该处理单元1201,还用于:
若所述第一节点的标识加入所述第二黑名单的时间超过第二时长,则将所述第一节点的标识移出所述第二黑名单,所述第二时长与所述第一节点的标识加入所述第二黑名单的次数、所述第一节点的类型有关。
上述实施方式说明了与第二黑名单的有效期相关的因素,一方面,第二黑名单的有效期可以与第一节点加入黑名单的次数有关,某一第一节点加入的第二黑名单的次数越多,其在第二黑名单中的时长也会越来越长。进一步的可选的,当其被加入第二黑名单的次数超过某一阈值以后,可以永久加入第二黑名单。
另一方面,第二黑名单的有效期可以与第一节点所属的设备类型有关,具体的,第一节点可以预先获取第一节点的设备类型,根据不同的设备类型确定不同的第二黑名单有效期。例如,设备类型可以包括高风险设备或者低风险设备,若第一节点属于智能座舱控制器CDC、虚拟现实设备AR等,可以认为是低风险设备,若第一节点属于服务器、电脑等,可以认为是高风险设备,高风险设备的黑名单有效期比低风险设备的黑名单有效期更长。此外,第二节点还可以预先定义第一节点对应的黑名单有效期,此处不再赘述。a在又一种可能的实施方式中,若所述第一节点的身份不可信,则不执行所述向所述第一节点发送第一关联请求的步骤。
可以看出,若第一节点的身份不可信,则不再向第一节点发送身份认证请求,避免浪费节点的资源。
这里需要说明的是,上述多个单元的划分仅是一种根据功能进行的逻辑划分,不作为对装置120具体的结构的限定。在具体实现中,其中部分功能模块可能被细分为更多细小的功能模块,部分功能模块也可能组合成一个功能模块,但无论这些功能模块是进行了细分还是组合,装置120在关联控制的过程中所执行的大致流程是相同的。例如,上述通信单元也可以变换为接收单元、发送单元,该接收单元用于实现通信单元中接收消息的功能,该发送单元用于实现通信单元中发送消息的功能。通常,每个单元都对应有各自的程序代码(或者说程序指令),这些单元各自对应的程序代码在处理器上运行时,使得该单元执行相应的流程从而实现相应功能。
需要说明的是,各个单元的实现还可以对应参照图6所示的实施例的相应描述。该装 置120可以为图6所示的实施例中的第二节点。
请参见图13,图13是本申请实施例提供的一种通信装置130的结构示意图,该装置130可以为节点,也可以为节点中的一个器件,例如芯片或者集成电路等。该通信装置130可以包括至少一个存储器1301和至少一个处理器1302。可选的,还可以包含总线1303。进一步可选的,还可以包括通信接口1304,其中,存储器1301、处理器1302和通信接口1304通过总线1303相连。
其中,存储器1301用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1301可以是RAM、ROM、EPROM、CD-ROM等等中的一种或者多种的组合。
处理器1302是进行算术运算和/或逻辑运算的模块,具体可以是CPU、GPU、MPU、ASIC、FPGA、CPLD等处理模块中的一种或者多种的组合。
通信接口1304用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙等)接口。可选的,通信接口1304还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该通信装置130中的处理器1302用于读取所述存储器1301中存储的计算机程序,用于执行前述的关联控制方法,例如图6所描述的关联控制方法。具体实现可以对应参照图6所示的实施例的相应描述。该通信装置130可以为图6所示的实施例中的第一节点。
请参见图14,图14是本申请实施例提供的一种通信装置140的结构示意图。该通信装置140可以包括至少一个存储器1401和至少一个处理器1402。可选的,还可以包含总线1403。进一步可选的,还可以包括通信接口1404,其中,存储器1401、处理器1402和通信接口1404通过总线1403相连。
其中,存储器1401用于提供存储空间,存储空间中可以存储操作系统和计算机程序等数据。存储器1401可以是RAM、ROM、EPROM、CD-ROM等等中的一种或者多种的组合。
处理器1402是进行算术运算和/或逻辑运算的模块,具体可以是CPU、GPU、MPU、ASIC、FPGA、CPLD等处理模块中的一种或者多种的组合。
通信接口1404用于接收外部发送的数据和/或向外部发送数据,可以为包括诸如以太网电缆等的有线链路接口,也可以是无线链路(Wi-Fi、蓝牙等)接口。可选的,通信接口1304还可以包括与接口耦合的发射器(如射频发射器、天线等),或者接收器等。
该通信装置140中的处理器1402用于读取所述存储器1401中存储的计算机程序,用于执行前述的关联控制方法,例如图6所描述的关联控制方法。具体实现可以对应参照图6所示的实施例的相应描述。该通信装置140可以为图6所示的实施例中的第二节点。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行图3、图5或图6所示的任意一种实施例所述的方法。
本申请实施例还提供了一种芯片系统,所述芯片系统包括至少一个处理器,存储器和接口电路,所示接口电路用于为所述至少一个处理器提供信息输入/输出,所述至少一个存储器中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行图3、图5或图6所示的任意一种实施例所述的方法。
本申请实施例还提供一种智能座舱产品,所述智能座舱产品包括第一节点(例如,汽车座舱域控制器CDC),所述第一节点为图3、图5或图6所示的任意一种实施例中的第一节点。进一步的,所述智能座舱产品还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入及启动系统控制器等模块中的至少一个),所述第二节点为图3、图5或图6所示任意一种实施例中的第二节点。
本申请实施例还提供一种车辆,所述车辆包括第一节点(例如,汽车座舱域控制器CDC)。进一步的,所述车辆还包括第二节点(例如,摄像头、屏幕、麦克风、音响、雷达、电子钥匙、无钥匙进入或启动系统控制器等模块中的至少一个),其中上述第一节点为图3、图5或图6所示的任意一种实施例中的第一节点,上述第二节点为图3、图5或图6所示的任意一种实施例中的第二节点。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在一个或多个处理器上运行时,可以执行如图3、图5或图6所示的任意一种实施例所描述的关联控制方法。可替换的,上述车辆还可以替换为无人机、机器人等智能终端或者运输工具。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,可以全部或部分地实现本申请实施例所描述的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者通过计算机可读存储介质进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本申请方法实施例中的步骤可以根据实际需要进行顺序调整、合并和删减。
本申请装置实施例中的模块可以根据实际需要进行合并、划分和删减。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。

Claims (44)

  1. 一种关联控制方法,其特征在于,包括:
    接收来自第二节点的第一关联请求;
    确定所述第二节点的身份可信,向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;
    接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
    根据所述共享密钥验证所述第二身份认证信息;
    若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述第二节点的身份可信,包括:
    确定所述第二节点的标识在第一白名单中;
    或者,确定所述第二节点的标识不在第一黑名单中;
    或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
    或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信;其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;所述方法还包括:
    确定所述第一认证响应的消息完整性校验通过。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:
    确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:
    若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
  7. 根据权利要求1-4任一项所述的方法,其特征在于,若根据所述共享密钥验证所述 第二身份信息验证不通过,则更新第一认证失败计数器之后,所述方法还包括:
    确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
  8. 根据权利要求7所述的方法,其特征在于,所述第一黑名单的有效期为预先定义或者配置的第一时长。
  9. 一种关联方法,其特征在于,包括:
    确定第一节点的身份可信,向所述第一节点发送第一关联请求;
    接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
    根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;
    若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
  10. 根据权利要求9所述的方法,其特征在于,所述确定所述第一节点的身份可信,包括:
    确定所述第一节点的标识在第二白名单中;
    或者,确定所述第一节点的标识不在第二黑名单中;
    或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
    或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
  11. 根据权利要求9或10所述的方法,其特征在于,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;所述方法还包括:
    确定所述第一认证请求的消息完整性校验通过。
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述确定第一节点的身份可信,向所述第一节点发送第一关联请求之前,还包括:
    确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
  13. 根据权利要求9-12任一项所述的方法,其特征在于,所述方法还包括:
    接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
  14. 根据权利要求9-13任一项所述的方法,其特征在于,所述方法还包括:
    重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
  15. 根据权利要求9-11任一项所述的方法,其特征在于,所述方法还包括:
    若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
  16. 根据权利要求15所述的方法,其特征在于,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
    确定所述第二认证失败计数器的值大于或者等于第二阈值,
    将所述第一节点的标识加入所述第二黑名单。
  17. 根据权利要求16所述的方法,其特征在于,所述第二黑名单的有效期为预先定义或者配置的第二时长。
  18. 根据权利要求15所述的方法,其特征在于,若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器之后,所述方法还包括:
    确定所述第二认证失败计数器的值小于第二阈值,
    向所述第一节点发送第二关联请求。
  19. 一种关联控制装置,其特征在于,包括:
    通信单元,用于接收来自第二节点的第一关联请求;
    处理单元,用于确定所述第二节点的身份可信,通过所述通信单元向所述第二节点发送第一认证请求,所述第一认证请求中包括第一身份认证信息,所述第一身份认证信息为根据第一节点与所述第二节点的共享密钥生成的;
    所述通信单元,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二身份认证信息;
    所述处理单元,还用于根据所述共享密钥验证所述第二身份认证信息;
    所述处理单元,还用于若对所述第二身份认证信息的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
  20. 根据权利要求19所述的装置,其特征在于,所述处理单元,具体用于:
    确定所述第二节点的标识在第一白名单中;
    或者,确定所述第二节点的标识不在第一黑名单中;
    或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信,其中,所述第二节点的标识不在第一黑名单中;
    或者,获取第一确认指示信息,所述第一确认指示信息表征所述第二节点的身份可信; 其中,所述第二节点的标识不在第一黑名单中且不在第一白名单中。
  21. 根据权利要求19或20所述的装置,其特征在于,所述第一认证响应中还包括第二完整性校验数据,所述第二完整性验证数据用于校验所述第一认证响应的消息完整性;
    所述处理单元,具体用于:
    确定所述第一认证响应的消息完整性校验通过。
  22. 根据权利要求19-21任一项所述的装置,其特征在于,所述处理单元,还用于:
    确定第一关联数量小于或者等于预设的第一关联阈值,其中,所述第一关联数量表征当前关联的节点数量。
  23. 根据权利要求19-22任一项所述的装置,其特征在于,所述通信单元,还用于:
    若对所述第二身份认证信息的验证通过,向所述第二节点发送第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
  24. 根据权利要求19-23任一项所述的装置,其特征在于,所述处理单元,还用于:
    若对所述第二身份认证信息的验证通过,重置所述第一认证失败计数器。
  25. 根据权利要求19-22任一项所述的装置,其特征在于,所述处理单元,还用于:
    确定所述第一认证失败计数器的值大于或者等于第一阈值,将所述第二节点的标识加入所述第一黑名单。
  26. 根据权利要求25所述的方法,其特征在于,所述第一黑名单的有效期为预先定义或者配置的第一时长。
  27. 一种关联控制装置,其特征在于,包括:
    处理单元,确定第一节点的身份可信,通过通信单元向所述第一节点发送第一关联请求;
    所述通信单元,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一身份认证信息;
    所述处理单元,还用于根据第二节点与所述第一节点的共享密钥验证所述第一身份认证信息;
    所述通信单元,还用于若对所述第一身份认证信息的验证通过,则向所述第一节点发送第一认证响应,所述第一认证响应中包括第二身份认证信息;其中,所述第二身份认证信息为根据所述共享密钥生成的。
  28. 根据权利要求27所述的装置,其特征在于,所述处理单元,具体用于:
    确定所述第一节点的标识在第二白名单中;
    或者,确定所述第一节点的标识不在第二黑名单中;
    或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信,其中,所述第一节点的标识不在第二黑名单中;
    或者,获取第二确认指示信息,所述第二确认指示信息表征所述第一节点的身份可信;其中,所述第一节点的标识不在第二黑名单中且不在第二白名单中。
  29. 根据权利要求27或28所述的装置,其特征在于,所述第一认证请求中还包括第一完整性校验数据,所述第一完整性验证数据用于校验所述第一认证请求的消息完整性;
    所述处理单元,还用于:
    确定所述第一认证请求的消息完整性校验通过。
  30. 根据权利要求27-29任一项所述的装置,其特征在于,所述处理单元,还用于:
    确定第二关联数量小于或者等于预设的第二关联阈值,其中,所述第二关联数量表征当前关联的节点数量。
  31. 根据权利要求27-30任一项所述的装置,其特征在于,所述通信单元,还用于:
    接收来自所述第一节点的第一关联响应,所述第一关联响应用于指示所述第一节点与所述第二节点建立关联。
  32. 根据权利要求27-31任一项所述的装置,其特征在于,所述处理单元,还用于:
    重置第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
  33. 根据权利要求27-29任一项所述的装置,其特征在于,所述处理单元,还用于:
    若对所述第一身份认证信息的验证失败,则更新第二认证失败计数器,所述第二认证失败计数器表征针对所述第一节点的验证失败的次数。
  34. 根据权利要求33所述的装置,其特征在于,所述处理单元,还用于:
    确定所述第二认证失败计数器的值大于或者等于第二阈值,
    将所述第一节点的标识加入所述第二黑名单。
  35. 根据权利要求34所述的装置,其特征在于,所述第二黑名单的有效期为预先定义或者配置的第二时长。
  36. 根据权利要求33所述的装置,其特征在于,所述处理单元,还用于确定所述第二认证失败计数器的值小于第二阈值;
    所述通信单元,还用于向所述第一节点发送第二关联请求。
  37. 一种关联控制方法,其特征在于,包括:
    接收来自第二节点的第一关联请求;
    确定所述第二节点的身份可信,向所述第二节点发送第一认证请求,所述第一认证请求中包括第一完整性校验数据;
    接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二完整性校验数据;
    根据所述第二完整性验证数据验证所述第一认证响应的消息完整性;
    若对所述第一认证响应的消息完整性的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
  38. 一种关联方法,其特征在于,包括:
    确定第一节点的身份可信,向所述第一节点发送第一关联请求;
    接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一完整性检验数据;
    根据所述第一完整性验证数据验证所述第一认证请求的消息完整性;
    若对所述第一认证请求的消息完整性的验证通过,则向所述第一节点发送第一认证响应。
  39. 一种关联控制装置,其特征在于,包括:
    通信单元,用于接收来自第二节点的第一关联请求;
    处理单元,用于确定所述第二节点的身份可信,通过所述通信单元向所述第二节点发送第一认证请求,所述第一认证请求中包含第一完整性校验数据;
    所述通信单元,还用于接收来自所述第二节点的第一认证响应,所述第一认证响应中包括第二完整性校验数据;
    所述处理单元,还用于根据所述第二完整性验证数据验证所述第一认证响应的消息完整性;
    所述处理单元,还用于若对所述第一认证响应的消息完整性的验证失败,则更新第一认证失败计数器,所述第一认证失败计数器表征针对所述第二节点的验证失败的次数。
  40. 一种关联装置,其特征在于,包括:
    处理单元,用于确定第一节点的身份可信,通过通信单元向所述第一节点发送第一关联请求;
    所述通信单元,还用于接收来自所述第一节点的第一认证请求,所述第一认证请求中包括第一完整性检验数据;
    所述处理单元,还用于根据所述第一完整性验证数据验证所述第一认证请求的消息完整性;
    所述通信单元,还用于若对所述第一认证请求的消息完整性的验证通过,则向所述第一节点发送第一认证响应。
  41. 一种通信装置,其特征在于,所述装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现如权利要求1-8中任一项所述的方法,或者实现如权利要求9-18任一项所述的方法。
  42. 一种通信装置,其特征在于,所述装置包括至少一个处理器和通信接口,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述装置实现如权利要求37或38中所述的方法。
  43. 一种通信系统,其特征在于,包括:
    第一节点,所述第一节点包含权利要求19-26任一项所述的装置;
    第二节点,所述第二节点包含权利要求27-36中任一项所述的装置。
  44. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,执行如权利要求1-8、37中任一项所述的方法,或者实现如权利要求9-18、38任一项所述的方法。
PCT/CN2020/106006 2020-07-30 2020-07-30 一种关联控制方法及相关装置 WO2022021256A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2023505821A JP2023535474A (ja) 2020-07-30 2020-07-30 アソシエーション制御方法及び関連装置
CN202080104749.4A CN116235467A (zh) 2020-07-30 2020-07-30 一种关联控制方法及相关装置
EP20946596.2A EP4184854A4 (en) 2020-07-30 2020-07-30 ASSOCIATION CONTROL METHOD AND APPARATUS
KR1020237005663A KR20230038571A (ko) 2020-07-30 2020-07-30 연관 제어 방법 및 관련 장치
PCT/CN2020/106006 WO2022021256A1 (zh) 2020-07-30 2020-07-30 一种关联控制方法及相关装置
US18/160,118 US20230239693A1 (en) 2020-07-30 2023-01-26 Association control method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/106006 WO2022021256A1 (zh) 2020-07-30 2020-07-30 一种关联控制方法及相关装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/160,118 Continuation US20230239693A1 (en) 2020-07-30 2023-01-26 Association control method and related apparatus

Publications (1)

Publication Number Publication Date
WO2022021256A1 true WO2022021256A1 (zh) 2022-02-03

Family

ID=80037381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106006 WO2022021256A1 (zh) 2020-07-30 2020-07-30 一种关联控制方法及相关装置

Country Status (6)

Country Link
US (1) US20230239693A1 (zh)
EP (1) EP4184854A4 (zh)
JP (1) JP2023535474A (zh)
KR (1) KR20230038571A (zh)
CN (1) CN116235467A (zh)
WO (1) WO2022021256A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116094848A (zh) * 2023-04-11 2023-05-09 中国工商银行股份有限公司 访问控制方法、装置、计算机设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102018221954A1 (de) * 2018-12-17 2020-06-18 Robert Bosch Gmbh Recheneinrichtung und Verfahren zum Betreiben einer Recheneinrichtung

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192920A (zh) * 2006-11-21 2008-06-04 华为技术有限公司 一种应答请求的方法和设备
CN101193068A (zh) * 2006-11-21 2008-06-04 华为技术有限公司 一种应答请求的方法和设备
US20100275245A1 (en) * 2009-04-23 2010-10-28 Borenstein Nathaniel S Communication authentication using multiple communication media
CN103138923A (zh) * 2011-11-24 2013-06-05 中国移动通信集团公司 一种节点间认证方法、装置及系统
CN103825733A (zh) * 2014-02-28 2014-05-28 华为技术有限公司 基于组合公钥密码体制的通信方法、装置及系统
CN105069348A (zh) * 2015-07-27 2015-11-18 深圳市云图电装系统有限公司 控制终端与被控终端的关联方法和装置
CN105553964A (zh) * 2015-12-10 2016-05-04 小米科技有限责任公司 控制蓝牙设备的方法及装置
CN105991605A (zh) * 2015-02-27 2016-10-05 中兴通讯股份有限公司 Wifi连接验证方法、wifi热点设备及终端
CN108011805A (zh) * 2016-12-29 2018-05-08 北京车和家信息技术有限责任公司 消息过滤的方法、装置、中间服务器及车联网系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1915837B1 (en) * 2005-08-19 2020-04-22 Samsung Electronics Co., Ltd. Method for performing multiple pre-shared key based authentication at once and system for executing the method
US9674892B1 (en) * 2008-11-04 2017-06-06 Aerohive Networks, Inc. Exclusive preshared key authentication
US10129228B1 (en) * 2016-03-30 2018-11-13 Amazon Technologies, Inc. Authenticated communication between devices
US10554689B2 (en) * 2017-04-28 2020-02-04 Cisco Technology, Inc. Secure communication session resumption in a service function chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192920A (zh) * 2006-11-21 2008-06-04 华为技术有限公司 一种应答请求的方法和设备
CN101193068A (zh) * 2006-11-21 2008-06-04 华为技术有限公司 一种应答请求的方法和设备
US20100275245A1 (en) * 2009-04-23 2010-10-28 Borenstein Nathaniel S Communication authentication using multiple communication media
CN103138923A (zh) * 2011-11-24 2013-06-05 中国移动通信集团公司 一种节点间认证方法、装置及系统
CN103825733A (zh) * 2014-02-28 2014-05-28 华为技术有限公司 基于组合公钥密码体制的通信方法、装置及系统
CN105991605A (zh) * 2015-02-27 2016-10-05 中兴通讯股份有限公司 Wifi连接验证方法、wifi热点设备及终端
CN105069348A (zh) * 2015-07-27 2015-11-18 深圳市云图电装系统有限公司 控制终端与被控终端的关联方法和装置
CN105553964A (zh) * 2015-12-10 2016-05-04 小米科技有限责任公司 控制蓝牙设备的方法及装置
CN108011805A (zh) * 2016-12-29 2018-05-08 北京车和家信息技术有限责任公司 消息过滤的方法、装置、中间服务器及车联网系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116094848A (zh) * 2023-04-11 2023-05-09 中国工商银行股份有限公司 访问控制方法、装置、计算机设备和存储介质
CN116094848B (zh) * 2023-04-11 2023-06-27 中国工商银行股份有限公司 访问控制方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
JP2023535474A (ja) 2023-08-17
EP4184854A4 (en) 2023-09-13
EP4184854A1 (en) 2023-05-24
KR20230038571A (ko) 2023-03-20
US20230239693A1 (en) 2023-07-27
CN116235467A (zh) 2023-06-06

Similar Documents

Publication Publication Date Title
US11637696B2 (en) End-to-end communication security
US11432150B2 (en) Method and apparatus for authenticating network access of terminal
EP3308519B1 (en) System, apparatus and method for transferring ownership of a device from manufacturer to user using an embedded resource
WO2022133949A1 (zh) 一种安全接入方法及装置
CN112651037B (zh) 区块链系统的链外数据访问方法和系统
US10250578B2 (en) Internet key exchange (IKE) for secure association between devices
US20230239693A1 (en) Association control method and related apparatus
US20230327857A1 (en) Communication Method and Apparatus
WO2023226778A1 (zh) 身份认证方法、装置、电子设备及计算机可读存储介质
WO2021237753A1 (zh) 通信方法及装置
CN113039766B (zh) 无线网络中的优化的等值同时认证(sae)认证
TWI641271B (zh) 一種存取認證方法、ue和存取設備
US20230099065A1 (en) Key obtaining method and related apparatus
US20230208625A1 (en) Communication method and related apparatus
US20230164560A1 (en) Bluetooth node pairing method and related apparatus
US20240023175A1 (en) Pairing method and apparatus
Energy Bluetooth Low Energy (BLE) Security and Privacy

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: 20946596

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023505821

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20237005663

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2020946596

Country of ref document: EP

Effective date: 20230216

NENP Non-entry into the national phase

Ref country code: DE