JP2010250364A - Ic chip and data protection method or the like - Google Patents

Ic chip and data protection method or the like Download PDF

Info

Publication number
JP2010250364A
JP2010250364A JP2009095952A JP2009095952A JP2010250364A JP 2010250364 A JP2010250364 A JP 2010250364A JP 2009095952 A JP2009095952 A JP 2009095952A JP 2009095952 A JP2009095952 A JP 2009095952A JP 2010250364 A JP2010250364 A JP 2010250364A
Authority
JP
Japan
Prior art keywords
abnormality
program
control information
abnormality handling
chip
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.)
Granted
Application number
JP2009095952A
Other languages
Japanese (ja)
Other versions
JP5332845B2 (en
Inventor
Takashi Kudo
隆史 工藤
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2009095952A priority Critical patent/JP5332845B2/en
Publication of JP2010250364A publication Critical patent/JP2010250364A/en
Application granted granted Critical
Publication of JP5332845B2 publication Critical patent/JP5332845B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an IC chip and an IC card or the like for flexibly responding to various security requests. <P>SOLUTION: In the IC chip, a plurality of failure handling programs having different processing contents, which are executed when a failure is detected, are stored. When control information for designating any of the plurality of handling programs is input from the outside, a CPU 6 stores the control information. When the failure is detected, the CPU 6 executes the failure handling program designated by the control information among the plurality of failure handling programs. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、ICチップに記憶されるデータに対して、種々のセキュリティ攻撃に対する防御方法を設定することができる装置及び方法等の技術分野に関する。   The present invention relates to a technical field such as an apparatus and a method capable of setting protection methods against various security attacks on data stored in an IC chip.

近年、ICカードに搭載されたICチップには、極めて重要なデータ(情報)が記憶され、当該データを用いて、様々なビジネスが展開されている。例えば、電子マネー機能を有する非接触型ICカードには顧客の有する資産に関するデータが記憶され、当該データを用いたビジネスが展開されている。   In recent years, extremely important data (information) is stored in an IC chip mounted on an IC card, and various businesses are developed using the data. For example, a contactless IC card having an electronic money function stores data about assets owned by customers, and a business using the data is developed.

従って、ICカードに記憶されるデータに対しては、取引の安全性確保又は個人情報保護等の観点から、セキュリティの確保、即ち、これらデータの機密性(Confidentiality)、完全性(Integrity)及び可用性(Availability)が担保される必要がある。   Therefore, for the data stored in the IC card, from the viewpoint of ensuring the safety of transactions or protecting personal information, security is ensured, that is, the confidentiality, integrity and availability of these data. (Availability) needs to be secured.

上記セキュリティの確保を妨げる要因の一つに、ICチップに対する悪意ある第三者からのセキュリティ攻撃がある。前記セキュリティ攻撃は、攻撃対象に応じて複数存在し、セキュリティ攻撃に対する防御方法も前記攻撃の種類に応じて複数存在する。   One of the factors that hinder the security is a security attack from a malicious third party against the IC chip. There are a plurality of security attacks according to the attack target, and there are a plurality of defense methods against the security attack according to the type of the attack.

上記セキュリティ攻撃の一例として、例えば電子ビームによるレーザ攻撃が挙げられる。レーザ攻撃は、ICチップに電子ビームを照射することにより、ICチップの誤動作を誘発させてICチップに記憶(格納)されたデータを読み取り又は改竄等することを目的とする攻撃である。かかるレーザ攻撃に対する防御方法の一例として、当該攻撃を検出した際に、ICチップ内のソフトウェアが前記データを削除する方法が採用されている。   As an example of the security attack, for example, a laser attack with an electron beam can be cited. The laser attack is an attack aimed at reading or falsifying data stored (stored) in the IC chip by irradiating the IC chip with an electron beam to induce malfunction of the IC chip. As an example of a defense method against such a laser attack, a method is adopted in which software in the IC chip deletes the data when the attack is detected.

そして、上記検出する条件を設定することによって、上記ソフトウェアのセキュリティレベルを調整するようになっている。   The software security level is adjusted by setting the detection condition.

しかし、例え悪意の無い利用者であっても、ICカードの動作中に誤ってリーダライタ装置からICカードを抜いてしまった場合、ICチップ内のデータが破壊されることがある。そして、当該ソフトウェアは、上記検出方法によって、攻撃によりデータが改竄されたと判断し、内部のデータを利用不可能にしてしまう。   However, even if the user is not malicious, if the IC card is accidentally removed from the reader / writer device during the operation of the IC card, the data in the IC chip may be destroyed. Then, the software determines that the data has been tampered with by the above-described detection method, and makes the internal data unusable.

従って、過剰な防衛機能を持った高レベルのセキュリティ対策は、悪意ある第三者が多数いる地域(環境)で使用される場合や、守るべきデータが非常に重要な場合おいては有効だが、そうでない場合には、利用者が不便になる虞がある。   Therefore, high-level security measures with excessive defense functions are effective when used in regions (environments) where there are many malicious third parties, or when the data to be protected is very important. Otherwise, the user may be inconvenient.

以上の点を鑑みて、従来では、予め製品が使用されるシチュエーション(situation)を想定して、当該シュチエーションに応じたセキュリティ対策(セキュリティレベルを適宜設定する)を施したソフトウェアを開発し、ICチップに搭載していた。   In view of the above points, in the past, assuming a situation in which the product is used in advance, software with security measures (setting the security level appropriately) corresponding to the situation has been developed, and an IC chip It was mounted on.

上記ソフトウェアは、一般的には、ICチップのマスクROM(Mask ROM)に搭載される。当該マスクROMは、記憶される内容を書き換えることができない不揮発性メモリであるため、一度記憶された上記ソフトウェアの内容を、事後的に変更又は改変等することができないようになっている。   The software is generally mounted on a mask ROM of an IC chip. Since the mask ROM is a non-volatile memory that cannot rewrite the stored contents, the contents of the software once stored cannot be changed or modified afterwards.

従って、想定されていた利用環境(ICチップの使用されるシチュエーション)が変化し当該ソフトウェアに施したセキュリティ対策方法を変更(例えば、上記検出する条件を変更)する必要が出てきた場合、上記マスクROMに搭載された後は、かかる変更を行うことはできなかった。   Therefore, when the assumed usage environment (the situation in which the IC chip is used) changes and the security countermeasure method applied to the software needs to be changed (for example, the detection condition is changed), the mask is used. Once installed in ROM, such changes could not be made.

また、上記変更を行うためには、上記マスクROMを作り直す必要があり、製造コストの増加及び納期の遅延等の問題が発生してしまい、現実的ではなかった。また、事後的にEEPROM(Electrically Erasable PROM)へパッチデータ(patch data)を書込み、ソフトウェアの動作を変更することも可能であるが、当該EEPROMの空き容量が十分でない場合には、前記パッチデータの書込みを行うことはできなかった。   Further, in order to make the above change, it is necessary to recreate the mask ROM, which causes problems such as an increase in manufacturing cost and a delay in delivery time, which is not realistic. It is also possible to write patch data (Patch data) to EEPROM (Electrically Erasable PROM) afterwards to change the operation of the software. However, if there is not enough free space in the EEPROM, the patch data Writing could not be done.

そこで、本発明は上記各問題点に鑑みてなされたもので、その目的の一例は、ICチップに記憶されるデータに対して、種々のセキュリティ攻撃に対する防御方法を設定することができ、ICチップに記憶されたソフトウェアの改変なしに様々なセキュリティ要求に柔軟に対応することができるICチップ及びデータ保護方法等を提供することである。   Accordingly, the present invention has been made in view of the above problems, and an example of the purpose thereof is to set protection methods against various security attacks on data stored in an IC chip. An IC chip and a data protection method that can flexibly respond to various security requirements without modification of software stored in the memory.

上記の課題を解決するために、請求項1に記載のICチップは、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶手段と、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力手段と、前記制御情報を記憶する制御情報記憶手段と、異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理手段と、を備える。   In order to solve the above problem, an IC chip according to claim 1 is an abnormality handling processing program executed when an abnormality is detected, and includes a plurality of the abnormality handling processing programs having different processing contents. An abnormality response processing program storage means for storing; an input means for inputting control information for designating any of the plurality of abnormality response processing programs from outside; a control information storage means for storing the control information; An abnormality response processing means for executing the abnormality response processing program designated by the control information among the plurality of abnormality response processing programs when detected.

この発明によれば、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムが記憶されており、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報が入力されると、前記制御情報が記憶され、異常が検出されると、前記制御情報により指定される前記異常対応処理プログラムを実行することができる。   According to the present invention, a plurality of abnormality handling processing programs that are executed when an abnormality is detected and that are different from each other are stored, and the plurality of abnormality handling processes are externally stored. When control information for designating any of the programs is input, the control information is stored, and when an abnormality is detected, the abnormality handling processing program designated by the control information can be executed.

従って、ICチップに記憶されるデータに対して、種々のセキュリティ攻撃に対する防御方法を設定することができ、ICチップに記憶されたソフトウェアの改変なしに様々なセキュリティ要求に柔軟に対応することができる。また、例えば、マスクROM作成後もセキュリティレベルを自由に変更することができる。   Therefore, protection methods against various security attacks can be set for the data stored in the IC chip, and various security requirements can be flexibly dealt with without modifying the software stored in the IC chip. . Further, for example, the security level can be freely changed even after the mask ROM is created.

請求項2に記載のICチップは、請求項1に記載のICチップにおいて、当該ICチップには互いに異なる複数のアプリケーションプログラムが実行可能に記憶されており、前記制御情報は、各前記アプリケーションプログラム毎に対応付けられて記憶されるものであって、前記異常対応処理手段は、異常が検出された場合に、前記各アプリケーションプログラムに対応する前記制御情報により指定される前記異常対応処理プログラムを実行する。   The IC chip according to claim 2 is the IC chip according to claim 1, wherein a plurality of different application programs are stored in the IC chip so as to be executable, and the control information is stored for each of the application programs. The abnormality handling processing means executes the abnormality handling processing program designated by the control information corresponding to each application program when an abnormality is detected. .

従って、アプリケーション毎に異なるセキュリティ攻撃に対する防御方法を設定することができ、ICチップに記憶されたソフトウェアの改変なしに様々なセキュリティ要求にさらに柔軟に対応することができる。また、例えば、マスクROM作成後もセキュリティレベルを自由に変更することができる。   Therefore, it is possible to set a defense method against a different security attack for each application, and it is possible to respond more flexibly to various security requirements without modifying the software stored in the IC chip. Further, for example, the security level can be freely changed even after the mask ROM is created.

請求項3に記載のICカードは、請求項1又は2の何れか一項に記載のICチップと、ICカード基体と、を備えることを特徴とする。   An IC card according to a third aspect includes the IC chip according to any one of the first or second aspects and an IC card base.

請求項4に記載のデータ保護方法は、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶工程と、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力工程と、前記制御情報を記憶する制御情報記憶工程と、異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理工程と、を有する。   The data protection method according to claim 4, wherein the abnormality handling program is a malfunction handling program that is executed when a malfunction is detected, and stores a plurality of the malfunction handling programs that have different processing contents. And an input step for inputting control information for designating any of the plurality of abnormality handling processing programs from the outside, a control information storage step for storing the control information, and a plurality of the plurality of abnormality handling programs when an abnormality is detected. An abnormality handling processing step of executing the abnormality handling processing program specified by the control information.

請求項5に記載のデータ保護プログラムは、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶手段を有するICチップに含まれるコンピュータを、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力手段、前記制御情報を記憶する制御情報記憶手段、異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理手段、として機能させる。   6. The data protection program according to claim 5, which is an abnormality response processing program executed when an abnormality is detected, and stores a plurality of abnormality response processing programs having different processing contents. An input means for inputting control information for designating one of the plurality of abnormality handling processing programs from the outside, a control information storage means for storing the control information, and an abnormality detected. In this case, the abnormality handling processing unit is configured to execute the abnormality handling processing program designated by the control information among the plurality of abnormality handling processing programs.

以上のように、本発明によれば、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムが記憶されており、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報が入力されると、当該制御情報が記憶され、異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行することができるため、ICチップに記憶されるデータに対して、種々のセキュリティ攻撃に対する防御方法を設定することができ、ICチップに記憶されたソフトウェアの改変なしに様々なセキュリティ要求に柔軟に対応することができる。   As described above, according to the present invention, a plurality of abnormality handling processing programs that are executed when an abnormality is detected and that have different processing contents are stored. When control information for designating any one of a plurality of abnormality handling processing programs is input, the control information is stored, and when an abnormality is detected, the control information among the plurality of abnormality handling processing programs The abnormality handling processing program specified by the user can be executed, so that protection methods against various security attacks can be set for the data stored in the IC chip, and the software stored in the IC chip Various security requirements can be flexibly handled without modification.

ICカードの全体構成例を示すブロック図である。It is a block diagram which shows the example of whole structure of an IC card. 本実施形態に係るROM3及びEEPROM5の記憶領域に記憶されるプログラムの構造を示す概念図である。It is a conceptual diagram which shows the structure of the program memorize | stored in the storage area of ROM3 and EEPROM5 which concerns on this embodiment. 制御フラグ書き換えコマンドが入力されてから、結果が出力されるまでの動作概要を示すシーケンス図である。It is a sequence diagram which shows the operation | movement outline | summary after a control flag rewrite command is input until a result is output. 前記ビット毎に上記異常対応処理プログラムに対応する制御フラグを割り当てた対応関係を模式的に示す図である。It is a figure which shows typically the correspondence which allocated the control flag corresponding to the said abnormality response processing program for every said bit. 制御フラグ書き換えコマンドを受信した時のICチップ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of IC chip 1 when a control flag rewriting command is received. ビットフラグ列に基づき制御フラグの符号が書き換えられたテーブルの一例を示す図である。It is a figure which shows an example of the table by which the code | symbol of the control flag was rewritten based on the bit flag row | line | column. セキュリティ攻撃検知時のICチップ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of IC chip 1 at the time of security attack detection. 発行済み禁止フラグの機能概要を示す概要図である。It is a schematic diagram which shows the function outline | summary of an issued prohibition flag. 上記制御フラグの書き換えを禁止した後のICチップ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of IC chip 1 after prohibiting rewriting of the said control flag.

以下、本願の最良の実施形態を添付図面に基づいて説明する。なお、以下に説明する実施の形態は、ICカードに対して本願を適用した場合の実施形態である。   Hereinafter, the best embodiment of the present application will be described with reference to the accompanying drawings. The embodiment described below is an embodiment when the present application is applied to an IC card.

先ず、本実施形態に係るICカードの構成及び機能概要について、図1を用いて説明する。   First, the configuration and functional overview of the IC card according to the present embodiment will be described with reference to FIG.

図1は、ICカードの全体構成例を示すブロック図である。図1に示すように、ICカード8は、ICチップ1をICカード基体7に備えている。   FIG. 1 is a block diagram showing an example of the overall configuration of an IC card. As shown in FIG. 1, the IC card 8 includes an IC chip 1 on an IC card base 7.

ICチップ1は、I/O(input/output)インターフェース2、ROM(Read Only Memory)3、RAM(Random Access Memory)4、EEPROM5、CPU(Central Processing Unit)6等を備えて構成されている。   The IC chip 1 includes an I / O (input / output) interface 2, a ROM (Read Only Memory) 3, a RAM (Random Access Memory) 4, an EEPROM 5, a CPU (Central Processing Unit) 6, and the like.

I/Oインターフェース2は、データを送受信するための入出力回路であり、CPU6は、このI/Oインターフェース2を介して図示しないリーダライタ装置等と交信する。   The I / O interface 2 is an input / output circuit for transmitting and receiving data, and the CPU 6 communicates with a reader / writer device and the like (not shown) via the I / O interface 2.

また、このI/Oインターフェース2は、本願の入力手段として機能し、CPU6の制御の下、後述する外部から入力された制御情報等が、I/Oインターフェース2を介して入力される。   The I / O interface 2 functions as input means of the present application, and control information and the like input from the outside, which will be described later, are input via the I / O interface 2 under the control of the CPU 6.

ROM3内には、CPU6によって実行されるべきプログラムが記憶されており、CPU6は、このプログラムに基づいてICチップ1を統括的に制御する。   A program to be executed by the CPU 6 is stored in the ROM 3, and the CPU 6 controls the IC chip 1 in an integrated manner based on this program.

ROM3に記憶されるプログラムの構造について図2(a)を用いて説明する。   The structure of the program stored in the ROM 3 will be described with reference to FIG.

図2(a)は、本実施形態に係るROM3の記憶領域に記憶されるプログラムの構造を示す概念図である。   FIG. 2A is a conceptual diagram showing the structure of a program stored in the storage area of the ROM 3 according to this embodiment.

図2(a)に示されるように、ROM3の記憶領域に記憶されるプログラム11には、制御フラグ書き換えモジュール11a及び処理振り分けモジュール11b等が定義づけられている。これらの各モジュールの機能については後述する。   As shown in FIG. 2A, the program 11 stored in the storage area of the ROM 3 is defined with a control flag rewriting module 11a, a processing distribution module 11b, and the like. The functions of these modules will be described later.

RAM4は、CPU6がICチップ1を統括的に制御するために作業領域として使用するメモリである。   The RAM 4 is a memory used as a work area for the CPU 6 to control the IC chip 1 in an integrated manner.

EEPROM5は、不揮発性半導体メモリの一種であり、記憶領域に記憶されているデータを消去し、何度でも再記憶ができるPROM(Programmable Rom)である。さらに、EEPROM5は、本願の異常対応処理プログラム記憶手段及び制御情報記憶手段として機能し、異常対応処理プログラム及び制御情報等、ICチップ1に記録すべきデータを記憶する。   The EEPROM 5 is a kind of nonvolatile semiconductor memory, and is a PROM (Programmable Rom) that can erase data stored in a storage area and re-store it any number of times. Further, the EEPROM 5 functions as an abnormality handling processing program storage unit and control information storage unit of the present application, and stores data to be recorded on the IC chip 1 such as an abnormality handling processing program and control information.

ここで、異常対応処理プログラムとは、異常が検出された場合に実行されるプログラムである。本実施形態における異常対応処理プログラムは、異常の一例としてセキュリティ攻撃が検出されると、当該攻撃からEEPROM5等に記憶されたデータ等を保護するために、CPU6に所定の動作を行わせるように定義されている。   Here, the abnormality handling processing program is a program executed when an abnormality is detected. The abnormality handling processing program according to the present embodiment is defined so that when a security attack is detected as an example of an abnormality, the CPU 6 performs a predetermined operation to protect data stored in the EEPROM 5 or the like from the attack. Has been.

具体的には、例えば、CPU6が、セキュリティ攻撃の一例であるレーザ攻撃を受けたと検出した場合に、前記アプリケーションプログラムの実行の下、CPU6は、上記所定の動作として、例えばICチップ1に記憶されるデータを削除、当該攻撃を受けたことを示すエラーコードを送信又は、他のコマンドを無効化(受け付けない)等の動作(処理)を実行するようになっている。EEPROM5には、互いに処理内容が異なる複数の異常対応処理プログラムが記録されている。   Specifically, for example, when the CPU 6 detects that it has received a laser attack that is an example of a security attack, the CPU 6 stores the predetermined operation as, for example, the IC chip 1 under the execution of the application program. Deletes data, sends an error code indicating that the attack has occurred, or invalidates (does not accept) other commands. In the EEPROM 5, a plurality of abnormality handling processing programs having different processing contents are recorded.

また、制御情報とは、異常対応処理プログラムを指定するための情報であり、本実施形態では、制御情報の一例として制御フラグ群が用いられる。   The control information is information for designating an abnormality handling processing program. In this embodiment, a control flag group is used as an example of control information.

次に、本実施形態に係るEEPROM5の記憶領域に記憶されるプログラム及び制御フラグ群について、図2(b)及び(c)を用いて説明する。   Next, programs and control flag groups stored in the storage area of the EEPROM 5 according to the present embodiment will be described with reference to FIGS.

図2(b)及び(c)は、本実施形態に係るEEPROM5の記憶領域に記憶されるプログラムの構造を示す概念図である。   2B and 2C are conceptual diagrams showing the structure of a program stored in the storage area of the EEPROM 5 according to the present embodiment.

図2(b)に示すように、EEPROM5内の記憶領域には、アプリケーションプログラムA(12)、アプリケーションプログラムB(13)及びアプリケーションプログラムC(14)の3つのアプリケーションプログラムが実行可能に記憶されている。   As shown in FIG. 2B, in the storage area in the EEPROM 5, three application programs of an application program A (12), an application program B (13), and an application program C (14) are stored so as to be executable. Yes.

各アプリケーションプログラムは、制御情報の一例としての制御フラグ群と対応付けられている。   Each application program is associated with a control flag group as an example of control information.

本願では、アプリケーションプログラムA(12)乃至アプリケーションプログラムC(14)には、制御フラグ群A(12a)乃至制御フラグ群C(14a)が夫々対応付けられている。   In the present application, control program group A (12a) through control flag group C (14a) are associated with application program A (12) through application program C (14), respectively.

図2(c)は、制御フラグ群及び制御フラグの機能概要を示す模式図である。   FIG. 2C is a schematic diagram showing an outline of functions of the control flag group and the control flag.

制御フラグ群は、制御フラグとしてのフラグ1、フラグ2、フラグ3等から構成されている。また、制御フラグは制御フラグ群を構成する符号であり、CPU6等の動作により、当該符号が書き換えられるようになっている。   The control flag group includes a flag 1, a flag 2, a flag 3, and the like as control flags. The control flag is a code constituting a control flag group, and the code is rewritten by the operation of the CPU 6 or the like.

制御フラグは、上述した異常対応処理プログラムと対応付けられており、CPU6は、上記符号の内容に応じて、制御フラグと対応付けられた異常対応処理プログラムを指定し、異常対応処理プログラムが定義する動作を実行するか否かを判断するようになっている。   The control flag is associated with the above-described abnormality handling processing program, and the CPU 6 designates the abnormality handling processing program associated with the control flag according to the content of the above-mentioned code, and the abnormality handling processing program defines it. It is determined whether or not to execute the operation.

図2(c)は、制御フラグの符号にtrue(例えば、1)とfalse(例えば、0)を用いた場合における、CPU6の上記異常対応処理プログラムの指定と動作について模式的に示した図である。   FIG. 2 (c) is a diagram schematically showing the specification and operation of the above-mentioned abnormality handling processing program of the CPU 6 when true (for example, 1) and false (for example, 0) are used as the control flag symbols. is there.

例えば制御フラグがフラグ1であった場合、フラグ1がtrueを示すと、CPU6は、フラグ1に対応付けられた異常対応処理プログラムを指定し、当該異常対応処理プログラムが定義する動作1を実行する(換言すれば、動作1を活性化する)ことが、一方、フラグ1がfalseを示すと、CPU6は、フラグ1に対応付けられた異常対応処理プログラムを指定せず、動作1を実行しない(換言すれば、動作1を活性化しない)ことが模式的に示されている。   For example, if the control flag is flag 1 and flag 1 indicates true, the CPU 6 designates the abnormality handling process program associated with flag 1 and executes operation 1 defined by the abnormality handling process program. On the other hand, if the flag 1 indicates “false”, the CPU 6 does not specify the abnormality handling processing program associated with the flag 1 and does not execute the operation 1 ( In other words, it is schematically shown that the operation 1 is not activated.

また、制御フラグがフラグ2及びフラグ3であった場合の上記異常対応処理プログラムの指定と動作も、フラグ1と同様であることが示されている。   It is also shown that the specification and operation of the abnormality handling program when the control flag is flag 2 and flag 3 are the same as flag 1.

CPU6は、上述したようにプログラムに基づいてICチップ1全体の動作を統括的に制御すると共に、本願の異常対応処理手段として機能する。   The CPU 6 controls the overall operation of the IC chip 1 based on the program as described above, and functions as the abnormality handling processing means of the present application.

次に、図3乃至図7を用いて、ICカード8に含まれるICチップ1の動作を説明する。   Next, the operation of the IC chip 1 included in the IC card 8 will be described with reference to FIGS.

本実施形態におけるCPU6の動作は、[1.制御フラグの書き換えにおける動作]及び[2.セキュリティ攻撃検出時における動作]に大別することができる。   The operation of the CPU 6 in this embodiment is described in [1. Operation in rewriting control flag] and [2. Operation when security attack is detected].

以下、上記動作について詳細に説明する。   Hereinafter, the operation will be described in detail.

[1.制御フラグの書き換えにおける動作]
本実施形態のICチップ1に含まれるCPU6は、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御フラグ群が入力されると、各前記アプリケーションプログラム毎に対応付けて記憶されている制御フラグ群を書き換える(又は入力された制御フラグ群が示す内容に記憶する)ようになっている。
[1. Operation in rewriting control flag]
When the CPU 6 included in the IC chip 1 of the present embodiment receives a control flag group for designating one of the plurality of abnormality handling processing programs from the outside, it is stored in association with each application program. The control flag group is rewritten (or stored in the contents indicated by the input control flag group).

制御フラグの書き換えにおけるCPU6の動作について、図3乃至図6を用いて説明する。   The operation of the CPU 6 in rewriting the control flag will be described with reference to FIGS.

まず、制御フラグ書き換えコマンドが入力されてから結果が出力されるまでの動作概要について図3を用いて説明する。   First, an operation outline from when a control flag rewrite command is input to when a result is output will be described with reference to FIG.

図3は、制御フラグ書き換えコマンドが入力されてから結果が出力されるまでの動作概要を示すシーケンス図である。   FIG. 3 is a sequence diagram illustrating an operation outline from when a control flag rewrite command is input to when a result is output.

本実施形態では、制御フラグ群を入力することによって、制御フラグ群を構成する制御フラグに対応付けられた異常対応処理プログラムを指定するようになっている。そして、制御フラグ群は各アプリケーションプログラム毎に対応付けられているため、各アプリケーションプログラム毎にかかる指定が可能となっている。   In the present embodiment, by inputting a control flag group, an abnormality handling processing program associated with the control flag constituting the control flag group is designated. Since the control flag group is associated with each application program, it can be specified for each application program.

上記指定を行うために、まず、アプリケーションプログラムを起動させる。当該アプリケーションプログラムを起動させることによって、当該アプリケーションプログラムに対応付けられた制御フラグ群を構成する制御フラグの符号を書き換えることができるようになっている。   In order to make the above designation, first, an application program is started. By starting the application program, it is possible to rewrite the code of the control flag constituting the control flag group associated with the application program.

そして、他のアプリケーションプログラムに対応する制御フラグの符号を書き換える場合には、当該他のアプリケーションを起動させ、当該アプリケーションプログラムに対応付けられた制御フラグ群を構成する制御フラグの符号を書き換えることができるようになっている。   And when rewriting the code | symbol of the control flag corresponding to another application program, the said other application can be started and the code | symbol of the control flag which comprises the control flag group matched with the said application program can be rewritten. It is like that.

以下に上記動作について詳細に説明する。   The above operation will be described in detail below.

まず、図示しない端末装置から、制御フラグ書き換えコマンド(コマンド)が入力される(ステップS1)。   First, a control flag rewrite command (command) is input from a terminal device (not shown) (step S1).

ここで、制御フラグ書き換えコマンドとは、CPU6に上記制御フラグの符号の書き換えを指示するための命令をいい、本実施形態においては、例えば、ユーザの図示しない端末装置の操作により、ICカード8に対して入力される。   Here, the control flag rewrite command refers to a command for instructing the CPU 6 to rewrite the sign of the control flag. In the present embodiment, for example, when the user operates the terminal device (not shown), Input.

本実施形態では、制御フラグ群の一例としてビットフラグ列が用いられ、当該ビットフラグ列が、ICカード8に入力される。   In this embodiment, a bit flag string is used as an example of the control flag group, and the bit flag string is input to the IC card 8.

ここで、ビットフラグ列とは、整数型の各ビットを制御フラグの符号に見立てて値を保持するものであり、本実施例では、前記ビット毎に異常対応処理プログラムに対応付けられた制御フラグが割り当てられている。   Here, the bit flag string is a value that holds each bit of an integer type as a sign of a control flag, and in this embodiment, a control flag associated with an abnormality handling processing program for each bit. Is assigned.

そして、CPU6は、上述したROM3の記憶領域に記憶されるプログラム11の制御フラグ書き換えモジュール11の実行の下、当該ビットの値に応じて、上記制御フラグの符号を書き換えるようになっている。   The CPU 6 rewrites the code of the control flag according to the value of the bit under the execution of the control flag rewriting module 11 of the program 11 stored in the storage area of the ROM 3 described above.

図4は、前記ビット毎に上記異常対応処理プログラムに対応する制御フラグを割り当てた対応関係を模式的に示す図である。   FIG. 4 is a diagram schematically showing a correspondence relationship in which a control flag corresponding to the abnormality handling program is assigned to each bit.

図4に示す図は、bit1からbit8の8ビット長からなるビットフラグ列部と、各ビット毎に異なる異常対応処理プログラムに対応付けられた制御フラグが割り当てられ、当該異常対応処理プログラムが定義する動作の内容を示す動作表示部からなっている。   In the diagram shown in FIG. 4, a bit flag string part having an 8-bit length from bit 1 to bit 8 and a control flag associated with a different abnormality handling program for each bit are assigned and defined by the abnormality handling program. It consists of an action display that shows the contents of the action.

上記ビットフラグ列において、8番目のビットであるbit8は、異常対応処理プログラムが定義する動作の内容が「アプリケーション自身の削除」である当該異常対応処理プログラムに対応付けられた制御フラグに、割り当てられていることを示している。   In the bit flag string, bit 8 that is the eighth bit is assigned to the control flag associated with the abnormality handling processing program whose operation content defined by the abnormality handling processing program is “deletion of application itself”. It shows that.

そして、当該ビットの値が0を示す場合には、前記制御フラグの符号をfalseと変化させ、異常対応処理プログラムを指定しないようになっている。この結果、当該異常対応処理プログラムは実行されないため、CPU6に、当該異常対応処理プログラムが定義する動作である「アプリケーション自身の削除」を実行させないようになっている。   When the value of the bit indicates 0, the sign of the control flag is changed to false so that the abnormality handling program is not designated. As a result, since the abnormality handling processing program is not executed, the CPU 6 is prevented from executing “deletion of application itself” which is an operation defined by the abnormality handling processing program.

一方、当該ビットの値が1の場合は、前記制御フラグの符号をtrueと変化させ、当該異常対応処理プログラムを指定するようになっている。この結果、当該異常対応処理プログラムは実行されるため、CPU6に、当該異常対応処理プログラムが定義する動作である「アプリケーション自身の削除」を実行させるようになっている。   On the other hand, when the value of the bit is 1, the sign of the control flag is changed to true, and the abnormality handling processing program is designated. As a result, since the abnormality handling program is executed, the CPU 6 is caused to execute “deletion of application itself” which is an operation defined by the abnormality handling program.

また、7番目のビットであるbit7は、異常対応処理プログラムが定義する動作の内容が「鍵データの削除」である異常対応処理プログラムに対応付けられた制御フラグに、割り当てられていることを示している。   The seventh bit, bit7, indicates that the content of the action defined by the abnormality handling program is assigned to the control flag associated with the abnormality handling program whose key data is “deleted”. ing.

そして、当該ビットの値が0を示す場合には、前記制御フラグの符号をfalseと変化させ、異常対応処理プログラムを指定しないようになっている。この結果、当該異常対応処理プログラムは実行されないため、CPU6に当該異常対応処理プログラムが定義する動作である「鍵データの削除」を実行させないようになっている。   When the value of the bit indicates 0, the sign of the control flag is changed to false so that the abnormality handling program is not designated. As a result, since the abnormality handling program is not executed, the CPU 6 is not allowed to execute “deletion of key data” which is an operation defined by the abnormality handling program.

一方、当該ビットの値が1の場合は、前記制御フラグの符号をtrueと変化させ、当該異常対応処理プログラムを指定するようになっている。この結果、当該異常対応処理プログラムは実行されるため、CPU6に当該異常対応処理プログラムが定義する動作である「鍵データの削除」を実行させるようになっている。   On the other hand, when the value of the bit is 1, the sign of the control flag is changed to true, and the abnormality handling processing program is designated. As a result, since the abnormality handling processing program is executed, the CPU 6 is caused to execute “deletion of key data” which is an operation defined by the abnormality handling processing program.

また、6番目のビットであるbit6は、異常対応処理プログラムが定義する動作の内容が「暗証番号の削除」である当該プログラムに対応付けられた制御フラグに、割り当てられていることを示している。   The sixth bit, bit6, indicates that the content of the operation defined by the abnormality handling processing program is assigned to the control flag associated with the program having “deletion of password”. .

そして、当該ビットの値が0を示す場合には、前記制御フラグの符号をfalseと変化させ、異常対応処理プログラムを指定しないようになっている。この結果、当該異常対応処理プログラムは実行されないため、CPU6に当該異常対応処理プログラムが定義する動作である「暗証番号の削除」を実行させないようになっている。   When the value of the bit indicates 0, the sign of the control flag is changed to false so that the abnormality handling program is not designated. As a result, since the abnormality handling program is not executed, the CPU 6 is not allowed to execute “deletion of the personal identification number” which is an operation defined by the abnormality handling program.

一方、当該ビットの値が1の場合は、前記制御フラグの符号をtrueと変化させ、当該異常対応処理プログラムを指定するようになっている。この結果、当該異常対応処理プログラムは実行されるため、CPU6に当該異常対応処理プログラムが定義する動作である「暗証番号の削除」を実行させるようになっている。   On the other hand, when the value of the bit is 1, the sign of the control flag is changed to true, and the abnormality handling processing program is designated. As a result, since the abnormality handling program is executed, the CPU 6 is caused to execute “deletion of a personal identification number” which is an operation defined by the abnormality handling program.

また、5番目のビットであるbit5は、異常対応処理プログラムが定義する動作の内容が「攻撃を受けたことを示すエラーコードを返す」である当該プログラムに対応付けられた制御フラグに、割り当てられていることを示している。   The fifth bit, bit5, is assigned to the control flag associated with the program whose operation content defined by the abnormality handling processing program is “returns an error code indicating that an attack has been received”. It shows that.

そして、当該ビットの値が0を示す場合には、前記制御フラグの符号をfalseと変化させ、異常対応処理プログラムを指定しないようになっている。この結果、当該異常対応処理プログラムは実行されないため、CPU6に当該異常対応処理プログラム画定義する動作である「攻撃を受けたことを示すエラーコードを返す」を実行させないようになっている。   When the value of the bit indicates 0, the sign of the control flag is changed to false so that the abnormality handling program is not designated. As a result, since the abnormality handling program is not executed, the CPU 6 is prevented from executing “returning an error code indicating that an attack has been received” which is an operation for defining the abnormality handling program image.

一方、当該ビットの値が1の場合は、前記制御フラグの符号をtrueと変化させ、当該異常対応処理プログラムを指定するようになっている。この結果、当該異常対応処理プログラムは実行されるため、CPU6に当該異常対応処理プログラムが定義する動作である「攻撃を受けたことを示すエラーコードを返す」を実行させるようになっている。   On the other hand, when the value of the bit is 1, the sign of the control flag is changed to true, and the abnormality handling processing program is designated. As a result, since the abnormality handling program is executed, the CPU 6 is caused to execute “return an error code indicating that an attack has occurred”, which is an operation defined by the abnormality handling program.

また、4番目のビットであるbit4は、異常対応処理プログラムが定義する動作の内容が「アプリケーション選択中は、コマンドを受け付けない」である当該プログラムに対応付けられた制御フラグに、割り当てられていることを示している。   The fourth bit, bit4, is assigned to a control flag associated with the program whose operation content defined by the abnormality handling processing program is “no command accepted when an application is selected”. It is shown that.

そして、当該ビットの値が0を示す場合には、前記制御フラグの符号をfalseと変化させ、異常対応処理プログラムを指定しないようになっている。この結果、当該異常対応処理プログラムは実行されないため、CPU6に当該異常対応処理プログラム画定義する動作である「アプリケーション選択中は、コマンドを受け付けない」を実行させないようになっている。   When the value of the bit indicates 0, the sign of the control flag is changed to false so that the abnormality handling program is not designated. As a result, since the abnormality handling program is not executed, the CPU 6 is not allowed to execute “not accepting a command while selecting an application”, which is an operation for defining the abnormality handling program image.

一方、当該ビットの値が1の場合は、前記制御フラグの符号をtrueと変化させ、当該異常対応処理プログラムを指定するようになっている。この結果、当該異常対応処理プログラムは実行されるため、CPU6に当該異常対応処理プログラムが定義する動作である「アプリケーション選択中は、コマンドを受け付けない」を実行させるようになっている。   On the other hand, when the value of the bit is 1, the sign of the control flag is changed to true, and the abnormality handling processing program is designated. As a result, since the abnormality handling processing program is executed, the CPU 6 is caused to execute “the command is not accepted during application selection”, which is an operation defined by the abnormality handling processing program.

また、3番目のビットであるbit3〜1番目のビットであるbit1は、何らの異常対応処理プログラムに対応する制御フラグに割り当てられていないことを示している。   Also, bit 3 as the third bit and bit 1 as the first bit indicate that they are not assigned to the control flag corresponding to any abnormality handling processing program.

このように、制御フラグ群をビットフラグ列で表現することにより、異なる種類の複数の制御フラグの符号を一括して書き換えることができる。   In this way, by expressing the control flag group as a bit flag string, the codes of a plurality of different types of control flags can be rewritten in a batch.

図3の説明に戻り、前記コマンドが入力されると、CPU6は、後述する制御フラグ書き換え処理を行う(ステップS2)。そして、結果を端末装置へ出力するようになっている(ステップS3)。   Returning to the description of FIG. 3, when the command is input, the CPU 6 performs a control flag rewriting process to be described later (step S2). Then, the result is output to the terminal device (step S3).

このようにして、ビットフラグ列を用いて外部から複数の異常対応処理プログラムの何れかを指定できるようになっている。   In this way, any one of a plurality of abnormality handling processing programs can be designated from the outside using the bit flag string.

なお、上記ビットフラグ列が入力される段階は、上記制御フラグ書き換えコマンドが入力される前後を問わずいつでも可能である。   The stage where the bit flag string is input can be performed at any time before or after the control flag rewrite command is input.

次に、制御フラグ書き換えコマンドを受信した時のICチップ1の動作について、図5及び図6を用いて説明する。   Next, the operation of the IC chip 1 when the control flag rewrite command is received will be described with reference to FIGS.

図5は、制御フラグ書き換えコマンドを受信した時のICチップ1の動作を示すフローチャートである。   FIG. 5 is a flowchart showing the operation of the IC chip 1 when a control flag rewrite command is received.

まず、制御フラグ書き換えコマンドが受信される前に、上述したようにアプリケーションプログラムを起動等させ制御フラグ書き換えコマンドの受信を可能な状態とする。   First, before the control flag rewrite command is received, the application program is started as described above to make it possible to receive the control flag rewrite command.

そして、ICチップ1が制御フラグ書き換えコマンドを受信すると(ステップS10)、CPU6は、制御フラグ書き換えコマンドを解析する(ステップS11)。具体的には、上記制御フラグ書き換えコマンドの入力を受けたCPU6は、当該コマンドが上記制御フラグ書き換えコマンドであることを認識し、制御フラグを書き換える処理の準備を行う。   When the IC chip 1 receives the control flag rewrite command (step S10), the CPU 6 analyzes the control flag rewrite command (step S11). Specifically, the CPU 6 that has received the input of the control flag rewrite command recognizes that the command is the control flag rewrite command, and prepares for the process of rewriting the control flag.

次に、CPU6は、既に入力された、又はこれから入力される上記ビットフラグ列に応じて、所定の動作と対応付けられている制御フラグの符号を書き換え(又は書込み)(ステップS12)、EPPROM5等に記憶する。   Next, the CPU 6 rewrites (or writes) the code of the control flag associated with a predetermined operation in accordance with the bit flag string that has already been input or will be input (step S12), the EPPROM 5, etc. To remember.

図6は、ビットフラグ列に基づき制御フラグの符号が書き換えられたテーブルの一例を示す図である。   FIG. 6 is a diagram illustrating an example of a table in which the code of the control flag is rewritten based on the bit flag string.

図6(a)は、ビットフラグ列の一例を示す図である。   FIG. 6A is a diagram illustrating an example of a bit flag string.

ビットフラグ列部30は、例えば、1番目のビットであるbit1から8番目のビットであるbit8の値が順番に、「00001110」であるビットフラグ列から構成される。   For example, the bit flag string unit 30 is composed of a bit flag string in which the values of bit 1 as the first bit to bit 8 as the eighth bit are “00001110” in order.

図6(b)は、当該コマンドに基づき制御フラグが書き換えられたテーブルの一例を示す図である。   FIG. 6B is a diagram illustrating an example of a table in which the control flag is rewritten based on the command.

上述したように、CPU6は、上述したビットフラグ列に基づき、上記各ビットの値が1を示すビットに割り当てられた制御フラグの符号をtrueに書き換えるようになっている。   As described above, the CPU 6 rewrites the code of the control flag assigned to the bit having the value of each bit of 1 based on the above-described bit flag string as true.

図6(b)では、ビットフラグ列部30の5番目のビット(bit5)〜7番目のビット(bit7)が1であるため、CPU6は、当該ビットに割り当てられている制御フラグの符号をtrueに書き換えるようになっている。   In FIG. 6B, since the fifth bit (bit 5) to the seventh bit (bit 7) of the bit flag string unit 30 are 1, the CPU 6 sets the sign of the control flag assigned to the bit to true. To be rewritten.

図5の説明に戻り、CPU6は、制御フラグの書込みが終了すると、結果を出力する(ステップS13)。   Returning to the description of FIG. 5, when the writing of the control flag is completed, the CPU 6 outputs the result (step S13).

[2.セキュリティ攻撃検出時における動作]
次に、異常検出の一例としてのセキュリティ攻撃検出時のICチップ1の動作について、図7を用いて説明する。
[2. Operation when a security attack is detected]
Next, the operation of the IC chip 1 when a security attack is detected as an example of abnormality detection will be described with reference to FIG.

図7は、セキュリティ攻撃検知時のICチップ1の動作を示すフローチャートである。   FIG. 7 is a flowchart showing the operation of the IC chip 1 when a security attack is detected.

ICチップ1は、通常処理中(例えば、ICカード8が商取引に用いられ決算処理が行われている間等)に、異常が発生しているか否かを検出するようになっている。   The IC chip 1 detects whether or not an abnormality has occurred during normal processing (for example, while the IC card 8 is used for commercial transactions and settlement processing is performed).

かかる異常の一例として、例えばICチップ1にセキュリティ攻撃が加えられる状態が挙げられる。   An example of such an abnormality is a state in which a security attack is applied to the IC chip 1, for example.

ICチップ1が、レーザ攻撃等のセキュリティ攻撃を受けると、CPU6のクロック周波数が急激に低下したり、ICチップ1に供給される電圧が急激に低下したり、又はEEPROM5等に記憶されるデータが書き換えられてしまう等の種々の現象が発生する。CPU6は、これらの現象を検出するようになっている。   When the IC chip 1 is subjected to a security attack such as a laser attack, the clock frequency of the CPU 6 rapidly decreases, the voltage supplied to the IC chip 1 decreases rapidly, or data stored in the EEPROM 5 or the like is stored. Various phenomena such as rewriting occur. The CPU 6 detects these phenomena.

上記通常処理中に異常を検出した場合には(ステップS20:YES)、CPU6は、上述したROM3の記憶領域に記憶されるプログラム11の処理振り分けモジュール11bの実行の下、アプリケーションプログラムに対応付けられた制御フラグ群を読み取り(ステップS21)、異常対応処理プログラムに対応する制御フラグの符号がtrueとなっている当該プログラムの所定の動作を実行する(ステップS22)。   If an abnormality is detected during the normal processing (step S20: YES), the CPU 6 is associated with the application program under the execution of the processing distribution module 11b of the program 11 stored in the storage area of the ROM 3 described above. The control flag group is read (step S21), and a predetermined operation of the program in which the sign of the control flag corresponding to the abnormality handling processing program is true is executed (step S22).

具体的には、例えば、制御フラグの符号が図6(b)に示すテーブルと同じであった場合を例に説明すると、上記異常を検知したCPU6は、異常対応処理プログラムに対応する制御フラグがtrue(1)である異常対応処理プログラムを実行する。   Specifically, for example, the case where the control flag code is the same as the table shown in FIG. 6B will be described as an example. The CPU 6 that has detected the abnormality has a control flag corresponding to the abnormality handling processing program. An abnormality handling program that is true (1) is executed.

さらに具体的には、図6(b)のテーブルにおいて、異常対応処理プログラムに対応する制御フラグがtrue(1)である異常対応処理プログラムは、当該プログラム画定義する動作が、「暗証番号の削除」(図6の制御フラグ割当部25)、「暗証番号の削除」(図6の制御フラグ割当部26)及び「攻撃を受けたことを示すエラーコードを返す」(図6の制御フラグ割当部27)を示すものである。   More specifically, in the table of FIG. 6 (b), the abnormality handling program whose control flag corresponding to the abnormality handling program is true (1) indicates that the operation for defining the program image is “deletion of password”. "(Control flag assigning unit 25 in FIG. 6)", "deletion of personal identification number" (control flag assigning unit 26 in FIG. 6) and "returning an error code indicating that an attack has been received" (control flag assigning unit in FIG. 6) 27).

従って、CPU6は、各異常対応処理プログラムの実行の下、「暗証番号の削除」、「暗証番号の削除」及び「攻撃を受けたことを示すエラーコードを返す」の各処理を実行するようになっている。   Accordingly, the CPU 6 executes the processes of “deletion of the password”, “deletion of the password”, and “returning an error code indicating that the attack has been received” under the execution of each abnormality handling program. It has become.

一方、上記通常処理中に異常を検出しなかった場合には(ステップS20:NO)、通常処理が終了するまで上記検出を行う(ステップS23:NO)。通常処理が終了した場合には(ステップS24:YES)、処理を終了する。   On the other hand, when no abnormality is detected during the normal process (step S20: NO), the detection is performed until the normal process is completed (step S23: NO). When the normal process is finished (step S24: YES), the process is finished.

[3.発行処理後のICチップ1の動作]
次に、発行処理後のICチップ1の動作について、図8及び図9を用いて説明する。
[3. Operation of IC chip 1 after issuing process]
Next, the operation of the IC chip 1 after the issuing process will be described with reference to FIGS.

ICカードの発行処理が終了し、当該ICカードの運用段階(例えば、ICカード8を用いて、ビジネス等が展開される段階等)において、上記制御フラグを書き換えること(異常対応処理プログラムが定義する動作を実行させるか否かを変更すること)は、セキュリティ性低下の虞がある。   When the IC card issuance process is completed and the IC card is operated (for example, when the business is developed using the IC card 8), the control flag is rewritten (defined by the abnormality handling program). Changing whether or not to execute the operation) may cause a decrease in security.

かかる書き換えによって、異常対応処理プログラムが定義する動作を全て実行させないとする書き換えも可能となり、セキュリティ対策の機能を全て無効にすることが可能になってしまう。   Such rewriting makes it possible to rewrite not to execute all the operations defined by the abnormality handling processing program, and to disable all security countermeasure functions.

上記問題点を防止するために、発行処理後は上記制御フラグの書き換えを禁止するようにすることもできる。   In order to prevent the above problem, rewriting of the control flag can be prohibited after the issuing process.

具体的は、例えば、アプリケーションプログラムに発行済み禁止フラグを設けるようにしてもよい。   Specifically, for example, an issued prohibition flag may be provided in the application program.

図8は、発行済み禁止フラグの機能概要を示す概要図である。   FIG. 8 is a schematic diagram showing a functional outline of the issued prohibition flag.

発行済みフラグ40は、例えばアプリケーションプログラム対応付けられる符号であり、発行処理が終了すると、CPU6等の指示により、発行済みフラグ40の符号を書き換えるようになっている。   The issued flag 40 is a code associated with, for example, an application program, and when the issuing process ends, the code of the issued flag 40 is rewritten by an instruction from the CPU 6 or the like.

意味15には、発行済みフラグの内容(定義)及び、上記書き換えられる符号の内容が示されている。具体的には、発行済みフラグの内容として当該フラグが発行済みかどうかを示すフラグであることが、上記書き換えられる符号の内容として、発行済みであった場合には符号としてtrue(1)に、発行済みでない場合には符号としてfalse(0)に夫々書き換えられることが示されている。   Meaning 15 indicates the content (definition) of the issued flag and the content of the rewritten code. Specifically, the flag indicating whether or not the flag has been issued as the content of the issued flag indicates that the content of the code to be rewritten is set to true (1) as a code if it has been issued. It is shown that the code can be rewritten to false (0) when not issued.

CPU6は、発行処理が終了すると上記符号をtrueへ書き換えるようになっている。   The CPU 6 rewrites the above code to true when the issuance process is completed.

そして、CPU6は、上記符号がtrueであった場合には、たとえ上記コマンドを受信しても、上記制御フラグの書き換えを禁止するようになっている。   When the code is true, the CPU 6 prohibits rewriting of the control flag even if the command is received.

次に、上記制御フラグの書き換えを禁止した後のICチップ1の動作を図9を用いて説明する。   Next, the operation of the IC chip 1 after prohibiting rewriting of the control flag will be described with reference to FIG.

図9は、上記制御フラグの書き換えを禁止した後のICチップ1の動作を示すフローチャートである。   FIG. 9 is a flowchart showing the operation of the IC chip 1 after prohibiting rewriting of the control flag.

なお、本動作では、発行処理と制御フラグ書き換えコマンドの受信を同時に行う場合について説明するが、本動作に限定されるものではない。   In this operation, the case where the issuance process and the control flag rewrite command are received simultaneously will be described. However, the operation is not limited to this operation.

ICチップ1が制御フラグ書き換えコマンドを受信すると(ステップS30)、CPU6は、発行済みフラグ40の符号を参照して、ICカード8が発行処理済みか否かを判断する(ステップS31)。   When the IC chip 1 receives the control flag rewrite command (step S30), the CPU 6 refers to the code of the issued flag 40 and determines whether or not the IC card 8 has been issued (step S31).

具体的には、CPU6は、上記発行済みフラグ40の符号を参照し、当該符号がtrueであった場合には発行済みと、当該符号がfalseであった場合には発行済みでないと判断する。   Specifically, the CPU 6 refers to the code of the issued flag 40, and determines that it has been issued when the code is true, and has not been issued when the code is false.

発行済みでないと判断した場合には(ステップS31:NO)、CPU6は、制御フラグ書き換えコマンドを解析し、制御フラグ書き換え処理の準備を行う。   If it is determined that it has not been issued (step S31: NO), the CPU 6 analyzes the control flag rewriting command and prepares for the control flag rewriting process.

そして、CPU6は上記ビットフラグ列に応じて、所定の動作と対応付けられている制御フラグの符号を書き換えを行う(ステップS32)。   Then, the CPU 6 rewrites the code of the control flag associated with the predetermined operation according to the bit flag string (step S32).

そして、発行済みフラグの符号をtrueにセットし(ステップS33)、結果を出力後(ステップS34)、処理を終了する。   Then, the sign of the issued flag is set to true (step S33), the result is output (step S34), and the process is terminated.

一方、発行済みであると判断した場合には(ステップS31:YES)、上記制御フラグの書込みは行わず、その旨を示す結果を出力する(ステップS34)。   On the other hand, if it is determined that it has been issued (step S31: YES), the control flag is not written, and a result indicating that is output (step S34).

上記実施形態では、発行処理後は上記制御フラグの書き換えを禁止するようにしたが、任意に上記制御フラグの書き換えを許可するようにしてもよい。   In the above embodiment, the rewriting of the control flag is prohibited after the issuing process. However, the rewriting of the control flag may be arbitrarily permitted.

具体的は、例えば、アプリケーションプログラムに書き換え可能フラグを設け、当該フラグが示す符号がtrueであった場合には常時上記制御フラグの書き換えを許可し、当該フラグが示す符号がfalseであった場合には上記制御フラグの書き換えを禁止するようにしてもよい。   Specifically, for example, when a rewritable flag is provided in the application program, when the code indicated by the flag is true, rewriting of the control flag is always permitted, and when the code indicated by the flag is false May prohibit the rewriting of the control flag.

CPU6は、上記符号がtrueであった場合には、上記コマンドを受信した場合には常に、上記制御フラグの書き換えを許可するようになっている。   When the code is true, the CPU 6 always permits rewriting of the control flag when the command is received.

このようにして、ユーザの使用環境に応じたセキュリティ対策を講じることが可能となる。   In this way, it is possible to take security measures according to the user's usage environment.

以上説明したように、本実施形態においては、異常が検出された場合に実行される異常対応処理プログラムであって、互いに処理内容が異なる複数の前記異常対応処理プログラムと、互いに異なる複数のアプリケーションプログラムが実行可能に記憶されており、外部から前記複数の異常対応処理プログラムの何れかを指定するための制御フラグ群が入力されると、前記制御フラグ群を各前記アプリケーションプログラム毎に対応付けて記憶し、異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記各アプリケーションプログラムに対応する前記制御フラグにより指定される前記異常対応処理プログラムを実行する。   As described above, in the present embodiment, an abnormality response processing program executed when an abnormality is detected, and a plurality of abnormality response processing programs having different processing contents and a plurality of application programs different from each other. Is stored in an executable manner, and when a control flag group for designating one of the plurality of abnormality handling processing programs is input from the outside, the control flag group is stored in association with each application program. When an abnormality is detected, the abnormality handling processing program designated by the control flag corresponding to each application program is executed among the plurality of abnormality handling processing programs.

従って、アプリケーション毎に異なるセキュリティ攻撃に対する防御方法を簡便な方法で設定することができ、ICチップに記憶されたソフトウェアの改変なしに様々なセキュリティ要求にさらに柔軟に対応することができる。また、例えば、マスクROM作成後もセキュリティレベルを自由に変更することができる。   Therefore, it is possible to set a defense method against a different security attack for each application by a simple method, and it is possible to respond more flexibly to various security requirements without modifying the software stored in the IC chip. Further, for example, the security level can be freely changed even after the mask ROM is created.

なお、上記実施形態においては、本願をICチップに対して適用した場合の例を示したが、その他にも例えば、パーソナルコンピュータ又は家庭用等の電子機器等に対しても適用可能である。   In the above embodiment, an example in which the present application is applied to an IC chip has been described. However, the present invention can be applied to, for example, a personal computer or an electronic device for home use.

1 ICチップ
2 I/Oインターフェース
3 ROM
4 RAM
5 EEPROM
6 CPU
7 カード基体
8 ICカード
1 IC chip 2 I / O interface 3 ROM
4 RAM
5 EEPROM
6 CPU
7 Card base 8 IC card

Claims (5)

異常が検出された場合に実行される異常対応処理プログラムであって、
互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶手段と、
外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力手段と、
前記制御情報を記憶する制御情報記憶手段と、
異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理手段と、
を備えることを特徴とするICチップ。
An abnormality handling program that is executed when an abnormality is detected,
Anomaly handling process program storage means for storing a plurality of the anomaly handling process programs whose processing contents are different from each other;
Input means for inputting control information for designating any one of the plurality of abnormality handling processing programs from outside;
Control information storage means for storing the control information;
When an abnormality is detected, among the plurality of abnormality handling processing programs, an abnormality handling processing means for executing the abnormality handling processing program specified by the control information;
An IC chip comprising:
請求項1に記載のICチップにおいて、
当該ICチップには互いに異なる複数のアプリケーションプログラムが実行可能に記憶されており、
前記制御情報は、各前記アプリケーションプログラム毎に対応付けられて記憶されるものであって、
前記異常対応処理手段は、異常が検出された場合に、前記各アプリケーションプログラムに対応する前記制御情報により指定される前記異常対応処理プログラムを実行することを特徴とするICチップ。
The IC chip according to claim 1,
A plurality of different application programs are stored in the IC chip so as to be executable,
The control information is stored in association with each application program,
The abnormality handling processing means executes the abnormality handling processing program designated by the control information corresponding to each application program when an abnormality is detected.
請求項1又は2の何れか一項に記載のICチップと、ICカード基体と、
を備えることを特徴とするICカード。
The IC chip according to any one of claims 1 and 2, an IC card substrate,
An IC card comprising:
異常が検出された場合に実行される異常対応処理プログラムであって、
互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶工程と、
外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力工程と、
前記制御情報を記憶する制御情報記憶工程と、
異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理工程と、
を有することを特徴とするICチップにおけるデータ保護方法。
An abnormality handling program that is executed when an abnormality is detected,
An abnormality handling process program storage step for storing a plurality of the anomaly handling process programs whose processing contents are different from each other;
An input step for inputting control information for designating any of the plurality of abnormality handling processing programs from outside;
A control information storage step for storing the control information;
When an abnormality is detected, among the plurality of abnormality response processing programs, an abnormality response processing step of executing the abnormality response processing program specified by the control information;
A data protection method for an IC chip, comprising:
異常が検出された場合に実行される異常対応処理プログラムであって、
互いに処理内容が異なる複数の前記異常対応処理プログラムを記憶する異常対応処理プログラム記憶手段を有するICチップに含まれるコンピュータを、
外部から前記複数の異常対応処理プログラムの何れかを指定するための制御情報を入力する入力手段、
前記制御情報を記憶する制御情報記憶手段、
異常が検出された場合に、前記複数の異常対応処理プログラムのうち、前記制御情報により指定される前記異常対応処理プログラムを実行する異常対応処理手段、
として機能させることを特徴とするデータ保護プログラム。
An abnormality handling program that is executed when an abnormality is detected,
A computer included in an IC chip having an abnormality handling processing program storage means for storing a plurality of the abnormality handling processing programs having different processing contents;
Input means for inputting control information for designating any of the plurality of abnormality handling programs from outside;
Control information storage means for storing the control information;
An abnormality response processing means for executing the abnormality response processing program designated by the control information among the plurality of abnormality response processing programs when an abnormality is detected;
Data protection program characterized by functioning as
JP2009095952A 2009-04-10 2009-04-10 IC chip and data protection method, etc. Active JP5332845B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009095952A JP5332845B2 (en) 2009-04-10 2009-04-10 IC chip and data protection method, etc.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009095952A JP5332845B2 (en) 2009-04-10 2009-04-10 IC chip and data protection method, etc.

Publications (2)

Publication Number Publication Date
JP2010250364A true JP2010250364A (en) 2010-11-04
JP5332845B2 JP5332845B2 (en) 2013-11-06

Family

ID=43312658

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009095952A Active JP5332845B2 (en) 2009-04-10 2009-04-10 IC chip and data protection method, etc.

Country Status (1)

Country Link
JP (1) JP5332845B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013097524A (en) * 2011-10-31 2013-05-20 Dainippon Printing Co Ltd Ic chip, data protection method, data protection program, ic card and recording medium
JP2020009305A (en) * 2018-07-11 2020-01-16 凸版印刷株式会社 IC chip, IC card and program
JP2020013249A (en) * 2018-07-17 2020-01-23 凸版印刷株式会社 IC chip and IC card
JP7463943B2 (en) 2020-11-09 2024-04-09 大日本印刷株式会社 Embedded Subscriber Identity Module

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076139A (en) * 1998-08-28 2000-03-14 Nippon Telegr & Teleph Corp <Ntt> Portable information storage medium
JP2001118042A (en) * 1999-10-19 2001-04-27 Hitachi Ltd Card monitoring method
JP2006040282A (en) * 2004-07-23 2006-02-09 Texas Instruments Inc System and method of identifying and preventing security violation within computer system
JP2009541825A (en) * 2006-06-21 2009-11-26 ヴィーブ−システムズ アクチエンゲゼルシャフト Method and apparatus for intrusion detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076139A (en) * 1998-08-28 2000-03-14 Nippon Telegr & Teleph Corp <Ntt> Portable information storage medium
JP2001118042A (en) * 1999-10-19 2001-04-27 Hitachi Ltd Card monitoring method
JP2006040282A (en) * 2004-07-23 2006-02-09 Texas Instruments Inc System and method of identifying and preventing security violation within computer system
JP2009541825A (en) * 2006-06-21 2009-11-26 ヴィーブ−システムズ アクチエンゲゼルシャフト Method and apparatus for intrusion detection

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013097524A (en) * 2011-10-31 2013-05-20 Dainippon Printing Co Ltd Ic chip, data protection method, data protection program, ic card and recording medium
JP2020009305A (en) * 2018-07-11 2020-01-16 凸版印刷株式会社 IC chip, IC card and program
JP2020013249A (en) * 2018-07-17 2020-01-23 凸版印刷株式会社 IC chip and IC card
JP7463943B2 (en) 2020-11-09 2024-04-09 大日本印刷株式会社 Embedded Subscriber Identity Module

Also Published As

Publication number Publication date
JP5332845B2 (en) 2013-11-06

Similar Documents

Publication Publication Date Title
US11113384B2 (en) Stack overflow protection by monitoring addresses of a stack of multi-bit protection codes
US7814396B2 (en) Apparatus and method for checking an error recognition functionality of a memory circuit
US20090204749A1 (en) Redimdamt purge for flash storage device
JP5041980B2 (en) Data processing circuit and communication portable terminal device
JP5332845B2 (en) IC chip and data protection method, etc.
US20130055025A1 (en) Microprocessor protected against memory dump
US20060289656A1 (en) Portable electronic apparatus and data output method therefor
JP2018169694A (en) Security device having tamper resistance against failure utilization attack
JP4489915B2 (en) Portable information processing device with password verification function
JP2003208586A (en) Method and device for controlling access to eeprom, corresponding computer software product, and corresponding computer-readable storage medium
EP1079340A2 (en) Integrated circuit card protected from unauthorized access
JP6396119B2 (en) IC module, IC card, and IC card manufacturing method
JP2007193550A (en) Microcontroller, its authentication method and authentication program
JP2005292959A (en) Nonvolatile memory module and nonvolatile memory system
JP2007011929A (en) Method of updating data of nonvolatile memory, controller, and data updating program
JP5998452B2 (en) IC chip, IC card, information processing method, information processing program, and computer-readable recording medium recording the information processing program
US20150101051A1 (en) Method and device for the performance of a function by a microcircuit
JP6828548B2 (en) Electronic information storage medium, IC card, tampering check method and tampering check program
JP6439408B2 (en) IC card with display function and control method
JP6160326B2 (en) Information storage medium, information writing method, and writing program
CN117034325B (en) Flash data content encryption method, device, equipment and storage medium
JP7322923B2 (en) Secure element, transaction control method and device
US20230359523A1 (en) Memory integrity check
JP2008152452A (en) Portable electronic device, control method for portable electronic device, and ic card
KR20100068469A (en) Semiconductor memory device and method for controlling the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130306

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130312

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130509

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130702

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130715

R150 Certificate of patent or registration of utility model

Ref document number: 5332845

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150