JP3015376B2 - IC card - Google Patents

IC card

Info

Publication number
JP3015376B2
JP3015376B2 JP63211828A JP21182888A JP3015376B2 JP 3015376 B2 JP3015376 B2 JP 3015376B2 JP 63211828 A JP63211828 A JP 63211828A JP 21182888 A JP21182888 A JP 21182888A JP 3015376 B2 JP3015376 B2 JP 3015376B2
Authority
JP
Japan
Prior art keywords
area
data
definition
file
information
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.)
Expired - Lifetime
Application number
JP63211828A
Other languages
Japanese (ja)
Other versions
JPH0259939A (en
Inventor
康雄 飯島
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 JP63211828A priority Critical patent/JP3015376B2/en
Priority to US07/398,080 priority patent/US5161256A/en
Priority to FR8911246A priority patent/FR2635890B1/en
Priority to KR1019890012219A priority patent/KR970007282B1/en
Publication of JPH0259939A publication Critical patent/JPH0259939A/en
Application granted granted Critical
Publication of JP3015376B2 publication Critical patent/JP3015376B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえば不揮発性メモリおよびCPUなどの
制御素子を有するIC(集積回路)チップを内蔵したICカ
ードに係り、特にそのメモリに対するデータファイルお
よびエリアの定義方法を改良したICカードに関する。
The present invention relates to an IC card having a built-in IC (integrated circuit) chip having a control element such as a nonvolatile memory and a CPU. The present invention relates to an IC card having an improved data file and area definition method for the memory.

(従来の技術) 近年、新たな携帯可能なデータ記憶媒体として、消去
可能な不揮発性メモリおよびCPUなどの制御素子を有す
るICチップを内蔵した、いわゆるICカードが注目されて
いる。この種のICカードは、内蔵する制御素子によって
内蔵するメモリをアクセスすることにより、選択的に外
部とのデータの入出力などを行なうようになっている。
(Prior Art) In recent years, as a new portable data storage medium, a so-called IC card having a built-in IC chip having a control element such as an erasable nonvolatile memory and a CPU has attracted attention. This type of IC card selectively performs data input / output with the outside by accessing a built-in memory by a built-in control element.

最近、このようなICカードでは、種々のアプリケーシ
ョンに対応できるように、メモリを複数のデータファイ
ルという概念で大きく分割定義し、かつ各データファイ
ルを複数のエリアという概念で小さく分割定義してい
る。
Recently, in such an IC card, a memory is largely divided and defined by a concept of a plurality of data files, and each data file is divided and defined by a concept of a plurality of areas so as to be compatible with various applications.

そして、これらのエリアは、メモリへのアクセス単位
となっており、アクセスの際、そのエリアに付与された
識別情報(たとえばエリア番号)を指定することによ
り、ICカード内部でアクセス対象となっているエリアへ
の直接アクセスを可能としている。
These areas are units of access to the memory, and are designated as access targets within the IC card by specifying identification information (eg, area number) assigned to the area at the time of access. It allows direct access to the area.

データファイル内のエリアへのアクセスは、アクセス
対象とするエリアが存在するデータファイルに付与され
ている識別情報(たとえばデータファイル名)を指定
し、そのデータファイルを選択することにより行なわれ
る。
Access to an area in a data file is performed by designating identification information (for example, a data file name) assigned to a data file in which an area to be accessed exists and selecting the data file.

さて、このようなICカードにおける従来のデータファ
イルの定義方法は、定義するデータファイルは全てあら
かじめわかった上で一括して定義する方法であった。こ
のとき、データファイルの定義時点で、データファイル
に付与する識別情報が重複していないことが外部(ICカ
ードの発行システム)など)で確認しなければならなか
った。
By the way, the conventional method of defining a data file in such an IC card is to define all the data files to be defined in advance and to define them collectively. At this time, at the time of definition of the data file, it was necessary to confirm from outside (such as an IC card issuing system) that the identification information given to the data file was not duplicated.

この方法によると、外部で確認した処理が間違ってい
た場合でも、そのまま正常に定義されてしまっていた。
このため、データファイルの定義時、データファイルを
指定する識別情報が重複して付与される恐れがあり、信
頼性に劣るという問題があった。
According to this method, even if the process checked externally is wrong, it is defined normally as it is.
For this reason, when defining a data file, there is a possibility that identification information designating the data file may be duplicated, and there is a problem that reliability is poor.

また、定義されたデータファイルに対するエリアの定
義方法も、同様な方法で行なわれており、同様な問題が
あった。
Also, the method of defining an area for a defined data file is performed in a similar manner, and has a similar problem.

(発明が解決しようとする課題) 本発明は、上記したようにデータファイルの定義時、
データファイルを指定する識別情報が重複して付与され
る恐れがあり、信頼性に劣るという問題点を解決すべく
なされたもので、本装置の内部で識別情報の重複チェッ
クが行なえ、よってデータファイルの定義時、データフ
ァイルを指定する識別情報が重複して付与される恐れが
なく、信頼性の向上が図れるとともに、本装置を発行す
る発行システムの処理に対する負荷も軽減されるICカー
ドを提供することを目的とする。
(Problems to be Solved by the Invention) The present invention provides a method for defining a data file as described above.
This is intended to solve the problem of inferior reliability, in which the identification information for designating the data file may be duplicated, and the duplication of the identification information can be checked inside the apparatus, and thus the data file can be checked. Provided is an IC card in which identification information for designating a data file is not duplicated at the time of definition, which improves reliability and reduces the processing load of the issuing system that issues the apparatus. The purpose is to:

また、本発明は、上記したようにエリアの定義時、エ
リアを指定する識別情報が重複して付与される恐れがあ
り、信頼性に劣るという問題点を解決すべくなされたも
ので、本装置の内部で識別情報の重複チェックが行な
え、よってエリアの定義時、エリアを指定する識別情報
が重複して付与される恐れがなく、信頼性の向上が図れ
るとともに、本装置を発行する発行システムの処理に対
する負荷も軽減されるICカードを提供することを目的と
する。
Further, the present invention has been made to solve the problem that the identification information for designating an area may be duplicated when an area is defined as described above, resulting in poor reliability. In this case, it is possible to check the duplication of the identification information inside the device. Therefore, when the area is defined, there is no possibility that the identification information specifying the area is duplicated, thereby improving the reliability and improving the reliability of the issuing system for issuing the apparatus. An object of the present invention is to provide an IC card in which the processing load is reduced.

[発明の構成] (課題を解決するための手段) 本発明のICカードは、複数のデータファイルに分割さ
れて使用されるメモリを内蔵し、このファイルに対して
アクセスを行なって選択的に外部装置との間でデータの
入出力を行なうICカードであって、前記外部装置とデー
タの入出力を行なうデータ入出力部と、このデータ入出
力部を介して前記外部装置から入力された命令データが
データファイルを追加定義するためのデータファイルの
識別情報および該データファイルのサイズ情報を含むデ
ータファイルの定義命令であるか否かを判定する第1の
手段と、この第1の手段にてデータファイルの定義命令
であると判定された場合に、このデータファイルの定義
命令中のファイルの識別情報と同一の識別情報を有する
データファイルの定義情報がメモリ内に既に存在してい
るか否かを判定する第2の手段と、この第2の手段にて
同一の識別情報を有するデータファイルの定義情報がメ
モリ内に既に存在していないと判定された場合には、前
記データファイルの定義命令にて追加定義されるファイ
ルのアドレス情報を生成する第3の手段と、前記第2の
手段にて同一の識別情報を有するデータファイルの定義
情報がメモリ内に既に存在していないと判定された場合
には、前記データファイルの定義命令中のファイルの識
別情報および該データファイルのサイズ情報と、前記第
3の手段にて生成されたデータファイルのアドレス情報
とからなるファイル定義情報を生成してメモリに記憶す
る第4の手段と、前記第2の手段にてデータファイルの
定義命令中のファイルの識別情報と同一の識別情報を有
するデータファイルの定義情報がメモリ内に既に存在し
ていると判定された場合には、同一の識別情報を有する
データファイルが既に存在している旨の応答データを前
記外部装置に出力する第5の手段と、前記データ入出力
部を介して前記外部装置からファイル選択命令が入力さ
れた場合には、該ファイル選択命令中のデータファイル
の識別情報と同一のデータファイルの識別情報を有する
ファイル定義情報を前記メモリから見つけだし、このフ
ァイル定義情報にて定義されているファイルへの処理を
行なう第6の手段とを具備している。
[Structure of the Invention] (Means for Solving the Problems) The IC card of the present invention has a built-in memory which is used by being divided into a plurality of data files, and accesses these files to selectively access the external files. An IC card for inputting / outputting data to / from a device, a data input / output unit for inputting / outputting data to / from the external device, and command data input from the external device via the data input / output unit. Means for determining whether or not is a data file definition instruction including data file identification information for additionally defining a data file and size information of the data file; and If it is determined that the command is a file definition command, the definition information of the data file having the same identification information as the file identification information in the data file definition command is A second means for determining whether or not the information already exists in the memory, and the second means determines that the definition information of the data file having the same identification information does not already exist in the memory. In this case, the third means for generating the address information of the file additionally defined by the data file definition command and the definition information of the data file having the same identification information in the second means are stored in the memory. If it is determined that the data file does not already exist, the identification information of the file and the size information of the data file in the definition command of the data file and the address information of the data file generated by the third means A fourth means for generating file definition information consisting of: and storing the same in a memory; and the second means for identifying the same file identification information as the file identification information in the data file definition command. If it is determined that the definition information of the data file having the information already exists in the memory, response data indicating that the data file having the same identification information already exists is output to the external device. Fifth means, in a case where a file selection command is input from the external device via the data input / output unit, has the same data file identification information as the data file identification information in the file selection command. Sixth means for finding file definition information from the memory and performing processing on a file defined by the file definition information.

また、本発明のICカードは、複数のデータファイルに
分割され、かつ、各データファイルが更に複数のエリア
に分割されて使用されるメモリを内蔵し、各ファイルお
よびエリアに対してアクセスを行なって選択的に外部装
置との間でデータの入出力を行なうICカードであって、
前記外部装置とデータの入出力を行なうデータ入出力部
と、このデータ入出力部を介して前記外部装置から入力
されたファイル選択命令データにより前記複数のデータ
ファイルのうちの少なくとも1つのファイルを選択する
第1の手段と、この第1の手段によりファイルを選択し
た後に前記データ入出力部を介して前記外部装置から入
力された命令データがファイル内へエリアを追加定義す
るためのエリアの識別情報および該エリアのサイズ情報
を含むエリアの定義命令であるか否かを判定する第2の
手段と、この第2の手段にてエリアの定義命令であると
判定された場合に、このエリアの定義命令中のエリアの
識別情報と同一の識別情報を有するエリアの定義情報が
該エリアが前記第1の手段にて選択されたファイル内に
既に存在しているか否かを判定する第3の手段と、この
第3の手段にて同一の識別情報を有するエリアの定義情
報がメモリ内に既に存在していないと判定された場合に
は、前記エリアの定義命令にて追加定義されるエリアの
アドレス情報を生成する第4の手段と、前記第3の手段
にて同一の識別情報を有するエリアの定義情報がメモリ
内に既に存在していないと判定された場合には、前記エ
リアの定義命令中のエリアの識別情報および該エリアの
サイズ情報と、前記第4の手段にて生成されたエリアの
アドレス情報とからなるエリア定義情報を生成してメモ
リに記憶する第5の手段と、前記第3の手段にてエリア
の定義命令中のエリアの識別情報と同一の識別情報を有
するエリアの定義情報がメモリ内に既に存在していると
判定された場合には、同一の識別情報を有するエリアが
既に存在している旨の応答データを前記外部装置に出力
する第6の手段と、前記データ入出力部を介して前記外
部装置からエリア選択命令が入力された場合には、該エ
リア選択命令中のエリア識別情報と同一のエリア識別情
報を有するエリア定義情報を前記ファイル内から見つけ
だし、このエリア定義情報にて定義されているエリアへ
の処理を行なう第7の手段とを具備している。
Further, the IC card of the present invention has a built-in memory that is divided into a plurality of data files, and each data file is further divided into a plurality of areas, and accesses each file and area. An IC card for selectively inputting and outputting data to and from an external device,
A data input / output unit for inputting / outputting data to / from the external device, and selecting at least one of the plurality of data files according to file selection command data input from the external device via the data input / output unit First means for performing the operation, and command information input from the external device via the data input / output unit after selecting a file by the first means; and area identification information for additionally defining an area in the file. And second means for determining whether or not the command is an area definition command including size information of the area. If the second means determines that the command is an area definition command, this area definition Definition information of an area having the same identification information as the identification information of the area in the instruction already exists in the file selected by the first means. A third means for determining whether or not the area definition information having the same identification information already exists in the memory; The fourth means for generating the address information of the area additionally defined in the step (a) and the third means determining that the definition information of the area having the same identification information does not already exist in the memory Generates area definition information including the area identification information and the area size information in the area definition command, and the area address information generated by the fourth means, and stores the area definition information in the memory. The fifth means and the third means, when it is determined that the area definition information having the same identification information as the area identification information in the area definition command already exists in the memory, , Identical identity A sixth means for outputting response data to the effect that an area having an area already exists to the external device, and when an area selection command is input from the external device via the data input / output unit, Seventh means for finding area definition information having the same area identification information as the area identification information in the area selection command from the file, and performing processing on the area defined by the area definition information. ing.

(作用) 本発明によれば、メモリに対するデータファイルの定
義時、そのデータファイルに付与する識別情報が入力さ
れた際、既に定義されているデータファイルに付与され
ている既存の識別情報と重複するか否かを判断し、重複
しないことを確認した上でデータファイルの定義を行な
うことにより、本装置の内部で識別情報の重複チェック
が行なえる。したがって、データファイルの定義時、デ
ータファイルを指定する識別情報が重複して付与される
恐れがなく、信頼性の向上が図れるとともに、本装置を
発行する発行システムの処理に対する負荷も軽減され
る。
(Operation) According to the present invention, when a data file is defined in the memory, when the identification information to be assigned to the data file is input, the identification information overlaps with the existing identification information assigned to the already defined data file. By determining whether or not the data file is not duplicated and defining the data file, it is possible to check the duplication of the identification information inside the apparatus. Therefore, at the time of defining the data file, there is no possibility that the identification information designating the data file is duplicated, and the reliability is improved, and the load on the processing of the issuing system that issues the apparatus is reduced.

また、本発明によれば、定義されたデータファイルに
対するエリアの定義時、そのエリアに付与する識別情報
が入力された際、既に定義されているエリアに付与され
ている既存の識別情報と重複するか否かを判断し、重複
しないことを確認した上でエリアの定義を行なうことに
より、本装置の内部で識別情報の重複チェックが行なえ
る。したがって、エリアの定義時、エリアを指定する識
別情報が重複して付与される恐れがなく、信頼性の向上
が図れるとともに、本装置を発行する発行システムの処
理に対する負荷も軽減される。
Further, according to the present invention, when defining an area for a defined data file, when identification information to be assigned to the area is input, the information overlaps with existing identification information assigned to an already defined area. By determining whether or not there is no overlap, and defining the area after confirming that there is no overlap, it is possible to check the overlap of the identification information inside the apparatus. Therefore, at the time of defining the area, there is no possibility that the identification information designating the area is given redundantly, the reliability can be improved, and the load on the processing of the issuing system that issues this apparatus can be reduced.

(実施例) 以下、本発明の一実施例について図面を参照して説明
する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

第14図は本発明に係るICカードを取扱う端末装置の構
成例を示すものである。すなわち、この端末装置は、IC
カードをカードリーダ・ライタ2を介してCPUなどから
なる制御部3と接続可能にするとともに、制御部3にキ
ーボード4、CRTディスプレイ装置5、プリンタ6およ
びフロッピィディスク装置7を接続して構成される。
FIG. 14 shows a configuration example of a terminal device for handling an IC card according to the present invention. That is, this terminal device is an IC
The card can be connected to a control unit 3 including a CPU or the like via a card reader / writer 2, and a keyboard 4, a CRT display device 5, a printer 6, and a floppy disk device 7 are connected to the control unit 3. .

ICカード1は、ユーザが保持し、たとえば商品購入な
どの際にユーザのみが知得している暗証番号の参照や必
要データの蓄積などを行なうもので、たとえば第13図に
その機能ブロックを示すように、リード・ライト部11、
暗証設定・暗証照合部12、および暗号化・復号化部13な
どの基本機能を実行する部分と、これらの基本機能を管
理するスーパバイザ14とで構成されている。
The IC card 1 is held by the user, and refers to a personal identification number known only to the user when, for example, purchasing a product, accumulates necessary data, and the like. For example, FIG. 13 shows its functional blocks. As shown in the read / write section 11,
It comprises a part for executing basic functions such as a password setting / password collating unit 12 and an encryption / decryption unit 13, and a supervisor 14 for managing these basic functions.

リード・ライト部11は、データメモリ16などに対して
データの読出し、書込み、あるいは消去を行なう機能で
ある。
The read / write unit 11 has a function of reading, writing, or erasing data from the data memory 16 or the like.

暗証設定・暗証照合部12は、ユーザが設定した暗証番
号の記憶および読出禁止処理を行なうとともに、暗証番
号の設定後にその暗証番号の照合を行い、以後の処理の
許可を与える機能である。
The password setting / password collation unit 12 has a function of performing storage and reading prohibition processing of the password set by the user, collating the password after setting the password, and giving permission for the subsequent processing.

暗号化・復号化部13は、たとえば通信回線を介して制
御部3から他の端末装置へデータを送信する場合の通信
データの漏洩、偽造を防止するための暗号化や暗号化さ
れたデータの復号化を行なうものであり、たとえばDES
(Data Encryption Standard)など、充分な暗号強度を
有する暗号化アルゴリズムにしたがってデータ処理を行
なう機能である。
The encryption / decryption unit 13 performs, for example, encryption for preventing leakage or forgery of communication data when data is transmitted from the control unit 3 to another terminal device via a communication line, and encryption / decryption of the encrypted data. Performs decryption, such as DES
(Data Encryption Standard). This function performs data processing according to an encryption algorithm having sufficient encryption strength.

スーパバイザ14は、カードリーダ・ライタ2から入力
された機能コードもしくはデータの付加された機能コー
ドを解読し、前記基本機能のうち必要な機能を選択して
実行させる機能である。
The supervisor 14 has a function of decoding a function code input from the card reader / writer 2 or a function code to which data is added, and selecting and executing a necessary function among the basic functions.

これらの諸機能を発揮させるために、ICカード1は、
たとえば第12図に示すように、CPUなどの制御素子(制
御部)15、データメモリ(メモリ部)16、プログラムメ
モリ17、およびカードリーダ・ライタ2との電気的接触
を得るためのコンタクト部18によって構成されており、
これらのうち制御素子15、データメモリ16、およびプロ
グラムメモリ17は1つのICチップ(あるいは複数のICチ
ップ)で構成されてICカード本体内に埋設されている。
In order to exhibit these various functions, the IC card 1
For example, as shown in FIG. 12, a control element (control section) 15 such as a CPU, a data memory (memory section) 16, a program memory 17, and a contact section 18 for obtaining electrical contact with the card reader / writer 2 Is composed of
Among these, the control element 15, the data memory 16, and the program memory 17 are composed of one IC chip (or a plurality of IC chips) and are embedded in the IC card body.

プログラムメモリ17は、たとえばマスクROMで構成さ
れており、前記各基本機能を実現するサブルーチンを備
えた制御素子15の制御プログラムなどを記憶するもので
ある。
The program memory 17 is formed of, for example, a mask ROM, and stores a control program of the control element 15 having a subroutine for realizing each of the basic functions.

データメモリ16は、各種データの記憶に使用され、た
とえばEEPROMなどの消去可能な不揮発性メモリで構成さ
れている。
The data memory 16 is used for storing various data, and is composed of an erasable nonvolatile memory such as an EEPROM.

そして、データメモリ16は、たとえば第2図に示すよ
うに、全てのアプリケーションで共通に使用する1つの
コモンデータファイル(CDF)21、および各アプリケー
ションごとに使用する複数のアプリケーションデータフ
ァイル(ADF)22,…に大きく分割定義される。これら各
データファイル(DF)21,22は、データファイル定義テ
ーブル23のデータファイル定義情報24によって定義され
る。この場合、データファイル定義情報24は、データメ
モリ16の一端(たとえば先頭番地)から記憶され、その
データファイル定義情報24によって定義される各データ
ファイル21,22は、データメモリ16の他端(たとえば最
終番地)から定義されるようになっている。
For example, as shown in FIG. 2, the data memory 16 stores one common data file (CDF) 21 commonly used by all applications and a plurality of application data files (ADF) 22 used for each application. , ... are largely divided and defined. These data files (DF) 21 and 22 are defined by data file definition information 24 of a data file definition table 23. In this case, the data file definition information 24 is stored from one end (for example, the starting address) of the data memory 16, and the data files 21, 22 defined by the data file definition information 24 are stored at the other end (for example, (Last address).

ここに、データファイル定義情報24は、たとえば第3
図に示すように、データファイルを指定する識別情報と
してのデータファイル名(DFN)、データファイルが割
当てられているメモリ上の先頭アドレス情報、サイズ情
報およびアクセス条件情報、総エリア割当先頭アドレス
情報、エリア未割当サイズ情報を対応付けたデータ列で
ある。
Here, the data file definition information 24 is, for example, the third
As shown in the figure, a data file name (DFN) as identification information for specifying a data file, head address information on a memory to which the data file is allocated, size information and access condition information, total area allocation head address information, It is a data string in which area unallocated size information is associated.

なお、定義されたデータファイル内にエリアが1つも
定義されていない状態においては、エリア未割当サイズ
情報の値としては、当該データファイルの最大サイズに
なっており、また総エリア割当先頭アドレス情報として
は、当該データファイルの最終アドレスに「1」を加え
た値となっている。
In the state where no area is defined in the defined data file, the value of the area unallocated size information is the maximum size of the data file, and the value of the total area allocation start address information is Is a value obtained by adding “1” to the final address of the data file.

そして、このデータファイル定義情報24は、後述する
データファイル定義命令データにより順次記憶される。
第2図の例では、本命令データにより、データファイル
名「00000」、「NNNNN」、…「ZZZZZ」の順で記憶され
たものであり、特にデータファイル名「00000」はコモ
ンデータファイル21のデータファイル名として内部的に
リザーブされている。
The data file definition information 24 is sequentially stored according to data file definition command data described later.
In the example shown in FIG. 2, the data file names “00000”, “NNNNN”,..., “ZZZZZ” are stored in this order by this instruction data. Reserved internally as data file name.

また、コモンデータファイル21内は第4図に示すよう
に、アプリケーションデータファイル22内は第5図に示
すように、それぞれ複数のエリア25,…、28,…に分割定
義される。これら各エリア25,28は、エリア定義テーブ
ル26,29のエリア定義情報27,30によってそれぞれ定義さ
れる。この場合、エリア定義情報27,30は、データファ
イル21,22の一端(たとえば先頭番地)から記憶され、
そのエリア定義情報27,30によって定義される各エリア2
5,28は、データファイル21,22の他端(たとえば最終番
地)から定義されるようになっている。
Also, as shown in FIG. 4, the common data file 21 is divided into a plurality of areas 25,..., 28,. These areas 25 and 28 are defined by the area definition information 27 and 30 of the area definition tables 26 and 29, respectively. In this case, the area definition information 27, 30 is stored from one end (for example, the first address) of the data files 21, 22,
Each area 2 defined by the area definition information 27, 30
5, 28 are defined from the other end (for example, the last address) of the data files 21, 22.

ここに、エリア定義情報27,30は、たとえば第6図に
示すように、エリアを指定する識別情報としてのエリア
番号(AID)、エリアが割当てられているメモリ上の先
頭アドレス情報、サイズ情報およびアクセス条件情報を
対応付けたデータ列である。
Here, as shown in FIG. 6, for example, the area definition information 27, 30 includes an area number (AID) as identification information for specifying an area, head address information on a memory to which the area is allocated, size information, It is a data string associated with access condition information.

そして、このエリア定義情報27,30は、後述するエリ
ア定義命令データにより順次記憶される。第4図の例で
は、本命令データにより、エリア番号「01」、「02」、
…「03」の順で記憶され、また第5図の例では、本命令
データにより、エリア番号「04」、…「05」の順で記憶
されたものである。
The area definition information 27, 30 is sequentially stored according to area definition command data described later. In the example of FIG. 4, according to this instruction data, the area numbers “01”, “02”,
.. Are stored in the order of "03", and in the example of FIG. 5, they are stored in the order of the area numbers "04",.

第7図は、データファイル未割当サイズ情報を記憶す
るデータファイル未割当サイズ記憶部31、および総デー
タファイル割当先頭アドレス情報を記憶する総データフ
ァイル割当先頭アドレス記憶部32を示すもので、これら
は例えばデータメモリ16内に設けられている。
FIG. 7 shows a data file unallocated size storage unit 31 for storing data file unallocated size information and a total data file allocation start address storage unit 32 for storing total data file allocation start address information. For example, it is provided in the data memory 16.

なお、データファイルが1つも定義されていない状態
においては、データファイル未割当サイズ情報の値とし
ては、データメモリ16としてデータファイル割当てのた
めに与える最大サイズになっており、また総データファ
イル割当先頭アドレス情報としては、データファイル割
当てのために与えたデータメモリ16内の領域の最終アド
レスに「1」を加えた値となっている。
In the state where no data file is defined, the value of the data file unallocated size information is the maximum size provided for the data file allocation as the data memory 16 and the total data file allocation The address information is a value obtained by adding “1” to the last address of the area in the data memory 16 given for data file allocation.

次に、このような構成において第1図に示すフローチ
ャートを参照しつつ動作を説明する。
Next, the operation of such a configuration will be described with reference to the flowchart shown in FIG.

まず、データファイルの定義処理を説明する。定常状
態においては、外部からの命令データ待ち状態になって
おり、この状態で命令データが入力されると、制御素子
15は、第8図に示すようなデータファイル定義命令デー
タか否かを判断する。この判断の結果、データファイル
定義命令データでなければ、制御素子15は別の命令デー
タであることを判断する処理に移行する。
First, the data file definition process will be described. In the steady state, it is in a state of waiting for external command data, and when command data is input in this state, the control element
Step 15 determines whether or not the data is data file definition command data as shown in FIG. If the result of this determination is that the data is not data file definition command data, the control element 15 proceeds to a process of determining that it is another command data.

上記命令データの判断の結果、データファイル定義命
令データであれば、制御素子15は、データメモリ16から
本命令データ中のデータファイル名と同一のデータファ
イル名を持つデータファイル定義情報を見付ける。もし
見付かれば、制御素子15は、データファイル名が重複し
ているものと判断し、データファイル名既存を意味する
応答データを出力して命令データ待ち状態に戻る。
As a result of the determination of the command data, if the command data is the data file definition command data, the control element 15 finds the data file definition information having the same data file name as the data file name in the command data from the data memory 16. If found, the control element 15 determines that the data file name is duplicated, outputs response data indicating that the data file name already exists, and returns to the instruction data waiting state.

もし見付からなければ、制御素子15は、データファイ
ル名が重複していないものと判断し、本命令データ中の
ファイルサイズ情報にデータファイル定義情報のバイト
数(サイズ情報)を加えて、その結果を結果1とし、デ
ータファイル未割当サイズ記憶部31内の値と比較する。
この比較の結果、もし前者よりも後者の方が小さけれ
ば、制御素子15は、本命令データにより定義するデータ
ファイルがデータメモリ16内に割当てられないと判断
し、サイズ異常を意味する応答データを出力して命令デ
ータ待ち状態に戻る。
If not found, the control element 15 determines that the data file name is not duplicated, adds the number of bytes (size information) of the data file definition information to the file size information in this instruction data, and compares the result. The result is set to 1 and compared with the value in the data file unallocated size storage unit 31.
As a result of this comparison, if the latter is smaller than the former, the control element 15 determines that the data file defined by the present instruction data cannot be allocated in the data memory 16 and sends response data indicating an abnormal size. Output and return to the instruction data waiting state.

上記比較の結果、もし前者が後者に等しいか大きけれ
ば、制御素子15は、本命令データにより定義するデータ
ファイルがデータメモリ16内に割当てられるものと判断
し、データファイル定義情報内の先頭アドレス情報を生
成する。この先頭アドレス情報の生成にあたっては、総
データファイル割当先頭アドレス記憶部32内の値と本命
令データ中のファイルサイズ情報を用いて内部的に計算
を行なうことで得ることができる。
As a result of the comparison, if the former is equal to or greater than the latter, the control element 15 determines that the data file defined by the present instruction data is allocated in the data memory 16 and the head address information in the data file definition information is determined. Generate The generation of the head address information can be obtained by internally calculating using the value in the total data file allocation head address storage unit 32 and the file size information in the present instruction data.

こうして、先頭アドレス情報を生成すると、制御素子
15は、本命令データ中のデータファイル名、アクセス条
件情報、ファイルサイズ情報、および上記生成した先頭
アドレス情報によりデータファイル定義情報を生成し、
既に記憶されているデータファイル定義情報が存在すれ
ば、その次に記憶する。この場合、データファイルが1
つも定義されていない状態においては、データメモリ16
の先頭番地からデータファイル定義情報を記憶する。
Thus, when the head address information is generated, the control element
15 generates data file definition information based on the data file name, access condition information, file size information, and the generated top address information in the instruction data,
If there is already stored data file definition information, it is stored next. In this case, the data file is 1
If none is defined, the data memory 16
The data file definition information is stored starting from the first address.

データファイル定義情報を記憶し終わると、制御素子
15は、総データファイル割当先頭アドレス記憶部32内の
値を今回記憶した先頭アドレス情報に書換えるととも
に、データファイル未割当サイズ記憶部31内の値から先
に計算した結果1を減算し、その結果を新たなデータフ
ァイル未割当サイズ情報としてデータファイル未割当サ
イズ記憶部31に記憶する。そして、制御素子15は、デー
タファイル定義完了を意味する応答データを出力し、命
令データ待ち状態に戻る。
After storing the data file definition information, the control element
15 rewrites the value in the total data file allocation start address storage unit 32 with the head address information stored this time, and subtracts the previously calculated result 1 from the value in the data file unallocated size storage unit 31; The result is stored in the data file unallocated size storage unit 31 as new data file unallocated size information. Then, the control element 15 outputs response data indicating the completion of the data file definition, and returns to the instruction data waiting state.

このような処理によれば、データメモリ16としてデー
タファイル割当てのために与えられた領域内は、第2図
に示すように、アドレスの小さい方からデータファイル
定義情報24が順次記憶され、そのデータファイル定義情
報24によって定義されるデータファイル21,22はアドレ
スの大きい方から順次定義されることになる。
According to such processing, as shown in FIG. 2, the data file definition information 24 is sequentially stored in the area provided for the data file allocation as the data memory 16 from the smaller address. The data files 21 and 22 defined by the file definition information 24 are defined sequentially from the one with the largest address.

次に、データファイルの選択処理を説明する。前記デ
ータファイル定義命令データか否かの判断の結果、デー
タファイル定義命令データでなければ、制御素子15は、
次に第9図に示すようなデータファイル選択命令データ
か否かを判断する。この判断の結果、データファイル選
択命令データでなければ、制御素子15は別の命令データ
であることを判断する処理に移行する。
Next, a data file selection process will be described. As a result of the determination as to whether the data file definition command data is not data file definition command data, the control element 15
Next, it is determined whether or not the data is the data file selection command data as shown in FIG. If the result of this determination is not data file selection instruction data, control element 15 proceeds to a process of determining that it is another instruction data.

上記命令データの判断の結果、データファイル選択命
令データであれば、制御素子15は、データメモリ16から
本命令データ中のデータファイル名と同一のデータファ
イル名を持つデータファイル定義情報を見付ける。もし
見付からなければ、制御素子15は、データファイル未定
義を意味する応答データを出力し、命令データ待ち状態
に戻る。
As a result of the determination of the command data, if the command data is the data file selection command data, the control element 15 finds the data file definition information having the same data file name as the data file name in the command data from the data memory 16. If not found, the control element 15 outputs response data indicating that the data file has not been defined, and returns to the command data waiting state.

もし見付かれば、制御素子15は、そのデータファイル
定義情報を内蔵するRAM(図示しない)に記憶し、デー
タファイル選択完了を意味する応答データを出力して命
令データ待ち状態に戻る。
If found, the control element 15 stores the data file definition information in a built-in RAM (not shown), outputs response data indicating completion of data file selection, and returns to the command data waiting state.

次に、エリアの定義処理を説明する。前記データファ
イル選択命令データか否かの判断の結果、データファイ
ル選択命令データでなければ、制御素子15は、次に第10
図に示すようなエリア定義命令データか否かを判断す
る。この判断の結果、エリア定義命令データでなけれ
ば、制御素子15は別の命令データであることを判断する
処理に移行する。
Next, an area definition process will be described. If the result of the determination as to whether or not the data file selection command data is not data file selection command data, the control element 15
It is determined whether the data is the area definition command data as shown in the figure. If the result of this determination is that the data is not area definition command data, the control element 15 proceeds to a process of determining that it is another command data.

上記命令データの判断の結果、エリア定義命令データ
であれば、制御素子15は、まず前記データファイルの選
択時にRAM内に記憶しておいたデータファイル定義情報
を参照することにより、アプリケーションデータファイ
ル22が選択されているか否かを判断する。この判断の結
果、もしアプリケーションデータファイル22が選択され
ていなければコモンデータファイル21内を、アプリケー
ションデータファイル22が選択されていればコモンデー
タファイル21内およびその選択されているアプリケーシ
ョンデータファイル22内をそれぞれ参照することによ
り、本命令データ中のエリア番号(AID)と同一のエリ
ア番号(AID)を持つエリア定義情報を見付ける。もし
見付かれば、制御素子15は、エリア番号が重複している
ものと判断し、エリア番号既存を意味する応答データを
出力して命令データ待ち状態に戻る。
As a result of the determination of the command data, if the data is the area definition command data, the control element 15 first refers to the data file definition information stored in the RAM at the time of selecting the data file, thereby obtaining the application data file 22. It is determined whether or not is selected. As a result of this determination, if the application data file 22 is not selected, the common data file 21 is selected, and if the application data file 22 is selected, the common data file 21 and the selected application data file 22 are selected. By referring to each of them, area definition information having the same area number (AID) as the area number (AID) in the instruction data is found. If found, the control element 15 determines that the area numbers are duplicated, outputs response data indicating that the area numbers already exist, and returns to the command data waiting state.

もし見付からなければ、制御素子15は、エリア番号が
重複していないものと判断し、次に本命令データ中のエ
リアサイズ情報にエリア定義情報のバイト数(サイズ情
報)を加えて、その結果を結果2とし、データファイル
定義情報内のエリア未割当サイズ情報と比較する。な
お、このとき、アプリケーションデータファイル22が選
択されていなければ、コモンデータファイル21を定義し
ているデータファイル定義情報中のエリア未割当サイズ
情報を対象とし、またアプリケーションデータファイル
22が選択されていれば、そのアプリケーションデータフ
ァイル22を定義しているデータファイル定義情報中のエ
リア未割当サイズ情報を対象とする。
If not found, the control element 15 determines that the area numbers are not duplicated, then adds the number of bytes (size information) of the area definition information to the area size information in this instruction data, and compares the result. The result is set to result 2 and compared with the area unallocated size information in the data file definition information. At this time, if the application data file 22 has not been selected, the area unallocated size information in the data file definition information defining the common data file 21 is targeted, and the application data file 22
If 22 is selected, the area unallocated size information in the data file definition information defining the application data file 22 is targeted.

上記比較の結果、もし前者よりも後者の方が小さけれ
ば、制御素子15は、本命令データにより定義するエリア
が本データファイル内に割当てられないと判断し、サイ
ズ異常を意味する応答データを出力して命令データ待ち
状態に戻る。
As a result of the above comparison, if the latter is smaller than the former, the control element 15 determines that the area defined by the present instruction data cannot be allocated in the present data file, and outputs response data indicating an abnormal size. To return to the instruction data waiting state.

上記比較の結果、もし前者が後者に等しいか大きけれ
ば、制御素子15は、本命令データにより定義するエリア
が本データファイル内に割当てられるものと判断し、エ
リア定義情報内の先頭アドレス情報を生成する。この先
頭アドレス情報の生成にあたっては、データファイル定
義情報内の総エリア割当先頭アドレス情報と本命令デー
タ中のエリアサイズ情報を用いて内部的に計算を行なう
ことで得ることができる。なお、このとき、アプリケー
ションデータファイル22が選択されていなければ、コモ
ンデータファイル21を定義しているデータファイル定義
情報中の総エリア割当先頭アドレス情報を対象とし、ま
たアプリケーションデータファイル22が選択されていれ
ば、そのアプリケーションデータファイル22を定義して
いるデータファイル定義情報中の総エリア割当先頭アド
レス情報を対象とする。
As a result of the comparison, if the former is equal to or larger than the latter, the control element 15 determines that the area defined by the instruction data is allocated in the data file, and generates the head address information in the area definition information. I do. The generation of the head address information can be obtained by internally calculating using the total area allocation start address information in the data file definition information and the area size information in the present instruction data. At this time, if the application data file 22 has not been selected, the total area allocation start address information in the data file definition information defining the common data file 21 is targeted, and the application data file 22 is not selected. If so, the target is the total area allocation start address information in the data file definition information defining the application data file 22.

こうして、先頭アドレス情報を生成すると、制御素子
15は、本命令データ中のエリア番号、アクセス条件情
報、エリアサイズ情報、および上記生成した先頭アドレ
ス情報によりエリア定義情報を生成し、既に記憶されて
いるエリア定義情報が存在すれば、その次に記憶する。
この場合、エリアが1つも定義されていない状態におい
ては、データファイルの先頭番地からエリア定義情報を
記憶する。
Thus, when the head address information is generated, the control element
15 generates area definition information from the area number, access condition information, area size information, and the generated start address information in the instruction data, and if there is already stored area definition information, Remember.
In this case, when no area is defined, the area definition information is stored from the start address of the data file.

エリア定義情報を記憶し終わると、制御素子15は、対
象となったデータファイル定義情報内の総エリア割当先
頭アドレス情報を今回記憶した先頭アドレス情報に書換
えるとともに、対象となったデータファイル定義情報内
のエリア未割当サイズ情報から先に計算した結果2を減
算し、その結果を新たなエリア未割当サイズ情報として
記憶する。そして、制御素子15は、エリア定義完了を意
味する応答データを出力し、命令データ待ち状態に戻
る。
When the storage of the area definition information is completed, the control element 15 rewrites the total area allocation start address information in the target data file definition information with the head address information stored this time, and sets the target data file definition information. Is subtracted from the previously calculated area unallocated size information, and the result is stored as new area unallocated size information. Then, the control element 15 outputs response data indicating the completion of the area definition, and returns to the instruction data waiting state.

このような処理によれば、定義されたデータファイル
21,22内は、第4図および第5図に示すように、アドレ
スの小さい方からエリア定義情報27,30が順次記憶さ
れ、そのエリア定義情報27,30によって定義されるエリ
ア25,28はアドレスの大きい方から順次定義されること
になる。
According to such processing, the defined data file
As shown in FIGS. 4 and 5, area definition information 27 and 30 are sequentially stored in the areas 21 and 22 in ascending order of address. Areas 25 and 28 defined by the area definition information 27 and 30 are They are defined sequentially from the one with the largest address.

次に、エリア処理(エリア内データの読出、書込)を
説明する。前記エリア定義命令データか否かの判断の結
果、エリア定義命令データでなければ、制御素子15は、
次に第11図(a)に示すような読出命令データ、あるい
は第11図(b)に示すような書込命令データか否かを判
断する。この判断の結果、第11図のようなエリア処理命
令データでなければ、制御素子15は、命令データ異常を
意味する応答データを出力し、命令データ待ち状態に戻
る。
Next, the area processing (reading and writing of data in the area) will be described. As a result of the determination as to whether or not the area definition command data, if not the area definition command data, the control element 15
Next, it is determined whether the data is read command data as shown in FIG. 11A or write command data as shown in FIG. 11B. If the result of this determination is not area processing instruction data as shown in FIG. 11, the control element 15 outputs response data indicating an abnormality in the instruction data, and returns to the instruction data waiting state.

上記命令データの判断の結果、エリア処理命令データ
であれば、制御素子15は、まず前記データファイルの選
択的にRAM内に記憶しておいたデータファイル定義情報
を参照することにより、アプリケーションデータファイ
ル22が選択されているか否かを判断する。この判断の結
果、もしアプリケーションデータファイル22が選択され
ていなければコモンデータファイル21内を、アプリケー
ションデータファイル22が選択されていればコモンデー
タファイル21内およびその選択されているアプリケーシ
ョンデータファイル22内をそれぞれ参照することによ
り、本命令データ中のエリア番号(AID)と同一のエリ
ア番号(AID)を持つエリア定義情報を見付ける。もし
見付からなければ、制御素子15は、エリア未定義を意味
する応答データを出力し、命令データ待ち状態に戻る。
As a result of the determination of the command data, if the command data is the area processing command data, the control element 15 first refers to the data file definition information selectively stored in the RAM of the data file, thereby obtaining the application data file. It is determined whether 22 has been selected. As a result of this determination, if the application data file 22 is not selected, the common data file 21 is selected, and if the application data file 22 is selected, the common data file 21 and the selected application data file 22 are selected. By referring to each of them, area definition information having the same area number (AID) as the area number (AID) in the instruction data is found. If not found, the control element 15 outputs response data indicating that the area is undefined, and returns to the command data waiting state.

もし見付かれば、制御素子15は、そのエリア定義情報
から目的とするエリアがメモリ上のどこに位置している
かなどの情報を得て、そのエリアに対して読出しあるい
は書込み処理を行なう。そして、そのエリア処理終了
後、制御素子15は、処理結果を応答データとして出力
し、命令データ待ち状態に戻る。
If found, the control element 15 obtains information such as where the target area is located in the memory from the area definition information, and reads or writes the area. Then, after the end of the area processing, the control element 15 outputs the processing result as response data, and returns to the instruction data waiting state.

なお、前記実施例では、データファイル定義情報をデ
ータメモリのアドレスの小さい方から順次記憶し、その
データファイル定義情報によって定義される各データフ
ァイルはアドレスの大きい方から順次定義したが、その
逆、すなわちデータファイル定義情報をアドレスの大き
い方から順次記憶し、各データファイルはアドレスの小
さい方から順次定義するようにしてもよい。また、各デ
ータファイル内に対するエリア定義情報の記憶およびエ
リアの定義についても同様である。
In the above-described embodiment, the data file definition information is sequentially stored in the data memory in ascending order of address, and each data file defined by the data file definition information is sequentially defined in ascending order of the address. That is, the data file definition information may be stored sequentially from the larger address, and each data file may be defined sequentially from the smaller address. The same applies to the storage of area definition information and the definition of areas in each data file.

このように、データメモリに対するデータファイルの
定義時、そのデータファイルに付与するデータファイル
名(識別情報)が入力された際、既に定義されているデ
ータファイルに付与されている既存のデータファイル名
と重複するか否かを判断し、重複しないことを確認した
上でデータファイルの定義を行なうことにより、本ICカ
ードの内部でデータファイル名の重複チェックが行なえ
る。したがって、データファイルの定義時、データファ
イルを指定するデータファイル名が重複して付与される
恐れがなく、信頼性の向上が図れるとともに、本ICカー
ドを発行する発行システムの処理に対する負荷も軽減さ
れる。
As described above, when a data file name (identification information) to be assigned to a data file is input when a data file is defined in the data memory, the existing data file name assigned to the already defined data file is replaced with the existing data file name. By judging whether or not the data file is duplicated and confirming that the data file is not duplicated, the data file is defined, whereby the duplication of the data file name can be checked inside the present IC card. Therefore, when defining the data file, there is no possibility that the data file name specifying the data file is duplicated, thereby improving the reliability and reducing the load on the processing of the issuing system that issues the IC card. You.

また、定義されたデータファイルに対するエリアの定
義時、そのエリアに付与するエリア番号(識別情報)が
入力された際、既に定義されているエリアに付与されて
いる既存のエリア番号と重複するか否かを判断し、重複
しないことを確認した上でエリアの定義を行なうことに
より、本ICカードの内部でエリア番号の重複チェックが
行なえる。したがって、エリアの定義時、エリアを指定
するエリア番号が重複して付与される恐れがなく、信頼
性の向上が図れるとともに、本ICカードを発行する発行
システムの処理に対する負荷も軽減される。
When an area number (identification information) to be assigned to an area is defined when an area is defined for a defined data file, whether or not the area number overlaps with an existing area number assigned to an already defined area It is possible to check the duplication of the area number inside the present IC card by defining the area after judging whether there is no duplication or not. Therefore, when defining the area, there is no possibility that the area number designating the area will be duplicated, thereby improving the reliability and reducing the load on the processing of the issuing system that issues the present IC card.

[発明の効果] 以上詳述したように本発明のICカードによれば、本装
置の内部でデータファイルに付与する識別情報の重複チ
ェックが行なえる。したがって、データファイルの定義
時、データファイルを指定する識別情報が重複して付与
される恐れがなく、信頼性の向上が図れるとともに、本
装置を発行する発行システムの処理に対する負荷も軽減
される。
[Effects of the Invention] As described in detail above, according to the IC card of the present invention, it is possible to check for duplication of identification information given to a data file inside the present apparatus. Therefore, at the time of defining the data file, there is no possibility that the identification information designating the data file is duplicated, and the reliability is improved, and the load on the processing of the issuing system that issues the apparatus is reduced.

また、本発明のICカードによれば、本装置の内部でエ
リアに付与する識別情報の重複チェックが行なえる。し
たがって、エリアの定義時、エリアを指定する識別情報
が重複して付与される恐れがなく、信頼性の向上が図れ
るとともに、本装置を発行する発行システムの処理に対
する負荷も軽減される。
Further, according to the IC card of the present invention, it is possible to check the duplication of the identification information given to the area inside the device. Therefore, at the time of defining the area, there is no possibility that the identification information designating the area is given redundantly, the reliability can be improved, and the load on the processing of the issuing system that issues this apparatus can be reduced.

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

図は本発明の一実施例を説明するためのもので、第1図
は各処理動作を説明するフローチャート、第2図はデー
タメモリ内のデータファイル構造を示す図、第3図はデ
ータファイル定義情報を説明する図、第4図はコモンデ
ータファイル内のエリア構造を示す図、第5図はアプリ
ケーションデータファイル内のエリア構造を示す図、第
6図はエリア定義情報を説明する図、第7図はデータフ
ァイル未割当サイズ記憶部および総データファイル割当
先頭アドレス記憶部を説明する図、第8図はデータファ
イル定義命令データのフォーマット例を示す図、第9図
はデータファイル選択命令データのフォーマット例を示
す図、第10図はエリア定義命令データのフォーマット例
を示す図、第11図(a)はエリアへの読出命令データの
フォーマット例を示す図、第11図(b)はエリアへの書
込命令データのフォーマット例を示す図、第12図はICカ
ードの構成を示すブロック図、第13図はICカードの機能
ブロックを示す図、第14図は端末装置の構成を示すブロ
ック図である。 1……ICカード、15……制御素子(制御部)、16……デ
ータメモリ(メモリ部)、17……プログラムメモリ、21
……コモンデータファイル、22……アプリケーションデ
ータファイル、24……データファイル定義情報、25,28
……エリア、27,30……エリア定義情報。
1 is a flowchart for explaining each processing operation, FIG. 2 is a diagram showing a data file structure in a data memory, and FIG. 3 is a data file definition. FIG. 4 is a diagram illustrating information, FIG. 4 is a diagram illustrating an area structure in a common data file, FIG. 5 is a diagram illustrating an area structure in an application data file, FIG. 6 is a diagram illustrating area definition information, FIG. FIG. 8 is a diagram illustrating a data file unallocated size storage unit and a total data file allocation start address storage unit. FIG. 8 is a diagram illustrating a format example of data file definition command data. FIG. 9 is a format of a data file selection command data. FIG. 10 is a diagram showing an example, FIG. 10 is a diagram showing a format example of area definition command data, and FIG. 11 (a) is a diagram showing a format example of read command data to an area. FIG. 11 (b) is a diagram showing a format example of write instruction data to an area, FIG. 12 is a block diagram showing a configuration of an IC card, FIG. 13 is a diagram showing functional blocks of the IC card, FIG. 14 is a block diagram showing a configuration of a terminal device. 1 IC card, 15 Control element (control section), 16 Data memory (memory section), 17 Program memory, 21
…… Common data file, 22 …… Application data file, 24 …… Data file definition information, 25,28
... area, 27, 30 ... area definition information.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭63−198183(JP,A) 特開 昭63−100590(JP,A) 特開 昭60−191342(JP,A) 特開 昭62−276683(JP,A) 特開 昭61−156491(JP,A) 特開 昭62−251991(JP,A) 特開 昭57−14956(JP,A) 特開 昭62−251992(JP,A) ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-63-198183 (JP, A) JP-A-63-100590 (JP, A) JP-A-60-191342 (JP, A) JP-A 62-1981 276683 (JP, A) JP-A-61-156491 (JP, A) JP-A-62-251991 (JP, A) JP-A-57-14956 (JP, A) JP-A-62-251992 (JP, A)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のデータファイルに分割されて使用さ
れるメモリを内蔵し、このファイルに対してアクセスを
行なって選択的に外部装置との間でデータの入出力を行
なうICカードであって、 前記外部装置とデータの入出力を行なうデータ入出力部
と、 このデータ入出力部を介して前記外部装置から入力され
た命令データがデータファイルを追加定義するためのデ
ータファイルの識別情報および該データファイルのサイ
ズ情報を含むデータファイルの定義命令であるか否かを
判定する第1の手段と、 この第1の手段にてデータファイルの定義命令であると
判定された場合に、このデータファイルの定義命令中の
ファイルの識別情報と同一の識別情報を有するデータフ
ァイルの定義情報がメモリ内に既に存在しているか否か
を判定する第2の手段と、 この第2の手段にて同一の識別情報を有するデータファ
イルの定義情報がメモリ内に既に存在していないと判定
された場合には、前記データファイルの定義命令にて追
加定義されるファイルのアドレス情報を生成する第3の
手段と、 前記第2の手段にて同一の識別情報を有するデータファ
イルの定義情報がメモリ内に既に存在していないと判定
された場合には、前記データファイルの定義命令中のフ
ァイルの識別情報および該データファイルのサイズ情報
と、前記第3の手段にて生成されたデータファイルのア
ドレス情報とからなるファイル定義情報を生成してメモ
リに記憶する第4の手段と、 前記第2の手段にてデータファイルの定義命令中のファ
イルの識別情報と同一の識別情報を有するデータファイ
ルの定義情報がメモリ内に既に存在していると判定され
た場合には、同一の識別情報を有するデータファイルが
既に存在している旨の応答データを前記外部装置に出力
する第5の手段と、 前記データ入出力部を介して前記外部装置からファイル
選択命令が入力された場合には、該ファイル選択命令中
のデータファイルの識別情報と同一のデータファイルの
識別情報を有するファイル定義情報を前記メモリから見
つけだし、このファイル定義情報にて定義されているフ
ァイルへの処理を行なう第6の手段と、 を具備したことを特徴とするICカード。
An IC card having a built-in memory which is used by being divided into a plurality of data files, and which accesses the files to selectively input / output data to / from an external device. A data input / output unit for inputting / outputting data to / from the external device; and data file identification information for additionally defining a data file with command data input from the external device via the data input / output unit; First means for determining whether or not the instruction is a data file definition instruction including size information of the data file; and if the first means determines that the instruction is a data file definition instruction, To determine whether or not the definition information of the data file having the same identification information as the identification information of the file in the definition command already exists in the memory. If it is determined by the second means that the definition information of the data file having the same identification information does not already exist in the memory, it is additionally defined by the definition command of the data file. A third means for generating address information of the file; and if the second means determines that the definition information of the data file having the same identification information does not already exist in the memory, A fourth step of generating file definition information including the file identification information in the file definition command, the size information of the data file, and the address information of the data file generated by the third means, and storing the generated file definition information in a memory; Means for storing data file definition information having the same identification information as the file identification information in the data file definition command in the second means. When it is determined that the data input / output unit already exists, fifth means for outputting response data to the effect that the data file having the same identification information already exists to the external device; When a file selection command is input from the external device via the external device, file definition information having the same data file identification information as the data file identification information in the file selection command is found from the memory, and this file definition Sixth means for performing processing on a file defined by the information. An IC card comprising:
【請求項2】前記第1の手段にてデータファイルの定義
命令であると判定された場合に、このデータファイルの
定義命令中のデータファイルのサイズ情報とメモリの未
使用サイズとを比較してデータファイルの追加定義の可
否を判定する第7の手段と、この第7の手段にてデータ
ファイルの追加定義が不可と判断された場合にサイズ異
常を意味する応答データを前記外部装置に出力する第8
の手段とを更に具備したことを特徴とする特許請求の範
囲第1項記載のICカード。
2. The method according to claim 1, wherein when the first means determines that the instruction is a data file definition instruction, the size information of the data file in the data file definition instruction is compared with the unused size of the memory. A seventh means for determining whether or not the additional definition of the data file is possible, and when the seventh means determines that the additional definition of the data file is not possible, outputting response data indicating an abnormal size to the external device. 8th
2. The IC card according to claim 1, further comprising:
【請求項3】複数のデータファイルに分割され、かつ、
各データファイルが更に複数のエリアに分割されて使用
されるメモリを内蔵し、各ファイルおよびエリアに対し
てアクセスを行なって選択的に外部装置との間でデータ
の入出力を行なうICカードであって、 前記外部装置とデータの入出力を行なうデータ入出力部
と、 このデータ入出力部を介して前記外部装置から入力され
たファイル選択命令データにより前記複数のデータファ
イルのうちの少なくとも1つのファイルを選択する第1
の手段と、 この第1の手段によりファイルを選択した後に前記デー
タ出力部を介して前記外部装置から入力された命令デー
タがファイル内へエリアを追加定義するためのエリアの
識別情報および該エリアのサイズ情報を含むエリアの定
義命令であるか否かを判定する第2の手段と、 この第2の手段にてエリアの定義命令であると判定され
た場合に、このエリアの定義命令中のエリアの識別情報
と同一の識別情報を有するエリアの定義情報が該エリア
が前記第1の手段にて選択されたファイル内に既に存在
しているか否かを判定する第3の手段と、 この第3の手段にて同一の識別情報を有するエリアの定
義情報がメモリ内に既に存在していないと判定された場
合には、前記エリアの定義命令にて追加定義されるエリ
アのアドレス情報を生成する第4の手段と、 前記第3の手段にて同一の識別情報を有するエリアの定
義情報がメモリ内に既に存在していないと判定された場
合には、前記エリアの定義命令中のエリアの識別情報お
よび該エリアのサイズ情報と、前記第4の手段にて生成
されたエリアのアドレス情報とからなるエリア定義情報
を生成してメモリに記憶する第5の手段と、 前記第3の手段にてエリアの定義命令中のエリアの識別
情報と同一の識別情報を有するエリアの定義情報がメモ
リ内に既に存在していると判定された場合には、同一の
識別情報を有するエリアが既に存在している旨の応答デ
ータを前記外部装置に出力する第6の手段と、 前記データ入出力部を介して前記外部装置からエリア選
択命令が入力された場合には、該エリア選択命令中のエ
リア識別情報と同一のエリア識別情報を有するエリア定
義情報を前記ファイル内から見つけだし、このエリア定
義情報にて定義されているエリアへの処理を行なう第7
の手段と、 を具備したことを特徴とするICカード。
3. The data file is divided into a plurality of data files, and
An IC card that has a built-in memory in which each data file is further divided into a plurality of areas and that accesses each file and area to selectively input / output data to / from an external device. A data input / output unit for inputting / outputting data to / from the external device; and at least one file among the plurality of data files according to file selection command data input from the external device via the data input / output unit. The first to choose
Means for selecting, by the first means, a file, instruction data input from the external device via the data output unit, area identification information for additionally defining an area in the file, and identification information of the area. Second means for determining whether or not the area definition command includes size information; and if the second means determines that the area definition command is an area definition command, the area in the area definition command is determined. Third means for judging whether or not area definition information having the same identification information as that of the area already exists in the file selected by the first means; and If it is determined that the definition information of the area having the same identification information does not already exist in the memory, the address information of the area additionally defined by the area definition instruction is generated. The fourth means, and if the third means determines that the definition information of the area having the same identification information does not already exist in the memory, the identification of the area in the area definition command is performed. Fifth means for generating area definition information including information, size information of the area, and address information of the area generated by the fourth means, and storing the generated area definition information in a memory; If it is determined that the area definition information having the same identification information as the area identification information in the area definition command already exists in the memory, the area having the same identification information already exists. Sixth means for outputting response data indicating that the area selection command is present to the external device, and when an area selection command is input from the external device via the data input / output unit, area identification information in the area selection command Same as Seventh area finds area definition information having identification information from the file, performs processing to area defined by the area definition information
An IC card characterized by comprising:
【請求項4】前記第1の手段にてエリアの定義命令であ
ると判定された場合に、このエリアの定義命令中のエリ
アのサイズ情報と該エリアが追加されるファイルの未使
用サイズとを比較してエリアの追加定義の可否を判定す
る第8の手段と、この第8の手段にてエリアの追加定義
が不可と判定された場合にサイズ異常を意味する応答デ
ータを前記外部装置に出力する第9の手段とを更に具備
したことを特徴とする特許請求の範囲第3項記載のICカ
ード。
4. When the first means determines that the command is an area definition command, the size information of the area in the area definition command and the unused size of the file to which the area is added are stored. Eighth means for comparing and judging whether additional definition of an area is possible, and outputting response data indicating an abnormal size to the external device when the eighth means determines that additional definition of an area is not possible. The IC card according to claim 3, further comprising: ninth means for performing the operation.
JP63211828A 1988-08-26 1988-08-26 IC card Expired - Lifetime JP3015376B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP63211828A JP3015376B2 (en) 1988-08-26 1988-08-26 IC card
US07/398,080 US5161256A (en) 1988-08-26 1989-08-24 Method and system for allocating file area in memory area of ic card
FR8911246A FR2635890B1 (en) 1988-08-26 1989-08-25 METHOD AND DEVICE FOR PROCESSING DATA IN A MEMORY AREA OF A CHIP CARD
KR1019890012219A KR970007282B1 (en) 1988-08-26 1989-08-26 Method and apparatus for allocating file area in memory area of ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63211828A JP3015376B2 (en) 1988-08-26 1988-08-26 IC card

Publications (2)

Publication Number Publication Date
JPH0259939A JPH0259939A (en) 1990-02-28
JP3015376B2 true JP3015376B2 (en) 2000-03-06

Family

ID=16612265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63211828A Expired - Lifetime JP3015376B2 (en) 1988-08-26 1988-08-26 IC card

Country Status (1)

Country Link
JP (1) JP3015376B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5791291A (en) * 1980-11-28 1982-06-07 Canon Inc Electronic equipment
JPS5759271A (en) * 1980-09-29 1982-04-09 Fujitsu Ltd Document producing device containing writing protecting function
JPS6111862A (en) * 1984-06-28 1986-01-20 Fujitsu Ltd Member selecting method of division data set
JPS63100590A (en) * 1986-10-17 1988-05-02 Nec Corp Ic card
JPH0693255B2 (en) * 1987-02-13 1994-11-16 株式会社東芝 Memory area definition method for portable electronic devices

Also Published As

Publication number Publication date
JPH0259939A (en) 1990-02-28

Similar Documents

Publication Publication Date Title
JP3015377B2 (en) IC card
JP2537199B2 (en) IC card
KR950007895B1 (en) Portable electronic apparatus
JP3110035B2 (en) Portable electronic devices
KR970006646B1 (en) Portable electronic apparatus
US4988855A (en) Portable electronic apparatus
JPH06274397A (en) File control system
JPS63201748A (en) Portable electronic equipment
JPH0440587A (en) Portable electronic equipment
JPH07160547A (en) Film managing system
JPH06282471A (en) File control system
JP3178881B2 (en) Portable electronic devices
JPH0766431B2 (en) How to approve PIN code for memory card
JP3015376B2 (en) IC card
JP2974144B2 (en) Portable electronic devices
JP2695857B2 (en) Portable electronic devices
JP3209994B2 (en) Portable electronic devices
JPH0250286A (en) Portable electronic device
JP3017736B2 (en) Portable electronic devices
JP2001167236A (en) Portable electronic device
JP3004236B2 (en) Portable electronic device and access management method in portable electronic device
JP3302348B2 (en) Portable electronic device and key matching method
JP3246558B2 (en) IC card
JP2598056B2 (en) Portable electronic devices
JP2880709B2 (en) Memory control method for IC card

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071217

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 9

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 9