JP2020112855A - IC chip and IC card - Google Patents

IC chip and IC card Download PDF

Info

Publication number
JP2020112855A
JP2020112855A JP2019001109A JP2019001109A JP2020112855A JP 2020112855 A JP2020112855 A JP 2020112855A JP 2019001109 A JP2019001109 A JP 2019001109A JP 2019001109 A JP2019001109 A JP 2019001109A JP 2020112855 A JP2020112855 A JP 2020112855A
Authority
JP
Japan
Prior art keywords
file
data
chip
card
rollback
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2019001109A
Other languages
Japanese (ja)
Inventor
大石 浩
Hiroshi Oishi
浩 大石
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.)
Toppan Inc
Original Assignee
Toppan 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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2019001109A priority Critical patent/JP2020112855A/en
Publication of JP2020112855A publication Critical patent/JP2020112855A/en
Pending legal-status Critical Current

Links

Images

Abstract

To prevent memory deterioration in an evacuation area caused by an increase in the number of times of memory-rewriting of an IC card.SOLUTION: An IC card has: means for evacuating and storing original data of a file in an evacuation area of a nonvolatile memory before writing data received from an IC module access device in the file of the nonvolatile memory; and means for writing back the original data stored in the evacuation area to the file. Rollback possible/impossible identification information which stores whether to make the file into an object for evacuating to the evacuation area of the nonvolatile memory is stored in file management information on the file.SELECTED DRAWING: Figure 2

Description

本発明は、ICチップが実装されたICカードに関し、ICチップに対するデータの書き込みを保証した高セキュリティモジュールのICチップ及びICカードに関する。 The present invention relates to an IC card on which an IC chip is mounted, and to an IC chip and an IC card of a high security module that guarantees writing of data to the IC chip.

近年、ICカードがマイナンバーカードやパスポート、クレジットカード等で利用されている。ICカードは自身では電源を持たず、リーダ/ライタ(R/W)等のICモジュールアクセス装置がICカードへ電力を供給してICカードを動作させる。ICカードが接触型ICカードの場合は、ICカードがICモジュールアクセス装置の電源に直接に接続されて電源を共有して電源を得る。ICカードが非接触型ICカードの場合は、ICカードはICモジュールアクセス装置が発生する電磁界を元にして、ICカードのアンテナで、その電磁界の電磁誘導による起電力によって電源を得る。 In recent years, IC cards have been used as my number cards, passports, credit cards and the like. The IC card does not have its own power source, and an IC module access device such as a reader/writer (R/W) supplies power to the IC card to operate the IC card. When the IC card is a contact type IC card, the IC card is directly connected to the power source of the IC module access device to share the power source and obtain the power source. When the IC card is a non-contact type IC card, the IC card uses an electromagnetic field generated by the IC module access device, and an antenna of the IC card obtains a power source by electromotive force due to electromagnetic induction of the electromagnetic field.

ICカードのICチップには不揮発性メモリが搭載され、その不揮発性メモリに様々なデータを保持できる仕組みになっている。ICチップの不揮発性メモリへデータを書き込みまたは書き換えする場合に、例えば以下のような事象が想定される。(以後、書き込み(初期書き込み)、書き換え(データ更新) は区別せず“書き込み”と表現する) A non-volatile memory is mounted on the IC chip of the IC card, and various data can be held in the non-volatile memory. When writing or rewriting data to the non-volatile memory of the IC chip, for example, the following events are assumed. (Hereinafter, writing (initial writing) and rewriting (data updating) are not distinguished and expressed as "writing".)

(1)書き込み途中の引き抜き。
(2)書き込み途中の電源遮断。
(3)書き込み途中の誤動作。
(1) Pulling out during writing.
(2) Power shutdown during writing.
(3) Malfunction during writing.

これらの事象が発生して、書込み処理中にICカードに供給される電流が低下及び/または遮断される場合、書込み処理が完了せず、書込み対象となる不揮発性メモリへの想定した書き込みが正しく実施されず、データが不定な状態となる場合がある。 If these events occur and the current supplied to the IC card drops and/or is interrupted during the writing process, the writing process is not completed and the intended writing to the non-volatile memory to be written is correct. It may not be implemented and the data may be in an indeterminate state.

そのため、従来は、特許文献1の様に、ICカードは、ICモジュールアクセス装置から不揮発性メモリへ書き込むデータを受信した場合に、そのデータをICカードの指定されたファイルに書き込む処理を開始するまでに、そのICカードのファイルの元データをICカードの不揮発性メモリの退避領域に退避させて記憶する処理を行う。 Therefore, conventionally, when the IC card receives the data to be written to the nonvolatile memory from the IC module access device, as in Patent Document 1, until the process of writing the data to the specified file of the IC card is started. First, the processing of storing the original data of the file of the IC card by saving it in the saving area of the non-volatile memory of the IC card is stored.

そして、ICカードは、ICモジュールアクセス装置から受信したデータを、指定されたファイルに書き込む処理を実行する。その処理の際に、もし書き込みが途中で中断した場合には、次回のICカードの起動時等に、退避領域に退避させておいたデータを元のファイルの領域に書き戻すことで、中断時のエラーを復旧させる。 Then, the IC card executes a process of writing the data received from the IC module access device into the designated file. If the writing is interrupted during the process, the data saved in the save area is written back to the original file area when the IC card is started next time. Recover the error.

特開平10−187549号公報JP, 10-187549, A

こうして、従来の技術では、データを書き込みファイルの元データを一旦退避することにより、書き込み前後でデータの完全性を担保するが、全てのファイルに対して、データの書き込み処理の際に、データが書き込まれるファイルの元データを退避することにより以下のデメリットがある。
(1)メモリ書き換え回数の増加による退避領域のメモリ劣化。
(2)退避処理及び復旧処理に関わる処理時間の増加。
Thus, in the conventional technique, the data integrity is secured before and after writing by temporarily saving the original data of the file to be written, but the data is not written to all files during the data writing process. Saving the original data of the file to be written has the following disadvantages.
(1) Memory deterioration in the save area due to an increase in the number of memory rewrites.
(2) Increase in processing time related to save processing and restoration processing.

そのため、本発明の課題は、データが書き込まれるファイルの元データを退避させるファイルの他に、元データを退避させないファイルを定めて上記の問題を解決したICカード及び高セキュリティモジュールのICチップを提供することにある。 Therefore, an object of the present invention is to provide an IC card and an IC chip of a high security module that solves the above problems by defining a file that does not save the original data in addition to a file that saves the original data of the file to which the data is written. To do.

本発明は、上記課題を解決するために、ICモジュールアクセス装置とデータ交換を行う通信手段と、ファイルを記憶する不揮発性メモリを具備するICカードであって、
前記ICモジュールアクセス装置から受信したデータを前記不揮発性メモリの前記ファイルに書込む前に前記ファイルの元データを前記不揮発性メモリの退避領域に退避して記憶する手段と、前記退避領域に記憶されている前記元データを前記ファイルに書き戻す手段を有し、前記ファイルのファイル管理情報に、前記ファイルを前記不揮発性メモリの退避領域に退避する対象にするか否かを記憶したロールバック可否識別情報を記憶したことを特徴とするICカードである。
In order to solve the above problems, the present invention provides an IC card comprising a communication means for exchanging data with an IC module access device and a non-volatile memory for storing files,
Means for saving the original data of the file by saving it in the save area of the non-volatile memory before writing the data received from the IC module access device to the file of the non-volatile memory; A rollback possibility identification storing means for writing back the original data to the file, and storing in the file management information of the file whether or not the file is to be saved in the save area of the nonvolatile memory. It is an IC card characterized by storing information.

本発明は、この構成により、ICカードのファイル創成(発行)時に、ファイルの発行者が、そのファイルを退避処理の対象とするか否かを自由に設定できる効果がある。 With this configuration, the present invention has an effect that, when creating (issuing) a file of an IC card, the issuer of the file can freely set whether or not to target the file for the save process.

また、本発明は、上記のICカードであって、前記ファイルのファイル管理情報に、前記不揮発性メモリの前記退避領域に記憶されている前記元データを前記ファイルに書き戻す処理のタイミングを、リセット時の処理、又は、それ以外のタイミングでの処理を指定して記憶したことを特徴とするICカードである。 Further, the present invention is the above IC card, wherein the file management information of the file resets the timing of the process of writing back the original data stored in the save area of the nonvolatile memory to the file. The IC card is characterized in that time processing or processing at other timing is designated and stored.

また、本発明は、高セキュリティモジュール用のICチップであって、
ICモジュールアクセス装置とデータ交換を行う通信手段と、ファイルを記憶する不揮発性メモリを具備し、前記ICモジュールアクセス装置から受信したデータを前記不揮発性メモリの前記ファイルに書込む前に前記ファイルの元データを前記不揮発性メモリの退避領域に退避して記憶する手段と、前記退避領域に記憶されている前記元データを前記ファイルに書き戻す手段を有し、前記ファイルのファイル管理情報に、前記ファイルを前記不揮発性メモリの退避領域に退避する対象にするか否かを記憶したロールバック可否識別情報を記憶したことを特徴とするICチップである。
The present invention also provides an IC chip for a high security module,
A communication means for exchanging data with the IC module access device, and a non-volatile memory for storing a file are provided, and the source of the file is written before the data received from the IC module access device is written in the file of the non-volatile memory. The file management information of the file, the file having the means for storing the data in the save area of the non-volatile memory and storing the data, and the means for writing the original data stored in the save area back to the file. Is an IC chip in which rollback availability identification information that stores whether or not to be saved in the save area of the non-volatile memory is stored.

また、本発明は、上記のICチップであって、前記ファイルのファイル管理情報に、前記不揮発性メモリの前記退避領域に記憶されている前記元データを前記ファイルに書き戻す処理のタイミングを、リセット時の処理、又は、それ以外のタイミングでの処理を指定して記憶したことを特徴とするICチップである。 Further, the present invention is the above IC chip, wherein the file management information of the file resets a timing of a process of writing back the original data stored in the save area of the nonvolatile memory to the file. The IC chip is characterized in that time processing or processing at other timing is designated and stored.

本発明によれば、ICカードのファイル創成(発行)時に、ファイルの発行者が、そのファイルを退避処理の対象とするか否かを自由に設定できる効果がある。そして、それにより、退避処理が不要なファイルには、ファイルへのデータの書き込みの際に不要な退避処理を行わないようにできる、データの退避処理によるメモリへの負担軽減及び処理時間を低減できる効果がある。 According to the present invention, at the time of creating (issuing) a file of an IC card, there is an effect that the issuer of the file can freely set whether or not the file is the target of the save processing. As a result, for files that do not require save processing, unnecessary save processing can be prevented when writing data to the file, and the load on the memory and the processing time due to save data can be reduced. effective.

また、本発明は、ファイル管理情報に、退避した元データをファイルに書き戻す処理のタイミングを、リセット時に処理する場合と、それ以外のタイミングでの処理を指定して記憶する。それにより、ICカードのリセットの際にICカードがファイルの復旧に時間をかけずに、時間的に余裕を持って規定された時間内にICモジュールアクセス装置に応答できる効果がある。 Further, according to the present invention, the timing of the process of writing back the saved original data to the file is stored in the file management information by designating the process at the time of resetting and the process at other timings. As a result, when the IC card is reset, the IC card can respond to the IC module access device within a prescribed time with a sufficient time, without spending time to recover the file.

本発明の実施形態のシステム構成を示すブロック図である。It is a block diagram which shows the system configuration|structure of embodiment of this invention. 本発明の実施形態のICカードの概略構成を示すブロック図である。It is a block diagram showing a schematic structure of an IC card of an embodiment of the present invention. 本発明の実施形態のICチップのファイル管理情報FCLと退避管理情報RLCLのデータの構造を示すブロック図である。FIG. 6 is a block diagram showing a data structure of file management information FCL and save management information RLCL of the IC chip according to the embodiment of the present invention. 本発明の実施形態のICチップのファイルへのデータ書き込み処理の際にファイルの元データを退避させる処理のデータの流れを示すブロック図である。FIG. 9 is a block diagram showing a data flow of a process of saving original data of a file when writing data to the file of the IC chip according to the embodiment of the present invention. 本発明の実施形態のICチップのファイルの元データを復旧させる処理のデータの流れを示すブロック図である。It is a block diagram which shows the data flow of the process which restores the original data of the file of the IC chip of embodiment of this invention. 本発明の実施形態のICチップへのデータの書き込み処理の主要な処理手順を示すフローチャートである。6 is a flowchart showing a main processing procedure of data writing processing to the IC chip according to the embodiment of the present invention. 本発明の実施形態のICチップへのデータの書き込み処理におけるデータ書込処理の手順を示すフローチャートである。6 is a flowchart showing a procedure of a data writing process in the data writing process to the IC chip according to the embodiment of the present invention. 本発明の実施形態のICチップへのデータの書き込み処理におけるリセット処理の手順を示すフローチャートである。6 is a flowchart showing a procedure of a reset process in the process of writing data to the IC chip according to the embodiment of the present invention. 本発明の実施形態のICチップへのデータの書き込み処理におけるコマンド処理の手順を示すフローチャートである。6 is a flowchart showing a procedure of command processing in the processing of writing data to the IC chip according to the embodiment of the present invention.

<第1の実施形態>
以下、本発明の第1の実施形態に係るICカード100へのデータ書込みシステムについて図1から図9を参照して説明する。
<First Embodiment>
Hereinafter, a data writing system to the IC card 100 according to the first embodiment of the present invention will be described with reference to FIGS. 1 to 9.

図1に示すように、本実施形態のICカード100へのデータ書込みシステムは、リーダ/ライタ(R/W)等のICモジュールアクセス装置200と情報を交換するICカード100で構成する。 As shown in FIG. 1, the data writing system to the IC card 100 according to the present embodiment is configured by an IC card 100 that exchanges information with an IC module access device 200 such as a reader/writer (R/W).

(ICカード100の構成)
図2のブロック図に、本発明の実施形態のICカード100の概略構成を示す。ICカード100は、アンテナコイル1と高セキュリティモジュールである集積回路のICチップ10を有する。
(Structure of IC card 100)
The block diagram of FIG. 2 shows a schematic configuration of the IC card 100 according to the embodiment of the present invention. The IC card 100 has an antenna coil 1 and an IC chip 10 of an integrated circuit which is a high security module.

図2のブロック図に示すように、本実施形態のICカード100は、当該カードの面上に、ICモジュールアクセス装置200に備えられた端子と直接接続して通信する接触端子、又は、アンテナコイル1による非接触でICモジュールアクセス装置200と通信する通信手段11を有する。ICカード100は、接触端子とアンテナコイル1の両方を備えることもできる。 As shown in the block diagram of FIG. 2, the IC card 100 of the present embodiment has a contact terminal or an antenna coil on the surface of the IC card which is directly connected to a terminal provided in the IC module access device 200 for communication. 1 has a communication means 11 for communicating with the IC module access device 200 in a contactless manner. The IC card 100 may include both the contact terminal and the antenna coil 1.

(ICチップ10)
ICカード100用の高セキュリティモジュールのICチップ10には、ICモジュールアクセス装置200から接触端子を通じて直接に電力を供給されるか、又は、ICモジュールアクセス装置200のリーダ/ライタの電磁界からICカード100のアンテナコイル1を介して電力を供給されて、電源15が充電される。
(IC chip 10)
Power is supplied to the IC chip 10 of the high security module for the IC card 100 directly from the IC module access device 200 through the contact terminals, or from the electromagnetic field of the reader/writer of the IC module access device 200. Power is supplied through the antenna coil 1 of 100 to charge the power supply 15.

ICチップ10には、通信手段11と、ICチップ10全体の制御を行うマイクロプロセッサ等の制御手段12と、記憶手段13と、電源15を有する。ICカード100のアンテナコイル1をICチップ10の通信手段11に接続する。そして、ICチップ10の通信手段11が、ICモジュールアクセス装置200から通信データを受け取り、また、電力を受電し電源15を充電する。 The IC chip 10 includes a communication unit 11, a control unit 12 such as a microprocessor for controlling the entire IC chip 10, a storage unit 13, and a power supply 15. The antenna coil 1 of the IC card 100 is connected to the communication means 11 of the IC chip 10. Then, the communication means 11 of the IC chip 10 receives the communication data from the IC module access device 200, receives the power, and charges the power supply 15.

(ICチップ10の記憶手段13)
図2のブロック図の様に、ICチップ10の記憶手段13は、ブートプログラムや各種固定データが記憶された固定記憶手段ROMと、各種データを一時的に記憶する揮発性メモリRAMと、データの読出し及び書込みが可能な不揮発性メモリを備えて構成する。不揮発性メモリには、フラッシュメモリやEEPROM(Electrically Erasable and Programmable ROM)等を用いる事ができる。
(Memory means 13 of IC chip 10)
As shown in the block diagram of FIG. 2, the storage unit 13 of the IC chip 10 includes a fixed storage unit ROM in which a boot program and various fixed data are stored, a volatile memory RAM for temporarily storing various data, and a data storage unit. It is configured with a readable and writable non-volatile memory. A flash memory, an EEPROM (Electrically Erasable and Programmable ROM), or the like can be used as the non-volatile memory.

記憶手段13の固定記憶手段ROM及び不揮発性メモリに、図2の様に、プログラム手段13a、ファイル管理情報領域13b及びファイル実体領域13c、ロールバック制御情報領域13d及び退避領域13eを設ける。 As shown in FIG. 2, the fixed storage means ROM and the non-volatile memory of the storage means 13 are provided with a program means 13a, a file management information area 13b, a file entity area 13c, a rollback control information area 13d and a save area 13e.

(プログラム手段13a)
プログラム手段13aは、固定記憶手段ROM等で構成し、カードOS(Operating System)等のプログラムを記憶し、また、各種設定情報などをはじめとするシステム情報を記憶させる。カードOSには、カードマネージャ14のプログラムを記憶し、また、ファイルのデータを復旧する復旧手段14aのプログラムを記憶する。
(Program means 13a)
The program means 13a is constituted by a fixed storage means ROM or the like, stores programs such as a card OS (Operating System), and also stores system information such as various setting information. The card OS stores the program of the card manager 14 and also stores the program of the recovery means 14a for recovering file data.

(ファイル管理情報領域13b)
ファイル管理情報領域13bにファイル管理情報FCLを記憶し、ファイル管理情報FCLによって、ICチップ10のファイル実体領域13cに記憶されるデータをファイル単位で管理する。
(File management information area 13b)
The file management information FCL is stored in the file management information area 13b, and the data stored in the file entity area 13c of the IC chip 10 is managed in file units by the file management information FCL.

(ファイル管理情報FCL)
ファイル管理情報FCLには、ファイル識別子、ファイルが置かれるファイル構造上の位置(ディレクトリ)の情報などを持つ。ファイル管理情報FCLには、図3(a)の様なファイルタイプ欄F−1と、ファイル権限欄F−2と、ファイルサイズ欄F−3と、ファイルアドレス欄F−4と、ロールバック可否識別情報欄F−5とロールバック実施タイミング欄F−6を設ける。
(File management information FCL)
The file management information FCL has information such as a file identifier and a position (directory) in the file structure where the file is placed. The file management information FCL includes a file type column F-1, a file authority column F-2, a file size column F-3, a file address column F-4, and rollback permission/prohibition as shown in FIG. An identification information section F-5 and a rollback execution timing section F-6 are provided.

ファイルタイプ欄F−1には、ファイルがDFであるかWEFであるかIEFであるかのファイルの種別情報を記憶する。ファイル権限欄F−2には、ファイルの読み・書き・更新の権限情報を記憶する。ファイルサイズ欄F−3には、ファイルのデータの大きさの情報を記憶する。ファイルアドレス欄F−4には、ファイルが記憶される先頭のアドレス(例えば、クラスタ番号)等にファイルの実体領域のアドレス情報を記憶する。 The file type column F-1 stores file type information indicating whether the file is DF, WEF, or IEF. The file authority column F-2 stores authority information for reading/writing/updating a file. The file size field F-3 stores information on the size of the file data. In the file address column F-4, address information of the actual area of the file is stored at the top address (for example, cluster number) where the file is stored.

ロールバック可否識別情報欄F−5には、そのファイルのデータをロールバック対象とするか否かの情報を示すフラグを記憶する。ロールバック実施タイミング欄F−6には、そのファイルのデータをロールバックするタイミングの種別の情報を記憶する。ロールバックするタイミングの種別の情報は、リセット時にロールバックするか、それ以外のタイミングでの処理を指定してロールバックするタイミングを定めた情報である。 The rollback availability identification information field F-5 stores a flag indicating information on whether or not the data of the file is to be rolled back. The rollback execution timing column F-6 stores information on the type of timing for rolling back the data of the file. The information on the type of rollback timing is information that determines the rollback timing at the time of rollback at the time of resetting or by specifying processing at other timing.

本発明は、ファイル管理情報FCLに、ロールバック可否識別情報欄F−5を設けて、ファイル毎に、そのファイルの記憶するデータをロールバック対象とするか否かを区別することで、このICチップ10のファイル創成(発行)時に、ファイルの発行者が、そのファイルを退避処理の対象とするか否かを自由に設定できる効果がある。 According to the present invention, the file management information FCL is provided with the rollback permission/inhibition identification information column F-5, and whether or not the data stored in the file is to be rolled back is distinguished for each IC. At the time of creating (issuing) the file of the chip 10, there is an effect that the issuer of the file can freely set whether or not to subject the file to the save processing.

それにより、退避処理が不要なファイルには、ファイルへのデータの書き込みの際に不要な退避処理を行わないようにできる、データの退避処理によるメモリへの負担軽減及び処理時間を低減できる効果がある。 As a result, for files that do not require save processing, unnecessary save processing can be prevented when data is written to the file, and the effect of reducing the load on the memory and processing time due to the save processing of data can be achieved. is there.

本発明は、ファイル管理情報FCLに1−6:ロールバック実施タイミング欄F−6を設ける。それにより、退避したデータをファイルにロールバックしてファイルを復旧するタイミングを、リセット時にロールバックするか、それ以外のタイミングでロールバックするかを自由に設定できる。 According to the present invention, the file management information FCL is provided with 1-6: rollback execution timing column F-6. As a result, the timing for rolling back the saved data to the file and restoring the file can be freely set to rollback at reset or at any other timing.

これにより、退避したデータでファイルを復旧させるタイミングを自由に設定できる効果がある。それにより、ICチップ10のリセットの際にICチップ10がファイルの復旧に時間をかけずに、時間的に余裕を持ってISO7816等で規定された時間内にICモジュールアクセス装置200に応答できる。そのため、処理時間等の規格に関する制約に対してICチップ10が余裕を持った時間で処理できる様になる効果がある。 As a result, there is an effect that it is possible to freely set the timing for restoring the file with the saved data. As a result, when the IC chip 10 is reset, the IC chip 10 can respond to the IC module access device 200 within a time defined by ISO7816 or the like with a sufficient time, without taking time to recover the file. Therefore, there is an effect that the IC chip 10 can perform processing in a time with a margin with respect to restrictions on processing time and other standards.

(ロールバック制御情報領域13d)
ロールバック制御情報領域13dには、退避管理情報RLCLを記憶する。退避管理情報RLCLは、ICモジュールアクセス装置200から、ICチップ10のファイル実体領域13cのファイルにデータが書き込まれる際に、ファイル実体領域13cのファイルの元データを退避領域13eへ退避して記憶する処理を制御する。
(Rollback control information area 13d)
The rollback control information area 13d stores the save management information RLCL. The save management information RLCL saves the original data of the file in the file physical area 13c in the save area 13e when the data is written from the IC module access device 200 to the file in the file physical area 13c of the IC chip 10. Control the process.

(退避管理情報RLCL)
退避管理情報RLCLは、図3(b)の様に構成し、ロールバックデータ有無識別情報欄R−1と、ロールバックファイルアドレス欄R−2と、ロールバック実施タイミング欄R−3を設ける。
(Evacuation management information RLCL)
The save management information RLCL is configured as shown in FIG. 3B, and is provided with a rollback data presence/absence identifying information column R-1, a rollback file address column R-2, and a rollback execution timing column R-3.

ロールバックデータ有無識別情報欄R−1には、退避領域13eへ退避されたデータが有効か無効かの識別情報を示すフラグを記憶する。ロールバックファイルアドレス欄R−2には、ロールバック元のアドレスを記憶する。ロールバック実施タイミング欄R−3には、ロールバックをいつ行うかの、即ち、リセット時にロールバックするか、最初にコマンドを受信した時にロールバックするかを定めた情報を記憶する。 The rollback data presence/absence identification information field R-1 stores a flag indicating identification information indicating whether the data saved in the save area 13e is valid or invalid. The rollback file address column R-2 stores the rollback source address. The rollback execution timing column R-3 stores information that defines when rollback should be performed, that is, whether rollback should be performed at reset or when a command is first received.

(退避領域13e)
退避領域13eには、図1のICモジュールアクセス装置200がICカード100のICチップ10のファイル実体領域13cのファイルを書き換える際に、あるいは、プログラム手段13aのプログラムファイルを書き換える際に、その、書き換えるファイルの元データを退避領域13eに退避させてロールバック用に記憶させる。
(Evacuation area 13e)
The save area 13e is rewritten when the IC module access device 200 of FIG. 1 rewrites a file in the file entity area 13c of the IC chip 10 of the IC card 100 or when rewriting the program file of the program means 13a. The original data of the file is saved in the save area 13e and stored for rollback.

例えば、ICモジュールアクセス装置200が、ICチップ10のファイル実体領域13cの作業基礎ファイルWEFや内部基礎ファイルIEFや専用ファイルDFのデータを書き換える際に、その、書き換えるファイルの元データを退避領域13eに退避させてロールバック用に記憶させる。 For example, when the IC module access device 200 rewrites the data of the work basic file WEF, the internal basic file IEF, or the dedicated file DF of the file substance area 13c of the IC chip 10, the original data of the file to be rewritten is saved in the save area 13e. Evacuate and store for rollback.

(ファイル実体領域13c)
ファイル実体領域13cは、アプリケーションが使用するユーザデータを記憶する領域である。
(File entity area 13c)
The file entity area 13c is an area for storing user data used by the application.

(専用ファイルDFの階層構造)
図2のように、ファイル実体領域13cには、主ファイルMF(Master File)の下に階層構造で接続する専用ファイルDF(Dedicated File)を記憶する。専用ファイルDFは、下位のファイルをグループ化するためのファイルであり、専用ファイルDFの配下に基礎ファイルEF(Elementary File)や他の専用ファイルDFを記憶する。
(Hierarchical structure of dedicated file DF)
As shown in FIG. 2, the file entity area 13c stores a dedicated file DF (Dedicated File) connected in a hierarchical structure below the main file MF (Master File). The dedicated file DF is a file for grouping subordinate files, and stores a basic file EF (Elementary File) and other dedicated files DF under the dedicated file DF.

(基礎ファイルEF)
専用ファイルDFの配下に作成する基礎ファイルEFはデータを格納するファイルであり、IEF(Internal Elementary File:内部基礎ファイル)とWEF(作業基礎ファイル)との2つの種別に分けられる。
(Basic file EF)
The basic file EF created under the dedicated file DF is a file that stores data, and is divided into two types: IEF (Internal Elementary File) and WEF (work basic file).

(作業基礎ファイルWEF)
作業基礎ファイルWEFは、ICチップ10から外部への出力が可能なファイルである。作業基礎ファイルWEFには、ICチップ10の個別ファイルを記憶する。
(Basic work file WEF)
The work basic file WEF is a file that can be output from the IC chip 10 to the outside. An individual file of the IC chip 10 is stored in the work basic file WEF.

(内部基礎ファイルIEF)
ICチップ10の内部基礎ファイルIEFは、セキュリティ上、ICモジュールアクセス装置200から読出しができないファイルであり、ICチップ10内においてのみ使用される。
(Internal basic file IEF)
The internal basic file IEF of the IC chip 10 is a file that cannot be read from the IC module access device 200 for security reasons, and is used only in the IC chip 10.

内部基礎ファイルIEFは、ICモジュールアクセス装置200がICチップ10の作業基礎ファイルWEF内の個別ファイルを読み出すアクセス権を認証するためのセキュア通信用鍵情報や認証用鍵情報等の鍵情報を記憶し、その鍵情報を割り付けるキー区分を記憶する。 The internal basic file IEF stores key information such as secure communication key information and authentication key information for authenticating the access right for the IC module access device 200 to read the individual file in the work basic file WEF of the IC chip 10. , The key category to which the key information is assigned is stored.

(復旧手段14a)
ICモジュールアクセス装置200がICカード100のICチップ10のファイル実体領域13cにデータを書き込む書込み処理中に、電源電圧低下、電源電圧再投入等によって、データの書込み処理に失敗する場合がある。その場合に、ICチップ10のカードOSの機能の一つである復旧手段14aが、退避領域13eに格納されている元データをロールバックするデータの書き戻し処理によって元データを復元する。
(Recovery means 14a)
While the IC module access device 200 is in the process of writing data in the file physical area 13c of the IC chip 10 of the IC card 100, the data writing process may fail due to a decrease in power supply voltage, re-supply of power supply voltage, or the like. In that case, the recovery unit 14a, which is one of the functions of the card OS of the IC chip 10, restores the original data by a data write-back process of rolling back the original data stored in the save area 13e.

(データ書込処理)
復旧手段14aの行う処理によるデータの流れを図4と図5のブロック図に示す。すなわち、復旧手段14aは、図4の様に、ICチップ10のファイルへのデータ書込処理において、ステップS4で、作業基礎ファイルWEFに書き込むべきデータを一時的に揮発性メモリRAMで記憶する。そして、ステップS6で、作業基礎ファイルWEFの元データを退避領域13eに退避させて記憶する。そうしてファイルの元データを記憶させて退避させた後に、ステップS8で、一時的に揮発性メモリRAMで記憶していた書込み用の新データを作業基礎ファイルWEFに書き込む。
(Data writing process)
The flow of data by the processing performed by the recovery means 14a is shown in the block diagrams of FIGS. That is, as shown in FIG. 4, the recovery means 14a temporarily stores the data to be written in the work basic file WEF in the volatile memory RAM in step S4 in the data writing process to the file of the IC chip 10. Then, in step S6, the original data of the work basic file WEF is saved and stored in the save area 13e. Then, after the original data of the file is stored and saved, in step S8, the new data for writing temporarily stored in the volatile memory RAM is written to the work basic file WEF.

(ロールバック処理)
その作業基礎ファイルWEFへのデータの書込処理が正常に完了した場合は、データを復旧する必要は無い。しかし、データの書込処理が正常に完了せず中断した場合は、図5の様に、復旧手段14aが、リセット処理の際に、又は、コマンド処理の際に、ステップS12又はステップS22で、退避領域13eに退避させていた元データを作業基礎ファイルWEFに書き戻すロールバック処理を行い作業基礎ファイルWEFのデータを復旧する。
(Rollback processing)
When the process of writing the data to the work basic file WEF is completed normally, there is no need to restore the data. However, when the data writing process is not normally completed and is interrupted, as shown in FIG. 5, the restoring unit 14a performs the reset process or the command process in step S12 or step S22. Rollback processing is performed in which the original data saved in the save area 13e is written back to the work basic file WEF to restore the data of the work basic file WEF.

(ICチップ10へのデータ書込み処理手順)
以下で、図6のフローチャートと、図7から図9の個別機能の処理手順のフローチャートを参照して、ICモジュールアクセス装置200がICカード100のICチップ10にデータを書き込む処理と、データの書込み処理に失敗した場合に、ICチップ10が復旧手段14aを用いて退避領域13eに格納されている元データを復元する処理の手順を説明する。
(Processing procedure for writing data to the IC chip 10)
Hereinafter, with reference to the flowchart of FIG. 6 and the flowcharts of the processing procedures of the individual functions of FIGS. 7 to 9, the processing in which the IC module access device 200 writes data in the IC chip 10 of the IC card 100, and the writing of data A procedure of processing in which the IC chip 10 restores the original data stored in the save area 13e using the recovery means 14a when the processing fails will be described.

(ステップS1)ICチップ10へ電源供給
ICモジュールアクセス装置200からICカード100のICチップ10に電源電圧を供給する。
(Step S1) Power Supply to IC Chip 10 The power supply voltage is supplied from the IC module access device 200 to the IC chip 10 of the IC card 100.

非接触型ICカードの場合は、ICモジュールアクセス装置200のアンテナからICカード100のアンテナに電磁誘導によって電圧が誘起され、それによりICカード100のICチップ10が受電し、電源15に電力が充電される。電源15の電源電圧が動作しきい値以上になると、ICチップ10の電源制御部から制御手段12にリセット信号が出力され、これにより制御手段12はリセットされる。 In the case of a non-contact type IC card, a voltage is induced by electromagnetic induction from the antenna of the IC module access device 200 to the antenna of the IC card 100, whereby the IC chip 10 of the IC card 100 receives power and the power source 15 is charged with power. To be done. When the power supply voltage of the power supply 15 becomes equal to or higher than the operation threshold value, the power supply control unit of the IC chip 10 outputs a reset signal to the control means 12, whereby the control means 12 is reset.

接触型ICカードの場合は、ICモジュールアクセス装置200からICカード100のICチップ10に電源電圧を供給するとともにICモジュールアクセス装置200からICチップ10のリセット端子にリセット信号が送信され、これによりICチップ10はリセットされ、初期応答を返信する。 In the case of a contact type IC card, a power supply voltage is supplied from the IC module access device 200 to the IC chip 10 of the IC card 100, and a reset signal is transmitted from the IC module access device 200 to the reset terminal of the IC chip 10, whereby the IC The chip 10 is reset and returns an initial response.

(ステップS1b)
ICチップ10はリセットされた場合はステップS10のリセット処理に進む。リセット処理においては、ステップS10からS14の処理により、先ずは、データの復旧が必要なファイルがある場合はデータを復旧した上で、リセット後の初期化処理を行う。既にリセット信号の処理を終えているICチップ10は、ICモジュールアクセス装置200から最初のコマンドを受信するべく待機し、コマンドを受信するとステップS20のコマンド処理に進む。
(Step S1b)
When the IC chip 10 is reset, the process proceeds to the reset process of step S10. In the reset process, by the processes of steps S10 to S14, first, if there is a file that needs to be restored, the data is restored, and then the initialization process after the reset is performed. The IC chip 10 which has already finished processing the reset signal stands by to receive the first command from the IC module access device 200, and when the command is received, the process proceeds to the command processing of step S20.

(ステップS2)ファイル選択処理
ICモジュールアクセス装置200は、ICチップ10に、ICチップ10のファイル実体領域13cの作業基礎ファイルWEFを選択するSELECT FILEコマンドを送信する。
(Step S2) File Selection Processing The IC module access device 200 sends the IC chip 10 a SELECT FILE command for selecting the work basic file WEF in the file substance area 13c of the IC chip 10.

(ステップS2b)第1のコマンド処理
ICチップ10は、ICモジュールアクセス装置200からSELECT FILEコマンドを受信した場合は、ステップS20のコマンド処理によって、先ずは、データの復旧が必要なファイルがある場合はデータを復旧した上で、そのSELECT FILEコマンドに従った処理により、、ICチップ10のデータを書き込むべきファイルを準備する。
(Step S2b) First Command Processing When the IC chip 10 receives the SELECT FILE command from the IC module access device 200, the command processing of step S20 causes the IC chip 10 to first execute a process if there is a file that needs data recovery. After recovering the data, the file in which the data of the IC chip 10 is to be written is prepared by the process according to the SELECT FILE command.

(ステップS3)ファイル書込み処理
次に、ICモジュールアクセス装置200は、ICチップ10に、先に選択した作業基礎ファイルWEFに対して値を書き込むWRITE BINARYコマンドを送信する。
(Step S3) File Writing Process Next, the IC module access device 200 transmits to the IC chip 10 a WRITE BINARY command for writing a value to the previously selected work basic file WEF.

(ステップS3b)
ICチップ10は、ICモジュールアクセス装置200からWRITE BINARYコマンドを受信した場合は、ステップS20のコマンド処理によって、先ずは、データの復旧が必要なファイルがある場合はデータを復旧した上で、そのWRITE BINARYコマンドに従った処理を行い、ステップS2のSELECT FILEコマンドによって選択された作業基礎ファイルWEFにデータを書き込む準備をする。
(Step S3b)
When the IC chip 10 receives the WRITE BINARY command from the IC module access device 200, the command processing of step S20 first restores the data if there is a file requiring the data restoration, and then the WRITE command. Processing according to the BINARY command is performed to prepare to write data in the work basic file WEF selected by the SELECT FILE command in step S2.

(データ書込処理)
図7のステップS4からステップS9に従って、以下の様にして、指定されたファイルにデータを書き込む。
(Data writing process)
According to steps S4 to S9 of FIG. 7, data is written in the designated file as follows.

(ステップS4)書込データを揮発性メモリRAMで記憶
ICチップ10は、WRITE BINARYコマンドを受信すると、そのコマンドからファイルに書き込むべきデータを抽出して揮発性メモリRAMで記憶する。
(Step S4) Store Write Data in Volatile Memory RAM When the IC chip 10 receives the WRITE BINARY command, it extracts the data to be written to the file from the command and stores it in the volatile memory RAM.

(ステップS5)ファイルのロールバック可否識別情報の確認
次に、ステップS5の処理によって、SELECT FILEコマンドによって選択された作業基礎ファイルWEFのファイル管理情報FCLをファイル管理情報領域13bから読出し、そのファイル管理情報FCLの図3(a)のロールバック可否識別情報欄F−5によって、そのファイルが退避処理の対象か否かを確認する。
(Step S5) Confirmation of File Rollback Approval Identification Information Next, by the processing of step S5, the file management information FCL of the work basic file WEF selected by the SELECT FILE command is read from the file management information area 13b, and the file management is performed. It is confirmed whether or not the file is the target of the save process by the rollback availability identification information field F-5 of the information FCL in FIG. 3A.

そして、ICチップ10は、選択された作業基礎ファイルWEFのファイル管理情報FCLのロールバック可否識別情報欄F−5に記憶したフラグにより、そのファイルがロールバックの対象にされている事を判定した場合は、以下のステップS6に進み、そうで無い場合はステップS8に進む。 Then, the IC chip 10 determines that the file is targeted for rollback by the flag stored in the rollback propriety identification information field F-5 of the file management information FCL of the selected work basic file WEF. If so, the process proceeds to step S6 below; otherwise, the process proceeds to step S8.

(ステップS6)データ退避処理
復旧手段14aは、選択された作業基礎ファイルWEFがロールバックの対象にされている場合は、その元データを退避領域13eの退避領域13eに記憶させて退避させる。
(Step S6) Data Saving Process When the selected work basic file WEF is targeted for rollback, the restoring means 14a stores the original data in the saving area 13e of the saving area 13e and saves it.

(ステップS7)
復旧手段14aは、ファイルのデータを退避させた場合は、図3(b)の様な、ロールバック制御情報領域13dの退避管理情報RLCLのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが有効である旨の情報を示すフラグを記憶する。ロールバックファイルアドレス欄R−2にはロールバック元の作業基礎ファイルWEFのアドレスを記憶する。また、ロールバック実施タイミング欄R−3には、選択された作業基礎ファイルWEFのファイル管理情報FCLのロールバック実施タイミング欄F−6の情報を書き込む。
(Step S7)
When the file data is saved, the recovery means 14a stores the save area in the rollback data presence/absence identification information field R-1 of the save management information RLCL of the rollback control information area 13d as shown in FIG. 3B. A flag indicating information indicating that the data saved in 13e is valid is stored. The rollback file address field R-2 stores the address of the work basic file WEF of the rollback source. In the rollback execution timing column R-3, the information of the rollback execution timing column F-6 of the file management information FCL of the selected work basic file WEF is written.

(ステップS8)
次に、ICチップ10は、揮発性メモリRAMに記憶していた書込データを、選択された作業基礎ファイルWEFに書き込む。
(Step S8)
Next, the IC chip 10 writes the write data stored in the volatile memory RAM into the selected work basic file WEF.

(ステップS9)
ICチップ10が、ステップS8の処理の結果、揮発性メモリRAMに記憶していたデータを作業基礎ファイルWEFに書き込む処理が正常に完了した場合は、復旧手段14aが、退避管理情報RLCLのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグを記憶する。そして、データ書込処理を終えて、最初のステップS1に戻る。
(Step S9)
When the IC chip 10 normally completes the process of writing the data stored in the volatile memory RAM to the work basic file WEF as a result of the process of step S8, the recovery unit 14a rolls back the save management information RLCL. A flag indicating information indicating that there is no data saved in the save area 13e is stored in the data presence/absence identification information field R-1. Then, the data writing process is completed and the process returns to the first step S1.

(リセット処理)
ICチップ10は、ステップS1の処理でICモジュールアクセス装置200からリセットされた場合は、図8のステップS10からステップS14に従って、以下の様にして、データの復旧が必要なファイルがある場合はデータを復旧した上で、リセット後の初期化処理を行う。
(Reset process)
When the IC chip 10 is reset from the IC module access device 200 in the process of step S1, according to steps S10 to S14 of FIG. After restoring, the initialization process after reset is performed.

(ステップS10)
ICチップ10は、ステップS1の処理でICモジュールアクセス装置200からリセットされた場合は、図8の処理手順のリセット処理を開始する。そして、ICチップ10の復旧手段14aが、ロールバック制御情報領域13dから退避管理情報RLCLを読出し、そのロールバックデータ有無識別情報欄R−1を確認する。
(Step S10)
When the IC chip 10 is reset by the IC module access device 200 in the processing of step S1, the IC chip 10 starts the reset processing of the processing procedure of FIG. Then, the recovery means 14a of the IC chip 10 reads the save management information RLCL from the rollback control information area 13d and confirms the rollback data presence/absence identifying information field R-1.

そのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグが記憶されている場合は、復旧手段14aは、未完の書込み処理が無いと判定し、ステップS14に進む。 If a flag indicating that there is no data saved in the save area 13e is stored in the rollback data presence/absence identification information field R-1, the restoration unit 14a determines that there is no uncompleted write processing. Then, the process proceeds to step S14.

特に、ロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグが記憶されている場合は、先のファイルの書込み処理中に電源電圧低下が発生する等でファイルの書込み処理が完了していない場合であっても、その書込み処理が完了していないファイルをロールバックで復元せず、ステップS14に進む。 In particular, when a flag indicating that there is no data saved in the save area 13e is stored in the rollback data presence/absence identification information field R-1, a power supply voltage drop occurs during the writing process of the previous file. Even if the file writing process is not completed due to occurrence or the like, the file whose writing process is not completed is not restored by rollback, and the process proceeds to step S14.

復旧手段14aは、図3(b)のロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが有効である旨の情報を示すフラグが記憶されている場合は、ファイルの書込み処理が完了していないと判定し、ステップS11に進む。 If a flag indicating that the data saved in the save area 13e is valid is stored in the rollback data presence/absence identification information field R-1 in FIG. It is determined that the writing process of is not completed, and the process proceeds to step S11.

(ステップS11)
復旧手段14aは、図3(b)の退避管理情報RLCLのロールバック実施タイミング欄R−3を読出し、ロールバック実施タイミング欄R−3に、リセット時にロールバックする旨の情報が記載されていない場合は、ロールバック処理はせずにステップS14に進む。
(Step S11)
The restoration unit 14a reads the rollback execution timing column R-3 of the save management information RLCL of FIG. 3B, and the rollback execution timing column R-3 does not include information indicating that the rollback is performed at the time of reset. In this case, the rollback process is not performed and the process proceeds to step S14.

(ステップS12)
復旧手段14aは、図3(b)のロールバック実施タイミング欄R−3にリセット時にロールバックする旨の情報が記載されている場合は、退避領域13eに退避させて記憶させていた作業基礎ファイルWEFの元データを読出し、その作業基礎ファイルWEFに書き戻すロールバック処理を行いその作業基礎ファイルWEFのデータを復元する。
(Step S12)
When the rollback execution timing column R-3 in FIG. 3B contains information indicating that the rollback is to be performed at the time of reset, the restoration unit 14a saves the work basic file stored in the save area 13e. The original data of the WEF is read out, and a rollback process for writing back to the work basic file WEF is performed to restore the data of the work basic file WEF.

(ステップS13)
復旧手段14aは、退避管理情報RLCLのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグを記憶する。
(Step S13)
The recovery unit 14a stores a flag indicating that there is no data saved in the save area 13e in the rollback data presence/absence identification information field R-1 of the save management information RLCL.

(ステップS14)
そして、ICチップ10がリセット後の初期化処理を行い、ICモジュールアクセス装置200から最初のコマンドを受信するべく待機する。
(Step S14)
Then, the IC chip 10 performs the initialization process after the reset, and waits to receive the first command from the IC module access device 200.

(コマンド処理)
ICチップ10は、ステップS2の処理等でICモジュールアクセス装置200からコマンドを受信した場合は、図9のステップS20からステップS24に従って、以下の様にして、データの復旧が必要なファイルがある場合はデータを復旧した上で、コマンド処理を行う。
(Command processing)
When the IC chip 10 receives a command from the IC module access device 200 in the processing of step S2 or the like, and in the case where there is a file for which data recovery is necessary as described below in accordance with steps S20 to S24 of FIG. Executes the command processing after recovering the data.

(ステップS20)
ICチップ10は、ステップS2の処理、及び、ステップS3の処理でICモジュールアクセス装置200からコマンドを受信した場合は、コマンド処理を開始する。先ず、ICチップ10の復旧手段14aが、ロールバック制御情報領域13dから退避管理情報RLCLを読出し、そのロールバックデータ有無識別情報欄R−1を確認する。
(Step S20)
When the IC chip 10 receives a command from the IC module access device 200 in the processing of step S2 and the processing of step S3, it starts the command processing. First, the recovery means 14a of the IC chip 10 reads the save management information RLCL from the rollback control information area 13d and confirms the rollback data presence/absence identification information column R-1.

そして、ロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが有効である旨の情報を示すフラグが記憶されている場合は、復旧手段14aは、先に行われたファイルの書込み処理が完了していないと判定し、ステップS21に進む。 When the rollback data presence/absence identification information field R-1 stores a flag indicating that the data saved in the save area 13e is valid, the recovery unit 14a has performed the previous operation. It is determined that the file writing process is not completed, and the process proceeds to step S21.

また、ロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグが記憶されている場合は、復旧手段14aは、未完の書込み処理が無いと判定し、ステップS24のコマンド処理に進む。 If a flag indicating that there is no data saved in the save area 13e is stored in the rollback data presence/absence identification information field R-1, the recovery unit 14a determines that there is no uncompleted write processing. It is determined and the process proceeds to the command processing in step S24.

特に、ロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグが記憶されている場合は、先のファイルの書込み処理中に電源電圧低下が発生する等でファイルの書込み処理が完了していない場合であっても、その書込み処理が完了していないファイルをロールバックで復元せず、ステップS24に進む。 In particular, when a flag indicating that there is no data saved in the save area 13e is stored in the rollback data presence/absence identification information field R-1, a power supply voltage drop occurs during the writing process of the previous file. Even if the file writing process is not completed due to occurrence or the like, the file whose writing process is not completed is not restored by rollback, and the process proceeds to step S24.

(ステップS21)
復旧手段14aは、ステップS20の処理で読み出した図3(b)の退避管理情報RLCLのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが有効である旨の情報を示すフラグが記憶されていた場合は、退避管理情報RLCLのロールバック実施タイミング欄R−3を読出す。
(Step S21)
The restoration means 14a indicates that the data saved in the save area 13e is valid in the rollback data presence/absence identification information column R-1 of the save management information RLCL of FIG. 3B read in the process of step S20. Is stored, the rollback execution timing column R-3 of the save management information RLCL is read.

復旧手段14aは、ロールバック実施タイミング欄R−3に、最初にコマンドを受信した時にロールバックする旨の情報が記載されていなかった場合は、ステップS24のコマンドの処理に進む。 When the rollback execution timing column R-3 does not include information indicating that the command is to be rolled back when the command is first received, the restoration means 14a proceeds to the command processing in step S24.

復旧手段14aは、ロールバック実施タイミング欄R−3に、最初にコマンドを受信した時にロールバックする旨の情報が記載されている場合は、ステップS22に進む。 If the rollback execution timing column R-3 contains information indicating that the rollback is to be performed when the command is first received, the restoration means 14a proceeds to step S22.

(ステップS22)
復旧手段14aは、退避領域13eに退避させて記憶させていた作業基礎ファイルWEFの元データを読出し、作業基礎ファイルWEFに書き戻してデータを復元するロールバック処理を行う。
(Step S22)
The recovery unit 14a reads the original data of the work basic file WEF that has been saved and stored in the save area 13e, writes back to the work basic file WEF, and performs rollback processing to restore the data.

(ステップS23)
復旧手段14aは、退避管理情報RLCLのロールバックデータ有無識別情報欄R−1に、退避領域13eへ退避されたデータが無い旨の情報を示すフラグを記憶する。
(Step S23)
The recovery unit 14a stores a flag indicating that there is no data saved in the save area 13e in the rollback data presence/absence identification information field R-1 of the save management information RLCL.

(ステップS24)
次に、ICチップ10は、受信したコマンドの処理に進む。ここで、データ書込みコマンドを処理は、ステップS4からステップS9のデータ書込処理を実行する。そして、コマンド処理を終えて、図6の主要な処理手順に戻って、主要な処理の次の処理に進む。
(Step S24)
Next, the IC chip 10 proceeds to process the received command. Here, the process of the data write command executes the data write process of steps S4 to S9. Then, after the command processing is completed, the procedure returns to the main processing procedure of FIG. 6 and proceeds to the next processing of the main processing.

なお、本発明は以上の実施形態に限定されず、ICカード以外の高セキュリティモジュール用のICチップ10に適用することもできる。例えば、携帯端末装置に搭載する高セキュリティモジュールであるSIMカードのICチップ10に、携帯端末装置がICモジュールアクセス装置200としてデータを書き込むシステムに適用することもできる。 The present invention is not limited to the above embodiment, and can be applied to the IC chip 10 for a high security module other than the IC card. For example, it can be applied to a system in which the mobile terminal device writes data as the IC module access device 200 to the IC chip 10 of the SIM card which is a high security module mounted in the mobile terminal device.

また、本発明は、ICチップ10に電源が供給された場合に、ICチップ10の以前の処理で作業基礎ファイルWEFへのデータの書込みが中断している場合は、復旧手段14aが、種々のタイミングで退避領域13eに退避させていたデータを作業基礎ファイルWEFに書き戻すロールバック処理を行い作業基礎ファイルWEFのデータを復旧する様に、ファイル管理情報FCLのロールバック実施タイミング欄F−6のロールバックを実施するタイミングを、以上の実施形態で示したタイミングの指定の他の種々のタイミングも指定する様にすることもできる。 Further, according to the present invention, when the IC chip 10 is supplied with power and the writing of the data to the work basic file WEF is interrupted by the previous processing of the IC chip 10, the recovery means 14a has various means. In order to restore the data of the work basic file WEF by performing the rollback process of writing back the data saved in the save area 13e to the work basic file WEF at the timing, the rollback execution timing column F-6 of the file management information FCL The timing for performing the rollback can also be designated as various timings other than the timing designations shown in the above embodiments.

例えば、リセット以前であっても、電源が供給されていれば、退避領域13eに退避させていたデータを作業基礎ファイルWEFに書き戻すロールバック処理を行い作業基礎ファイルWEFのデータを復旧する様にすることもできる。 For example, even before reset, if power is supplied, the data saved in the save area 13e is rolled back to the work basic file WEF to restore the data of the work basic file WEF. You can also do it.

また、リセット後に、電源が供給されて最初のコマンドを待っている間に、退避領域13eに退避させていたデータを作業基礎ファイルWEFに書き戻すロールバック処理を行い作業基礎ファイルWEFのデータを復旧する様にすることもできる。 After resetting, while power is supplied and waiting for the first command, a rollback process is performed to write back the data saved in the save area 13e to the work basic file WEF to restore the data of the work basic file WEF. You can also do it.

1・・・アンテナコイル
10・・・ICチップ
11・・・通信手段
12・・・制御手段
13・・・記憶手段
13a・・・プログラム手段
13b・・・ファイル管理情報領域
13c・・・ファイル実体領域
13d・・・ロールバック制御情報領域
13e・・・退避領域
14・・・カードマネージャ
14a・・・復旧手段
15・・・電源
100・・・ICカード
200・・・ICモジュールアクセス装置
DF・・・専用ファイル
EF・・・基礎ファイル
FCL・・・ファイル管理情報
F−1・・・ファイルタイプ欄
F−2・・・ファイル権限欄
F−3・・・ファイルサイズ欄
F−4・・・ファイルアドレス欄
F−5・・・ロールバック可否識別情報欄
F−6・・・ロールバック実施タイミング欄
IEF・・・内部基礎ファイル
RAM・・・揮発性メモリ
ROM・・・固定記憶手段
RLCL・・・退避管理情報
R−1・・・ロールバックデータ有無識別情報欄
R−2・・・ロールバックファイルアドレス欄
R−3・・・ロールバック実施タイミング欄
WEF・・・作業基礎ファイル
1... Antenna coil 10... IC chip 11... Communication means 12... Control means 13... Storage means 13a... Program means 13b... File management information area 13c... File entity Area 13d... Rollback control information area 13e... Save area 14... Card manager 14a... Restoration means 15... Power supply 100... IC card 200... IC module access device DF... -Exclusive file EF...Basic file FCL...File management information F-1...File type column F-2...File authority column F-3...File size column F-4...File Address column F-5... Rollback availability identification information column F-6... Rollback execution timing column IEF... Internal basic file RAM... Volatile memory ROM... Fixed storage means RLCL... Evacuation management information R-1...Rollback data presence/absence information column R-2...Rollback file address column R-3...Rollback execution timing column WEF...Basic work file

Claims (4)

ICモジュールアクセス装置とデータ交換を行う通信手段と、ファイルを記憶する不揮発性メモリを具備するICカードであって、
前記ICモジュールアクセス装置から受信したデータを前記不揮発性メモリの前記ファイルに書込む前に前記ファイルの元データを前記不揮発性メモリの退避領域に退避して記憶する手段と、前記退避領域に記憶されている前記元データを前記ファイルに書き戻す手段を有し、前記ファイルのファイル管理情報に、前記ファイルを前記不揮発性メモリの退避領域に退避する対象にするか否かを記憶したロールバック可否識別情報を記憶したことを特徴とするICカード。
An IC card comprising a communication means for exchanging data with an IC module access device and a non-volatile memory for storing files,
Means for saving the original data of the file by saving it in the save area of the non-volatile memory before writing the data received from the IC module access device to the file of the non-volatile memory; A rollback possibility identification storing means for writing back the original data to the file, and storing in the file management information of the file whether or not the file is to be saved in the save area of the nonvolatile memory. An IC card characterized by storing information.
請求項1記載のICカードであって、前記ファイルのファイル管理情報に、前記不揮発性メモリの前記退避領域に記憶されている前記元データを前記ファイルに書き戻す処理のタイミングを、リセット時の処理、又は、それ以外のタイミングでの処理を指定して記憶したことを特徴とするICカード。 2. The IC card according to claim 1, wherein, in the file management information of the file, a timing of a process of writing back the original data stored in the save area of the nonvolatile memory to the file is a reset process. Or, an IC card characterized in that processing at other timing is designated and stored. 高セキュリティモジュール用のICチップであって、
ICモジュールアクセス装置とデータ交換を行う通信手段と、ファイルを記憶する不揮発性メモリを具備し、前記ICモジュールアクセス装置から受信したデータを前記不揮発性メモリの前記ファイルに書込む前に前記ファイルの元データを前記不揮発性メモリの退避領域に退避して記憶する手段と、前記退避領域に記憶されている前記元データを前記ファイルに書き戻す手段を有し、前記ファイルのファイル管理情報に、前記ファイルを前記不揮発性メモリの退避領域に退避する対象にするか否かを記憶したロールバック可否識別情報を記憶したことを特徴とするICチップ。
An IC chip for a high security module,
A communication means for exchanging data with the IC module access device, and a non-volatile memory for storing a file are provided, and the source of the file is written before the data received from the IC module access device is written in the file of the non-volatile memory. The file management information of the file, the file having the means for storing the data in the save area of the non-volatile memory and storing the data, and the means for writing the original data stored in the save area back to the file. An IC chip, which stores rollback availability identification information that stores whether or not to be saved in the save area of the nonvolatile memory.
請求項3記載のICチップであって、前記ファイルのファイル管理情報に、前記不揮発性メモリの前記退避領域に記憶されている前記元データを前記ファイルに書き戻す処理のタイミングを、リセット時の処理、又は、それ以外のタイミングでの処理を指定して記憶したことを特徴とするICチップ。 4. The IC chip according to claim 3, wherein in the file management information of the file, the timing of the process of writing back the original data stored in the save area of the non-volatile memory to the file is reset. Or, an IC chip characterized in that processing at other timing is designated and stored.
JP2019001109A 2019-01-08 2019-01-08 IC chip and IC card Pending JP2020112855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019001109A JP2020112855A (en) 2019-01-08 2019-01-08 IC chip and IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019001109A JP2020112855A (en) 2019-01-08 2019-01-08 IC chip and IC card

Publications (1)

Publication Number Publication Date
JP2020112855A true JP2020112855A (en) 2020-07-27

Family

ID=71667234

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019001109A Pending JP2020112855A (en) 2019-01-08 2019-01-08 IC chip and IC card

Country Status (1)

Country Link
JP (1) JP2020112855A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000123134A (en) * 1998-10-13 2000-04-28 Dainippon Printing Co Ltd Ic card having backup memory
JP2010044503A (en) * 2008-08-11 2010-02-25 Buffalo Inc Computer program, and recording medium
JP2010182270A (en) * 2009-02-09 2010-08-19 Toshiba Corp Mobile electronic apparatus and data management method in mobile electronic apparatus
JP2012252655A (en) * 2011-06-06 2012-12-20 Toshiba Corp Portable electronic device, ic card and control method of portable electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000123134A (en) * 1998-10-13 2000-04-28 Dainippon Printing Co Ltd Ic card having backup memory
JP2010044503A (en) * 2008-08-11 2010-02-25 Buffalo Inc Computer program, and recording medium
JP2010182270A (en) * 2009-02-09 2010-08-19 Toshiba Corp Mobile electronic apparatus and data management method in mobile electronic apparatus
JP2012252655A (en) * 2011-06-06 2012-12-20 Toshiba Corp Portable electronic device, ic card and control method of portable electronic device

Similar Documents

Publication Publication Date Title
US7017825B2 (en) IC card and data processing method therefor
CN109685190B (en) Power-down protection method and device for IC card
CN100481119C (en) Method and device for implementing multiple operation software intelligent card chip
CN111104253B (en) Smart card for power failure protection and working method thereof
JP2003216511A (en) Non-volatile memory device, data updating method, data updating program and computer readable recording medium with recorded program
JP2020112855A (en) IC chip and IC card
JP5795921B2 (en) IC card, portable electronic device, and IC card control method
EP3023925B1 (en) Secure element with applications
JP5754287B2 (en) IC chip, processing method in IC chip, UIM, portable terminal, and processing program for IC chip
JP4100160B2 (en) IC card and IC card data management method
JP7322923B2 (en) Secure element, transaction control method and device
JP4476658B2 (en) Portable electronic device, electronic processing system, and electronic processing method
JP6915437B2 (en) Update method and update program using electronic information storage medium, IC card, electronic information storage medium
JP2006293706A (en) Multi-application ic card with application updating function
JP5957577B2 (en) IC card, portable electronic device, and IC card control method
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP7068603B2 (en) Update method and update program using electronic information storage medium, IC card, electronic information storage medium
JP4899499B2 (en) IC card issuing method, IC card issuing system, and IC card
JP7010084B2 (en) Token device used for IC payment
JP6252341B2 (en) Electronic information storage medium, information processing method, and information processing program
JP6421662B2 (en) Electronic information storage medium, access restriction method, and access restriction program
JP2002259138A (en) Integrated circuit and ic card
JP2016153945A (en) Electronic information storage medium, counter rewriting method and counter rewriting program
JP5853590B2 (en) IC chip, IC chip processing method, IC chip processing program, IC card, etc.
JP6461759B2 (en) IC card and IC module

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221220

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20230613