JP6454614B2 - In-vehicle system, control device and control method thereof - Google Patents

In-vehicle system, control device and control method thereof Download PDF

Info

Publication number
JP6454614B2
JP6454614B2 JP2015139116A JP2015139116A JP6454614B2 JP 6454614 B2 JP6454614 B2 JP 6454614B2 JP 2015139116 A JP2015139116 A JP 2015139116A JP 2015139116 A JP2015139116 A JP 2015139116A JP 6454614 B2 JP6454614 B2 JP 6454614B2
Authority
JP
Japan
Prior art keywords
random number
packet
mask value
control device
base random
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2015139116A
Other languages
Japanese (ja)
Other versions
JP2017021219A (en
Inventor
博隆 吉田
博隆 吉田
信 萱島
信 萱島
大和田 徹
徹 大和田
伸義 森田
伸義 森田
恵輔 伯田
恵輔 伯田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2015139116A priority Critical patent/JP6454614B2/en
Publication of JP2017021219A publication Critical patent/JP2017021219A/en
Application granted granted Critical
Publication of JP6454614B2 publication Critical patent/JP6454614B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、車載システム、その制御装置および制御方法に関するものである。   The present invention relates to an in-vehicle system, a control device thereof, and a control method.

自動車の制御を支える車載システムでは、ECU(Electronic Control Unit)と呼ばれる組み込みシステムが制御装置として制御を行っている。例えば、エンジン制御の場合、ECUがエンジン等の状態をセンサによって観測し、燃料噴射量を算出し、適切なタイミングで点火させるための制御を行う。さらに、制御処理は、周期的動作であり、かつ実行周期は短い。したがって、データの更新頻度が高い。   In an in-vehicle system that supports control of an automobile, an embedded system called an ECU (Electronic Control Unit) performs control as a control device. For example, in the case of engine control, the ECU observes the state of the engine or the like with a sensor, calculates the fuel injection amount, and performs control for ignition at an appropriate timing. Furthermore, the control processing is a periodic operation and the execution cycle is short. Therefore, the data update frequency is high.

自動車の車載ネットワークにおける代表的な標準プロトコルとしてController Area Network(以下、CAN)が広く使用されており、さらに今後はCANを拡張したCAN FD(Flexible Data−Rate)も普及が進むことが予想されている。   Controller Area Network (hereinafter referred to as CAN) is widely used as a typical standard protocol for in-vehicle networks of automobiles, and in the future, CAN FD (Flexible Data-Rate), which is an extension of CAN, is expected to spread. Yes.

このような車載ネットワークを用いた車載システムについても、一般的な情報システムと同様に、脅威が指摘されつつある。例えば、OBD2(On−Board−Diagnostics 2)ポートのような車載ネットワークに直接繋がっているインタフェースに不正な機器を接続し、リプレイ攻撃(再送攻撃)が行なわれる脅威等がある。ここで、リプレイ攻撃とは、攻撃者が通信路上を流れるパケットを盗聴して事前に取得し、取得したパケットを再送することで自動車の不正な動作を引き起こす攻撃である。   As with general information systems, threats are also being pointed out for in-vehicle systems using such in-vehicle networks. For example, there is a threat that a replay attack (retransmission attack) is performed by connecting an unauthorized device to an interface directly connected to an in-vehicle network such as an OBD2 (On-Board-Diagnostics 2) port. Here, the replay attack is an attack in which an attacker eavesdrops on a packet flowing on a communication path, acquires the packet in advance, and resends the acquired packet to cause an illegal operation of the automobile.

第三者による受信者のシステムのリプレイ攻撃に対する対策手段として、パケットごとに値が変わるシーケンス番号(順序番号)を付与することが知られている。シーケンス番号によるリプレイ攻撃対策技術は、ネットワーク層での認証および暗号化を行うプロトコルとしてIETFで標準化されたIPSecにおいても採用されている。   As a countermeasure against a replay attack on a recipient's system by a third party, it is known to assign a sequence number (order number) whose value changes for each packet. The replay attack countermeasure technique based on sequence numbers is also adopted in IPSec standardized by IETF as a protocol for performing authentication and encryption at the network layer.

また、予測困難性を確保するために、パケットごとに値が変わる乱数を生成し、シーケンス番号として採用することが知られており、特許文献1には、暗号化側において、まず、演算器Aで、疑似乱数生成器の出力Xiと、m遅延器Bから得られるそのmステップ前の疑似乱数生成器の出力Xi-mとのビットごとの排他的論理和をとり、次に、演算器Cで上記排他的論理和の結果と平文のブロックMiとのビットごとの排他的論理和をとることにより暗号文を作成する技術が開示されている。   Also, it is known to generate a random number whose value changes for each packet and to employ it as a sequence number in order to ensure the difficulty of prediction. Then, the bitwise exclusive OR of the output Xi of the pseudo random number generator and the output Xi-m of the pseudo random number generator before m steps obtained from the m delay unit B is taken, and then the arithmetic unit C A technique for creating a ciphertext by taking a bitwise exclusive OR of the result of the exclusive OR and the plaintext block Mi is disclosed.

特開2003−158515号公報JP 2003-158515 A

特許文献1に開示された技術によれば、複数のブロックからなる長文を疑似乱数生成器により暗号化するシステムにおいて、単独のブロックを暗号化するのと同程度の処理量と安全度で長文の各ブロックを効率的に暗号化できるようになる。   According to the technology disclosed in Patent Document 1, in a system that encrypts a long sentence composed of a plurality of blocks with a pseudo-random number generator, a long sentence with the same processing amount and safety level as that of encrypting a single block. Each block can be encrypted efficiently.

しかしながら、車載システムにおける制御装置は低コストであることを要求されることが多く、暗号処理で使える計算リソースが限られるため、特許文献1に開示された技術でも負担が大きく、計算リソースが枯渇して車両の制御へ影響する可能性がある。また、車載システムでは1つの制御装置が他の複数の制御装置へ制御情報を送信する場合も多く、送信先の複数の制御装置ごとに独立な乱数列を生成することも大きな負担となる。   However, a control device in an in-vehicle system is often required to be low-cost, and the computational resources that can be used for cryptographic processing are limited. Therefore, the technology disclosed in Patent Document 1 is also burdensome and the computational resources are exhausted. May affect vehicle control. Further, in a vehicle-mounted system, one control device often transmits control information to a plurality of other control devices, and generating an independent random number sequence for each of a plurality of control devices as transmission destinations is a heavy burden.

そこで、本発明の目的は、車両システムの通信に適した乱数処理を提供することにある。   Accordingly, an object of the present invention is to provide random number processing suitable for vehicle system communication.

本発明に係る代表的な制御装置は、車載システムにおいて制御情報を送信する制御装置であって、複数のベース乱数が格納される乱数記憶部と、パケットの複数の識別子それぞれに紐づけてマスク値が格納されるマスク値記憶部と、前記乱数記憶部に格納された複数のベース乱数の中から1つのベース乱数を取得し、前記マスク値記憶部に格納された複数のマスク値の中から、前記制御情報を送信するためのパケットの識別子に紐づくマスク値を取得し、前記取得したベース乱数と前記取得したマスク値とに基づきパケット乱数を生成するパケット乱数生成部と、前記制御情報と前記生成したパケット乱数を含むパケットを送信する通信部とを備えたことを特徴とする。   A representative control device according to the present invention is a control device that transmits control information in an in-vehicle system, and a mask value associated with each of a random number storage unit that stores a plurality of base random numbers and a plurality of identifiers of a packet. Is stored, and one base random number is obtained from a plurality of base random numbers stored in the random number storage unit, and from among a plurality of mask values stored in the mask value storage unit, A packet random number generating unit that acquires a mask value associated with an identifier of a packet for transmitting the control information, generates a packet random number based on the acquired base random number and the acquired mask value, the control information, and the control information And a communication unit that transmits a packet including the generated packet random number.

本発明によれば、車両システムの通信に適した乱数処理が可能になる。   According to the present invention, random number processing suitable for vehicle system communication can be performed.

車載システムの構成の例を示す図である。It is a figure which shows the example of a structure of a vehicle-mounted system. 制御装置のハードウェアの構成の例を示す図である。It is a figure which shows the example of a hardware structure of a control apparatus. 通信の全体フローの例を示す図である。It is a figure which shows the example of the whole flow of communication. 秘匿共有処理のフローの例を示す図である。It is a figure which shows the example of the flow of a confidential sharing process. パケット送信処理のフローの例を示す図である。It is a figure which shows the example of the flow of a packet transmission process. パケット受信処理のフローの例を示す図である。It is a figure which shows the example of the flow of a packet reception process. マスク値テーブルの構成の例を示す図である。It is a figure which shows the example of a structure of a mask value table. 通信パケットの構成の例を示す図である。It is a figure which shows the example of a structure of a communication packet. 複数の受信制御装置を含む車載システムの構成の例を示す図である。It is a figure which shows the example of a structure of the vehicle-mounted system containing a some reception control apparatus. 同期補正を含む車載システムの構成の例を示す図である。It is a figure which shows the example of a structure of the vehicle-mounted system containing synchronous correction | amendment. 同期補正を含む通信の全体フローの例を示す図である。It is a figure which shows the example of the whole flow of communication containing a synchronous correction | amendment. 送信制御装置の同期補正処理のフローの例を示す図である。It is a figure which shows the example of the flow of a synchronous correction process of a transmission control apparatus. 受信制御装置の同期補正処理のフローの例を示す図である。It is a figure which shows the example of the flow of a synchronous correction process of a reception control apparatus.

以下、本発明の実施形態について、実施例を用い、図面を参照しながら詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings using examples.

(車載システムの構成)
図1を参照して、車載システムの構成の例を説明する。図1において、車載システム100は、送信制御装置110、受信制御装置130、通信バス190を含んで構成される。車載システム100では、送信制御装置110がパケット乱数を生成し、通信バス190を介して、データとともにパケット乱数を格納したパケットを送信する。受信制御装置130は受信したパケットの乱数の真正性を検証し、真正性の検証された受信パケットに格納されたデータの取得を行なう。
(In-vehicle system configuration)
With reference to FIG. 1, the example of a structure of a vehicle-mounted system is demonstrated. In FIG. 1, the in-vehicle system 100 includes a transmission control device 110, a reception control device 130, and a communication bus 190. In the in-vehicle system 100, the transmission control device 110 generates a packet random number and transmits a packet storing the packet random number together with data via the communication bus 190. The reception control device 130 verifies the authenticity of the random number of the received packet, and acquires data stored in the received packet whose authenticity has been verified.

なお、以下では、送信制御装置110と受信制御装置130の送信と受信を区別せずに単に制御装置と呼ぶことがある。また、送信制御装置110と受信制御装置130のそれぞれは、送信と受信の両方の構成を有する制御装置であってもよい。   Hereinafter, transmission and reception of the transmission control device 110 and the reception control device 130 may be simply referred to as a control device without being distinguished. In addition, each of the transmission control device 110 and the reception control device 130 may be a control device having both transmission and reception configurations.

(送信制御装置)
通信バス190には、一つまたは複数の制御装置が接続される。ここでは、送信制御装置110と受信制御装置130の二つの制御装置が接続される例を示す。送信制御装置110は、通信部111、通信パケット生成部112、パケット乱数生成部113、マスク値テーブル生成部114、ベース乱数生成部115、鍵管理部117、ベース乱数記憶部118、マスク値テーブル記憶部119を含んで構成されている。
(Transmission control device)
One or more control devices are connected to the communication bus 190. Here, an example is shown in which two control devices, the transmission control device 110 and the reception control device 130, are connected. The transmission control device 110 includes a communication unit 111, a communication packet generation unit 112, a packet random number generation unit 113, a mask value table generation unit 114, a base random number generation unit 115, a key management unit 117, a base random number storage unit 118, and a mask value table storage. A portion 119 is included.

通信部111は、通信パケット生成部112が生成した通信パケットを通信バス190経由で受信制御装置130へ送信する。通信パケット生成部112は通信パケットを生成する。パケット乱数生成部113はパケット乱数を生成する。マスク値テーブル生成部114はマスク値のテーブルを生成する。ベース乱数生成部115はベース乱数を生成する。   The communication unit 111 transmits the communication packet generated by the communication packet generation unit 112 to the reception control device 130 via the communication bus 190. The communication packet generator 112 generates a communication packet. The packet random number generator 113 generates a packet random number. The mask value table generation unit 114 generates a mask value table. The base random number generator 115 generates a base random number.

鍵管理部117は、パケット乱数生成部113やベース乱数生成部115がそれぞれの乱数データを生成するための暗号処理を行う際に用いる鍵を管理する。ベース乱数記憶部118は、ベース乱数生成部115が生成したベース乱数を記憶する。マスク値テーブル記憶部119は、マスク値テーブル生成部114が生成したマスク値のテーブルを記憶する。   The key management unit 117 manages keys used when the packet random number generation unit 113 and the base random number generation unit 115 perform encryption processing for generating respective random number data. The base random number storage unit 118 stores the base random number generated by the base random number generation unit 115. The mask value table storage unit 119 stores a table of mask values generated by the mask value table generation unit 114.

(受信制御装置)
受信制御装置130は、通信部131、通信パケット検証部132、パケット乱数生成部133、ベース乱数生成部135、鍵管理部137、ベース乱数記憶部138、マスク値テーブル記憶部139を含んで構成されている。なお、ベース乱数生成部135は含まれなくてもよい。通信部131は、制御装置110の通信パケット生成部112が生成した通信パケットを通信バス190経由で受信する。通信パケット検証部132は、制御装置110から送信された通信パケットに含まれるパケット乱数を検証する。
(Reception control device)
The reception control device 130 includes a communication unit 131, a communication packet verification unit 132, a packet random number generation unit 133, a base random number generation unit 135, a key management unit 137, a base random number storage unit 138, and a mask value table storage unit 139. ing. Note that the base random number generation unit 135 may not be included. The communication unit 131 receives the communication packet generated by the communication packet generation unit 112 of the control device 110 via the communication bus 190. The communication packet verification unit 132 verifies the packet random number included in the communication packet transmitted from the control device 110.

パケット乱数生成部133は、通信パケット検証部132が通信パケットの検証を行うために、マスク値テーブルとベース乱数とを入力とした処理を行い、パケット乱数を生成する。ベース乱数生成部135は、暗号処理によりベース乱数を生成する。鍵管理部137は、パケット乱数生成部133やベース乱数生成部135がそれぞれのデータを生成するための暗号処理を行う際に用いる鍵を管理する。ベース乱数記憶部138は、ベース乱数を記憶する。   The packet random number generation unit 133 performs processing with the mask value table and the base random number as inputs in order for the communication packet verification unit 132 to verify the communication packet, and generates a packet random number. The base random number generator 135 generates a base random number by cryptographic processing. The key management unit 137 manages keys used when the packet random number generation unit 133 and the base random number generation unit 135 perform encryption processing for generating respective data. The base random number storage unit 138 stores a base random number.

マスク値テーブル記憶部139は、パケット乱数生成部133がパケット乱数を生成するために入力として使用するマスク値テーブルを記憶する。なお、記憶されるマスク値テーブルは、送信制御装置110のマスク値テーブル生成部134が生成したものを受信するか、もしくは、受信制御装置130自体が生成してもよい。送信制御装置110から受信したパケットに格納されたパケット乱数を通信パケット検証部132が検証して、正規と判断されたパケットのデータが受信制御装置130に格納される。   The mask value table storage unit 139 stores a mask value table used as an input by the packet random number generation unit 133 to generate a packet random number. The stored mask value table may be received by the mask value table generating unit 134 of the transmission control device 110 or may be generated by the reception control device 130 itself. The communication packet verification unit 132 verifies the packet random number stored in the packet received from the transmission control device 110, and the data of the packet determined to be normal is stored in the reception control device 130.

(制御装置のハードウェア構成)
図2を参照して、制御装置のハードウェアの構成の例を説明する。この例では、送信制御装置110と受信制御装置130のハードウェアは同じであるので、まとめて説明する。図2において、制御装置は、通信装置11、入出力装置12、CPU(Central Processing Unit)14、メモリ15を含んで構成されている。
(Hardware configuration of control device)
An example of the hardware configuration of the control device will be described with reference to FIG. In this example, the hardware of the transmission control device 110 and the reception control device 130 is the same, and will be described collectively. In FIG. 2, the control device includes a communication device 11, an input / output device 12, a CPU (Central Processing Unit) 14, and a memory 15.

CPU14はメモリ15に格納されたプログラムにしたがって、通信装置11、入出力装置12、メモリ15から情報を読み出し、読み出した情報に演算を行い、通信装置11、入出力装置12、メモリ15へ情報を書き込む。メモリ15は、CPU14のプログラムが格納されたり、CPU14の処理結果が一時的に格納されたりする。入出力装置12は、車両の図示を省略したセンサまたはアクチュエータと通信する。通信装置11は、他の制御装置と通信バス190を介して通信する。   The CPU 14 reads information from the communication device 11, the input / output device 12, and the memory 15 according to the program stored in the memory 15, performs an operation on the read information, and sends the information to the communication device 11, the input / output device 12, and the memory 15. Write. The memory 15 stores a program of the CPU 14 or temporarily stores a processing result of the CPU 14. The input / output device 12 communicates with a sensor or an actuator (not shown) of the vehicle. The communication device 11 communicates with other control devices via the communication bus 190.

CPU14がメモリ15に格納されたプログラムを実行することにより、CPU14とメモリ15とは、図1に示した例えば通信パケット生成部112などの各部となってもよい。通信部111、131は通信装置11を含んでもよい。ベース乱数記憶部118、138とマスク値テーブル記憶部119、139はメモリ15であってもよい。そして、CPU14、メモリ15、通信装置11以外の図示を省略したハードウェアを含めて、図1に示した各部を形成してもよい。   When the CPU 14 executes a program stored in the memory 15, the CPU 14 and the memory 15 may be each unit such as the communication packet generation unit 112 illustrated in FIG. 1. The communication units 111 and 131 may include the communication device 11. The base random number storage units 118 and 138 and the mask value table storage units 119 and 139 may be the memory 15. 1 may be formed including hardware other than the CPU 14, the memory 15, and the communication device 11 that are not shown.

なお、CPU14とメモリ15は低コストなものであってもよい。このため、例えばCPU14は性能の高くないものであってもよいし、メモリ15は大容量なものでなくてもよい。   The CPU 14 and the memory 15 may be low cost. For this reason, for example, the CPU 14 may not have high performance, and the memory 15 may not have a large capacity.

(送信制御装置と受信制御装置の通信処理の全体概要)
図3を参照して、送信制御装置110と受信制御装置130の間の通信処理の全体概要の例について説明する。送信制御装置110は、通信パケットのシーケンス番号の代わりとなるパケット乱数を通信パケットに格納する。パケット乱数は、各パケットIDと、そのパケットIDに対応して秘密かつランダムに選択されたマスク値というデータを格納するテーブルであるマスク値テーブルを用いて生成される。ここで、秘密とは、制御装置110と制御装置130のみに格納されている値であるという意味である。
(Overall overview of communication processing between transmission control device and reception control device)
With reference to FIG. 3, an example of an overall outline of communication processing between the transmission control device 110 and the reception control device 130 will be described. The transmission control device 110 stores a packet random number, which is a substitute for the sequence number of the communication packet, in the communication packet. The packet random number is generated using a mask value table which is a table storing data of each packet ID and a mask value secretly and randomly selected corresponding to the packet ID. Here, the secret means a value stored only in the control device 110 and the control device 130.

マスク値テーブルの例については後で図9を用いて説明する。ベース乱数を暗号化処理(例えばAES:Advanced Encryption Standard)に含まれる擬似乱数生成器等の利用により暗号学的に生成し、送信制御装置110と受信制御装置130が、ベース乱数とマスク値テーブルを共有し、それらを用いたパケット乱数の生成を行うことを特徴とする。   An example of the mask value table will be described later with reference to FIG. A base random number is generated cryptographically by using a pseudo-random number generator included in an encryption process (for example, AES: Advanced Encryption Standard), and the transmission control device 110 and the reception control device 130 generate the base random number and the mask value table. It is characterized by sharing and generating packet random numbers using them.

送信制御装置110と受信制御装置130は、車両のエンジン起動時と実利用時にフェーズを分けて、それぞれのフェーズに応じた処理を行う。まずエンジン起動時に、送信制御装置110と受信制御装置130の間で、秘匿共有処理(S201)を実施する。そして、実利用時に、送信制御装置110がパケット乱数送信処理(S202)を繰り返し、これに対応して、受信制御装置130がパケット乱数受信処理(S203)を繰り返すことにより、パケット乱数通信を安全に実施する。   The transmission control device 110 and the reception control device 130 divide the phases when the engine of the vehicle is activated and when it is actually used, and perform processing according to each phase. First, when the engine is started, a secret sharing process (S201) is performed between the transmission control device 110 and the reception control device. In actual use, the transmission control device 110 repeats the packet random number transmission processing (S202), and in response to this, the reception control device 130 repeats the packet random number reception processing (S203). carry out.

エンジン起動時等の秘匿共有処理(S201)は、ベース乱数共有処理(S311)とマスク値テーブル共有処理(S312)を含み、ベース乱数とマスク値テーブルの事前共有を行う。ベース乱数共有処理(S311)とマスク値テーブル共有処理(S312)の詳細については、図4を用いて説明する。   The secret sharing process (S201) such as when the engine is started includes a base random number sharing process (S311) and a mask value table sharing process (S312), and pre-shares the base random number and the mask value table. Details of the base random number sharing process (S311) and the mask value table sharing process (S312) will be described with reference to FIG.

実利用時には、送信制御装置110がマスク値テーブルを参照し(S315)、パケット乱数生成し(S316)、パケット乱数送信する(S202)。受信制御装置130がマスク値テーブルを参照し(S324)、パケット乱数生成(S326)し、パケット検証する(S326)。パケット乱数送信処理(S202)とパケット乱数受信処理(S203)については、図5と図6を用いて後でさらに説明する。   In actual use, the transmission control device 110 refers to the mask value table (S315), generates a packet random number (S316), and transmits the packet random number (S202). The reception control device 130 refers to the mask value table (S324), generates a packet random number (S326), and verifies the packet (S326). The packet random number transmission process (S202) and the packet random number reception process (S203) will be further described later with reference to FIGS.

(秘匿共有処理)
図4は、エンジン起動時の秘匿共有処理(S201)の例を示す図である。既に説明したように秘匿共有処理(S201)はベース乱数共有処理(S311)とマスク値テーブル共有処理(S312)とからなる。
(Confidential sharing processing)
FIG. 4 is a diagram illustrating an example of the secret sharing process (S201) when the engine is activated. As already described, the secret sharing process (S201) includes a base random number sharing process (S311) and a mask value table sharing process (S312).

まず、ベース乱数共有処理(S311)に関して説明する。受信制御装置130は、ベース乱数生成のために必要な乱数生成量(乱数の個数)等のパラメータを送信制御装置110に送信する(S421)。送信制御装置110のベース乱数生成部115は、受信制御装置130からのパラメータを受信し(S410)、ベース乱数の生成に必要なパラメータを決定する(S411)。ここで、決定するパラメータは例えば乱数生成量に応じたパラメータであってもよい。   First, the base random number sharing process (S311) will be described. The reception control device 130 transmits parameters such as a random number generation amount (number of random numbers) necessary for base random number generation to the transmission control device 110 (S421). The base random number generation unit 115 of the transmission control device 110 receives parameters from the reception control device 130 (S410), and determines parameters necessary for generating base random numbers (S411). Here, the parameter to be determined may be, for example, a parameter according to the random number generation amount.

決定したパラメータに基づき、ベース乱数生成部115はベース乱数の生成を行い、ベース乱数記憶部118に格納する(S412)。なお、ベース乱数生成部115は、鍵管理部117に格納された鍵情報が入力された暗号処理において使用される疑似乱数生成を用いてベース乱数を生成する。   Based on the determined parameters, the base random number generation unit 115 generates a base random number and stores it in the base random number storage unit 118 (S412). Note that the base random number generation unit 115 generates a base random number by using pseudo random number generation used in the encryption process in which the key information stored in the key management unit 117 is input.

ここで、ベース乱数は複数生成され、所定系列の疑似乱数となってもよい。1つのベース乱数の長さ(ビット長)は十分に長くてもよく、決定したパラメータに応じた個数が生成されてもよい。生成したベース乱数は受信制御装置130に送信され(S413)、受信制御装置130は、送信されたベース乱数を受信する(S422)。   Here, a plurality of base random numbers may be generated and may be pseudorandom numbers of a predetermined series. The length (bit length) of one base random number may be sufficiently long, and the number corresponding to the determined parameter may be generated. The generated base random number is transmitted to the reception control device 130 (S413), and the reception control device 130 receives the transmitted base random number (S422).

次に、マスク値テーブル共有処理(S312)に関して説明する。送信制御装置110のマスク値テーブル生成部114は、パケットIDに依存するデータであるマスク値をパケットIDごとに生成し(S414)、パケットIDをインデックスとして、このインデックスに対応する値をマスク値とするマスク値テーブルを生成し、マスク値テーブル記憶部119に格納する(S415)。   Next, the mask value table sharing process (S312) will be described. The mask value table generation unit 114 of the transmission control device 110 generates a mask value, which is data depending on the packet ID, for each packet ID (S414), and uses the packet ID as an index and a value corresponding to this index as a mask value. A mask value table to be generated is generated and stored in the mask value table storage unit 119 (S415).

生成したマスク値テーブルは、受信制御装置130に送信され(S416)、受信制御装置140は、送信されたマスク値テーブルを受信し(S423)、受信時点までにマスク値テーブルが設定されていなければ、受信したマスク値テーブルをマスク値テーブル記憶部139に格納し、そうでなければ、受信したマスク値テーブルでマスク値テーブル記憶部139を更新する(S424)。   The generated mask value table is transmitted to the reception control device 130 (S416), and the reception control device 140 receives the transmitted mask value table (S423), and if the mask value table has not been set up to the reception time point. The received mask value table is stored in the mask value table storage unit 139. Otherwise, the mask value table storage unit 139 is updated with the received mask value table (S424).

なお、マスク値自体は、パケットIDに依存するデータであれば、暗号処理に用いられる擬似乱数生成器等により生成されてもよい。また、マスク値テーブル更新(S424)のタイミングはエンジン起動時とし、車両実利用時の期間は、同じマスク値テーブルを使い続ける。また、ベース乱数の生成とマスク値テーブルの生成は、送信制御装置110と受信制御装置130の両方で行ってもよい。   Note that the mask value itself may be generated by a pseudo-random number generator or the like used for encryption processing as long as it is data that depends on the packet ID. The mask value table update (S424) is performed when the engine is started, and the same mask value table is continuously used during the actual vehicle use period. The generation of the base random number and the generation of the mask value table may be performed by both the transmission control device 110 and the reception control device 130.

(送信制御装置のパケット乱数送信)
図5を参照して、パケット乱数送信処理(S202)の例を説明する。この例では、複数のベース乱数がベース乱数記憶部118に格納され、各ベース乱数をインデックスにより指し示される。各ベース乱数は固定長のデータであってもよい。まず、ベース乱数記憶部118の中でベース乱数の使用箇所を指すインデックスであるベース乱数インデックスが初期化される。
(Transmission control device packet random number transmission)
An example of packet random number transmission processing (S202) will be described with reference to FIG. In this example, a plurality of base random numbers are stored in the base random number storage unit 118, and each base random number is indicated by an index. Each base random number may be fixed-length data. First, a base random number index, which is an index indicating a location where a base random number is used, in the base random number storage unit 118 is initialized.

送信制御装置110は、ベース乱数記憶部118の中のベース乱数インデックスが指し示す場所から、パケット乱数の長さ分だけのベース乱数を取得し、ベース乱数インデックスの値を1つのベース乱数の長さ分だけインクリメントする(S501)。そして、送信するパケットのIDを取得し(S502)、マスク値テーブル記憶部119に格納されたマスク値テーブルを参照し(S503)、取得したパケットIDに対応するマスク値を取得する(S504)。   The transmission control apparatus 110 acquires a base random number corresponding to the length of the packet random number from the location indicated by the base random number index in the base random number storage unit 118, and sets the value of the base random number index to the length of one base random number. Increment by (S501). The ID of the packet to be transmitted is acquired (S502), the mask value table stored in the mask value table storage unit 119 is referred to (S503), and the mask value corresponding to the acquired packet ID is acquired (S504).

パケット乱数生成部115は、取得したベース乱数と取得したマスク値の排他的論理和により、パケット乱数を生成する(S505)。通信パケット生成部112は、送信制御装置110の上で動作する図示を省略した制御アプリケーションから取得するデータに、生成したパケット乱数を付加し、通信パケットを生成する(S506)。通信部111は、通信パケット生成部112で生成した通信パケットを受信制御装置130へバス190を介して送信する(S507)。そして、ベース乱数の取得(S501)へ戻る。   The packet random number generation unit 115 generates a packet random number from the exclusive OR of the acquired base random number and the acquired mask value (S505). The communication packet generator 112 adds the generated packet random number to data acquired from a control application (not shown) that runs on the transmission control device 110, and generates a communication packet (S506). The communication unit 111 transmits the communication packet generated by the communication packet generation unit 112 to the reception control device 130 via the bus 190 (S507). And it returns to acquisition of a base random number (S501).

なお、通信パケットの構成については、図8を用いて後で説明する。また、ベース乱数インデックスの値のインクリメントは、ベース乱数の取得時とベース乱数の取得時以外を含めて所定のタイミングであってもよい。この所定のタイミングは例えば10mSごとの予め設定された時間の間隔でもよいし、例えば0時0分0秒を起点に10mSごとの予め設定された時刻の間隔であってもよい。また、1回のベース乱数の取得(S501)に対して、予め設定された期間内は、パケットIDの取得(S502)から通信パケットの送信(S507)までを複数実行してもよい。   The configuration of the communication packet will be described later with reference to FIG. The increment of the value of the base random number index may be at a predetermined timing including when the base random number is acquired and when the base random number is not acquired. The predetermined timing may be a preset time interval, for example, every 10 mS, or may be a preset time interval, for example, every 10 mS starting from 0: 0: 0. Further, with respect to one acquisition of the base random number (S501), a plurality of processes from the acquisition of the packet ID (S502) to the transmission of the communication packet (S507) may be executed within a preset period.

(受信制御装置のパケット乱数受信)
図6を参照して、パケット乱数受信処理(S203)を説明する。ベース乱数記憶部138の中でベース乱数の使用箇所を指すインデックスであるベース乱数インデックスの初期化を行う。受信制御装置130は、ベース乱数記憶部138の中のベース乱数インデックスが指し示す場所から、パケット乱数の長さ分だけのベース乱数を取得し、ベース乱数インデックスの値を前記乱数の長さ分だけインクリメントする(S601)。
(Receive control device packet random number reception)
The packet random number reception process (S203) will be described with reference to FIG. The base random number index, which is an index indicating the location where the base random number is used, in the base random number storage unit 138 is initialized. The reception control device 130 acquires a base random number corresponding to the length of the packet random number from the location indicated by the base random number index in the base random number storage unit 138, and increments the value of the base random number index by the length of the random number. (S601).

通信部131は、通信バス190を介して通信パケットを受信し(S602)、パケット乱数を取得し、パケットIDを取得する(S603)。マスク値テーブル記憶部139に格納されたマスク値テーブルを参照し(S604)、取得したパケットIDに対応するマスク値を取得する(S605)。パケット乱数生成部132は、取得したベース乱数と取得したマスク値の排他的論理和により、パケット乱数を生成する(S606)。   The communication unit 131 receives a communication packet via the communication bus 190 (S602), acquires a packet random number, and acquires a packet ID (S603). The mask value table stored in the mask value table storage unit 139 is referred to (S604), and the mask value corresponding to the acquired packet ID is acquired (S605). The packet random number generation unit 132 generates a packet random number from the exclusive OR of the acquired base random number and the acquired mask value (S606).

通信パケット検証部132は、通信パケットから取得したパケット乱数と生成したパケット乱数が等しいか否かを判定して通信パケットを検証し(S607)、2つのパケット乱数が等しいと判定された場合(S608)、通信パケットは真正なものとして、図示を省略した記憶部に通信パケットのデータを格納する(S609)。2つのパケット乱数が等しくないと判定された場合(S608)、通信パケット検証部132は、受信した通信パケットを破棄する。そして、ベース乱数の取得(S601)へ戻る。   The communication packet verifying unit 132 verifies whether the packet random number acquired from the communication packet is equal to the generated packet random number, verifies the communication packet (S607), and determines that the two packet random numbers are equal (S608). ), Assuming that the communication packet is authentic, the communication packet data is stored in a storage unit (not shown) (S609). When it is determined that the two packet random numbers are not equal (S608), the communication packet verification unit 132 discards the received communication packet. And it returns to acquisition of a base random number (S601).

なお、ベース乱数インデックスの値のインクリメントは、ベース乱数の取得時とベース乱数の取得時以外を含めて所定のタイミングであってもよい。この所定のタイミングは例えば10mSごとの予め設定された時間の間隔でもよいし、例えば0時0分0秒を起点に10mSごとの予め設定された時刻の間隔であってもよい。送信制御装置110からの信号に基づいてもよい。このため、1回のベース乱数の取得(S601)に対して、パケット受信(S602)からパケットデータ格納(S609)までを複数実行してもよい。   The increment of the value of the base random number index may be at a predetermined timing including when the base random number is acquired and when the base random number is not acquired. The predetermined timing may be a preset time interval, for example, every 10 mS, or may be a preset time interval, for example, every 10 mS starting from 0: 0: 0. It may be based on a signal from the transmission control device 110. For this reason, a plurality of processes from packet reception (S602) to packet data storage (S609) may be executed for one base random number acquisition (S601).

次に、送信制御装置110と受信制御装置130との間で、どのような構成を持つ情報を処理または通信すれば、パケット乱数を用いた通信を行うことができるかを示すために、各種情報の構成を説明する。   Next, in order to indicate what kind of configuration information is processed or communicated between the transmission control device 110 and the reception control device 130, various types of information can be shown. The structure of will be described.

(マスク値テーブルの構成)
図7を参照して、マスク値テーブル900の構成の例を説明する。マスク値テーブル900は、マスク値テーブル生成部114により生成され、マスク値テーブル記憶部119、139に格納される。マスク値テーブル900は、パケットID欄901とマスク値欄902から成る。この例では、パケットID欄901の「ID_1」とマスク値欄902の「MASK_ID1」とが対応する、すなわち紐づくことを表す。以下、マスク値テーブル900のパケットID欄901の「ID_2」と「ID_3」のそれぞれはマスク値欄902の「MASK_ID2」と「MASK_ID3」のそれぞれに紐づくテーブルである。
(Configuration of mask value table)
An example of the configuration of the mask value table 900 will be described with reference to FIG. The mask value table 900 is generated by the mask value table generation unit 114 and stored in the mask value table storage units 119 and 139. The mask value table 900 includes a packet ID column 901 and a mask value column 902. In this example, “ID_1” in the packet ID column 901 and “MASK_ID1” in the mask value column 902 correspond to each other. Hereinafter, “ID_2” and “ID_3” in the packet ID column 901 of the mask value table 900 are tables associated with “MASK_ID2” and “MASK_ID3” in the mask value column 902, respectively.

マスク値欄902の各マスク値は、マスク値テーブル生成部114が、鍵管理部117に格納された鍵情報とパケットID欄901のパケットIDを入力とする暗号処理の疑似乱数生成により生成されてもよい。マスク値欄902のマスク値は、パケットID欄901のパケットIDを使用した乱数とすることにより、パケットIDに依存する。なお、マスク値の生成はこのような処理に限定されるものではない。また、マスク値テーブル900の構成も図7に示した例に限定されるものではない。   Each mask value in the mask value column 902 is generated by the mask value table generation unit 114 by generating pseudo-random numbers for cryptographic processing using the key information stored in the key management unit 117 and the packet ID in the packet ID column 901 as inputs. Also good. The mask value in the mask value column 902 depends on the packet ID by using a random number using the packet ID in the packet ID column 901. Note that generation of the mask value is not limited to such processing. Further, the configuration of the mask value table 900 is not limited to the example shown in FIG.

(通信パケットの構成)
図8を参照して、通信パケット1000の構成の例を説明する。この通信パケット1000は、通信パケット生成部112により生成される通信パケットであり、例えば図3を用いて説明したパケット送信(S317)にて通信部111から通信バス190に送信され、パケット受信(S323)にて通信部131で受信される通信パケットである。
(Composition of communication packet)
An example of the configuration of the communication packet 1000 will be described with reference to FIG. The communication packet 1000 is a communication packet generated by the communication packet generation unit 112. For example, the communication packet 1000 is transmitted from the communication unit 111 to the communication bus 190 in the packet transmission (S317) described with reference to FIG. ) Is a communication packet received by the communication unit 131.

通信パケット1000は、ヘッダ情報1011、データ1012、パケット乱数1013、フッタ情報1015から成る。ヘッダ情報1011は、例えば車載ネットワークである通信バス190のCAN FDにおけるアービトレーションフィールドやコントロールフィールドを示すが、他の通信プロトコルにおいては、通信先、通信元、データ長等を示す情報を含むものであればよい。なお、ヘッダ情報はパケットIDを含んでもよい。   The communication packet 1000 includes header information 1011, data 1012, packet random numbers 1013, and footer information 1015. The header information 1011 indicates, for example, an arbitration field and a control field in the CAN FD of the communication bus 190 that is an in-vehicle network. In other communication protocols, the header information 1011 may include information indicating a communication destination, a communication source, a data length, and the like. That's fine. The header information may include a packet ID.

データ1012は、車両を制御するためのデータなどであり、受信制御装置130で真正なものと判定されれば使用される。パケット乱数1013はパケット乱数生成部113、133で生成される既に説明したパケット乱数であり、一定の長さの乱数であってもよい。また、パケット乱数1013は検証情報であるとみなしてもよい。フッタ情報1014は、例えば車載ネットワークである通信バス190のCAN FDにおける周期的冗長性チェックフィールドやアクノレッジフィールドを示す。   The data 1012 is data for controlling the vehicle, and is used if the reception control device 130 determines that the data is authentic. The packet random number 1013 is the packet random number already described which is generated by the packet random number generation units 113 and 133, and may be a random number having a certain length. The packet random number 1013 may be regarded as verification information. The footer information 1014 indicates, for example, a periodic redundancy check field and an acknowledge field in the CAN FD of the communication bus 190 that is an in-vehicle network.

通信パケット1000を構成する情報は図8の例に限定されるものではなく、情報の順序も図8の例に限定されるものではなく、各情報の内容は図8を用いて説明した内容に限定されるものではない。   The information constituting the communication packet 1000 is not limited to the example of FIG. 8, the order of information is not limited to the example of FIG. 8, and the contents of each information are the same as described with reference to FIG. It is not limited.

以上のように、排他的論理和という単純な演算により、パケットIDごとに異なる乱数の系列を生成することができる。   As described above, a different random number sequence can be generated for each packet ID by a simple operation called exclusive OR.

(複数の受信制御装置へのパケット乱数送信)
図9を参照して、複数の受信制御装置130へのパケット乱数送信処理の例を説明する。図9は、1つの送信制御装置110から、パケットIDが「ID_1」の通信パケット1104を受信制御装置130に送信し、パケットIDが「ID_2」の通信パケット1105を受信制御装置140に送信する例を示す図である。
(Packet random number transmission to multiple reception control devices)
An example of packet random number transmission processing to a plurality of reception control apparatuses 130 will be described with reference to FIG. FIG. 9 illustrates an example in which a single transmission control apparatus 110 transmits a communication packet 1104 with a packet ID “ID_1” to the reception control apparatus 130 and transmits a communication packet 1105 with a packet ID “ID_2” to the reception control apparatus 140. FIG.

送信制御装置110は、受信制御装置130と受信制御装置140のそれぞれへ通信パケット1104と通信パケット1105を送信するために、ベース乱数記憶部118の中のベース乱数インデックスで指定された箇所から、パケット乱数と同じ長さのベース乱数1101−1の値「IV_ID1」を取得する。また、マスク値テーブル記憶部119を参照し、パケットIDが「ID_1」に対応するマスク値1102−1の値「MASK_ID1」と、パケットIDが「ID_2」に対応するマスク値1103−1の値「MASK_ID2」を取得する。   The transmission control device 110 transmits a packet from the location specified by the base random number index in the base random number storage unit 118 to transmit the communication packet 1104 and the communication packet 1105 to the reception control device 130 and the reception control device 140, respectively. The value “IV_ID1” of the base random number 1101-1 having the same length as the random number is acquired. Also, referring to the mask value table storage unit 119, the value “MASK_ID1” of the mask value 1102-1 corresponding to the packet ID “ID_1” and the value “mask1” of the mask value 1103-1 corresponding to the packet ID “ID_2” “ MASK_ID2 "is acquired.

次に、値「IV_ID1」と値「MASK_ID1」を排他的論理和して乱数「r1」を算出し、パケットIDの「ID_1」と乱数「r1」を含む通信パケット1104を生成し、受信制御装置130へ送信する。また、値「IV_ID2」と値「MASK_ID2」を排他的論理和して乱数「r2」を算出し、パケットIDの「ID_2」と乱数「r2」を含む通信パケット1105を生成し、受信制御装置140へ送信する。   Next, the value “IV_ID1” and the value “MASK_ID1” are exclusive-ORed to calculate a random number “r1”, and a communication packet 1104 including the packet ID “ID_1” and the random number “r1” is generated. To 130. Also, the value “IV_ID2” and the value “MASK_ID2” are exclusive-ORed to calculate a random number “r2” to generate a communication packet 1105 including the packet ID “ID_2” and the random number “r2”. Send to.

受信制御装置130は、受信した通信パケット1104から乱数「r1」を取得する。ベース乱数記憶部138の中のベース乱数インデックスで指定された箇所から、パケット乱数と同じ長さのベース乱数1101−2の値「IV_ID1」を取得し、マスク値テーブル記憶部139を参照し、パケットIDが「ID1」に対応するマスク値1102−2の値「MASK_ID1」を取得する。   The reception control device 130 acquires a random number “r1” from the received communication packet 1104. The value “IV_ID1” of the base random number 1101-2 having the same length as the packet random number is acquired from the location specified by the base random number index in the base random number storage unit 138, and the mask value table storage unit 139 is referred to. The value “MASK_ID1” of the mask value 1102-2 corresponding to the ID “ID1” is acquired.

次に、値「IV_ID1」と値「MASK_ID1」を排他的論理和して乱数「r1」を算出し、通信パケット1104から取得した乱数「r1」と比較する。この例では、ベース乱数1101−1とベース乱数1101−2の値が「IV_ID1」で等しく、マスク値1102−1とマスク値1102−2の値が「MASK_ID1」で等しいため、乱数「r1」も等しく、比較の結果は等しいと判定される。このように等しいと判定されると、通信パケット1104は真正なものであると検証されたことになる。   Next, the value “IV_ID1” and the value “MASK_ID1” are exclusive-ORed to calculate a random number “r1”, which is compared with the random number “r1” acquired from the communication packet 1104. In this example, since the values of the base random number 1101-1 and the base random number 1101-2 are equal to “IV_ID1” and the values of the mask value 1102-1 and the mask value 1102-2 are equal to “MASK_ID1”, the random number “r1” is also It is determined that the comparison results are equal. If it is determined that they are equal to each other, the communication packet 1104 is verified to be authentic.

受信制御装置140は、受信した通信パケット1105から乱数「r2」を取得する。ベース乱数記憶部148の中のベース乱数インデックスで指定された箇所から、パケット乱数と同じ長さのベース乱数1101−3の値「IV_ID1」を取得し、マスク値テーブルを参照し、パケットIDが「ID2」に対応するマスク値1103−3の値「MASK_ID2」を取得する。   The reception control device 140 acquires a random number “r2” from the received communication packet 1105. The value “IV_ID1” of the base random number 1101-3 having the same length as the packet random number is acquired from the location specified by the base random number index in the base random number storage unit 148, and the packet ID is “ The value “MASK_ID2” of the mask value 1103-3 corresponding to “ID2” is acquired.

次に、値「IV_ID1」と値「MASK_ID2」を排他的論理和して乱数「r2」を算出し、通信パケット1104から取得した乱数「r2」と比較する。この例では、ベース乱数1101−1とベース乱数1101−3の値が「IV_ID1」で等しく、マスク値1103−1とマスク値1103−3の値が「MASK_ID2」で等しいため、乱数「r2」も等しく、比較の結果は等しいと判定される。このように等しいと判定されると、通信パケット1105は真正なものであると検証されたことになる。   Next, the value “IV_ID1” and the value “MASK_ID2” are exclusive-ORed to calculate a random number “r2”, which is compared with the random number “r2” acquired from the communication packet 1104. In this example, since the values of the base random number 1101-1 and the base random number 1101-3 are equal to “IV_ID1” and the values of the mask value 1103-1 and the mask value 1103-3 are equal to “MASK_ID2”, the random number “r2” is also It is determined that the comparison results are equal. If it is determined that the communication packets 1105 are equal to each other, the communication packet 1105 is verified to be authentic.

なお、パケット1104とパケット1105に含まれるデータは同じであっても、異なっていてもよい。   Note that the data included in the packet 1104 and the packet 1105 may be the same or different.

以上で説明したように、1つの送信制御装置から複数の異なる受信制御装置へパケットを送信する場合であっても、複数の異なる受信制御装置それぞれに使用するパケットIDごとに排他的論理和という単純な演算により、乱数を生成できる。このため、車載システムのような低コストの制御装置であっても、車両制御への悪影響を与えることなく、車載システムのセキュリティを確保できる。   As described above, even when a packet is transmitted from a single transmission control device to a plurality of different reception control devices, a simple exclusive OR operation is performed for each packet ID used for each of a plurality of different reception control devices. Random numbers can be generated by simple operations. For this reason, even if it is a low-cost control apparatus like a vehicle-mounted system, the security of a vehicle-mounted system can be ensured, without having a bad influence on vehicle control.

特に車載システムのように同じ周期、例えば10mS間隔で制御情報がそろって送信されることの多いシステムでは、共通のベース乱数を多く利用することができるため、制御装置の計算リソースの節約度が高い。   In particular, in a system in which control information is often transmitted in the same cycle, for example, at an interval of 10 mS, such as an in-vehicle system, a large amount of common base random numbers can be used, so the degree of saving of calculation resources of the control device is high. .

また、同じ周期で多くのパケットが送信されるシステムへ適用する方が、乱数生成のための計算リソースの節約度が高いため、好ましい。   In addition, it is preferable to apply to a system in which many packets are transmitted in the same cycle because the degree of saving of calculation resources for generating random numbers is high.

1つの系列のベース乱数は例えば1MBであるため、複数の系列のベース乱数が格納され、セキュリティ向上のために定期的に更新されると、車載システムとしては更新コストの高いものとなるが、ベース乱数記憶部118、138、148は1つの系列のベース乱数が格納されるだけであるので、ベース乱数の更新コストを低くできる。また、ベース乱数記憶部118、138、148の記憶容量も小さくなるため、小容量のメモリ15を採用できる。   Since the base random number of one series is 1 MB, for example, if base random numbers of a plurality of series are stored and periodically updated to improve security, the in-vehicle system has a high update cost. Since the random number storage units 118, 138, and 148 store only one series of base random numbers, the update cost of the base random numbers can be reduced. Further, since the storage capacity of the base random number storage units 118, 138, and 148 is reduced, a small-capacity memory 15 can be employed.

(同期補正を行う通信保護システム)
実施例1で説明した構成では、ベース乱数の使用箇所を指すインデックスであるベース乱数インデックスが、送信制御装置110と受信制御装置130の両方で一致している必要がある。通信エラー等により、両方のベース乱数インデックスが一致しなくなった状態(同期ずれ状態)が生じる可能性もある。
(Communication protection system that performs synchronization correction)
In the configuration described in the first embodiment, the base random number index that is an index indicating the location where the base random number is used needs to match in both the transmission control device 110 and the reception control device 130. There may be a state (synchronized state) in which both base random number indexes do not match due to a communication error or the like.

実施例2では、同期ずれ状態が生じたときに、送信制御装置110が同期を補正するための情報を送信し、元の同期が取れた状態、即ち、ベース乱数インデックスが送信制御装置110と受信制御装置130で一致する状態に補正する例を説明する。図2を用いて説明したハードウェア構成、図3〜8を用いて説明した秘匿共有処理(S201)、パケット乱数送信処理(S202)、パケット乱数受信処理(S203)などについて、実施例2は実施例1と同じであるので説明を省略し、実施例2で差分となる構成についいて説明する。   In the second embodiment, when an out-of-synchronization state occurs, the transmission control device 110 transmits information for correcting synchronization, and the original synchronization state is obtained, that is, the base random number index is received by the transmission control device 110. An example in which the control device 130 corrects to a matching state will be described. The hardware configuration described with reference to FIG. 2, the secret sharing process (S201), the packet random number transmission process (S202), and the packet random number reception process (S203) described with reference to FIGS. Since it is the same as Example 1, description is abbreviate | omitted and the structure which becomes a difference in Example 2 is demonstrated.

図10を参照して、同期補正を含む車載システム100の構成の例を説明する。送信制御装置110は、同期補正情報生成部116を備え、同期補正情報を生成する。また、受信制御装置130は、同期補正部136を備え、送信制御装置110から受信した同期補正情報を基に、パケット乱数に関する同期補正を行う。
次に図11を参照して、送信制御装置110と受信制御装置130の間の同期処理を含む通信処理の全体概要の例について説明する。秘匿共有処理(S201)、パケット乱数送信処理(S202)、パケット乱数受信処理(S203)は図3を用いて既に説明したとおりである。同期補正時には、送信側同期処理(S204)として、送信制御装置110は、同期補正情報を生成し(S318)、生成した同期補正情報を送信する(S319)。
With reference to FIG. 10, an example of the configuration of the in-vehicle system 100 including the synchronization correction will be described. The transmission control apparatus 110 includes a synchronization correction information generation unit 116 and generates synchronization correction information. In addition, the reception control device 130 includes a synchronization correction unit 136 and performs synchronization correction related to the packet random number based on the synchronization correction information received from the transmission control device 110.
Next, an example of an overall outline of communication processing including synchronization processing between the transmission control device 110 and the reception control device 130 will be described with reference to FIG. The secret sharing process (S201), packet random number transmission process (S202), and packet random number reception process (S203) are as already described with reference to FIG. At the time of synchronization correction, as a transmission side synchronization process (S204), the transmission control device 110 generates synchronization correction information (S318), and transmits the generated synchronization correction information (S319).

これに対して、受信制御装置130は、受信側同期処理(S205)として、送信制御装置110から同期補正情報を受信し(S327)、受信した同期補正情報に基づき同期補正する(S328)。送信側同期処理(S204)と受信側同期処理(S205)について、それぞれ図12と図13を用いてさらに説明する。   On the other hand, the reception control device 130 receives the synchronization correction information from the transmission control device 110 (S327) as the reception-side synchronization processing (S205), and corrects the synchronization based on the received synchronization correction information (S328). The transmission side synchronization process (S204) and the reception side synchronization process (S205) will be further described with reference to FIGS. 12 and 13, respectively.

図11の例では、同期補正時の後にエンジン起動時へ戻っているが、実利用時へ戻ってもよい。また、予め設定された回数あるいは時間だけ実利用時が経過すると同期補正時へ移ってもよい。また、図示を省略した複数の受信制御装置へ送信制御装置110は1つの同期補正情報を送信してもよい。   In the example of FIG. 11, the process returns to the time of starting the engine after the synchronization correction, but may return to the actual use. Further, when the actual use time has elapsed by a preset number of times or time, the process may be shifted to the synchronization correction time. Further, the transmission control apparatus 110 may transmit one synchronization correction information to a plurality of reception control apparatuses not shown.

(送信側同期処理)
図12を参照し、送信側同期処理(S204)の例を説明する。送信側同期処理(S204)は、同期補正時に送信制御装置110によって行われる。まず、送信制御装置110の同期補正情報生成部116は、ベース乱数インデックスを取得し(S711)、取得したベース乱数インデックスを適切な量だけインクリメントした値を、同期補正後のベース乱数インデックスとして、同期補正後のベース乱数インデックスを同期補正情報として格納した通信パケットを生成する(S712)。
(Sender synchronization processing)
An example of the transmission side synchronization process (S204) will be described with reference to FIG. The transmission side synchronization process (S204) is performed by the transmission control apparatus 110 during the synchronization correction. First, the synchronization correction information generation unit 116 of the transmission control device 110 acquires a base random number index (S711), and uses a value obtained by incrementing the acquired base random number index by an appropriate amount as a base random number index after synchronization correction. A communication packet storing the corrected base random number index as synchronization correction information is generated (S712).

ここで、インクリメントする適切な量とは、例えば送信制御装置110が既に消費した乱数の量であってもよいし、この既に消費した乱数の量と取得したベース乱数インテックスの値との差分であってもよいし、予め設定された値であってもよい。制御装置110の通信部111は、生成した通信パケットを通信バス190経由で制御装置130へ送信する(S713)。   Here, the appropriate amount to be incremented may be, for example, the amount of random numbers already consumed by the transmission control device 110, or the difference between the amount of random numbers already consumed and the obtained base random number value. Alternatively, it may be a preset value. The communication unit 111 of the control device 110 transmits the generated communication packet to the control device 130 via the communication bus 190 (S713).

(受信側同期処理)
図13を参照して、受信側同期処理(S205)の例を説明する。受信側同期処理(S205)は、同期補正時に受信制御装置130によって行われる。受信制御装置130の通信部131は、通信バス190を介して、送信制御装置110が送信した同期補正情報を格納した通信パケットを受信する(S811)。同期補正部136は、受信した通信パケットから同期補正情報を取得し(S812)、取得した同期補正情報を同期補正後のベース乱数インデックスとして設定することにより、同期補正を行う(S813)。
(Receiver synchronization processing)
An example of the receiving side synchronization process (S205) will be described with reference to FIG. The reception side synchronization process (S205) is performed by the reception control device 130 at the time of synchronization correction. The communication unit 131 of the reception control device 130 receives the communication packet storing the synchronization correction information transmitted by the transmission control device 110 via the communication bus 190 (S811). The synchronization correction unit 136 acquires synchronization correction information from the received communication packet (S812), and performs synchronization correction by setting the acquired synchronization correction information as a base random number index after synchronization correction (S813).

以上で説明したように、送信制御装置110と受信制御装置130との間で通信エラーや真正でない通信パケット等により、両方のベース乱数インデックスが一致しなくなった同期ずれ情報が生じても、同期補正情報により、両方のベース乱数インデックスを一致させることができる。そして、送信制御装置110と受信制御装置130の通信を継続できる。   As described above, even if synchronization error information is generated between the transmission control device 110 and the reception control device 130 due to a communication error, an unauthentic communication packet, or the like, where both base random number indexes do not match, synchronization correction is performed. With information, both base random index can be matched. Then, communication between the transmission control device 110 and the reception control device 130 can be continued.

なお、本発明は、上述した実施例に限定されるものではなく、その要旨の範囲内で様々な変形が可能である。そのような場合においてもシステム全体において行う処理に本質的な変化はない。   In addition, this invention is not limited to the Example mentioned above, A various deformation | transformation is possible within the range of the summary. Even in such a case, there is no essential change in the processing performed in the entire system.

11…通信装置、12…入出力装置、14…CPU、15…メモリ、100…車載システム、110…送信制御装置、111…通信部、112…通信パケット生成部、113…パケット乱数送信制御部、114…マスク値テーブル記憶部、115…ベース乱数生成部、116…同期補正情報生成部、117…鍵管理部、118…ベース乱数記憶部、119…マスク値テーブル記憶部、130…受信制御装置、131…通信部、132…通信パケット検証部、133…パケット乱数生成部、135…ベース乱数生成部、136…同期補正部、137…鍵管理部、138…ベース乱数記憶部、139…マスク値テーブル記憶部、140…受信制御装置   DESCRIPTION OF SYMBOLS 11 ... Communication apparatus, 12 ... Input / output device, 14 ... CPU, 15 ... Memory, 100 ... In-vehicle system, 110 ... Transmission control apparatus, 111 ... Communication part, 112 ... Communication packet generation part, 113 ... Packet random number transmission control part, DESCRIPTION OF SYMBOLS 114 ... Mask value table storage part, 115 ... Base random number generation part, 116 ... Synchronization correction information generation part, 117 ... Key management part, 118 ... Base random number storage part, 119 ... Mask value table storage part, 130 ... Reception control apparatus, 131: Communication unit, 132: Communication packet verification unit, 133: Packet random number generation unit, 135 ... Base random number generation unit, 136 ... Synchronization correction unit, 137 ... Key management unit, 138 ... Base random number storage unit, 139 ... Mask value table Storage unit, 140 ... reception control device

Claims (6)

複数の制御装置を通信可能に接続する車載システムであって、An in-vehicle system that connects a plurality of control devices in a communicable manner,
前記複数の制御装置の中の第1の制御装置は、The first controller among the plurality of controllers is
複数のベース乱数を格納する第1のベース乱数記憶部と、A first base random number storage unit for storing a plurality of base random numbers;
パケット識別子に紐づくマスク値を、パケット識別子に対応させてマスク値テーブルとして格納する第1のマスク値記憶部と、A first mask value storage unit that stores a mask value associated with a packet identifier as a mask value table in association with the packet identifier;
前記第1のベース乱数記憶部のベース乱数の格納場所を示す第1のインデックスを用いて、前記第1のベース乱数記憶部からパケット乱数の長さ分だけのベース乱数を取得し、送信するパケットの識別子から前記第1のマスク値記憶部に格納されたマスク値を取得し、取得したベース乱数とマスク値の排他的論理和によりパケット乱数を生成する第1のパケット乱数生成部と、A packet for obtaining and transmitting a base random number corresponding to the length of the packet random number from the first base random number storage unit using a first index indicating a storage location of the base random number in the first base random number storage unit A first packet random number generation unit that obtains a mask value stored in the first mask value storage unit from the identifier and generates a packet random number by exclusive OR of the acquired base random number and the mask value;
通信するデータに前記第1のパケット乱数生成部により生成されたパケット乱数を付加した通信パケットを送信する第1の通信部と、を有し、A first communication unit that transmits a communication packet obtained by adding the packet random number generated by the first packet random number generation unit to data to be communicated, and
前記複数の制御装置の中の第2の制御装置は、The second controller among the plurality of controllers is
前記第1のベース乱数記憶部と同一のベース乱数を格納する第2のベース乱数記憶部と、A second base random number storage unit that stores the same base random number as the first base random number storage unit;
前記第1のマスク値記憶部と同一のマスク値テーブルを格納する第2のマスク値記憶部と、A second mask value storage unit that stores the same mask value table as the first mask value storage unit;
前記第1の通信部から通信パケットを受信する第2の通信部と、A second communication unit that receives a communication packet from the first communication unit;
前記第2の通信部により受信した通信パケットからパケット乱数とパケット識別子を取得し、取得したパケット識別子と前記第2のマスク値記憶部に格納されたマスク値に基づいて、パケットの識別子に対応するマスク値を取得し、前記第1のインデックスと同一の第2のインデックスを用いて、前記第2のベース乱数記憶部からパケット乱数の長さ分だけのベース乱数を取得し、取得したベース乱数とマスク値の排他的論理和によりパケット乱数を生成する第2のパケット乱数生成部と、A packet random number and a packet identifier are acquired from the communication packet received by the second communication unit, and the packet identifier is determined based on the acquired packet identifier and the mask value stored in the second mask value storage unit. A mask value is acquired, a base random number corresponding to the length of the packet random number is acquired from the second base random number storage unit using a second index that is the same as the first index, and the acquired base random number A second packet random number generator for generating a packet random number by exclusive OR of mask values;
前記第2のパケット乱数生成部によって生成されたパケット乱数と前記第2の通信部より受信されたパケット乱数とにより通信パケットの検証を行う通信パケット検証部とを有することを特徴とする車載システム。An in-vehicle system, comprising: a communication packet verification unit that verifies a communication packet using a packet random number generated by the second packet random number generation unit and a packet random number received from the second communication unit.
前記第1の制御装置は、複数のベース乱数を生成するベース乱数生成部と、パケット識別子毎にパケット識別子に紐づくマスク値を生成するマスク値生成部とを有し、
前記第1の通信部は、
車両のエンジン起動時に、前記ベース乱数生成部の生成したベース乱数と前記マスク値生成部の生成したマスク値を前記第2の制御装置へ送信し、
前記第2の通信部は、
前記ベース乱数生成部の生成したベース乱数と前記マスク値生成部の生成したマスク値を前記第1の制御装置から受信し、
前記第2のベース乱数記憶部は、前記第2の通信部が受信したベース乱数が格納される
前記第2のマスク値記憶部は、前記第2の通信部が受信したマスク値が格納されることを特徴とする請求項に記載の車載システム。
The first control device includes a base random number generation unit that generates a plurality of base random numbers, and a mask value generation unit that generates a mask value associated with the packet identifier for each packet identifier,
The first communication unit is
When starting the engine of the vehicle, the base random number generated by the base random number generator and the mask value generated by the mask value generator are transmitted to the second control device,
The second communication unit is
Receiving the base random number generated by the base random number generator and the mask value generated by the mask value generator from the first control device;
The second base random number storage unit stores a base random number received by the second communication unit. The second mask value storage unit stores a mask value received by the second communication unit. The in-vehicle system according to claim 1 .
前記第1の制御装置は、
前記第1のベース乱数記憶部に格納された複数のベース乱数の取得位置を特定するベース乱数インデックスに基づき同期情報を生成する同期情報生成部をさらに備え、
前記第1の通信部は、
前記生成された同期情報を前記第2の制御装置へ送信し、
前記第2の通信部は、
前記生成された同期情報を前記第1の制御装置から受信し、
前記第2の制御装置は、
前記第2のベース乱数記憶部に格納された複数のベース乱数の取得位置を特定するベース乱数インデックスを前記第2の通信部が受信した同期情報に基づき同期する同期部を備えたことを特徴とする請求項に記載の車載システム。
The first control device includes:
A synchronization information generating unit that generates synchronization information based on a base random number index that specifies acquisition positions of a plurality of base random numbers stored in the first base random number storage unit;
The first communication unit is
Transmitting the generated synchronization information to the second control device;
The second communication unit is
Receiving the generated synchronization information from the first control device;
The second control device includes:
A synchronization unit that synchronizes a base random number index that specifies acquisition positions of a plurality of base random numbers stored in the second base random number storage unit based on synchronization information received by the second communication unit is provided. The in-vehicle system according to claim 2 .
第1の制御装置が第2の制御装置へ制御情報を送信する車載システムの制御方法であって、
前記第1の制御装置は、
第1のCPUと、
複数のベース乱数と、パケットの複数の識別子それぞれに紐づけてマスク値を格納する第1のメモリを備え、
前記第1のCPUは、
前記第1のメモリのベース乱数の格納場所を示す第1のインデックスを用いて、前記第1のメモリからパケット乱数の長さ分だけのベース乱数を取得し、送信するパケットの識別子から前記第1のメモリに格納されたマスク値に基づいて、送信するパケットの識別子に対応するマスク値を取得し、取得したベース乱数とマスク値の排他的論理和により第1のパケット乱数を生成し、
通信するデータに前記第1のパケット乱数を付加した通信パケットを前記第2の制御装置に送信し、
前記第2の制御装置は、
第2のCPUと、
前記第1のメモリと同一の複数のベース乱数と、前記第1のメモリと同一のパケットの複数の識別子それぞれに紐づけてマスク値を格納する第2のメモリを備え、
前記第2のCPUは、
前記第1の制御装置から受信した通信パケットからパケット乱数とパケット識別子を取得し、取得したパケット識別子に基づいて前記第2のメモリに格納されたパケット識別子に対応するマスク値を取得し、前記第1のインデックスと同一の第2のインデックスを用いて、前記第2のメモリからパケット乱数の長さ分だけのベース乱数を取得し、取得したベース乱数とマスク値の排他的論理和により第2のパケット乱数を生成し、
前記第2のパケット乱数と前記第1のパケット乱数とにより通信パケットの検証を行うことを特徴とする車載システムの制御方法。
A control method of an in-vehicle system in which a first control device transmits control information to a second control device,
The first control device includes:
A first CPU;
A first memory for storing a mask value associated with each of a plurality of base random numbers and a plurality of identifiers of a packet;
The first CPU is
Using the first index indicating the storage location of the base random number of the first memory, a base random number corresponding to the length of the packet random number is obtained from the first memory, and the first random number is obtained from the identifier of the packet to be transmitted. A mask value corresponding to the identifier of the packet to be transmitted is acquired based on the mask value stored in the memory of the first, and a first packet random number is generated by exclusive OR of the acquired base random number and the mask value;
Transmitting a communication packet obtained by adding the first packet random number to data to be communicated to the second control device;
The second control device includes:
A second CPU;
A plurality of base random numbers that are the same as the first memory, and a second memory that stores a mask value in association with each of a plurality of identifiers of the same packet as the first memory,
The second CPU is
A packet random number and a packet identifier are acquired from the communication packet received from the first control device, a mask value corresponding to the packet identifier stored in the second memory is acquired based on the acquired packet identifier, and the first A base random number corresponding to the length of the packet random number is obtained from the second memory using a second index that is the same as the first index, and a second random number is obtained by exclusive OR of the obtained base random number and the mask value. Generate packet random number,
A control method for an in-vehicle system, wherein a communication packet is verified using the second packet random number and the first packet random number.
前記第1の制御装置は、複数のベース乱数を生成するベース乱数生成部と、パケット識別子毎にパケット識別子に紐づくマスク値を生成するマスク値生成部とを有し、The first control device includes a base random number generation unit that generates a plurality of base random numbers, and a mask value generation unit that generates a mask value associated with the packet identifier for each packet identifier,
車両のエンジン起動時に、前記ベース乱数生成部の生成したベース乱数と前記マスク値生成部の生成したマスク値を前記第2の制御装置へ送信し、When starting the engine of the vehicle, the base random number generated by the base random number generator and the mask value generated by the mask value generator are transmitted to the second control device,
前記第2の制御装置は、The second control device includes:
前記ベース乱数生成部の生成したベース乱数と前記マスク値生成部の生成したマスク値を前記第1の制御装置から受信する第2の通信部を有し、A second communication unit that receives the base random number generated by the base random number generation unit and the mask value generated by the mask value generation unit from the first control device;
前記第2のメモリは、前記第2の通信部が受信したベース乱数が格納され、The second memory stores a base random number received by the second communication unit,
前記第2のメモリは、前記第2の通信部が受信したマスク値が格納されることを特徴とする請求項4に記載の車載システムの制御方法。The on-board system control method according to claim 4, wherein the second memory stores a mask value received by the second communication unit.
前記第1の制御装置は、The first control device includes:
前記第1のメモリに格納された複数のベース乱数の取得位置を特定するベース乱数インデックスに基づき同期情報を生成し、Generating synchronization information based on a base random number index that identifies acquisition positions of a plurality of base random numbers stored in the first memory;
前記生成された同期情報を前記第2の制御装置へ送信し、Transmitting the generated synchronization information to the second control device;
前記第2の制御装置は、The second control device includes:
前記生成された同期情報を前記第1の制御装置から受信し、Receiving the generated synchronization information from the first control device;
前記第2のメモリに格納された複数のベース乱数の取得位置を特定するベース乱数インデックスを前記第2の通信部が受信した同期情報に基づき同期することを特徴とする請求項5に記載の車載システムの制御方法。The in-vehicle system according to claim 5, wherein a base random number index specifying a plurality of base random number acquisition positions stored in the second memory is synchronized based on synchronization information received by the second communication unit. How to control the system.
JP2015139116A 2015-07-10 2015-07-10 In-vehicle system, control device and control method thereof Active JP6454614B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015139116A JP6454614B2 (en) 2015-07-10 2015-07-10 In-vehicle system, control device and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015139116A JP6454614B2 (en) 2015-07-10 2015-07-10 In-vehicle system, control device and control method thereof

Publications (2)

Publication Number Publication Date
JP2017021219A JP2017021219A (en) 2017-01-26
JP6454614B2 true JP6454614B2 (en) 2019-01-16

Family

ID=57888092

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015139116A Active JP6454614B2 (en) 2015-07-10 2015-07-10 In-vehicle system, control device and control method thereof

Country Status (1)

Country Link
JP (1) JP6454614B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7201559B2 (en) * 2019-09-17 2023-01-10 本田技研工業株式会社 In-vehicle communication relay device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2441392C (en) * 2001-04-03 2009-11-17 Mitsubishi Denki Kabushiki Kaisha Encrypting apparatus
JP2003008593A (en) * 2001-06-21 2003-01-10 Sharp Corp Pseudo random number generator, communication apparatus, network system and pseudo random number generating method
JP2003283489A (en) * 2002-03-20 2003-10-03 Hitachi Ltd Packet authentication system, authentication method, group management server and group member device
JP4219965B2 (en) * 2006-09-20 2009-02-04 株式会社Psd One-time ID authentication
JP6420176B2 (en) * 2015-02-26 2018-11-07 ルネサスエレクトロニクス株式会社 Communication system and communication apparatus

Also Published As

Publication number Publication date
JP2017021219A (en) 2017-01-26

Similar Documents

Publication Publication Date Title
US11606341B2 (en) Apparatus for use in a can system
CN110073634B (en) Data conversion system and method
Hazem et al. Lcap-a lightweight can authentication protocol for securing in-vehicle networks
JP7008725B2 (en) Methods and systems for improved authenticated encryption in counter-based cryptosystems
US9252945B2 (en) Method for recognizing a manipulation of a sensor and/or sensor data of the sensor
CN110505193B (en) Authentication encryption for vehicle against random number abuse
US5297208A (en) Secure file transfer system and method
US10461938B2 (en) Method for manipulation protection
WO2013065689A1 (en) Message authentication method in communication system and communication system
CN112910650B (en) Authenticated encryption and decryption method and system
US10686587B2 (en) Method for safeguarding the information security of data transmitted via a data bus and data bus system
US11552781B2 (en) Using error detection bits for cryptographic integrity and authentication
US10581811B2 (en) Method and system for asymmetric key derivation
US10313131B2 (en) Secured daisy chain communication
JP6454614B2 (en) In-vehicle system, control device and control method thereof
CN107534552B (en) Method executed at server device, client device and server device
GB2459735A (en) Hybrid asymmetric / symmetric encryption scheme which obviates padding
EP3337087A1 (en) Method for synchronized signature with additive rsa key splitting using early floating exponent negotiation
CN112152790A (en) Data encryption method, data decryption method, data encryption device and data decryption device
CN110620648A (en) Method and apparatus for processing data
EP3012772A1 (en) Method for encryption verification and decryption verification and electronic apparatus suitable for small memory implementation environment
JP2017169017A (en) Communication network device and communication method for vehicle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180829

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180911

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181017

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181217

R150 Certificate of patent or registration of utility model

Ref document number: 6454614

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250