JP2017076861A - On-vehicle communication system and monitoring device - Google Patents
On-vehicle communication system and monitoring device Download PDFInfo
- Publication number
- JP2017076861A JP2017076861A JP2015202859A JP2015202859A JP2017076861A JP 2017076861 A JP2017076861 A JP 2017076861A JP 2015202859 A JP2015202859 A JP 2015202859A JP 2015202859 A JP2015202859 A JP 2015202859A JP 2017076861 A JP2017076861 A JP 2017076861A
- Authority
- JP
- Japan
- Prior art keywords
- message
- identification information
- unit
- monitoring device
- communication
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
Abstract
Description
本発明は、共通の通信線に接続された複数の通信装置がメッセージの送受信を行う車載通信システム、及び、送受信されるメッセージを監視する監視装置に関する。 The present invention relates to an in-vehicle communication system in which a plurality of communication devices connected to a common communication line transmit and receive messages, and a monitoring device that monitors transmitted and received messages.
従来、車両には複数のECU(Electronic Control Unit)が搭載され、これらがCAN(Controller Area Network)などのネットワークを介して接続されている。これら複数のECUは、ネットワークを介して情報を交換しながら各個の処理を進めている。近年では車両内のネットワークの規模が大きくなる傾向がある。このような車両のネットワークに対する攻撃として、例えばECUに不正なプログラムを注入することが行われ得る。不正なプログラムを注入されたECUは、車両のネットワークへ不正なメッセージ送信を行う可能性があり、これによりネットワークに接続された他のECUが誤動作するなどの虞がある。 Conventionally, a plurality of ECUs (Electronic Control Units) are mounted on a vehicle, and these are connected via a network such as a CAN (Controller Area Network). The plurality of ECUs proceed with each process while exchanging information via a network. In recent years, there is a tendency that the size of a network in a vehicle becomes large. As an attack on such a vehicle network, for example, an unauthorized program can be injected into the ECU. An ECU into which an unauthorized program has been injected may transmit an unauthorized message to the vehicle network, which may cause other ECUs connected to the network to malfunction.
特許文献1においては、CANプロトコルを変更せずにMAC(Message Authentication Code)によるメッセージ認証を行う通信システムが提案されている。この通信システムにおいては、各ECUがCAN−ID毎にメッセージの送信回数をカウントする。送信ノードは、メインメッセージのデータフィールド、CAN−ID及びカウント値からMACを生成してMACメッセージとして送信する。受信ノードは、受信したメインメッセージに含まれるデータフィールド、CAN−IDとカウント値とからMACを生成し、MACメッセージに含まれるMACと一致するかを判断する。
非特許文献1においては、各ECUがネットワーク上を流れるメッセージを監視し、自身が送信するはずのCAN−IDが付されたメッセージが他のECUから送信された場合にこれを不正メッセージと判断し、不正メッセージを検出したECUが不正メッセージの送信完了前にエラーフレームを送信することで送信を阻止する通信システムが提案されている。
In
非特許文献1に記載の通信システムでは、不正メッセージを検出したECUがエラーフレームを送信して不正メッセージの送信を阻止している。しかしながら、メッセージの送信がエラーとなったECU(不正なECU)は、このメッセージがエラーなく送信されるまで、メッセージの再送信を繰り返すこととなる。このようなメッセージの再送信が繰り返され続けた場合、これにより通信線が占有されてしまい、他のECUによる正規のメッセージ送信が阻害される虞がある。
In the communication system described in Non-Patent
本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、不正なメッセージ送信が繰り返されて通信線が占有されることを防止し得る車載通信システム及び監視装置を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide an in-vehicle communication system and a monitoring device capable of preventing a communication line from being occupied by repeated unauthorized message transmission. It is to provide.
本発明に係る車載通信システムは、複数の通信装置が共通の通信線に接続され、前記通信線を介して識別情報が付されたメッセージを前記複数の通信装置間で送受信する車載通信システムにおいて、監視対象とするメッセージの識別情報を記憶する記憶部と、前記通信線上に送信されたメッセージが正規のメッセージであるか否かを判定する判定部と、前記判定部が正規のメッセージでないと判定したメッセージを、該メッセージの送信完了前に破棄させる処理を行う破棄部と、前記破棄部が破棄させる処理を行った場合に、前記記憶部に記憶する識別情報を変更する第1変更部とを有し、前記通信線上に送信されたメッセージの監視を行う監視装置を備え、各通信装置は、前記破棄部によるメッセージの破棄が行われた場合に、送受信するメッセージに付す識別情報を変更する第2変更部と、前記第2変更部が識別情報を変更した後に、変更前の識別情報が付されたメッセージに基づく処理を禁止する禁止部とを有し、前記監視装置の第1変更部と前記通信装置の第2変更部とは、同じ方法で識別情報の変更を行うことを特徴とする。 An in-vehicle communication system according to the present invention is an in-vehicle communication system in which a plurality of communication devices are connected to a common communication line, and a message with identification information is transmitted and received between the plurality of communication devices via the communication line. A storage unit that stores identification information of a message to be monitored, a determination unit that determines whether or not a message transmitted on the communication line is a regular message, and the determination unit that is not a regular message A discard unit that performs processing for discarding the message before completion of transmission of the message, and a first change unit that changes identification information stored in the storage unit when the discard unit performs processing for discarding the message. And a monitoring device that monitors the message transmitted on the communication line, and each communication device transmits and receives when the message is discarded by the discarding unit. A second changing unit that changes identification information attached to a message; and a prohibiting unit that prohibits processing based on a message to which identification information before the change is attached after the second changing unit has changed the identification information. The first changing unit of the monitoring device and the second changing unit of the communication device change identification information by the same method.
また、本発明に係る車載通信システムは、前記監視装置又は前記通信装置が、変更前の識別情報が付されたメッセージに対して受信完了を示す信号を前記通信線に出力する受信完了通知部を有することを特徴とする。 Further, the in-vehicle communication system according to the present invention includes a reception completion notification unit that outputs a signal indicating reception completion to the communication line with respect to the message to which the monitoring device or the communication device is attached with the identification information before the change. It is characterized by having.
また、本発明に係る車載通信システムは、前記監視装置及び前記通信装置が、メッセージに対して割り当て可能な複数の識別情報を記憶したテーブルを有し、前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記テーブルから所定の規則で一の識別情報を選択し、選択した識別情報を新たな識別情報として変更を行うことを特徴とする。 Moreover, the vehicle-mounted communication system which concerns on this invention has a table which memorize | stored the some identification information which the said monitoring apparatus and the said communication apparatus can allocate with respect to a message, The 1st change part of the said monitoring apparatus, and the said communication The second changing unit of the apparatus selects one identification information from the table according to a predetermined rule, and changes the selected identification information as new identification information.
また、本発明に係る車載通信システムは、前記識別情報が数値情報であり、前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記識別情報に所定値を加算又は減算した値を算出し、算出した識別情報を新たな識別情報として変更を行うことを特徴とする。 In the in-vehicle communication system according to the present invention, the identification information is numerical information, and the first changing unit of the monitoring device and the second changing unit of the communication device add or subtract a predetermined value to the identification information. A value is calculated, and the calculated identification information is changed as new identification information.
また、本発明に係る車載通信システムは、前記監視装置の第1変更部及び前記通信装置の第2変更部が、前記破棄部の処理により破棄されたメッセージの一部又は全部を元に所定の規則で識別情報を生成し、生成した識別情報を新たな識別情報として変更を行うことを特徴とする。 Further, in the in-vehicle communication system according to the present invention, the first changing unit of the monitoring device and the second changing unit of the communication device are predetermined based on a part or all of the messages discarded by the processing of the discarding unit. The identification information is generated by a rule, and the generated identification information is changed as new identification information.
また、本発明に係る車載通信システムは、前記監視装置及び前記通信装置が、共通の暗号鍵を記憶する記憶部を有し、前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記記憶部に記憶された前記暗号鍵を用いて新たな識別情報を生成することを特徴とする。 Moreover, the vehicle-mounted communication system which concerns on this invention has a memory | storage part in which the said monitoring apparatus and the said communication apparatus memorize | store a common encryption key, The 1st change part of the said monitor apparatus, and the 2nd change part of the said communication apparatus Uses the encryption key stored in the storage unit to generate new identification information.
また、本発明に係る車載通信システムは、前記メッセージに付される識別情報には、基本部分と拡張部分とを含み、前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記拡張部分を変更することを特徴とする。 Further, in the in-vehicle communication system according to the present invention, the identification information attached to the message includes a basic part and an extended part, and the first changing unit of the monitoring device and the second changing unit of the communication device are: The extended portion is changed.
また、本発明に係る車載通信システムは、前記複数の通信装置のうちのいずれか1つの通信装置が、前記監視装置としてメッセージの監視を行うことを特徴とする。 Moreover, the in-vehicle communication system according to the present invention is characterized in that any one of the plurality of communication devices monitors a message as the monitoring device.
また、本発明に係る車載通信システムは、前記監視装置が、複数の通信線に接続されて、通信線間のメッセージを中継するゲートウェイ装置であることを特徴とする。 In the in-vehicle communication system according to the present invention, the monitoring device is a gateway device that is connected to a plurality of communication lines and relays messages between the communication lines.
また、本発明に係る監視装置は、識別情報が付されたメッセージを送受信する複数の通信装置が接続された共通の通信線に接続され、前記通信線上に送信されたメッセージの監視を行う監視装置であって、監視対象とするメッセージの識別情報を記憶する記憶部と、前記通信線上に送信されたメッセージが正規のメッセージであるか否かを判定する判定部と、前記判定部が正規のメッセージでないと判定したメッセージを、該メッセージの送信完了前に破棄させる処理を行う破棄部と、前記破棄部が破棄させる処理を行った場合に、前記記憶部に記憶する識別情報を変更する変更部とを備え、前記破棄部が行うメッセージの破棄により、前記変更部と同じ方法で、前記通信装置に対して送受信するメッセージに付す識別情報を変更させることを特徴とする。 Further, the monitoring device according to the present invention is connected to a common communication line to which a plurality of communication devices that transmit and receive a message with identification information attached is connected, and monitors a message transmitted on the communication line. A storage unit that stores identification information of a message to be monitored, a determination unit that determines whether a message transmitted on the communication line is a regular message, and the determination unit that is a regular message A discard unit that performs processing for discarding a message that is determined to be not completed before transmission of the message, and a change unit that changes identification information stored in the storage unit when the discard unit performs processing for discarding the message, And changing the identification information attached to the message transmitted / received to / from the communication device by the same method as the changing unit by discarding the message performed by the discarding unit And features.
また、本発明に係る監視装置は、変更前の識別情報が付されたメッセージに対して受信完了を示す信号を前記通信線に出力する受信完了通知部を備えることを特徴とする。 In addition, the monitoring device according to the present invention includes a reception completion notification unit that outputs a signal indicating reception completion to the communication line with respect to the message to which the identification information before the change is attached.
また、本発明に係る監視装置は、メッセージに対して割り当て可能な複数の識別情報を記憶したテーブルを有し、前記変更部は、前記テーブルから所定の規則で一の識別情報を選択し、選択した識別情報を新たな識別情報として変更を行うことを特徴とする。 The monitoring device according to the present invention has a table storing a plurality of identification information that can be assigned to a message, and the changing unit selects one identification information from the table according to a predetermined rule, and selects the identification information. The identification information is changed as new identification information.
また、本発明に係る監視装置は、前記識別情報は数値情報であり、前記変更部は、前記識別情報に所定値を加算又は減算した値を算出し、算出した識別情報を新たな識別情報として変更を行うことを特徴とする。 In the monitoring apparatus according to the present invention, the identification information is numerical information, and the changing unit calculates a value obtained by adding or subtracting a predetermined value to the identification information, and uses the calculated identification information as new identification information. It is characterized by making a change.
また、本発明に係る監視装置は、前記変更部が、前記破棄部の処理により破棄されたメッセージの一部又は全部を元に所定の規則で識別情報を生成し、生成した識別情報を新たな識別情報として変更を行うことを特徴とする。 In the monitoring apparatus according to the present invention, the changing unit generates identification information according to a predetermined rule based on a part or all of the message discarded by the processing of the discarding unit, and the generated identification information is newly set. The identification information is changed.
また、本発明に係る監視装置は、暗号鍵を記憶する記憶部を有し、前記変更部は、前記記憶部に記憶された前記暗号鍵を用いて新たな識別情報を生成することを特徴とする。 The monitoring device according to the present invention has a storage unit that stores an encryption key, and the change unit generates new identification information using the encryption key stored in the storage unit. To do.
また、本発明に係る監視装置は、前記メッセージに付される識別情報には、基本部分と拡張部分とを含み、前記変更部は、前記拡張部分を変更することを特徴とする。 In the monitoring apparatus according to the present invention, the identification information attached to the message includes a basic part and an extended part, and the changing unit changes the extended part.
また、本発明に係る監視装置は、複数の通信線に接続されて、通信線間のメッセージを中継するゲートウェイ装置であることを特徴とする。 The monitoring device according to the present invention is a gateway device that is connected to a plurality of communication lines and relays messages between the communication lines.
本発明においては、共通の通信線に複数の通信装置が接続された構成の車載通信システム中に、通信線上に送信されたメッセージの監視を行う監視装置を設ける。監視装置は、監視対象とするメッセージの識別情報を記憶しておき、通信線上に送信されたメッセージが正規のメッセージであるか否かを判定し、正規のメッセージでないと判定したメッセージを送信完了前に破棄させる処理を行う。これにより不正な通信装置が送信した不正なメッセージが各通信装置にて破棄され、不正なメッセージに基づく処理が各通信装置にて行われることが防止される。
監視装置は、不正なメッセージを破棄させる処理を行った場合、監視対象とするメッセージの識別情報を変更する。同様に、各通信装置は、監視装置による破棄処理が行われた場合に、自身が送受信するメッセージに付す識別情報を変更する。ただし、監視装置による変更と各通信装置による変更とは同じ方法で行い、監視装置及び複数の通信装置が処理対象とする識別情報を共有する。また各通信装置は、変更前の識別情報が付されたメッセージに基づく処理を禁止する。
これにより、不正なメッセージが破棄されたことにより不正な通信装置が不正なメッセージの再送信を行った場合、既にこのメッセージは監視装置の監視対象外となっており、且つ、各通信装置の処理対象外となっている。このため監視装置又は通信装置は、不正なメッセージに対してACKなどの応答を行うことができ、不正な通信装置による不正なメッセージの再送信を停止させることが可能となる。
In this invention, the monitoring apparatus which monitors the message transmitted on the communication line is provided in the vehicle-mounted communication system of the structure with which the some communication apparatus was connected to the common communication line. The monitoring device stores the identification information of the message to be monitored, determines whether or not the message transmitted on the communication line is a regular message, and transmits the message that is determined to be not a regular message before transmission is completed. Perform the process of discarding. Thereby, an unauthorized message transmitted by an unauthorized communication device is discarded by each communication device, and processing based on the unauthorized message is prevented from being performed by each communication device.
When the monitoring device performs processing for discarding an illegal message, the monitoring device changes the identification information of the message to be monitored. Similarly, each communication device changes identification information attached to a message transmitted and received by itself when a discarding process is performed by the monitoring device. However, the change by the monitoring device and the change by each communication device are performed by the same method, and the monitoring device and the plurality of communication devices share the identification information to be processed. Each communication device prohibits processing based on a message with identification information before the change.
As a result, when an unauthorized communication device retransmits an unauthorized message due to the discarding of the unauthorized message, this message has already been excluded from monitoring by the monitoring device, and the processing of each communication device Not applicable. For this reason, the monitoring device or the communication device can make a response such as ACK to the unauthorized message, and can stop the retransmission of the unauthorized message by the unauthorized communication device.
また本発明においては、変更前の識別情報(即ち不正と判断したメッセージの識別情報)が付されたメッセージが送信された場合、監視装置によるメッセージの破棄は行わずに、受信完了を示す信号を出力する。これにより、不正な通信装置は不正なメッセージが他の通信装置により受信されたと判断するため、不正な通信装置による不正なメッセージの再送信を防止できる。 Further, in the present invention, when a message with identification information before change (that is, identification information of a message judged to be illegal) is transmitted, the monitoring device does not discard the message and sends a signal indicating reception completion. Output. Thereby, since the unauthorized communication device determines that the unauthorized message has been received by another communication device, it is possible to prevent retransmission of the unauthorized message by the unauthorized communication device.
また本発明においては、メッセージに対して割り当て可能な複数の識別情報を記憶したテーブルを監視装置及び複数の通信装置が有する。このテーブルは、監視装置及び複数の通信装置で同じものを記憶しておく。処理対象の識別情報を変更する場合には、このテーブルから所定の規則で一の識別情報を選択し、選択した識別情報を新たな識別情報とする。これにより、テーブルを有していない不正な通信装置は識別情報を変更することができないため、不正な通信装置による不正なメッセージ送信を無効化できる。 In the present invention, the monitoring device and the plurality of communication devices have a table storing a plurality of identification information that can be assigned to the message. The same table is stored in the monitoring device and the plurality of communication devices. When changing the identification information to be processed, one identification information is selected from this table according to a predetermined rule, and the selected identification information is used as new identification information. Thereby, since an unauthorized communication device that does not have a table cannot change the identification information, unauthorized message transmission by the unauthorized communication device can be invalidated.
また本発明においては、メッセージに付される識別情報を数値情報とし、識別情報を変更する場合には、所定値を識別情報に対して加算又は減算して新たな識別情報とする。加算又は減算する所定値は、監視装置及び複数の通信装置にて同じ値を用いる。これにより、所定値を有していない不正な通信装置は識別情報を変更することができないため、不正な通信装置による不正なメッセージ送信を無効化できる。 In the present invention, the identification information attached to the message is numerical information, and when the identification information is changed, a predetermined value is added to or subtracted from the identification information to obtain new identification information. As the predetermined value to be added or subtracted, the same value is used in the monitoring device and the plurality of communication devices. Thereby, since an unauthorized communication device that does not have a predetermined value cannot change the identification information, unauthorized message transmission by the unauthorized communication device can be invalidated.
また本発明においては、監視装置の破棄処理により破棄されたメッセージの一部又は全部を元に所定の規則で新たな識別情報を生成する。所定の規則として、監視装置及び複数の通信装置は同じ規則を予め記憶しておく。これにより所定の規則を記憶していない不正な通信装置は識別情報を変更することができないため、不正な通信装置による不正なメッセージ送信を無効化できる。 In the present invention, new identification information is generated according to a predetermined rule based on a part or all of the message discarded by the discarding process of the monitoring device. As the predetermined rule, the monitoring device and the plurality of communication devices store the same rule in advance. Accordingly, since an unauthorized communication device that does not store a predetermined rule cannot change the identification information, unauthorized message transmission by the unauthorized communication device can be invalidated.
また本発明においては、監視装置及び複数の通信装置が共通の暗号鍵を記憶しておき、新たな識別情報の生成に暗号鍵を用いる。これにより暗号鍵を記憶していない不正な通信装置は識別情報を変更することができないため、不正な通信装置による不正なメッセージ送信を無効化できる。 In the present invention, the monitoring device and the plurality of communication devices store a common encryption key, and the encryption key is used to generate new identification information. As a result, the unauthorized communication device that does not store the encryption key cannot change the identification information, and therefore unauthorized message transmission by the unauthorized communication device can be invalidated.
また本発明においては、監視装置及び複数の通信装置が識別情報を変更する場合、メッセージに付される識別情報の基本部分は固定し、拡張部分を変更する。これにより、識別情報が異なる複数のメッセージが送受信され得る車載通信システムにおいて、一つのメッセージに対する識別情報の変更を容易化することができ、一つのメッセージに対して設定し得る識別情報の範囲を広げることを容易化できる。 In the present invention, when the monitoring device and the plurality of communication devices change the identification information, the basic portion of the identification information attached to the message is fixed and the extended portion is changed. As a result, in an in-vehicle communication system in which a plurality of messages having different identification information can be transmitted and received, it is possible to easily change the identification information for one message and widen the range of identification information that can be set for one message. Can be made easier.
また本発明においては、車載通信システムに含まれる複数の通信装置のうちのいずれか1つの通信装置に、上述の監視装置の機能を設ける。これによりメッセージ監視のために専用の監視装置を設ける必要がなくなる。 Moreover, in this invention, the function of the above-mentioned monitoring apparatus is provided in any one communication apparatus of the some communication apparatus contained in a vehicle-mounted communication system. This eliminates the need for a dedicated monitoring device for message monitoring.
また本発明においては、メッセージを破棄させる処理などを行う監視装置の機能を、通信線間のメッセージを中継するゲートウェイ装置に設ける。これにより複数の通信線に対する破棄処理などをゲートウェイ装置が一括して行うことができる。 In the present invention, the gateway device that relays messages between communication lines is provided with a monitoring device function for performing processing such as discarding messages. As a result, the gateway device can collectively perform a discarding process for a plurality of communication lines.
本発明による場合は、監視装置が不正なメッセージを破棄させる処理を行った場合に、監視装置及び通信装置が処理対象とするメッセージの識別情報を変更する構成とすることにより、不正な通信装置による不正なメッセージの再送信を停止させることが可能となり、不正なメッセージ送信が繰り返されて通信線が占有されることを防止することができる。 In the case of the present invention, when the monitoring device performs a process of discarding an unauthorized message, the monitoring device and the communication device are configured to change the identification information of the message to be processed. It becomes possible to stop retransmission of unauthorized messages, and it is possible to prevent the unauthorized transmission of messages and the occupation of communication lines.
<実施の形態1>
以下、本発明をその実施の形態を示す図面に基づき具体的に説明する。図1は、実施の形態1に係る車載通信システムの構成を示す模式図である。実施の形態1に係る車載通信システムは、車両1に搭載された複数のECU30が共通の通信線2を介して接続された構成であり、通信線2を介したECU30のメッセージの送受信を監視する監視装置10を備えている。複数の通信装置30及び監視装置10は、例えばCAN又はCAN−FD等の通信プロトコルに従ってメッセージの送受信を行う。
<
Hereinafter, the present invention will be specifically described with reference to the drawings showing embodiments thereof. FIG. 1 is a schematic diagram showing the configuration of the in-vehicle communication system according to the first embodiment. The in-vehicle communication system according to
監視装置10は、処理部11、通信部12及び記憶部13等を備えて構成されている。処理部11は、CPU(Central Processing Unit)又はMPU(Micro-Processing Unit)等の演算処理装置を用いて構成され、図示しないROM(Read Only Memory)などに記憶されたプログラムを実行することにより、メッセージの監視に係る種々の処理を行う。
The
通信部12は、通信線2が接続され、この通信線2を介して他のECU30との間でメッセージの送受信を行うことができる。通信部12は、いわゆるCANコントローラを用いて構成され得る。通信部12は、通信線2の電位をサンプリングすることによってメッセージを受信し処理部11へ与えると共に、処理部11から与えられた送信用のメッセージを電気信号に変換して通信線2へ出力することによってメッセージを送信することができる。ただし本実施の形態に係る監視装置10はECU30との間でメッセージの送受信を行う必要はなく、通信部12は通信線2を介してECU30の間で送受信されるメッセージを監視するために用いられる。
The
記憶部13は、例えばEEPROM(Electrically Erasable Programmable Read Only Memory)又はフラッシュメモリ等のデータ書き換えが可能な不揮発性のメモリ素子を用いて構成されている。処理部11は、記憶部13に記憶された種々のデータを読み出して処理に使用することができると共に、必要なデータを記憶部13に書き込むことができる。なお本実施の形態に係る監視装置10の記憶部13には、車載通信システム中で送受信されるメッセージに付され得るIDの一覧情報がIDテーブル13aとして記憶されていると共に、監視装置10が監視対象とするメッセージのIDが監視ID13bとして記憶される。
The
ECU30及び監視装置10が送受信するメッセージには、このメッセージの種別毎に、特定のID(いわゆるCAN−ID)が付される。本実施の形態に係る車載通信システムでは、1つのメッセージ種別に対して複数のIDが予め定められている。記憶部13のIDテーブル13aには、メッセージの種別と、これに対して付され得る複数のIDとの対応が記憶されている。ECU30及び監視装置10は、複数のIDから1つを選択し、選択したIDのみを処理対象のIDとし、選択していないIDは処理対象外の不正なIDとする。記憶部13の監視ID13bは、メッセージ種別毎に1つ選択されたIDが記憶されている。
A specific ID (so-called CAN-ID) is assigned to each message type transmitted and received by the
本実施の形態に係る監視装置10の処理部11には、記憶部13又は図示しないROM等に記憶された監視処理のためのプログラムを実行することにより、判定処理部21、破棄処理部22、変更処理部23及び通知処理部24等がソフトウェア的な機能ブロックとして実現される。判定処理部21は、通信線2上にECU30が送信したメッセージが正規のメッセージであるか否かを判定する。ただし判定処理部21が判定対象とするのは、記憶部13の監視ID13bに記憶されたIDが付されたメッセージのみであり、これ以外のメッセージについては判定を行わない。なお本実施の形態において、判定処理部21によるメッセージの判定方法については規定しない。判定処理部21は、例えばメッセージに付されたMACなどに基づいて判定を行う構成であってもよく、また例えば予め登録されていないIDが付されたメッセージを不正メッセージと判定する構成であってもよく、これら以外の方法で判定を行う構成であってもよい。
In the
破棄処理部22は、判定処理部21が正規のメッセージではない、即ち不正メッセージであると判定したメッセージを、通信線2に接続された全てのECU30に破棄させる処理を行う。詳しくは、破棄処理部22は、通信線2に出力された不正メッセージの送信完了前に、通信線2に対して通信部12からエラーフレームを出力することにより、不正メッセージを破棄させる。
The discard
変更処理部23は、破棄処理部22が破棄処理を行った場合に、監視対象とするメッセージのIDを変更する処理を行う。変更処理部23は、破棄されたメッセージについて、記憶部13のIDテーブル13aから新たなIDを1つ選択する。変更処理部23は、選択した新たなIDを記憶部13の監視ID13bに記憶すると共に、変更前のIDは監視ID13bから削除する。これにより、変更前のIDが付されたメッセージに対しては判定処理部21による判定処理が行われなくなり、変更後のIDが付されたメッセージに対して判定処理が行われることとなる。
The
通知処理部24は、ECU30が送信したメッセージに対してACKを出力する処理を行う。通知処理部24は、通信部12にて正規のメッセージを受信した場合、ACKを出力して受信完了を送信元のECU30に対して通知する。また通知処理部24は、記憶部13の監視ID13bに記憶されたID以外のIDが付されたメッセージを受信した場合にも同様に、ACKを出力して受信完了を通知する。
The
本実施の形態に係る車載通信システムに含まれる各ECU30(ただし正規のECU30)は、処理部31、通信部32及び記憶部33等を備えて構成されている。処理部31は、CPU又はMPU等の演算処理装置を用いて構成され、車両1の制御に係る種々の処理を行う。通信部32は、他のECU30との間で通信線2を介したメッセージの送受信を行うためのものであり、いわゆるCANコントローラを用いて構成され得る。通信部32は、通信線2の電位をサンプリングすることによってメッセージを受信し処理部31へ与えると共に、処理部31から与えられた送信用のメッセージを電気信号に変換して通信線2へ出力することによってメッセージを送信することができる。
Each ECU 30 (but regular ECU 30) included in the in-vehicle communication system according to the present embodiment includes a
これによりECU30は、他のECU30が送信したメッセージを通信部32にて受信し、受信したメッセージに基づく処理を処理部31にて行うことができる。またECU30は、処理部31の処理により生成した情報をメッセージとして通信部32から他のECU30へ送信することができる。例えば、ECU30が車両1のヘッドライトを制御するECUである場合、他のECU30がセンサによって検知した明るさの情報をメッセージとして受信し、受信したメッセージに含まれる明るさの情報に応じてヘッドライトの点灯/消灯を切り替える制御処理を処理部31が行うことができる。なおECU30が受信メッセージに基づいて行う処理はこれに限定されるものではなく、どのような処理であってもよい。
Thereby, ECU30 can receive the message which other ECU30 transmitted in the
記憶部33は、例えばEEPROM又はフラッシュメモリ等のデータ書き換えが可能な不揮発性のメモリ素子を用いて構成されている。処理部31は、記憶部33に記憶された種々のデータを読み出して処理に使用することができると共に、必要なデータを記憶部33に書き込むことができる。なお本実施の形態に係るECU30の記憶部33には、車載通信システム中で送受信されるメッセージに付され得るIDの一覧情報がIDテーブル33aとして記憶されていると共に、ECU30が送受信処理の対象とするメッセージのIDが処理ID33bとして記憶される。
The
なお、監視装置10のIDテーブル13aとECU30のIDテーブル33aとは、同じ内容であってよい。ただし、監視装置10のIDテーブル13aには車載通信システムにて送受信され得る全てのメッセージ種別についてのIDが記憶されている必要があるが、ECU30のIDテーブル33aには自身の処理に関係するメッセージ種別についてのIDのみを記憶してもよい。同様に、監視装置10の監視ID13bとECU30の処理ID33bとは、同じ内容であってよい。ただし、監視装置10の監視ID13bには車載通信システムにて送受信され得る全てのメッセージ種別について監視対象とするIDを記憶しておく必要があるが、ECU30の処理ID33bには自身の処理に関係するメッセージ種別について送受信処理の対象とするIDのみを記憶してもよい。
The ID table 13a of the
本実施の形態に係るECU30の処理部31には、記憶部33又は図示しないROM等に記憶された通信処理のためのプログラムを実行することにより、変更処理部41及び禁止処理部42等がソフトウェア的な機能ブロックとして実現される。変更処理部41は、監視装置10の破棄処理部22が行う処理によりメッセージが破棄された場合に、処理対象とするメッセージのIDを変更する処理を行う。ECU30の変更処理部41が行う処理は、監視装置10の変更処理部23が行う処理と略同じである。ECU30の変更処理部41は、破棄されたメッセージについて、記憶部33のIDテーブル33aから新たなIDを1つ選択する。変更処理部41は、選択した新たなIDを記憶部33の処理ID33bに記憶すると共に、変更前のIDを処理ID33bから削除する。
The
禁止処理部42は、記憶部33の処理ID33bに記憶されたID以外のIDが付されたメッセージを用いた処理を禁止する。これにより処理部31は、処理ID33bに記憶されたIDが付されたメッセージを用いた処理を行うが、これ以外のIDが付されたメッセージを受信しても、このメッセージに基づく処理を行わない。これにより、監視装置10が不正と判定して破棄処理が行われたメッセージと同じIDのメッセージに基づく処理が各ECU30にて行われることを防止できる。
The
図2は、監視装置10の記憶部13に記憶されるIDテーブル13aの一例を示す模式図である。本例では、車載通信システムにて送受信されるメッセージがメッセージA〜Dの4種類としている。IDテーブル13aには、各メッセージA〜Dに対して、それぞれ8つのIDが記憶されている。例えばメッセージAに対しては、16進数で100h〜107hの8つのIDが記憶されている。
FIG. 2 is a schematic diagram illustrating an example of the ID table 13 a stored in the
また図示は省略するが、ECU30の記憶部13に記憶されるIDテーブル33aも同様の構成であり、且つ、監視装置10のIDテーブル13aと同じ内容である。ただしECU30のIDテーブル33aは、自身の処理に必要なメッセージについてのみIDを記憶しておく構成としてよい。例えばECU30がメッセージAを送信し、メッセージBを受信して処理を行う構成である場合、このECU30のIDテーブル33aはメッセージA及びBについてのIDを記憶しておき、メッセージC及びDのIDを記憶しておく必要はない。
Although not shown, the ID table 33a stored in the
監視装置10の変更処理部23は、IDテーブル13aに記憶された複数のIDから1つを選択し、選択したIDを新たなIDとして変更処理を行う。変更処理部23は、例えばIDテーブル13aに記憶された複数のIDを、記憶された順に1つ選択する構成としてよい。即ち変更処理部23は、IDとして100h〜107hの8つのIDが記憶されている場合、100h→101h→102h→…→106h→107h→101hの順でIDを選択する構成としてよい。この構成の場合、最後のID107hの次には、最初のID101hを選択するというように、巡回的に選択を行えばよい。監視装置10の変更処理部23と、ECU30の変更処理部41とは、同じ選択規則でIDの選択を行う必要がある。なお本例のIDの選択規則は一例であって、これに限るものではない。
The
図3は、監視装置10によるメッセージのIDの変更処理を説明するための模式図であり、監視装置10の記憶部33に記憶された監視ID13bの内容の変化を図示してある。本例では、メッセージA〜DのIDの初期値として、図2のIDテーブル13aの最上段に示した値(100h、200h、20Fh、305h)が監視ID13bに設定されている(図3の状態(1)参照)。
FIG. 3 is a schematic diagram for explaining message ID change processing by the
ここで、IDに100hが設定された不正なメッセージを不正なECUが送信したとする。監視装置10の監視ID13bにはメッセージAのIDとして100hが設定されているため、このメッセージが正規のメッセージであるか否かの判定が判定処理部21にて行われる。判定処理部21がこのメッセージを不正メッセージであると判定し、破棄処理部22が不正メッセージに対する破棄処理を行った場合、変更処理部23はIDの変更処理を行う。変更処理部23は、記憶部13のIDテーブル13aを参照して、不正メッセージのID(100h)の次に登録されているID(101h)を取得する。変更処理部23は、監視ID13bに登録されたメッセージAのID(100h)を削除し、IDテーブル13aから取得した新たなID(101h)を登録する(図3の状態(2)参照)。
Here, it is assumed that an unauthorized ECU transmits an unauthorized message with ID set to 100h. Since 100h is set as the ID of the message A in the
なお図示は省略するが、車載通信システムに含まれる各ECU30(少なくとも、メッセージAを送信又は受信する必要があるECU30)でも同様の処理が行われる。ECU30の変更処理部41は、通信線2に送信されたメッセージに対して監視装置10の破棄処理によるエラーフレームの出力がなされた場合、このメッセージが不正メッセージであると判断し、IDの変更処理を行う。変更処理部41は、記憶部33に記憶されたIDテーブル33aを参照し、不正メッセージのID(100h)の次に登録されているID(101h)を取得し、処理ID33bに登録されているID(100h)を削除して新たなID(101h)を登録する。
Although illustration is omitted, similar processing is performed in each ECU 30 (at least the
これにより、不正なECUがIDに100hが設定された不正メッセージの再送信を行った場合、ECU30の処理ID33bには100hが登録されていないこととなり、禁止処理部42によりこのメッセージに基づく処理が禁止される。このためECU30の処理部41は、不正メッセージを受信しても、この不正メッセージに基づく処理を行わない。また監視装置10の監視ID13bにも100hが登録されていないため、IDが100hの不正メッセージは判定処理部21の判定が行われることなく、通知処理部23によるACK信号の出力が行われる。このACK信号によって不正メッセージを送信した不正なECUは、不正メッセージがECU30にて受信されたと判断するため、不正メッセージの再送信が行われなくなる。
Thus, when an unauthorized ECU retransmits an unauthorized message with ID set to 100h, 100h is not registered in the
次いで、IDに200hが設定された不正メッセージを不正なECUが送信したとする。監視装置10の監視ID13bにはメッセージBのIDとして200hが設定されているため、このメッセージが正規のメッセージであるか否かの判定が判定処理部21にて行われる。判定処理部21がこのメッセージを不正メッセージであると判定し、破棄処理部22が不正メッセージに対する破棄処理を行った場合、変更処理部23はIDの変更処理を行う。変更処理部23は、記憶部13のIDテーブル13aを参照して、不正メッセージのID(200h)の次に登録されているID(202h)を取得する。変更処理部23は、監視ID13bに登録されたメッセージBのID(200h)を削除し、IDテーブル13aから取得した新たなID(202h)を登録する(図3の状態(3)参照)。説明は省略するが、各ECU30についても同様の処理が行われる。
Next, it is assumed that an unauthorized ECU has transmitted an unauthorized message with ID set to 200h. Since 200h is set as the ID of the message B in the
次いで、IDに101hが設定された不正メッセージを不正なECUが送信したとする。監視装置10の監視ID13bにはメッセージAのIDとして101hが設定されているため、このメッセージが正規のメッセージであるか否かの判定が判定処理部21にて行われる。判定処理部21がこのメッセージを不正メッセージであると判定し、破棄処理部22が不正メッセージに対する破棄処理を行った場合、変更処理部23はIDの変更処理を行う。変更処理部23は、記憶部13のIDテーブル13aを参照して、不正メッセージのID(101h)の次に登録されているID(102h)を取得する。変更処理部23は、監視ID13bに登録されたメッセージAのID(101h)を削除し、IDテーブル13aから取得した新たなID(102h)を登録する(図3の状態(4)参照)。説明は省略するが、各ECU30についても同様の処理が行われる。
Next, it is assumed that an unauthorized ECU has transmitted an unauthorized message with ID set to 101h. Since 101h is set as the ID of the message A in the
次いで、IDに20Fhが設定された不正メッセージを不正なECUが送信したとする。監視装置10の監視ID13bにはメッセージCのIDとして20Fhが設定されているため、このメッセージが正規のメッセージであるか否かの判定が判定処理部21にて行われる。判定処理部21がこのメッセージを不正メッセージであると判定し、破棄処理部22が不正メッセージに対する破棄処理を行った場合、変更処理部23はIDの変更処理を行う。変更処理部23は、記憶部13のIDテーブル13aを参照して、不正メッセージのID(20Fh)の次に登録されているID(20Dh)を取得する。変更処理部23は、監視ID13bに登録されたメッセージCのID(20Fh)を削除し、IDテーブル13aから取得した新たなID(20Dh)を登録する(図3の状態(5)参照)。説明は省略するが、各ECU30についても同様の処理が行われる。
Next, it is assumed that the unauthorized ECU transmits an unauthorized message in which 20Fh is set in the ID. Since 20Fh is set as the ID of the message C in the
図4は、本実施の形態に係る監視装置10が行う監視処理の手順を示すフローチャートである。本実施の形態に係る監視装置10の処理部11は、通信線2に対するECU30のメッセージ送信が行われたか否かを判定する(ステップS1)。メッセージ送信が行われていない場合(S1:NO)、処理部11は、ECU30によるメッセージ送信が行われるまで待機する。ECU30によるメッセージ送信が行われた場合(S1:YES)、処理部11は、通信線2に対してメッセージのIDが出力された段階で、メッセージのIDを取得する(ステップS2)。処理部11は、記憶部13の監視ID13bを参照して、ステップS2にて取得したIDが監視ID13bに登録されたものであるか否かを判定する(ステップS3)。取得したIDが監視ID13bに登録されていない場合(S3:NO)、処理部11の通知処理部24は、通信線2へACKを出力し(ステップS9)、処理を終了する。
FIG. 4 is a flowchart showing the procedure of the monitoring process performed by the
取得したIDが監視ID13bに登録されている場合(S3:YES)、処理部11の判定処理部21は、通信線2に対してメッセージに含まれる認証情報(MAC)が出力された段階でこの認証情報を取得し、取得した認証情報の正否判定を行い(ステップS4)、通信線2に送信中のメッセージが正規のメッセージであるか否かを判定する(ステップS5)。なお本フローチャートでは、メッセージに認証情報が付されており、この認証情報に基づいてメッセージの正否判定を行う構成としてあるが、これは一例であって、メッセージの正否判定は認証情報を用いる以外の方法で行ってもよい。メッセージが正規のメッセージであると判定処理部21が判定した場合(S5:YES)、処理部11の通知処理部24は、通信線2へACKを出力し(ステップS9)、処理を終了する。
When the acquired ID is registered in the
通信線2に送信中のメッセージが正規のメッセージではないと判定処理部21が判定した場合(S5:NO)、処理部11の破棄処理部22は、このメッセージの送信が完了する前に、通信線2に対してエラーフレームを出力し(ステップS6)、このメッセージをECU30に破棄させる。次いで処理部11の変更処理部23は、記憶部13のIDテーブル13aを参照して(ステップS7)、ステップS2にて取得したIDに対応する新たなIDを取得する。変更処理部23は、ステップS2にて取得したIDを監視ID13bから削除すると共に、IDテーブル13aから取得した新たなIDを監視ID13bに登録することによって、監視対象とするIDを変更し(ステップS8)、処理を終了する。
When the
図5は、本実施の形態に係る各ECU30が行う受信処理の手順を示すフローチャートである。本実施の形態に係るECU30の処理部31は、通信線2に対する他のECU30のメッセージ送信が行われたか否かを判定する(ステップS21)。メッセージ送信が行われていない場合(S21:NO)、処理部31は、他のECU30によるメッセージ送信が行われるまで待機する。他のECU30によるメッセージ送信が行われた場合(S21:YES)、処理部31は、通信線2に対してメッセージのIDが出力された段階で、メッセージのIDを取得する(ステップS22)。処理部31は、記憶部33の処理ID33bを参照して、ステップS22にて取得したIDが処理ID33bに登録されたものであるか否かを判定する(ステップS23)。
FIG. 5 is a flowchart showing a procedure of reception processing performed by each
取得したIDが処理ID33bに登録されていない場合(S23:NO)、処理部31の禁止処理部42は、受信メッセージに基づく処理を禁止する(ステップS24)。また処理部31は、通信線2へACKを出力し(ステップS25)、処理を終了する。
When the acquired ID is not registered in the
取得したIDが処理ID33bに登録されている場合(S23:YES)、処理部31は、このメッセージの送信完了前にエラーフレームを受信したか否かを判定する(ステップS26)。エラーフレームを受信していない場合(S26:NO)、処理部31は、通信線2に出力されているメッセージの受信を行う(ステップS27)。処理部31は、通信線2へACKを出力し(ステップS28)、このメッセージの受信完了を通知する。その後、処理部31は、受信したメッセージに基づく処理を行って(ステップS29)、処理を終了する。
When the acquired ID is registered in the
通信線2上のメッセージの送信完了前にエラーフレームを受信した場合(S26:YES)、処理部31は、このメッセージの受信処理を中断し、このメッセージを破棄する(ステップS30)。また処理部31の変更処理部41は、記憶部33のIDテーブル33aを参照して(ステップS31)、ステップS22にて取得したIDに対応する新たなIDを取得する。変更処理部41は、ステップS22にて取得したIDを処理ID33bから削除すると共に、IDテーブル33aから取得した新たなIDを処理ID33bに登録することによって、処理対象とするIDを変更し(ステップS32)、処理を終了する。
When the error frame is received before the transmission of the message on the
以上の構成の実施の形態1に係る車載通信システムは、共通の通信線2に複数のECU30が接続された構成の車載通信システム中に、通信線2上に送信されたメッセージの監視を行う監視装置10を設けた構成である。監視装置10は、記憶部13の監視ID13bに監視対象とするメッセージのIDを記憶しておき、通信線2上に送信されたメッセージが正規のメッセージであるか否かを判定処理部21が判定し、正規のメッセージでないと判定したメッセージを送信完了前に破棄させる処理を破棄処理部22が行う。これにより不正なECUが送信した不正メッセージがECU30にて破棄され、不正メッセージに基づく処理が各ECU30にて行われることが防止される。
The in-vehicle communication system according to the first embodiment having the above configuration monitors a message transmitted on the
監視装置10は、破棄処理部22にて不正なメッセージを破棄させる処理を行った場合、監視対象とするメッセージのIDを変更する処理を変更処理部23にて行う。同様に、各ECU30は、監視装置10による破棄処理が行われた場合に、自身が送受信するメッセージに付すIDを変更する処理を変更処理部41にて行う。ただし監視装置10によるIDの変更処理と、各ECU30によるIDの変更とは同じ方法で行い、監視装置10及びECU30が処理対象とするIDを共有する。また各ECU30は、変更前のIDが付されたメッセージに基づく処理を禁止する。
When the discard processing
これにより、不正メッセージが破棄されたことによる不正なECUによる不正メッセージの再送信が行われた場合、既にこの不正メッセージは監視装置10の監視対象外となっており、且つ、各ECU30の処理対象外となっている。このため監視装置10及びECU30は、不正メッセージに対してACKなどの応答を行うことができ、不正なECUによる不正メッセージの再送信を停止させることが可能となる。
As a result, when the unauthorized message is retransmitted by the unauthorized ECU due to the discarding of the unauthorized message, the unauthorized message is already out of the monitoring target of the
また本実施の形態に係る監視装置10は、変更前のIDが付されたメッセージ(即ち、一度不正と判定されたメッセージ)が通信線2上に送信された場合、破棄処理部22による破棄は行わずに、ACK信号を出力して受信完了を通知する。これにより不正なECUは、不正メッセージが他のECU30にて受信されたと判断するため、不正なECUによる不正メッセージの再送信を防止できる。
In addition, the
また本実施の形態に係る車載通信システムでは、メッセージに対して割り当て可能な複数のIDを記憶したIDテーブル13a,33aを監視装置10及びECU30がそれぞれ有する。このIDテーブル13a,33aは、監視装置10及び複数のECU30で同じ内容のものを記憶しておく。処理対象のIDを変更する場合には、IDテーブル13a,33aから所定の規則で一のIDを選択し、選択したIDを新たなIDとする。これにより、IDテーブル13a,33aを有していない不正なECUはIDを変更することができないため、不正なECUによる不正なメッセージ送信を無効化することができる。なお、IDを選択する所定の規則には、例えばIDテーブル13a,33aに記憶された複数のIDから、記憶されている順で巡回的に1つを選択するという方法を採用し得る。
In the in-vehicle communication system according to the present embodiment, the
なお本実施の形態において監視装置10は、判定処理部21、破棄処理部22、変更処理部23及び通知処理部24の各処理を処理部11が行う構成としたが、これに限るものではなく、例えば通信部12が行う構成としてもよい。この場合には、記憶部13は通信部12が直接的にアクセス可能な構成とするか、又は、通信部12内に設けてもよい。同様にECU30は、変更処理部41及び禁止処理部42の処理を処理部31が行う構成としたが、これに限るものではなく、例えば通信部32が行う構成としてもよい。
In the present embodiment, the
また本実施の形態においては、車両1の車載通信システムに含まれる各ECU30がCANプロトコルに従った通信を行う構成としたが、これに限るものではない。各ECU30が、CAN以外のプロトコル、例えばTCP/IP又はFlexRay等のプロトコルに従った通信を行う構成としてもよい。また車両1に搭載される通信システムを例に説明を行ったが、これに限るものではなく、航空機若しくは船舶等の移動体に搭載される通信システム、又は、工場若しくはオフィス等に設置される通信システム等のように、車載以外の通信システムに対して本技術を適用してもよい。
In the present embodiment, each
(変形例1)
上述の実施の形態1においては、IDテーブル13a,33aから1つのIDを選択して監視ID13b及び処理ID33bを変更する構成としたが、これに限るものではない。監視装置10の変更処理部23は、判定処理部21が不正と判定したメッセージに付されているIDを取得し、このIDに所定値を加算又は減算することで新たなIDを生成し、監視ID13bに登録する構成としてもよい。例えばID100hのメッセージが不正であると判定された場合に、100hに所定値として1を加算し、新たなID101hを生成する構成とすることができる。なお、加算又は減算する所定値は、メッセージの種別毎に異なる値としてよく、この場合にはメッセージの種別に対応付けて加算又は減算する所定値を記憶部13に記憶しておく。
(Modification 1)
In the first embodiment described above, the configuration is such that one ID is selected from the ID tables 13a and 33a and the
各ECU30の変更処理部41も同様に、監視装置10により破棄処理がなされたメッセージに付されているIDを取得し、このIDに所定値を加算又は減算することで新たなIDを生成し、処理ID33bに登録する構成としてよい。ただしIDに対して加算又は減算する所定値は、監視装置10及びECU30で共通の値とする必要がある。
Similarly, the
(変形例2)
また、上述の実施の形態においては、メッセージの監視処理のみを行う監視装置10を車載通信システム中に設ける構成としたが、これに限るものではない。例えば車載通信システム中に含まれる複数のECU30のうち、一又は複数のECU30に監視装置10と同様のメッセージ監視処理を行う機能を追加する構成としてもよい。図6は、変形例2に係る車載通信システムの構成を示すブロック図である。変形例2に係る車載通信システムでは、車両1の制御処理などを行う複数のECU30のうちの一つのECU50に、実施の形態1に示した監視装置10と同様のメッセージ監視機能を追加した構成である。このため変形例2に係るECU50は、実施の形態1に係る監視装置10と同様の判定処理部21、破棄処理部22、変更処理部23及び通知処理部24が処理部51に設けられると共に、ECU30と同様の禁止処理部42が処理部51に設けられている。
(Modification 2)
In the above-described embodiment, the
変形例2に係るECU50は、記憶部33の処理ID33bに、不正メッセージの監視対象とするID、且つ、自身の処理に関係するメッセージのIDを記憶している。ECU50は、通信線2上に送信されたメッセージのIDが処理ID33bに登録されたものである場合、判定処理部21による判定、破棄処理部22による破棄、及び、変更処理部23によるIDの変更等の処理を行う。またメッセージのIDが処理ID33bに登録されたものでない場合、ECU50は、通知処理部24によるACKの出力、及び、禁止処理部42による受信メッセージに基づく処理の禁止等の処理を行う。
The
このように、車載通信システムに含まれる一又は複数のECU50に監視装置10の機能を設けることによって、メッセージ監視のために専用の監視装置10を設ける必要がなくなるため、車載通信システムの大規模化を抑制し、コストの増大を抑制することができる。なお、車載通信システムに含まれる複数のECUを、全て変形例2に係るECU50と同様の構成としてもよい。
As described above, since the function of the
(変形例3)
図7は、変形例3に係る車載通信システムの構成を示すブロック図である。変形例3に係る車載通信システムは、それぞれに複数のECU30が接続された通信線2及び通信線3がゲートウェイ110に接続され、ゲートウェイ110が通信線2,3間のメッセージを中継する構成である。この構成の場合、ゲートウェイ110に上述の実施の形態1に係る監視装置10と同様の監視機能を設けることができる。
(Modification 3)
FIG. 7 is a block diagram illustrating a configuration of the in-vehicle communication system according to the third modification. The in-vehicle communication system according to the modified example 3 has a configuration in which the
変形例3に係るゲートウェイ110は、処理部11、通信部12a,12b及び記憶部13を備えて構成されている。2つの通信部12a,12bは、それぞれ通信線2,3が接続され、接続された通信線2,3を介してECU30との間でメッセージの送受信を行う。処理部11は、通信部12a,12bの一方にて受信したメッセージを他方から送信することにより、通信線2,3間でメッセージを中継する処理を行う。更に処理部211は、ROMなどに記憶された所定意のプログラムを実行することにより、判定処理部21、破棄処理部22、変更処理部23及び通知処理部24等がソフトウェア的な機能ブロックとして実現される。これらの機能ブロックが行う処理は、上述の実施の形態1に係る監視装置10のものと略同じであるが、2つの通信線2,3に対して個別にメッセージの監視処理を行う。
A
このように変形例3に係る車載通信システムでは、複数の通信線2,3が接続されるゲートウェイ110にメッセージ監視機能を設ける。これによりゲートウェイ110にてメッセージ監視を集中的に行うことができ、各通信線2,3にそれぞれ監視装置10を設ける構成と比較して、車載通信システムを小規模化及び低コスト化することができる。
As described above, in the in-vehicle communication system according to the modified example 3, the message monitoring function is provided in the
<実施の形態2>
図8は、実施の形態2に係る車載通信システムの構成を示すブロックである。実施の形態2に係る車載通信システムは、実施の形態1に係る車載通信システムと同様に、共通の通信線2に対して複数のECU230が接続されると共に、通信線2上のメッセージを監視する監視装置210が接続された構成である。実施の形態2に係る監視装置210は、IDテーブル13aに代えて、記憶部13に暗号鍵213aを記憶しており、変更処理部223が暗号鍵213aを用いてIDの変更処理を行う。同様に、実施の形態2に係るECU230は、IDテーブル33aに代えて、記憶部33に暗号鍵233aを記憶しており、変更処理部241が暗号鍵213aを用いてIDの変更処理を行う。なお、監視装置210が記憶する暗号鍵213aと、各ECU230が記憶する暗号鍵233aとは同じであり、例えば車両1の製造段階などにおいて適切な値が各装置に書き込まれる。
<
FIG. 8 is a block diagram illustrating a configuration of the in-vehicle communication system according to the second embodiment. As in the in-vehicle communication system according to the first embodiment, the in-vehicle communication system according to the second embodiment monitors a message on the
図9は、実施の形態2に係る監視装置210によるメッセージのIDの変更処理を説明するための模式図である。本実施の形態に係る車載通信システムにて送受信されるメッセージは、CAN又はCAN−FD等のプロトコルに基づくものであり、アービトレーションフィールド、コントロールフィールド、データフィールド及びCRC(Cyclic Redundancy Check)フィールド等を含んで構成されている(図9上段のメッセージ構成を参照)。アービトレーションフィールドにメッセージのIDが格納される。実施の形態2においてアービトレーションフィールドに格納されるIDは全体で29ビットであり、11ビットのベースIDと、18ビットの拡張IDとに分けられている。またデータフィールドには64ビットのデータが格納される。監視装置210の判定処理部21がMACに基づく判定を行う場合に、メッセージの例えばデータフィールドの一部にMACを含めてよい。
FIG. 9 is a schematic diagram for explaining message ID change processing by the
ここで図9のメッセージ例に示すように、ベースIDが012h(000 0001 0010)であり、拡張IDが34567h(11 0100 0101 0110 0111)であるとする。またデータフィールドには89abcdef01234567hのデータが格納されているとする。監視装置210の監視ID13b及びECU230の処理ID33bには、例示したベースID及び拡張IDを結合した29ビットのIDが登録されている。
Here, it is assumed that the base ID is 012h (000 0001 0010) and the extended ID is 34567h (11 0100 0101 0110 0111) as shown in the message example of FIG. It is assumed that 89abcdef01234567h data is stored in the data field. In the
不正なECUがこのIDを用いて不正メッセージを送信した場合、監視装置210の判定処理部21がこのメッセージを不正であると判定し、破棄処理部22がエラーフレームを出力することにより各ECU30にてこのメッセージが破棄される。破棄処理部22によるメッセージの破棄処理を行った場合、監視装置210の変更処理部223は、破棄したメッセージのデータフィールドに含まれる64ビットのデータと、記憶部13に記憶している暗号鍵213aとを用いて新たなIDを生成する。なお破棄処理部22は、メッセージのデータフィールドまでの送信が完了した後、且つ、メッセージの送信完了前までにエラーフレームの出力を行う。
When an unauthorized ECU transmits an unauthorized message using this ID, the
変更処理部223は、例えばデータフィールドの64ビットのデータに対して、暗号鍵213aを用いた暗号化処理を行う。なお暗号化処理は、例えば共有鍵暗号方式として知られるDES(Data Encryption Standard)又はAES(Advanced Encryption Standard)等のアルゴリズムを採用することができる。ただし変更処理部223が行う暗号化処理はDES又はAES以外のどのようなアルゴリズムを採用してもよい。本例では、データフィールドの64ビットのデータ(89abcdef01234567h)に対して暗号化処理を行った結果、64ビットのデータ(76543210fedcba98h)が得られたものとする。
The
変更処理部223は、暗号化処理により得られた64ビットのデータから、下位18ビットのデータ(0ba98h)を抽出する。変更処理部223は、破棄したメッセージのIDに含まれる拡張IDを、暗号化処理により得られたデータから抽出した18ビットのデータに置き換えたものを新たなIDとする(図9下段のID変更後のメッセージ例を参照)。変更処理部223は、記憶部13の監視ID13bから破棄したメッセージのIDを削除すると共に、上記の処理により生成した新たなIDを監視ID13bに登録することにより、監視対象のIDの変更を行う。
The
同様に、各ECU230の変更処理部241は、監視装置210の破棄処理により破棄したメッセージのデータフィールドに含まれる64ビットのデータと、記憶部33に記憶された暗号鍵233aとを用いて新たなIDを生成する。変更処理部241は、記憶部33の処理ID33bから破棄したメッセージのIDを削除すると共に、生成した新たなIDを処理ID33bに登録することにより、処理対象のIDの変更を行う。
Similarly, the
ECU230の変更処理部241による新たなIDの生成方法は、監視装置210の変更処理部223による新たなIDの生成方法と同じであるため、説明は省略する。またECU230が記憶している暗号鍵233aと、監視装置210が記憶している暗号鍵213aとは同じものである。よって、破棄したメッセージのデータフィールドに基づいて生成される新たなIDは、ECU230にて生成されるものと、監視装置210にて生成されるものとで同じ値となる。
The method for generating a new ID by the
以上の構成の実施の形態2に係る車載通信システムは、監視装置210の破棄処理により破棄されたメッセージの一部(データフィールド)を元に、所定の規則による処理(暗号化処理)を行うことで新たなIDを生成する。監視装置210及び各ECU230は、同じ暗号化処理の規則を予め記憶しておく。これにより、所定の暗号化処理の規則を記憶していない不正なECUはIDを変更することができないため、不正なECUによる不正メッセージの送信を無効化することができる。
The in-vehicle communication system according to the second embodiment having the above configuration performs a process (encryption process) according to a predetermined rule based on a part of the message (data field) discarded by the discard process of the
また実施の形態2に係る車載通信システムは、監視装置210及び各ECU230が共通の暗号鍵213a,233aを記憶しておき、新たなIDの生成のこの暗号鍵213a,233aを用いる。これにより暗号鍵213a,233aを記憶していない不正なECUはIDを変更することができないため、不正なECUによる不正メッセージの送信を無効化することができる。
In the in-vehicle communication system according to the second embodiment, the
また実施の形態2に係る車載通信システムは、監視装置210及び各ECU230がIDを変更する場合、メッセージに付されるIDのうちの基本IDは固定し、拡張IDを変更する。例えば複数のIDが使用される車載通信システムにおいて、メッセージのIDを全て変更する構成とした場合、種別が異なる複数のメッセージのIDが偶然に一致する虞があるため、IDの変更処理において重複の有無を確認する必要がある。基本IDを固定して拡張IDのみを変更する構成とすることにより、このような重複が発生することがなくなるため、IDの変更を容易化することができる。
In the in-vehicle communication system according to the second embodiment, when the
なお実施の形態2において監視装置210及び各ECU230は、破棄したメッセージのデータフィールドを元に暗号化処理を行う構成としたが、これに限るものではない。監視装置210及び各ECU230は、例えば破棄したメッセージのCRCフィールドを元に暗号化処理を行ってもよく、また例えばデータフィールドの上位32ビットなどの一部分を元に暗号化処理を行ってもよく、また例えばメッセージ全体を元に暗号化処理を行ってもよく、これら以外の部分を元に暗号化処理を行ってもよい。また監視装置210及び各ECU230は、暗号鍵213a,233aとして1つの値を用いるのではなく、例えばメッセージの種別毎に異なる値を用いてもよい。
In the second embodiment, the
また監視装置210及び各ECU230は、暗号鍵213a,233aを用いた暗号化処理により新たなIDを生成する構成としたが、これに限るものではない。監視装置210及び各ECU230は、破棄したメッセージの一部又は全部を元に、所定の規則で新たなIDを生成する構成であればよい。例えば監視装置210及び各ECU230は、破棄したメッセージのデータフィールドに対して、予め記憶したハッシュ関数を用いたハッシュ値の算出を行い、算出したハッシュ値を新たなID又は新たなIDの一部としてもよい。
Moreover, although the
また、実施の形態2に係る車載通信システムのその他の構成は、実施の形態1に係る車載通信システムと同様であるため、同様の箇所には同じ符号を付し、詳細な説明を省略する。
Moreover, since the other structure of the vehicle-mounted communication system which concerns on
1 車両
2,3 通信線
10 監視装置
11 処理部
12,12a,12b 通信部
13 記憶部
13a IDテーブル
13b 監視ID
21 判定処理部
22 破棄処理部
23 変更処理部
24 通知処理部
30 ECU
31 処理部
32 通信部
33 記憶部
33a IDテーブル
33b 処理ID
41 変更処理部
42 禁止処理部
50 ECU
51 処理部
110 ゲートウェイ
210 監視装置
213a 暗号鍵
223 変更処理部
230 ECU
233a 暗号鍵
241 変更処理部
DESCRIPTION OF
21
31
41
51
233a Encryption key 241 Change processing unit
Claims (17)
監視対象とするメッセージの識別情報を記憶する記憶部と、前記通信線上に送信されたメッセージが正規のメッセージであるか否かを判定する判定部と、前記判定部が正規のメッセージでないと判定したメッセージを、該メッセージの送信完了前に破棄させる処理を行う破棄部と、前記破棄部が破棄させる処理を行った場合に、前記記憶部に記憶する識別情報を変更する第1変更部とを有し、前記通信線上に送信されたメッセージの監視を行う監視装置を備え、
各通信装置は、
前記破棄部によるメッセージの破棄が行われた場合に、送受信するメッセージに付す識別情報を変更する第2変更部と、
前記第2変更部が識別情報を変更した後に、変更前の識別情報が付されたメッセージに基づく処理を禁止する禁止部と
を有し、
前記監視装置の第1変更部と前記通信装置の第2変更部とは、同じ方法で識別情報の変更を行うこと
を特徴とする車載通信システム。 In an in-vehicle communication system in which a plurality of communication devices are connected to a common communication line, and a message with identification information attached thereto is transmitted and received between the plurality of communication devices.
A storage unit that stores identification information of a message to be monitored, a determination unit that determines whether or not a message transmitted on the communication line is a regular message, and the determination unit that is not a regular message A discard unit that performs processing for discarding the message before completion of transmission of the message, and a first change unit that changes identification information stored in the storage unit when the discard unit performs processing for discarding the message. And a monitoring device for monitoring a message transmitted on the communication line,
Each communication device
A second changing unit that changes identification information attached to a message to be transmitted and received when the message is discarded by the discarding unit;
A prohibition unit for prohibiting processing based on a message to which the identification information before the change is attached after the second change unit has changed the identification information;
The in-vehicle communication system, wherein the first changing unit of the monitoring device and the second changing unit of the communication device change the identification information by the same method.
を特徴とする請求項1に記載の車載通信システム。 The said monitoring apparatus or the said communication apparatus has a reception completion notification part which outputs the signal which shows reception completion to the said communication line with respect to the message to which the identification information before a change was attached | subjected. In-vehicle communication system.
前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記テーブルから所定の規則で一の識別情報を選択し、選択した識別情報を新たな識別情報として変更を行うこと
を特徴とする請求項1又は請求項2に記載の車載通信システム。 The monitoring device and the communication device have a table storing a plurality of identification information that can be assigned to a message,
The first changing unit of the monitoring device and the second changing unit of the communication device select one identification information from the table according to a predetermined rule, and change the selected identification information as new identification information. The in-vehicle communication system according to claim 1 or 2.
前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記識別情報に所定値を加算又は減算した値を算出し、算出した識別情報を新たな識別情報として変更を行うこと
を特徴とする請求項1又は請求項2に記載の車載通信システム。 The identification information is numerical information,
The first changing unit of the monitoring device and the second changing unit of the communication device calculate a value obtained by adding or subtracting a predetermined value to the identification information, and change the calculated identification information as new identification information. The in-vehicle communication system according to claim 1 or 2, characterized by the above.
を特徴とする請求項1又は請求項2に記載の車載通信システム。 The first changing unit of the monitoring device and the second changing unit of the communication device generate identification information according to a predetermined rule based on a part or all of the message discarded by the processing of the discarding unit, and the generated identification The in-vehicle communication system according to claim 1 or 2, wherein the information is changed as new identification information.
前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記記憶部に記憶された前記暗号鍵を用いて新たな識別情報を生成すること
を特徴とする請求項5に記載の車載通信システム。 The monitoring device and the communication device have a storage unit that stores a common encryption key,
The first change unit of the monitoring device and the second change unit of the communication device generate new identification information using the encryption key stored in the storage unit. In-vehicle communication system.
前記監視装置の第1変更部及び前記通信装置の第2変更部は、前記拡張部分を変更すること
を特徴とする請求項1乃至請求項6のいずれか1つに記載の車載通信システム。 The identification information attached to the message includes a basic part and an extended part,
The in-vehicle communication system according to any one of claims 1 to 6, wherein the first changing unit of the monitoring device and the second changing unit of the communication device change the extension portion.
を特徴とする請求項1乃至請求項7のいずれか1つに記載の車載通信システム。 The in-vehicle communication system according to any one of claims 1 to 7, wherein any one of the plurality of communication devices monitors a message as the monitoring device.
を特徴とする請求項1乃至請求項7のいずれか1つに記載の車載通信システム。 The in-vehicle communication system according to any one of claims 1 to 7, wherein the monitoring device is a gateway device that is connected to a plurality of communication lines and relays messages between the communication lines.
監視対象とするメッセージの識別情報を記憶する記憶部と、
前記通信線上に送信されたメッセージが正規のメッセージであるか否かを判定する判定部と、
前記判定部が正規のメッセージでないと判定したメッセージを、該メッセージの送信完了前に破棄させる処理を行う破棄部と、
前記破棄部が破棄させる処理を行った場合に、前記記憶部に記憶する識別情報を変更する変更部と
を備え、
前記破棄部が行うメッセージの破棄により、前記変更部と同じ方法で、前記通信装置に対して送受信するメッセージに付す識別情報を変更させること
を特徴とする監視装置。 A monitoring device that is connected to a common communication line connected to a plurality of communication devices that transmit and receive messages with identification information, and that monitors messages sent on the communication line,
A storage unit for storing identification information of a message to be monitored;
A determination unit that determines whether or not a message transmitted on the communication line is a regular message;
A discarding unit that performs processing for discarding a message that the determination unit determines that the message is not a regular message before transmission of the message is completed;
A change unit that changes identification information stored in the storage unit when the discard unit performs processing to be discarded, and
The monitoring apparatus, wherein the discarding of the message performed by the discarding unit causes the identification information attached to the message to be transmitted / received to / from the communication apparatus to be changed by the same method as the changing unit.
を特徴とする請求項10に記載の監視装置。 The monitoring apparatus according to claim 10, further comprising: a reception completion notification unit that outputs a signal indicating reception completion to the communication line with respect to a message to which identification information before the change is attached.
前記変更部は、前記テーブルから所定の規則で一の識別情報を選択し、選択した識別情報を新たな識別情報として変更を行うこと
を特徴とする請求項10又は請求項11に記載の監視装置。 A table storing a plurality of identification information that can be assigned to the message;
The monitoring device according to claim 10 or 11, wherein the changing unit selects one identification information from the table according to a predetermined rule, and changes the selected identification information as new identification information. .
前記変更部は、前記識別情報に所定値を加算又は減算した値を算出し、算出した識別情報を新たな識別情報として変更を行うこと
を特徴とする請求項10又は請求項11に記載の監視装置。 The identification information is numerical information,
The monitoring unit according to claim 10 or 11, wherein the changing unit calculates a value obtained by adding or subtracting a predetermined value to the identification information, and changes the calculated identification information as new identification information. apparatus.
を特徴とする請求項10又は請求項11に記載の監視装置。 The changing unit generates identification information according to a predetermined rule based on a part or all of the message discarded by the processing of the discarding unit, and changes the generated identification information as new identification information. The monitoring device according to claim 10 or 11.
前記変更部は、前記記憶部に記憶された前記暗号鍵を用いて新たな識別情報を生成すること
を特徴とする請求項14に記載の監視装置。 A storage unit for storing the encryption key;
The monitoring apparatus according to claim 14, wherein the changing unit generates new identification information using the encryption key stored in the storage unit.
前記変更部は、前記拡張部分を変更すること
を特徴とする請求項10乃至請求項15のいずれか1つに記載の監視装置。 The identification information attached to the message includes a basic part and an extended part,
The monitoring device according to any one of claims 10 to 15, wherein the changing unit changes the extension portion.
を特徴とする請求項10乃至請求項16のいずれか1つに記載の監視装置。 The monitoring device according to any one of claims 10 to 16, wherein the monitoring device is a gateway device connected to a plurality of communication lines and relaying messages between the communication lines.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015202859A JP2017076861A (en) | 2015-10-14 | 2015-10-14 | On-vehicle communication system and monitoring device |
PCT/JP2016/079902 WO2017065100A1 (en) | 2015-10-14 | 2016-10-07 | Vehicle-mounted communication system and monitoring device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015202859A JP2017076861A (en) | 2015-10-14 | 2015-10-14 | On-vehicle communication system and monitoring device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2017076861A true JP2017076861A (en) | 2017-04-20 |
Family
ID=58517600
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015202859A Pending JP2017076861A (en) | 2015-10-14 | 2015-10-14 | On-vehicle communication system and monitoring device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2017076861A (en) |
WO (1) | WO2017065100A1 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5770602B2 (en) * | 2011-10-31 | 2015-08-26 | トヨタ自動車株式会社 | Message authentication method and communication system in communication system |
JP5776848B2 (en) * | 2012-05-15 | 2015-09-09 | トヨタ自動車株式会社 | Communication system and communication method |
JP5637190B2 (en) * | 2012-07-27 | 2014-12-10 | トヨタ自動車株式会社 | Communication system and communication method |
-
2015
- 2015-10-14 JP JP2015202859A patent/JP2017076861A/en active Pending
-
2016
- 2016-10-07 WO PCT/JP2016/079902 patent/WO2017065100A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2017065100A1 (en) | 2017-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6477281B2 (en) | In-vehicle relay device, in-vehicle communication system, and relay program | |
CN104717201B (en) | Network device and network system | |
US9866570B2 (en) | On-vehicle communication system | |
JP6569087B2 (en) | Receiving apparatus and receiving method | |
US9577997B2 (en) | Authentication system and authentication method | |
JP6488702B2 (en) | COMMUNICATION CONTROL DEVICE, COMMUNICATION CONTROL METHOD, AND COMMUNICATION CONTROL PROGRAM | |
JP2017050643A (en) | Repeating device | |
US10560286B2 (en) | Gateway device and control method for the same | |
US10554623B2 (en) | On-board communication system | |
JP2016021623A (en) | Communication system, communication control device, and unauthorized information transmission prevention method | |
JP2017121091A (en) | Ecu and network device for vehicle | |
JP2016116132A (en) | Communication control device, communication control method, and communication control program | |
JP6375962B2 (en) | In-vehicle gateway device and electronic control device | |
JP2018182767A (en) | Ecu, network device, and network device for vehicle | |
CN113853766B (en) | Relay device and vehicle communication method | |
WO2017065100A1 (en) | Vehicle-mounted communication system and monitoring device | |
JPWO2013140455A1 (en) | Ad hoc network system, node, and communication method | |
JP7110950B2 (en) | network system | |
JP2020137009A (en) | Network system | |
JP2013121071A (en) | Relay system, and relay device and external device forming the same | |
JP2018198363A (en) | Communication system, and communication control method | |
JP2020141414A (en) | Ecu and network device | |
CN116114222A (en) | Communication system, relay device, reception device, and communication control method | |
JP2019047370A (en) | Network system | |
JP2016158028A (en) | Communication device and network system |