JP2004152210A - Ic card - Google Patents
Ic card Download PDFInfo
- Publication number
- JP2004152210A JP2004152210A JP2002319314A JP2002319314A JP2004152210A JP 2004152210 A JP2004152210 A JP 2004152210A JP 2002319314 A JP2002319314 A JP 2002319314A JP 2002319314 A JP2002319314 A JP 2002319314A JP 2004152210 A JP2004152210 A JP 2004152210A
- Authority
- JP
- Japan
- Prior art keywords
- upper limit
- command
- card
- timer
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、セキュリティ性能を向上させて不正使用を防止する技術を内蔵したICカードに関するものである。
【0002】
【従来の技術】
ICカードは、内蔵するマイクロコンピュータやメモリにより情報処理が可能であり、また、磁気ストライプに情報を記憶する磁気カードに比べて、セキュリティ性能が高く記憶情報量も大きいことから、多くの分野で利用されている。
【0003】
ICカードに個人情報記憶させて利便性を向上させ、電子決済などにICカードの利用を拡大するためには、ICカードの不正使用を防止することが必要であり、種々の提案がなされている。
【0004】
例えば、セキュリティ性能を高めたICカードがある。この示されたICカードは、電源投入後に実行するコマンドの累計個数を計数する手段と、その累計個数が、可能個数を超えた場合に動作を制限する手段を備え、パスワード、キー、関数などの情報を盗む不正行為を目的として繰り返しICカードに特定のコマンドを加えると、ICカードの動作が制限されて、不正行為が達成できないようにしたものである(特許文献1参照。)。
【0005】
このようなICカードを、携帯電話などに継続的に装着して使用する場合、暗号に係るコマンドに限定してコマンドの累計個数の可能個数を例えば1000と設定しても、携帯電話の費用に係る操作においてICカードによる認証作業が毎回行われるため、短期間に可能個数を超えることになり、ICカードが使えなくなる問題がある。
【0006】
一方、例えば10000を越えるような大きな値をこのコマンドの累計個数の可能個数に設定した場合は、ICカードに対してコマンドを繰り返し入力して、カードの電源端子や電磁放射などを観測し、それらデータを統計的に処理することで、キーや暗号アルゴリズムが解析され、ICカードのセキュリティ性能が低下する問題がある。
【0007】
【特許文献1】
特開平10−69435号公報(第3頁、図1)
【0008】
【発明が解決しようとする課題】
上述したように、従来のICカードにおいては、継続的に通電状態で使用される用途の場合にセキュリティ性能が低下する問題がある。
【0009】
本発明は、上記問題を解決するためになされたもので、セキュリティ性能の高いICカードを提供することを目的とする。
【0010】
【課題を解決するための手段】
上記目的を達成するために、本発明のICカードは、タイマと、特定のコマンドの実行回数を計数する手段と、前記タイマの値が特定の値と等しくなった時に、プロセッサにタイマ割り込みを行う手段と、前記特定のコマンドの実行回数と期間内上限回数と履歴回数と上限を超えた回数とを記憶するメモリと、コマンドの実行動作を制限する動作制限手段とを備え、電源投入後の初期化手順では、前記履歴回数と上限を超えた回数を比較して前記履歴回数が上限を超えた回数と等しいか大きい時に、動作制限手段でコマンドの実行動作を制限し、前記タイマ割り込みを受け付けて処理する手順では、前記特定のコマンドの実行回数と前記期間内上限回数を比較して、前記特定のコマンドの実行回数が前記期間内上限回数と等しいか大きい時に、前記履歴回数を増加させ、増加した前記履歴回数と上限を超えた回数を比較して、前記履歴回数が前記上限を超えた回数と等しいか大きい時に、動作制限手段でコマンドの実行動作を制限するようにしたことを特徴とする。
【0011】
このような構成の本発明のICカードによれば、一定時間内に、電源再投入などの初期化を行うか、一定時間間隔を経過してからコマンドを与えるように制御しなければ、コマンドを受け付けなくなるため、短時間に外部より繰り返しコマンドを与えてICカード内のセキュリティに関する情報を読み出すことはできなくなりセキュリティ性能の高いICカードが実現できる。
【0012】
【発明の実施の形態】
以下、図1乃至図3を参照して本発明の実施の形態を説明する。
【0013】
図1は、本発明のICカードの主要部分の構成を示すブロック図である。図2および図3は、ICカードの処理手順を示すフローチャートである。
【0014】
図1に示すように、本実施の形態のICカード1は、インターフェース/システム制御回路部2と、データ処理部3とから構成される。
【0015】
インターフェース/システム制御回路部2は、ICカードリーダ/ライタ4と、端子5乃至端子10を介して接続され、ICカードリーダ/ライタ4から電源、クロック、制御信号などが供給されて、ICカード1内部の各機能ブロックへ所望の電源、クロックを供給するとともに、各種制御信号を生成する。更に、端子5のI/O端子を介してICカードリーダ/ライタ4とのデータ送受信のインターフェース機能を有する。
【0016】
端子6は、リセット(/RST)端子で、ICカード1のインターフェース/システム制御回路部2や内部の各機能ブロックへの初期化信号を供給する。
【0017】
端子7は、グランド(GND)端子で、ICカード1の各機能ブロックに接地電位を供給する。
【0018】
端子8は、電源(VDD)端子で、ICカード1内部のデータ処理部などの回路動作に必要な電源を供給する。端子9は、プログラム電源(VPP)端子で、ICカード1内部の不揮発性メモリへのデータ書き込み時に使用する電源を供給する。なお、最近のICカードでは、カード内部で不揮発性メモリへのデータ書き込み時に使用するプログラム電源を電源(VDD)より生成し、プログラム電源端子が無い場合がある。
【0019】
端子10は、クロック(CLK)端子で、ICカード1内部の回路動作に必要なクロック信号を、インターフェース/システム制御回路部2や各機能ブロックに供給する。
【0020】
データ処理部3の主要な機能ブロックは、プロセッサ(CPU)11と、プログラムを記憶するメモリ(ROM)12と、電源断後もデータを記憶する不揮発性メモリ(NVメモリ)13と、ICカード1に電源が供給されて活性化状態にある時に、プログラム処理で使用する作業用データなどを記憶する揮発性メモリ(RAM)14と、タイマ15と、それら機能ブロック間のデータのやり取りを行うためのアドレスバス16およびデータバス17から構成される。
【0021】
タイマ15は、クロック信号に基づいて発生する信号で、カウントダウン動作を行い、タイマ15の値が0となった時に、CPU11に割り込み信号線18を介してタイマ割り込み信号を入力するとともに、NVメモリ13に記憶された監視期間20の値から、クロック信号に基づいて発生する信号で、再びカウントダウン動作を行う。
【0022】
また、タイマ15は、カウントダウン動作を開始することと、停止することが可能であり、カウントダウン動作停止中は、カウントダウン動作停止直前の値を保持している。カウントダウン動作開始時は、タイマ15にプログラムで設定した値または、カウントダウン動作停止時の値から、カウントダウンを開始する。
【0023】
ICカード1がICカードリーダ/ライタ4に装着されて、端子5乃至端子10が、ICカードリーダ/ライタ4の対応するコネクタに接続されると、ICカード1の初期化が行われる。このICカード1の初期化を含めた動作手順は、JIS X 6304(ISO/IEC7816−3に基づく)規格「外部端子付きICカード−電気信号及び伝送プロトコル」に詳細が定められている。
【0024】
本実施の形態の説明に係るところを中心にICカード1の概略動作を説明する。ICカード1がICカードリーダ/ライタ4に装着されると、ICカードリーダ/ライタ4は、端子の電気的接続と活性化を行う。電源端子8およびグランド端子7を介してICカード1の内部機能ブロックに電源が供給され、リセット端子6は、ICカード1の内部回路の初期化動作を指示するグランドレベルに維持される。
【0025】
次いで、クロック端子10よりICカード1内部のデータ処理部3の機能ブロックへクロック信号が供給される。リセット端子6からの信号は、内部のデータ処理部3の回路動作が安定するまで、グランドレベルの信号状態に保たれて内部リセット信号となって、CPU11の動作を停止させるとともに、図示略の各種内部の制御回路を初期化して、CPU11などの機能ブロックの誤動作を防止している。
【0026】
一定時間後、内部のリセット信号が電源レベルの信号状態となって、リセット状態が解除されると、CPU11はROM12に書き込まれたプログラムを実行する。
【0027】
ROM12には、CPUのプログラム処理手順を制御するプログラムと共通の基本動作プログラムなどを記憶するOS部30と、ICカードへの各種コマンドを処理するコマンド処理プログラム31と、ICカードのセキュリティ機能を実現する暗号処理プログラム32と図示しないがICカードに関する各種データなどが記憶されている。
【0028】
CPU11のプログラム実行手順は、図2のフローチャートに示される。最初のステップS1は、ICカードの活性化ステップで、前記規定に定められた順序でICカードリーダ/ライタ4へ、ICカード1に関する情報を、I/O端子5より出力する。
【0029】
次に、ステップS2に進み、ICカード1のRAM14に記憶されるコマンドの実行回数40の値を0としてクリアし、次に、ステップS3に進み、NVメモリ13に記憶された履歴回数21の値と、同じくNVメモリ13に記憶された上限を超えた回数22の値とを比較する。履歴回数21の値が上限を超えた回数22の値との比較で等しいか大きい時は、後述の異常処理ステップS24に進む。履歴回数21の値が上限を超えた回数22の値より小さい場合、ステップS4に進み、タイマ15へNVメモリ13に記憶された監視期間20の値を設定する。
【0030】
次に、ステップS5に進み、I/O端子5と接続されるインターフェース回路を受信状態に設定する。
【0031】
次に、CPU11はコマンド待ちステップS6となって、I/O端子5経由でコマンドの受信が終了したか、インターフェース/システム制御回路部2の状態を調べる。インターフェース/システム制御回路2が、I/O端子5経由でコマンドの受信が終了した状態となった時、次にステップS7に進み、CPU11は、インターフェース/システム制御回路部2からコマンドを受信する。次に、ステップS8に進み、CPU11は、タイマ割り込みを許可するとともにタイマ15のカウント動作を開始する。
【0032】
次に、ステップS9に進み、CPU11は、コマンドに対応した処理プログラムを実行する。
【0033】
次いで、ステップS10に進み、CPU11は、実行したコマンドがNVメモリ13に登録された監視するコマンド23であるかを比較し、一致しなければ、タイマ割り込みを不許可にしタイマ15のカウント動作を停止するステップS12に進む。一致すれば、ステップS11に進み、RAM14に記憶されているコマンドの実行回数40の値を1増加させた後、タイマ割り込みを不許可にしてタイマ15のカウント動作を停止するステップS12に進む。
【0034】
次いで、ステップS13に進み、CPU11は、ICカードリーダ/ライタ4へ応答データを出力するため、コマンドの実行結果に従った応答データをインターフェース/システム制御回路部2に設定し、応答データの出力が終わることをインターフェース/システム制御回路部2の状態を調べる。
【0035】
応答データの出力が終わると、次に、CPU11はインターフェース回路2をコマンド受信状態に設定するステップS5に進み、次いでコマンド待ちステップS6に進む。
【0036】
通常のICカードの利用環境では、CPU11は、多くの時間コマンド受信待ちの状態にあり、更に、コマンドの受信や応答データの送信動作は、シリアル通信で行われるため、クロック信号に比べて十分大きな処理時間が必要である。
【0037】
このため、クロック信号に基づいて発生する信号でカウントダウンするタイマを用いて一定時間毎の割り込みを発生させると、その時間間隔内のコマンドの実行回数を異常処理判定に用いるためには、タイマに非常に大きな値を設定する必要があり、外部からのICカードの動作解析が容易になる問題があるが、本実施の形態のようにタイマ15のカウント動作をコマンドの処理時間内のみ行うように制御することで、タイマ割り込み発生の時間間隔内のコマンドの実行回数を、異常処理判定の基準とすれば、タイマ15へ設定する監視期間20の値は十分に小さな値とすることができる。
【0038】
図3は、タイマ割り込みが発生し、タイマ割り込みが許可されたときのCPU11が実行する手順を示すフローチャートである。
【0039】
なお、許可された割り込みが発生したときにCPUが行う一般的に知られた割り込み分岐手順(例えば、割り込みを受け付けた時のCPUの状態、即ち、プログラム実行番地情報やステータス情報をスタック領域に保存し、割り込み禁止に設定するなど)と割り込みからの復帰手順(保存したCPUの状態情報をCPUに復帰させて、割り込みを許可状態に設定するなど)はハードウェアのシステム仕様により一連の処理手順として行われるため、詳細なステップとしては、図示されていない。
【0040】
まず、タイマ割り込みが発生し、割り込みが受け付けられると、割り込み分岐手順であるステップS20を実行する。次いで、ステップS21に進み、メモリ14に記憶されているコマンドの実行回数40の値とNVメモリ13に記憶されている期間内上限回数24の値を比較する。
【0041】
ステップS21において、コマンドの実行回数40の値が期間内上限回数24の値より小さな時は、コマンドの実行回数40の値を0としてクリアするステップS25に進み、次に、割り込み復帰手順のステップS26に進み、割り込み処理プログラムを終了して、割り込みが発生した時点の処理ステップに復帰する。
【0042】
ステップS21において、コマンドの実行回数40の値が期間内上限回数24の値と等しいか大きな時は、ステップS22に進み、NVメモリ13に記憶されている履歴回数21の値を1増加させる。
【0043】
次いで、ステップS23に進み、履歴回数21の値と上限を超えた回数22の値を比較する。
【0044】
ステップS23において、履歴回数21の値が上限を超えた回数22の値より小さな時は、ステップS25に進み、コマンドの実行回数40の値を0としてクリアし、次に、割り込み復帰手順のステップS26に進み、割り込み処理プログラムを終了して、割り込みが発生した時点の処理ステップに復帰する。
【0045】
ステップS23において、履歴回数21の値が上限を超えた回数22の値と等しいか大きな時は、後述の異常処理ステップS24に進む。
【0046】
上述したように割り込み制御を行うと、コマンドの処理中にカウント動作するタイマが監視期間の間隔で割り込みを発生する。そのタイマ割り込みが発生した時に監視するコマンドで指定されたコマンドの実行回数が、期間内上限値を超えていて、その上限値を超えた履歴回数が、設定された上限を超えた回数以上の場合に、異常処理ステップを実行することになる。
【0047】
これは、ICカードの暗号処理プログラムを使用するコマンドなどセキュリティに関係する監視対象コマンドが、通常使用範囲では発生しない一定時間内に繰り返して実行されていて、ICカードの内部動作解析による不正行為がなされていると判断できるためである。
【0048】
異常処理ステップS24としては、ICカードのセキュリティレベルにより色々な処理手順が考えられるが、例えば、同じ番地のプログラムを繰り返して実行するようにして、ICカードリーダ/ライタ4からコマンドの受信や応答データの送信をしないようにすることが考えられる。
【0049】
異常処理ステップを実行するようになったICカードは、ICカードへの電源再投入やリセット信号などで初期化しても、NVメモリに記憶されている履歴回数と上限を超えた回数が変化しないため、履歴回数と上限を超えた回数を比較するステップにおいて、異常処理ステップに分岐して、ICカードの暗号処理プログラムなどが実行されず外部からの各種観測などによっても必要な動作解析を行うことができない。
【0050】
また、ICカードへの電源断と電源投入を繰り返して、異常処理ステップを実行させないようにしても、タイマの監視時間の値が不明なため、非常に短い間隔で電源断と電源投入を繰り返すことになり、作業に非常に大きな時間がかかり、解析が困難である。
【0051】
本発明は、上記実施の形態に限定されるものではなく、発明の要旨を逸脱しない範囲で、種々変形し、実施できることは勿論である。
【0052】
例えば、タイマ15は、プログラムによって設定した値からカウントダウン動作を行い0となった時に、CPU11にタイマ割り込みを発生させる構成ではなく、プログラムによって設定した値からカウントアップ動作を行うようにしてもよい。更に、タイマ15の表示可能な最大値を超えてカウントアップした時に発生するキャリー信号を、割り込み信号線18を介してCPU11にタイマ割り込みとして入力するようにしてもよく、この場合は、タイマ15の全てのビットが0であることを判定する回路が不要となって、タイマ15は少ない回路で実現でき、小型でセキュリティ性能の高いICカードを提供できる。
【0053】
また、タイマ15は、プログラムによって設定した値からカウント動作する構成ではなく、指定したnビットのカウンタとして動作するように構成し、クロックに基づいて発生する信号が2のn乗回入力する度にタイマ割り込みを発生するようにしてもよい。このようにすれば、タイマ15は少ない回路で実現でき、小型でセキュリティ性能の高いICカードを提供できる。
【0054】
また、不揮発性メモリへのデータ書き込みで用いる電源を内部で発生させて、プログラム電源端子からの電源を用いないように構成すれば、電源制御によって不揮発性メモリへ履歴回数などの書き込みを回避しようとするような不正行為を防止することができ、ICカードのセキュリティ性能が向上できる。
【0055】
また、ICカードにクロック発生回路を内蔵して、データ処理部の処理速度をクロック端子からのクロックに依存しないように構成すれば、クロック端子に加えるクロック周波数を低下さることにより、ICカード内部動作の解析を行うことが困難になり、ICカードのセキュリティ性能が向上できる。
【0056】
【発明の効果】
本発明によれば、セキュリティ性の高いICカードを実現できる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るICカードのブロック図。
【図2】本発明の実施の形態に係るICカードの処理手順を示すフローチャート。
【図3】本発明の実施の形態に係るICカードのタイマ割り込みの処理手順を示すフローチャート。
【符号の説明】
1 ICカード
2 インターフェース/システム制御回路部
3 データ処理部
4 ICカードリーダ/ライタ
5 I/O端子
6 リセット端子
7 グランド端子
8 電源端子
9 プログラム電源端子
10 クロック端子
11 プロセッサ
12 読み出しメモリ(ROM)
13 不揮発性メモリ(NVメモリ)
14 揮発性メモリ(RAM)
15 タイマ
16 アドレスバス
17 データバス
18 タイマ割り込み信号線
20 監視期間
21 履歴回数
22 上限を超えた回数
23 監視するコマンド
24 期間内上限回数
30 OSプログラム
31 コマンド処理プログラム
32 暗号処理プログラム
40 コマンドの実行回数[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an IC card incorporating a technology for improving security performance and preventing unauthorized use.
[0002]
[Prior art]
IC cards can be used in many fields because they can process information with a built-in microcomputer and memory, and have a higher security performance and a larger amount of stored information than magnetic cards that store information in a magnetic stripe. Have been.
[0003]
In order to improve convenience by storing personal information in an IC card and to expand the use of the IC card in electronic settlement, it is necessary to prevent unauthorized use of the IC card, and various proposals have been made. .
[0004]
For example, there is an IC card with improved security performance. The IC card shown includes means for counting the total number of commands to be executed after the power is turned on, and means for restricting the operation when the total number exceeds a possible number. When a specific command is repeatedly added to an IC card for the purpose of stealing information, the operation of the IC card is restricted so that the cheating cannot be achieved (see Patent Document 1).
[0005]
When such an IC card is continuously attached to a mobile phone or the like and used, even if the total number of commands that can be set is limited to, for example, 1000 for encryption, the cost of the mobile phone is reduced. In such an operation, the authentication work using the IC card is performed every time, so that the number of IC cards exceeds the possible number in a short time, and there is a problem that the IC card cannot be used.
[0006]
On the other hand, if a large value exceeding, for example, 10,000 is set as the possible number of the total number of commands, the command is repeatedly input to the IC card, and the power supply terminal of the card, the electromagnetic radiation, etc. are observed. By statistically processing data, a key and an encryption algorithm are analyzed, and there is a problem that the security performance of the IC card is reduced.
[0007]
[Patent Document 1]
JP-A-10-69435 (
[0008]
[Problems to be solved by the invention]
As described above, in the conventional IC card, there is a problem that the security performance is deteriorated in the case of an application that is continuously used in a state of being energized.
[0009]
The present invention has been made to solve the above problem, and has as its object to provide an IC card with high security performance.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, an IC card according to the present invention includes a timer, a unit for counting the number of times a specific command is executed, and a timer interrupt to a processor when a value of the timer becomes equal to a specific value. Means, a memory for storing the number of times of execution of the specific command, the upper limit number of times during the period, the number of histories, and the number of times exceeding the upper limit, and operation limiting means for limiting the execution operation of the command, the initial after power-on In the conversion procedure, when the number of times of history is compared with the number of times exceeding the upper limit, and when the number of times of history is equal to or greater than the number of times exceeding the upper limit, the operation restricting means restricts the execution of the command, and accepts the timer interrupt. In the processing procedure, the number of executions of the specific command is compared with the upper limit number in the period, and when the number of executions of the specific command is equal to or larger than the upper limit number in the period. Increasing the number of histories, comparing the increased number of histories with the number of times exceeding the upper limit, and when the number of histories is equal to or greater than the number of times exceeding the upper limit, restricts the execution of the command by the operation restricting means. It is characterized by doing so.
[0011]
According to the IC card of the present invention having such a configuration, a command is not issued unless initialization such as power-on is performed within a predetermined time or a command is issued after a predetermined time interval. Since it is no longer accepted, it is not possible to read out information on security in the IC card by repeatedly giving a command from outside in a short time, and an IC card with high security performance can be realized.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
[0013]
FIG. 1 is a block diagram showing a configuration of a main part of the IC card of the present invention. FIG. 2 and FIG. 3 are flowcharts showing the processing procedure of the IC card.
[0014]
As shown in FIG. 1, an
[0015]
The interface / system
[0016]
The
[0017]
The
[0018]
The
[0019]
A
[0020]
The main functional blocks of the
[0021]
The timer 15 performs a countdown operation with a signal generated based on a clock signal. When the value of the timer 15 becomes 0, the timer 15 inputs a timer interrupt signal to the CPU 11 via an
[0022]
The timer 15 can start and stop the countdown operation. During the countdown operation is stopped, the timer 15 holds the value immediately before the countdown operation was stopped. At the start of the countdown operation, the countdown is started from the value set by the program in the timer 15 or the value at the time when the countdown operation is stopped.
[0023]
When the
[0024]
The schematic operation of the
[0025]
Next, a clock signal is supplied from the
[0026]
After a certain period of time, when the internal reset signal becomes the signal state of the power supply level and the reset state is released, the CPU 11 executes the program written in the ROM 12.
[0027]
The ROM 12 stores an OS unit 30 for storing a basic operation program common to a program for controlling a program processing procedure of the CPU, a command processing program 31 for processing various commands to the IC card, and realizes a security function of the IC card. An encryption processing program 32 and various data (not shown) relating to the IC card are stored.
[0028]
The program execution procedure of the CPU 11 is shown in the flowchart of FIG. The first step S1 is an activation step of the IC card, in which information on the
[0029]
Next, the process proceeds to step S2 to clear the value of the number of times of execution of the command 40 stored in the RAM 14 of the
[0030]
Next, the process proceeds to step S5, where the interface circuit connected to the I /
[0031]
Next, the CPU 11 goes to a command waiting step S6, and checks whether the reception of the command via the I /
[0032]
Next, proceeding to step S9, the CPU 11 executes a processing program corresponding to the command.
[0033]
Next, proceeding to step S10, the CPU 11 compares the executed command with the
[0034]
Next, the process proceeds to step S13, where the CPU 11 sets response data according to the execution result of the command in the interface / system
[0035]
When the output of the response data is completed, the CPU 11 proceeds to step S5 for setting the
[0036]
In a normal use environment of an IC card, the CPU 11 is in a command receiving wait state for many hours, and furthermore, a command receiving operation and a response data transmitting operation are performed by serial communication, and therefore are sufficiently larger than a clock signal. Processing time is required.
[0037]
For this reason, if an interrupt is generated at regular intervals using a timer that counts down with a signal generated based on a clock signal, the timer must be used in order to use the number of command executions within that time interval to determine abnormal processing. Must be set to a large value, and there is a problem that the operation analysis of the IC card from the outside becomes easy. However, as in the present embodiment, control is performed so that the counting operation of the timer 15 is performed only within the processing time of the command. By doing so, the value of the monitoring period 20 set in the timer 15 can be set to a sufficiently small value if the number of command executions within the time interval of the occurrence of the timer interrupt is used as a criterion for determining abnormal processing.
[0038]
FIG. 3 is a flowchart illustrating a procedure executed by the CPU 11 when a timer interrupt occurs and the timer interrupt is permitted.
[0039]
A generally known interrupt branching procedure performed by the CPU when an allowed interrupt occurs (for example, the state of the CPU when an interrupt is accepted, that is, the program execution address information and status information are stored in the stack area). The procedure for setting interrupts to disabled, etc.) and the procedure for returning from interrupts (for example, returning the saved CPU state information to the CPU and setting the interrupts to enabled) are performed as a series of processing procedures according to the hardware system specifications. Detailed steps are not shown because they are performed.
[0040]
First, when a timer interrupt occurs and the interrupt is accepted, step S20, which is an interrupt branch procedure, is executed. Next, the process proceeds to step S21, in which the value of the command execution count 40 stored in the memory 14 is compared with the value of the
[0041]
In step S21, when the value of the command execution count 40 is smaller than the value of the in-period
[0042]
In step S21, when the value of the command execution count 40 is equal to or greater than the value of the period
[0043]
Next, the process proceeds to step S23, in which the value of the number of times of
[0044]
In step S23, when the value of the
[0045]
In step S23, when the value of the number of times of
[0046]
When the interrupt control is performed as described above, the timer that performs the count operation during the processing of the command generates an interrupt at an interval of the monitoring period. When the execution count of the command specified by the command to be monitored when the timer interrupt occurs exceeds the upper limit within the period, and the number of histories that exceeded the upper limit exceeds the set upper limit or more Then, the abnormality processing step is executed.
[0047]
This is because security-related monitoring commands such as commands using the IC card encryption processing program are repeatedly executed within a certain period of time that does not occur in the normal use range. This is because it can be determined that the operation has been performed.
[0048]
As the abnormal processing step S24, various processing procedures can be considered depending on the security level of the IC card. For example, a command at the same address is repeatedly executed to receive a command from the IC card reader /
[0049]
Since the IC card that executes the abnormality processing step does not change the number of histories stored in the NV memory and the number of times exceeding the upper limit even if the IC card is reset by turning on the power to the IC card or a reset signal or the like. In the step of comparing the number of histories with the number of times exceeding the upper limit, the process branches to an abnormality processing step, and a necessary operation analysis can be performed by various external observations without execution of an IC card encryption processing program or the like. Can not.
[0050]
Even if the power supply to the IC card is repeatedly turned off and turned on so that the abnormality processing step is not executed, the value of the monitoring time of the timer is unknown. , It takes a very long time to work, and analysis is difficult.
[0051]
The present invention is not limited to the above-described embodiment, and it goes without saying that various modifications can be made without departing from the spirit of the invention.
[0052]
For example, the timer 15 may perform a count-down operation from a value set by a program, instead of causing the CPU 11 to generate a timer interrupt when the timer 15 performs a count-down operation from a value set by a program and becomes 0. Further, a carry signal generated when the count value exceeds the maximum value that can be displayed by the timer 15 may be input to the CPU 11 as a timer interrupt via the interrupt
[0053]
The timer 15 is not configured to count from a value set by a program, but is configured to operate as a designated n-bit counter. Each time a signal generated based on a clock is input as 2 n times, A timer interrupt may be generated. By doing so, the timer 15 can be realized with a small number of circuits, and a small-sized IC card with high security performance can be provided.
[0054]
In addition, if a power supply used for writing data to the nonvolatile memory is internally generated and the power supply from the program power supply terminal is not used, it is possible to avoid writing the history count and the like to the nonvolatile memory by power supply control. Such illegal acts can be prevented, and the security performance of the IC card can be improved.
[0055]
In addition, if a clock generation circuit is incorporated in the IC card so that the processing speed of the data processing unit does not depend on the clock from the clock terminal, the clock frequency applied to the clock terminal can be reduced to reduce the internal operation of the IC card. It becomes difficult to analyze the IC card, and the security performance of the IC card can be improved.
[0056]
【The invention's effect】
According to the present invention, an IC card with high security can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram of an IC card according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a processing procedure of the IC card according to the embodiment of the present invention.
FIG. 3 is a flowchart showing a timer interrupt processing procedure of the IC card according to the embodiment of the present invention;
[Explanation of symbols]
DESCRIPTION OF
13 Non-volatile memory (NV memory)
14 Volatile memory (RAM)
15
Claims (8)
特定のコマンドの実行回数を計数する手段と、
前記タイマの値が特定の値と等しくなった時に、プロセッサにタイマ割り込みを行う手段と、
前記特定のコマンドの実行回数と期間内上限回数と履歴回数と上限を超えた回数とを記憶するメモリと、
コマンドの実行動作を制限する動作制限手段と
を備え、
電源投入後の初期化手順では、前記履歴回数と上限を超えた回数を比較して前記履歴回数が上限を超えた回数と等しいか大きい時に、動作制限手段でコマンドの実行動作を制限し、前記タイマ割り込みを受け付けて処理する手順では、前記特定のコマンドの実行回数と前記期間内上限回数を比較して、前記特定のコマンドの実行回数が前記期間内上限回数と等しいか大きい時に、前記履歴回数を増加させ、増加した前記履歴回数と上限を超えた回数を比較して、前記履歴回数が前記上限を超えた回数と等しいか大きい時に、動作制限手段でコマンドの実行動作を制限するようにしたことを特徴とするICカード。A timer,
Means for counting the number of executions of a specific command;
Means for interrupting the processor with a timer when the value of the timer becomes equal to a specific value;
A memory for storing the number of times of execution of the specific command, the upper limit number within a period, the number of histories, and the number of times exceeding the upper limit,
Operation restriction means for restricting a command execution operation,
In the initialization procedure after power-on, when the number of histories is compared with the number of times exceeding the upper limit, and when the number of histories is equal to or greater than the number of times exceeding the upper limit, the operation restricting means restricts the execution operation of the command, In the step of receiving and processing the timer interrupt, the number of times of execution of the specific command is compared with the upper limit number within the period, and when the number of executions of the specific command is equal to or greater than the upper limit number within the period, the history count is By comparing the increased number of histories with the number of times exceeding the upper limit, when the number of histories is equal to or greater than the number of times exceeding the upper limit, the operation restricting means limits the command execution operation. An IC card, characterized in that:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002319314A JP2004152210A (en) | 2002-11-01 | 2002-11-01 | Ic card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002319314A JP2004152210A (en) | 2002-11-01 | 2002-11-01 | Ic card |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004152210A true JP2004152210A (en) | 2004-05-27 |
Family
ID=32462196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002319314A Pending JP2004152210A (en) | 2002-11-01 | 2002-11-01 | Ic card |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004152210A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007257542A (en) * | 2006-03-24 | 2007-10-04 | Toshiba Corp | Composite portable electronic device and composite ic card |
JP2015102902A (en) * | 2013-11-21 | 2015-06-04 | 株式会社東芝 | IC card |
-
2002
- 2002-11-01 JP JP2002319314A patent/JP2004152210A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007257542A (en) * | 2006-03-24 | 2007-10-04 | Toshiba Corp | Composite portable electronic device and composite ic card |
JP2015102902A (en) * | 2013-11-21 | 2015-06-04 | 株式会社東芝 | IC card |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100480991C (en) | Pre-boot authentication system | |
US20050167513A1 (en) | IC card with built-in coprocessor for auxiliary arithmetic, and control method thereof | |
EP1777535A2 (en) | System and method for glitch detection in a secure microcontroller | |
JP2001256460A (en) | One-chip microcomputer and ic card using the same | |
US20120131679A1 (en) | Method for protecting software based on clock of security device and security device thereof | |
US20060112436A1 (en) | Protection of a microcontroller | |
EP1772811A2 (en) | System and method for using dummy cycles to mask operations in a secure microcontroller | |
US8176281B2 (en) | Controlling access to an embedded memory of a microcontroller | |
CN111552434B (en) | Method for protecting memory device of computing system, computing system and storage medium | |
US6711690B2 (en) | Secure write blocking circuit and method for preventing unauthorized write access to nonvolatile memory | |
US7024700B1 (en) | Computer with security function and method therefor | |
US7412608B2 (en) | Secure data processing unit, and an associated method | |
JP2003091704A (en) | Storage unit with non-volatile memory and information processing device with freely detachable storage unit | |
US8621195B2 (en) | Disabling communication ports | |
JP2004503860A (en) | Data processing method and apparatus for execution of protected instructions | |
JP2004152210A (en) | Ic card | |
CN100561406C (en) | Electrifying timing sequence control device, computer system, last electric control system and method thereof | |
EP3456075B1 (en) | Method of managing a secure element | |
CN109426324B (en) | Power-on control method, AP chip and mobile terminal | |
EP3667533A1 (en) | Method for securing a system in case of an undesired power-loss | |
EP3017433B1 (en) | Secure mode for electronic access control readers | |
JP7085918B2 (en) | Information processing equipment and information processing method | |
JP2006099616A (en) | Portable electronic equipment and control method for portable electronic equipment | |
JP2003288564A (en) | Memory card | |
JPH1069435A (en) | Ic card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20050415 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20050606 |