JP2018026866A - Management system, data providing device, on-vehicle computer, management method, and computer program - Google Patents

Management system, data providing device, on-vehicle computer, management method, and computer program Download PDF

Info

Publication number
JP2018026866A
JP2018026866A JP2017197257A JP2017197257A JP2018026866A JP 2018026866 A JP2018026866 A JP 2018026866A JP 2017197257 A JP2017197257 A JP 2017197257A JP 2017197257 A JP2017197257 A JP 2017197257A JP 2018026866 A JP2018026866 A JP 2018026866A
Authority
JP
Japan
Prior art keywords
key
ecu
data
vehicle
encrypted data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017197257A
Other languages
Japanese (ja)
Other versions
JP6454919B2 (en
Inventor
竹森 敬祐
Keisuke Takemori
敬祐 竹森
誠一郎 溝口
Seiichiro Mizoguch
誠一郎 溝口
秀明 川端
Hideaki Kawabata
秀明 川端
歩 窪田
Ayumi Kubota
歩 窪田
Original Assignee
Kddi株式会社
Kddi Corp
Kddi株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kddi株式会社, Kddi Corp, Kddi株式会社 filed Critical Kddi株式会社
Priority to JP2017197257A priority Critical patent/JP6454919B2/en
Publication of JP2018026866A publication Critical patent/JP2018026866A/en
Application granted granted Critical
Publication of JP6454919B2 publication Critical patent/JP6454919B2/en
Application status is Active legal-status Critical
Anticipated expiration legal-status Critical

Links

Images

Abstract

An object of the present invention is to improve the reliability of an in-vehicle computer such as an ECU mounted on a vehicle such as an automobile. A server device generates a second key stored in an in-vehicle computer, calculates an expected value of application data applied to the in-vehicle computer using the second key, and applies the application data and the expected value. To the vehicle. The in-vehicle computer calculates the measured value of the application data received from the server device using the second key, verifies the measured value based on the expected value received from the server device, and obtains the verification result of the measured value. Send to server device. The server device receives the verification result of the measurement value of the application data from the vehicle. [Selection] Figure 14

Description

  The present invention relates to a management system, a data providing device, an in-vehicle computer, a management method, and a computer program.

  2. Description of the Related Art Conventionally, an automobile has an ECU (Electronic Control Unit), and functions such as engine control are realized by the ECU. The ECU is a kind of computer and realizes a desired function by a computer program. For example, Non-Patent Document 1 discloses a security technique for an in-vehicle control system configured by connecting a plurality of ECUs to a CAN (Controller Area Network).

Keisuke Takemori, "Protection of in-vehicle control systems based on secure elements: Organizing and considering element technologies", IEICE, IEICE Technical Report, vol. 114, no. 508, pp. 73-78, 2015 March Japanese Industrial Standard, JIS D4901, "Vehicle Identification Number (VIN)" STMicroelectronics, "AN4240 Application note", [Search June 28, 2016], Internet <URL: http://www.st.com/web/en/resource/technical/document/application_note/DM00075575.pdf>

  One problem is to improve the reliability of an ECU applied to an in-vehicle control system of an automobile.

  The present invention has been made in consideration of such circumstances, and a management system, a data providing apparatus, an in-vehicle computer, It is an object to provide a management method and a computer program.

  One aspect of the present invention includes a data providing device and an in-vehicle computer mounted on a vehicle, and the data providing device includes a vehicle interface for transmitting and receiving data to and from the vehicle, and a first stored in the in-vehicle computer. A key generation unit that generates a key and a second key, an expected value calculation unit that calculates an expected value of application data to be applied to the in-vehicle computer using the second key, and the in-vehicle computer The first key is encrypted with the stored initial key to generate first encrypted data, and the second key is encrypted with the first key to generate second encrypted data. An encryption processing unit that encrypts the expected value with the first key to generate fourth encrypted data, the application data, the first encrypted data, and the second encrypted data. And the fourth encryption Data is transmitted to the vehicle via the vehicle interface, the verification result of the measurement value of the application data is received from the vehicle via the vehicle interface, and the in-vehicle computer transmits / receives data to / from an external device of the in-vehicle computer. The first encryption data received from the data providing device by the interface unit and the interface unit is decrypted by the initial key stored in advance by the in-vehicle computer, and the first key is obtained by the interface unit. The second encrypted data received from the data providing device is decrypted with the obtained first key to obtain a second key, and the fourth encrypted data received from the data providing device by the interface unit is obtained. An encryption processing unit that obtains an expected value by decrypting with the obtained first key, and an interface unit A measurement unit that calculates a measurement value of the application data received from the data providing device using the acquired second key, and verifies the measurement value based on the acquired expected value; and In the management system, the verification result of the measurement value is transmitted to the data providing apparatus by the interface unit.

  One aspect of the present invention is a vehicle interface that transmits and receives data to and from a vehicle, a key generation unit that generates a first key and a second key stored in an in-vehicle computer mounted on the vehicle, and the second An expected value calculation unit that calculates an expected value of application data applied to the in-vehicle computer using a key, and the first key is encrypted by an initial key stored in advance in the in-vehicle computer. Encrypted data is generated, the second key is encrypted with the first key to generate second encrypted data, the expected value is encrypted with the first key, and a fourth cipher is generated. An encryption processing unit for generating encrypted data, and transmitting the application data, the first encrypted data, the second encrypted data, and the fourth encrypted data to the vehicle through the vehicle interface. Of the applicable data The verification result of the value received from the vehicle by the vehicle interface, the data providing apparatus.

  According to one aspect of the present invention, in an in-vehicle computer mounted on a vehicle, an interface unit that transmits / receives data to / from an external device of the in-vehicle computer, and the first encrypted data received from the data providing device by the interface unit The in-vehicle computer decrypts with the initial key stored in advance to obtain the first key, and the interface unit decrypts the second encrypted data received from the data providing device with the obtained first key. An encryption processing unit for obtaining a second key, decrypting the fourth encrypted data received from the data providing apparatus by the interface unit using the obtained first key, and obtaining an expected value; and the interface The measured value of the applied data received from the data providing device by the unit using the acquired second key, and the acquired period And a measuring unit for verifying the measured value based on the value, and transmits the verification result of the measured value to the data providing device by said interface unit, an in-vehicle computer.

  One aspect of the present invention is a management method of a management system including a data providing device and an in-vehicle computer mounted on a vehicle, wherein the data providing device includes a first key and a first key stored in the in-vehicle computer. A key generation step of generating a key of 2, an expected value calculation step in which the data providing device calculates an expected value of application data applied to the in-vehicle computer using the second key, and the data The providing device generates the first encrypted data by encrypting the first key with the initial key stored in advance in the in-vehicle computer, and encrypts the second key with the first key. An encryption processing step of generating second encrypted data, encrypting the expected value with the first key to generate fourth encrypted data, and the data providing device sends and receives data to and from the vehicle. A step of transmitting the application data, the first encrypted data, the second encrypted data, and the fourth encrypted data to the vehicle by a vehicle interface, and the in-vehicle computer comprising: The first encryption data received from the data providing device is decrypted with the initial key stored in advance in the in-vehicle computer by the interface unit that transmits / receives data to / from an external device to obtain the first key, and the interface The second encrypted data received from the data providing device by the unit is decrypted with the obtained first key to obtain a second key, and the fourth encryption received from the data providing device by the interface unit A cryptographic processing step of decrypting the encrypted data with the acquired first key to acquire an expected value; and A measurement step of calculating a measurement value of application data received from the data providing device by the interface unit using the acquired second key, and verifying the measurement value based on the acquired expected value; The in-vehicle computer transmits the measurement result verification result to the data providing device by the interface unit, and the data providing device receives the measurement value verification result of the application data from the vehicle by the vehicle interface. And a step of managing.

  According to one aspect of the present invention, in a computer of a data providing apparatus including a vehicle interface for transmitting and receiving data to and from a vehicle, a key generation function for generating a first key and a second key stored in the in-vehicle computer, The first key is encrypted with an expected value calculation function for calculating an expected value of application data applied to the in-vehicle computer using an key 2 and an initial key stored in advance in the in-vehicle computer. Generating first encrypted data, encrypting the second key with the first key to generate second encrypted data, encrypting the expected value with the first key, and The application data, the first encrypted data, the second encrypted data, and the fourth encrypted data are transmitted to the vehicle by the encryption processing function for generating the encrypted data of the vehicle and the vehicle interface. A transmission function that, by the vehicle interface is a computer program for implementing the, a receiving function for receiving a verification result of the measurement value of the applied data from the vehicle.

  According to one aspect of the present invention, the in-vehicle computer stores in advance the first encrypted data received from the data providing device by the interface unit that transmits / receives data to / from an external device of the in-vehicle computer. The first key is obtained by decrypting with the initial key, and the second encrypted data received from the data providing device by the interface unit is decrypted with the obtained first key. And obtaining the expected value by decrypting the fourth encrypted data received from the data providing device by the interface unit with the obtained first key, and providing the data by the interface unit. Calculate the measured value of the application data received from the device using the acquired second key and verify the measured value based on the acquired expected value A measurement function that is a computer program for realizing a transmitting function of transmitting the data providing device by said interface unit the verification result of the measured value.

  According to the present invention, it is possible to improve the reliability of an in-vehicle computer such as an ECU mounted on a vehicle such as an automobile.

1 is a diagram illustrating a configuration example of a management system and an automobile 1001 according to an embodiment. It is a figure which shows the structural example of the key generation apparatus 1300 which concerns on one Embodiment. It is a figure which shows the structural example of 1st ECU1010 which concerns on one Embodiment. It is a figure which shows the structural example of 2nd ECU1020 which concerns on one Embodiment. It is a sequence diagram of Example 1 of the management method according to an embodiment. It is a sequence diagram of example 2 of the management method concerning one embodiment. It is a sequence diagram of Example 3 of the management method according to an embodiment. It is a sequence diagram of Example 4 of the management method according to an embodiment. It is a sequence diagram of Example 5 of the management method according to an embodiment. It is a sequence diagram of Example 6 of the management method according to an embodiment. It is a figure which shows the management system which concerns on one Embodiment, and the other structural example of the motor vehicle. It is a figure which shows the other structural example of the management system which concerns on one Embodiment. It is a figure which shows the structural example of the server apparatus 2000 which concerns on one Embodiment. It is a sequence chart which shows the example of the provision procedure of ECU code which concerns on one Embodiment.

  Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiment, a vehicle will be described as an example of a vehicle.

  FIG. 1 is a diagram illustrating a configuration example of a management system and an automobile 1001 according to the present embodiment. In the present embodiment, an ECU (electronic control device) mounted on the automobile 1001 will be described as an example of the in-vehicle computer.

  In FIG. 1, an automobile 1001 includes a first ECU 1010 and a plurality of second ECUs 1020. The first ECU 1010 and the second ECU 1020 are in-vehicle computers provided in the automobile 1001. First ECU 1010 is an ECU having a gateway function among ECUs mounted on automobile 1001. The second ECU 1020 is an ECU having functions such as engine control among ECUs mounted on the automobile 1001. Examples of the second ECU 1020 include an ECU having an engine control function, an ECU having a handle control function, and an ECU having a brake control function.

  The first ECU 1010 and the plurality of second ECUs 1020 are connected to a CAN (Controller Area Network) 1030 provided in the automobile 1001. CAN 1030 is a communication network. CAN is known as one of communication networks mounted on vehicles.

  First ECU 1010 exchanges data with each second ECU 1020 via CAN 1030. Second ECU 1020 exchanges data with other second ECU 1020 via CAN 1030.

  In addition, as a communication network mounted on the vehicle, a communication network other than CAN is provided in the automobile 1001, and exchange of data between the first ECU 1010 and the second ECU 1020 via the communication network other than CAN, and Data exchange between the second ECUs 1020 may be performed. For example, the automobile 1001 may include a LIN (Local Interconnect Network). In addition, the automobile 1001 may include CAN and LIN. In addition, the automobile 1001 may include a second ECU 1020 connected to the LIN. The first ECU 1010 may be connected to CAN and LIN. Further, the first ECU 1010 exchanges data with the second ECU 1020 connected to the CAN via the CAN, and also exchanges data with the second ECU 1020 connected to the LIN via the LIN. You may exchange data with. Further, the second ECUs 1020 may exchange data via the LIN.

  The automobile 1001 includes a diagnostic port 1060. As the diagnostic port 1060, for example, an OBD (On-board Diagnostics) port may be used. A device outside the automobile 1001 can be connected to the diagnostic port 1060. Examples of devices external to the automobile 1001 that can be connected to the diagnostic port 1060 include a diagnostic terminal and a key generation device 1300 shown in FIG. Diagnostic port 1060 is connected to first ECU 1010. The first ECU 1010 and a device connected to the diagnostic port 1060, for example, the key generation device 1300 exchange data via the diagnostic port 1060.

  The automobile 1001 includes an infotainment device 1040. Examples of the infotainment device 1040 include a navigation function, a location information service function, a multimedia playback function such as music and video, a voice communication function, a data communication function, and an Internet connection function. The infotainment device 1040 is connected to the first ECU 1010. The first ECU 1010 transmits information input from the infotainment device 1040 to the second ECU 1020.

  The automobile 1001 includes a TCU (Tele Communication Unit) 1050. The TCU 1050 is a communication device. The TCU 1050 includes a communication module 1051. The communication module 1051 performs wireless communication using a wireless communication network. The communication module 1051 includes a SIM (Subscriber Identity Module) 1052. The SIM 1052 is a SIM in which information for using the wireless communication network is written. The communication module 1051 can use the SIM 1052 to connect to the wireless communication network and perform wireless communication. Note that an eSIM (Embedded Subscriber Identity Module) may be used as the SIM 1052.

  The TCU 1050 is connected to the first ECU 1010. The first ECU 1010 exchanges data with the communication module 1051 of the TCU 1050.

  In the configuration of FIG. 1, data is exchanged between the first ECU 1010 and the communication module 1051 by directly connecting the first ECU 1010 and the TCU 1050, but the present invention is not limited to this. For example, the TCU 1050 may be connected to the infotainment device 1040, and the first ECU 1010 may exchange data with the communication module 1051 of the TCU 1050 via the infotainment device 1040. Alternatively, the TCU 1050 may be connected to the diagnostic port 1060, and the first ECU 1010 may exchange data with the communication module 1051 of the TCU 1050 connected to the diagnostic port 1060 via the diagnostic port 1060. Alternatively, the first ECU 1010 may include a communication module 1051 including a SIM 1052. When the first ECU 1010 includes the communication module 1051 including the SIM 1052, the automobile 1001 may not include the TCU 1050.

  The first ECU 1010 includes a main computing unit 1011 and an HSM (Hardware Security Module) 1012. The main arithmetic unit 1011 executes a computer program for realizing the function of the first ECU 1010. The HSM 1012 has a cryptographic processing function and the like. HSM 1012 has tamper resistance. The HSM 1012 is an example of a secure element (Secure Element: SE). The HSM 1012 includes a storage unit 1013 that stores data such as keys. The main arithmetic unit 1011 uses an HSM 1012.

  The second ECU 1020 includes a main computing unit 1021 and a SHE (Secure Hardware Extension) 1022. The main computing unit 1021 executes a computer program for realizing the function of the second ECU 1020. The SHE 1022 has a cryptographic processing function and the like. SHE1022 has tamper resistance. SHE1022 is an example of a secure element. The SHE 1022 includes a storage unit 1023 that stores data such as keys. The main computing unit 1021 uses SHE1022.

  An in-vehicle computer system 1002 provided in the automobile 1001 is configured by connecting a first ECU 1010 and a plurality of second ECUs 1020 to a CAN 1030. The first ECU 1010 has a gateway function and monitors communication between the inside and the outside of the in-vehicle computer system 1002. In the present embodiment, the in-vehicle computer system 1002 functions as an in-vehicle control system for the automobile 1001. The first ECU 1010 may be configured not to have a gateway function.

  In the following description, when the first ECU 1010 and the second ECU 1020 are not particularly distinguished, they are simply referred to as an ECU.

  FIG. 2 is a diagram illustrating a configuration example of the key generation device 1300. In FIG. 2, the key generation device 1300 includes a vehicle interface 11, a storage unit 12, an expected value calculation unit 13, a verification unit 14, a key generation unit 15, and a cryptographic processing unit 16.

  The vehicle interface 11 is an interface that transmits and receives data to and from the automobile 1001. In the present embodiment, the vehicle interface 11 is connected to the diagnostic port 1060 and transmits / receives data via the diagnostic port 1060. The vehicle interface 11 may include an interface other than the diagnostic port 1060 interface. For example, the vehicle interface 11 may include a communication module and perform wireless communication with the communication module 1051 of the automobile 1001. Further, for example, the vehicle interface 11 may be provided with a CAN interface, connected to the CAN 1030 of the automobile 1001, and data may be transmitted / received via the CAN 1030.

  The storage unit 12 stores data such as keys. The expected value calculation unit 13 calculates an expected value of data stored in advance by the ECU. An example of data stored in advance by the ECU is an ECU code. The ECU code is an example of data applied to the ECU. The ECU code may be a computer program such as an initial program installed in advance in the ECU, or may be setting data such as an initial parameter setting value preset in the ECU.

  The verification unit 14 performs processing related to verification of measurement values of the ECU. For example, the verification unit 14 verifies the measurement value of the ECU based on the expected value calculated by the expected value calculation unit 13. The key generation unit 15 generates a key for the ECU. The encryption processing unit 16 encrypts data and decrypts encrypted data.

  The function of the key generation device 1300 is realized when a CPU (Central Processing Unit) included in the key generation device 1300 executes a computer program. The key generation device 1300 may be configured using a general-purpose computer device or may be configured as a dedicated hardware device.

  FIG. 3 is a diagram illustrating a configuration example of the first ECU 1010. In FIG. 3, the first ECU 1010 includes a main computing unit 1011, an HSM 1012, and an interface unit 20. The main computing unit 1011 includes a control unit 21 and a storage unit 22. The HSM 1012 includes a storage unit 1013, a measurement value calculation unit 31, an encryption processing unit 32, a measurement unit 33, and a key generation unit 34.

  The interface unit 20 transmits / receives data to / from an external device of the first ECU 1010 itself. The interface unit 20 includes an interface for transmitting / receiving data via the CAN 1030, an interface for transmitting / receiving data to / from the infotainment device 1040, an interface for transmitting / receiving data to / from the TCU 1050, and an interface for transmitting / receiving data via the diagnostic port 1060. Prepare. The main computing unit 1011 transmits / receives data to / from devices other than the first ECU 1010 via the interface unit 20.

  The control unit 21 controls the first ECU 1010. The storage unit 22 stores data. The storage unit 1013 stores data such as keys. The measurement value calculation unit 31 calculates a measurement value of data such as an ECU code. The encryption processing unit 32 encrypts data and decrypts encrypted data. The measurement unit 33 calculates a measured value of data such as an ECU code and verifies the measured value based on an expected value. The key generation unit 34 generates a key used in the automobile 1001 (hereinafter referred to as an in-vehicle key).

  FIG. 4 is a diagram illustrating a configuration example of the second ECU 1020. In FIG. 4, the second ECU 1020 includes a main computing unit 1021, a SHE 1022, and an interface unit 40. The main computing unit 1021 includes a control unit 41 and a storage unit 42. The SHE 1022 includes a storage unit 1023, a measurement value calculation unit 51, an encryption processing unit 52, and a measurement unit 53.

  The interface unit 40 transmits / receives data to / from a device external to the second ECU 1020 itself. The interface unit 40 includes an interface that transmits and receives data via the CAN 1030. The main computing unit 1021 transmits and receives data to and from devices other than the second ECU 1020 through the interface unit 40.

  The control unit 41 controls the second ECU 1020. The storage unit 42 stores data. The storage unit 1023 stores data such as keys. The measurement value calculation unit 51 calculates a measurement value of data such as an ECU code. The encryption processing unit 52 encrypts data and decrypts encrypted data. The measurement unit 53 calculates a measurement value of data such as an ECU code, and verifies the measurement value based on an expected value.

  In the present embodiment, the HSM is used for the first ECU 1010. However, the SHE may be used instead of the HSM in the first ECU 1010. In addition, about SHE, it describes in the nonpatent literature 3, for example.

[Configuration example of ECU identifier]
Configuration example 1 and configuration example 1 of the ECU identifier according to this embodiment will be described. The ECU identifier is information for identifying the ECU.

<Configuration Example 1 of ECU Identifier>
In the configuration example 1 of the ECU identifier, the bit length of the ECU identifier is set to 64 bits or less. An example of the breakdown of the ECU identifier bits is shown below.
-ECU vendor identifier: 16 bits-ECU model identifier: 16 bits-Serial number: 32 bits

<Configuration Example 2 of ECU Identifier>
In the configuration example 2 of the ECU identifier, the bit length of the ECU identifier is set to 128 bits or less. Examples 1, 2, and 3 of the breakdown of the ECU identifier bits are shown below.
(Example 1)
-Vehicle Identification Number (VIN): 102 bits (17 digits of alphanumeric characters, 1 character is 6 bits)
CAN identifier: 11 bits The 11 bits of the CAN identifier is a CAN identifier stored in an ID field having an 11-bit length in a data frame in a CAN standard format. Alternatively, the 11 bits of the CAN identifier is a CAN identifier stored in a base ID field having an 11-bit length in a data frame in the CAN extended format. The vehicle identification number (VIN) is described in Non-Patent Document 2, for example.

(Example 2)
-The remaining part of the vehicle identification number (VIN) other than the manufacturer identification code (WMI: World Manufacturer Identifier): 84 bits (14 alphanumeric characters, 6 characters)
CAN identifier: 29 bits The 29 bits of the CAN identifier are a CAN identifier portion “11 bits” stored in a base ID field of 11 bits length in a data frame of the CAN extension format, and an extension ID (Extend of 18 bits length). It is the sum of the CAN identifier part “18 bits” stored in the (ID) field.

(Example 3)
-SHE identifier (UID): 120 bits In this example 3, the SHE UID provided in the ECU is used as the ECU identifier of the ECU.

  The vehicle identification number (VIN), the CAN identifier, and the SHE UID are acquired in advance, for example, at the manufacturing factory of the automobile 1001.

[Example of management method]
Next, an example of a management method according to the present embodiment will be described.

<Example 1 of management method>
FIG. 5 is a sequence diagram of Example 1 of the management method according to the present embodiment. An example 1 of the management method according to the present embodiment will be described with reference to FIG. The key generation device 1300 is provided, for example, in a manufacturing factory for the automobile 1001. The vehicle interface 11 of the key generation device 1300 is connected to the diagnostic port 1060 of the automobile 1001 being manufactured at the manufacturing factory.

  FIG. 5 shows only one second ECU (1) 1020 out of the second ECU (n) 1020 mounted on the automobile 1001 for convenience of explanation. However, n is an integer from 1 to N. N is the number of second ECUs 1020 targeted for key distribution among the second ECUs 1020 mounted on the automobile 1001.

  The key generation device 1300 stores a master key Master_Secret, an ECU code of the ECU, and an initial root key Kri in the storage unit 12 in advance. The ECU code of the ECU includes an initial ECU code of the ECU.

  The HSM 1012 of the first ECU 1010 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1013 in advance. The initial root key Kri and the initial signature key Kbi are written in the HSM 1012 when the first ECU 1010 is manufactured, for example. The SHE 1022 of the second ECU 1020 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1023 in advance. The initial root key Kri and the initial signature key Kbi are written in the SHE 1022 when the second ECU 1020 is manufactured, for example. The initial root key Kri and the initial signature key Kbi are keys stored in a new ECU.

  The main arithmetic unit 1011 of the first ECU 1010 stores the initial ECU code Eci in the storage unit 22 in advance. The initial ECU code Eci is written in the main computing unit 1011 when the first ECU 1010 is manufactured, for example. The initial ECU code Eci is an ECU code stored in the new first ECU 1010. The main arithmetic unit 1021 of the second ECU (n) 1020 stores the initial ECU code Eni in the storage unit 42 in advance. The initial ECU code Eni is written in the main computing unit 1021 when the second ECU (n) 1020 is manufactured, for example. The initial ECU code Eni is an ECU code stored in the new second ECU (n) 1020.

  Hereinafter, the vehicle interface 11 of the key generation device 1300 and the diagnosis port 1060 of the automobile 1001 are connected.

(Step S <b> 1) In the key generation device 1300, the key generation unit 15 generates a root key and a signature key for the ECU mounted on the automobile 1001. In the present embodiment, the key generation unit 15 generates the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. . The storage unit 12 stores the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. Root keys Krc and Krn correspond to the first key. The signature keys Kbc and Kbn correspond to the second key.

  The key generation unit 15 calculates a first digest value from the master key Master_Secret stored in the storage unit 12 of the key generation device 1300 and the ECU identifier ECU_ID of the first ECU 1010. The first digest value is the root key Krc of the first ECU 1010. The key generation unit 15 calculates a second digest value from the master key Master_Secret stored in the storage unit 12 of the key generation device 1300 and the ECU identifier ECU_ID of the first ECU 1010. The second digest value is the signature key Kbc of the first ECU 1010. The calculation method of the first digest value is different from the calculation method of the second digest value. Therefore, the first digest value (Root key Krc of the first ECU 1010) is different from the second digest value (signature key Kbc of the first ECU 1010).

  The key generation unit 15 calculates the first digest value from the master key Master_Secret stored in the storage unit 12 of the key generation device 1300 and the ECU identifier ECU_ID of the second ECU (n) 1020. The first digest value is the root key Krn of the second ECU (n) 1020. The key generation unit 15 calculates a second digest value from the master key Master_Secret stored in the storage unit 12 of the key generation device 1300 and the ECU identifier ECU_ID of the second ECU (n) 1020. The second digest value is the signature key Kbn of the second ECU (n) 1020. The calculation method of the first digest value is different from the calculation method of the second digest value. Therefore, the first digest value (root key Krn of the second ECU (n) 1020) and the second digest value (signature key Kbn of the second ECU (n) 1020) are different.

  The ECU identifier ECU_ID of the ECU of the automobile 1001 is generated by any one of the above-described configuration examples of the ECU identifier. The key generation device 1300 may generate the ECU identifier ECU_ID of the ECU of the automobile 1001, or the ECU identifier ECU_ID of the ECU of the automobile 1001 may be input to the key generation device 1300.

  Examples of the digest value include a value calculated by a hash function and a value calculated by an exclusive OR operation.

An example of a key (common key) generation method according to this embodiment is shown in the following equation.
Common key = digest (Master_Secret, ECU_ID, Nk)
Nk is a variable. The digest (Master_Secret, ECU_ID, Nk) is a digest value generated from the master key Master_Secret, the ECU identifier ECU_ID, and the variable Nk. For example, the common key is a hash function value calculated using a master key Master_Secret, an ECU identifier ECU_ID, and a variable Nk as input values. If the value of the variable Nk is different, the digest value calculation method is different. By changing the value of the variable Nk, different common keys can be generated from the same master key Master_Secret and ECU identifier ECU_ID. For example, the value of the root key variable Nk is Nk_1, and the value of the signature key variable Nk is Nk_2. In this case, using the same master key Master_Secret and ECU identifier ECU_ID,
Root key = Digest (Master_Secret, ECU_ID, Nk_1),
Signature key = Digest (Master_Secret, ECU_ID, Nk_2),
Thus, the Root key and the signature key can be generated as different keys.

  As another example of the key (common key) generation method according to this embodiment, the root key of the ECU may be a value calculated by a hash function, and the signature key may be a value calculated by an exclusive OR operation. Or, the reverse, that is, the Root key of the ECU may be a value calculated by an exclusive OR operation, and the signature key may be a value calculated by a hash function.

(Step S2) The encryption processing unit 16 of the key generation device 1300 encrypts the Root key Krc of the first ECU 1010 with the initial Root key Kri to generate the first encrypted data Kri (Krc). The key generation device 1300 transmits the first encrypted data Kri (Krc) to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. The first ECU 1010 of the automobile 1001 receives the first encrypted data Kri (Krc) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20.

(Step S3) The control unit 21 of the first ECU 1010 passes the first encrypted data Kri (Krc) to the HSM 1012. The encryption processing unit 32 of the HSM 1012 decrypts the first encrypted data Kri (Krc) using the initial root key Kri stored in the storage unit 1013, and acquires the root key Krc. The HSM 1012 stores the acquired root key Krc in the storage unit 1013. The HSM 1012 may store the acquired root key Krc in the storage unit 1013 instead of the initial root key Kri.

(Step S4) The encryption processing unit 16 of the key generation device 1300 generates the second encrypted data Krc (Kbc) by encrypting the signature key Kbc of the first ECU 1010 with the Root key Krc of the first ECU 1010. The key generation device 1300 transmits the second encrypted data Krc (Kbc) to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. The first ECU 1010 of the automobile 1001 receives the second encrypted data Krc (Kbc) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20.

(Step S5) The control unit 21 of the first ECU 1010 passes the second encrypted data Krc (Kbc) to the HSM 1012. The encryption processing unit 32 of the HSM 1012 acquires the signature key Kbc by decrypting the second encrypted data Krc (Kbc) with the Root key Krc stored in the storage unit 1013. The HSM 1012 stores the acquired signature key Kbc in the storage unit 1013. The HSM 1012 may store the acquired signature key Kbc in the storage unit 1013 instead of the initial signature key Kbi.

(Step S6) The control unit 21 of the first ECU 1010 passes the initial ECU code Eci stored in the storage unit 22 to the HSM 1012 to execute the secure boot process. In the secure boot process, the measurement value calculation unit 31 of the HSM 1012 calculates the measurement value of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. In the present embodiment, CMAC (Cipher-based Message Authentication Code) is used as an example of the measurement value. Therefore, the measurement value calculation unit 31 calculates the CMAC of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. The CMAC resulting from this calculation is referred to as a measured value Ecn_a. The HSM 1012 sets the measurement value Ecn_a to an expected value used in the secure boot process. The expected value “measured value Ecn_a” is stored in the storage unit 1013.

(Step S7) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the measurement value Ecn_a with the Root key Krc stored in the storage unit 1013 to generate third encrypted data Krc (Ecn_a). The HSM 1012 passes the third encrypted data Krc (Ecn_a) to the control unit 21. The control unit 21 uses the interface unit 20 to transmit the third encrypted data Krc (Ecn_a) to the key generation device 1300 via the diagnostic port 1060. The key generation device 1300 receives the third encrypted data Krc (Ecn_a) from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.

(Step S8) The cryptographic processing unit 16 of the key generation device 1300 decrypts the third encrypted data Krc (Ecn_a) with the Root key Krc of the first ECU 1010 to obtain the measured value Ecn_a. The expected value calculation unit 13 calculates the CMAC of the initial ECU code Eci of the first ECU 1010 using the signature key Kbc of the first ECU 1010. This calculated CMAC is referred to as an expected value Ecn_b.
Note that the first ECU 1010 may transmit the measurement value Ecn_a to the key generation device 1300 as it is without encrypting it.

  The verification unit 14 compares the measured value Ecn_a and the expected value Ecn_b, and determines whether or not they match. As a result of the determination, if both coincide, the verification of the measured value Ecn_a is acceptable. If the verification of the measurement value Ecn_a is acceptable, the process proceeds to step S9. On the other hand, when the two do not match, the verification of the measurement value Ecn_a fails. If the verification of the measurement value Ecn_a fails, the process of FIG. If the verification of the measurement value Ecn_a fails, the key generation device 1300 may execute a predetermined error process.

(Step S9) The key generation unit 34 of the HSM 1012 of the first ECU 1010 generates the in-vehicle key Kv. The storage unit 1013 stores the in-vehicle key Kv.

(Step S10) The encryption processing unit 16 of the key generation device 1300 encrypts the root key Kr1 of the second ECU (1) 1020 with the initial root key Kri to generate first encrypted data Kri (Kr1). The key generation device 1300 transmits the first encrypted data Kri (Kr1) by the vehicle interface 11 to the second ECU (1) 1020 via the first ECU 1010 of the automobile 1001. When the first ECU 1010 of the automobile 1001 receives the first encrypted data Kri (Kr1) from the key generation device 1300 via the diagnosis port 1060 by the interface unit 20, the first ECU 1010 receives the first encrypted data Kri (Kr1). ) Is transferred to the second ECU (1) 1020 via the CAN 1030 by the interface unit 20. The second ECU (1) 1020 receives the first encrypted data Kri (Kr1) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S11) The control unit 41 of the second ECU (1) 1020 passes the first encrypted data Kri (Kr1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the first encrypted data Kri (Kr1) with the initial root key Kri stored in the storage unit 1023, and acquires the root key Kr1. The SHE 1022 stores the acquired root key Kr1 in the storage unit 1023. The SHE 1022 may store the acquired root key Kr1 in the storage unit 1023 in place of the initial root key Kri.

(Step S12) The encryption processing unit 16 of the key generation device 1300 encrypts the signature key Kb1 of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, and the second encrypted data. Kr1 (Kb1) is generated. The key generation device 1300 transmits the second encrypted data Kr1 (Kb1) via the vehicle interface 11 to the second ECU (1) 1020 via the first ECU 1010 of the automobile 1001. When the first ECU 1010 of the automobile 1001 receives the second encrypted data Kr1 (Kb1) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20, the first ECU 1010 receives the second encrypted data Kr1 (Kb1). ) Is transferred to the second ECU (1) 1020 via the CAN 1030 by the interface unit 20. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S13) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) with the Root key Kr1 stored in the storage unit 1023, and acquires the signature key Kb1. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi.

(Step S14) The control unit 41 of the second ECU (1) 1020 passes the initial ECU code E1i stored in the storage unit 42 to the SHE 1022, and executes secure boot processing. In the secure boot process, the measurement value calculation unit 51 of the SHE 1022 calculates the measurement value of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. In this embodiment, CMAC is used as an example of the measurement value. Therefore, the measurement value calculation unit 51 calculates the CMAC of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. The CMAC resulting from this calculation is referred to as a measured value E1n_a. The SHE 1022 sets the measurement value E1n_a to an expected value used in the secure boot process. The expected value “measured value E1n_a” is stored in the storage unit 1023.

(Step S15) The encryption processing unit 52 of the SHE 1022 of the second ECU (1) 1020 encrypts the measured value E1n_a with the Root key Kr1 stored in the storage unit 1023, and third encrypted data Kr1 (E1n_a) Is generated. The SHE 1022 passes the third encrypted data Kr1 (E1n_a) to the control unit 41. The control unit 41 uses the interface unit 40 to transmit the third encrypted data Kr1 (E1n_a) to the key generation device 1300 via the CAN 1030 and the first ECU 1010. When the first ECU 1010 receives the third encrypted data Kr1 (E1n_a) from the second ECU (1) 1020 via the CAN 1030, the first ECU 1010 receives the third encrypted data Kr1 (E1n_a). Is transferred to the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The key generation device 1300 receives the third encrypted data Kr1 (E1n_a) from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.

(Step S16) The encryption processing unit 16 of the key generation device 1300 decrypts the third encrypted data Kr1 (E1n_a) with the Root key Kr1 of the second ECU (1) 1020 to obtain the measured value E1n_a. The expected value calculation unit 13 calculates the CMAC of the initial ECU code E1i of the second ECU (1) 1020 using the signature key Kb1 of the second ECU (1) 1020. This calculated CMAC is referred to as an expected value E1n_b.
Note that the second ECU (1) 1020 may transmit the measurement value E1n_a to the key generation apparatus 1300 as it is without encrypting the measurement value E1n_a.

  The verification unit 14 compares the measured value E1n_a and the expected value E1n_b, and determines whether or not they match. As a result of this determination, if the two coincide, the measurement value E1n_a has been verified. If the verification of the measurement value E1n_a is acceptable, the process proceeds to step S17. On the other hand, when the two do not match, the verification of the measurement value E1n_a fails. If the verification of the measurement value E1n_a fails, the process of FIG. 5 is terminated for the second ECU (1) 1020. Therefore, when the verification of the measurement value E1n_a fails, step S17 is not executed for the second ECU (1) 1020. If the verification of the measurement value E1n_a fails, the key generation device 1300 may execute a predetermined error process.

(Step S <b> 17) The key generation device 1300 transmits an in-vehicle key transmission request message to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. This in-vehicle key sending request message is a message requesting that the in-vehicle key be sent to the second ECU (1) 1020 that has passed the verification of the measurement value E1n_a. The in-vehicle key transmission request message includes the root key Kr1 of the second ECU (1) 1020. The root key Kr1 is preferably encrypted with the root key Krc of the first ECU 1010 and stored in the in-vehicle key transmission request message. The first ECU 1010 of the automobile 1001 receives an in-vehicle key sending request message from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20.

(Step S18) The control unit 21 of the first ECU 1010 passes the Root key Kr1 of the second ECU (1) 1020 included in the in-vehicle key transmission request message to the HSM 1012 and causes the in-vehicle key Kv to be encrypted. When the root key Kr1 of the second ECU (1) 1020 included in the in-vehicle key transmission request message is encrypted, the control unit 21 stores the encrypted data Krc (Kr1) of the root key Kr1. It is passed to the HSM 1012, and decrypted with the root key Krc, thereby obtaining the root key Kr1 of the second ECU (1) 1020.

  The encryption processing unit 32 of the HSM 1012 generates encrypted data Kr1 (Kv) by encrypting the in-vehicle key Kv with the root key Kr1 of the second ECU (1) 1020. The HSM 1012 passes the encrypted data Kr1 (Kv) to the control unit 21. The control unit 21 uses the interface unit 20 to transmit the encrypted data Kr1 (Kv) to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the encrypted data Kr1 (Kv) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S19) The control unit 41 of the second ECU (1) 1020 passes the encrypted data Kr1 (Kv) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the encrypted data Kr1 (Kv) with the Root key Kr1 stored in the storage unit 1023, and acquires the in-vehicle key Kv. The SHE 1022 stores the acquired in-vehicle key Kv in the storage unit 1023.

  Steps S10 to S19 are similarly executed for all second ECUs (n) 1020 mounted on the automobile 1001.

  According to Example 1 of the management method described above, the key generation device 1300 verifies the measured value of the ECU code calculated by the ECU mounted on the automobile 1001 based on the expected value. The authenticity of the ECU is checked. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved.

<Example 2 of management method>
The management method example 2 is a modification of the management method example 1 described above. FIG. 6 is a sequence diagram of the second example of the management method according to the present embodiment. In FIG. 6, parts corresponding to those in FIG. Hereinafter, with reference to FIG. 6, the difference from Example 1 of the management method described above will be mainly described.

  The vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 are connected. Steps S1 to S8 are executed. Steps S1 to S8 are the same as those in the example 1 of the management method according to FIG. 5 described above. If the verification of the measurement value Ecn_a is acceptable in step S8, the process proceeds to step S21. On the other hand, if the verification of the measurement value Ecn_a fails in step S8, the process of FIG. If the verification of the measurement value Ecn_a fails, the key generation device 1300 may execute a predetermined error process.

(Step S21) The encryption processing unit 16 of the key generation device 1300 encrypts the root key Krn and the signature key Kbn of each of the N second ECUs (n) 1020 with the root key Krc of the first ECU 1010. Turn into. By this encryption, N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN) and N pieces of second encrypted data Krc (Kb1), Krc ( Kb2),..., Krc (KbN) are generated.

  The key generation device 1300 uses the vehicle interface 11 to generate N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN) and N pieces of second encrypted data Krc. (Kb1), Krc (Kb2),..., Krc (KbN) are transmitted to the first ECU 1010 of the automobile 1001. The first ECU 1010 of the automobile 1001 uses the interface unit 20 to transmit N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc from the key generation device 1300 via the diagnostic port 1060. (KrN) and N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN) are received.

(Step S22) The control unit 21 of the first ECU 1010 includes N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN), and N second ciphers. , Krc (Kb1), Krc (Kb2),..., Krc (KbN) are passed to the HSM 1012. The encryption processing unit 32 of the HSM 1012 uses the Root key Krc stored in the storage unit 1013 to generate N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN), N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN) are decrypted respectively. By this decryption, N root keys Kr1, Kr2,..., KrN and N signature keys Kb1, Kb2,. The HSM 1012 stores the acquired N root keys Kr1, Kr2,..., KrN and the N signature keys Kb1, Kb2,.

(Step S23) The key generation unit 34 of the HSM 1012 of the first ECU 1010 generates an in-vehicle key Kv. The storage unit 1013 stores the in-vehicle key Kv.

(Step S24) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 generates the first encrypted data Kri (Kr1) by encrypting the Root key Kr1 of the second ECU (1) 1020 with the initial Root key Kri. To do. The HSM 1012 passes the first encrypted data Kri (Kr1) to the control unit 21. The control unit 21 transmits the first encrypted data Kri (Kr1) to the second ECU (1) 1020 via the CAN 1030 through the interface unit 20. The second ECU (1) 1020 receives the first encrypted data Kri (Kr1) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S25) The control unit 41 of the second ECU (1) 1020 passes the first encrypted data Kri (Kr1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the first encrypted data Kri (Kr1) with the initial root key Kri stored in the storage unit 1023, and acquires the root key Kr1. The SHE 1022 stores the acquired root key Kr1 in the storage unit 1023. The SHE 1022 may store the acquired root key Kr1 in the storage unit 1023 in place of the initial root key Kri.

(Step S26) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the signature key Kb1 of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, and the second encryption Generated data Kr1 (Kb1). The HSM 1012 passes the second encrypted data Kr1 (Kb1) to the control unit 21. The control unit 21 causes the interface unit 20 to transmit the second encrypted data Kr1 (Kb1) to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S27) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) with the Root key Kr1 stored in the storage unit 1023, and acquires the signature key Kb1. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi.

  Next, steps S14 to S19 are executed. Steps S14 to S19 are the same as in the management method example 1 according to FIG. 5 described above.

  Steps S24 to S27 and steps S14 to S19 are executed in the same manner for all second ECUs (n) 1020 mounted on the automobile 1001.

  Steps S22 to S27 are processes closed in the automobile 1001. For this reason, from step S22 to step S27, the vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 may not be connected.

  According to the management method example 2 described above, as in the management method example 1, the key generation device 1300 verifies the measured value of the ECU code calculated by the ECU mounted on the automobile 1001 based on the expected value. Thus, the authenticity of the ECU mounted on the automobile 1001 is determined. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved.

  Further, according to the management method example 2, the first ECU 1010 transmits the N pieces of first encrypted data Krc (Kr1) and Krc transmitted from the key generation device 1300 to the second ECU (n) 1020. (Kr2),..., Krc (KrN) and the N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN) (step S22, (Functions corresponding to S24 and S26). Thereby, the time for which the key generation device 1300 and the automobile 1001 are connected can be shortened compared to the management method example 1.

<Example 3 of management method>
FIG. 7 is a sequence diagram of the third example of the management method according to the present embodiment. An example 3 of the management method according to the present embodiment will be described with reference to FIG. The key generation device 1300 is provided, for example, in a manufacturing factory for the automobile 1001. The vehicle interface 11 of the key generation device 1300 is connected to the diagnostic port 1060 of the automobile 1001 being manufactured at the manufacturing factory.

  FIG. 7 shows only one second ECU (1) 1020 out of the second ECU (n) 1020 mounted on the automobile 1001 for convenience of explanation. However, n is an integer from 1 to N. N is the number of second ECUs 1020 targeted for key distribution among the second ECUs 1020 mounted on the automobile 1001.

  The key generation device 1300 stores the master key Master_Secret, the ECU's ECU code, and the initial root key Kri in the storage unit 12 in advance as in the management method example 1 shown in FIG. The ECU code of the ECU includes an initial ECU code of the ECU.

  The HSM 1012 of the first ECU 1010 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1013 in advance as in the management method example 1 according to FIG. The SHE 1022 of the second ECU 1020 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1023 in advance as in the management method example 1 shown in FIG.

  The main computing unit 1011 of the first ECU 1010 stores the initial ECU code Eci in the storage unit 22 in advance, as in the management method example 1 according to FIG. The main computing unit 1021 of the second ECU (n) 1020 stores the initial ECU code Eni in the storage unit 42 in advance, as in the management method example 1 according to FIG.

  Hereinafter, the vehicle interface 11 of the key generation device 1300 and the diagnosis port 1060 of the automobile 1001 are connected.

(Step S31) In the key generation device 1300, the key generation unit 15 generates a root key and a signature key of the ECU mounted on the automobile 1001. In the present embodiment, the key generation unit 15 generates the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. . The storage unit 12 stores the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. Root keys Krc and Krn correspond to the first key. The signature keys Kbc and Kbn correspond to the second key. The generation method of the root keys Krc and Krn and the signature keys Kbc and Kbn is the same as step S1 of the management method example 1 according to FIG.

  The expected value calculation unit 13 calculates the CMAC of the initial ECU code Eci (CGW code) of the first ECU 1010 using the signature key Kbc of the first ECU 1010. The CMAC resulting from this calculation is referred to as an expected value Ecn. The expected value calculation unit 13 calculates the CMAC of the initial ECU code Eni (ECUn code) of the second ECU (n) 1020 using the signature key Kbn of the second ECU (n) 1020. The CMAC resulting from this calculation is referred to as an expected value Enn. Thereby, the expected value Ecn for the initial ECU code Eci (CGW code) of the first ECU 1010 and the expected value E1n for the initial ECU code Eni (ECUn code) of the N second ECU (n) 1020 , E2n,..., ENn are generated by the expected value calculator 13. The storage unit 12 has an expected value Ecn for the initial ECU code Eci (CGW code) of the first ECU 1010 and each expected value for the initial ECU code Eni (ECU code) of the N second ECUs (n) 1020. Stores the values E1n, E2n,..., ENn.

  Next, step S32 and step S33 are executed. Step S32 is the same as Step S2 of Example 1 of the management method according to FIG. Step S33 is the same as step S3 of the management method example 1 according to FIG. Next, step S34 is executed.

(Step S34) The encryption processing unit 16 of the key generation device 1300 encrypts the signature key Kbc and the expected value Ecn of the first ECU 1010 with the Root key Krc of the first ECU 1010, respectively, and the second encrypted data Krc. (Kbc) and fourth encrypted data Krc (Ecn) are generated. The key generation device 1300 transmits the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. The first ECU 1010 of the automobile 1001 receives the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. .

(Step S35) The control unit 21 of the first ECU 1010 passes the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) to the HSM 1012. The encryption processing unit 32 of the HSM 1012 decrypts the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) with the Root key Krc stored in the storage unit 1013, respectively. Kbc and expected value Ecn are acquired. The HSM 1012 stores the acquired signature key Kbc in the storage unit 1013. The HSM 1012 may store the acquired signature key Kbc in the storage unit 1013 instead of the initial signature key Kbi. Also, the HSM 1012 sets the acquired expected value Ecn to an expected value used in the secure boot process.

(Step S36) The control unit 21 of the first ECU 1010 passes the initial ECU code Eci stored in the storage unit 22 to the HSM 1012 to execute the secure boot process. In the secure boot process, the measurement unit 33 of the HSM 1012 calculates the measurement value of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. In this embodiment, CMAC is used as an example of the measurement value. Therefore, the measurement unit 33 calculates the CMAC of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. The CMAC resulting from this calculation is referred to as a measured value Ecn_x.

  The measuring unit 33 compares the measured value Ecn_x with the expected value Ecn and determines whether or not they match. As a result of this determination, if both match, the verification of the measured value Ecn_x is acceptable. On the other hand, if the two do not match, the verification of the measurement value Ecn_x fails. The HSM 1012 passes the verification result “pass or fail” of the measurement value Ecn_x to the control unit 21.

(Step S <b> 37) The control unit 21 transmits the verification result “pass or fail” of the measurement value Ecn_x as the secure boot result to the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The key generation device 1300 receives the secure boot result “pass or fail” from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.
Note that the first ECU 1010 may encrypt the verification result “pass or fail” of the measurement value Ecn_x as the secure boot result with the Root key Krc and transmit it to the key generation device 1300. In this case, the key generation device 1300 receives the encrypted secure boot result “pass or fail” and decrypts it with the root key Krc of the first ECU 1010.

  If the secure boot result “pass or fail” received by the key generation device 1300 from the first ECU 1010 of the automobile 1001 is “pass”, the process proceeds to step S38. On the other hand, when the secure boot result “pass or fail” is “fail”, the process of FIG. When the secure boot result “pass or fail” is “fail”, the key generation device 1300 may execute a predetermined error process.

(Step S38) The key generation unit 34 of the HSM 1012 of the first ECU 1010 generates the in-vehicle key Kv. The storage unit 1013 stores the in-vehicle key Kv.

  Next, step S39 and step S40 are executed. Step S39 is the same as Step S10 in Example 1 of the management method according to FIG. Step S40 is the same as step S11 of the management method example 1 according to FIG. Step S41 is then executed.

(Step S41) The encryption processing unit 16 of the key generation device 1300 encrypts the signature key Kb1 and the expected value E1n of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, respectively. Second encrypted data Kr1 (Kb1) and fourth encrypted data Kr1 (E1n) are generated. The key generation device 1300 uses the vehicle interface 11 to transmit the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the second ECU (1) via the first ECU 1010 of the automobile 1001. To 1020. When the first ECU 1010 of the automobile 1001 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) are transferred by the interface unit 20 to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S42) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) with the Root key Kr1 stored in the storage unit 1023, respectively. Kb1 and expected value E1n are acquired. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi. Further, the SHE 1022 sets the acquired expected value E1n to an expected value used in the secure boot process.

(Step S43) The control unit 41 of the second ECU (1) 1020 passes the initial ECU code E1i stored in the storage unit 42 to the SHE 1022, and executes secure boot processing. In the secure boot process, the measurement unit 53 of the SHE 1022 calculates the measurement value of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. In this embodiment, CMAC is used as an example of the measurement value. Therefore, the measurement unit 53 calculates the CMAC of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. The CMAC resulting from this calculation is referred to as a measured value E1n_x.

  The measuring unit 53 compares the measured value E1n_x with the expected value E1n, and determines whether or not they match. As a result of this determination, if both match, the verification of the measured value E1n_x is acceptable. On the other hand, if the two do not match, the verification of the measured value E1n_x fails. The SHE 1022 passes the verification result “pass or fail” of the measurement value E1n_x to the control unit 41.

(Step S44) The control unit 41 transmits the verification result “pass or fail” of the measurement value E1n_x as the secure boot result to the key generation device 1300 via the first ECU 1010 via the CAN 1030. When the first ECU 1010 receives the secure boot result “pass or fail” from the second ECU (1) 1020 via the CAN 1030, the first ECU 1010 receives the secure boot result “pass or fail”. The data is transferred to the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The key generation device 1300 receives the secure boot result “pass or fail” of the second ECU (1) 1020 from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.
Note that the second ECU (1) 1020 may encrypt the verification result “pass or fail” of the measurement value E1n_x as the secure boot result with the Root key Kr1 and transmit it to the key generation device 1300. In this case, the key generation device 1300 receives the encrypted secure boot result “pass or fail” and decrypts it with the root key Kr1 of the second ECU (1) 1020.

  If the secure boot result “pass or fail” received by the key generation device 1300 from the second ECU (1) 1020 of the automobile 1001 is “pass”, the process proceeds to step S45. On the other hand, when the secure boot result “pass or fail” is unsuccessful, the process of FIG. 7 is terminated for the second ECU (1) 1020. Therefore, when the secure boot result “pass or fail” from the second ECU (1) 1020 is unsuccessful, step S45 is not executed for the second ECU (1) 1020. When the secure boot result “pass or fail” from the second ECU (1) 1020 is unsuccessful, the key generation device 1300 may execute a predetermined error process.

  Next, steps S45 to S47 are executed. Step S45 is the same as step S17 of the management method example 1 according to FIG. Step S46 is the same as step S18 of the management method example 1 according to FIG. Step S47 is the same as Step S19 in Example 1 of the management method according to FIG.

  Steps S39 to S47 are executed in the same manner for all second ECUs (n) 1020 mounted on the automobile 1001.

  According to the third example of the management method described above, the key generation device 1300 generates the expected value of the ECU code of the ECU mounted on the automobile 1001 and supplies it to the ECU. Then, the ECU verifies the measured value of its own ECU code based on the expected value supplied from the key generation device 1300, and notifies the key generation device 1300 of the verification result, so that the ECU 1001 is mounted on the automobile 1001. The authenticity of the ECU is checked. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved.

<Example 4 of management method>
The management method example 4 is a modification of the management method example 3 described above. FIG. 8 is a sequence diagram of Example 4 of the management method according to the present embodiment. In FIG. 8, parts corresponding to those in FIG. 7 are given the same reference numerals, and explanation thereof is omitted. Hereinafter, with reference to FIG. 8, the difference from Example 3 of the management method described above will be mainly described.

  The vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 are connected. Steps S31 to S38 are executed. Steps S31 to S38 are the same as those in the third example of the management method according to FIG. 7 described above. When the secure boot result “pass or fail” received by the key generation apparatus 1300 from the first ECU 1010 of the automobile 1001 is “pass”, step S51 is executed after step S38. On the other hand, when the secure boot result “pass or fail” is “fail”, the process of FIG. 8 ends. When the secure boot result “pass or fail” is “fail”, the key generation device 1300 may execute a predetermined error process.

(Step S51) The cryptographic processing unit 16 of the key generation device 1300 uses the root key Krc of the first ECU 1010 to start the root key Krn, the signature key Kbn, and the expected value Enn of each of the N second ECUs (n) 1020. Is encrypted in each. By this encryption, N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN) and N pieces of second encrypted data Krc (Kb1), Krc ( Kb2),..., Krc (KbN) and N pieces of fourth encrypted data Krc (E1n), Krc (E2n),..., Krc (ENn) are generated.

  The key generation device 1300 uses the vehicle interface 11 to generate N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN) and N pieces of second encrypted data Krc. (Kb1), Krc (Kb2),..., Krc (KbN) and N pieces of fourth encrypted data Krc (E1n), Krc (E2n),..., Krc (ENn) To the first ECU 1010. The first ECU 1010 of the automobile 1001 uses the interface unit 20 to transmit N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc from the key generation device 1300 via the diagnostic port 1060. (KrN), N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN), and N pieces of fourth encrypted data Krc (E1n), Krc ( E2n),..., Krc (ENn).

(Step S52) The control unit 21 of the first ECU 1010 includes N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN), and N pieces of second encryption data. Data Krc (Kb1), Krc (Kb2),..., Krc (KbN) and N pieces of fourth encrypted data Krc (E1n), Krc (E2n),..., Krc (ENn) To HSM1012. The encryption processing unit 32 of the HSM 1012 uses the Root key Krc stored in the storage unit 1013 to generate N pieces of first encrypted data Krc (Kr1), Krc (Kr2),..., Krc (KrN), N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN) and N pieces of fourth encrypted data Krc (E1n), Krc (E2n),. Decrypt Krc (ENn) into each. By this decryption, N root keys Kr1, Kr2,..., KrN, N signature keys Kb1, Kb2,..., KbN and N expected values E1n, E2n,. And are acquired. The HSM 1012 acquires the N root keys Kr1, Kr2,..., KrN, the N signature keys Kb1, Kb2,..., KbN, and the N expected values E1n, E2n,. , ENn are stored in the storage unit 1013.

  Next, step S53 and step S54 are executed. Step S53 is the same as step S24 of the management method example 2 according to FIG. Step S54 is the same as step S25 of the management method example 2 according to FIG. Next, step S55 is executed.

(Step S55) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the signature key Kb1 and the expected value E1n of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, respectively. To generate second encrypted data Kr1 (Kb1) and fourth encrypted data Kr1 (E1n). The HSM 1012 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the control unit 21. The control unit 21 uses the interface unit 20 to transmit the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S56) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) with the Root key Kr1 stored in the storage unit 1023, respectively. Kb1 and expected value E1n are acquired. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi. Further, the SHE 1022 sets the acquired expected value E1n to an expected value used in the secure boot process.

  Next, step S57 is executed. Step S57 is the same as step S43 of the management method example 3 according to FIG. Step S58 is then executed.

(Step S58) The control unit 41 of the second ECU (1) 1020 sends the verification result “pass or fail” of the measurement value E1n_x as the secure boot result to the first ECU 1010 via the CAN 1030 by the interface unit 40. Send. The first ECU 1010 receives the secure boot result “pass or fail” from the second ECU (1) 1020 via the CAN 1030 via the interface unit 20.

  When the secure boot result “pass or fail” received by the first ECU 1010 from the second ECU (1) 1020 is “pass”, the process proceeds to step S59. On the other hand, if the secure boot result “pass or fail” is unsuccessful, the process of FIG. 8 is terminated for the second ECU (1) 1020. Therefore, when the secure boot result “pass or fail” from the second ECU (1) 1020 is unsuccessful, step S59 is not executed for the second ECU (1) 1020. When the secure boot result “pass or fail” from the second ECU (1) 1020 is unsuccessful, the first ECU 1010 may execute a predetermined error process.

(Step S59) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the in-vehicle key Kv with the Root key Kr1 of the second ECU (1) 1020 to generate encrypted data Kr1 (Kv). The HSM 1012 passes the encrypted data Kr1 (Kv) to the control unit 21. The control unit 21 uses the interface unit 20 to transmit the encrypted data Kr1 (Kv) to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the encrypted data Kr1 (Kv) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S60) The control unit 41 of the second ECU (1) 1020 passes the encrypted data Kr1 (Kv) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the encrypted data Kr1 (Kv) with the Root key Kr1 stored in the storage unit 1023, and acquires the in-vehicle key Kv. The SHE 1022 stores the acquired in-vehicle key Kv in the storage unit 1023.

  Steps S53 to S60 are executed in the same manner for all second ECUs (n) 1020 mounted on the automobile 1001.

  Steps S53 to S60 are processes closed in the automobile 1001. For this reason, from step S53 to step S60, the vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 do not have to be connected.

  According to the management method example 4 described above, as in the management method example 3, the key generation device 1300 generates the expected value of the ECU code of the ECU mounted on the automobile 1001 and supplies the ECU to the ECU. Then, the ECU verifies the measured value of its own ECU code based on the expected value supplied from the key generation device 1300. Then, according to Example 4 of the present management method, the authentication result of the first ECU 1010 mounted on the automobile 1001 is determined by notifying the key generation device 1300 of the verification result by the first ECU 1010. Further, the verification result of the second ECU (n) 1020 is notified to the first ECU 1010, whereby the authenticity of the second ECU (n) 1020 mounted on the automobile 1001 is determined. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved. Further, when the first ECU 1010 determines the authenticity of the N second ECUs (n) 1020, the time during which the key generation device 1300 and the automobile 1001 are connected can be shortened compared to the management method example 3. .

  Also, according to the management method example 4, the first ECU 1010 transmits the N pieces of first encrypted data Krc (Kr1) and Krc transmitted from the key generation device 1300 to the second ECU (n) 1020. , Krc (KrN), N pieces of second encrypted data Krc (Kb1), Krc (Kb2),..., Krc (KbN), and N fourth ciphers .., Krc (ENn) (functions corresponding to steps S52, S53, and S55) are relayed to the data Krc (E1n), Krc (E2n),. Thereby, the time for which the key generation device 1300 and the automobile 1001 are connected can be shortened compared to the third example of the management method.

<Example 5 of management method>
FIG. 9 is a sequence diagram of Example 5 of the management method according to the present embodiment. An example 5 of the management method according to the present embodiment will be described with reference to FIG. The key generation device 1300 is provided, for example, in a manufacturing factory for the automobile 1001. The vehicle interface 11 of the key generation device 1300 is connected to the diagnostic port 1060 of the automobile 1001 being manufactured at the manufacturing factory.

  For convenience of explanation, FIG. 9 shows only one second ECU (1) 1020 out of the second ECU (n) 1020 mounted on the automobile 1001. However, n is an integer from 1 to N. N is the number of second ECUs 1020 targeted for key distribution among the second ECUs 1020 mounted on the automobile 1001.

  The key generation device 1300 stores the master key Master_Secret, the ECU's ECU code, and the initial root key Kri in the storage unit 12 in advance as in the management method example 1 shown in FIG. The ECU code of the ECU includes an initial ECU code of the ECU.

  The HSM 1012 of the first ECU 1010 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1013 in advance as in the management method example 1 according to FIG. In Example 5 of this management method, the HSM 1012 of the first ECU 1010 further stores an initial encryption key Keci in the storage unit 1013 in advance. The SHE 1022 of the second ECU 1020 stores the initial root key Kri and the initial signature key Kbi in the storage unit 1023 in advance as in the management method example 1 shown in FIG. In Example 5 of this management method, the SHE 1022 of the second ECU 1020 further stores the initial encryption key Keei in the storage unit 1023 in advance.

  The main computing unit 1011 of the first ECU 1010 stores the initial ECU code Eci in the storage unit 22 in advance, as in the management method example 1 according to FIG. The main computing unit 1021 of the second ECU (n) 1020 stores the initial ECU code Eni in the storage unit 42 in advance, as in the management method example 1 according to FIG.

  Hereinafter, the vehicle interface 11 of the key generation device 1300 and the diagnosis port 1060 of the automobile 1001 are connected.

(Step S <b> 71) In the key generation device 1300, the key generation unit 15 generates a root key and a signature key for the ECU mounted on the automobile 1001. In the present embodiment, the key generation unit 15 generates the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. . The storage unit 12 stores the root key Krc and signature key Kbc of the first ECU 1010, and the root key Krn and signature key Kbn of each of the N second ECUs (n) 1020. Root keys Krc and Krn correspond to the first key. The signature keys Kbc and Kbn correspond to the second key. The generation method of the root keys Krc and Krn and the signature keys Kbc and Kbn is the same as step S1 of the management method example 1 according to FIG.

In Example 5 of this management method, the key generation unit 15 further generates an encryption key for the ECU mounted on the automobile 1001. The encryption key is generated differently from the Root key and the signature key. For example, the value of the root key variable Nk is Nk_1, the value of the signature key variable Nk is Nk_2, and the value of the encryption key variable Nk is Nk_3. The key generation unit 15 uses the master key Master_Secret and the ECU identifier ECU_ID of the ECU,
Root key = Digest (Master_Secret, ECU_ID, Nk_1),
Signature key = Digest (Master_Secret, ECU_ID, Nk_2),
Encryption key = digest (Master_Secret, ECU_ID, Nk_3),
Thus, the Root key, the signature key, and the encryption key are generated as different keys. In addition to the above-described root key Krc and signature key Kbc of the first ECU 1010 and the root key Krn and signature key Kbn of each of the N second ECU (n) 1020, the key generation unit 15 further includes the first The encryption key Kec of one ECU 1010 and the encryption keys Ken of each of the N second ECU (n) 1020 are generated. In addition to the above-described root key Krc and signature key Kbc of the first ECU 1010 and the root key Krn and signature key Kbn of each of the N second ECU (n) 1020, the storage unit 12 further includes a first key. The encryption key Kec of the ECU 1010 and the encryption keys Ken of the N second ECU (n) 1020 are stored. The encryption keys Kec and Ken correspond to the third key.

  The expected value calculation unit 13 calculates the CMAC of the initial ECU code Eci (CGW code) of the first ECU 1010 using the signature key Kbc of the first ECU 1010. The CMAC resulting from this calculation is referred to as an expected value Ecn. The expected value calculation unit 13 calculates the CMAC of the initial ECU code Eni (ECUn code) of the second ECU (n) 1020 using the signature key Kbn of the second ECU (n) 1020. The CMAC resulting from this calculation is referred to as an expected value Enn. Thereby, the expected value Ecn for the initial ECU code Eci (CGW code) of the first ECU 1010 and the expected value E1n for the initial ECU code Eni (ECUn code) of the N second ECU (n) 1020 , E2n,..., ENn are generated by the expected value calculator 13. The storage unit 12 has an expected value Ecn for the initial ECU code Eci (CGW code) of the first ECU 1010 and each expected value for the initial ECU code Eni (ECU code) of the N second ECUs (n) 1020. Stores the values E1n, E2n,..., ENn.

  Next, Step S72 and Step S73 are executed. Step S72 is the same as step S2 of the management method example 1 according to FIG. Step S73 is the same as step S3 of the management method example 1 according to FIG. Next, step S74 is executed.

(Step S74) The encryption processing unit 16 of the key generation device 1300 encrypts the encryption key Kec of the first ECU 1010 with the Root key Krc of the first ECU 1010 to generate fifth encrypted data Krc (Kec). . The verification unit 14 generates a random number Nonce. The storage unit 12 stores the random number Nonce. The key generation device 1300 transmits the fifth encrypted data Krc (Kec) and the random number Nonce to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. The first ECU 1010 of the automobile 1001 receives the fifth encrypted data Krc (Kec) and the random number Nonce from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20.

(Step S75) The control unit 21 of the first ECU 1010 passes the fifth encrypted data Krc (Kec) to the HSM 1012. The encryption processing unit 32 of the HSM 1012 decrypts the fifth encrypted data Krc (Kec) using the Root key Krc stored in the storage unit 1013, and acquires the encryption key Kec. The HSM 1012 stores the acquired encryption key Kec in the storage unit 1013. The HSM 1012 may store the acquired encryption key Kec in the storage unit 1013 instead of the initial encryption key Keci. In the present embodiment, the encryption key Kec is set as an encryption key that can be used when the verification of the measurement value passes in the secure boot process executed by the HSM 1012. Therefore, the encryption key Kec cannot be used when the measurement value verification fails in the secure boot process executed by the HSM 1012.

  The storage unit 22 stores a random number Nonce. The storage location of the random number Nonce is a non-volatile storage area outside the measurement target of the secure boot in the storage area of the storage unit 22.

(Step S76) The encryption processing unit 16 of the key generation device 1300 encrypts the signature key Kbc and the expected value Ecn of the first ECU 1010 with the Root key Krc of the first ECU 1010, respectively, and the second encrypted data Krc. (Kbc) and fourth encrypted data Krc (Ecn) are generated. The key generation device 1300 transmits the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) to the first ECU 1010 of the automobile 1001 through the vehicle interface 11. The first ECU 1010 of the automobile 1001 receives the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. .

(Step S77) The control unit 21 of the first ECU 1010 passes the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) to the HSM 1012. The encryption processing unit 32 of the HSM 1012 decrypts the second encrypted data Krc (Kbc) and the fourth encrypted data Krc (Ecn) with the Root key Krc stored in the storage unit 1013, respectively. Kbc and expected value Ecn are acquired. The HSM 1012 stores the acquired signature key Kbc in the storage unit 1013. The HSM 1012 may store the acquired signature key Kbc in the storage unit 1013 instead of the initial signature key Kbi. Also, the HSM 1012 sets the acquired expected value Ecn to an expected value used in the secure boot process.

(Step S78) The control unit 21 of the first ECU 1010 passes the initial ECU code Eci stored in the storage unit 22 to the HSM 1012 to execute the secure boot process. In the secure boot process, the measurement unit 33 of the HSM 1012 calculates the measurement value of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. In this embodiment, CMAC is used as an example of the measurement value. Therefore, the measurement unit 33 calculates the CMAC of the initial ECU code Eci using the signature key Kbc stored in the storage unit 1013. The CMAC resulting from this calculation is referred to as a measured value Ecn_x.

  The measuring unit 33 compares the measured value Ecn_x with the expected value Ecn and determines whether or not they match. As a result of this determination, if both match, the verification of the measured value Ecn_x is acceptable. If the verification of the measurement value Ecn_x passes, the encryption key Kec can be used. On the other hand, if the two do not match, the verification of the measurement value Ecn_x fails. If the verification of the measurement value Ecn_x fails, the encryption key Kec cannot be used. The HSM 1012 passes the verification result “pass or fail” of the measurement value Ecn_x to the control unit 21.

(Step S79) When the verification result of the measurement value Ecn_x received from the HSM 1012 is “pass”, the control unit 21 passes the random number Nonce stored in the storage unit 22 to the HSM 1012 and performs encryption using the encryption key Kec. Let it run. The encryption processing unit 32 of the HSM 1012 encrypts the random number Nonce with the encryption key Kec stored in the storage unit 1013 to generate sixth encrypted data Kec (Nonce). The HSM 1012 passes the sixth encrypted data Kec (Nonce) to the control unit 21. On the other hand, when the verification result of the measurement value Ecn_x received from the HSM 1012 is “fail”, the control unit 21 does not encrypt the random number Nonce.

The control unit 21 transmits the verification result “pass or fail” of the measurement value Ecn_x as the secure boot result to the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. At this time, when the verification result of the measurement value Ecn_x is “pass”, the control unit 21 includes the sixth encrypted data Kec (Nonce) in the secure boot result “pass (OK)”. The key generation device 1300 receives the secure boot result “pass or fail” of the first ECU 1010 from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.
Note that the random number Nonce may be included in the secure boot result “pass (OK)” without encryption. Further, the random number Nonce and the CMAC of the random number Nonce may be included in the secure boot result “pass (OK)”. The CMAC of the random number Nonce may be calculated using the encryption key Kec. When the random number Nonce and the CMAC of the random number Nonce are included in the secure boot result “pass (OK)”, either the random number Nonce or the random number Nonce CMAC or both the random number Nonce and the random number Nonce CMAC are encrypted. Also good.

(Step S80) The encryption processing unit 16 of the key generation device 1300 uses the sixth encrypted data Kec (Nonce) included in the secure boot result “pass (OK)” of the first ECU 1010 as the encryption of the first ECU 1010. Decrypted with the key Kec to obtain decrypted data Nonce. The verification unit 14 compares the decrypted data Nonce with the random number Nonce stored in the storage unit 12 and determines whether or not they match. As a result of this determination, if both match, it is determined that the secure boot result “pass” of the first ECU 1010 is correct. If it is determined that the secure boot result “pass” is correct, the process proceeds to step S81. On the other hand, if the two do not match, it is determined that the secure boot result “pass” of the first ECU 1010 is not correct. If it is determined that the secure boot result “pass” is not correct, the processing in FIG. 9 is terminated. If it is determined that the secure boot result “pass” is not correct, the key generation device 1300 may execute a predetermined error process.

  Further, when the key generation device 1300 receives the result of “fail” of the secure boot of the first ECU 1010 of the automobile 1001, the processing of FIG. When the secure boot result “fail” is received, the key generation device 1300 may execute a predetermined error process.

(Step S81) The key generation unit 34 of the HSM 1012 of the first ECU 1010 generates an in-vehicle key Kv. The storage unit 1013 stores the in-vehicle key Kv.

  Next, step S82 and step S83 are executed. Step S82 is the same as Step S10 in Example 1 of the management method according to FIG. Step S83 is the same as step S11 of the management method example 1 according to FIG. Next, step S84 is executed.

(Step S84) The encryption processing unit 16 of the key generation device 1300 encrypts the encryption key Ke1 of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, and performs the fifth encryption. Data Kr1 (Ke1) is generated. The verification unit 14 generates a random number Nonce1. The storage unit 12 stores the random number Nonce1. The key generation device 1300 transmits the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 to the second ECU (1) 1020 via the first ECU 1010 of the automobile 1001 through the vehicle interface 11. When the first ECU 1010 of the automobile 1001 receives the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20, the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 are transferred to the second ECU (1) 1020 via the CAN 1030 by the interface unit 20. The second ECU (1) 1020 receives the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S85) The control unit 41 of the second ECU (1) 1020 passes the fifth encrypted data Kr1 (Ke1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the fifth encrypted data Kr1 (Ke1) with the Root key Kr1 stored in the storage unit 1023, and acquires the encryption key Ke1. The SHE 1022 stores the acquired encryption key Ke1 in the storage unit 1023. The SHE 1022 may store the acquired encryption key Ke1 in the storage unit 1023 in place of the initial encryption key Keei. In the present embodiment, the encryption key Ke1 is set as an encryption key that can be used when the verification of the measurement value passes in the secure boot process executed by the SHE1022. Therefore, the encryption key Ke1 cannot be used when the measurement value verification fails in the secure boot process executed by the SHE1022.

  The storage unit 42 stores a random number Nonce1. The storage location of the random number Nonce1 is a non-volatile storage area that is not a measurement target of the secure boot in the storage area of the storage unit 42.

(Step S86) The encryption processing unit 16 of the key generation device 1300 encrypts the signature key Kb1 and the expected value E1n of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, respectively. Second encrypted data Kr1 (Kb1) and fourth encrypted data Kr1 (E1n) are generated. The key generation device 1300 uses the vehicle interface 11 to transmit the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the second ECU (1) via the first ECU 1010 of the automobile 1001. To 1020. When the first ECU 1010 of the automobile 1001 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) are transferred by the interface unit 20 to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S87) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) with the Root key Kr1 stored in the storage unit 1023, respectively. Kb1 and expected value E1n are acquired. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi. Further, the SHE 1022 sets the acquired expected value E1n to an expected value used in the secure boot process.

(Step S88) The control unit 41 of the second ECU (1) 1020 passes the initial ECU code E1i stored in the storage unit 42 to the SHE 1022, and executes the secure boot process. In the secure boot process, the measurement unit 53 of the SHE 1022 calculates the measurement value of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. In this embodiment, CMAC is used as an example of the measurement value. Therefore, the measurement unit 53 calculates the CMAC of the initial ECU code E1i using the signature key Kb1 stored in the storage unit 1023. The CMAC resulting from this calculation is referred to as a measured value E1n_x.

  The measuring unit 53 compares the measured value E1n_x with the expected value E1n, and determines whether or not they match. As a result of this determination, if both match, the verification of the measured value E1n_x is acceptable. If the verification of the measured value E1n_x passes, the encryption key Ke1 can be used. On the other hand, if the two do not match, the verification of the measured value E1n_x fails. When the verification of the measurement value E1n_x fails, the encryption key Ke1 cannot be used. The SHE 1022 passes the verification result “pass or fail” of the measurement value E1n_x to the control unit 41.

(Step S89) When the verification result of the measurement value E1n_x received from the SHE 1022 is “pass”, the control unit 41 passes the random number Nonce1 stored in the storage unit 42 to the SHE 1022 and encrypts it with the encryption key Ke1. Let it run. The encryption processing unit 52 of the SHE 1022 encrypts the random number Nonce1 with the encryption key Ke1 stored in the storage unit 1023 to generate sixth encrypted data Ke1 (Nonce1). The SHE 1022 passes the sixth encrypted data Ke1 (Nonce1) to the control unit 41. On the other hand, when the verification result of the measurement value E1n_x received from the SHE 1022 is “fail”, the control unit 41 does not encrypt the random number Nonce1.

The control unit 41 transmits the verification result “pass or fail” of the measurement value E1n_x as the secure boot result via the CAN 1030 to the key generation device 1300 via the first ECU 1010 via the interface unit 40. At this time, when the verification result of the measurement value E1n_x is “pass”, the control unit 41 includes the sixth encrypted data Ke1 (Nonce1) in the secure boot result “pass (OK)”. When the first ECU 1010 receives the secure boot result “pass or fail” from the second ECU (1) 1020 via the CAN 1030, the first ECU 1010 receives the secure boot result “pass or fail”. The data is transferred to the key generation device 1300 via the diagnostic port 1060 by the interface unit 20. The key generation device 1300 receives the secure boot result “pass or fail” of the second ECU (1) 1020 from the first ECU 1010 of the automobile 1001 via the diagnosis port 1060 by the vehicle interface 11.
Note that the random number Nonce1 may be included in the secure boot result “pass (OK)” without encryption. Further, the random number Nonce1 and the CMAC of the random number Nonce1 may be included in the secure boot result “pass (OK)”. The CMAC of the random number Nonce1 may be calculated using the encryption key Ke1. When the random number Nonce1 and the CMAC of the random number Nonce1 are included in the secure boot result “pass (OK)”, either the random number Nonce1 or the CMAC of the random number Nonce1 or both the random number Nonce1 and the CMAC of the random number Nonce1 are encrypted. Also good.

(Step S90) The cryptographic processing unit 16 of the key generation device 1300 uses the sixth encrypted data Ke1 (Nonce1) included in the secure boot result “pass (OK)” of the second ECU (1) 1020 as the second The decrypted data Nonce1 is obtained by decrypting with the encryption key Ke1 of the ECU (1) 1020. The verification unit 14 compares the decrypted data Nonce1 with the random number Nonce1 stored in the storage unit 12 and determines whether or not they match. As a result of the determination, if both match, it is determined that the secure boot result “pass” of the second ECU (1) 1020 is correct. If it is determined that the secure boot result “pass” is correct, the process proceeds to step S91. On the other hand, if they do not match, it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct. When it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct, the processing of FIG. 9 is terminated for the second ECU (1) 1020. Therefore, when it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct, step S91 is not executed for the second ECU (1) 1020. If it is determined that the secure boot result “pass” is not correct, the key generation device 1300 may execute a predetermined error process.

  When the key generation device 1300 receives the secure boot result “fail” of the second ECU (1) 1020 of the automobile 1001, the processing of FIG. 9 is terminated for the second ECU (1) 1020. Therefore, when the secure boot result “fail” of the second ECU (1) 1020 is received, step S91 is not executed for the second ECU (1) 1020. When the secure boot result “fail” is received, the key generation device 1300 may execute a predetermined error process.

  Next, steps S91 to S93 are executed. Step S91 is the same as step S17 of the management method example 1 according to FIG. Step S92 is the same as step S18 of the management method example 1 according to FIG. Step S93 is the same as step S19 of the management method example 1 according to FIG.

  Steps S82 to S93 are executed in the same manner for all second ECUs (n) 1020 mounted on the automobile 1001.

  According to the fifth example of the management method described above, the key generation device 1300 generates the expected value of the ECU code of the ECU mounted on the automobile 1001 and supplies it to the ECU. Then, the ECU verifies the measured value of its own ECU code based on the expected value supplied from the key generation device 1300, and notifies the key generation device 1300 of the verification result, so that the ECU 1001 is mounted on the automobile 1001. The authenticity of the ECU is checked. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved.

  Furthermore, according to Example 5 of the management method described above, when the ECU notifies the key generation device 1300 of the verification result of the measured value of its own ECU code, the verification value supplied from the key generation device 1300 (the above example) Then, a random number Nonce, Nonce1) is encrypted with an encryption key that can be used when the measurement value verification passes, to generate sixth encrypted data, and the sixth encrypted data is generated as a key generation device 1300. Send to. The encryption key is shared with the key generation apparatus 1300. The key generation device 1300 decrypts the sixth encrypted data and determines whether the decrypted data matches the original verification value supplied to the ECU, thereby verifying the verification result of the measured value of the ECU code of the ECU. Sex can be confirmed.

<Example 6 of management method>
The management method example 6 is a modification of the management method example 5 described above. FIG. 10 is a sequence diagram of Example 6 of the management method according to the present embodiment. 10, parts corresponding to those in FIG. 9 are given the same reference numerals, and descriptions thereof are omitted. Hereinafter, with reference to FIG. 10, differences from the above-described management method example 5 will be mainly described.

  The vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 are connected. Steps S71 to S81 are executed. Steps S71 to S81 are the same as those in the fifth example of the management method according to FIG. 9 described above. If it is determined that the secure boot result “pass” of the first ECU 1010 of the automobile 1001 received by the key generation device 1300 is correct, step S101 is executed after step S81. In this case, since the secure boot result of the first ECU 1010 is “pass”, the encryption key Kec can be used in the HSM 1012 of the first ECU 1010.

  On the other hand, when it is determined that the secure boot result “pass” is not correct, and when the key generation device 1300 receives the secure boot result “fail” of the first ECU 1010 of the automobile 1001, the processing of FIG. finish. When it is determined that the secure boot result “pass” is not correct and when the key generation device 1300 receives the secure boot result “fail” of the first ECU 1010 of the automobile 1001, the key generation device 1300 Predetermined error processing may be executed.

(Step S101) The encryption processing unit 16 of the key generation device 1300 uses the encryption key Kec of the first ECU 1010 to start the root key Krn, the signature key Kbn, and the expected value Enn of each of the N second ECUs (n) 1020. And the encryption key Ken is encrypted respectively. By this encryption, N pieces of first encrypted data Kec (Kr1), Kec (Kr2),..., Kec (KrN) and N pieces of second encrypted data Kec (Kb1), Kec ( Kb2), ..., Kec (KbN), N pieces of fourth encrypted data Kec (E1n), Kec (E2n), ..., Kec (ENn), and N pieces of seventh encryption Data Kec (Ke1), Kec (Ke2), ..., Kec (KeN) are generated.

  The key generation device 1300 uses the vehicle interface 11 to generate N pieces of first encrypted data Kec (Kr1), Kec (Kr2),..., Kec (KrN) and N pieces of second encrypted data Kec. (Kb1), Kec (Kb2), ..., Kec (KbN), N pieces of fourth encrypted data Kec (E1n), Kec (E2n), ..., Kec (ENn), and N pieces The seventh encrypted data Kec (Ke1), Kec (Ke2), ..., Kec (KeN) are transmitted to the first ECU 1010 of the automobile 1001. The first ECU 1010 of the automobile 1001 uses the interface unit 20 to transmit N pieces of first encrypted data Kec (Kr1), Kec (Kr2),..., Kec from the key generation device 1300 via the diagnostic port 1060. (KrN), N pieces of second encrypted data Kec (Kb1), Kec (Kb2),..., Kec (KbN), and N pieces of fourth encrypted data Kec (E1n), Kec ( E2n), ..., Kec (ENn) and N pieces of seventh encrypted data Kec (Ke1), Kec (Ke2), ..., Kec (KeN).

(Step S102) The control unit 21 of the first ECU 1010 includes N pieces of first encrypted data Kec (Kr1), Kec (Kr2),..., Kec (KrN), and N pieces of second encryption data. Data Kec (Kb1), Kec (Kb2),..., Kec (KbN) and N pieces of fourth encrypted data Kec (E1n), Kec (E2n),..., Kec (ENn) , N pieces of seventh encrypted data Kec (Ke1), Kec (Ke2),..., Kec (KeN) are passed to the HSM 1012, and are decrypted by the encryption key Kec. The HSM 1012 uses the encryption key Kec stored in the storage unit 1013 to generate N first encrypted data Kec (Kr1), Kec (Kr2),..., Kec (KrN), and N second data Encrypted data Kec (Kb1), Kec (Kb2),..., Kec (KbN) and N pieces of fourth encrypted data Kec (E1n), Kec (E2n),. ) And N pieces of seventh encrypted data Kec (Ke1), Kec (Ke2),..., Kec (KeN). By this decryption, N root keys Kr1, Kr2,..., KrN, N signature keys Kb1, Kb2,..., KbN and N expected values E1n, E2n,. N encryption keys Ke1, Ke2,..., KeN are acquired. The HSM 1012 acquires the N root keys Kr1, Kr2,..., KrN, the N signature keys Kb1, Kb2,..., KbN, and the N expected values E1n, E2n,. , ENn, and N encryption keys Ke1, Ke2,..., KeN are stored in the storage unit 1013.

  Next, Step S103 and Step S104 are executed. Step S103 is the same as step S24 of the management method example 2 according to FIG. Step S104 is the same as step S25 of the management method example 2 according to FIG. Next, step S105 is executed.

(Step S105) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the encryption key Ke1 of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, and Encrypted data Kr1 (Ke1) is generated. The HSM 1012 passes the fifth encrypted data Kr1 (Ke1) to the control unit 21. The control unit 21 generates a random number Nonce1. The storage unit 22 stores the random number Nonce1. The control unit 21 transmits the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 to the second ECU (1) 1020 via the CAN 1030 through the interface unit 20. The second ECU (1) 1020 receives the fifth encrypted data Kr1 (Ke1) and the random number Nonce1 from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S106) The control unit 41 of the second ECU (1) 1020 passes the fifth encrypted data Kr1 (Ke1) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the fifth encrypted data Kr1 (Ke1) with the Root key Kr1 stored in the storage unit 1023, and acquires the encryption key Ke1. The SHE 1022 stores the acquired encryption key Ke1 in the storage unit 1023. The SHE 1022 may store the acquired encryption key Ke1 in the storage unit 1023 in place of the initial encryption key Keei. In the present embodiment, the encryption key Ke1 is set as an encryption key that can be used when the verification of the measurement value passes in the secure boot process executed by the SHE1022. Therefore, the encryption key Ke1 cannot be used when the measurement value verification fails in the secure boot process executed by the SHE1022.

  The storage unit 42 stores a random number Nonce1. The storage location of the random number Nonce1 is a non-volatile storage area that is not a measurement target of the secure boot in the storage area of the storage unit 42.

(Step S107) The encryption processing unit 32 of the HSM 1012 of the first ECU 1010 encrypts the signature key Kb1 and the expected value E1n of the second ECU (1) 1020 with the Root key Kr1 of the second ECU (1) 1020, respectively. To generate second encrypted data Kr1 (Kb1) and fourth encrypted data Kr1 (E1n). The HSM 1012 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the control unit 21. The control unit 21 uses the interface unit 20 to transmit the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the second ECU (1) 1020 via the CAN 1030. The second ECU (1) 1020 receives the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) from the first ECU 1010 via the CAN 1030 by the interface unit 40.

(Step S108) The control unit 41 of the second ECU (1) 1020 passes the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) to the SHE1022. The encryption processing unit 52 of the SHE 1022 decrypts the second encrypted data Kr1 (Kb1) and the fourth encrypted data Kr1 (E1n) with the Root key Kr1 stored in the storage unit 1023, respectively. Kb1 and expected value E1n are acquired. The SHE 1022 stores the acquired signature key Kb1 in the storage unit 1023. The SHE 1022 may store the obtained signature key Kb1 in the storage unit 1023 in place of the initial signature key Kbi. Further, the SHE 1022 sets the acquired expected value E1n to an expected value used in the secure boot process.

  Next, step S109 is executed. Step S109 is the same as step S88 in Example 5 of the management method according to FIG. Next, step S110 is executed.

(Step S110) When the verification result of the measurement value E1n_x received from the SHE 1022 is “pass”, the control unit 41 passes the random number Nonce1 stored in the storage unit 42 to the SHE 1022 and encrypts it with the encryption key Ke1. Let it run. The encryption processing unit 52 of the SHE 1022 encrypts the random number Nonce1 with the encryption key Ke1 stored in the storage unit 1023 to generate sixth encrypted data Ke1 (Nonce1). The SHE 1022 passes the sixth encrypted data Ke1 (Nonce1) to the control unit 41. On the other hand, when the verification result of the measurement value E1n_x received from the SHE 1022 is “fail”, the control unit 41 does not encrypt the random number Nonce1.

The control unit 41 transmits the verification result “pass or fail” of the measurement value E1n_x as the secure boot result to the first ECU 1010 via the CAN 1030 by the interface unit 40. At this time, when the verification result of the measurement value E1n_x is “pass”, the control unit 41 includes the sixth encrypted data Ke1 (Nonce1) in the secure boot result “pass (OK)”. The first ECU 1010 receives the secure boot result “pass or fail” of the second ECU (1) 1020 from the second ECU (1) 1020 via the CAN 1030 via the interface unit 20.
Note that the random number Nonce1 may be included in the secure boot result “pass (OK)” without encryption. Further, the random number Nonce1 and the CMAC of the random number Nonce1 may be included in the secure boot result “pass (OK)”. The CMAC of the random number Nonce1 may be calculated using the encryption key Ke1. When the random number Nonce1 and the CMAC of the random number Nonce1 are included in the secure boot result “pass (OK)”, either the random number Nonce1 or the CMAC of the random number Nonce1 or both the random number Nonce1 and the CMAC of the random number Nonce1 are encrypted. Also good.

(Step S111) The control unit 21 of the first ECU 1010 passes the sixth encrypted data Ke1 (Nonce1) included in the secure boot result “pass (OK)” of the second ECU (1) 1020 to the HSM 1012. Thus, decryption is executed with the encryption key Ke1 of the second ECU (1) 1020. The encryption processing unit 32 of the HSM 1012 decrypts the sixth encrypted data Ke1 (Nonce1) with the encryption key Ke1 of the second ECU (1) 1020 stored in the storage unit 1013 to obtain the decrypted data Nonce1. . The HSM 1012 passes the decoded data Nonce1 to the control unit 21.

  The control unit 21 compares the decrypted data Nonce1 with the random number Nonce1 stored in the storage unit 22, and determines whether or not they match. As a result of the determination, if both match, it is determined that the secure boot result “pass” of the second ECU (1) 1020 is correct. If it is determined that the secure boot result “pass” is correct, the process proceeds to step S112. On the other hand, if they do not match, it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct. When it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct, the processing of FIG. 10 is terminated for the second ECU (1) 1020. Therefore, when it is determined that the secure boot result “pass” of the second ECU (1) 1020 is not correct, step S112 is not executed for the second ECU (1) 1020. If it is determined that the secure boot result “pass” is not correct, the key generation device 1300 may execute a predetermined error process.

  When the first ECU 1010 receives the result of the secure boot of the second ECU (1) 1020 “fail”, the process of FIG. 10 is finished for the second ECU (1) 1020. Thus, when the secure boot result “fail” of the second ECU (1) 1020 is received, step S112 is not executed for the second ECU (1) 1020. When the secure boot result “fail” is received, the first ECU 1010 may execute a predetermined error process.

  Next, Step S112 and Step S113 are executed. Step S112 is the same as step S59 of the management method example 4 according to FIG. Step S113 is the same as step S60 of the management method example 4 according to FIG.

  The above steps S103 to S113 are executed in the same manner for all second ECUs (n) 1020 mounted on the automobile 1001.

  Note that steps S103 to S113 are processes closed in the automobile 1001. For this reason, from step S103 to step S113, the vehicle interface 11 of the key generation device 1300 and the diagnostic port 1060 of the automobile 1001 do not have to be connected.

  According to the management method example 6 described above, as with the management method example 5, the key generation device 1300 generates the expected value of the ECU code of the ECU mounted on the automobile 1001 and supplies the ECU to the ECU. Then, the ECU verifies the measured value of its own ECU code based on the expected value supplied from the key generation device 1300. Then, according to Example 6 of the present management method, the authentication result of the first ECU 1010 mounted in the automobile 1001 is determined by notifying the key generation device 1300 of the verification result by the first ECU 1010. Further, the verification result of the second ECU (n) 1020 is notified to the first ECU 1010, whereby the authenticity of the second ECU (n) 1020 mounted on the automobile 1001 is determined. Thereby, there is an effect that the reliability of the ECU mounted on the automobile 1001 is improved. Further, when the first ECU 1010 determines the authenticity of the N second ECUs (n) 1020, the time during which the key generation device 1300 and the automobile 1001 are connected can be shortened compared to the management method example 5. .

  Furthermore, according to the management method example 6 described above, as in the management method example 5, when the first ECU 1010 notifies the key generation device 1300 of the verification result of the measured value of its own ECU code, the key generation is performed. The verification value (random number Nonce in the above example) supplied from the device 1300 is encrypted with an encryption key that can be used when the verification of the measurement value passes, and the sixth encrypted data is generated. 6 encrypted data is transmitted to the key generation apparatus 1300. The encryption key is shared with the key generation apparatus 1300. The key generation device 1300 decrypts the sixth encrypted data, and determines the coincidence between the decrypted data and the original verification value supplied to the first ECU 1010, thereby measuring the ECU code of the first ECU 1010. The validity of the value verification result can be confirmed.

Further, according to Example 6 of the management method described above, when the second ECU 1020 notifies the first ECU 1010 of the verification result of the measured value of its own ECU code, the verification value (supplied from the first ECU 1010 ( In the above example, the random number Nonce1) is encrypted with an encryption key that can be used when the verification of the measurement value is passed to generate sixth encrypted data, and the sixth encrypted data is stored in the first encrypted data. It transmits to ECU1010. The encryption key is shared with the first ECU 1010. The first ECU 1010 decrypts the sixth encrypted data and determines the coincidence between the decrypted data and the original verification value supplied to the second ECU 1020, thereby measuring the ECU code of the second ECU 1020. The validity of the value verification result can be confirmed.
Note that the verification value (random number Nonce or random number Nonce1 in the above example) may be transmitted to the key generation device 1300 or the first ECU 1010 without being encrypted. Also, the verification value and the CMAC of the verification value may be transmitted to the key generation device 1300 and the first ECU 1010. The verification value CMAC may be calculated from an encryption key that can be used if the measurement value verification passes. When the verification value and the verification value CMAC are transmitted to the key generation device 1300 or the first ECU 1010, either the verification value or the verification value CMAC, or both the verification value and the verification value CMAC are encrypted. May be.

[Other vehicle configuration examples]
FIG. 11 is a diagram illustrating another configuration example of the management system and the automobile 1001 according to the present embodiment. In FIG. 11, parts corresponding to those in FIG. 1 are given the same reference numerals, and explanation thereof is omitted. Hereinafter, with reference to FIG. 11, the difference from the automobile 1001 shown in FIG. 1 will be mainly described.

  11 differs from the configuration shown in FIG. 1 in that the first ECU 1010 does not have a gateway function and in that a gateway 1070 is provided as a separate device from the first ECU 1010. The gateway 1070 is connected to the CAN 1030. The gateway 1070 is connected to the infotainment device 1040, the TCU 1050, and the diagnostic port 1060. An in-vehicle computer system 1002a provided in the automobile 1001 shown in FIG. 11 is configured by connecting a first ECU 1010 and a plurality of second ECUs 1020 to a CAN 1030. The first ECU 1010 and the second ECU 1020 communicate with an external device of the in-vehicle computer system 1002a via the gateway 1070. The gateway 1070 monitors communication between the inside and the outside of the in-vehicle computer system 1002a. In the present embodiment, the in-vehicle computer system 1002a functions as an in-vehicle control system of the automobile 1001.

  As a configuration of the CAN 1030, the CAN 1030 may include a plurality of buses (communication lines), and the plurality of buses may be connected to the gateway 1070. In this case, one ECU or a plurality of ECUs are connected to one bus. Further, the first ECU 1010 and the second ECU 1020 may be connected to the same bus, or the bus to which the first ECU 1010 is connected and the bus to which the second ECU 1020 is connected may be separated. .

[Other examples of management methods]
Another example of the management method will be described with reference to FIGS. Another example of this management method is an example of an ECU code management method. FIG. 12 is a diagram illustrating another configuration example of the management system according to the present embodiment. In FIG. 12, the configuration of FIG. 11 is applied to an automobile 1001. Note that the configuration of the automobile 1001 illustrated in FIG. 1 may be applied. The management system illustrated in FIG. 12 includes a server device 2000.

  Server device 2000 transmits and receives data to and from communication module 1051 of TCU 1050 of automobile 1001 via a communication line. Server device 2000 transmits and receives data to and from communication module 1051 via a wireless communication network used by communication module 1051 of TCU 1050 of automobile 1001. Alternatively, the server device 2000 may transmit / receive data to / from the communication module 1051 via a communication network such as the Internet and the wireless communication network. Further, for example, the server apparatus 2000 and the communication module 1051 may be connected by a dedicated line such as a VPN (Virtual Private Network) line, and data may be transmitted / received through the dedicated line. For example, a dedicated line such as a VPN line may be provided by a wireless communication network corresponding to the SIM 1052.

  Server device 2000 provides ECU 1001 with an ECU code applied to the ECU. The ECU code is an example of data applied to the ECU. The ECU code may be a computer program such as an update program installed in the ECU, or may be setting data such as a parameter setting value set in the ECU.

  A maintenance tool 2100 can be connected to the diagnostic port 1060 of the automobile 1001. The maintenance tool 2100 connected to the diagnostic port 1060 of the automobile 1001 can communicate with the ECU connected to the CAN 1030 via the gateway 1070. The maintenance tool 2100 may have a function of a conventional diagnostic terminal connected to the OBD port.

  FIG. 13 is a diagram illustrating a configuration example of the server apparatus 2000. In FIG. 13, the server apparatus 2000 includes a communication unit 2011, a storage unit 2012, an expected value calculation unit 2013, a verification unit 2014, a key generation unit 2015, and an encryption processing unit 2016. The communication unit 2011 communicates with other devices via a communication line. The storage unit 2012 stores data such as keys. The expected value calculation unit 2013 calculates an expected value for the ECU code. The verification unit 2014 verifies the ECU code. The key generation unit 2015 generates a key for the ECU. The encryption processing unit 2016 encrypts data and decrypts encrypted data.

  The functions of the server device 2000 are realized by the CPU provided in the server device 2000 executing a computer program. Note that the server device 2000 may be configured using a general-purpose computer device, or may be configured as a dedicated hardware device.

  Next, a procedure of another example of the management method will be described with reference to FIG. FIG. 14 is a sequence chart illustrating an example of an ECU code providing procedure. In FIG. 14, the ECU is an ECU mounted on the automobile 1001 and may be the first ECU 1010 or the second ECU 1020.

  The server device 2000 stores the master key Master_Secret and the ECU code of the ECU in the storage unit 2012 in advance. The ECU code of the ECU includes an ECU code scheduled to be applied to the ECU. The ECU stores a Root key Kr, a signature key Kb, an encryption key Ke, and an ECU code Ec in advance. In the first ECU 1010, the storage unit 1013 of the HSM 1012 stores each key, and the storage unit 22 of the main computing unit 1011 stores the ECU code. In the second ECU 1020, the storage unit 1023 of the SHE 1022 stores each key, and the storage unit 42 of the main computing unit 1021 stores the ECU code.

  Hereinafter, the server apparatus 2000 communicates with the TCU 1050 of the automobile 1001 through the communication unit 2011, and transmits / receives data to / from each ECU connected to the CAN 1030 of the automobile 1001 via the TCU 1050 and the gateway 1070. In the following description, the first ECU 1010 and the second ECU 1020 are not particularly distinguished from each other, and are described as ECUs. Therefore, for convenience of explanation, the secure element indicates the HSM 1012 when the ECU is the first ECU 1010, and the SHE 1022 when the ECU is the second ECU 1020. The secure element storage unit refers to the storage unit 1013 of the HSM 1012 when the ECU is the first ECU 1010, and the storage unit 1023 of the SHE 1022 when the ECU is the second ECU 1020. The ECU control unit refers to the control unit 21 when the ECU is the first ECU 1010, and refers to the control unit 41 when the ECU is the second ECU 1020.

(Step S201) The key generation unit 2015 of the server device 2000 generates a root key Kr, a signature key Kb, and an encryption key Ke for the ECU mounted on the automobile 1001. The method for generating these keys is the same as the method for generating the Root key, signature key, and encryption key according to step S71 of the fifth management method example shown in FIG. For example, the value of the root key variable Nk is Nk_1, the value of the signature key variable Nk is Nk_2, and the value of the encryption key variable Nk is Nk_3. The key generation unit 2015 uses the master key Master_Secret and the ECU identifier ECU_ID of the ECU,
Root key = Digest (Master_Secret, ECU_ID, Nk_1),
Signature key = Digest (Master_Secret, ECU_ID, Nk_2),
Encryption key = digest (Master_Secret, ECU_ID, Nk_3),
Thus, the Root key Kr, the signature key Kb, and the encryption key Ke are generated as different keys. The storage unit 2012 stores a Root key Kr, a signature key Kb, and an encryption key Ke.

  In addition, the expected value calculation unit 2013 of the server device 2000 calculates a CMAC of an ECU code (hereinafter referred to as an “Ecnew code”) to be applied to an ECU mounted on the automobile 1001 using the signature key Kb. The CMAC resulting from this calculation is referred to as an expected value Ecn. The storage unit 2012 stores the expected value Ecn.

(Step S202) The server apparatus 2000 transmits the expected value Ecn to the ECU through the communication unit 2011. The ECU receives the expected value Ecn transmitted from the server device 2000.

(Step S203) The secure element of the ECU sets the expected value Ecn received from the server device 2000 to the expected value used in the secure boot process.

(Step S204) The server apparatus 2000 transmits an Ecnew code to the ECU through the communication unit 2011. The ECU receives the Ecnew code transmitted from the server device 2000.

(Step S205) The control unit of the ECU applies the Ecnew code received from the server device 2000 to itself.

(Step S206) The control unit of the ECU executes secure boot after the application of the Ecnew code. In this secure boot, the secure element of the ECU calculates the CMAC of the Ecnew code with the signature key Kb stored in the storage unit of the secure element, and compares the calculated CMAC with the expected value Ecn. As a result of this comparison, if both match, the secure boot result is acceptable, and if both do not match, the secure boot result is unacceptable. The secure element of the ECU passes the secure boot result to the control unit of the ECU. The control unit of the ECU advances the execution of the Ecnew code when the secure boot result is acceptable. On the other hand, if the secure boot result is unacceptable, the ECU stops the execution of the Ecnew code.

(Step S <b> 207) The ECU transmits the secure boot result “pass or fail” to the server device 2000. The server apparatus 2000 receives the secure boot result “pass or fail” transmitted from the ECU by the communication unit 2011. The server device 2000 executes a predetermined process in accordance with the secure boot result “pass or fail” received from the ECU. For example, if the secure boot result is acceptable, the fact is recorded. On the other hand, when the secure boot result is unacceptable, for example, the server apparatus 2000 regenerates the expected value Ecn, and the server apparatus 2000 and the ECU re-execute the above steps S202 to S207. The regeneration of the expected value Ecn and the re-execution from step S202 to step S207 are repeated until the secure boot result is passed or repeated a predetermined number of times.

  Next, a modified example of the ECU code provision procedure of FIG. 14 described above will be described.

<Variation 1 of the procedure for providing the ECU code>
In step S202, the server apparatus 2000 encrypts the expected value Ecn by the encryption processing unit 2016 and transmits it to the ECU. The key used for this encryption may be any of the root key Kr, the signature key Kb, and the encryption key Ke. The secure element of the ECU decrypts the encrypted data received from the server device 2000 with its corresponding encryption key stored in the storage unit of the secure element, and acquires the expected value Ecn.

<Variation 2 of ECU Code Providing Procedure>
In step S204, the server apparatus 2000 encrypts the Ecnew code by the encryption processing unit 2016 and transmits it to the ECU. The key used for this encryption may be any of the Root key Kr, the signature key Kb, and the encryption key Ke. The secure element of the ECU acquires the Ecnew code by decrypting the encrypted data received from the server device 2000 with the corresponding key stored in the storage unit of the secure element by its own encryption processing unit.

<Variation 3 of ECU Code Providing Procedure>
Both Modification 1 of the ECU code provision procedure and Modification 2 of the ECU code provision procedure are applied. That is, both the expected value Ecn and the Ecnew code are encrypted and transmitted from the server device 2000 to the ECU.

<Variation 4 of ECU Code Providing Procedure>
In step S207, the secure boot result “pass or fail” transmitted from the ECU to the server apparatus 2000 is set to a predetermined value. For example, the pass is “1” and the failure is “0”.
<Variation 5 of ECU Code Providing Procedure>
In step S207, the secure boot result “pass or fail” transmitted from the ECU to the server apparatus 2000 is the CMAC of the Ecnew code calculated in the secure boot in step S206. The verification unit 2014 of the server device 2000 compares the CMAC of the secure boot result received from the ECU with the expected value Ecn transmitted to the ECU in step S202. As a result of the comparison, the verification unit 2014 of the server device 2000 determines that the ECU's secure boot result is acceptable, and if they do not match, the ECU's secure boot result is unacceptable. Judge that there is.
<Variation 6 of the procedure for providing the ECU code>
The server device 2000 supplies a verification value (for example, a random number Nonce) to the ECU in advance. In step S207, the ECU includes the verification value in the secure boot result “pass” if the secure boot result is acceptable, while the secure boot result “failed” if the secure boot result is unsuccessful. Do not include verification values. The verification unit 2014 of the server device 2000 compares the verification value included in the secure boot result “pass” received from the ECU with the original verification value supplied in advance to the ECU. As a result of the comparison, the verification unit 2014 of the server device 2000 determines that the ECU's secure boot result is acceptable, and if they do not match, the ECU's secure boot result is unacceptable. Judge that there is.

<Modification 7 of ECU Code Providing Procedure>
Any one of the modified examples 4, 5, and 6 of the ECU code provision procedure is applied in combination.

<Variation 8 of ECU Code Providing Procedure>
In the modified examples 4, 5, 6, and 7 of the ECU code provision procedure, the ECU encrypts the secure boot result by the encryption processing unit of the secure element and transmits the result to the server device 2000. The key used for this encryption may be either the root key Kr or the signature key Kb. The server device 2000 uses the encryption processing unit 2016 to decrypt the encrypted data received from the ECU with the corresponding key stored in the storage unit 2012, and obtains a secure boot result. If the secure boot result is acceptable, the encryption key Ke can be used, so the secure boot result “pass” may be encrypted with the encryption key Ke.

  According to another example of the management method described above, server device 2000 provides the ECU with an expected value of an ECU code applied to the ECU. The ECU verifies the ECU code provided from the server device 2000 based on the expected value of the ECU code provided from the server device 2000. The ECU transmits the verification result of the ECU code to the server device 2000. Thereby, the reliability of the ECU code applied to the ECU can be improved.

  In another example of the management method described above, the server device 2000 corresponds to a data providing device, and the communication unit 2011 corresponds to a vehicle interface.

  The maintenance tool 2100 may be configured to have the same function as the server device 2000 and to provide the ECU code to the ECU via the diagnosis port 1060 according to the same ECU code provision procedure as that of the server device 2000. .

  Alternatively, the TCU 1050 of the automobile 1001 may receive an ECU code from the server device 2000, generate an expected value for the received ECU code, and provide the ECU with the expected value of the generated ECU code. For example, the SIM 1052 of the communication module 1051 of the TCU 1050 stores the master key Master_Secret in advance, generates a key used for generating the CMAC using the master key Master_Secret and the ECU identifier ECU_ID of the ECU, and generates an ECU code using the generated key. CMAC (expected value) is calculated.

  The first ECU 1010 of the automobile 1001 receives the ECU code of the second ECU 1020 from the server device 2000, generates an expected value for the received ECU code of the second ECU 1020, and generates the generated ECU of the second ECU 1020. The expected value of the code may be provided to the second ECU 1020. For example, the HSM 1012 of the first ECU 1010 stores the master key Master_Secret in advance, generates a key used for generating the CMAC using the master key Master_Secret and the ECU identifier ECU_ID of the second ECU 1020, and uses the generated key. The CMAC (expected value) of the ECU code of the second ECU 1020 is calculated.

  As mentioned above, although embodiment of this invention was explained in full detail with reference to drawings, the specific structure is not restricted to this embodiment, The design change etc. of the range which does not deviate from the summary of this invention are included.

  In the above-described embodiment, the ECU is provided with HSM or SHE, but a cryptographic processing chip other than HSM and SHE may be used. For the first ECU 1010, for example, a cryptographic processing chip called “TPM (Trusted Platform Module) f” may be used. TPMf has tamper resistance. TPMf is an example of a secure element. For the second ECU 1020, for example, a cryptographic processing chip called “TPMt” may be used. TPMt has tamper resistance. TPMt is an example of a secure element.

  The above-described embodiment may be applied to a new ECU mounted on a car in a car manufacturing process in a car manufacturing factory. In addition, the above-described embodiment may be applied to a new ECU mounted on a car when the car ECU is replaced with a new one at a car maintenance shop or a store.

  In the above-described embodiment, an automobile is taken as an example of the vehicle, but the present invention can also be applied to vehicles other than automobiles such as a motorbike and a railway vehicle.

Further, a computer program for realizing the functions of the key generation device or ECU described above is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. Also good. Here, the “computer system” may include an OS and hardware such as peripheral devices.
“Computer-readable recording medium” refers to a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a DVD (Digital Versatile Disc), and a built-in computer system. A storage device such as a hard disk.

Further, the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic DRAM) in a computer system that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time.
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

DESCRIPTION OF SYMBOLS 11 ... Vehicle interface, 12, 22, 42, 2012 ... Memory | storage part, 13, 2013 ... Expected value calculation part, 14, 2014 ... Verification part, 15, 34, 2015 ... Key generation part, 16, 32, 52, 2016 ... Cryptographic processing unit 20, 40 ... interface unit, 21, 41 ... control unit, 31, 51 ... measurement value calculation unit, 33, 53 ... measurement unit, 1001 ... automobile, 1002, 1002a ... in-vehicle computer system, 1010 ... first ECU, 1011, 1021 ... main arithmetic unit, 1012 ... HSM, 1013, 1023 ... storage unit, 1020 ... second ECU, 1022 ... SHE, 1030 ... CAN, 1040 ... infotainment device, 1050 ... TCU, 1051 ... communication Module, 1052 ... SIM, 1060 ... diagnostic port, 1070 ... gateway, 1300 ... Generating device, 2000 ... server, 2011 ... communication unit, 2100 ... maintenance tool

Claims (6)

  1. A data providing device and an in-vehicle computer mounted on the vehicle;
    The data providing device includes:
    A vehicle interface for transmitting and receiving data to and from the vehicle;
    A key generation unit for generating a first key and a second key stored in the in-vehicle computer;
    Using the second key, an expected value calculation unit for calculating an expected value of application data applied to the in-vehicle computer;
    The first key is encrypted with an initial key stored in advance in the in-vehicle computer to generate first encrypted data, and the second key is encrypted with the first key to generate a second cipher. An encryption processing unit that generates encrypted data and encrypts the expected value with the first key to generate fourth encrypted data, the application data, the first encrypted data, the first encrypted data, 2 encrypted data and the fourth encrypted data are transmitted to the vehicle by the vehicle interface, and the verification result of the measurement value of the application data is received from the vehicle by the vehicle interface,
    The in-vehicle computer is
    An interface unit for transmitting / receiving data to / from an external device of the in-vehicle computer;
    The first encrypted data received from the data providing device by the interface unit is decrypted with the initial key stored in advance by the in-vehicle computer, and the first key is obtained from the data providing device by the interface unit. The received second encrypted data is decrypted with the obtained first key to obtain a second key, and the fourth encrypted data received from the data providing apparatus by the interface unit is obtained. An encryption processing unit that obtains an expected value by decrypting with one key;
    A measurement unit that calculates a measurement value of the application data received from the data providing device by the interface unit using the acquired second key, and verifies the measurement value based on the acquired expected value; And the verification result of the measurement value is transmitted to the data providing device by the interface unit.
    Management system.
  2. A vehicle interface for sending and receiving data to and from the vehicle;
    A key generation unit for generating a first key and a second key stored in an in-vehicle computer mounted on the vehicle;
    Using the second key, an expected value calculation unit for calculating an expected value of application data applied to the in-vehicle computer;
    The first key is encrypted with an initial key stored in advance in the in-vehicle computer to generate first encrypted data, and the second key is encrypted with the first key to generate a second cipher. Generating encrypted data, and encrypting the expected value with the first key to generate fourth encrypted data, and
    Transmitting the application data, the first encrypted data, the second encrypted data, and the fourth encrypted data to the vehicle by the vehicle interface;
    Receiving the verification result of the measurement value of the application data from the vehicle by the vehicle interface;
    Data provision device.
  3. In an in-vehicle computer mounted on a vehicle,
    An interface unit for transmitting / receiving data to / from an external device of the in-vehicle computer;
    The first encrypted data received from the data providing device by the interface unit is decrypted with the initial key stored in advance in the in-vehicle computer, and the first key is obtained and received from the data providing device by the interface unit. The second encrypted data is decrypted with the obtained first key to obtain a second key, and the fourth encrypted data received from the data providing device by the interface unit is obtained. An encryption processing unit that obtains an expected value by decrypting with the key of
    A measurement unit that calculates a measurement value of the application data received from the data providing device by the interface unit using the acquired second key, and verifies the measurement value based on the acquired expected value; With
    The verification result of the measurement value is transmitted to the data providing apparatus by the interface unit.
    In-vehicle computer.
  4. A management method for a management system comprising a data providing device and an in-vehicle computer mounted on a vehicle,
    A key generation step in which the data providing device generates a first key and a second key stored in the in-vehicle computer;
    An expected value calculating step in which the data providing device calculates an expected value of application data applied to the in-vehicle computer using the second key;
    The data providing apparatus generates first encrypted data by encrypting the first key with an initial key stored in advance in the in-vehicle computer, and encrypts the second key with the first key. Generating second encrypted data, encrypting the expected value with the first key, and generating fourth encrypted data; and
    The data providing device transmits the application data, the first encrypted data, the second encrypted data, and the fourth encrypted data to the vehicle by a vehicle interface that transmits and receives data to and from the vehicle. Steps,
    The in-vehicle computer decrypts the first encrypted data received from the data providing device by the interface unit that transmits / receives data to / from an external device of the in-vehicle computer with the initial key stored in advance in the in-vehicle computer. 1 is obtained, the second encrypted data received from the data providing device by the interface unit is decrypted by the obtained first key, and a second key is obtained, and the data is obtained by the interface unit. A cryptographic processing step of decrypting the fourth encrypted data received from the providing device with the acquired first key and acquiring an expected value;
    The in-vehicle computer calculates the measured value of the application data received from the data providing device by the interface unit using the acquired second key, and calculates the measured value based on the acquired expected value. A measurement step to be verified;
    The in-vehicle computer transmitting a verification result of the measurement value to the data providing apparatus by the interface unit;
    The data providing device receiving a verification result of the measurement value of the application data from the vehicle by the vehicle interface;
    Management method including.
  5. In a computer of a data providing device having a vehicle interface for sending and receiving data to and from a vehicle,
    A key generation function for generating a first key and a second key stored in the in-vehicle computer;
    An expected value calculation function for calculating an expected value of application data applied to the in-vehicle computer using the second key;
    The first key is encrypted with an initial key stored in advance in the in-vehicle computer to generate first encrypted data, and the second key is encrypted with the first key to generate a second cipher. Generating encrypted data, encrypting the expected value with the first key, and generating fourth encrypted data; and
    A transmission function for transmitting the application data, the first encrypted data, the second encrypted data, and the fourth encrypted data to the vehicle by the vehicle interface;
    A reception function for receiving a verification result of the measurement value of the application data from the vehicle by the vehicle interface;
    Computer program for realizing.
  6. In-vehicle computers mounted on vehicles
    A first key is obtained by decrypting the first encrypted data received from the data providing device by an interface unit that transmits and receives data with a device external to the vehicle-mounted computer, using the initial key stored in advance by the vehicle-mounted computer. The second encrypted data received from the data providing device by the interface unit is decrypted with the acquired first key to obtain a second key, and the second key received from the data providing device by the interface unit An encryption processing function for decrypting the encrypted data of 4 with the acquired first key and acquiring an expected value;
    A measurement function for calculating a measurement value of application data received from the data providing apparatus by the interface unit using the acquired second key, and verifying the measurement value based on the acquired expected value; ,
    A transmission function of transmitting the verification result of the measurement value to the data providing apparatus by the interface unit;
    Computer program for realizing.
JP2017197257A 2017-10-10 2017-10-10 Management system, data providing apparatus, in-vehicle computer, management method, and computer program Active JP6454919B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017197257A JP6454919B2 (en) 2017-10-10 2017-10-10 Management system, data providing apparatus, in-vehicle computer, management method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017197257A JP6454919B2 (en) 2017-10-10 2017-10-10 Management system, data providing apparatus, in-vehicle computer, management method, and computer program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016156573 Division 2016-08-09

Publications (2)

Publication Number Publication Date
JP2018026866A true JP2018026866A (en) 2018-02-15
JP6454919B2 JP6454919B2 (en) 2019-01-23

Family

ID=61194346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017197257A Active JP6454919B2 (en) 2017-10-10 2017-10-10 Management system, data providing apparatus, in-vehicle computer, management method, and computer program

Country Status (1)

Country Link
JP (1) JP6454919B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019212403A1 (en) * 2018-04-30 2019-11-07 华为国际有限公司 Method for upgrading vehicle-mounted device, and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010002814A1 (en) * 1999-12-07 2001-06-07 Takeshi Suganuma Control information rewriting system
US20110320089A1 (en) * 2010-06-25 2011-12-29 Toyota Motor Engineering & Manufacturing North America, Inc. Over-the-Air Vehicle Systems Updating and Associate Security Protocols
WO2014002280A1 (en) * 2012-06-29 2014-01-03 富士通株式会社 Communication program, recording medium, communication apparatus, and communication method
US20140181526A1 (en) * 2012-12-20 2014-06-26 GM Global Technology Operations LLC Methods and systems for bypassing authenticity checks for secure control modules
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device
JP2015103163A (en) * 2013-11-27 2015-06-04 株式会社オートネットワーク技術研究所 Program update system and program update method
US9177153B1 (en) * 2005-10-07 2015-11-03 Carnegie Mellon University Verifying integrity and guaranteeing execution of code on untrusted computer platform
JP2016092811A (en) * 2014-10-29 2016-05-23 Kddi株式会社 Key management system, key management server device, management device, vehicle, key management method and computer program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010002814A1 (en) * 1999-12-07 2001-06-07 Takeshi Suganuma Control information rewriting system
US9177153B1 (en) * 2005-10-07 2015-11-03 Carnegie Mellon University Verifying integrity and guaranteeing execution of code on untrusted computer platform
US20110320089A1 (en) * 2010-06-25 2011-12-29 Toyota Motor Engineering & Manufacturing North America, Inc. Over-the-Air Vehicle Systems Updating and Associate Security Protocols
WO2014002280A1 (en) * 2012-06-29 2014-01-03 富士通株式会社 Communication program, recording medium, communication apparatus, and communication method
US20140181526A1 (en) * 2012-12-20 2014-06-26 GM Global Technology Operations LLC Methods and systems for bypassing authenticity checks for secure control modules
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device
JP2015103163A (en) * 2013-11-27 2015-06-04 株式会社オートネットワーク技術研究所 Program update system and program update method
JP2016092811A (en) * 2014-10-29 2016-05-23 Kddi株式会社 Key management system, key management server device, management device, vehicle, key management method and computer program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
竹森 敬祐 ほか: "セキュアエレメントを活用したECU認証とコード認証の鍵管理", 電子情報通信学会技術研究報告, vol. Vol. 115,No. 365, JPN6017011703, 10 December 2015 (2015-12-10), JP, pages 227 - 232 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019212403A1 (en) * 2018-04-30 2019-11-07 华为国际有限公司 Method for upgrading vehicle-mounted device, and related device

Also Published As

Publication number Publication date
JP6454919B2 (en) 2019-01-23

Similar Documents

Publication Publication Date Title
CN102656841B (en) Credential transfer
EP1518349B1 (en) Method and system for vehicle authentication of a component
US7325135B2 (en) Method and system for authorizing reconfiguration of a vehicle
US6839710B2 (en) Method and system for maintaining a configuration history of a vehicle
US7131005B2 (en) Method and system for component authentication of a vehicle
EP1128242B1 (en) Process of signature
US7127611B2 (en) Method and system for vehicle authentication of a component class
JP4501349B2 (en) System module execution device
DE602005001351T2 (en) Distributed management of a certificate withdrawal list
US9935954B2 (en) System and method for securing machine-to-machine communications
US7228420B2 (en) Method and system for technician authentication of a vehicle
US7181615B2 (en) Method and system for vehicle authentication of a remote access device
CN103154966A (en) System and methods for remote maintenance in an electronic network with multiple clients
US9485230B2 (en) Efficient key generator for distribution of sensitive material from multiple application service providers to a secure element such as a universal integrated circuit card (UICC)
US20150106618A1 (en) Device Using Secure Processing Zone to Establish Trust for Digital Rights Management
KR101391151B1 (en) Method and apparatus for authenticating between clients using session key shared with server
US7600114B2 (en) Method and system for vehicle authentication of another vehicle
US7137001B2 (en) Authentication of vehicle components
KR20150074414A (en) Firmware upgrade method and system thereof
JP5864510B2 (en) Correction program checking method, correction program checking program, and information processing apparatus
US7549046B2 (en) Method and system for vehicle authorization of a service technician
US20040003234A1 (en) Method and system for vehicle authentication of a subassembly
US9705673B2 (en) Method, device, and system of provisioning cryptographic data to electronic devices
US20040001593A1 (en) Method and system for component obtainment of vehicle authentication
EP1518350B1 (en) Method and system for vehicle authentication of a component

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181127

R150 Certificate of patent or registration of utility model

Ref document number: 6454919

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150