明 細 書 Specification
情報処理装置及びプログラムファイル生成装置 Information processing device and program file generation device
技術分野 Technical field
[0001] 本発明はデバッガ装置を伴う情報処理装置及びプログラムファイル生成装置に関 する。 The present invention relates to an information processing device with a debugger device and a program file generation device.
背景技術 Background art
[0002] 組み込みで用いられる情報処理半導体装置の CPUは一般的に標準的なデバッガ ポートを備えている。そこに接続する汎用のデバッガは比較的安価で容易に手に入 る。そのため、ソフトウェア開発コストを抑えることができる。 [0002] The CPU of an information processing semiconductor device used for embedding generally has a standard debugger port. A general-purpose debugger connected there is relatively inexpensive and easily available. Therefore, software development costs can be reduced.
[0003] デバッガは、 CPUで動作するプログラムをステップ実行させたり、途中で停止させ て CPUの内部レジスタを観測したりして、プログラムのデバッグを行うツールである。 [0003] The debugger is a tool for debugging a program by step-executing a program operated by the CPU or stopping the program halfway and observing an internal register of the CPU.
[0004] 一方、情報処理半導体装置内部に組み込むプログラムには、プログラムのアルゴリ ズムゃデータを秘密にしなければならな ヽものが存在する。上記汎用デバッガでは、 これらの秘密にしなければならな!/ヽプログラムやデータを容易に解析できてしまう問 題がある。 [0004] On the other hand, some programs to be incorporated in the information processing semiconductor device require an algorithm of the program, that is, data that must be kept secret. The above general-purpose debugger must keep these secrets! / ヽ There is a problem that programs and data can be easily analyzed.
[0005] そこで、図 1に示すように、汎用デバッガと専用のデバッガ許可装置との組み合わ せで、専用デバッガと同等の構成する方法が提案された (特許文献 1参照)。 [0005] Therefore, as shown in FIG. 1, a method has been proposed in which a general-purpose debugger and a dedicated debugger permission device are combined to configure a configuration equivalent to a dedicated debugger (see Patent Document 1).
特許文献 1:特開 2002— 341956号公報 Patent Document 1: Japanese Patent Application Laid-Open No. 2002-341956
発明の開示 Disclosure of the invention
発明が解決しょうとする課題 Problems to be solved by the invention
[0006] し力しながら、この従来方法では、デバッガ許可装置を一度手に入れてしまえば、 未来永劫そのシステムに対するデバッグが許可される。また、複数のセキュアなプロ グラムを扱う場合は、 1つのデバッガ許可装置で全てのプログラムに対して許可され ることとなり、プログラム単位で選択的にデバッグの可否を制御できない問題がある。 [0006] However, with this conventional method, once a debugger permission device is obtained, debugging of the system is permitted forever. Also, when handling a plurality of secure programs, one debugger permitting device is permitted for all programs, and there is a problem that it is not possible to selectively control whether or not debugging can be performed on a program-by-program basis.
[0007] 本発明の目的は、プログラム単位でのデバッガに対する制御を可能にし、実行する プログラムのセキュリティレベルによって、デバッグの可否を制御する情報処理装置 及びプログラムファイル生成装置を提供することである。
課題を解決するための手段 [0007] An object of the present invention is to provide an information processing device and a program file generation device that enable control of a debugger in units of programs and control whether debugging is possible depending on the security level of a program to be executed. Means for solving the problem
[0008] この問題を解決するための、本特許出願に係る請求項 1に記載の発明は、 CPUと デバッグポートとを備えた情報処理装置であって、前記 CPUで実行中のプログラム を監視するプログラム実行監視装置と、前記監視結果に基づいて、前記 CPUがデバ ッグの許可されたプラグラムを実行中であるときに、前記デバッグポートを有効にし、 デバッグの許可されたプログラム以外のプログラムを実行中であるときに、前記デバッ グポートを無効にすることを特徴とするデバッグ許可装置とを有する情報処理装置に 関する。 [0008] To solve this problem, the invention according to claim 1 of the present patent application is an information processing apparatus provided with a CPU and a debug port, and monitors a program being executed by the CPU. A program execution monitoring device that, based on the monitoring result, enables the debug port when the CPU is executing a program permitted to debug, and executes a program other than the program permitted to debug. The present invention relates to an information processing apparatus having a debug permission device, wherein the debug port is invalidated when the debugger is in the middle.
[0009] また、請求項 2に記載の発明は、請求項 1記載の情報処理装置であって、さらに、 デバッグに先立ち、デバッグポートに接続されるデバッガとパスコードを用いて認証を 行うことを特徴とする、情報処理装置に関する。 [0009] The invention according to claim 2 is the information processing apparatus according to claim 1, further comprising, prior to debugging, performing authentication using a debugger connected to a debug port and a passcode. The present invention relates to an information processing device, which is a feature.
[0010] また、請求項 3に記載の発明は、請求項 2記載の情報処理装置であって、さらに、 プログラムとパスコードとをプログラム読み込みポートを介して読み込み可能であるこ とを特徴とする、情報処理装置に関する。 [0010] Further, the invention according to claim 3 is the information processing apparatus according to claim 2, further characterized in that the program and the passcode can be read through a program reading port. The present invention relates to an information processing device.
[0011] また、請求項 4に記載の発明は、請求項 3記載の情報処置装置であって、さらに、 前記プログラム読み込みポートから読み込まれる、暗号鍵暗号化されたパスコード及 びプログラムを復号する第 1の復号装置を有することを特徴とする情報処理装置に関 する。 [0011] The invention according to claim 4 is the information processing device according to claim 3, further comprising: decrypting an encryption key-encrypted passcode and a program read from the program reading port. The present invention relates to an information processing device having a first decryption device.
[0012] また、請求項 5に記載の発明は、請求項 4記載の情報処理装置であって、さらに、 前記デバッガカゝら読み込まれる秘密鍵暗号ィ匕認証ファイルを復号する第 2の復号装 置と、デバッグに先立ち、復号された認証ファイルと前記パスコードとを用いてデバッ ガとの認証を行う認証装置とを有することを特徴とする情報処理装置に関する。 [0012] The invention according to claim 5 is the information processing device according to claim 4, further comprising a second decryption device that decrypts a secret key encryption authentication file read from the debugger card. And an authentication device for performing authentication with a debugger using a decrypted authentication file and the passcode prior to debugging.
[0013] また、請求項 6に記載の発明は、前記第 1の復号装置と、前記第 2の復号装置とは 異なる秘密鍵を用いることができることを特徴とする請求項 5記載の情報処理装置に 関する。 [0013] The invention according to claim 6 is characterized in that the first decryption device and the second decryption device can use different secret keys, and the information processing device according to claim 5, About.
[0014] また、請求項 7に記載の発明は、前記認証装置は、前記パスコードの認証に加え、 ユーザーの認証も行 、、プログラムの認証及びユーザーの認証が共に成立したとき に、前記デバッグ許可装置はデバッグを許可することを特徴とする請求項 5記載の情
報処理装置に関する。 [0014] In the invention according to claim 7, in the authentication device, in addition to the passcode authentication, user authentication is also performed, and when both program authentication and user authentication are established, the debugging is performed. 6. The information according to claim 5, wherein the permission device permits debugging. Information processing device.
[0015] また、請求項 8に記載の発明は、請求項 1記載の情報処理装置に供給するための プログラムとパスコードとを生成するプログラムファイル生成装置に関する。 [0015] The invention according to claim 8 relates to a program file generation device that generates a program and a passcode to be supplied to the information processing device according to claim 1.
[0016] また、請求項 9に記載の発明は、前記プログラムと前記パスコードとを暗号ィ匕して生 成することを特徴とする請求項 8記載のプログラムファイル生成装置に関する。 [0016] The invention according to claim 9 relates to the program file generating device according to claim 8, wherein the program and the passcode are generated by encryption.
[0017] また、請求項 10に記載の発明は、前記プログラムと前記パスコードとを結合した上 で、暗号ィ匕することを特徴とする請求項 9記載のプログラムファイル生成装置に関す る。 [0017] The invention according to claim 10 relates to the program file generating device according to claim 9, wherein the program and the passcode are combined and then encrypted.
[0018] また、請求項 11に記載の発明は、デバッグ装置が、前記情報処理装置と認証を行 う際に使用する暗号ィ匕された認証ファイルを、さらに生成する請求項 10記載のプログ ラムファイル生成装置に関する。 [0018] The invention according to claim 11 is the program according to claim 10, wherein the debugging device further generates an encrypted authentication file used when performing authentication with the information processing device. It relates to a file generation device.
[0019] また、請求項 12に記載の発明は、前記プログラムと前記パスコードを結合し、暗号 化する際に用いる暗号鍵と、前記認証ファイルを暗号化する際に用いる暗号鍵とは 異なることを特徴とする請求項 11記載のプログラムファイル生成装置に関する。 発明の効果 [0019] Also, in the invention according to claim 12, the encryption key used when combining the program and the passcode and encrypting is different from the encryption key used when encrypting the authentication file. 12. The program file generation device according to claim 11, wherein: The invention's effect
[0020] 本発明の情報処理装置及びプログラムファイル生成装置によれば、プログラム単位 でのシステムのデバッガに対する制御が可能になることにより、プログラムのセキユリ ティレベルを設定することが可能となり、実行するプログラムのセキュリティレベルによ つて、デバッグの可否を制御することが可能となる。 According to the information processing device and the program file generation device of the present invention, it is possible to set the security level of the program by controlling the system debugger in units of programs, and to execute the program to be executed. Depending on the security level, the possibility of debugging can be controlled.
図面の簡単な説明 Brief Description of Drawings
[0021] [図 1]図 1は従来の技術のブロック図である。 FIG. 1 is a block diagram of a conventional technique.
[図 2]図 2は本実施の形態における情報処理半導体装置を中心としたシステム全体 のブロック図である。 FIG. 2 is a block diagram of the entire system centering on the information processing semiconductor device in the present embodiment.
[図 3]図 3はデバッグ許可装置の詳細図である。 FIG. 3 is a detailed view of a debug permitting device.
[図 4]図 4は認証ファイル生成機の処理手順を示す図である。 FIG. 4 is a diagram showing a processing procedure of an authentication file generator.
[図 5]図 5はデバッガによる認証ファイルの転送手順を示す図である。 FIG. 5 is a diagram showing a procedure for transferring an authentication file by a debugger.
[図 6]図 6は情報処理半導体装置でのプログラムの読み込み手順を示す図である。 FIG. 6 is a diagram showing a procedure for reading a program in the information processing semiconductor device.
[図 7]図 7は暗号ィ匕プログラムを伴う情報処理半導体装置を中心としたシステム全体
のブロック図である。 [FIG. 7] FIG. 7 is an overall system centered on an information processing semiconductor device accompanied by an encryption program. FIG.
[図 8]図 8は暗号ィ匕プログラムを伴う認証ファイル生成機の処理手順を示す図である。 [FIG. 8] FIG. 8 is a diagram showing a processing procedure of an authentication file generating device accompanied by an encryption program.
[図 9]図 9は暗号ィヒプログラムを伴う情報処理半導体装置でのプログラムの読み込み 手順を示す図である。 FIG. 9 is a diagram showing a procedure for reading a program in an information processing semiconductor device accompanied by an encryption program.
圆 10]図 10は暗号ィ匕認証ファイルを伴う情報処理半導体装置を中心としたシステム 全体のブロック図である。 [10] FIG. 10 is a block diagram of the entire system centering on the information processing semiconductor device with the encryption file.
[図 11]図 11は暗号化認証ファイルを伴うデバッグ許可装置の詳細図である。 [FIG. 11] FIG. 11 is a detailed view of a debug permitting device with an encrypted authentication file.
[図 12]図 12は暗号ィ匕認証ファイルを伴う認証ファイル生成機の処理手順を示す図で ある。 [FIG. 12] FIG. 12 is a diagram showing a processing procedure of an authentication file generating device accompanied by an encryption file.
[図 13]図 13は暗号ィヒ認証ファイルを伴う情報処理半導体装置でのプログラムの読み 込み手順を示す図である。 [FIG. 13] FIG. 13 is a diagram showing a procedure of reading a program in an information processing semiconductor device accompanied by an encryption authentication file.
符号の説明 Explanation of symbols
100 認証ファイル生成機 100 Authentication file generator
200 情報処理半導体装置 200 Information processing semiconductor device
202 メモリ 1 202 Memory 1
210 CPU 210 CPU
220 分解装置 220 decomposition equipment
230 メモリ 2 230 Memory 2
240 プログラム実行監視装置 240 Program execution monitoring device
250 デバッグ許可装置 250 debug permission device
2502 ノ スコードレジスタ 2502 No code register
2504 認証ファイルレジスタ 2504 Authentication File Register
2506 演算器 2506 computing unit
2510 暗号復号器 2510 Decryptor
256 秘密鍵 2 256 secret key 2
260 復号装置 260 decoding device
262 秘密鍵 1 262 Private Key 1
270 デノ ッグホ一卜
300 デバッガ 270 Denog Hot 300 debugger
発明を実施するための最良の形態 BEST MODE FOR CARRYING OUT THE INVENTION
[0023] 以下、本発明の実施の形態について、図面を参照して詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(実施の形態 1) (Embodiment 1)
図 2に本実施の形態における情報処理半導体装置 200を中心としたシステム全体 のブロック図を示す。 FIG. 2 shows a block diagram of the entire system centering on information processing semiconductor device 200 in the present embodiment.
[0024] 情報処理半導体装置 200は、 CPU210、メモリ 1 (202)、メモリ 2 (230)、分解装置 220、プログラム実行監視装置 240、デバッグ許可装置 250、デバッグポート 270か ら構成されている。 [0024] The information processing semiconductor device 200 includes a CPU 210, a memory 1 (202), a memory 2 (230), a disassembly device 220, a program execution monitoring device 240, a debug permission device 250, and a debug port 270.
[0025] メモリ 1 (202)は情報処理半導体装置 200と外部インターフェースを介して接続さ れ、 CPU210、メモリ 2 (230)、分解装置 220、プログラム実行監視装置 240、デバッ グ許可装置 250、デバッグポート 270は情報処理半導体装置 200の内部に存在する 形態が好ましい。 [0025] The memory 1 (202) is connected to the information processing semiconductor device 200 via an external interface, and includes a CPU 210, a memory 2 (230), a disassembly device 220, a program execution monitoring device 240, a debug permit device 250, and a debug port. 270 is preferably present inside information processing semiconductor device 200.
[0026] 情報処理半導体装置 200はデバッグポート 270を介して、デバッガ 300と接続して デバッグが行われる。 The information processing semiconductor device 200 is connected to a debugger 300 via a debug port 270 to perform debugging.
[0027] また、認証ファイル生成機 100が情報処理半導体装置 200とは独立に存在する。 Also, the authentication file generator 100 exists independently of the information processing semiconductor device 200.
図 3にデバッグ許可装置 250の詳細につ 、て示す。 FIG. 3 shows details of the debug permission device 250.
[0028] デバッグ許可装置 250は、パスコードレジスタ 2502と、認証ファイルレジスタ 2504 の値を持つ。 [0028] The debug permitting device 250 has the values of the passcode register 2502 and the authentication file register 2504.
[0029] それぞれのレジスタの値を演算器 2506で演算する。 The value of each register is calculated by the calculator 2506.
この演算結果と、プログラム実行監視装置 240から CPU210がプログラムを実行中 であること示す信号を受けて、デバッグポート 270に対する制御を許可信号にて決定 する。 In response to the calculation result and a signal indicating that the CPU 210 is executing the program from the program execution monitoring device 240, control for the debug port 270 is determined by a permission signal.
[0030] 図 4で認証ファイル生成機 100での処理手順を示す。 FIG. 4 shows a processing procedure in the authentication file generator 100.
認証ファイル生成機 100は情報処理半導体装置 200で扱うパスコードを付加する プログラムを読み込む(S2000)。パスコードと(S2012)、パスコードと一対となるデ ノ ッガ用認証ファイルを生成する(S2002)。パスコードをプログラムに結合する(S2 014)。
[0031] 認証ファイル生成機 100でパスコードを結合したプログラムを情報処理半導体装置The authentication file generator 100 reads a program for adding a passcode handled by the information processing semiconductor device 200 (S2000). A passcode and (S2012), and a pair of passcode and a de nogger authentication file are generated (S2002). The passcode is combined with the program (S2014). [0031] The authentication file generator 100 combines a program with which a passcode is combined with an information processing semiconductor device.
200に提供し、メモリ 1 (202)に格納する。 Provide to 200 and store in memory 1 (202).
[0032] デバッガ認証ファイルはデバッガ 300に提供する。 [0032] The debugger authentication file is provided to the debugger 300.
図 5でデバッガ 300の接続処理手順を示す。 FIG. 5 shows the connection processing procedure of the debugger 300.
[0033] デバッガ 300は、情報処理半導体装置 200へ接続した時 (S3000)に、認証フアイ ルを、デバッグポートを介して認証ファイルレジスタ 2504に転送する(S3002)。 When connected to the information processing semiconductor device 200 (S3000), the debugger 300 transfers the authentication file to the authentication file register 2504 via the debug port (S3002).
[0034] 図 6に情報処理半導体装置 200でのプログラム読み込み処理手順を示す。 FIG. 6 shows a procedure of a program reading process in the information processing semiconductor device 200.
ノ スコードつきプログラムはメモリ 1 (202)に保存されている。製品出荷時は、フラッ シュ ROMなどの不揮発メモリに焼き付けられることが好まし!/、。 The program with the noscode is stored in memory 1 (202). At the time of product shipment, it is preferable to burn it to non-volatile memory such as flash ROM!
[0035] 情報処理半導体装置 200は、 CPUによりプログラムを分解器に読み出す指示を出 す(S 1000)。 The information processing semiconductor device 200 issues an instruction to read a program into a decomposer by the CPU (S1000).
[0036] 分解装置 220は、メモリ 1 (202)力もノ スコードつきプログラムを読み出し分解し、プ ログラムをメモリ 2 (230)に転送する 1002)。同時に、パスコードをデバッグ許可装 置 250のノ スコードレジスタ 2502【こ転送する 1004)。 [0036] The disassembly device 220 reads out the program with the noscode also in the memory 1 (202), disassembles it, and transfers the program to the memory 2 (230) 1002). At the same time, the passcode is transferred to the debugger 250's noscode register 2502 [transfer 1004].
[0037] メモリ 2 (230)は分解装置 220からプログラムが転送されると、プログラム実行監視 装置 240ヘプログラムの設定を通知する(S1022)。 When the program is transferred from the disassembly device 220, the memory 2 (230) notifies the program execution monitoring device 240 of the program setting (S1022).
[0038] プログラムの設定通知を受けて、プログラム実行監視装置 240は CPU210のプロ グラム実行の監視を開始する(S1024)。 [0038] Upon receiving the program setting notification, the program execution monitoring device 240 starts monitoring program execution of the CPU 210 (S1024).
[0039] CPU210は、メモリ 2 (230)力もプログラムを読み出し実行する(S1014)。 The CPU 210 reads out and executes the program in the memory 2 (230) (S1014).
[0040] プログラム実行監視装置 240は CPU210がプログラム実行を開始するとプログラム 実行中信号をデバッグ許可装置 250へ通知する(S1026)。 [0040] When the CPU 210 starts executing the program, the program execution monitoring device 240 notifies the debug execution device 250 of a program in progress signal (S1026).
[0041] 一方、デバッグ許可装置 250では、パスコードレジスタ 2502と認証ファイルレジスタOn the other hand, in the debug permission device 250, the passcode register 2502 and the authentication file register
2504を演算器 2506で演算する (S1006)。 2504 is calculated by the calculator 2506 (S1006).
[0042] デバッグ許可装置 250は、上記演算結果とプログラム実行監視装置 240からのプロ グラム実行中を受けて、デバッグポート 270の許可 '不許可を決定する(S1008)。 [0042] The debug permitting device 250 receives the operation result and the program being executed from the program execution monitoring device 240, and determines permission or non-permission of the debug port 270 (S1008).
[0043] デバッグ許可装置 250は、上記の決定に従 、デバッグポート 270に対して許可また は不許可の制御を行う(S1030)。 According to the above determination, the debug permitting device 250 controls permission or non-permission of the debug port 270 (S1030).
[0044] 以上の構成によりデバッグの許可されな ヽプログラムによる不正なデバッグ実行を
防止することができる。 [0044] With the above configuration, debugging is not permitted. Can be prevented.
[0045] (実施の形態 2) (Embodiment 2)
図 7に本実施の秘密鍵暗号ィ匕プログラムを用いた形態における情報処理半導体装 置 200を中心としたシステム全体のブロック図を示す。なお、本実施の形態で記載し ない構成は実施の形態 1と共通である。 FIG. 7 shows a block diagram of the entire system centering on the information processing semiconductor device 200 in a mode using the secret key encryption program of the present embodiment. Configurations not described in the present embodiment are common to the first embodiment.
[0046] 情報処理半導体装置 200は、 CPU210、メモリ 1 (202)、メモリ 2 (230)、復号装置The information processing semiconductor device 200 includes a CPU 210, a memory 1 (202), a memory 2 (230),
260、秘密鍵 262、プログラム実行監視装置 240、デバッグ許可装置 250、デバッグ ポート 270から構成されて!、る。 260, secret key 262, program execution monitoring device 240, debug permission device 250, debug port 270!
[0047] メモリ 1 (202)は情報処理半導体装置 200と外部インターフェースを介して接続さ れ、 CPU210、メモリ 2 (230)、復号装置 260、秘密鍵 262、プログラム実行監視装 置 240、デバッグ許可装置 250、デバッグポート 270は情報処理半導体装置 200の 内部に存在する形態が好ま 、。 [0047] The memory 1 (202) is connected to the information processing semiconductor device 200 via an external interface, and includes a CPU 210, a memory 2 (230), a decryption device 260, a secret key 262, a program execution monitoring device 240, and a debug permit device. 250 and the debug port 270 are preferably present inside the information processing semiconductor device 200.
[0048] 情報処理半導体装置 200はデバッグポート 270を介して、デバッガ 300と接続して デバッグが行われる。 The information processing semiconductor device 200 is connected to a debugger 300 via a debug port 270 to perform debugging.
[0049] また、認証ファイル生成機 100が情報処理半導体装置 200とは独立に存在する。 Also, the authentication file generator 100 exists independently of the information processing semiconductor device 200.
図 8で認証ファイル生成機 100での処理手順を示す。 FIG. 8 shows a processing procedure in the authentication file generator 100.
[0050] 認証ファイル生成機 100は情報処理半導体装置 200で扱うパスコードを付加する プログラムを読み込む(S2000)。パスコードと(S2012)、パスコードと一対となるデ ノ ッガ用認証ファイルを生成する(S2002)。パスコードを含む秘密鍵暗号ィ匕プログ ラムを生成する(S2022)。 The authentication file generator 100 reads a program for adding a passcode handled by the information processing semiconductor device 200 (S2000). A passcode and a denogger authentication file paired with the passcode (S2012) are generated (S2002). A secret key encryption program including a passcode is generated (S2022).
[0051] 認証ファイル生成機 100でパスコードを含む秘密鍵暗号ィ匕プログラムを情報処理 半導体装置 200に提供し、メモリ 1 (202)に格納する。 The authentication file generator 100 provides the secret key encryption program including the passcode to the information processing semiconductor device 200 and stores it in the memory 1 (202).
[0052] デバッガ認証ファイルはデバッガ 300に提供する。 [0052] The debugger authentication file is provided to the debugger 300.
図 9に情報処理半導体装置 200でのプログラム読み込み処理手順で示す。 FIG. 9 shows a program reading processing procedure in the information processing semiconductor device 200.
[0053] 秘密鍵暗号ィ匕プログラムはメモリ 1 (202)に保存されている。製品出荷時は、フラッ シュ ROMなどの不揮発メモリに焼き付けられることが好まし!/、。 [0053] The secret key encryption program is stored in the memory 1 (202). At the time of product shipment, it is preferable to burn it to non-volatile memory such as flash ROM!
[0054] 情報処理半導体装置 200は、 CPUによりプログラムを分解器に読み出す指示を出 す(S 1000)。
[0055] 復号装置 260は、メモリ 1 (202)から秘密鍵暗号ィ匕プログラムを読み出し、秘密鍵 2 62で暗号文を復号し、復号した平文プログラムをメモリ 2に転送する(S1042)。同時 に、パスコードをデバッグ許可装置 250のバスコードレジスタ 2502に転送する(S10 44)。 The information processing semiconductor device 200 issues an instruction to read out the program to the decomposer by the CPU (S1000). The decryption device 260 reads the secret key encryption program from the memory 1 (202), decrypts the ciphertext with the secret key 262, and transfers the decrypted plaintext program to the memory 2 (S1042). At the same time, the passcode is transferred to the bus code register 2502 of the debug permit device 250 (S1044).
[0056] メモリ 2 (230)は復号装置 260から平文プログラムが転送されると、プログラム実行 監視装置 240ヘプログラムの設定を通知する(S 1022)。 When the plaintext program is transferred from the decryption device 260, the memory 2 (230) notifies the program execution monitoring device 240 of the program setting (S1022).
[0057] プログラムの設定通知を受けて、プログラム実行監視装置 240は CPU210のプロ グラム実行の監視を開始する(S1024)。 [0057] Upon receiving the program setting notification, the program execution monitoring device 240 starts monitoring program execution of the CPU 210 (S1024).
[0058] CPU210は、メモリ 2 (230)力も平文プログラムを読み出し実行する(S1014)。 The CPU 210 reads and executes the plaintext program in the memory 2 (230) (S1014).
[0059] プログラム実行監視装置 240は CPU210がプログラム実行を開始するとプログラム 実行中信号をデバッグ許可装置 250へ通知する(S1026)。 [0059] When the CPU 210 starts executing the program, the program execution monitoring device 240 notifies the debug permission device 250 of a program in progress signal (S1026).
[0060] 一方、デバッグ許可装置 250では、パスコードレジスタ 2502と認証ファイルレジスタ[0060] On the other hand, in the debug permission device 250, the passcode register 2502 and the authentication file register
2504を演算器 2506で演算する (S1006)。 2504 is calculated by the calculator 2506 (S1006).
[0061] デバッグ許可装置 250は、上記演算結果とプログラム実行監視装置 240からのプロ グラム実行中を受けて、デバッグポート 270の許可 '不許可を決定する(S1008)。 [0061] The debug permitting device 250 receives the operation result and the program execution from the program execution monitoring device 240, and determines permission / non-permission of the debug port 270 (S1008).
[0062] デバッグ許可装置 250は、上記の決定に従 、デバッグポート 270に対して許可また は不許可の制御を行う(S1030)。 [0062] According to the above determination, the debug permitting device 250 controls permission or non-permission of the debug port 270 (S1030).
[0063] 以上の構成により、実施の形態 1よりもセキュリティレベルを向上させることができる With the above configuration, the security level can be improved compared to the first embodiment.
[0064] (実施の形態 3) (Embodiment 3)
図 10に本実施の秘密鍵暗号ィ匕認証ファイルを用いた形態における情報処理半導 体装置 200を中心としたシステム全体のブロック図を示す。なお、本実施の形態で記 載しない構成は実施の形態 1若しくは 2と共通である。 FIG. 10 is a block diagram of the entire system centering on the information processing semiconductor device 200 in a mode using the secret key encryption authentication file according to the present embodiment. Configurations not described in the present embodiment are the same as those in the first or second embodiment.
[0065] 情報処理半導体装置 200は、 CPU210、メモリ 1 (202)、メモリ 2 (230)、復号装置[0065] The information processing semiconductor device 200 includes a CPU 210, a memory 1 (202), a memory 2 (230), and a decoding device.
260、秘密鍵 1 (262)、プログラム実行監視装置 240、デバッグ許可装置 250、秘密 鍵 2 (256)、デバッグポート 270から構成されている。 It consists of 260, a secret key 1 (262), a program execution monitoring device 240, a debug permit device 250, a secret key 2 (256), and a debug port 270.
[0066] メモリ 1 (202)は情報処理半導体装置 200と外部インターフェースを介して接続さ れ、 CPU210、メモリ 2 (230)、復号装置 260、秘密鍵 1 (262)、プログラム実行監視
装置 240、デバッグ許可装置 250、秘密鍵 2 (256)、デバッグポート 270は情報処理 半導体装置 200の内部に存在する形態が好ま 、。 The memory 1 (202) is connected to the information processing semiconductor device 200 via an external interface, and includes a CPU 210, a memory 2 (230), a decryption device 260, a secret key 1 (262), and a program execution monitor. The device 240, the debug permission device 250, the secret key 2 (256), and the debug port 270 are preferably present inside the information processing semiconductor device 200.
[0067] 情報処理半導体装置 200はデバッグポート 270を介して、デバッガ 300と接続して デバッグが行われる。 The information processing semiconductor device 200 is connected to a debugger 300 via a debug port 270 to perform debugging.
[0068] また、認証ファイル生成機 100が情報処理半導体装置 200とは独立に存在する。 Further, the authentication file generator 100 exists independently of the information processing semiconductor device 200.
図 11にデバッグ許可装置 250の詳細につ 、て示す。 FIG. 11 shows details of the debug permission device 250.
[0069] デバッグ許可装置 250は、パスコードレジスタ 2502と、認証ファイルレジスタ 2504 の値を持つ。 [0069] The debug permitting device 250 has the values of the passcode register 2502 and the authentication file register 2504.
[0070] 認証ファイルレジスタ 2504は、デバッグポート 270からデータが送られた時に、秘 密鍵 2 (256)を用いて暗号復号器 2510によって復号されて力も設定される。 [0070] The authentication file register 2504 is decrypted by the decryption device 2510 using the secret key 2 (256) when data is transmitted from the debug port 270, and the power is also set.
[0071] パスコードレジスタ 2502と、認証ファイルレジスタ 2504の値を演算器 2506で演算 する。 An arithmetic unit 2506 calculates the values of the passcode register 2502 and the authentication file register 2504.
[0072] この演算結果と、プログラム実行監視装置 240から CPU210がプログラムを実行中 であること示す信号を受けて、デバッグポート 270に対する制御を許可信号にて決定 する。 [0072] Receiving this calculation result and a signal from the program execution monitoring device 240 indicating that the CPU 210 is executing the program, control of the debug port 270 is determined by a permission signal.
[0073] 図 12で認証ファイル生成機 100での処理手順を示す。 FIG. 12 shows a processing procedure in the authentication file generator 100.
認証ファイル生成機 100は情報処理半導体装置 200で扱うパスコードを付加する プログラムを読み込む(S2000)。パスコードと(S2012)、パスコードと一対となるデ バッガ用認証ファイルを生成する(S2002)。 The authentication file generator 100 reads a program for adding a passcode handled by the information processing semiconductor device 200 (S2000). A passcode and (S2012) and a pair of passcode and a debugger authentication file are generated (S2002).
[0074] ノ スコードを含む秘密鍵暗号ィ匕プログラムを生成する(S2022)。 A secret key encryption program including a noscode is generated (S2022).
秘密鍵暗号ィ匕デバッガ用認証ファイルを生成する(S2032)。 An authentication file for the private key encryption debugger is generated (S2032).
[0075] 認証ファイル生成機 100でパスコードを含む秘密鍵暗号ィ匕プログラムを情報処理 半導体装置 200に提供し、メモリ 1 (202)に格納する。 The authentication file generator 100 provides the secret key encryption program including the passcode to the information processing semiconductor device 200 and stores it in the memory 1 (202).
[0076] 秘密鍵暗号ィ匕デバッガ用認証ファイルはデバッガ 300に提供する。 The authentication file for the private key encryption / debugger debugger is provided to the debugger 300.
図 13に情報処理半導体装置 200でのプログラム読み込み処理手順を示す。 FIG. 13 shows a program reading processing procedure in the information processing semiconductor device 200.
[0077] 秘密鍵暗号ィ匕プログラムはメモリ 1 (202)に保存されている。製品出荷時は、フラッ シュ ROMなどの不揮発メモリに焼き付けられることが好まし!/、。 [0077] The secret key encryption program is stored in the memory 1 (202). At the time of product shipment, it is preferable to burn it to non-volatile memory such as flash ROM!
[0078] 情報処理半導体装置 200は、 CPUによりプログラムを分解器に読み出す指示を出
す(S 1000)。 [0078] The information processing semiconductor device 200 issues an instruction to read the program to the decomposer by the CPU. (S1000).
[0079] 復号装置 260は、メモリ 1 (202)から秘密鍵暗号ィ匕プログラムを読み出し、秘密鍵 1 The decryption device 260 reads the secret key encryption program from the memory 1 (202),
(262)で暗号文を復号し、復号した平文プログラムをメモリ 2に転送する(S1042)。 同時に、パスコードをデバッグ許可装置 250のバスコードレジスタ 2502に転送する( S1044)。 The ciphertext is decrypted in (262), and the decrypted plaintext program is transferred to the memory 2 (S1042). At the same time, the pass code is transferred to the bus code register 2502 of the debug permit device 250 (S1044).
[0080] メモリ 2 (230)は復号装置 260から平文プログラムが転送されると、プログラム実行 監視装置 240ヘプログラムの設定を通知する(S 1022)。 When the plaintext program is transferred from the decryption device 260, the memory 2 (230) notifies the program execution monitoring device 240 of the setting of the program (S1022).
[0081] プログラムの設定通知を受けて、プログラム実行監視装置 240は CPU210のプロ グラム実行の監視を開始する(S1024)。 [0081] Upon receiving the program setting notification, the program execution monitoring device 240 starts monitoring the program execution of the CPU 210 (S1024).
[0082] CPU210は、メモリ 2 (230)力も平文プログラムを読み出し実行する(S1014)。 The CPU 210 reads and executes the plaintext program in the memory 2 (230) (S1014).
[0083] プログラム実行監視装置 240は CPU210がプログラム実行を開始するとプログラム 実行中信号をデバッグ許可装置 250へ通知する(S1026)。 [0083] When the CPU 210 starts executing the program, the program execution monitoring device 240 notifies the debug permission device 250 of a program in progress signal (S1026).
[0084] 一方、デバッグ許可装置 250では、秘密鍵暗号化デバッガ用認証ファイルを秘密 鍵 2 (256)を用いて暗号復号器 2510で復号し、認証ファイルレジスタ 2504に設定 する(S1062)。 On the other hand, in the debug permitting device 250, the secret key encryption debugger authentication file is decrypted by the encryption / decryption device 2510 using the secret key 2 (256), and is set in the authentication file register 2504 (S1062).
[0085] パスコードレジスタ 2502と認証ファイルレジスタ 2504を演算器 2506で演算する(S 1006)。 The pass code register 2502 and the authentication file register 2504 are operated by the operation unit 2506 (S 1006).
[0086] デバッグ許可装置 250は、上記演算結果とプログラム実行監視装置 240からのプロ グラム実行中を受けて、デバッグポート 270の許可 '不許可を決定する(S1008)。 [0086] The debug permitting device 250 receives the above calculation result and the execution of the program from the program execution monitoring device 240, and determines permission or non-permission of the debug port 270 (S1008).
[0087] デバッグ許可装置 250は、上記の決定に従 、デバッグポート 270に対して許可また は不許可の制御を行う(S1030)。 [0087] According to the above determination, the debug permitting device 250 controls permission or non-permission of the debug port 270 (S1030).
[0088] なお本実施の形態における秘密鍵 1 (262)と、秘密鍵 2 (256)は異なるが、これら を共通とすることちでさる。 [0088] Although secret key 1 (262) and secret key 2 (256) in the present embodiment are different, they are common to each other.
[0089] 以上の構成により、実施の形態 2よりもさらにセキュリティレベルを向上させることが できる。 With the above configuration, it is possible to further improve the security level as compared with the second embodiment.
産業上の利用可能性 Industrial applicability
[0090] 本発明は、認証ファイル生成機によるパスコードつきのプログラムの生成と、そのパ スコードに対応した認証ファイルを生成、および情報処理半導体装置のデバッグ許
可装置による復号装置力 のパスコードとデバッガ力 の認証ファイルとの演算により デバッガポートを選択的に制御することで、プログラム単位でのデバッガ制御が可能 となる。本発明は、アルゴリズムの保護が必要なプログラムを搭載する情報処理半導 体装置全般に利用することができ、その産業上の利用可能性は非常に広く且つ大き い。
The present invention provides a method for generating a program with a passcode by an authentication file generator, generating an authentication file corresponding to the passcode, and enabling debugging of an information processing semiconductor device. By selectively controlling the debugger port by calculating the passcode of the decryption device by the enabled device and the authentication file of the debugger capability, it is possible to control the debugger on a program basis. INDUSTRIAL APPLICABILITY The present invention can be used for all information processing semiconductor devices equipped with a program that requires protection of an algorithm, and its industrial applicability is very wide and large.