JP2001202266A - Method for inspecting on-vehicle control unit - Google Patents

Method for inspecting on-vehicle control unit

Info

Publication number
JP2001202266A
JP2001202266A JP2000012803A JP2000012803A JP2001202266A JP 2001202266 A JP2001202266 A JP 2001202266A JP 2000012803 A JP2000012803 A JP 2000012803A JP 2000012803 A JP2000012803 A JP 2000012803A JP 2001202266 A JP2001202266 A JP 2001202266A
Authority
JP
Japan
Prior art keywords
sum value
control unit
ecu
microcomputer
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000012803A
Other languages
Japanese (ja)
Inventor
Kiyonari Nakayama
聖也 中山
Kenji Kamiya
健治 神谷
Chizuru Aoki
千鶴 青木
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2000012803A priority Critical patent/JP2001202266A/en
Publication of JP2001202266A publication Critical patent/JP2001202266A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To rightly inspect an on-vehicle control unit and to prevent illegal alteration as the result. SOLUTION: An ECU 10 is provided with a widely known microcomputer 11, which is provided with a CPU 12 forming the center of various kinds of control, a flash memory 13 which can be erased and written electrically, and the other input/output circuit, etc., not shown in the figure. An external tool 20 is also provided with a widely known microcomputer 11 consisting of a CPU, a memory, an input/output circuit, etc. On judging (inspecting) the authenticity of the ECU 10, the tool 20 first transmits transmission data including a sum value calculation command and a random number to the ECU 10. The ECU 10 calculates the sum value of data in the memory 13 and enciphers the sum value in accordance with the random number by using a prescribed enciphering algorithm. After then, the enciphered sum value is transmitted to the tool 20, which compares and judges a decoded sum value and a previously registered true sum value to judge whether the ECU 10 is normal or abnormal by the result of it.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、車載制御ユニット
の検査方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for inspecting a vehicle-mounted control unit.

【0002】[0002]

【従来の技術】この種の従来技術として、特開平11−
132097号公報の「車両制御用メモリ書き換え装
置」がある。同公報の装置は、外部ツールにより電気的
に消去及び書き込み可能な制御メモリ(フラッシュメモ
リ)を搭載したECU(車載制御ユニット)を備え、書
き換え許可された時にのみ前記制御メモリに対するデー
タ書き換えが実施される。また、この装置は、制御メモ
リが記憶するソフトウエア(制御プログラム)が正しい
ことを検査するものであり、その特徴として、 ・予め記憶しておいた制御メモリのサム値(真値)と、
ECUで算出したサム値とを共に表示し、それらを比較
することで正偽判定を行う。 ・上記サム値の比較は外部ツールの内部で行い、その結
果(正偽)のみを返信する。 ・イグニッションキースイッチのOFFからONへの切
換後にサム値の計算を行う。といった処理を実行する。
2. Description of the Related Art Japanese Patent Laid-Open Publication No.
Japanese Patent Application Laid-Open No. 132097 discloses a “memory rewriting device for vehicle control”. The apparatus disclosed in the publication includes an ECU (vehicle control unit) equipped with a control memory (flash memory) that can be electrically erased and written by an external tool, and data is rewritten to the control memory only when rewriting is permitted. You. Further, this device checks that the software (control program) stored in the control memory is correct. The features include: a sum value (true value) of the control memory stored in advance;
The sum value calculated by the ECU is displayed together, and a comparison is made to determine whether the sum is correct. -The above sum value is compared inside the external tool, and only the result (true or false) is returned. • Calculate the sum value after switching the ignition key switch from OFF to ON. Is performed.

【0003】[0003]

【発明が解決しようとする課題】上記公報の従来技術で
は、ECUで計算したサム値を外部ツールに対してその
まま送信する。そのため、ECUと外部ツールとの通信
データをモニタすることにより、ECUにより算出した
正しいサム値を容易に知り得ることができる。
In the prior art disclosed in the above publication, the sum value calculated by the ECU is directly transmitted to an external tool. Therefore, by monitoring communication data between the ECU and the external tool, the correct sum value calculated by the ECU can be easily obtained.

【0004】また、制御メモリのサム値は、ソフトウエ
アを書き換えなければ変化しないものであるため、外部
チェッカに対して正しいサム値を常に送信するような不
正なプログラムを不正改造者が作成し、それをECUに
組み込めば、正規のサム値算出アルゴリズムを知らなく
ても容易に正規ECUとしてなりすますことが可能とな
る。これは、ECU側で正偽判定を行う構成でも同様で
ある。すなわち、モニタしたサム値を返答する偽プログ
ラムを不正改造者が作成することにより、不正改造され
た偽ECUであっても、外部ツールは正しいサム値(常
に同じ)が返答されたと認識し、正しいECUであると
判断してしまう。
Further, since the sum value of the control memory does not change unless the software is rewritten, an unauthorized remodeler creates an unauthorized program which always transmits a correct sum value to an external checker. By incorporating it in the ECU, it becomes possible to easily impersonate the legitimate ECU without knowing the legitimate sum value calculation algorithm. The same applies to a configuration in which the ECU makes a true / false determination. That is, by creating a fake program that replies the monitored sum value, even if the fake ECU has been falsified, the external tool recognizes that the correct sum value (always the same) has been returned, and The ECU is determined to be ECU.

【0005】本発明は、上記問題に着目してなされたも
のであって、その目的とするところは、車載制御ユニッ
トを正しく検査し、ひいては不正改造の防止を図ること
ができる車載制御ユニットの検査方法を提供することで
ある。
The present invention has been made in view of the above-mentioned problems, and has as its object to inspect a vehicle-mounted control unit capable of correctly inspecting the vehicle-mounted control unit and, thereby, preventing unauthorized modification. Is to provide a way.

【0006】[0006]

【課題を解決するための手段】請求項1に記載の車載制
御ユニットの検査方法では、(1)乱数を発生させ、そ
の乱数をサム値の算出指令と共に外部ツールから制御ユ
ニットへ送信する第1のステップ、(2)前記メモリの
サム値を算出すると共に、該サム値を前記乱数に応じて
暗号化する第2のステップ、(3)前記暗号化したデー
タを外部ツールに送信する第3のステップ、(4)外部
ツールで受信したデータを復号化すると共に、そのデー
タ中のサム値を予め用意された真のサム値と比較し、そ
の比較判定の結果から車載制御ユニットを検査する第4
のステップ、といった各ステップを順に実施するので、
不正改造を行おうとする者に正しいサム値が漏れ知れる
可能性は低くなる。また、仮に正規の制御ユニットが不
正改造され、メモリの正しいサム値を外部ツール側に返
信できるような不正なプログラムが制御ユニットに組み
込まれたとしても、外部ツールでは、暗号化データを受
信すると共にその暗号化データを復号化した後、サム値
の比較判定を行うので、不正改造された制御ユニットが
正規な制御ユニットとしてなりすますことが極めて困難
になる。その結果、車載制御ユニットを正しく検査し、
ひいては不正改造の防止を図ることができる。
According to the first aspect of the present invention, there is provided a method for inspecting an on-vehicle control unit, wherein (1) a random number is generated, and the random number is transmitted from an external tool to the control unit together with a sum value calculation command. (2) calculating a sum value of the memory and encrypting the sum value according to the random number; and (3) transmitting the encrypted data to an external tool. (4) Decoding the data received by the external tool, comparing the sum value in the data with a true sum value prepared in advance, and inspecting the vehicle-mounted control unit based on the result of the comparison.
Steps are performed in order, so
The possibility that a correct sum value is leaked to a person who intends to perform unauthorized modification is reduced. Even if the authorized control unit is tampered with and an unauthorized program that can return the correct sum value of the memory to the external tool is incorporated in the control unit, the external tool receives the encrypted data and After decrypting the encrypted data, the comparison of the sum value is performed, so that it is extremely difficult to impersonate the illegally modified control unit as a legitimate control unit. As a result, the onboard control unit is correctly inspected,
As a result, unauthorized modification can be prevented.

【0007】上記発明は特に、フラッシュメモリ等、電
気的に書き換え可能な不揮発性メモリにて車載制御ユニ
ット内のメモリが構成される場合に有効である(請求項
2)。
The above invention is particularly effective when the memory in the vehicle-mounted control unit is constituted by an electrically rewritable nonvolatile memory such as a flash memory (claim 2).

【0008】請求項3に記載の発明では、前記第4のス
テップにおいてサム値が不一致となった場合、前記第1
のステップに戻って新たに乱数を設定し、それに続く第
2〜第4のステップを再度実施する。これにより、一時
的な通信異常が原因で正しく検査されなかった場合に
も、再通信により適正な検査が実施できる。またここ
で、乱数を再設定するために制御ユニットと外部ツール
との間の送受信データはその都度異なるので、通信線が
モニタされることを想定しても、正しいサム値が漏れ知
れる可能性は極めて低くなる。
[0010] In the invention according to claim 3, when the sum values do not match in the fourth step, the first
Returning to the step, a new random number is set, and the subsequent second to fourth steps are performed again. Thereby, even when the inspection is not performed correctly due to a temporary communication abnormality, an appropriate inspection can be performed by re-communication. In addition, here, since the transmission / reception data between the control unit and the external tool is different each time in order to reset the random number, even if it is assumed that the communication line is monitored, there is a possibility that a correct sum value may be leaked. Extremely low.

【0009】請求項4に記載の発明では、 ・前記第1のステップでは、複数の暗号化アルゴリズム
の中から一つを指定してそれを表す識別データを、乱数
とサム値の算出指令と共に外部ツールから制御ユニット
へ送信し、 ・前記第2のステップでは、前記識別データによる指定
通りの暗号化アルゴリズムを使って暗号化を行い、 ・その後、前記第4のステップでは、前記指定した暗号
化アルゴリズムに対応する復号化の算出式を取り出して
受信データを復号化し、サム値を抽出する。
According to the invention of claim 4, in the first step, one of a plurality of encryption algorithms is designated, and identification data representing the designation is externally transmitted together with a random number and a sum value calculation command. Transmitting from the tool to the control unit; in the second step, encryption is performed using an encryption algorithm specified by the identification data; and thereafter, in the fourth step, the specified encryption algorithm is used. , The decoding formula corresponding to is extracted, the received data is decoded, and the sum value is extracted.

【0010】かかる場合、複数の暗号化アルゴリズムを
択一的に使うことにより、不正改造者に暗号化アルゴリ
ズムが知られたとしても、実際に使われた暗号化アルゴ
リズムに対応させてサム値を解明するのは非常に困難と
なる。それ故、車載制御ユニットの不正改造を、より一
層困難なものとすることができる。
In such a case, by using a plurality of encryption algorithms alternatively, even if the encryption algorithm is known to an unauthorized alterator, the sum value is clarified corresponding to the actually used encryption algorithm. It will be very difficult to do. Therefore, unauthorized modification of the vehicle-mounted control unit can be made more difficult.

【0011】請求項5に記載の発明では、車載制御ユニ
ットは、電気的に書き換え可能な不揮発性メモリを実装
した第1マイクロコンピュータと、書き換え不可能なR
OMを実装した第2マイクロコンピュータとを備え、第
2マイクロコンピュータのROMに、前記不揮発性メモ
リのサム値を暗号化するための暗号化アルゴリズムを記
憶させておく。つまり、書き換え不可能な第2マイクロ
コンピュータのROMにサム値の暗号化アルゴリズムを
配置することにより、不正改造防止が更に強化される。
According to the fifth aspect of the present invention, the on-vehicle control unit comprises a first microcomputer mounted with an electrically rewritable nonvolatile memory and a non-rewritable R
A second microcomputer having an OM mounted therein, and an encryption algorithm for encrypting a sum value of the nonvolatile memory is stored in a ROM of the second microcomputer. That is, by arranging the encryption algorithm of the sum value in the ROM of the non-rewritable second microcomputer, the unauthorized modification prevention is further enhanced.

【0012】かかる請求項5の発明では、請求項6に記
載したように、第2のステップを実現する上で、前記不
揮発性メモリのサム値を第1マイクロコンピュータから
第2マイクロコンピュータへ送信するステップと、第2
マイクロコンピュータにて前記ROM内の暗号化アルゴ
リズムでサム値を暗号化した後、その暗号化データを第
1マイクロコンピュータに返信するステップと、を設け
ると良い。
In the fifth aspect of the present invention, in order to realize the second step, the sum value of the nonvolatile memory is transmitted from the first microcomputer to the second microcomputer. Step and second
After the microcomputer has encrypted the sum value with the encryption algorithm in the ROM, the microcomputer may return the encrypted data to the first microcomputer.

【0013】[0013]

【発明の実施の形態】(第1の実施の形態)この発明を
具体化した本実施の形態では、エンジン制御等を司るE
CUにて車載制御ユニットを構成しており、このECU
に対して外部ツールを接続し、当該ECUの検査やデー
タの交換等を行うこととしている。以下、その詳細を図
面に従って説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) In a first embodiment of the present invention, an E controlling the engine control and the like is provided.
The CU constitutes an onboard control unit, and this ECU
, An external tool is connected to the ECU to perform inspection of the ECU, exchange of data, and the like. Hereinafter, the details will be described with reference to the drawings.

【0014】図1は、制御システムの概略構成を示すブ
ロック図である。本システムにおいて、ECU10は周
知のマイクロコンピュータ(以下、マイコンという)1
1を備え、マイコン11は、予め用意されている制御プ
ログラム等を用いてエンジンの各種制御を実施する。マ
イコン11は、各種制御の中枢をなすCPU12、電気
的に消去及び書き込み可能なフラッシュメモリ13、そ
の他図示しないRAMや入出力回路等を備える。
FIG. 1 is a block diagram showing a schematic configuration of the control system. In this system, the ECU 10 is a well-known microcomputer (hereinafter referred to as a microcomputer) 1.
The microcomputer 11 performs various controls of the engine using a control program prepared in advance. The microcomputer 11 includes a CPU 12 serving as a center of various controls, a flash memory 13 that can be electrically erased and written, and a RAM and an input / output circuit (not shown).

【0015】外部ツール20も同様に、CPU、メモ
リ、入出力回路等からなる周知のマイコン21を備え
る。この外部ツール20は、ECU10の正偽判定等の
検査や、同ECU10内のフラッシュメモリ13のデー
タ書き換えに際し、通信線L1を介してECU10に接
続される。これにより、ECU10と外部ツール20と
の間でシリアル通信によるデータのやり取りが行われ
る。
Similarly, the external tool 20 includes a well-known microcomputer 21 including a CPU, a memory, an input / output circuit, and the like. The external tool 20 is connected to the ECU 10 via the communication line L1 when checking whether the ECU 10 is correct or false or when rewriting data in the flash memory 13 in the ECU 10. As a result, data is exchanged between the ECU 10 and the external tool 20 by serial communication.

【0016】ECU10の正偽判定(検査)の概要を、
図2を用いて説明する。かかる場合、フラッシュメモリ
13内のデータのサム値と既知の正しいサム値とが比較
され、両者が一致すれば、ECU10が正規なものであ
ると判断される。このとき、外部ツール20側では乱数
を発生させてそれをECU10に送信する一方、ECU
10側では、その内部に予め記憶された暗号化アルゴリ
ズムを用い、サム値を暗号化して外部ツール20に送信
するようになっている。なお図2では、処理順序を表す
ため、(1)〜(6)の連続番号を付している。
The outline of the true / false judgment (inspection) of the ECU 10 is as follows.
This will be described with reference to FIG. In such a case, the sum value of the data in the flash memory 13 is compared with a known correct sum value, and if they match, the ECU 10 is determined to be legitimate. At this time, on the external tool 20 side, a random number is generated and transmitted to the ECU 10, while a random number is generated.
On the 10 side, the sum value is encrypted using an encryption algorithm stored in advance therein and transmitted to the external tool 20. Note that, in FIG. 2, in order to represent the processing order, serial numbers (1) to (6) are assigned.

【0017】先ず始めに、サム値の算出指令と乱数Rt
とを含む送信データを通信線L1を介して外部ツール2
0からECU10に送信する(図の(1))。このと
き、外部ツール20の送信データは、例えば図5(a)
のフレーム構成を有し、このうち、送信ヘッダは送信元
ID、送信先ID及びコマンドコードにて構成され、デ
ータは送信データID、乱数、本送信データのチェック
サム(CS)にて構成されている。
First, a sum value calculation command and a random number Rt are calculated.
Is transmitted to the external tool 2 via the communication line L1.
It transmits from 0 to the ECU 10 ((1) in the figure). At this time, the transmission data of the external tool 20 is, for example, as shown in FIG.
The transmission header is composed of a transmission source ID, a transmission destination ID, and a command code, and the data is composed of a transmission data ID, a random number, and a checksum (CS) of the transmission data. I have.

【0018】ECU10側では、フラッシュメモリ13
内のデータのサム値Xsumを算出すると共に、所定の
暗号化アルゴリズムを用い、乱数Rtに応じてサム値X
sumを暗号化する(図の(2),(3))。つまり、
算出式Xt=f(Xsum,Rt)により、暗号化した
サム値Xt(以下には便宜上、暗号化サム値Xtと言
う)を算出する。
On the ECU 10 side, the flash memory 13
The sum value Xsum of the data within is calculated, and the sum value Xsum is calculated according to the random number Rt using a predetermined encryption algorithm.
The sum is encrypted ((2), (3) in the figure). That is,
An encrypted sum value Xt (hereinafter referred to as an encrypted sum value Xt for convenience) is calculated by a calculation formula Xt = f (Xsum, Rt).

【0019】その後、暗号化サム値Xtを通信線L1を
介して外部ツール20に送信する(図の(4))。この
とき、外部ツール20の受信データは、例えば図5
(b)のフレーム構成を有し、このうち、送信ヘッダは
送信元ID、送信先ID及びコマンドコードにて構成さ
れ、データは送信データID、暗号化データ、本送信デ
ータのチェックサム(CS)にて構成されている。
Thereafter, the encrypted sum value Xt is transmitted to the external tool 20 via the communication line L1 ((4) in the figure). At this time, the received data of the external tool 20 is, for example, as shown in FIG.
(B), the transmission header is composed of a transmission source ID, a transmission destination ID, and a command code, and the data is a transmission data ID, encrypted data, and a checksum (CS) of the main transmission data. It consists of.

【0020】外部ツール20では、算出式 Xsum=f-1(Xt,Rt) により、暗号化サム値Xtを復号化し、サム値Xsum
を算出する(図の(5))。その後、前記の如く算出し
たサム値Xsumと、予め登録されている真のサム値X
refとを比較判定する(図の(6))。そして、両者
が一致すれば、ECU10が正規ECUであると判断
し、不一致であれば、ECU10が偽ECUであると判
断する。
In the external tool 20, the encrypted sum value Xt is decrypted by the calculation formula Xsum = f-1 (Xt, Rt), and the sum value Xsum is calculated.
Is calculated ((5) in the figure). Thereafter, the sum value Xsum calculated as described above and the pre-registered true sum value Xsum
ref is compared ((6) in the figure). If they match, the ECU 10 is determined to be a legitimate ECU, and if they do not match, the ECU 10 is determined to be a fake ECU.

【0021】以下には、外部ツール20によるECU1
0の正偽判定に際し、ECU10及び外部ツール20内
の各マイコン11,21により実施される処理の流れを
図3及び図4のフローチャートに従い説明する。始め
に、外部ツール20の処理の流れを図3のフローチャー
トで説明する。
Hereinafter, the ECU 1 using the external tool 20 will be described.
The flow of processing executed by the microcomputer 10 and the microcomputers 21 and 21 in the ECU 10 and the external tool 20 at the time of determining whether the value is 0 will be described with reference to the flowcharts of FIGS. First, the flow of processing of the external tool 20 will be described with reference to the flowchart of FIG.

【0022】例えば修理工場等において作業者が外部ツ
ール20を操作することで図3の処理がスタートし、先
ずステップ101では、乱数発生処理を実行して乱数R
tを設定し、続くステップ102では、コマンド送信を
実施する。すなわち、乱数Rtをサム値算出指令と共に
ECU10に送信する。また、ステップ103ではタイ
マセットを行う。このステップ101〜103が通信前
処理に相当する。
For example, when the operator operates the external tool 20 at a repair shop or the like, the processing shown in FIG. 3 starts.
In step 102, a command is transmitted. That is, the random number Rt is transmitted to the ECU 10 together with the sum value calculation command. In step 103, a timer is set. Steps 101 to 103 correspond to pre-communication processing.

【0023】その後、この外部ツール20では、コマン
ド受信に対するECU10からの受信確認を行う。すな
わち、タイムアウトしていないことを条件に(ステップ
104がNO)、ステップ105では、前記ステップ1
02のコマンド送信に対する応答をECU10から受信
したか否かを判別する。応答が無いままタイムアウトし
た場合(ステップ104がYES)、ステップ102に
戻り、再度同じ乱数を用いてコマンド送信を実施する。
そして、タイマセット、受信確認の各処理を再び実施す
る。
Thereafter, the external tool 20 confirms reception of the command from the ECU 10. In other words, on condition that a timeout has not occurred (NO in step 104), in step 105, step 1
It is determined whether a response to the 02 command transmission has been received from the ECU 10. If a timeout occurs without a response (YES in step 104), the process returns to step 102, and the command is transmitted again using the same random number.
Then, the timer setting and reception confirmation processes are performed again.

【0024】なお、コマンド再送信の回数を予め制限し
ておき、例えばタイムアウトが3回繰り返されると、通
信異常であると判断し、その旨のコードを記憶すると共
に以降の処理を中止しても良い。また、1回でもタイム
アウトになると、その時点で通信異常と判断しても良
い。
If the number of command retransmissions is limited in advance, for example, if the timeout is repeated three times, it is determined that a communication error has occurred, a code to that effect is stored, and the subsequent processing is stopped. good. Further, if a timeout occurs even once, a communication error may be determined at that time.

【0025】コマンド送信に対する応答を受信すると、
ステップ106に進み、以降の受信後処理を実施する。
すなわち、ステップ106では、ECU10から受信し
た暗号化サム値Xtを復号化し、サム値Xsumの生デ
ータを抽出する。また、続くステップ107では、予め
登録されている真のサム値Xrefを取り出す。
When a response to the command transmission is received,
Proceed to step 106 to perform the subsequent post-reception processing.
That is, in step 106, the encrypted sum value Xt received from the ECU 10 is decrypted, and raw data of the sum value Xsum is extracted. In step 107, a true sum value Xref registered in advance is extracted.

【0026】その後、ステップ108では、サム値Xs
um(生データ)と真のサム値Xrefとを比較し、両
サム値が一致すると判別されれば(ステップ109がY
ES)、ECU正常である旨を判断する。
Thereafter, at step 108, the sum value Xs
um (raw data) and the true sum value Xref are compared, and if it is determined that both sum values match (step 109 is Y
ES), it is determined that the ECU is normal.

【0027】また、両サム値が不一致であれば(ステッ
プ109がNO)、ステップ110で予め定めた規定回
数だけ通信を繰り返したか否かを判別する。NOであれ
ばステップ101に戻る。これにより、別の乱数が再設
定され、上述した処理が繰り返し実施される。そして、
乱数の再設定及びそれに付随するサム値判定の処理が規
定回数(例えば3回)だけ繰り返されてもサム値不一致
のままであれば、ステップ110がYESとなり、EC
U異常である旨を判断する。
If the two sum values do not match (NO in step 109), it is determined in step 110 whether communication has been repeated a predetermined number of times. If NO, the process returns to step 101. Thereby, another random number is reset, and the above-described processing is repeatedly performed. And
If the sum value does not match even if the resetting of the random number and the sum value judgment process accompanying it are repeated a specified number of times (for example, three times), step 110 becomes YES and EC
It is determined that there is a U abnormality.

【0028】次に、ECU10の処理の流れを図4のフ
ローチャートに従い説明する。先ずステップ201で
は、外部ツール20よりコマンドを受信したか否かを判
別し、YESであればステップ202に進み、受信デー
タから乱数Rtを抽出する。
Next, the processing flow of the ECU 10 will be described with reference to the flowchart of FIG. First, in step 201, it is determined whether or not a command has been received from the external tool 20, and if YES, the process proceeds to step 202, where a random number Rt is extracted from the received data.

【0029】その後、ステップ203では、算出式 Xsum=ΣData(i) により、サム値Xsumを算出する。すなわち、フラッ
シュメモリ13内の規定されたアドレス領域についてア
ドレスiのデータを全て加算し、その和をサム値Xsu
mとする。
Thereafter, in step 203, a sum value Xsum is calculated by the calculation formula Xsum = ΣData (i). That is, all the data of the address i is added to the specified address area in the flash memory 13, and the sum is added to the sum value Xsu
m.

【0030】その後、ステップ204では、前記受信し
た乱数Rtでサム値Xsumを暗号化して暗号化サム値
Xtを求め、続くステップ205では、暗号化サム値X
tを外部ツール20に送信する。このデータ送信によ
り、外部ツール20では、前記図3のステップ105で
データ受信が確認されることとなる。
Then, in step 204, the sum value Xsum is encrypted with the received random number Rt to obtain an encrypted sum value Xt. In the following step 205, the encrypted sum value Xt is calculated.
t is transmitted to the external tool 20. By this data transmission, the external tool 20 confirms the data reception in step 105 of FIG.

【0031】なお本実施の形態では、図3のステップ1
01,102の処理が本発明の「第1のステップ」に、
図4のステップ203,204の処理が「第2のステッ
プ」に、図4のステップ205の処理が「第3のステッ
プ」に、図3のステップ106〜109の処理が「第4
のステップ」に、それぞれ該当する。
In this embodiment, step 1 in FIG.
The processing of 01 and 102 is the “first step” of the present invention.
The processing in steps 203 and 204 in FIG. 4 is referred to as “second step”, the processing in step 205 in FIG. 4 is referred to as “third step”, and the processing in steps 106 to 109 in FIG.
Step ".

【0032】以上詳述した本実施の形態によれば、以下
に示す効果が得られる。つまり、上記ECU10の検査
方法によれば、不正改造を行おうとする者に正しいサム
値(算出したサム値Xsum)が漏れ知れる可能性は低
くなる。また、仮に正規のECU10が不正改造され、
フラッシュメモリ13の正しいサム値を外部ツール20
側に返信できるような不正なプログラムが偽ECUに組
み込まれたとしても、外部ツール20では、暗号化デー
タを受信すると共にその暗号化データを復号化した後、
サム値の比較判定を行うので、不正改造されたECUが
正規なECUとしてなりすますことが極めて困難にな
る。その結果、ECU10を正しく検査し、ひいては不
正改造の防止を図ることができる。
According to the embodiment described above, the following effects can be obtained. That is, according to the inspection method of the ECU 10, the possibility that the correct sum value (the calculated sum value Xsum) is leaked to a person who intends to perform unauthorized remodeling is reduced. Also, if the legitimate ECU 10 is tampered with,
The correct sum value of the flash memory 13 is stored in the external tool 20
Even if an unauthorized program that can reply to the side is incorporated in the fake ECU, the external tool 20 receives the encrypted data and decrypts the encrypted data.
Since the comparison of the sum values is performed, it is extremely difficult to impersonate the illegally modified ECU as a legitimate ECU. As a result, it is possible to correctly inspect the ECU 10 and to prevent unauthorized modification.

【0033】また、サム値不一致の場合、新たに乱数R
tを設定して再検査を行うので、一時的な通信異常が原
因で正しく検査されなかった場合にも、再通信により適
正な検査が実施できる。またここで、乱数Rtを再設定
するためにECU10と外部ツール20との間の送受信
データはその都度異なるので、通信線L1がモニタされ
ることを想定しても、正しいサム値が漏れ知れる可能性
は極めて低くなる。
If the sum values do not match, a new random number R
Since the re-examination is performed by setting t, even if the inspection is not performed correctly due to a temporary communication abnormality, an appropriate inspection can be performed by the re-communication. Here, since the transmission / reception data between the ECU 10 and the external tool 20 is different each time in order to reset the random number Rt, a correct sum value can be leaked even if it is assumed that the communication line L1 is monitored. Sex is extremely low.

【0034】(第2の実施の形態)次に、本発明におけ
る第2の実施の形態を説明する。但し、本実施の形態で
は、上述した第1の実施の形態と同等であるものは説明
を簡略化し、第1の実施の形態との相違点を中心に説明
する。
(Second Embodiment) Next, a second embodiment of the present invention will be described. However, in the present embodiment, those that are the same as those in the above-described first embodiment will be described in a simplified manner, and the description will focus on differences from the first embodiment.

【0035】上記第1の実施の形態では不正改造が容認
される可能性は極めて低いものの、万が一、暗号化アル
ゴリズムが不正改造者に漏れ知れた場合、不正改造が可
能となる。その対策として、本実施の形態では、複数の
暗号化アルゴリズム(算出式)を用意し、そのうちどの
アルゴリズムを使用するかを外部ツール20から指示す
る方法を提案する。なお本実施の形態では、制御システ
ムとして前記図1の構成をそのまま流用する。
In the first embodiment, although the possibility of unauthorized alteration is extremely low, if an encryption algorithm is leaked to an unauthorized alterator, unauthorized alteration is possible. As a countermeasure, this embodiment proposes a method in which a plurality of encryption algorithms (calculation formulas) are prepared, and an external tool 20 indicates which algorithm is to be used. In this embodiment, the configuration shown in FIG. 1 is used as it is as the control system.

【0036】本実施の形態におけるECU10の正偽判
定(検査)の概要を、図6を用いて説明する。なお図6
では、処理順序を表すため、(1)〜(8)の連続番号
を付している。
The outline of the true / false judgment (inspection) of the ECU 10 in the present embodiment will be described with reference to FIG. FIG. 6
In order to indicate the processing order, serial numbers (1) to (8) are assigned.

【0037】先ず始めに、サム値の算出指令と、乱数R
tと、暗号化アルゴリズムの識別コードIDとを含む送
信データを通信線L1を介して外部ツール20からEC
U10に送信する(図の(1))。このとき、外部ツー
ル20の送信データは、例えば前記図5(a)のフレー
ム構成に対し、データとして暗号化アルゴリズムの識別
コードIDを追加した構成となる。
First, a sum value calculation command and a random number R
and the transmission data including the identification code ID of the encryption algorithm from the external tool 20 via the communication line L1.
It is transmitted to U10 ((1) in the figure). At this time, the transmission data of the external tool 20 has a configuration in which, for example, an identification code ID of an encryption algorithm is added as data to the frame configuration of FIG.

【0038】ECU10側では、フラッシュメモリ13
内のデータのサム値Xsumを算出すると共に、外部ツ
ール20からの送信データに含まれる暗号化アルゴリズ
ムの識別コードIDに基づき、それに相応する暗号化の
算出式を取り出す(図の(2),(3))。また、この
算出式を用い、乱数Rtに応じてサム値Xsumを暗号
化する(図の(4))。つまり、算出式 Xt=f(Xsum,Rt) により、暗号化サム値Xtを算出する。ここで、図示の
如く、暗号化IDが0x01,0x02,・・・0x0
Fのように与えられる場合、それに対応する算出式はf
(*,*),g(*,*),・・・t(*,*)とな
り、これら何れかの算出式を用いてサム値Xsumが暗
号化される。その後、暗号化サム値Xtを通信線L1を
介して外部ツール20に送信する(図の(5))。
On the ECU 10 side, the flash memory 13
In addition to calculating the sum value Xsum of the data in the data, the corresponding encryption calculation formula is extracted based on the identification code ID of the encryption algorithm included in the transmission data from the external tool 20 ((2), ( 3)). Further, the sum value Xsum is encrypted according to the random number Rt using this calculation formula ((4) in the figure). That is, the encrypted sum value Xt is calculated by the calculation formula Xt = f (Xsum, Rt). Here, as shown in the figure, the encryption ID is 0x01, 0x02,.
When given as F, the corresponding calculation formula is f
(*, *), G (*, *),... T (*, *), and the sum value Xsum is encrypted using any one of these formulas. Thereafter, the encrypted sum value Xt is transmitted to the external tool 20 via the communication line L1 ((5) in the figure).

【0039】外部ツール20では、その時の暗号化アル
ゴリズムの識別コードIDに相応する復号化の算出式を
取り出し、その算出式にて暗号化サム値Xtを復号化す
る(図の(6),(7))。つまり、算出式 Xsum=f-1(Xt,Rt) により、サム値Xsumを算出する。
The external tool 20 takes out a calculation formula for decryption corresponding to the identification code ID of the encryption algorithm at that time, and decrypts the encrypted sum value Xt using the calculation formula ((6), (6) in FIG. 7)). That is, the sum value Xsum is calculated by the calculation formula Xsum = f-1 (Xt, Rt).

【0040】その後、前記の如く算出したサム値Xsu
mと、予め登録されている真のサム値Xrefとを比較
判定する(図の(8))。そして、両者が一致すれば、
ECU10が正規ECUであると判断し、不一致であれ
ば、ECU10が偽ECUであると判断する。
Thereafter, the sum value Xsu calculated as described above is obtained.
m is compared with a pre-registered true sum value Xref ((8) in the figure). And if they match,
The ECU 10 determines that the ECU is a legitimate ECU, and if they do not match, determines that the ECU 10 is a fake ECU.

【0041】以下には、外部ツール20によるECU1
0の正偽判定に際し、ECU10及び外部ツール20内
の各マイコン11,21により実施される処理の流れを
図7及び図8のフローチャートに従い説明する。
Hereinafter, the ECU 1 using the external tool 20 will be described.
The flow of processing executed by the microcomputer 10 and the microcomputers 21 and 21 in the ECU 10 and the external tool 20 when determining the true / false of 0 will be described with reference to the flowcharts of FIGS.

【0042】始めに、外部ツール20の処理の流れを図
7のフローチャートで説明する。但し、図7は前記図3
の一部のみを変更したものであり、実際には前記図3そ
のものに対し、ステップ301,302の処理を追加し
たことのみが相違する。以下、前記図3との相違点を中
心に説明する。
First, the processing flow of the external tool 20 will be described with reference to the flowchart of FIG. However, FIG.
Is actually changed only in that steps 301 and 302 are added to FIG. 3 itself. Hereinafter, the description will focus on the differences from FIG.

【0043】図7において、乱数発生処理の後、ステッ
プ301では、多数の暗号化アルゴリズムの中から一つ
を選択する。そして、続くステップ102では、その暗
号化アルゴリズムの識別コードIDを、乱数Rt及びサ
ム値算出指令と共にECU10へ送信する。
In FIG. 7, after the random number generation processing, in step 301, one of a number of encryption algorithms is selected. In the following step 102, the identification code ID of the encryption algorithm is transmitted to the ECU 10 together with the random number Rt and the sum value calculation command.

【0044】その後、ECU10からの受信確認を終え
ると、ステップ302では、暗号化アルゴリズムの識別
コードIDに対応する復号化の算出式を取り出す。そし
てそれ以降、図3で前述した通り、暗号化サム値Xtの
復号化、真のサム値Xrefとの比較判定等を行い、E
CU10の正偽判定を実施する。
Thereafter, when the reception confirmation from the ECU 10 is completed, in step 302, a calculation formula for decryption corresponding to the identification code ID of the encryption algorithm is extracted. Thereafter, as described above with reference to FIG. 3, decryption of the encrypted sum value Xt, comparison determination with the true sum value Xref, and the like are performed.
The true / false judgment of the CU 10 is performed.

【0045】次に、ECU10の処理の流れを図8のフ
ローチャートに従い説明する。この図8の処理は前記図
4に置き換えて実施される。図8では、外部ツール20
からのコマンド受信の旨を判別すると、ステップ401
からステップ402に進み、受信データから乱数Rtと
暗号化アルゴリズムの識別コードID(アルゴリズムN
o.)とを抽出する。
Next, the processing flow of the ECU 10 will be described with reference to the flowchart of FIG. The process of FIG. 8 is performed in place of the process of FIG. In FIG. 8, the external tool 20
When it is determined that a command has been received from the server, step 401
From the received data to the random number Rt and the identification code ID of the encryption algorithm (algorithm N
o. ) And extract.

【0046】その後、ステップ403では、フラッシュ
メモリ13内の規定されたアドレス領域についてアドレ
スiのデータを全て加算し、その和によりサム値Xsu
mを算出する。
Thereafter, in step 403, all the data of the address i are added to the specified address area in the flash memory 13, and the sum is added to the sum value Xsu.
Calculate m.

【0047】その後、ステップ404では、指定の暗号
化アルゴリズムを取り出し、続くステップ405では、
サム値Xsumを暗号化して暗号化サム値Xtを求め
る。更にステップ406では、暗号化サム値Xtを外部
ツール20に送信する。このデータ送信により、外部ツ
ール20では、前記図7のステップ105でデータ受信
が確認されることとなる。
Thereafter, in step 404, the designated encryption algorithm is extracted, and in step 405,
The sum value Xsum is encrypted to obtain an encrypted sum value Xt. In step 406, the encrypted sum value Xt is transmitted to the external tool 20. By this data transmission, the external tool 20 confirms the data reception in step 105 of FIG.

【0048】なお本実施の形態では、上記第1の実施の
形態との違いとして、図7のステップ301の処理が
「第1のステップ」に含まれ、同ステップ302の処理
が「第4のステップ」に含まれる。また、図8のステッ
プ402〜405の処理が「第2のステップ」に、同ス
テップ406の処理が「第3のステップ」に、それぞれ
該当する。
In the present embodiment, as a difference from the first embodiment, the processing of step 301 in FIG. 7 is included in the “first step”, and the processing of step 302 is “the fourth step”. Steps ". Further, the processing of steps 402 to 405 in FIG. 8 corresponds to “second step”, and the processing of step 406 corresponds to “third step”.

【0049】以上第2の実施の形態によれば、複数の暗
号化アルゴリズムを択一的に使うことにより、不正改造
を行おうとする者に暗号化アルゴリズムが知られたとし
ても、実際に使われた暗号化アルゴリズムに対応させて
サム値を解明するのは非常に困難となる。それ故、EC
U10の不正改造を、より一層困難なものとすることが
できる。またこの場合、各々の暗号化アルゴリズムが簡
単なものであっても、不正改造者がそのアルゴリズムを
認識し、不正改造者両を車検に通す等、不正行為を行お
うとすることが困難になる。
As described above, according to the second embodiment, by using a plurality of encryption algorithms alternatively, even if the encryption algorithm is known to a person who intends to perform unauthorized alteration, the encryption algorithm is not actually used. It is very difficult to determine the sum value corresponding to the encryption algorithm used. Therefore, EC
Unauthorized modification of U10 can be made even more difficult. Further, in this case, even if each encryption algorithm is simple, it becomes difficult for an illegally modified person to recognize the algorithm and perform an illegal act such as passing both the illegally modified person through a vehicle inspection.

【0050】(第3の実施の形態)複雑な制御が要求さ
れるECUには、高い演算負荷を分散させるために複数
のマイコン(CPU)を備えて構成されるものがある。
例えば2個のマイコンを持つ2マイコンシステムのEC
Uにおいては、前記のフラッシュメモリを搭載し、エン
ジンの主要制御を受け持つメイン側のマイコンと、制御
プログラムを市場で書き換え不可能なROMを搭載し、
主要制御以外の制御を受け持つサブ側のマイコンとで構
成することがある。
(Third Embodiment) Some ECUs requiring complicated control are provided with a plurality of microcomputers (CPUs) in order to distribute a high calculation load.
For example, a two-microcomputer system EC with two microcomputers
In U, the above-mentioned flash memory is mounted, and a microcomputer on the main side that is in charge of main control of the engine, and a ROM in which the control program is not rewritable in the market, are mounted.
It may be composed of a sub-side microcomputer that performs control other than the main control.

【0051】図9は、本実施の形態における制御システ
ムの概要を示す構成図である。図9の構成では、前記図
1の構成との違いとして、ECU30は、第1マイコン
(第1マイクロコンピュータ)31と第2マイコン(第
2マイクロコンピュータ)32とを備える。第1マイコ
ン31は、燃料噴射制御や点火時期制御等、エンジンの
主要な制御を受け持つマイコンであり、CPU31aと
フラッシュメモリ31bとを実装する。また、第2マイ
コン32は、トランスミッション制御等を受け持つマイ
コンであり、CPU32aと、プログラムを市場で書き
換え不可能なROM32bとを実装する。
FIG. 9 is a configuration diagram showing an outline of the control system in the present embodiment. In the configuration of FIG. 9, the ECU 30 includes a first microcomputer (first microcomputer) 31 and a second microcomputer (second microcomputer) 32 as a difference from the configuration of FIG. The first microcomputer 31 is a microcomputer that performs main control of the engine such as fuel injection control and ignition timing control, and includes a CPU 31a and a flash memory 31b. The second microcomputer 32 is a microcomputer that performs transmission control and the like, and has a CPU 32a and a ROM 32b whose program cannot be rewritten in the market.

【0052】こうした2マイコンシステムのECU30
において、第2マイコン32のROM32b内には、第
1マイコン31の正偽判定を行うために用いる暗号化ア
ルゴリズムが格納されている。
The ECU 30 of such a two-microcomputer system
In the ROM 32b of the second microcomputer 32, an encryption algorithm used to determine whether the first microcomputer 31 is authentic is stored.

【0053】図10は、第1マイコン31の処理と第2
マイコン32の処理とを個々に示すフローチャートであ
る。先ずは、図10(a)に従い、第1マイコン31の
処理の流れを説明する。
FIG. 10 shows the processing of the first microcomputer 31 and the second processing.
4 is a flowchart showing the processing of the microcomputer 32 individually. First, the flow of processing of the first microcomputer 31 will be described with reference to FIG.

【0054】図10(a)では、外部ツール20からの
コマンド受信の旨を判別すると、ステップ501からス
テップ502に進み、受信データから乱数Rtを抽出す
る。その後、ステップ503では、フラッシュメモリ3
1b内の規定されたアドレス領域についてアドレスiの
データを全て加算し、その和によりサム値Xsumを算
出する。その後、ステップ504では、前記受信した乱
数Rtと、前記算出したサム値Xsumとを第2マイコ
ン32に送信する。
In FIG. 10A, when it is determined that a command has been received from the external tool 20, the process proceeds from step 501 to step 502, where a random number Rt is extracted from the received data. Thereafter, in step 503, the flash memory 3
All the data of the address i are added to the specified address area in 1b, and a sum value Xsum is calculated from the sum. Thereafter, in step 504, the received random number Rt and the calculated sum value Xsum are transmitted to the second microcomputer 32.

【0055】続くステップ505では、第2マイコン3
2へのデータ送信に応答して当該第2マイコン32から
データ受信をしたか否かを判別する。この受信データに
は、第2マイコン32で暗号化された暗号化サム値Xt
が含まれており、データ受信を確認した後、ステップ5
06では、暗号化サム値Xtを外部ツール20に送信す
る。このデータ送信により、外部ツール20では、前記
図3のステップ105でデータ受信が確認されることと
なる。
In the following step 505, the second microcomputer 3
It is determined whether or not data has been received from the second microcomputer 32 in response to the data transmission to the second microcomputer 32. The received data includes an encrypted sum value Xt encrypted by the second microcomputer 32.
After confirming data reception, step 5
At 06, the encrypted sum value Xt is transmitted to the external tool 20. By this data transmission, the external tool 20 confirms the data reception in step 105 of FIG.

【0056】次に、第2マイコン32の処理の流れを図
10(b)のフローチャートに従い説明する。図10
(b)では、前記図10(a)のステップ504におけ
るデータ送信を伴い、第1マイコン31からのデータ受
信の旨を判別すると、ステップ601からステップ60
2に進み、受信データから乱数Rtとサム値Xsumと
を抽出する。その後、ステップ603では、ROM32
b内に用意されている所定の暗号化アルゴリズムを用
い、サム値Xsumを暗号化して暗号化サム値Xtを求
める。続くステップ604では、暗号化サム値Xtを第
1マイコン31に送信する。このデータ送信により、第
1マイコン31では、前記図10(a)のステップ50
5でデータ受信が確認されることとなる。そして更に、
このデータが外部ツール20に送信される。
Next, the processing flow of the second microcomputer 32 will be described with reference to the flowchart of FIG. FIG.
In FIG. 10B, data transmission in step 504 of FIG. 10A is involved, and if it is determined that data has been received from the first microcomputer 31, steps 601 to 60 are performed.
Proceeding to 2, the random number Rt and the sum value Xsum are extracted from the received data. Thereafter, in step 603, the ROM 32
Using a predetermined encryption algorithm prepared in b, the sum value Xsum is encrypted to obtain an encrypted sum value Xt. In the following step 604, the encrypted sum value Xt is transmitted to the first microcomputer 31. As a result of this data transmission, the first microcomputer 31 executes step 50 in FIG.
At 5, the data reception is confirmed. And furthermore
This data is transmitted to the external tool 20.

【0057】なお本実施の形態では、上記第1の実施の
形態との違いとして、図10(a)のステップ503,
504及び図10(b)のステップ603の処理が「第
2のステップ」に、図10(a)のステップ506の処
理が「第3のステップ」に、それぞれ該当する。
Note that the present embodiment differs from the first embodiment in that steps 503 and 503 in FIG.
The processing in step 504 and step 603 in FIG. 10B correspond to “second step”, and the processing in step 506 in FIG. 10A corresponds to “third step”.

【0058】以上第3の実施の形態によれば、第2マイ
コン32のROM32bに暗号化アルゴリズムを記憶さ
せておくので、暗号化アルゴリズムを不正に書き換える
ことが不可能となり、不正改造防止が更に強化される。
According to the third embodiment, since the encryption algorithm is stored in the ROM 32b of the second microcomputer 32, it becomes impossible to illegally rewrite the encryption algorithm, thereby further preventing unauthorized modification. Is done.

【0059】上記第3の実施の形態では、第2マイコン
32のROM32bに所定の暗号化アルゴリズムを記憶
させる構成であったが、この構成を変更しても良い。例
えば、既述した第2の実施の形態のように、第2マイコ
ン32のROM32bに複数の暗号化アルゴリズムを記
憶させておき、外部ツール20から指定される識別コー
ドに従い、複数の暗号化アルゴリズムの中から一つを選
択する構成としても良い。
In the third embodiment, the predetermined encryption algorithm is stored in the ROM 32b of the second microcomputer 32. However, this configuration may be changed. For example, as in the above-described second embodiment, a plurality of encryption algorithms are stored in the ROM 32b of the second microcomputer 32, and the plurality of encryption algorithms are stored in accordance with the identification code specified by the external tool 20. It is good also as composition which selects one from among them.

【0060】また、同じく第3の実施の形態では、外部
ツール20から送信される乱数Rtを一旦第1マイコン
31で受信し、その後、サム値と共に第2マイコン32
へ転送したが、この乱数Rtを外部ツール20から第2
マイコン32へ直接送信する構成としても良い。
In the third embodiment, the random number Rt transmitted from the external tool 20 is once received by the first microcomputer 31 and thereafter, the random number Rt is transmitted to the second microcomputer 32 together with the sum value.
Was transferred from the external tool 20 to the second
A configuration in which the data is directly transmitted to the microcomputer 32 may be adopted.

【図面の簡単な説明】[Brief description of the drawings]

【図1】発明の実施の形態における制御システムの概略
構成を示すブロック図。
FIG. 1 is a block diagram showing a schematic configuration of a control system according to an embodiment of the present invention.

【図2】ECUの正偽判定の様子を示す説明図。FIG. 2 is an explanatory diagram showing a state of true / false judgment of the ECU.

【図3】外部ツールの処理の流れを示すフローチャー
ト。
FIG. 3 is a flowchart showing the flow of processing of an external tool.

【図4】ECUの処理の流れを示すフローチャート。FIG. 4 is a flowchart showing a flow of processing of the ECU.

【図5】送信データ及び受信データのフレーム構成を示
す図。
FIG. 5 is a diagram showing a frame configuration of transmission data and reception data.

【図6】第2の実施の形態においてECUの正偽判定の
様子を示す説明図。
FIG. 6 is an explanatory view showing a state of an authenticity determination by an ECU in the second embodiment.

【図7】第2の実施の形態において外部ツールの処理の
流れを示すフローチャート。
FIG. 7 is a flowchart illustrating a flow of processing of an external tool according to the second embodiment.

【図8】第2の実施の形態においてECUの処理の流れ
を示すフローチャート。
FIG. 8 is a flowchart illustrating a flow of processing of an ECU according to the second embodiment.

【図9】第3の実施の形態において制御システムの概略
構成を示すブロック図。
FIG. 9 is a block diagram illustrating a schematic configuration of a control system according to a third embodiment.

【図10】第3の実施の形態において第1マイコン及び
第2マイコンの処理の流れを示すフローチャート。
FIG. 10 is a flowchart showing a flow of processing of a first microcomputer and a second microcomputer in the third embodiment.

【符号の説明】[Explanation of symbols]

10…ECU、11…マイコン、12…CPU、13…
フラッシュメモリ、20…外部ツール、30…ECU、
31…第1マイコン、31b…フラッシュメモリ、32
…第2マイコン、32b…ROM。
10: ECU, 11: microcomputer, 12: CPU, 13 ...
Flash memory, 20: external tool, 30: ECU,
31: first microcomputer, 31b: flash memory, 32
... second microcomputer, 32b ... ROM.

フロントページの続き (72)発明者 青木 千鶴 愛知県刈谷市昭和町1丁目1番地 株式会 社デンソー内 Fターム(参考) 5B048 AA14 CC02 DD06 Continued on the front page (72) Inventor Chizuru Aoki 1-1-1 Showa-cho, Kariya-shi, Aichi F-term in DENSO Corporation (Reference) 5B048 AA14 CC02 DD06

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】車載制御ユニット内のメモリについてデー
タのサム値を求め、該サム値により本制御ユニットを検
査する車載制御ユニットの検査方法において、 乱数を発生させ、その乱数をサム値の算出指令と共に外
部ツールから制御ユニットへ送信する第1のステップ
と、 前記メモリのサム値を算出すると共に、該サム値を前記
乱数に応じて暗号化する第2のステップと、 前記暗号化したデータを外部ツールに送信する第3のス
テップと、 外部ツールで受信したデータを復号化すると共に、その
データ中のサム値を予め用意された真のサム値と比較
し、その比較判定の結果から車載制御ユニットを検査す
る第4のステップと、からなることを特徴とする車載制
御ユニットの検査方法。
An inspection method of an on-vehicle control unit for obtaining a sum value of data from a memory in an on-vehicle control unit and inspecting the control unit based on the sum value, generates a random number, and instructs the random number to calculate a sum value. A second step of calculating a sum value of the memory and encrypting the sum value in accordance with the random number, and transmitting the encrypted data to an external device. A third step of transmitting the data to the tool, decoding the data received by the external tool, comparing the sum value in the data with a true sum value prepared in advance, and, based on the result of the comparison determination, the onboard control unit. And a fourth step of inspecting the vehicle-mounted control unit.
【請求項2】車載制御ユニット内のメモリは、電気的に
書き換え可能な不揮発性メモリである請求項1に記載の
車載制御ユニットの検査方法。
2. The method according to claim 1, wherein the memory in the on-vehicle control unit is an electrically rewritable nonvolatile memory.
【請求項3】前記第4のステップにおいてサム値が不一
致となった場合、前記第1のステップに戻って新たに乱
数を設定し、それに続く第2〜第4のステップを再度実
施する請求項1又は2に記載の車載制御ユニットの検査
方法。
3. If the sum values do not match in the fourth step, the procedure returns to the first step, a new random number is set, and the subsequent second to fourth steps are performed again. 3. The inspection method of the vehicle-mounted control unit according to 1 or 2.
【請求項4】複数の暗号化アルゴリズムを車載制御ユニ
ットに予め用意しておき、 前記第1のステップでは、複数の暗号化アルゴリズムの
中から一つを指定してそれを表す識別データを、乱数と
サム値の算出指令と共に外部ツールから制御ユニットへ
送信し、 前記第2のステップでは、前記識別データによる指定通
りの暗号化アルゴリズムを使って暗号化を行い、 その後、前記第4のステップでは、前記指定した暗号化
アルゴリズムに対応する復号化の算出式を取り出して受
信データを復号化し、サム値を抽出する請求項1又は2
に記載の車載制御ユニットの検査方法。
4. A plurality of encryption algorithms are prepared in a vehicle control unit in advance, and in the first step, one of a plurality of encryption algorithms is designated and identification data representing the one is designated by a random number. And a command to calculate the sum value from the external tool to the control unit. In the second step, encryption is performed using an encryption algorithm specified by the identification data. Thereafter, in the fourth step, 3. A sum value is extracted by extracting a decryption calculation formula corresponding to the designated encryption algorithm, decrypting the received data, and extracting a sum value.
Inspection method of the in-vehicle control unit according to 1.
【請求項5】車載制御ユニットは、電気的に書き換え可
能な不揮発性メモリを実装した第1マイクロコンピュー
タと、書き換え不可能なROMを実装した第2マイクロ
コンピュータとを備え、第2マイクロコンピュータのR
OMに、前記不揮発性メモリのサム値を暗号化するため
の暗号化アルゴリズムを記憶させておく請求項1〜4の
何れかに記載の車載制御ユニットの検査方法。
5. The on-vehicle control unit includes a first microcomputer mounted with an electrically rewritable nonvolatile memory and a second microcomputer mounted with a non-rewritable ROM.
5. The inspection method for a vehicle-mounted control unit according to claim 1, wherein an encryption algorithm for encrypting a sum value of the nonvolatile memory is stored in the OM.
【請求項6】請求項5に記載の車載制御ユニットの検査
方法において、 前記第2のステップは、前記不揮発性メモリのサム値を
第1マイクロコンピュータから第2マイクロコンピュー
タへ送信するステップと、第2マイクロコンピュータに
て前記ROM内の暗号化アルゴリズムでサム値を暗号化
した後、その暗号化データを第1マイクロコンピュータ
に返信するステップと、を含むものである車載制御ユニ
ットの検査方法。
6. The inspection method for a vehicle-mounted control unit according to claim 5, wherein the second step includes transmitting a sum value of the nonvolatile memory from the first microcomputer to the second microcomputer. (B) encrypting the sum value with the encryption algorithm in the ROM by using the microcomputer, and returning the encrypted data to the first microcomputer.
JP2000012803A 2000-01-21 2000-01-21 Method for inspecting on-vehicle control unit Pending JP2001202266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000012803A JP2001202266A (en) 2000-01-21 2000-01-21 Method for inspecting on-vehicle control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000012803A JP2001202266A (en) 2000-01-21 2000-01-21 Method for inspecting on-vehicle control unit

Publications (1)

Publication Number Publication Date
JP2001202266A true JP2001202266A (en) 2001-07-27

Family

ID=18540477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000012803A Pending JP2001202266A (en) 2000-01-21 2000-01-21 Method for inspecting on-vehicle control unit

Country Status (1)

Country Link
JP (1) JP2001202266A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004254286A (en) * 2002-10-31 2004-09-09 Matsushita Electric Ind Co Ltd Communication device, communication system and algorithm selecting method
US7251551B2 (en) 2003-09-24 2007-07-31 Mitsubishi Denki Kabushiki Kaisha On-vehicle electronic control device
JP2009114932A (en) * 2007-11-06 2009-05-28 Keihin Corp Communication abnormality detection device
JP4997347B1 (en) * 2011-03-14 2012-08-08 信義 武藤 Electric car
JP2015517685A (en) * 2012-05-29 2015-06-22 ▲ホア▼▲ウェイ▼技術有限公司 Method, apparatus and system for implementing media data processing
WO2018078928A1 (en) * 2016-10-27 2018-05-03 株式会社デンソー Fraud prevention device and fraud prevention unit
WO2023109889A1 (en) * 2021-12-15 2023-06-22 潍柴动力股份有限公司 Engine ecu flashing method and device, and engine ecu flashing diagnosis method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004254286A (en) * 2002-10-31 2004-09-09 Matsushita Electric Ind Co Ltd Communication device, communication system and algorithm selecting method
JP4566546B2 (en) * 2002-10-31 2010-10-20 パナソニック株式会社 Communication apparatus, communication system, and algorithm selection method
US7251551B2 (en) 2003-09-24 2007-07-31 Mitsubishi Denki Kabushiki Kaisha On-vehicle electronic control device
JP2009114932A (en) * 2007-11-06 2009-05-28 Keihin Corp Communication abnormality detection device
JP4997347B1 (en) * 2011-03-14 2012-08-08 信義 武藤 Electric car
WO2012124045A1 (en) * 2011-03-14 2012-09-20 株式会社ユニバンス Electric automobile
JP2015517685A (en) * 2012-05-29 2015-06-22 ▲ホア▼▲ウェイ▼技術有限公司 Method, apparatus and system for implementing media data processing
WO2018078928A1 (en) * 2016-10-27 2018-05-03 株式会社デンソー Fraud prevention device and fraud prevention unit
JP2018069893A (en) * 2016-10-27 2018-05-10 株式会社デンソー Fraud prevention device and fraud prevention unit
TWI642569B (en) * 2016-10-27 2018-12-01 電裝股份有限公司 Improper prevention device and improper prevention unit
WO2023109889A1 (en) * 2021-12-15 2023-06-22 潍柴动力股份有限公司 Engine ecu flashing method and device, and engine ecu flashing diagnosis method and device

Similar Documents

Publication Publication Date Title
CN109324590B (en) Management system, vehicle, and information processing method
JP6505318B2 (en) Notification of unauthorized access event to vehicle electronic control unit
CN111131313B (en) Safety guarantee method and system for replacing ECU (electronic control Unit) of intelligent networked automobile
CN109587518B (en) Image transmission apparatus, method of operating the same, and system on chip
US10491392B2 (en) End-to-end vehicle secure ECU unlock in a semi-offline environment
US20110083161A1 (en) Vehicle, maintenance device, maintenance service system, and maintenance service method
CN111142500B (en) Permission setting method and device for vehicle diagnosis data and vehicle-mounted gateway controller
JP2010011400A (en) Cipher communication system of common key system
JP5772692B2 (en) In-vehicle control device authentication system and in-vehicle control device authentication method
JP6712538B2 (en) Tamper detection system
JP4253979B2 (en) Inspection method for in-vehicle control unit
US20230083716A1 (en) Devices, methods, and computer program for releasing transportation vehicle components, and vehicle-to-vehicle communication module
CN109495269B (en) Method and system for verifying credibility of vehicle-mounted terminal access equipment and vehicle-mounted terminal
US9893886B2 (en) Communication device
JP2001202266A (en) Method for inspecting on-vehicle control unit
US20230401317A1 (en) Security method and security device
WO2020137852A1 (en) Information processing device
JP2011170530A (en) Device for setting encryption of authentication system
CN115017529A (en) Encryption method for automobile diagnosis software
JP7067508B2 (en) Network system
US11036846B2 (en) Control device
CN114338073A (en) Protection method, system, storage medium and equipment for vehicle-mounted network
JP2008189209A (en) Network between vehicular control devices, and control device
CN116248280B (en) Anti-theft method for security module without key issue, security module and device
US20230205887A1 (en) Secure automotive system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080401

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080530

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080924