JPH09319848A - Portable data carrier - Google Patents

Portable data carrier

Info

Publication number
JPH09319848A
JPH09319848A JP8135058A JP13505896A JPH09319848A JP H09319848 A JPH09319848 A JP H09319848A JP 8135058 A JP8135058 A JP 8135058A JP 13505896 A JP13505896 A JP 13505896A JP H09319848 A JPH09319848 A JP H09319848A
Authority
JP
Japan
Prior art keywords
reference key
data storage
storage means
stored
key
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
JP8135058A
Other languages
Japanese (ja)
Inventor
Akiyuki Yura
彰之 由良
Fumihiro Takayama
文博 高山
Seiji Hirano
誠治 平野
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 JP8135058A priority Critical patent/JPH09319848A/en
Publication of JPH09319848A publication Critical patent/JPH09319848A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a portable data carrier whose issuance processing is simplified, without increasing the program capacity. SOLUTION: When a signal RST is supplied from the outside to initialize an IC card before a series of operations, a CPU 1 which executes a program stored in a ROM 2 sets all flags on a RAM 3 to 'collated state' and retrieves each reference key from an EEPROM 4. At the time of this retrieval, the flag corresponding to a found reference key is changed to 'uncollated state'. In issuance processing which follows, a route directory is generated in the final access condition, and an MF(master file) is generated, and plural reference key files, including individual reference key data, are successively generated. Since the final access condition is set to the MF, it is unnecessary to rewrite the pertinent access condition.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、クレジットカード
サイズのプラスチックカードにCPU内蔵のICチップ
を埋め込んだICカード、スマートカード、或いはデー
タタグ、標識などに代表される可搬型データ担体に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a portable data carrier represented by an IC card, a smart card, or a data tag, a sign, or the like, in which an IC chip with a built-in CPU is embedded in a credit card-sized plastic card.

【0002】[0002]

【従来の技術】一般に、ICカードでは、ファイルおよ
びディレクトリと呼ばれる概念を導入し、内部データを
管理している。以下、図5、図6を参照してファイルお
よびディレクトリについて説明する。
2. Description of the Related Art Generally, in IC cards, a concept called a file and a directory is introduced to manage internal data. Files and directories will be described below with reference to FIGS. 5 and 6.

【0003】ファイルは、メモリ上のある領域に記憶さ
れた実データと当該領域の範囲を特定する管理データと
から構成される概念であり、ICカードの実際の運用前
には、通常、内部の不揮発性メモリ上に、一つのマスタ
ーファイル(以後、MFと記す)と、その配下のファイ
ルであるエレメンタリーファイル(以後、EFと記す)
が生成される。
A file is a concept composed of actual data stored in a certain area on the memory and management data for specifying the range of the area. Usually, before actual operation of the IC card, the internal file One master file (hereinafter referred to as MF) and its subordinate elementary file (hereinafter referred to as EF) on the non-volatile memory
Is generated.

【0004】これらのファイルはディレクトリによって
管理されている。ディレクトリは、特願昭61−153
560号の願書に添付された明細書および図面に記載さ
れているように、各ファイルの管理データ等からなる固
定長のデータ群であり、特にMF自体およびMF内のE
Fの管理データを包含するものはルートディレクトリと
呼ばれる。
These files are managed by directories. The directory is Japanese Patent Application No. Sho 61-153.
As described in the specification and drawings attached to the application for No. 560, it is a fixed-length data group consisting of management data of each file, and in particular, the MF itself and the E in the MF.
The one including the management data of F is called a root directory.

【0005】なお、ディレクトリは階層構造を許容して
おり、ルートディレクトリの配下にサブディレクトリを
構築することも可能である。この場合、サブディレクト
リはデディケーテッドファイル(Dedicated File。以
後、DFと記す)として親ディレクトリに管理される。
もちろん、このサブディレクトリ内にEFを生成するこ
とも可能である。
The directory allows a hierarchical structure, and it is possible to construct a subdirectory under the root directory. In this case, the sub-directory is managed by the parent directory as a Dedicated File (hereinafter referred to as DF).
Of course, it is also possible to generate the EF in this subdirectory.

【0006】図6はEFの管理データの構成例を示す図
であり、この図に示されるEFの管理データは、EF番
号、このEFに関するファイル種別、W鍵番号、R鍵番
号、UL鍵番号、実データの開始番地、同終了番地、お
よび同サイズから構成されている。なお、ファイル種別
は、当該EFがDFか、参照鍵データを格納した参照鍵
ファイルか、その他であるかを識別するための情報であ
り、このファイル種別がDFを表す場合、W鍵番号、R
鍵番号、UL鍵番号、終了番地、およびサイズは省略さ
れ、当該DFに対応するサブディレクトリの開始番地が
付加される。このサブディレクトリは、親ディレクトリ
に関する情報を有している点以外では、ルートディレク
トリと同様の構成であるため、詳細な説明を省略する。
FIG. 6 is a diagram showing an example of the structure of EF management data. The EF management data shown in this figure includes EF numbers, file types related to this EF, W key numbers, R key numbers, and UL key numbers. , The actual data start address, the same end address, and the same size. The file type is information for identifying whether the EF is a DF, a reference key file storing reference key data, or other. When the file type represents DF, a W key number, R
The key number, UL key number, end address, and size are omitted, and the start address of the subdirectory corresponding to the DF is added. This subdirectory has the same configuration as the root directory except that it has information about the parent directory, and thus detailed description thereof will be omitted.

【0007】上述した構成から明らかなように、コマン
ドをICカードへ送信して所望のファイルにアクセスす
るためには、コマンドの送信元が当該コマンドで為され
る処理に対応付けられた参照鍵を知っている必要があ
る。すなわち、ICカードは、正当なアクセス権を持た
ない使用者による不正使用を防止できるよう構成されて
いる。
As is apparent from the above-described configuration, in order to send a command to the IC card and access a desired file, the sender of the command uses the reference key associated with the process performed by the command. Need to know That is, the IC card is configured to prevent unauthorized use by a user who does not have a valid access right.

【0008】次に、従来のICカードの発行処理につい
て図7を参照して説明する。ここでいう発行処理とは、
MFを作成し、その配下に各種ファイルを生成して実運
用可能とする処理である。図7に示されるように、発行
処理では、まず、ルートディレクトリを作成し、MFを
生成する(ステップSA1)。この際、作成したMFの
管理データ中のFC鍵1番号およびFC鍵2番号には何
も設定せず、ファイル生成コマンド(以後、FCコマン
ドと記す)に対するアクセス条件をフリーに設定する。
これによって、MFの配下に所望のファイルを生成する
ことができる。
Next, a conventional IC card issuing process will be described with reference to FIG. The issuing process here is
This is a process of creating an MF and generating various files under the MF to enable actual operation. As shown in FIG. 7, in the issuing process, first, the root directory is created and the MF is generated (step SA1). At this time, nothing is set in the FC key 1 number and the FC key 2 number in the created management data of the MF, and the access condition for the file generation command (hereinafter referred to as FC command) is set to free.
As a result, a desired file can be created under the MF.

【0009】所望のファイルの生成に平行して、FCコ
マンドによって、アクセス管理に必要な参照鍵データ1
〜n(図示略)を格納した参照鍵ファイル1〜nを順次
生成する(ステップSA2〜SAn+1、ただしnは1
以上の整数)。これにより、参照鍵データ1〜nが不揮
発性メモリ内に記憶される。次に、MFの管理データ中
のFCコマンドに対するアクセス条件(FC鍵1番号お
よびFC鍵2番号)を所定のコマンドによって書き換
え、以後、FCコマンドが発行された時には、その処理
前に、入力された鍵データ(例えば、パスワード)とF
C鍵1番号およびFC鍵2番号で示される参照鍵ファイ
ル中の参照鍵データとの比較結果が「一致」にならない
限り(これらの参照鍵の「照合」が完了しない限り)、
当該FCコマンドによるアクセスが拒否されるようにす
る(ステップSAn+2)。
In parallel with the generation of the desired file, the reference key data 1 required for access management is sent by the FC command.
To n (not shown) are sequentially stored (steps SA2 to SAn + 1, where n is 1).
Above integer). As a result, the reference key data 1 to n are stored in the non-volatile memory. Next, the access condition (FC key 1 number and FC key 2 number) for the FC command in the management data of the MF is rewritten by a predetermined command, and thereafter, when the FC command is issued, it is input before the processing. Key data (eg password) and F
Unless the comparison result with the reference key data in the reference key file indicated by the C key 1 number and the FC key 2 number is “match” (unless the “matching” of these reference keys is completed).
Access by the FC command is denied (step SAn + 2).

【0010】上述したように、従来のICカードの発行
処理では、MFのFCコマンドに対するアクセス条件を
書き換えているが、これは、ルートディレクトリ作成
(MF生成)時にFCコマンドに対する最終的なアクセ
ス条件を設定してしまうと、以後、ファイルを全く生成
できない状態に陥ってしまうからである。
As described above, in the conventional issuing process of the IC card, the access condition for the MF FC command is rewritten. This is because the final access condition for the FC command is created when the root directory is created (MF is created). This is because if you do so, you will not be able to create any files after that.

【0011】仮に、ルートディレクトリ作成時に、「F
C鍵1番号およびFC鍵2番号で示される2つの参照鍵
ファイル中の各参照鍵の照合が完了しない限り配下にフ
ァイルを生成できない」というアクセス条件を設定した
とする。ここで、EFを生成するためのFCコマンドを
受信すると、ICカードは上記各参照鍵の照合状態を確
認しようとするが、MFの配下には参照鍵ファイルが生
成されていないため、参照鍵データ自体が不揮発性メモ
リ上に存在せず、したがって、FCコマンドを処理でき
ない。このように、MFの下層にEFを生成できない状
態に陥ってしまうのである。
If the root directory is created, "F
It is assumed that an access condition "a file cannot be generated under the reference key unless the reference keys in the two reference key files indicated by the C key 1 number and the FC key 2 number are completed" is set. Here, when the FC command for generating the EF is received, the IC card tries to confirm the collation state of each of the reference keys, but since the reference key file is not generated under the MF, the reference key data is not generated. It does not exist on non-volatile memory and therefore cannot process FC commands. In this way, the EF cannot be generated in the lower layer of the MF.

【0012】次に、上述の発行処理完了後、所望の一連
の動作開始時には、図8に示される前処理が行われる。
すなわち、ICカードが初期化されると(ステップSB
1)、揮発性メモリ上に参照鍵に対応して設定される全
てのフラグの状態が「未照合状態」を表すものに設定さ
れる(ステップSB2)。なお、参照鍵の照合状態には
「未照合状態」と「照合済み状態」があり、ある参照鍵
が照合済み状態にあるということは、その参照鍵によっ
てアクセス条件が設定された処理を実行可能であること
を意味している。
Next, after the completion of the above-mentioned issuing process, at the start of a desired series of operations, the pre-process shown in FIG. 8 is performed.
That is, when the IC card is initialized (step SB
1) The state of all the flags set in the volatile memory in correspondence with the reference key is set to indicate the "unverified state" (step SB2). In addition, the collation state of the reference key has "unverified state" and "verified state", and the fact that a certain reference key is in the collated state means that the processing in which the access condition is set by the reference key can be executed. It means that.

【0013】ここで、上記一連の動作における照合コマ
ンドの処理フローを図9に示す。この図に示されるよう
に、照合コマンドにより参照鍵が認証され(ステップS
C1)、その認証に成功した場合には揮発性メモリ上の
該当フラグの状態が「照合済み状態」になり(ステップ
SC2,SC3)、失敗した場合には同フラグの状態が
「未照合状態」になる(ステップSC2,SC4)。
FIG. 9 shows a processing flow of the collation command in the above series of operations. As shown in this figure, the reference key is authenticated by the verification command (step S
C1), if the authentication is successful, the state of the corresponding flag on the volatile memory becomes the "verified state" (steps SC2 and SC3), and if it fails, the state of the flag is "unverified state". (Steps SC2 and SC4).

【0014】[0014]

【発明が解決しようとする課題】上述したように、従来
のICカードの発行処理においては、参照鍵を生成した
後(参照鍵ファイルを不揮発性メモリに格納した後)
に、MFに対するアクセス条件を再設定する必要があ
り、処理が複雑かつ冗長になっていた。もちろん、DF
の下層にEFを生成する場合にも上述と同様の処理が必
要になってしまう。また、ICカードはプログラム容量
に厳しい制限があるため、上記再設定を可能とする機能
を設けることは、少なからぬ負担になっていた。
As described above, in the conventional IC card issuing process, after the reference key is generated (after the reference key file is stored in the non-volatile memory).
In addition, it is necessary to reset the access conditions for the MF, which makes the processing complicated and redundant. Of course, DF
When EF is generated in the lower layer, the same processing as above is required. Further, since the IC card has a strict limitation on the program capacity, it has been a considerable burden to provide the function that enables the above resetting.

【0015】なお、参照鍵をファイル概念とは異なる概
念で管理するという方法も考えられるが、ISO/IE
C7816シリーズ(端子付きICカード規格)では、
参照鍵データを一般のデータと同様にファイル概念で扱
うコマンドが存在することから、互換性に優れるという
ICカードの特徴を利用するためには、規定されたコマ
ンドに平行してこれと同様な機能の独自のコマンドを設
ける必要がある。このことは、プログラム容量に制限の
あるICカードにおいては、極めて大きな負担になって
しまう。本発明はこのような事情に鑑みてなされたもの
で、プログラム容量を削減できるとともに、発行処理を
簡素とすることができる可搬型データ担体を提供するこ
とを目的としている。
A method of managing the reference key with a concept different from the file concept is also conceivable, but ISO / IE
In the C7816 series (IC card standard with terminals),
Since there is a command that handles the reference key data with the file concept like general data, in order to utilize the characteristic of the IC card that is excellent in compatibility, a function similar to this is provided in parallel with the prescribed command. You need to provide your own command. This imposes an extremely heavy burden on an IC card having a limited program capacity. The present invention has been made in view of such circumstances, and an object thereof is to provide a portable data carrier capable of reducing the program capacity and simplifying the issuing process.

【0016】[0016]

【課題を解決するための手段】上述した課題を解決する
ために、請求項1記載の発明は、外部機器との間でデー
タを送受する通信手段と、命令の実行前に照合されるべ
き参照鍵を格納する不揮発性データ記憶手段と、揮発性
メモリと、前記通信手段を介して受信した命令を実行す
るとともに、前記参照鍵と前記通信手段を介して入力さ
れるデータとを照合し、両者が一致したか否かの照合結
果を前記揮発性メモリに前記参照鍵毎に記憶させる処理
手段とを具備したカード形態等の可搬型データ担体であ
って、前記処理手段は、命令の実行前に照合されるべき
参照鍵に対する照合結果が不一致を表すものである場合
にはこの命令の実行を禁止するとともに、担体初期化時
には前記不揮発性データ記憶手段に格納されている全て
の参照鍵に対する照合結果を不一致を表すものとし、前
記不揮発性データ記憶手段に格納されていない全ての参
照鍵に対する照合結果を一致を表すものとして前記揮発
性メモリに記憶させることを特徴としている。
In order to solve the above-mentioned problems, the invention according to claim 1 refers to a communication means for transmitting / receiving data to / from an external device and a reference to be collated before execution of an instruction. Non-volatile data storage means for storing the key, volatile memory, and executes the command received via the communication means, collates the reference key with the data input via the communication means, both Is a portable data carrier in the form of a card, which comprises a processing means for storing the verification result of whether or not they match in the volatile memory for each of the reference keys, the processing means before the execution of the command. When the comparison result for the reference key to be verified indicates disagreement, execution of this command is prohibited, and at the time of carrier initialization, all reference keys stored in the nonvolatile data storage means are prohibited. The engagement results shall represent the mismatch, it is characterized in that is stored in the volatile memory matching results for all the reference key that is not stored in the non-volatile data storage means as representing the coincidence.

【0017】また、請求項2記載の発明は、外部機器と
の間でデータを送受する通信手段と、命令の実行前に照
合されるべき参照鍵を格納する不揮発性データ記憶手段
と、前記通信手段を介して受信した命令を実行するとと
もに、前記参照鍵と前記通信手段を介して入力されるデ
ータとを照合し、両者が一致したか否かの照合結果を前
記不揮発性データ記憶手段に前記参照鍵毎に記憶させる
処理手段とを具備したカード形態等の可搬型データ担体
であって、前記処理手段は、命令の実行前に照合される
べき参照鍵に対する照合結果が不一致を表すものである
場合にはこの命令の実行を禁止するとともに、担体初期
化時には前記不揮発性データ記憶手段に格納されている
全ての参照鍵に対する照合結果を不一致を表すものと
し、前記不揮発性データ記憶手段に格納されていない全
ての参照鍵に対する照合結果を一致を表すものとして前
記不揮発性データ記憶手段に記憶させることを特徴とし
ている。
The invention according to claim 2 is a communication means for transmitting and receiving data to and from an external device, a non-volatile data storage means for storing a reference key to be collated before execution of an instruction, and the communication. The instruction received via the means is executed, the reference key and the data input via the communication means are collated, and the collation result of whether or not they match is stored in the nonvolatile data storage means. A portable data carrier in the form of a card, comprising a processing means for storing each reference key, wherein the processing means represents a mismatch in the matching result with respect to the reference key to be matched before the execution of the instruction. In this case, the execution of this command is prohibited, and at the time of carrier initialization, the verification results for all the reference keys stored in the nonvolatile data storage means are represented as non-coincidence, and the nonvolatile data is stored. It is characterized in that is stored in the non-volatile data storage means as representing the coincidence matching results for all the reference key that is not stored in the data storage means.

【0018】すなわち、本発明は、不揮発性データ記憶
手段に格納されていない参照鍵の状態情報を照合済み状
態とし、参照鍵が登録された時点でこの参照鍵の状態情
報を未照合状態とし、参照鍵の状態情報が照合済み状態
にならない限り当該参照鍵による照合を必要とする命令
の実行を禁止することを特徴としている。
That is, according to the present invention, the state information of the reference key which is not stored in the non-volatile data storage means is set to the collated state, and when the reference key is registered, the state information of the reference key is set to the unverified state, The feature is that execution of an instruction that requires verification by the reference key is prohibited unless the status information of the reference key indicates the verified status.

【0019】[0019]

【発明の実施の形態】以下、図面を参照して本発明の一
実施例について説明する。図1は本発明の一実施形態に
よる可搬型データ担体の構成を示す図であり、この図に
おいて、可搬型データ担体はICカードとして実現され
ている。図1において、1はCPU(中央処理装置)で
あり、CPU1に実行されるプログラムを格納したRO
M(Read Only Memory)2、コマンドデータの一時格納
領域やCPU1の作業領域等として使用されるRAM
(Random Access Memory、揮発性メモリ)3、およびE
EPROM(Electrically Erasable ProgrammableRO
M、不揮発性データ記憶手段)4と所定幅のバスを介し
て接続されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a configuration of a portable data carrier according to an embodiment of the present invention, in which the portable data carrier is realized as an IC card. In FIG. 1, reference numeral 1 denotes a CPU (central processing unit), and an RO storing a program executed by the CPU 1.
M (Read Only Memory) 2, RAM used as a temporary storage area for command data, a work area for the CPU 1, and the like
(Random Access Memory, Volatile Memory) 3, and E
EPROM (Electrically Erasable Programmable RO
M, non-volatile data storage means) 4 via a bus of a predetermined width.

【0020】このCPU1は、図示せぬICカード端子
部(通信手段)から供給されるVcc(電源電圧)、R
ST信号(リセット信号)、CLK信号(クロック信
号)に基づいて、ROM2に格納されたプログラムを読
み出し実行し、RAM3およびEEPROM4に対して
データの書き込み及び読み出しを行うとともに、I/O
インタフェースを介して外部機器との間でデータ(図中
I/Oで表される)を送受する。なお、上記CPU1と
ROM2は処理手段を構成している。
The CPU 1 has Vcc (power supply voltage) and R supplied from an IC card terminal (not shown) (communication means).
A program stored in the ROM 2 is read out and executed based on the ST signal (reset signal) and the CLK signal (clock signal) to write and read data to and from the RAM 3 and the EEPROM 4, and at the same time I / O.
Data (represented by I / O in the figure) is transmitted / received to / from an external device via the interface. The CPU 1 and the ROM 2 constitute a processing means.

【0021】ROM2としてはPROM(Programmable
ROM)が用いられ、予め所望のプログラムが格納され
る。また、不揮発性データ記憶手段としてEEPROM
4を用いる構成を示したが、これに限らず、例えば、S
RAM(Static RAM)にバッテリを組み合わせて不揮発
性メモリを構成し、これを不揮発性データ記憶手段とし
て用いてもよい。さらに、処理手段としてCPU1およ
びROM2を用いる構成を示したが、これに限らず、ハ
ードワイヤードロジック等を用いるようにしてもよい。
The ROM 2 is a PROM (Programmable
ROM) is used to store a desired program in advance. In addition, as a non-volatile data storage means, an EEPROM
However, the configuration is not limited to this, and for example, S
A nonvolatile memory may be configured by combining a battery with a RAM (Static RAM), and this may be used as the nonvolatile data storage means. Further, although the configuration using the CPU 1 and the ROM 2 as the processing means is shown, the invention is not limited to this, and hard wired logic or the like may be used.

【0022】次に、上記構成のICカードにおける参照
鍵の認証の前処理について説明する。図2は本実施形態
におけるICカードの認証の前処理の一例を示すフロー
チャートであり、この図に示される処理は、ROM2に
格納されたプログラムを実行するCPU1によって行わ
れる。ただし、使用する全ての参照鍵の番号は、本プロ
グラム中に予め記述されているものとする。また、本プ
ログラムは、各参照鍵に対応したRAM3上の領域を、
それぞれ対応する参照鍵の照合状態(照合結果)を表す
フラグとして利用するよう記述されている。
Next, a pre-process for authenticating the reference key in the IC card having the above configuration will be described. FIG. 2 is a flowchart showing an example of the pre-processing of the IC card authentication according to the present embodiment, and the processing shown in this figure is performed by the CPU 1 which executes the program stored in the ROM 2. However, all the reference key numbers to be used shall be described in advance in this program. In addition, this program stores the area on the RAM 3 corresponding to each reference key,
It is described to be used as a flag indicating the matching state (matching result) of each corresponding reference key.

【0023】この図に示されるように、一連の動作に先
立って外部からRST信号が供給されICカードが初期
化されると(ステップSD1)、CPU1はRAM3上
のフラグを全て「照合済み状態」を表すものに設定する
(ステップSD2)。次に、CPU1はEEPROM4
において第1番目の参照鍵(以後、参照鍵1)を検索す
る(ステップSD3)。この検索において、参照鍵1が
見つけ出された場合には、CPU1は、見つけ出した参
照鍵1に対応するフラグを「未照合状態」に変更する
(ステップSD4,SD5)。
As shown in this figure, when an RST signal is externally supplied and the IC card is initialized prior to a series of operations (step SD1), the CPU 1 sets all the flags on the RAM 3 to the "verified state". Is set (step SD2). Next, the CPU 1 is the EEPROM 4
In step S3, the first reference key (hereinafter referred to as reference key 1) is searched. When the reference key 1 is found in this search, the CPU 1 changes the flag corresponding to the found reference key 1 to the "unverified state" (steps SD4 and SD5).

【0024】参照鍵1が見つかった場合にも見つからな
かった場合にも、処理はステップSD6へ進み、以後、
参照鍵2,3,…,nについて前述と同様の処理が行わ
れる(ただし、nは1以上の整数)。そして、参照鍵n
に対する処理が終了すると、ICカードはコマンド待ち
状態となる(ステップSD3n+3)。上述した前処理
の結果、RAM3上の各フラグは、EEPROM4上に
該当する参照鍵が存在する場合には「未照合状態」、存
在しない場合には「照合済み状態」に設定される。
Whether or not the reference key 1 is found, the process proceeds to step SD6, and thereafter,
The same processing as described above is performed for the reference keys 2, 3, ..., N (where n is an integer of 1 or more). And the reference key n
When the processing for (1) is completed, the IC card enters a command waiting state (step SD3n + 3). As a result of the above-described pre-processing, each flag on the RAM 3 is set to the "unverified state" when the corresponding reference key exists on the EEPROM 4, and to the "verified state" when it does not exist.

【0025】次に、上述した前処理を前提にして行われ
るICカードの発行処理について説明する。図3は本実
施形態によるICカードの発行処理の一例を示すフロー
チャートであり、この発行処理は前述した前処理に後続
して行われるものである。発行処理開始時点において参
照鍵1〜nはいずれもEEPROM4に格納されていな
いため、前述した前処理後には、RAM3上の全てのフ
ラグは「照合済み状態」に設定されている。
Next, the IC card issuing process performed on the premise of the above-mentioned preprocessing will be described. FIG. 3 is a flowchart showing an example of the IC card issuance processing according to the present embodiment, and this issuance processing is performed subsequent to the above-described preprocessing. Since none of the reference keys 1 to n are stored in the EEPROM 4 at the start of the issuing process, all the flags on the RAM 3 are set to the “verified state” after the above-mentioned preprocessing.

【0026】このような状態において、ROM2に格納
されたプログラムを実行するCPU1は、最終的なアク
セス条件でルートディレクトリを作成し、MF(マスタ
ーファイル)を生成する(ステップSE1)。ここで、
従来と異なるのは、FC(ファイルクリエイト)コマン
ドに対するアクセス条件を一時的にフリーにするのでは
なく、最終的に採用するアクセス条件でMFを生成する
点である。
In such a state, the CPU 1 which executes the program stored in the ROM 2 creates a root directory under the final access condition and creates an MF (master file) (step SE1). here,
What is different from the conventional one is that the access condition for the FC (file create) command is not temporarily set free, but the MF is generated under the access condition finally adopted.

【0027】次に、参照鍵データ1〜nを含む複数の参
照鍵ファイル1〜nを順次生成する(ステップSE2〜
SEn+1)。上述したように、MFの下層にEFを生
成するためのアクセス条件はフリーではない。したがっ
て、FCコマンドの処理は、図4に示されるようなフロ
ーとなる。
Next, a plurality of reference key files 1-n including the reference key data 1-n are sequentially generated (step SE2-
SEn + 1). As described above, the access condition for generating the EF under the MF is not free. Therefore, the processing of the FC command has a flow as shown in FIG.

【0028】図4において、CPU1は、MFに対する
FCコマンドを受信すると(ステップSF1)、MFの
管理データから照合済みであるべき参照鍵の番号を読み
出し、当該番号に対応したフラグの照合状態を調べる
(ステップSF2)。その結果、該当するフラグの全て
が「照合済み状態」であれば、FCコマンドが処理さ
れ、EFが生成される(ステップSF3,SF4)。逆
に、該当するフラグの少なくとも一つが「未照合状態」
であれば、FCコマンドの実行は禁止される。
In FIG. 4, when the CPU 1 receives the FC command for the MF (step SF1), it reads out the reference key number to be verified from the management data of the MF, and checks the verification state of the flag corresponding to the number. (Step SF2). As a result, if all the corresponding flags are in the “verified state”, the FC command is processed and EF is generated (steps SF3 and SF4). On the contrary, at least one of the corresponding flags is “unverified”
If so, execution of the FC command is prohibited.

【0029】前述したように、発行処理の開始時点では
RAM3上の全てのフラグは「照合済み状態」に設定さ
れているため、発行処理において参照鍵ファイルを生成
するためのFCコマンドの実行が禁止されることはな
い。図4に示される処理が各参照鍵ファイルについて繰
り返され、EF、ここでは参照鍵ファイル1〜nが生成
される。そして、必要なEFの生成が終了すると、発行
処理が完了する。
As described above, since all the flags on the RAM 3 are set to the "verified state" at the start of the issuing process, execution of the FC command for generating the reference key file is prohibited in the issuing process. It will not be done. The process shown in FIG. 4 is repeated for each reference key file to generate EF, here, reference key files 1 to n. Then, when the generation of the required EF is completed, the issuing process is completed.

【0030】発行処理完了後の参照鍵の認証処理は、図
9に示される従来のものと同一のフローになるため、そ
の説明を省略する。以上説明したように、EEPROM
4に存在しない参照鍵のフラグを「照合済み状態」を表
すよう設定するため、発行処理において、参照鍵ファイ
ルを作成する前に、MFに最終的なアクセス条件を設定
することができる。しかも、実運用に備えてMFのアク
セス条件を変更する機能を設ける必要がなく、プログラ
ム容量を削減することができる。
Since the reference key authentication process after the issuing process is completed is the same as the conventional process shown in FIG. 9, its description is omitted. As described above, the EEPROM
Since the flag of the reference key that does not exist in No. 4 is set to indicate the “verified state”, the final access condition can be set in the MF before the reference key file is created in the issuing process. Moreover, it is not necessary to provide a function for changing the access condition of the MF in preparation for actual operation, and the program capacity can be reduced.

【0031】なお、本実施形態においては、フラグをR
AM3に記憶させたが、EEPROM4に記憶させても
良いことは言うまでもない。また、参照鍵の数について
は、ROM2に格納されたプログラム中に記述せずに、
EEPROM4の特定領域に記憶させるようにしてもよ
い。この場合、参照鍵の数を任意に変更できるという効
果が得られる。
In this embodiment, the flag is set to R.
Although it is stored in the AM 3, it goes without saying that it may be stored in the EEPROM 4. The number of reference keys is not described in the program stored in the ROM 2 and
You may make it memorize | store in the specific area | region of EEPROM4. In this case, there is an effect that the number of reference keys can be changed arbitrarily.

【0032】[0032]

【発明の効果】以上説明したように、本発明によれば、
不揮発性データ記憶手段に格納されていない参照鍵の照
合結果を「一致」、不揮発性データ記憶手段に格納され
ている参照鍵の照合結果を「不一致」とし、照合結果が
「不一致」である参照鍵を必要とする命令の実行を禁止
したことにより、参照鍵が不揮発性データ記憶手段内に
存在していない場合にも、この参照鍵を必要とする命令
を実行できる。したがって、ファイル生成後のアクセス
条件の書き換えが不要になり、発行処理を簡素とするこ
とができる。また、アクセス条件の書き換え機能を設け
る必要がないので、処理手段のプログラム容量を削減す
ることができる。
As described above, according to the present invention,
Reference in which the matching result of the reference key not stored in the non-volatile data storage means is “match”, the matching result of the reference key stored in the nonvolatile data storage means is “mismatch”, and the matching result is “mismatch” By prohibiting the execution of the command requiring the key, the command requiring the reference key can be executed even when the reference key does not exist in the nonvolatile data storage means. Therefore, it is not necessary to rewrite the access condition after the file is generated, and the issuing process can be simplified. Further, since it is not necessary to provide a rewriting function of the access condition, the program capacity of the processing means can be reduced.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明の一実施形態による可搬型データ担体
(ICカード)の構成図である。
FIG. 1 is a configuration diagram of a portable data carrier (IC card) according to an embodiment of the present invention.

【図2】 同ICカードにおける認証の前処理の一例を
示すフローチャートである。
FIG. 2 is a flowchart showing an example of pre-authentication processing in the IC card.

【図3】 同ICカードの発行処理の一例を示すフロー
チャートである。
FIG. 3 is a flowchart showing an example of an issuing process of the IC card.

【図4】 同ICカードにおけるFCコマンドの処理の
一例を示すフローチャートである。
FIG. 4 is a flowchart showing an example of FC command processing in the IC card.

【図5】 ICカードにおけるファイルおよびディレク
トリについて説明するためのブロック図である。
FIG. 5 is a block diagram for explaining files and directories in the IC card.

【図6】 ICカードにおけるディレクトリについて説
明するための図である。
FIG. 6 is a diagram for explaining a directory in an IC card.

【図7】 従来のICカードの発行処理の一例を示すフ
ローチャートである。
FIG. 7 is a flowchart showing an example of a conventional IC card issuing process.

【図8】 同ICカードにおいて発行処理完了後の一連
の動作開始時に行われる前処理の一例を示すフローチャ
ートである。
FIG. 8 is a flowchart showing an example of pre-processing performed at the start of a series of operations after completion of the issuing processing in the IC card.

【図9】 同一連の動作における照合コマンドの処理を
示すフローチャートである。
FIG. 9 is a flowchart showing processing of a collation command in the same series of operations.

【符号の説明】[Explanation of symbols]

1…CPU、2…ROM、3…RAM、4…EEPRO
M。
1 ... CPU, 2 ... ROM, 3 ... RAM, 4 ... EEPRO
M.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 外部機器との間でデータを送受する通信
手段と、 命令の実行前に照合されるべき参照鍵を格納する不揮発
性データ記憶手段と、 揮発性メモリと、 前記通信手段を介して受信した命令を実行するととも
に、前記参照鍵と前記通信手段を介して入力されるデー
タとを照合し、両者が一致したか否かの照合結果を前記
揮発性メモリに前記参照鍵毎に記憶させる処理手段とを
具備したカード形態等の可搬型データ担体であって、 前記処理手段は、命令の実行前に照合されるべき参照鍵
に対する照合結果が不一致を表すものである場合にはこ
の命令の実行を禁止するとともに、担体初期化時には前
記不揮発性データ記憶手段に格納されている全ての参照
鍵に対する照合結果を不一致を表すものとし、前記不揮
発性データ記憶手段に格納されていない全ての参照鍵に
対する照合結果を一致を表すものとして前記揮発性メモ
リに記憶させることを特徴とする可搬型データ担体。
1. A communication means for transmitting and receiving data to and from an external device, a non-volatile data storage means for storing a reference key to be collated before execution of an instruction, a volatile memory, and the communication means. The reference key and the data input via the communication unit are collated, and the collation result of whether or not they match each other is stored in the volatile memory for each of the reference keys. A portable data carrier in the form of a card including a processing means for causing the processing means to execute a command if the verification result for the reference key to be verified before execution of the command indicates a mismatch. Is prohibited, and at the time of carrier initialization, the verification results for all the reference keys stored in the non-volatile data storage means are represented as non-coincidence and stored in the non-volatile data storage means. Portable data carrier, characterized in that to be stored in the volatile memory to represent the matching matching results for all the reference key that is not.
【請求項2】 外部機器との間でデータを送受する通信
手段と、 命令の実行前に照合されるべき参照鍵を格納する不揮発
性データ記憶手段と、 前記通信手段を介して受信した命令を実行するととも
に、前記参照鍵と前記通信手段を介して入力されるデー
タとを照合し、両者が一致したか否かの照合結果を前記
不揮発性データ記憶手段に前記参照鍵毎に記憶させる処
理手段とを具備したカード形態等の可搬型データ担体で
あって、 前記処理手段は、命令の実行前に照合されるべき参照鍵
に対する照合結果が不一致を表すものである場合にはこ
の命令の実行を禁止するとともに、担体初期化時には前
記不揮発性データ記憶手段に格納されている全ての参照
鍵に対する照合結果を不一致を表すものとし、前記不揮
発性データ記憶手段に格納されていない全ての参照鍵に
対する照合結果を一致を表すものとして前記不揮発性デ
ータ記憶手段に記憶させることを特徴とする可搬型デー
タ担体。
2. Communication means for transmitting and receiving data to and from an external device, non-volatile data storage means for storing a reference key to be collated before execution of an instruction, and an instruction received through the communication means. Processing means for executing and collating the reference key with data input via the communication means, and storing a collation result of whether or not they match each other in the nonvolatile data storage means for each reference key A portable data carrier in the form of a card, including: and the processing means executes the instruction if the comparison result with respect to the reference key to be verified before the execution of the instruction indicates a mismatch. In addition to prohibiting, when the carrier is initialized, the comparison result with respect to all the reference keys stored in the non-volatile data storage means is represented as non-coincidence and stored in the non-volatile data storage means. A portable data carrier, characterized in that the non-volatile data storage means stores the verification results for all non-reference keys as a match.
JP8135058A 1996-05-29 1996-05-29 Portable data carrier Pending JPH09319848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8135058A JPH09319848A (en) 1996-05-29 1996-05-29 Portable data carrier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8135058A JPH09319848A (en) 1996-05-29 1996-05-29 Portable data carrier

Publications (1)

Publication Number Publication Date
JPH09319848A true JPH09319848A (en) 1997-12-12

Family

ID=15142919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8135058A Pending JPH09319848A (en) 1996-05-29 1996-05-29 Portable data carrier

Country Status (1)

Country Link
JP (1) JPH09319848A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002082279A1 (en) * 2001-03-30 2002-10-17 Sony Corporation Data storage apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002082279A1 (en) * 2001-03-30 2002-10-17 Sony Corporation Data storage apparatus
US7376973B2 (en) 2001-03-30 2008-05-20 Sony Corporation Data storage apparatus

Similar Documents

Publication Publication Date Title
JP3015377B2 (en) IC card
US5093785A (en) Portable electronic device with memory having data pointers and circuitry for determining whether a next unwritten memory location exist
EP0330404B1 (en) Integrated circuit cards
KR950007895B1 (en) Portable electronic apparatus
US5225664A (en) Mutual authentication system
US6371377B2 (en) Card type recording medium and access control method for card type recording medium and computer-readable recording medium having access control program for card type recording medium recorded
JP2856393B2 (en) Portable electronic devices
JP3568970B2 (en) IC card issuing device
RU2607622C2 (en) Recording of data into smart card nonvolatile memory
JPH0259988A (en) Portable electronic device
JP2557838B2 (en) IC card
JPH1091738A (en) Post-initialization method for chip card
JP3178881B2 (en) Portable electronic devices
JP3545627B2 (en) Portable electronic devices
JPH09319848A (en) Portable data carrier
JP2695857B2 (en) Portable electronic devices
JPH09265254A (en) Mutual authentication system for information recording medium
JP2005011161A (en) Ic card and ic card program
JPH0654507B2 (en) Portable electronic device
EP1384197B1 (en) Method of manufacturing smart cards
JP3251579B2 (en) Portable electronic devices
JP2537200B2 (en) Portable electronic devices
JP2609645B2 (en) Portable electronic devices
JP3209994B2 (en) Portable electronic devices
JPH02259893A (en) Portable semiconductor memory