Secure communication method and system based on CAN-FD bus, electronic equipment and medium
Through the node legality identification and key distribution mechanism, the security risk problem in the CAN-FD bus communication system is solved, and high security and resource efficiency of data transmission are achieved.
Patent Information
- Application Number
- CN202310365614.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2024-10-15
AI Technical Summary
There are security risks in the CAN-FD bus communication system. Illegal nodes can attack other nodes by collecting information, causing system security to be compromised, and existing control measures are relatively lacking.
The node legitimacy authentication mechanism and key distribution mechanism are adopted to authenticate the node legitimacy through the public key verification and asymmetric encryption algorithm of the certificate management structure, and distribute communication keys to encrypt communications to ensure the security of data transmission.
It improves the security of CAN-FD bus communication, intercepts illegal nodes, ensures that data is not monitored, and regularly updates keys to further improve security and avoid waste of storage resources.
Smart Images

Figure CN118784253A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic communication technology, and in particular, relates to a secure communication method and system, electronic equipment and medium based on a CAN-FD bus. Background Art
[0002] CAN-FD bus is widely used in the automotive field. With the popularity of electric vehicles, the on-board electronic systems are becoming more and more complex, and the reliability requirements are becoming higher and higher. As the communication channel between the electronic control unit (ECU) and various peripheral electronic devices in the automotive system, the CAN-FD communication data requires not only high reliability but also high security.
[0003] The CAN-FD bus has a relatively high reliability due to its own physical characteristics and cyclic redundancy (CRC) check mechanism. However, in a communication system based on the CAN-FD bus, each node can actively or passively communicate with other nodes through broadcasting. Each node has a unique ID code, and each node generally only responds to transmission packets that match this ID. However, if some nodes are attacked, the information of other nodes is collected through the CAN-FD bus, and the information is used to attack other nodes, which will bring high security risks to the system. At present, there is a lack of control measures related to the security of the CAN-FD bus communication system. Summary of the invention
[0004] The purpose of this application is to provide a secure communication method and system, electronic equipment and medium based on the CAN-FD bus, which are used to solve the security risk problem of CAN-FD bus communication.
[0005] In a first aspect, the present application provides a secure communication method based on a CAN-FD bus, which is applied to a management node, and the method includes: performing legitimacy authentication on multiple ordinary communication nodes in the secure communication system to screen legitimate nodes to participate in communication; and / or distributing communication keys to multiple ordinary communication nodes in the secure communication system so that the ordinary communication nodes can perform data encryption communication based on the communication keys.
[0006] In an implementation of the first aspect, performing legitimacy authentication on multiple ordinary communication nodes in the secure communication system to screen legitimate nodes for participating in communication includes: verifying the certificates obtained from the certificate management agency among the multiple ordinary communication nodes based on the public key of the certificate management structure, and taking the nodes that pass the certificate verification as preliminary legitimate nodes; and performing random number verification on the preliminary legitimate nodes to determine the legitimate nodes.
[0007] In an implementation manner of the first aspect, performing random number verification on the preliminary legal node to determine the legal node includes: performing random number verification on the preliminary legal node using an asymmetric encryption algorithm.
[0008] In an implementation of the first aspect, using an asymmetric encryption algorithm to perform random number verification on the preliminary legal node includes: obtaining public keys of multiple preliminary legal nodes; generating multiple initial random numbers, using the public keys corresponding to each of the preliminary legal nodes to encrypt the initial random numbers and sending the encrypted random numbers to the corresponding preliminary legal nodes; the preliminary legal node uses a private key to decrypt the encrypted random numbers and returns the decrypted random numbers; verifying the consistency of the decrypted random number and the initial random number, if they are consistent, determining that the corresponding preliminary legal node is a legal node.
[0009] In an implementation manner of the first aspect, the method further includes: performing time synchronization management on the legal node.
[0010] In an implementation of the first aspect, time synchronization management of the legal node includes: obtaining the public key of the legal node; using the public key to encrypt the time information to obtain encrypted time information and sending it to the corresponding legal node so that the private key of the legal node decrypts the encrypted time information and synchronizes the time information.
[0011] In an implementation of the first aspect, distributing communication keys to multiple ordinary communication nodes in the secure communication system so that the ordinary communication nodes can perform data encryption communication based on the communication keys includes: generating communication keys for communication between the multiple ordinary communication nodes; and sending the communication keys to the corresponding multiple ordinary communication nodes.
[0012] In an implementation of the first aspect, distributing communication keys to multiple ordinary communication nodes in the secure communication system for the ordinary communication nodes to perform data encryption communication based on the communication keys also includes: monitoring the key validity period of the communication key, and updating the communication key when it is determined to be expired.
[0013] In an implementation of the first aspect, generating a communication key for communication between the multiple ordinary communication nodes includes: obtaining multiple shared key groups, the shared key groups including several ordinary communication nodes that trust each other; and generating a set of shared communication keys for any of the shared key groups.
[0014] In an implementation manner of the first aspect, sending the communication key to the corresponding multiple ordinary communication nodes includes: sending the communication key to the corresponding multiple ordinary communication nodes based on an asymmetric encryption algorithm.
[0015] In an implementation manner of the first aspect, the communication key is a symmetric key.
[0016] In a second aspect, the present application provides a secure communication method based on a CAN-FD bus, which is applied to multiple ordinary communication nodes in a secure communication system, and the method includes: participating in legitimacy authentication to screen legitimate nodes to participate in communication; and / or obtaining a communication key to perform data encryption communication based on the communication key.
[0017] In the third aspect, the present application provides a secure communication system based on a CAN-FD bus, the secure communication system comprising a CAN-FD bus, multiple ordinary communication nodes and a management node; the security system also includes: a legitimacy authentication module, configured to perform legitimacy authentication on multiple ordinary communication nodes in the secure communication system through the management node to screen legitimate nodes to participate in communication; and / or a communication key distribution module, configured to distribute communication keys to multiple ordinary communication nodes through the management node so that the ordinary communication nodes can perform data encryption communication based on the communication keys.
[0018] In a fourth aspect, the present application provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program so that the electronic device performs the method according to the first and second aspects of the present application.
[0019] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed to implement the method according to the first aspect and the second aspect of the present application.
[0020] As described above, the secure communication method and system, electronic device and medium based on the CAN-FD bus described in this application have the following beneficial effects:
[0021] (1) The present application adopts at least one of a node legitimacy authentication mechanism and a key distribution mechanism to improve the security of CAN-FD bus communication. The node legitimacy authentication mechanism can intercept illegal nodes during the startup phase of the communication system. The key distribution mechanism is used to distribute communication keys to communication nodes to perform encrypted communication based on the communication keys, thereby improving the security of data transmission during the communication process and ensuring that the communication data is not monitored.
[0022] (2) This application regularly updates the communication key to further improve the security of data communication;
[0023] (3) The present application proposes a shared key mechanism, that is, a number of communication nodes that trust each other share a set of communication keys, thereby avoiding the waste of storage resources caused by storing a large number of communication keys in the communication nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Shown is a schematic diagram of a secure communication system based on a CAN-FD bus as described in an embodiment of the present application.
[0025] Figure 2 Shown is a workflow diagram of the secure communication method based on the CAN-FD bus described in an embodiment of the present application.
[0026] Figure 3 Shown is a flow chart of legitimacy authentication and time synchronization in the secure communication method based on the CAN-FD bus described in an embodiment of the present application.
[0027] Figure 4 Shown is a flow chart of key distribution and update in the secure communication method based on the CAN-FD bus described in an embodiment of the present application.
[0028] Figure 5 Shown is a schematic diagram of key distribution in the secure communication method based on the CAN-FD bus described in an embodiment of the present application.
[0029] Figure 6 Shown is a schematic diagram of key distribution in the secure communication method based on the CAN-FD bus described in an embodiment of the present application.
[0030] Figure 7 Shown is a structural block diagram of a secure communication system based on a CAN-FD bus as described in an embodiment of the present application.
[0031] Figure 8 Shown is a structural block diagram of the electronic device described in an embodiment of the present application.
[0032] Component number description
[0033] 11.71 CAN-FD bus
[0034] 12, 72 Ordinary communication nodes
[0035] 13.73 Management Node
[0036] 741 Legality Identification Module 1
[0037] 742 Legality Identification Module 2
[0038] 751 Communication Key Distribution Module 1
[0039] 752 Communication Key Distribution Module 2
[0040] 8 Electronic devices
[0041] 81 Memory
[0042] 82 Processors
[0043] Steps S21 to S23
[0044] Steps S31 to S37
[0045] Steps S41 to S48 DETAILED DESCRIPTION
[0046] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0047] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0048] The following embodiments of the present application provide a secure communication method and system, electronic device and medium based on the CAN-FD bus, including but limited to application in vehicle communication systems. With the continuous improvement of the degree of automobile electrification, many safety-related functions need to be completed with the help of an electronic control unit (ECU), such as active braking, adaptive cruise control, remote start, etc. The new CAN-FD bus has a higher rate and data capacity than the traditional CAN network, so the CAN-FD bus can be used in the vehicle communication system to communicate with the electronic control unit. In a communication system based on the CAN-FD bus, each node can actively or passively communicate with other nodes by broadcasting. Each node has a unique ID code, and each node generally only responds to transmission packets that match this ID. However, if some nodes are attacked, the information of other nodes is collected through the CAN-FD bus, and the information is used to attack other nodes, which will bring a high security risk to the system. Therefore, the present application proposes a mechanism for secure communication of a communication system based on the CAN-FD bus.
[0049] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0050] like Figure 1As shown, the present application provides a safety communication system based on a CAN-FD bus, wherein the safety communication system includes a CAN-FD bus 11, a plurality of common communication nodes 12 and a management node 13.
[0051] Among them, the common communication node 12 includes: Figure 1 Node A, node B, node C, node D, node E, node F shown in the figure, the common communication node 12 monitors the data packets transmitted on the CAN-FD bus 11, and captures the valid data information of other nodes or sends information to other nodes according to the information consistent with the node ID. In the vehicle communication system, the common communication node 12 can correspond to one electronic control unit one by one.
[0052] The management node 13 is used for secure communication management of multiple common communication nodes 12 in the secure communication system.
[0053] Two security management mechanisms are proposed in this application:
[0054] Security management mechanism 1: Authentication of the legitimacy of multiple common communication nodes in the secure communication system is performed to intercept illegal nodes during the startup phase of the communication system.
[0055] Security management mechanism 2: A key distribution mechanism is proposed to distribute communication keys to multiple common communication nodes in the security communication management system so that the common communication nodes can perform data encryption communication based on the communication keys to ensure that the communication data is not monitored.
[0056] In a preferred embodiment, the secure communication method based on the CAN-FD bus provided by the present application is applied in a secure communication system based on the CAN-FD bus as follows: Figure 2 The workflow shown completes the secure communication, and specifically includes steps S21 to S23.
[0057] In step S21, during the system startup phase, security management mechanism 1 is used to perform node legitimacy authentication to intercept illegal nodes during the communication system startup phase, thereby screening legal nodes to participate in communication.
[0058] In step S22, security management mechanism 2 (key distribution mechanism) is used to distribute communication keys to multiple common communication nodes in the secure communication system.
[0059] In step S23, the common communication nodes perform encrypted communication based on the communication key.
[0060] In some other embodiments, the two security management mechanisms mentioned above may be selectively used according to the security level requirements of the communication system. For example, when the security registration requirements are relatively low, one of the two security management mechanisms may be selectively used.
[0061] Some preferred embodiments are listed below to specifically illustrate the secure communication method based on the CAN-FD bus of the present application.
[0062] In a preferred embodiment, the CAN-FD bus-based secure communication method provided in the present application is applied to a management node in a secure communication system, and the method includes: performing legitimacy authentication on multiple ordinary communication nodes in the secure communication system to screen legitimate nodes to participate in communication; distributing communication keys to multiple ordinary communication nodes in the secure communication system so that the ordinary communication nodes can perform data encryption communication based on the communication keys.
[0063] Among them, the legitimacy authentication of multiple common communication nodes in the secure communication system to screen legal nodes for participating in the communication includes: verifying the certificates obtained from the certificate management agency among the multiple common communication nodes based on the public key of the certificate management structure, and taking the nodes that pass the certificate verification as preliminary legal nodes; and performing random number verification on the preliminary legal nodes to determine the legal nodes. When performing random number verification on the preliminary legal nodes, an asymmetric encryption algorithm is used to perform random number verification on the preliminary legal nodes, specifically including: obtaining the public keys of multiple preliminary legal nodes; generating multiple initial random numbers, encrypting the initial random numbers using the public keys corresponding to each preliminary legal node, and sending the encrypted random numbers to the corresponding preliminary legal nodes; the preliminary legal nodes use the private key to decrypt the encrypted random numbers and return the decrypted random numbers; verifying the consistency of the decrypted random number and the initial random number, if they are consistent, the corresponding preliminary legal node is determined to be a legal node.
[0064] Wherein, distributing communication keys to multiple common communication nodes in the secure communication system so that the common communication nodes can perform data encryption communication based on the communication keys includes: generating communication keys for communication between the multiple common communication nodes; and sending the communication keys to the corresponding multiple common communication nodes. In some preferred embodiments, distributing communication keys to multiple common communication nodes in the secure communication system so that the common communication nodes can perform data encryption communication based on the communication keys also includes: monitoring the key validity period of the communication keys, and updating the communication keys when it is determined to be overdue.
[0065] In addition, in a preferred embodiment, the method further includes: performing time synchronization management on the legal node. The time synchronization management on the legal node is an operation performed after completing the legality authentication. The time synchronization management on the legal node includes: obtaining the public key of the legal node; encrypting the time information using the public key to obtain encrypted time information and sending it to the corresponding legal node so that the private key of the legal node decrypts the encrypted time information and synchronizes the time information.
[0066] In another preferred embodiment, the secure communication method based on the CAN-FD bus provided in the present application is applied to multiple ordinary communication nodes in a secure communication system, and the method includes: participating in legitimacy authentication to screen legitimate nodes to participate in communication; and / or obtaining communication keys to perform data encryption communication based on the communication keys.
[0067] Among them, during the legitimacy authentication process, the ordinary communication node needs to obtain a certificate issued by the certificate management agency from the agency. The certificate mainly contains the node's ID, a public key based on an asymmetric cryptographic algorithm, and other information. The ordinary communication node will also have a built-in private key paired with the public key based on an asymmetric cryptographic algorithm, and then send the certificate to the management node during the legitimacy authentication. After the management node completes the certificate verification, it receives the encrypted random number sent by the management node. In the ordinary communication node, it is necessary to use the private key to decrypt the encrypted random number and return it to the management node to verify the random number, thereby completing the legitimacy verification. In a preferred embodiment, when the ordinary communication node is marked as a legal node after completing the legitimacy authentication, it is also necessary to synchronize the time of the legal node. During the time synchronization process, the legal node receives the encrypted time data and decrypts it to obtain the time data to update the time.
[0068] Among them, in the process of obtaining the communication key to perform data encryption communication based on the communication key, the ordinary communication node needs to receive the encryption key ciphertext sent by the management node, and the encryption key ciphertext is encrypted by an asymmetric encryption algorithm, so as to be decrypted in the ordinary communication node and obtain the communication key, and further perform data encryption communication based on the communication key. In some preferred embodiments, after the legal node obtains the communication key, it also monitors the key validity period of the communication key, and when it is determined to be overdue, it issues a key update request to update the communication key.
[0069] In order to more clearly understand the secure communication mechanism proposed in this application, the legitimacy authentication, time synchronization and security key distribution in the secure communication method are further described in detail below.
[0070] Figure 3 The flowchart of the legitimacy authentication and time synchronization in the secure communication method based on the CAN-FD bus described in the embodiment of the present application is shown. Figure 3 As shown, the specific process of legitimacy authentication and time synchronization in the secure communication method is specifically described by taking the interaction between a common communication node and a management node, including steps S31 to S37.
[0071] S31. During the production phase, each common communication node needs to obtain a certificate issued by a certificate management agency. The certificate mainly contains the ID, public key and other information of the node. In addition, common communication nodes will also have a built-in public-private key pair based on an asymmetric cryptographic algorithm, and the private key cannot be sent out. The advantage of an asymmetric cryptographic algorithm is that the public key can be made public, and attackers cannot derive the private key from the public key. As long as the private key is not leaked, the security mechanism is guaranteed.
[0072] S32. The management node obtains the certificate of the ordinary communication node through a remote frame, and then uses the public key of the certificate management agency to verify the signature of the certificate. After the signature verification, the public key of the ordinary communication node is obtained.
[0073] S33. The management node generates multiple random numbers R internally, encrypts the random numbers using the public key of the common communication node, and then sends them to the common communication node.
[0074] S34. After receiving the encrypted random number sent by the management node, the ordinary communication node uses its own private key to decrypt it, obtains the random number, and sends the random number back to the management node.
[0075] S35. The management node compares the random number sent back by the common communication node with the random number stored locally. If they are the same, the node is a legal node. If they are not equal, the node is an illegal node.
[0076] S36. After confirming the legitimacy of the common communication node, the management node uses the acquired public key of the common communication node to encrypt the current time information and sends it to the common communication node.
[0077] S37. After the common communication node obtains the encrypted time data and decrypts the information, it synchronizes the current time to ensure the time synchronization between the common communication node and the management node.
[0078] When instructions are needed, all common communication nodes in the secure communication system that need to perform secure communication use the above method to interact with the management node to complete legitimacy authentication and time synchronization.
[0079] Figure 4 The flowchart of key distribution and update in the secure communication method based on CAN-FD bus described in the embodiment of the present application is shown. Figure 4 As shown, the specific process of key distribution and update in the secure communication method is specifically described by taking the interaction between a common communication node and a management node, including steps S41 to S47.
[0080] S41. The management node locally generates a symmetric key for communication between nodes, which is called a communication key, and packages the communication key and information such as validity period.
[0081] S42. The management node encrypts the packaged information with the public key of the ordinary communication node to form an encrypted package, and sends it to the ordinary communication node.
[0082] S43. The ordinary communication node uses the private key to decrypt the encrypted package and obtain the communication key for communicating with other nodes.
[0083] S44. Ordinary communication nodes monitor the key validity period.
[0084] S45. After the communication key expires, the common communication node no longer sends information to other nodes, and sends a communication key update request to the management node.
[0085] S45. The management node updates the communication key, and packages the communication key and information such as validity period into a key information package.
[0086] S46. The management node encrypts the updated key information package with the public key of the ordinary communication node and sends it to the ordinary management node.
[0087] S47, the common management node uses the private key to decrypt the encrypted package and update the communication key.
[0088] When instructions are needed, all common communication nodes in the secure communication system that need to perform secure communication use the above method to interact with the management node to complete key distribution and update.
[0089] In some embodiments, when there are relatively few common communication nodes in a secure communication system, communication keys are set for two nodes in the system that need to communicate securely. Figure 5 As shown in , node A can communicate with nodes B, C, D, E, and F. Then, the communication key M is stored in node A. AB 、M AC 、M AD 、M AE 、M AF , where M AB is the communication key between node A and node B, M AC is the communication key between node A and node C, M AD is the communication key between node A and node D, M AE is the communication key between node A and node E, M AF is the communication key between node A and node F. For example, node B can communicate with node A, node D, node E, and node F. Then node B stores the communication key M AB 、M BD 、M BE 、M BF , M BD is the communication key between node B and node D, M BEis the communication key between node B and node E, M BF is the communication key for node B and node F. Similarly, a communication key can be distributed to each node.
[0090] In some other embodiments, when there are many nodes mounted on the CAN-FD bus, the number of communication keys that each node needs to store will be relatively large. At this time, other nodes that need to communicate with this node can be grouped. The principle of grouping is that the nodes in the group trust each other, and there is no risk of leakage when the nodes in the group communicate with other nodes; nodes in the same group can share the same communication key. Therefore, the management node needs to obtain multiple shared key groups, which include several common communication nodes that trust each other; then, for any of the shared key groups, a set of shared communication keys is generated. For example Figure 6 As shown in FIG, nodes A, B, and C are divided into a shared key group, thereby generating a shared communication key M A~C , communication key M A~C It can be used for communication between any two of the shared key group of nodes A, B and C, thereby storing M in nodes A, B and C. A~C That is, when node A needs to communicate with node D, it generates the communication key M AD And send it to node A and node D and M AD They are stored in node A and node D respectively. Here, a shared key mechanism is proposed, that is, a group of communication keys are shared by several mutually trusted communication nodes, which avoids the waste of storage resources caused by storing a large number of communication keys in the communication nodes.
[0091] Finally, in Figure 2 In step S23, the common communication nodes perform encrypted communication based on the communication key. Specifically, each node uses the communication key obtained from the management node to encrypt the information to be sent to the target node, and then sends it to the target node through the CAN bus protocol. After the target node obtains the encrypted information, it uses the symmetric key of the sending node obtained from the management node to decrypt the information and obtain the plain text of the information. In this process, the symmetric encryption algorithm is used to encrypt the data based on the communication key.
[0092] It should be noted that the asymmetric encryption algorithms mentioned in the embodiments of the present application include but are not limited to the RSA, ECC (elliptic curve cryptography), SM2 and other algorithms widely used in the industry; the symmetric encryption algorithms include but are not limited to the AES, DES / 3DES, SM4 and other algorithms widely used in the industry.
[0093] The protection scope of the secure communication method based on the CAN-FD bus described in the embodiment of the present application is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0094] like Figure 7 As shown, the present application also provides a safety communication system based on a CAN-FD bus, the safety communication system comprising a CAN-FD bus 71, a plurality of common communication nodes 72 and a management node 73; the safety system further comprises:
[0095] a legitimacy authentication module, configured to perform legitimacy authentication on a plurality of common communication nodes in the secure communication system through the management node to screen legitimate nodes for participating in the communication;
[0096] The communication key distribution module is configured to distribute communication keys to multiple common communication nodes through the management node so that the common communication nodes can perform data encryption communication based on the communication keys.
[0097] Among them, the legitimacy authentication module includes a first legitimacy authentication module 741 in the management node 73 and a second legitimacy authentication module 742 in each ordinary communication node 72. The legitimacy authentication of the ordinary communication node 72 is completed through information interaction and processing between the first legitimacy authentication module 741 and the second legitimacy authentication module 742.
[0098] The communication key distribution module includes a first communication key distribution module 751 in the management node 73 and a second communication key distribution module 752 in each ordinary communication node 72. The key distribution of the ordinary communication node 72 is completed through information interaction and processing between the first communication key distribution module 751 and the second communication key distribution module 752.
[0099] In some preferred embodiments, the legitimacy authentication module distributes communication keys to multiple ordinary communication nodes so that the ordinary communication nodes can perform time synchronization management operations after performing data encryption communication based on the communication keys, including: obtaining the public key of the legitimate node; using the public key to encrypt the time information to obtain encrypted time information and send it to the corresponding legitimate node so that the private key of the legitimate node can decrypt the encrypted time information and synchronize the time information.
[0100] In other preferred embodiments, the communication key distribution module distributes the communication key to the common communication node based on the asymmetric encryption algorithm, and further includes: monitoring the validity period of the communication key, and updating the communication key when it is determined to be expired.
[0101] It should be noted that, in some other embodiments, the secure communication system includes a CAN-FD bus, multiple common communication nodes and a management node, and also includes a legitimacy authentication module and a communication key distribution module.
[0102] The above-mentioned CAN-FD bus-based safety communication system adopts the CAN-FD bus-based safety communication method described in the above-mentioned embodiment to perform safety communication.
[0103] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0104] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0105] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0106] like Figure 8As shown, this embodiment provides an electronic device 8, which includes: a memory 81 configured to store a computer program; and a processor 82 configured to execute the computer program so that the electronic device 8 performs the safety communication method based on the CAN-FD bus described in the present application.
[0107] In some embodiments, the memory 81 may include: ROM, RAM, magnetic disk, USB flash drive, memory card, optical disk, or other media that can store program codes.
[0108] In some embodiments, the processor 82 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, the processor may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0109] The present application embodiment also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by a program to instruct the processor, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.
[0110] The present application embodiment may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer or data center.
[0111] When the computer program product is executed by a computer, the computer executes the method described in the above method embodiment. The computer program product may be a software installation package, and when the above method is required, the computer program product may be downloaded and executed on a computer.
[0112] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0113] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A secure communication method based on CAN-FD bus, It is characterized in that The method is applied to a management node, and the method includes: Performing legitimacy authentication on a plurality of common communication nodes in the secure communication system to screen legitimate nodes for participating in communication; and / or Communication keys are distributed to a plurality of common communication nodes in the secure communication system so that the common communication nodes can perform data encryption communication based on the communication keys.
2. The secure communication method based on the CAN-FD bus according to claim 1, It is characterized in that Performing legitimacy authentication on a plurality of common communication nodes in the secure communication system to screen legitimate nodes for participating in communication includes: Verifying the certificates obtained from the certificate management agency among the plurality of common communication nodes based on the public key of the certificate management structure, and taking the nodes that pass the certificate verification as preliminary legal nodes; A random number verification is performed on the preliminary legal nodes to determine the legal nodes.
3. The secure communication method based on the CAN-FD bus according to claim 2, It is characterized in that Performing random number verification on the preliminary legal node to determine the legal node includes: performing random number verification on the preliminary legal node using an asymmetric encryption algorithm.
4. The secure communication method based on the CAN-FD bus according to claim 3, It is characterized in that Using an asymmetric encryption algorithm to perform random number verification on the preliminary legal node includes: Obtaining public keys of a plurality of the preliminary legitimate nodes; Generate a plurality of initial random numbers, encrypt the initial random numbers using the public keys corresponding to the respective preliminary legal nodes, and send the encrypted random numbers to the corresponding preliminary legal nodes; The preliminary legal node uses a private key to decrypt the encrypted random number and returns the decrypted random number; Verify the consistency of the decrypted random number and the initial random number. If they are consistent, determine that the corresponding preliminary legal node is a legal node.
5. The secure communication method based on the CAN-FD bus according to claim 1, It is characterized in that The method further includes: performing time synchronization management on the legal nodes.
6. The secure communication method based on the CAN-FD bus according to claim 5, It is characterized in that The time synchronization management of the legal node includes: Obtaining the public key of the legal node; The time information is encrypted using the public key to obtain encrypted time information and sent to the corresponding legal node so that the private key of the legal node decrypts the encrypted time information and synchronizes the time information.
7. The secure communication method based on the CAN-FD bus according to claim 1, It is characterized in that Distributing communication keys to a plurality of common communication nodes in the secure communication system so that the common communication nodes can perform data encryption communication based on the communication keys comprises: generating a communication key for communication between the plurality of common communication nodes; The communication key is sent to the corresponding plurality of common communication nodes.
8. The secure communication method based on the CAN-FD bus according to claim 7, It is characterized in that Distributing communication keys to multiple ordinary communication nodes in the secure communication system so that the ordinary communication nodes can perform data encryption communication based on the communication keys also includes: monitoring the key validity period of the communication key, and updating the communication key when it is determined to be expired.
9. The secure communication method based on the CAN-FD bus according to claim 7, It is characterized in that Generating a communication key for communication between the plurality of common communication nodes comprises: Acquire a plurality of shared key groups, wherein the shared key groups include a plurality of common communication nodes that trust each other; For any of the shared key groups, a set of shared communication keys is generated.
10. The secure communication method based on the CAN-FD bus according to claim 7, It is characterized in that Sending the communication key to the corresponding plurality of ordinary communication nodes includes: sending the communication key to the corresponding plurality of ordinary communication nodes based on an asymmetric encryption algorithm.
11. The secure communication method based on the CAN-FD bus according to claim 1, It is characterized in that The communication key is a symmetric key.
12. A secure communication method based on CAN-FD bus, It is characterized in that The method is applied to a plurality of common communication nodes in a secure communication system, and the method comprises: Participate in legitimacy authentication to screen legitimate nodes to participate in communication; and / or A communication key is acquired to perform data encryption communication based on the communication key.
13. A secure communication system based on CAN-FD bus, It is characterized in that The safety communication system includes a CAN-FD bus, a plurality of common communication nodes and a management node; The safety system further comprises: a legitimacy authentication module, configured to perform legitimacy authentication on a plurality of common communication nodes in the secure communication system through the management node to screen legitimate nodes for participating in the communication; and / or The communication key distribution module is configured to distribute communication keys to multiple common communication nodes through the management node so that the common communication nodes can perform data encryption communication based on the communication keys.
14. An electronic device, It is characterized in that The electronic device comprises: a memory configured to store a computer program; and A processor is configured to execute the computer program so that the electronic device performs the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The computer program is executed to implement the method according to any one of claims 1 to 12.
