JP2018050334A - Data provision system, data provision device, on-vehicle computer, data provision method, and computer program - Google Patents

Data provision system, data provision device, on-vehicle computer, data provision method, and computer program Download PDF

Info

Publication number
JP2018050334A
JP2018050334A JP2017225171A JP2017225171A JP2018050334A JP 2018050334 A JP2018050334 A JP 2018050334A JP 2017225171 A JP2017225171 A JP 2017225171A JP 2017225171 A JP2017225171 A JP 2017225171A JP 2018050334 A JP2018050334 A JP 2018050334A
Authority
JP
Japan
Prior art keywords
ecu
expected value
vehicle computer
unit
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
JP2017225171A
Other languages
Japanese (ja)
Other versions
JP6672243B2 (en
JP2018050334A5 (en
Inventor
竹森 敬祐
Keisuke Takemori
敬祐 竹森
秀明 川端
Hideaki Kawabata
秀明 川端
誠一郎 溝口
Seiichiro Mizoguch
誠一郎 溝口
歩 窪田
Ayumi Kubota
歩 窪田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
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 Corp filed Critical KDDI Corp
Priority to JP2017225171A priority Critical patent/JP6672243B2/en
Publication of JP2018050334A publication Critical patent/JP2018050334A/en
Publication of JP2018050334A5 publication Critical patent/JP2018050334A5/en
Application granted granted Critical
Publication of JP6672243B2 publication Critical patent/JP6672243B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve reliability of data to be applied to an on-vehicle computer such as an ECU.SOLUTION: An on-vehicle computer 1020 of an automobile 1001 includes a first storage section for storing an initial key generated by a master key and an on-vehicle computer identifier. A data provision device 1300 includes: a second storage section for storing a master key; an initial key generation section for generating an initial key of the on-vehicle computer from an on-vehicle computer identifier and a master key; a first expectation value calculation section for calculating an expectation value of data to be applied to the on-vehicle computer by using an initial key of the on-vehicle computer; and a provision section for providing data to be applied to the on-vehicle computer and an expectation value calculated by the first expectation value calculation section to a vehicle. The on-vehicle computer 1020 includes: a second expectation value calculation section for calculating an expectation value of data provided from the provision section by using an initial key of the first storage section; and an expectation value verification section for comparing an expectation value provided from the provision section with an expectation value calculated by the second expectation value calculation section.SELECTED DRAWING: Figure 5

Description

本発明は、データ提供システム、データ提供装置、車載コンピュータ、データ提供方法、及びコンピュータプログラムに関する。   The present invention relates to a data providing system, a data providing apparatus, an in-vehicle computer, a data providing method, and a computer program.

従来、自動車は、ECU(Electronic Control Unit:電子制御装置)を有し、ECUによってエンジン制御等の機能を実現する。ECUは、コンピュータの一種であり、コンピュータプログラムによって所望の機能を実現する。複数のECUをCAN(Controller Area Network)に接続して構成される車載制御システムについてのセキュリティ技術が例えば非特許文献1に記載されている。   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).

竹森敬祐、“セキュアエレメントを基点とした車載制御システムの保護 −要素技術の整理と考察−”、電子情報通信学会、信学技報、vol. 114、no. 508、pp. 73-78、2015年3月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

自動車の車載制御システムのECUに適用される更新プログラム等のデータの信頼性を向上させることが一つの課題であった。   One problem has been to improve the reliability of data such as update programs applied to ECUs for in-vehicle control systems of automobiles.

本発明は、このような事情を考慮してなされたものであり、ECU等の車載コンピュータに適用されるデータの信頼性を向上させることができるデータ提供システム、データ提供装置、車載コンピュータ、データ提供方法、及びコンピュータプログラムを提供することを課題とする。   The present invention has been made in consideration of such circumstances, and is a data providing system, a data providing apparatus, an in-vehicle computer, and data provision that can improve the reliability of data applied to an in-vehicle computer such as an ECU. It is an object to provide a method and a computer program.

(1)本発明の一態様は、車両に搭載される車載コンピュータと、データ提供装置と、を備え、前記車載コンピュータは、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶部を備え、前記データ提供装置は、前記マスタ鍵を記憶する第2記憶部と、前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成部と、前記初期鍵生成部が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算部と、前記車載コンピュータに適用されるデータと、前記第1期待値計算部が計算した前記期待値とを前記車両へ提供する提供部と、を備え、前記車載コンピュータは、前記提供部から提供された前記データの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算部と、前記提供部から提供された前記期待値と、前記第2期待値計算部が計算した前記期待値とを比較する期待値検証部と、を備える、データ提供システムである。
(2)本発明の一態様は、上記(1)のデータ提供システムにおいて、前記提供部は、前記データと前記期待値とを、通信回線を介して前記車両へ送信する、データ提供システムである。
(3)本発明の一態様は、上記(1)のデータ提供システムにおいて、前記提供部は、前記データと前記期待値とを、前記車両の診断ポートを介して前記車両へ送信する、データ提供システムである。
(4)本発明の一態様は、上記(1)のデータ提供システムにおいて、前記データ提供装置は前記車両に備わる、データ提供システムである。
(5)本発明の一態様は、上記(1)のデータ提供システムにおいて、前記データ提供装置は、前記車両に備わる通信装置である、データ提供システムである。
(6)本発明の一態様は、上記(1)のデータ提供システムにおいて、前記データ提供装置は、前記車両に備わる車載コンピュータである、データ提供システムである。
(1) One aspect of the present invention includes an in-vehicle computer mounted on a vehicle and a data providing device, and the in-vehicle computer stores an initial key generated from a master key and its own in-vehicle computer identifier. A first storage unit, and the data providing device includes the second storage unit that stores the master key, the in-vehicle computer identifier of the in-vehicle computer, and the master key stored in the second storage unit. An initial key generation unit that generates an initial key of the computer, and a first expected value that calculates an expected value of data applied to the in-vehicle computer using the initial key of the in-vehicle computer generated by the initial key generation unit A calculation unit; and a provision unit that provides the vehicle with data applied to the in-vehicle computer and the expected value calculated by the first expected value calculation unit. The in-vehicle computer includes a second expected value calculation unit that calculates an expected value of the data provided from the providing unit using the initial key stored in the first storage unit, and the providing unit. An expected value verification unit that compares the provided expected value with the expected value calculated by the second expected value calculation unit.
(2) One aspect of the present invention is the data providing system according to (1), wherein the providing unit transmits the data and the expected value to the vehicle via a communication line. .
(3) According to one aspect of the present invention, in the data providing system according to (1), the providing unit transmits the data and the expected value to the vehicle via a diagnostic port of the vehicle. System.
(4) One aspect of the present invention is the data providing system according to (1), wherein the data providing apparatus is provided in the vehicle.
(5) One aspect of the present invention is the data providing system according to (1), wherein the data providing device is a communication device provided in the vehicle.
(6) One aspect of the present invention is the data providing system according to (1), wherein the data providing device is an in-vehicle computer provided in the vehicle.

(7)本発明の一態様は、車両に搭載される車載コンピュータに備わる初期鍵の生成において前記車載コンピュータの車載コンピュータ識別子と共に使用されるマスタ鍵を記憶する第2記憶部と、前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成部と、前記初期鍵生成部が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算部と、前記車載コンピュータに適用されるデータと、前記第1期待値計算部が計算した前記期待値とを前記車両へ提供する提供部と、を備えるデータ提供装置である。 (7) According to one aspect of the present invention, a second storage unit that stores a master key used together with an in-vehicle computer identifier of the in-vehicle computer in generating an initial key provided in the in-vehicle computer mounted on the vehicle; Using an in-vehicle computer identifier and an initial key generation unit that generates an initial key of the in-vehicle computer from the master key stored in the second storage unit, and an initial key of the in-vehicle computer generated by the initial key generation unit Then, a first expected value calculation unit that calculates an expected value of data applied to the in-vehicle computer, data applied to the in-vehicle computer, and the expected value calculated by the first expected value calculation unit. And a providing unit that provides the vehicle.

(8)本発明の一態様は、車両に搭載される車載コンピュータにおいて、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶部と、上記(7)のデータ提供装置の提供部から提供されたデータの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算部と、前記提供部から前記データと共に提供された期待値と、前記第2期待値計算部が計算した前記期待値とを比較する期待値検証部と、を備える車載コンピュータである。 (8) According to one aspect of the present invention, in the in-vehicle computer mounted on the vehicle, the first storage unit that stores the initial key generated from the master key and the own in-vehicle computer identifier, and the data provision of (7) above A second expected value calculation unit that calculates the expected value of the data provided from the providing unit of the apparatus by using the initial key stored in the first storage unit; and provided from the providing unit together with the data And an expected value verification unit that compares the expected value calculated by the second expected value calculation unit with the expected value.

(9)本発明の一態様は、車両に搭載される車載コンピュータと、データ提供装置と、を備えるデータ提供システムのデータ提供方法であって、前記車載コンピュータが、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を第1記憶部に記憶する第1記憶ステップと、前記データ提供装置が、前記マスタ鍵を第2記憶部に記憶する第2記憶ステップと、前記データ提供装置が、前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成ステップと、前記データ提供装置が、前記初期鍵生成ステップにより生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算ステップと、前記データ提供装置が、前記車載コンピュータに適用されるデータと、前記第1期待値計算ステップにより計算した前記期待値とを前記車両へ提供する提供ステップと、前記車載コンピュータが、前記提供ステップにより提供された前記データの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算ステップと、前記車載コンピュータが、前記提供ステップにより提供された前記期待値と、前記第2期待値計算ステップにより計算した前記期待値とを比較する期待値検証ステップと、を含むデータ提供方法である。 (9) One aspect of the present invention is a data providing method of a data providing system including an in-vehicle computer mounted on a vehicle and a data providing device, wherein the in-vehicle computer has a master key and its own in-vehicle computer identifier. A first storage step of storing the initial key generated from the first storage unit, a second storage step of storing the master key in the second storage unit, the data providing device, An initial key generation step of generating an initial key of the in-vehicle computer from the in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage unit, and the data providing device includes the initial key generation step A first value for calculating an expected value of data applied to the in-vehicle computer using the generated initial key of the in-vehicle computer A waiting value calculating step, a providing step in which the data providing device provides data applied to the in-vehicle computer and the expected value calculated in the first expected value calculating step to the vehicle; A second expected value calculating step of calculating the expected value of the data provided by the providing step using the initial key stored in the first storage unit; and the in-vehicle computer, the providing step A data providing method including an expected value verification step of comparing the expected value provided by the second expected value calculation step with the expected value calculated by the second expected value calculation step.

(10)本発明の一態様は、データ提供装置のコンピュータに、車両に搭載される車載コンピュータに備わる初期鍵の生成において前記車載コンピュータの車載コンピュータ識別子と共に使用されるマスタ鍵を記憶する第2記憶機能と、前記車載コンピュータの車載コンピュータ識別子と前記第2記憶機能が記憶している前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成機能と、前記初期鍵生成機能が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算機能と、前記車載コンピュータに適用されるデータと、前記第1期待値計算機能が計算した前記期待値とを前記車両へ提供する提供機能と、を実現させるためのコンピュータプログラムである。 (10) One aspect of the present invention is the second memory for storing, in the computer of the data providing apparatus, a master key used together with the in-vehicle computer identifier of the in-vehicle computer in generating an initial key provided in the in-vehicle computer mounted in the vehicle. An initial key generation function for generating an initial key of the in-vehicle computer from a function, an in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage function, and the initial key generation function generated by the initial key generation function A first expected value calculation function for calculating an expected value of data applied to the in-vehicle computer using an initial key of the in-vehicle computer, data applied to the in-vehicle computer, and the first expected value calculation function. A computer program for realizing a providing function of providing the calculated expected value to the vehicle A.

(11)本発明の一態様は、車両に搭載される車載コンピュータに、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶機能と、上記(7)に記載のデータ提供装置の提供部から提供されたデータの期待値を、前記第1記憶機能が記憶している前記初期鍵を使用して計算する第2期待値計算機能と、前記提供部から前記データと共に提供された期待値と、前記第2期待値計算機能が計算した前記期待値とを比較する期待値検証機能と、を実現させるためのコンピュータプログラムである。 (11) According to one aspect of the present invention, a first storage function for storing an initial key generated from a master key and its own in-vehicle computer identifier in an in-vehicle computer mounted on the vehicle, and the above-described (7) A second expected value calculation function for calculating the expected value of the data provided from the providing unit of the data providing apparatus using the initial key stored in the first storage function; together with the data from the providing unit A computer program for realizing an expected value verification function for comparing a provided expected value with the expected value calculated by the second expected value calculation function.

本発明によれば、ECU等の車載コンピュータに適用されるデータの信頼性を向上させることができるという効果が得られる。   According to the present invention, it is possible to improve the reliability of data applied to an in-vehicle computer such as an ECU.

一実施形態に係る自動車1001の構成例を示す図である。It is a figure which shows the structural example of the motor vehicle 1001 which concerns on one Embodiment. 一実施形態に係るサーバ装置1300の構成例を示す図である。It is a figure which shows the structural example of the server apparatus 1300 which concerns on one Embodiment. 一実施形態に係る第1のECU1010の構成例を示す図である。It is a figure which shows the structural example of 1st ECU1010 which concerns on one Embodiment. 一実施形態に係る第2のECU1020の構成例を示す図である。It is a figure which shows the structural example of 2nd ECU1020 which concerns on one Embodiment. 一実施形態に係るECUコードの提供手順の例を示すシーケンスチャートである。It is a sequence chart which shows the example of the provision procedure of ECU code which concerns on one Embodiment. 一実施形態に係る自動車1001の構成例を示す図である。It is a figure which shows the structural example of the motor vehicle 1001 which concerns on one Embodiment. 一実施形態に係るメンテナンスツール1200の構成例を示す図である。It is a figure showing an example of composition of maintenance tool 1200 concerning one embodiment. 一実施形態に係るECUコードの提供手順の例を示すシーケンスチャートである。It is a sequence chart which shows the example of the provision procedure of ECU code which concerns on one Embodiment. 一実施形態に係る自動車1001の構成例を示す図である。It is a figure which shows the structural example of the motor vehicle 1001 which concerns on one Embodiment. 一実施形態に係るTCU1050の構成例を示す図である。It is a figure which shows the structural example of TCU1050 which concerns on one Embodiment. 一実施形態に係るECUコードの提供手順の例を示すシーケンスチャートである。It is a sequence chart which shows the example of the provision procedure of ECU code which concerns on one Embodiment. 一実施形態に係る第1のECU1010の構成例を示す図である。It is a figure which shows the structural example of 1st ECU1010 which concerns on one Embodiment. 一実施形態に係るECUコードの提供手順の例を示すシーケンスチャートである。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.

[第1実施形態]
図1は、本実施形態に係る自動車1001の構成例を示す図である。本実施形態では、自動車1001に搭載されるECU(電子制御装置)に対して、更新プログラム等のデータを適用する場合を例に挙げて説明する。
[First Embodiment]
FIG. 1 is a diagram illustrating a configuration example of an automobile 1001 according to the present embodiment. In the present embodiment, a case where data such as an update program is applied to an ECU (electronic control unit) mounted on the automobile 1001 will be described as an example.

図1において、自動車1001は、第1のECU1010と複数の第2のECU1020とを備える。第1のECU1010及び第2のECU1020は、自動車1001に備わる車載コンピュータである。第1のECU1010は、自動車1001に搭載されたECUのうち、ゲートウェイ機能を有するECUである。第2のECU1020は、自動車1001に搭載されたECUのうち、エンジン制御等の機能を有するECUである。第2のECU1020として、例えば、エンジン制御機能を有するECU、ハンドル制御機能を有するECU、ブレーキ制御機能を有するECUなどがある。   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.

第1のECU1010と複数の第2のECU1020は、自動車1001に備わるCAN(Controller Area Network)1030に接続される。CAN1030は通信ネットワークである。CANは車両に搭載される通信ネットワークの一つとして知られている。   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.

第1のECU1010は、CAN1030を介して、各第2のECU1020との間でデータを交換する。第2のECU1020は、CAN1030を介して、他の第2のECU1020との間でデータを交換する。   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.

なお、車両に搭載される通信ネットワークとして、CAN以外の通信ネットワークを自動車1001に備え、CAN以外の通信ネットワークを介して、第1のECU1010と第2のECU1020との間のデータの交換、及び、第2のECU1020同士の間のデータの交換が行われてもよい。例えば、LIN(Local Interconnect Network)を自動車1001に備えてもよい。また、CANとLINとを自動車1001に備えてもよい。また、自動車1001において、LINに接続する第2のECU1020を備えてもよい。また、第1のECU1010は、CANとLINとに接続されてもよい。また、第1のECU1010は、CANを介して該CANに接続される第2のECU1020との間でデータを交換し、また、LINを介して該LINに接続される第2のECU1020との間でデータを交換してもよい。また、第2のECU1020同士が、LINを介してデータを交換してもよい。   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.

自動車1001は診断ポート1060を備える。診断ポート1060として、例えばOBD(On-board Diagnostics)ポートを使用してもよい。診断ポート1060には診断端末1065を接続可能である。診断ポート1060は第1のECU1010に接続される。第1のECU1010と診断ポート1060に接続された診断端末1065とは、診断ポート1060を介して、データを交換する。   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 diagnostic terminal 1065 can be connected to the diagnostic port 1060. Diagnostic port 1060 is connected to first ECU 1010. The first ECU 1010 and the diagnostic terminal 1065 connected to the diagnostic port 1060 exchange data via the diagnostic port 1060.

自動車1001はインフォテイメント(Infotainment)機器1040を備える。インフォテイメント機器1040として、例えば、ナビゲーション機能、位置情報サービス機能、音楽や動画などのマルチメディア再生機能、音声通信機能、データ通信機能、インターネット接続機能などを有するものが挙げられる。インフォテイメント機器1040は第1のECU1010に接続される。第1のECU1010は、インフォテイメント機器1040から入力された情報を第2のECU1020へ送信する。   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.

自動車1001は、TCU(Tele Communication Unit)1050を備える。TCU1050は通信装置である。TCU1050は通信モジュール1051を備える。通信モジュール1051は、無線通信ネットワークを利用して無線通信を行う。通信モジュール1051は、SIM(Subscriber Identity Module)1052を備える。SIM1052は、無線通信ネットワークを利用するための情報が書き込まれたSIMである。通信モジュール1051は、SIM1052を使用することにより該無線通信ネットワークに接続して無線通信を行うことができる。なお、SIM1052として、eSIM(Embedded Subscriber Identity Module)を使用してもよい。   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.

TCU1050は第1のECU1010に接続される。第1のECU1010は、TCU1050の通信モジュール1051とデータを交換する。   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.

なお、図1の構成では第1のECU1010とTCU1050を直接接続することにより第1のECU1010と通信モジュール1051の間でデータを交換するが、これに限定されない。例えば、TCU1050をインフォテイメント機器1040に接続し、第1のECU1010が、インフォテイメント機器1040を介して、TCU1050の通信モジュール1051とデータを交換してもよい。又は、診断端末1065の代わりにTCU1050を診断ポート1060に接続し、第1のECU1010が、診断ポート1060を介して、該診断ポート1060に接続されたTCU1050の通信モジュール1051とデータを交換してもよい。又は、第1のECU1010が、SIM1052を含む通信モジュール1051を備えてもよい。第1のECU1010がSIM1052を含む通信モジュール1051を備える場合には、自動車1001はTCU1050を備えなくてもよい。   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, even if the TCU 1050 is connected to the diagnostic port 1060 instead of the diagnostic terminal 1065 and the first ECU 1010 exchanges data with the communication module 1051 of the TCU 1050 connected to the diagnostic port 1060 via the diagnostic port 1060. Good. 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.

第1のECU1010は、メイン演算器1011とHSM(Hardware Security Module)1012を備える。メイン演算器1011は、第1のECU1010の機能を実現させるためのコンピュータプログラムを実行する。HSM1012は暗号処理機能等を有する。HSM1012は耐タンパー性(Tamper Resistant)を有する。HSM1012はセキュアエレメント(Secure Element:SE)の例である。HSM1012は、鍵等のデータを記憶する記憶部1013を備える。メイン演算器1011はHSM1012を使用する。   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.

第2のECU1020は、メイン演算器1021とSHE(Secure Hardware Extension)1022を備える。メイン演算器1021は、第2のECU1020の機能を実現させるためのコンピュータプログラムを実行する。SHE1022は暗号処理機能等を有する。SHE1022は耐タンパー性を有する。SHE1022はセキュアエレメントの例である。SHE1022は、鍵等のデータを記憶する記憶部1023を備える。メイン演算器1021はSHE1022を使用する。   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.

自動車1001に備わる車載コンピュータシステム1002は、第1のECU1010と複数の第2のECU1020とがCAN1030に接続されて構成される。第1のECU1010は、ゲートウェイ機能を有し、車載コンピュータシステム1002の内部と外部の間の通信を監視する。本実施形態において、車載コンピュータシステム1002は、自動車1001の車載制御システムとして機能する。   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.

以下の説明において、第1のECU1010と第2のECU1020とを特に区別しないときは単にECUと称する。   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.

サーバ装置1300は、通信回線を介して、自動車1001のTCU1050の通信モジュール1051とデータを送受する。サーバ装置1300は、自動車1001のTCU1050の通信モジュール1051が利用する無線通信ネットワークを介して、該通信モジュール1051とデータを送受する。又は、サーバ装置1300は、インターネット等の通信ネットワークと該無線通信ネットワークとを介して、該通信モジュール1051とデータを送受してもよい。また、例えば、サーバ装置1300と通信モジュール1051との間をVPN(Virtual Private Network)回線等の専用回線で接続し、該専用回線でデータを送受してもよい。例えば、SIM1052に対応する無線通信ネットワークによって、VPN回線等の専用回線が提供されてもよい。   Server device 1300 sends and receives data to and from communication module 1051 of TCU 1050 of automobile 1001 via a communication line. Server apparatus 1300 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 1300 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 device 1300 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 and 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.

サーバ装置1300は、ECUに適用されるECUコード(ECU code)を自動車1001へ提供する。ECUコードは、ECUに適用されるデータの例である。ECUコードは、ECUにインストールされる更新プログラム等のコンピュータプログラムであってもよく、又は、ECUに設定されるパラメータ設定値などの設定データであってもよい。   Server device 1300 provides vehicle 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.

図2は、サーバ装置1300の構成例を示す図である。図2において、サーバ装置1300は、通信部11と記憶部12と期待値計算部13と検証部14と初期鍵生成部15とを備える。通信部11は、通信回線を介して、他の装置と通信を行う。記憶部12は、鍵等のデータを記憶する。期待値計算部13は、ECUコードについての期待値を計算する。検証部14は、電子署名等の検証を行う。初期鍵生成部15は、ECUの初期鍵を生成する。   FIG. 2 is a diagram illustrating a configuration example of the server device 1300. In FIG. 2, the server device 1300 includes a communication unit 11, a storage unit 12, an expected value calculation unit 13, a verification unit 14, and an initial key generation unit 15. The communication unit 11 communicates with other devices via a communication line. The storage unit 12 stores data such as keys. The expected value calculation unit 13 calculates an expected value for the ECU code. The verification unit 14 verifies an electronic signature or the like. The initial key generation unit 15 generates an initial key for the ECU.

サーバ装置1300の機能は、該サーバ装置1300が備えるCPUがコンピュータプログラムを実行することにより実現される。なお、サーバ装置1300として、汎用のコンピュータ装置を使用して構成してもよく、又は、専用のハードウェア装置として構成してもよい。   The functions of the server device 1300 are realized by a CPU provided in the server device 1300 executing a computer program. The server device 1300 may be configured using a general-purpose computer device, or may be configured as a dedicated hardware device.

図3は、第1のECU1010の構成例を示す図である。図3において、第1のECU1010は、メイン演算器1011とHSM1012とインタフェース部20とを備える。メイン演算器1011は、制御部21と記憶部22とを備える。HSM1012は、記憶部1013と期待値計算部31と検証部32とを備える。   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, an expected value calculation unit 31, and a verification unit 32.

インタフェース部20は、CAN1030を介してデータを送受するインタフェースと、インフォテイメント機器1040とデータを送受するインタフェースと、TCU1050とデータを送受するインタフェースと、診断ポート1060を介してデータを送受するインタフェースとを備える。メイン演算器1011は、インタフェース部20を介して、第1のECU1010以外の他の装置とデータの送受を行う。   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.

制御部21は、第1のECU1010の制御を行う。記憶部22は、データを記憶する。記憶部1013は、鍵等のデータを記憶する。期待値計算部31は、ECUコード等のデータの期待値を計算する。検証部32は、期待値の検証を行う。   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 expected value calculation unit 31 calculates an expected value of data such as an ECU code. The verification unit 32 verifies the expected value.

図4は、第2のECU1020の構成例を示す図である。図4において、第2のECU1020は、メイン演算器1021とSHE1022とインタフェース部40とを備える。メイン演算器1021は、制御部41と記憶部42とを備える。SHE1022は、記憶部1023と期待値計算部51と検証部52とを備える。   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, an expected value calculation unit 51, and a verification unit 52.

インタフェース部40は、CAN1030を介してデータを送受するインタフェースを備える。メイン演算器1021は、インタフェース部40を介して、自第2のECU1020以外の他の装置とデータの送受を行う。   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.

制御部41は、第2のECU1020の制御を行う。記憶部42は、データを記憶する。記憶部1023は、鍵等のデータを記憶する。期待値計算部51は、ECUコード等のデータの期待値を計算する。検証部52は、期待値の検証を行う。   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 expected value calculation unit 51 calculates an expected value of data such as an ECU code. The verification unit 52 verifies the expected value.

次に図5を参照して、本実施形態に係るECUコードの提供の手順の例を説明する。図5は、ECUコードの提供手順の例を示すシーケンスチャートである。なお、図5に示されるECUコード提供手順の例では、第2のECU1020に適用されるECUコードを例に挙げるが、第1のECU1010に適用されるECUコードについても、ECUコードの適用先が第1のECU1010になるのみで同様の手順を適用可能である。   Next, an example of a procedure for providing the ECU code according to the present embodiment will be described with reference to FIG. FIG. 5 is a sequence chart illustrating an example of a procedure for providing an ECU code. In the example of the ECU code providing procedure shown in FIG. 5, the ECU code applied to the second ECU 1020 is taken as an example, but the ECU code applied to the first ECU 1010 is also applied to the ECU code. The same procedure can be applied only by becoming the first ECU 1010.

図5において、サーバ装置1300は、マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとを備える。マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとは、記憶部12に格納されている。但し、マスタ鍵Master_Secretは、記憶部12の記憶領域のうちセキュアな記憶領域に格納されることが好ましい。   In FIG. 5, the server device 1300 includes a master key Master_Secret and a server public key certificate Cert_sv. The master key Master_Secret and the server public key certificate Cert_sv are stored in the storage unit 12. However, the master key Master_Secret is preferably stored in a secure storage area in the storage area of the storage unit 12.

第2のECU1020のSHE1022は、該第2のECU1020の初期鍵Key_ecuを備える。第2のECU1020の初期鍵Key_ecuは、該第2のECU1020のSHE1022の記憶部1023に格納される。第2のECU1020の初期鍵Key_ecuは、予め、該第2のECU1020のSHE1022に書き込まれる。例えば、第2のECU1020の製造時などに、初期鍵Key_ecuが該第2のECU1020のSHE1022に書き込まれる。   The SHE 1022 of the second ECU 1020 includes the initial key Key_ecu of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is stored in the storage unit 1023 of the SHE 1022 of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is written in advance in the SHE 1022 of the second ECU 1020. For example, when the second ECU 1020 is manufactured, the initial key Key_ecu is written in the SHE 1022 of the second ECU 1020.

初期鍵Key_ecuの生成方法は、予め決められている。本実施形態では、初期鍵Key_ecuの生成方法の一例として、マスタ鍵Master_Secretと、ECUの識別子(ECU識別子)ECU_IDとからダイジェスト値を算出する。本実施形態では、第2のECU1020の初期鍵Key_ecuは、マスタ鍵Master_Secretと、該第2のECU1020のECU識別子ECU_IDとを使用して算出されるダイジェスト値である。ダイジェスト値として、例えば、ハッシュ(hash)関数により算出される値や排他的論理和演算により算出される値などが挙げられる。   A method for generating the initial key Key_ecu is determined in advance. In the present embodiment, as an example of a method for generating the initial key Key_ecu, a digest value is calculated from a master key Master_Secret and an ECU identifier (ECU identifier) ECU_ID. In the present embodiment, the initial key Key_ecu of the second ECU 1020 is a digest value calculated using the master key Master_Secret and the ECU identifier ECU_ID of the second ECU 1020. Examples of the digest value include a value calculated by a hash function and a value calculated by an exclusive OR operation.

なお、第1のECU1010の初期鍵Key_ecuについても、第2のECU1020と同様に、予め、該第1のECU1010のHSM1012に格納される。第1のECU1010の初期鍵Key_ecuは、該第1のECU1010のHSM1012の記憶部1013に格納される。   Note that the initial key Key_ecu of the first ECU 1010 is also stored in advance in the HSM 1012 of the first ECU 1010 in the same manner as the second ECU 1020. The initial key Key_ecu of the first ECU 1010 is stored in the storage unit 1013 of the HSM 1012 of the first ECU 1010.

(ステップS101)自動車1001へ提供するECUコードには、予め、サーバ公開鍵証明書Cert_svに対応する秘密鍵によって電子署名が付される。サーバ装置1300の検証部14は、自動車1001へ提供するECUコードに付されている電子署名を、記憶部12に格納されているサーバ公開鍵証明書Cert_svを使用して検証する。サーバ装置1300は、該電子署名の検証が合格である場合にステップS102以降に処理を進める。一方、サーバ装置1300は、該電子署名の検証が不合格である場合には当該ECUコードの提供を停止する。なお、自動車1001へ提供するECUコードの正当性が確かである場合には、該電子署名の検証はなくてもよい。 (Step S101) The ECU code to be provided to the automobile 1001 is preliminarily attached with an electronic signature using a private key corresponding to the server public key certificate Cert_sv. The verification unit 14 of the server device 1300 verifies the electronic signature attached to the ECU code provided to the automobile 1001 using the server public key certificate Cert_sv stored in the storage unit 12. If the verification of the electronic signature is successful, the server apparatus 1300 advances the process to step S102 and subsequent steps. On the other hand, the server device 1300 stops providing the ECU code when the verification of the electronic signature fails. When the ECU code provided to the automobile 1001 is valid, the electronic signature need not be verified.

(ステップS102)サーバ装置1300の通信部11は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDの要求メッセージ(ECU識別子要求メッセージ)を、自動車1001へ送信する。自動車1001において、通信モジュール1051により受信されたECU識別子要求メッセージは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S102) Communication unit 11 of server device 1300 transmits to ECU 1001 a request message (ECU identifier request message) of ECU identifier ECU_ID of second ECU 1020 to which the ECU code is applied. In the automobile 1001, the ECU identifier request message received by the communication module 1051 is transferred to the second ECU 1020 to which the ECU code is applied via the first ECU 1010.

(ステップS103)第2のECU1020の制御部41は、ECU識別子要求メッセージを受信すると、自己のECU識別子ECU_IDを返信する。該第2のECU1020のECU識別子ECU_IDは、第1のECU1010を介して通信モジュール1051へ転送される。通信モジュール1051は、該転送されたECU識別子ECU_IDをサーバ装置1300へ送信する。サーバ装置1300は、該通信モジュール1051から送信されたECU識別子ECU_ID、すなわちECUコードの適用先の第2のECU1020のECU識別子ECU_IDを、通信部11によって受信する。 (Step S103) Upon receiving the ECU identifier request message, the control unit 41 of the second ECU 1020 returns its own ECU identifier ECU_ID. The ECU identifier ECU_ID of the second ECU 1020 is transferred to the communication module 1051 via the first ECU 1010. The communication module 1051 transmits the transferred ECU identifier ECU_ID to the server device 1300. The server device 1300 receives the ECU identifier ECU_ID transmitted from the communication module 1051, that is, the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied, by the communication unit 11.

なお、サーバ装置1300が、予め、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得する場合には、上述したステップS102とステップS103は不要である。例えば、サーバ装置1300が自動車1001の第2のECU1020のECU識別子ECU_IDのリストを管理している場合には、サーバ装置1300は、該リストから、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得してもよい。   When server device 1300 acquires the ECU identifier ECU_ID of second ECU 1020 to which the ECU code is applied in advance, steps S102 and S103 described above are not necessary. For example, when the server apparatus 1300 manages a list of ECU identifiers ECU_ID of the second ECU 1020 of the automobile 1001, the server apparatus 1300 uses the ECU identifier of the second ECU 1020 to which the ECU code is applied from the list. ECU_ID may be acquired.

(ステップS104)サーバ装置1300の初期鍵生成部15は、記憶部12に格納されているマスタ鍵Master_Secretと、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDとを使用して、該ECUコードの適用先の第2のECU1020の初期鍵Key_ecuを生成する。 (Step S104) The initial key generation unit 15 of the server apparatus 1300 uses the master key Master_Secret stored in the storage unit 12 and the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied, to the ECU An initial key Key_ecu of the second ECU 1020 to which the code is applied is generated.

(ステップS105)サーバ装置1300の期待値計算部13は、初期鍵生成部15が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードの期待値を計算する。本実施形態では、期待値の一例として、CMAC(Cipher-based Message Authentication Code)を使用する。よって、期待値計算部13は、初期鍵生成部15が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードのCMACを計算する。 (Step S <b> 105) The expected value calculation unit 13 of the server device 1300 calculates the expected value of the ECU code provided to the automobile 1001 using the initial key Key_ecu generated by the initial key generation unit 15. In the present embodiment, CMAC (Cipher-based Message Authentication Code) is used as an example of an expected value. Therefore, the expected value calculation unit 13 calculates the CMAC of the ECU code to be provided to the automobile 1001 using the initial key Key_ecu generated by the initial key generation unit 15.

(ステップS106)サーバ装置1300の通信部11は、ECUコードと期待値計算部13が計算した該ECUコードのCMACとを、自動車1001へ送信する。自動車1001において、通信モジュール1051により受信されたECUコードと該ECUコードのCMACとは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S106) The communication unit 11 of the server apparatus 1300 transmits the ECU code and the CMAC of the ECU code calculated by the expected value calculation unit 13 to the automobile 1001. In the automobile 1001, the ECU code received by the communication module 1051 and the CMAC of the ECU code are transferred via the first ECU 1010 to the second ECU 1020 to which the ECU code is applied.

(ステップS107)第2のECU1020の制御部41は、ECUコードと該ECUコードのCMACとを受信すると、該ECUコードをSHE1022へ渡してCMACの計算を要求する。SHE1022の期待値計算部51は、記憶部1023に格納されている初期鍵Key_ecuを使用して、該ECUコードのCMACを計算する。SHE1022は、期待値計算部51が計算したCMACを制御部41へ渡す。 (Step S107) When the control unit 41 of the second ECU 1020 receives the ECU code and the CMAC of the ECU code, the control unit 41 passes the ECU code to the SHE 1022 and requests calculation of the CMAC. The expected value calculation unit 51 of the SHE 1022 calculates the CMAC of the ECU code using the initial key Key_ecu stored in the storage unit 1023. The SHE 1022 passes the CMAC calculated by the expected value calculation unit 51 to the control unit 41.

(ステップS108)第2のECU1020の制御部41は、第1のECU1010を介してECUコードと共に受信したCMACと、SHE1022によって計算したCMACとを比較する。この比較の結果、両者が一致する場合にはCMACの検証が合格であり、両者が一致しない場合にはCMACの検証が不合格である。制御部41は、該CMACの検証が合格である場合にステップS109以降に処理を進める。一方、制御部41は、該CMACの検証が不合格である場合には当該ECUコードの適用を停止する。 (Step S108) The control unit 41 of the second ECU 1020 compares the CMAC received together with the ECU code via the first ECU 1010 with the CMAC calculated by the SHE 1022. As a result of the comparison, if the two match, the CMAC verification is passed, and if the two do not match, the CMAC verification fails. When the verification of the CMAC is successful, the control unit 41 proceeds with the process after step S109. On the other hand, when the verification of the CMAC fails, the control unit 41 stops the application of the ECU code.

(ステップS109)第2のECU1020の制御部41は、第1のECU1010を介して受信したECUコードを適用する。また、制御部41は、第1のECU1010を介して該ECUコードと共に受信したCMACをSHE1022へ渡し、該CMACをセキュアブート期待値に登録することを要求する。SHE1022は、該要求に応じて、該CMACをセキュアブート期待値に登録する。 (Step S109) The control unit 41 of the second ECU 1020 applies the ECU code received via the first ECU 1010. In addition, the control unit 41 passes the CMAC received together with the ECU code via the first ECU 1010 to the SHE 1022, and requests that the CMAC be registered in the secure boot expected value. In response to the request, the SHE 1022 registers the CMAC in the secure boot expected value.

(ステップS110)第2のECU1020の制御部41は、ECUコードの適用後に、セキュアブートを実行する。このセキュアブートでは、制御部41は、ECUコードをSHE1022に渡してセキュアブートにおけるCMACの検証を要求する。SHE1022の検証部52は、記憶部1023に格納されている初期鍵Key_ecuを使用して、該ECUコードのCMACを計算する。次いで、SHE1022の検証部52は、該計算結果のCMACと、セキュアブート期待値とを比較する。この比較の結果、両者が一致する場合にはセキュアブートにおけるCMACの検証が合格であり、両者が一致しない場合にはセキュアブートにおけるCMACの検証が不合格である。SHE1022は、該セキュアブートにおけるCMACの検証結果を制御部41へ応答する。制御部41は、該セキュアブートにおけるCMACの検証が合格である場合に当該ECUコードの実行を進める。一方、制御部41は、該セキュアブートにおけるCMACの検証が不合格である場合には当該ECUコードの実行を停止する。 (Step S110) The control unit 41 of the second ECU 1020 performs a secure boot after the application of the ECU code. In this secure boot, the control unit 41 passes the ECU code to the SHE 1022 and requests CMAC verification in the secure boot. The verification unit 52 of the SHE 1022 calculates the CMAC of the ECU code using the initial key Key_ecu stored in the storage unit 1023. Next, the verification unit 52 of the SHE 1022 compares the CMAC of the calculation result with the secure boot expected value. As a result of the comparison, if the two match, the CMAC verification in the secure boot is passed, and if the two do not match, the CMAC verification in the secure boot fails. The SHE 1022 responds to the control unit 41 with the CMAC verification result in the secure boot. The control unit 41 advances the execution of the ECU code when the CMAC verification in the secure boot is acceptable. On the other hand, when the verification of CMAC in the secure boot fails, the control unit 41 stops the execution of the ECU code.

(ステップS111)第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果を第1のECU1010へ送信する。該セキュアブートにおけるCMACの検証結果は、第1のECU1010を介して通信モジュール1051へ転送される。通信モジュール1051は、該転送されたセキュアブートにおけるCMACの検証結果をサーバ装置1300へ送信する。サーバ装置1300は、該通信モジュール1051から送信されたセキュアブートにおけるCMACの検証結果を、通信部11によって受信する。 (Step S111) The control unit 41 of the second ECU 1020 transmits the CMAC verification result in the secure boot to the first ECU 1010. The CMAC verification result in the secure boot is transferred to the communication module 1051 via the first ECU 1010. The communication module 1051 transmits the CMAC verification result in the transferred secure boot to the server apparatus 1300. The server apparatus 1300 receives the CMAC verification result in the secure boot transmitted from the communication module 1051 by the communication unit 11.

(ステップS112)サーバ装置1300の検証部14は、自動車1001の通信モジュール1051から受信したセキュアブートにおけるCMACの検証結果に基づいて、該自動車1001へ提供したECUコードの適用の成否を判定する。セキュアブートにおけるCMACの検証結果が合格である場合には該ECUコードの適用が成功であり、セキュアブートにおけるCMACの検証結果が不合格である場合には該ECUコードの適用が失敗である。 (Step S112) The verification unit 14 of the server apparatus 1300 determines whether the application of the ECU code provided to the automobile 1001 is successful based on the CMAC verification result in the secure boot received from the communication module 1051 of the automobile 1001. When the verification result of CMAC in secure boot is acceptable, the application of the ECU code is successful, and when the verification result of CMAC in secure boot is unacceptable, the application of the ECU code is unsuccessful.

なお、第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果に、ステップS107でSHE1022によって計算したCMACを含めてもよい。この場合、サーバ装置1300の検証部14は、セキュアブートにおけるCMACの検証結果に含まれるCMACと、ステップS106で自動車1001へECUコードと共に送信した該ECUコードのCMACとを比較し、この比較結果に基づいて該自動車1001へ提供したECUコードの適用の成否を判定してもよい。該比較結果が一致である場合には該ECUコードの適用が成功であり、該比較結果が一致しない場合には該ECUコードの適用が失敗である。   Note that the control unit 41 of the second ECU 1020 may include the CMAC calculated by the SHE 1022 in step S107 in the CMAC verification result in the secure boot. In this case, the verification unit 14 of the server device 1300 compares the CMAC included in the CMAC verification result in the secure boot with the CMAC of the ECU code transmitted together with the ECU code to the automobile 1001 in step S106, and the comparison result The success or failure of application of the ECU code provided to the automobile 1001 may be determined based on this. When the comparison result is coincident, the application of the ECU code is successful, and when the comparison result is not coincident, the application of the ECU code is unsuccessful.

上述した第1実施形態によれば、サーバ装置1300がECUコードの適用先のECUの初期鍵を生成し、該生成した初期鍵を使用してECUコードの期待値を生成し、ECUコードと該生成した期待値とを自動車1001へ提供する。自動車1001のECUは、ECUコードと共に受信した期待値を自己の初期鍵を使用して検証する。これにより、自動車1001のECUに適用されるECUコードの信頼性を向上させることができる。   According to the first embodiment described above, the server apparatus 1300 generates an initial key of the ECU to which the ECU code is applied, generates an expected value of the ECU code using the generated initial key, The generated expected value is provided to the automobile 1001. The ECU of the automobile 1001 verifies the expected value received together with the ECU code using its own initial key. Thereby, the reliability of the ECU code applied to the ECU of the automobile 1001 can be improved.

第1実施形態において、サーバ装置1300はデータ提供装置に対応し、通信部11は提供部に対応する。また、上述した図5の例において、第2のECU1020の制御部41は期待値検証部に対応する。   In the first embodiment, the server device 1300 corresponds to a data providing device, and the communication unit 11 corresponds to a providing unit. In the example of FIG. 5 described above, the control unit 41 of the second ECU 1020 corresponds to an expected value verification unit.

[第2実施形態]
図6は、本実施形態に係る自動車1001の構成例を示す図である。本実施形態では、自動車1001に搭載されるECU(電子制御装置)に対して、更新プログラム等のデータを適用する場合を例に挙げて説明する。
[Second Embodiment]
FIG. 6 is a diagram illustrating a configuration example of an automobile 1001 according to the present embodiment. In the present embodiment, a case where data such as an update program is applied to an ECU (electronic control unit) mounted on the automobile 1001 will be described as an example.

図6において、図1の各部に対応する部分には同一の符号を付け、その説明を省略する。図6に示す自動車の構成例において、診断ポート1060にはメンテナンスツール(maintenance tool)1200を接続可能である。第1のECU1010と診断ポート1060に接続されたメンテナンスツール1200とは、診断ポート1060を介して、データを交換する。メンテナンスツール1200は、OBDポートに接続される従来の診断端末の機能を有していてもよい。   In FIG. 6, parts corresponding to those in FIG. In the configuration example of the automobile shown in FIG. 6, a maintenance tool 1200 can be connected to the diagnosis port 1060. The first ECU 1010 and the maintenance tool 1200 connected to the diagnostic port 1060 exchange data via the diagnostic port 1060. The maintenance tool 1200 may have a function of a conventional diagnostic terminal connected to the OBD port.

メンテナンスツール1200は、制御モジュール1201を備える。制御モジュール1201は、IC(Integrated Circuit)チップ1202を備える。ICチップ1202は、鍵等のデータを記憶する記憶部1203を備える。ICチップ1202は耐タンパー性を有する。ICチップ1202はセキュアエレメントの例である。ICチップ1202は、コンピュータの一種であり、コンピュータプログラムによって所望の機能を実現する。   The maintenance tool 1200 includes a control module 1201. The control module 1201 includes an IC (Integrated Circuit) chip 1202. The IC chip 1202 includes a storage unit 1203 that stores data such as keys. The IC chip 1202 has tamper resistance. The IC chip 1202 is an example of a secure element. The IC chip 1202 is a kind of computer and realizes a desired function by a computer program.

サーバ装置1300は、通信回線を介して、メンテナンスツール1200とデータを送受する。例えば、サーバ装置1300とメンテナンスツール1200との間をVPN回線等の専用回線で接続し、該専用回線でデータを送受してもよい。   The server apparatus 1300 transmits and receives data to and from the maintenance tool 1200 via a communication line. For example, the server apparatus 1300 and the maintenance tool 1200 may be connected by a dedicated line such as a VPN line, and data may be transmitted / received through the dedicated line.

サーバ装置1300は、ECUに適用されるECUコードを、メンテナンスツール1200へ提供する。ECUコードは、ECUに適用されるデータの例である。ECUコードは、ECUにインストールされる更新プログラム等のコンピュータプログラムであってもよく、又は、ECUに設定されるパラメータ設定値などの設定データであってもよい。   Server device 1300 provides ECU code applied to the ECU to maintenance tool 1200. 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.

図7は、メンテナンスツール1200の構成例を示す図である。図7において、メンテナンスツール1200は、通信部61と診断ポートインタフェース62と制御モジュール1201とを備える。制御モジュール1201は、制御部71とICチップ1202とを備える。ICチップ1202は、記憶部1203と期待値計算部73と検証部74と初期鍵生成部75とを備える。通信部61は、通信回線を介して、他の装置と通信を行う。診断ポートインタフェース62は、自動車1001の診断ポート1060を介して他の装置とデータを送受する。   FIG. 7 is a diagram illustrating a configuration example of the maintenance tool 1200. In FIG. 7, the maintenance tool 1200 includes a communication unit 61, a diagnostic port interface 62, and a control module 1201. The control module 1201 includes a control unit 71 and an IC chip 1202. The IC chip 1202 includes a storage unit 1203, an expected value calculation unit 73, a verification unit 74, and an initial key generation unit 75. The communication unit 61 communicates with other devices via a communication line. The diagnostic port interface 62 transmits / receives data to / from other devices via the diagnostic port 1060 of the automobile 1001.

制御部71は、メンテナンスツール1200の制御を行う。記憶部1203は、鍵等のデータを記憶する。期待値計算部73は、ECUコードについての期待値を計算する。検証部74は、電子署名等の検証を行う。初期鍵生成部75は、ECUの初期鍵を生成する。   The control unit 71 controls the maintenance tool 1200. The storage unit 1203 stores data such as keys. The expected value calculation unit 73 calculates an expected value for the ECU code. The verification unit 74 verifies an electronic signature or the like. The initial key generation unit 75 generates an initial key for the ECU.

制御部71の機能は、該制御部71が備えるCPUがコンピュータプログラムを実行することにより実現される。ICチップ1202の機能は、該ICチップ1202が備えるCPUがコンピュータプログラムを実行することにより実現される。   The function of the control unit 71 is realized by a CPU provided in the control unit 71 executing a computer program. The function of the IC chip 1202 is realized by the CPU provided in the IC chip 1202 executing a computer program.

次に図8を参照して、本実施形態に係るECUコードの提供の手順の例を説明する。図8は、ECUコードの提供手順の例を示すシーケンスチャートである。なお、図8に示されるECUコード提供手順の例では、第2のECU1020に適用されるECUコードを例に挙げるが、第1のECU1010に適用されるECUコードについても、ECUコードの適用先が第1のECU1010になるのみで同様の手順を適用可能である。   Next, an example of a procedure for providing an ECU code according to the present embodiment will be described with reference to FIG. FIG. 8 is a sequence chart showing an example of a procedure for providing an ECU code. In the example of the ECU code providing procedure shown in FIG. 8, the ECU code applied to the second ECU 1020 is taken as an example, but the ECU code applied to the first ECU 1010 is also applied to the ECU code. The same procedure can be applied only by becoming the first ECU 1010.

図8において、サーバ装置1300は、サーバ秘密鍵Key_sv_sを備える。サーバ秘密鍵Key_sv_sは、記憶部12に格納されている。制御モジュール1201のICチップ1202は、マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとを備える。サーバ公開鍵証明書Cert_svはサーバ秘密鍵Key_sv_sに対応する公開鍵証明書である。マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとは、記憶部1203に格納されている。   In FIG. 8, the server apparatus 1300 includes a server secret key Key_sv_s. The server secret key Key_sv_s is stored in the storage unit 12. The IC chip 1202 of the control module 1201 includes a master key Master_Secret and a server public key certificate Cert_sv. The server public key certificate Cert_sv is a public key certificate corresponding to the server private key Key_sv_s. The master key Master_Secret and the server public key certificate Cert_sv are stored in the storage unit 1203.

第2のECU1020のSHE1022は、該第2のECU1020の初期鍵Key_ecuを備える。第2のECU1020の初期鍵Key_ecuは、該第2のECU1020のSHE1022の記憶部1023に格納される。第2のECU1020の初期鍵Key_ecuは、予め、該第2のECU1020のSHE1022に書き込まれる。例えば、第2のECU1020の製造時などに、初期鍵Key_ecuが該第2のECU1020のSHE1022に書き込まれる。初期鍵Key_ecuの生成方法は、上述の第1実施形態と同じである。   The SHE 1022 of the second ECU 1020 includes the initial key Key_ecu of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is stored in the storage unit 1023 of the SHE 1022 of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is written in advance in the SHE 1022 of the second ECU 1020. For example, when the second ECU 1020 is manufactured, the initial key Key_ecu is written in the SHE 1022 of the second ECU 1020. The method for generating the initial key Key_ecu is the same as that in the first embodiment.

なお、第1のECU1010の初期鍵Key_ecuについても、第2のECU1020と同様に、予め、該第1のECU1010のHSM1012に格納される。第1のECU1010の初期鍵Key_ecuは、該第1のECU1010のHSM1012の記憶部1013に格納される。   Note that the initial key Key_ecu of the first ECU 1010 is also stored in advance in the HSM 1012 of the first ECU 1010 in the same manner as the second ECU 1020. The initial key Key_ecu of the first ECU 1010 is stored in the storage unit 1013 of the HSM 1012 of the first ECU 1010.

(ステップS200)サーバ装置1300は、自動車1001へ提供するECUコードに対して、サーバ秘密鍵Key_sv_sを使用して電子署名を付する。サーバ装置1300の通信部11は、電子署名付きECUコードをメンテナンスツール1200へ送信する。メンテナンスツール1200は、通信部61によって該電子署名付きECUコードを受信する。 (Step S200) The server apparatus 1300 attaches an electronic signature to the ECU code provided to the automobile 1001 using the server secret key Key_sv_s. The communication unit 11 of the server device 1300 transmits the ECU code with the electronic signature to the maintenance tool 1200. The maintenance tool 1200 receives the electronically signed ECU code through the communication unit 61.

(ステップS201)メンテナンスツール1200の制御モジュール1201の制御部71は、通信部61によって受信した電子署名付きECUコードをICチップ1202に渡して電子署名の検証を要求する。ICチップ1202の検証部74は、該電子署名付きECUコードの電子署名を、記憶部1203に格納されているサーバ公開鍵証明書Cert_svを使用して検証する。ICチップ1202は、該電子署名の検証結果を制御部71へ応答する。制御部71は、該電子署名の検証が合格である場合にステップS202以降に処理を進める。一方、制御部71は、該電子署名の検証が不合格である場合には当該ECUコードの提供を停止する。なお、自動車1001へ提供するECUコードの正当性が確かである場合には、該電子署名の検証はなくてもよい。 (Step S201) The control unit 71 of the control module 1201 of the maintenance tool 1200 passes the ECU code with electronic signature received by the communication unit 61 to the IC chip 1202, and requests verification of the electronic signature. The verification unit 74 of the IC chip 1202 verifies the electronic signature of the ECU code with the electronic signature using the server public key certificate Cert_sv stored in the storage unit 1203. The IC chip 1202 returns the verification result of the electronic signature to the control unit 71. When the verification of the electronic signature is acceptable, the control unit 71 proceeds with the process after step S202. On the other hand, the control unit 71 stops providing the ECU code when the verification of the electronic signature fails. When the ECU code provided to the automobile 1001 is valid, the electronic signature need not be verified.

(ステップS202)メンテナンスツール1200の制御モジュール1201の制御部71は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDの要求メッセージ(ECU識別子要求メッセージ)を、診断ポートインタフェース62を介して自動車1001へ送信する。自動車1001において、診断ポート1060を介して第1のECU1010により受信されたECU識別子要求メッセージは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S202) The control unit 71 of the control module 1201 of the maintenance tool 1200 sends a request message (ECU identifier request message) of the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied via the diagnostic port interface 62 to the automobile. 1001 is transmitted. In the automobile 1001, the ECU identifier request message received by the first ECU 1010 via the diagnostic port 1060 is transferred to the second ECU 1020 to which the ECU code is applied via the first ECU 1010.

(ステップS203)第2のECU1020の制御部41は、ECU識別子要求メッセージを受信すると、自己のECU識別子ECU_IDを返信する。該第2のECU1020のECU識別子ECU_IDは、第1のECU1010を介して診断ポート1060からメンテナンスツール1200へ送信される。メンテナンスツール1200の制御モジュール1201の制御部71は、診断ポート1060を介して自動車1001から送信されたECU識別子ECU_ID、すなわちECUコードの適用先の第2のECU1020のECU識別子ECU_IDを、診断ポートインタフェース62を介して受信する。 (Step S203) Upon receiving the ECU identifier request message, the control unit 41 of the second ECU 1020 returns its own ECU identifier ECU_ID. The ECU identifier ECU_ID of the second ECU 1020 is transmitted from the diagnostic port 1060 to the maintenance tool 1200 via the first ECU 1010. The control unit 71 of the control module 1201 of the maintenance tool 1200 uses the ECU identifier ECU_ID transmitted from the automobile 1001 via the diagnosis port 1060, that is, the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied, as the diagnosis port interface 62. Receive via.

なお、メンテナンスツール1200が、予め、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得する場合には、上述したステップS202とステップS203は不要である。例えば、サーバ装置1300が自動車1001の第2のECU1020のECU識別子ECU_IDのリストを管理している場合には、メンテナンスツール1200は、サーバ装置1300の該リストから、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得してもよい。   Note that when the maintenance tool 1200 acquires the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied in advance, the above-described steps S202 and S203 are not necessary. For example, when the server apparatus 1300 manages a list of ECU identifiers ECU_ID of the second ECU 1020 of the automobile 1001, the maintenance tool 1200 uses the second list of the server apparatus 1300 to apply the second ECU code application destination. The ECU identifier ECU_ID of the ECU 1020 may be acquired.

(ステップS204)メンテナンスツール1200の制御モジュール1201の制御部71は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDをICチップ1202に渡して初期鍵Key_ecuの生成を要求する。ICチップ1202の初期鍵生成部75は、記憶部1203に格納されているマスタ鍵Master_Secretと、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDとを使用して、該ECUコードの適用先の第2のECU1020の初期鍵Key_ecuを生成する。 (Step S204) The control unit 71 of the control module 1201 of the maintenance tool 1200 passes the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied to the IC chip 1202, and requests generation of the initial key Key_ecu. The initial key generation unit 75 of the IC chip 1202 uses the master key Master_Secret stored in the storage unit 1203 and the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied. The initial key Key_ecu of the second ECU 1020 is generated.

(ステップS205)制御部71は、自動車1001へ提供するECUコードをICチップ1202へ渡して期待値の計算を要求する。ICチップ1202の期待値計算部73は、初期鍵生成部75が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードの期待値を計算する。本実施形態では、期待値の一例として、CMACを使用する。よって、期待値計算部73は、初期鍵生成部75が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードのCMACを計算する。ICチップ1202は、期待値計算部73が計算したCMACを制御部71へ渡す。 (Step S205) The control unit 71 passes the ECU code to be provided to the automobile 1001 to the IC chip 1202, and requests the calculation of the expected value. The expected value calculation unit 73 of the IC chip 1202 uses the initial key Key_ecu generated by the initial key generation unit 75 to calculate the expected value of the ECU code to be provided to the automobile 1001. In this embodiment, CMAC is used as an example of an expected value. Therefore, the expected value calculation unit 73 uses the initial key Key_ecu generated by the initial key generation unit 75 to calculate the CMAC of the ECU code to be provided to the automobile 1001. The IC chip 1202 passes the CMAC calculated by the expected value calculation unit 73 to the control unit 71.

(ステップS206)メンテナンスツール1200の制御モジュール1201の制御部71は、ECUコードとICチップ1202が計算した該ECUコードのCMACとを、診断ポートインタフェース62を介して自動車1001へ送信する。自動車1001において、診断ポート1060を介して第1のECU1010により受信されたECUコードと該ECUコードのCMACとは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S206) The control unit 71 of the control module 1201 of the maintenance tool 1200 transmits the ECU code and the CMAC of the ECU code calculated by the IC chip 1202 to the automobile 1001 via the diagnostic port interface 62. In the automobile 1001, the ECU code received by the first ECU 1010 via the diagnostic port 1060 and the CMAC of the ECU code are transferred via the first ECU 1010 to the second ECU 1020 to which the ECU code is applied. .

次いでステップS107からステップS110までが実行される。ステップS107からステップS110までは、上述した第1実施形態に係る図5のECUコード提供手順の例と同じである。ステップS110に次いでステップS211が実行される。   Next, steps S107 to S110 are executed. Steps S107 to S110 are the same as the example of the ECU code provision procedure of FIG. 5 according to the first embodiment described above. Following step S110, step S211 is executed.

(ステップS211)第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果を第1のECU1010へ送信する。該セキュアブートにおけるCMACの検証結果は、第1のECU1010を介して診断ポート1060からメンテナンスツール1200へ送信される。メンテナンスツール1200の制御モジュール1201の制御部71は、診断ポート1060を介して自動車1001から送信されたセキュアブートにおけるCMACの検証結果を、診断ポートインタフェース62を介して受信する。 (Step S211) The control unit 41 of the second ECU 1020 transmits the CMAC verification result in the secure boot to the first ECU 1010. The CMAC verification result in the secure boot is transmitted from the diagnostic port 1060 to the maintenance tool 1200 via the first ECU 1010. The control unit 71 of the control module 1201 of the maintenance tool 1200 receives the CMAC verification result in the secure boot transmitted from the automobile 1001 via the diagnostic port 1060 via the diagnostic port interface 62.

(ステップS212)メンテナンスツール1200の制御モジュール1201の制御部71は、自動車1001から受信したセキュアブートにおけるCMACの検証結果に基づいて、該自動車1001へ提供したECUコードの適用の成否を判定する。セキュアブートにおけるCMACの検証結果が合格である場合には該ECUコードの適用が成功であり、セキュアブートにおけるCMACの検証結果が不合格である場合には該ECUコードの適用が失敗である。 (Step S212) The control unit 71 of the control module 1201 of the maintenance tool 1200 determines whether the application of the ECU code provided to the automobile 1001 is successful based on the CMAC verification result in secure boot received from the automobile 1001. When the verification result of CMAC in secure boot is acceptable, the application of the ECU code is successful, and when the verification result of CMAC in secure boot is unacceptable, the application of the ECU code is unsuccessful.

なお、第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果に、ステップS107でSHE1022によって計算したCMACを含めてもよい。この場合、メンテナンスツール1200の制御モジュール1201の制御部71は、セキュアブートにおけるCMACの検証結果に含まれるCMACをICチップ1202へ渡してCMACの検証を実施させてもよい。ICチップ1202の検証部74は、セキュアブートにおけるCMACの検証結果に含まれるCMACと、ステップS206で自動車1001へECUコードと共に送信した該ECUコードのCMACとを比較し、この比較結果を制御部71へ応答する。制御部71は、この比較結果に基づいて該自動車1001へ提供したECUコードの適用の成否を判定する。該比較結果が一致である場合には該ECUコードの適用が成功であり、該比較結果が一致しない場合には該ECUコードの適用が失敗である。   Note that the control unit 41 of the second ECU 1020 may include the CMAC calculated by the SHE 1022 in step S107 in the CMAC verification result in the secure boot. In this case, the control unit 71 of the control module 1201 of the maintenance tool 1200 may pass the CMAC included in the CMAC verification result in the secure boot to the IC chip 1202 to perform the CMAC verification. The verification unit 74 of the IC chip 1202 compares the CMAC included in the CMAC verification result in the secure boot with the CMAC of the ECU code transmitted together with the ECU code to the automobile 1001 in step S206, and the comparison result is compared with the control unit 71. To respond. The control unit 71 determines the success or failure of application of the ECU code provided to the automobile 1001 based on the comparison result. When the comparison result is coincident, the application of the ECU code is successful, and when the comparison result is not coincident, the application of the ECU code is unsuccessful.

(ステップS213)メンテナンスツール1200の通信部61は、自動車1001へ提供したECUコードの適用の成否の判定結果を、サーバ装置1300へ送信する。 (Step S <b> 213) The communication unit 61 of the maintenance tool 1200 transmits to the server device 1300 the determination result of success or failure of application of the ECU code provided to the automobile 1001.

なお、メンテナンスツール1200は、セキュアブートにおけるCMACの検証結果に含まれるCMACをサーバ装置1300へ送信してもよい。また、サーバ装置1300は、該セキュアブートにおけるCMACの検証結果に含まれるCMACの検証を行ってもよい。   The maintenance tool 1200 may transmit the CMAC included in the CMAC verification result in the secure boot to the server device 1300. The server apparatus 1300 may perform CMAC verification included in the CMAC verification result in the secure boot.

上述した第2実施形態によれば、メンテナンスツール1200がECUコードの適用先のECUの初期鍵を生成し、該生成した初期鍵を使用してECUコードの期待値を生成し、ECUコードと該生成した期待値とを自動車1001へ提供する。自動車1001のECUは、ECUコードと共に受信した期待値を自己の初期鍵を使用して検証する。これにより、自動車1001のECUに適用されるECUコードの信頼性を向上させることができる。   According to the second embodiment described above, the maintenance tool 1200 generates an initial key of the ECU to which the ECU code is applied, generates an expected value of the ECU code using the generated initial key, The generated expected value is provided to the automobile 1001. The ECU of the automobile 1001 verifies the expected value received together with the ECU code using its own initial key. Thereby, the reliability of the ECU code applied to the ECU of the automobile 1001 can be improved.

第2実施形態において、メンテナンスツール1200はデータ提供装置に対応し、制御部71及び診断ポートインタフェース62は提供部に対応する。また、上述した図8の例において、第2のECU1020の制御部41は期待値検証部に対応する。   In the second embodiment, the maintenance tool 1200 corresponds to a data providing device, and the control unit 71 and the diagnostic port interface 62 correspond to a providing unit. In the example of FIG. 8 described above, the control unit 41 of the second ECU 1020 corresponds to an expected value verification unit.

[第3実施形態]
図9は、本実施形態に係る自動車1001の構成例を示す図である。本実施形態では、自動車1001に搭載されるECU(電子制御装置)に対して、更新プログラム等のデータを適用する場合を例に挙げて説明する。
[Third Embodiment]
FIG. 9 is a diagram illustrating a configuration example of an automobile 1001 according to the present embodiment. In the present embodiment, a case where data such as an update program is applied to an ECU (electronic control unit) mounted on the automobile 1001 will be described as an example.

図9において、図1の各部に対応する部分には同一の符号を付け、その説明を省略する。図9に示す自動車の構成例において、TCU1050の通信モジュール1051のSIM1052は、鍵等のデータを記憶する記憶部1053を備える。なお、SIM1052として、eSIMを使用してもよい。SIM及びeSIMは耐タンパー性を有する。SIM及びeSIMはセキュアエレメントの例である。セキュアエレメントは耐タンパー性を有する。SIM及びeSIMは、コンピュータの一種であり、コンピュータプログラムによって所望の機能を実現する。   9, parts corresponding to those in FIG. 1 are given the same reference numerals, and descriptions thereof are omitted. In the configuration example of the automobile illustrated in FIG. 9, the SIM 1052 of the communication module 1051 of the TCU 1050 includes a storage unit 1053 that stores data such as a key. Note that an eSIM may be used as the SIM 1052. SIM and eSIM have tamper resistance. SIM and eSIM are examples of secure elements. The secure element has tamper resistance. SIM and eSIM are a kind of computer, and a desired function is realized by a computer program.

サーバ装置1300は、上述の第1実施形態と同様に、通信回線を介して、自動車1001のTCU1050の通信モジュール1051とデータを送受する。例えば、サーバ装置1300と通信モジュール1051との間をVPN回線等の専用回線で接続し、該専用回線でデータを送受してもよい。例えば、SIM1052に対応する無線通信ネットワークによって、VPN回線等の専用回線が提供されてもよい。   The server apparatus 1300 transmits and receives data to and from the communication module 1051 of the TCU 1050 of the automobile 1001 via the communication line, as in the first embodiment described above. For example, the server apparatus 1300 and the communication module 1051 may be connected by a dedicated line such as a VPN 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.

サーバ装置1300は、ECUに適用されるECUコードを、TCU1050へ提供する。ECUコードは、ECUに適用されるデータの例である。ECUコードは、ECUにインストールされる更新プログラム等のコンピュータプログラムであってもよく、又は、ECUに設定されるパラメータ設定値などの設定データであってもよい。   Server device 1300 provides TCU 1050 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.

図10は、TCU1050の構成例を示す図である。図10において、TCU1050は、インタフェース部82と通信モジュール1051とを備える。通信モジュール1051は、無線通信部91とSIM1052とを備える。SIM1052は、記憶部1053と期待値計算部93と検証部94と初期鍵生成部95とを備える。インタフェース部82は、第1のECU1010とデータを送受するインタフェースを備える。無線通信部91は、無線通信回線を介して、他の装置と通信を行う。   FIG. 10 is a diagram illustrating a configuration example of the TCU 1050. In FIG. 10, the TCU 1050 includes an interface unit 82 and a communication module 1051. The communication module 1051 includes a wireless communication unit 91 and a SIM 1052. The SIM 1052 includes a storage unit 1053, an expected value calculation unit 93, a verification unit 94, and an initial key generation unit 95. The interface unit 82 includes an interface that transmits and receives data to and from the first ECU 1010. The wireless communication unit 91 communicates with other devices via a wireless communication line.

記憶部1053は、鍵等のデータを記憶する。期待値計算部93は、ECUコードについての期待値を計算する。検証部94は、電子署名等の検証を行う。初期鍵生成部95は、ECUの初期鍵を生成する。   The storage unit 1053 stores data such as keys. The expected value calculation unit 93 calculates an expected value for the ECU code. The verification unit 94 verifies an electronic signature or the like. The initial key generation unit 95 generates an initial key for the ECU.

無線通信部91の機能は、該無線通信部91が備えるCPUがコンピュータプログラムを実行することにより実現される。SIM1052の機能は、該SIM1052が備えるCPUがコンピュータプログラムを実行することにより実現される。   The function of the wireless communication unit 91 is realized by the CPU provided in the wireless communication unit 91 executing a computer program. The function of the SIM 1052 is realized by a CPU included in the SIM 1052 executing a computer program.

次に図11を参照して、本実施形態に係るECUコードの提供の手順の例を説明する。図11は、ECUコードの提供手順の例を示すシーケンスチャートである。なお、図11に示されるECUコード提供手順の例では、第2のECU1020に適用されるECUコードを例に挙げるが、第1のECU1010に適用されるECUコードについても、ECUコードの適用先が第1のECU1010になるのみで同様の手順を適用可能である。   Next, an example of a procedure for providing the ECU code according to the present embodiment will be described with reference to FIG. FIG. 11 is a sequence chart illustrating an example of an ECU code provision procedure. In the example of the ECU code provision procedure shown in FIG. 11, the ECU code applied to the second ECU 1020 is taken as an example, but the ECU code applied to the first ECU 1010 is also applied to the ECU code. The same procedure can be applied only by becoming the first ECU 1010.

図11において、サーバ装置1300は、サーバ秘密鍵Key_sv_sを備える。サーバ秘密鍵Key_sv_sは、記憶部12に格納されている。通信モジュール1051のSIM1052は、マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとを備える。サーバ公開鍵証明書Cert_svはサーバ秘密鍵Key_sv_sに対応する公開鍵証明書である。マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとは、記憶部1053に格納されている。   In FIG. 11, the server device 1300 includes a server secret key Key_sv_s. The server secret key Key_sv_s is stored in the storage unit 12. The SIM 1052 of the communication module 1051 includes a master key Master_Secret and a server public key certificate Cert_sv. The server public key certificate Cert_sv is a public key certificate corresponding to the server private key Key_sv_s. The master key Master_Secret and the server public key certificate Cert_sv are stored in the storage unit 1053.

第2のECU1020のSHE1022は、該第2のECU1020の初期鍵Key_ecuを備える。第2のECU1020の初期鍵Key_ecuは、該第2のECU1020のSHE1022の記憶部1023に格納される。第2のECU1020の初期鍵Key_ecuは、予め、該第2のECU1020のSHE1022に書き込まれる。例えば、第2のECU1020の製造時などに、初期鍵Key_ecuが該第2のECU1020のSHE1022に書き込まれる。初期鍵Key_ecuの生成方法は、上述の第1実施形態と同じである。   The SHE 1022 of the second ECU 1020 includes the initial key Key_ecu of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is stored in the storage unit 1023 of the SHE 1022 of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is written in advance in the SHE 1022 of the second ECU 1020. For example, when the second ECU 1020 is manufactured, the initial key Key_ecu is written in the SHE 1022 of the second ECU 1020. The method for generating the initial key Key_ecu is the same as that in the first embodiment.

なお、第1のECU1010の初期鍵Key_ecuについても、第2のECU1020と同様に、予め、該第1のECU1010のHSM1012に格納される。第1のECU1010の初期鍵Key_ecuは、該第1のECU1010のHSM1012の記憶部1013に格納される。   Note that the initial key Key_ecu of the first ECU 1010 is also stored in advance in the HSM 1012 of the first ECU 1010 in the same manner as the second ECU 1020. The initial key Key_ecu of the first ECU 1010 is stored in the storage unit 1013 of the HSM 1012 of the first ECU 1010.

(ステップS300)サーバ装置1300は、自動車1001へ提供するECUコードに対して、サーバ秘密鍵Key_sv_sを使用して電子署名を付する。サーバ装置1300の通信部11は、電子署名付きECUコードを自動車1001の通信モジュール1051へ送信する。自動車1001の通信モジュール1051は、無線通信部91によって該電子署名付きECUコードを受信する。 (Step S300) The server apparatus 1300 attaches an electronic signature to the ECU code provided to the automobile 1001 using the server secret key Key_sv_s. The communication unit 11 of the server device 1300 transmits the electronic signature-added ECU code to the communication module 1051 of the automobile 1001. The communication module 1051 of the automobile 1001 receives the ECU code with the electronic signature by the wireless communication unit 91.

(ステップS301)通信モジュール1051の無線通信部91は、サーバ装置1300から受信した電子署名付きECUコードをSIM1052に渡して電子署名の検証を要求する。SIM1052の検証部94は、該電子署名付きECUコードの電子署名を、記憶部1053に格納されているサーバ公開鍵証明書Cert_svを使用して検証する。SIM1052は、該電子署名の検証結果を無線通信部91へ応答する。無線通信部91は、該電子署名の検証が合格である場合にステップS302以降に処理を進める。一方、無線通信部91は、該電子署名の検証が不合格である場合には当該ECUコードの提供を停止する。なお、自動車1001へ提供するECUコードの正当性が確かである場合には、該電子署名の検証はなくてもよい。 (Step S301) The wireless communication unit 91 of the communication module 1051 passes the ECU code with electronic signature received from the server device 1300 to the SIM 1052, and requests verification of the electronic signature. The verification unit 94 of the SIM 1052 verifies the electronic signature of the ECU code with the electronic signature using the server public key certificate Cert_sv stored in the storage unit 1053. The SIM 1052 responds to the wireless communication unit 91 with the verification result of the electronic signature. When the verification of the electronic signature is successful, the wireless communication unit 91 proceeds with the process after step S302. On the other hand, when the verification of the electronic signature fails, the wireless communication unit 91 stops providing the ECU code. When the ECU code provided to the automobile 1001 is valid, the electronic signature need not be verified.

(ステップS302)通信モジュール1051の無線通信部91は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDの要求メッセージ(ECU識別子要求メッセージ)を、インタフェース部82を介して第1のECU1010へ送信する。第1のECU1010により受信されたECU識別子要求メッセージは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S302) The wireless communication unit 91 of the communication module 1051 sends a request message (ECU identifier request message) of the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied to the first ECU 1010 via the interface unit 82. Send. The ECU identifier request message received by the first ECU 1010 is transferred via the first ECU 1010 to the second ECU 1020 to which the ECU code is applied.

(ステップS303)第2のECU1020の制御部41は、ECU識別子要求メッセージを受信すると、自己のECU識別子ECU_IDを返信する。該第2のECU1020のECU識別子ECU_IDは、第1のECU1010を介してTCU1050へ送信される。通信モジュール1051の無線通信部91は、インタフェース部82を介してECU識別子ECU_ID、すなわちECUコードの適用先の第2のECU1020のECU識別子ECU_IDを受信する。 (Step S303) Upon receiving the ECU identifier request message, the control unit 41 of the second ECU 1020 returns its own ECU identifier ECU_ID. The ECU identifier ECU_ID of the second ECU 1020 is transmitted to the TCU 1050 via the first ECU 1010. The wireless communication unit 91 of the communication module 1051 receives the ECU identifier ECU_ID, that is, the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied, via the interface unit 82.

なお、TCU1050が、予め、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得する場合には、上述したステップS302とステップS303は不要である。例えば、サーバ装置1300が自動車1001の第2のECU1020のECU識別子ECU_IDのリストを管理している場合には、TCU1050は、サーバ装置1300の該リストから、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得してもよい。   Note that when the TCU 1050 acquires the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied in advance, the above-described steps S302 and S303 are not necessary. For example, when the server apparatus 1300 manages a list of ECU identifiers ECU_ID of the second ECU 1020 of the automobile 1001, the TCU 1050 determines the second ECU 1020 to which the ECU code is applied from the list of the server apparatus 1300. You may acquire ECU identifier ECU_ID.

(ステップS304)通信モジュール1051の無線通信部91は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDをSIM1052に渡して初期鍵Key_ecuの生成を要求する。SIM1052の初期鍵生成部95は、記憶部1053に格納されているマスタ鍵Master_Secretと、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDとを使用して、該ECUコードの適用先の第2のECU1020の初期鍵Key_ecuを生成する。 (Step S304) The wireless communication unit 91 of the communication module 1051 passes the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied to the SIM 1052, and requests generation of the initial key Key_ecu. The initial key generation unit 95 of the SIM 1052 uses the master key Master_Secret stored in the storage unit 1053 and the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied. 2 generates an initial key Key_ecu for the ECU 1020.

(ステップS305)無線通信部91は、自動車1001へ提供するECUコードをSIM1052へ渡して期待値の計算を要求する。SIM1052の期待値計算部93は、初期鍵生成部95が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードの期待値を計算する。本実施形態では、期待値の一例として、CMACを使用する。よって、期待値計算部93は、初期鍵生成部95が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードのCMACを計算する。SIM1052は、期待値計算部93が計算したCMACを無線通信部91へ渡す。 (Step S305) The wireless communication unit 91 passes the ECU code to be provided to the automobile 1001 to the SIM 1052, and requests calculation of an expected value. The expected value calculation unit 93 of the SIM 1052 uses the initial key Key_ecu generated by the initial key generation unit 95 to calculate the expected value of the ECU code to be provided to the automobile 1001. In this embodiment, CMAC is used as an example of an expected value. Therefore, the expected value calculation unit 93 uses the initial key Key_ecu generated by the initial key generation unit 95 to calculate the CMAC of the ECU code to be provided to the automobile 1001. The SIM 1052 passes the CMAC calculated by the expected value calculation unit 93 to the wireless communication unit 91.

(ステップS306)無線通信部91は、ECUコードとSIM1052が計算した該ECUコードのCMACとを、インタフェース部82を介して第1のECU1010へ送信する。第1のECU1010により受信されたECUコードと該ECUコードのCMACとは、第1のECU1010を介してECUコードの適用先の第2のECU1020へ転送される。 (Step S306) The wireless communication unit 91 transmits the ECU code and the CMAC of the ECU code calculated by the SIM 1052 to the first ECU 1010 via the interface unit 82. The ECU code received by the first ECU 1010 and the CMAC of the ECU code are transferred via the first ECU 1010 to the second ECU 1020 to which the ECU code is applied.

次いでステップS107からステップS110までが実行される。ステップS107からステップS110までは、上述した第1実施形態に係る図5のECUコード提供手順の例と同じである。ステップS110に次いでステップS311が実行される。   Next, steps S107 to S110 are executed. Steps S107 to S110 are the same as the example of the ECU code provision procedure of FIG. 5 according to the first embodiment described above. Following step S110, step S311 is executed.

(ステップS311)第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果を第1のECU1010へ送信する。該セキュアブートにおけるCMACの検証結果は、第1のECU1010を介してTCU1050へ送信される。TCU1050の通信モジュール1051の無線通信部91は、第1のECU1010から送信されたセキュアブートにおけるCMACの検証結果を、インタフェース部82を介して受信する。 (Step S311) The control unit 41 of the second ECU 1020 transmits the CMAC verification result in the secure boot to the first ECU 1010. The CMAC verification result in the secure boot is transmitted to the TCU 1050 via the first ECU 1010. The wireless communication unit 91 of the communication module 1051 of the TCU 1050 receives the CMAC verification result in the secure boot transmitted from the first ECU 1010 via the interface unit 82.

(ステップS312)TCU1050の通信モジュール1051の無線通信部91は、第1のECU1010から受信したセキュアブートにおけるCMACの検証結果に基づいて、自動車1001へ提供したECUコードの適用の成否を判定する。セキュアブートにおけるCMACの検証結果が合格である場合には該ECUコードの適用が成功であり、セキュアブートにおけるCMACの検証結果が不合格である場合には該ECUコードの適用が失敗である。 (Step S312) The wireless communication unit 91 of the communication module 1051 of the TCU 1050 determines whether the application of the ECU code provided to the automobile 1001 is successful based on the CMAC verification result in the secure boot received from the first ECU 1010. When the verification result of CMAC in secure boot is acceptable, the application of the ECU code is successful, and when the verification result of CMAC in secure boot is unacceptable, the application of the ECU code is unsuccessful.

なお、第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果に、ステップS107でSHE1022によって計算したCMACを含めてもよい。この場合、無線通信部91は、セキュアブートにおけるCMACの検証結果に含まれるCMACをSIM1052へ渡してCMACの検証を実施させてもよい。SIM1052の検証部94は、セキュアブートにおけるCMACの検証結果に含まれるCMACと、ステップS306でECUコードと共に送信した該ECUコードのCMACとを比較し、この比較結果を無線通信部91へ応答する。無線通信部91は、この比較結果に基づいて自動車1001へ提供したECUコードの適用の成否を判定する。該比較結果が一致である場合には該ECUコードの適用が成功であり、該比較結果が一致しない場合には該ECUコードの適用が失敗である。   Note that the control unit 41 of the second ECU 1020 may include the CMAC calculated by the SHE 1022 in step S107 in the CMAC verification result in the secure boot. In this case, the wireless communication unit 91 may pass the CMAC included in the CMAC verification result in the secure boot to the SIM 1052 to perform the CMAC verification. The verification unit 94 of the SIM 1052 compares the CMAC included in the CMAC verification result in the secure boot with the CMAC of the ECU code transmitted together with the ECU code in step S306, and responds to the wireless communication unit 91 with the comparison result. The wireless communication unit 91 determines success or failure of application of the ECU code provided to the automobile 1001 based on the comparison result. When the comparison result is coincident, the application of the ECU code is successful, and when the comparison result is not coincident, the application of the ECU code is unsuccessful.

(ステップS313)無線通信部91は、自動車1001へ提供したECUコードの適用の成否の判定結果を、サーバ装置1300へ送信する。 (Step S <b> 313) The wireless communication unit 91 transmits a determination result of success or failure of application of the ECU code provided to the automobile 1001 to the server device 1300.

なお、無線通信部91は、セキュアブートにおけるCMACの検証結果に含まれるCMACをサーバ装置1300へ送信してもよい。また、サーバ装置1300は、該セキュアブートにおけるCMACの検証結果に含まれるCMACの検証を行ってもよい。   Note that the wireless communication unit 91 may transmit the CMAC included in the CMAC verification result in the secure boot to the server device 1300. The server apparatus 1300 may perform CMAC verification included in the CMAC verification result in the secure boot.

上述した第3実施形態によれば、通信モジュール1051がECUコードの適用先のECUの初期鍵を生成し、該生成した初期鍵を使用してECUコードの期待値を生成し、ECUコードと該生成した期待値とを自動車1001へ提供する。自動車1001のECUは、ECUコードと共に受信した期待値を自己の初期鍵を使用して検証する。これにより、自動車1001のECUに適用されるECUコードの信頼性を向上させることができる。   According to the third embodiment described above, the communication module 1051 generates an initial key of the ECU to which the ECU code is applied, generates an expected value of the ECU code using the generated initial key, The generated expected value is provided to the automobile 1001. The ECU of the automobile 1001 verifies the expected value received together with the ECU code using its own initial key. Thereby, the reliability of the ECU code applied to the ECU of the automobile 1001 can be improved.

第3実施形態において、TCU1050はデータ提供装置に対応し、無線通信部91及びインタフェース部82は提供部に対応する。また、上述した図11の例において、第2のECU1020の制御部41は期待値検証部に対応する。   In the third embodiment, the TCU 1050 corresponds to a data providing device, and the wireless communication unit 91 and the interface unit 82 correspond to a providing unit. In the example of FIG. 11 described above, the control unit 41 of the second ECU 1020 corresponds to an expected value verification unit.

[第4実施形態]
本実施形態において、自動車1001の構成例は図1を適用できる。図12は、本実施形態に係る第1のECU1010の構成例を示す図である。図12において、図3の各部に対応する部分には同一の符号を付け、その説明を省略する。図12に示す第1のECU1010において、HSM1012は、図3の構成に加えてさらに初期鍵生成部33を備える。初期鍵生成部33は、ECUの初期鍵を生成する。
[Fourth Embodiment]
In the present embodiment, FIG. 1 can be applied as a configuration example of the automobile 1001. FIG. 12 is a diagram illustrating a configuration example of the first ECU 1010 according to the present embodiment. 12, parts corresponding to those in FIG. 3 are given the same reference numerals, and descriptions thereof are omitted. In the first ECU 1010 shown in FIG. 12, the HSM 1012 further includes an initial key generation unit 33 in addition to the configuration of FIG. The initial key generation unit 33 generates an initial key for the ECU.

次に図13を参照して、本実施形態に係るECUコードの提供の手順の例を説明する。図13は、ECUコードの提供手順の例を示すシーケンスチャートである。なお、図13に示されるECUコード提供手順の例では、第2のECU1020に適用されるECUコードを例に挙げるが、第1のECU1010に適用されるECUコードについても、ECUコードの適用先が第1のECU1010になるのみで同様の手順を適用可能である。   Next, an example of a procedure for providing an ECU code according to the present embodiment will be described with reference to FIG. FIG. 13 is a sequence chart illustrating an example of an ECU code providing procedure. In the example of the ECU code providing procedure shown in FIG. 13, the ECU code applied to the second ECU 1020 is taken as an example, but the ECU code applied to the first ECU 1010 is also applied to the ECU code. The same procedure can be applied only by becoming the first ECU 1010.

図13において、サーバ装置1300は、サーバ秘密鍵Key_sv_sを備える。サーバ秘密鍵Key_sv_sは、記憶部12に格納されている。第1のECU1010のHSM1012は、マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとを備える。サーバ公開鍵証明書Cert_svはサーバ秘密鍵Key_sv_sに対応する公開鍵証明書である。マスタ鍵Master_Secretとサーバ公開鍵証明書Cert_svとは、記憶部1013に格納されている。   In FIG. 13, the server device 1300 includes a server secret key Key_sv_s. The server secret key Key_sv_s is stored in the storage unit 12. The HSM 1012 of the first ECU 1010 includes a master key Master_Secret and a server public key certificate Cert_sv. The server public key certificate Cert_sv is a public key certificate corresponding to the server private key Key_sv_s. The master key Master_Secret and the server public key certificate Cert_sv are stored in the storage unit 1013.

第2のECU1020のSHE1022は、該第2のECU1020の初期鍵Key_ecuを備える。第2のECU1020の初期鍵Key_ecuは、該第2のECU1020のSHE1022の記憶部1023に格納される。第2のECU1020の初期鍵Key_ecuは、予め、該第2のECU1020のSHE1022に書き込まれる。例えば、第2のECU1020の製造時などに、初期鍵Key_ecuが該第2のECU1020のSHE1022に書き込まれる。初期鍵Key_ecuの生成方法は、上述の第1実施形態と同じである。   The SHE 1022 of the second ECU 1020 includes the initial key Key_ecu of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is stored in the storage unit 1023 of the SHE 1022 of the second ECU 1020. The initial key Key_ecu of the second ECU 1020 is written in advance in the SHE 1022 of the second ECU 1020. For example, when the second ECU 1020 is manufactured, the initial key Key_ecu is written in the SHE 1022 of the second ECU 1020. The method for generating the initial key Key_ecu is the same as that in the first embodiment.

なお、第1のECU1010の初期鍵Key_ecuについても、第2のECU1020と同様に、予め、該第1のECU1010のHSM1012に格納される。第1のECU1010の初期鍵Key_ecuは、該第1のECU1010のHSM1012の記憶部1013に格納される。   Note that the initial key Key_ecu of the first ECU 1010 is also stored in advance in the HSM 1012 of the first ECU 1010 in the same manner as the second ECU 1020. The initial key Key_ecu of the first ECU 1010 is stored in the storage unit 1013 of the HSM 1012 of the first ECU 1010.

(ステップS400)サーバ装置1300は、自動車1001へ提供するECUコードに対して、サーバ秘密鍵Key_sv_sを使用して電子署名を付する。サーバ装置1300の通信部11は、電子署名付きECUコードを自動車1001の通信モジュール1051へ送信する。自動車1001の通信モジュール1051は、該サーバ装置1300から受信した電子署名付きECUコードを第1のECU1010へ転送する。 (Step S400) The server apparatus 1300 attaches an electronic signature to the ECU code provided to the automobile 1001 using the server secret key Key_sv_s. The communication unit 11 of the server device 1300 transmits the electronic signature-added ECU code to the communication module 1051 of the automobile 1001. The communication module 1051 of the automobile 1001 transfers the ECU code with electronic signature received from the server device 1300 to the first ECU 1010.

(ステップS401)第1のECU1010の制御部21は、通信モジュール1051から受信した電子署名付きECUコードをHSM1012に渡して電子署名の検証を要求する。HSM1012の検証部32は、該電子署名付きECUコードの電子署名を、記憶部1013に格納されているサーバ公開鍵証明書Cert_svを使用して検証する。HSM1012は、該電子署名の検証結果を制御部21へ応答する。制御部21は、該電子署名の検証が合格である場合にステップS402以降に処理を進める。一方、制御部21は、該電子署名の検証が不合格である場合には当該ECUコードの提供を停止する。なお、自動車1001へ提供するECUコードの正当性が確かである場合には、該電子署名の検証はなくてもよい。 (Step S401) The control unit 21 of the first ECU 1010 passes the ECU code with electronic signature received from the communication module 1051 to the HSM 1012 to request verification of the electronic signature. The verification unit 32 of the HSM 1012 verifies the electronic signature of the ECU code with the electronic signature using the server public key certificate Cert_sv stored in the storage unit 1013. The HSM 1012 returns the verification result of the electronic signature to the control unit 21. When the verification of the electronic signature is acceptable, the control unit 21 proceeds with the process after step S402. On the other hand, if the verification of the electronic signature fails, the control unit 21 stops providing the ECU code. When the ECU code provided to the automobile 1001 is valid, the electronic signature need not be verified.

(ステップS402)第1のECU1010の制御部21は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDの要求メッセージ(ECU識別子要求メッセージ)を、インタフェース部20を介して該ECUコードの適用先の第2のECU1020へ送信する。 (Step S402) The control unit 21 of the first ECU 1010 applies a request message (ECU identifier request message) of the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied via the interface unit 20 to the application of the ECU code. It transmits to previous 2nd ECU1020.

(ステップS403)第2のECU1020の制御部41は、ECU識別子要求メッセージを受信すると、自己のECU識別子ECU_IDを第1のECU1010へ返信する。第1のECU1010の制御部21は、インタフェース部20を介してECU識別子ECU_ID、すなわちECUコードの適用先の第2のECU1020のECU識別子ECU_IDを受信する。 (Step S403) Upon receiving the ECU identifier request message, the control unit 41 of the second ECU 1020 returns its own ECU identifier ECU_ID to the first ECU 1010. The control unit 21 of the first ECU 1010 receives the ECU identifier ECU_ID, that is, the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied, via the interface unit 20.

なお、第1のECU1010が、予め、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得する場合には、上述したステップS402とステップS403は不要である。例えば、サーバ装置1300が自動車1001の第2のECU1020のECU識別子ECU_IDのリストを管理している場合には、第1のECU1010は、サーバ装置1300の該リストから、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDを取得してもよい。   Note that when the first ECU 1010 acquires the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied in advance, the above-described steps S402 and S403 are not necessary. For example, when the server apparatus 1300 manages a list of ECU identifiers ECU_ID of the second ECU 1020 of the automobile 1001, the first ECU 1010 uses the second ECU code application destination from the list of the server apparatus 1300. The ECU identifier ECU_ID of the ECU 1020 may be acquired.

(ステップS404)第1のECU1010の制御部21は、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDをHSM1012に渡して初期鍵Key_ecuの生成を要求する。HSM1012の初期鍵生成部33は、記憶部1013に格納されているマスタ鍵Master_Secretと、ECUコードの適用先の第2のECU1020のECU識別子ECU_IDとを使用して、該ECUコードの適用先の第2のECU1020の初期鍵Key_ecuを生成する。 (Step S404) The control unit 21 of the first ECU 1010 passes the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied to the HSM 1012 to request generation of the initial key Key_ecu. The initial key generation unit 33 of the HSM 1012 uses the master key Master_Secret stored in the storage unit 1013 and the ECU identifier ECU_ID of the second ECU 1020 to which the ECU code is applied. 2 generates an initial key Key_ecu for the ECU 1020.

(ステップS405)制御部21は、自動車1001へ提供するECUコードをHSM1012へ渡して期待値の計算を要求する。HSM1012の期待値計算部31は、初期鍵生成部33が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードの期待値を計算する。本実施形態では、期待値の一例として、CMACを使用する。よって、期待値計算部31は、初期鍵生成部33が生成した初期鍵Key_ecuを使用して、自動車1001へ提供するECUコードのCMACを計算する。HSM1012は、期待値計算部31が計算したCMACを制御部21へ渡す。 (Step S405) The control unit 21 passes the ECU code to be provided to the automobile 1001 to the HSM 1012 and requests the expected value to be calculated. The expected value calculation unit 31 of the HSM 1012 calculates the expected value of the ECU code to be provided to the automobile 1001 using the initial key Key_ecu generated by the initial key generation unit 33. In this embodiment, CMAC is used as an example of an expected value. Therefore, the expected value calculation unit 31 uses the initial key Key_ecu generated by the initial key generation unit 33 to calculate the CMAC of the ECU code to be provided to the automobile 1001. The HSM 1012 passes the CMAC calculated by the expected value calculation unit 31 to the control unit 21.

(ステップS406)制御部21は、ECUコードとHSM1012が計算した該ECUコードのCMACとを、インタフェース部20を介して該ECUコードの適用先の第2のECU1020へ送信する。 (Step S406) The control unit 21 transmits the ECU code and the CMAC of the ECU code calculated by the HSM 1012 to the second ECU 1020 to which the ECU code is applied via the interface unit 20.

次いでステップS107からステップS110までが実行される。ステップS107からステップS110までは、上述した第1実施形態に係る図5のECUコード提供手順の例と同じである。ステップS110に次いでステップS411が実行される。   Next, steps S107 to S110 are executed. Steps S107 to S110 are the same as the example of the ECU code provision procedure of FIG. 5 according to the first embodiment described above. Following step S110, step S411 is executed.

(ステップS411)第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果を第1のECU1010へ送信する。 (Step S411) The control unit 41 of the second ECU 1020 transmits the CMAC verification result in the secure boot to the first ECU 1010.

(ステップS412)第1のECU1010の制御部21は、第2のECU1020から受信したセキュアブートにおけるCMACの検証結果に基づいて、自動車1001へ提供したECUコードの適用の成否を判定する。セキュアブートにおけるCMACの検証結果が合格である場合には該ECUコードの適用が成功であり、セキュアブートにおけるCMACの検証結果が不合格である場合には該ECUコードの適用が失敗である。 (Step S412) The control unit 21 of the first ECU 1010 determines whether the application of the ECU code provided to the automobile 1001 is successful based on the CMAC verification result in the secure boot received from the second ECU 1020. When the verification result of CMAC in secure boot is acceptable, the application of the ECU code is successful, and when the verification result of CMAC in secure boot is unacceptable, the application of the ECU code is unsuccessful.

なお、第2のECU1020の制御部41は、セキュアブートにおけるCMACの検証結果に、ステップS107でSHE1022によって計算したCMACを含めてもよい。この場合、第1のECU1010の制御部21は、セキュアブートにおけるCMACの検証結果に含まれるCMACをHSM1012へ渡してCMACの検証を実施させてもよい。HSM1012の検証部32は、セキュアブートにおけるCMACの検証結果に含まれるCMACと、ステップS406でECUコードと共に送信した該ECUコードのCMACとを比較し、この比較結果を制御部21へ応答する。制御部21は、この比較結果に基づいて自動車1001へ提供したECUコードの適用の成否を判定する。該比較結果が一致である場合には該ECUコードの適用が成功であり、該比較結果が一致しない場合には該ECUコードの適用が失敗である。   Note that the control unit 41 of the second ECU 1020 may include the CMAC calculated by the SHE 1022 in step S107 in the CMAC verification result in the secure boot. In this case, the control unit 21 of the first ECU 1010 may pass the CMAC included in the CMAC verification result in the secure boot to the HSM 1012 to perform the CMAC verification. The verification unit 32 of the HSM 1012 compares the CMAC included in the CMAC verification result in secure boot with the CMAC of the ECU code transmitted together with the ECU code in step S <b> 406, and returns the comparison result to the control unit 21. The control unit 21 determines whether the application of the ECU code provided to the automobile 1001 is successful based on the comparison result. When the comparison result is coincident, the application of the ECU code is successful, and when the comparison result is not coincident, the application of the ECU code is unsuccessful.

(ステップS413)第1のECU1010の制御部21は、自動車1001へ提供したECUコードの適用の成否の判定結果を、TCU1050の通信モジュール1051を介してサーバ装置1300へ送信する。 (Step S413) The control unit 21 of the first ECU 1010 transmits a determination result of success or failure of application of the ECU code provided to the automobile 1001 to the server apparatus 1300 via the communication module 1051 of the TCU 1050.

なお、第1のECU1010の制御部21は、セキュアブートにおけるCMACの検証結果に含まれるCMACをサーバ装置1300へ送信してもよい。また、サーバ装置1300は、該セキュアブートにおけるCMACの検証結果に含まれるCMACの検証を行ってもよい。   The control unit 21 of the first ECU 1010 may transmit the CMAC included in the CMAC verification result in the secure boot to the server device 1300. The server apparatus 1300 may perform CMAC verification included in the CMAC verification result in the secure boot.

上述した第4実施形態によれば、第1のECU1010がECUコードの適用先のECUの初期鍵を生成し、該生成した初期鍵を使用してECUコードの期待値を生成し、ECUコードと該生成した期待値とを自動車1001へ提供する。自動車1001のECUは、ECUコードと共に受信した期待値を自己の初期鍵を使用して検証する。これにより、自動車1001のECUに適用されるECUコードの信頼性を向上させることができる。   According to the above-described fourth embodiment, the first ECU 1010 generates an initial key of the ECU to which the ECU code is applied, generates an expected value of the ECU code using the generated initial key, The generated expected value is provided to the automobile 1001. The ECU of the automobile 1001 verifies the expected value received together with the ECU code using its own initial key. Thereby, the reliability of the ECU code applied to the ECU of the automobile 1001 can be improved.

第4実施形態において、第1のECU1010はデータ提供装置に対応し、制御部21及びインタフェース部20は提供部に対応する。また、上述した図13の例において、第2のECU1020の制御部41は期待値検証部に対応する。   In 4th Embodiment, 1st ECU1010 respond | corresponds to a data provision apparatus, and the control part 21 and the interface part 20 respond | correspond to a provision part. In the example of FIG. 13 described above, the control unit 41 of the second ECU 1020 corresponds to an expected value verification unit.

以上、本発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   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.

なお、第1のECU1010が備える暗号処理部は、HSM1012に限定されない。第1のECU1010が備える暗号処理部として、例えば「TPM(Trusted Platform Module)f」と呼ばれる暗号処理チップを使用してもよい。TPMfは耐タンパー性を有する。TPMfはセキュアエレメントの例である。   Note that the encryption processing unit included in the first ECU 1010 is not limited to the HSM 1012. For example, a cryptographic processing chip called “TPM (Trusted Platform Module) f” may be used as the cryptographic processing unit included in the first ECU 1010. TPMf has tamper resistance. TPMf is an example of a secure element.

また、第2のECU1020が備える暗号処理部は、SHE1022に限定されない。第2のECU1020が備える暗号処理部として、例えば「TPMt」と呼ばれる暗号処理チップを使用してもよい。TPMtは耐タンパー性を有する。TPMtはセキュアエレメントの例である。   Further, the encryption processing unit included in the second ECU 1020 is not limited to the SHE1022. For example, a cryptographic processing chip called “TPMt” may be used as the cryptographic processing unit included in the second ECU 1020. TPMt has tamper resistance. TPMt is an example of a secure element.

上述した実施形態では、車両として自動車を例に挙げたが、原動機付自転車や鉄道車両等の自動車以外の他の車両にも適用可能である。   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.

また、上述したサーバ装置、メンテナンスツール、又は自動車に備わる各装置の機能を実現するためのコンピュータプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行するようにしてもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものであってもよい。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、DVD(Digital Versatile Disc)等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。
Further, a computer program for realizing the functions of the above-described server device, maintenance tool, or each device provided in the automobile is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into the computer system. May be executed. 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.

さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
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.

11,61…通信部、12,22,42…記憶部、13,31,51,73,93…期待値計算部、14,32,52,74,94…検証部、15,33,75,95…初期鍵生成部、21,41,71…制御部、91…無線通信部、1001…自動車、1002…車載コンピュータシステム、1010…第1のECU、1011,1021…メイン演算器、1012…HSM、1013,1023,1053,1203…記憶部、1020…第2のECU、1022…SHE、1030…CAN、1040…インフォテイメント機器、1050…TCU、1051…通信モジュール、1052…SIM、1060…診断ポート、1065…診断端末、1200…メンテナンスツール、1201…制御モジュール、1202…ICチップ、1300…サーバ装置 DESCRIPTION OF SYMBOLS 11, 61 ... Communication part, 12, 22, 42 ... Memory | storage part, 13, 31, 51, 73, 93 ... Expected value calculation part, 14, 32, 52, 74, 94 ... Verification part, 15, 33, 75, 95 ... Initial key generation unit, 21, 41, 71 ... Control unit, 91 ... Wireless communication unit, 1001 ... Automobile, 1002 ... In-vehicle computer system, 1010 ... First ECU, 1011, 1021 ... Main arithmetic unit, 1012 ... HSM , 1013, 1023, 1203, storage unit, 1020, second ECU, 1022, SHE, 1030, CAN, 1040, infotainment device, 1050, TCU, 1051, communication module, 1052, SIM, 1060, diagnostic port , 1065 ... diagnostic terminal, 1200 ... maintenance tool, 1201 ... control module, 1202 ... IC chip, 1 00 ... server device

Claims (11)

車両に搭載される車載コンピュータと、データ提供装置と、を備え、
前記車載コンピュータは、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶部を備え、
前記データ提供装置は、
前記マスタ鍵を記憶する第2記憶部と、
前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成部と、
前記初期鍵生成部が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算部と、
前記車載コンピュータに適用されるデータと、前記第1期待値計算部が計算した前記期待値とを前記車両へ提供する提供部と、を備え、
前記車載コンピュータは、
前記提供部から提供された前記データの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算部と、
前記提供部から提供された前記期待値と、前記第2期待値計算部が計算した前記期待値とを比較する期待値検証部と、を備える、
データ提供システム。
An in-vehicle computer mounted on a vehicle and a data providing device;
The in-vehicle computer includes a first storage unit that stores an initial key generated from a master key and its own in-vehicle computer identifier,
The data providing device includes:
A second storage unit for storing the master key;
An initial key generation unit that generates an initial key of the in-vehicle computer from the in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage unit;
A first expected value calculation unit that calculates an expected value of data applied to the in-vehicle computer using the initial key of the in-vehicle computer generated by the initial key generation unit;
A provision unit that provides the vehicle with data applied to the in-vehicle computer and the expected value calculated by the first expected value calculation unit;
The in-vehicle computer is
A second expected value calculation unit that calculates an expected value of the data provided from the providing unit using the initial key stored in the first storage unit;
An expected value verification unit that compares the expected value provided by the providing unit with the expected value calculated by the second expected value calculation unit;
Data provision system.
前記提供部は、前記データと前記期待値とを、通信回線を介して前記車両へ送信する、
請求項1に記載のデータ提供システム。
The providing unit transmits the data and the expected value to the vehicle via a communication line.
The data providing system according to claim 1.
前記提供部は、前記データと前記期待値とを、前記車両の診断ポートを介して前記車両へ送信する、
請求項1に記載のデータ提供システム。
The providing unit transmits the data and the expected value to the vehicle via a diagnostic port of the vehicle.
The data providing system according to claim 1.
前記データ提供装置は前記車両に備わる、
請求項1に記載のデータ提供システム。
The data providing device is provided in the vehicle.
The data providing system according to claim 1.
前記データ提供装置は、前記車両に備わる通信装置である、
請求項1に記載のデータ提供システム。
The data providing device is a communication device provided in the vehicle.
The data providing system according to claim 1.
前記データ提供装置は、前記車両に備わる車載コンピュータである、
請求項1に記載のデータ提供システム。
The data providing device is an in-vehicle computer provided in the vehicle.
The data providing system according to claim 1.
車両に搭載される車載コンピュータに備わる初期鍵の生成において前記車載コンピュータの車載コンピュータ識別子と共に使用されるマスタ鍵を記憶する第2記憶部と、
前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成部と、
前記初期鍵生成部が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算部と、
前記車載コンピュータに適用されるデータと、前記第1期待値計算部が計算した前記期待値とを前記車両へ提供する提供部と、
を備えるデータ提供装置。
A second storage unit for storing a master key used together with the in-vehicle computer identifier of the in-vehicle computer in generating an initial key provided in the in-vehicle computer mounted in the vehicle;
An initial key generation unit that generates an initial key of the in-vehicle computer from the in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage unit;
A first expected value calculation unit that calculates an expected value of data applied to the in-vehicle computer using the initial key of the in-vehicle computer generated by the initial key generation unit;
A providing unit for providing the vehicle with data applied to the in-vehicle computer and the expected value calculated by the first expected value calculating unit;
A data providing apparatus comprising:
車両に搭載される車載コンピュータにおいて、
マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶部と、
請求項7に記載のデータ提供装置の提供部から提供されたデータの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算部と、
前記提供部から前記データと共に提供された期待値と、前記第2期待値計算部が計算した前記期待値とを比較する期待値検証部と、
を備える車載コンピュータ。
In an in-vehicle computer mounted on a vehicle,
A first storage unit for storing an initial key generated from the master key and its own in-vehicle computer identifier;
A second expected value calculation unit that calculates an expected value of data provided from the providing unit of the data providing device according to claim 7, using the initial key stored in the first storage unit;
An expected value verification unit that compares the expected value provided together with the data from the providing unit with the expected value calculated by the second expected value calculation unit;
In-vehicle computer equipped with.
車両に搭載される車載コンピュータと、データ提供装置と、を備えるデータ提供システムのデータ提供方法であって、
前記車載コンピュータが、マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を第1記憶部に記憶する第1記憶ステップと、
前記データ提供装置が、前記マスタ鍵を第2記憶部に記憶する第2記憶ステップと、
前記データ提供装置が、前記車載コンピュータの車載コンピュータ識別子と前記第2記憶部に記憶されている前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成ステップと、
前記データ提供装置が、前記初期鍵生成ステップにより生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算ステップと、
前記データ提供装置が、前記車載コンピュータに適用されるデータと、前記第1期待値計算ステップにより計算した前記期待値とを前記車両へ提供する提供ステップと、
前記車載コンピュータが、前記提供ステップにより提供された前記データの期待値を、前記第1記憶部に記憶されている前記初期鍵を使用して計算する第2期待値計算ステップと、
前記車載コンピュータが、前記提供ステップにより提供された前記期待値と、前記第2期待値計算ステップにより計算した前記期待値とを比較する期待値検証ステップと、
を含むデータ提供方法。
A data providing method of a data providing system comprising an in-vehicle computer mounted on a vehicle and a data providing device,
A first storage step in which the in-vehicle computer stores an initial key generated from a master key and its own in-vehicle computer identifier in a first storage unit;
A second storage step in which the data providing device stores the master key in a second storage unit;
An initial key generating step for generating an initial key of the in-vehicle computer from the in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage unit;
A first expected value calculating step in which the data providing device calculates an expected value of data applied to the in-vehicle computer using the initial key of the in-vehicle computer generated in the initial key generating step;
A providing step in which the data providing device provides the vehicle with data applied to the in-vehicle computer and the expected value calculated in the first expected value calculating step;
A second expected value calculating step in which the in-vehicle computer calculates the expected value of the data provided by the providing step using the initial key stored in the first storage unit;
The in-vehicle computer compares the expected value provided in the providing step with the expected value calculated in the second expected value calculation step;
A method of providing data including:
データ提供装置のコンピュータに、
車両に搭載される車載コンピュータに備わる初期鍵の生成において前記車載コンピュータの車載コンピュータ識別子と共に使用されるマスタ鍵を記憶する第2記憶機能と、
前記車載コンピュータの車載コンピュータ識別子と前記第2記憶機能が記憶している前記マスタ鍵とから前記車載コンピュータの初期鍵を生成する初期鍵生成機能と、
前記初期鍵生成機能が生成した前記車載コンピュータの初期鍵を使用して、前記車載コンピュータに適用されるデータの期待値を計算する第1期待値計算機能と、
前記車載コンピュータに適用されるデータと、前記第1期待値計算機能が計算した前記期待値とを前記車両へ提供する提供機能と、
を実現させるためのコンピュータプログラム。
In the computer of the data providing device,
A second storage function for storing a master key used together with the in-vehicle computer identifier of the in-vehicle computer in generating an initial key provided in the in-vehicle computer mounted in the vehicle;
An initial key generation function for generating an initial key of the in-vehicle computer from the in-vehicle computer identifier of the in-vehicle computer and the master key stored in the second storage function;
A first expected value calculation function for calculating an expected value of data applied to the in-vehicle computer using the initial key of the in-vehicle computer generated by the initial key generation function;
A providing function for providing the vehicle with data applied to the in-vehicle computer and the expected value calculated by the first expected value calculating function;
Computer program for realizing.
車両に搭載される車載コンピュータに、
マスタ鍵と自己の車載コンピュータ識別子とから生成された初期鍵を記憶する第1記憶機能と、
請求項7に記載のデータ提供装置の提供部から提供されたデータの期待値を、前記第1記憶機能が記憶している前記初期鍵を使用して計算する第2期待値計算機能と、
前記提供部から前記データと共に提供された期待値と、前記第2期待値計算機能が計算した前記期待値とを比較する期待値検証機能と、
を実現させるためのコンピュータプログラム。
In-vehicle computers mounted on vehicles
A first storage function for storing an initial key generated from a master key and its own in-vehicle computer identifier;
A second expected value calculation function for calculating an expected value of data provided from the providing unit of the data providing device according to claim 7, using the initial key stored in the first storage function;
An expected value verification function for comparing the expected value provided together with the data from the providing unit and the expected value calculated by the second expected value calculation function;
Computer program for realizing.
JP2017225171A 2017-11-22 2017-11-22 Data providing system, data providing device, data providing method, and data providing program Expired - Fee Related JP6672243B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017225171A JP6672243B2 (en) 2017-11-22 2017-11-22 Data providing system, data providing device, data providing method, and data providing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017225171A JP6672243B2 (en) 2017-11-22 2017-11-22 Data providing system, data providing device, data providing method, and data providing program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016112746A Division JP2018006782A (en) 2016-06-06 2016-06-06 Data providing system, data providing apparatus, on-vehicle computer, data providing method, and computer program

Publications (3)

Publication Number Publication Date
JP2018050334A true JP2018050334A (en) 2018-03-29
JP2018050334A5 JP2018050334A5 (en) 2019-06-27
JP6672243B2 JP6672243B2 (en) 2020-03-25

Family

ID=61766657

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017225171A Expired - Fee Related JP6672243B2 (en) 2017-11-22 2017-11-22 Data providing system, data providing device, data providing method, and data providing program

Country Status (1)

Country Link
JP (1) JP6672243B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022539971A (en) * 2019-08-26 2022-09-14 福建晶安光電有限公司 Lithium tantalate chip and blackening method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11265309A (en) * 1998-03-13 1999-09-28 Nec Corp Partial extraction type remote maintenance system
CN101470411A (en) * 2007-12-28 2009-07-01 联合汽车电子有限公司 System and method for safely updating ECU data
WO2015025116A1 (en) * 2013-08-23 2015-02-26 British Telecommunications Public Limited Company Method and apparatus for modifying a computer program in a trusted manner
JP2015225376A (en) * 2014-05-26 2015-12-14 Kddi株式会社 Computer system, computer, semiconductor device, information processing method, and computer program
CN105490803A (en) * 2014-10-07 2016-04-13 通用汽车环球科技运作有限责任公司 Distributing secret keys for managing access to ECUs
JP2016072675A (en) * 2014-09-26 2016-05-09 Kddi株式会社 Management device, vehicle, management method and computer program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11265309A (en) * 1998-03-13 1999-09-28 Nec Corp Partial extraction type remote maintenance system
CN101470411A (en) * 2007-12-28 2009-07-01 联合汽车电子有限公司 System and method for safely updating ECU data
WO2015025116A1 (en) * 2013-08-23 2015-02-26 British Telecommunications Public Limited Company Method and apparatus for modifying a computer program in a trusted manner
JP2015225376A (en) * 2014-05-26 2015-12-14 Kddi株式会社 Computer system, computer, semiconductor device, information processing method, and computer program
JP2016072675A (en) * 2014-09-26 2016-05-09 Kddi株式会社 Management device, vehicle, management method and computer program
CN105490803A (en) * 2014-10-07 2016-04-13 通用汽车环球科技运作有限责任公司 Distributing secret keys for managing access to ECUs

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
川端 健 ほか: "ドライバーに安心を提供する車載セキュリティシステム", 東芝レビュー, vol. 第71巻 第2号, JPN6020006743, 20 January 2016 (2016-01-20), JP, pages 15 - 18, ISSN: 0004219207 *
川端 秀明 ほか: "車載ECU向けの鍵管理方式", SCIS2016 [USB], vol. 2F4−5, JPN6016034851, 22 January 2016 (2016-01-22), JP, pages 1 - 7, ISSN: 0004219206 *
竹森 敬祐 ほか: "セキュアエレメントを活用したECU認証とコード認証の鍵管理", 電子情報通信学会技術研究報告, vol. 第115巻,第364号, JPN6017011740, 10 December 2015 (2015-12-10), JP, pages 227 - 232, ISSN: 0004219205 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022539971A (en) * 2019-08-26 2022-09-14 福建晶安光電有限公司 Lithium tantalate chip and blackening method

Also Published As

Publication number Publication date
JP6672243B2 (en) 2020-03-25

Similar Documents

Publication Publication Date Title
JP6260067B1 (en) Management system, key generation device, in-vehicle computer, management method, and computer program
JP6197000B2 (en) System, vehicle, and software distribution processing method
US11330432B2 (en) Maintenance system and maintenance method
JP6288219B1 (en) Communications system
JP6190443B2 (en) In-vehicle computer system, vehicle, management method, and computer program
JP6238939B2 (en) In-vehicle computer system, vehicle, management method, and computer program
EP3499793B1 (en) Data provision system, data security device, data provision method, and computer program
US10970398B2 (en) Data provision system, data security device, data provision method, and computer program
JP6260068B1 (en) Maintenance device, maintenance method, and computer program
JP6174229B1 (en) Distribution system, data security device, distribution method, and computer program
CN111565182A (en) Vehicle diagnosis method and device and storage medium
JP6440334B2 (en) System, vehicle, and software distribution processing method
JP2018006782A (en) Data providing system, data providing apparatus, on-vehicle computer, data providing method, and computer program
JP2018019415A (en) System, authentication station, on-vehicle computer, public key certificate issuing method, and program
JP6476462B2 (en) In-vehicle computer system, vehicle, management method, and computer program
JP6672243B2 (en) Data providing system, data providing device, data providing method, and data providing program
JP6218914B1 (en) Distribution system, data security device, distribution method, and computer program
JP6554704B2 (en) Data providing system and data providing method
JP6464466B2 (en) Maintenance device, maintenance method, and computer program
JP6454919B2 (en) Management system, data providing apparatus, in-vehicle computer, management method, and computer program
JP6132955B1 (en) Verification system, verification device, verification method, and computer program
JP2017208731A (en) Management system, management device, on-vehicle computer, management method, and computer program
JP2018093477A (en) Distribution system, key generation device, on-vehicle computer, data security device, distribution method, and computer program
JP6354099B2 (en) Data providing system and data providing method
JP2018098760A (en) Distribution system, data security device, distribution method, and computer program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190524

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190524

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: 20200225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200304

R150 Certificate of patent or registration of utility model

Ref document number: 6672243

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees