Electronic Control Unit (ECU) and its Control Method
By introducing a security module into the electronic control unit (ECU) to perform application trustworthiness checks and dynamically generate asymmetric key pairs, the problem of encrypted communication failing to detect hacker intrusion into upper-layer software modules is solved, thus improving the security of the vehicle network.
Patent Information
- Application Number
- CN202111270880.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The existing encrypted communication SecOC cannot identify whether the upper-layer software module has been hacked, leading to potential vehicle security risks.
A first security module is introduced into the electronic control unit (ECU) to check the credibility of the policy authentication application and dynamically generate asymmetric key pairs for key exchange, replacing the original key pairs, thereby achieving secure authentication of the upper-layer software modules.
It effectively identifies the security status of upper-layer software modules, prevents unauthorized intrusion by hackers, improves the security of vehicle networks, and blocks automotive network attacks.
Smart Images

Figure CN116068920B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic control unit (ECU) control, and more specifically, to a control method for an ECU, an ECU, a computer storage medium, a computer program product, and a vehicle. Background Technology
[0002] In existing in-vehicle networks, most data transmission occurs without any special security measures. Therefore, once direct access to the vehicle's bus is gained, anyone can read the raw data transmitted on the bus, and even intercept and modify it before retransmitting it to the bus system.
[0003] To address security concerns, Security Onboard Communication (SecOC) was developed. SecOC is an information security component added to the AutoSAR software package, introducing a range of new functions and requirements, including encryption / decryption operations, key management, fresh value management, and distribution. The primary function of this security component / module is to provide authentication for data transmitted on the bus, effectively detecting attacks such as data replay, spoofing, and tampering.
[0004] Current encrypted communication SecOC (through communication authentication) can protect communication security, but it cannot identify whether upper-layer software modules / applications have been hacked. In other words, once upper-layer software modules / applications are illegally accessed, in extreme cases, hackers could potentially control the vehicle, posing a security risk. For example, after hacking into the Electronic Control Unit (ECU), a hacker could inject other upper-layer applications (to replace the original one) and forge messages to control the vehicle. Summary of the Invention
[0005] According to one aspect of the present invention, a control method for an electronic control unit (ECU) is provided, the method comprising: a first application in the ECU receiving a key request message from a second application in another ECU to communicate; and a first security module in the ECU checking the trustworthiness of the first application based on a pre-configured checking strategy, and authenticating the second application based on the key request message.
[0006] As a supplement or replacement to the above scheme, in the above method, the first security module also checks whether the pre-configured key request policy is met.
[0007] As a supplement or replacement to the above scheme, in the above method, after the first security module completes the trustworthiness check of the first application, the key request policy check, and the authentication of the second application, it dynamically generates an asymmetric key pair and provides the public key in the asymmetric key pair to the first application to facilitate key exchange between the first application and the second application.
[0008] As a supplement or replacement to the above scheme, in the above method, the first security module uses a newly generated asymmetric key pair to replace the original key pair.
[0009] As a supplement or alternative to the above scheme, in the above method, the key request message includes authentication information, wherein the authentication information is generated by a second security module in the other electronic control unit (ECU) using a pre-injected key or an already exchanged key.
[0010] As a supplement or replacement to the above scheme, the above method further includes: after the first application receives the key request message from the second application, the first application requests a key pair from the first security module.
[0011] According to another aspect of the present invention, an electronic control unit (ECU) is provided, the ECU comprising: a first application configured to receive a key request message from a second application to be communicated in another ECU; and a first security module configured to check the trustworthiness of the first application based on a pre-configured inspection strategy and to authenticate the second application based on the key request message.
[0012] As a supplement or replacement to the above scheme, in the above electronic control unit (ECU), the first security module is further configured to check whether a pre-configured key request policy is satisfied.
[0013] As a supplement or replacement to the above scheme, in the above electronic control unit (ECU), the first security module is configured to dynamically generate an asymmetric key pair after completing the trustworthiness check of the first application, the key request policy check, and the authentication for the second application, and provide the public key in the asymmetric key pair to the first application to facilitate key exchange between the first application and the second application.
[0014] As a supplement or replacement to the above scheme, in the above electronic control unit (ECU), the first security module is configured to use a newly generated asymmetric key pair to replace the original key pair.
[0015] As a supplement or replacement to the above scheme, in the above electronic control unit (ECU), the key request message includes authentication information, wherein the authentication information is generated by a second security module in the other electronic control unit (ECU) using a pre-injected key or an already exchanged key.
[0016] As a supplement or replacement to the above scheme, in the above electronic control unit (ECU), the first application is configured to request a key pair from the first security module after receiving the key request message from the second application.
[0017] According to another aspect of the present invention, a computer storage medium is provided, the medium including instructions that, when executed, perform the method described above.
[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described above.
[0019] According to another aspect of the invention, a vehicle is provided, the vehicle including the electronic control unit (ECU) as described above.
[0020] The electronic control unit (ECU) and its control scheme in embodiments of the present invention achieve trustworthiness checks (and key request policy checks) of the first application and authentication of second applications to be communicated in other ECUs through interaction between a first application in the ECU and a first security module. In this way, the security module can identify whether upper-layer software modules / applications are secure, preventing unauthorized intrusion by hackers. Attached Figure Description
[0021] The above and other objects and advantages of the present invention will become more fully clear from the following detailed description taken in conjunction with the accompanying drawings, wherein the same or similar elements are indicated by the same reference numerals.
[0022] Figure 1 A flowchart illustrating a control method for an electronic control unit (ECU) according to an embodiment of the present invention is shown. Figure 2 A schematic diagram of the structure of an electronic control unit (ECU) according to an embodiment of the present invention is shown; and Figure 3 A system architecture diagram showing a first electronic control unit (ECU) and a second electronic control unit (ECU) communicating with each other according to an embodiment of the present invention is shown. Detailed Implementation
[0023] In the following, control schemes of electronic control units (ECUs) according to various exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0024] Figure 1 A schematic flowchart of a control method 1000 for an electronic control unit (ECU) according to an embodiment of the present invention is shown. Figure 1 As shown, the control method 1000 of the electronic control unit (ECU) includes the following steps: In step S110, the first application in the electronic control unit (ECU) receives a key request message from a second application in another electronic control unit (ECU) to which communication is expected; and In step S120, the first security module in the electronic control unit (ECU) checks the trustworthiness of the first application based on a pre-configured inspection strategy and authenticates the second application based on the key request message.
[0025] In the context of this invention, "(first) application" in an electronic control unit (ECU) refers to a software module or component located at the application layer within that ECU. For example, to implement various intelligent driving functions, different ECUs need to communicate with each other, that is, a first application in a first ECU communicates with a second application in other ECUs.
[0026] The term "safety module" refers to a module within an Electronic Control Unit (ECU) that provides safety protection; in one or more embodiments, it can be a SecOC module. "SecOC" stands for Secure Onboard Communication, and it is primarily used for authenticating sensitive information within the vehicle. To ensure network security and functional safety, SecOC modules are almost always added to various types of ECU products, including but not limited to radar ECUs, driver assistance system ECUs, and video ECUs.
[0027] In step S110, a first application in an electronic control unit (ECU) receives a key request message from a second application in another ECU that is ready to communicate with the first application. In other words, the second application sends a key request message to the first application to exchange keys and communicate.
[0028] In one embodiment, the key request message includes authentication information generated by a second security module in another electronic control unit (ECU) using a pre-injected key or an already exchanged key. Specifically, before communicating with the first application, the second application requests authentication information from the second security module to send the request. The security module then generates authentication information using the pre-injected key or the already exchanged key and passes it to the second application. Subsequently, the second application uses this authentication information to construct a key request message and sends it to the first application.
[0029] although Figure 1 As not shown in the diagram, in one embodiment, the control method 1000 of the electronic control unit (ECU) further includes: after the first application receives the key request message from the second application, the first application requests a key pair from the first security module. That is, after step S110, i.e., after the first application receives the key request message from the second application, the first application sends a request to the first security module to obtain the key pair. In one or more embodiments, the key pair may be an asymmetric key pair (also called an asymmetric key), which consists of a public key and a private key that are cryptographically linked. The public key can be distributed to anyone, while the private key must be securely protected and can only be used by trusted individuals. In one embodiment, the "asymmetric key pair" is an RSA key pair.
[0030] In one embodiment, in step S120, the first security module in the electronic control unit (ECU) checks the trustworthiness of the first application based on a pre-configured checking strategy, and authenticates the second application in other ECUs based on the received key request message. In one embodiment, in addition to checking the trustworthiness of the first application and authenticating the second application, the first security module also checks whether the pre-configured key request strategy is met.
[0031] Specifically, the first security module checks the trustworthiness of the first application according to a pre-configured check strategy. This may include checking the secure startup verification result of the first application or re-performing the trustworthiness check. Simultaneously, it checks whether the pre-configured key request strategy is met, such as whether the first application can only request once, whether the first application is in the correct security mode, and the check callback function provided by the first application. In this case, the first application and the second application should pre-inject a key pair for initial authentication, such as AES or RSA, into the first security module. This authentication is performed within the first security module. After the first power-on, the pre-injected key pair is discarded, and communication is conducted using a newly generated key pair (e.g., an asymmetric key pair). In short, in one embodiment, after receiving a key (pair) request from the first application, the first security module first checks the trustworthiness of the first application, then verifies whether the requested key pair conditions are met, and finally authenticates the second application using the pre-injected or already exchanged key. After a successful exchange, the existing key is discarded.
[0032] In one embodiment, after completing the trustworthiness check of the first application, the key request policy check, and the authentication of the second application, the first security module dynamically generates an asymmetric key pair and provides the public key of the asymmetric key pair to the first application to facilitate key exchange between the first and second applications. In this embodiment, since the dynamically generated asymmetric key pair is subsequently used to authenticate software modules or components (such as the second application), this can further effectively prevent hackers from attacking the vehicle network and improve network security.
[0033] In addition, since the first security module uses a newly generated asymmetric key pair to replace the original key pair, this also effectively improves the security of the key (pair) and avoids a series of risks caused by leakage or illegal acquisition of the pre-injected key.
[0034] In one embodiment, the second security module (i.e., the security module located in another electronic control unit (ECU) where the second application is located) may be configured to use a pre-injected key or an already exchanged key to generate authentication information and pass it to the second application so that the second application can construct a key request message.
[0035] In one embodiment, when the ECU where the first application resides acts as the data receiver, the data information is decoded by the first application calling the first security module. In one or more embodiments, decoding must satisfy a predefined trustworthiness check, such as a trustworthiness check in the key request section. Additionally, in one embodiment, when an application (e.g., the first application) sends and receives data, it should also check the application's trustworthiness and whether the sending / receiving conditions are met based on pre-configured information.
[0036] In one embodiment, the control method 1000 of the electronic control unit (ECU) further includes: a first security module encrypting data information from a first application using the private key in an asymmetric key pair to generate a message authentication code (MAC). This embodiment is particularly useful when the first application and the ECU containing the security module are the data senders (or servers) and the ECU containing the second application is the data receiver (or client).
[0037] In AUTOSAR, data requiring encryption protection is called an Authentic I-PDU. The security module uses an encryption algorithm with the required encrypted data and private key to obtain the Authenticator (Message Authentication Code, or MAC). In one embodiment, the data structure of an encrypted Protocol Data Unit (PDU) may include the following parts: the data to be protected (Authentic I-PDU), the Authenticator (MAC), an optional Secured I-PDU Header, and an optional Freshness Value. In practice, the Freshness Value and MAC may use longer data to improve security, but this consumes significant bandwidth and other resources. Therefore, in one embodiment, a truncation method is used to balance this. For example, both the Freshness Value and MAC are generated as complete values, but only a portion is truncated during transmission and authentication.
[0038] In one embodiment, the control method 1000 of the electronic control unit (ECU) further includes: a first security module using the public key in the asymmetric key pair to decode the data information for MAC authentication. This embodiment is particularly useful when the ECU of the first application is the data receiver (or client) and the ECU of the second application is the data sender (or server).
[0039] Based on currently known attack methods, the only obstacle to remotely controlling a car is gaining access to the vehicle's bus. Once a hacker gains direct access to the in-vehicle network, they can simulate a legitimate data transmission node to control the entire car. Using the technical solution of this application, in addition to gaining bus access, hackers also need to know the private key of the transmission node to simulate legitimate data. This application's solution, by employing dynamically generated asymmetric key pairs to authenticate software modules or components (such as the first application), can further effectively prevent hacker attacks on the vehicle network and improve network security.
[0040] Furthermore, those skilled in the art will readily understand that the control method for the electronic control unit (ECU) provided in one or more embodiments of the present invention can be implemented by a computer program. For example, the computer program is included in a computer program product, and when executed by a processor, it implements the control method for the electronic control unit (ECU) of one or more embodiments of the present invention. As another example, when a computer storage medium (e.g., a USB flash drive) containing the computer program is connected to a computer, running the computer program executes the control method for the electronic control unit (ECU) of one or more embodiments of the present invention.
[0041] Figure 2 A schematic diagram of the structure of an electronic control unit (ECU) 2000 according to an embodiment of the present invention is shown. Figure 2 As shown, a control device 2000 for an electronic control unit (ECU) includes a first application 210 and a security module 220. The first application 210 is configured to receive a key request message from a second application in another ECU that is to communicate with it. The first security module 220 is configured to check the trustworthiness of the first application 210 based on a pre-configured checking strategy and to authenticate the second application based on the key request message.
[0042] In the context of this invention, "application" in an electronic control unit (ECU) refers to a software module or component located at the application layer within that ECU. In the context of this invention, prefixes such as "first," "second," etc., are used to distinguish different applications. For example, to implement various intelligent driving functions, different ECUs need to communicate with each other; that is, a first application in a first ECU communicates with a second application in other ECUs.
[0043] The term "safety module" refers to a module within an Electronic Control Unit (ECU) that provides safety protection; in one or more embodiments, it can be a SecOC module. "SecOC" stands for Secure Onboard Communication, and it is primarily used for authenticating sensitive information within the vehicle. To ensure network security and functional safety, SecOC modules are almost always added to various types of ECU products, including but not limited to radar ECUs, driver assistance system ECUs, and video ECUs.
[0044] In one embodiment, a first application 210 in an electronic control unit (ECU) is configured to receive a key request message from a second application in another ECU that is ready to communicate with the first application 210. In other words, the second application sends a key request message to the first application 210 to exchange keys for communication.
[0045] In one embodiment, the key request message includes authentication information generated by a second security module in another electronic control unit (ECU) using a pre-injected key or an already exchanged key. Specifically, before preparing to communicate with the first application 210, the second application requests authentication information from the second security module to send the request. The security module then generates authentication information using the pre-injected key or the already exchanged key and passes it to the second application. Subsequently, the second application uses this authentication information to construct a key request message and sends it to the first application 210.
[0046] In one embodiment, after the first application 210 receives the key request message from the second application, the first application 210 is configured to request a key pair from the first security module 220. That is, after receiving the key request message from the second application, the first application 210 sends a request (interacts) to the first security module 220 to obtain the key pair. In one or more embodiments, the key pair can be an asymmetric key pair (also called an asymmetric key), which consists of a public key and a private key that are cryptographically linked. The public key can be distributed to anyone, while the private key must be securely protected and can only be used by trusted individuals. In one embodiment, the "asymmetric key pair" is an RSA key pair.
[0047] In one embodiment, the first security module 220 is configured to check the trustworthiness of the first application 210 based on a pre-configured checking policy, and to authenticate a second application in another electronic control unit (ECU) based on a received key request message. In one embodiment, in addition to checking the trustworthiness of the first application 210 and authenticating the second application, the first security module is also configured to check whether a pre-configured key request policy is met.
[0048] Specifically, the first security module 220 checks the trustworthiness of the first application 210 according to a pre-configured check strategy. This may include checking the secure startup verification result of the first application 210 or re-performing the trustworthiness check. Simultaneously, it checks whether the pre-configured key request strategy is met, such as whether the first application 210 can only request once, whether the first application 210 is in the correct security mode, and the check callback function pre-provided by the first application 210. In this case, the first application 210 and the second application should pre-inject a key pair for initial authentication, such as AES or RSA, into the first security module 220. This authentication is performed within the first security module 220. After the first power-on, the pre-injected key pair is discarded, and communication is conducted using a newly generated key pair (e.g., an asymmetric key pair). In short, in one embodiment, after receiving a key (pair) request from the first application 210, the first security module 220 first checks the trustworthiness of the first application 210, then verifies whether the requested key pair conditions are met, and finally authenticates the second application using the pre-injected or already exchanged key. After successful exchange, the existing key is discarded.
[0049] In one embodiment, the first security module 220 is configured to dynamically generate an asymmetric key pair after completing the trust check, key request policy check, and authentication of the second application for the first application 210, and to provide the public key of the asymmetric key pair to the first application 210 to facilitate key exchange between the first application 210 and the second application. In this embodiment, since the dynamically generated asymmetric key pair is subsequently used to authenticate software modules or components (such as the second application), this can further effectively prevent hackers from attacking the vehicle network and improve network security.
[0050] In addition, since the first security module 220 is configured to use a newly generated asymmetric key pair to replace the original key pair, this also effectively improves the security of the key (pair) and avoids a series of risks caused by leakage or illegal acquisition of the pre-injected key.
[0051] In one embodiment, the second security module (i.e., the security module located in another electronic control unit (ECU) where the second application is located) may be configured to use a pre-injected key or an already exchanged key to generate authentication information and pass it to the second application so that the second application can construct a key request message.
[0052] In one embodiment, when the ECU where the first application 210 resides acts as the data receiver, the data information is decoded by the first application 210 calling the first security module 220. Decoding requires satisfying a predefined trustworthiness check, referring to the trustworthiness check in the key request section. Furthermore, when an application (e.g., the first application) sends and receives data, it should also check the application's trustworthiness and whether the sending / receiving conditions are met based on pre-configured information, using a method similar to that in the key request.
[0053] In one or more embodiments, the electronic control unit (ECU) 2000 may be included in the vehicle. It should be understood that the term "vehicle" or other similar terms as used herein include motor vehicles in general, such as passenger cars (including SUVs, buses, trucks, etc.), various commercial vehicles, etc., and include hybrid electric vehicles, electric vehicles, etc. A hybrid electric vehicle is a vehicle having two or more power sources, such as a gasoline-powered and an electric vehicle.
[0054] Figure 3 A system architecture diagram 3000 illustrates a first electronic control unit (ECU) 310 and a second electronic control unit (ECU) 330 communicating with each other according to an embodiment of the present invention. Figure 3In the first electronic control unit (ECU) 310, there are: a first application 312, a first protocol data unit routing module (PDUR) 314, a first security module 316, and a first lower-level communication module 318. The second electronic control unit (ECU) 330 includes: a second application 332, a second protocol data unit routing module (PDUR) 334, a second security module 336, and a second lower-level communication module 338.
[0055] Assuming the first electronic control unit (ECU) 310 is the data sender and the second electronic control unit (ECU) 330 is the data receiver, in one embodiment, the upper-layer first application 312 needs to interact with the first security module 316 before sending data (e.g., sending encrypted data information to the first protocol data unit routing module (PDUR) 314). For example, after receiving a key (pair) request from the first application 312, the first security module 316 needs to first check the trustworthiness of the first application 312, then verify whether the requested key pair conditions are met, and finally authenticate the second application 332 using a pre-injected or already exchanged key. After successful exchange, the existing key is discarded. After the first security module 316 checks the trustworthiness of the first application 312 and authenticates the second application 332, the first security module 316 can encrypt the data to be sent. Subsequently, the data information is provided to the first lower-layer communication module 318 via the first protocol data unit routing module (PDUR) 314, so that the data information can be provided to another electronic control unit via the bus 320.
[0056] After receiving the relevant data, the second electronic control unit ECU 330 provides the relevant data information to the second protocol data unit routing module (PDUR) 334 via the second lower-level communication module 338, and forwards it to the second application 332. Similar to the sender, the second application 332 should also forward the data information to the second security module 336 after receiving it, so that the module can check the trustworthiness of the second application and whether the receiving conditions are met based on the pre-configured information.
[0057] Of course, those skilled in the art will understand that the above embodiments are merely illustrative, and the first Protocol Data Unit Routing Module (PDUR) 314 and the second Protocol Data Unit Routing Module (PDUR) 334 are optional. That is, in one embodiment, the first Electronic Control Unit (ECU) 310 may include only the first application 312, the first security module 316, and the first lower-level communication module 318, without including the first Protocol Data Unit Routing Module (PDUR) 314. Similarly, the second Electronic Control Unit (ECU) 330 may include only the second application 332, the second security module 336, and the second lower-level communication module 338, without including the second Protocol Data Unit Routing Module (PDUR) 334.
[0058] In summary, the electronic control unit (ECU) and its control scheme of the embodiments of the present invention achieve the first security module's trustworthiness check (and key request policy check) of the first application and the authentication of the second application to be communicated in other electronic control units (ECUs) through the interaction between the first application in the ECU and the first security module. In this way, the security module can identify whether the upper-layer software module / application is secure, preventing unauthorized intrusion by hackers.
[0059] Although the foregoing specification describes only some embodiments of the invention, those skilled in the art will understand that the invention can be implemented in many other forms without departing from its spirit and scope. Therefore, the examples and embodiments shown are to be considered illustrative rather than restrictive, and the invention may encompass various modifications and substitutions without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A control method of an electronic control unit (ECU), characterized by, The method includes: The first application in the electronic control unit (ECU) receives a key request message from a second application in another electronic control unit (ECU) that is to communicate with; and The first security module in the electronic control unit (ECU) checks the trustworthiness of the first application based on a pre-configured inspection strategy and authenticates the second application based on the key request message.
2. The method of claim 1, wherein, The first security module also checks whether the pre-configured key request policy is met.
3. The method of claim 2, wherein, After completing the trustworthiness check of the first application, the key request policy check, and the authentication for the second application, the first security module dynamically generates an asymmetric key pair and provides the public key of the asymmetric key pair to the first application.
4. The method of claim 3, wherein, The first security module replaces the original key pair with the newly generated asymmetric key pair.
5. The method of claim 1, wherein, The key request message contains authentication information, which is generated by a second security module in the other electronic control unit (ECU) using a pre-injected key or an already exchanged key.
6. The method of claim 1, further comprising: After the first application receives the key request message from the second application, the first application requests a key pair from the first security module.
7. An electronic control unit (ECU), characterized in that, The electronic control unit (ECU) includes: A first application, configured to receive a key request message from a second application in another electronic control unit (ECU) to which communication is desired; and A first security module is configured to check the trustworthiness of the first application based on a pre-configured inspection policy and to authenticate the second application based on the key request message.
8. The electronic control unit (ECU) as described in claim 7, wherein, The first security module is also configured to check whether a pre-configured key request policy is satisfied.
9. The electronic control unit (ECU) as described in claim 8, wherein, The first security module is configured to dynamically generate an asymmetric key pair after completing the trustworthiness check of the first application, the key request policy check, and the authentication for the second application, and to provide the public key in the asymmetric key pair to the first application.
10. The electronic control unit (ECU) as claimed in claim 9, wherein, The first security module is configured to replace the original key pair with a newly generated asymmetric key pair.
11. The electronic control unit (ECU) as claimed in claim 7, wherein, The key request message contains authentication information, which is generated by a second security module in the other electronic control unit (ECU) using a pre-injected key or an already exchanged key.
12. The electronic control unit (ECU) as claimed in claim 7, wherein, The first application is configured to request a key pair from the first security module after receiving the key request message from the second application.
13. A computer storage medium, characterized in that, The medium includes instructions that, when executed, perform the method as described in any one of claims 1 to 6.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.
15. A vehicle, characterized in that, The vehicle includes an electronic control unit (ECU) as described in any one of claims 7 to 12.
Citation Information
Patent Citations
Authentication encryption method used for intelligent vehicle internal network
CN108259465A
Control method, monitoring method, electronic control unit, controller and control system
CN112770958A
