JP6348150B2 - Communication system, communication control apparatus, and unauthorized information transmission prevention method - Google Patents

Communication system, communication control apparatus, and unauthorized information transmission prevention method Download PDF

Info

Publication number
JP6348150B2
JP6348150B2 JP2016146714A JP2016146714A JP6348150B2 JP 6348150 B2 JP6348150 B2 JP 6348150B2 JP 2016146714 A JP2016146714 A JP 2016146714A JP 2016146714 A JP2016146714 A JP 2016146714A JP 6348150 B2 JP6348150 B2 JP 6348150B2
Authority
JP
Japan
Prior art keywords
information
frame
communication
authentication information
transmitted
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.)
Active
Application number
JP2016146714A
Other languages
Japanese (ja)
Other versions
JP2016208536A (en
Inventor
高田 広章
広章 高田
亮 倉地
亮 倉地
直樹 足立
直樹 足立
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.)
Nagoya University NUC
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Tokai National Higher Education and Research System NUC
Original Assignee
Nagoya University NUC
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Tokai National Higher Education and Research System NUC
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 Nagoya University NUC, Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd, Tokai National Higher Education and Research System NUC filed Critical Nagoya University NUC
Priority to JP2016146714A priority Critical patent/JP6348150B2/en
Publication of JP2016208536A publication Critical patent/JP2016208536A/en
Application granted granted Critical
Publication of JP6348150B2 publication Critical patent/JP6348150B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Description

本発明は、例えばECU(Electronic Control Unit)などの複数の通信装置が共通の通信線で接続された通信システム、このシステムにおいて不正な情報送信を防止する通信制御装置及び不正情報送信防止方法に関する。   The present invention relates to a communication system in which a plurality of communication devices such as an ECU (Electronic Control Unit) are connected by a common communication line, a communication control device for preventing unauthorized information transmission in this system, and an unauthorized information transmission preventing method.

従来、車両に搭載された複数の通信装置間の通信には、CAN(Controller Area Network)の通信プロトコルが広く採用されている。CANの通信プロトコルでは、共通のCANバスに複数の通信装置が接続されるため、複数の通信装置が同時的に情報送信を行って衝突が発生した場合には、各通信装置にて調停処理(アービトレーション)が行われ、優先度の高い情報送信が実行される。アービトレーションを行うために、各通信装置は、CANバスに送信信号の出力を行うと同時に、CANバスの信号レベルの検出を行い、自らが出力した送信信号に対して、検出した信号の信号レベルがレセシブ(劣性値)からドミナント(優性値)に変化した場合、通信の衝突が発生したと判断し、送信処理を停止する。CANバス上の信号はレセシブよりドミナントが優位であるため、通信の衝突が発生してもドミナントを出力した電子機器は送信処理を継続して行うことができる。   Conventionally, a communication protocol of CAN (Controller Area Network) has been widely adopted for communication between a plurality of communication devices mounted on a vehicle. In the CAN communication protocol, since a plurality of communication devices are connected to a common CAN bus, when a plurality of communication devices transmit information simultaneously and a collision occurs, an arbitration process ( Arbitration) is performed, and information transmission with a high priority is executed. In order to perform arbitration, each communication device outputs a transmission signal to the CAN bus and simultaneously detects the signal level of the CAN bus, and the signal level of the detected signal relative to the transmission signal output by itself is detected. When it changes from recessive (inferior value) to dominant (dominant value), it judges that communication collision has occurred and stops the transmission process. The dominant signal is dominant over the recessive signal on the CAN bus. Therefore, even if a communication collision occurs, the electronic device that outputs the dominant signal can continue the transmission process.

特許文献1においては、分岐接続された2線式CAN通信回路の分岐回路毎の異常診断を行う異常診断装置が提案されている。この異常診断装置は、CAN通信線の各分岐回路とコネクタ接続される検査用の分岐回路と、該分岐回路を接続するジョイント回路を有する分岐接続回路と、各分岐回路をジョイント回路から切り離す分離手段と、前記分離手段で切り離された分岐回路の電位を測定する電位測定手段と、前記電位測定手段と前記分岐回路とを接続する接続手段と、前記電位測定手段と接続し、測定された電位より異常判定を行う異常判定手段とを備えている。   Patent Document 1 proposes an abnormality diagnosis device that performs abnormality diagnosis for each branch circuit of a branch-connected two-wire CAN communication circuit. The abnormality diagnosis apparatus includes a branch circuit for inspection connected to each branch circuit of a CAN communication line, a branch connection circuit having a joint circuit for connecting the branch circuit, and a separating unit for separating each branch circuit from the joint circuit. And a potential measuring means for measuring the potential of the branch circuit separated by the separating means, a connecting means for connecting the potential measuring means and the branch circuit, and connected to the potential measuring means, from the measured potential An abnormality determination means for performing abnormality determination.

特開2010−111295号公報JP 2010-111295 A

車両のCANバスには、悪意のある機器が接続される可能性がある。悪意のある機器は、例えばCANバスに対して不正な情報送信を繰り返し行うことによって、このCANバスに接続された他のECUを誤動作させる虞がある。   Malicious equipment may be connected to the vehicle's CAN bus. A malicious device may cause other ECUs connected to the CAN bus to malfunction by repeatedly transmitting unauthorized information to the CAN bus, for example.

本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、共通の通信線に対して不正な情報送信がなされた場合であっても、この通信線に接続された通信装置の誤動作などを防止し得る通信システム、通信制御装置及び不正情報送信防止方法を提供することにある。   The present invention has been made in view of such circumstances, and the object of the present invention is to connect to this communication line even when unauthorized information transmission is performed to the common communication line. Another object of the present invention is to provide a communication system, a communication control device, and an unauthorized information transmission preventing method that can prevent malfunction of the communication device.

本発明に係る通信システムは、送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを生成する送信情報生成手段、前記フレームの情報を暗号化して生成した認証情報を前記フレームに付与する認証情報付与手段、及び前記認証情報付与手段により前記認証情報が付された前記フレームを通信線へ出力し、CAN(Controller Area Network)プロトコルに従って前記フレームを送信するとともに、受信した前記フレームの前記EOFに含まれるビット列より取得した1ビットが所定の信号であるかを判定し、前記所定の信号である場合に、受信した前記フレームを破棄するCAN通信手段を有する通信装置と、前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを判定する認証情報判定手段、及び前記認証情報判定手段により前記認証情報が正しいものでないと判定された場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力する情報破棄手段を有する通信制御装置とを設けたことを特徴とする。   The communication system according to the present invention includes a CAN header indicating the start of information to be transmitted, a data field for storing the information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, and the CRC field following the CRC field. Transmission information generating means for generating a frame including an end-of-frame (EOF) including a specific bit string indicating the end of information to be transmitted, and authentication information for giving authentication information generated by encrypting the information of the frame to the frame And outputting the frame to which the authentication information has been added by the granting means and the authentication information granting means to a communication line, transmitting the frame in accordance with a CAN (Controller Area Network) protocol, and the EOF of the received frame A communication device having CAN communication means for determining whether one bit acquired from the included bit string is a predetermined signal and discarding the received frame when the bit is the predetermined signal; and the CAN header of the frame When the data field and the CRC field are acquired, the authentication information is correct by comparing the information generated by encrypting the CAN header and the data field with the authentication information given to the frame. Authentication information determining means for determining whether or not the authentication information is determined, and when the authentication information determining means determines that the authentication information is not correct, a predetermined number for causing the communication device to discard the unauthorized frame A communication control device having information discarding means for outputting a signal during the EOF output period of the frame; It is characterized in.

また、本発明に係る通信システムは、前記通信装置及び前記通信制御装置は、鍵情報を共有し、前記通信装置の認証情報付与手段は、前記鍵情報に基づいて、前記フレームの情報を暗号化して、認証情報を生成し、前記通信制御装置の前記認証情報判定手段は、前記鍵情報に基づいて前記フレームに含まれる前記認証情報の判定を行うようにしてあることを特徴とする。   In the communication system according to the present invention, the communication device and the communication control device share key information, and the authentication information providing unit of the communication device encrypts the information of the frame based on the key information. Authentication information is generated, and the authentication information determination means of the communication control device determines the authentication information included in the frame based on the key information.

また、本発明に係る通信システムは、前記複数の通信装置は、それぞれ異なる前記鍵情報を有し、前記通信制御装置は、各通信装置の前記鍵情報を有していることを特徴とする。   The communication system according to the present invention is characterized in that the plurality of communication devices have different key information, and the communication control device has the key information of each communication device.

また、本発明に係る通信制御装置は、複数の通信装置が接続された共通の通信線に接続され、前記通信線へ出力された認証情報が付与され、送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを取得する取得手段、前記取得手段が、前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを判定する認証情報判定手段、及び前記認証情報判定手段により前記認証情報が正しいものでないと判定された場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力する情報破棄手段を備えることを特徴とする。   The communication control device according to the present invention is connected to a common communication line to which a plurality of communication devices are connected, the authentication information output to the communication line is given, and a CAN header indicating the start of information to be transmitted; A data field for storing the information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, and an end of frame (EOF) including a specific bit string indicating the end of the information to be transmitted following the CRC field. Information obtained by encrypting the CAN header and the data field when the acquisition unit acquires up to the CAN header, the data field, and the CRC field of the frame. And the authentication information given to the frame The authentication information determining means for determining whether or not the authentication information is correct by comparing, and when the authentication information determining means determines that the authentication information is not correct, Information discarding means for outputting a predetermined signal for discarding the frame during the output period of the EOF of the frame is provided.

また、本発明に係る不正情報送信防止方法は、複数の通信装置が共通の通信線を介して接続された通信システムにて、前記通信線に対する不正な情報送信を防止する不正情報送信防止方法であって、各通信装置は、他の通信装置へ送信するフレームに認証情報を付与して前記通信線へ出力し、前記通信線へ出力された、送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを通信制御装置が取得し、前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを前記通信制御装置が判定し、前記認証情報が正しいものでないと判定した場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力することを特徴とする。   The unauthorized information transmission preventing method according to the present invention is an unauthorized information transmission preventing method for preventing unauthorized information transmission to the communication line in a communication system in which a plurality of communication apparatuses are connected via a common communication line. Each communication device adds authentication information to a frame to be transmitted to another communication device, outputs the communication information to the communication line, and is output to the communication line, a CAN header indicating the start of the information to be transmitted; A data field for storing information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, and an EOF (End of Frame) including a specific bit string indicating the end of the information to be transmitted following the CRC field. A communication control device acquires a frame including the CAN header and the data field of the frame. Whether the authentication information is correct by comparing information generated by encrypting the CAN header and the data field with the authentication information given to the frame when the CRC field is obtained When the communication control device determines that the authentication information is not correct, a predetermined signal for causing the communication device to discard the invalid frame is output during the output period of the EOF of the frame. It is characterized by outputting.

本発明においては、共通の通信線に対して複数の通信装置と通信制御装置とを接続する。各通信装置は、フレームに認証情報を付与して通信線へ出力することにより、他の通信装置への情報送信を行う。なお本発明では、他の通信装置からの情報を受信した通信装置は、受信情報に含まれる認証情報の正否を判定する必要はない。
通信制御装置は、通信線に対するフレームの送信を監視しており、フレームの送信が行われた場合にはフレームを取得して、取得したフレームに含まれる認証情報の正否を判定する。認証情報が正しいものであれば、通信制御装置は、このフレーム送信に対して何ら処理を行う必要はない。認証情報が正しいものでない場合、フレームが悪意のある機器による不正なものである可能性があるため、通信制御装置は、通信装置に破棄させる処理を行う。
これにより、各通信装置では認証情報の正否を判定することなく、不正な情報が各通信装置にて受信されることを防止できる。
In the present invention, a plurality of communication devices and a communication control device are connected to a common communication line. Each communication device performs transmission of information to another communication device by giving authentication information to the frame and outputting it to the communication line. In the present invention, a communication device that has received information from another communication device need not determine whether the authentication information included in the received information is correct.
The communication control apparatus monitors the transmission of the frame to the communication line. When the transmission of the frame is performed, the communication control apparatus acquires the frame and determines whether the authentication information included in the acquired frame is correct. If the authentication information is correct, the communication control device does not need to perform any processing for this frame transmission. If the authentication information is not correct, there is a possibility that the frame is illegal by a malicious device, and therefore the communication control device performs processing for causing the communication device to discard it.
Thereby, it is possible to prevent each communication device from receiving unauthorized information without determining whether the authentication information is correct or not.

また本発明においては、フレームを破棄させるため、通信装置がフレームのEOFの出力期間中に、通信制御装置が所定の信号を通信線へ出力する。これによりフレームが正規のものではなくなり、各通信装置はこの情報の受信を中止するため、フレームが破棄される。   In the present invention, in order to discard the frame, the communication control device outputs a predetermined signal to the communication line during the output period of the EOF of the frame. As a result, the frame is no longer authentic, and each communication device stops receiving this information, so the frame is discarded.

また本発明においては、通信装置及び通信制御装置が鍵情報を共有し、認証情報の生成及び判定等の処理を行う。これにより、鍵情報を有していない悪意のある機器は認証情報を生成することができないため、通信制御装置がより確実に不正な情報送信を防止することができる。   In the present invention, the communication device and the communication control device share key information and perform processing such as generation and determination of authentication information. Thereby, since the malicious apparatus which does not have key information cannot produce | generate authentication information, a communication control apparatus can prevent unauthorized information transmission more reliably.

また本発明においては、通信システムに含まれる複数の通信装置は、それぞれ異なる鍵情報を有する。これにより鍵情報の漏えいなどによる悪影響を低減することができる。各通信装置は、他の通信装置の送信情報に含まれる認証情報の判定を行う必要がないため、他の通信装置の鍵情報を有している必要はない。これに対して通信制御装置は、フレームの破棄を行う対象とすべき全ての通信装置についての鍵情報を有している。通信制御装置は、情報の送信元の通信装置に対応する鍵情報を用いてフレームに含まれる認証情報の正否を判定する。   In the present invention, the plurality of communication devices included in the communication system have different key information. As a result, it is possible to reduce adverse effects due to leakage of key information. Each communication device does not need to determine the authentication information included in the transmission information of the other communication device, and therefore does not need to have the key information of the other communication device. On the other hand, the communication control device has key information for all communication devices that are to be discarded. The communication control device determines whether the authentication information included in the frame is correct using key information corresponding to the communication device that is the transmission source of the information.

本発明による場合は、通信装置が送信情報に付した認証情報に基づいて通信制御装置が送信情報の正否を判定し、送信情報が正しいものでない場合には、通信制御装置が送信情報のEOFの出力期間中に、通信制御装置がこの情報を通信装置に破棄させる構成とすることにより、悪意のある機器により共通の通信線に対して不正な情報送信がなされた場合であっても、送信情報の全てが出力される前に送信された情報を破棄させることで通信装置が誤動作することを未然に防止できる。   In the case of the present invention, the communication control apparatus determines whether the transmission information is correct based on the authentication information attached to the transmission information by the communication apparatus. If the transmission information is not correct, the communication control apparatus determines whether the EOF of the transmission information is correct. By configuring the communication control device to discard this information during the output period, even if unauthorized information is transmitted to a common communication line by a malicious device, the transmission information It is possible to prevent the communication apparatus from malfunctioning by discarding the information transmitted before all of the information is output.

本実施の形態に係る通信システムの構成を示す模式図である。It is a schematic diagram which shows the structure of the communication system which concerns on this Embodiment. ECUの構成を示すブロック図である。It is a block diagram which shows the structure of ECU. 監視装置の構成を示すブロック図である。It is a block diagram which shows the structure of a monitoring apparatus. 鍵情報テーブルの構成を説明する模式図である。It is a schematic diagram explaining the structure of a key information table. 本実施の形態に係る通信システムの監視処理の概要を説明するための模式図である。It is a schematic diagram for demonstrating the outline | summary of the monitoring process of the communication system which concerns on this Embodiment. 各ECUによる送信フレームの生成方法を説明するための模式図である。It is a schematic diagram for demonstrating the transmission frame production | generation method by each ECU. ECUが行う情報送信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the information transmission process which ECU performs. 監視装置が行う監視処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the monitoring process which a monitoring apparatus performs. 監視装置が行う監視処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the monitoring process which a monitoring apparatus performs. ECUが行う情報受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the information reception process which ECU performs.

<システム構成>
図1は、本実施の形態に係る通信システムの構成を示す模式図である。本実施の形態に係る通信システムは、車両1に搭載された複数のECU3と、1つの監視装置5とを備えて構成されている。ECU3及び監視装置5は、車両1に敷設された共通の通信線を介して接続され、相互にデータを送受信することができる。本実施の形態においては、この通信線をCANバスとし、ECU3及び監視装置5は、CANプロトコルに従った通信を行う。ECU3は、例えば車両1のエンジンの制御を行うエンジンECU、車体の電装品の制御を行うボディECU、ABS(Antilock Brake System)に関する制御を行うABS−ECU、又は、車両1のエアバッグの制御を行うエアバッグECU等のように、種々の電子制御装置であってよい。監視装置5は、車内ネットワークに対する不正なデータ送信を監視する装置である。監視装置5は、監視専用の装置として設けられてもよく、例えばゲートウェイなどの装置に監視の機能を付加した構成であってもよく、また例えばいずれか1つのECU3に監視の機能を付加した構成であってもよい。
<System configuration>
FIG. 1 is a schematic diagram showing a configuration of a communication system according to the present embodiment. The communication system according to the present embodiment includes a plurality of ECUs 3 mounted on the vehicle 1 and one monitoring device 5. The ECU 3 and the monitoring device 5 are connected via a common communication line laid on the vehicle 1 and can transmit / receive data to / from each other. In the present embodiment, this communication line is a CAN bus, and the ECU 3 and the monitoring device 5 perform communication according to the CAN protocol. The ECU 3 is, for example, an engine ECU that controls the engine of the vehicle 1, a body ECU that controls electrical components of the vehicle body, an ABS-ECU that performs control related to an ABS (Antilock Brake System), or an airbag control of the vehicle 1. Various electronic control devices, such as an air bag ECU to be performed, may be used. The monitoring device 5 is a device that monitors unauthorized data transmission to the in-vehicle network. The monitoring device 5 may be provided as a device dedicated to monitoring. For example, the monitoring device 5 may have a configuration in which a monitoring function is added to a device such as a gateway. For example, a configuration in which a monitoring function is added to any one ECU 3. It may be.

図2は、ECU3の構成を示すブロック図である。なお図2においては、車両1に設けられたECU3について、通信及び不正監視等に関するブロックを抜き出して図示してある。これらのブロックは各ECU3に共通である。本実施の形態に係るECU3は、処理部31、記憶部32及びCAN通信部33等を備えて構成されている。処理部31は、CPU(Central Processing Unit)又はMPU(Micro-Processing Unit)等の演算処理装置を用いて構成されている。処理部31は、記憶部32などに記憶されたプログラムを読み出して実行することにより、車両1に係る種々の情報処理又は制御処理等を行う。   FIG. 2 is a block diagram showing the configuration of the ECU 3. In FIG. 2, the ECU 3 provided in the vehicle 1 is illustrated with extracted blocks relating to communication, fraud monitoring, and the like. These blocks are common to each ECU 3. The ECU 3 according to the present embodiment includes a processing unit 31, a storage unit 32, a CAN communication unit 33, and the like. The processing unit 31 is configured using an arithmetic processing device such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit). The processing unit 31 performs various information processing or control processing related to the vehicle 1 by reading and executing a program stored in the storage unit 32 or the like.

記憶部32は、フラッシュメモリ又はEEPROM(Electrically Erasable Programmable ROM)等の不揮発性のメモリ素子を用いて構成されている。記憶部32は、処理部31が実行するプログラム、及び、これにより行われる処理に必要な種々のデータが記憶されている。なお記憶部32に記憶されるプログラム及びデータは、ECU3毎に異なる。また本実施の形態において記憶部32は、処理部31が行う認証情報の生成処理に用いられる鍵情報32aが記憶されている。本実施の形態においてはCANバスに複数のECU3が接続されているが、各ECU3が記憶部32に記憶する鍵情報32aは、それぞれ異なるものであってもよい。   The storage unit 32 is configured using a nonvolatile memory element such as a flash memory or an EEPROM (Electrically Erasable Programmable ROM). The storage unit 32 stores a program executed by the processing unit 31 and various data necessary for processing performed thereby. The program and data stored in the storage unit 32 are different for each ECU 3. In the present embodiment, the storage unit 32 stores key information 32 a used for the authentication information generation process performed by the processing unit 31. In the present embodiment, a plurality of ECUs 3 are connected to the CAN bus, but the key information 32a stored in the storage unit 32 by each ECU 3 may be different.

CAN通信部33は、CANの通信プロトコルに従って、CANバスを介した他のECU3又は監視装置5との通信を行う。CAN通信部33は、処理部31から与えられた送信用の情報を、CANの通信プロトコルに従った送信信号に変換し、変換した信号をCANバスへ出力することで他のECU3又は監視装置5への情報送信を行う。CAN通信部33は、CANバスの電位をサンプリングすることによって、他のECU3又は監視装置5が出力した信号を取得し、この信号をCANの通信プロトコルに従って2値の情報に変換することで情報の受信を行い、受信した情報を処理部31へ与える。   The CAN communication unit 33 communicates with another ECU 3 or the monitoring device 5 via a CAN bus according to a CAN communication protocol. The CAN communication unit 33 converts the information for transmission given from the processing unit 31 into a transmission signal in accordance with the CAN communication protocol, and outputs the converted signal to the CAN bus, so that the other ECU 3 or the monitoring device 5 Send information to. The CAN communication unit 33 obtains a signal output from another ECU 3 or the monitoring device 5 by sampling the potential of the CAN bus, and converts this signal into binary information according to the CAN communication protocol. Reception is performed and the received information is given to the processing unit 31.

本実施の形態においてECU3の処理部31には、認証情報生成部41及び送信フレーム生成部42等が設けられている。認証情報生成部41及び送信フレーム生成部42は、ハードウェアの機能ブロックとして構成されるものであってもよく、ソフトウェアの機能ブロックとして構成されるものであってもよい。認証情報生成部41は、他のECU3へ送信すべき情報と記憶部32の鍵情報32aとを用いて認証情報を生成する処理を行う。送信フレーム生成部42は、他のECU3へ送信すべき情報及び認証情報生成部41が生成した認証情報を基に、本実施の形態における通信に適した送信用のフレーム(メッセージ)を生成する処理を行う。送信フレーム生成部42が生成した送信フレームをCAN通信部33へ与えることにより、他のECU3への情報送信を行うことができる。   In the present embodiment, the processing unit 31 of the ECU 3 is provided with an authentication information generation unit 41, a transmission frame generation unit 42, and the like. The authentication information generation unit 41 and the transmission frame generation unit 42 may be configured as hardware functional blocks or may be configured as software functional blocks. The authentication information generation unit 41 performs processing for generating authentication information using information to be transmitted to the other ECU 3 and the key information 32a of the storage unit 32. The transmission frame generation unit 42 generates a transmission frame (message) suitable for communication in the present embodiment based on information to be transmitted to another ECU 3 and the authentication information generated by the authentication information generation unit 41. I do. By sending the transmission frame generated by the transmission frame generation unit 42 to the CAN communication unit 33, information transmission to another ECU 3 can be performed.

図3は、監視装置5の構成を示すブロック図である。監視装置5は、処理部51、記憶部52及びCAN通信部53等を備えて構成されている。処理部51は、CPU又はMPU等の演算処理装置を用いて構成され、記憶部52に記憶されたプログラムを読み出して実行することにより、車両1のECU3の挙動及び通信等を監視する処理を行う。   FIG. 3 is a block diagram illustrating a configuration of the monitoring device 5. The monitoring device 5 includes a processing unit 51, a storage unit 52, a CAN communication unit 53, and the like. The processing unit 51 is configured by using an arithmetic processing device such as a CPU or MPU, and performs processing for monitoring the behavior and communication of the ECU 3 of the vehicle 1 by reading and executing a program stored in the storage unit 52. .

記憶部52は、フラッシュメモリ又はEEPROM等のデータ書き換え可能な不揮発性のメモリ素子を用いて構成されている。本実施の形態において記憶部52は、CANバスに接続された全てのECU3の鍵情報を含む鍵情報テーブル52aを記憶している。図4は、鍵情報テーブル52aの構成を説明する模式図である。監視装置5が記憶部52に記憶する鍵情報テーブル52aは、各ECU3を識別し得るIDと、ECU3が有する鍵情報とが対応付けられている。本実施の形態において各ECU3が送信する送信フレームには、IDが含まれている。各ECU3には予め一又は複数のIDがそれぞれ割り当てられており、2つ以上のECU3に対して同一のIDが割り当てられることはないものとする。監視装置5は、ECU3の送信フレームに含まれるIDに基づいて、鍵情報テーブル52aから1つの鍵情報を取得することができる。   The storage unit 52 is configured using a non-volatile memory element that can rewrite data, such as a flash memory or an EEPROM. In the present embodiment, the storage unit 52 stores a key information table 52a including key information of all ECUs 3 connected to the CAN bus. FIG. 4 is a schematic diagram illustrating the configuration of the key information table 52a. In the key information table 52a that the monitoring device 5 stores in the storage unit 52, an ID that can identify each ECU 3 is associated with key information that the ECU 3 has. In the present embodiment, the transmission frame transmitted by each ECU 3 includes an ID. It is assumed that one or a plurality of IDs are assigned to each ECU 3 in advance, and the same ID is not assigned to two or more ECUs 3. The monitoring device 5 can acquire one piece of key information from the key information table 52a based on the ID included in the transmission frame of the ECU 3.

CAN通信部53は、CANの通信プロトコルに従って、CANバスを介したECU3との通信を行う。CAN通信部53は、処理部51から与えられた送信用の情報を、CANの通信プロトコルに従った送信信号に変換し、変換した信号をCANバスへ出力することでECU3への情報送信を行う。CAN通信部53は、CANバスの電位をサンプリングすることによって、ECU3が出力した信号を取得し、この信号をCANの通信プロトコルに従って2値の情報に変換することで情報の受信を行い、受信した情報を処理部51へ与える。   The CAN communication unit 53 communicates with the ECU 3 via the CAN bus according to the CAN communication protocol. The CAN communication unit 53 converts the information for transmission given from the processing unit 51 into a transmission signal according to the CAN communication protocol, and outputs the converted signal to the CAN bus to transmit information to the ECU 3. . The CAN communication unit 53 obtains a signal output from the ECU 3 by sampling the potential of the CAN bus, converts the signal into binary information according to the CAN communication protocol, and receives the information. Information is given to the processing unit 51.

本実施の形態において監視装置5の処理部51には、認証情報判定部61及び送信情報破棄処理部62等が設けられている。認証情報判定部61及び送信情報破棄処理部62は、ハードウェアの機能ブロックとして構成されるものであってもよく、ソフトウェアの機能ブロックとして構成されるものであってもよい。認証情報判定部61は、ECU3が送信した送信フレームに含まれる認証情報が正しいものであるか否かを判定する処理を行う。送信情報破棄処理部62は、不正な送信フレームを検出した場合に、各ECU3にこの送信フレームを破棄させるための処理を行う。   In the present embodiment, the processing unit 51 of the monitoring device 5 includes an authentication information determination unit 61, a transmission information discard processing unit 62, and the like. The authentication information determination unit 61 and the transmission information discard processing unit 62 may be configured as hardware functional blocks or may be configured as software functional blocks. The authentication information determination unit 61 performs a process of determining whether or not the authentication information included in the transmission frame transmitted by the ECU 3 is correct. The transmission information discard processing unit 62 performs processing for causing each ECU 3 to discard the transmission frame when an unauthorized transmission frame is detected.

<監視処理>
本実施の形態に係る通信システムは、CANバスに対する不正な情報送信を監視する機能を有している。図5は、本実施の形態に係る通信システムの監視処理の概要を説明するための模式図である。車両1のCANバスに対しては、悪意のある機器100(図5において破線で示す)が不正に接続される可能性がある。悪意のある機器100は、例えば不正なメッセージをCANバスに対して送信する。不正なメッセージには、例えば正規のECU3を誤動作させるような制御指示又はセンサ検知結果等を含む可能性がある。本実施の形態に係る監視装置5は、CANバスに対するメッセージ送信を監視している。監視装置5は、CANバスに対してメッセージが送信された場合、このメッセージが正規のECU3が送信したものであるか否かを判定する。メッセージが不正なものであると判定した場合、監視装置5は、悪意のある機器100によるメッセージ送信が完了する前に(ECU3によるメッセージ受信が完了する前に)、CANバスに対して所定の信号を出力することによって、ECU3にこのメッセージを破棄させる。
<Monitoring process>
The communication system according to the present embodiment has a function of monitoring unauthorized information transmission to the CAN bus. FIG. 5 is a schematic diagram for explaining an overview of the monitoring process of the communication system according to the present embodiment. There is a possibility that a malicious device 100 (indicated by a broken line in FIG. 5) is illegally connected to the CAN bus of the vehicle 1. The malicious device 100 transmits, for example, an unauthorized message to the CAN bus. An illegal message may include, for example, a control instruction that causes the normal ECU 3 to malfunction, a sensor detection result, or the like. The monitoring device 5 according to the present embodiment monitors message transmission to the CAN bus. When a message is transmitted to the CAN bus, the monitoring device 5 determines whether or not this message is transmitted by the regular ECU 3. When it is determined that the message is illegal, the monitoring device 5 determines a predetermined signal to the CAN bus before the message transmission by the malicious device 100 is completed (before the message reception by the ECU 3 is completed). Is output to cause the ECU 3 to discard this message.

図6は、各ECU3による送信フレームの生成方法を説明するための模式図である。本実施の形態に係る通信システムにて送受信されるフレーム(メッセージ)には、CANヘッダ、データフィールド、認証情報、CRC(Cyclic Redundancy Check)フィールド、ACKフィールド及びEOF(End Of Frame)を含んで構成されている。CANヘッダは、従来のCANプロトコルにおけるSOF(Start Of Frame)、アービトレーションフィールド及びコントロールフィールド等を含むものであり、上述したECU3を識別し得るIDを含んでいる。データフィールドは、例えばECU3に対する制御指示又はセンサ検知結果等のように、ECU3間で授受すべき情報の本体が格納される。   FIG. 6 is a schematic diagram for explaining a method of generating a transmission frame by each ECU 3. A frame (message) transmitted and received by the communication system according to the present embodiment includes a CAN header, a data field, authentication information, a CRC (Cyclic Redundancy Check) field, an ACK field, and an EOF (End Of Frame). Has been. The CAN header includes an SOF (Start Of Frame), an arbitration field, a control field, and the like in the conventional CAN protocol, and includes an ID that can identify the ECU 3 described above. The data field stores a main body of information to be exchanged between the ECUs 3 such as a control instruction to the ECU 3 or a sensor detection result.

CRCフィールド、ACKフィールド及びEOFは、従来のCANプロトコルにて用いられるものと同じであるため詳細な説明は省略する。CRCフィールドは、誤り検出を行うための情報を格納する。ACKフィールドは、このフレームを受信するECU3による受信応答のためのフィールドである。EOFは、フィールドの終了を示す特定のビット列である。   Since the CRC field, ACK field, and EOF are the same as those used in the conventional CAN protocol, detailed description thereof is omitted. The CRC field stores information for error detection. The ACK field is a field for a reception response by the ECU 3 that receives this frame. The EOF is a specific bit string indicating the end of the field.

本実施の形態に係るフレームには、従来のCANプロトコルと互換するものの、一部に認証情報を含んでいる。認証情報は、このフレームが正当なものであるか否かを監視装置5が判定するために用いられる情報である。ECU3の認証情報生成部41は、送信フレームに含まれるCANヘッダ及びデータを、記憶部32に記憶した鍵情報32aを用いて暗号化することにより認証情報を生成する。本実施の形態においては、例えばHMAC(SHA−256)のアルゴリズムを用いて、512ビット程度の鍵情報32aに基づき、256ビットのメッセージ認証符号(MAC)を生成する。ECU3の送信フレーム生成部42は、認証情報生成部41が生成した256ビットのMACを認証情報として送信フレームに付し、CAN通信部33へ送信フレームを与えることで、他のECU3へのフレームの送信を行う。   The frame according to the present embodiment is compatible with the conventional CAN protocol, but includes authentication information in part. The authentication information is information used by the monitoring device 5 to determine whether or not this frame is valid. The authentication information generation unit 41 of the ECU 3 generates authentication information by encrypting the CAN header and data included in the transmission frame using the key information 32 a stored in the storage unit 32. In the present embodiment, a 256-bit message authentication code (MAC) is generated based on about 512-bit key information 32a using, for example, an HMAC (SHA-256) algorithm. The transmission frame generation unit 42 of the ECU 3 attaches the 256-bit MAC generated by the authentication information generation unit 41 to the transmission frame as authentication information, and gives the transmission frame to the CAN communication unit 33, so that the frame to the other ECU 3 is transmitted. Send.

なお本実施の形態において、図6に示したフレームを受信したECU3は、受信フレームに含まれる認証情報の正否を確認する必要はない。このため各ECU3は、他のECU3と鍵情報を共有していない。   In the present embodiment, the ECU 3 that has received the frame shown in FIG. 6 does not need to confirm whether the authentication information included in the received frame is correct. For this reason, each ECU3 does not share key information with other ECU3.

ECU3のCAN通信部33は、送信フレームを構成する複数ビットの情報を、CANヘッダ側からEOFまで順にCANバスへ出力する。監視装置5は、CANバスへ出力された情報を順次取得し、送信フレームのCRCフィールドまでを取得した際に、CRCフィールドの情報に基づく誤り検出を行う。送信フレームに誤りがない場合、監視装置5の認証情報判定部61は、送信フレームに含まれる認証情報の正否を判定する。認証情報判定部61は、受信済みのCANヘッダからIDを取得して記憶部52の鍵情報テーブル52aを参照し、IDに対応する鍵情報を取得する。認証情報判定部61は、取得した鍵情報と、受信済みのCANヘッダ及びデータフィールドとに基づき、ECU3の認証情報生成部41と同じアルゴリズムにより認証情報を生成する。認証情報判定部61は、自らが生成した認証情報と、CANバスに送信された送信フレームに含まれる認証情報とを比較し、両認証情報が一致した場合にこの送信フレームが正当なものであると判定する。両認証情報が一致しない場合、認証情報判定部61は、送信フレームが正当なものではないと判定する。なお認証情報判定部61は、送信フレームのCRCフィールドの最終ビットがCANバスに出力されてから、EOFの最終ビットがCANバスに出力されるまでの間に判定処理を完了する。   The CAN communication unit 33 of the ECU 3 outputs information of a plurality of bits constituting the transmission frame to the CAN bus in order from the CAN header side to the EOF. The monitoring device 5 sequentially acquires information output to the CAN bus, and performs error detection based on the CRC field information when acquiring up to the CRC field of the transmission frame. When there is no error in the transmission frame, the authentication information determination unit 61 of the monitoring device 5 determines whether the authentication information included in the transmission frame is correct. The authentication information determination unit 61 acquires an ID from the received CAN header, refers to the key information table 52a of the storage unit 52, and acquires key information corresponding to the ID. The authentication information determination unit 61 generates authentication information by the same algorithm as the authentication information generation unit 41 of the ECU 3 based on the acquired key information and the received CAN header and data field. The authentication information determination unit 61 compares the authentication information generated by itself with the authentication information included in the transmission frame transmitted to the CAN bus, and when both authentication information matches, this transmission frame is valid. Is determined. If the two pieces of authentication information do not match, the authentication information determination unit 61 determines that the transmission frame is not valid. The authentication information determination unit 61 completes the determination process after the last bit of the CRC field of the transmission frame is output to the CAN bus until the last bit of the EOF is output to the CAN bus.

CANバスに出力された送信フレームが正当なものではないと認証情報判定部61が判定した場合、監視装置5の送信情報破棄処理部62は、CANバスに接続されたECU3にこの送信フレームを破棄させるための処理を行う。送信情報破棄処理部62は、この送信フレームのEOFの出力期間中に、CANバスに対してエラーフレームを送信する。このエラーフレームにより、CANバスに接続された全てのECU3は、受信中の不正なフレームを破棄する。   When the authentication information determination unit 61 determines that the transmission frame output to the CAN bus is not valid, the transmission information discard processing unit 62 of the monitoring device 5 discards the transmission frame to the ECU 3 connected to the CAN bus. To perform the process. The transmission information discard processing unit 62 transmits an error frame to the CAN bus during the EOF output period of this transmission frame. With this error frame, all ECUs 3 connected to the CAN bus discard the illegal frame being received.

<フローチャート>
以下、本実施の形態に係る通信システムのECU3及び監視装置5が行う処理を、フローチャートを用いて説明する。図7は、ECU3が行う情報送信処理の手順を示すフローチャートである。ECU3の処理部31は、自らに与えられたID及びセンサの検知結果など他のECU3へ送信すべき情報等に基づき、CANヘッダ及びデータフィールドを生成する(ステップS1)。処理部31の認証情報生成部41は、記憶部32に記憶された鍵情報32aを読み出す(ステップS2)。認証情報生成部41は、ステップS1にて生成したCANヘッダ及びデータフィールドと、ステップS2にて読み出した鍵情報32aとに基づいて、所定のアルゴリズムにより認証情報を生成する(ステップS3)。処理部31は、CANヘッダ、データフィールド及び認証情報に対する誤り検出を行うためのCRCフィールドを生成する(ステップS4)。処理部31は、これまでに生成したCANヘッダ、データフィールド、認証情報及びCRCフィールドを結合して送信フレームを生成し(ステップS5)、CAN通信部33へ与える。
<Flowchart>
Hereinafter, processing performed by the ECU 3 and the monitoring device 5 of the communication system according to the present embodiment will be described with reference to flowcharts. FIG. 7 is a flowchart illustrating a procedure of information transmission processing performed by the ECU 3. The processing unit 31 of the ECU 3 generates a CAN header and a data field based on information to be transmitted to other ECUs 3 such as an ID given to the ECU 3 and a sensor detection result (step S1). The authentication information generation unit 41 of the processing unit 31 reads the key information 32a stored in the storage unit 32 (step S2). The authentication information generation unit 41 generates authentication information by a predetermined algorithm based on the CAN header and data field generated in step S1 and the key information 32a read in step S2 (step S3). The processing unit 31 generates a CRC field for performing error detection on the CAN header, data field, and authentication information (step S4). The processing unit 31 combines the CAN header, data field, authentication information, and CRC field generated so far to generate a transmission frame (step S5), and provides it to the CAN communication unit 33.

ECU3のCAN通信部33は、送信フレームのCANヘッダから送信を開始する。CAN通信部33は、送信フレームの未送信部分から1ビットを取得し、この1ビットに応じた信号をCANバスへ出力する(ステップS6)。CAN通信部33は、例えばアービトレーションによる送信停止など、送信処理を中断する要因が発生したか否かを判定する(ステップS7)。中断要因が発生した場合(S7:YES)、CAN通信部33は、エラー処理などを行って(ステップS8)、情報送信処理を終了する。中断要因が発生していない場合(S7:NO)、CAN通信部33は、与えられた送信フレームの全ビットについて出力を完了したか否かを判定する(ステップS9)。全ビットの出力を完了していない場合(S9:NO)、CAN通信部33は、ステップS6へ処理を戻し、送信フレームの次のビットの出力を行う。全ビットの出力を完了している場合(S9:YES)、CAN通信部33は、情報送信処理を終了する。   The CAN communication unit 33 of the ECU 3 starts transmission from the CAN header of the transmission frame. The CAN communication unit 33 acquires 1 bit from the untransmitted portion of the transmission frame, and outputs a signal corresponding to the 1 bit to the CAN bus (step S6). The CAN communication unit 33 determines whether or not a factor for interrupting transmission processing has occurred, such as transmission stoppage due to arbitration (step S7). When an interruption factor occurs (S7: YES), the CAN communication unit 33 performs an error process or the like (step S8) and ends the information transmission process. If no interruption factor has occurred (S7: NO), the CAN communication unit 33 determines whether or not the output has been completed for all the bits of the given transmission frame (step S9). When the output of all the bits has not been completed (S9: NO), the CAN communication unit 33 returns the process to step S6 and outputs the next bit of the transmission frame. When the output of all the bits has been completed (S9: YES), the CAN communication unit 33 ends the information transmission process.

図8及び図9は、監視装置5が行う監視処理の手順を示すフローチャートである。監視装置5のCAN通信部53は、CANバスの電位を周期的にサンプリングしている。CAN通信部53は、CANバスの電位変化に基づき、CANバスに対する情報送信が開始されたか否かを判定する(ステップS21)。情報送信が開始されていない場合(S21:NO)、CAN通信部53は、情報送信が開始されるまで待機する。情報送信が開始された場合(S21:YES)、CAN通信部53は、CANバスの電位に基づいて送信フレームの1ビットを取得する(ステップS22)。CAN通信部53は、取得した1ビットがCRCフィールドの最終ビットに相当するものであるか否かを判定する(ステップS23)。CRCフィールドの最終ビットでない場合(S23:NO)、CAN通信部53は、ステップS22へ処理を戻し、送信フレームの各ビットの取得を繰り返して行う。CRCフィールドの最終ビットである場合(S23:YES)、CAN通信部53は、これまでに取得した情報を処理部51へ与える。   8 and 9 are flowcharts showing the procedure of the monitoring process performed by the monitoring device 5. The CAN communication unit 53 of the monitoring device 5 periodically samples the potential of the CAN bus. The CAN communication unit 53 determines whether or not information transmission to the CAN bus is started based on the change in the potential of the CAN bus (step S21). When the information transmission has not started (S21: NO), the CAN communication unit 53 waits until the information transmission is started. When information transmission is started (S21: YES), the CAN communication unit 53 acquires 1 bit of the transmission frame based on the potential of the CAN bus (step S22). The CAN communication unit 53 determines whether or not the acquired 1 bit corresponds to the last bit of the CRC field (step S23). If it is not the last bit of the CRC field (S23: NO), the CAN communication unit 53 returns the process to step S22, and repeatedly acquires each bit of the transmission frame. If it is the last bit of the CRC field (S23: YES), the CAN communication unit 53 gives the information acquired so far to the processing unit 51.

処理部51は、CAN通信部53から与えられた情報(送信フレーム)を基に、CRCフィールドの判定を行う(ステップS24)。処理部51は、送信フレームのCANヘッダ〜認証情報に基づいて算出したCRCと、送信フレームのCRCフィールドに格納されたCRCとの値を比較することで、送信フレームに誤りがあるか否かを判定する(ステップS25)。送信フレームに誤りがある場合(S25:YES)、処理部51は、処理を終了する。なおCRCフィールドに基づいて送信フレームに誤りがあると判断される場合、他のECU3においても同様の判断がなされ、この送信フレームは各ECU3において破棄される。   The processing unit 51 determines the CRC field based on the information (transmission frame) given from the CAN communication unit 53 (step S24). The processing unit 51 compares the CRC calculated based on the CAN header to the authentication information of the transmission frame with the CRC stored in the CRC field of the transmission frame to determine whether or not there is an error in the transmission frame. Determination is made (step S25). When there is an error in the transmission frame (S25: YES), the processing unit 51 ends the process. When it is determined that there is an error in the transmission frame based on the CRC field, the same determination is made in the other ECUs 3 and this transmission frame is discarded in each ECU 3.

送信フレームに誤りがない場合(S25:NO)、処理部51の認証情報判定部61は、送信フレームのCANヘッダに含まれるIDを取得する(ステップS26)。認証情報判定部61は、取得したIDを基に記憶部52の鍵情報テーブル52aを参照し、IDに対応する鍵情報を取得する(ステップS27)。認証情報判定部61は、取得した送信フレームのCANヘッダ及びデータフィールドと、ステップS27にて取得した鍵情報とに基づいて、所定のアルゴリズムにより認証情報を生成する(ステップS28)。認証情報判定部61は、送信フレームから認証情報を取得し(ステップS29)、取得した認証情報と、ステップS28にて生成した認証情報とが一致するか否かを判定する(ステップS30)。両認証情報が一致する場合(S30:YES)、処理部51は、処理を終了する。両認証情報が一致しない場合(S30:NO)、処理部51の送信情報破棄処理部62は、CAN通信部53にてエラーフレームをCANバスへ出力し(ステップS31)、処理を終了する。   When there is no error in the transmission frame (S25: NO), the authentication information determination unit 61 of the processing unit 51 acquires the ID included in the CAN header of the transmission frame (step S26). The authentication information determination unit 61 refers to the key information table 52a of the storage unit 52 based on the acquired ID, and acquires key information corresponding to the ID (step S27). The authentication information determination unit 61 generates authentication information by a predetermined algorithm based on the CAN header and data field of the acquired transmission frame and the key information acquired in step S27 (step S28). The authentication information determination unit 61 acquires authentication information from the transmission frame (step S29), and determines whether or not the acquired authentication information matches the authentication information generated in step S28 (step S30). When both authentication information corresponds (S30: YES), the process part 51 complete | finishes a process. If the two pieces of authentication information do not match (S30: NO), the transmission information discard processing unit 62 of the processing unit 51 outputs an error frame to the CAN bus at the CAN communication unit 53 (step S31), and the process is terminated.

図10は、ECU3が行う情報受信処理の手順を示すフローチャートである。ECU3のCAN通信部33は、まず、CANバスに対して出力された送信フレームを1ビットずつ取得していき、送信フレームのCANヘッダからACKフィールドまでの受信処理を行う(ステップS41)。なお図示は省略するが、ECU3は、CRCフィールドまで受信した際に誤りの有無を検知する処理を行う。   FIG. 10 is a flowchart illustrating a procedure of information reception processing performed by the ECU 3. First, the CAN communication unit 33 of the ECU 3 acquires the transmission frame output to the CAN bus bit by bit, and performs reception processing from the CAN header to the ACK field of the transmission frame (step S41). Although illustration is omitted, the ECU 3 performs a process of detecting whether there is an error when receiving up to the CRC field.

その後、CAN通信部33は、CANバスに対して出力された送信フレームのEOFの1ビットを取得する(ステップS42)。CAN通信部33は、取得した1ビットがEOFではなく監視装置5が出力したエラーフレームであるか否かを判定する(ステップS43)。エラーフレームである場合(S43:YES)、CAN通信部33は、これまでに受信したフレームを破棄して(ステップS44)、受信処理を終了する。   Thereafter, the CAN communication unit 33 acquires 1 bit of EOF of the transmission frame output to the CAN bus (step S42). The CAN communication unit 33 determines whether the acquired 1 bit is not an EOF but an error frame output from the monitoring device 5 (step S43). If it is an error frame (S43: YES), the CAN communication unit 33 discards the frames received so far (step S44) and ends the reception process.

エラーフレームでない場合(S43:NO)、CAN通信部33は、EOFの受信を完了したか否かを判定する(ステップS45)。EOFの受信を完了していない場合(S45:NO)、CAN通信部33は、ステップS42へ処理を戻し、EOFの受信を継続する。EOFの受信を完了した場合(S45:YES)、処理部31は、CAN通信部33が受信したフレームのデータフィールドから必要なデータを取得し(ステップS46)、取得したデータに応じた処理を行って(ステップS47)、処理を終了する。   If it is not an error frame (S43: NO), the CAN communication unit 33 determines whether or not the reception of the EOF is completed (step S45). If the EOF reception has not been completed (S45: NO), the CAN communication unit 33 returns the process to step S42, and continues the EOF reception. When reception of the EOF is completed (S45: YES), the processing unit 31 acquires necessary data from the data field of the frame received by the CAN communication unit 33 (step S46), and performs processing according to the acquired data. (Step S47), and the process ends.

<まとめ>
以上の構成の本実施の形態に係る通信システムは、共通のCANバスに対して複数のECU3と監視装置5とを接続する。各ECU3は、他のECU3へ送信すべきデータに認証情報を付した送信フレームをCAN通信部33にてCANバスへ出力することにより、他のECU3への情報送信を行う。なお本実施の形態においては、他のECU3からのフレームを受信したECU3は、受信フレームに含まれる認証情報の正否を判定する必要はない。監視装置5は、CANバスに対するフレームの送信を監視しており、フレームの送信が行われた場合にはこれを取得して、取得したフレームに含まれる認証情報の正否を判定する。認証情報が正しいものであれば、監視装置5は、このフレームに対して何ら処理を行う必要はない。認証情報が正しいものでない場合、送信フレームが悪意のある機器100による不正なものである可能性があるため、監視装置5は、この送信フレームをECU3に破棄させる処理を行う。これにより、各ECU3では認証情報の正否を判定することなく、不正なフレームが各ECU3にて受信されることを防止できる。
<Summary>
The communication system according to the present embodiment having the above configuration connects a plurality of ECUs 3 and monitoring devices 5 to a common CAN bus. Each ECU 3 transmits information to other ECUs 3 by outputting a transmission frame in which authentication information is added to data to be transmitted to the other ECUs 3 to the CAN bus at the CAN communication unit 33. In the present embodiment, the ECU 3 that has received a frame from another ECU 3 does not need to determine whether the authentication information included in the received frame is correct. The monitoring device 5 monitors the transmission of the frame to the CAN bus. When the frame is transmitted, the monitoring device 5 acquires the frame and determines whether the authentication information included in the acquired frame is correct. If the authentication information is correct, the monitoring device 5 does not need to perform any processing on this frame. If the authentication information is not correct, there is a possibility that the transmission frame is illegal by the malicious device 100, and therefore the monitoring device 5 performs a process of causing the ECU 3 to discard the transmission frame. Accordingly, each ECU 3 can prevent an unauthorized frame from being received by each ECU 3 without determining whether the authentication information is correct.

また本実施の形態においては、各ECU3に送信フレームを破棄させるため、送信フレームのEOFの最終ビットがCANバスへ出力される前に、監視装置5がエラーフレームをCANバスへ出力する。これにより各ECU3は、この送信フレームの受信を中止し、送信フレームが破棄される。   In the present embodiment, in order to cause each ECU 3 to discard the transmission frame, the monitoring device 5 outputs an error frame to the CAN bus before the final bit of the EOF of the transmission frame is output to the CAN bus. As a result, each ECU 3 stops receiving the transmission frame, and the transmission frame is discarded.

また本実施の形態においては、監視装置5とECU3とが鍵情報を共有し、認証情報の生成及び判定を行う。これにより鍵情報を有していない悪意のある機器100は認証情報を生成することができないため、不正なフレームの送信を監視装置5がより確実に防止することができる。   In the present embodiment, the monitoring device 5 and the ECU 3 share key information, and generate and determine authentication information. Accordingly, since the malicious device 100 that does not have the key information cannot generate the authentication information, the monitoring device 5 can more reliably prevent the transmission of an unauthorized frame.

また本実施の形態においては、CANバスに接続された複数のECU3は、それぞれ異なる鍵情報を有している。これにより鍵情報の漏えいなどによる悪影響を低減することができる。各ECU3は、他のECU3の送信フレームに含まれる認証情報の正否を判定する必要がないため、他のECU3の鍵情報を有している必要はない。これに対して監視装置5は、全てのECU3についての鍵情報を有しており、記憶部52に鍵情報テーブル52aとして管理している。監視装置5は、送信フレームに含まれるIDに基づいて送信元のECU3を判別し、対応する鍵情報を鍵情報テーブル52aから読み出して、送信フレームに含まれる認証情報の正否を判定することができる。   In the present embodiment, the plurality of ECUs 3 connected to the CAN bus have different key information. As a result, it is possible to reduce adverse effects due to leakage of key information. Each ECU 3 does not need to determine whether the authentication information included in the transmission frame of the other ECU 3 is correct or not, and therefore does not need to have the key information of the other ECU 3. On the other hand, the monitoring device 5 has key information for all the ECUs 3 and manages the key information table 52 a in the storage unit 52. The monitoring device 5 can determine the transmission source ECU 3 based on the ID included in the transmission frame, read the corresponding key information from the key information table 52a, and determine whether the authentication information included in the transmission frame is correct. .

なお本実施の形態においては、ECU3及び監視装置5がCANのプロトコルに従った通信を行う構成としたが、これに限るものではなく、CAN以外のプロトコルによる通信を行う構成としてもよい。また本実施の形態においては、車両1に搭載された通信システムを例に説明を行ったが、通信システムは車両1に搭載されるものに限らず、例えば飛行機又は船舶等の移動体に搭載されるものであってよく、また例えば移動体ではなく工場、オフィス又は学校等に設置されるものであってもよい。また本実施の形態にて示したフレームの構成は、一例であって、これに限るものではない。また通信システム中に監視装置5を設けるのではなく、いずれか1つのECU3が本実施の形態に係る監視装置5の監視機能を備える構成であってもよい。またECU3及び監視装置5の間での鍵情報の共有方法は、どのような方法を採用してもよい。またECU3及び監視装置5が鍵情報を用いて行う暗号処理は、どのようなアルゴリズムのものであってもよい。また認証情報の生成処理及び送信フレーム破棄の処理等を処理部51が行う構成としたが、これに限るものではなく、その一部又は全部の処理をCAN通信部53が行う構成としてもよい。   In the present embodiment, the ECU 3 and the monitoring device 5 are configured to perform communication in accordance with the CAN protocol. However, the present invention is not limited to this, and a configuration in which communication is performed using a protocol other than CAN may be employed. In the present embodiment, the communication system mounted on the vehicle 1 has been described as an example. However, the communication system is not limited to the one mounted on the vehicle 1, and is mounted on a moving body such as an airplane or a ship. For example, it may be installed in a factory, office, school or the like instead of a mobile object. Further, the configuration of the frame shown in this embodiment is an example, and the present invention is not limited to this. Further, instead of providing the monitoring device 5 in the communication system, any one ECU 3 may be configured to have the monitoring function of the monitoring device 5 according to the present embodiment. In addition, any method may be adopted as a key information sharing method between the ECU 3 and the monitoring device 5. Further, the cryptographic process performed by the ECU 3 and the monitoring device 5 using the key information may be of any algorithm. In addition, the processing unit 51 performs the authentication information generation process and the transmission frame discarding process. However, the present invention is not limited to this, and the CAN communication unit 53 may perform part or all of the processing.

1 車両
3 ECU
5 監視装置
31 処理部
32 記憶部
32a 鍵情報
33 CAN通信部
41 認証情報生成部
42 送信フレーム生成部
51 処理部
52 記憶部
52a 鍵情報テーブル
53 CAN通信部
61 認証情報判定部
62 送信情報破棄処理部
100 悪意のある機器
1 Vehicle 3 ECU
5 Monitoring Device 31 Processing Unit 32 Storage Unit 32a Key Information 33 CAN Communication Unit 41 Authentication Information Generation Unit 42 Transmission Frame Generation Unit 51 Processing Unit 52 Storage Unit 52a Key Information Table 53 CAN Communication Unit 61 Authentication Information Determination Unit 62 Transmission Information Discarding Process Part 100 Malicious equipment

Claims (5)

送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを生成する送信情報生成手段、
前記フレームの情報を暗号化して生成した認証情報を前記フレームに付与する認証情報付与手段、及び
前記認証情報付与手段により前記認証情報が付された前記フレームを通信線へ出力し、CAN(Controller Area Network)プロトコルに従って前記フレームを送信するとともに、受信した前記フレームの前記EOFに含まれるビット列より取得した1ビットが所定の信号であるかを判定し、前記所定の信号である場合に、受信した前記フレームを破棄するCAN通信手段を有する通信装置と、
前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを判定する認証情報判定手段、及び
前記認証情報判定手段により前記認証情報が正しいものでないと判定された場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力する情報破棄手段を有する通信制御装置と
を設けたことを特徴とする通信システム。
A CAN header indicating the start of information to be transmitted, a data field for storing the information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, and a specification indicating the end of the information to be transmitted following the CRC field Transmission information generating means for generating a frame including an end of frame (EOF) including a bit string of
Authentication information giving means for giving authentication information generated by encrypting information of the frame to the frame; and outputting the frame to which the authentication information has been attached by the authentication information giving means to a communication line, and a CAN (Controller Area) The network is transmitted according to the network protocol, and it is determined whether one bit acquired from the bit string included in the EOF of the received frame is a predetermined signal. A communication device having CAN communication means for discarding a frame;
When the CAN header, the data field, and the CRC field of the frame are acquired, information generated by encrypting the CAN header and the data field is compared with the authentication information given to the frame. The authentication information determination means for determining whether or not the authentication information is correct, and the authentication information determination means determines that the authentication information is not correct and sends an invalid frame to the communication device. A communication control apparatus comprising: a communication control unit having information discarding means for outputting a predetermined signal for discarding during the output period of the EOF of the frame.
前記通信装置及び前記通信制御装置は、鍵情報を共有し、
前記通信装置の認証情報付与手段は、前記鍵情報に基づいて、前記フレームの情報を暗号化して、認証情報を生成し、
前記通信制御装置の前記認証情報判定手段は、前記鍵情報に基づいて前記フレームに含まれる前記認証情報の判定を行うようにしてあること
を特徴とする請求項1に記載の通信システム。
The communication device and the communication control device share key information,
The authentication information providing unit of the communication device generates authentication information by encrypting the information of the frame based on the key information,
The communication system according to claim 1, wherein the authentication information determination unit of the communication control apparatus determines the authentication information included in the frame based on the key information.
前記複数の通信装置は、それぞれ異なる前記鍵情報を有し、
前記通信制御装置は、各通信装置の前記鍵情報を有していること
を特徴とする請求項2に記載の通信システム。
The plurality of communication devices have different key information,
The communication system according to claim 2, wherein the communication control device includes the key information of each communication device.
複数の通信装置が接続された共通の通信線に接続され、
前記通信線へ出力された認証情報が付与され、送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを取得する取得手段、
前記取得手段が、前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを判定する認証情報判定手段、及び
前記認証情報判定手段により前記認証情報が正しいものでないと判定された場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力する情報破棄手段
を備えることを特徴とする通信制御装置。
Connected to a common communication line to which multiple communication devices are connected,
The authentication information output to the communication line is given, a CAN header indicating the start of information to be transmitted, a data field for storing the information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, An acquisition means for acquiring a frame including an EOF (End of Frame) including a specific bit string indicating the end of the information to be transmitted following the CRC field;
When the obtaining unit obtains the CAN header, the data field, and the CRC field of the frame, information generated by encrypting the CAN header and the data field is added to the authentication given to the frame. Authentication information determination means for determining whether or not the authentication information is correct by comparing with information, and when the authentication information determination means determines that the authentication information is not correct, the communication apparatus An information discarding unit that outputs a predetermined signal for discarding an illegal frame during the output period of the EOF of the frame.
複数の通信装置が共通の通信線を介して接続された通信システムにて、前記通信線に対する不正な情報送信を防止する不正情報送信防止方法であって、
各通信装置は、他の通信装置へ送信するフレームに認証情報を付与して前記通信線へ出力し、
前記通信線へ出力された、送信する情報の開始を示すCANヘッダと、前記送信する情報を格納するデータフィールドと、前記データフィールドに続くCRC(Cyclic Redundancy Check)フィールドと、前記CRCフィールドに続く前記送信する情報の終了を示す特定のビット列を含むEOF(End of Frame)とを含むフレームを通信制御装置が取得し、
前記フレームの前記CANヘッダ、前記データフィールド、前記CRCフィールドまでを取得した際に、前記CANヘッダ及び前記データフィールドを暗号化して生成した情報を、前記フレームに付与された前記認証情報と比較することで前記認証情報が正しいものであるか否かを前記通信制御装置が判定し、
前記認証情報が正しいものでないと判定した場合に、前記通信装置に不正な前記フレームを破棄させるための所定の信号を前記フレームの前記EOFの出力期間中に出力する
ことを特徴とする不正情報送信防止方法。
In a communication system in which a plurality of communication devices are connected via a common communication line, an unauthorized information transmission prevention method for preventing unauthorized information transmission to the communication line,
Each communication device gives authentication information to a frame to be transmitted to another communication device and outputs it to the communication line,
The CAN header indicating the start of information to be transmitted, output to the communication line, a data field for storing the information to be transmitted, a CRC (Cyclic Redundancy Check) field following the data field, and the CRC field following the CRC field The communication control device acquires a frame including an EOF (End of Frame) including a specific bit string indicating the end of information to be transmitted,
When the CAN header, the data field, and the CRC field of the frame are acquired, information generated by encrypting the CAN header and the data field is compared with the authentication information given to the frame. The communication control device determines whether or not the authentication information is correct,
When it is determined that the authentication information is not correct, a predetermined signal for causing the communication apparatus to discard the invalid frame is output during the output period of the EOF of the frame. Prevention method.
JP2016146714A 2016-07-26 2016-07-26 Communication system, communication control apparatus, and unauthorized information transmission prevention method Active JP6348150B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016146714A JP6348150B2 (en) 2016-07-26 2016-07-26 Communication system, communication control apparatus, and unauthorized information transmission prevention method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016146714A JP6348150B2 (en) 2016-07-26 2016-07-26 Communication system, communication control apparatus, and unauthorized information transmission prevention method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014144038A Division JP6267596B2 (en) 2014-07-14 2014-07-14 Communication system, communication control apparatus, and unauthorized information transmission prevention method

Publications (2)

Publication Number Publication Date
JP2016208536A JP2016208536A (en) 2016-12-08
JP6348150B2 true JP6348150B2 (en) 2018-06-27

Family

ID=57490898

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016146714A Active JP6348150B2 (en) 2016-07-26 2016-07-26 Communication system, communication control apparatus, and unauthorized information transmission prevention method

Country Status (1)

Country Link
JP (1) JP6348150B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018133744A (en) * 2017-02-16 2018-08-23 パナソニックIpマネジメント株式会社 Communication system, vehicle, and monitoring method
KR102064684B1 (en) * 2018-09-21 2020-01-08 한국산업기술대학교산학협력단 Data Communication Method To Ensure Confidentiality Of Program Updates Using CAN(Controller Area Network) Communication
JP7247875B2 (en) * 2019-12-06 2023-03-29 株式会社オートネットワーク技術研究所 Determination device, determination program and determination method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5651615B2 (en) * 2012-02-16 2015-01-14 日立オートモティブシステムズ株式会社 In-vehicle network system
WO2013175633A1 (en) * 2012-05-25 2013-11-28 トヨタ自動車 株式会社 Communication device, communication system and communication method

Also Published As

Publication number Publication date
JP2016208536A (en) 2016-12-08

Similar Documents

Publication Publication Date Title
JP6267596B2 (en) Communication system, communication control apparatus, and unauthorized information transmission prevention method
JP6477281B2 (en) In-vehicle relay device, in-vehicle communication system, and relay program
US9866570B2 (en) On-vehicle communication system
JP6306206B2 (en) Communication control device and communication system
US10439842B2 (en) Relay device
US10110377B2 (en) Communication system and key information sharing method
WO2017026359A1 (en) Communication device
US10425231B2 (en) Information processing apparatus and method for authenticating message
WO2017187924A1 (en) Computing device, authentication system, and authentication method
JP6348150B2 (en) Communication system, communication control apparatus, and unauthorized information transmission prevention method
US20170142137A1 (en) Communication system, receiving apparatus, receiving method, and computer program product
WO2014097793A1 (en) Communication system, communication unit, and communication method
US20230412575A1 (en) Information processing device, mobile device, and communication system
WO2017126471A1 (en) Authentication system, authentication requesting device, on-board electronic device, computer program and authentication processing method
JP2014017733A (en) Communication system, communication device, and relay device
JP6375962B2 (en) In-vehicle gateway device and electronic control device
KR102001420B1 (en) Electronic Control Unit, Communication Security System and Method for Vehicle
WO2018056054A1 (en) Communication system, relay device, communication device and communication method
CN113273144B (en) Vehicle-mounted communication system, vehicle-mounted communication control device, vehicle-mounted communication device, communication control method, and communication method
JP6541004B2 (en) Communications system
JP7110950B2 (en) network system
JP7380530B2 (en) Vehicle communication system, communication method and communication program
JP7328419B2 (en) In-vehicle communication system, in-vehicle communication device, computer program and communication method
JP6615721B2 (en) COMMUNICATION SYSTEM, RECEPTION DEVICE, RECEPTION METHOD, AND PROGRAM
WO2017065100A1 (en) Vehicle-mounted communication system and monitoring device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170608

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180530

R150 Certificate of patent or registration of utility model

Ref document number: 6348150

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250