JP2004503860A - Data processing method and apparatus for execution of protected instructions - Google Patents

Data processing method and apparatus for execution of protected instructions Download PDF

Info

Publication number
JP2004503860A
JP2004503860A JP2002511070A JP2002511070A JP2004503860A JP 2004503860 A JP2004503860 A JP 2004503860A JP 2002511070 A JP2002511070 A JP 2002511070A JP 2002511070 A JP2002511070 A JP 2002511070A JP 2004503860 A JP2004503860 A JP 2004503860A
Authority
JP
Japan
Prior art keywords
program
sequence
address
signature register
stored
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.)
Withdrawn
Application number
JP2002511070A
Other languages
Japanese (ja)
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.)
Koninklijke Philips NV
Original Assignee
Koninklijke Philips Electronics NV
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 Koninklijke Philips Electronics NV filed Critical Koninklijke Philips Electronics NV
Publication of JP2004503860A publication Critical patent/JP2004503860A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/30101Special purpose registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/341Active cards, i.e. cards including their own processing means, e.g. including an IC or chip
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/0806Details of the card
    • G07F7/0813Specific details related to card security
    • G07F7/082Features insuring the integrity of the data on or in the card
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/10Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means together with a coded signal, e.g. in the form of personal identification information, like personal identification number [PIN] or biometric data
    • G07F7/1008Active credit-cards provided with means to personalise their use, e.g. with PIN-introduction/comparison system
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/12Card verification
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/12Card verification
    • G07F7/122Online card verification

Abstract

アプリケーションプログラムが不当に操作されたかどうかを判定する装置には、命令レジスタの出力及び/又はプログラムメモリのアドレスに接続されるシグネチャレジスタが設けられる。シグネチャレジスタはまた、2つのオペレーティングモードを有するプロセッサのモードビットにも接続される。第1のモードでは、シグネチャレジスタは命令レジスタの出力及び/又はプログラムメモリのアドレスを蓄積するが、シグネチャレジスタの出力は外部から識別できない。第2のモードでは、シグネチャレジスタは入力をそれ以上蓄積しないように設定される。第2のモードでは、シグネチャレジスタの内容は特定値との比較によってチェックされる。この比較値を、プログラムの関連位置にある命令に有効に含めることができる。一実施形態ではシグネチャ値は直ぐ比較されず、プログラムの無許可の操作時に比較値を容易に変更できないように値を暗号化した後に比較される。The device for determining whether an application program has been manipulated improperly is provided with a signature register connected to the output of the instruction register and / or to an address of the program memory. The signature register is also connected to mode bits of a processor having two operating modes. In the first mode, the signature register stores the output of the instruction register and / or the address of the program memory, but the output of the signature register cannot be identified externally. In the second mode, the signature register is set to store no more inputs. In the second mode, the contents of the signature register are checked by comparison with a specific value. This comparison value can be effectively included in the instruction at the relevant location in the program. In one embodiment, the signature values are not compared immediately, but are compared after encrypting the values so that the comparison values cannot be easily changed during unauthorized operation of the program.

Description

【0001】
本発明は一般に、命令シーケンスを実行するための方法及びデータ処理装置に関する。具体的には、本発明はプログラム部分を変更せずに適当な順序で実行するための方法及びデータ処理装置に関する。
【0002】
プログラムの実行において、命令シーケンスからなるプログラム部分には意図するシーケンスの流れがある。割込み要求の場合でも、このプログラム部分には典型的に予め定義した割込み出口点、割込み入口点及び割込み処理シーケンスがある。しかしながら、プログラムの順序付けで問題が起こることがある。例えば電気的な干渉信号や欠陥のある要素によって、一連の命令シーケンスの実行時にエラーが起こることがある。これらのエラーによって命令を特定の意図した順序で実行することがもはやできなくなり、プログラムシーケンスの続行も永久に妨害される。
【0003】
しかしながら、適切な動作時にプログラムの命令が特定の順序で実行されない場合もある。これらの場合は、例えばいわゆるスマートカードに関するものである。スマートカードとは、マイクロプロセッサの形式のデータ処理装置やメモリを含む平坦なカードである。スマートカードは、接点又は無線接触媒体を利用するホスト装置(例えば、読み取り装置)と共に操作される。
【0004】
この種のスマートカードは、厳しく定義した条件下でだけスマートカードメモリのデータを読み出し、かつ/又は変更することができるバンキングアプリケーションに利用することができる。さらに、典型的には与えられた他のデータ(例えば、セキュリティ関連データ)はスマートカードと読み取り装置の間でしか交換されず、外部に配布されたり外部から識別したりできない。このようなセキュリティ関連データは、例えば健康管理カードやセットトップボックスのアクセスカードとしての使用などのスマートカードの他のアプリケーションにも含まれる。
【0005】
典型的に、これらのスマートカードにあるプログラムは普通、スマートカードにデータを追加したり、スマートカードを種々のアプリケーションに適合させたり、かつ/又はさらなる使用の可能性を形成するために、変更又は補足される。スマートカードの発信者だけがこれらの変更や補足を認識するのが好ましい。しかしながら実際には、認証されていない人物がマイクロプロセッサ又はそのプログラムメモリにある命令シーケンスを変更してデータを無許可に読み取ったり不正に変更したりしようと企てることを殆ど防ぐことができない。
【0006】
参照として本明細書中に援用するドイツ特許第19804784.3号に記載されている従来技術のシステムでは、この種の操作に対して高い程度の保護を与えるスマートカードが提案されている。この目的のために、スマートカードを制御するプログラム部分と読み取り装置の相互作用は実質的に2つの命令シーケンスに細分割され、そのうち1つの命令シーケンスは変更できないように保存される。実質的な、特にセキュリティ関連データへの全てのアクセスは、システムプログラムと称する一方の命令シーケンスでのみ可能である。他方の命令シーケンスをアプリケーションプログラムと称する。命令シーケンスとプログラムは両方とも多数の個々の命令シーケンスからなる。アプリケーションプログラムで与えられた、特にセキュリティ関連データにアクセスしようとする場合、システムプログラムへのジャンプが行われる。その後アプリケーションプログラムへのジャンプが行われ、アプリケーションプログラムが続けて実行される。しかしながらこのシステムには、保護されていないアプリケーションプログラムで無許可の変更が行われ得るという問題がある。無許可の変更を行う際、システムプログラムに侵入してセキュリティ関連データへの外部アクセスを得るか又はシステムプログラムを無許可の方法で実行するために、意図した入口及び出口部分を迂回することができる。
【0007】
本発明と同じ譲受人に譲受され参照として本明細書中に援用される米国出願番号第09/365,212号に示す他の従来技術のシステムでは、アドレス又は命令のシーケンスを蓄積するためにシグネチャレジスタが利用される。シグネチャレジスタから蓄積されたアドレス又は命令は命令部分に含まれる値と比較され、意図した命令の流れが適切に変更されているかどうかを判定する。不適切な命令の流れが起こった場合、シグネチャレジスタに保存される値は命令部分にある値と対応しないため、装置の動作が終了する。シグネチャレジスタの値が無許可に変更されることを食い止めるために、時に暗号化装置を利用してシグネチャレジスタの値を秘密に変更する。しかしながら、暗号化装置における暗号化方法が無許可の改竄によって発覚してしまった場合、装置のセキュリティが損なわれる可能性がある。
【0008】
したがって本発明の目的は、従来技術の欠点を克服することである。
【0009】
本発明のさらなる目的は、命令の無許可の変更又は補足を認識できる方法及びデータ処理装置を提供することである。
【0010】
アプリケーションプログラムが不当に操作されたかどうかを判定する装置には、命令レジスタの出力及び/又はプログラムメモリのアドレスに接続されるシグネチャレジスタが設けられる。シグネチャレジスタはまた、2つのオペレーティングモードを有するプロセッサのモードビットにも接続される。第1のモードでは、シグネチャレジスタは命令レジスタの出力及び/又はプログラムメモリのアドレスを蓄積するが、シグネチャレジスタの出力は外部から識別できない。第2のモードでは、シグネチャレジスタは入力をそれ以上蓄積しないように設定される。第2のモードでは、シグネチャレジスタの内容は特定値との比較によってチェックされる。この比較値を、プログラムの関連位置にある命令に有効に含めることができる。一実施形態ではシグネチャ値は直ぐ比較されず、プログラムの無許可の操作時に比較値を容易に変更できないように値を暗号化した後に比較される。
【0011】
一実施形態では、シグネチャレジスタはメモリ管理ユニットを介してプログラムメモリのアドレスに接続される。こうして、シグネチャレジスタはプログラムメモリの実アドレスの代わりにプログラムメモリの仮想アドレスを蓄積するため、プログラムの流れを容易に特徴付けることができる。仮想アドレスは、自己相対アドレスに対応することができる。
【0012】
実施形態では、プロセッサの第1のモードが信頼されていないアプリケーションプログラムシーケンスのために保存され、プログラムの第2のモードが信頼されているプログラムシーケンスのために保存される。信頼されていないプログラムシーケンスは、装置外からの介入によって変更可能且つ識別可能なプログラムシーケンスである。信頼されているプログラムシーケンスは、装置外からの介入によって変更不可能且つ識別不可能なプログラムシーケンスである。特定の実施形態では、この装置はスマートカードに対応することができる。
【0013】
以下は、上記の特徴や利点、またその他の特徴や利点を図面に関連させて示す本発明の実施形態の説明である。図面は例示の目的で含められており本発明の範囲を表すものではないことを理解されたい。添付の図面に関連させることで、本発明を最もよく理解できる。
【0014】
以下の説明において、幾つかの用語は説明を簡単にするために特定の実施形態又はシステムに関して例示のために説明されている。しかしながら、当業者が容易に理解するように、これらの用語は本発明を容易に適用できる他の類似したアプリケーション及び実施形態も含むものと理解すべきである。
【0015】
図1は、本発明のデータ処理装置100のブロック図を示す。メモリ10は、リード13Aを介してアドレス発生器12によってアドレス指定されて連続的に読み出される命令シーケンスを含む。読み出された命令は、1回に少なくとも1つの命令を保存する命令レジスタ14に出力される。命令又はその少なくとも一部はリード15を介して種々の要素に出力される。
【0016】
これらの要素のうちの1つが命令デコーダ16である。この命令デコーダ16は特に命令の演算部を復号し、対応する制御リードを介してこの場合一般に実行装置18として示される他の要素に信号を送る。実行装置18は特に、中央処理ユニット(「CPU」)などのプロセッサやレジスタ(図示せず)を含む。
【0017】
実行装置18からアドレス発生器12へのリード19は、命令の実行が終了し次の命令を呼び出そうとするときに、制御信号をアドレス発生器12へ送る。さらにリード19は、例えば同時の命令(例えば割込み命令)に応答して、又は実行装置18で異なる命令部分がアドレス発生器12から要求された場合、制御信号をアドレス発生器12へ送る。異なる命令部分の新しいアドレスは、命令レジスタ14に存在する命令の一部分によって、リード15を介して示されるのが好ましい。この場合、この新しいアドレスとリード19の制御信号が命令シーケンスのジャンプをトリガする。
【0018】
一実施形態では、リード15はシグネチャレジスタ20の入力にも接続される。シグネチャレジスタ20はまた、リード13Bを介してアドレス発生器12の出力にも接続される。他の実施形態では、これら2つのリード13Bと15のうち1つだけをシグネチャレジスタ20に接続させることもできる。シグネチャレジスタ20は、アドレス発生器12と命令レジスタ14のいずれか又は両方から新しく受け取った値を蓄積し、保存する。シグネチャレジスタ20は、リード17Aを介して命令デコーダ16から受け取った関連信号に応答して、蓄積した値を保存する。悪意のある意図的な介入を防ぐために、シグネチャ20は受け取った値の全て又はその一部を蓄積することができることを明らかにされたい。
【0019】
シグネチャレジスタ20は、蓄積データのチェックサムの維持、蓄積データの排他的論理和(XOR)、他の公知の蓄積方法などの多くの公知の方法で値を蓄積することができる。さらに、入力値の各ビットを結合/蓄積することができ、その後保存した蓄積蓄積結果に蓄積することができる。重要なのは、蓄積方法は当業界で公知であるが選択した特定の方法は知られていないため、命令の無許可の変更又は補足を隠そうとする試みをくじくことができる点である。一実施形態では入力値の全ビットを蓄積し、他の実施形態では選択したビットだけを蓄積し、或いはこれらを組み合わせることで蓄積データの予測不能性(明らかにランダムな状態)をさらに提供することができる。
【0020】
シグネチャレジスタ20の出力21は、コンパレータ22の入力に接続する。コンパレータ22の第2の入力は、例示の実施形態ではリード15に接続される。このようにして、コンパレータ22はシグネチャレジスタ20がリード21を介して出力した値と命令デコーダ16がリード17Bを介して対応する信号を出力したときに命令部分に含まれる値とを比較する。他の実施形態では、コンパレータ22はシグネチャレジスタ20が出力した値と命令レジスタ14及びリード15を介したメモリ10の変更できない部分に含まれる値とを比較してもよい。
【0021】
シグネチャレジスタ20がリード21を介して出力した値が命令部分に含まれる値に対応しない場合、コンパレータ22はリード23を介して値と制御信号をアドレス発生器12に出力する。制御信号に応答してアドレス発生器12は所与のアドレスに設定されるため、所定の命令シーケンスが実行される。例えば所定の命令シーケンスは、装置のさらなる機能を抑止する割込み命令シーケンスであることができる。
【0022】
一実施形態では、シグネチャレジスタ20は、秘密のアルゴリズムを用いてシグネチャレジスタ20に保存された結合値から新しい値を生成する暗号化装置24を含むこともできる。この新しい値は、関連制御信号がリード17Aにあるときにシグネチャレジスタ20に保存される。次いでシグネチャレジスタ20は、暗号化装置24の暗号化アルゴリズムを知らない人物が予測できない値に基づいて他のシグネチャの作成を開始する。したがって、前の命令シーケンスを変更する場合にコンパレータ23が信号を生成したり割込み命令シーケンスへのジャンプを実行しないように、関連する命令によってコンパレータ22に出力される値を変更するのは困難である。このようにして、命令シーケンス及びこれに含まれる命令が正しい順序で実行されるかどうか、また命令が変更されているかどうかをチェックすることができる。
【0023】
チェックサムがカードリーダ28などによって外部と通信する場合、暗号化装置24によって与えられる他の暗号化や保護をさらに利用することができる。シグネチャレジスタ20が出力したチェックサムを暗号化することで、ハッカーが自動テラーマシン(ATM)などの対応する装置のリード(例えば電話線)を簡単に傍受して正しいチェックサムにパッチすることがより困難になる。
【0024】
さらに本発明によると、実行装置18からリード17Cで出力されたモード信号は、アプリケーションモードをシグネチャレジスタ20へのアクセス及び/又はこれの変更から除外するハードウェア保護として作用する。このようにして、スマートカードなどの装置100は、モード信号の形式のハードウェア制約によって決定された明確なオペレーティングモードを有する。
【0025】
一実施形態では、「アプリケーションモード」又は「ユーザモード」はモード信号の論理状態がゼロ(「ゼロモード信号」)であることによって決定される。ゼロモード信号は、信頼されていないアプリケーションを実行するために保存される。モード信号の論理状態が1(「1モード信号」)の場合は、割込みコード部分の実行を含めたシステムプログラムのために保存される。このように、モード信号はプロセッサ状態(例えば、実行装置18のCPU)の一部である。したがって、アプリケーションプログラムは、フル制御を所定の入口点からオペレーティングシステムコードに送ること以外にハードウェア制約(例えば、モード信号)によって、オペレーティングモードを「システムモード」に広げることから除外される。
【0026】
一実施形態では、アプリケーションプログラムは、「システム呼び出し」命令を起動する。命令レジスタ14からのシステム呼び出し命令は、割込み命令部分をトリガする。この実施形態では、オペレーティングシステムコードはこれらの「システム呼び出し」の割込みのための割込みハンドラとして作用する。
【0027】
動作上、シグネチャレジスタ20はチェックサム又は実行した命令及び/又は命令アドレスの他の論理演算を蓄積する。その際CPUはアプリケーションモードで作動している。ゼロモード信号はアプリケーションモードで設定されるハードウェアロックとして作用するため、シグネチャレジスタ20はいかなる方法でもアプリケーションプログラムではアクセスできない。したがって、ゼロモード信号はアプリケーションプログラムによってシグネチャレジスタ20の出力21へアクセスするのを防ぐことができる。
【0028】
システムモードではハードウェアが1モード信号によって決定されるため、シグネチャレジスタ20のチェックサム状態は他のアドレス生成の影響を受けず読み取り動作にアクセスすることができる。全ての割込みコードがシステムモードで実行されるため、割り込みコードはシグネチャレジスタ20によって加算されることから除外される。さらに、割込みプログラムのモードは割り込み入口/出口で保存/再保存されるため、シグネチャレジスタ20はコントロールが割込み出口でアプリケーションモードに戻ったときだけチェックサム処理を再開する。シグネチャレジスタ20は、コントロールが前の割込みシステムプログラムにリターンした場合はチェックサムを再開しない。こうして、CPUのモードが蓄積/停止状態を制御し、シグネチャレジスタ20の結果(例えば、チェックサム)にアクセスする。
【0029】
割込みコードをシグネチャレジスタ20の結果から除外することは、アプリケーションプログラムやその流れを固有のシグネチャによって特徴付けることを容易にするために望ましい。割込みコード部分を結果に含めると、その結果が、正確な時間や割込みコードがアプリケーションプログラムで実行された命令部分に依存することになる。割込みの発生をアプリケーションプログラムの所与の特定の部分に限定できないため、このことによってシグネチャレジスタ20に含まれる結果によって命令の流れを適切に特徴付けることがより難しくなる。
【0030】
システムモードでは、システムプログラムはシグネチャレジスタ20の結果に対する完全な制御を有する。ドイツ特許第19804784.3号に記載されたハードウェア保護メカニズムによって制御されるように、システムプログラムは「NONTRUSTED」アプリケーションプログラムから変更できない「TRUSTED」コードであるため、シグネチャレジスタ20をシステムプログラムによる変更から保護する必要がない。この特許に示されるように、システムプログラムはメモリ保護ハードウェアの完全な制御下にあるため、システムプログラムをアプリケーションプログラムによるアクセスから保護することができる。
【0031】
一実施形態では、アドレス発生器12は、メモリ10にアクセスしリード13Bを介してシグネチャレジスタ20に出力されるアドレスを制御するためにアドレスの再配置を実行するメモリ管理ユニットとして作用する。一実施形態ではシグネチャレジスタ20はアドレスのチェックサムを実行することができるのでアドレス発生器がメモリ管理ユニットとして作用するのは望ましいが、アプリケーションプログラムは定義された(例えば、固定した)メモリ位置を持たずにオンザフライでロードされてもよい。
【0032】
メモリ管理ユニットによって実行されるアドレスの再配置をしないならば、プログラム(例えば、アドレスXXへJUMPせよ)内で参照されるようなアドレスをメモリにおけるプログラムの最終的な配置のために変更すべきである。再配置ローダは、このアドレスの変更を実行することができる。しかしながら、その際シグネチャレジスタのチェックサムはもはやプログラムを特徴付けず、その新しいアドレスのプログラムが特徴付けることになる。再配置ローダは、典型的にはプログラムのアドレス部分を変更する一方でこれを例えば実行する前にメモリに送るユーティリティプログラムである。再配置ローダはプログラム実行前にプログラムを調べ、全ての基準を記号アドレス(例えば、プログラムの流れに関連し、プログラムが保存されるメモリ中の実際の位置には関連しないアドレス)からプログラムが保存されている実際のアドレスに変更する。このことに関する問題は、記号アドレスが普通は失われるためにプログラムの流れを特徴付けるためにシグネチャレジスタが利用できないことである。
【0033】
アドレス発生器12をメモリ管理ユニットとして利用することで、この問題を解決することができる。メモリ管理ユニットでは、プログラムの流れを、実行前に変化しない仮想アドレスと称することがある。仮想アドレスはアドレス発生器12によってリード13Bを介してシグネチャレジスタ20に出力される。そのためシグネチャレジスタのチェックサムはプログラムがメモリ10中で配置される実アドレスの影響を受けない。メモリ管理ユニットは仮想アドレスの実アドレスへの変更を実行し、これらの実アドレスをリード13Aを介してメモリ10に出力する。
【0034】
本実施形態では、メモリ管理ユニット又は他のアドレス独立のための手段は、プログラムのアドレスシーケンスによるプログラムの特徴付けを容易にするために望ましい。メモリ管理ユニットは、システムプログラムの完全な制御下にある。システムモードプログラムは、アプリケーションプログラムの仮想アドレスと実アドレスの対応を「知っている」。そのため、アプリケーションプログラムは、メモリにおけるアプリケーションプログラムの位置に関係なく変更されない仮想アドレスのみを参照する。したがって、シグネチャレジスタは実アドレスの影響を受けずに(仮想アドレスによって)プログラムの流れを特徴付けることができる。
【0035】
他の実施形態では、プログラム部分は自己相対アドレス指定を利用することができる。自己相対アドレス指定によって、プログラム部分が「位置独立的」になる。この方法は、シグネチャレジスタ20のチェックサムがプログラムの流れを特徴付けることができるように、相対ジャンプのようなCPUのアドレス指定モードを利用する。自己相対アドレス指定では、アプリケーションプログラムのアドレスは例えば、分岐先の現在の命令からの距離しか参照しない幾つかの基準アドレスを表している。アプリケーションプログラムが1個で動く限り、分岐の開始と終了の相対位置も一緒に移動するため、アプリケーションプログラム内の全ての分岐は変更されない。
【0036】
一実施形態では、図1に示す装置100は参照したドイツ特許第19804784.3号に記載されるようにスマートカードの制御装置を構成する。この実施形態では、リード17Bの制御信号がコンパレータ22を起動し、この信号は説明したシステムプログラムへのジャンプが実行されるジャンプ命令毎に生成されるのが好ましい。同時に、シグネチャレジスタ20はCPUからのモード信号の変化によって蓄積しないように設定される。システムプログラムは、上述のようにメモリ10の変更できない部分に保存されるのが好ましい。アプリケーションプログラムへのリターンジャンプ時だけ、シグネチャレジスタ20は解放されてモード信号によって再び蓄積する。一実施形態では、暗号化ユニット24によって生成された値は、スマートカードからのリード29の信号又は命令デコーダ16からのリード17Aの信号に応答して、シグネチャレジスタ20のチェックサムとして保存される。
【0037】
スマートカードは典型的にカードリーダと共に動作する。図1のブロック28はこのようなカードリーダを象徴的に表す。スマートカードのプログラムがジャンプを実行すると、カードリーダ28は例えばシグネチャレジスタ20の出力21の値を受け取ることができる。出力21は直接チェックサムを表してもよいし、暗号化ユニット24によって暗号化された値を表してもよい。次いでこの値はカードリーダ28の所定値と比較される。一実施形態では、カードリーダ28がスマートカードを制御することができるならば、コンパレータ22を省いてもよい。
【0038】
他の実施形態では、カードリーダ28は受け取った値から他のシグネチャを作成することもできるし、この他のシグネチャをリード29を介してシグネチャレジスタ20にリターンすることもできる。したがってスマートカードが適切な、特に操作されていないカードリーダと協働しているかどうかをチェックすることができる。
【0039】
図2は、本発明の実施の形態の命令シーケンスの実行の例示的なフローチャートを示す。示されるように、実行はスタート30から始まりそこではスマートカードをカードリーダに挿入することでこれらの導電接続又は非接触接続を確立する。続いてスタートプログラム31が実行され、このとき、例えばカードの特徴や認証テストを実施する必要があるかなどを決定するためにカードとカードリーダが種々のデータを交換する。次に、処理はアプリケーションプログラムの一部を形成するプログラムシーケンス32へと進む。プログラムシーケンス32を実行する前に(例えばプログラムシーケンス31の最終部分として又はそれより前に)、実行装置18のCPUのモード信号がゼロにクリアされることでシグネチャレジスタ20を設定して蓄積を開始させる。
【0040】
プログラムシーケンス32は、システムプログラムへのジャンプ命令を所定の位置に含む。CPUはモードビットを設定し、このことによってシグネチャレジスタ20の蓄積を停止させる。その後処理はシステム命令シーケンス33へと続く。シーケンス33は、プログラムシーケンス32の処理時に予め作成したシグネチャを確認する。続いてさらなる所定の命令34が実行され、その後にアプリケーションプログラムへのリターンジャンプが行われCPUはモードビットをクリアしてシグネチャレジスタ20の蓄積を開始する。アプリケーションプログラムはシーケンス35へと続き、そこでは新しいシグネチャがシグネチャレジスタ20によって作成される。シーケンス35におけるアプリケーションプログラムの所与の位置で又は所与の条件が満たされたときに、システムプログラムへのジャンプが再度行われCPUはモードビットを設定し、これによってシグネチャレジスタ20の蓄積が停止する。次いで処理はシーケンス36のシステム命令へと進み、作成されたシグネチャが再度テストされる。さらなるシステム命令はシーケンス37へと続く。
【0041】
一実施形態では、シーケンス37は新しい初期値の生成を組み込むことができ、先に作成したチェックサムの暗号化などのシグネチャレジスタに保存されるチェックサムの消去又は他の変更であってもよい。変更したチェックサムをシステムプログラムのシーケンス37の実行時にシステムプログラムによってシグネチャレジスタ20に書き込むことができる。この場合、アプリケーションプログラムシーケンスへのリターン時の他のチェックサム作成の基準として、変更したチェックサムを利用することができる。
【0042】
最終的にカードの所望の動作がアプリケーションプログラムの命令シーケンス38によって実行されるまで、上記を数回繰り返す。終了すると、プログラムはジャンプ命令によって再びシステムプログラムにリターンし、CPUがモードビットを設定することでシグネチャレジスタ20の蓄積を停止する。こうしてシグネチャレジスタ20の出力のシグネチャをシステム命令39によってチェックする。その後システムプログラムの終了命令40が実行されて、終了シーケンス42によって示すようにプログラムが最終的に停止しカードが取り出される。
【0043】
シグネチャレジスタからの値をシーケンス33、36又は39の命令でテストすることで期待値が存在しないことが分かった場合、シーケンス41の割込みプログラムへのジャンプが行われる。割込みプログラムはカードのさらなる外部動作を全て禁止し、直接終了42へと導く。
【0044】
最後に、上記の説明は本発明を単に例示するように意図されている。例えばシステムプログラムは、制御された方法で(例えば、時分割のための循環モードで)幾つかのアプリケーションプログラムに制御をディスパッチしてもよい。同時に、別個のアプリケーションプログラムの実行それぞれだけが対応するアプリケーションプログラムの結果をアップデートするように、システムプログラムはシグネチャレジスタ20から/シグネチャレジスタ20への対応する中間結果を保存及び再保存することができる。
【0045】
例えば、システムプログラムはチェックサムAをシグネチャレジスタ20にロードし、アプリケーションプログラムAの命令を実行し、チェックサムAに蓄積し、そして蓄積したチェックサムAを保存することができる。その後システムプログラムはチェックサムBをシグネチャレジスタ20にロードし、アプリケーションプログラムBの一部を実行し、チェックサムBに蓄積し、そしてチェックサムBを保存することができる。次いでシステムプログラムはチェックサムAをシグネチャレジスタ20に再保存し、アプリケーションプログラムAの実行などを開始する。両方(又はそれ以上)のアプリケーションプログラムをある程度まで実行してから、アプリケーションプログラムそれぞれの累積チェックサムを評価してもよい。これによってプロセッサがほぼ同時の幾つかのアプリケーションプログラムに対して「時分割」できるだけでなく、チェックサムメカニズムの「時分割」も可能になるため、シグネチャレジスタ20はほぼ同時に関与するアプリケーションプログラム全てに対して独立して動作することができる。
【0046】
他の例として、図1は特定した機能に対して別個の機能ブロックを示すが、これらの機能のうち1つ以上を単一のブロックに合体させてもよいし、別個の機能ブロックに分割してもよい。これらの機能ブロックのうち1つ以上はプロセッサの命令シーケンスによって実行されてもよいし、ハードワイヤード集積回路によって実行されてもよいし、再プログラム可能な集積回路又は任意の他の公知の手段やそれらの組み合わせによって実行されてもよいことは明らかである。
【0047】
当業者なら、特許請求の範囲の趣旨及び範囲から逸脱せずに、数々の代替的な実施形態を考案することができる。添付の特許請求の範囲を解釈する際、以下のことを理解されたい。
a) 「含む(「comprising」)」という語は、与えられた請求の範囲に挙げた他の要素や作用の存在を除外するものではない。
b) 要素の前に付く「a」又は「an」という語はこのような複数の要素の存在を除外するものではない。
c) 請求の範囲にある参照記号は、請求の範囲を限定するものではない。
d) 幾つかの「手段(「means」)」は、同じアイテム又はハードウェア又はソフトウェアによって実施される構造又は機能によって表されることがある。
【図面の簡単な説明】
【図1】本発明の実施の形態のデータ処理装置のブロック図である。
【図2】本発明の実施の形態の命令シーケンスの実行のフローチャートを示す。
【符号の説明】
10 メモリ
12 アドレス発生器
14 命令レジスタ
16 命令デコーダ
18 実行装置
20 シグネチャレジスタ
22 コンパレータ
24 暗号化装置
28 カードリーダ
[0001]
The present invention generally relates to a method and a data processing device for executing a sequence of instructions. More specifically, the present invention relates to a method and a data processing apparatus for executing a program portion without changing it in an appropriate order.
[0002]
In the execution of a program, a program portion composed of an instruction sequence has an intended sequence flow. Even in the case of an interrupt request, this program portion typically has a predefined interrupt exit point, interrupt entry point, and interrupt handling sequence. However, problems can arise with program ordering. For example, electrical interference signals or defective elements can cause errors when executing a sequence of instruction sequences. These errors no longer allow the instructions to be executed in a particular intended order, and the continuation of the program sequence is also permanently interrupted.
[0003]
However, the instructions of the program may not be executed in a particular order during proper operation. These cases relate, for example, to so-called smart cards. A smart card is a flat card that contains a data processor and memory in the form of a microprocessor. Smart cards operate with a host device (eg, a reader) that utilizes contacts or wireless contact media.
[0004]
This type of smart card can be used for banking applications where the data in the smart card memory can be read and / or changed only under tightly defined conditions. Further, other data provided (eg, security-related data) is typically only exchanged between the smart card and the reader and cannot be distributed or identified externally. Such security-related data is also included in other applications of the smart card, such as, for example, use as a health care card or an access card in a set-top box.
[0005]
Typically, the programs on these smart cards are typically modified or added to add data to the smart card, adapt the smart card to various applications, and / or create further use possibilities. Supplemented. Preferably, only the smart card originator will recognize these changes and supplements. However, in practice, it is almost impossible to prevent unauthorized persons from attempting to modify the sequence of instructions in the microprocessor or its program memory to read or tamper with the data without authorization.
[0006]
In the prior art system described in DE 19804784.3, which is incorporated herein by reference, smart cards have been proposed which provide a high degree of protection against such operations. For this purpose, the interaction between the program part controlling the smart card and the reader is subdivided substantially into two instruction sequences, one of which is stored irrevocably. Substantial, in particular all access to security-related data, is only possible with one sequence of instructions called a system program. The other instruction sequence is called an application program. Both instruction sequences and programs consist of a number of individual instruction sequences. When trying to access security-related data provided by an application program, in particular security, a jump is made to a system program. Thereafter, a jump to the application program is performed, and the application program is continuously executed. However, this system has the problem that unauthorized changes can be made in unprotected application programs. When making unauthorized changes, the intended entry and exit sections can be bypassed to break into system programs and gain external access to security-related data or to execute system programs in an unauthorized manner .
[0007]
In another prior art system shown in U.S. Ser. No. 09 / 365,212, assigned to the same assignee as the present invention and incorporated herein by reference, a signature is used to store a sequence of addresses or instructions. Registers are used. The address or instruction stored from the signature register is compared with the value contained in the instruction portion to determine whether the intended instruction flow has been properly modified. If an improper instruction flow occurs, the operation of the device ends because the value stored in the signature register does not correspond to the value in the instruction portion. In order to prevent unauthorized alteration of the value of the signature register, the value of the signature register is sometimes changed secretly using an encryption device. However, if the encryption method of the encryption device is discovered by unauthorized tampering, the security of the device may be compromised.
[0008]
It is therefore an object of the present invention to overcome the disadvantages of the prior art.
[0009]
It is a further object of the present invention to provide a method and a data processing device capable of recognizing unauthorized modification or supplementation of instructions.
[0010]
The device for determining whether an application program has been manipulated improperly is provided with a signature register connected to the output of the instruction register and / or to an address of the program memory. The signature register is also connected to mode bits of a processor having two operating modes. In the first mode, the signature register stores the output of the instruction register and / or the address of the program memory, but the output of the signature register cannot be identified externally. In the second mode, the signature register is set to store no more inputs. In the second mode, the contents of the signature register are checked by comparison with a specific value. This comparison value can be effectively included in the instruction at the relevant location in the program. In one embodiment, the signature values are not compared immediately, but are compared after encrypting the values so that the comparison values cannot be easily changed during unauthorized operation of the program.
[0011]
In one embodiment, the signature register is connected to an address in program memory via a memory management unit. Thus, the signature register stores the virtual address of the program memory instead of the real address of the program memory, so that the program flow can be easily characterized. The virtual address can correspond to a self-relative address.
[0012]
In an embodiment, a first mode of the processor is saved for an untrusted application program sequence and a second mode of the program is saved for a trusted program sequence. An untrusted program sequence is a program sequence that can be changed and identified by external intervention. A trusted program sequence is a program sequence that cannot be changed and cannot be identified by external intervention. In certain embodiments, the device can correspond to a smart card.
[0013]
The following is a description of embodiments of the invention illustrating the above features and advantages, as well as other features and advantages, in connection with the drawings. It should be understood that the drawings are included for illustrative purposes and do not represent the scope of the present invention. The invention can be best understood in connection with the accompanying drawings.
[0014]
In the following description, certain terms are set forth by way of example with respect to particular embodiments or systems to simplify the description. However, as one of ordinary skill in the art will readily appreciate, these terms should be understood to include other similar applications and embodiments to which the present invention is readily applicable.
[0015]
FIG. 1 shows a block diagram of a data processing device 100 of the present invention. The memory 10 includes an instruction sequence that is addressed and read continuously by the address generator 12 via a read 13A. The read instructions are output to an instruction register 14 that stores at least one instruction at a time. The instructions, or at least a portion thereof, are output via leads 15 to various elements.
[0016]
One of these elements is the instruction decoder 16. This instruction decoder 16 in particular decodes the operation part of the instruction and sends a signal via a corresponding control lead to another element, here generally indicated as an execution unit 18. Execution unit 18 particularly includes processors and registers (not shown), such as a central processing unit ("CPU").
[0017]
A read 19 from the execution unit 18 to the address generator 12 sends a control signal to the address generator 12 when the execution of the instruction is completed and the next instruction is to be called. In addition, the read 19 sends a control signal to the address generator 12, for example, in response to a simultaneous instruction (eg, an interrupt instruction) or when a different instruction portion is requested from the address generator 12 at the execution unit 18. The new address of the different instruction part is preferably indicated via lead 15 by the part of the instruction present in instruction register 14. In this case, the new address and the control signal on read 19 trigger a jump in the instruction sequence.
[0018]
In one embodiment, lead 15 is also connected to the input of signature register 20. Signature register 20 is also connected to the output of address generator 12 via lead 13B. In other embodiments, only one of these two leads 13B and 15 may be connected to the signature register 20. Signature register 20 accumulates and stores newly received values from either or both address generator 12 and instruction register 14. Signature register 20 stores the accumulated value in response to a related signal received from instruction decoder 16 via lead 17A. It should be clarified that the signature 20 can store all or part of the received value to prevent malicious intentional intervention.
[0019]
The signature register 20 can store values in many known ways, such as maintaining a checksum of the stored data, exclusive-OR (XOR) the stored data, and other known storage methods. Further, each bit of the input value can be combined / stored and then stored in the stored storage result. Importantly, the storage methods are known in the art, but the particular method chosen is not known, which can discourage attempts to hide unauthorized changes or supplements to the order. In one embodiment, all bits of the input value are stored, in other embodiments, only selected bits are stored, or a combination thereof to further provide unpredictability (clearly random states) of the stored data. Can be.
[0020]
An output 21 of the signature register 20 is connected to an input of a comparator 22. A second input of comparator 22 is connected to lead 15 in the illustrated embodiment. In this way, the comparator 22 compares the value output by the signature register 20 via the lead 21 with the value included in the instruction portion when the instruction decoder 16 outputs the corresponding signal via the lead 17B. In another embodiment, the comparator 22 may compare the value output by the signature register 20 with the value contained in the unchangeable portion of the memory 10 via the instruction register 14 and the lead 15.
[0021]
When the value output by the signature register 20 via the lead 21 does not correspond to the value included in the instruction portion, the comparator 22 outputs the value and the control signal to the address generator 12 via the lead 23. Since the address generator 12 is set to a given address in response to the control signal, a predetermined instruction sequence is executed. For example, the predetermined instruction sequence can be an interrupt instruction sequence that inhibits further functionality of the device.
[0022]
In one embodiment, the signature register 20 may include an encryption device 24 that generates a new value from the combined value stored in the signature register 20 using a secret algorithm. This new value is stored in signature register 20 when the associated control signal is on lead 17A. Next, the signature register 20 starts creating another signature based on a value that cannot be predicted by a person who does not know the encryption algorithm of the encryption device 24. Therefore, it is difficult to change the value output to comparator 22 by the associated instruction so that comparator 23 does not generate a signal or execute a jump to the interrupt instruction sequence when modifying the previous instruction sequence. . In this way, it is possible to check whether the instruction sequence and the instructions contained therein are executed in the correct order, and whether the instructions have been modified.
[0023]
If the checksum communicates externally, such as with a card reader 28, other encryption and protection provided by the encryption device 24 can be further utilized. Encrypting the checksum output by the signature register 20 allows a hacker to easily intercept the leads (eg, telephone lines) of a corresponding device such as an automatic teller machine (ATM) and patch it to the correct checksum. It becomes difficult.
[0024]
Further in accordance with the present invention, the mode signal output on lead 17C from execution device 18 acts as a hardware protection that excludes the application mode from accessing and / or changing signature register 20. In this way, the device 100, such as a smart card, has a distinct operating mode determined by hardware constraints in the form of mode signals.
[0025]
In one embodiment, "application mode" or "user mode" is determined by the logic state of the mode signal being zero ("zero mode signal"). The zero mode signal is saved for running untrusted applications. If the logic state of the mode signal is 1 ("1 mode signal"), it is saved for the system program including execution of the interrupt code portion. Thus, the mode signal is part of the processor state (eg, the CPU of execution device 18). Thus, application programs are excluded from extending the operating mode to "system mode" due to hardware constraints (e.g., mode signals) other than sending full control to the operating system code from a given entry point.
[0026]
In one embodiment, the application program invokes a "call system" instruction. A system call instruction from the instruction register 14 triggers an interrupt instruction portion. In this embodiment, the operating system code acts as an interrupt handler for these "system call" interrupts.
[0027]
In operation, the signature register 20 stores a checksum or other logical operation of the executed instruction and / or instruction address. At that time, the CPU is operating in the application mode. Since the zero mode signal acts as a hardware lock set in the application mode, the signature register 20 cannot be accessed by the application program in any way. Accordingly, the zero mode signal can prevent the application program from accessing the output 21 of the signature register 20.
[0028]
In the system mode, the hardware is determined by the one mode signal, so that the checksum state of the signature register 20 can access the read operation without being affected by other address generation. Since all interrupt codes are executed in the system mode, the interrupt codes are excluded from being added by the signature register 20. Further, since the mode of the interrupt program is saved / restored at the interrupt entry / exit, the signature register 20 restarts the checksum processing only when control returns to the application mode at the interrupt exit. Signature register 20 does not restart the checksum if control returns to the previous interrupt system program. Thus, the mode of the CPU controls the accumulation / stop state and accesses the result (for example, checksum) of the signature register 20.
[0029]
Excluding the interrupt code from the result of the signature register 20 is desirable to facilitate characterizing the application program or its flow with a unique signature. Including the interrupt code portion in the result will result in the result being dependent on the exact time or instruction portion where the interrupt code was executed in the application program. This makes it more difficult to properly characterize the instruction flow with the results contained in the signature register 20, since the occurrence of the interrupt cannot be limited to a given particular part of the application program.
[0030]
In the system mode, the system program has complete control over the result of the signature register 20. Since the system program is a "TRUSTED" code that cannot be changed from a "NONTRUSTED" application program, as controlled by the hardware protection mechanism described in German Patent No. 19804784.3, the signature register 20 is protected from changes by the system program. No need to protect. As shown in this patent, the system program is under full control of the memory protection hardware, so that the system program can be protected from access by application programs.
[0031]
In one embodiment, address generator 12 acts as a memory management unit that performs address relocation to access memory 10 and control the address output to signature register 20 via lead 13B. In one embodiment, it is desirable for the address generator to act as a memory management unit because the signature register 20 can perform a checksum of the address, but the application program has a defined (eg, fixed) memory location. Instead, it may be loaded on the fly.
[0032]
If not relocating the addresses performed by the memory management unit, the addresses as referenced in the program (eg, JUMP to address XX) should be changed for the final placement of the program in memory. is there. The relocation loader can perform this address change. However, the checksum of the signature register no longer characterizes the program, but the program at that new address. A relocation loader is a utility program that typically changes the address portion of a program while sending it to memory, for example, before execution. The relocation loader examines the program prior to executing the program and stores all references from symbolic addresses (e.g., addresses that relate to program flow and are not related to the actual location in memory where the program is stored). Change to the actual address that is. The problem with this is that the signature register is not available to characterize program flow because the symbol address is usually lost.
[0033]
This problem can be solved by using the address generator 12 as a memory management unit. In the memory management unit, the program flow may be referred to as a virtual address that does not change before execution. The virtual address is output by the address generator 12 to the signature register 20 via the lead 13B. Therefore, the checksum of the signature register is not affected by the real address where the program is located in the memory 10. The memory management unit executes the change of the virtual address to the real address, and outputs these real addresses to the memory 10 via the lead 13A.
[0034]
In this embodiment, a memory management unit or other means for address independence is desirable to facilitate characterization of the program by the address sequence of the program. The memory management unit is under full control of the system program. The system mode program "knows" the correspondence between the virtual address and the real address of the application program. Therefore, the application program refers only to a virtual address that does not change regardless of the position of the application program in the memory. Thus, the signature register can characterize the program flow (by virtual address) without being affected by the real address.
[0035]
In other embodiments, the program portion may utilize self-relative addressing. Self-relative addressing makes the program portion "position independent". This method utilizes the CPU's addressing mode, such as a relative jump, so that the checksum of the signature register 20 can characterize the program flow. In self-relative addressing, the address of the application program represents, for example, some reference addresses that refer only to the distance from the current instruction at the branch destination. As long as the application program moves alone, the relative positions of the start and end of the branch move together, so that all branches in the application program are not changed.
[0036]
In one embodiment, the device 100 shown in FIG. 1 constitutes a control device for a smart card as described in the referenced German Patent 1,980,478,4.3. In this embodiment, the control signal on lead 17B activates comparator 22, which signal is preferably generated for each jump instruction that causes a jump to the described system program. At the same time, the signature register 20 is set so as not to accumulate due to a change in the mode signal from the CPU. The system program is preferably stored in an unchangeable portion of the memory 10 as described above. Only at the time of a return jump to the application program, the signature register 20 is released and stored again by the mode signal. In one embodiment, the value generated by the encryption unit 24 is stored as a checksum in the signature register 20 in response to a signal on lead 29 from the smart card or a signal on lead 17A from the instruction decoder 16.
[0037]
Smart cards typically work with card readers. Block 28 of FIG. 1 symbolically represents such a card reader. When the smart card program performs the jump, the card reader 28 can receive the value of the output 21 of the signature register 20, for example. The output 21 may represent the checksum directly or may represent the value encrypted by the encryption unit 24. This value is then compared with a predetermined value of the card reader 28. In one embodiment, the comparator 22 may be omitted if the card reader 28 can control the smart card.
[0038]
In other embodiments, the card reader 28 can create another signature from the received value, or return the other signature to the signature register 20 via the lead 29. It can thus be checked whether the smart card is working with a suitable, in particular unoperated, card reader.
[0039]
FIG. 2 shows an exemplary flowchart of execution of an instruction sequence according to an embodiment of the present invention. As shown, execution begins at start 30 where a smart card is inserted into a card reader to establish these conductive or contactless connections. Subsequently, the start program 31 is executed. At this time, the card and the card reader exchange various data in order to determine, for example, the characteristics of the card and whether an authentication test needs to be performed. Next, processing proceeds to a program sequence 32 that forms part of the application program. Before executing the program sequence 32 (for example, as the last part of the program sequence 31 or before), the mode register of the CPU of the execution device 18 is cleared to zero to set the signature register 20 and start accumulation. Let it.
[0040]
The program sequence 32 includes a jump instruction to a system program at a predetermined position. The CPU sets the mode bit, which stops the accumulation of the signature register 20. Thereafter, processing continues to system instruction sequence 33. The sequence 33 confirms a signature created in advance during the processing of the program sequence 32. Subsequently, a further predetermined instruction 34 is executed, after which a return jump to the application program is performed, and the CPU clears the mode bit and starts accumulation of the signature register 20. The application program continues to sequence 35, where a new signature is created by signature register 20. At a given location of the application program in sequence 35 or when a given condition is met, a jump to the system program is made again and the CPU sets the mode bit, which stops the accumulation of the signature register 20. . Processing then proceeds to system instructions in sequence 36, where the created signature is tested again. Further system instructions continue to sequence 37.
[0041]
In one embodiment, the sequence 37 may incorporate the generation of a new initial value, and may be an erasure or other modification of the checksum stored in the signature register, such as encryption of a previously created checksum. The changed checksum can be written to the signature register 20 by the system program when the sequence 37 of the system program is executed. In this case, the changed checksum can be used as a reference for generating another checksum when returning to the application program sequence.
[0042]
The above is repeated several times until the desired operation of the card is finally performed by the instruction sequence 38 of the application program. Upon completion, the program returns to the system program again by the jump instruction, and stops accumulation of the signature register 20 by the CPU setting the mode bit. Thus, the signature of the output of the signature register 20 is checked by the system instruction 39. Thereafter, an end command 40 of the system program is executed, and the program is finally stopped as indicated by the end sequence 42 and the card is removed.
[0043]
If the value from the signature register is tested with the instructions in sequence 33, 36 or 39, and it is found that the expected value does not exist, a jump is made to the interrupt program in sequence 41. The interrupt program inhibits any further external operation of the card and leads directly to termination 42.
[0044]
Finally, the above description is intended only to illustrate the invention. For example, a system program may dispatch control to some application programs in a controlled manner (eg, in a cyclic mode for time sharing). At the same time, the system program can save and re-save the corresponding intermediate results from / to signature register 20, so that only each execution of a separate application program updates the results of the corresponding application program.
[0045]
For example, the system program can load the checksum A into the signature register 20, execute the instructions of the application program A, accumulate the checksum A, and save the accumulated checksum A. The system program can then load checksum B into signature register 20, execute a portion of application program B, accumulate in checksum B, and save checksum B. Next, the system program re-stores the checksum A in the signature register 20 and starts execution of the application program A and the like. After running both (or more) application programs to some extent, the cumulative checksum of each of the application programs may be evaluated. This not only allows the processor to "time-share" several application programs at about the same time, but also allows for "time-division" of the checksum mechanism, so that the signature register 20 can be used for almost all simultaneously involved application programs. And can operate independently.
[0046]
As another example, FIG. 1 shows separate functional blocks for the identified functions, but one or more of these functions may be combined into a single block, or separated into separate functional blocks. You may. One or more of these functional blocks may be performed by a sequence of instructions of a processor, may be performed by a hardwired integrated circuit, may be a reprogrammable integrated circuit, or any other known means, Obviously, a combination of the above may be performed.
[0047]
One skilled in the art can devise a number of alternative embodiments without departing from the spirit and scope of the claims. In interpreting the appended claims, the following should be understood.
a) The word "comprising" does not exclude the presence of other elements or acts listed in a given claim.
b) the word "a" or "an" preceding an element does not exclude the presence of such elements.
c) Reference signs in the claims do not limit their scope.
d) Some "means" may be represented by the same item or structure or function implemented by hardware or software.
[Brief description of the drawings]
FIG. 1 is a block diagram of a data processing device according to an embodiment of the present invention.
FIG. 2 shows a flowchart of execution of an instruction sequence according to the embodiment of the present invention.
[Explanation of symbols]
10 memory
12 Address generator
14 Instruction Register
16 Instruction decoder
18 Execution device
20 Signature Register
22 Comparator
24 Encryption device
28 Card Reader

Claims (16)

プログラム命令シーケンスをプロセッサで実行する方法であって、
プロセッサからの第1のモード信号に応答して、蓄積したデータの現行値の表示を行わずに、プログラム命令シーケンスの第1の部分からデータを蓄積するステップと、
前記プロセッサからの第2のモード信号に応答して、プログラム命令シーケンスの第2の部分の実行時にプログラム命令シーケンスの前記第1の部分から蓄積したデータを判定するステップと、を含む、
プログラム命令シーケンス実行方法。
A method of executing a sequence of program instructions on a processor, comprising:
Storing data from a first portion of a program instruction sequence without providing an indication of a current value of the stored data in response to a first mode signal from the processor;
Determining, in response to a second mode signal from the processor, data accumulated from the first portion of a program instruction sequence during execution of a second portion of the program instruction sequence.
How to execute a program instruction sequence.
プログラム命令シーケンスの前記第1の部分から蓄積し判定されたデータと値とを比較するステップと、前記比較に応じてプログラムをさらに実行するステップと、を含む請求項1に記載の方法。The method of claim 1, comprising comparing a value stored and determined from the first portion of the program instruction sequence to a value, and further executing the program in response to the comparison. プログラム命令シーケンスの前記第1の部分から蓄積したデータが、プログラム命令の実際のメモリアドレス位置に対応するプログラム命令と、プログラム命令の仮想のメモリアドレス位置に対応するプログラム命令のうちの少なくとも1つである、請求項1に記載の方法。Data accumulated from the first portion of the program instruction sequence is at least one of a program instruction corresponding to an actual memory address location of the program instruction and a program instruction corresponding to a virtual memory address location of the program instruction. The method of claim 1, wherein: プログラム命令シーケンスの前記第1の部分が保護されていないアプリケーションプログラムの一部であり、プログラム命令シーケンスの前記第2の部分が保護されているシステムプログラムの一部である、請求項1に記載の方法。2. The method of claim 1, wherein the first part of the program instruction sequence is part of an unprotected application program and the second part of the program instruction sequence is part of a protected system program. Method. 対応するアドレス位置を、プログラム命令シーケンスの前記第1の部分のメモリ中の実アドレスから仮想アドレスに変更するステップであって、プログラム命令シーケンスの前記第1の部分から蓄積したデータがプログラム命令の仮想アドレスであるステップを含む、請求項1に記載の方法。Changing a corresponding address location from a real address in memory of the first portion of the program instruction sequence to a virtual address, wherein the data accumulated from the first portion of the program instruction sequence is a virtual address of the program instruction. The method of claim 1, comprising the step of being an address. 前記仮想アドレスが自己相対アドレスである、請求項5に記載の方法。The method according to claim 5, wherein the virtual address is a self-relative address. 判定した蓄積データと値とを比較する前に、プログラム命令シーケンスの前記第1の部分から蓄積したデータを変更するステップを含む、請求項2に記載の方法。3. The method of claim 2, comprising modifying the stored data from the first portion of the program instruction sequence before comparing the determined stored data to a value. 蓄積データが暗号化によって変更される、請求項7に記載の方法。The method of claim 7, wherein the stored data is modified by encryption. 第1の命令シーケンスを実行し、対応する第1のモード信号を出力し、第2の命令シーケンスを実行し、対応する第2のモード信号を出力するように構成されたプロセッサと、
前記第1のモード信号を受け取った場合に前記第1の命令シーケンスに対応するデータを蓄積し、この蓄積したデータを表示せず、前記第2のモード信号を受け取った場合にデータの蓄積を停止してこの蓄積したデータの表示を行うように構成されたシグネチャレジスタと、を含む、
処理装置。
A processor configured to execute a first sequence of instructions, output a corresponding first mode signal, execute a second sequence of instructions, and output a corresponding second mode signal;
When the first mode signal is received, data corresponding to the first command sequence is accumulated, the accumulated data is not displayed, and when the second mode signal is received, data accumulation is stopped. And a signature register configured to display the stored data.
Processing equipment.
前記シグネチャレジスタの出力に接続され、蓄積したデータを受け取り前記蓄積したデータと値とを比較するように構成されたコンパレータを含み、前記プロセッサが比較の結果に応じてさらなる命令シーケンスを実行するように構成されている、請求項9に記載の処理装置。A comparator connected to the output of the signature register and configured to receive stored data and compare the stored data with a value, such that the processor executes a further instruction sequence in response to a result of the comparison. The processing device according to claim 9, wherein the processing device is configured. 前記シグネチャレジスタに接続され、第1の命令シーケンスの対応するアドレス位置を仮想アドレスに変更するように構成されたメモリマネージャを含み、前記シグネチャレジスタが前記仮想アドレスを蓄積するように構成される、請求項9に記載の処理装置。A memory manager coupled to the signature register and configured to change a corresponding address location of a first instruction sequence to a virtual address, wherein the signature register is configured to store the virtual address. Item 10. A processing device according to item 9. 前記仮想アドレスが自己相対アドレスに対応する、請求項11に記載の処理装置。The processing device according to claim 11, wherein the virtual address corresponds to a self-relative address. 前記処理装置がスマートカードの一部である、請求項9に記載の処理装置。The processing device according to claim 9, wherein the processing device is part of a smart card. 保護されたメモリ部分と保護されていないメモリ部分を有するプロセッサ読み取り可能メモリ装置に保存されるプログラムであって、
保護されていないメモリ部分に保存され、第1のプロセッサモード状態で対応するプログラム部分を実行したり蓄積したりする、第1のプログラムシーケンスと、
保護されているメモリ部分に保存され、第2のプロセッサモード状態で蓄積したプログラム部分を実行したり比較したりする、第2のプログラムシーケンスと、を含む、
プログラム。
A program stored in a processor readable memory device having a protected memory portion and an unprotected memory portion,
A first program sequence stored in an unprotected memory portion for executing or storing a corresponding program portion in a first processor mode state;
Executing and comparing the program portions stored in the protected memory portion and stored in the second processor mode state; and a second program sequence.
program.
前記第2のプログラムシーケンスが蓄積した部分と比較される値を含み、前記プログラムが前記比較の結果に応じてさらに実行するように構成される、請求項14に記載のプログラム。15. The program of claim 14, wherein the second program sequence includes a value to be compared with a stored portion, and wherein the program is further configured to execute in response to a result of the comparison. 前記プログラムが、蓄積した部分の暗号化部分と値とを比較するように構成される、請求項15に記載のプログラム。16. The program according to claim 15, wherein the program is configured to compare a value with an encrypted part of the stored part.
JP2002511070A 2000-06-12 2001-05-14 Data processing method and apparatus for execution of protected instructions Withdrawn JP2004503860A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US59206000A 2000-06-12 2000-06-12
PCT/EP2001/005560 WO2001097010A2 (en) 2000-06-12 2001-05-14 Data processing method and device for protected execution of instructions

Publications (1)

Publication Number Publication Date
JP2004503860A true JP2004503860A (en) 2004-02-05

Family

ID=24369117

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002511070A Withdrawn JP2004503860A (en) 2000-06-12 2001-05-14 Data processing method and apparatus for execution of protected instructions

Country Status (3)

Country Link
EP (1) EP1295200A2 (en)
JP (1) JP2004503860A (en)
WO (1) WO2001097010A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007524883A (en) * 2003-02-07 2007-08-30 ブロードオン コミュニケーションズ コーポレーション Backward compatible secure processor and method for executing secure software

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7533412B2 (en) * 2002-04-23 2009-05-12 Stmicroelectronics S.A. Processor secured against traps
FR2849226B1 (en) * 2002-12-20 2005-12-02 Oberthur Card Syst Sa METHOD AND DEVICE FOR SECURING THE EXECUTION OF A COMPUTER PROGRAM
US20100017627A1 (en) 2003-02-07 2010-01-21 Broadon Communications Corp. Ensuring authenticity in a closed content distribution system
WO2005020043A2 (en) * 2003-08-26 2005-03-03 Matsushita Electric Industrial Co., Ltd. Program execution device
EP1548537A1 (en) 2003-12-23 2005-06-29 STMicroelectronics Limited Secure processor arrangement
DE102005050767A1 (en) * 2005-10-24 2007-04-26 Robert Bosch Gmbh Instruction Memory Backup by Control Flow Checking
DE102007038763A1 (en) 2007-08-16 2009-02-19 Siemens Ag Method and device for securing a program against a control flow manipulation and against a faulty program sequence
EP3301600B1 (en) * 2016-09-29 2021-03-31 Commsolid GmbH Method and apparatus for signature tracing
WO2020038559A1 (en) 2018-08-21 2020-02-27 Commsolid Gmbh Analog to digital converter
US11698969B1 (en) * 2021-06-25 2023-07-11 Amazon Technologies, Inc. Boot security of integrated circuit device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0484348A (en) * 1990-07-27 1992-03-17 Nec Corp Rom data protecting system
US5754762A (en) * 1997-01-13 1998-05-19 Kuo; Chih-Cheng Secure multiple application IC card using interrupt instruction issued by operating system or application program to control operation flag that determines the operational mode of bi-modal CPU
DE19804784A1 (en) 1998-02-06 1999-08-12 Philips Patentverwaltung Chip card with integrated circuit
DE19834486A1 (en) 1998-07-31 2000-02-03 Philips Corp Intellectual Pty Method and data processing arrangement for the secure execution of commands

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007524883A (en) * 2003-02-07 2007-08-30 ブロードオン コミュニケーションズ コーポレーション Backward compatible secure processor and method for executing secure software
JP4646900B2 (en) * 2003-02-07 2011-03-09 イグウエア インコーポレイテッド Backward compatible secure processor and method for executing secure software

Also Published As

Publication number Publication date
WO2001097010A2 (en) 2001-12-20
WO2001097010A3 (en) 2002-03-21
EP1295200A2 (en) 2003-03-26

Similar Documents

Publication Publication Date Title
JP4172745B2 (en) Method and monitoring apparatus for monitoring execution of instruction sequence by processor
US7516902B2 (en) Protection of a microcontroller
US10509568B2 (en) Efficient secure boot carried out in information processing apparatus
US20050033969A1 (en) Secure execution architecture
US7496738B2 (en) Method of automatic control of the execution of a program by a microprocessor
EP2854066A1 (en) System and method for firmware integrity verification using multiple keys and OTP memory
US7392404B2 (en) Enhancing data integrity and security in a processor-based system
JP2001256460A (en) One-chip microcomputer and ic card using the same
KR20090095843A (en) Processor apparatus having secure performance
JP2001356963A (en) Semiconductor device and its control device
CN102968392A (en) Microprocessor protected against memory dump
JP2004503860A (en) Data processing method and apparatus for execution of protected instructions
US7447916B2 (en) Blocking of the operation of an integrated circuit
US7624442B2 (en) Memory security device for flexible software environment
CN112199740B (en) Encryption lock implementation method and encryption lock
CN106951771B (en) Mobile terminal using method of android operating system
US20060289656A1 (en) Portable electronic apparatus and data output method therefor
KR20170102285A (en) Security Elements
JP3491273B2 (en) Chip card and how to import information on it
EP1535124B1 (en) Computer architecture for executing a program in a secure of insecure mode
US20060265578A1 (en) Detection of a sequencing error in the execution of a program
JP7247638B2 (en) Electronic information storage medium, IC card, falsification check method, and program
US11847203B2 (en) Method, system and device for managing an execution of a program relating to part or all of a first application
CN110276213A (en) The storage and method of calibration of a kind of smart card and its sensitive result
US20160171214A1 (en) Method of executing a program by a processor and electronic entity comprising such a processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080512

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20080626

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090917