JP6769270B2 - In-vehicle electronic control device, in-vehicle electronic control system, relay device - Google Patents
In-vehicle electronic control device, in-vehicle electronic control system, relay device Download PDFInfo
- Publication number
- JP6769270B2 JP6769270B2 JP2016235296A JP2016235296A JP6769270B2 JP 6769270 B2 JP6769270 B2 JP 6769270B2 JP 2016235296 A JP2016235296 A JP 2016235296A JP 2016235296 A JP2016235296 A JP 2016235296A JP 6769270 B2 JP6769270 B2 JP 6769270B2
- Authority
- JP
- Japan
- Prior art keywords
- relay
- route
- node
- external device
- vehicle
- 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
Links
Images
Classifications
-
- 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
- H04L12/4604—LAN interconnection over a backbone network, e.g. Internet, Frame Relay
- H04L12/462—LAN interconnection over a bridge based backbone
- H04L12/4625—Single bridge functionality, e.g. connection of two networks over a single bridge
-
- 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]
-
- 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
Description
本開示は、車両ネットワークを構成する車載電子制御装置、車載電子制御装置を備える車載電子制御システム、及び車両ネットワークを構成する中継装置に関する。 The present disclosure relates to an in-vehicle electronic control device constituting a vehicle network, an in-vehicle electronic control system including an in-vehicle electronic control device, and a relay device constituting the vehicle network.
近年、車両ネットワークを介してECUと外部装置とが通信を行うことで、ECUの検査やECUのプログラムの書換えを行う車両が流通している。このような車両では、車両ネットワークに不正ツールが接続され、不正ツールによりECUが不正改造されるおそれがあった。よって、ECUの不正改造を抑制するため、特許文献1に記載の車両ネットワークのように、ECUのデータの不正な書換えを監視する技術が提案されている。
In recent years, vehicles that inspect the ECU and rewrite the program of the ECU by communicating with the ECU and an external device via the vehicle network have been distributed. In such a vehicle, an unauthorized tool may be connected to the vehicle network, and the ECU may be illegally modified by the unauthorized tool. Therefore, in order to suppress unauthorized modification of the ECU, a technique for monitoring unauthorized rewriting of ECU data has been proposed, as in the vehicle network described in
特許文献1に記載の車両ネットワークは、ECUと外部装置との間の通信の中継を行う中継装置を備え、中継装置が、ECUのリプログラム用フレームが車両ネットワークに送出されたことを検出するとともに、そのフレームが、自装置により送出されたものか否か判定している。そして、中継装置は、自装置が送出していないフレームを、不正ツールから送出されたものとみなして対処している。
The vehicle network described in
上記車両ネットワークでは、中継装置が、中継装置を介する複数の通信経路に送出されたフレームを常時監視する必要があるため、中継装置の処理負荷が高くなり、本来の中継処理の遅延や中継漏れが生じるおそれがある。 In the above vehicle network, since the relay device needs to constantly monitor the frames transmitted to a plurality of communication paths via the relay device, the processing load of the relay device becomes high, and the original relay processing delay and relay omission occur. May occur.
本開示の一局面は、上記実情に鑑みてなされたものであり、中継装置の負荷を抑制しつつ、外部装置から書換え対象までのアクセス経路が正規経路であることを確認可能な車載電子制御装置、車載電子制御装置を備える車載電子制御システム、及び中継装置を提供することを目的とする。 One aspect of the present disclosure has been made in view of the above circumstances, and is an in-vehicle electronic control device capable of confirming that the access route from the external device to the rewrite target is a normal route while suppressing the load on the relay device. , An in-vehicle electronic control system including an in-vehicle electronic control device, and a relay device.
本開示の一局面は、車両ネットワークを構成し、書換え可能なメモリ(25)を有する車載電子制御装置で(20)あって、受信部と、確認部と、を備える。受信部は、自装置に対して車両ネットワーク外の外部装置(70,80)の認証を要求するフレームを認証要求フレームとして、外部装置から車両ネットワークへ送出され、車両ネットワークを構成する中継装置(30,40,50)により中継された認証要求フレームと、中継装置により車両ネットワークへ付与された認証要求フレームの中継経路に関する経路情報と、を受信するように構成されている。確認部は、受信部により受信された経路情報を用いて、外部装置から自装置までのアクセス経路が、車両ネットワークを介した正規の書換え経路である正規経路となっているかを確認するように構成されている。 One aspect of the present disclosure is an in-vehicle electronic control device (20) that constitutes a vehicle network and has a rewritable memory (25), and includes a receiving unit and a confirmation unit. The receiving unit uses a frame that requests the own device to authenticate an external device (70, 80) outside the vehicle network as an authentication request frame, and is sent from the external device to the vehicle network to form a relay device (30) that constitutes the vehicle network. , 40, 50), and the route information regarding the relay route of the authentication request frame given to the vehicle network by the relay device are received. The confirmation unit is configured to use the route information received by the reception unit to confirm whether the access route from the external device to the own device is a regular route that is a regular rewrite route via the vehicle network. Has been done.
本開示の一局面によれば、中継装置により、外部装置から自装置までのフレームの経路情報が車両ネットワークへ付与され、自装置により経路情報が受信される。そして、自装置により、受信した経路情報を用いて、外部装置から自装置までのアクセス経路が正規経路であるか確認される。すなわち、中継装置は経路情報を付与するだけであり、正規経路の確認は書換え対象である車載電子制御装置自身が行う。よって、中継装置の負荷を抑制しつつ、外部装置から書換え対象までのアクセス経路が正規経路であることを確認することができる。 According to one aspect of the present disclosure, the relay device gives the route information of the frame from the external device to the own device to the vehicle network, and the own device receives the route information. Then, the own device confirms whether the access route from the external device to the own device is a normal route by using the received route information. That is, the relay device only adds the route information, and the confirmation of the normal route is performed by the in-vehicle electronic control device itself, which is the target of rewriting. Therefore, it is possible to confirm that the access route from the external device to the rewrite target is a normal route while suppressing the load on the relay device.
また、本開示の他の一局面は、中継装置であって、中継部と、経路付与部と、を備える。中継部は、車両ネットワークを構成し且つ車両ネットワーク外の外部装置によるメモリの書換え対象である装置を対象装置として、外部装置から車両ネットワークへ送出されたフレームを受信して、対象装置へ中継するように構成されている。経路付与部は、中継部によりフレームが中継される際に、フレームの中継経路に関する経路情報を車両ネットワークへ付与するように構成されている。 Further, another aspect of the present disclosure is a relay device, which includes a relay unit and a route giving unit. The relay unit receives a frame sent from the external device to the vehicle network and relays it to the target device, with the device that constitutes the vehicle network and is the target of memory rewriting by an external device outside the vehicle network as the target device. It is configured in. The route assigning unit is configured to impart route information regarding the relay route of the frame to the vehicle network when the frame is relayed by the relay unit.
本開示の他の一局面によれば、フレームが中継される際に、フレームの中継経路に関する経路情報が車両ネットワークへ付与される。これにより、対象装置は、経路情報を受信して、外部装置から対象装置までのアクセス経路が正規経路であるか確認できる。また、中継装置は、経路情報をネットワークへ付与するだけであるため、中継するフレームのアクセス経路を常時監視する場合と比べて、中継装置の負荷を抑制することができる。 According to another aspect of the present disclosure, when the frame is relayed, the route information regarding the relay route of the frame is given to the vehicle network. As a result, the target device can receive the route information and confirm whether the access route from the external device to the target device is a normal route. Further, since the relay device only adds the route information to the network, the load on the relay device can be suppressed as compared with the case where the access route of the relayed frame is constantly monitored.
なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本発明の技術的範囲を限定するものではない。 In addition, the reference numerals in parentheses described in this column and the scope of claims indicate the correspondence with the specific means described in the embodiment described later as one embodiment, and the technical scope of the present invention is defined. It is not limited.
以下、図面を参照しながら、発明を実施するための形態を説明する。
<1.構成>
<1−1.システムの全体構成>
まず、本実施形態に係る車載電子制御システム10の全体構成について、図1を参照して説明する。車載電子制御システム10は、A−ECU20、B−ECU30、DCM−ECU40、及びC−GW50を備える。A−ECU20、B−ECU30、DCM−ECU40、及びC−CW50は、CAN及びEthernet規格の通信線で接続されて車両ネットワークを構成する構成装置、すなわち車両ネットワークのノードである。なお、CAN及びEthernetは登録商標である。
Hereinafter, modes for carrying out the invention will be described with reference to the drawings.
<1. Configuration>
<1-1. Overall system configuration>
First, the overall configuration of the vehicle-mounted
A−ECU20は、エンジンやブレーキなどの車両に搭載された制御対象の制御を行う電子制御装置である。A−ECU20は、CPU23、RAM24、ROM25、及びデータ送受信部22を備えたマイクロコンピュータ21(以下、マイコン21)を主体として構成されている。A−ECU20には、車両ネットワーク上で各ノードを管理するための番号であるノード管理番号として、「0×06」が割り当てられている。
The A-ECU 20 is an electronic control device that controls a controlled object mounted on a vehicle such as an engine or a brake. The A-ECU 20 is mainly composed of a microcomputer 21 (hereinafter referred to as a microcomputer 21) including a
CPU23は、演算装置であり、RAM24は、CPU23の演算結果等を一時記憶するための揮発性メモリである。ROM25は、書換え可能な記憶領域を有する不揮発性メモリであり、例えば、EEPROMである。ROM25には、CPU23により実行されるプログラムが記憶される。データ送受信部22は、車両ネットワークを構成する各装置との間で、通信線を介してデータの送受信を行う。なお、ROM25の構成の詳細については後述する。
The
B−ECU30は、A−ECU20と異なる制御対象を制御する電子御装置であり、A−ECU20と同様にマイクロコンピュータを主体として構成されている。B−ECU30には、ノード管理番号として、「0×05」が割り当てられている。
The B-
DCM−ECU40は、車載通信モジュールを制御対象とする電子制御装置であり、A−ECU20と同様にマイクロコンピュータを主体として構成されている。車載通信モジュールは、車両ネットワーク外の外部装置と無線接続して、データの送受信を行う通信機器である。DCM−ECU40には、ノード管理番号として、「0×03」が割り当てられている。なお、車両ネットワークには、A−ECU20、B−ECU30、DCM−ECU40以外にも、制御対象の異なる各種ECUが含まれている。
The DCM-ECU 40 is an electronic control device that controls an in-vehicle communication module, and is mainly composed of a microcomputer like the A-ECU 20. The in-vehicle communication module is a communication device that wirelessly connects to an external device outside the vehicle network to send and receive data. “0 × 03” is assigned to the DCM-
また、DCM−ECU40は、車載通信モジュールを介して、外部装置であるセンタ80と無線接続してデータの送受信を行う。センタ80は、車両のユーザが、ディーラに車両を持ち込むことなく、車両ネットワーク上のノードに記憶されているプログラムをアップデートできるように設置されている。センタ80は、車両ネットワークのノードに記憶されているプログラムのアップデートが必要になったときに、車両ネットワークを介して、当該ノードへ新しいプログラムを送信して書き換える。また、外部ノードであるセンタ80にも、ノード管理番号として、「0×01」が割り当てられている。
Further, the DCM-ECU 40 wirelessly connects to the
C−GW50は、セントラルゲートウェイであり、CAN規格のネットワークとEthernet規格のネットワークを相互に接続し、車両ネットワーク全体の高速データ通信を実現する機器である。C−CW50には、ノード管理番号として、「0×04」が割り当てられている。 The C-GW 50 is a central gateway, which is a device that interconnects a CAN standard network and an Ethernet standard network to realize high-speed data communication of the entire vehicle network. "0x04" is assigned to the C-CW50 as a node management number.
また、C−CW50は、車両に搭載された外部装置である診断装置70と、CAN及びEthernet規格の通信線で有線接続され、診断装置70と車両ネットワークの各ノードとの間のデータの送受信を中継する。診断装置70は、各ノードから制御対象に関するデータを受信して、車両の診断を行うとともに、診断結果に応じて、車両ネットワークのノードに記憶されているデータを書換える装置である。外部装置である診断装置70にも、ノード管理番号として、「0×02」が割り当てられている。
Further, the C-
本実施形態では、A−ECU20は、メモリの書換え対象である書換えノードであり、特許請求の範囲の車載電子制御装置及び対象装置に相当し、ROM25が書換え可能なメモリに相当する。A−ECU20は、ソフトウェア又はハードウェアを用いた手法により、受信部、確認部、及び認証部の機能を実現する。また、B−ECU30、DCM−ECU40、C−GW50は、外部装置から車両ネットワークへ送出されたフレームを受信して、A−ECU20へ中継する中継ノードであり、特許請求の範囲の中継装置に相当する。B−ECU30、DCM−ECU40、C−GW50は、ソフトウェア又はハードウェアを用いた手法により、中継部、経路付与部、及び否定部の機能を実現する。なお、A−ECU20が中継ノードになり、B−ECU30やDCM−ECU40が書換えノードになることもある。車両ネットワークを構成する各ECUは、中継ノードと書換えノードのどちらにもなり得る。
In the present embodiment, the A-ECU 20 is a rewriting node that is a memory rewriting target, corresponds to an in-vehicle electronic control device and a target device within the scope of claims, and corresponds to a memory in which the
<1−2.書換えノードのROMの構成>
次に、A−ECU20のROM25の構成について、図2及び図3を参照して説明する。ROM25は、書換え可能な記憶領域に、制御プログラム、モード変更フラグ、自ノードのノード管理番号、番号DBの情報が記憶されている。DBはデータベースの略である。
<1-2. ROM configuration of rewrite node>
Next, the configuration of the
制御プログラムは、CPU23に実行されることにより、A−ECU20の制御対象を制御するプログラムである。各種ECUには、それぞれ、各制御対象を制御する制御プログラムが記憶されている。また、自ノードのノード管理番号は、車両ネットワークの各ノードの書換え可能なメモリに記憶されており、外部装置から書換え可能になっている。つまり、車両ネットワークにノードを追加したり、ノードを減らしたりした場合に、各ノードにノード管理番号を新たに割り当てることができるようになっている。
The control program is a program that controls the control target of the A-ECU 20 by being executed by the
モード変更フラグは、ROM25のデータを書き換える2つの書換えモードのうちの一方を有効状態とするフラグである。書換えモードには、システム書換えモードと、単品書換えモードとがある。モード変更フラグがオフの場合には、システム書換えモードが有効状態となり、オンの場合には、単品書換えモードが有効状態となる。
The mode change flag is a flag that enables one of the two rewriting modes for rewriting the data in the
システム書換えモードは、外部装置からA−ECU20へ正規経路でアクセスすることを条件として、外部装置からROM25を書換え可能なモードである。正規経路は、外部装置からA−ECU20までの車両ネットワークを介した正規の書換え経路である。つまり、システム書換えモードでは、外部装置から、どの中継ノードをどういう順序で通って、A−ECU20までデータを送信するか予め設定されている。そして、システム書換えモードでは、外部装置からA−ECU20へデータを送信する経路が正規経路と異なる場合には、外部装置からROM25を書換えできないようになっている。これにより、A−ECU20に不正ツールが直接接続され、不正ツールから車両ネットワークを介さずにA−ECU20に直接アクセスされても、ROM25の不正な書換えが抑制される。
The system rewrite mode is a mode in which the
一方、単品書換えモードは、車両ネットワークを介さずに外部装置とA−ECU20とを直接接続して、外部装置からROM25を書換え可能なモードである。通常、A−ECU20の不正改造を回避するため、システム書換えモードが有効状態にされ、単品書換えモードは無効状態にされる。しかしながら、車両ネットワークからA−ECU20を取り外して、A−ECU20を単品で回収し、工場等でROM25を書換えたい場合がある。そのような場合に、システム書換えモードしかないと、工場等でROM25を書換えることができない。
On the other hand, the single item rewriting mode is a mode in which the
そこで、システム書換えモードに加えて、単品書換えモードを設けておき、A−ECU20を単品で書換える必要がある場合に限って、単品書換えモードを有効状態にする。ただし、モード変更フラグのオフからオンへの書換えは、システム書換えモードが有効状態で、外部装置から正規経路を介してA−ECU20へフラグの変更が要求された場合に限って、可能になっている。つまり、A−ECU20に直接接続された不正ツールが、モード変更フラグをオフからオンに不正に変更して、ROM25を不正に書換えることができないようになっている。
Therefore, in addition to the system rewriting mode, a single item rewriting mode is provided, and the single item rewriting mode is enabled only when it is necessary to rewrite the A-ECU 20 as a single item. However, the rewriting of the mode change flag from off to on is possible only when the system rewrite mode is enabled and the A-ECU 20 is requested to change the flag via the regular route from the external device. There is. That is, an unauthorized tool directly connected to the A-ECU 20 cannot illegally rewrite the
番号DBには、書換え種別に応じた正規経路、第1の鍵情報、第2の鍵情報が記憶されている。詳しくは、図3に示すように、番号DBには、書換え管理番号ごとに、書換え種別、外部装置から書換えノードまでの正規経路、正規経路のノード管理番号、第1の鍵情報、及び第2の鍵情報が記憶されている。番号DBの情報も、外部装置から書換え可能になっている。 The number DB stores a normal route, a first key information, and a second key information according to the rewriting type. Specifically, as shown in FIG. 3, in the number DB, for each rewrite management number, the rewrite type, the regular route from the external device to the rewrite node, the node management number of the regular route, the first key information, and the second Key information is stored. The information in the number DB can also be rewritten from an external device.
書換え種別は、外部装置から車両ネットワークへの接続が無線か、Ethernetを用いた有線か、CANを用いた有線かを示す。外部装置から書換えノードまでの正規経路は、書換え種別ごとの正規経路である。また、正規経路のノード管理番号は、外部装置側を上流として、正規経路の上流から下流へ中継する順番に示された、正規経路の各ノードのノード管理番号である。 The rewriting type indicates whether the connection from the external device to the vehicle network is wireless, wired using Ethernet, or wired using CAN. The regular route from the external device to the rewrite node is a regular route for each rewrite type. Further, the node management number of the regular route is a node management number of each node of the regular route shown in the order of relaying from the upstream to the downstream of the regular route with the external device side as the upstream.
第1の鍵情報は、外部装置の認証を行う際に用いる鍵情報である。また、第2の鍵情報は、直前ノードの認証を行う際に用いる鍵情報である。ここで、所定のノードに対する直前ノードは、所定のノードに通信線で直接接続されており、所定のノードにより受信されるフレームの発信元となるノードである。また、所定のノードに対する直後ノードは、所定のノードに通信線で直接接続されており、所定のノードが発信元となるフレームを受信するノードである。本実施形態では、B−ECU30、C−GW50のいずれかが、A−ECU20の直前ノードになる。なお、直前ノードが直前装置に相当する。
The first key information is the key information used when authenticating the external device. The second key information is the key information used when authenticating the immediately preceding node. Here, the immediately preceding node with respect to the predetermined node is a node that is directly connected to the predetermined node by a communication line and is the source of the frame received by the predetermined node. Further, the immediate node with respect to the predetermined node is a node that is directly connected to the predetermined node by a communication line and receives a frame from which the predetermined node is the source. In this embodiment, either the B-
また、B−ECU30、DCM−ECU40、及びC−GW50にも、書換え種別ごとに、外部装置から自ノードまでの中継経路、中継経路に含まれるノードの管理番号、第1の鍵情報、及び第2の鍵情報が記憶された中継ノード用の番号DBを備える。車両ネットワークの各ノードは、自ノードが書換えノードになったときに用いる書換えノード用の番号DBと、自ノードが中継ノードになった時に用いる中継ノード用の番号DBの両方を備える。
In addition, the B-
<2.処理>
<2−1.認証シーケンス>
次に、書換え対象ノードが外部装置を認証する際の処理の流れについて、図4のシーケンス図を参照して説明する。ここでは、中継ノードが1つで且つモード変更フラグがオフの場合について説明する。すなわち、書換え対象ノードとしてA−ECU20、外部装置として診断装置70、中継ノードとしてC−GW50を想定している。
<2. Processing>
<2-1. Authentication sequence>
Next, the flow of processing when the rewrite target node authenticates the external device will be described with reference to the sequence diagram of FIG. Here, the case where there is one relay node and the mode change flag is off will be described. That is, it is assumed that the A-ECU 20 is the node to be rewritten, the
まず、A1では、外部装置が、中継ノードへ、中継ノードに対して外部装置の認証を要求する認証要求フレームR1、及び外部装置のノード管理番号を送信する。通常、認証要求フレームR1は、フレームのすべてのデータ領域を使っていない。よって、ノード管理番号は、認証要求フレームR1の空いているデータ領域に、データの一部として付与されて送信される。なお、認証要求フレームR1が中継認証フレームに相当する。 First, in A1, the external device transmits the authentication request frame R1 requesting the relay node to authenticate the external device and the node management number of the external device to the relay node. Normally, the authentication request frame R1 does not use the entire data area of the frame. Therefore, the node management number is assigned as a part of the data and transmitted to the vacant data area of the authentication request frame R1. The authentication request frame R1 corresponds to a relay authentication frame.
次にA2では、中継ノードが、受信した外部装置のノード管理番号と、中継ノード用の番号DBとを照合して、直前ノードのノード管理番号が番号DBの情報と一致することを確認する。つまり、中継ノードは、外部装置から自ノードまでのアクセス経路が正規経路であるか確認する。 Next, in A2, the relay node collates the received node management number of the external device with the number DB for the relay node, and confirms that the node management number of the immediately preceding node matches the information in the number DB. That is, the relay node confirms whether the access route from the external device to the own node is a normal route.
続いて、A3では、中継ノードが外部装置へSEEDを送信する。続いて、A4では、外部装置が、暗号化アルゴリズムにより受信したSEEDを暗号化してKEYを生成し、生成したKEYを中継ノードへ送信する。続いて、A5では、中継ノードが、外部装置の認証を行う。詳しくは、中継ノードが、外部装置と同じ暗号化アルゴリズムによりSEEDを暗号化して認証KEYを生成し、生成した認証KEYと受信したKEYとを照合する。続いて、A6では、中継ノードが、認証KEYと受信したKEYとが合致したことにより、認証完了の応答を外部装置へ送信する。 Subsequently, in A3, the relay node transmits SEED to the external device. Subsequently, in A4, the external device encrypts the SEED received by the encryption algorithm to generate a KEY, and transmits the generated KEY to the relay node. Subsequently, in A5, the relay node authenticates the external device. Specifically, the relay node encrypts the SEED by the same encryption algorithm as the external device to generate an authentication KEY, and collates the generated authentication KEY with the received KEY. Subsequently, in A6, the relay node transmits a response of authentication completion to the external device because the authentication KEY and the received KEY match.
次に、A7では、外部装置が、中継ノードへ、書換えノードに対して外部装置の認証を要求する認証要求フレームR2に、外部装置のノード管理番号を付与して送信する。外部装置のノード管理番号は、認証要求フレームR2のデータの一部として付与される。 Next, in A7, the external device transmits to the relay node by assigning the node management number of the external device to the authentication request frame R2 that requests the rewriting node to authenticate the external device. The node management number of the external device is assigned as a part of the data of the authentication request frame R2.
続いて、A8では、中継ノードが、受信した認証要求フレームR2に、自ノードのノード管理番号を付与する。中継ノードのノード管理番号は、認証要求フレームR2に、データの一部として付与される。これにより、図5に示すように、認証要求フレームR2のデータには、書換え管理番号、外部ノードのノード管理番号、及び認証要求フレームR2が通った中継ノードのノード管理番号が含まれる。 Subsequently, in A8, the relay node assigns the node management number of the own node to the received authentication request frame R2. The node management number of the relay node is assigned to the authentication request frame R2 as a part of the data. As a result, as shown in FIG. 5, the data of the authentication request frame R2 includes the rewrite management number, the node management number of the external node, and the node management number of the relay node through which the authentication request frame R2 has passed.
認証要求フレームR2が複数の中継ノードを通過する場合には、認証要求フレームR2が中継ノードを通る都度、中継ノード2、中継ノード3…と、ノード管理番号が順次追加される。認証要求フレームR2に含まれるノード管理番号及びその順序が、外部装置から書換えノードまでの中継経路に関する経路情報となる。この経路情報は、外部に経路情報が漏れないように暗号化されている。つまり、外部装置及び中継ノードは、認証要求フレームR2に暗号化したノード管理番号を付与している。
When the authentication request frame R2 passes through a plurality of relay nodes, each time the authentication request frame R2 passes through the relay node, the
そして、A9では、中継ノードが、自ノードのノード管理番号を付与した認証要求フレームR2を書換えノードへ送信する。
次に、A10では、書換えノードが、認証要求フレームR2に含まれている経路情報を復号化し、復号化した経路情報とROM25の番号DBとを照合して、外部装置から自ノードまでのアクセス経路が正規経路であることを確認する。詳しくは、書換えノードは、直前ノードのノード管理番号、及び中継ノードが認証要求フレームR2を中継した順序の少なくとも一方が、番号DBの情報と一致しているかを確認し、合っていれば正規経路であると判定する。
Then, in A9, the relay node transmits the authentication request frame R2 to which the node management number of the own node is assigned to the rewrite node.
Next, in A10, the rewriting node decodes the route information included in the authentication request frame R2, collates the decoded route information with the number DB of the
続いて、A11では、書換えノードが、正規経路であることを確認したことにより、直前ノードである中継ノードへ、中継ノードに対するSEEDを送信する。続いて、A12では、中継ノードが、受信したSEEDからKEYを生成して、生成したKEYを書換えノードへ送信する。続いて、A13では、書換えノードが、生成した認証KEYと受信したKEYとを照合して、直前ノードである中継ノードの認証を行う。続いて、A14では、書換えノードが、認証KEYと受信したKEYとが合致したことにより、認証完了の応答を中継ノードへ送信する。 Subsequently, in A11, by confirming that the rewriting node is a normal route, the SEED for the relay node is transmitted to the relay node which is the immediately preceding node. Subsequently, in A12, the relay node generates a KEY from the received SEED and transmits the generated KEY to the rewriting node. Subsequently, in A13, the rewriting node collates the generated authentication KEY with the received KEY, and authenticates the relay node which is the immediately preceding node. Subsequently, in A14, the rewriting node transmits a response of authentication completion to the relay node because the authentication KEY and the received KEY match.
続いて、A15では、書換えノードが、中継ノードへ、外部装置に対するSEEDを送信する。続いて、A16では、中継ノードが、受信した外部装置に対するSEEDを、外部装置へ中継する。続いて、A17では、外部装置が、受信したSEEDから書換えノード宛てのKEYを生成し、生成したKEYを中継ノードへ送信する。続いて、A18では、中継ノードが、受信した書換えノード宛てのKEYを、書換えノードへ中継する。 Subsequently, in A15, the rewriting node transmits the SEED to the external device to the relay node. Subsequently, in A16, the relay node relays the received SEED for the external device to the external device. Subsequently, in A17, the external device generates a KEY addressed to the rewriting node from the received SEED, and transmits the generated KEY to the relay node. Subsequently, in A18, the relay node relays the received KEY addressed to the rewrite node to the rewrite node.
続いて、A19では、書換えノードが、生成した認証KEYと受信したKEYとを照合して、外部装置の認証を行う。続いて、A20では、書換えノードが、認証KEYと受信したKEYとが合致したことにより、外部装置に対する認証完了の応答を、中継ノードへ送信する。続いて、A21では、中継ノードが、受信した外部装置に対する認証完了の応答を、外部装置へ中継する。 Subsequently, in A19, the rewriting node collates the generated authentication KEY with the received KEY to authenticate the external device. Subsequently, in A20, the rewriting node transmits the authentication completion response to the external device to the relay node because the authentication KEY and the received KEY match. Subsequently, in A21, the relay node relays the received authentication completion response to the external device to the external device.
この後、外部装置から書換えノードへ、書換え処理用の複数の処理要求フレームが順次送信される。複数の処理要求フレームは、書換え対象であるデータの消去を要求する消去要求フレームや、消去後のメモリ領域にデータの書込みを要求する書込み要求フレームである。 After that, a plurality of processing request frames for rewriting processing are sequentially transmitted from the external device to the rewriting node. The plurality of processing request frames are an erasure request frame that requests erasure of the data to be rewritten and a write request frame that requests the writing of data to the memory area after erasure.
なお、中継ノードが複数ある場合は、中継ノード同士のフレームのやり取りが増えるが、中継ノード同士のやり取りは、中継ノードと書換え対象ノードとのフレームのやり取りと同じである。例えば、中継ノードが2個であった場合、図4のシーケンス図において、書換え対象ノードが中継ノードになり、その下流に書換え対象ノードが増える。そして、認証要求フレームR2は下流側の中継ノードに対する認証要求フレームになり、書換えノードに対する認証要求フレームR3は、A21の後、外部装置から中継ノードへ送信される。そして、認証要求フレームR3に、2つの中継ノードのノード管理番号が付与されて、書換え対象ノードに送信される。書換え対象ノードは、ノード管理番号の確認、直前ノードの認証、及び外部装置の認証を行う。 When there are a plurality of relay nodes, the exchange of frames between the relay nodes increases, but the exchange between the relay nodes is the same as the exchange of frames between the relay node and the node to be rewritten. For example, when there are two relay nodes, in the sequence diagram of FIG. 4, the rewrite target node becomes the relay node, and the rewrite target node increases downstream thereof. Then, the authentication request frame R2 becomes an authentication request frame for the relay node on the downstream side, and the authentication request frame R3 for the rewrite node is transmitted from the external device to the relay node after A21. Then, the node management numbers of the two relay nodes are assigned to the authentication request frame R3 and transmitted to the rewrite target node. The node to be rewritten confirms the node management number, authenticates the immediately preceding node, and authenticates the external device.
<2−2.認証要求フレームの中継処理>
次に、中継ノードが実行する、書換えノードに対する認証要求フレームR2の中継処理の処理手順について、図6のフローチャートを参照して説明する。ここでは、中継ノードが1つの場合における中継処理の処理手順について説明する。
<2-2. Relay processing of authentication request frame>
Next, the processing procedure of the relay processing of the authentication request frame R2 for the rewrite node, which is executed by the relay node, will be described with reference to the flowchart of FIG. Here, the processing procedure of the relay processing when there is one relay node will be described.
まず、S10では、自ノード宛ての認証要求フレームR1を受信したか否か判定する。S10において、認証要求フレームR1を受信していない場合は、否定判定をしてS20へ進む。S20では、自ノードよりも下流側のノード(以下、配下ノード)宛ての認証要求フレームR2を受信したか否か判定する。ここでは、配下ノードは書換えノードである。S20において、認証要求フレームR2を受信していない場合は、否定判定をしてS10に戻る。一方、S20において、認証要求フレームR2を受信している場合、すなわち、自ノードが外部装置を認証する前に、外部装置から配下ノードに対して認証要求フレームR2が送信された場合には、予め決められている手順と異なり、不正ツールからアクセスされている可能性がある。よって、S30に進み、認証を拒否する否定応答を外部装置へ送信する。 First, in S10, it is determined whether or not the authentication request frame R1 addressed to the own node has been received. If the authentication request frame R1 has not been received in S10, a negative determination is made and the process proceeds to S20. In S20, it is determined whether or not the authentication request frame R2 addressed to the node downstream of the own node (hereinafter, the subordinate node) has been received. Here, the subordinate node is a rewrite node. If the authentication request frame R2 has not been received in S20, a negative determination is made and the process returns to S10. On the other hand, in S20, when the authentication request frame R2 is received, that is, when the authentication request frame R2 is transmitted from the external device to the subordinate node before the own node authenticates the external device, the authentication request frame R2 is transmitted in advance. It may be accessed by a rogue tool, unlike the routine procedure. Therefore, the process proceeds to S30, and a negative response for rejecting the authentication is transmitted to the external device.
また、S10において、認証要求フレームR1を受信している場合は、肯定判定をしてS40へ進む。S40では、外部装置のノード管理番号を確認し、中継用の番号DBの情報と一致しているか否か判定する。S40において、一致していない場合は、否定判定をしてS30に進み、否定応答を外部装置へ送信する。一方、S40において、一致している場合は、肯定判定をしてS50に進む。S50では、外部装置へSEEDを送信し、外部装置からKEYを受信して、外部装置の認証を行う。 Further, in S10, when the authentication request frame R1 is received, an affirmative determination is made and the process proceeds to S40. In S40, the node management number of the external device is confirmed, and it is determined whether or not the information matches the information in the relay number DB. If they do not match in S40, a negative determination is made, the process proceeds to S30, and a negative response is transmitted to the external device. On the other hand, in S40, if they match, a positive determination is made and the process proceeds to S50. In S50, SEED is transmitted to the external device, KEY is received from the external device, and the external device is authenticated.
続いて、S60では、外部装置の認証を完了したか否か判定する。S60において、外部装置を認証できていない場合は、否定判定をしてS30に進み、否定応答を外部装置へ送信する。一方、S60において、外部装置を認証できている場合は、肯定判定をしてS70に進み、認証完了の応答を外部装置へ送信する。 Subsequently, in S60, it is determined whether or not the authentication of the external device is completed. If the external device cannot be authenticated in S60, a negative determination is made, the process proceeds to S30, and a negative response is transmitted to the external device. On the other hand, in S60, if the external device can be authenticated, an affirmative determination is made, the process proceeds to S70, and the authentication completion response is transmitted to the external device.
続いて、S80では、配下ノード宛ての認証要求フレームR2を受信したか否か判定する。S80において、認証要求フレームR2を受信していない場合は、否定判定をして受信するまで待機する。一方、S80において、認証要求フレームR2を受信している場合は、肯定判定をしてS90へ進む。 Subsequently, in S80, it is determined whether or not the authentication request frame R2 addressed to the subordinate node has been received. If the authentication request frame R2 has not been received in S80, a negative determination is made and the device waits until it is received. On the other hand, in S80, when the authentication request frame R2 is received, an affirmative determination is made and the process proceeds to S90.
S90では、認証要求フレームR2に自ノードのノード管理番号を付与する。続いて、S100では、ノード管理番号を付与した認証要求フレームR2を配下ノードへ中継する。 In S90, the node management number of the own node is assigned to the authentication request frame R2. Subsequently, in S100, the authentication request frame R2 to which the node management number is assigned is relayed to the subordinate node.
続いて、S110では、配下ノードから自ノードに対するSEEDを受信し、KEYを生成して、生成したKEYを配下ノードへ送信する。
続いて、S120では、配下ノードから自ノードに対する認証完了の応答を受信したか否か判定する。S120において、認証完了の応答を受信していない場合は、否定判定をして受信するまで待機する。一方、S120において、認証完了の応答を受信している場合は、肯定判定をしてS130へ進む。
Subsequently, in S110, the SEED for the own node is received from the subordinate node, a KEY is generated, and the generated KEY is transmitted to the subordinate node.
Subsequently, in S120, it is determined whether or not a response of authentication completion to the own node has been received from the subordinate node. If the authentication completion response is not received in S120, a negative determination is made and the process waits until it is received. On the other hand, if the authentication completion response is received in S120, an affirmative determination is made and the process proceeds to S130.
S130では、配下ノードから外部装置に対するSEEDを受信して外部装置へ中継するとともに、外部装置から配下ノードに対するKEYを受信して配下ノードへ中継する。
続いて、S140では、配下ノードから外部装置に対する認証完了の応答を受信したか否か判定する。S140において、認証完了の応答を受信していない場合は、否定判定をして受信するまで待機する。一方、S140において、認証完了の応答を受信している場合は、認証完了の応答を外部装置へ中継する。以上で本処理を終了する。
In S130, the SEED for the external device is received from the subordinate node and relayed to the external device, and the KEY for the subordinate node is received from the external device and relayed to the subordinate node.
Subsequently, in S140, it is determined whether or not a response of authentication completion to the external device has been received from the subordinate node. If the authentication completion response is not received in S140, a negative determination is made and the process waits until the response is received. On the other hand, in S140, when the authentication completion response is received, the authentication completion response is relayed to the external device. This is the end of this process.
以上説明したように、中継ノードは、外部装置から自ノードまでのアクセス経路が正規経路であることを確認して、外部装置の認証を行うとともに、自ノードの直後ノードから認証を受け、配下ノードと外部装置との間のフレームのやり取りを中継する。ここで、中継ノードが複数存在する場合、最上流の中継ノードは、S150の処理を実行した後、S80〜S100及びS130〜S150の処理、つまりフレームの中継を繰り返し実行すればよい。下流側の中継ノードの処理については後述する。 As described above, the relay node confirms that the access route from the external device to the own node is a normal route, authenticates the external device, and receives authentication from the node immediately after the own node, and the subordinate node. Relays the exchange of frames between and the external device. Here, when a plurality of relay nodes exist, the most upstream relay node may repeatedly execute the processes of S80 to S100 and S130 to S150, that is, the relay of the frame, after executing the process of S150. The processing of the relay node on the downstream side will be described later.
なお、本実施形態では、S10〜S30の処理を実行することにより実現される機能が、否定部に相当し、S90の処理を実行することにより実現される機能が経路付与部に相当する。また、S100の処理を実行することにより実現される機能が中継部に相当する。 In the present embodiment, the function realized by executing the processes of S10 to S30 corresponds to the negative unit, and the function realized by executing the process of S90 corresponds to the route giving unit. Further, the function realized by executing the process of S100 corresponds to the relay unit.
<2−3.外部装置の認証処理>
次に、書換えノードが実行する、外部装置の認証処理の処理手順について、図7を参照して説明する。
<2-3. External device authentication process>
Next, the processing procedure of the authentication process of the external device executed by the rewriting node will be described with reference to FIG. 7.
まず、S200では、自ノード宛ての認証要求フレームR2を受信したか否か判定する。S200において、認証要求フレームR2を受信していない場合は、否定判定をして受信するまで待機する。S200において、認証要求フレームR2を受信している場合は、肯定判定をしてS210へ進む。 First, in S200, it is determined whether or not the authentication request frame R2 addressed to the own node has been received. If the authentication request frame R2 has not been received in S200, a negative determination is made and the device waits until it is received. If the authentication request frame R2 is received in S200, an affirmative determination is made and the process proceeds to S210.
S210では、変更モードフラグがオンか否か判定する。S210において、変更モードフラグがオンの場合、すなわち単品書換えモードが有効状態の場合、肯定判定をし、正規経路の確認を飛ばしてS270へ進む。一方、S210において、変更モードフラグがオフの場合、すなわちシステム書換えモードが有効状態の場合、否定判定をしてS220へ進む。 In S210, it is determined whether or not the change mode flag is on. In S210, when the change mode flag is on, that is, when the single item rewrite mode is enabled, an affirmative determination is made, confirmation of the normal route is skipped, and the process proceeds to S270. On the other hand, in S210, when the change mode flag is off, that is, when the system rewrite mode is in the enabled state, a negative determination is made and the process proceeds to S220.
S220では、直前ノードのノード管理番号及び中継ノードの順序の少なくとも一方が、番号DBの情報と一致しているかを確認して、外部装置から自ノードまでのアクセス経路が正規経路か否か判定する。S220において、正規経路でないと判定した場合はS230へ進み、否定応答を直前ノードへ送信する。一方、S220において、正規経路であると判定した場合はS240へ進む。 In S220, it is confirmed whether at least one of the node management number of the immediately preceding node and the order of the relay nodes match the information in the number DB, and it is determined whether the access route from the external device to the own node is a normal route. .. If it is determined in S220 that the route is not a normal route, the process proceeds to S230 and a negative response is transmitted to the immediately preceding node. On the other hand, if it is determined in S220 that the route is a normal route, the process proceeds to S240.
S240では、直前ノードへSEEDを送信し、直前ノードからKEYを受信して、直前ノードの認証を行う。続いて、S250では、直前ノードの認証を完了したか否か判定する。S250において、直前ノードを認証できていない場合は、否定判定をしてS230へ進み、否定応答を直前ノードへ送信する。一方、S250において、直前ノードを認証できている場合は、肯定判定をしてS260へ進み、認証完了の応答を直前ノードへ送信する。 In S240, SEED is transmitted to the immediately preceding node, KEY is received from the immediately preceding node, and the immediately preceding node is authenticated. Subsequently, in S250, it is determined whether or not the authentication of the immediately preceding node is completed. If the immediately preceding node cannot be authenticated in S250, a negative determination is made, the process proceeds to S230, and a negative response is transmitted to the immediately preceding node. On the other hand, in S250, if the immediately preceding node can be authenticated, an affirmative determination is made, the process proceeds to S260, and the authentication completion response is transmitted to the immediately preceding node.
続いて、S270では、外部装置に対するSEEDを直前ノードへ送信し、直前ノードから外部装置で生成されたKEYを受信して、外部装置の認証を行う。
続いて、S280では、外部装置の認証を完了したか否か判定する。S280において、外部装置を認証できていない場合は、認証できるまで待機する。一方、S280において、外部装置を認証できている場合は、肯定判定をしてS290に進み、外部装置に対する認証完了の応答を直前ノードへ送信する。以上で本処理を終了する。
Subsequently, in S270, the SEED for the external device is transmitted to the immediately preceding node, the KEY generated by the external device is received from the immediately preceding node, and the external device is authenticated.
Subsequently, in S280, it is determined whether or not the authentication of the external device is completed. In S280, if the external device cannot be authenticated, it waits until it can be authenticated. On the other hand, in S280, if the external device can be authenticated, an affirmative determination is made, the process proceeds to S290, and the authentication completion response to the external device is transmitted to the immediately preceding node. This is the end of this process.
以上説明したように、書換えノードは、外部装置から自ノードまでのアクセス経路が正規経路であることを確認して、直前ノードの認証を行った後、外部装置の認証を行う。ここで、中継装置が複数存在する場合は、下流側の中継ノードは、S10〜S30の処理を実行した後、S220〜S290の処理を実行し、その後、S80〜S150の処理を実行すればよい。 As described above, the rewriting node confirms that the access route from the external device to the own node is a normal route, authenticates the immediately preceding node, and then authenticates the external device. Here, when a plurality of relay devices exist, the relay node on the downstream side may execute the processes of S10 to S30, then the processes of S220 to S290, and then execute the processes of S80 to S150. ..
なお、本実施形態において、S200の処理を実行することにより実現される機能が受信部に相当し、S220の処理を実行することにより実現される機能が確認部に相当する。また、S230〜S260の処理を実行することにより実現される機能が認証部に相当する。 In the present embodiment, the function realized by executing the process of S200 corresponds to the receiving unit, and the function realized by executing the process of S220 corresponds to the confirmation unit. Further, the function realized by executing the processes of S230 to S260 corresponds to the authentication unit.
<3.効果>
以上詳述した第1実施形態によれば、以下の効果が得られる。
(1)中継ノードにより、外部装置から書換えノードまでのフレームの経路情報が車両ネットワークへ付与され、書換えノードにより経路情報が受信される。そして、書換えノードにより、受信された経路情報を用いて、外部装置から書換えノードまでのアクセス経路が正規経路であるか確認される。すなわち、中継ノードは経路情報を付与するだけであり、アクセス経路が正規経路であることの確認は書換えノード自身が行う。よって、中継ノードの負荷を抑制しつつ、外部装置から正規経路でアクセスされていることを確認することができる。
<3. Effect>
According to the first embodiment described in detail above, the following effects can be obtained.
(1) The relay node gives the route information of the frame from the external device to the rewriting node to the vehicle network, and the rewriting node receives the route information. Then, the rewrite node confirms whether the access route from the external device to the rewrite node is a normal route by using the received route information. That is, the relay node only adds route information, and the rewriting node itself confirms that the access route is a normal route. Therefore, it is possible to confirm that the access is performed by the regular route from the external device while suppressing the load on the relay node.
(2)書換えノードの直前ノードの管理番号、及び中継ノードによる認証要求フレームの中継順序情報のうちの少なくとも一方を用いれば、外部装置から書換えノードへのアクセス経路が正規経路かを確認することができる。 (2) By using at least one of the management number of the node immediately before the rewrite node and the relay order information of the authentication request frame by the relay node, it is possible to confirm whether the access route from the external device to the rewrite node is a normal route. it can.
(3)書換えノードが、アクセス経路が正規経路であることを確認した後に、直前ノードの個別認証を実施し、直前ノードが正規の中継ノードであることを確認することで、書換えノードに対するアクセスの信頼性をより高くすることができる。 (3) After confirming that the access route is a regular route, the rewriting node performs individual authentication of the immediately preceding node and confirms that the immediately preceding node is a legitimate relay node to access the rewriting node. It can be more reliable.
(4)認証要求フレームにデータの一部として経路情報を付加することにより、経路情報のために専用のフレームを設ける必要がない。ひいては、外部装置のシーケンスを変更する必要がない。 (4) By adding the route information to the authentication request frame as a part of the data, it is not necessary to provide a dedicated frame for the route information. As a result, there is no need to change the sequence of the external device.
(5)書換え種別に応じて、複数の正規経路が存在する場合にも、各正規経路に対応したノード管理番号が記憶されている番号DBを備えていることにより、番号DBと経路情報とを照合して、アクセス経路が正規経路であるかを確認することができる。 (5) Even if there are a plurality of regular routes according to the rewriting type, the number DB and the route information can be stored by providing the number DB in which the node management number corresponding to each regular route is stored. It is possible to confirm whether the access route is a regular route by collating.
(6)システム書換えモードだけでなく、単品書換えモードが設定されていることにより、単品書換えモードを有効状態にすると、A−ECU20を車両ネットワークから取り外して単品で回収した場合でも、A−ECU20のROM25を書換えることができる。また、外部装置から正規経路でアクセスされている場合に限って、システム書換えモードの有効状態から単品書換えモードの有効状態へ、モード変更フラグが変更される。これにより、不正なアクセスで単品書換えモードが有効状態にされることを抑制でき、ひいては、ROM25の不正な書換えを抑制できる。
(6) When the single item rewrite mode is enabled because not only the system rewrite mode but also the single item rewrite mode is set, even if the A-ECU 20 is removed from the vehicle network and collected as a single item, the A-ECU 20 The
(7)各ノードのノード管理番号が書換え可能となっているため、拡張性や柔軟性に優れた車載電子制御システム10を構築することができる。
(8)中継ノードにより、自ノードに対して外部装置の認証を要求する認証要求フレームR1が受信される前に、書換えノードに対する認証要求フレームR2が受信された場合には、正規の手順と異なるため、中継ノードから外部装置へ認証を否定する否定応答が送信される。これにより、正規の手順と異なる不正なアクセスを検知して拒否することができる。
(7) Since the node management number of each node can be rewritten, it is possible to construct an in-vehicle
(8) If the relay node receives the authentication request frame R2 for the rewrite node before the authentication request frame R1 for requesting the authentication of the external device to the local node is received, the procedure differs from the normal procedure. Therefore, a negative response denying authentication is sent from the relay node to the external device. This makes it possible to detect and deny unauthorized access that differs from the legitimate procedure.
(他の実施形態)
以上、本発明を実施するための形態について説明したが、本発明は上述の実施形態に限定されることなく、種々変形して実施することができる。
(Other embodiments)
Although the embodiment for carrying out the present invention has been described above, the present invention is not limited to the above-described embodiment and can be implemented in various modifications.
(a)上記実施形態では、書換えノードに対する外部装置の認証要求フレームR2に経路情報が付与されたが、外部装置の認証後に、外部装置から書換えノードに対して送信される複数の処理要求フレームの少なくとも一つにも、経路情報を付与してもよい。これにより、書換えノードは、認証要求時だけでなく、書換え処理中の消去要求時や書込み要求時にも、経路情報受信する都度、外部装置から自ノードまでのアクセス経路が正規経路であるかを確認することができる。ひいては、外部装置の認識後に不正なアクセスを受けても、不正なアクセスを検知して、不正な書換えを抑制することができる。 (A) In the above embodiment, the route information is given to the authentication request frame R2 of the external device for the rewrite node, but after the authentication of the external device, a plurality of processing request frames transmitted from the external device to the rewrite node. Route information may be added to at least one. As a result, the rewrite node confirms whether the access route from the external device to the own node is a normal route each time it receives route information not only when an authentication request is made but also when an erase request or write request is made during the rewrite process. can do. As a result, even if an unauthorized access is received after the external device is recognized, the unauthorized access can be detected and the unauthorized rewriting can be suppressed.
(b)各ノードに割り当てられているノード管理番号として、車両ネットワーク上において各ノード及び外部装置を識別するために、各ノード及び外部装置に予め割り当てられている識別番号、例えばCAN通信用の識別番号を用いてもよい。このようにすれば、ノード管理番号を別途割り当てる必要がない。 (B) As a node management number assigned to each node, an identification number assigned in advance to each node and the external device in order to identify each node and the external device on the vehicle network, for example, identification for CAN communication. Numbers may be used. In this way, there is no need to assign a node management number separately.
(c)上記実施形態のように、中継ノードも、外部装置から自ノードまでのアクセス経路が正規経路であるか確認する方が好ましいが、中継ノードは正規経路の確認をしなくてもよい。少なくとも書換えノードが正規経路の確認をすればよい。 (C) As in the above embodiment, it is preferable that the relay node also confirms whether the access route from the external device to the own node is a regular route, but the relay node does not have to confirm the regular route. At least the rewrite node should confirm the normal route.
(d)書換えモードとして、システム書換えモードと単品書換えモードの両方ある方が好ましいが、単品書換えモードはなくてもよい。この場合、モード変更フラグはROM25に記憶されていなくてよい。
(D) As the rewriting mode, it is preferable to have both the system rewriting mode and the single item rewriting mode, but the single item rewriting mode may not be provided. In this case, the mode change flag does not have to be stored in the
(e)ノード管理番号は、認証要求フレームR1,R2のデータの一部として付加することが好ましいが、認証要求フレームとは別に、ノード管理番号を送信する専用フレームを設けて、ノード管理番号を送信してもよい。 (E) The node management number is preferably added as a part of the data of the authentication request frames R1 and R2, but a dedicated frame for transmitting the node management number is provided separately from the authentication request frame to set the node management number. You may send it.
(f)上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。なお、特許請求の範囲に記載した文言のみによって特定される技術思想に含まれるあらゆる態様が本発明の実施形態である。 (F) A plurality of functions possessed by one component in the above embodiment may be realized by a plurality of components, or one function possessed by one component may be realized by a plurality of components. .. Further, a plurality of functions possessed by the plurality of components may be realized by one component, or one function realized by the plurality of components may be realized by one component. Further, a part of the configuration of the above embodiment may be omitted. In addition, at least a part of the configuration of the above embodiment may be added or replaced with the configuration of the other above embodiment. It should be noted that all aspects included in the technical idea specified only by the wording described in the claims are embodiments of the present invention.
(g)上述した車載電子制御装置、車載電子制御システム、及び中継装置の他、車載電子制御装置又は中継装置としてコンピュータを機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実態的記録媒体など、種々の形態で本発明を実現することもできる。 (G) In addition to the above-mentioned in-vehicle electronic control device, in-vehicle electronic control system, and relay device, a program for operating a computer as an in-vehicle electronic control device or relay device, and a non-transitional actual state such as a semiconductor memory in which this program is recorded. The present invention can also be realized in various forms such as a target recording medium.
10…車載電子制御システム、20…A−ECU、25…ROM、30…B−ECU、40…DCM−ECU、50…C−GW、70…診断装置、80…センタ。 10 ... In-vehicle electronic control system, 20 ... A-ECU, 25 ... ROM, 30 ... B-ECU, 40 ... DCM-ECU, 50 ... C-GW, 70 ... Diagnostic device, 80 ... Center.
Claims (12)
自装置に対して前記車両ネットワーク外の外部装置(70,80)の認証を要求するフレームを認証要求フレームとして、前記外部装置から前記車両ネットワークへ送出され、前記車両ネットワークを構成する中継装置(30,40,50)により中継された前記認証要求フレームと、前記中継装置により前記車両ネットワークへ付与された前記認証要求フレームの中継経路に関する経路情報と、を受信するように構成された受信部(S210)と、
前記受信部により受信された前記経路情報を用いて、前記外部装置から前記自装置までのアクセス経路が、前記車両ネットワークを介した正規の書換え経路である正規経路となっているかを確認するように構成された確認部(S220)と、を備え、
前記確認部により前記アクセス経路が正規経路と異なると確認された場合は、前記メモリの書換えを禁止し、前記確認部により前記アクセス経路が正規経路であると確認された場合は、前記外部装置から前記メモリの書換え処理のための処理要求フレームを受信する、
車載電子制御装置。 It is an in-vehicle electronic control device (20) that constitutes a vehicle network and has a rewritable memory (25).
A relay device (30) that is sent from the external device to the vehicle network and constitutes the vehicle network, using a frame that requests the own device to authenticate an external device (70, 80) outside the vehicle network as an authentication request frame. , 40, 50), and a receiving unit (S210) configured to receive the authentication request frame relayed by the relay device and the route information regarding the relay route of the authentication request frame given to the vehicle network by the relay device. )When,
Using the route information received by the receiving unit, it is confirmed whether the access route from the external device to the own device is a regular route which is a regular rewriting route via the vehicle network. configured confirmation unit and (S220), the Bei example,
When the confirmation unit confirms that the access route is different from the normal route, rewriting of the memory is prohibited, and when the confirmation unit confirms that the access route is a normal route, the external device Receives a processing request frame for the memory rewriting process.
In-vehicle electronic control device.
前記経路情報は、前記直前装置に割り当てられた管理番号、及び前記中継経路において前記中継装置が前記認証要求フレームを中継した順序を示す順序情報のうちの少なくとも一方である、請求項1に記載の車載電子制御装置。 The relay device, which is directly connected to the own device by a communication line and is the source of the authentication request frame received by the receiving unit, is used as the immediately preceding device.
The route information according to claim 1, wherein the route information is at least one of a control number assigned to the immediately preceding device and order information indicating the order in which the relay device relays the authentication request frame in the relay route. In-vehicle electronic control device.
前記確認部による前記正規経路となっているかの確認の後に、前記直前装置の認証を実施するように構成された認証部(S230〜S260)を更に備える、請求項1又は2に記載の車載電子制御装置。 The relay device, which is directly connected to the own device by a communication line and is the source of the authentication request frame received by the receiving unit, is used as the immediately preceding device.
The in-vehicle electronic device according to claim 1 or 2, further comprising an authentication unit (S230 to S260) configured to authenticate the immediately preceding device after confirmation by the confirmation unit whether the route is the normal route. Control device.
前記確認部は、前記受信部で受信された前記経路情報を復号し、復号化した前記経路情報を用いるように構成されている、請求項1〜4のいずれか1項に記載の車載電子制御装置。 The route information is encrypted and
The vehicle-mounted electronic control according to any one of claims 1 to 4, wherein the confirmation unit is configured to decode the route information received by the reception unit and use the decoded route information. apparatus.
複数種類の前記外部装置のそれぞれから前記自装置までの複数の前記正規経路のそれぞれに対応付けて、前記正規経路に含まれる前記中継装置の前記管理番号が記憶されている番号データベースを更に備え、
前記確認部は、前記経路情報に含まれた前記管理番号と、前記番号データベースに記憶されている前記管理番号とを照合して、前記アクセス経路が前記正規経路となっているかを確認するように構成されている、請求項1〜5のいずれか1項に記載の車載電子制御装置。 The route information includes a control number assigned to the relay device on the relay route.
A number database in which the control number of the relay device included in the regular route is stored in association with each of the plurality of regular routes from each of the plurality of types of external devices to the own device is further provided.
The confirmation unit collates the control number included in the route information with the control number stored in the number database to confirm whether the access route is the regular route. The vehicle-mounted electronic control device according to any one of claims 1 to 5, which is configured.
前記確認部は、前記受信部により前記経路情報が受信される都度、受信された前記経路情報を用いて、前記アクセス経路が前記正規経路となっているかを確認するように構成されている、請求項1〜6のいずれか1項に記載の車載電子制御装置。 The receiving unit is further transmitted from the external device to the vehicle network and relayed by the relay device to a plurality of processing request frames for rewriting processing of the memory, and is given to the vehicle network by the relay device. It is configured to receive at least one of the route information of the plurality of processing request frames.
The claim unit is configured to confirm whether or not the access route is the normal route by using the received route information each time the route information is received by the receiving unit. Item 4. The in-vehicle electronic control device according to any one of Items 1 to 6.
前記メモリには、前記単品書換えモード及び前記システム書換えモードのうちの一方を有効状態とするフラグが記憶されており、
前記メモリに記憶されているフラグは、前記システム書換えモードが有効状態で、前記外部装置から前記正規経路を介して前記フラグの変更が要求されたことを条件として、前記システム書換えモードの有効状態から前記単品書換えモードの有効状態へ変更される、請求項1〜7のいずれか1項に記載の車載電子制御装置。 The external device and the own device are directly connected without going through the vehicle network, and the memory can be rewritten from the external device in a single item rewriting mode, and the external device accesses the own device by the regular route. On condition that, the system rewrite mode in which the memory can be rewritten is set.
In the memory, a flag for enabling one of the single item rewriting mode and the system rewriting mode is stored.
The flag stored in the memory can be changed from the active state of the system rewrite mode on condition that the system rewrite mode is enabled and the change of the flag is requested from the external device via the regular route. The in-vehicle electronic control device according to any one of claims 1 to 7, wherein the single item rewriting mode is changed to an effective state.
前記車両ネットワークを構成する装置を構成装置として、前記構成装置のそれぞれには、管理番号が割り当てられており、
前記管理番号は、対応する前記構成装置の書換え可能なメモリに記憶されており、前記外部装置から書換え可能になっている、車載電子制御システム。 An in-vehicle electronic control system including the in-vehicle electronic control device according to any one of claims 1 to 8 and the relay device that constitutes the vehicle network together with the in-vehicle electronic control device.
A control number is assigned to each of the constituent devices, with the devices constituting the vehicle network as constituent devices.
An in-vehicle electronic control system in which the control number is stored in a rewritable memory of the corresponding component device and can be rewritten from the external device.
前記外部装置から当該中継装置に対して認証を要求するフレームを中継認証フレームとして、前記中継認証フレームと、前記車載電子制御装置に対する前記認証要求フレームと、を受信するように構成された中継部(S100)と、
前記中継部により、前記中継認証フレームが受信されるよりも前に、前記認証要求フレームが受信された場合に、前記外部装置の認証を否定する否定応答を前記外部装置へ送信するように構成された否定部(S10〜S30)と、を備える、請求項9に記載の車載電子制御システム。 The relay device
A relay unit configured to receive the relay authentication frame and the authentication request frame for the in-vehicle electronic control device, using the frame for requesting authentication from the external device to the relay device as the relay authentication frame. S100) and
The relay unit is configured to transmit a negative response denying the authentication of the external device to the external device when the authentication request frame is received before the relay authentication frame is received. The vehicle-mounted electronic control system according to claim 9, further comprising a negative unit (S10 to S30).
前記管理番号として前記識別番号を用いる、請求項9及び10に記載の車載電子制御システム。 An identification number for identifying each of the constituent devices on the vehicle network is assigned to the constituent device in advance.
The vehicle-mounted electronic control system according to claims 9 and 10, wherein the identification number is used as the control number.
前記中継部により前記フレームが中継される際に、前記フレームの中継経路に関する経路情報を前記車両ネットワークへ送出するように構成された経路付与部(S90)と、を備え、
前記対象装置に対して前記外部装置の認証を要求するフレームを認証要求フレームとし、自装置に対して前記外部装置の認証を要求するフレームを中継認証フレームとして、
前記中継部は、前記認証要求フレームと、前記中継認証フレームと、を受信するように構成されており、
前記中継部により、前記中継認証フレームが受信されるよりも前に、前記認証要求フレームが受信された場合に、前記外部装置の認証を否定する否定応答を前記外部装置へ送信するように構成された否定部(S10〜S30)、を備える、中継装置。 A device that constitutes a vehicle network and is a memory rewriting target by an external device outside the vehicle network is set as a target device, and a frame transmitted from the external device to the vehicle network is received and relayed to the target device. The relay unit (S100) configured in
When the frame is relayed by the relay unit, a route assigning unit (S90) configured to transmit route information regarding the relay route of the frame to the vehicle network is provided.
A frame that requests the target device to authenticate the external device is used as an authentication request frame, and a frame that requests the own device to authenticate the external device is used as a relay authentication frame.
The relay unit is configured to receive the authentication request frame and the relay authentication frame.
The relay unit is configured to transmit a negative response denying the authentication of the external device to the external device when the authentication request frame is received before the relay authentication frame is received. A relay device including a negative unit (S10 to S30) .
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016235296A JP6769270B2 (en) | 2016-12-02 | 2016-12-02 | In-vehicle electronic control device, in-vehicle electronic control system, relay device |
DE102017221335.3A DE102017221335A1 (en) | 2016-12-02 | 2017-11-28 | VEHICLE INTERNAL ELECTRONIC CONTROL UNIT, VEHICLE INTERNAL ELECTRONIC CONTROL SYSTEM AND REPEATER |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016235296A JP6769270B2 (en) | 2016-12-02 | 2016-12-02 | In-vehicle electronic control device, in-vehicle electronic control system, relay device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018093370A JP2018093370A (en) | 2018-06-14 |
JP6769270B2 true JP6769270B2 (en) | 2020-10-14 |
Family
ID=62163873
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016235296A Active JP6769270B2 (en) | 2016-12-02 | 2016-12-02 | In-vehicle electronic control device, in-vehicle electronic control system, relay device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6769270B2 (en) |
DE (1) | DE102017221335A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6969528B2 (en) * | 2018-09-25 | 2021-11-24 | 株式会社オートネットワーク技術研究所 | Relay system |
JP2020050048A (en) | 2018-09-25 | 2020-04-02 | 株式会社オートネットワーク技術研究所 | Relay device system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4805115B2 (en) * | 2006-12-11 | 2011-11-02 | 日本電信電話株式会社 | Data distribution method and relay device |
JP5776561B2 (en) * | 2012-01-17 | 2015-09-09 | 株式会社デンソー | Relay device |
JP6310874B2 (en) * | 2015-03-12 | 2018-04-11 | 株式会社日立製作所 | Incident detection system |
-
2016
- 2016-12-02 JP JP2016235296A patent/JP6769270B2/en active Active
-
2017
- 2017-11-28 DE DE102017221335.3A patent/DE102017221335A1/en active Pending
Also Published As
Publication number | Publication date |
---|---|
DE102017221335A1 (en) | 2018-06-07 |
JP2018093370A (en) | 2018-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11283601B2 (en) | Update management method, update management system, and non-transitory recording medium | |
JP6024564B2 (en) | In-vehicle communication system | |
JP5949732B2 (en) | Program update system and program update method | |
US11489693B2 (en) | Home network access | |
US9577997B2 (en) | Authentication system and authentication method | |
US20130173112A1 (en) | In-vehicle system and communication method | |
JP6190443B2 (en) | In-vehicle computer system, vehicle, management method, and computer program | |
JP6192673B2 (en) | Key management system, key management method, and computer program | |
JP6704458B2 (en) | In-vehicle processor | |
JP2016134671A (en) | Data generation device, communication device, communication system, mobile, data generation method and program | |
JP6981755B2 (en) | In-vehicle network system | |
JP6769270B2 (en) | In-vehicle electronic control device, in-vehicle electronic control system, relay device | |
CN111034116A (en) | Key management device, communication apparatus, and key sharing method | |
WO2018142504A1 (en) | Encryption key delivery system, key delivery ecu, key reception ecu, key delivery program, key reception program, and method for delivering encryption key | |
JP2020048203A (en) | Update management method, update management device, and control program | |
JP6983977B2 (en) | Gateway device, in-vehicle network system and transfer method | |
WO2019221058A1 (en) | Vehicle-mounted relay device, communication system, bus determination method, and computer program | |
JP2020088417A (en) | Vehicle maintenance system, maintenance server device, authentication device, maintenance tool, computer program, and vehicle maintenance method | |
JP2019074847A (en) | Electronic control unit | |
WO2020090418A1 (en) | Electronic control device, and reprogramming method for electronic control device | |
JP6830877B2 (en) | Distribution system, key generator, distribution method, and computer program | |
JP2018093285A (en) | Distribution system, data security device, distribution method, and computer program | |
WO2018037894A1 (en) | Authentication device for vehicles | |
WO2020240984A1 (en) | Setting device, communication system, and vehicle communication management method | |
JP2020099034A (en) | Communications system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190306 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191213 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200128 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200327 |
|
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: 20200825 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200907 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6769270 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |