A method and system for verifying the legitimacy of a client node in an automotive CAN network
Patent Information
- Application Number
- CN202611390558.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-23
AI Technical Summary
1)安全性不足:网络中合法节点被非法节点替换时,网络没有检出能力车辆相应功能可被非法节点操控;
1)提升汽车CAN网络安全性。网络中合法节点被非法节点替换时,网络具备检出能力,避免车辆功能被非法节点操控;
Smart Images

Figure CN122969922A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and more specifically to a method and system for verifying the legitimacy of client nodes in an automotive CAN network. Background Technology
[0002] Currently, with the development of automotive electronics technology and people's increasing demands for vehicle performance, higher requirements are also being placed on the communication needs and control strategies of automobiles. CAN is currently the most widely used communication protocol in automotive electronics. Using the CAN bus to achieve reliable and real-time data communication in automobiles can shorten the development cycle and reduce development costs.
[0003] However, current automotive CAN networks typically employ static communication. Once the network is developed, the number, functions, and message transmission / reception of CAN nodes are fixed. Any change to any node requires modification of other related nodes; otherwise, network communication anomalies will occur. Furthermore, CAN messages are transmitted in plaintext, and the message identifier (MGI0) and the positions of each signal within the message are fixed, allowing for analysis and decryption of the message-function correspondence. Finally, there is no node authentication in the network; regardless of a node's legitimacy, as long as the message identifier (MsGID) and signal positions match the preset values, a response will be received. Therefore, the static communication method currently used in automotive CAN networks has the following drawbacks: 1) Insufficient security: When a legitimate node in the network is replaced by an illegitimate node, the network lacks the ability to detect that the corresponding functions of the vehicle can be controlled by the illegitimate node; 2) Insufficient anti-interference capability: After an illegal node accesses the network, it sends a message identifier (MSGI0) and signal that are consistent with the preset. That is, when it continuously sends illegal function commands, the corresponding functions of the vehicle are interfered with and cannot be used normally. 3) Insufficient flexibility: Changes in vehicle configuration or unforeseen circumstances (such as function degradation) may cause changes in the number, function, and message transmission of nodes. Other related nodes need to be modified, otherwise network communication will be disrupted, and the cost of configuration management and handling of unforeseen circumstances will be high.
[0004] Therefore, how to provide a method for verifying the legitimacy of client nodes in automotive CAN networks that can solve the above problems is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides a method and system for verifying the legitimacy of client nodes in an automotive CAN network, which can improve the security of the automotive CAN network, enhance its anti-interference capability, and increase its network flexibility.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A method for verifying the legitimacy of client nodes in an automotive CAN network includes the following steps: S1: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes, and determine a server node from the multiple communication nodes, while using the remaining communication nodes as client nodes; S2: Determine the message type. When the message type is a dynamic message, the server node performs legality verification on multiple client nodes, and registers node functions and adds a legal node identifier to the client nodes that pass the legality verification. S3: When the vehicle CAN network is communicating normally, any client node that has passed the legality verification sends a message to be identified, and the receiving client node verifies the legality of the message to be identified.
[0007] Preferred options also include: S4: If the parameters of the client node that has passed the legality verification in the vehicle CAN network change, then the legality verification of the client node is performed again.
[0008] Preferably, S1 includes: S11: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes; S12: Determine the server node from the multiple communication nodes according to the topology of the vehicle CAN network and preset rules, and use the remaining communication nodes as client nodes.
[0009] Preferably, S2 includes: S21: When the message type is a dynamic message, the server node establishes an initial node identifier table, wherein the initial node identifier table includes node name, node identifier, and dynamic message identifier; S22: The initialization of the server node is completed. The server node uses the initial node identifier table to generate an update initial node identifier table message and sends the update initial node identifier table message to multiple client nodes. S23: Multiple client nodes receive the Update Initial Node Identifier Table message and update the local node identifier table of the client nodes using the Update Initial Node Identifier Table message, wherein any client sends a request to the server node to allocate a node identifier message. S24: When the server node receives the request to allocate node identifier message, it sends a response to the client node to allocate node identifier message and generates a corresponding first key; S25: The client node generates the corresponding second key while replying to the response allocation node identifier message; S26: Determine whether the first key and the second key are consistent. If they are consistent, determine that the client node has passed the legitimacy verification.
[0010] Preferably, S2 further includes: S27: The server node generates a new node identifier for the verified client node, adds the new node identifier to the initial node identifier table, generates and sends the new node identifier table to the verified client node; S28: Verify the client node's response and update the pre-stored client node identifier table.
[0011] Preferably, S3 includes: S31: Verify whether the node identifier carried in the message to be identified matches the node identifier table carried by the client node that sent the message to be identified; S32: Verify whether the correspondence between the dynamic message identifier and the node identifier carried by the message to be identified matches the node identifier table; S33: If all the messages to be identified pass through S31-S32, then the messages to be identified are valid.
[0012] This invention also provides a client node legitimacy verification system in an automotive CAN network, comprising: A node type determination module is used to construct an automotive CAN network, wherein the automotive CAN network includes multiple communication nodes, and determines a server node from the multiple communication nodes, while designating the remaining communication nodes as client nodes. The client node legitimacy verification module is used to determine the message type. When the message type is a dynamic message, the server node performs legitimacy verification on multiple client nodes, and registers node functions and adds a legitimate node identifier to the client nodes that pass the legitimacy verification. The message validity verification module is used to allow any client node that has passed the validity verification to send a message to be identified when the vehicle CAN network is communicating normally, and the receiving client node to verify the validity of the message to be identified. The verification update module is used to re-verify the client node if the parameters of the client node that has passed the legitimacy verification in the vehicle CAN network change.
[0013] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method and system for verifying the legitimacy of client nodes in an automotive CAN network, which has the following beneficial effects: 1) Enhance the security of automotive CAN network. The network has the capability to detect when a legitimate node is replaced by an illegitimate node, preventing unauthorized control of vehicle functions. 2) Improve the anti-interference capability of the automotive CAN network. When an illegal node accesses the network and issues an illegal function command that is consistent with the preset, the network has the ability to detect it, so as to avoid the vehicle function being interfered with and unable to be used normally. 3) Enhance the flexibility of automotive CAN networks. Even if changes in vehicle configuration or unforeseen circumstances (such as functional degradation) alter the number of nodes, their functions, or the types of messages transmitted and received, the network can still function normally without requiring modifications to other related nodes. This reduces configuration management and emergency response costs, thereby improving the flexibility of automotive CAN networks. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0015] Figure 1 This invention provides an overall flowchart of a method for verifying the legitimacy of client nodes in an automotive CAN network. Figure 2 A schematic diagram of the configuration structure of automotive CAN network nodes based on a central gateway topology provided in this embodiment of the invention; Figure 3 A schematic diagram of the message structure of static and dynamic messages provided in embodiments of the present invention; Figure 4 This is an overall flowchart of the legality verification of multiple client nodes provided in an embodiment of the present invention; Figure 5 The node name code table provided for embodiments of the present invention; Figure 6 The message structure table provided in the embodiments of the present invention; Figure 7 This invention provides a structural principle block diagram of a client node legitimacy verification system in an automotive CAN network. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] See Figure 1 As shown in the figure, this invention discloses a method for verifying the legitimacy of client nodes in an automotive CAN network, including the following steps: S1: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes, and determine a server node from the multiple communication nodes, while using the remaining communication nodes as client nodes; S2: Determine the message type. When the message type is a dynamic message, the server node performs legality verification on multiple client nodes, and registers node functions and adds a legal node identifier to the client nodes that pass the legality verification. S3: When the vehicle CAN network is communicating normally, any client node that has passed the legality verification sends a message to be identified, and the receiving client node verifies the legality of the message to be identified.
[0018] In one specific embodiment, it also includes: S4: If the parameters of the client node that has passed the legality verification in the vehicle CAN network change, then the legality verification of the client node is performed again.
[0019] In one specific embodiment, S1 includes: S11: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes; S12: Determine the server node from the multiple communication nodes according to the topology of the vehicle CAN network and preset rules, and use the remaining communication nodes as client nodes.
[0020] Specifically, the topology of the automotive CAN network in S12 can include an automotive CAN network based on a central gateway topology (see details). Figure 2 As shown, in a bus-type topology automotive CAN network, the central gateway node is configured as a server node and all other nodes are configured as client nodes. In a bus-type topology automotive CAN network, the standard, main functional nodes are configured as server nodes and all other nodes are configured as client nodes.
[0021] In one specific embodiment, see Figure 4 As shown, S2 includes: S21: When the message type is a dynamic message, the server node establishes an initial node identifier table, wherein the initial node identifier table includes the node name code ECUcode, the node identifier ECUID, and the dynamic message identifier MSGID; S22: Complete the initialization of the server node (typically 1000ms). The server node uses the initial node identifier table to generate an update initial node identifier table message and sends the update initial node identifier table message to multiple client nodes. The update initial node identifier table message includes node name code ECUcode, node identifier ECUID, and dynamic message identifier MSGID. At this time, the identifier of the server node is fixed at 0x01. S23: Multiple client nodes receive the Update Initial Node Identifier Table message and use the Update Initial Node Identifier Table message (MSGID: 0xA0) to update the local node identifier table of the client nodes. Among them, any client sends a request to the server node to allocate a node identifier message (MSGID: 0xA1). The update process is to add the node name code ECUcode, the node identifier ECUID, and the dynamic message identifier MSGID to the local node identifier table of the client node. S24: When the server node receives the request to allocate node identifier message, it sends a response to the client node to allocate node identifier message (MSGID: 0xA3) and generates a corresponding first key, wherein the request to allocate node identifier message includes node name code ECUcode and dynamic message identifier MSGID; S25: The client node generates a corresponding second key while replying to the response allocation node identifier message; S26: Determine whether the first key and the second key are consistent. If they are consistent, determine that the client node has passed the legitimacy verification. The node name code and message structure of the aforementioned node identification message are described in [reference needed]. Figure 5-6 As shown.
[0022] In one specific embodiment, S2 further includes: S27: The server node generates a new node identifier for the verified client node, adds the new node identifier to the initial node identifier table, generates and sends the new node identifier table to the verified client node; S28: The verified client node responds and updates the pre-stored client node identifier table. At the same time, all client nodes in the vehicle CAN network add the information of the verified client node to their own node identifier table.
[0023] Specifically, the implementation process of S21 also includes: Static messages are classified into static and dynamic messages based on different functional scenarios. See the message structure below. Figure 3As shown, the message configuration corresponding to the fast start or fast response function is a static message. The static message adopts the existing static communication method without change, and sends the preset message identifier and signal to realize the corresponding function. The message configuration for node legitimacy verification that is not a fast start or fast response function but requires security, anti-interference and flexibility is a dynamic message.
[0024] The implementation process of S24-S25 also includes: The server node replies with a startup allocation node identifier message (MSGID: 0xA2), which includes the client node's node name code ECUcode and a seed randomly generated by the server node. At the same time, the server uses the same preset algorithm to generate the first key knyx, which can be the vehicle IMMO anti-theft algorithm. After receiving the reply, the client node uses the seed to calculate and generate the second key.
[0025] In one specific embodiment, S3 includes: S31: Verify whether the node identifier ECUID carried in the message to be identified matches the node identifier table carried by the client node that sent the message to be identified; S32: Verify whether the correspondence between the dynamic message identifier and the node identifier carried by the message to be identified matches the node identifier table; S33: If all the messages to be identified pass through S31-S32, then the messages to be identified are valid.
[0026] See Figure 7 As shown, this embodiment of the invention also provides a system utilizing the legality verification method in an automotive CAN network according to any one of the above embodiments, comprising: A node type determination module is used to construct an automotive CAN network, wherein the automotive CAN network includes multiple communication nodes, and determines a server node from the multiple communication nodes, while designating the remaining communication nodes as client nodes. The client node legitimacy verification module is used to determine the message type. When the message type is a dynamic message, the server node performs legitimacy verification on multiple client nodes, and registers node functions and adds a legitimate node identifier to the client nodes that pass the legitimacy verification. The message validity verification module is used to allow any client node that has passed the validity verification to send a message to be identified when the vehicle CAN network is communicating normally, and the receiving client node to verify the validity of the message to be identified. The verification update module is used to re-verify the client node if the parameters of the client node that has passed the legality verification in the automotive CAN network change.
[0027] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0028] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for verifying the legitimacy of client nodes in an automotive CAN network, characterized in that, Includes the following steps: S1: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes, and determine a server node from the multiple communication nodes, while using the remaining communication nodes as client nodes; S2: Determine the message type. When the message type is a dynamic message, the server node performs legality verification on multiple client nodes, and registers node functions and adds a legal node identifier to the client nodes that pass the legality verification. S3: When the vehicle CAN network is communicating normally, any client node that has passed the legality verification sends a message to be identified, and the receiving client node verifies the legality of the message to be identified.
2. The method for verifying the legitimacy of a client node in an automotive CAN network according to claim 1, characterized in that, Also includes: S4: If the parameters of the client node that has passed the legality verification in the vehicle CAN network change, then the legality verification of the client node is performed again.
3. The method for verifying the legitimacy of a client node in an automotive CAN network according to claim 1, characterized in that, S1 includes: S11: Construct a vehicle CAN network, wherein the vehicle CAN network includes multiple communication nodes; S12: Determine the server node from the multiple communication nodes according to the topology of the vehicle CAN network and preset rules, and use the remaining communication nodes as client nodes.
4. The method for verifying the legitimacy of a client node in an automotive CAN network according to claim 3, characterized in that, S2 includes: S21: When the message type is a dynamic message, the server node establishes an initial node identifier table, wherein the initial node identifier table includes node name, node identifier, and dynamic message identifier; S22: The initialization of the server node is completed. The server node uses the initial node identifier table to generate an update initial node identifier table message and sends the update initial node identifier table message to multiple client nodes. S23: Multiple client nodes receive the Update Initial Node Identifier Table message and update the local node identifier table of the client nodes using the Update Initial Node Identifier Table message, wherein any client sends a request to the server node to allocate a node identifier message. S24: When the server node receives the request to allocate node identifier message, it sends a response to the client node to allocate node identifier message and generates a corresponding first key; S25: The client node generates a corresponding second key while replying to the response allocation node identifier message; S26: Determine whether the first key and the second key are consistent. If they are consistent, determine that the client node has passed the legitimacy verification.
5. The method for verifying the legitimacy of a client node in an automotive CAN network according to claim 4, characterized in that, S2 further includes: S27: The server node generates a new node identifier for the verified client node, adds the new node identifier to the initial node identifier table, generates and sends the new node identifier table to the verified client node; S28: Verify the client node's response and update the pre-stored client node identifier table.
6. The method for verifying the legitimacy of a client node in an automotive CAN network according to claim 4, characterized in that, S3 includes: S31: Verify whether the node identifier carried in the message to be identified matches the node identifier table carried by the client node that sent the message to be identified; S32: Verify whether the correspondence between the dynamic message identifier and the node identifier carried by the message to be identified matches the node identifier table; S33: If all the messages to be identified pass through S31-S32, then the messages to be identified are valid.
7. A system utilizing the client node legitimacy verification method in an automotive CAN network according to any one of claims 1-6, characterized in that, include: A node type determination module is used to construct an automotive CAN network, wherein the automotive CAN network includes multiple communication nodes, and determines a server node from the multiple communication nodes, while designating the remaining communication nodes as client nodes. The client node legitimacy verification module is used to determine the message type. When the message type is a dynamic message, the server node performs legitimacy verification on multiple client nodes, and registers node functions and adds a legitimate node identifier to the client nodes that pass the legitimacy verification. The message validity verification module is used to allow any client node that has passed the validity verification to send a message to be identified when the vehicle CAN network is communicating normally, and the receiving client node to verify the validity of the message to be identified. The verification update module is used to re-verify the client node if the parameters of the client node that has passed the legality verification in the automotive CAN network change.