JPH10105472A - Method for managing access of memory - Google Patents

Method for managing access of memory

Info

Publication number
JPH10105472A
JPH10105472A JP8278877A JP27887796A JPH10105472A JP H10105472 A JPH10105472 A JP H10105472A JP 8278877 A JP8278877 A JP 8278877A JP 27887796 A JP27887796 A JP 27887796A JP H10105472 A JPH10105472 A JP H10105472A
Authority
JP
Japan
Prior art keywords
file
key
level
access
setting
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
JP8278877A
Other languages
Japanese (ja)
Inventor
Yasuo Iijima
康雄 飯島
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP8278877A priority Critical patent/JPH10105472A/en
Priority to ES97105146T priority patent/ES2174140T3/en
Priority to SG1997000985A priority patent/SG54485A1/en
Priority to DE69710798T priority patent/DE69710798T2/en
Priority to PT97105146T priority patent/PT798674E/en
Priority to EP97105146A priority patent/EP0798674B1/en
Priority to TW086103926A priority patent/TW358190B/en
Priority to US08/825,387 priority patent/US5929428A/en
Priority to CN97110316.XA priority patent/CN1129851C/en
Publication of JPH10105472A publication Critical patent/JPH10105472A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To transfer the right of access to a data file or a memory area from a high-order person to a low-order person by eliminating a participation to the data file from the high-order person. SOLUTION: In an IC card constituted by dividing a memory into plural files, the low-order person changes a transport key which is set by the high- order person into the key (b') which can be known only by himself while referring to an access condition for changing the key, which is set in the key EF, turns-on a transport bit which is given to the data file(DF), generates data EF-b required by himself under the data file(DF) by referring to an EF generating access condition which is set in DF and generates the key EF-c required by himself under DF by referring to the EF generating access condition which is set in DF.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、たとえば、不揮発
性メモリ、および、これらを制御するCPUなどの制御
素子を有するICチップを内蔵したICカードなどの電
子装置において、上記メモリ内に分割設定される複数の
ファイルに対してのアクセスを管理するメモリのアクセ
ス管理方法に関する。
The present invention relates to an electronic device such as an IC card having a built-in non-volatile memory and an IC chip having a control element such as a CPU for controlling the non-volatile memory. A memory access management method for managing access to a plurality of files.

【0002】[0002]

【従来の技術】最近、携帯可能なデータ記憶媒体とし
て、不揮発性のデータメモリ、および、これらを制御す
るCPU(セントラル・プロセッシング・ユニット)な
どの制御素子を有するICチップを内蔵したICカード
が注目されている。
2. Description of the Related Art Recently, as a portable data storage medium, a non-volatile data memory and an IC card having a built-in IC chip having a control element such as a CPU (Central Processing Unit) for controlling the same have been attracting attention. Have been.

【0003】この種のICカードは、内蔵するデータメ
モリを複数のファイルに分割し、かつ、個々のファイル
には、利用アプリケーションが運用時に必要なデータな
どが格納されるようになっており、外部装置からアプリ
ケーション識別名などを入力することにより、選択的に
対応ファイルのみが使用可能な状態を実現するようにな
っている。このため、複数のアプリケーションデータを
ファイル分けし、1枚のICカードに格納することによ
り、多目的利用が可能なようになっている。
[0003] In this type of IC card, a built-in data memory is divided into a plurality of files, and each file stores data necessary for operation of an application to be used. By inputting an application identification name or the like from the device, a state where only the corresponding file can be selectively used is realized. Therefore, by dividing a plurality of application data into files and storing them on one IC card, multi-purpose use is possible.

【0004】さて、この多目的を指向するICカードに
おいては、カード発行者及びアプリケーション提供者の
権限を明確に区分する事が要求される。
In this multipurpose IC card, it is required that the authority of the card issuer and the authority of the application provider be clearly separated.

【0005】この権限とは、各当事者に割り当てられて
いる暗証番号が照合された際、ICカードへのアクセス
の可否範囲を明確にする事で実現できる。
This authority can be realized by clarifying the range of access to the IC card when the passwords assigned to the parties are collated.

【0006】従来のICカードでは、カード発行者がア
プリケーション提供者に対してファイルを提供する際、
当該ファイルにアプリケーション提供者に対するトラン
スポートキーを設定する。アプリケーション提供者は、
このカードを受け取ると、まず当該トランスポートキー
を自身のみが知りえる提供者キーに書き換え、この後、
アプリケーション提供者に与えられたファイル内の管理
を、この提供者キーにて行えるようになされている。
In a conventional IC card, when a card issuer provides a file to an application provider,
Set the transport key for the application provider in the file. The application provider
When you receive this card, you must first replace the transport key with a provider key that only you can know,
The management in the file given to the application provider can be performed by the provider key.

【0007】さてここで、ファイル内の管理を行える環
境を定義する情報として、一般的に、当該ファイルに付
与されたアクセス条件が挙げられる。つまり、カード発
行者がアプリケーション提供者に提供するファイルに
は、アプリケーション提供者キーの照合が必要というア
クセス条件が付与されるべきである。
[0007] Here, information defining an environment in which management within a file can be performed generally includes an access condition given to the file. That is, the file provided by the card issuer to the application provider should be given an access condition that the application provider key needs to be verified.

【0008】上述したファイル内の管理行為の一つとし
て、アプリケーションにて使用するファイルを設定する
ことが挙げられる。この行為には、先に述べたアプリケ
ーション提供者用トランスポートキーの設定をも含まれ
ていることを考える。
One of the management actions in the above-mentioned file is to set a file to be used in an application. It is considered that this action includes the setting of the transport key for the application provider described above.

【0009】この場合、ファイル内の管理をアプリケー
ション提供者のみにて行わせるように当該ファイルのア
クセス条件を設定すると、発行者がアプリケーション提
供者用トランスポートキーを設定するために満足しなけ
ればならないアプリケーション提供者キーが存在してい
ないため、発行者は、当該トランスポートキーを永久に
設定できない事になる。
In this case, if the access condition of the file is set so that only the application provider manages the file, the publisher must be satisfied to set the transport key for the application provider. Since the application provider key does not exist, the issuer cannot set the transport key forever.

【0010】これを回避するために、当該ファイルに与
えるアクセス条件として、アプリケーション提供者キー
または発行者キーのいずれかと設定する方法が考えられ
る。
In order to avoid this, a method of setting either an application provider key or an issuer key as an access condition given to the file is conceivable.

【0011】つまり、発行者が当該ファイルにアプリケ
ーション提供者用トランスポートキーを設定する場合、
発行者キーを照合することによりアクセス条件を満足さ
せ、一方、アプリケーション提供者が当該ファイル内の
他の管理行為を行う場合には、自身のアプリケーション
提供者キーを照合することによりアクセス条件を満足さ
せるようにアクセス条件を設定すれば良い。
That is, when the publisher sets the transport key for the application provider in the file,
The access condition is satisfied by collating the issuer key, while the access condition is satisfied by collating the own application provider key when the application provider performs another management action in the file. The access condition may be set as follows.

【0012】しかしながら、この場合、当該ファイルに
設定されているアクセス条件は発行者とアプリケーショ
ン提供者の双方によりアクセス可能となり、当該ファイ
ルへの管理権限は、発行者(上位者)からアプリケーシ
ョン提供者(下位者)に委譲されたとは言えないことに
なる。
However, in this case, the access conditions set for the file can be accessed by both the publisher and the application provider, and the management authority for the file is changed from the publisher (higher-ranked person) to the application provider ( It can not be said that it was delegated to (lower).

【0013】[0013]

【発明が解決しようとする課題】上記したように、発行
者が当該ファイルにアプリケーション提供者用トランス
ポートキーを設定する場合、発行者キーを照合すること
によりアクセス条件を満足させ、一方、アプリケーショ
ン提供者が当該ファイル内の他の管理行為を行う場合に
は、自身のアプリケーション提供者キーを照合すること
によりアクセス条件を満足させた場合、当該ファイルに
設定されているアクセス条件により、当該ファイルへの
管理権限は、発行者(上位者)からアプリケーション提
供者(下位者)に委譲されたとは言えないという問題が
あった。
As described above, when the publisher sets the transport key for the application provider in the file, the access condition is satisfied by checking the publisher key, while the application is provided. When the user performs another management action in the file, if the access condition is satisfied by checking the application provider key of the user, the access condition set in the file is There has been a problem that the management authority cannot be said to be delegated from the issuer (superordinate) to the application provider (subordinate).

【0014】そこで、この発明は、たとえば、上位者か
らのデータファイルへの関与をなくし、上位者から下位
者へ当該データファイルまたはメモリ領域へのアクセス
の権限を委譲することができるメモリのアクセス管理方
法を提供することを目的とする。
Accordingly, the present invention provides, for example, a memory access management which can eliminate the involvement of a superior in a data file and delegate the right to access the data file or the memory area from a superior to a subordinate. The aim is to provide a method.

【0015】[0015]

【課題を解決するための手段】本発明のメモリのアクセ
ス管理方法は、メモリを複数のファイルに分割し、この
分割した複数のファイルに対してのアクセスをそれぞれ
管理するもので、当該メモリを用いたシステムの上位者
にてファイル配下に第1のキーが予め設定されており、
当該メモリを用いたシステムの下位者が新たにキーを設
定可能に構成されており、かつ、これらのキーの照合に
よって上記ファイルへのアクセスを可能とするメモリの
アクセス管理方法であって、上記上位者が設定した第1
のキーを、この第1のキーに設定されているキー変更用
のアクセス条件を参照して下位者のみが知りえる第2の
キーに変更し、この第2のキーに変更された際、上記上
位者によるファイル配下のキー創成を拒絶するようにし
たことを特徴とする。
A memory access management method according to the present invention divides a memory into a plurality of files and manages access to the plurality of divided files, respectively. The first key is set in advance under the file by the superior of the system that
A memory access management method in which a lower party of a system using the memory is capable of setting a new key and enabling access to the file by collation of these keys, First set by the person
Is changed to a second key which can be known only by a lower order person by referring to the access condition for key change set in the first key, and when the key is changed to the second key, It is characterized in that the creation of a key under the file by a superior is rejected.

【0016】本発明のメモリのアクセス管理方法は、メ
モリを複数のファイルに分割し、この分割した複数のフ
ァイルに対してのアクセスをそれぞれ管理するもので、
当該メモリを用いたシステムの上位者にてファイル配下
に第1のキーが予め設定されており、当該メモリを用い
たシステムの下位者が新たにキーを設定可能に構成され
ており、かつ、これらのキーの照合によって上記ファイ
ルへのアクセスを可能とするメモリのアクセス管理方法
であって、上記上位者が設定した第1のキーを、この第
1のキーに設定されているキー変更用のアクセス条件を
参照して下位者のみが知りえる第2のキーに変更し、上
記上位者によるファイル配下のキー創成を拒絶するよう
にしたことを特徴とする。
A memory access management method according to the present invention divides a memory into a plurality of files and manages access to the plurality of divided files, respectively.
A first key is set beforehand under a file by a higher-ranking person of the system using the memory, and a lower-ranking person of the system using the memory can newly set a key. A memory access management method for enabling access to said file by collating said key, wherein a first key set by said higher-ranking person is changed to an access for key change set in said first key. It is characterized in that the condition is changed to a second key which can be known only by a lower order person by referring to the condition, and the creation of a key under the file by the upper order person is rejected.

【0017】本発明のファイルアクセス管理方法は、上
位のファイルと下位のファイルとからなるツリー構造の
ファイルへのアクセスを管理するファイルアクセス管理
方法において、上位の管理者が管理する上位のファイル
に対してアクセス条件を設定し、上位の管理者から下位
の管理者に対して提供するファイルにアクセス条件を設
定し、上位の管理者から下位の管理者に対する受け渡し
のためのトランスポートキーを下位のファイルに設定す
る場合は、当該ファイルの上位のファイルのアクセス条
件を参照し、この上位のファイルのアクセス条件を満足
している場合にトランスポートキーを下位のファイルに
設定し、下位のファイルの配下にファイルを設定する場
合は当該下位ファイルのアクセス条件を参照してこのア
クセス条件を満足している場合にファイルの設定を行う
ようにしたことを特徴とする。
According to the file access management method of the present invention, in a file access management method for managing access to a file having a tree structure composed of a higher-order file and a lower-order file, To set the access conditions for the file to be provided from the higher level administrator to the lower level administrator, and set the transport key for the transfer from the higher level administrator to the lower level administrator to the lower level file. To set the transport key to the lower file, refer to the access condition of the upper file of the file, and if the access condition of the upper file is satisfied, set the transport key to the lower file. When setting a file, refer to the access condition of the lower-level file to satisfy this access condition. Characterized in that to perform the setting of the file if it has.

【0018】本発明の携帯可能情報処理装置は、上位の
ファイルと下位のファイルとからなるツリー構造のファ
イルを有する携帯可能情報処理装置において、アクセス
条件が設定され上位の管理者が利用するための上位のフ
ァイルと、アクセス条件が設定され上位の管理者から提
供され下位の管理者が利用する下位のファイルと、上位
のファイルのアクセス条件を参照してこの上位のファイ
ルのアクセス条件を満足している場合に上位の管理者か
ら下位の管理者に対する受け渡しのためのトランスポー
トキーを下位のファイルに設定する第1の手段と、下位
ファイルのアクセス条件を参照してこのアクセス条件を
満足している場合に下位のファイルの配下にファイルを
設定する第2の手段とから構成されている。
According to the portable information processing apparatus of the present invention, in a portable information processing apparatus having a tree-structured file composed of an upper-level file and a lower-level file, an access condition is set and used by an upper-level administrator. Satisfy the access condition of this upper file by referring to the upper file, the lower file which access conditions are set and provided by the upper administrator and used by the lower administrator, and the access condition of the upper file. In this case, the first means for setting a transport key for delivery from a higher-level manager to a lower-level manager in a lower-level file, and the access condition of the lower-level file is referred to to satisfy the access condition. And a second means for setting a file under a lower-level file.

【0019】本発明の情報処理装置用制御プログラムを
記憶した媒体は、上位のファイルと下位のファイルとか
らなるツリー構造のファイルを創成し、かつ制御手段に
より各ファイルへのアクセス管理を行う情報処理装置用
制御プログラムを記憶した媒体において、前記制御プロ
グラムは前記制御手段に対して、上位の管理者によりア
クセス条件が設定された上位のファイルを創成させるス
テップと、上位の管理者から提供され下位の管理者が利
用するためにアクセス条件が設定され下位のファイルを
創成させるステップと、上位のファイルのアクセス条件
を参照してこの上位のファイルのアクセス条件を満足し
ている場合に上位の管理者から下位の管理者に対する受
け渡しのためのトランスポートキーを下位のファイルに
設定させるステップと、下位ファイルのアクセス条件を
参照してこのアクセス条件を満足している場合に下位の
ファイルの配下にファイルを設定させるステップとから
構成されこの制御プログラムを記憶したことを特徴とす
る。
The medium storing the control program for an information processing apparatus according to the present invention is an information processing apparatus which creates a file having a tree structure composed of an upper file and a lower file, and manages access to each file by a control means. In a medium storing a device control program, the control program causes the control means to create a higher-level file in which access conditions are set by a higher-level manager; and a lower-level file provided by a higher-level manager. A step of creating an lower-level file in which access conditions are set for use by an administrator; and a step of referring to an access condition of a higher-level file, and if the access condition of the higher-level file is satisfied, a higher-level administrator A step to set the transport key for transfer to the subordinate administrator in the subordinate file. When, it is composed of a step of setting the file under the subordinate file when it refers to the access condition of the subordinate file satisfies the access conditions characterized by storing the control program.

【0020】[0020]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0021】図1は、本実施の形態に係る携帯可能電子
装置としてのICカードが適用される、たとえば、金融
システムあるいはショッピングシステムなどの端末装置
として用いられるカード取扱装置の構成例を示すもので
ある。すなわち、この装置は、ICカード1をカードリ
ーダ・ライタ2を介してCPUなどからなる制御部3と
接続可能とするとともに、制御部3にキーボード4、C
RTディスプレイ装置5、プリンタ6、および、フロッ
ピーディスク装置7を接続して構成される。
FIG. 1 shows an example of a configuration of a card handling device used as a terminal device such as a financial system or a shopping system to which an IC card as a portable electronic device according to the present embodiment is applied. is there. That is, this device allows the IC card 1 to be connected to the control unit 3 including a CPU or the like via the card reader / writer 2 and the keyboard 4
It is configured by connecting an RT display device 5, a printer 6, and a floppy disk device 7.

【0022】図2は、ICカード1の構成例を示すもの
であり、制御部としての制御素子(たとえば、CPU)
11、記憶内容が消去可能な不揮発性のデータメモリ1
2、ワーキングメモリ13、プログラムメモリ14、お
よび、カードリーダ・ライタ2との電気的接触を得るた
めのコンタクト部15によって構成されている。これら
のうち、破線内の部分(制御素子11、データメモリ1
2、ワーキングメモリ13、プログラムメモリ14)は
1つのICチップ(あるいは複数)10で構成されて、
さらに、実開平2−17381号にて知られるように、
ICチップ10とコンタクト部15とが一体的にICモ
ジュール化されて、ICカード本体内に埋設されてい
る。
FIG. 2 shows an example of the configuration of the IC card 1, in which a control element (for example, a CPU) as a control unit is shown.
11. Non-volatile data memory 1 whose storage contents can be erased
2, a working memory 13, a program memory 14, and a contact portion 15 for obtaining electrical contact with the card reader / writer 2. Of these, the portions within the broken lines (control element 11, data memory 1
2, the working memory 13 and the program memory 14) are composed of one IC chip (or a plurality)
Furthermore, as known from Japanese Utility Model Laid-Open No. 2-17381,
The IC chip 10 and the contact portion 15 are integrated into an IC module and embedded in the IC card body.

【0023】データメモリ12は、各種データの記憶に
使用され、たとえば、EEPROMなどで構成されてい
る。ワーキングメモリ13は、制御素子11が処理を行
なう際の処理データを一時的に保持するためのメモリで
あり、たとえば、RAMなどで構成される。プログラム
メモリ14は、たとえば、マスクROMで構成されてお
り、制御素子11のプログラムなどを記憶するものであ
る。
The data memory 12 is used for storing various data, and is composed of, for example, an EEPROM. The working memory 13 is a memory for temporarily storing processing data when the control element 11 performs processing, and is configured by, for example, a RAM. The program memory 14 is configured by, for example, a mask ROM, and stores a program of the control element 11 and the like.

【0024】データメモリ12は、たとえば、図3に示
すように、制御領域120、ディレクトリ121、空き
領域122、および、エリア群123に分割されてい
る。エリア群123は、複数のデータエリアおよびキー
エリアを有することができ、かつ、データファイル(D
F)と呼ばれる概念でグループ化することができる。な
お、後述するマスタファイル(MF)は、データファイ
ルの1つの形態として一括管理される。
The data memory 12 is divided into, for example, a control area 120, a directory 121, a free area 122, and an area group 123, as shown in FIG. The area group 123 can have a plurality of data areas and key areas, and has a data file (D
Groups can be grouped by a concept called F). Note that a master file (MF) described later is collectively managed as one form of a data file.

【0025】データファイルは、対応するアプリケーシ
ョンにて使用されるデータエリア、および、キーエリア
を一括して管理するためのファイルである。
The data file is a file for collectively managing a data area and a key area used by a corresponding application.

【0026】データエリアは、たとえば、取引データな
どのように、必要に応じて読み書きするためのデータを
格納するエリアである。
The data area is an area for storing data for reading and writing as necessary, such as transaction data.

【0027】キーエリアは、たとえば、暗証番号などの
格納に利用されているエリアであり、書込み/書換え/
照合の対象になり、読出しはできないようになってい
る。
The key area is an area used for storing, for example, a personal identification number.
It is a target of collation and cannot be read.

【0028】なお、これらのエリアは、図3に示すよう
に、エリア群123として一括して割当てられている。
また、これらのファイルあるいはエリアは、データメモ
リ12内のディレクトリ121を用いることにより、そ
れぞれの物理的位置などを制御素子11が認識するよう
になっている。
These areas are collectively allocated as an area group 123 as shown in FIG.
The control element 11 recognizes the physical position of each of these files or areas by using the directory 121 in the data memory 12.

【0029】さらに、図3の制御領域120には、エリ
ア群123の先頭アドレス情報、および、空き領域12
2の先頭アドレス情報が格納されている。
Further, in the control area 120 of FIG. 3, the start address information of the area group 123 and the free area 12
2 is stored.

【0030】図3のディレクトリ121は、図4に示す
ように、各データファイルおよびエリアに対応する各種
定義情報が格納される。
The directory 121 shown in FIG. 3 stores various definition information corresponding to each data file and area, as shown in FIG.

【0031】図4(a)は、データファイルの名称を定
義する情報である。この定義情報は、ディレクトリ12
1内でデータファイル名定義情報を識別するためのデー
タPTN、本データファイルに割当てられたファイル通
し番号DFSN、本データファイルの親ファイルの通し
番号PFSN、本データファイルに付与されたファイル
名DFnameおよびその長さを示すデータNL、および、
これらのデータの正当性をチェックするためのデータB
CCから構成される。
FIG. 4A shows information defining the name of a data file. This definition information is stored in the directory 12
1, the data PTN for identifying the data file name definition information, the file serial number DFSN assigned to this data file, the serial number PFSN of the parent file of this data file, the file name DFname given to this data file and its length Data NL indicating the
Data B for checking the validity of these data
It is composed of CC.

【0032】図4(b)は、データファイルの管理情報
を定義する情報である。この定義情報は、ディレクトリ
121内でデータファイル名定義情報を識別するための
データPTN、本データファイルに割当てられたファイ
ル通し番号DFSN、本データファイルの親ファイルの
通し番号PFSN、データファイルサイズDFS、本デ
ータファイルの付加情報が格納されるデータエリアを識
別するためのAAID、当該付加情報を出力するか否か
などを規定するTYPE、キーの種別を禁止するUC
F、データファイルのアクセス条件を示すDFAC、本
データファイルの状態を保持するためのDFST、本デ
ータファイルの配下に位置するデータファイルおよびエ
リアにより使用されているバイト数US、および、これ
らのデータの正当性をチェックするためのデータBCC
から構成される。
FIG. 4B shows information defining management information of a data file. The definition information includes data PTN for identifying data file name definition information in the directory 121, a file serial number DFSN assigned to the data file, a serial number PFSN of a parent file of the data file, a data file size DFS, and a data file. AAID for identifying the data area in which the additional information of the file is stored, TYPE for specifying whether or not to output the additional information, and UC for inhibiting the type of key
F, DFAC indicating the access condition of the data file, DFST for holding the state of the data file, the number of bytes US used by the data file and area located under the data file, and the Data BCC for checking validity
Consists of

【0033】ここでDFSTの特定ビット(例えば8ビ
ット目)は、該DFのトランスポートキーが変更された
か否かを示すトランスポートビットとして使用される。
Here, a specific bit (for example, the eighth bit) of the DFST is used as a transport bit indicating whether or not the transport key of the DF has been changed.

【0034】また、特にAAIDは、後述するデータフ
ァイル選択コマンドにてデータファイルが選択された際
に、必要に応じてそれに示されるデータエリアの内容を
出力する。
In particular, the AAID outputs the contents of the data area indicated by the data file as required when a data file is selected by a data file selection command described later.

【0035】図4(c)は、各種取引データなどを格納
するエリアを定義する情報である。この定義情報は、デ
ィレクトリ121内でエリア定義情報を識別するための
データPTN、本エリアが属するデータファイルの通し
番号DFSN、エリアに対してアクセスする際の識別番
号AID、エリアの先頭アドレスを示すATOP、エリ
アサイズを示すASIZ、エリアのアクセス条件を示す
AAC、エリアの状態を保持するAST、および、これ
らのデータの正当性をチェックするためのデータBCC
から構成される。
FIG. 4C shows information defining an area for storing various transaction data and the like. The definition information includes data PTN for identifying the area definition information in the directory 121, the serial number DFSN of the data file to which the area belongs, the identification number AID for accessing the area, ATOP indicating the head address of the area, ASIZ indicating the area size, AAC indicating the access condition of the area, AST holding the state of the area, and data BCC for checking the validity of these data
Consists of

【0036】図4(d)は、各種キーデータを格納する
エリアを定義する情報である。この定義情報は、ディレ
クトリ121内でキーエリア定義情報を識別するための
データPTN、本エリアが属するデータファイルの通し
番号DFSN、エリアに対してアクセスする際の識別番
号KID、エリアの先頭アドレスを示すKTOP、エリ
アサイズを示すKSIZ、キーの種別を示すCF、キー
のアクセス条件を示すKAC、キーの状態を保持するK
ST、および、これらのデータの正当性をチェックする
ためのデータBCCから構成される。
FIG. 4D shows information defining an area for storing various key data. The definition information includes data PTN for identifying key area definition information in the directory 121, a serial number DFSN of a data file to which the area belongs, an identification number KID for accessing the area, and a KTOP indicating a head address of the area. , KSIZ indicating an area size, CF indicating a key type, KAC indicating a key access condition, and K holding a key state
ST and data BCC for checking the validity of these data.

【0037】これらに使用されている識別情報PTN
は、たとえば、1バイトで構成されており、データファ
イルの名称を定義するもの(図4(a))に対しては
‘00’が、データファイルの管理情報を定義するもの
(図4(b))に対しては‘01’が、データエリアを
定義するもの(図中(c))に対しては‘02’が、ま
た、キーエリアを定義するもの(図4(d))に対して
は‘03’が、それぞれ使用される。
The identification information PTN used for these
Is composed of, for example, 1 byte, and "00" is used for defining the name of the data file (FIG. 4A), while management information for the data file is defined (FIG. 4B )), '02' for the one defining the data area ((c) in the figure), and '02' for the one defining the key area ((d) in FIG. 4). '03' is used respectively.

【0038】図5は、ファイルの構造例を示している。
この図において、DFnnはデータファイルを、Dnn
はデータエリアを、Knnはキーエリアを、それぞれ示
している。
FIG. 5 shows an example of the structure of a file.
In this figure, DFnn represents a data file, Dnn
Indicates a data area, and Knn indicates a key area.

【0039】図示するように、ICカード1内のメモリ
12において、マスタファイル(MF)の配下には、デ
ータファイルDF1,DF2が、また、キーエリアK0
0,K01、データエリアD00,D01が、それぞれ
設定されている。
As shown in the figure, in the memory 12 in the IC card 1, the data files DF1 and DF2 are located under the master file (MF), and the key area K0.
0, K01 and data areas D00, D01 are respectively set.

【0040】また、データファイルDF1の配下には、
データファイルDF1−1,DF1−2が、また、キー
エリアK11,K12、データエリアD11,D12
が、それぞれ設定されている。
Under the data file DF1,
The data files DF1-1 and DF1-2 have key areas K11 and K12 and data areas D11 and D12.
Are set respectively.

【0041】また、データファイルDF1−1の配下に
は、キーエリアK111,K112、データエリアD1
11/D112が、また、データファイルDF1−2の
配下には、キーエリアK121,K122、データエリ
アD121,D122が、それぞれ設定されている。
Under the data file DF1-1, key areas K111 and K112 and data areas D1
11 / D112, and under the data file DF1-2, key areas K121 and K122 and data areas D121 and D122 are set, respectively.

【0042】一方、データファイルDF2の配下には、
データファイルDF2−1,DF2−2が、また、キー
エリアK21,K22、データエリアD21,D22
が、それぞれ設定されている。
On the other hand, under the data file DF2,
The data files DF2-1 and DF2-2 have key areas K21 and K22 and data areas D21 and D22.
Are set respectively.

【0043】また、データファイルDF2−1の配下に
は、キーエリアK211,K212、データエリアD2
11,D212が、また、データファイルDF2−2の
配下には、キーエリアK221,K222、データエリ
アD221,D222が、それぞれ設定されている。
Under the data file DF2-1, key areas K211 and K212, data area D2
11 and D212, and key areas K221 and K222 and data areas D221 and D222 are set under the data file DF2-2.

【0044】これらの各種定義情報は、一括して図6に
示すように、ディレクトリ121に格納される。図示す
るように、各定義情報には、DFSN(ファイル通し番
号)が、ファイル創成時に自動的に付与される。このD
FSN、および、データファイル定義情報に格納される
親ファイルのシーケンス番号により、各ファイルの関連
状態を制御素子11が認識する。
These various types of definition information are collectively stored in a directory 121 as shown in FIG. As shown in the figure, DFSN (file serial number) is automatically assigned to each definition information when a file is created. This D
The control element 11 recognizes the related state of each file based on the FSN and the sequence number of the parent file stored in the data file definition information.

【0045】たとえば、データファイルDF1−1の定
義情報(通し番号#13)は、DFSNが‘03’、ま
た、PFSNが‘01’となっている。すなわち、本デ
ータファイルは、ファイルシーケンス番号‘03’が創
成時に付与され、同時に本データファイルがDF1の配
下に創成されることを認識し、データファイルDF1の
DFSN(‘01’)をPFSNとして付与する。
For example, in the definition information (serial number # 13) of the data file DF1-1, the DFSN is "03" and the PFSN is "01". That is, this data file is given a file sequence number '03' at the time of creation, and at the same time recognizes that this data file is created under the control of DF1, and gives DFSN ('01') of the data file DF1 as PFSN. I do.

【0046】図7は、データファイル(DF)創成のた
めの動作を説明するフローチヤートを示しており、以下
それについて説明する。ICカード1が、外部から入力
されるデータファイル創成コマンドを受信すると、ま
ず、使用可能状態、すなわち、カレント状態となってい
るデータファイル(以後、カレントDFと称す)を認識
する(ST1)。特に、ICカード1への電気的活性化
の直後は、カレントDFはマスタファイル(MF)とな
る。
FIG. 7 shows a flowchart for explaining the operation for creating a data file (DF), which will be described below. When the IC card 1 receives a data file creation command input from the outside, first, it recognizes a usable state, that is, a data file in a current state (hereinafter, referred to as a current DF) (ST1). In particular, immediately after the electrical activation of the IC card 1, the current DF becomes a master file (MF).

【0047】カレントDFを認識すると、次に、カレン
トDF定義情報中のアクセス条件情報のうち、ファイル
創成に関する情報を参照する。この条件と、後述するR
AM上の照合状態保持領域Aのみを比較し、アクセス条
件が要求しているキーの照合状態が確立されているか否
かを判断する(ST2)。
Upon recognizing the current DF, next, the access condition information in the current DF definition information refers to information relating to file creation. This condition and R
Only the collation state holding area A on the AM is compared to determine whether the collation state of the key required by the access condition has been established (ST2).

【0048】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST3)。また、もし確立されていれ
ば、次に、コマンド内に設定されているデータファイル
のファイル名(DF−ID)を抽出し、カレントDFが
有するFSNと同一の値を親FSNとして有しており、
さらに、抽出したファイル名と同一のファイル名を有し
ているデータファイル定義情報が存在するか否かを確認
する(ST4)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST3). If it is established, the file name (DF-ID) of the data file set in the command is extracted, and the same value as the FSN of the current DF is included as the parent FSN. ,
Further, it is confirmed whether or not there is data file definition information having the same file name as the extracted file name (ST4).

【0049】もし存在するとしたら、ID重複異常を意
味するレスポンス電文を出力し、コマンド待ち状態に戻
る(ST5)。また、もし存在しないとしたら、コマン
ドにて与えられたデータファイル創成のためのデータに
より、図4(a)〜(c)に示すデータファイル定義情
報を生成し(ST6)、これを所定領域に書込む(ST
7)。
If there is, a response message indicating an ID duplication error is output, and the process returns to the command waiting state (ST5). If it does not exist, data file definition information shown in FIGS. 4A to 4C is generated based on the data for data file creation given by the command (ST6), and this is stored in a predetermined area. Write (ST
7).

【0050】この書込みにおいて、書込みが正常に終了
しなかった場合(ST8)、データ書込み異常を意味す
るレスポンス電文を出力し、コマンド待ち状態に戻る
(ST9)。また、書込みが正常に終了した場合(ST
8)、正常終了を意味するレスポンス電文を出力し、コ
マンド待ち状態に戻る(ST10)。
In this writing, if the writing is not completed normally (ST8), a response message indicating an abnormal data writing is output, and the process returns to the command waiting state (ST9). When the writing is completed normally (ST
8) A response message indicating normal termination is output, and the process returns to the command waiting state (ST10).

【0051】図8は、キーエレメンタリファイル(E
F)創成のための動作を説明するフローチヤートを示し
ており、以下それについて説明する。ICカード1が、
外部から入力されるキーEF創成コマンドを受信する
と、まず、カレントDFを認識する(ST11)。
FIG. 8 shows a key elementary file (E
F) A flowchart for explaining the operation for creation is shown, which will be described below. IC card 1
When a key EF creation command input from outside is received, first, the current DF is recognized (ST11).

【0052】カレントDFを認識すると、次に、カレン
トDF定義情報中のアクセス条件情報のうち、ファイル
創成に関する情報を参照する。この条件と、後述するR
AM上の照合状態保持領域Aのみを比較し、アクセス条
件が要求しているキーの照合状態が確立されているか否
かを判断する(ST12)。
After recognizing the current DF, next, the access condition information in the current DF definition information refers to information on file creation. This condition and R
Only the collation state holding area A on the AM is compared to determine whether the collation state of the key required by the access condition has been established (ST12).

【0053】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST13)。また、もし確立されていれ
ば、次に、コマンド電文にて指示されているエレメンタ
リファイル名(EF−ID)を参照し、アクセス対象と
なっているカレントDF内に、当該エレメンタリファイ
ル名が存在するか否かをチェックする(ST14)。も
し存在する場合には、ID重複異常を示すレスポンス電
文を出力し、コマンド待ち状態に戻る(ST15)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST13). If the elementary file name has been established, the elementary file name (EF-ID) specified by the command message is referred to, and the current elementary file name to be accessed is stored in the current DF. It is checked whether it exists (ST14). If there is, a response message indicating an ID duplication error is output, and the process returns to the command waiting state (ST15).

【0054】もし存在しなければ、次に、コマンド電文
にて指定されているキーEFのサイズデータを参照し、
アクセス対象となっているカレントDF内の空き領域サ
イズと比較する(ST16)。この比較においては、指
定されたキーEFのサイズに当該キーEFを創成した際
に使用するディレクトリ情報のサイズを加算したものに
対して、前記空き領域サイズがそれ以上であるか否かを
チェックする。もし前者が後者よりも大きい場合には、
指定サイズ異常を示すレスポンス電文を出力し、コマン
ド待ち状態に戻る(ST17)。
If not, then the size data of the key EF specified in the command message is referred to, and
The size is compared with the size of the free area in the current DF to be accessed (ST16). In this comparison, it is checked whether or not the size of the designated key EF plus the size of the directory information used when the key EF is created is larger than the size of the free area. . If the former is greater than the latter,
A response message indicating the specified size error is output, and the process returns to the command waiting state (ST17).

【0055】もしそうでなければ、次に、コマンド電文
にて指定されたキーのタイプと、サイズの正当性をチェ
ックする(ST18)。このとき、キーのタイプが「認
証関連キー」となっていればサイズが例えば10バイ
ト、また、キーのタイプが「照合キー」となっていれば
サイズは例えば3〜18バイトであるとき、サイズが正
当であると判断する。もし正当でないと判断された場合
には、指定サイズ整合異常を示すレスポンス電文を出力
し、コマンド待ち状態に戻る(ST19)。
If not, the validity of the key type and size specified in the command message is checked (ST18). At this time, when the key type is “authentication related key”, the size is, for example, 10 bytes, and when the key type is “verification key”, the size is, for example, 3 to 18 bytes. Is determined to be valid. If it is determined that the message is not valid, a response message indicating the specified size matching error is output, and the process returns to the command waiting state (ST19).

【0056】ここで、サイズが正当であったと判断され
た場合には、受信したコマンドに基づき、ディレクトリ
に格納すべきキーEF定義情報を生成し(ST20)、
これを所定領域に書込む(ST21)。このとき、ステ
ータス情報の第8ビット目は、コマンド電文にて指定さ
れたキータイプ情報のうちの第1ビット目に依存して、
その値が決定される。すなわち、後者のビット値と同様
の値を前者のビットに設定する。
If the size is determined to be valid, key EF definition information to be stored in the directory is generated based on the received command (ST20).
This is written in a predetermined area (ST21). At this time, the eighth bit of the status information depends on the first bit of the key type information specified in the command message.
Its value is determined. That is, a value similar to the latter bit value is set in the former bit.

【0057】このステータス情報の第8ビット目は、キ
ーデータの変更がなされたか否かを示すビットであり、
当該ビットが「1」の場合、変更行為がなされていない
ことを示し、また、「0」であればその行為がなされた
ことを示している。
The eighth bit of the status information is a bit indicating whether or not the key data has been changed.
When the bit is “1”, it indicates that the change operation has not been performed, and when the bit is “0”, it indicates that the change operation has been performed.

【0058】したがって、上記キータイプ情報の第1ビ
ット目が「1」の場合には、キー変更を行なわない限り
ステータス情報の第8ビット目が「0」とはならず、ま
た、「0」の場合には、キー変更を行なうか否かに関わ
らず、ステータス情報の第8ビット目が「0」となって
いる(つまり、書換え行為が暗黙的に行なわれたことと
等価になる)。
Therefore, when the first bit of the key type information is "1", the eighth bit of the status information does not become "0" unless the key is changed, and "0". In the case of, the eighth bit of the status information is "0" (that is, it is equivalent to an implicit rewriting operation) regardless of whether or not the key is changed.

【0059】上記キーEF定義情報の書込みにおいて、
書込みが正常に終了しなかった場合(ST22)、デー
タ書込み異常を意味するレスポンス電文を出力し、コマ
ンド待ち状態に戻る(ST23)。また、書込みが正常
に終了した場合(ST22)、正常終了を意味するレス
ポンス電文を出力し、コマンド待ち状態に戻る(ST2
4)。
In writing the key EF definition information,
If the writing has not been completed normally (ST22), a response message indicating a data writing error is output, and the process returns to the command waiting state (ST23). When the writing is completed normally (ST22), a response message indicating normal completion is output, and the process returns to the command waiting state (ST2).
4).

【0060】図9は、トランスポートキーエレメンタリ
ファイル(EF)を創成する場合の動作を説明するフロ
ーチャートを示しており、以下それについて説明する。
ICカード1が、外部から入力されるトランスポートE
F創成コマンドを受信すると、まず、カレントDFを認
識する(ST101)。
FIG. 9 is a flow chart for explaining the operation for creating a transport key elementary file (EF), which will be described below.
When the IC card 1 is connected to the transport E
When the F creation command is received, first, the current DF is recognized (ST101).

【0061】カレントDFを認識すると、次に、当該デ
ータファイル(DF)に設定されているステータス情報
DFST中のトランスポートビットがオンになっている
か否かをチェックする(ST102)。
When the current DF is recognized, it is checked whether the transport bit in the status information DFST set in the data file (DF) is on (ST102).

【0062】もしトランスポートビットがオンとなって
いれば、当該コマンドは拒絶され、トランスポート不可
を意味するレスポンス電文を出力し、コマンド待ち状態
に戻る(ST103)。また、もしトランスポートビッ
トがオフとなっていれば、このトランスポートキーEF
創成コマンドが許容される。なお、このトランスポート
ビットは、データファイル創成時にはオフとなってお
り、またトランスポートキー自身がキー変更コマンドに
より変更された時点でオンとなる。
If the transport bit is on, the command is rejected, a response message indicating that transport is impossible is output, and the process returns to the command waiting state (ST103). If the transport bit is off, this transport key EF
Create commands are allowed. This transport bit is turned off when the data file is created, and turned on when the transport key itself is changed by the key change command.

【0063】トランスポートキーEF創成コマンドが許
容されると、次に、当該カレントDFの親データファイ
ル(DF)のアクセス条件を参照する。この条件と、後
述するRAM上の照合状態保持領域Aのみを比較し、ア
クセス条件が要求しているキーの照合状態が確立されて
いるか否かを判断する(ST104)。
When the transport key EF creation command is permitted, the access condition of the parent data file (DF) of the current DF is referred to. This condition is compared with only the collation state holding area A on the RAM, which will be described later, and it is determined whether or not the collation state of the key required by the access condition has been established (ST104).

【0064】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST105)。また、もし確立されてい
れば、次に、コマンド電文にて指示されているエレメン
タリファイル名(EF−ID)を参照し、アクセス対象
となっているカレントDF内に、当該エレメンタリファ
イル名が存在するか否かをチェックする(ST10
6)。もし存在する場合には、ID重複異常を示すレス
ポンス電文を出力し、コマンド待ち状態に戻る(ST1
07)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST105). If the elementary file name has been established, the elementary file name (EF-ID) specified by the command message is referred to, and the current elementary file name to be accessed is stored in the current DF. Check whether it exists (ST10)
6). If there is, a response message indicating an ID duplication error is output and the process returns to the command waiting state (ST1)
07).

【0065】もし存在しなければ、次に、コマンド電文
にて指定されているキーEFのサイズデータを参照し、
アクセス対象となっているカレントDF内の空き領域サ
イズと比較する(ST108)。この比較においては、
指定されたキーEFのサイズに当該キーEFを創成した
際に使用するディレクトリ情報のサイズを加算したもの
に対して、前記空き領域サイズがそれ以上であるか否か
をチェックする。もし前者が後者よりも大きい場合に
は、指定サイズ異常を示すレスポンス電文を出力し、コ
マンド待ち状態に戻る(ST109)。
If it does not exist, next, the size data of the key EF specified in the command message is referred to, and
A comparison is made with the size of the free area in the current DF to be accessed (ST108). In this comparison,
It is checked whether or not the free area size is larger than the size of the designated key EF plus the size of the directory information used when the key EF is created. If the former is larger than the latter, a response message indicating the specified size abnormality is output, and the process returns to the command waiting state (ST109).

【0066】もしそうでなければ、次に、コマンド電文
にて指定されたキーのタイプと、サイズの正当性をチェ
ックする(ST110)。このとき、キーのタイプが
「認証関連キー」となっていればサイズが例えば10バ
イト、また、キーのタイプが「照合キー」となっていれ
ばサイズは例えば3〜18バイトであるとき、サイズが
正当であると判断する。もし正当でないと判断された場
合には、指定サイズ整合異常を示すレスポンス電文を出
力し、コマンド待ち状態に戻る(ST111)。
If not, then the validity of the type and size of the key specified in the command message is checked (ST110). At this time, when the key type is “authentication related key”, the size is, for example, 10 bytes, and when the key type is “verification key”, the size is, for example, 3 to 18 bytes. Is determined to be valid. If it is determined that the message is not valid, a response message indicating the specified size matching error is output, and the process returns to the command waiting state (ST111).

【0067】ここで、サイズが正当であったと判断され
た場合には、受信したコマンドに基づき、ディレクトリ
に格納すべきキーEF定義情報を生成し(ST11
2)、これを所定領域に書込む(ST113)。このと
き、ステータス情報の第8ビット目は、コマンド電文に
て指定されたキータイプ情報のうちの第1ビット目に依
存して、その値が決定される。すなわち、後者のビット
値と同様の値を前者のビットに設定する。
If it is determined that the size is valid, key EF definition information to be stored in the directory is generated based on the received command (ST11).
2) Write this in a predetermined area (ST113). At this time, the value of the eighth bit of the status information is determined depending on the first bit of the key type information specified in the command message. That is, a value similar to the latter bit value is set in the former bit.

【0068】このステータス情報の第8ビット目は、キ
ーデータの変更がなされたか否かを示すビットであり、
当該ビットが「1」の場合、変更行為がなされていない
ことを示し、また、「0」であればその行為がなされた
ことを示している。
The eighth bit of this status information is a bit indicating whether or not the key data has been changed.
When the bit is “1”, it indicates that the change operation has not been performed, and when the bit is “0”, it indicates that the change operation has been performed.

【0069】したがって、上記キータイプ情報の第1ビ
ット目が「1」の場合には、キー変更を行なわない限り
ステータス情報の第8ビット目が「0」とはならず、ま
た、「0」の場合には、キー変更を行なうか否かに関わ
らず、ステータス情報の第8ビット目が「0」となって
いる(つまり、書換え行為が暗黙的に行なわれたことと
等価になる)。
Therefore, when the first bit of the key type information is "1", the eighth bit of the status information does not become "0" unless the key is changed, and "0". In the case of, the eighth bit of the status information is "0" (that is, it is equivalent to an implicit rewriting operation) regardless of whether or not the key is changed.

【0070】上記キーEF定義情報の書込みにおいて、
書込みが正常に終了しなかった場合(ST114)、デ
ータ書込み異常を意味するレスポンス電文を出力し、コ
マンド待ち状態に戻る(ST115)。また、書込みが
正常に終了した場合(ST114)、正常終了を意味す
るレスポンス電文を出力し、コマンド待ち状態に戻る
(ST116)。
In writing the key EF definition information,
If the writing has not been completed normally (ST114), a response message indicating a data writing error is output, and the process returns to the command waiting state (ST115). If the writing has been completed normally (ST114), a response message indicating normal termination is output, and the process returns to the command waiting state (ST116).

【0071】図10は、キーデータ設定のための動作を
説明するフローチヤートを示しており、以下それについ
て説明する。ICカード1が、外部から入力されるキー
データ設定コマンドを受信すると、まず、カレントDF
を認識する(ST31)。
FIG. 10 is a flowchart for explaining the operation for setting key data, which will be described below. When the IC card 1 receives a key data setting command input from the outside, first, the current DF
Is recognized (ST31).

【0072】カレントDFを認識すると、次に、コマン
ド電文にて指示されているエレメンタリファイル名(E
F−ID)を参照し、アクセス対象となっているカレン
トDF内に、当該エレメンタリファイル名が存在するか
否かをチェックする(ST32)。もし存在しない場合
には、該当キーID無しを意味するレスポンス電文を出
力し、コマンド待ち状態に戻る(ST33)。
When the current DF is recognized, next, the elementary file name (E
By referring to (F-ID), it is checked whether or not the elementary file name exists in the current DF to be accessed (ST32). If the key ID does not exist, a response message indicating that there is no corresponding key ID is output, and the process returns to the command waiting state (ST33).

【0073】もし存在すれば、次に当該キーEF定義情
報中のアクセス条件情報のうち、キーデータ設定に関す
る情報を参照する。この条件と、後述するRAM上の照
合状態保持領域Aのみを比較し、アクセス条件が要求し
ているキーの照合状態が確立されているか否かを判断す
る(ST34)。
If there is, the information regarding the key data setting is referred to among the access condition information in the key EF definition information. This condition is compared with only the collation state holding area A on the RAM, which will be described later, and it is determined whether the collation state of the key required by the access condition has been established (ST34).

【0074】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST35)。また、もし確立されていれ
ば、次に、対応するキーEF領域内にキーデータが存在
するか否かを確認する(ST36)。もし存在すれば、
既存キーデータ有りを意味するレスポンスデータを出力
し、コマンド待ち状態に戻る(ST37)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST35). If the key data has been established, it is checked whether or not key data exists in the corresponding key EF area (ST36). If present,
The response data indicating that there is existing key data is output, and the process returns to the command waiting state (ST37).

【0075】もし存在しなければ、コマンド電文にて指
定されたキーのタイプと、入力キーデータのサイズの正
当性をチェックする(ST38)。このとき、キーのタ
イプが「認証関連キー」となっていればサイズが例えば
8バイト、また、キーのタイプが「照合キー」となって
いればサイズは例えば1〜16バイトであるとき、サイ
ズが正当であると判断する。もし正当でないと判断され
た場合には、入力キーデータサイズ異常を示すレスポン
ス電文を出力し、コマンド待ち状態に戻る(ST3
9)。
If not, the validity of the key type specified in the command message and the size of the input key data is checked (ST38). At this time, when the key type is “authentication related key”, the size is, for example, 8 bytes. When the key type is “verification key”, the size is, for example, 1 to 16 bytes. Is determined to be valid. If it is determined that the input key data size is not valid, a response message indicating an input key data size error is output and the process returns to the command waiting state (ST3).
9).

【0076】ここで、サイズが正当であったと判断され
た場合には、次に、当該キーEF定義情報中にて定義さ
れているサイズと、入力されたキーデータのサイズとの
比較を行なう(ST40)。後者のサイズに例えば
「2」を加えたものが、前者のサイズよりも大きい場合
には、領域サイズ不足を意味するレスポンス電文を出力
し、コマンド待ち状態に戻る(ST41)。
Here, if it is determined that the size is valid, then the size defined in the key EF definition information is compared with the size of the input key data ( ST40). If the size obtained by adding “2” to the size of the latter is larger than the size of the former, a response message indicating that the area size is insufficient is output, and the process returns to the command waiting state (ST41).

【0077】そうでなければ、受信したコマンドにて入
力されたキーデータに、1バイトの長さの情報および1
バイトのBCCを付加して、これを当該キーEF領域に
格納し(ST42)、処理結果をレスポンス電文にて出
力し、コマンド待ち状態に戻る(ST43)。
Otherwise, the key data input by the received command contains information of 1 byte length and 1 byte.
The byte BCC is added and stored in the key EF area (ST42), the processing result is output as a response message, and the process returns to the command waiting state (ST43).

【0078】図11は、キーデータ変更のための動作を
説明するフローチヤートを示しており、以下それについ
て説明する。ICカード1が、外部から入力されるキー
データ変更コマンドを受信すると、まず、カレントDF
を認識する(ST51)。
FIG. 11 is a flowchart for explaining the operation for changing the key data, which will be described below. When the IC card 1 receives a key data change command input from the outside, first, the current DF
Is recognized (ST51).

【0079】カレントDFを認識すると、次に、コマン
ド電文にて指示されているエレメンタリファイル名(E
F−ID)を参照し、アクセス対象となっているカレン
トDF内に、当該エレメンタリファイル名が存在するか
否かをチェックする(ST52)。もし存在しない場合
には、該当キーID無しを意味するレスポンス電文を出
力し、コマンド待ち状態に戻る(ST53)。
When the current DF is recognized, next, the elementary file name (E
By referring to (F-ID), it is checked whether or not the elementary file name exists in the current DF to be accessed (ST52). If not, a response message indicating that there is no corresponding key ID is output, and the process returns to the command waiting state (ST53).

【0080】もし存在すれば、次に当該キーEF定義情
報中のアクセス条件情報のうち、キーデータ変更に関す
る情報を参照する。この条件と、後述するRAM上の照
合状態保持領域AおよびBを比較し、アクセス条件が要
求しているキーの照合状態が確立されているか否かを判
断する(ST54)。
If it exists, the information relating to the change of the key data among the access condition information in the key EF definition information is referred to next. This condition is compared with collation state holding areas A and B on the RAM, which will be described later, and it is determined whether or not the collation state of the key required by the access condition has been established (ST54).

【0081】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST55)。また、もし確立されていれ
ば、次に、対応するキーEF領域内にキーデータが存在
するか否かを確認する(ST56)。もし存在しなけれ
ば、既存キーデータ無しを意味するレスポンスデータを
出力し、コマンド待ち状態に戻る(ST57)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST55). If the key data has been established, it is checked whether key data exists in the corresponding key EF area (ST56). If not, response data indicating that there is no existing key data is output, and the process returns to the command waiting state (ST57).

【0082】もし存在すれば、コマンド電文にて指定さ
れたキーのタイプと、入力キーデータのサイズの正当性
をチェックする(ST58)。このとき、キーのタイプ
が「認証関連キー」となっていればサイズが例えば8バ
イト、また、キーのタイプが「照合キー」となっていれ
ばサイズは例えば1〜16バイトであるとき、サイズが
正当であると判断する。もし正当でないと判断された場
合には、入力キーデータサイズ異常を示すレスポンス電
文を出力し、コマンド待ち状態に戻る(ST59)。
If it exists, the validity of the key type specified in the command message and the size of the input key data is checked (ST58). At this time, when the key type is “authentication related key”, the size is, for example, 8 bytes. When the key type is “verification key”, the size is, for example, 1 to 16 bytes. Is determined to be valid. If it is determined that the input key data size is not valid, a response message indicating an abnormal input key data size is output, and the process returns to the command waiting state (ST59).

【0083】ここで、サイズが正当であったと判断され
た場合には、次に、当該キーEF定義情報中にて定義さ
れているサイズと、入力されたキーデータのサイズとの
比較を行なう(ST60)。後者のサイズに例えば
「2」を加えたものが、前者のサイズよりも大きい場合
には、領域サイズ不足を意味するレスポンス電文を出力
し、コマンド待ち状態に戻る(ST61)。
If it is determined that the size is valid, then the size defined in the key EF definition information is compared with the size of the input key data ( ST60). If the size obtained by adding “2” to the size of the latter is larger than the size of the former, a response message indicating that the area size is insufficient is output, and the process returns to the command waiting state (ST61).

【0084】そうでなければ、受信したコマンドにて入
力されたキーデータに、1バイトの長さの情報および1
バイトのBCCを付加して、これを当該キーEF領域に
格納し(ST62)、その処理結果をレスポンス電文に
て出力し、コマンド待ち状態に戻る(ST63)。ま
た、このとき、キーEF定義情報にあるステータス情報
の第8ビット目を「0」とする。
Otherwise, the key data input by the received command contains 1-byte length information and 1 byte.
The byte BCC is added and stored in the key EF area (ST62), the processing result is output as a response message, and the process returns to the command waiting state (ST63). At this time, the eighth bit of the status information in the key EF definition information is set to “0”.

【0085】図12は、キー照合のための動作を説明す
るフローチヤートを示しており、以下それについて説明
する。ICカード1が、外部から入力されるキー照合コ
マンドを受信すると、まず、カレントDFを認識する
(ST71)。
FIG. 12 shows a flowchart for explaining the operation for key collation, which will be described below. When the IC card 1 receives a key collation command input from the outside, it first recognizes the current DF (ST71).

【0086】カレントDFを認識すると、次に、ディレ
クトリ121を検索することにより、カレントDF内に
指定されたファイル名(ID)を有するキーEF定義情
報が存在するか否かを確認する(ST72)。もし存在
しない場合には、該当キーID無しを示すレスポンス電
文を出力し、コマンド待ち状態に戻る(ST73)。
When the current DF is recognized, the directory 121 is searched to determine whether key EF definition information having the specified file name (ID) exists in the current DF (ST72). . If not, a response message indicating that there is no corresponding key ID is output, and the process returns to the command waiting state (ST73).

【0087】もし存在していた場合には、当該キーがロ
ック状態になっているか否かを確認する(ST74)。
このとき、ロック状態であると判断した場合には、キー
ロックを示すレスポンス電文を出力し、コマンド待ち状
態に戻る(ST75)。
If there is, it is checked whether the key is locked (ST74).
At this time, if it is determined that the key is locked, a response message indicating the key lock is output, and the process returns to the command waiting state (ST75).

【0088】もしそうでなければ、コマンド電文内のキ
ーデータと、当該キーEF内に格納されているキーデー
タとを照合する(ST76)。このとき、両者が一致し
ている場合には(ST77)、当該キーEF定義情報中
の照合ビット指定情報を参照し、所定のRAM領域の当
該情報にて指定されているビット位置を「1」にする
(ST78)。次に、当該キーEF定義情報中のキー固
有の照合不一致カウンタをクリアし(ST79)、正常
終了を示すレスポンス電文を出力して、コマンド待ち状
態に戻る(ST80)。
If not, the key data in the command message is compared with the key data stored in the key EF (ST76). At this time, if they match (ST77), reference is made to the collation bit designation information in the key EF definition information, and the bit position designated by the information in the predetermined RAM area is set to "1". (ST78). Next, the key-specific collation mismatch counter in the key EF definition information is cleared (ST79), a response message indicating a normal end is output, and the process returns to the command waiting state (ST80).

【0089】なお、所定のRAM領域は、照合状態保持
領域AおよびBに分割されている。どちらの領域の対応
ビットを「1」にするかは、当該キーEF定義情報中の
キーのステータス情報の第8ビット目の値に依存する。
このビットは、当該キーEF定義情報により定義づけら
れているキーに対し、変更処理が行なわれたか否かを示
すものであり、後述するように、「0」となっていれば
変更されたキーであり、「1」となっていれば変更処理
が行なわれていないキーであることを示す。さらに、こ
れが「0」となっていた場合には、前記照合状態保持領
域Aの、また、「1」となっていれば、前記照合状態保
持領域Bの、対応ビットを設定することになる。
The predetermined RAM area is divided into collation state holding areas A and B. Which area has the corresponding bit set to “1” depends on the value of the eighth bit of the status information of the key in the key EF definition information.
This bit indicates whether or not a change process has been performed on the key defined by the key EF definition information. As described later, if the bit is “0”, the changed key is changed. If it is “1”, it indicates that the key has not been changed. Further, when this is "0", the corresponding bit of the collation state holding area A is set, and when it is "1", the corresponding bit of the collation state holding area B is set.

【0090】また、キー照合処理において、不一致であ
ると判断した場合には(ST77)、まず、当該キーE
F定義情報中の照合ビット指定情報、および、ステータ
ス情報を参照し、上記と同様の手順にしたがって、照合
状態保持領域AまたはBのいずれかの領域の所定ビット
を「0」にする(ST81)。
If it is determined in the key collation processing that there is no match (ST77), first, the key E
Referring to the collation bit designation information and the status information in the F definition information, and according to the same procedure as described above, a predetermined bit in either the collation state holding area A or B is set to "0" (ST81). .

【0091】次に、キー固有の照合不一致カウンタを1
つだけインクリメントする(ST82)。このとき、キ
ーEF定義情報中のカウント最大値に達していない場合
には(ST83)、照合不一致を示すレスポンス電文を
出力し、コマンド待ち状態に戻る(ST84)。また、
最大値に達していたならば、キーロック済みを示すレス
ポンス電文を出力し、コマンド待ち状態に戻る(ST8
5)。
Next, the key-specific collation mismatch counter is set to 1
Only one is incremented (ST82). At this time, if the count maximum value in the key EF definition information has not been reached (ST83), a response message indicating a mismatch is output, and the process returns to the command waiting state (ST84). Also,
If the maximum value has been reached, a response message indicating that the key has been locked is output, and the process returns to the command waiting state (ST8).
5).

【0092】照合状態保持領域Aは、ファイル創成時、
キーEF創成時、キーデータ創成時、キーデータ変更時
に参照され、照合状態保持領域Bはキーデータ変更時に
参照される。
The collation state holding area A is used when a file is created.
It is referred to when the key EF is created, when the key data is created, or when the key data is changed, and the collation state holding area B is referred to when the key data is changed.

【0093】上述したように、キーが変更済みの場合照
合状態保持領域Aが、未変更であれば照合状態保持領域
Bのビットがオンされるので、ファイル創成時、キーE
F創成時、キーデータ創成時にはキーが変更済みでなけ
ればならない。又、キーの変更時には照合状態保持領域
A及びBを参照するのでキーが変更済みであっても未変
更であってもキーの変更は可能となる。
As described above, if the key has been changed, the collation state holding area A is turned on. If the key has not been changed, the bit of the collation state holding area B is turned on.
The key must be changed at the time of creation of F and at the time of creation of key data. When the key is changed, the collation state holding areas A and B are referred to, so that the key can be changed whether the key has been changed or not changed.

【0094】図13は、データEFへのアクセスのため
の動作を説明するフローチヤートを示しており、以下そ
れについて説明する。ICカード1が、外部から入力さ
れるデータEFアクセスコマンドを受信すると、まず、
カレントDFを認識する(ST91)。
FIG. 13 is a flowchart for explaining the operation for accessing the data EF, which will be described below. When the IC card 1 receives a data EF access command input from the outside, first,
The current DF is recognized (ST91).

【0095】カレントDFを認識すると、次に、コマン
ド電文にて指示されているエレメンタリファイル名(E
F−ID)を参照し、アクセス対象となっているカレン
トDF内に、当該エレメンタリファイル名が存在するか
否かをチェックする(ST92)。もし存在しない場合
には、該当キーID無しを意味するレスポンス電文を出
力し、コマンド待ち状態に戻る(ST93)。
When the current DF is recognized, the elementary file name (E
With reference to (F-ID), it is checked whether the elementary file name exists in the current DF to be accessed (ST92). If not, a response message indicating that there is no corresponding key ID is output, and the process returns to the command waiting state (ST93).

【0096】もし存在すれば、次に当該データEF定義
情報中のアクセス条件情報のうち、アクセスのタイプ
(データ読出し/書込み/変更)に対応するアクセス条
件情報を参照する。この条件と、後述するRAM上の照
合状態保持領域Aを比較し、アクセス条件が要求してい
るキーの照合状態が確立されているか否かを判断する
(ST94)。
If there is, the access condition information corresponding to the type of access (data read / write / change) is referred to from the access condition information in the data EF definition information. This condition is compared with a collation state holding area A on the RAM, which will be described later, and it is determined whether the collation state of the key required by the access condition is established (ST94).

【0097】もし確立されていなければ、アクセス条件
不一致を意味するレスポンス電文を出力し、コマンド待
ち状態に戻る(ST95)。もし確立されていれば、次
に、対応するデータEF領域内に対してアクセスを行な
い(ST96)、その処理結果をレスポンス電文として
出力し、コマンド待ち状態に戻る(ST97)。
If not established, a response message indicating that the access conditions do not match is output, and the process returns to the command waiting state (ST95). If it is established, next, access is made to the corresponding data EF area (ST96), the processing result is output as a response message, and the process returns to the command waiting state (ST97).

【0098】次に、このような構成において、ICカー
ドに対して各ファイルを創成する手順を説明する。
Next, a procedure for creating each file in the IC card in such a configuration will be described.

【0099】まず、ICカードを製造する際に、カード
発行者に渡すべきトランスポートキーのエレメンタリフ
ァイルを設定(創生)するために、図9のフローチャー
トに従って図14に示すようにマスタファイル(MF)
配下に“キーEF−a”を創成し、ここにトランスポー
トキーを設定する。
First, at the time of manufacturing an IC card, in order to set (create) an elementary file of a transport key to be passed to the card issuer, as shown in FIG. MF)
A “key EF-a” is created under the subordinate, and a transport key is set here.

【0100】続いて当該キーエレメンタリファイルEF
−aへの中の設定が図10のフローチャートに従って設
定され、キーの設定に際しては、当該キーEF−aに付
与されているキー設定用のアクセス条件が参照される。
Subsequently, the key elementary file EF
The setting in -a is set in accordance with the flowchart of FIG. 10. When setting a key, the access condition for key setting assigned to the key EF-a is referred to.

【0101】この状態で発行者がカードを受け取ると、
図11のフローチャートに従ってトランスポートキーを
変更する。すなわち図15に示すように発行者は、製造
者が設定したトランスポートキーを自身のみが知りえる
キー(a′)に変更する。この変更には、当該キーEF
に設定されているキー変更用のアクセス条件を参照す
る。この時点で、マスタファイル(MF)に付与されて
いるトランスポートビットがオンされ、以降、製造者に
よるマスタファイル(MF)配下のキーの創成が拒絶さ
れる。
When the issuer receives the card in this state,
The transport key is changed according to the flowchart of FIG. That is, as shown in FIG. 15, the issuer changes the transport key set by the manufacturer to a key (a ') that can be known only by itself. This change includes the key EF
Refer to the access condition for key change set in. At this point, the transport bit assigned to the master file (MF) is turned on, and thereafter, creation of a key under the master file (MF) by the manufacturer is rejected.

【0102】つぎに、発行者は、自身が必要とするデー
タEF−aをマスタファイル(MF)配下に創成する。
この場合、マスタファイル(MF)に設定されているE
F創成用アクセス条件を参照する。
Next, the issuer creates the data EF-a required by the issuer under the master file (MF).
In this case, the E set in the master file (MF)
Refer to F creation access conditions.

【0103】また発行者は、アプリケーション提供者に
開放するためのデータファイル(DF)を、マスタファ
イル(MF)配下に創成する。DFの設定は図7のフロ
ーに従って行われ、この場合、マスタファイル(MF)
に設定されているデータファイル(DF)創成用アクセ
ス条件を参照する。
The publisher creates a data file (DF) to be released to the application provider under the master file (MF). The setting of the DF is performed according to the flow of FIG. 7, and in this case, the master file (MF)
Is referred to the data file (DF) creation access condition set in.

【0104】つぎに、発行者は当該データファイル(D
F)配下に、アプリケーション提供者に渡すべきトラン
スポートキーEF−bを創成する。トランスポートキー
EF−bの創成は図9のフローに従って行われ、この場
合、参照するアクセス条件は当該データファイル(D
F)に付与されているものではなく、その親ファイルで
あるマスタファイル(MF)に付与されているアクセス
条件を参照する。
Next, the publisher issues the data file (D
F) Create a transport key EF-b to be handed over to the application provider. The creation of the transport key EF-b is performed according to the flow of FIG. 9, and in this case, the access condition to be referred to is the data file (D
Reference is made to the access condition given to the master file (MF), which is the parent file, instead of the one given to F).

【0105】つぎに発行者は、このトランスポートキー
EF−b内に、トランスポートキーを設定する。トラン
スポートキーの設定は図10のフローに従って行われ、
この場合、対象となっているキーEF−bに付与されて
いる、キー設定用のアクセス条件を参照する。
Next, the issuer sets a transport key in the transport key EF-b. The setting of the transport key is performed according to the flow of FIG.
In this case, the access condition for key setting, which is given to the target key EF-b, is referred to.

【0106】この状態でアプリケーション提供者がカー
ドを受け取ると、図16に示すようにアプリケーション
提供者は、発行者が設定したトランスポートキーを自身
のみが知りえるキー(b′)に変更する。この変更に
は、当該キーEFに設定されているキー変更用のアクセ
ス条件を参照する。この時点で、データファイル(D
F)に付与されているトランスポートビットがオンさ
れ、以降、発行者によるデータファイル(DF)配下の
キーの創成が拒絶される。
In this state, when the application provider receives the card, as shown in FIG. 16, the application provider changes the transport key set by the issuer to a key (b ') that can be known only by itself. For this change, the access condition for key change set in the key EF is referred to. At this point, the data file (D
The transport bit assigned to F) is turned on, and thereafter, creation of a key under the data file (DF) by the issuer is rejected.

【0107】つぎに、アプリケーション提供者は、自身
が必要とするデータEF−bをデータファイル(DF)
配下に創成する。データEF−bの創成は図7のフロー
に従って行われ、この場合、データファイル(DF)に
設定されているEF創成用アクセス条件を参照する。
Next, the application provider stores the data EF-b required by the application provider in a data file (DF).
Create under your control. The creation of the data EF-b is performed according to the flow shown in FIG. 7. In this case, the access condition for creating the EF set in the data file (DF) is referred to.

【0108】またアプリケーション提供者は、自身が必
要とするキーEF−cをデータファイル(DF)配下に
創成する。キーEF−cの創成は図8のフローに従って
行われ、この場合も、データファイル(DF)に設定さ
れているEF創成用アクセス条件を参照する。
The application provider creates a key EF-c required by itself under the data file (DF). The creation of the key EF-c is performed according to the flow of FIG. 8, and in this case also, the access condition for creating an EF set in the data file (DF) is referred to.

【0109】コマンドが下記のようになっており、特
に、通常のキーEF創成コマンドとトランスポートキー
EF創成コマンドとは別のコマンドコード形式となって
いて、ICカードはこのコマンドコードによりコマンド
の内容を識別している。
The commands are as follows. In particular, the command format is different from the normal key EF creation command and the transport key EF creation command. Has been identified.

【0110】すなわち、通常のキーEF創成コマンドと
トランスポートキーEF創成コマンドとを識別し、トラ
ンスポートキーEF創成コマンドの場合は図9のフロー
チャートにより処理され、通常のキーEF創成コマンド
の場合は図8のフローチャートにより処理される。
That is, a normal key EF creation command and a transport key EF creation command are distinguished. In the case of a transport key EF creation command, processing is performed according to the flowchart of FIG. 8 is performed.

【0111】 エリア(エレメンタリファイル)創成コマンド コマンドコードA/AID(EF−ID)/ASIZ/AAC キーEF創成コマンド コマンドコードB/KID/KSIZ/CF/AAC トランスポートキーEF創成コマンド コマンドコードC/KID/KSIZ/CF/AAC 上述したカレントDF配下にトランスポートキーEFを
創成する場合はカレントDFの親DFのアクセス条件を
参照する。親DFのアクセス条件は上位者が設定したも
のであり、トランスポートキーEFの創成は上位者が行
うことができる。
Area (elementary file) creation command Command code A / AID (EF-ID) / ASIZ / AAC Key EF creation command Command code B / KID / KSIZ / CF / AAC Transport key EF creation command Command code C / KID / KSIZ / CF / AAC When creating the transport key EF under the current DF, the access condition of the parent DF of the current DF is referred to. The access condition of the parent DF is set by the superior, and the transport key EF can be created by the superior.

【0112】また、トランスポートキーEFへのトラン
スポートキーの設定時は当該EFのアクセス条件を参照
するが、当該EFのアクセス条件はトランスポートキー
EFの創成時に上位者が設定するものであり、上位者は
トランスポートキーEFへのトランスポートキーの設定
が可能となるように当該EFのアクセス条件を設定す
る。
When setting the transport key to the transport key EF, the access condition of the EF is referred to. However, the access condition of the EF is set by the superior when the transport key EF is created. The superior sets the access conditions of the transport key EF so that the transport key can be set.

【0113】カレントDF配下にアプリケーション提供
者がキーEFを設定する場合はカレントDFのキーEF
創成用のアクセス条件が参照されるが、DFのアクセス
条件はDF創成時に上位者が設定することとなる。
When the application provider sets a key EF under the current DF, the key EF of the current DF is set.
The access condition for creation is referred to, but the access condition of the DF is set by a superior at the time of creation of the DF.

【0114】しかし、トランスポートキーの変更後はこ
のDFのアクセス条件を用いる処理(データEF、キー
EFの創成)はアプリケーション提供者しかおこなうこ
とはできないので、アクセス権の区分は明確となる。
However, after the change of the transport key, the processing using the access conditions of the DF (creation of the data EF and the key EF) can be performed only by the application provider, so that the classification of the access right becomes clear.

【0115】さらに、キーEF創成用のアクセス条件と
して上位者がトランスポートキーの変更後のキーを設定
しておくことでアプリケーション提供者はトランスポー
トキーを変更した後に自身で用いるキーEFを設定し、
この自身で用いるキーEFのキーの定義情報中の照合ビ
ット指定情報によりDFのアクセス条件を満足できる環
境を用意し、そして、自身のキーを照合するとデータE
Fの創成のためのDFのアクセス条件が満足されて、デ
ータEFの創成が可能となるようにしておく。
Further, when the upper party sets the key after the change of the transport key as an access condition for creating the key EF, the application provider sets the key EF used by itself after changing the transport key. ,
An environment in which the access condition of the DF can be satisfied by the collation bit designation information in the key definition information of the key EF used by itself is prepared.
The access condition of the DF for creation of F is satisfied, and creation of data EF is enabled.

【0116】このようにすることで、上位者はDFのア
クセス条件は設定するものの、その内容については関知
することなく、アプリケーション提供者のみがDFのア
クセス条件を満足できるようになる。
In this way, although the superior sets the DF access conditions, only the application provider can satisfy the DF access conditions without knowing the contents.

【0117】以上説明したように上記発明の実施の形態
によれば、データファイル(DF)配下にEF(または
DF)を創成するために必要となるキーは、当該データ
ファイル(DF)に付与されているアクセス条件により
決定され、またこのアクセス条件は、上位のキー(この
実施例においては、発行者が、アプリケーション提供者
にとっての上位者になる)を指定することなく実現する
ことができる。
As described above, according to the embodiment of the present invention, a key required to create an EF (or DF) under a data file (DF) is added to the data file (DF). This access condition can be realized without specifying a higher-level key (in this embodiment, the issuer becomes a higher-level person for the application provider).

【0118】従って、アプリケーション提供者が自身で
管理したいファイル(またはメモリ領域)は、自身のキ
ーのみで保護することができる。
Therefore, the file (or memory area) that the application provider wants to manage by itself can be protected only by its own key.

【0119】これにより、発行者の当該データファイル
(DF)への関与がなされなくなり、従って、発行者か
らアプリケーション提供者へ、当該ファイル(またはメ
モリ領域)へのアクセスの権限が委譲されたことにな
る。
As a result, the issuer is no longer involved in the data file (DF), and the authority of access to the file (or memory area) is delegated from the issuer to the application provider. Become.

【0120】なお、本実施例にあるトランスポートビッ
トは、データファイル(DF)創成時にはオフとなって
おり、トランスポートキー自身がキー変更コマンドによ
り変更された時点でオンとなる旨を記載しているが、キ
ー変更コマンドと連動することなく、例えばトランスポ
ートビットをオンするコマンドにて実施してもよい。こ
の場合、当該コマンドを実行する際に使用されるアクセ
ス条件は、対象とするファイルに設定されているものが
参照される。
It is noted that the transport bit in this embodiment is off when the data file (DF) is created, and turns on when the transport key itself is changed by the key change command. However, the present invention may be implemented by, for example, a command for turning on a transport bit without interlocking with the key change command. In this case, the access condition used for executing the command refers to the access condition set in the target file.

【0121】また、前記実施の形態では、メモリのアク
セス管理を行なう電子機器としてICカードを例示した
が、これに限定されることなく、メモリのアクセス管理
を必要とするメモリを備えた電子機器であれば適用可能
である。
Further, in the above-described embodiment, an IC card is exemplified as the electronic device for performing memory access management. However, the present invention is not limited to this, and an electronic device having a memory that requires memory access management may be used. If applicable, it is applicable.

【0122】[0122]

【発明の効果】以上詳述したように本発明によれば、た
とえば、上位者からのデータファイルへの関与をなく
し、上位者から下位者へ当該データファイルまたはメモ
リ領域へのアクセスの権限を委譲することができるメモ
リのアクセス管理方法を提供できる。
As described above in detail, according to the present invention, for example, the involvement of a superior in the data file is eliminated, and the authority of access to the data file or the memory area is transferred from the superior to the subordinate. And a memory access management method capable of performing the above.

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

【図1】本発明の実施の形態に係るICカードが適用さ
れるカード取扱装置の構成例を示すブロック図。
FIG. 1 is a block diagram showing a configuration example of a card handling device to which an IC card according to an embodiment of the present invention is applied.

【図2】ICカードの構成例を示すブロック図。FIG. 2 is a block diagram showing a configuration example of an IC card.

【図3】データメモリの構成例を示すメモリマップ図。FIG. 3 is a memory map diagram showing a configuration example of a data memory.

【図4】各種定義情報のフォーマット例を示す図。FIG. 4 is a diagram showing a format example of various definition information.

【図5】データメモリ内に設定されるファイルの構造例
を示す図。
FIG. 5 is a view showing an example of the structure of a file set in a data memory.

【図6】データメモリ内に設定されるディレクトリの構
成例を示す図。
FIG. 6 is a view showing a configuration example of a directory set in a data memory.

【図7】データファイル創成のための動作を説明するフ
ローチャート。
FIG. 7 is a flowchart illustrating an operation for creating a data file.

【図8】キーエレメンタリファイル創成のための動作を
説明するフローチャート。
FIG. 8 is a flowchart illustrating an operation for creating a key elementary file.

【図9】トランスポートキーエレメンタリファイル創成
のための動作を説明するフローチャート。
FIG. 9 is a flowchart illustrating an operation for creating a transport key elementary file.

【図10】キーデータ設定のための動作を説明するフロ
ーチャート。
FIG. 10 is a flowchart illustrating an operation for setting key data.

【図11】キーデータ変更のための動作を説明するフロ
ーチャート。
FIG. 11 is a flowchart illustrating an operation for changing key data.

【図12】キー照合のための動作を説明するフローチャ
ート。
FIG. 12 is a flowchart illustrating an operation for key matching.

【図13】データエレメンタリファイルへのアクセスの
ための動作を説明するフローチャート。
FIG. 13 is a flowchart illustrating an operation for accessing a data elementary file.

【図14】製造者によるICカードに対するファイル創
成を説明するための図。
FIG. 14 is a view for explaining creation of a file for an IC card by a manufacturer.

【図15】発行者によるICカードに対するファイル創
成を説明するための図。
FIG. 15 is a view for explaining creation of a file for an IC card by an issuer.

【図16】アプリケーション提供者によるICカードに
対するファイル創成を説明するための図。
FIG. 16 is a diagram for explaining file creation for an IC card by an application provider.

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

1…ICカード 2…カードリーダ・ライタ 3…制御部 4…キーボード 5…CRTディスプレイ装置 11…制御素子 12…データメモリ 13…ワーキングメモリ 14…プログラムメモリ 15…コンタクト部 120…制御領域 121…ディレクトリ 123…エリア群 DESCRIPTION OF SYMBOLS 1 ... IC card 2 ... Card reader / writer 3 ... Control part 4 ... Keyboard 5 ... CRT display device 11 ... Control element 12 ... Data memory 13 ... Working memory 14 ... Program memory 15 ... Contact part 120 ... Control area 121 ... Directory 123 … Area group

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 メモリを複数のファイルに分割し、この
分割した複数のファイルに対してのアクセスをそれぞれ
管理するもので、当該メモリを用いたシステムの上位者
にてファイル配下に第1のキーが予め設定されており、
当該メモリを用いたシステムの下位者が新たにキーを設
定可能に構成されており、かつ、これらのキーの照合に
よって上記ファイルへのアクセスを可能とするメモリの
アクセス管理方法であって、 上記上位者が設定した第1のキーを、この第1のキーに
設定されているキー変更用のアクセス条件を参照して下
位者のみが知りえる第2のキーに変更し、この第2のキ
ーに変更された際、上記上位者によるファイル配下のキ
ー創成を拒絶するようにしたことを特徴とするメモリの
アクセス管理方法。
The present invention divides a memory into a plurality of files, and manages access to the plurality of divided files, respectively. A higher order person of a system using the memory stores a first key under a file. Is set in advance,
A memory access management method in which a lower party of a system using the memory is capable of setting a new key, and which is capable of accessing the file by collating these keys. The first key set by the third party is changed to a second key that can be known only by a lower order person by referring to the access condition for key change set in the first key, and the second key is changed to the second key. A memory access management method characterized by rejecting the creation of a key under a file by the upper party when changed.
【請求項2】 メモリを複数のファイルに分割し、この
分割した複数のファイルに対してのアクセスをそれぞれ
管理するもので、当該メモリを用いたシステムの上位者
にてファイル配下に第1のキーが予め設定されており、
当該メモリを用いたシステムの下位者が新たにキーを設
定可能に構成されており、かつ、これらのキーの照合に
よって上記ファイルへのアクセスを可能とするメモリの
アクセス管理方法であって、 上記上位者が設定した第1のキーを、この第1のキーに
設定されているキー変更用のアクセス条件を参照して下
位者のみが知りえる第2のキーに変更し、上記上位者に
よるファイル配下のキー創成を拒絶するようにしたこと
を特徴とするメモリのアクセス管理方法。
2. A system in which a memory is divided into a plurality of files and access to the plurality of divided files is managed, and a first key is stored under a file by a superior of a system using the memory. Is set in advance,
A memory access management method in which a lower party of a system using the memory is capable of setting a new key, and which is capable of accessing the file by collating these keys. The first key set by the third party is changed to a second key that only the lower party can know by referring to the access condition for key change set in the first key, and the file is controlled by the upper party. A memory access management method characterized by rejecting the creation of a key.
【請求項3】 上位のファイルと下位のファイルとから
なるツリー構造のファイルへのアクセスを管理するファ
イルアクセス管理方法において、 上位の管理者が管理する上位のファイルに対してアクセ
ス条件を設定し、 上位の管理者から下位の管理者に対して提供するファイ
ルにアクセス条件を設定し、 上位の管理者から下位の管理者に対する受け渡しのため
のトランスポートキーを下位のファイルに設定する場合
は、当該ファイルの上位のファイルのアクセス条件を参
照し、 この上位のファイルのアクセス条件を満足している場合
にトランスポートキーを下位のファイルに設定し、 下位のファイルの配下にファイルを設定する場合は当該
下位ファイルのアクセス条件を参照してこのアクセス条
件を満足している場合にファイルの設定を行うようにし
たことを特徴とするファイルアクセス管理方法。
3. A file access management method for managing access to a file having a tree structure including an upper file and a lower file, wherein an access condition is set for an upper file managed by an upper manager; When setting access conditions for files provided by a higher-level administrator to lower-level administrators and setting a transport key for transfer from a higher-level administrator to a lower-level administrator in a lower-level file, the Refer to the access condition of the upper file of the file, and if the access condition of the upper file is satisfied, set the transport key to the lower file, and set the transport key to the lower file. Refer to the access condition of the lower-level file and set the file if this access condition is satisfied. File access management method characterized in that as.
【請求項4】 前記下位のファイルにはトランスポート
キーの設定の可否を示す識別情報が付与されており、こ
の識別情報に基づき該ファイルに対するトランスポート
キーの設定を禁止するようにしたことを特徴とする請求
項3に記載のファイルアクセス管理方法。
4. The apparatus according to claim 1, wherein the lower-level file is provided with identification information indicating whether or not a transport key can be set, and the setting of the transport key for the file is prohibited based on the identification information. 4. The file access management method according to claim 3, wherein:
【請求項5】 前記下位のファイルに対するトランスポ
ートキーが変更された場合、以後該ファイルに対するト
ランスポートキーの設定を禁止するように前記識別情報
を更新するようにしたことを特徴とする請求項4に記載
のファイルアクセス管理方法。
5. The apparatus according to claim 4, wherein when the transport key for the lower-level file is changed, the identification information is updated so as to prohibit the setting of the transport key for the file thereafter. File access management method described in.
【請求項6】 前記下位のファイルにおけるトランスポ
ートキーの設定の可否を示す識別情報は特殊コマンドに
基づき更新するようにしたことを特徴とする請求項4に
記載のファイルアクセス管理方法。
6. The file access management method according to claim 4, wherein the identification information indicating whether a transport key can be set in the lower-level file is updated based on a special command.
【請求項7】 前記下位のファイルへのトランスポート
キーの設定はトランスポートキー設定用のコマンドによ
り行い、前記下位のファイルの配下にファイルを設定す
る場合はトランスポートキー設定用のコマンドとは異な
るコマンドにより行うことを特徴とする請求項3に記載
のファイルアクセス管理方法。
7. The transport key setting for the lower-level file is performed by a command for setting a transport key, and when setting a file under the lower-level file, the command is different from the command for setting a transport key. 4. The file access management method according to claim 3, wherein the method is performed by a command.
【請求項8】 上位のファイルと下位のファイルとから
なるツリー構造のファイルを有する携帯可能情報処理装
置において、 アクセス条件が設定され上位の管理者が利用するための
上位のファイルと、 アクセス条件が設定され上位の管理者から提供され下位
の管理者が利用する下位のファイルと、 上位のファイルのアクセス条件を参照してこの上位のフ
ァイルのアクセス条件を満足している場合に上位の管理
者から下位の管理者に対する受け渡しのためのトランス
ポートキーを下位のファイルに設定する第1の手段と、 下位ファイルのアクセス条件を参照してこのアクセス条
件を満足している場合に下位のファイルの配下にファイ
ルを設定する第2の手段と、 を有することを特徴とする携帯可能情報処理装置。
8. A portable information processing apparatus having a tree-structured file composed of an upper-level file and a lower-level file, wherein an access condition is set and an upper-level file to be used by a higher-level administrator, Refers to the lower-level files provided by the higher-level administrator and used by the lower-level administrator, and the access conditions of the higher-level file. A first means for setting a transport key for transfer to a lower-level manager in a lower-level file; and referring to an access condition of the lower-level file and subordinate to the lower-level file when the access condition is satisfied. A portable information processing apparatus, comprising: second means for setting a file.
【請求項9】 前記下位のファイルにはトランスポート
キーの設定の可否を示す識別情報の記憶領域を有し、こ
の識別情報に基づき該ファイルに対するトランスポート
キーの設定を禁止する手段を有することを特徴とする請
求項8に記載の携帯可能情報処理装置。
9. The method according to claim 9, wherein the lower-order file has a storage area for identification information indicating whether or not a transport key can be set, and has means for prohibiting setting of a transport key for the file based on the identification information. 9. The portable information processing apparatus according to claim 8, wherein:
【請求項10】 前記下位のファイルに対するトランス
ポートキーが変更された場合、以後該ファイルに対する
トランスポートキーの設定を禁止するように前記識別情
報を更新する手段を有することを特徴とする請求項8に
記載の携帯可能情報処理装置。
10. The apparatus according to claim 8, further comprising means for updating the identification information so as to prohibit the setting of the transport key for the file when the transport key for the lower-level file is changed. A portable information processing device according to claim 1.
【請求項11】 前記携帯可能情報記憶媒体は、外部装
置から供給されるコマンドに基づき動作し、 前記下位のファイルにおけるトランスポートキーの設定
の可否を示す識別情報は外部装置より供給される特殊コ
マンドに基づき更新する手段を有することを特徴とする
請求項8に記載の携帯可能情報処理装置。
11. The portable information storage medium operates based on a command supplied from an external device, and the identification information indicating whether a transport key can be set in the lower-level file is a special command supplied from the external device. 9. The portable information processing apparatus according to claim 8, further comprising means for updating based on the information.
【請求項12】 前記携帯可能情報記憶媒体は、外部装
置から供給されるコマンドに基づき動作し、 前記第1の手段による下位のファイルへのトランスポー
トキーの設定はトランスポートキー設定用のコマンドに
より動作し、前記第2の手段による下位のファイルの配
下へのファイルの設定はトランスポートキー設定用のコ
マンドとは異なるコマンドにより動作することを特徴と
する請求項8に記載の携帯可能情報処理装置。
12. The portable information storage medium operates based on a command supplied from an external device, and setting of a transport key to a lower-level file by the first means is performed by a transport key setting command. 9. The portable information processing apparatus according to claim 8, wherein the second means operates to set a file under a lower-order file by a command different from a command for setting a transport key. .
【請求項13】 上位のファイルと下位のファイルとか
らなるツリー構造のファイルを創成し、かつ制御手段に
より各ファイルへのアクセス管理を行う情報処理装置用
制御プログラムを記憶した媒体において、 前記制御プログラムは前記制御手段に対して、 上位の管理者によりアクセス条件が設定された上位のフ
ァイルを創成させるステップと、 上位の管理者から提供され下位の管理者が利用するため
にアクセス条件が設定され下位のファイルを創成させる
ステップと、 上位のファイルのアクセス条件を参照してこの上位のフ
ァイルのアクセス条件を満足している場合に上位の管理
者から下位の管理者に対する受け渡しのためのトランス
ポートキーを下位のファイルに設定させるステップと、 下位ファイルのアクセス条件を参照してこのアクセス条
件を満足している場合に下位のファイルの配下にファイ
ルを設定させるステップとから構成されこの制御プログ
ラムを記憶したことを特徴とする情報処理装置用制御プ
ログラムを記憶した媒体。
13. A medium storing a control program for an information processing device for creating a tree-structured file composed of an upper file and a lower file and controlling access to each file by a control means, wherein Creating a higher-level file for which access conditions have been set by a higher-level manager with respect to the control means; and setting an access condition provided by the higher-level manager for use by the lower-level manager. Creating the file of the upper level, and referring to the access condition of the upper level file, if the access condition of the upper level file is satisfied, a transport key for transfer from the upper level administrator to the lower level administrator is obtained. Refer to the step of setting the lower file and the access condition of the lower file, and Medium storing an information processing apparatus control program characterized by storing the control program is composed of a step of setting the file under the subordinate file if you are satisfied Seth conditions.
【請求項14】 前記情報処理装置用制御プログラムを
記憶したプログラムメモリと、前記ファイルが割り当て
られるデータメモリと、該ファイルへのアクセス管理を
行う制御回路と、外部装置とのインターフェイスが1つ
のモジュール内に構成されていることを特徴とする請求
項13に記載の情報処理装置用制御プログラムを記憶し
た媒体。
14. A module in which a program memory storing the control program for the information processing device, a data memory to which the file is allocated, a control circuit for managing access to the file, and an interface with an external device are included in one module. 14. A medium storing the control program for an information processing device according to claim 13, wherein the control program is configured to:
JP8278877A 1996-03-29 1996-09-30 Method for managing access of memory Pending JPH10105472A (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP8278877A JPH10105472A (en) 1996-09-30 1996-09-30 Method for managing access of memory
ES97105146T ES2174140T3 (en) 1996-03-29 1997-03-26 METHOD OF MANAGING FILES, WHICH NEED A CHANGE OF THE KEY DATA AND INTEGRATED CIRCUIT CARD THAT USES THIS METHOD.
SG1997000985A SG54485A1 (en) 1996-03-29 1997-03-26 File managing method requiring a change in key data and ic card device using the method
DE69710798T DE69710798T2 (en) 1996-03-29 1997-03-26 File management method and chip card using this method require key data change
PT97105146T PT798674E (en) 1996-03-29 1997-03-26 METHOD OF FILTER MANAGEMENT THAT REQUIRES THE CHANGE OF KEY DATA AND IC CARD DEVICE FOR USING THE METHOD
EP97105146A EP0798674B1 (en) 1996-03-29 1997-03-26 File managing method requiring a change in key data and ic card device using the method
TW086103926A TW358190B (en) 1996-03-29 1997-03-27 Files management system
US08/825,387 US5929428A (en) 1996-03-29 1997-03-28 File managing method requiring a change in key data and IC card device using the method
CN97110316.XA CN1129851C (en) 1996-03-29 1997-03-31 File management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8278877A JPH10105472A (en) 1996-09-30 1996-09-30 Method for managing access of memory

Publications (1)

Publication Number Publication Date
JPH10105472A true JPH10105472A (en) 1998-04-24

Family

ID=17603368

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8278877A Pending JPH10105472A (en) 1996-03-29 1996-09-30 Method for managing access of memory

Country Status (1)

Country Link
JP (1) JPH10105472A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001077920A1 (en) * 2000-04-06 2001-10-18 Sony Corporation Storage area dividing method for portable device
WO2005066803A1 (en) * 2004-01-06 2005-07-21 Sony Corporation Data communicating apparatus and method for managing memory of data communicating apparatus
JP2005309780A (en) * 2004-04-21 2005-11-04 Ntt Docomo Inc Ic card and authority transfer control method
JP2005332322A (en) * 2004-05-21 2005-12-02 Konica Minolta Photo Imaging Inc Electronic authentication tool primary issuing apparatus, electronic authentication tool issuance system, electronic authentication tool secondary issuing apparatus, electronic authentication tool primary issuing method, electronic authentication issuing method and electronic authentication tool secondary issuing method
JP2005338925A (en) * 2004-05-24 2005-12-08 Toshiba Corp Portable electronic device
JP2007133913A (en) * 2007-02-16 2007-05-31 Sony Corp Device and method for data storage
JP4787149B2 (en) * 2003-02-14 2011-10-05 オラクル・インターナショナル・コーポレイション System and method for hierarchical role-based qualification

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001077920A1 (en) * 2000-04-06 2001-10-18 Sony Corporation Storage area dividing method for portable device
US7046810B2 (en) 2000-04-06 2006-05-16 Sony Corporation Data processing method and system of same portable device data processing apparatus and method of same and program
JP4645000B2 (en) * 2000-04-06 2011-03-09 ソニー株式会社 Method for dividing storage area of portable device
JP4787149B2 (en) * 2003-02-14 2011-10-05 オラクル・インターナショナル・コーポレイション System and method for hierarchical role-based qualification
WO2005066803A1 (en) * 2004-01-06 2005-07-21 Sony Corporation Data communicating apparatus and method for managing memory of data communicating apparatus
US7516479B2 (en) 2004-01-06 2009-04-07 Sony Corporation Data communicating apparatus and method for managing memory of data communicating apparatus
JP2005309780A (en) * 2004-04-21 2005-11-04 Ntt Docomo Inc Ic card and authority transfer control method
JP2005332322A (en) * 2004-05-21 2005-12-02 Konica Minolta Photo Imaging Inc Electronic authentication tool primary issuing apparatus, electronic authentication tool issuance system, electronic authentication tool secondary issuing apparatus, electronic authentication tool primary issuing method, electronic authentication issuing method and electronic authentication tool secondary issuing method
JP4601329B2 (en) * 2004-05-21 2010-12-22 コニカミノルタエムジー株式会社 Electronic authentication device primary issuing device, electronic authentication device issuing system, electronic authentication device secondary issuing device, electronic authentication device primary issuing method, electronic authentication device issuing method, and electronic authentication device secondary issuing method
JP2005338925A (en) * 2004-05-24 2005-12-08 Toshiba Corp Portable electronic device
JP2007133913A (en) * 2007-02-16 2007-05-31 Sony Corp Device and method for data storage

Similar Documents

Publication Publication Date Title
US5225664A (en) Mutual authentication system
EP0330404B1 (en) Integrated circuit cards
US5929428A (en) File managing method requiring a change in key data and IC card device using the method
US6659354B2 (en) Secure multi-application IC card system having selective loading and deleting capability
US7469339B2 (en) Secure multiple application card system and process
EP0657851B1 (en) File management system for memory card
JP3662946B2 (en) File management system and portable electronic device
JPH06274397A (en) File control system
KR100948120B1 (en) Portable information recording medium
JPH1091738A (en) Post-initialization method for chip card
JPH022475A (en) Ic card
JPH06302180A (en) Data access system for electronic device
JPH06282471A (en) File control system
US5828053A (en) Portable storage medium and portable storage medium issuing system
JPH10105472A (en) Method for managing access of memory
US20050038820A1 (en) Processing method and system of data management for IC card
EP0949594B1 (en) Access management method and apparatus, and portable electronic device used therefor
JPH09265433A (en) File managing method
JPH09114741A (en) Portable information recording medium
JPH09293023A (en) Controlling method for access to memory
JPS62200441A (en) Ic card
JPH09106376A (en) Portable information recording medium
JP2006092568A (en) Ic card and file management method for ic card
EA002994B1 (en) Method for indivisibly modifying a plurality of sites in a microcircuit card non volatile memory, in particular a contactless card
JPH06274398A (en) File control system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060929

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061121

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070122

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070508

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070706

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070717

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070810