JP2974144B2 - Portable electronic devices - Google Patents

Portable electronic devices

Info

Publication number
JP2974144B2
JP2974144B2 JP63216807A JP21680788A JP2974144B2 JP 2974144 B2 JP2974144 B2 JP 2974144B2 JP 63216807 A JP63216807 A JP 63216807A JP 21680788 A JP21680788 A JP 21680788A JP 2974144 B2 JP2974144 B2 JP 2974144B2
Authority
JP
Japan
Prior art keywords
area
data file
information
data
file
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
JP63216807A
Other languages
Japanese (ja)
Other versions
JPH0264887A (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 JP63216807A priority Critical patent/JP2974144B2/en
Publication of JPH0264887A publication Critical patent/JPH0264887A/en
Application granted granted Critical
Publication of JP2974144B2 publication Critical patent/JP2974144B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえば不揮発性メモリおよびCPUなどの
制御素子を有するIC(集積回路)チップを内蔵した、い
わゆるICカードと称される携帯可能電子装置に係り、特
にそのメモリに対して定義されたデータファイルの識別
方法およびそのデータファイルに対するエリアの定義方
法を改良した携帯可能電子装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial application field) The present invention relates to a so-called IC card having a built-in IC (integrated circuit) chip having a control element such as a nonvolatile memory and a CPU. More particularly, the present invention relates to a portable electronic device having an improved method for identifying a data file defined for a memory and an improved method for defining an area for the data file.

(従来の技術) 近年、新たな携帯可能なデータ記憶媒体として、消去
可能な不揮発性メモリおよび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カードでは、種々のアプリケーシ
ョンに対応できるように、メモリを、全てのアプリケー
ションで共通に運用する1つのコモンデータファイル
(CDF)と、アプリケーション個別に運用する複数のア
プリケーションデータファイル(ADF)という概念によ
り大きく分割定義し、かつ各データファイルはエリアと
呼ばれる概念により小さく分割定義している。
Recently, in such an IC card, one common data file (CDF) for operating a memory in common with all applications and a plurality of application data files (CDF) for operating each application in order to support various applications. ADF) is defined as being divided into large parts, and each data file is defined as being divided into smaller parts using a concept called an area.

そして、これらのエリアは、メモリへのアクセス単位
となっており、アクセスの際、エリアに付与された識別
情報(たとえばエリア番号)を外部から指定することに
より、ICカード内部でアクセス対象となっているエリア
への直接アクセスを可能としている。
These areas are the unit of access to the memory. At the time of access, the identification information (for example, the area number) assigned to the area is designated from the outside, so that the area can be accessed inside the IC card. Direct access to existing areas.

また、データファイル内のエリアへのアクセスは、ア
クセス対象とするエリアが存在するデータファイルに付
与されている識別情報(たとえばデータファイル名)を
外部から指定し、そのデータファイルを選択することに
より行なわれる。
Access to an area in a data file is performed by externally 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. It is.

さて、このようなICカードにおける従来のデータファ
イルに対するエリアの定義方法は、各データファイルの
順番を外部(ICカードの発行システムなど)で認識する
とともに、各データファイル内に定義するエリアの個数
を認識しておき、たとえば第1のデータファイル(CD
F)には10個のエリアが定義されるとすると、第11個目
のエリアは第2のデータファイル(ADF)の第1エリア
であるように、ICカード内部で識別するようになってい
た。
By the way, in the conventional method of defining an area for a data file in such an IC card, the order of each data file is recognized externally (such as an IC card issuing system) and the number of areas defined in each data file is determined. Recognize, for example, the first data file (CD
Assuming that ten areas are defined in F), the eleventh area is identified inside the IC card as the first area of the second data file (ADF). .

しかし、このようなエリア定義方法では、データファ
イルの順番、特にその中でコモンデータファイル(第1
のデータファイル)となるデータファイルが何番目のデ
ータファイルかを外部で認識しなければならず、しかも
各データファイルに定義するエリアの個数などをも外部
で認識しなければならなかった。このため、各データフ
ァイル内にエリアを定義する際のシーケンスが通常のエ
リアへのアクセスシーケンスとは異なり、ICカード発行
システムに負荷がかかってしまう。
However, in such an area defining method, the order of the data files, especially the common data file (first
It is necessary to externally recognize the order of the data file as the data file to be used, and also externally recognize the number of areas defined in each data file. For this reason, the sequence for defining an area in each data file is different from the access sequence for a normal area, and a load is placed on the IC card issuing system.

また、従来は、複数のデータファイルのうち、全ての
アプリケーションで指定できるデータファイルをコモン
データファイルとして扱っていた。すなわち、コモンデ
ータファイルおよびアプリケーションデータファイルと
いう概念システム全体で実現する形式となっている。
Conventionally, among a plurality of data files, a data file that can be specified by all applications has been treated as a common data file. That is, the format is realized by the entire concept system of the common data file and the application data file.

しかし、これによると、コモンデータファイルを指定
するための識別情報を全てのアプリケーションシステム
に組込まなければならない。すなわち、複数のデータフ
ァイルのうちコモンデータファイルを外部アプリケーシ
ョンで特別に識別してアクセスを行なわなければならな
い。したがって、アプリケーションシステムに負荷がか
かってしまう。
However, according to this, identification information for designating a common data file must be incorporated in all application systems. That is, a common data file among a plurality of data files must be accessed by being specially identified by an external application. Therefore, a load is applied to the application system.

(発明が解決しようとする課題) 本発明は、上記したように従来のデータファイルに対
するエリア定義方法では、データファイルの順番および
データファイル内に定義するエリアの個数などを外部で
認識しなければならず、本装置の発行システムに負荷が
かかるという問題点を解決すべくなされたもので、デー
タファイルを定義した順番およびデータファイル内に定
義するエリアの個数などを外部で認識することなく、デ
ータファイルをランダムに選択し、エリア定義対象のデ
ータファイルとすることが可能となり、本装置を発行す
る発行システムの負荷が軽減される携帯可能電子装置を
提供することを目的とする。
(Problems to be Solved by the Invention) According to the present invention, as described above, in the conventional area definition method for a data file, the order of the data file and the number of areas defined in the data file must be recognized externally. In order to solve the problem that the load is imposed on the issuing system of this device, the data file is created without externally recognizing the order of defining the data file and the number of areas defined in the data file. It is an object of the present invention to provide a portable electronic device in which a data file of which area is to be selected can be selected at random, and the load on an issuing system that issues the present device is reduced.

また、本発明は、上記したように従来のコモンデータ
ファイルとアプリケーションデータファイルとの識別方
法では、複数のデータファイルのうちコモンデータファ
イルを外部アプリケーションで特別に識別してアクセス
を行なわなければならないので、アプリケーションシス
テムに負荷がかかるという問題点を解決すべくなされた
もので、複数のデータファイルのうちコモンデータファ
イルを外部アプリケーションで特別に識別してアクセス
を行なわなくてすみ、アプリケーションシステムの負荷
が軽減される携帯可能電子装置を提供することを目的と
する。
Further, according to the present invention, as described above, in the conventional method for identifying a common data file and an application data file, the common data file among a plurality of data files must be specifically identified and accessed by an external application. The purpose of this is to solve the problem that the load on the application system is increased. The common data file among the multiple data files does not need to be specially identified by an external application to access, reducing the load on the application system. It is an object of the present invention to provide a portable electronic device.

[発明の構成] (課題を解決するための手段) 本発明の携帯可能電子装置は、複数のアプリケーショ
ンで共通に使用される共通データファイルと、アプリケ
ーション個別に使用される複数の第2のデータファイル
とを有し、かつ、それぞれのデータファイル内は複数の
エリアに分割されているメモリ領域を有し、前記共通デ
ータファイルには共通データファイル内の各エリアの識
別情報を記憶し、前記第2のデータファイルには第2の
データファイル内の各エリアの識別情報を記憶している
メモリと、このメモリに対して前記共通データファイル
および前記複数の第2のデータファイルを定義するデー
タファイル定義手段と、外部からの命令に基づき前記複
数の第2のデータファイルのうちの1つを選択する第1
の手段と、外部から入力された命令データがファイル内
へエリアを追加定義するためのエリアの識別情報および
該エリアのサイズ情報を含むエリアの定義命令であるか
否かを判定する第2の手段と、この第2の手段にてエリ
アの定義命令であると判定された場合に、このエリアの
定義命令中のエリアの識別情報と同一の識別情報を有す
るエリアの定義情報が前記第1の手段にて現在選択され
ているファイル内に既に存在しているか否かを判定する
第3の手段と、この第3の手段にて同一の識別情報を有
するエリアの定義情報が現在選択されているファイル内
に既に存在していないと判定された場合には、前記エリ
アの定義命令にて追加定義されるエリアのアドレス情報
を生成する第4の手段と、前記第3の手段にて同一の識
別情報を有するエリアがメモリ内に既に存在していない
と判定された場合には、前記エリアの定義命令中のエリ
アの識別情報および該エリアのサイズ情報と、前記第4
の手段にて生成されたエリアのアドレス情報とからなる
エリア定義情報を生成して前記第1の手段にて現在選択
されているファイル内に記憶する第5の手段と、前記第
3の手段にてエリアの定義命令中のエリアの識別情報と
同一の識別情報を有するエリアの定義情報がメモリ内に
既に存在していると判定された場合には、同一の識別情
報を有するエリアが既に存在している旨の応答データを
出力する第6の手段とを具備している。
[Structure of the Invention] (Means for Solving the Problems) A portable electronic device according to the present invention includes a common data file commonly used by a plurality of applications and a plurality of second data files used individually by the applications. And each data file has a memory area divided into a plurality of areas, and the common data file stores identification information of each area in the common data file; And a data file defining means for defining the common data file and the plurality of second data files with respect to the memory. And selecting a first one of the plurality of second data files based on an external command.
Means for judging whether or not the command data inputted from the outside is an area definition command including area identification information for additionally defining an area in a file and size information of the area. And when the second means determines that the area definition command is the area definition command, the area definition information having the same identification information as the area identification information in the area definition command is stored in the first means. A third means for determining whether or not the file already exists in the currently selected file, and a file for which the definition information of the area having the same identification information is selected by the third means. If it is determined that the address information does not already exist, the fourth means for generating the address information of the area additionally defined by the area definition command and the same identification information by the third means D with When A is determined not to already exist in memory, and the size information of the identification information and the area for the area in the definition command of the area, the fourth
A fifth means for generating area definition information including address information of the area generated by the first means and storing the area definition information in a file currently selected by the first 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, the area having the same identification information already exists. Sixth means for outputting response data to the effect that the

また、本発明の携帯可能電子装置は、複数のアプリケ
ーションで共通に使用される共通データファイルと、ア
プリケーション個別に使用される複数の第2のデータフ
ァイルとを有し、かつ、それぞれのデータファイル内は
複数のエリアに分割されているメモリ領域を有し、前記
共通データファイルには共通データファイル内の各エリ
アの識別情報を記憶し、前記第2のデータファイルには
第2のデータファイル内の各エリアの識別情報を記憶し
ているメモリと、このメモリに対して前記共通データフ
ァイルおよび前記複数の第2のデータファイルを定義す
るデータファイル定義手段と、外部からの命令に基づき
前記複数の第2のデータファイルのうちの1つを選択す
る第1の手段と、外部から入力された命令データがファ
イル内へエリアを追加定義するためのエリアの識別情報
および該エリアのサイズ情報を含むエリアの定義命令で
あるか否かを判定する第2の手段と、この第2の手段に
てエリアの定義命令であると判定された場合に、このエ
リアの定義命令中のエリアの識別情報と同一の識別情報
を有するエリアの定義情報が前記共通データファイル内
および第1の手段にて現在選択されているファイル内に
既に存在しているか否かを判定する第3の手段と、この
第3の手段にて同一の識別情報を有するエリアの定義情
報がメモリ内に既に存在していないと判定された場合に
は、前記エリアの定義命令にて追加定義されるエリアの
アドレス情報を生成する第4の手段と、前記第3の手段
にて同一の識別情報を有するエリアがメモリ内に既に存
在していないと判定された場合には、前記エリアの定義
命令中のエリアの識別情報および該エリアのサイズ情報
と、前記第4の手段にて生成されたエリアのアドレス情
報とからなるエリア定義情報を生成し、前記第1の手段
にて第2のデータファイルが選択されている場合は、こ
の選択されている第2のデータファイル内にエリア定義
情報を記憶し、前記第1の手段にて第2のデータファイ
ルが選択されていない場合は、前記共通データファイル
内にエリア定義情報を記憶する第5の手段とを具備して
いる。
In addition, the portable electronic device of the present invention has a common data file commonly used by a plurality of applications and a plurality of second data files used by each application, and includes a plurality of second data files. Has a memory area divided into a plurality of areas, stores the identification information of each area in the common data file in the common data file, and stores the identification information in the second data file in the second data file. A memory storing identification information of each area, data file defining means for defining the common data file and the plurality of second data files with respect to the memory, and the plurality of First means for selecting one of the two data files, and an instruction data inputted from the outside adds an area into the file. Second means for determining whether or not the area definition command includes area identification information for defining the area and size information of the area; and the second means determines that the area definition command is an area definition command. In this case, the area definition information having the same identification information as the area identification information in the area definition command already exists in the common data file and the file currently selected by the first means. A third means for determining whether or not the area has the same identification information as the definition information of the area which has not already existed in the memory; A fourth means for generating address information of an area additionally defined by the definition instruction; and a third means for determining that an area having the same identification information does not already exist in the memory. Is Area definition information including the area identification information and the area size information in the area definition instruction and the area address information generated by the fourth means, and generated by the first means. When the second data file is selected, the area definition information is stored in the selected second data file, and when the second data file is not selected by the first means. Comprises fifth means for storing area definition information in the common data file.

さらに、本発明の携帯可能電子装置は、複数のアプリ
ケーションで共通に使用される共通データファイルと、
アプリケーション個別に使用される複数の第2のデータ
ファイルとを有し、かつ、それぞれのデータファイル内
は複数のエリアに分割されているメモリ領域を有し、前
記共通データファイルには共通データファイル内の各エ
リアの識別情報を記憶し、前記第2のデータファイルに
は第2のデータファイル内の各エリアの識別情報を記憶
しているメモリと、このメモリに対して前記共通データ
ファイルおよび前記複数の第2のデータファイルを定義
するデータファイル定義手段と、外部から入力された命
令データが第2のデータファイルを追加定義するための
データファイルの識別情報および該データファイルのサ
イズ情報を含むデータファイルの定義命令であるか否か
を判定する第1の手段と、この第1の手段にてデータフ
ァイルの定義命令であると判定された場合に、データフ
ァイルの定義命令にて追加定義されるファイルのアドレ
ス情報を生成する第2の手段と、前記データファイルの
定義命令中のファイルの識別情報および該データファイ
ルのサイズ情報と、前記第2の手段にて生成されたデー
タファイルのアドレス情報とからなるファイル定義情報
を生成してメモリに記憶する第3の手段と、外部からの
データファイルの識別情報を含む選択命令に基づき前記
複数の第2のデータファイルのうちの1つを選択する第
4の手段と、外部から入力された命令データがファイル
内へエリアを追加定義するためのエリアの識別情報およ
び該エリアのサイズ情報を含むエリアの定義命令である
か否かを判定する第5の手段と、この第5の手段にてエ
リアの定義命令であると判定された場合に、このエリア
の定義命令中のエリアの識別情報と同一の識別情報を有
するエリアの定義情報が前記第4の手段にて現在選択さ
れているファイル内に既に存在しているか否かを判定す
る第6の手段と、この第6の手段にて同一の識別情報を
有するエリアの定義情報が現在選択されているファイル
内に既に存在していないと判定された場合には前記エリ
アの定義命令にて追加定義されるエリアのアドレス情報
を生成する第7の手段と、前記エリアの定義命令中のエ
リアの識別情報および該エリアのサイズ情報と、前記第
7の手段にて生成されたエリアのアドレス情報とからな
るエリア定義情報を生成して前記第1の手段にて現在選
択されているファイル内に記憶する第8の手段と、外部
から入力された命令データがファイル内のエリアへのア
クセスのためのエリアの識別情報および命令情報を含む
エリアの処理命令であるか否かを判定する第9の手段
と、この第9の手段にてエリア処理命令であると判定さ
れた場合で、前記第4の手段にて第2のデータファイル
のうちの1つが現在選択されている場合は、この選択さ
れている第2のデータファイル内でエリア処理命令にて
指定される識別情報を有するエリアを見つけ、前記第4
の手段にて第2のデータファイルのうちの1つが現在選
択されていない場合は、前記共通データフル内でエリア
処理命令にて指定される識別情報を有するエリアを見つ
ける第10の手段と、この第10の手段にて見つけたエリア
へのアクセスを行なう第11の手段とを具備している。
Further, the portable electronic device of the present invention includes a common data file commonly used by a plurality of applications,
A plurality of second data files used individually for each application, and each data file has a memory area divided into a plurality of areas, and the common data file has a common data file A memory storing identification information of each area in the second data file; and a memory storing the common data file and the plurality of Data file defining means for defining a second data file, and a data file including data file identification information and size information of the data file for externally input instruction data to additionally define the second data file Means for determining whether or not the instruction is a definition command of the data file, and a definition instruction of the data file by the first means. A second means for generating address information of a file additionally defined by a data file definition command when it is determined that the data file is defined, file identification information in the data file definition command, and a size of the data file; Third means for generating file definition information consisting of information and address information of the data file generated by the second means and storing the file definition information in a memory; and a selection instruction including identification information of the data file from outside. Means for selecting one of the plurality of second data files on the basis of the following, identification information of an area for additionally defining an area in the command data inputted from the outside, and information of the area. Fifth means for determining whether the instruction is an area definition instruction including size information, and the fifth means determines that the instruction is an area definition instruction. In this case, it is determined whether or not the area definition information having the same identification information as the area identification information in the area definition command already exists in the file currently selected by the fourth means. A sixth means for executing the area definition command when it is determined that the area definition information having the same identification information does not already exist in the currently selected file. A seventh means for generating address information of an area additionally defined in the area, identification information of the area in the area definition command and size information of the area, and an address of the area generated by the seventh means. Eighth means for generating area definition information including address information and storing it in the file currently selected by the first means, and for storing instruction data input from the outside into the area in the file. Ninth means for determining whether or not the command is an area processing command including identification information and command information of an area for access, and when the ninth means determines that the command is an area processing command, When one of the second data files is currently selected by the fourth means, an area having identification information specified by the area processing instruction in the selected second data file. And find the fourth
If one of the second data files is not currently selected by the means, the tenth means for finding an area having the identification information specified by the area processing instruction in the common data full; And eleventh means for accessing the area found by the tenth means.

(作用) 本発明は、定義された各データファイルを選択的に指
定する手段を有し、その指定されたデータファイルのみ
に対して複数のエリアを定義することにより、データフ
ァイルを定義した順番を外部で認識することなく、デー
タファイルをランダムに選択し、エリア定義対象のデー
タファイルとすることが可能となる。したがって、本装
置を発行する発行システムの負荷が軽減される。
(Operation) The present invention has means for selectively specifying each defined data file, and by defining a plurality of areas only for the specified data file, the order in which the data files are defined can be determined. It is possible to select a data file randomly and make it an area definition target data file without external recognition. Therefore, the load on the issuing system that issues this apparatus is reduced.

また、本発明は、定義された複数のアプリケーション
データファイル(第2のデータファイル)を選択的に指
定する手段を有し、その指定されたアプリケーションデ
ータファイルのみに対して複数のエリアを定義し、さら
にアプリケーションデータファイルが指定されないとき
には、定義されたコモンデータファイル(第1のデータ
ファイル)のみに対して複数のエリアを定義することに
より、データファイルを定義した順番を外部で認識する
ことなく、かつそのうちコモンデータファイルは何番目
であるか、あるいは各データファイルに定義するエリア
の個数も外部で認識することが不要となる。また、各デ
ータファイル内にエリアを定義する際のシーケンスも通
常のエリアへのアクセスシーケンスと同様にできる。し
たがって、本装置を発行する発行システムの負荷が軽減
される。
The present invention also has means for selectively designating a plurality of defined application data files (second data files), defining a plurality of areas only for the designated application data files, Further, when the application data file is not specified, by defining a plurality of areas only for the defined common data file (first data file), the order in which the data files are defined is not recognized externally, and It is not necessary to externally recognize the number of the common data file among them or the number of areas defined in each data file. Also, the sequence for defining an area in each data file can be the same as the sequence for accessing a normal area. Therefore, the load on the issuing system that issues this apparatus is reduced.

さらに、本発明は、複数のデータファイルのうち外部
的に1つのデータファイルをコモンデータファイルとし
て識別運用するのではなく、その識別を内部的に行なう
ことにより、複数のデータファイルのうちコモンデータ
ファイルを外部アプリケーションで特別に識別してアク
セスを行なわなくてすむ。したがって、アプリケーショ
ンシステムの負荷が軽減される。
Furthermore, the present invention does not externally identify and operate one data file as a common data file among a plurality of data files, but performs the identification internally so that a common data file among a plurality of data files can be used. Need not be identified and accessed by an external application. Therefore, the load on the application system is reduced.

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

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

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」、「0
2」、…「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”, “0”
2 ”,...“ 03 ”are stored in the order, and in the example of FIG.
The instruction data is stored in the order of the area numbers “04”,..., “05”.

第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 file 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 file 16. If found, the control element 15 outputs response data indicating that the data file name already exists, and returns to the command data waiting state.

もし見付からなければ、制御素子15は、本命令データ
中のファイルサイズ情報にデータファイル定義情報のバ
イト数(サイズ情報)を加えて、その結果を結果1と
し、データファイル未割当サイズ記憶部31内の値と比較
する。この比較の結果、もし前者よりも後者の方が小さ
ければ、制御素子15は、本命令データにより定義するデ
ータファイルがデータメモリ16内に割当てられないと判
断し、サイズ異常を意味する応答データを出力して命令
データ待ち状態に戻る。
If not found, the control element 15 adds the number of bytes (size information) of the data file definition information to the file size information in the instruction data, sets the result to result 1, and stores the result in the data file unallocated size storage unit 31. To the value of. 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 smaller than the latter, the control element 15 determines that the data file defined by the present instruction data is to be 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 outputs response data indicating the existing area number and returns to the command data waiting state.

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

上記比較の結果、もし前者よりも後者の方が小さけれ
ば、制御素子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 smaller 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 data is the area processing 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 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.

このように、定義された各データファイルを選択的に
指定する手段を有し、その指定されたデータファイルの
みに対して複数のエリアを定義することにより、データ
ファイルを定義した順番を外部で認識することなく、デ
ータファイルをランダムに選択し、エリア定義対象のデ
ータファイルとすることが可能となる。したがって、IC
カード発行システムの負荷が軽減される。
In this way, the means for selectively specifying each defined data file is provided, and by defining a plurality of areas only for the specified data file, the order in which the data files are defined is externally recognized. Without doing this, it is possible to select a data file at random and use it as a data file for area definition. Therefore, IC
The load on the card issuing system is reduced.

また、定義された複数のアプリケーションデータファ
イルを選択的に指定する手段を有し、その指定されたア
プリケーションデータファイルのみに対して複数のエリ
アを定義し、さらにアプリケーションデータファイルが
指定されないときには、定義されたコモンデータファイ
ルのみに対して複数のエリアを定義することにより、デ
ータファイルを定義した順番を外部で認識することな
く、かつそのうちコモンデータファイルは何番目である
か、あるいは各データファイルに定義するエリアの個数
も外部で認識することが不要となる。また、各データフ
ァイル内にエリアを定義する際のシーケンスも通常のエ
リアへのアクセスシーケンスと同様にできる。したがっ
て、ICカード発行システムの負荷が軽減される。
In addition, it has means for selectively specifying a plurality of defined application data files, defining a plurality of areas only for the specified application data file, and defining a plurality of areas when no application data file is specified. By defining multiple areas for common data files only, the order in which the data files were defined is not recognized externally, and the common data file is numbered or defined in each data file. It is not necessary to recognize the number of areas outside. Also, the sequence for defining an area in each data file can be the same as the sequence for accessing a normal area. Therefore, the load on the IC card issuing system is reduced.

さらに、複数のデータファイルのうち外部的に1つの
データファイルをコモンデータファイルとして識別運用
するのではなく、その識別をICカードの内部で行なうこ
とにより、複数のデータファイルのうちコモンデータフ
ァイルを外部アプリケーションで特別に識別してアクセ
スを行なわなくてすむ。したがって、アプリケーション
システムの負荷が軽減される。
Further, instead of externally identifying and operating one data file as a common data file, the identification is performed inside the IC card, so that the common data file among the plurality of data files can be externally identified. No special identification and access required by the application. Therefore, the load on the application system is reduced.

なお、前記実施例では、データファイル定義情報をデ
ータメモリのアドレスの小さい方から順次記憶し、その
データファイル定義情報によって定義される各データフ
ァイルはアドレスの大きい方から順次定義したが、その
逆、すなわちデータファイル定義情報をアドレスの大き
い方から順次記憶し、各データファイルはアドレスの小
さい方から順次定義するようにしてもよい。また、各デ
ータファイル内に対するエリア定義情報の記憶およびエ
リアの定義についても同様である。
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.

[発明の効果] 以上詳述したように本発明の携帯可能電子装置によれ
ば、データファイルを定義した順番およびデータファイ
ル内に定義するエリアの個数などを外部で認識すること
なく、データファイルをランダムに選択し、エリア定義
対象のデータファイルとすることが可能となり、本装置
を発行する発行システムの負荷が軽減される。
[Effects of the Invention] As described in detail above, according to the portable electronic device of the present invention, the data file can be read without externally recognizing the order in which the data file is defined and the number of areas defined in the data file. The data file can be selected at random and set as an area definition target data file, thereby reducing the load on the issuing system that issues this apparatus.

また、本発明の携帯可能電子装置によれば、複数のデ
ータファイルのうちコモンデータファイルを外部アプリ
ケーションで特別に識別してアクセスを行なわなくてす
み、アプリケーションシステムの負荷が軽減される。
Further, according to the portable electronic device of the present invention, it is not necessary to specially identify the common data file among the plurality of data files by the external application and access the common data file, thereby reducing the load on the application system.

【図面の簡単な説明】[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 (portable electronic device), 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−204493(JP,A) 特開 昭62−276683(JP,A) 特開 昭63−108445(JP,A) 特開 昭62−226391(JP,A) 特開 昭62−251990(JP,A) 特開 昭63−138482(JP,A) ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-63-204493 (JP, A) JP-A-62-276683 (JP, A) JP-A-63-108445 (JP, A) 226391 (JP, A) JP-A-62-251990 (JP, A) JP-A-63-138482 (JP, A)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のアプリケーションで共通に使用され
る共通データファイルと、アプリケーション個別に使用
される複数の第2のデータファイルとを有し、かつ、そ
れぞれのデータファイル内は複数のエリアに分割されて
いるメモリ領域を有し、前記共通データファイルには共
通データファイル内の各エリアの識別情報を記憶し、前
記第2のデータファイルには第2のデータファイル内の
各エリアの識別情報を記憶しているメモリと、 このメモリに対して前記共通データファイルおよび前記
複数の第2のデータファイルを定義するデータファイル
定義手段と、 外部からの命令に基づき前記複数の第2のデータファイ
ルのうちの1つを選択する第1の手段と、 外部から入力された命令データがファイル内へエリアを
追加定義するためのエリアの識別情報および該エリアの
サイズ情報を含むエリアの定義命令であるか否かを判定
する第2の手段と、 この第2の手段にてエリアの定義命令であると判定され
た場合に、このエリアの定義命令中のエリアの識別情報
と同一の識別情報を有するエリアの定義情報が前記第1
の手段にて現在選択されているファイル内に既に存在し
ているか否かを判定する第3の手段と、 この第3の手段にて同一の識別情報を有するエリアの定
義情報が現在選択されているファイル内に既に存在して
いないと判定された場合には、前記エリアの定義命令に
て追加定義されるエリアのアドレス情報を生成する第4
の手段と、 前記第3の手段にて同一の識別情報を有するエリアがメ
モリ内に既に存在していないと判定された場合には、前
記エリアの定義命令中のエリアの識別情報および該エリ
アのサイズ情報と、前記第4の手段にて生成されたエリ
アのアドレス情報とからなるエリア定義情報を生成して
前記第1の手段にて現在選択されているファイル内に記
憶する第5の手段と、 前記第3の手段にてエリアの定義命令中のエリアの識別
情報と同一の識別情報を有するエリアの定義情報がメモ
リ内に既に存在していると判定された場合には、同一の
識別情報を有するエリアが既に存在している旨の応答デ
ータを出力する第6の手段と、 を具備したことを特徴とする携帯可能電子装置。
An information processing apparatus includes: a common data file commonly used by a plurality of applications; and a plurality of second data files used by each application, and each data file is divided into a plurality of areas. The common data file stores identification information of each area in the common data file, and the second data file stores identification information of each area in the second data file. A memory storing the data, data file defining means for defining the common data file and the plurality of second data files with respect to the memory; A first means for selecting one of the following, and an area for additionally defining an area in the file by the instruction data inputted from the outside. Second means for determining whether or not the instruction is an area definition instruction including the identification information of the area and the size information of the area; and when the second means determines that the instruction is an area definition instruction, The area definition information having the same identification information as the area identification information in the area definition command is stored in the first area.
A third means for determining whether or not the file already exists in the file currently selected by the means, and the definition information of the area having the same identification information being selected by the third means. If it is determined that the area information does not already exist in the file, the address information of the area additionally defined by the area definition instruction is generated.
Means, if it is determined by the third means that an area having the same identification information does not already exist in the memory, the identification information of the area in the area definition command and the area Fifth means for generating area definition information comprising size information and address information of the area generated by the fourth means, and storing the area definition information in a file currently selected by the first means; If it is determined by the third means 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 same identification information 6. A portable electronic device, comprising: sixth means for outputting response data indicating that an area having the above already exists.
【請求項2】複数のアプリケーションで共通に使用され
る共通データファイルと、アプリケーション個別に使用
される複数の第2のデータファイルとを有し、かつ、そ
れぞれのデータファイル内は複数のエリアに分割されて
いるメモリ領域を有し、前記共通データファイルには共
通データファイル内の各エリアの識別情報を記憶し、前
記第2のデータファイルには第2のデータファイル内の
各エリアの識別情報を記憶しているメモリと、 このメモリに対して前記共通データファイルおよび前記
複数の第2のデータファイルを定義するデータファイル
定義手段と、 外部からの命令に基づき前記複数の第2のデータファイ
ルのうちの1つを選択する第1の手段と、 外部から入力された命令データがファイル内へエリアを
追加定義するためのエリアの識別情報および該エリアの
サイズ情報を含むエリアの定義命令であるか否かを判定
する第2の手段と、 この第2の手段にてエリアの定義命令であると判定され
た場合に、このエリアの定義命令中のエリアの識別情報
と同一の識別情報を有するエリアの定義情報が前記共通
データファイル内および第1の手段にて現在選択されて
いるファイル内に既に存在しているか否かを判定する第
3の手段と、 この第3の手段にて同一の識別情報を有するエリアの定
義情報がメモリ内に既に存在していないと判定された場
合には、前記エリアの定義命令にて追加定義されるエリ
アのアドレス情報を生成する第4の手段と、 前記第3の手段にて同一の識別情報を有するエリアがメ
モリ内に既に存在していないと判定された場合には、前
記エリアの定義命令中のエリアの識別情報および該エリ
アのサイズ情報と、前記第4の手段にて生成されたエリ
アのアドレス情報とからなるエリア定義情報を生成し、
前記第1の手段にて第2のデータファイルが選択されて
いる場合は、この選択されている第2のデータファイル
内にエリア定義情報を記憶し、前記第1の手段にて第2
のデータファイルが選択されていない場合は、前記共通
データファイル内にエリア定義情報を記憶する第5の手
段と、 を具備したことを特徴とする携帯可能電子装置。
2. A data processing system comprising: a common data file commonly used by a plurality of applications; and a plurality of second data files used by each application, and each data file is divided into a plurality of areas. The common data file stores identification information of each area in the common data file, and the second data file stores identification information of each area in the second data file. A memory storing the data, data file defining means for defining the common data file and the plurality of second data files with respect to the memory; A first means for selecting one of the following, and an area for additionally defining an area in the file by the instruction data inputted from the outside. Second means for determining whether or not the instruction is an area definition instruction including the identification information of the area and the size information of the area; and when the second means determines that the instruction is an area definition instruction, It is determined whether or not area definition information having the same identification information as the area identification information in the area definition command already exists in the common data file and the file currently selected by the first means. A third means for determining, 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 information is added by the area definition instruction. A fourth means for generating address information of an area to be defined; and if the third means determines that an area having the same identification information does not already exist in the memory, Defined life Generate a size information of the identification information and the area for the area in, the area definition information comprising address information of the generated area in the fourth means,
When the second data file is selected by the first means, the area definition information is stored in the selected second data file, and the second data file is stored by the first means.
And a fifth means for storing the area definition information in the common data file when the data file is not selected.
【請求項3】複数のアプリケーションで共通に使用され
る共通データファイルと、アプリケーション個別に使用
される複数の第2のデータファイルとを有し、かつ、そ
れぞれのデータファイル内は複数のエリアに分割されて
いるメモリ領域を有し、前記共通データファイルには共
通データファイル内の各エリアの識別情報を記憶し、前
記第2のデータファイルには第2のデータファイル内の
各エリアの識別情報を記憶しているメモリと、 このメモリに対して前記共通データファイルおよび前記
複数の第2のデータファイルを定義するデータファイル
定義手段と、 外部から入力された命令データが第2のデータファイル
を追加定義するためのデータファイルの識別情報および
該データファイルのサイズ情報を含むデータファイルの
定義命令であるか否かを判定する第1の手段と、 この第1の手段にてデータファイルの定義命令であると
判定された場合に、データファイルの定義命令にて追加
定義されるファイルのアドレス情報を生成する第2の手
段と、 前記データファイルの定義命令中のファイルの識別情報
および該データファイルのサイズ情報と、前記第2の手
段にて生成されたデータファイルのアドレス情報とから
なるファイル定義情報を生成してメモリに記憶する第3
の手段と、 外部からのデータファイルの識別情報を含む選択命令に
基づき前記複数の第2のデータファイルのうちの1つを
選択する第4の手段と、 外部から入力された命令データがファイル内へエリアを
追加定義するためのエリアの識別情報および該エリアの
サイズ情報を含むエリアの定義命令であるか否かを判定
する第5の手段と、 この第5の手段にてエリアの定義命令であると判定され
た場合に、このエリアの定義命令中のエリアの識別情報
と同一の識別情報を有するエリアの定義情報が前記第4
の手段にて現在選択されているファイル内に既に存在し
ているか否かを判定する第6の手段と、 この第6の手段にて同一の識別情報を有するエリアの定
義情報が現在選択されているファイル内に既に存在して
いないと判定された場合には前記エリアの定義命令にて
追加定義されるエリアのアドレス情報を生成する第7の
手段と、 前記エリアの定義命令中のエリアの識別情報および該エ
リアのサイズ情報と、前記第7の手段にて生成されたエ
リアのアドレス情報とからなるエリア定義情報を生成し
て前記第1の手段にて現在選択されているファイル内に
記憶する第8の手段と、 外部から入力された命令データがファイル内のエリアへ
のアクセスのためのエリアの識別情報および命令情報を
含むエリアの処理命令であるか否かを判定する第9の手
段と、 この第9の手段にてエリア処理命令であると判定された
場合で、前記第4の手段にて第2のデータファイルのう
ちの1つが現在選択されている場合は、この選択されて
いる第2のデータファイル内でエリア処理命令にて指定
される識別情報を有するエリアを見つけ、前記第4の手
段にて第2のデータファイルのうちの1つが現在選択さ
れていない場合は、前記共通データフル内でエリア処理
命令にて指定される識別情報を有するエリアを見つける
第10の手段と、 この第10の手段にて見つけたエリアへのアクセスを行な
う第11の手段と、 を具備したことを特徴とする携帯可能電子装置。
3. A data file having a common data file commonly used by a plurality of applications and a plurality of second data files used by each application, and each data file is divided into a plurality of areas. The common data file stores identification information of each area in the common data file, and the second data file stores identification information of each area in the second data file. A memory storing the data, data file defining means for defining the common data file and the plurality of second data files with respect to the memory, and externally input instruction data additionally defining a second data file Data file identification information and data file definition information including the size information of the data file. First means for judging whether or not the data file is defined as a data file definition command. If the first means determines that the command is a data file definition command, address information of a file additionally defined by the data file definition command is added. Second means for generating, file definition information comprising file identification information and size information of the data file in the data file definition command, and address information of the data file generated by the second means Generate and store in memory 3
Means for selecting one of the plurality of second data files based on a selection command including identification information of the data file from the outside, and command data input from the outside in the file A fifth means for determining whether or not the area definition command includes area identification information for defining an additional area and size information of the area; and an area definition command by the fifth means. If it is determined that there is an area, the area definition information having the same identification information as the area identification information in the area definition command is stored in the fourth area.
Means for judging whether or not the file already exists in the file currently selected by means of the means, and the definition information of the area having the same identification information is now selected by the sixth means. Means for generating address information of an area additionally defined by the area definition instruction when it is determined that the area does not already exist in the file, and identification of the area in the area definition instruction Generates area definition information including information, size information of the area, and address information of the area generated by the seventh means, and stores it in the file currently selected by the first means. Eighth means, and ninth means for judging whether or not the command data inputted from the outside is a processing command for an area including identification information of the area for accessing the area in the file and command information. And if the ninth means determines that the command is an area processing command, and if one of the second data files is currently selected by the fourth means, Finding an area having identification information specified by the area processing instruction in the second data file, and if one of the second data files is not currently selected by the fourth means, Tenth means for finding an area having the identification information specified by the area processing instruction in the common data full; and eleventh means for accessing the area found by the tenth means. A portable electronic device characterized by the following.
JP63216807A 1988-08-31 1988-08-31 Portable electronic devices Expired - Lifetime JP2974144B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63216807A JP2974144B2 (en) 1988-08-31 1988-08-31 Portable electronic devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63216807A JP2974144B2 (en) 1988-08-31 1988-08-31 Portable electronic devices

Publications (2)

Publication Number Publication Date
JPH0264887A JPH0264887A (en) 1990-03-05
JP2974144B2 true JP2974144B2 (en) 1999-11-08

Family

ID=16694195

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63216807A Expired - Lifetime JP2974144B2 (en) 1988-08-31 1988-08-31 Portable electronic devices

Country Status (1)

Country Link
JP (1) JP2974144B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3594980B2 (en) * 1993-12-10 2004-12-02 株式会社東芝 File management method
JP4533665B2 (en) * 2004-05-24 2010-09-01 株式会社東芝 Portable electronic device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0827825B2 (en) * 1986-05-26 1996-03-21 日本電信電話株式会社 IC card
JPS63108445A (en) * 1986-10-27 1988-05-13 Hitachi Ltd Ic card
JPH0758500B2 (en) * 1987-02-20 1995-06-21 株式会社東芝 Portable electronic device

Also Published As

Publication number Publication date
JPH0264887A (en) 1990-03-05

Similar Documents

Publication Publication Date Title
JP3015377B2 (en) IC card
KR950007895B1 (en) Portable electronic apparatus
JP3110035B2 (en) Portable electronic devices
KR970006646B1 (en) Portable electronic apparatus
KR960005397B1 (en) Portable electronic apparatus
JP3568970B2 (en) IC card issuing device
JPS63788A (en) Portable electronic equipment
JPH06274397A (en) File control system
JPS63201748A (en) Portable electronic equipment
JP3178881B2 (en) Portable electronic devices
JP2974144B2 (en) Portable electronic devices
JPH0766431B2 (en) How to approve PIN code for memory card
KR100350972B1 (en) Computer system and method possessing the function of storing an ID in its ROM
JP2695857B2 (en) Portable electronic devices
JP3209994B2 (en) Portable electronic devices
JP3015376B2 (en) IC card
JP3004236B2 (en) Portable electronic device and access management method in portable electronic device
JP2001167236A (en) Portable electronic device
JP3246558B2 (en) IC card
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP2880709B2 (en) Memory control method for IC card
JP4177642B2 (en) Portable electronic device
JPH01147686A (en) Portable electronic device
JPH06274398A (en) File control system
JP2002352205A (en) Portable electronic equipment and access management method

Legal Events

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

Free format text: PAYMENT UNTIL: 20070903

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080903

Year of fee payment: 9

EXPY Cancellation because of completion of term