JP2018116669A - On-vehicle device, relay device, and computer programs - Google Patents

On-vehicle device, relay device, and computer programs Download PDF

Info

Publication number
JP2018116669A
JP2018116669A JP2017068330A JP2017068330A JP2018116669A JP 2018116669 A JP2018116669 A JP 2018116669A JP 2017068330 A JP2017068330 A JP 2017068330A JP 2017068330 A JP2017068330 A JP 2017068330A JP 2018116669 A JP2018116669 A JP 2018116669A
Authority
JP
Japan
Prior art keywords
data
control program
cpu
relay
repeater
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
JP2017068330A
Other languages
Japanese (ja)
Other versions
JP6443482B2 (en
Inventor
博志 立石
Hiroshi Tateishi
博志 立石
浩史 上田
Hiroshi Ueda
浩史 上田
友洋 水谷
Tomohiro Mizutani
友洋 水谷
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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to CN201711420384.2A priority Critical patent/CN108337228B/en
Priority to US15/863,024 priority patent/US10469129B2/en
Priority to DE102018100756.6A priority patent/DE102018100756B4/en
Publication of JP2018116669A publication Critical patent/JP2018116669A/en
Application granted granted Critical
Publication of JP6443482B2 publication Critical patent/JP6443482B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a compact and inexpensive on-vehicle device having a first on-vehicle unit and a second on-vehicle unit, a compact and inexpensive relay device having a first relay unit and a second relay unit, and computer programs to be executed respectively in the on-vehicle device and the relay device.SOLUTION: A relay device 11 includes: a first relay unit 21 for executing processing in response to a first control program; and a second relay unit 22 for executing processing in response to a second control program. A HSM (Hardware Security Module) of the first relay unit 21 verifies the second control program. The second on-vehicle unit calculates related data related to the second control program. The HSM verifies the second control program by determining whether related data calculated by the second relay unit 22 coincides with reference data.SELECTED DRAWING: Figure 1

Description

本発明は、車載装置と、通信装置間の通信を中継する中継装置と、前記車載装置及び中継装置夫々で実行されるコンピュータプログラムとに関する。   The present invention relates to an in-vehicle device, a relay device that relays communication between communication devices, and a computer program that is executed in each of the in-vehicle device and the relay device.

車両に搭載される通信システムとして、電気機器の動作を制御する複数のECU(Electronic Control Unit)間の通信を中継装置が中継する通信システムがある。この通信システムでは、複数のECU夫々は通信装置として機能し、1つのECUは、中継装置を介して、他のECUと通信する。複数のECUは相互に通信することによって、複数の電気機器に協調動作を行わせることができる。中継装置は、1つのECUから受信したデータを他のECUに送信する。   As a communication system mounted on a vehicle, there is a communication system in which a relay device relays communication between a plurality of ECUs (Electronic Control Units) that control the operation of an electric device. In this communication system, each of a plurality of ECUs functions as a communication device, and one ECU communicates with another ECU via a relay device. A plurality of ECUs can cause a plurality of electric devices to perform a cooperative operation by communicating with each other. The relay device transmits data received from one ECU to another ECU.

中継装置には制御プログラムが記憶されている。中継装置では、CPU(Central Processing Unit)は、制御プログラムを実行することによって、通信を中継する中継処理を実行する。中継装置に記憶されている制御プログラムが改ざんされた場合、中継装置は適切にデータを送信しないため、電気機器が適正に動作しない虞がある。そこで、中継装置が起動した場合に、制御プログラムが適正であることを検証する必要がある。   A control program is stored in the relay device. In the relay device, a CPU (Central Processing Unit) executes a relay process for relaying communication by executing a control program. When the control program stored in the relay device is tampered with, the relay device does not transmit data properly, and thus there is a risk that the electrical device will not operate properly. Therefore, it is necessary to verify that the control program is appropriate when the relay device is activated.

特許文献1には、制御プログラムが適正であることを検証する技術が開示されている。この技術では、制御プログラムに関連する関連データを演算し、演算した関連データが、予め記憶されている複数の所定データの1つと一致するか否かと判定する。演算した関連データが複数の所定データの1つと一致する場合、制御プログラムが適正であると判定する。   Patent Document 1 discloses a technique for verifying that a control program is appropriate. In this technique, related data related to the control program is calculated, and it is determined whether the calculated related data matches one of a plurality of predetermined data stored in advance. When the calculated related data matches one of a plurality of predetermined data, it is determined that the control program is appropriate.

特開2009−259160号公報JP 2009-259160 A

車両における通信では複数のプロトコルが用いられている。このため、中継装置として、複数の第1通信装置間の通信を中継する第1中継機と、複数の第2通信装置間の通信を中継する第2中継機とを備える中継装置が考えられる。   A plurality of protocols are used for communication in vehicles. For this reason, a relay device provided with the 1st relay machine which relays communication between a plurality of 1st communication devices and the 2nd relay machine which relays communication between a plurality of 2nd communication devices can be considered as a relay device.

この中継装置では、例えば、複数の第1通信装置間で第1プロトコルに従った通信が行われ、複数の第2通信装置間で第2プロトコルに従った通信が行われる。また、第1中継機は第2中継機に接続されており、第1中継機及び第2中継機は、第1通信装置及び第2通信装置間の通信を中継する。   In this relay device, for example, communication according to the first protocol is performed between the plurality of first communication devices, and communication according to the second protocol is performed between the plurality of second communication devices. The first repeater is connected to the second repeater, and the first repeater and the second repeater relay communication between the first communication device and the second communication device.

第1中継機及び第2中継機を備える中継装置では、第1中継機及び第2中継機夫々にCPUが搭載されており、第1中継機のCPUが実行する制御プログラムは、第2中継機のCPUが実行する制御プログラムと異なる。この場合、これらの制御プログラム夫々について検証を行う必要がある。第1中継機及び第2中継機夫々の制御プログラムを検証する中継装置として、制御プログラムが適正であることを検証する検証機能を、第1中継機及び第2中継機夫々が有する中継装置が考えられる。
しかしながら、第1中継機及び第2中継機夫々が検証機能を有する場合、中継装置のサイズが大型であり、製造費用が嵩むという問題がある。
In the relay apparatus including the first relay machine and the second relay machine, the first relay machine and the second relay machine are each equipped with a CPU, and the control program executed by the CPU of the first relay machine is the second relay machine. This is different from the control program executed by the CPU. In this case, it is necessary to verify each of these control programs. As a relay device that verifies the control program of each of the first relay device and the second relay device, the relay device that each of the first relay device and the second relay device has a verification function that verifies that the control program is appropriate is considered. It is done.
However, when each of the first repeater and the second repeater has a verification function, there is a problem that the size of the repeater is large and the manufacturing cost increases.

このような問題がある車載装置は、中継装置に限定されない。第1制御プログラムに従って処理が実行される第1車載機と、第1制御プログラムとは異なる第2制御プログラムに従って処理が実行される第2車載機とを備える車載装置にも同様の問題がある。   The in-vehicle device having such a problem is not limited to the relay device. A vehicle-mounted device including a first vehicle-mounted device that executes processing according to the first control program and a second vehicle-mounted device that executes processing according to a second control program different from the first control program has the same problem.

本発明は斯かる事情に鑑みてなされたものであり、その目的とするところは、第1車載機及び第2車載機を備える小型で安価な車載装置と、第1中継機及び第2中継機を備える小型で安価な中継装置と、前記車載装置及び中継装置夫々で実行されるコンピュータプログラムとを提供することにある。   The present invention has been made in view of such circumstances, and an object thereof is to provide a small and inexpensive on-vehicle device including a first in-vehicle device and a second in-vehicle device, and a first repeater and a second repeater. And a small and inexpensive relay device, and a computer program executed by each of the in-vehicle device and the relay device.

本発明に係る車載装置は、第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機を備える車載装置において、第2制御プログラムに従って処理を実行する第2処理部を有する第2車載機と、前記第2制御プログラムに関連する関連データを演算する関連データ演算部とを備え、前記検証器は、前記関連データ演算部が演算した関連データが基準データと一致するか否かを判定する判定部を有することを特徴とする。   The in-vehicle device according to the present invention includes a first processing unit that executes processing according to a first control program, and verification that verifies the first control program by using different hardware than the hardware that configures the first processing unit. In a vehicle-mounted device including a first vehicle-mounted device having a device, a second vehicle-mounted device having a second processing unit that executes processing according to a second control program, and related data for calculating related data related to the second control program And a verification unit, wherein the verification unit includes a determination unit that determines whether the related data calculated by the related data calculation unit matches reference data.

本発明にあっては、第1車載機の検証器が、第2車載機の第2制御プログラムに関連する関連データが基準データと一致するか否かを判定することよって、第2制御プログラムを検証する。このため、第2車載機が第2制御プログラムの検証機能を有する必要がないので、装置は小型であり、製造費用が安価である。   In the present invention, the verifier of the first in-vehicle device determines whether or not the related data related to the second control program of the second in-vehicle device matches the reference data. Validate. For this reason, since the 2nd vehicle equipment does not need to have the verification function of a 2nd control program, an apparatus is small and manufacturing cost is cheap.

本発明に係る車載装置は、前記検証器では、前記他のハードウェアが検証プログラムを実行することによって、前記第1制御プログラムが検証されることを特徴とする。   The in-vehicle device according to the present invention is characterized in that, in the verification device, the first control program is verified by the other hardware executing the verification program.

本発明にあっては、第1処理部を構成するハードウェアとは異なる他のハードウェアが検証プログラムを実行することによって、第1制御プログラムが検証される。   In the present invention, the first control program is verified by executing the verification program by other hardware different from the hardware configuring the first processing unit.

本発明に係る車載装置は、前記第1車載機の前記検証器は、前記関連データ演算部と、乱数データを生成する乱数生成部と、該乱数生成部が生成した乱数データ、及び、所定データに基づいて、前記基準データを演算する基準データ演算部とを有し、前記第2車載機は、前記第2制御プログラム及び乱数データに基づいて、前記関連データを演算するための演算データを算出する算出部を有し、前記検証器の前記関連データ演算部は、前記算出部が算出した演算データに基づいて前記関連データを演算することを特徴とする。   In the in-vehicle apparatus according to the present invention, the verifier of the first in-vehicle apparatus includes the related data calculation unit, a random number generation unit that generates random number data, random number data generated by the random number generation unit, and predetermined data. And a reference data calculation unit for calculating the reference data, and the second in-vehicle device calculates calculation data for calculating the related data based on the second control program and random number data. And the related data calculation unit of the verifier calculates the related data based on the calculation data calculated by the calculation unit.

本発明にあっては、第1車載機の検証器は、乱数データを生成し、生成した乱数データと、所定データとに基づいて基準データを演算する。第2車載機は、検証器が生成した乱数データを取得し、取得した乱数データと第2制御プログラムとに基づいて演算データを算出する。検証器は、第2車載機が算出した演算データを取得し、取得した演算データに基づいて関連データを演算し、関連データが基準データと一致するか否かを判定する。   In the present invention, the verifier of the first in-vehicle device generates random number data, and calculates reference data based on the generated random number data and predetermined data. The second in-vehicle device acquires the random number data generated by the verifier, and calculates calculation data based on the acquired random number data and the second control program. The verifier acquires the calculation data calculated by the second in-vehicle device, calculates related data based on the acquired calculation data, and determines whether the related data matches the reference data.

検証器が生成する乱数データが変更された場合、第2車載機が算出する演算データも変更される。例えば、検証器が第2制御プログラムを検証する都度、乱数データを変更すると仮定する。この場合、検証器が第2制御プログラムを検証する都度、演算データが変更されるので、第2制御プログラムの検証結果の信頼性が高い。   When the random number data generated by the verifier is changed, the calculation data calculated by the second in-vehicle device is also changed. For example, assume that the random number data is changed each time the verifier verifies the second control program. In this case, since the calculation data is changed every time the verifier verifies the second control program, the reliability of the verification result of the second control program is high.

本発明に係る車載装置は、前記第1車載機の前記検証器は、鍵データが記憶されている記憶部を有し、前記基準データ演算部は、該記憶部に記憶されている鍵データと、前記乱数データと、前記所定データとに基づいて前記基準データを演算し、前記関連データ演算部は、前記演算データ及び鍵データに基づいて前記関連データを演算することを特徴とする。   In the in-vehicle device according to the present invention, the verifier of the first in-vehicle device has a storage unit in which key data is stored, and the reference data calculation unit includes key data stored in the storage unit. The reference data is calculated based on the random number data and the predetermined data, and the related data calculation unit calculates the related data based on the calculated data and key data.

本発明にあっては、第1車載機の検証器は、鍵データ、乱数データ及び所定データに基づいて基準データを演算すると共に、第2車載機が演算した演算データと鍵データとに基づいて関連データを演算するので、第2制御プログラムの検証結果の信頼性がより高い。   In the present invention, the verifier of the first in-vehicle device calculates the reference data based on the key data, the random number data, and the predetermined data, and based on the operation data calculated by the second in-vehicle device and the key data. Since the related data is calculated, the reliability of the verification result of the second control program is higher.

本発明に係る車載装置は、前記第1車載機の前記検証器は、乱数データを生成する乱数生成部と、該乱数生成部が生成した乱数データ、及び、所定データに基づいて、前記基準データを演算する基準データ演算部とを有し、前記第2車載機は前記関連データ演算部を有し、該関連データ演算部は、前記第2制御プログラム及び乱数データに基づいて前記関連データを演算することを特徴とする。   In the in-vehicle device according to the present invention, the verifier of the first in-vehicle device includes the random number generator that generates random number data, the random number data generated by the random number generator, and the reference data based on predetermined data. A reference data calculation unit for calculating the second data, the second vehicle-mounted device has the related data calculation unit, and the related data calculation unit calculates the related data based on the second control program and random number data. It is characterized by doing.

本発明にあっては、第1車載機の検証器は、乱数データを生成し、生成した乱数データと、所定データとに基づいて基準データを演算する。第2車載機は、検証器が生成した乱数データを取得し、取得した乱数データと第2制御プログラムとに基づいて関連データを演算する。検証器は、第2車載機が演算した関連データを取得し、取得した関連データが基準データと一致するか否かを判定する。   In the present invention, the verifier of the first in-vehicle device generates random number data, and calculates reference data based on the generated random number data and predetermined data. The second in-vehicle device acquires the random number data generated by the verifier, and calculates related data based on the acquired random number data and the second control program. The verifier acquires related data calculated by the second in-vehicle device, and determines whether or not the acquired related data matches the reference data.

検証器が生成する乱数データが変更された場合、第2車載機が演算する関連データも変更される。例えば、検証器が第2制御プログラムを検証する都度、乱数データを変更すると仮定する。この場合、検証器が第2制御プログラムを検証する都度、検証器が第2車載機から取得する関連データが変更されるので、第2制御プログラムの検証結果の信頼性が高い。   When the random number data generated by the verifier is changed, the related data calculated by the second in-vehicle device is also changed. For example, assume that the random number data is changed each time the verifier verifies the second control program. In this case, each time the verifier verifies the second control program, the related data acquired by the verifier from the second in-vehicle device is changed, so the reliability of the verification result of the second control program is high.

本発明に係る車載装置は、前記検証器の前記判定部によって、前記関連データが前記基準データと一致していないと判定された場合に前記第2車載機の動作を停止させる動作制御部を備えることを特徴とする。   The in-vehicle device according to the present invention includes an operation control unit that stops the operation of the second in-vehicle device when the determination unit of the verifier determines that the related data does not match the reference data. It is characterized by that.

本発明にあっては、第1車載機の検証器によって、関連データが所定データと一致しないと判定された場合、第2制御プログラムが改ざんされた可能性が高いとして、第2車載機は動作を停止する。   In the present invention, when the verifier of the first in-vehicle device determines that the related data does not match the predetermined data, the second in-vehicle device operates with the possibility that the second control program has been falsified. To stop.

本発明に係る中継装置は、複数の第1通信装置間の通信を中継する第1中継機と、制御プログラムに従って処理を実行し、複数の第2通信装置間の通信を中継する第2中継機とを備え、前記第1中継機及び第2中継機は前記第1通信装置及び第2通信装置間の通信を中継する車両用の中継装置であって、前記第1中継機は、鍵データが記憶されている記憶部と、該鍵データを用いて、前記第2中継機の前記制御プログラムに関連する関連データを演算する演算部と、該演算部が演算した関連データが所定データと一致するか否かを判定する判定部とを有することを特徴とする。   A relay device according to the present invention includes a first relay that relays communication between a plurality of first communication devices, and a second relay that performs processing according to a control program and relays communication between the plurality of second communication devices. The first relay and the second relay are relay devices for vehicles that relay communication between the first communication device and the second communication device, and the first relay has key data A stored storage unit, a calculation unit that calculates related data related to the control program of the second repeater using the key data, and the related data calculated by the calculation unit match predetermined data And a determination unit for determining whether or not.

本発明にあっては、第2中継機では、制御プログラムに従って処理が実行される。第1中継機は、鍵データを用いて、第2中継機の制御プログラムに関連する関連データを演算し、演算した関連データが所定データと一致するか否かを判定する。第1中継機は、関連データが所定データと一致した場合、例えば、制御プログラムは適正であることを第2中継機に通知し、第2中継機は制御プログラムに従って処理を開始する。   In the present invention, in the second repeater, processing is executed according to the control program. The first relay uses the key data to calculate related data related to the control program of the second relay, and determines whether the calculated related data matches the predetermined data. When the related data matches the predetermined data, for example, the first repeater notifies the second repeater that the control program is appropriate, and the second repeater starts processing according to the control program.

以上のように、第1中継機が第2中継機の制御プログラムが適正であることを検証するため、第1中継機及び第2中継機夫々が制御プログラムの検証機能を有する必要がない。このため、装置は小型であり、製造費用は安価である。   As described above, since the first repeater verifies that the control program for the second repeater is appropriate, each of the first repeater and the second repeater need not have a control program verification function. For this reason, the apparatus is small and the manufacturing cost is low.

本発明に係る中継装置は、前記第1中継機の前記判定部によって前記関連データが前記所定データと一致していないと判定された場合に前記第2中継機の動作を停止させる動作制御部を備えることを特徴とする。   The relay device according to the present invention includes an operation control unit that stops the operation of the second repeater when the determination unit of the first repeater determines that the related data does not match the predetermined data. It is characterized by providing.

本発明にあっては、第1中継機によって、関連データが所定データと一致しないと判定された場合、第2中継機の制御プログラムが改ざんされた可能性が高いとして、第2中継機は動作を停止する。   In the present invention, when it is determined by the first repeater that the related data does not match the predetermined data, the second repeater operates with the possibility that the control program of the second repeater has been falsified. To stop.

本発明に係る中継装置は、前記第2中継機は、前記関連データを演算するための演算データを算出する算出部を有し、前記第1中継機は、該算出部が算出した演算データを取得する取得部を有し、前記第1中継機の前記演算部は、前記鍵データと、該取得部が取得した演算データとを用いて前記関連データを演算することを特徴とする。   In the relay device according to the present invention, the second relay has a calculation unit that calculates calculation data for calculating the related data, and the first relay transmits the calculation data calculated by the calculation unit. It has an acquisition part to acquire, The calculation part of the 1st repeater calculates the related data using the key data and the calculation data which the acquisition part acquired.

本発明にあっては、第2中継機は、関連データを演算するための演算データを算出する。第1中継機は、演算データを第2中継機から取得し、鍵データと演算データとを用いて関連データを演算する。例えば、演算データのデータ量が制御プログラムのデータ量よりも小さい場合、制御プログラムが適正であることを検証するために、第2中継機から第1中継機へ転送されるデータのデータ量は小さい。この場合、検証を行うために必要な時間が短い。   In the present invention, the second repeater calculates calculation data for calculating related data. The first repeater obtains calculation data from the second repeater and calculates related data using the key data and the calculation data. For example, when the amount of operation data is smaller than the amount of data in the control program, the amount of data transferred from the second repeater to the first repeater is small in order to verify that the control program is appropriate . In this case, the time required for performing the verification is short.

本発明に係る中継装置は、前記第1中継機は、第2の制御プログラムに従って処理を実行する処理部と、第2の鍵データが記憶されている第2の記憶部と、該第2の鍵データを用いて、前記第2の制御プログラムに関連する第2の関連データを演算する第2の演算部と、該第2の演算部が演算した第2の関連データが第2の所定データと一致するか否かを判定する第2の判定部とを有することを特徴とする。   In the relay device according to the present invention, the first repeater includes a processing unit that executes processing according to a second control program, a second storage unit that stores second key data, and the second relay unit. A second calculation unit that calculates second related data related to the second control program using the key data, and the second related data calculated by the second calculation unit is the second predetermined data. And a second determination unit that determines whether or not they match.

本発明にあっては、第1中継機では、第2の制御プログラムに従って処理が実行される。第1中継機は、鍵データを用いて関連データを演算することによって、第2中継機の制御プログラムが適正であることを検証すると共に、第2の鍵データを用いて第2の関連データを演算することによって、自機の第2の制御プログラムが適正であることも検証する。   In the present invention, the first repeater executes processing according to the second control program. The first repeater verifies that the control program of the second repeater is appropriate by calculating the associated data using the key data, and uses the second key data to obtain the second associated data. It is also verified by calculation that the second control program of the own device is appropriate.

本発明に係る中継装置は、複数の第1通信装置間の通信で用いられる第1プロトコルに対応するデータを、複数の第2通信装置間の通信で用いられる第2プロトコルに対応するデータに変換し、該第2プロトコルに対応するデータを前記第1プロトコルに対応するデータに変換する変換部を備えることを特徴とする。   The relay device according to the present invention converts data corresponding to a first protocol used in communication between a plurality of first communication devices into data corresponding to a second protocol used in communication between the plurality of second communication devices. And a conversion unit for converting data corresponding to the second protocol into data corresponding to the first protocol.

本発明にあっては、複数の第1通信装置間の通信では第1プロトコルが用いられ、複数の第2通信装置間の通信では第2プロトコルが用いられる。第1通信装置及び第2通信装置間で通信が行われる場合、第1プロトコル対応するデータを、第2プロトコルに対応するデータに変換し、第2プロトコルに対応するデータを第1プロトコルに対応するデータに変換する。   In the present invention, the first protocol is used for communication between the plurality of first communication devices, and the second protocol is used for communication between the plurality of second communication devices. When communication is performed between the first communication device and the second communication device, data corresponding to the first protocol is converted into data corresponding to the second protocol, and data corresponding to the second protocol is corresponded to the first protocol. Convert to data.

本発明に係るコンピュータプログラムは、第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機と、第2制御プログラムに従って処理を実行する第2車載機とを備える車載装置の前記検証器で実行されるコンピュータプログラムであって、前記第2制御プログラムに関連する関連データを演算し、演算した関連データが基準データと一致しているか否かを判定する処理をコンピュータに実行させることを特徴とする。   A computer program according to the present invention includes a first processing unit that executes processing according to a first control program, and verification that verifies the first control program by using hardware other than the hardware that constitutes the first processing unit. A computer program that is executed by the verifier of the in-vehicle device that includes a first in-vehicle device that includes a first in-vehicle device and a second in-vehicle device that executes processing according to the second control program, and is related to the second control program The related data is calculated, and the computer is caused to execute processing for determining whether or not the calculated related data matches the reference data.

本発明にあっては、第1車載機の検証器が、第2車載機の第2制御プログラムに関連する関連データが基準データと一致するか否かを判定することよって、第2制御プログラムを検証する。このため、第2車載機が第2制御プログラムの検証機能を有する必要がないので、車載装置は小型であり、車載装置の製造費用は安価である。   In the present invention, the verifier of the first in-vehicle device determines whether or not the related data related to the second control program of the second in-vehicle device matches the reference data. Validate. For this reason, since the 2nd vehicle equipment does not need to have the verification function of the 2nd control program, a vehicle equipment is small and the manufacturing cost of a vehicle equipment is cheap.

本発明に係るコンピュータプログラムは、第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機と、第2制御プログラムに従って処理を実行する第2車載機とを備える車載装置の前記検証器で実行されるコンピュータプログラムであって、前記第2制御プログラムに関連する関連データを取得し、取得した関連データが基準データと一致しているか否かを判定する処理をコンピュータに実行させることを特徴とする。   A computer program according to the present invention includes a first processing unit that executes processing according to a first control program, and verification that verifies the first control program by using hardware other than the hardware that constitutes the first processing unit. A computer program that is executed by the verifier of the in-vehicle device that includes a first in-vehicle device that includes a first in-vehicle device and a second in-vehicle device that executes processing according to the second control program, and is related to the second control program Relevant data is acquired, and the computer is caused to execute a process for determining whether or not the acquired related data matches the reference data.

本発明にあっては、第1車載機の検証器が、第2車載機の第2制御プログラムに関連する関連データが基準データと一致するか否かを判定することよって、第2制御プログラムを検証する。このため、第2車載機が第2制御プログラムの検証機能を有する必要がないので、車載装置は小型であり、車載装置の製造費用は安価である。   In the present invention, the verifier of the first in-vehicle device determines whether or not the related data related to the second control program of the second in-vehicle device matches the reference data. Validate. For this reason, since the 2nd vehicle equipment does not need to have the verification function of the 2nd control program, a vehicle equipment is small and the manufacturing cost of a vehicle equipment is cheap.

本発明に係るコンピュータプログラムは、複数の第1通信装置間の通信を中継する第1中継機と、制御プログラムに従って処理を実行し、複数の第2通信装置間の通信を中継する第2中継機とを備え、前記第1中継機及び第2中継機は前記第1通信装置及び第2通信装置間の通信を中継する車両用の中継装置における前記第1中継機で実行されるコンピュータプログラムであって、予め記憶されている鍵データを用いて、前記第2中継機の前記制御プログラムに関連する関連データを演算し、演算した関連データが所定データと一致するか否かを判定する処理をコンピュータに実行させることを特徴とする。   A computer program according to the present invention includes a first relay that relays communication between a plurality of first communication devices, and a second relay that performs processing according to a control program and relays communication between the plurality of second communication devices. And the first repeater and the second repeater are computer programs executed by the first repeater in a vehicle relay device that relays communication between the first communication device and the second communication device. The computer calculates the related data related to the control program of the second repeater using the key data stored in advance, and determines whether or not the calculated related data matches the predetermined data It is made to perform.

本発明にあっては、第1中継機が、第2中継機の制御プログラムに関連する関連データが基準データと一致するか否かを判定することよって、第2中継機の制御プログラムを検証する。このため、第2中継機が制御プログラムの検証機能を有する必要がないので、中継装置は小型であり、中継装置の製造費用は安価である。   In the present invention, the first repeater verifies the control program of the second repeater by determining whether the related data related to the control program of the second repeater matches the reference data. . For this reason, since it is not necessary for the second repeater to have a control program verification function, the relay device is small and the manufacturing cost of the relay device is low.

本発明によれば、小型で安価な装置を実現することができる。   According to the present invention, a small and inexpensive device can be realized.

実施の形態1における通信システムの要部構成を示すブロック図である。1 is a block diagram showing a main part configuration of a communication system according to Embodiment 1. FIG. 第1中継機の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a 1st repeater. 第2中継機の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a 2nd relay machine. 第1中継処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a 1st relay process. 第2中継処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a 2nd relay process. 検証処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a verification process. 起動処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a starting process. 実施の形態2における通信システムの要部構成を示すブロック図である。6 is a block diagram showing a main configuration of a communication system according to Embodiment 2. FIG. 第2中継機の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a 2nd relay machine. 起動処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a starting process. 実施の形態3における検証処理の手順を示すフローチャートである。12 is a flowchart illustrating a procedure of verification processing according to the third embodiment. 実施の形態3における検証処理の手順を示すフローチャートである。12 is a flowchart illustrating a procedure of verification processing according to the third embodiment. 起動処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a starting process. 第2制御プログラムの検証の説明図である。It is explanatory drawing of verification of a 2nd control program. 実施の形態4における検証処理の手順を示すフローチャートである。15 is a flowchart illustrating a verification process procedure according to the fourth embodiment. 実施の形態4における検証処理の手順を示すフローチャートである。15 is a flowchart illustrating a verification process procedure according to the fourth embodiment. 起動処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a starting process. 第2制御プログラムの検証の説明図である。It is explanatory drawing of verification of a 2nd control program.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は、実施の形態1における通信システム1の要部構成を示すブロック図である。通信システム1は、車両100に好適に搭載され、中継装置11、ECU12a,12a,12b,12b、車載機器13a,13b,13c及び通信線La,Lbを備える。中継装置11は第1中継機21及び第2中継機22を有する。
中継装置11、第1中継機21及び第2中継機22夫々は、車載装置、第1車載機及び第2車載機として機能する。
Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof.
(Embodiment 1)
FIG. 1 is a block diagram illustrating a main configuration of a communication system 1 according to the first embodiment. The communication system 1 is suitably mounted on the vehicle 100, and includes a relay device 11, ECUs 12a, 12a, 12b, 12b, in-vehicle devices 13a, 13b, 13c, and communication lines La, Lb. The relay device 11 includes a first relay machine 21 and a second relay machine 22.
Each of the relay device 11, the first relay device 21, and the second relay device 22 functions as an in-vehicle device, a first in-vehicle device, and a second in-vehicle device.

中継装置11の第1中継機21には、2つの通信線La,Lbが各別に接続されている。通信線Laには、2つのECU12a,12aが接続されている。通信線Lbには、2つのECU12b,12bが接続されている。中継装置11では、第1中継機21は第2中継機22に接続されている。第2中継機22には、3つの車載機器13a,13b,13cが各別に接続されている。   Two communication lines La and Lb are connected to the first repeater 21 of the relay device 11 separately. Two ECUs 12a and 12a are connected to the communication line La. Two ECUs 12b and 12b are connected to the communication line Lb. In the relay device 11, the first repeater 21 is connected to the second repeater 22. Three in-vehicle devices 13a, 13b, and 13c are connected to the second repeater 22 separately.

通信線La,Lb夫々を介して、CAN(Controller Area Network)プロトコルに従った通信が行われる。通信線La,Lb夫々はツイストペア線である。通信線La,Lb夫々を介して、CANプロトコルに対応し、識別情報を含むECUデータが送信される。識別情報は、自身が含まれているECUデータを識別するための情報である。   Communication according to the CAN (Controller Area Network) protocol is performed via the communication lines La and Lb. Each of the communication lines La and Lb is a twisted pair line. The ECU data corresponding to the CAN protocol and including identification information is transmitted via the communication lines La and Lb. The identification information is information for identifying ECU data in which the identification information is included.

ECU12a,12a及び第1中継機21夫々は、通信線Laを介してECUデータを送信する。ECU12a,12a及び第1中継機21中の1つが送信したECUデータは、他の全ての装置によって受信される。例えば、一方のECU12aが送信したECUデータは、他方のECU12a及び第1中継機21によって受信される。   Each of the ECUs 12a, 12a and the first repeater 21 transmits ECU data via the communication line La. ECU data transmitted by one of the ECUs 12a, 12a and the first repeater 21 is received by all other devices. For example, ECU data transmitted by one ECU 12 a is received by the other ECU 12 a and the first relay 21.

同様に、ECU12b,12b及び第1中継機21夫々は、通信線Lbを介してECUデータを送信する。ECU12b,12b及び第1中継機21中の1つが送信したECUデータは、他の全ての装置によって受信される。例えば、一方のECU12bが送信したECUデータは、他方のECU12b及び第1中継機21によって受信される。   Similarly, ECU12b, 12b and the 1st relay machine 21 each transmit ECU data via the communication line Lb. ECU data transmitted by one of the ECUs 12b, 12b and the first repeater 21 is received by all other devices. For example, ECU data transmitted by one ECU 12b is received by the other ECU 12b and the first relay 21.

ECU12a,12a夫々は、ECUデータを受信した場合、受信したECUデータに含まれている識別情報に基づいて、このECUデータに係る処理を実行すべきか否かを判定する。ECU12a,12aは、受信したECUデータに係る処理を実行すべきであると判定した場合、受信したECUデータに係る処理を実行する。ECU12a,12a夫々は、受信したECUデータに係る処理を実行すべきではないと判定した場合、受信したECUデータの放置又は削除等を行う。   When each of the ECUs 12a and 12a receives the ECU data, the ECUs 12a and 12a each determine whether or not the process related to the ECU data should be executed based on the identification information included in the received ECU data. When it is determined that the process related to the received ECU data should be executed, the ECUs 12a and 12a execute the process related to the received ECU data. When each of the ECUs 12a and 12a determines that the processing related to the received ECU data should not be executed, the ECU 12a or 12a performs leaving or deletion of the received ECU data.

同様に、ECU12b,12b夫々は、ECUデータを受信した場合、受信したECUデータに含まれている識別情報に基づいて、このECUデータに係る処理を実行すべきか否かを判定する。ECU12b,12b夫々は、受信したECUデータに係る処理を実行すべきであると判定した場合、受信したECUデータに係る処理を実行する。ECU12b,12b夫々は、受信したECUデータに係る処理を実行すべきではないと判定した場合、受信したECUデータの放置又は削除等を行う。   Similarly, when each of the ECUs 12b and 12b receives ECU data, the ECUs 12b and 12b determine whether or not to execute the process related to the ECU data based on the identification information included in the received ECU data. When each of the ECUs 12b and 12b determines that the process related to the received ECU data should be executed, the ECU 12b and 12b execute the process related to the received ECU data. When each of the ECUs 12b and 12b determines that the processing related to the received ECU data should not be executed, the ECU 12b or 12b performs leaving or deletion of the received ECU data.

ECU12a,12a,12b,12b夫々には、図示しない電気機器が接続されている。ECU12a,12a,12b,12b夫々は、例えば、受信したECUデータに係る処理として、受信したECUデータが示す内容に基づいて、自装置に接続されている電気機器の動作を制御する処理を実行する。   An electric device (not shown) is connected to each of the ECUs 12a, 12a, 12b, 12b. Each of the ECUs 12a, 12a, 12b, and 12b executes, for example, a process for controlling the operation of the electrical device connected to the own apparatus based on the content indicated by the received ECU data, as a process related to the received ECU data. .

ECU12a,12a,12b,12b夫々は、例えば、自装置にセンサが接続されている場合、センサが検出した検出値を示すECUデータを送信する。また、ECU12a,12a,12b,12b夫々は、例えば、自装置に使用者から指示を受け付ける受付部が接続されている場合、受付部が受け付けた指示の内容を示すECUデータを送信する。例えば、一方のECU12aに、車両のパワーウィンドウを開閉するウィンドウモータが接続されている場合において、他方のECU12aは、パワーウィンドウの開放を指示するECUデータを送信する。一方のECU12aは、このECUデータを受信した場合、ウィンドウモータにパワーウィンドウを開放させる。   Each of the ECUs 12a, 12a, 12b, and 12b transmits ECU data indicating a detection value detected by the sensor, for example, when the sensor is connected to the own device. Further, each of the ECUs 12a, 12a, 12b, and 12b transmits ECU data indicating the content of the instruction received by the receiving unit when, for example, a receiving unit that receives an instruction from the user is connected to the own device. For example, when a window motor that opens and closes the power window of the vehicle is connected to one ECU 12a, the other ECU 12a transmits ECU data that instructs opening of the power window. When the ECU 12a receives this ECU data, the ECU 12a causes the window motor to open the power window.

第1中継機21は、ECU12a,12a中の1つと、ECU12b,12b中の1つとの間の通信を中継する。具体的には、第1中継機21は、通信線Laを介して受信したECUデータを、通信線Lbを介して送信し、通信線Lbを介して受信したECUデータを、通信線Laを介して送信する。ECU12a,12a,12b,12b夫々は第1通信装置として機能する。ECU12a,12a中の1つと、ECU12b,12b中の1つとの間の通信ではCANプロトコルが用いられる。   The first repeater 21 relays communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b. Specifically, the first repeater 21 transmits the ECU data received via the communication line La via the communication line Lb, and the ECU data received via the communication line Lb via the communication line La. To send. Each of the ECUs 12a, 12a, 12b, 12b functions as a first communication device. The CAN protocol is used for communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b.

車載機器13a,13b,13c夫々は、第2中継機22と一対一で通信する。車載機器13a,13b,13c夫々と第2中継機22との間では、例えば、イーサネット(登録商標)の規格に準じた通信が行われる。車載機器13a,13b,13c夫々は、送信先を示す送信先情報を含む機器データを第2中継機22に送信する。第2中継機22は、車載機器13a,13b,13c中の2つの間で行われる通信を中継する。車載機器13a,13b,13c夫々は第2通信装置として機能する。車載機器13a,13b,13c中の2つの間の通信では、例えば、イーサネット(登録商標)に対応するプロトコルの1つであるTCP(Transmission Control Protocol)/IP(Internet Protocol)が用いられる。   Each of the in-vehicle devices 13a, 13b, and 13c communicates with the second repeater 22 on a one-to-one basis. For example, communication conforming to the Ethernet (registered trademark) standard is performed between the in-vehicle devices 13a, 13b, and 13c and the second repeater 22. Each of the in-vehicle devices 13a, 13b, and 13c transmits device data including transmission destination information indicating a transmission destination to the second repeater 22. The 2nd relay machine 22 relays communication performed between two in vehicle equipment 13a, 13b, and 13c. Each of the in-vehicle devices 13a, 13b, and 13c functions as a second communication device. In communication between the two in-vehicle devices 13a, 13b, and 13c, for example, TCP (Transmission Control Protocol) / IP (Internet Protocol) which is one of protocols corresponding to Ethernet (registered trademark) is used.

車載機器13a,13b夫々は、カメラ及びディスプレイであると仮定する。この場合、車載機器13aは、カメラで撮影した画像データを含む機器データを第2中継機22に送信する。この機器データには、送信先として車載機器13bを示す送信先情報が含まれている。第2中継機22は、画像データを含む機器データを車載機器13bに送信する。車載機器13bは、第2中継機22から受信した機器データに含まれている画像データに基づく画像を表示する。   It is assumed that each of the in-vehicle devices 13a and 13b is a camera and a display. In this case, the in-vehicle device 13 a transmits device data including image data captured by the camera to the second relay device 22. This device data includes transmission destination information indicating the in-vehicle device 13b as a transmission destination. The second relay 22 transmits device data including image data to the in-vehicle device 13b. The in-vehicle device 13b displays an image based on the image data included in the device data received from the second repeater 22.

第1中継機21及び第2中継機22は、ECU12a,12a,12b,12b中の1つと、車載機器13a,13b,13c中の1つとの間の通信を中継する。   The first repeater 21 and the second repeater 22 relay communication between one of the ECUs 12a, 12a, 12b, and 12b and one of the in-vehicle devices 13a, 13b, and 13c.

ECUデータは、前述したように、CANプロトコルに対応するデータであり、第1プロトコルに対応するデータに相当する。機器データは、車載機器13a,13b,13c中の2つの間の通信で用いられるプロトコルに対応するデータであり、第2プロトコルに対応するデータに相当する。
第1中継機21は、通信線La,Lbの一方を介して受信したECUデータを機器データに変換する。第2中継機22は、第1中継機21が変換した機器データを車載機器13a,13b,13c中の1つに送信する。第2中継機22は、車載機器13a,13b,13c中の1つから機器データを受信する。第1中継機21は、第2中継機22が受信した機器データをECUデータに変換し、変換したECUデータを通信線La,Lb中の少なくとも一方を介して送信する。
As described above, the ECU data is data corresponding to the CAN protocol, and corresponds to data corresponding to the first protocol. The device data is data corresponding to a protocol used for communication between the two in-vehicle devices 13a, 13b, and 13c, and corresponds to data corresponding to the second protocol.
The first repeater 21 converts ECU data received via one of the communication lines La and Lb into device data. The second repeater 22 transmits the device data converted by the first repeater 21 to one of the in-vehicle devices 13a, 13b, and 13c. The second relay 22 receives device data from one of the in-vehicle devices 13a, 13b, and 13c. The first repeater 21 converts the device data received by the second repeater 22 into ECU data, and transmits the converted ECU data via at least one of the communication lines La and Lb.

図2は第1中継機21の要部構成を示すブロック図である。第1中継機21は、ROM(Read Only Memory)31、CPU32、通信部33a,33b、HSM(Hardware Security Module)34、RAM(Random Access Memory)35及び電源回路36を有する。これらは、バス37に接続されている。通信部33a,33b夫々は、バス37の他に、通信線La,Lbに接続されている。RAM35は、バス37の他に、第2中継機22に接続されている。   FIG. 2 is a block diagram showing a main configuration of the first repeater 21. The first repeater 21 includes a ROM (Read Only Memory) 31, a CPU 32, communication units 33 a and 33 b, an HSM (Hardware Security Module) 34, a RAM (Random Access Memory) 35, and a power supply circuit 36. These are connected to the bus 37. In addition to the bus 37, the communication units 33a and 33b are connected to communication lines La and Lb, respectively. The RAM 35 is connected to the second repeater 22 in addition to the bus 37.

ROM31には、第1制御プログラムP1が記憶されている。CPU32は、第1制御プログラムP1に従って第1中継処理を実行する。第1中継処理は、ECU12a,12a中の1つとECU12b,12b中の1つとの間の通信と、ECU12a,12a,12b,12b中の1つと車載機器13a,13b,13c中の1つとの間の通信とを中継するための処理である。第1制御プログラムP1は第2の制御プログラムに相当し、CPU32は処理部として機能する。更に、CPU32は、第1処理部として機能し、第1処理部を構成するハードウェアである。   The ROM 31 stores a first control program P1. The CPU 32 executes the first relay process according to the first control program P1. The first relay process includes communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b, and between one of the ECUs 12a, 12a, 12b and 12b and one of the in-vehicle devices 13a, 13b and 13c. This is a process for relaying the communication. The first control program P1 corresponds to a second control program, and the CPU 32 functions as a processing unit. Furthermore, the CPU 32 functions as a first processing unit and is hardware that constitutes the first processing unit.

通信部33aは、ECU12a,12a中の1つから、通信線Laを介してECUデータを受信する。通信部33aは、CPU32の指示に従って、ECUデータを、通信線Laを介して送信する。通信部33aが送信したECUデータは、ECU12a,12aによって受信される。
通信部33bは、ECU12b,12b中の1つから、通信線Lbを介してECUデータを受信する。通信部33bは、CPU32の指示に従って、ECUデータを、通信線Lbを介して送信する。通信部33bが送信したECUデータは、ECU12b,12bによって受信される。
The communication unit 33a receives ECU data from one of the ECUs 12a and 12a via the communication line La. The communication part 33a transmits ECU data via the communication line La according to the instruction | indication of CPU32. The ECU data transmitted by the communication unit 33a is received by the ECUs 12a and 12a.
The communication unit 33b receives ECU data from one of the ECUs 12b and 12b via the communication line Lb. The communication part 33b transmits ECU data via the communication line Lb according to the instruction | indication of CPU32. The ECU data transmitted by the communication unit 33b is received by the ECUs 12b and 12b.

第2中継機22には第2制御プログラムP2(図3参照)が記憶されている。HSM34は、第1制御プログラムP1が適正であることを検証すると共に、第2制御プログラムP2が適正であることを検証する。HSM34は、第1制御プログラムP1及び第2制御プログラムP2を検証する検証器として機能する。
CPU32、HSM34及び第2中継機22夫々は、RAM35に種々のデータを書き込み、RAM35からデータを読み出す。従って、例えば、第2中継機22がRAM35に書き込んだデータを、CPU32がRAM35から読み出すことができる。
The second repeater 22 stores a second control program P2 (see FIG. 3). The HSM 34 verifies that the first control program P1 is appropriate and verifies that the second control program P2 is appropriate. The HSM 34 functions as a verifier that verifies the first control program P1 and the second control program P2.
Each of the CPU 32, the HSM 34, and the second repeater 22 writes various data to the RAM 35 and reads data from the RAM 35. Therefore, for example, the data written in the RAM 35 by the second repeater 22 can be read from the RAM 35 by the CPU 32.

電源回路36は、図示しない電力線によって、車両100の図示しないバッテリに接続されている。電源回路36は、更に、図示しない電力線によって、ROM31、CPU32、通信部33a,33b、HSM34及びRAM35に接続されている。電源回路36は、バッテリが出力した電圧を所定の第1電圧に変圧する。電源回路36は、第1電圧をROM31、CPU32、通信部33a,33b、HSM34及びRAM35に出力し、これらに電力を供給する。   The power supply circuit 36 is connected to a battery (not shown) of the vehicle 100 via a power line (not shown). The power supply circuit 36 is further connected to the ROM 31, CPU 32, communication units 33a and 33b, HSM 34, and RAM 35 by a power line (not shown). The power supply circuit 36 transforms the voltage output from the battery to a predetermined first voltage. The power supply circuit 36 outputs the first voltage to the ROM 31, the CPU 32, the communication units 33a and 33b, the HSM 34, and the RAM 35, and supplies power thereto.

例えば、車両100の図示しないイグニッションスイッチがオンに切替わった場合、電源回路36は、ROM31、CPU32、通信部33a,33b、HSM34及びRAM35に電力を供給し、これらを作動させる。電源回路36は、HSM34の指示に従って、ROM31、CPU32、通信部33a,33b、HSM34及びRAM35への電力供給を停止する。これにより、これらは動作を停止し、RAM35に記憶されているデータは消去される。   For example, when an ignition switch (not shown) of the vehicle 100 is turned on, the power supply circuit 36 supplies power to the ROM 31, the CPU 32, the communication units 33a and 33b, the HSM 34, and the RAM 35 to operate them. The power supply circuit 36 stops power supply to the ROM 31, the CPU 32, the communication units 33 a and 33 b, the HSM 34, and the RAM 35 in accordance with an instruction from the HSM 34. As a result, they stop operating, and the data stored in the RAM 35 is erased.

HSM34は、ROM41、CPU42及びインタフェース43を有する。これらはバス44に接続されている。インタフェース43は、バス44の他にバス37に接続されている。   The HSM 34 has a ROM 41, a CPU 42 and an interface 43. These are connected to the bus 44. The interface 43 is connected to the bus 37 in addition to the bus 44.

ROM41には検証プログラムPhが記憶されている。CPU42は、第1中継機21内で検証プログラムPhを実行する。これにより、第1制御プログラムP1及び第2制御プログラムP2が適正であることを検証するための検証処理が実行される。検証プログラムPhは、CPU42に検証処理を実行させるためのコンピュータプログラムである。ROM41には、更に、第1鍵データK1、第1基準データR1、第2鍵データK2及び第2基準データR2が記憶されている。これらは、所定データであり、検証処理で用いられる。ROM41は記憶部及び第2の記憶部として機能する。
CPU42は、第1制御プログラムP1及び第2制御プログラムP2を検証するハードウェアであり、CPU32とは異なっている。
The ROM 41 stores a verification program Ph. The CPU 42 executes the verification program Ph in the first repeater 21. Thereby, a verification process for verifying that the first control program P1 and the second control program P2 are appropriate is executed. The verification program Ph is a computer program for causing the CPU 42 to execute verification processing. The ROM 41 further stores first key data K1, first reference data R1, second key data K2, and second reference data R2. These are predetermined data and are used in the verification process. The ROM 41 functions as a storage unit and a second storage unit.
The CPU 42 is hardware for verifying the first control program P1 and the second control program P2, and is different from the CPU 32.

なお、検証プログラムPhは、コンピュータ(CPU42)が読み取り可能に、記憶媒体E1に記憶されていてもよい。この場合、図示しない読み出し装置によって記憶媒体E1から読み出された検証プログラムPhがHSM34の図示しない記憶部に記憶される。記憶媒体E1は、光ディスク、フレキシブルディスク、磁気ディスク、磁気光ディスク又は半導体メモリ等である。光ディスクは、CD(Compact Disc)−ROM(Read Only Memory)、DVD(Digital Versatile Disc)−ROM、又は、BD(Blu-ray(登録商標) Disc)等である。磁気ディスクは、例えばハードディスクである。また、図示しない通信網に接続されている図示しない外部装置から検証プログラムPhをダウンロードし、検証プログラムPhを前述した記憶部に記憶してもよい。   The verification program Ph may be stored in the storage medium E1 so that the computer (CPU 42) can read it. In this case, the verification program Ph read from the storage medium E1 by a reading device (not shown) is stored in a storage unit (not shown) of the HSM 34. The storage medium E1 is an optical disk, a flexible disk, a magnetic disk, a magnetic optical disk, a semiconductor memory, or the like. The optical disc is a CD (Compact Disc) -ROM (Read Only Memory), a DVD (Digital Versatile Disc) -ROM, or a BD (Blu-ray (registered trademark) Disc). The magnetic disk is, for example, a hard disk. Alternatively, the verification program Ph may be downloaded from an external device (not shown) connected to a communication network (not shown), and the verification program Ph may be stored in the storage unit described above.

CPU42は、インタフェース43を介して、第1中継機21のROM31及びRAM35にアクセスする。具体的には、CPU42は、ROM31から第1制御プログラムP1を読み出す。また、CPU42は、RAM35に種々のデータを書き込むと共にRAM35からデータを読み出す。更に、CPU42は、電源回路36に電力供給の停止を指示する。以上のように、インタフェース43は、CPU42がROM31、RAM35及び電源回路36へのアクセスを許可する。一方で、インタフェース43は、CPU32がROM41へアクセスすることを防止する。従って、CPU32は、ROM41に記憶されている内容を読み出すことはできない。   The CPU 42 accesses the ROM 31 and the RAM 35 of the first repeater 21 via the interface 43. Specifically, the CPU 42 reads the first control program P1 from the ROM 31. The CPU 42 writes various data to the RAM 35 and reads data from the RAM 35. Further, the CPU 42 instructs the power supply circuit 36 to stop power supply. As described above, the interface 43 allows the CPU 42 to access the ROM 31, RAM 35, and power supply circuit 36. On the other hand, the interface 43 prevents the CPU 32 from accessing the ROM 41. Therefore, the CPU 32 cannot read the contents stored in the ROM 41.

電源回路36からHSM34への電力供給が開始された場合、CPU42は検証処理を実行する。CPU42が検証処理を実行している間、第1中継機21のCPU32は動作を停止している。例えば、CPU32は、CPU32の図示しない端子の電圧がハイレベル電圧である場合に作動し、CPU32の端子の電圧がローレベル電圧である場合に動作を停止する。この場合、CPU42が検証処理を実行している間、HSM34によってCPU32の端子の電圧がローレベル電圧に維持される。そして、CPU42が検証処理を終了した場合、HSM34によってCPU32の端子の電圧がハイレベル電圧に切替えられる。   When power supply from the power supply circuit 36 to the HSM 34 is started, the CPU 42 executes a verification process. While the CPU 42 is executing the verification process, the CPU 32 of the first repeater 21 stops operating. For example, the CPU 32 operates when the voltage of a terminal (not shown) of the CPU 32 is a high level voltage, and stops operating when the voltage of the terminal of the CPU 32 is a low level voltage. In this case, while the CPU 42 executes the verification process, the voltage of the terminal of the CPU 32 is maintained at the low level voltage by the HSM 34. When the CPU 42 completes the verification process, the HSM 34 switches the voltage at the terminal of the CPU 32 to a high level voltage.

図3は第2中継機22の要部構成を示すブロック図である。第2中継機22は、ROM51、CPU52、通信部53a,53b,53c及び電源回路54を有する。これらは、バス55に接続されている。バス55は、更に、第1中継機21のRAM35に接続されている。通信部53a,53b,53c夫々は、バス55の他に、車載機器13a,13b,13cに接続されている。   FIG. 3 is a block diagram showing a main configuration of the second repeater 22. The second repeater 22 includes a ROM 51, a CPU 52, communication units 53 a, 53 b, 53 c and a power supply circuit 54. These are connected to the bus 55. The bus 55 is further connected to the RAM 35 of the first repeater 21. In addition to the bus 55, the communication units 53a, 53b, and 53c are connected to the in-vehicle devices 13a, 13b, and 13c.

ROM51には、起動プログラムPb及び第2制御プログラムP2が記憶されている。CPU52は起動プログラムPbに従って起動処理を実行する。起動処理は、CPU52への電力供給が開始されて、CPU52が作動した後、CPU52によって最初に実行される処理である。   The ROM 51 stores a startup program Pb and a second control program P2. The CPU 52 executes a startup process according to the startup program Pb. The startup process is a process that is first executed by the CPU 52 after the power supply to the CPU 52 is started and the CPU 52 is activated.

また、CPU52は第2制御プログラムP2に従って第2中継処理を実行する。第2中継処理は、車載機器13a,13b,13c中の2つの間の通信と、ECU12a,12a,12b,12b中の1つと車載機器13a,13b,13c中の1つとの間の通信とを中継するための処理である。CPU52は第2処理部として機能する。   Further, the CPU 52 executes the second relay process according to the second control program P2. The second relay process includes communication between two of the in-vehicle devices 13a, 13b, and 13c, and communication between one of the ECUs 12a, 12a, 12b, and 12b and one of the in-vehicle devices 13a, 13b, and 13c. It is a process for relaying. The CPU 52 functions as a second processing unit.

通信部53a,53b,53c夫々は車載機器13a,13b,13cから機器データを受信する。また、通信部53a,53b,53c夫々は、CPU52の指示に従って、機器データを車載機器13a,13b,13cに送信する。   The communication units 53a, 53b, and 53c receive device data from the in-vehicle devices 13a, 13b, and 13c, respectively. Further, each of the communication units 53a, 53b, and 53c transmits device data to the in-vehicle devices 13a, 13b, and 13c in accordance with an instruction from the CPU 52.

電源回路54は、図示しない電力線によって、車両100のバッテリに接続されている。電源回路54は、更に、図示しない電力線によって、ROM51、CPU52及び通信部53a,53b,53cに接続されている。電源回路54は、バッテリが出力した電圧を所定の第2電圧に変圧する。電源回路54は、所定の第2電圧をROM31、CPU32、通信部33a,33b、HSM34及びRAM35に出力し、これらに電力を供給する。   The power supply circuit 54 is connected to the battery of the vehicle 100 by a power line (not shown). The power supply circuit 54 is further connected to the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c by a power line (not shown). The power supply circuit 54 transforms the voltage output from the battery to a predetermined second voltage. The power supply circuit 54 outputs a predetermined second voltage to the ROM 31, the CPU 32, the communication units 33a and 33b, the HSM 34, and the RAM 35, and supplies power thereto.

例えば、車両100の図示しないイグニッションスイッチがオンに切替わった場合、電源回路54は、ROM51、CPU52及び通信部53a,53b,53cに電力を供給し、これらを作動させる。電源回路54は、CPU52の指示に従って、ROM51、CPU52及び通信部53a,53b,53cへの電力供給を停止する。これにより、これらは動作を停止する。   For example, when an ignition switch (not shown) of the vehicle 100 is turned on, the power supply circuit 54 supplies power to the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c, and operates them. The power supply circuit 54 stops the power supply to the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c in accordance with an instruction from the CPU 52. Thereby, they stop operating.

起動処理及び第2中継処理夫々において、CPU52は、第1中継機21のRAM35に種々のデータを書き込み、RAM35からデータを読み出す。   In each of the startup process and the second relay process, the CPU 52 writes various data in the RAM 35 of the first relay machine 21 and reads the data from the RAM 35.

図4は第1中継処理の手順を示すフローチャートである。第1中継機21のCPU32は第1中継処理を周期的に実行する。まず、CPU32は、通信部33a,33b中の1つがECUデータを受信したか否かを判定する(ステップS1)。CPU32は、通信部33a,33b中の1つがECUデータを受信したと判定した場合(S1:YES)、ECUデータを、ECU12a,12a,12b,12b及び車載機器13a,13b,13c中の少なくとも1つに送信すべきか否かを判定する(ステップS2)。   FIG. 4 is a flowchart showing the procedure of the first relay process. The CPU 32 of the first repeater 21 periodically executes the first relay process. First, the CPU 32 determines whether one of the communication units 33a and 33b has received ECU data (step S1). When it is determined that one of the communication units 33a and 33b has received the ECU data (S1: YES), the CPU 32 transmits the ECU data to at least one of the ECUs 12a, 12a, 12b, and 12b and the in-vehicle devices 13a, 13b, and 13c. It is determined whether or not to transmit to one (step S2).

ROM31には、複数の識別情報が記憶されている。ROM31に記憶されている複数の識別情報中の一又は複数の識別情報夫々には、通信部33a,33b中の1つが対応付けられている。ROM31に記憶されている複数の識別情報中の残りの識別情報夫々には、送信先情報が対応付けられている。送信先情報は、前述したように、車載機器13a,13b,13c中の少なくとも1つを示す。   The ROM 31 stores a plurality of identification information. One or more of the identification information stored in the ROM 31 is associated with one of the communication units 33a and 33b. The destination information is associated with each of the remaining pieces of identification information stored in the ROM 31. As described above, the transmission destination information indicates at least one of the in-vehicle devices 13a, 13b, and 13c.

ステップS2では、CPU32は、受信されたECUデータに含まれている識別情報が、ROM31に記憶されている複数の識別情報中の1つである場合、ECUデータを送信すべきと判定する。また、ステップS2では、CPU32は、受信されたECUデータに含まれている識別情報が、ROM31に記憶されて複数の識別情報のいずれとも一致しない場合、ECUデータを送信すべきではないと判定する。   In step S <b> 2, when the identification information included in the received ECU data is one of the plurality of identification information stored in the ROM 31, the CPU 32 determines that the ECU data should be transmitted. In step S2, CPU 32 determines that the ECU data should not be transmitted when the identification information included in the received ECU data is stored in ROM 31 and does not match any of the plurality of identification information. .

CPU32は、ECUデータを送信すべきと判定した場合(S2:YES)、受信されたECUデータを第1中継機21が送信するか否かを判定する(ステップS3)。ここで、CPU32は、ROM31において、受信されたECUデータに含まれている識別情報に、通信部33a,33b中の1つが対応付けられている場合、受信されたECUデータを第1中継機21が送信すると判定する。また、CPU32は、ROM31において、受信されたECUデータに含まれている識別情報に送信先情報が対応付けられている場合、受信されたECUデータを第1中継機21が送信しないと判定する。   When determining that the ECU data should be transmitted (S2: YES), the CPU 32 determines whether or not the first repeater 21 transmits the received ECU data (step S3). Here, when one of the communication units 33a and 33b is associated with the identification information included in the received ECU data in the ROM 31, the CPU 32 converts the received ECU data into the first repeater 21. Is determined to be transmitted. In addition, when the destination information is associated with the identification information included in the received ECU data in the ROM 31, the CPU 32 determines that the first repeater 21 does not transmit the received ECU data.

CPU32は、受信されたECUデータを第1中継機21が送信すると判定した場合(S3:YES)、通信部33a,33bの中で、受信されたECUデータに含まれている識別情報に対応する通信部に、受信されたECUデータの送信を指示する(ステップS4)。これにより、通信部33a,33bの中で送信を指示された通信部は、受信されたECUデータを送信する。   When it is determined that the first repeater 21 transmits the received ECU data (S3: YES), the CPU 32 corresponds to the identification information included in the received ECU data in the communication units 33a and 33b. The communication unit is instructed to transmit the received ECU data (step S4). Thereby, the communication unit instructed to transmit in the communication units 33a and 33b transmits the received ECU data.

例えば、通信部33aがECU12a,12a中の1つからECUデータを受信した場合において、通信部33aが受信したECUデータに含まれている識別情報が通信部33bに対応付けられているとき、CPU32は、通信部33bに指示して、通信部33aが受信したECUデータを送信させる。このECUデータはECU12b,12bによって受信される。
以上のように、第1中継機21は、ECU12a,12a中の1つと、ECU12b,12b中の1つとの間の通信を中継する。
For example, when the communication unit 33a receives ECU data from one of the ECUs 12a and 12a, when the identification information included in the ECU data received by the communication unit 33a is associated with the communication unit 33b, the CPU 32 Instructs the communication unit 33b to transmit the ECU data received by the communication unit 33a. This ECU data is received by the ECUs 12b and 12b.
As described above, the first repeater 21 relays communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b.

CPU32は、受信されたECUデータを第1中継機21が送信しない、即ち、受信されたECUデータを第2中継機22が送信すると判定した場合(S3:NO)、受信されたECUデータを機器データに変換する(ステップS5)。ステップS5で変換された機器データには、受信されたECUデータに含まれている識別情報に対応する送信先情報が含まれている。送信先情報は、車載機器13a,13b,13c中の少なくとも1つを示している。次に、CPU32は、ステップS5で変換した機器データをRAM35に書き込む(ステップS6)。前述したように、第2中継機22のCPU52は、この機器データをRAM35から読み出すことができる。   When the CPU 32 determines that the first relay machine 21 does not transmit the received ECU data, that is, the second relay machine 22 transmits the received ECU data (S3: NO), the CPU 32 receives the received ECU data. Data is converted (step S5). The device data converted in step S5 includes transmission destination information corresponding to the identification information included in the received ECU data. The transmission destination information indicates at least one of the in-vehicle devices 13a, 13b, and 13c. Next, the CPU 32 writes the device data converted in step S5 in the RAM 35 (step S6). As described above, the CPU 52 of the second repeater 22 can read out the device data from the RAM 35.

CPU32は、通信部33a,33bのいずれもECUデータを受信していないと判定した場合(S1:NO)、ECUデータを送信すべきではないと判定した場合(S2:NO)、又は、ステップS4,S6の一方を実行した後、通信部33a,33b中の1つが、RAM35に記憶されている機器データを送信すべきか否かを判定する(ステップS7)。ここで、CPU32は、送信先情報がECU12a,12a,12b,12b中の少なくとも1つを示す機器データがRAM35に記憶されている場合、通信部33a,33b中の1つが機器データを送信すべきと判定する。CPU32は、送信先情報がECU12a,12a,12b,12b中の少なくとも1つを示す機器データがRAM35に記憶されていない場合、通信部33a,33b中のいずれも機器データを送信すべきではないと判定する。   The CPU 32 determines that neither of the communication units 33a and 33b has received the ECU data (S1: NO), determines that the ECU data should not be transmitted (S2: NO), or step S4. , S6, one of the communication units 33a, 33b determines whether or not the device data stored in the RAM 35 should be transmitted (step S7). Here, when the device data whose transmission destination information indicates at least one of the ECUs 12a, 12a, 12b, and 12b is stored in the RAM 35, one of the communication units 33a and 33b should transmit the device data. Is determined. When the device data indicating that the destination information indicates at least one of the ECUs 12a, 12a, 12b, and 12b is not stored in the RAM 35, the CPU 32 should not transmit any device data in the communication units 33a and 33b. judge.

CPU32は、機器データを送信すべきと判定した場合(S7:YES)、送信すべき機器データをECUデータに変換する(ステップS8)。ステップS8で変換したECUデータには、送信先情報に応じた識別情報が含まれている。例えば、複数の送信先情報夫々に対応付けて識別情報がROM31に記憶されており、送信先情報に応じた識別情報をECUデータに含める。例えば、ECU12a,12a中の1つを示す送信先情報に一の識別情報が対応し、ECU12a,12a中の1つとECU12b,12bの1つとを示す送信先情報に他の識別情報が対応している。CPU32は変換部としても機能する。   When it is determined that the device data should be transmitted (S7: YES), the CPU 32 converts the device data to be transmitted into ECU data (step S8). The ECU data converted in step S8 includes identification information corresponding to the destination information. For example, identification information is stored in the ROM 31 in association with each of a plurality of pieces of transmission destination information, and identification information corresponding to the transmission destination information is included in the ECU data. For example, one identification information corresponds to transmission destination information indicating one of the ECUs 12a and 12a, and other identification information corresponds to transmission destination information indicating one of the ECUs 12a and 12a and one of the ECUs 12b and 12b. Yes. The CPU 32 also functions as a conversion unit.

次に、CPU32は、通信部33a,33b中の少なくとも1つに、ステップS8で変換したECUデータの送信を指示する(ステップS9)。これにより、通信部33a,33b中の少なくとも1つは、ステップS8でCPU32が変換したECUデータを送信する。例えば、ステップS8で送信先がECU12a,12a中の1つである機器データを変換した場合、CPU32は通信部33aに指示してステップS8で変換したECUデータを送信させる。   Next, the CPU 32 instructs at least one of the communication units 33a and 33b to transmit the ECU data converted in step S8 (step S9). Accordingly, at least one of the communication units 33a and 33b transmits the ECU data converted by the CPU 32 in step S8. For example, when device data whose destination is one of the ECUs 12a and 12a is converted in step S8, the CPU 32 instructs the communication unit 33a to transmit the ECU data converted in step S8.

CPU32は、通信部33a,33bのいずれも機器データを送信すべきではないと判定した場合(S7:NO)、又は、ステップS9を実行した後、第1中継処理を終了する。   When it is determined that neither the communication unit 33a or 33b should transmit device data (S7: NO) or after executing step S9, the CPU 32 ends the first relay process.

図5は第2中継処理の手順を示すフローチャートである。第2中継機22のCPU52は第2中継処理を周期的に実行する。まず、CPU52は、通信部53a,53b,53c中の1つが機器データを受信したか否かを判定する(ステップS21)。CPU52は、通信部53a,53b,53c中の1つが機器データを受信したと判定した場合(S21:YES)、受信した機器データを車載機器13a,13b,13c中の少なくとも1つに送信すべきか否かを判定する(ステップS22)。   FIG. 5 is a flowchart showing the procedure of the second relay process. The CPU 52 of the second repeater 22 periodically executes the second relay process. First, the CPU 52 determines whether one of the communication units 53a, 53b, and 53c has received device data (step S21). If the CPU 52 determines that one of the communication units 53a, 53b, 53c has received the device data (S21: YES), should the received device data be transmitted to at least one of the in-vehicle devices 13a, 13b, 13c? It is determined whether or not (step S22).

ここで、CPU52は、受信した機器データに含まれている送信先情報が車載機器13a,13b,13c中の少なくとも1つを示している場合、受信した機器データを車載機器13a,13b,13c中の少なくとも1つに送信すべきと判定する。一方で、CPU52は、受信した機器データに含まれている送信先情報が車載機器13a,13b,13cのいずれも示していない場合、受信した機器データを車載機器13a,13b,13cのいずれにも送信すべきではないと判定する。   Here, when the transmission destination information included in the received device data indicates at least one of the in-vehicle devices 13a, 13b, and 13c, the CPU 52 stores the received device data in the in-vehicle devices 13a, 13b, and 13c. It is determined that it should be transmitted to at least one of the above. On the other hand, when the destination information included in the received device data does not indicate any of the in-vehicle devices 13a, 13b, 13c, the CPU 52 transfers the received device data to any of the in-vehicle devices 13a, 13b, 13c. It is determined that it should not be transmitted.

CPU52は、受信した機器データを車載機器13a,13b,13c中の少なくとも1つに送信すべきと判定した場合(S22:YES)、通信部53a,53b,53c中の少なくとも1つに機器データの送信を指示する(ステップS23)。車載機器13a,13b,13c夫々は、通信部53a,53b,53cが対応する。ステップS23では、受信した機器データに含まれている送信先情報が示す送信先に応じて、送信を指示する通信部が決まる。例えば、送信先情報が車載機器13b,13cを示す場合、CPU52は、通信部53b,53c夫々に、受信した機器データの送信を指示する。CPU53がステップS23を実行した場合、通信部53a,53b,53cの中で送信を指示された通信部は機器データを送信する。   When the CPU 52 determines that the received device data should be transmitted to at least one of the in-vehicle devices 13a, 13b, and 13c (S22: YES), the device data is stored in at least one of the communication units 53a, 53b, and 53c. Transmission is instructed (step S23). The in-vehicle devices 13a, 13b, and 13c correspond to the communication units 53a, 53b, and 53c, respectively. In step S23, a communication unit instructing transmission is determined according to the transmission destination indicated by the transmission destination information included in the received device data. For example, when the transmission destination information indicates the in-vehicle devices 13b and 13c, the CPU 52 instructs the communication units 53b and 53c to transmit the received device data. When the CPU 53 executes Step S23, the communication unit instructed to transmit among the communication units 53a, 53b, and 53c transmits the device data.

例えば、通信部53aが機器データを受信した場合において、通信部53aが受信した機器データに含まれている送信先情報が車載機器13bを示すとき、CPU52は、通信部53bに指示して、通信部53aが受信した機器データを送信させる。
以上のように、第2中継機22は、車載機器13a,13b,13c中の2つの間の通信を中継する。
For example, when the communication unit 53a receives device data and the transmission destination information included in the device data received by the communication unit 53a indicates the in-vehicle device 13b, the CPU 52 instructs the communication unit 53b to perform communication. The device data received by the unit 53a is transmitted.
As described above, the second repeater 22 relays communication between the two in-vehicle devices 13a, 13b, and 13c.

CPU52は、受信した機器データを車載機器13a,13b,13cのいずれにも送信すべきではない、即ち、受信した機器データをECU12a,12a,12b,12b中の少なくとも1つに送信すべきであると判定した場合(S22:NO)、受信した機器データを第1中継機21のRAM35に書き込む(ステップS24)。   The CPU 52 should not transmit the received device data to any of the in-vehicle devices 13a, 13b, and 13c. That is, the CPU 52 should transmit the received device data to at least one of the ECUs 12a, 12a, 12b, and 12b. (S22: NO), the received device data is written in the RAM 35 of the first repeater 21 (step S24).

CPU52は、通信部53a,53b,53cのいずれも機器データを受信していないと判定した場合(S21:NO)、又は、ステップS23,S24を実行した後、車載機器13a,13b,13c中の少なくとも1つに送信すべき機器データがRAM35に記憶されているか否かを判定する(ステップS25)。ここで、CPU52は、送信先情報が車載機器13a,13b,13c中の少なくとも1つを示す機器データがRAM35に記憶されている場合、送信すべき機器データが記憶されていると判定する。CPU52は、送信先情報が車載機器13a,13b,13c中の少なくとも1つを示す機器データがRAM35に記憶されていない場合、送信すべき機器データが記憶されていないと判定する。   The CPU 52 determines that none of the communication units 53a, 53b, 53c has received the device data (S21: NO), or after executing steps S23, S24, the in-vehicle devices 13a, 13b, 13c It is determined whether device data to be transmitted to at least one is stored in the RAM 35 (step S25). Here, when the device data whose transmission destination information indicates at least one of the in-vehicle devices 13a, 13b, and 13c is stored in the RAM 35, the CPU 52 determines that the device data to be transmitted is stored. CPU52 determines with the apparatus data which should be transmitted not memorize | stored, when the apparatus data whose transmission destination information shows at least one in vehicle equipment 13a, 13b, 13c is not memorize | stored in RAM35.

CPU52は、送信すべき機器データが記憶されていると判定した場合(S25:YES)、通信部53a,53b,53c中の少なくとも1つに機器データの送信を指示する(ステップS26)。ステップS26では、ステップS23と同様に、送信すべき機器データに含まれている送信先情報が示す送信先に応じて、送信を指示する通信部が決まる。
CPU52は、送信すべき機器データが記憶されていないと判定した場合(S25:NO)、又は、ステップS26を実行した後、第2中継処理を終了する。
When it is determined that device data to be transmitted is stored (S25: YES), the CPU 52 instructs at least one of the communication units 53a, 53b, and 53c to transmit device data (step S26). In step S26, as in step S23, a communication unit that instructs transmission is determined according to the transmission destination indicated by the transmission destination information included in the device data to be transmitted.
CPU52 complete | finishes a 2nd relay process, when it determines with the apparatus data which should be transmitted not memorize | stored (S25: NO) or after performing step S26.

以上のように構成された中継装置11では、ECU12a,12a,12b,12b中の1つが送信したECUデータは、機器データに変換され、変換された機器データは、車載機器13a,13b,13c中の少なくとも1つに送信される。また、車載機器13a,13b,13c中の1つが送信した機器データは、ECUデータに変換され、変換されたECUデータは、ECU12a,12a,12b,12b中の少なくとも1つに送信される。   In the relay device 11 configured as described above, ECU data transmitted by one of the ECUs 12a, 12a, 12b, and 12b is converted into device data, and the converted device data is transmitted to the in-vehicle devices 13a, 13b, and 13c. To at least one of the In addition, device data transmitted by one of the in-vehicle devices 13a, 13b, and 13c is converted into ECU data, and the converted ECU data is transmitted to at least one of the ECUs 12a, 12a, 12b, and 12b.

図6は検証処理の手順を示すフローチャートである。第1中継機21が有するHSM34のCPU42は、電源回路54がCPU42への電力供給を開始した場合において、第1中継処理を実行する前に検証処理を実行する。前述したように、CPU42が検証処理を実行している間、CPU32は動作を停止している。検証処理では、まず、CPU42は、第1制御プログラムP1をROM31から読み出す(ステップS31)。次に、CPU42は、第1制御プログラムP1に関連する関連データを演算するための演算データを、例えばハッシュ関数を用いて算出する(ステップS32)。ステップS32では、CPU42は、ステップS31で読み出した制御プログラムP1に基づいて演算データを算出する。   FIG. 6 is a flowchart showing the procedure of the verification process. The CPU 42 of the HSM 34 included in the first repeater 21 executes the verification process before executing the first relay process when the power supply circuit 54 starts supplying power to the CPU 42. As described above, while the CPU 42 executes the verification process, the CPU 32 stops operating. In the verification process, first, the CPU 42 reads the first control program P1 from the ROM 31 (step S31). Next, the CPU 42 calculates calculation data for calculating related data related to the first control program P1 using, for example, a hash function (step S32). In step S32, the CPU 42 calculates calculation data based on the control program P1 read in step S31.

次に、CPU42は、ステップS32で算出した演算データと、ROM41に記憶されている第1鍵データK1とを用いて、第1制御プログラムP1に関連する関連データを演算する(ステップS33)。第1鍵データK1は第2の鍵データに相当し、CPU42は第2の演算部として機能する。
次に、CPU42は、ステップS33で演算した関連データが、ROM41に予め記憶されている第1基準データR1と一致するか否かを判定する(ステップS34)。CPU42は第2の判定部としても機能する。
Next, the CPU 42 calculates related data related to the first control program P1 using the calculation data calculated in step S32 and the first key data K1 stored in the ROM 41 (step S33). The first key data K1 corresponds to second key data, and the CPU 42 functions as a second arithmetic unit.
Next, the CPU 42 determines whether or not the related data calculated in step S33 matches the first reference data R1 stored in advance in the ROM 41 (step S34). The CPU 42 also functions as a second determination unit.

CPU42は、ステップS34を実行することによって、第1制御プログラムP1が適正であることを検証する。第1制御プログラムP1に関連する関連データが第1基準データR1と一致していることは、第1制御プログラムP1が適正であることを示す。第1制御プログラムP1に関連する関連データが第1基準データR1と一致していないことは、第1制御プログラムP1が適正ではないこと、即ち、第1制御プログラムP1が改ざんされている可能性が高いことを示す。   The CPU 42 verifies that the first control program P1 is appropriate by executing step S34. The fact that the related data related to the first control program P1 matches the first reference data R1 indicates that the first control program P1 is appropriate. The fact that the related data related to the first control program P1 does not match the first reference data R1 means that the first control program P1 is not appropriate, that is, the first control program P1 may be falsified. Indicates high.

CPU42は、関連データが第1基準データR1と一致しないと判定した場合(S34:NO)、第2中継機22の電源回路54が行う電力供給の停止を指示する停止データをRAM35に書き込む(ステップS35)。これにより、第2中継機22のCPU52に第1制御プログラムP1が適正ではないことを通知することができる。その後、CPU42は、電源回路36に電力供給の停止を指示する(ステップS36)。これにより、電源回路36は、ROM31、CPU32、通信部33a,33b、HSM34及びRAM35への電力供給を停止し、第1中継機21は動作を停止する。CPU42は、ステップS36を実行した後、検証処理を終了する。   If the CPU 42 determines that the related data does not match the first reference data R1 (S34: NO), the CPU 42 writes stop data instructing to stop the power supply performed by the power supply circuit 54 of the second repeater 22 to the RAM 35 (step S34). S35). As a result, the CPU 52 of the second repeater 22 can be notified that the first control program P1 is not appropriate. Thereafter, the CPU 42 instructs the power supply circuit 36 to stop power supply (step S36). Thereby, the power supply circuit 36 stops the power supply to the ROM 31, the CPU 32, the communication units 33a and 33b, the HSM 34, and the RAM 35, and the first repeater 21 stops its operation. After executing step S36, the CPU 42 ends the verification process.

なお、前述したように、電源回路36がRAM35への電力供給を停止した場合、RAM35に記憶されているデータは消去される。第2中継機22のCPU52がRAM35に記憶されている停止データを読み出す時間を確保するため、CPU42は、ステップS35を実行してから、CPU52が停止データを読み出すために十分な所定時間が経過した後、ステップS36を実行する。   As described above, when the power supply circuit 36 stops supplying power to the RAM 35, the data stored in the RAM 35 is erased. In order to secure the time for the CPU 52 of the second repeater 22 to read out the stop data stored in the RAM 35, the CPU 42 has performed a predetermined time sufficient for the CPU 52 to read out the stop data after executing step S35. Then, step S36 is performed.

CPU42は、関連データが第1基準データR1と一致すると判定した場合(S34:YES)、第2中継機22の第2制御プログラムP2の演算データがRAM35に記憶されているか否かを判定する(ステップS37)。第2制御プログラムP2の演算データは、第2制御プログラムP2に関連する関連データを演算するためのデータである。CPU42は、演算データが記憶されていないと判定した場合(S37:NO)、ステップS37を再び実行し、演算データがRAM35に書き込まれるまで待機する。第2中継機22のCPU52は、起動処理において、第2制御プログラムP2の演算データを算出し、算出した演算データをRAM35に書き込む。   When determining that the related data matches the first reference data R1 (S34: YES), the CPU 42 determines whether or not the operation data of the second control program P2 of the second repeater 22 is stored in the RAM 35 ( Step S37). The calculation data of the second control program P2 is data for calculating related data related to the second control program P2. When determining that the calculation data is not stored (S37: NO), the CPU 42 executes step S37 again and waits until the calculation data is written in the RAM 35. In the startup process, the CPU 52 of the second repeater 22 calculates calculation data of the second control program P2, and writes the calculated calculation data in the RAM 35.

CPU42は、演算データが記憶されていると判定した場合(S37:YES)、RAM35から第2制御プログラムP2の演算データを読み出し(ステップS38)、読み出した演算データと、ROM41に記憶されている第2鍵データK2とを用いて、第2制御プログラムP2に関連する関連データを演算する(ステップS39)。CPU42は演算部及び関連データ演算部としても機能する。   If the CPU 42 determines that the calculation data is stored (S37: YES), the CPU 42 reads the calculation data of the second control program P2 from the RAM 35 (step S38), and the read calculation data and the first data stored in the ROM 41 are stored. Using the two-key data K2, related data related to the second control program P2 is calculated (step S39). The CPU 42 also functions as a calculation unit and a related data calculation unit.

次に、CPU42は、ステップS39で演算した関連データが、ROM41に予め記憶されている第2基準データR2と一致するか否かを判定する(ステップS40)。CPU42は判定部としても機能する。
CPU42は、ステップS40を実行することによって、第2制御プログラムP2が適正であることも検証する。CPU42は、関連データが第2基準データR2と一致していると判定した場合(S40:YES)、第2制御プログラムP2が適正であることを示す正常データをRAM35に書き込む(ステップS41)。これにより、第2中継機22のCPU52に第2制御プログラムP2が適正であることを通知することができる。
Next, the CPU 42 determines whether or not the related data calculated in step S39 matches the second reference data R2 stored in advance in the ROM 41 (step S40). The CPU 42 also functions as a determination unit.
The CPU 42 also verifies that the second control program P2 is appropriate by executing step S40. When determining that the related data matches the second reference data R2 (S40: YES), the CPU 42 writes normal data indicating that the second control program P2 is appropriate to the RAM 35 (step S41). As a result, the CPU 52 of the second repeater 22 can be notified that the second control program P2 is appropriate.

CPU42は、関連データが第2基準データR2と一致していないと判定した場合(S40:NO)、第2制御プログラムP2が適正ではない、即ち、第2制御プログラムP2が改ざんされている可能性が高いことを示す異常データをRAM35に書き込む(ステップS42)。これにより、第2中継機22のCPU52に第2制御プログラムP2が適正ではないことを通知することができる。   When the CPU 42 determines that the related data does not match the second reference data R2 (S40: NO), the second control program P2 is not appropriate, that is, the second control program P2 may be falsified. Is written to the RAM 35 (step S42). As a result, the CPU 52 of the second repeater 22 can be notified that the second control program P2 is not appropriate.

CPU42は、ステップS41,S42の一方を実行した後、検証処理を終了する。CPU42は、検証処理を終了した後、電源回路36が電力供給を一旦停止して、電力供給を再開するまで、動作を停止する。CPU42が検証処理を終了した後、CPU32は、適正な第1制御プログラムP1を実行する。なお、前述したように、インタフェース43は、CPU32からROM41へのアクセスを防止している。このため、検証プログラムPh、第1鍵データK1、第1基準データR1、第2鍵データK2及び第2基準データR2がHSM34の外側に持ち出されることはない。   After executing one of steps S41 and S42, the CPU 42 ends the verification process. After completing the verification process, the CPU 42 stops the operation until the power supply circuit 36 temporarily stops the power supply and restarts the power supply. After the CPU 42 finishes the verification process, the CPU 32 executes the appropriate first control program P1. As described above, the interface 43 prevents the CPU 32 from accessing the ROM 41. Therefore, the verification program Ph, the first key data K1, the first reference data R1, the second key data K2, and the second reference data R2 are not taken out of the HSM 34.

図7は起動処理の手順を示すフローチャートである。第2中継機22のCPU52は、電源回路54がCPU52への電力供給を開始した場合において、第2中継処理を実行する前に、起動プログラムPbに従って起動処理を実行する。起動処理では、まず、CPU52は、第2制御プログラムP2をROM51から読み出す(ステップS51)。次に、CPU52は、例えばハッシュ関数を用いて、第2制御プログラムP2に関連する関連データを演算するための演算データを算出する(ステップS52)。CPU52は算出部として機能する。ステップS52では、CPU52は、ステップS51で読み出した第2制御プログラムP2に基づいて演算データを算出する。   FIG. 7 is a flowchart showing the procedure of the starting process. When the power supply circuit 54 starts to supply power to the CPU 52, the CPU 52 of the second repeater 22 executes the startup process according to the startup program Pb before executing the second relay process. In the startup process, first, the CPU 52 reads the second control program P2 from the ROM 51 (step S51). Next, the CPU 52 calculates calculation data for calculating related data related to the second control program P2 using, for example, a hash function (step S52). The CPU 52 functions as a calculation unit. In step S52, the CPU 52 calculates calculation data based on the second control program P2 read in step S51.

次に、CPU52は、ステップS52で算出した演算データを第1中継機21のRAM35に書き込む(ステップS53)。前述したように、第1中継機21が有するHSM34のCPU42は、RAM35に記憶されている演算データを読み出し、読み出した演算データを用いて第2制御プログラムP2に関連する関連データを演算し、第2制御プログラムP2が適正であるか否かを検証する。CPU42は、検証処理において、RAM35に停止データ、異常データ又は正常データを書き込む。
RAM35から関連データを読み出すことは、関連データを取得することに相当する。従って、CPU42は取得部としても機能する。
Next, the CPU 52 writes the calculation data calculated in step S52 into the RAM 35 of the first repeater 21 (step S53). As described above, the CPU 42 of the HSM 34 included in the first repeater 21 reads the calculation data stored in the RAM 35, calculates the related data related to the second control program P2 using the read calculation data, 2 Verify whether the control program P2 is appropriate. In the verification process, the CPU 42 writes stop data, abnormal data, or normal data in the RAM 35.
Reading the relevant data from the RAM 35 corresponds to obtaining the relevant data. Therefore, the CPU 42 also functions as an acquisition unit.

なお、第1中継機21の電源回路36と、第2中継機22の電源回路54とは略同時に電力供給を開始し、CPU52は、第1中継機21の電源回路36が電力供給を開始した後、ステップS53を実行する。このため、CPU52は、演算データをRAM35に確実に書き込むことができる。   The power supply circuit 36 of the first repeater 21 and the power supply circuit 54 of the second repeater 22 start supplying power almost simultaneously, and the CPU 52 starts the power supply of the power supply circuit 36 of the first repeater 21. Thereafter, Step S53 is executed. For this reason, the CPU 52 can reliably write the calculation data in the RAM 35.

CPU52は、ステップS53を実行した後、停止データが第1中継機21のRAM35に記憶されているか否かを判定する(ステップS54)。CPU52は、停止データが記憶されていないと判定した場合(S54:NO)、異常データがRAM35に記憶されているか否かを判定する(ステップS55)。CPU52は、停止データが記憶されていると判定した場合(S54:YES)、又は、異常データが記憶されていると判定した場合(S55:YES)、電源回路54に電力供給の停止を指示する(ステップS56)。これにより、電源回路54は電力供給を停止し、ROM51、CPU52及び通信部53a,53b,53cは動作を停止する。CPU52は、ステップS56を実行した後、起動処理を終了する。   After executing step S53, the CPU 52 determines whether stop data is stored in the RAM 35 of the first repeater 21 (step S54). When determining that stop data is not stored (S54: NO), the CPU 52 determines whether abnormal data is stored in the RAM 35 (step S55). When it is determined that stop data is stored (S54: YES), or when it is determined that abnormal data is stored (S55: YES), the CPU 52 instructs the power supply circuit 54 to stop power supply. (Step S56). Thereby, the power supply circuit 54 stops the power supply, and the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c stop operating. CPU52 complete | finishes a starting process, after performing step S56.

以上のように、第1中継機21が有するHSM34のCPU42は、RAM35に停止データ又は異常データを書き込むことによって、CPU42の動作、即ち、第2中継機22の動作を停止させる。CPU42は、動作制御部としても機能する。
前述したように、CPU42は、第1制御プログラムP1に関連する関連データが第1基準データR1と一致していないと判定した場合、第1制御プログラムP1が改ざんされている可能性が高いとして、停止データをRAM35に書き込む。
また、CPU42は、第2制御プログラムP2に関連する関連データが第2基準データR2と一致していないと判定した場合、第2制御プログラムP2が改ざんされている可能性が高いとして、異常データをRAM35に書き込む。これにより、第2中継機22の動作が停止する。
As described above, the CPU 42 of the HSM 34 included in the first relay 21 stops the operation of the CPU 42, that is, the operation of the second relay 22 by writing stop data or abnormal data to the RAM 35. The CPU 42 also functions as an operation control unit.
As described above, when the CPU 42 determines that the related data related to the first control program P1 does not match the first reference data R1, it is highly likely that the first control program P1 has been tampered with. Stop data is written to the RAM 35.
On the other hand, if the CPU 42 determines that the related data related to the second control program P2 does not match the second reference data R2, the CPU 42 determines that the second control program P2 is likely to be falsified, and outputs abnormal data. Write to RAM 35. Thereby, the operation of the second repeater 22 is stopped.

CPU52がステップS55で異常データが記憶されていると判定してステップS56を実行した場合、第1中継機21の電源回路36は電力供給を停止せず、第1中継機21のCPU32は第1中継処理を実行する。このため、第2中継機22の動作は停止するが、ECU12a,12a中の1つと、ECU12b,12b中の1つとの間の通信の中継は、第1中継機21によって行われる。   When the CPU 52 determines that the abnormal data is stored in step S55 and executes step S56, the power supply circuit 36 of the first repeater 21 does not stop the power supply, and the CPU 32 of the first repeater 21 has the first function. Perform relay processing. For this reason, the operation of the second repeater 22 stops, but the first repeater 21 relays communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b.

例えば、ECU12a,12a,12b,12b夫々が車両100の運転に最低限必要な機能を有するヘッドライト又はワイパーモータ等の電気機器を制御し、車載機器13a,13b,13c夫々は、車両100の運転に必ずしも必要でないカメラ又はディスプレイ等であると仮定する。この場合、第1制御プログラムP1が適正であれば、第2制御プログラムP2が適正でなかったとしても、運転者は車両100を運転することができる。   For example, each of the ECUs 12 a, 12 a, 12 b, and 12 b controls an electric device such as a headlight or a wiper motor that has a minimum necessary function for driving the vehicle 100, and each of the in-vehicle devices 13 a, 13 b, and 13 c operates the vehicle 100. It is assumed that the camera or the display is not always necessary. In this case, if the first control program P1 is appropriate, the driver can drive the vehicle 100 even if the second control program P2 is not appropriate.

CPU52は、異常データが記憶されていないと判定した場合(S55:NO)、正常データが第1中継機21のRAM35に記憶されているか否かを判定する(ステップS57)。CPU52は、正常データが記憶されていないと判定した場合(S57:NO)、ステップS54を実行し、RAM35に停止データ、異常データ又は正常データが記憶されるまで待機する。   When determining that abnormal data is not stored (S55: NO), the CPU 52 determines whether normal data is stored in the RAM 35 of the first repeater 21 (step S57). If the CPU 52 determines that normal data is not stored (S57: NO), it executes step S54 and waits until stop data, abnormal data, or normal data is stored in the RAM 35.

なお、CPU52がステップS54を実行する前に、第1中継機21が有するHSM34のCPU42が検証処理のステップS36を実行した場合、RAM35にデータが記憶されていないため、CPU52は、ステップS54,S55,S57の判定を無限に繰り返す。このため、起動処理において、CPU52は、ステップS54,S55,S57の判定を繰り返している時間が第2の所定時間を超えた場合、第1制御プログラムP1が適正ではないとして、ステップS56を実行してもよい。   If the CPU 42 of the HSM 34 included in the first repeater 21 executes step S36 of the verification process before the CPU 52 executes step S54, the data is not stored in the RAM 35. , S57 is repeated indefinitely. Therefore, in the startup process, when the time during which the determinations of steps S54, S55, and S57 are repeated exceeds the second predetermined time, the CPU 52 determines that the first control program P1 is not appropriate and executes step S56. May be.

CPU52は、正常データが記憶されていると判定した場合(S57:YES)、起動処理を終了する。その後、CPU52は、第2中継処理を実行する。   When it is determined that normal data is stored (S57: YES), the CPU 52 ends the activation process. Thereafter, the CPU 52 executes a second relay process.

以上のように構成された中継装置11では、第1中継機21が有するHSM34のCPU32が、第2制御プログラムP2が適正であることを検証する。このため、第2中継機22に、検証機能を有するHSM34と同様の構成部を設ける必要がない。結果、中継装置11は小型であり、中継装置11の製造費用は安価である。   In the relay device 11 configured as described above, the CPU 32 of the HSM 34 included in the first repeater 21 verifies that the second control program P2 is appropriate. For this reason, it is not necessary to provide the 2nd repeater 22 with the structure part similar to HSM34 which has a verification function. As a result, the relay device 11 is small, and the manufacturing cost of the relay device 11 is low.

また、第2中継機22のCPU52は、第2制御プログラムP2の演算データを算出し、算出した演算データを第1中継機21のRAM35に書き込む。第2制御プログラムP2の演算データのデータ量は、第2制御プログラムP2のデータ量よりも小さい。このため、第2制御プログラムP2が適正であることを検証するために、第2中継機22から第1中継機21へ転送されるデータのデータ量は小さい。結果、検証を行うために必要な時間が短い。   Further, the CPU 52 of the second repeater 22 calculates the calculation data of the second control program P2, and writes the calculated calculation data in the RAM 35 of the first repeater 21. The data amount of the operation data of the second control program P2 is smaller than the data amount of the second control program P2. For this reason, in order to verify that the second control program P2 is appropriate, the amount of data transferred from the second repeater 22 to the first repeater 21 is small. As a result, the time required for verification is short.

(実施の形態2)
図8は、実施の形態2における通信システム1の要部構成を示すブロック図である。
以下では、実施の形態2について、実施の形態1と異なる点を説明する。後述する構成を除く他の構成については、実施の形態1と共通しているため、実施の形態1と共通する構成部には実施の形態1と同一の参照符号を付してその説明を省略する。
(Embodiment 2)
FIG. 8 is a block diagram illustrating a main configuration of the communication system 1 according to the second embodiment.
In the following, the differences between the second embodiment and the first embodiment will be described. Since the configuration other than the configuration described later is the same as that in the first embodiment, the same reference numerals as those in the first embodiment are given to the components common to the first embodiment, and the description thereof is omitted. To do.

実施の形態2における通信システム1では、実施の形態1における通信システム1と比較して、中継装置11の構成が異なる。実施の形態2における中継装置11は、第1中継機21及び第2中継機22に加えて、メモリ23を有する。メモリ23は第2中継機22に接続されている。メモリ23は不揮発性メモリである。メモリ23には、第2制御プログラムP2が記憶されている。第2制御プログラムP2は、第2中継機22によってメモリ23から読み出される。   In the communication system 1 in the second embodiment, the configuration of the relay device 11 is different from that in the communication system 1 in the first embodiment. The relay apparatus 11 according to the second embodiment includes a memory 23 in addition to the first relay machine 21 and the second relay machine 22. The memory 23 is connected to the second repeater 22. The memory 23 is a nonvolatile memory. The memory 23 stores a second control program P2. The second control program P2 is read from the memory 23 by the second relay 22.

図9は第2中継機22の要部構成を示すブロック図である。実施の形態2における第2中継機22は、実施の形態1における第2中継機22が有する構成部に加えて、インタフェース61及びRAM62を有する。インタフェース61及びRAM62もバス55に接続されている。インタフェース61は、更に、メモリ23に接続される。   FIG. 9 is a block diagram showing a main configuration of the second repeater 22. The second repeater 22 in the second embodiment includes an interface 61 and a RAM 62 in addition to the components included in the second repeater 22 in the first embodiment. The interface 61 and the RAM 62 are also connected to the bus 55. The interface 61 is further connected to the memory 23.

CPU52は、インタフェース61を介して、第2制御プログラムP2をメモリ23から読み出す。また、CPU52は、RAM62に種々のデータを書き込み、RAM62からデータを読み出す。
なお、実施の形態2おけるROM51には、第2制御プログラムP2が記憶されていない。
The CPU 52 reads the second control program P2 from the memory 23 via the interface 61. Further, the CPU 52 writes various data to the RAM 62 and reads data from the RAM 62.
Note that the second control program P2 is not stored in the ROM 51 in the second embodiment.

電源回路54は、ROM51、CPU52及び通信部53a,53b,53cに加えて、インタフェース61及びRAM62に電力を供給する。インタフェース61及びRAM62夫々は、電源回路54から電力が供給されている間、作動する。電源回路54が電力供給を停止した場合、RAM62に記憶されているデータは消去される。   The power supply circuit 54 supplies power to the interface 61 and the RAM 62 in addition to the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c. Each of the interface 61 and the RAM 62 operates while power is supplied from the power supply circuit 54. When the power supply circuit 54 stops supplying power, the data stored in the RAM 62 is erased.

図10は起動処理の手順を示すフローチャートである。実施の形態2においても、第2中継機22のCPU52は、電源回路54がCPU52への電力供給を開始した場合において、第2中継処理を実行する前に、起動プログラムPbに従って起動処理を実行する。実施の形態2における起動処理のステップS65〜S68は、実施の形態1における起動処理のステップS54〜S57と同様である。このため、ステップS65〜S68の詳細な説明を省略する。   FIG. 10 is a flowchart showing the procedure of the startup process. Also in the second embodiment, when the power supply circuit 54 starts supplying power to the CPU 52, the CPU 52 of the second repeater 22 executes the startup process according to the startup program Pb before executing the second relay process. . Steps S65 to S68 of the activation process in the second embodiment are the same as steps S54 to S57 of the activation process in the first embodiment. For this reason, detailed description of steps S65 to S68 is omitted.

実施の形態2における起動処理では、まず、CPU52は、インタフェース61を介して、メモリ23から、第2制御プログラムP2を読み出し(ステップS61)、読み出した第2制御プログラムP2をRAM62に書き込む(ステップS62)。次に、CPU52は、例えばハッシュ関数を用いて、第2制御プログラムP2に関連する関連データを演算するための演算データを算出する(ステップS63)。   In the startup process according to the second embodiment, first, the CPU 52 reads the second control program P2 from the memory 23 via the interface 61 (step S61), and writes the read second control program P2 to the RAM 62 (step S62). ). Next, the CPU 52 calculates calculation data for calculating related data related to the second control program P2 using, for example, a hash function (step S63).

次に、CPU52は、ステップS64で算出した演算データを第1中継機21のRAM35に書き込み(ステップS64)、ステップS65を実行する。   Next, the CPU 52 writes the calculation data calculated in step S64 into the RAM 35 of the first repeater 21 (step S64), and executes step S65.

実施の形態2と同様に、CPU52は、ステップS68で正常データが第1中継機21のRAM35に記憶されていると判定して起動処理を終了した場合、第2中継機22のRAM62に記憶されている第2制御プログラムP2に従って、第2中継処理を実行する。
以上のように構成された実施の形態2における中継装置11は、実施の形態1における中継装置11が奏する効果と同様の効果を奏する。
As in the second embodiment, when the CPU 52 determines that normal data is stored in the RAM 35 of the first repeater 21 in step S68 and ends the activation process, the CPU 52 stores the normal data in the RAM 62 of the second repeater 22. The second relay process is executed in accordance with the second control program P2.
The relay device 11 according to the second embodiment configured as described above has the same effect as the relay device 11 according to the first embodiment.

(実施の形態3)
図11及び図12は、実施の形態3における検証処理の手順を示すフローチャートである。
以下では、実施の形態3について、実施の形態1と異なる点を説明する。後述する構成を除く他の構成については、実施の形態1と共通しているため、実施の形態1と共通する構成部には実施の形態1と同一の参照符号を付してその説明を省略する。
(Embodiment 3)
11 and 12 are flowcharts showing the procedure of the verification process according to the third embodiment.
In the following, the differences between the third embodiment and the first embodiment will be described. Since the configuration other than the configuration described later is the same as that in the first embodiment, the same reference numerals as those in the first embodiment are given to the components common to the first embodiment, and the description thereof is omitted. To do.

実施の形態3における通信システム1では、実施の形態1における通信システム1と比較して、第1中継機21が有するHSM34のCPU42が実行する検証処理の内容と、第2中継機22のCPU52が実行する起動処理の内容とが異なる。   In the communication system 1 according to the third embodiment, as compared with the communication system 1 according to the first embodiment, the contents of the verification process executed by the CPU 42 of the HSM 34 included in the first repeater 21 and the CPU 52 of the second repeater 22 are different. The contents of the startup process to be executed are different.

HSM34のCPU42は、実施の形態1と同様に、電源回路54がCPU42への電力供給を開始した場合において、第1中継処理を実行する前に検証処理を実行する。CPU42が検証処理を実行している間、CPU32は動作を停止している。実施の形態3における検証処理のステップS75,S76,S87,S88夫々は、実施の形態1における検証処理のステップS35,S36,S41,S42と同様である。このため、ステップS75,S76,S87,S88の詳細な説明を省略する。   As in the first embodiment, the CPU 42 of the HSM 34 executes the verification process before executing the first relay process when the power supply circuit 54 starts to supply power to the CPU 42. While the CPU 42 executes the verification process, the CPU 32 stops operating. Steps S75, S76, S87, and S88 of the verification process in the third embodiment are the same as steps S35, S36, S41, and S42 of the verification process in the first embodiment. For this reason, detailed description of steps S75, S76, S87, and S88 is omitted.

実施の形態3における検証処理では、まず、CPU42は、第1制御プログラムP1をROM31から読み出し(ステップS71)、読み出した第1制御プログラムP1に基づいて、第1制御プログラムP1に関連する第1関連データを演算するための第1演算データを算出する(ステップS72)。ステップS72では、CPU42は、例えば、ハッシュ関数を用いて第1演算データを算出する。   In the verification process in the third embodiment, first, the CPU 42 reads the first control program P1 from the ROM 31 (step S71), and based on the read first control program P1, the first relation related to the first control program P1. First calculation data for calculating data is calculated (step S72). In step S72, the CPU 42 calculates the first calculation data using, for example, a hash function.

次に、CPU42は、ステップS72で算出した第1演算データと、ROM41に記憶されている第1鍵データK1とに基づいて、第1制御プログラムP1に関連する第1関連データを演算し(ステップS73)、演算した第1関連データが第1基準データR1と一致するか否かを判定する(ステップS74)。CPU42は、ステップS74を実行することによって、第1制御プログラムP1が適正であることを検証する。第1関連データが第1基準データR1と一致していることは、第1制御プログラムP1が適正であることを示す。第1関連データが第1基準データR1と一致していないことは、第1制御プログラムP1が適正ではないこと、即ち、第1制御プログラムP1が改ざんされている可能性が高いことを示す。   Next, the CPU 42 calculates the first related data related to the first control program P1 based on the first calculation data calculated in Step S72 and the first key data K1 stored in the ROM 41 (Step S72). In step S73, it is determined whether or not the calculated first related data matches the first reference data R1 (step S74). The CPU 42 verifies that the first control program P1 is appropriate by executing step S74. The fact that the first related data matches the first reference data R1 indicates that the first control program P1 is appropriate. The fact that the first related data does not match the first reference data R1 indicates that the first control program P1 is not appropriate, that is, the possibility that the first control program P1 has been tampered with is high.

CPU42は、第1関連データが第1基準データR1と一致しないと判定した場合(S74:NO)、ステップS75,S76を順次実行する。これにより、電源回路36は、ROM31、CPU32、通信部33a,33b、HSM34及びRAM35への電力供給を停止し、第1中継機21は動作を停止する。CPU42は、ステップS76を実行した後、検証処理を終了する。   If the CPU 42 determines that the first related data does not match the first reference data R1 (S74: NO), the CPU 42 sequentially executes steps S75 and S76. Thereby, the power supply circuit 36 stops the power supply to the ROM 31, the CPU 32, the communication units 33a and 33b, the HSM 34, and the RAM 35, and the first repeater 21 stops its operation. After executing step S76, the CPU 42 ends the verification process.

CPU42は、第1関連データが第1基準データR1と一致すると判定した場合(S74:YES)、乱数データを生成する(ステップS77)。乱数データは、例えば、「1」又は「0」で表される数値の羅列であり、乱数を示す。ステップS77では、CPU42は、初期値を決定し、決定した初期値に基づいて乱数データを生成する。CPU42は、例えば、ステップS77が実行された時刻に基づいて初期値を決定する。この場合においては、ステップS77が実行される時刻が異なったとき、ステップS77で生成される乱数データの内容は変更される。時刻には、年月日も含まれている。   When it is determined that the first related data matches the first reference data R1 (S74: YES), the CPU 42 generates random number data (step S77). The random number data is, for example, an enumeration of numerical values represented by “1” or “0”, and indicates a random number. In step S77, the CPU 42 determines an initial value and generates random number data based on the determined initial value. For example, the CPU 42 determines the initial value based on the time when step S77 is executed. In this case, when the time at which step S77 is executed is different, the content of the random number data generated at step S77 is changed. The time also includes the date.

前述したように、電源回路54がCPU42への電力供給を開始する都度、検証処理は実行される。繰り返し実行される検証処理において、ステップS77が実行される時刻は相互に異なる。このため、これらの時刻に基づいて決定される初期値も相互に異なる。結果、ステップS77が実行された時刻に基づいて初期値が決定される場合、ステップS77で生成される乱数データの内容は、過去のステップS77で生成された乱数データの内容のいずれとも異なる。CPU42は乱数生成部としても機能する。   As described above, each time the power supply circuit 54 starts supplying power to the CPU 42, the verification process is executed. In the verification process that is repeatedly executed, the time at which step S77 is executed differs from each other. For this reason, the initial values determined based on these times are also different from each other. As a result, when the initial value is determined based on the time when step S77 is executed, the content of the random number data generated in step S77 is different from any of the content of the random number data generated in the past step S77. The CPU 42 also functions as a random number generator.

次に、CPU42は、ステップS77で生成した乱数データをRAM35に書き込む(ステップS78)。実施の形態3における起動処理では、第2中継機22のCPU52は、ステップS78で書き込まれた乱数データと、第2制御プログラムP2とに基づいて、第2制御プログラムP2に関連する第2関連データを演算するための第2演算データを算出し、算出した第2演算データをRAM35に書き込む。   Next, the CPU 42 writes the random number data generated in step S77 into the RAM 35 (step S78). In the activation process in the third embodiment, the CPU 52 of the second repeater 22 uses the second related data related to the second control program P2 based on the random number data written in step S78 and the second control program P2. The second calculation data for calculating is calculated, and the calculated second calculation data is written in the RAM 35.

HSM34のCPU42は、ステップS78を実行した後、第2演算データがRAM35に記憶されているか否かを判定する(ステップS79)。CPU42は、第2演算データが記憶されていないと判定した場合(S79:NO)、ステップS79を再び実行し、第2中継機22のCPU52が第2演算データをRAM35に書き込むまで待機する。   After executing Step S78, the CPU 42 of the HSM 34 determines whether or not the second calculation data is stored in the RAM 35 (Step S79). When the CPU 42 determines that the second calculation data is not stored (S79: NO), the CPU 42 executes step S79 again and waits until the CPU 52 of the second relay 22 writes the second calculation data in the RAM 35.

CPU42は、第2演算データが記憶されていると判定した場合(S79:YES)、RAM35から第2演算データを読み出し(ステップS80)、読み出した第2演算データと、ROM41に記憶されている第2鍵データK2とに基づいて、第2関連データを演算する(ステップS81)。   When the CPU 42 determines that the second calculation data is stored (S79: YES), the CPU 42 reads the second calculation data from the RAM 35 (step S80), and the read second calculation data and the second calculation data stored in the ROM 41 are stored. Based on the two-key data K2, the second related data is calculated (step S81).

次に、CPU42は、ROM41から第2基準データR2を読み出し(ステップS82)、読み出した第2基準データR2と、ステップS77で生成した乱数データとを合成することによって、第1合成データを生成する(ステップS83)。ステップS83では、CPU42は、例えば、第2基準データR2の最後尾に乱数データを加えることによって第1合成データを生成する。次に、CPU42は、ステップS83で生成した第1合成データに基づいて、第1中間データを算出する(ステップS84)。ステップS84では、CPU42は、例えば、ハッシュ関数を用いて第1中間データを算出する。   Next, the CPU 42 reads the second reference data R2 from the ROM 41 (step S82), and generates the first combined data by combining the read second reference data R2 and the random number data generated in step S77. (Step S83). In step S83, the CPU 42 generates first composite data by adding random number data to the tail of the second reference data R2, for example. Next, the CPU 42 calculates first intermediate data based on the first composite data generated in step S83 (step S84). In step S84, the CPU 42 calculates the first intermediate data using, for example, a hash function.

次に、CPU42は、ステップS84で算出した第1中間データと、ROM41に記憶されている第2鍵データK2とに基づいて、第3基準データを演算する(ステップS85)。
以上のように、CPU42は、乱数データ、第2基準データR2及び第2鍵データK2に基づいて第3基準データを演算する。CPU42は基準データ演算部として機能する。
Next, the CPU 42 calculates third reference data based on the first intermediate data calculated in step S84 and the second key data K2 stored in the ROM 41 (step S85).
As described above, the CPU 42 calculates the third reference data based on the random number data, the second reference data R2, and the second key data K2. The CPU 42 functions as a reference data calculation unit.

次に、CPU42は、ステップS81で演算した第2関連データが、ステップS86で演算した第3基準データと一致するか否かを判定する(ステップS86)。CPU42は、ステップS86を実行することによって、第2制御プログラムP2が適正であることも検証する。CPU42は、第2関連データが第3基準データと一致すると判定した場合(S86:YES)、第2制御プログラムP2は適正であるとして、ステップS87を実行する。CPU42は、第2関連データが第3基準データと一致しないと判定した場合(S86:NO)、第2制御プログラムP2は適正ではない、即ち、第2制御プログラムP2が改ざんされている可能性が高いとして、ステップS88を実行する。CPU42は、ステップS87,S88の一方を実行した後、検証処理を終了する。HSM34のCPU42は、検証処理を終了した後、電源回路36が電力供給を一旦停止して、電力供給を再開するまで、動作を停止する。CPU42が検証処理を終了した後、CPU32は、適正な第1制御プログラムP1を実行する。   Next, the CPU 42 determines whether or not the second related data calculated in step S81 matches the third reference data calculated in step S86 (step S86). The CPU 42 also verifies that the second control program P2 is appropriate by executing step S86. If the CPU 42 determines that the second related data matches the third reference data (S86: YES), the CPU 42 executes step S87, assuming that the second control program P2 is appropriate. When the CPU 42 determines that the second related data does not match the third reference data (S86: NO), the second control program P2 is not appropriate, that is, the second control program P2 may be falsified. As high, step S88 is executed. After executing one of steps S87 and S88, the CPU 42 ends the verification process. After completing the verification process, the CPU 42 of the HSM 34 stops operating until the power supply circuit 36 temporarily stops power supply and restarts power supply. After the CPU 42 finishes the verification process, the CPU 32 executes the appropriate first control program P1.

図13は起動処理の手順を示すフローチャートである。第2中継機22のCPU52は、実施の形態1と同様に、電源回路54がCPU52への電力供給を開始した場合において、第2中継処理を実行する前に、起動プログラムPbに従って起動処理を実行する。起動処理では、まず、CPU52は、停止データがRAM35に記憶されているか否かを判定する(ステップS91)。CPU52は、停止データが記憶されていないと判定した場合(S91:NO)、乱数データがRAM35に記憶されているか否かを判定する(ステップS92)。   FIG. 13 is a flowchart showing the procedure of the startup process. As in the first embodiment, the CPU 52 of the second repeater 22 executes the startup process according to the startup program Pb before executing the second relay process when the power supply circuit 54 starts supplying power to the CPU 52. To do. In the activation process, first, the CPU 52 determines whether stop data is stored in the RAM 35 (step S91). When determining that stop data is not stored (S91: NO), the CPU 52 determines whether random number data is stored in the RAM 35 (step S92).

CPU52は、乱数データが記憶されていないと判定した場合(S92:NO)、ステップS91を実行し、HSM34のCPU42が停止データ又は乱数データをRAM35に書き込むまで待機する。
なお、CPU52がステップS91を実行する前に、HSM34のCPU42が検証処理のステップS76を実行した場合、RAM35にデータが記憶されていないため、CPU52は、ステップS91,S92の判定を無限に繰り返す。このため、起動処理において、CPU52は、ステップS91,S92の判定を繰り返している時間が第3の所定時間を超えた場合、第1制御プログラムP1が適正ではないとして、ステップS99を実行してもよい。
If it is determined that random number data is not stored (S92: NO), the CPU 52 executes step S91 and waits until the CPU 42 of the HSM 34 writes stop data or random number data to the RAM 35.
In addition, when CPU42 of HSM34 performs step S76 of a verification process before CPU52 performs step S91, since data is not memorize | stored in RAM35, CPU52 repeats the determination of step S91, S92 infinitely. For this reason, in the startup process, the CPU 52 determines that the first control program P1 is not appropriate when the time during which the determinations of steps S91 and S92 are repeated exceeds the third predetermined time, and executes step S99. Good.

CPU52は、乱数データが記憶されていると判定した場合(S92:YES)、第2制御プログラムP2をROM51から読み出し(ステップS93)、読み出した第2制御プログラムP2に基づいて第2中間データを算出する(ステップS94)。ステップS94では、CPU52は、例えば、ハッシュ関数を用いて第2中間データを算出する。   When it is determined that random number data is stored (S92: YES), the CPU 52 reads the second control program P2 from the ROM 51 (step S93), and calculates the second intermediate data based on the read second control program P2. (Step S94). In step S94, the CPU 52 calculates the second intermediate data using, for example, a hash function.

次に、CPU52は、ステップS94で算出した第2中間データと、RAM35に記憶されている乱数データとを合成することによって、第2合成データを生成する(ステップS95)。ステップS95では、CPU52は、例えば、第2中間データの最後尾に乱数データを加えることによって第2合成データを生成する。次に、CPU52は、ステップS95で生成した第2合成データに基づいて、第2関連データを演算するための第2演算データを算出する(ステップS96)。ステップS96では、CPU52は、例えば、ハッシュ関数を用いて第2演算データを算出する。
以上のように、CPU52は第2制御プログラムP2、乱数データ及び第2鍵データK2に基づいて第2演算データを算出する。
Next, the CPU 52 generates second synthesized data by synthesizing the second intermediate data calculated in step S94 and the random number data stored in the RAM 35 (step S95). In step S95, for example, the CPU 52 generates second composite data by adding random number data to the end of the second intermediate data. Next, the CPU 52 calculates second calculation data for calculating second related data based on the second composite data generated in step S95 (step S96). In step S96, the CPU 52 calculates the second calculation data using, for example, a hash function.
As described above, the CPU 52 calculates the second calculation data based on the second control program P2, the random number data, and the second key data K2.

次に、CPU52は、ステップS96で算出した第2演算データをRAM35に書き込む(ステップS97)。前述したように、HSM34のCPU42は、RAM35に記憶されている第2演算データを読み出し、読み出した第2演算データに基づいて第2関連データを演算し、第2制御プログラムP2が適正であるか否かを検証する。CPU42は、検証結果に基づいて、正常データ又は異常データをRAM35に書き込む。   Next, the CPU 52 writes the second calculation data calculated in step S96 into the RAM 35 (step S97). As described above, the CPU 42 of the HSM 34 reads the second calculation data stored in the RAM 35, calculates the second related data based on the read second calculation data, and whether the second control program P2 is appropriate. Verify whether or not. The CPU 42 writes normal data or abnormal data in the RAM 35 based on the verification result.

CPU52は、ステップS97を実行した後、異常データがRAM35に記憶されているか否かを判定する(ステップS98)。CPU52は、停止データが記憶されていると判定した場合(S91:YES)、又は、異常データが記憶されていると判定した場合(S98:YES)、電源回路54に電力供給の停止を指示する(ステップS99)。これにより、電源回路54は電力供給を停止し、ROM51、CPU52及び通信部53a,53b,53cは動作を停止する。CPU52は、ステップS99を実行した後、起動処理を終了する。   After executing step S97, the CPU 52 determines whether abnormal data is stored in the RAM 35 (step S98). If the CPU 52 determines that stop data is stored (S91: YES) or determines that abnormal data is stored (S98: YES), the CPU 52 instructs the power supply circuit 54 to stop power supply. (Step S99). Thereby, the power supply circuit 54 stops the power supply, and the ROM 51, the CPU 52, and the communication units 53a, 53b, and 53c stop operating. CPU52 complete | finishes a starting process, after performing step S99.

以上のように、HSM34のCPU42は、RAM35に停止データ又は異常データを書き込むことによって、CPU42の動作、即ち、第2中継機22の動作を停止させる。
前述したように、CPU42は、第1制御プログラムP1に関連する第1関連データが第1基準データR1と一致していないと判定した場合、第1制御プログラムP1が改ざんされている可能性が高いとして、停止データをRAM35に書き込む。
また、CPU42は、第2制御プログラムP2に関連する第2関連データが第3基準データと一致していないと判定した場合、第2制御プログラムP2が改ざんされている可能性が高いとして、異常データをRAM35に書き込む。これにより、第2中継機22の動作が停止する。
As described above, the CPU 42 of the HSM 34 stops the operation of the CPU 42, that is, the operation of the second repeater 22 by writing stop data or abnormal data in the RAM 35.
As described above, when the CPU 42 determines that the first related data related to the first control program P1 does not match the first reference data R1, it is highly likely that the first control program P1 has been tampered with. The stop data is written in the RAM 35.
On the other hand, if the CPU 42 determines that the second related data related to the second control program P2 does not match the third reference data, the CPU 42 determines that the second control program P2 is likely to be falsified, and abnormal data. Is written into the RAM 35. Thereby, the operation of the second repeater 22 is stopped.

CPU52がステップS98で異常データが記憶されていると判定してステップS99を実行した場合、第1中継機21の電源回路36は電力供給を停止せず、第1中継機21のCPU32は第1中継処理を実行する。このため、第2中継機22の動作は停止するが、ECU12a,12a中の1つと、ECU12b,12b中の1つとの間の通信の中継は、第1中継機21によって行われる。   When the CPU 52 determines that the abnormal data is stored in step S98 and executes step S99, the power circuit 36 of the first repeater 21 does not stop the power supply, and the CPU 32 of the first repeater 21 does not stop the first. Perform relay processing. For this reason, the operation of the second repeater 22 stops, but the first repeater 21 relays communication between one of the ECUs 12a and 12a and one of the ECUs 12b and 12b.

CPU52は、異常データが記憶されていないと判定した場合(S98:NO)、正常データがRAM35に記憶されているか否かを判定する(ステップS100)。CPU52は、正常データが記憶されていないと判定した場合(S100:NO)、ステップS98を実行し、HSM34のCPU42が正常データ又は異常データをRAM35に書き込むまで待機する。CPU52は、正常データが記憶されていると判定した場合(S100:YES)、起動処理を終了する。その後、CPU52は、第2中継処理を実行する。   When determining that abnormal data is not stored (S98: NO), the CPU 52 determines whether normal data is stored in the RAM 35 (step S100). When determining that normal data is not stored (S100: NO), the CPU 52 executes step S98 and waits until the CPU 42 of the HSM 34 writes normal data or abnormal data into the RAM 35. When it is determined that normal data is stored (S100: YES), the CPU 52 ends the activation process. Thereafter, the CPU 52 executes a second relay process.

図14は、第2制御プログラムP2の検証の説明図である。前述したように、第2中継機22のCPU52は、第2制御プログラムP2に基づいて第2中間データを算出する。次に、CPU52は、算出した第2中間データと、HSM34のCPU42が生成した乱数データとを合成することによって、第2合成データを生成する。CPU52は、生成した第2合成データに基づいて、第2演算データを算出し、算出した第2演算データを第1中継機21のRAM35に書き込む。   FIG. 14 is an explanatory diagram of verification of the second control program P2. As described above, the CPU 52 of the second repeater 22 calculates the second intermediate data based on the second control program P2. Next, the CPU 52 generates the second combined data by combining the calculated second intermediate data and the random number data generated by the CPU 42 of the HSM 34. The CPU 52 calculates second calculation data based on the generated second composite data, and writes the calculated second calculation data in the RAM 35 of the first repeater 21.

HSM34のCPU42は、RAM35に記憶されている第2演算データと、第2鍵データK2とに基づいて第2関連データを演算する。
また、CPU42は、第2基準データR2と乱数データとを合成することによって、第1合成データを生成する。CPU42は、生成した第1合成データに基づいて、第1中間データを算出する。CPU42は、算出した第1中間データと、第2鍵データK2とに基づいて、第3基準データを演算する。CPU42は、第2関連データが第3演算データに一致するか否かを判定することによって、第2制御プログラムP2を検証する。
The CPU 42 of the HSM 34 calculates the second related data based on the second calculation data stored in the RAM 35 and the second key data K2.
Further, the CPU 42 generates the first combined data by combining the second reference data R2 and the random number data. The CPU 42 calculates first intermediate data based on the generated first composite data. The CPU 42 calculates third reference data based on the calculated first intermediate data and the second key data K2. The CPU 42 verifies the second control program P2 by determining whether or not the second related data matches the third calculation data.

第2中間データと乱数データとを合成することによって、第2合成データを生成する方法は、第2基準データと乱数データとを合成することによって、第1合成データを生成する方法と同じである。第2合成データに基づいて第2演算データを算出する方法は、第1合成データに基づいて第1中間データを算出する方法と同じである。第2演算データと、第2鍵データK2とに基づいて第2関連データを演算する方法は、第1中間データと、第2鍵データK2とに基づいて第3基準データを演算する方法と同じである。   The method of generating the second combined data by combining the second intermediate data and the random number data is the same as the method of generating the first combined data by combining the second reference data and the random number data. . The method of calculating the second calculation data based on the second composite data is the same as the method of calculating the first intermediate data based on the first composite data. The method of calculating the second related data based on the second calculation data and the second key data K2 is the same as the method of calculating the third reference data based on the first intermediate data and the second key data K2. It is.

第2制御プログラムP2が適正である場合、第2基準データR2は第2中間データと一致する。この場合、第2合成データ、第2演算データ及び第2関連データ夫々は、第1合成データ、第1中間データ及び第3基準データに一致し、正常データがRAM35に書き込まれる。
前述したように、検証処理が実行される都度、乱数データの内容は変更される。このため、今回の検証処理において、前回の検証処理で算出された第2演算データをRAM35に書き込んだ場合、第2関連データは第3基準データと一致しないので、第2制御プログラムP2が適正ではないと判定される。
When the second control program P2 is appropriate, the second reference data R2 matches the second intermediate data. In this case, the second composite data, the second calculation data, and the second related data are identical to the first composite data, the first intermediate data, and the third reference data, and normal data is written into the RAM 35.
As described above, every time the verification process is executed, the content of the random number data is changed. For this reason, in the current verification process, when the second calculation data calculated in the previous verification process is written in the RAM 35, the second related data does not match the third reference data, so the second control program P2 is not appropriate. It is determined that there is no.

第2制御プログラムP2を改ざんする方法として、以下の方法が考えられる。過去の検証処理において算出された演算データを記憶した上で、第2制御プログラムP2を改ざんし、その後の検証処理では、記憶されている演算データをRAM35に書き込む。実施の形態3における中継装置において、この方法が用いられた場合であっても、第2制御プログラムP2の改ざんが検出されるので、第2制御プログラムP2の検証結果の信頼性が高い。   The following method can be considered as a method of falsifying the second control program P2. After the calculation data calculated in the past verification process is stored, the second control program P2 is falsified, and in the subsequent verification process, the stored calculation data is written in the RAM 35. Even if this method is used in the relay apparatus in the third embodiment, since the alteration of the second control program P2 is detected, the reliability of the verification result of the second control program P2 is high.

また、HSM34のCPU42は、第2鍵データK2、乱数データ及び第2基準データR2に基づいて第3基準データを演算すると共に、第2中継機22のCPU52は、第2演算データと第2鍵データK2とに基づいて第2関連データを演算するので、第2制御プログラムP2の検証結果の信頼性はより高い。   Further, the CPU 42 of the HSM 34 calculates the third reference data based on the second key data K2, the random number data, and the second reference data R2, and the CPU 52 of the second repeater 22 stores the second calculation data and the second key. Since the second related data is calculated based on the data K2, the reliability of the verification result of the second control program P2 is higher.

以上のように構成された中継装置11では、第1中継機21が有するHSM34のCPU32が、第2制御プログラムP2を検証する。このため、第2中継機22が、第2制御プログラムP2の検証機能を有する必要がないので、中継装置11は小型であり、中継装置11の製造費用は安価である。   In the relay apparatus 11 configured as described above, the CPU 32 of the HSM 34 included in the first repeater 21 verifies the second control program P2. For this reason, since the 2nd relay machine 22 does not need to have the verification function of the 2nd control program P2, the relay apparatus 11 is small and the manufacturing cost of the relay apparatus 11 is cheap.

また、第2中継機22のCPU52は、第2制御プログラムP2の第2演算データを算出し、算出した第2演算データを第1中継機21のRAM35に書き込む。第2演算データのデータ量は、第2制御プログラムP2のデータ量よりも小さい。このため、第2制御プログラムP2が適正であることを検証するために、第2中継機22から第1中継機21へ転送されるデータのデータ量は小さい。結果、検証を行うために必要な時間が短い。
また、実施の形態3における中継装置11は、実施の形態1における中継装置11が奏する効果を同様に奏する。
The CPU 52 of the second repeater 22 calculates the second calculation data of the second control program P2, and writes the calculated second calculation data into the RAM 35 of the first repeater 21. The data amount of the second calculation data is smaller than the data amount of the second control program P2. For this reason, in order to verify that the second control program P2 is appropriate, the amount of data transferred from the second repeater 22 to the first repeater 21 is small. As a result, the time required for verification is short.
Moreover, the relay apparatus 11 in Embodiment 3 has the same effect as the relay apparatus 11 in Embodiment 1.

なお、実施の形態2において、第2中継機22のCPU52は、実施の形態3における起動処理を実行してもよい。この場合、起動処理では、CPU52は、ステップS93の代わりに、実施の形態2におけるステップS61,S62を実行する。ステップS94では、ステップS61で読み出した第2制御プログラムP2に基づいて第2中間データを算出する。   In the second embodiment, the CPU 52 of the second repeater 22 may execute the startup process in the third embodiment. In this case, in the startup process, the CPU 52 executes steps S61 and S62 in the second embodiment instead of step S93. In step S94, second intermediate data is calculated based on the second control program P2 read in step S61.

(実施の形態4)
実施の形態3における中継装置11では、HSM34のCPU42は第1鍵データK1に基づいて第1関連データを演算し、第2鍵データK2に基づいて第2関連データ及び第3基準データを演算している。しかしながら、CPU42は、第1鍵データK1,K2に基づく演算を行わなくてもよい。
以下では、実施の形態4について、実施の形態3と異なる点を説明する。後述する構成を除く他の構成については、実施の形態3と共通しているため、実施の形態3と共通する構成部には実施の形態3と同一の参照符号を付してその説明を省略する。
(Embodiment 4)
In the relay device 11 according to the third embodiment, the CPU 42 of the HSM 34 calculates the first related data based on the first key data K1, and calculates the second related data and the third reference data based on the second key data K2. ing. However, the CPU 42 does not have to perform calculations based on the first key data K1 and K2.
Hereinafter, the differences between the fourth embodiment and the third embodiment will be described. Since the configuration other than the configuration described later is the same as that of the third embodiment, the same reference numerals as those of the third embodiment are assigned to the same components as those of the third embodiment, and the description thereof is omitted. To do.

実施の形態4における通信システム1では、実施の形態3における通信システム1と比較して、第1中継機21が有するHSM34のCPU42が実行する検証処理の内容と、第2中継機22のCPU52が実行する起動処理の内容とが異なる。   In the communication system 1 according to the fourth embodiment, compared to the communication system 1 according to the third embodiment, the contents of the verification process executed by the CPU 42 of the HSM 34 included in the first relay 21 and the CPU 52 of the second relay 22 are different. The contents of the startup process to be executed are different.

図15及び図16は、実施の形態4における検証処理の手順を示すフローチャートである。HSM34のCPU42は、実施の形態3と同様に、電源回路54がCPU42への電力供給を開始した場合において、第1中継処理を実行する前に検証処理を実行する。CPU42が検証処理を実行している間、CPU32は動作を停止している。実施の形態4における検証処理のステップS111,S113〜S117,S119,S120,S124,S125夫々は、実施の形態3における検証処理のステップS71,S74〜S78,S82,S83,S87,S88と同様である。このため、ステップS111,S113〜S117,S119,S120,S124,S125の詳細な説明を省略する。   15 and 16 are flowcharts showing the procedure of the verification process in the fourth embodiment. Similarly to the third embodiment, the CPU 42 of the HSM 34 executes the verification process before executing the first relay process when the power supply circuit 54 starts supplying power to the CPU 42. While the CPU 42 executes the verification process, the CPU 32 stops operating. Steps S111, S113 to S117, S119, S120, S124, and S125 of the verification process in the fourth embodiment are the same as steps S71, S74 to S78, S82, S83, S87, and S88 of the verification process in the third embodiment. is there. For this reason, detailed description of steps S111, S113 to S117, S119, S120, S124, and S125 is omitted.

検証処理において、HSM34のCPU42は、ステップS111を実行した後、ステップS111で読み出した第1制御プログラムP1に基づいて、第1制御プログラムP1に関連する第1関連データを演算する(ステップS112)。ステップS112では、CPU42は、例えば、ハッシュ関数を用いて第1関連データを演算する。CPU42は、ステップS112を実行した後、ステップS113を実行する。   In the verification process, after executing Step S111, the CPU 42 of the HSM 34 calculates first related data related to the first control program P1 based on the first control program P1 read in Step S111 (Step S112). In step S112, the CPU 42 calculates the first related data using, for example, a hash function. After executing step S112, the CPU executes step S113.

ステップS117では、CPU42は、実施の形態3と同様に、乱数データをRAM35に書き込む。実施の形態4における起動処理では、第2中継機22のCPU52は、ステップS117で書き込まれた乱数データと、第2制御プログラムP2とに基づいて、第2制御プログラムP2に関連する第2関連データを演算し、演算した第2関連データをRAM35に書き込む。   In step S117, the CPU 42 writes random number data in the RAM 35 as in the third embodiment. In the activation process according to the fourth embodiment, the CPU 52 of the second repeater 22 uses the second related data related to the second control program P2 based on the random number data written in step S117 and the second control program P2. And the calculated second related data is written in the RAM 35.

CPU42は、ステップS117を実行した後、第2関連データがRAM35に記憶されているか否かを判定する(ステップS118)。CPU42は、第2関連データが記憶されていないと判定した場合(S118:NO)、ステップS118を再び実行し、第2中継機22のCPU52が第2関連データをRAM35に書き込むまで待機する。   After executing step S117, the CPU 42 determines whether or not the second related data is stored in the RAM 35 (step S118). When determining that the second related data is not stored (S118: NO), the CPU 42 executes step S118 again and waits until the CPU 52 of the second relay 22 writes the second related data in the RAM 35.

CPU42は、第2関連データが記憶されていると判定した場合(S118:YES)、ステップS119,S120を実行する。次に、CPU42は、ステップS120で生成した第1合成データに基づいて、第3基準データを演算する(ステップS121)。ステップS121では、CPU42は、例えば、ハッシュ関数を用いて第3基準データを演算する。
以上のように、CPU42は、乱数データ及び第2基準データR2に基づいて第3基準データを演算する。
CPU42 performs step S119, S120, when it determines with 2nd relevant data being memorize | stored (S118: YES). Next, the CPU 42 calculates third reference data based on the first composite data generated in step S120 (step S121). In step S121, the CPU 42 calculates the third reference data using, for example, a hash function.
As described above, the CPU 42 calculates the third reference data based on the random number data and the second reference data R2.

次に、CPU42は、RAM35から第2関連データを読み出す(ステップS122)。これにより、CPU42は、第2中継機22のCPU52が演算した第2関連データを取得する。次に、CPU42は、ステップS122で読み出した第2関連データが、ステップS121で演算した第3基準データと一致するか否かを判定する(ステップS123)。CPU42は、ステップS123を実行することによって、第2制御プログラムP2が適正であることも検証する。   Next, the CPU 42 reads second related data from the RAM 35 (step S122). Thereby, CPU42 acquires the 2nd relevant data which CPU52 of the 2nd repeater 22 computed. Next, the CPU 42 determines whether or not the second related data read in step S122 matches the third reference data calculated in step S121 (step S123). The CPU 42 also verifies that the second control program P2 is appropriate by executing step S123.

CPU42は、第2関連データが第3基準データと一致すると判定した場合(S123:YES)、第2制御プログラムP2は適正であるとして、ステップS124を実行する。CPU42は、第2関連データが第3基準データと一致しないと判定した場合(S123:NO)、第2制御プログラムP2は適正ではない、即ち、第2制御プログラムP2が改ざんされている可能性が高いとして、ステップS125を実行する。CPU42は、ステップS124,S125の一方を実行した後、検証処理を終了する。HSM34のCPU42は、検証処理を終了した後、電源回路36が電力供給を一旦停止して、電力供給を再開するまで、動作を停止する。CPU42が検証処理を終了した後、CPU32は、適正な第1制御プログラムP1を実行する。   When the CPU 42 determines that the second related data matches the third reference data (S123: YES), the CPU 42 executes step S124 on the assumption that the second control program P2 is appropriate. When the CPU 42 determines that the second related data does not match the third reference data (S123: NO), the second control program P2 is not appropriate, that is, the second control program P2 may be falsified. If it is higher, step S125 is executed. After executing one of steps S124 and S125, the CPU 42 ends the verification process. After completing the verification process, the CPU 42 of the HSM 34 stops operating until the power supply circuit 36 temporarily stops power supply and restarts power supply. After the CPU 42 finishes the verification process, the CPU 32 executes the appropriate first control program P1.

図17は起動処理の手順を示すフローチャートである。第2中継機22のCPU52は、実施の形態3と同様に、電源回路54がCPU52への電力供給を開始した場合において、第2中継処理を実行する前に、起動プログラムPbに従って起動処理を実行する。実施の形態4における起動処理のステップS131〜S135,S138〜S140夫々は、ステップS91〜S95,S98〜S100と同様である。このため、ステップS131〜S135,S138〜S140の詳細な説明を省略する。   FIG. 17 is a flowchart showing the procedure of the starting process. As in the third embodiment, the CPU 52 of the second repeater 22 executes the startup process according to the startup program Pb before executing the second relay process when the power supply circuit 54 starts supplying power to the CPU 52. To do. Steps S131 to S135 and S138 to S140 of the activation process in the fourth embodiment are the same as steps S91 to S95 and S98 to S100, respectively. For this reason, detailed description of steps S131 to S135 and S138 to S140 is omitted.

起動処理では、第2中継機22のCPU52は、ステップS135を実行した後、ステップS135で生成した第2合成データに基づいて、第2関連データを演算する(ステップS136)。ステップS136では、CPU52は、例えば、ハッシュ関数を用いて第2関連データを演算する。
以上のように、CPU52は第2制御プログラムP2及び乱数データに基づいて第2演算データを算出する。実施の形態4においては、HSM34のCPU42ではなく、第2中継機22のCPU52が関連データ演算部として機能する。
In the activation process, the CPU 52 of the second repeater 22 calculates the second related data based on the second composite data generated in step S135 after executing step S135 (step S136). In step S136, the CPU 52 calculates the second related data using, for example, a hash function.
As described above, the CPU 52 calculates the second calculation data based on the second control program P2 and the random number data. In the fourth embodiment, not the CPU 42 of the HSM 34 but the CPU 52 of the second repeater 22 functions as a related data calculation unit.

次に、CPU52は、ステップS136で演算した第2関連データをRAM35に書き込み(ステップS137)、ステップS138を実行する。   Next, the CPU 52 writes the second related data calculated in step S136 into the RAM 35 (step S137), and executes step S138.

図18は、第2制御プログラムP2の検証の説明図である。実施の形態3と同様に、第2中継機22のCPU52は、第2制御プログラムP2に基づいて第2中間データを算出する。次に、CPU52は、算出した第2中間データと、HSM34のCPU42が生成した乱数データとを合成することによって、第2合成データを生成する。CPU52は、生成した第2合成データに基づいて、第2関連データを演算し、演算した第2関連データを第1中継機21のRAM35に書き込む。   FIG. 18 is an explanatory diagram of the verification of the second control program P2. As in the third embodiment, the CPU 52 of the second repeater 22 calculates second intermediate data based on the second control program P2. Next, the CPU 52 generates the second combined data by combining the calculated second intermediate data and the random number data generated by the CPU 42 of the HSM 34. The CPU 52 calculates the second related data based on the generated second composite data, and writes the calculated second related data in the RAM 35 of the first repeater 21.

HSM34のCPU42は、実施の形態3と同様に、第2基準データR2と、乱数データとを合成することによって、第1合成データを生成する。CPU42は、生成した第1合成データに基づいて、第3基準データを演算する。CPU42は、第2中継機22のCPU52が演算した第2関連データが、第3基準データに一致するか否かを判定することによって、第2制御プログラムP2を検証する。   As in the third embodiment, the CPU 42 of the HSM 34 generates the first combined data by combining the second reference data R2 and the random number data. The CPU 42 calculates third reference data based on the generated first composite data. The CPU 42 verifies the second control program P2 by determining whether or not the second related data calculated by the CPU 52 of the second repeater 22 matches the third reference data.

第2中間データと乱数データとを合成することによって、第2合成データを生成する方法は、第2基準データと乱数データとを合成することによって、第1合成データを生成する方法と同じである。第2合成データに基づいて第2関連データを演算する方法は、第1合成データに基づいて第3基準データを演算する方法と同じである。   The method of generating the second combined data by combining the second intermediate data and the random number data is the same as the method of generating the first combined data by combining the second reference data and the random number data. . The method of calculating the second related data based on the second composite data is the same as the method of calculating the third reference data based on the first composite data.

第2制御プログラムP2が適正である場合、第2基準データR2は第2中間データと一致する。この場合、第2合成データ及び第2関連データ夫々は、第1合成データ及び第3基準データに一致し、正常データがRAM35に書き込まれる。
前述したように、検証処理が実行される都度、乱数データの内容は変更される。このため、検証処理が実行される都度、RAM35から読み出す第2関連データは変更される。今回の起動処理において、前回の起動処理で演算された第2関連データをRAM35に書き込んだ場合、第2関連データは第3基準データと一致しないので、第2制御プログラムP2が適正ではないと判定される。結果、実施の形態3と同様に、第2制御プログラムP2の検証結果の信頼性が高い。
When the second control program P2 is appropriate, the second reference data R2 matches the second intermediate data. In this case, the second combined data and the second related data respectively match the first combined data and the third reference data, and normal data is written in the RAM 35.
As described above, every time the verification process is executed, the content of the random number data is changed. For this reason, every time the verification process is executed, the second related data read from the RAM 35 is changed. In the current activation process, when the second related data calculated in the previous activation process is written in the RAM 35, the second related data does not match the third reference data, so it is determined that the second control program P2 is not appropriate. Is done. As a result, as in the third embodiment, the reliability of the verification result of the second control program P2 is high.

実施の形態4における検証処理及び起動処理では、第1鍵データK1及び第2鍵データK2が用いられることはない。このため、HSM34のROM41に第1鍵データK1及び第2鍵データK2が記憶されている必要はない。   In the verification process and the activation process in the fourth embodiment, the first key data K1 and the second key data K2 are not used. For this reason, it is not necessary to store the first key data K1 and the second key data K2 in the ROM 41 of the HSM 34.

また、第2中継機22のCPU52は、第2制御プログラムP2に関連する第2関連データを演算し、演算した第2関連データを第1中継機21のRAM35に書き込む。第2関連データのデータ量は、第2制御プログラムP2のデータ量よりも小さい。このため、第2制御プログラムP2が適正であることを検証するために、第2中継機22から第1中継機21へ転送されるデータのデータ量は小さい。結果、検証を行うために必要な時間が短い。
実施の形態4における中継装置11は、実施の形態3における中継装置11が奏する効果の中で、演算データの算出することによって得られる効果と、第2鍵データK2に基づいて第3基準データを演算することによって得られる効果を除く他の効果を同様に奏する。
Further, the CPU 52 of the second repeater 22 calculates second related data related to the second control program P2, and writes the calculated second related data in the RAM 35 of the first repeater 21. The data amount of the second related data is smaller than the data amount of the second control program P2. For this reason, in order to verify that the second control program P2 is appropriate, the amount of data transferred from the second repeater 22 to the first repeater 21 is small. As a result, the time required for verification is short.
The relay device 11 according to the fourth embodiment obtains the third reference data based on the effect obtained by calculating the calculation data and the second key data K2 among the effects exhibited by the relay device 11 according to the third embodiment. Other effects are obtained in the same manner except for the effect obtained by the calculation.

なお、実施の形態2において、第2中継機22のCPU52は、実施の形態4における起動処理を実行してもよい。この場合、起動処理では、CPU52は、ステップS133の代わりに、実施の形態2におけるステップS61,S62を実行し、HSM34のROM41に第1鍵データK1及び第2鍵データK2が記憶されている必要はない。ステップS134では、ステップS61で読み出した第2制御プログラムP2に基づいて第2中間データを算出する。   In the second embodiment, the CPU 52 of the second repeater 22 may execute the startup process in the fourth embodiment. In this case, in the startup processing, the CPU 52 needs to execute steps S61 and S62 in the second embodiment instead of step S133, and the first key data K1 and the second key data K2 are stored in the ROM 41 of the HSM 34. There is no. In step S134, second intermediate data is calculated based on the second control program P2 read in step S61.

また、実施の形態3において、第2中間データ及び乱数データを合成することによって生成される第2合成データに基づいて算出される第2演算データが、第2制御プログラムP2及び乱数データを合成することによって生成されるデータに基づいて算出されるデータと同一である場合、第2中間データの算出を省略してもよい。この場合、第2中継機22のCPU52は、起動処理において、第2制御プログラムP2と乱数データとに基づいて第2合成データを生成する。   In the third embodiment, the second calculation data calculated based on the second synthesized data generated by synthesizing the second intermediate data and the random number data synthesizes the second control program P2 and the random number data. If the data is the same as the data calculated based on the data generated by this, the calculation of the second intermediate data may be omitted. In this case, the CPU 52 of the second repeater 22 generates the second combined data based on the second control program P2 and the random number data in the startup process.

同様に、実施の形態4において、第2中間データ及び乱数データを合成することによって生成される第2合成データに基づいて演算される第2関連データが、第2制御プログラムP2及び乱数データを合成することによって生成されるデータに基づいて算出されるデータと同一である場合、第2中間データの算出を省略してもよい。この場合、第2中継機22のCPU52は、起動処理において、第2制御プログラムP2と乱数データとに基づいて第2合成データを生成する。   Similarly, in the fourth embodiment, the second related data calculated based on the second synthesized data generated by synthesizing the second intermediate data and the random number data synthesizes the second control program P2 and the random number data. When the data is the same as the data calculated based on the data generated by doing so, the calculation of the second intermediate data may be omitted. In this case, the CPU 52 of the second repeater 22 generates the second combined data based on the second control program P2 and the random number data in the startup process.

また、実施の形態1〜4において、第2中継機22の動作を停止させる構成は、第2中継機22の電源回路54に電力供給を停止させる構成に限定されず、例えば、バッテリと電源回路54とを接続する電力線の中途に設けられたスイッチをオフにする構成であってもよい。この場合、スイッチがオフされた場合、電源回路54は動作を停止する。これにより、電源回路54は電力供給を停止する。   Moreover, in Embodiment 1-4, the structure which stops operation | movement of the 2nd relay machine 22 is not limited to the structure which stops the power supply to the power supply circuit 54 of the 2nd relay machine 22, For example, a battery and a power supply circuit 54 may be configured to turn off a switch provided in the middle of the power line that connects to 54. In this case, when the switch is turned off, the power supply circuit 54 stops operating. As a result, the power supply circuit 54 stops the power supply.

同様に、第1中継機21の動作を停止させる構成は、第1中継機21の電源回路36に電力供給を停止させる構成に限定されず、例えば、バッテリと電源回路36とを接続する電力線の中途に設けられたスイッチをオフにする構成であってもよい。この場合、スイッチがオフされた場合、電源回路36は動作を停止する。これにより、電源回路36は電力供給を停止する。
更に、第1中継機21が有するHSM34のCPU42によって、第2制御プログラムP2が適正ではないと判定された場合、第2中継機22の動作だけではなく、第1中継機21の動作を停止させてもよい。
Similarly, the configuration for stopping the operation of the first repeater 21 is not limited to the configuration for stopping the power supply to the power supply circuit 36 of the first repeater 21, for example, the power line connecting the battery and the power supply circuit 36. A configuration may be adopted in which a switch provided in the middle is turned off. In this case, when the switch is turned off, the power supply circuit 36 stops operating. As a result, the power supply circuit 36 stops supplying power.
Furthermore, when the CPU 42 of the HSM 34 included in the first repeater 21 determines that the second control program P2 is not appropriate, not only the operation of the second repeater 22 but also the operation of the first repeater 21 is stopped. May be.

また、第1中継機21が中継する通信で用いられる通信プロトコルはCANプロトコルに限定されない。更に、第1中継機21が中継する通信で用いられる通信プロトコルは、第2中継機21が中継する通信で用いられる通信プロトコルと同一であってもよい。   Further, the communication protocol used in the communication relayed by the first repeater 21 is not limited to the CAN protocol. Furthermore, the communication protocol used in the communication relayed by the first relay 21 may be the same as the communication protocol used in the communication relayed by the second relay 21.

また、実施の形態1,2,3において、第2制御プログラムP2の演算データ又は第2演算データは、第2中継機22のCPU52ではなく、第1中継機21が有するHSM34のCPU42によって算出されてもよい。この場合、第2中継機22のCPU52は、起動処理で第2制御プログラムP2を第1中継機21のRAM35に書き込む。   In the first, second, and third embodiments, the calculation data or the second calculation data of the second control program P2 is calculated not by the CPU 52 of the second repeater 22 but by the CPU 42 of the HSM 34 that the first repeater 21 has. May be. In this case, the CPU 52 of the second repeater 22 writes the second control program P2 in the RAM 35 of the first repeater 21 in the startup process.

また、実施の形態1〜4において、第1中継機21に接続される通信線の数は、2に限定されず、3以上であってもよい。更に、各通信線に接続されるECUの数は2に限定されず、1又は3以上であってもよい。また、各通信線に接続されるECUの数は、他の通信線に接続されているECUの数と異なっていてもよい。複数のECUが車載機器13a,13b,13cと同様に第1中継機21に直接に接続されていてもよい。   In the first to fourth embodiments, the number of communication lines connected to the first repeater 21 is not limited to 2, and may be 3 or more. Furthermore, the number of ECUs connected to each communication line is not limited to 2, and may be 1 or 3 or more. Further, the number of ECUs connected to each communication line may be different from the number of ECUs connected to other communication lines. A plurality of ECUs may be directly connected to the first repeater 21 similarly to the in-vehicle devices 13a, 13b, and 13c.

また、第2中継機22に接続される車載機器の数は、3に限定されず、2又は4以上であってもよい。更に、第2中継機22に複数の通信線が接続され、各通信線に一又は複数の車載機器が接続されてもよい。この場合、第2中継機22は、一の通信線に接続されている1つの車載機器と、他の通信線に接続されている1つの車載機器との通信を中継する。
また、ECUデータから機器データへの変換、及び、機器データからECUデータへの変換は、第2中継機22のCPU52が行ってもよい。
Further, the number of in-vehicle devices connected to the second repeater 22 is not limited to 3, and may be 2 or 4 or more. Furthermore, a plurality of communication lines may be connected to the second repeater 22, and one or a plurality of in-vehicle devices may be connected to each communication line. In this case, the second relay 22 relays communication between one in-vehicle device connected to one communication line and one in-vehicle device connected to another communication line.
Further, the conversion from the ECU data to the device data and the conversion from the device data to the ECU data may be performed by the CPU 52 of the second repeater 22.

開示された実施の形態1〜4はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上述した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。   The disclosed first to fourth embodiments are examples in all respects and should be considered not to be restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

11 中継装置(車載装置)
12a,12b ECU(第1通信装置)
13a,13b,13c 車載機器(第2通信装置)
21 第1中継機(第1車載機)
22 第2中継機(第2車載機)
32 CPU(第1処理部、処理部、変換部)
34 HSM(検証器)
41 ROM(記憶部、第2の記憶部)
42 CPU(関連データ演算部、判定部、乱数生成部、基準データ演算部、動作制御部、演算部、第2の演算部、第2の判定部、取得部)
52 CPU(第2処理部、関連データ演算部、算出部)
100 車両
K1 鍵データ(第2の鍵データ)
K2 鍵データ
P1 第1制御プログラム(第2の制御プログラム)
P2 第2制御プログラム
Ph 検証プログラム
11 Relay device (on-vehicle device)
12a, 12b ECU (first communication device)
13a, 13b, 13c In-vehicle device (second communication device)
21 First repeater (first in-vehicle device)
22 Second repeater (second in-vehicle device)
32 CPU (first processing unit, processing unit, conversion unit)
34 HSM (Verifier)
41 ROM (storage unit, second storage unit)
42 CPU (related data calculation unit, determination unit, random number generation unit, reference data calculation unit, operation control unit, calculation unit, second calculation unit, second determination unit, acquisition unit)
52 CPU (second processing unit, related data calculation unit, calculation unit)
100 vehicle K1 key data (second key data)
K2 key data P1 first control program (second control program)
P2 Second control program Ph verification program

図6は検証処理の手順を示すフローチャートである。第1中継機21が有するHSM34のCPU42は、電源回路54がCPU42への電力供給を開始した場合において、第1中継処理を実行する前に検証処理を実行する。前述したように、CPU42が検証処理を実行している間、CPU32は動作を停止している。検証処理では、まず、CPU42は、第1制御プログラムP1をROM31から読み出す(ステップS31)。次に、CPU42は、第1制御プログラムP1に関連する関連データを演算するための演算データを、例えばハッシュ関数を用いて算出する(ステップS32)。ステップS32では、CPU42は、ステップS31で読み出した第1制御プログラムP1に基づいて演算データを算出する。 FIG. 6 is a flowchart showing the procedure of the verification process. The CPU 42 of the HSM 34 included in the first repeater 21 executes the verification process before executing the first relay process when the power supply circuit 54 starts supplying power to the CPU 42. As described above, while the CPU 42 executes the verification process, the CPU 32 stops operating. In the verification process, first, the CPU 42 reads the first control program P1 from the ROM 31 (step S31). Next, the CPU 42 calculates calculation data for calculating related data related to the first control program P1 using, for example, a hash function (step S32). In step S32, the CPU 42 calculates calculation data based on the first control program P1 read in step S31.

実施の形態と同様に、CPU52は、ステップS68で正常データが第1中継機21のRAM35に記憶されていると判定して起動処理を終了した場合、第2中継機22のRAM62に記憶されている第2制御プログラムP2に従って、第2中継処理を実行する。
以上のように構成された実施の形態2における中継装置11は、実施の形態1における中継装置11が奏する効果と同様の効果を奏する。
Similar to the first embodiment, CPU 52, when normal data in step S68 is completed activation processing is determined to have been stored in the RAM35 of the first relay device 21, are stored in the RAM62 of the second relay apparatus 22 The second relay process is executed in accordance with the second control program P2.
The relay device 11 according to the second embodiment configured as described above has the same effect as the relay device 11 according to the first embodiment.

次に、CPU42は、ステップS81で演算した第2関連データが、ステップS85で演算した第3基準データと一致するか否かを判定する(ステップS86)。CPU42は、ステップS86を実行することによって、第2制御プログラムP2が適正であることも検証する。CPU42は、第2関連データが第3基準データと一致すると判定した場合(S86:YES)、第2制御プログラムP2は適正であるとして、ステップS87を実行する。CPU42は、第2関連データが第3基準データと一致しないと判定した場合(S86:NO)、第2制御プログラムP2は適正ではない、即ち、第2制御プログラムP2が改ざんされている可能性が高いとして、ステップS88を実行する。CPU42は、ステップS87,S88の一方を実行した後、検証処理を終了する。HSM34のCPU42は、検証処理を終了した後、電源回路36が電力供給を一旦停止して、電力供給を再開するまで、動作を停止する。CPU42が検証処理を終了した後、CPU32は、適正な第1制御プログラムP1を実行する。 Next, the CPU 42 determines whether or not the second related data calculated in step S81 matches the third reference data calculated in step S85 (step S86). The CPU 42 also verifies that the second control program P2 is appropriate by executing step S86. If the CPU 42 determines that the second related data matches the third reference data (S86: YES), the CPU 42 executes step S87, assuming that the second control program P2 is appropriate. When the CPU 42 determines that the second related data does not match the third reference data (S86: NO), the second control program P2 is not appropriate, that is, the second control program P2 may be falsified. As high, step S88 is executed. After executing one of steps S87 and S88, the CPU 42 ends the verification process. After completing the verification process, the CPU 42 of the HSM 34 stops operating until the power supply circuit 36 temporarily stops power supply and restarts power supply. After the CPU 42 finishes the verification process, the CPU 32 executes the appropriate first control program P1.

HSM34のCPU42は、RAM35に記憶されている第2演算データと、第2鍵データK2とに基づいて第2関連データを演算する。
また、CPU42は、第2基準データR2と乱数データとを合成することによって、第1合成データを生成する。CPU42は、生成した第1合成データに基づいて、第1中間データを算出する。CPU42は、算出した第1中間データと、第2鍵データK2とに基づいて、第3基準データを演算する。CPU42は、第2関連データが第3基準データに一致するか否かを判定することによって、第2制御プログラムP2を検証する。
The CPU 42 of the HSM 34 calculates the second related data based on the second calculation data stored in the RAM 35 and the second key data K2.
Further, the CPU 42 generates the first combined data by combining the second reference data R2 and the random number data. The CPU 42 calculates first intermediate data based on the generated first composite data. The CPU 42 calculates third reference data based on the calculated first intermediate data and the second key data K2. The CPU 42 verifies the second control program P2 by determining whether or not the second related data matches the third reference data.

(実施の形態4)
実施の形態3における中継装置11では、HSM34のCPU42は第1鍵データK1に基づいて第1関連データを演算し、第2鍵データK2に基づいて第2関連データ及び第3基準データを演算している。しかしながら、CPU42は、第1鍵データK1及び第2鍵データK2に基づく演算を行わなくてもよい。
以下では、実施の形態4について、実施の形態3と異なる点を説明する。後述する構成を除く他の構成については、実施の形態3と共通しているため、実施の形態3と共通する構成部には実施の形態3と同一の参照符号を付してその説明を省略する。
(Embodiment 4)
In the relay device 11 according to the third embodiment, the CPU 42 of the HSM 34 calculates the first related data based on the first key data K1, and calculates the second related data and the third reference data based on the second key data K2. ing. However, the CPU 42 does not have to perform a calculation based on the first key data K1 and the second key data K2.
Hereinafter, the differences between the fourth embodiment and the third embodiment will be described. Since the configuration other than the configuration described later is the same as that of the third embodiment, the same reference numerals as those of the third embodiment are assigned to the same components as those of the third embodiment, and the description thereof is omitted. To do.

また、第1中継機21が中継する通信で用いられる通信プロトコルはCANプロトコルに限定されない。更に、第1中継機21が中継する通信で用いられる通信プロトコルは、第2中継機22が中継する通信で用いられる通信プロトコルと同一であってもよい。 Further, the communication protocol used in the communication relayed by the first repeater 21 is not limited to the CAN protocol. Furthermore, the communication protocol used in the communication relayed by the first relay 21 may be the same as the communication protocol used in the communication relayed by the second relay 22 .

11 中継装置(車載装置)
12a,12b ECU(第1通信装置)
13a,13b,13c 車載機器(第2通信装置)
21 第1中継機(第1車載機)
22 第2中継機(第2車載機)
32 CPU(第1処理部、処理部、変換部)
34 HSM(検証器)
41 ROM(記憶部、第2の記憶部)
42 CPU(関連データ演算部、判定部、乱数生成部、基準データ演算部、動作制御部、演算部、第2の演算部、第2の判定部、取得部)
52 CPU(第2処理部、関連データ演算部、算出部)
100 車両
K1 第1鍵データ(第2の鍵データ)
K2 第2鍵データ
P1 第1制御プログラム(第2の制御プログラム)
P2 第2制御プログラム
Ph 検証プログラム
11 Relay device (on-vehicle device)
12a, 12b ECU (first communication device)
13a, 13b, 13c In-vehicle device (second communication device)
21 First repeater (first in-vehicle device)
22 Second repeater (second in-vehicle device)
32 CPU (first processing unit, processing unit, conversion unit)
34 HSM (Verifier)
41 ROM (storage unit, second storage unit)
42 CPU (related data calculation unit, determination unit, random number generation unit, reference data calculation unit, operation control unit, calculation unit, second calculation unit, second determination unit, acquisition unit)
52 CPU (second processing unit, related data calculation unit, calculation unit)
100 vehicle K1 first key data (second key data)
K2 second key data P1 first control program (second control program)
P2 Second control program Ph verification program

Claims (14)

第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機を備える車載装置において、
第2制御プログラムに従って処理を実行する第2処理部を有する第2車載機と、
前記第2制御プログラムに関連する関連データを演算する関連データ演算部と
を備え、
前記検証器は、前記関連データ演算部が演算した関連データが基準データと一致するか否かを判定する判定部を有すること
を特徴とする車載装置。
A first in-vehicle device comprising: a first processing unit that executes processing according to a first control program; and a verifier that verifies the first control program using other hardware different from the hardware constituting the first processing unit In-vehicle device comprising:
A second in-vehicle device having a second processing unit for executing processing according to the second control program;
A related data calculation unit for calculating related data related to the second control program,
The in-vehicle device, wherein the verifier includes a determination unit that determines whether or not the related data calculated by the related data calculation unit matches reference data.
前記検証器では、前記他のハードウェアが検証プログラムを実行することによって、前記第1制御プログラムが検証されること
を特徴とする請求項1に記載の車載装置。
The in-vehicle device according to claim 1, wherein the first control program is verified by the verification device when the other hardware executes the verification program.
前記第1車載機の前記検証器は、
前記関連データ演算部と、
乱数データを生成する乱数生成部と、
該乱数生成部が生成した乱数データ、及び、所定データに基づいて、前記基準データを演算する基準データ演算部と
を有し、
前記第2車載機は、前記第2制御プログラム及び乱数データに基づいて、前記関連データを演算するための演算データを算出する算出部を有し、
前記検証器の前記関連データ演算部は、前記算出部が算出した演算データに基づいて前記関連データを演算すること
を特徴とする請求項1又は請求項2に記載の車載装置。
The verifier of the first in-vehicle device is
The related data calculation unit;
A random number generator for generating random number data;
A random number data generated by the random number generation unit, and a reference data calculation unit that calculates the reference data based on predetermined data;
The second vehicle-mounted device has a calculation unit that calculates calculation data for calculating the related data based on the second control program and random number data,
The in-vehicle device according to claim 1, wherein the related data calculation unit of the verifier calculates the related data based on the calculation data calculated by the calculation unit.
前記第1車載機の前記検証器は、鍵データが記憶されている記憶部を有し、
前記基準データ演算部は、該記憶部に記憶されている鍵データと、前記乱数データと、前記所定データとに基づいて前記基準データを演算し、
前記関連データ演算部は、前記演算データ及び鍵データに基づいて前記関連データを演算すること
を特徴とする請求項3に記載の車載装置。
The verifier of the first vehicle-mounted device has a storage unit in which key data is stored,
The reference data calculation unit calculates the reference data based on the key data stored in the storage unit, the random number data, and the predetermined data,
The in-vehicle device according to claim 3, wherein the related data calculation unit calculates the related data based on the calculation data and key data.
前記第1車載機の前記検証器は、
乱数データを生成する乱数生成部と、
該乱数生成部が生成した乱数データ、及び、所定データに基づいて、前記基準データを演算する基準データ演算部と
を有し、
前記第2車載機は前記関連データ演算部を有し、
該関連データ演算部は、前記第2制御プログラム及び乱数データに基づいて前記関連データを演算すること
を特徴とする請求項1又は請求項2に記載の車載装置。
The verifier of the first in-vehicle device is
A random number generator for generating random number data;
A random number data generated by the random number generation unit, and a reference data calculation unit that calculates the reference data based on predetermined data;
The second in-vehicle device has the related data calculation unit,
The in-vehicle device according to claim 1, wherein the related data calculation unit calculates the related data based on the second control program and random number data.
前記検証器の前記判定部によって、前記関連データが前記基準データと一致していないと判定された場合に前記第2車載機の動作を停止させる動作制御部を備えること
を特徴とする請求項1から請求項5のいずれか1つに記載の車載装置。
The operation control unit that stops the operation of the second onboard device when the determination unit of the verifier determines that the related data does not match the reference data. The in-vehicle device according to claim 5.
複数の第1通信装置間の通信を中継する第1中継機と、制御プログラムに従って処理を実行し、複数の第2通信装置間の通信を中継する第2中継機とを備え、前記第1中継機及び第2中継機は前記第1通信装置及び第2通信装置間の通信を中継する車両用の中継装置であって、
前記第1中継機は、
鍵データが記憶されている記憶部と、
該鍵データを用いて、前記第2中継機の前記制御プログラムに関連する関連データを演算する演算部と、
該演算部が演算した関連データが所定データと一致するか否かを判定する判定部と
を有することを特徴とする中継装置。
A first relay that relays communication between a plurality of first communication devices; and a second relay that executes processing according to a control program and relays communication between the plurality of second communication devices. The machine and the second relay machine are vehicle relay devices that relay communication between the first communication device and the second communication device,
The first repeater is
A storage unit storing key data; and
A calculation unit that calculates related data related to the control program of the second relay using the key data;
And a determination unit that determines whether or not the related data calculated by the calculation unit matches predetermined data.
前記第1中継機の前記判定部によって前記関連データが前記所定データと一致していないと判定された場合に前記第2中継機の動作を停止させる動作制御部を備えること
を特徴とする請求項7に記載の中継装置。
The operation control unit for stopping the operation of the second repeater when the determination unit of the first repeater determines that the related data does not match the predetermined data. 8. The relay device according to 7.
前記第2中継機は、前記関連データを演算するための演算データを算出する算出部を有し、
前記第1中継機は、該算出部が算出した演算データを取得する取得部を有し、
前記第1中継機の前記演算部は、前記鍵データと、該取得部が取得した演算データとを用いて前記関連データを演算すること
を特徴とする請求項7又は請求項8に記載の中継装置。
The second relay has a calculation unit for calculating calculation data for calculating the related data,
The first repeater has an acquisition unit that acquires calculation data calculated by the calculation unit;
The relay according to claim 7 or 8, wherein the calculation unit of the first repeater calculates the related data using the key data and the calculation data acquired by the acquisition unit. apparatus.
前記第1中継機は、
第2の制御プログラムに従って処理を実行する処理部と、
第2の鍵データが記憶されている第2の記憶部と、
該第2の鍵データを用いて、前記第2の制御プログラムに関連する第2の関連データを演算する第2の演算部と、
該第2の演算部が演算した第2の関連データが第2の所定データと一致するか否かを判定する第2の判定部と
を有することを特徴とする請求項7から請求項9のいずれか1つに記載の中継装置。
The first repeater is
A processing unit that executes processing according to the second control program;
A second storage unit storing second key data;
A second computing unit that computes second related data related to the second control program using the second key data;
The second determination unit that determines whether or not the second related data calculated by the second calculation unit matches the second predetermined data. The relay apparatus as described in any one.
複数の第1通信装置間の通信で用いられる第1プロトコルに対応するデータを、複数の第2通信装置間の通信で用いられる第2プロトコルに対応するデータに変換し、該第2プロトコルに対応するデータを前記第1プロトコルに対応するデータに変換する変換部を備えること
を特徴とする請求項7から請求項10のいずれか1つに記載の中継装置。
Data corresponding to the first protocol used in communication between the plurality of first communication devices is converted into data corresponding to the second protocol used in communication between the plurality of second communication devices, and the second protocol is supported The relay device according to claim 7, further comprising: a conversion unit that converts data to be converted into data corresponding to the first protocol.
第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機と、第2制御プログラムに従って処理を実行する第2車載機とを備える車載装置の前記検証器で実行されるコンピュータプログラムであって、
前記第2制御プログラムに関連する関連データを演算し、
演算した関連データが基準データと一致しているか否かを判定する
処理をコンピュータに実行させることを特徴とするコンピュータプログラム。
A first in-vehicle device comprising: a first processing unit that executes processing according to a first control program; and a verifier that verifies the first control program using other hardware different from the hardware constituting the first processing unit And a computer program executed by the verifier of the in-vehicle device comprising a second in-vehicle device that executes processing according to the second control program,
Calculating related data related to the second control program;
A computer program for causing a computer to execute a process of determining whether or not the calculated related data matches the reference data.
第1制御プログラムに従って処理を実行する第1処理部と、該第1処理部を構成するハードウェアとは異なる他のハードウェアによって前記第1制御プログラムを検証する検証器とを有する第1車載機と、第2制御プログラムに従って処理を実行する第2車載機とを備える車載装置の前記検証器で実行されるコンピュータプログラムであって、
前記第2制御プログラムに関連する関連データを取得し、
取得した関連データが基準データと一致しているか否かを判定する
処理をコンピュータに実行させることを特徴とするコンピュータプログラム。
A first in-vehicle device comprising: a first processing unit that executes processing according to a first control program; and a verifier that verifies the first control program using other hardware different from the hardware constituting the first processing unit And a computer program executed by the verifier of the in-vehicle device comprising a second in-vehicle device that executes processing according to the second control program,
Obtaining related data relating to the second control program;
A computer program that causes a computer to execute a process of determining whether or not acquired related data matches reference data.
複数の第1通信装置間の通信を中継する第1中継機と、制御プログラムに従って処理を実行し、複数の第2通信装置間の通信を中継する第2中継機とを備え、前記第1中継機及び第2中継機は前記第1通信装置及び第2通信装置間の通信を中継する車両用の中継装置における前記第1中継機で実行されるコンピュータプログラムであって、
予め記憶されている鍵データを用いて、前記第2中継機の前記制御プログラムに関連する関連データを演算し、
演算した関連データが所定データと一致するか否かを判定する
処理をコンピュータに実行させることを特徴とするコンピュータプログラム。
A first relay that relays communication between a plurality of first communication devices; and a second relay that executes processing according to a control program and relays communication between the plurality of second communication devices. The machine and the second relay machine are computer programs executed by the first relay machine in the vehicle relay device that relays communication between the first communication device and the second communication device,
Using the key data stored in advance, calculate related data related to the control program of the second repeater,
A computer program for causing a computer to execute a process of determining whether or not the calculated related data matches predetermined data.
JP2017068330A 2017-01-13 2017-03-30 In-vehicle device, relay device, and computer program Active JP6443482B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201711420384.2A CN108337228B (en) 2017-01-13 2017-12-25 In-vehicle device, relay device, and medium
US15/863,024 US10469129B2 (en) 2017-01-13 2018-01-05 Vehicle-mounted apparatus, relay apparatus and computer program
DE102018100756.6A DE102018100756B4 (en) 2017-01-13 2018-01-15 ON-VEHICLE DEVICE, TRANSFER DEVICE AND COMPUTER PROGRAM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017004524 2017-01-13
JP2017004524 2017-01-13

Publications (2)

Publication Number Publication Date
JP2018116669A true JP2018116669A (en) 2018-07-26
JP6443482B2 JP6443482B2 (en) 2018-12-26

Family

ID=62985585

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017068330A Active JP6443482B2 (en) 2017-01-13 2017-03-30 In-vehicle device, relay device, and computer program

Country Status (1)

Country Link
JP (1) JP6443482B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021100527A1 (en) * 2019-11-19 2021-05-27 日立Astemo株式会社 Electronic control device, and computation method
CN114128157A (en) * 2019-08-02 2022-03-01 株式会社自动网络技术研究所 In-vehicle relay device, in-vehicle communication system, communication program, and communication method
KR20220080562A (en) 2020-12-07 2022-06-14 현대오토에버 주식회사 Security apparatus for plurality of vehicle controller and external invasion detection method thereof
KR20230076523A (en) 2021-11-24 2023-05-31 현대오토에버 주식회사 Method for detecting malicious external intrusion into vehicle and apparatus thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008174098A (en) * 2007-01-18 2008-07-31 Toyota Motor Corp Control system for vehicle
JP2010011400A (en) * 2008-06-30 2010-01-14 National Institute Of Advanced Industrial & Technology Cipher communication system of common key system
JP2013219710A (en) * 2012-04-12 2013-10-24 Toyota Motor Corp Authentication system of on-vehicle control device and authentication method of on-vehicle control device
JP2015225376A (en) * 2014-05-26 2015-12-14 Kddi株式会社 Computer system, computer, semiconductor device, information processing method, and computer program
WO2017006862A1 (en) * 2015-07-03 2017-01-12 Kddi株式会社 Software distribution processing device, vehicle, software distribution processing method, and computer program
WO2017047462A1 (en) * 2015-09-14 2017-03-23 株式会社オートネットワーク技術研究所 Communication system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008174098A (en) * 2007-01-18 2008-07-31 Toyota Motor Corp Control system for vehicle
US20100070106A1 (en) * 2007-01-18 2010-03-18 Keisuke Okamoto Vehicle control system
JP2010011400A (en) * 2008-06-30 2010-01-14 National Institute Of Advanced Industrial & Technology Cipher communication system of common key system
JP2013219710A (en) * 2012-04-12 2013-10-24 Toyota Motor Corp Authentication system of on-vehicle control device and authentication method of on-vehicle control device
JP2015225376A (en) * 2014-05-26 2015-12-14 Kddi株式会社 Computer system, computer, semiconductor device, information processing method, and computer program
WO2017006862A1 (en) * 2015-07-03 2017-01-12 Kddi株式会社 Software distribution processing device, vehicle, software distribution processing method, and computer program
WO2017047462A1 (en) * 2015-09-14 2017-03-23 株式会社オートネットワーク技術研究所 Communication system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114128157A (en) * 2019-08-02 2022-03-01 株式会社自动网络技术研究所 In-vehicle relay device, in-vehicle communication system, communication program, and communication method
WO2021100527A1 (en) * 2019-11-19 2021-05-27 日立Astemo株式会社 Electronic control device, and computation method
JP2021082002A (en) * 2019-11-19 2021-05-27 日立Astemo株式会社 Electronic control device and calculation method
JP7373366B2 (en) 2019-11-19 2023-11-02 日立Astemo株式会社 Electronic control device, calculation method
KR20220080562A (en) 2020-12-07 2022-06-14 현대오토에버 주식회사 Security apparatus for plurality of vehicle controller and external invasion detection method thereof
KR20230076523A (en) 2021-11-24 2023-05-31 현대오토에버 주식회사 Method for detecting malicious external intrusion into vehicle and apparatus thereof

Also Published As

Publication number Publication date
JP6443482B2 (en) 2018-12-26

Similar Documents

Publication Publication Date Title
JP6443482B2 (en) In-vehicle device, relay device, and computer program
US10049232B2 (en) Rewrite detection system, rewrite detection device and information processing device
WO2016002559A1 (en) Communication system and key information sharing method
US11567748B2 (en) Interface device having updatable firmware, mobile device, and firmware update method
KR20190115325A (en) Electronic apparatus and method for diagnosing of vehicle
CN108337228B (en) In-vehicle device, relay device, and medium
JP2018095066A (en) On-vehicle power supply system, relay box, and relay control device
CN105159707A (en) Secure financial terminal firmware programming method and financial terminal
JP2006073527A (en) Smart battery pack and battery type discriminating method using it
JP5286659B2 (en) In-vehicle device relay system, in-vehicle device relay method, and relay device
JP6342281B2 (en) Rewrite detection system and information processing apparatus
CN107078806A (en) Optical transceiver apparatus and method
JP2009134497A (en) Reprogramming system for non-volatile memory of in-vehicle control unit
US9128831B2 (en) Electrical device and method of setting address
JP4042790B2 (en) Electrical device and method for determining normal communication function in electrical device
JP2017168907A (en) Communication system
JP2013112120A (en) In-vehicle communication system
US20220377068A1 (en) Vehicle control device, vehicle, vehicle control method, and non-transitory recording medium
EP2026505A2 (en) Communication method for connection device, program for performing said communication method and connection device
WO2018135300A1 (en) Communication device and communication controller
JP2018088165A5 (en)
WO2018225461A1 (en) Processing device and computer program
KR20140072933A (en) Method of storing vehicle identification number, apparatus performing the same and system perfroming the same
WO2021111925A1 (en) Vehicle-mounted system, vehicle-mounted information registration device, and information registration method
JP2008045436A (en) Program rewriting system for electronic control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180810

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20180911

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20181024

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181112

R150 Certificate of patent or registration of utility model

Ref document number: 6443482

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150