Key generation device

The key generation device addresses the security and cost issues of dynamic program placement by generating a session key post-secure boot using key sharing algorithms, ensuring secure and cost-effective verification of programs between ECUs.

WO2024236801A1PCT designated stage expired Publication Date: 2024-11-21ASTEMO LTD

Patent Information

Application Number
PCT/JP2023/018582
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

Existing methods for secure program verification between ECUs face high security risks and increased encryption key management costs when dynamically changing program placements, as they require pre-stored common encryption keys for secure boot processes.

Method used

A key generation device that includes a verification unit for startup programs, an acquisition unit for execution programs, and a key generation unit that generates a session key after successful secure boot, eliminating the need for pre-stored common encryption keys by using key sharing algorithms like DH and ECDH to create a session key post-secure boot.

Benefits of technology

Ensures the security of dynamic program placement between ECUs without increasing encryption key management and operation costs, providing a highly reliable session key for program verification and reducing the risk of tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023018582_21112024_PF_FP_ABST
    Figure JP2023018582_21112024_PF_FP_ABST
Patent Text Reader

Abstract

This key generation device comprises a verification unit that verifies an activation program, an acquisition unit that acquires an execution program from another device, and a key generation unit that generates a key for verifying the acquired execution program. The key generation unit generates the key after the activation program has been verified.
Need to check novelty before this filing date? Find Prior Art

Description

key generator

[0001] The present invention relates to a key generation device that generates a key for verifying a program to be executed.

[0002] There is a technology for dynamically changing the layout of programs among multiple electronic control units (ECUs) installed in a vehicle by generating generic programs that can be executed on different platforms in advance. However, simply executing programs received from different ECUs without verifying that they have not been tampered with poses a high security risk. To address this issue, there are program verification technologies such as secure boot.

[0003] Patent Document 1 discloses a secure boot method.

[0004] JP 2017-188826 A

[0005] In order to confirm that a program received from a different ECU has not been tampered with and to authenticate that the sender of the program is legitimate, it is desirable to verify the program using a method such as secure boot before executing the received program, thereby ensuring security.

[0006] On the other hand, when performing secure boot, it is necessary to store a common encryption key in advance between ECUs that dynamically change the program location. In this case, there is a problem that the encryption key must be shared between vendors of each ECU in advance, and the shared encryption key must be stored and in the ECUs, which increases the management and operation costs of the encryption key. However, Patent Document 1 does not disclose a method for ensuring security in an ECU that dynamically changes the program location without increasing the management and operation costs of the encryption key.

[0007] The present invention is intended to solve the above-mentioned problems, and its purpose is to provide a technology that can ensure the security of dynamic program placement between ECUs without increasing the management and operation costs of cryptographic keys.

[0008] In order to solve the above problem, a key generation device according to one embodiment of the present invention includes a verification unit that performs verification of a startup program, an acquisition unit that acquires an execution program from another device, and a key generation unit that generates a key to verify the acquired execution program, and the key generation unit generates a key after the startup program has been verified.

[0009] According to the present invention, it is possible to ensure the security of dynamic program allocation between ECUs without increasing the management and operation costs of encryption keys. Further features related to the present invention will become apparent from the description of this specification and the accompanying drawings. Furthermore, problems, configurations, and effects other than those described above will become apparent from the following description of the embodiments.

[0010] Fig. 1 is a block diagram showing an example of the functional configuration of an in-vehicle system equipped with a key generation device according to an embodiment. Fig. 2 is a chart showing an example of a program verification process executed by a key generation device according to an embodiment 1. Fig. 3 is a chart showing an example of a program verification process executed by a key generation device according to an embodiment 3. Fig. 4 is a diagram showing an example of a table used to calculate the reliability of the session key shown in Fig. 4. Fig. 5 is a chart showing an example of a program verification process executed by a key generation device according to an embodiment 4. Fig. 6 is a diagram showing an example of a table used to determine whether or not session key generation is necessary. Fig. 7 is a chart showing an example of a program verification process executed by a key generation device according to an embodiment 5.

[0011] Hereinafter, embodiments of the present invention will be described with reference to the drawings. Note that components with the same reference numerals in each embodiment have the same functions in each embodiment unless otherwise specified, and the description thereof will be omitted.

[0012] 1 is a block diagram showing an example of the functional configuration of an in-vehicle system 1001 equipped with a key generation device according to a first embodiment of the present invention. In this embodiment, an example will be described in which a program allocation is dynamically changed from a second ECU 1020 to a first ECU 1010, both of which are equipped in the in-vehicle system 1001.

[0013] The in-vehicle system 1001 is equipped with a first ECU 1010 and a second ECU 1020. The number of ECUs may be one or more. The first ECU 1010 is an example of a key generation device. The second ECU 1020 is an example of another device that transfers a program to the key generation device.

[0014] The first ECU 1010 and the second ECU 1020 are connected to each other by a communication bus 1030. The communication bus 1030 is used for data communication by an acquisition unit 1012 and a transmission unit 1022, which will be described later. The communication standard of the communication bus 1030 is not particularly limited and may be CAN, Ethernet, SPI, MII, LIN, or the like.

[0015] Each ECU is configured with a SoC (System On Chip) or a microcomputer, and includes a processor, memory, a communication device, etc. In order to safely execute security-related processes, each ECU preferably includes a security chip such as an HSM (Hardware Security Module).

[0016] The first ECU 1010 includes a verification unit 1011 , an acquisition unit 1012 , and a key generation unit 1013 .

[0017] The verification unit 1011 is a functional unit that performs a function equivalent to secure boot processing and verifies a program when the first ECU 1010 is started. For program verification, for example, an HSM is used to calculate a verification value using a specific encryption algorithm from an encryption key previously stored in the HSM and the program to be verified, and a determination is made as to whether the verification value matches the previously calculated verification expected value. A known encryption algorithm such as AES-CMAC can be used for program verification. Furthermore, the verification unit 1011 verifies a program (a program whose allocation is dynamically changed between ECUs, hereinafter referred to as a dynamically allocated program) acquired by an acquisition unit 1012 (described later) using the verification expected value and a session key generated by a key generation unit 1013. Furthermore, based on the verification result, a determination is made as to whether to execute the received program.

[0018] The acquisition unit 1012 acquires the dynamic allocation program from the second ECU 1020 via the communication bus 1030. The acquisition unit 1012 also shares information generated by the key generation unit 1013 and the key generation unit 2023 (described later) between the ECUs via the communication bus 1030.

[0019] The key generation unit 1013 generates an encryption key for verifying the dynamic placement program acquired by the acquisition unit 1012. Specifically, the key generation unit 1013 generates a session key shared between the second ECU 1020 and the second ECU 1020. The session key can be generated using a known key sharing algorithm such as DH (Diffie-Hellman) or ECDH (Elliptic curve Diffie-Hellman).

[0020] The key sharing algorithm must be the same as that of the key generation unit 1023 of the second ECU 1020, and may be exchanged in advance at the design stage or may be determined by a handshake prior to the timing of key sharing. By using the key sharing algorithm to dynamically generate an encryption key (session key) after the secure boot process is completed, it is no longer necessary to store a common encryption key (shared key) between the ECUs in advance, and the management / operation costs of the encryption key do not increase.

[0021] In this embodiment, the key generation unit 1013 generates a session key after the verification unit 1011 performs program verification (secure boot processing) when the ECU is started. By generating a session key after secure boot, key sharing between the first ECU 1010 and the second ECU 1020 can be performed without tampering, and the reliability of the generated session key is therefore high. Using such a highly reliable session key enables more secure verification of the acquired program.

[0022] The second ECU 1020 includes a verification unit 1021 , a transmission unit 1022 , and a key generation unit 1023 .

[0023] The verification unit 1021 verifies the program when the second ECU 1020 is started up, similar to the verification unit 1011 of the first ECU.

[0024] The transmission unit 1022 transmits the dynamic placement program to the first ECU 1010. In addition to the dynamic placement program, the transmission unit 1022 also transmits to the first ECU 1010 a verification expected value calculated for the dynamic placement program using a session key generated by a key generation unit 1023 (described later).

[0025] Like the key generation unit 1013, the key generation unit 1023 generates a session key that is shared with the first ECU 1010. The key generation unit 1023 also uses the generated session key to generate a verification expected value for the dynamic allocation program to be transmitted by the transmission unit 1022. A known encryption algorithm such as AES-CMAC can be used to generate the verification expected value for the program. The encryption algorithm used must be the same as the encryption algorithm used by the verification unit 1021.

[0026] An example of the program verification process executed by the key generation device according to this embodiment will be described below with reference to FIGS.

[0027] FIG. 2 is a diagram illustrating an example of a flow of a program verification process executed by the key generation device according to the first embodiment.

[0028] 2 is initiated when the first and second ECUs 1010 and 1020 transition to an activated state (S131). Note that both ECUs do not necessarily need to be activated simultaneously. Each microcomputer in the ECU performs a secure boot process at startup using the verification unit 1011 or 1021, and executes its own boot program if the program has not been tampered with (S132, S133).

[0029] Next, after the secure boot process has ended normally, the first ECU 1010 generates information for generating a session key (session key generation information) using the key generation unit 1013 and transmits the information to the second ECU 1020 (S134). Similarly, after the secure boot process has ended normally, the second ECU 1020 generates session key generation information using the key generation unit 1023 and transmits the information to the first ECU 1010.

[0030] In each ECU, the key generation unit 1013 or the key generation unit 1023 generates a common session key based on the session key generation information created and shared in S134 and S135 (S136, S137).

[0031] Next, the second ECU 1020 uses the generated session key in the key generation unit 1023 to generate a verification expectation value for the dynamic allocation program (S138). The dynamic allocation program and the verification expectation value are transmitted by the transmission unit 1022 to the first ECU 1010 via the communication bus 1030 (S139).

[0032] The first ECU 1010 verifies the dynamic allocation program acquired by the acquisition unit 1012 in the verification unit 1011 using the session key generated by the first ECU 1010 and the verification expected value received from the second ECU 1020 (S140). If the verification of the dynamic allocation program is successful (YES in S141), the received program is executed (S142). If the verification of the dynamic allocation program is unsuccessful (NO in S141), the received program is not executed and the process ends (S143).

[0033] The program verification process according to the first embodiment has been described above. A particular feature is that the session key is generated in S136 and S137 after the secure boot process in S131 and S132 is executed (completed). Completion of the secure boot process means that the ECU is likely not exposed to attacks from third parties and that security is maintained. This increases the reliability of the key generated immediately after the secure boot process. Therefore, the reliability of the session key generated between the ECUs is high, making it possible to very securely authenticate the dynamic placement program passed from the second ECU 1020 to the first ECU using this key.

[0034] [Embodiment 2] Next, a key generation device according to embodiment 2 will be described. The functional configuration of the key generation device according to embodiment 2 is the same as that of embodiment 1, and therefore illustration and description thereof will be omitted. The same applies to other embodiments described later.

[0035] Fig. 3 is a diagram showing an example of the flow of program verification processing executed by a key generation device according to Example 2. Note that the flow shown in Fig. 3 is the same as the flow shown in Fig. 2 except that a branching process based on the time required from the completion of secure boot processing to session key generation has been added to the flow shown in Fig. 2. Therefore, the following description will focus on the differences from Fig. 2.

[0036] After generating the session key in S136, the key generation unit 1013 of the first ECU 1010 checks the time required from the completion of the secure boot process to the generation of the session key (S110). It determines whether this time is within a predetermined time (S141). If it is within the predetermined time, it verifies the received program (S140). This is the same as in the first embodiment. If the time required to generate the session key in S111 exceeds the predetermined time ("NO" in S111), it determines that the second ECU 1020 is behaving differently from its normal state and does not execute the received program (S143). In other words, it determines that there is a high possibility that a third party has illegally accessed the second ECU 1020 during the secure boot process and the sharing of session key generation information, and that the received program may have been tampered with, and discards the program. This ensures a more secure key sharing and dynamic allocation program execution environment.

[0037] [Embodiment 3] Fig. 4 is a diagram showing an example of a flow of a program verification process according to embodiment 3. The flow shown in Fig. 4 is obtained by adding branching processing based on the reliability of the generated session key to the flow shown in Fig. 2.

[0038] After generating the session key in S136, the key generation unit 1013 of the first ECU 1010 calculates the reliability of the session key in accordance with the elapsed time since the completion of the secure boot process (S112). The reliability calculation may be performed by, for example, pre-storing a table shown in FIG. 5 in the first ECU 1010 and referencing it when the key generation unit 1013 calculates the reliability. In FIG. 5, elapsed time 1 indicates the elapsed time since the completion of the secure boot process, and reliability 2 indicates the reliability of the session key. FIG. 5 shows an example of a table in which reliability 2 is classified into "high," "medium," and "low" based on elapsed time 1. If reliability 2 calculated based on the table in FIG. 5 is lower than a predetermined threshold ("NO" in S113), for example, if the threshold is set to "medium" and reliability 2 is "low," the received program is not executed (S143). By determining whether to execute a received program based on the reliability of the generated session key, it is possible to ensure a more secure key sharing and execution environment for a dynamically allocated program.

[0039] [Embodiment 4] Fig. 6 is a diagram showing an example of a flow of a program verification process according to embodiment 4. The flow shown in Fig. 6 is obtained by adding a branching process based on a determination of whether or not a session key needs to be generated to the flow shown in Fig. 2.

[0040] After executing the secure boot process in S132, the key generation unit 1013 of the first ECU 1010 determines whether or not a session key needs to be generated (S114). The determination of whether or not a session key needs to be generated may be performed, for example, by storing a table shown in FIG. 7 in advance in the first ECU 1010 and using the table to determine whether or not a session key needs to be generated in the key generation unit 1013. In FIG. 7, ECU 3 corresponds to the second ECU 1020. The previous startup processing load 4 indicates the processing load of each ECU 3 in the previous startup cycle. The startup status 5 indicates whether startup information has been received from the ECU 3 in the current startup cycle, and indicates whether startup of the ECU 3 has been completed. The startup information may be an NM (Network Management) frame if the communication bus 1030 is a CAN.

[0041] The key generation unit 1013 of the first ECU 1010 determines with which ECU 3 a session key needs to be generated in the current startup cycle based on the processing load 4 at the previous startup (S114). Specifically, if the processing load at the previous startup is "high," this means that the ECU 3 was under a high load at the previous startup, and it is determined that dynamic allocation of programs is necessary to distribute the load, i.e., that a session key needs to be generated. If the processing load at the previous startup of the ECU 3 (second ECU 1020) is "low" or "medium," this means that the ECU 3 can withstand the additional computational processing load, and it is determined that dynamic allocation of programs is not necessary, and the session key generation process ends ("No" in S115 → S116).

[0042] When the key generation unit 1013 identifies an ECU 3 for which a session key needs to be generated (YES in S115), it checks the activation status 5 of the ECU 3 (the identified second ECU 1020) (S117). When it is confirmed that the activation status 5 is activated (YES in S118), it generates a session key with the identified ECU 3 (S134 to S137). On the other hand, when the activation status 5 is deactivated (NO in S118), it skips the subsequent program verification process (S116).

[0043] In this way, by identifying the target for which a session key is to be generated, checking the startup state, and knowing the timing when a session key can be generated, it is possible to reduce unnecessary consumption of computational resources.

[0044] [Fifth Embodiment] Fig. 8 is a diagram showing an example of a flow of a program verification process according to a fifth embodiment. The flow shown in Fig. 8 is obtained by adding session key destruction to the flow shown in Fig. 2.

[0045] In FIG. 8 , after the program verification process (S142, S143) is completed, the key generation unit 1013 of the first ECU 1010 discards the session key (S145) in response to a stop process (S144). The stop process (S144) may be, for example, turning off the ignition switch of the vehicle, such as IG-OFF. The session key discarding (S145) may also be performed when it is determined that the session key is no longer needed during that startup cycle. Generating and discarding a session key for each startup cycle ensures a more secure key sharing and dynamic allocation program execution environment. For example, if it is determined that the session key has been compromised during a certain startup cycle, the key generation unit 1013 may generate a session key again.

[0046] The above-described embodiment of the present invention provides the following advantageous effects: (1) A key generation device according to one embodiment of the present invention includes a verification unit that verifies a startup program, an acquisition unit that acquires an execution program from another device, and a key generation unit that generates a key for verifying the acquired execution program, and the key generation unit generates the key after the startup program is verified.

[0047] With the above configuration, it is possible to ensure the security of dynamic allocation of programs between ECUs without increasing the management and operation costs of encryption keys.

[0048] (2) The verification unit verifies the acquired executable program using a key. The generated key is actually used to ensure the usefulness of the present invention.

[0049] (3) The key generation unit generates a key within a predetermined time after the startup program is verified. Keys generated after the predetermined time have passed are deemed to be likely to have been affected by a cyber attack by a third party, and are therefore not used, thereby ensuring security.

[0050] (4) The key generation unit generates a key after the boot program of the other device has been verified. Even if a key is generated before the boot program of the other device has been verified, if the boot program of the other device fails to be verified, the generated key will be wasted. Therefore, it is preferable to generate a key after the boot program of the other device has been verified.

[0051] (5) The key generation unit sets the reliability of the key depending on the time elapsed between the verification of the startup program and the generation of the key. By using the generated key only when its reliability is equal to or greater than a predetermined threshold, security can be ensured in the same way as in (3).

[0052] (6) The key generation unit generates a key after identifying the other device and acquiring the startup information of the other device. Depending on the startup information of the other device, it may not be necessary to generate a key. Therefore, it is preferable to acquire and check the startup information of the other device in advance in this way in order to avoid generating unnecessary keys.

[0053] (7) The key generation unit discards the key at a predetermined timing, such as when the in-vehicle device in which the key generation device is installed is powered off. This generates a new key for each startup cycle, making it possible to prevent the key from being compromised across cycles.

[0054] [Others] The present invention is not limited to the above-described embodiments and includes various modifications. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to those including all of the described configurations. Furthermore, it is possible to replace part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace part of the configuration of each embodiment with other configurations.

[0055] Furthermore, the above-described configurations, functions, processing units, processing means, etc. may be partially or entirely realized by hardware, for example, by designing them as integrated circuits. Furthermore, the above-described configurations, functions, etc. may be realized by software, in which a processor interprets and executes a program that realizes each function. Information such as programs, tapes, and files that realize each function can be stored in a memory, a recording device such as a hard disk or SSD (solid state drive), or a recording medium such as an IC card, SD card, or DVD.

[0056] In addition, the control lines and information lines shown are those that are considered necessary for the explanation, and do not necessarily show all the control lines and information lines in the product. In reality, it can be assumed that almost all components are interconnected.

[0057] 1010 First ECU (key generating device), 1011 Verification unit, 1012 Acquisition unit, 1013 Key generating unit, 1020 Second ECU (another device), 1030...Communication bus

Claims

1. A key generation device comprising: a verification unit that performs verification of a startup program; an acquisition unit that acquires an execution program from another device; and a key generation unit that generates a key for verifying the acquired execution program, wherein the key generation unit generates the key after the startup program has been verified.

2. A key generating device according to claim 1, wherein the verification unit verifies the obtained execution program by using the key.

3. A key generating device according to claim 1, wherein said key generating unit generates said key within a predetermined time after said boot program is verified.

4. A key generating device according to claim 1, wherein said key generating unit generates said key after a boot program of said other device is verified.

5. A key generating device according to claim 1, wherein the key generating unit sets the reliability of the key according to the time elapsed from when the startup program is verified to when the key is generated.

6. A key generating device according to claim 1, wherein the key generating unit identifies the other device, acquires startup information of the other device, and then generates the key.

7. A key generation device according to claim 1, wherein the key generation unit discards the key when a predetermined trigger occurs, including when a vehicle-mounted device on which the key generation device is mounted is powered off.

Citation Information

Patent Citations

  • On-vehicle computer system, vehicle, management method, and computer program

    JP2017046038A

  • Vehicle system and authentication method

    JP2017079369A

Cited By

  • Control device and program verification method

    US12321440B2

  • Control device and program verification method

    US20230147082A1