Method for authenticating electronic control units on a can bus

The proposed method addresses the lack of secure authentication for ECUs on CAN bus networks by using unique dictionaries for each ECU and a Secure Gateway for verification, enhancing the security and preventing unauthorized access.

WO2025062310A1PCT designated stage expired Publication Date: 2025-03-27PIAGGIO & C SPA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2024/059065
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-19
Filing Date
2024-09-18
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

The CAN bus network in vehicles lacks secure authentication methods for Electronic Control Units (ECUs), making it vulnerable to unauthorized access and potential hacking, which could lead to control of the vehicle.

Method used

A method using dictionaries stored on a Secure Gateway (SGW) and ECUs to authenticate nodes on a CAN bus, where each ECU has a unique dictionary with progressive number keys and randomly generated values, and the SGW selects a key for verification, optionally using encryption and a NONCE for enhanced security.

Benefits of technology

This method effectively authenticates ECUs on the CAN network, preventing unauthorized access and enhancing the security of the CAN bus communication, thereby reducing the risk of vehicle hacking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2024059065_27032025_PF_FP_ABST
    Figure IB2024059065_27032025_PF_FP_ABST
Patent Text Reader

Abstract

A method for the secure authentication of electronic control units on a CAN bus with respect to a Secure Gateway, based on the use of data structures comprising a collection of key-value pairs.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] PATENT APPLICATION FOR THE INDUSTRIAL INVENTION ENTITLED:

[0002] METHOD FOR AUTHENTICATING ELECTRONIC CONTROL UNITS ON A CAN BUS

[0003] ********************

[0004] FIELD OF THE INVENTION

[0005] The invention relates to the field of the authentication of Electronic Control Units (ECUs) on CAN networks, in particular it relates to a method for authenticating the identity of ECUs on CAN networks with respect to centralized and reliable ECUs, such as Secure Gateways.

[0006] BACKGROUND ART

[0007] Electronic Control Units (ECUs) are systems integrated into automotive electronics which control one or more electrical systems or subsystems in a motor vehicle. Some modem motor vehicles have up to 150 ECUs and managing the increasing complexity and number of ECUs in a vehicle has become a major challenge for manufacturers.

[0008] ECUs mounted on vehicles are connected in bus mode, a mode which allows the communication among the various ECUs by transmitting data packets in broadcast mode on a single connection bus.

[0009] The various ECUs connected on the bus autonomously determine whether they are receiving data packets intended for them among those transmitted on the bus, effectively solving the issue of the huge amount of wiring which would be required if all the ECUs on the vehicle were to be connected in a wired mode. The network inside the vehicle which allows the ECUs to communicate with one another is called Controller Area Network (CAN). The CAN bus is a set of two electric cables in the communication network of the vehicle, where information may be sent to and from the various ECUs.

[0010] This approach poses huge potential security risks to a vehicle-mounted information system, the security issue related to the CAN network of the vehicle being the most important one. In fact, the CAN network on board the vehicle is used as the network for the connection of the main ECUs of the telematics control system of the vehicle. Since, as known, there are no destination addresses and source addresses in the CAN bus transmission packet, any ECU may access the main ECUs in the CAN network, such as, for example, the engine ECU, the steering ECU, etc. Therefore, if an attacker could gain execution power over the CAN network of the vehicle, they could send data packets and commands to the various ECUs to modify the behavior thereof, thus hacking the vehicle itself and gaining complete control of it.

[0011] Therefore, the need is clear to improve the security of CAN bus communication and to provide a secure authentication method on a CAN bus which solves the issues described above.

[0012] SUMMARY OF THE INVENTION

[0013] In the light of the above issues, the present description aims to provide a method to allow the authentication of a given node on a given CAN bus, so as to overcome or at least partially solve the issues of the state of the art and solve the current potential security risk of having unauthorized nodes on the CAN bus.

[0014] The method according to the present description is capable of authenticating ECUs on the CAN network with respect to a centralized and trusted ECU, such as, for example, a Secure Gateway (SGW). This authentication is based on data structures which are known as dictionaries. Dictionaries, which may also be referred to as associative arrays, maps, or symbol tables, are data structures comprising a collection of key-value pairs.

[0015] A dictionary, therefore, comprises a set of keys, and each key has a single associated value. The keys and the corresponding values may be of any format. When queried with a key, the dictionary will return the value associated with that key.

[0016] The space used by this dictionary data structure is O(N), where N is the number of pairs (key-value) contained in the dictionary. The time used to retrieve the value from a dictionary implementation, such as, for example, a hash map, is 0(1 ) in the best case.

[0017] For example, in the case where the key has the size of 1 Byte (thus allowing 256 possible combinations) and the value corresponding to each key has the size of 3 Bytes, the total memory needed, in each ECU, to contain a dictionary will be (1 B + 3B) * 256 = 1024 Bytes.

[0018] As for the centralized ECU, which for brevity we will refer to from now on as the secure gateway or SGW (Secure Gateway), the memory required must be such as to contain M - 1 dictionaries (where M is the total number of ECUs inside the vehicle, while 1 is the fact that the SGW does not have its own dictionary).

[0019] In the method according to this description, the secure gateway, SGW, is the trusted party in the authentication procedure and operates so as to create and store a separate dictionary for each ECU and then send each created dictionary to each ECU. Each ECU must retrieve the dictionary and store it while the SGW will store all the created dictionaries in the memory thereof.

[0020] Each dictionary created by the SGW will have the following features: The number N of tuples, or records, is defined upstream on the basis of the vehicle in question and is also based on the memory capacity of the ECU of the vehicle having the smallest memory (since it is essential that the dictionaries created all have the same size).

[0021] The key sequence is preferably chosen as a sequence of progressive numbers and is the same for each dictionary created by the SGW, while the values are preferably random variables created only once during the entire process, at the time of the creation of the dictionary, by means of TRNG or by pseudo-random generation, which will be better explained below in this description.

[0022] The creation of the dictionary by the SGW takes place during the step of installing and replacing the SGW, in during initial step of programming (flashing) the ECU, during the step of replacing the ECU or during the so-called End Of Line (EOL) step, i.e., during the final step of the vehicle manufacturing process.

[0023] The dictionaries, once created and stored in the destination ECU and in the SGW, may not be read or written by any diagnostic command. Each dictionary will be specific to a single ECU, there will be no other ECU of the same vehicle or corresponding ECUs of other vehicles having the same dictionary. The process of creating the dictionaries may be selected at will among the several ones that are available in the prior art. According to the method described, at vehicle key start, the ECUs are authenticated. The SGW randomly selects a dictionary key, i.e., one of the progressive numbers that make up the dictionary keys of the various ECUs which are the same for each ECU of the vehicle. The randomness of the selection may be, for example, of two types, based on the capabilities of the SGW hardware: a True Random Number Generator (TRNG) module may be used, based on physical events at the hardware level which are actually random events; or a pseudo-random generation of the software type may be used.

[0024] Once the SGW has selected a dictionary key, it communicates it on the CAN bus to all the ECUs in broadcast mode. Each ECU of the vehicle recognizes the key received and responds by sending the corresponding value stored in its dictionary to the SGW on the CAN bus. The SGW checks which ECU has sent which value, it checks the stored dictionaries and, if it recognizes the received value as correct, it then rates the ECU as authentic and consequently it does not perform any recovery to prevent unexpected or dangerous events.

[0025] The described communication of keys and values on the CAN bus may occur in clear text, i.e. in plaintext and readable mode.

[0026] In a preferred embodiment of the invention, the transmission of the values on the CAN bus is encrypted. In this embodiment, the ECUs and the SGW are provided with a hardware module that is considered secure or trusted (Hardware Trust Anchor, HTA), so as to save in a secure manner a symmetric cryptographic key which allows the described transmission of the return value from the ECU to the SGW to be carried out in encrypted mode. Examples of HTAs are the Hardware Security Modules (HSMs) and the so-called Secure Hardware Extensions, SHEs.

[0027] Preferably, said symmetric cryptographic key is created and stored when the SGW is installed in the vehicle and in the ECUs provided with an HTA, when the latter are installed in the vehicle and when they are updated (software update).

[0028] Preferably, moreover, this symmetric key is a 64 bit key, to perform an encryption of the Speck-64 type. The 64-bit Speck-64 symmetric key must be different for each vehicle, but it may be the same for each ECU belonging to the same vehicle. In the case where at least some of the ECUs of the vehicle lack an HTA, they may still use a Speck-64 key by storing it in an obscure manner by means of software implementation, so as to make a possible reverse engineering process performed to capture the aforesaid Speck-64 key very complex. Furthermore, in other embodiments, hybrid implementations may be envisaged in which some ECUs are provided with an HTA and therefore encrypt the Value, while the other ECUs return the Values in clear text.

[0029] According to this encrypted transmission mode, once the SGW has selected a dictionary key, it communicates it on the CAN bus to all the ECUs in broadcast mode. Each ECU of the vehicle recognizes the key received and responds by sending the corresponding value stored in its dictionary, encrypted by means of the symmetric key, to the SGW on the CAN bus. The SGW receives the piece of data received from the ECU, it decrypts it and, by checking the stored dictionaries, it recognizes the received value as correct and considers the ECU as authentic.

[0030] To increase the level of security of the transmission, in a preferred embodiment of the method according to this description, a NONCE may be used, i.e. , a number, generally random or pseudo-random, which has a unique use and is used in the authentication procedure to ensure that the data exchanged in old communications may not be reused in possible attacks aimed at intercepting and decrypting the transmitted data.

[0031] In this preferred embodiment, when the SGW selects the key to be sent to the ECUs, it also sends a NONCE which is the same for all ECUs. This NONCE is created by the SGW when the key is selected and it may, for example, be a random value of 5 Bytes and shall have a temporary validity.

[0032] The various ECUs receive the key and the NONCE and the ECUs provided with an HTA proceed to concatenate the value extracted from the dictionary, corresponding to the received key, with the NONCE. Next, the ECU encrypts the string obtained from this concatenation with the symmetric key and sends the resulting piece of data on the CAN bus.

[0033] The use of the NONCE means that the encryption by the ECU is always different each time the same value has to be sent, since the encryption covers not only the value of the dictionary, but the value combined with another term which is always different. In other words, given the same value sent, an encrypted data will be transmitted in the channel which is different each time. Thereby, any possible attempts to reconstruct the dictionaries belonging to ECUs provided with an HTA are made very complicated and difficult, since the values returned by the ECU are as if they were obscured by encryption.

[0034] Another preferred embodiment of the method described comprises an additional security procedure aimed at preventing the risk of possible attacks which may attempt to reconstruct the dictionaries stored in the ECUs. These attacks consist in the automatic execution of a series of vehicle starts repeated at rapid intervals, followed by the reading of the exchange of keys and values that occurs after each vehicle key start.

[0035] In fact, each of these vehicle starts is followed by the selection of a different key by the SGW and the transmission to the ECUs on the CAN bus. One of the connected ECUs responds to this transmission on the CAN bus, with the value corresponding to the key sent by the SGW and an attacker could try to automatically intercept the transmissions on the bus to reconstruct the dictionaries in a relatively short time.

[0036] To make this possibility substantially impossible, it is arranged that, in the case of multiple close key starts (key-on), the SGW selects the same key within a certain time interval, for example of 1 minute. The SGW, therefore, will generate a key different from the last one generated only after a time greater than a certain threshold has elapsed, so as to prevent an attacker from repeating the key-on request several times in rapid sequence, in order to collect all the responses from the ECUs and reconstruct the dictionary. Preferably, furthermore, said time interval may be selected to be sufficiently short so as not to allow the hypothetical attacker to take advantage of the value obtained on a different ECU of the vehicle.

[0037] The selection of a new key after a certain time interval is effective in the case where the malicious attacker has a limited window of opportunity to carry out the attack and try to reconstruct the dictionaries of the ECUs. In any case, even if the attacker were able to wait the time necessary to reconstruct all the dictionaries of the ECUs of a certain vehicle, this work would affect only one vehicle at a time. It would therefore be necessary to repeat the same procedure from the beginning to attack another vehicle since the dictionaries eventually reconstructed by attacking a vehicle could not anyway be exploited to attack other vehicles. BRIEF DESCRIPTION OF THE FIGURES

[0038] Further objects, features and advantages of the present invention will be more apparent from the following detailed description provided by way of non-limiting example and illustrated in the accompanying figures, in which:

[0039] Figure 1 shows a flow diagram of a preferred embodiment of the authentication process of electronic control units, ECUs, on a CAN bus following the vehicle key start;

[0040] Figure 2 shows a flow diagram of a preferred embodiment - which uses an encryption of the Value concatenated with a NONCE - of the authentication process of electronic control units, ECUs, on a CAN bus following the vehicle key start;

[0041] Figure 3 shows a flow diagram of a preferred embodiment of the process for creating dictionaries and sending them to the electronic control units, ECUs, lacking a hardware module considered secure or trusted (Hardware Trust Anchor, HTA), on a CAN bus, in the event of replacing the ECU itself or in the event of successfully completing a software update;

[0042] Figure 4 shows a flow diagram of a preferred embodiment of the process for creating dictionaries and sending them to the electronic control units, ECUs, provided with a hardware module considered secure or trusted (Hardware Trust Anchor, HTA), on a CAN bus, in the event of replacing the ECU itself or in the event of successfully completing a software update and

[0043] Figure 5 shows a flow diagram of a preferred embodiment of the process for replacing the Secure Gateway, SGW.

[0044] The following description of exemplary embodiments relates to the accompanying drawings. The same reference numerals in different drawings identify the same elements or similar elements. The following detailed description does not limit the invention. The scope of the invention is defined by the accompanying claims.

[0045] DETAILED DESCRIPTION OF THE INVENTION

[0046] With reference to the accompanying Figure 1 , at the key start 100 of a vehicle comprising a plurality of Electronic Control Units (ECUs) and a centralized and reliable electronic control unit (such as, for example, a Secure Gateway, SGW) interconnected on a data communication bus of the CAN type, the process for authenticating the electronic control units (ECUs) of said plurality of electronic control units, in a preferred embodiment, is carried out as described below.

[0047] Both the SGW 10 and the ECUs 11 boot 101 , preferably in a protected and secure mode (for example, by means of a secure boot, trusted boot, and similar methods). Each ECU 11 comprises its dictionary and the SGW 10 comprises a copy of each of the dictionaries stored in the various ECUs of the vehicle. After the vehicle is started, the SGW randomly selects a dictionary key - i.e., one of the progressive numbers which make up the dictionary keys of the various ECUs, keys that are the same for each ECU of the vehicle - and sends it 103 in broadcast mode on the CAN bus of the vehicle. The randomness of the selection of the key by the SGW may be, for example, of two types, based on the structure of the SGW hardware: a True Random Number Generator (TRNG) module may be used, based on physical events at the hardware level which are actually random events; or a pseudo-random generation of the software type may be used.

[0048] Each ECU 11 of the vehicle receives the key sent by the SGW, it recognizes it, it determines 104 the corresponding value stored in its dictionary and it responds by sending 105 on the CAN bus, to the SGW 10, said value corresponding to the received key.

[0049] The SGW 10, therefore, checks which ECU has sent which value, it checks the stored dictionaries, it verifies 106 the received value and, if it recognizes the received value as correct, it thus rates the ECU 11 that has transmitted that value as authentic and consequently does not perform any recovery to prevent unexpected or dangerous events.

[0050] In a further preferred embodiment of the method according to the present description, shown in Figure 2, a NONCE is used and an encryption is applied to increase the security level of the transmission of the values on the CAN bus. The NONCE is a number, generally random or pseudo-random, which has a unique use and is used in the authentication procedure to ensure that the data exchanged in old communications may not be reused in possible attacks aimed at intercepting and decrypting the transmitted data. According to this preferred embodiment, after having selected the key to be sent to the ECUs 11 provided with an HTA, the SGW 10 sends 110, together with the key, also a NONCE which is the same for all the ECUs. The NONCE is also randomly selected by the SGW. For example, it may be generated by means of a True Random Number Generator (TRNG) module, or it may be produced using a pseudo-random generation of the software type.

[0051] The ECUs 11 receive the key and the NONCE and create 111 a string by concatenating the value extracted from its dictionary, corresponding to the key received, with the NONCE also received from the SGW. Thereafter, the ECUs 11 encrypt 112 the created string and send 113 the resulting piece of data on the CAN bus.

[0052] By using the NONCE, the encryption by the ECU will always be different each time it has to send a same value, since the ECU encrypts the value of the dictionary combined with another term, which is always different. Therefore, given the same sent value, an encrypted piece of data will be transmitted on the CAN bus, which is different each time, making any attempts to reconstruct the dictionaries of the ECUs very complicated and difficult.

[0053] The method described is based on the use of dictionaries that are stored on the SGW (all of them) and on the various ECUs (only their own) of the vehicle.

[0054] As stated above, each dictionary comprises a set of keys and each key has a single associated value. The keys and the corresponding values may be of any format. When queried with a key, the dictionary will return the value, among those stored, which is associated with that particular key.

[0055] The creation of the dictionaries is performed by the SGW during the step of installing and replacing the SGW and it occurs during the step of programming (flashing) the ECU, during the step of replacing the ECU or during the so-called End Of Line (EOL) step, i.e., during the final step of the vehicle manufacturing process.

[0056] The dictionaries, once created and stored in the destination ECU and in the SGW, may not be read or written by any diagnostic command. Each dictionary will be specific to a single ECU, there will be no other ECU of the same vehicle or corresponding ECUs of other vehicles having the same dictionary. The process of creating the dictionaries may be selected at will among the several ones that are available in the prior art.

[0057] With reference to the accompanying Figure 3, in a preferred embodiment in which the electronic control units, ECUs 11 , lack an HTA, the procedure for replacing the ECUs 11 provides, after a check of the integrity of the software of the ECU 11 , a step in which the dictionaries are created 114 initially by the SGW 10 - previously unlocked I enabled by an external device - which then stores them 115 and sends them 116 to each ECU 11 of the vehicle, which, in turn, stores them 133. The procedure is repeated for each ECU of the vehicle with a different dictionary for each ECU. The aforesaid external device is to be understood as any means that allows a user to communicate with the vehicle by means of a given diagnostic protocol provided by the prior art, such as, for example, the UDS protocol of the ISO14229 standard.

[0058] The dictionaries shall be created again, and stored again, in the event that it becomes necessary to replace the SGW 10 or the ECUs 11 .

[0059] In a preferred embodiment, shown in the accompanying Figure 5, the SGW replacement procedure involves, for example, the starting 117 of a replacement operating mode, forced by an external device, to which the new SGW responds by proceeding with the creation 118 and storage 119 therein of new dictionaries which are then sent 120 to the various ECUs which, in turn, store 121 , 122 the received dictionaries. The procedure is repeated for each ECU of the vehicle with a different dictionary for each ECU.

[0060] In the preferred embodiment in which the ECUs 11 are provided with a hardware module which is considered secure or trusted (Hardware Trust Anchor, HTA), the SGW also creates 123 a symmetric key 12 which is stored and sent 124 to the individual ECUs.

[0061] In a preferred embodiment, shown in the accompanying Figure 4, in which the electronic control units, ECUs 11 , are provided with an HTA, the procedure for replacing the ECUs 11 includes, for example, checking the integrity of the software of the ECU 11 . Once the aforesaid check has been successfully carried out, the SGW 10 proceeds with the creation 127 and storage 128 therein of a new dictionary that is then sent 129 to the new ECU which, in turn, stores the received dictionary therein 130.

[0062] In the preferred embodiment in which the new ECU 11 is provided with a hardware module that is considered safe or trusted (Hardware Trust Anchor, HTA), furthermore, the SGW 10 also sends 131 to the new ECU the symmetric key 12 that is stored 132 by the ECU. Said symmetric key was created and stored when the SGW was installed in the vehicle.

Claims

CLAIMS1 . A method for authenticating the identity of a secondary electronic control unit, ECU, (11 ) belonging to a plurality of secondary electronic control units, against a secure main control unit, SGW, (10) in communication with said plurality of secondary electronic control units on a piece of data bus of the CAN type of a vehicle, wherein each of said secondary electronic control units, ECU, (11 ) comprises a dictionary of correspondences between a plurality of dictionary keys and a plurality of dictionary values, and said secure main control unit, SGW, (10) comprises a copy of each of the dictionaries of the secondary electronic control units, ECU, (11 ) of said plurality of secondary electronic control units, said method comprising the following steps: a) the secure main control unit, SGW, (10) sends (103) on said data bus of the CAN type a dictionary key stored inside said secure main control unit, SGW, (10); b) each secondary control unit, ECU, (11 ) receives said key; c) each secondary control unit, ECU, (11 ) extracts (104) from the dictionary thereof a value corresponding to said key; d) sends (105, 113) a piece of data comprising said value to said secure main control unit, SGW, (10) on said data bus of the CAN type; e) said secure main control unit, SGW, (10) verifies (106) the correspondence in the dictionary between the key sent and the value received and, if positive, it rates the secondary control unit, ECU, (11 ) that sent said value, as authentic.

2. An authentication method according to claim 1 , wherein the secure main control unit, SGW, (10) is configured to send on said data bus of the CAN type, within a pre-established time frame, a same key of dictionary stored within said secure main control unit, SGW, (10).

3. An authentication method according to one or more of claims 1 to 2, wherein said dictionaries contained in the secondary electronic control units, ECU, (11 ) and in the secure main control unit, SGW, (10) comprise the same set of keys.

4. An authentication method according to one or more of claims 1 to 3, wherein said keys of said dictionaries are progressive numbers.

5. An authentication method according to one or more of claims 1 to 4, wherein said values of said dictionaries are random variables.

6. An authentication method according to one or more of claims 1 to 5, wherein said secure main control unit, SGW, (10) and said secondary control unit, ECU, (11 ) comprise a Hardware Trust Anchor - HTA.

7. An authentication method according to claim 6, wherein said Hardware Trust Anchor - HTA comprises a Hardware Security Module - HSM or a Secure Hardware Extension - SHE.

8. An authentication method according to one or more of claims 6 to 7, wherein said secure main control unit, SGW, (10) and said secondary control unit, ECU, (11 ) comprise a symmetric cryptographic key (12).

9. An authentication method according to claim 8, wherein said symmetric cryptographic key (12) is a 64-bit cryptographic key.

10. An authentication method according to one or more of claims 8 to 9, wherein: said secure main control unit, SGW, (10) comprises a NONCE; said step a) further comprises that: the secure main control unit, SGW, (10) sends (110) said NONCE on said data bus of the CAN type; said step b) further comprises that: each secondary control unit, ECU, (11) receives said NONCE; said step c) further comprises that: each secondary control unit, ECU, (11 ) generates (111 ) a string by concatenating said NONCE with the value corresponding to said received key and encrypts (112) the string with said symmetric cryptographic key (12); said piece of data comprising said value referred to in step d) comprises the encrypted string produced in step c); said step e) further comprises that: said secure main control unit, SGW, (10) decrypts (109) the received encrypted string and extracts the value from the decrypted string.

11. An authentication method according to claim 10, wherein said NONCE is a random 5-Byte value having a temporary validity.

12. An authentication method according to one or more of claims 10 to 11 , wherein said NONCE is selected in a random manner by means of a True Random Number Generator module, TRNG, or by means of a pseudorandom generation of the software type.

13. An authentication method according to one or more of claims 1 to 12, wherein said method is performed upon turning on the vehicle.

14. An authentication method according to one or more of claims 1 to 13, wherein said key referred to in step a) is selected in a random manner.

15. An authentication method according to claim 14, wherein said key referred to in step a) is selected in a random manner by means of a True Random Number Generator module, TRNG, or by means of a pseudo-random generation of the software type.

Citation Information

Patent Citations

  • Intranet identity authentication method based on quantum random number generator

    CN115242410A

  • End-to-end communication security

    US10009325B1

  • System for the remote programming of a personal medical device

    US20090018598A1