JPH09231112A - IC card - Google Patents
IC cardInfo
- Publication number
- JPH09231112A JPH09231112A JP8290264A JP29026496A JPH09231112A JP H09231112 A JPH09231112 A JP H09231112A JP 8290264 A JP8290264 A JP 8290264A JP 29026496 A JP29026496 A JP 29026496A JP H09231112 A JPH09231112 A JP H09231112A
- Authority
- JP
- Japan
- Prior art keywords
- file
- card
- reader
- stored
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
(57)【要約】
【課題】 格納されているファイルの存在を確認する手
段、及び、メモリの空き容量を確認する手段とを備えた
ICカードを提供する。
【解決手段】 メモリに保存されている専用ファイルと
基礎ファイルとが階層構造を構成しているICカードに
おいて、特定の前記専用ファイルを親ファイルとする前
記専用ファイル及び前記基礎ファイルを検索する検索手
段と、前記検索手段により検索されたファイルの識別情
報を外部へ送信する送信手段とを有することを特徴とす
る。
(57) An object of the present invention is to provide an IC card provided with a means for confirming the existence of a stored file and a means for confirming the free space of a memory. SOLUTION: In an IC card in which a dedicated file and a basic file stored in a memory form a hierarchical structure, a search means for searching the dedicated file and the basic file having the specific dedicated file as a parent file. And transmitting means for transmitting the identification information of the file searched by the searching means to the outside.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、ICカードに関
し、特に、指定した専用ファイルの配下に存在するファ
イルの確認、及び空き容量の確認をすることが可能なI
Cカードに関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC card, and in particular, it is possible to confirm a file existing under a designated dedicated file and to confirm an available capacity.
It concerns the C card.
【0002】[0002]
【従来の技術】図4は、従来のICカードの構成、及び
そのICカードとリーダライタ装置との接続関係を示す
ブロック図である。従来のICカード10は、通常、I
/Oインタフェース11、CPU12、ROM13、R
AM14、EEPROM15を内蔵している。I/Oイ
ンタフェース11は、データを送受するための入出力回
路であり、CPU12はこのI/Oインタフェース11
を介してリーダライタ装置20と交信する。ROM13
内には、CPU12によって実行されるべきプログラム
が記憶されており、CPU12はこのプログラムに基い
て、ICカード10を統括制御する。RAM14は、C
PU12がこのような統括制御を行う上で作業領域とし
て使用するメモリである。一方、EEPROM15は、
このICカード10に記録すべき本来のデータを格納す
るメモリである。2. Description of the Related Art FIG. 4 is a block diagram showing a configuration of a conventional IC card and a connection relationship between the IC card and a reader / writer device. The conventional IC card 10 is usually I
/ O interface 11, CPU 12, ROM 13, R
AM14 and EEPROM15 are built in. The I / O interface 11 is an input / output circuit for transmitting and receiving data, and the CPU 12 has the I / O interface 11
It communicates with the reader / writer device 20 via the. ROM13
A program to be executed by the CPU 12 is stored therein, and the CPU 12 centrally controls the IC card 10 based on this program. RAM14 is C
The PU 12 is a memory used as a work area when performing such integrated control. On the other hand, the EEPROM 15 is
This is a memory for storing the original data to be recorded in the IC card 10.
【0003】ICカード10には、リーダライタ装置2
0から電源やクロックが供給される。したがって、IC
カード10がリーダライタ装置20等と切り離される
と、ICカード10への電源及びクロックの供給は停止
する。しかしながら、EEPROM15は不揮発性メモ
リであるため、電源供給が停止した後もその記録内容は
そのまま保持される。ただし、RAM14内のデータに
ついては、電源供給の停止によりすべて失われる。The IC card 10 includes a reader / writer device 2
Power and clock are supplied from 0. Therefore, IC
When the card 10 is separated from the reader / writer device 20 or the like, the power supply and the clock supply to the IC card 10 are stopped. However, since the EEPROM 15 is a non-volatile memory, its recorded content is retained as it is even after the power supply is stopped. However, all the data in the RAM 14 is lost due to the stop of power supply.
【0004】ICカード10内の各メモリ13、14、
15へのアクセスは、すべてCPU12を介して行わ
れ、外部からこれらメモリを直接アクセスすることはで
きない。すなわち、リーダライタ装置20からCPU1
2に対して所定の「コマンド」を与えると、CPU12
はこの「コマンド」を解釈実行し、その結果を、リーダ
ライタ装置20に対して「レスポンス」として返送する
ことになる。Each memory 13, 14 in the IC card 10
All access to 15 is performed via the CPU 12, and these memories cannot be directly accessed from the outside. That is, from the reader / writer device 20 to the CPU 1
When a predetermined “command” is given to 2, the CPU 12
Interprets and executes this "command" and returns the result to the reader / writer device 20 as a "response".
【0005】図5は、図4に示すEEPROM15内の
階層構造を示すブロック図である。本実施形態のEEP
ROMは、3つの階層から構成される。3つの階層と
は、第1層のMF(Master File) 、第2層のDF(Dedic
ated File)及び第3層のEF(Elementary File)であ
る。 MFは、データメモリ全体のファイルである。M
Fは、各アプリケーション(サービス)に共通したデー
タを格納するためのファイルであり、例えば、このIC
カード10の所有者の氏名、住所、電話番号などの情報
が記録される。DFは、専用ファイルであり、アプリケ
ーションごとにDFの設定がなされている。なお、広義
には、MFもDFの一種である。EFは、基礎ファイル
であり、CPUがICカードを管理・制御する際に解釈
実行するデータを格納するIEFと、アプリケーション
で使用するデータを格納するWEF(作業用基礎ファイ
ル)の2種類がある。FIG. 5 is a block diagram showing a hierarchical structure in the EEPROM 15 shown in FIG. EEP of this embodiment
The ROM is composed of three layers. The three layers are the MF (Master File) of the first layer and the DF (Dedic of the second layer).
and an EF (Elementary File) of the third layer. The MF is a file of the entire data memory. M
F is a file for storing data common to each application (service), for example, this IC
Information such as the name, address, and telephone number of the owner of the card 10 is recorded. The DF is a dedicated file, and the DF is set for each application. In a broad sense, MF is also a type of DF. The EF is a basic file, and there are two types: an IEF that stores data to be interpreted and executed when the CPU manages and controls the IC card, and a WEF (work basic file) that stores data used by the application.
【0006】ICカードには、カード発行時に、システ
ム提供者により、システムにおいて必要とされるDF及
びEFが格納される。したがって、いかなるファイルが
ICカードに格納されているかは、通常システム側にお
いて既知であり、リーダライタ装置20は、システムに
とって既知でないファイルは存在しないことを前提とし
てICカードと取引を行うのが通常である。[0006] The IC card stores DF and EF required in the system by the system provider when the card is issued. Therefore, what kind of file is stored in the IC card is usually known on the system side, and the reader / writer device 20 usually makes a transaction with the IC card on the assumption that there is no file unknown to the system. is there.
【0007】[0007]
【発明が解決しようとする課題】一方、最近は、ICカ
ードを多目的に利用することに対する要求が高くなって
きている。多目的に利用するとは、ICカードを異なる
2以上のシステムで使用することを意味する。On the other hand, recently, there is an increasing demand for multipurpose use of IC cards. To use for multiple purposes means to use the IC card in two or more different systems.
【0008】しかし、前述した従来のICカードでは、
リーダライタ装置は、自己のシステムでICカードに格
納されたファイルに関する情報しか所有しないので、他
のシステムによりICカードに格納されたファイルの存
在を認識することはできない。このために、ICカード
を複数のシステムで使用したとしても、それらシステム
の間で、相互のファイルを利用することができず、真に
ICカードを多目的に利用することができないという問
題があった。However, in the above-mentioned conventional IC card,
Since the reader / writer device owns only the information regarding the file stored in the IC card in its own system, it cannot recognize the existence of the file stored in the IC card by another system. Therefore, even if the IC card is used in a plurality of systems, there is a problem that mutual files cannot be used between the systems and the IC card cannot be truly used for multiple purposes. .
【0009】また、他のシステムで利用しているファイ
ルの存在が認識できないということは、同時にEEPR
OMにおける空き容量をも把握できないことを意味す
る。このために、新しいファイルをEEPROMに格納
しようとした場合に、現実のメモリの空き容量が、認識
されていたものより小さく、新しいファイルを全て書き
込むことができない場合があるという問題もあった。Further, the fact that the existence of a file used in another system cannot be recognized means that the EEPR
This means that the free space in the OM cannot be grasped. For this reason, when trying to store a new file in the EEPROM, there is a problem that the actual free space of the memory is smaller than the recognized one, and it may not be possible to write all the new files.
【0010】さらに、ICカードを複数のシステムで使
用することは、システム側から見ると、仕様の異なる他
のシステムのICカードが自己のシステム内で使用され
ることを意味する。ここで、ICカードのファイルのフ
ォーマットは、各システムごとに異なる。したがって、
同じ内容の情報を格納したファイルであっても、Aシス
テムとBシステムとでファイルが占有するメモリ容量が
異なる場合がある。したがって、ICカードが有するフ
ァイルの種類、個数等が認識されても、異なる種類のI
Cカードの間では、それらファイルが占有しているメモ
リ容量が必ずしも等しくなく、その結果、リーダライタ
装置では、メモリの空き容量が正しく認識できないとい
う問題があった。Further, using the IC cards in a plurality of systems means that, from the system side, IC cards of other systems having different specifications are used in the own system. Here, the file format of the IC card differs for each system. Therefore,
Even if the files store the same information, the memory capacity occupied by the files may differ between the A system and the B system. Therefore, even if the type and number of files in the IC card are recognized, different types of I
The memory capacities occupied by these files are not necessarily equal among the C cards, and as a result, the reader / writer device cannot correctly recognize the free memory capacity.
【0011】そこで、本発明の課題は、メモリ格納され
ているファイルの存在を確認する手段、及び、メモリの
空き容量を確認する手段とを備えたICカードを提供す
ることである。Therefore, an object of the present invention is to provide an IC card having means for confirming the existence of a file stored in the memory and means for confirming the free space of the memory.
【0012】[0012]
【課題を解決するための手段】前記課題を解決するため
に、請求項1に係る発明は、カレント専用ファイルの下
の全てのファイルIDを出力することができることを特
徴とする。請求項2に係る発明は、メモリに格納されて
いる専用ファイルと基礎ファイルとが階層構造を構成し
ているICカードにおいて、特定の前記専用ファイルを
親ファイルとする前記専用ファイル及び前記基礎ファイ
ルを検索する検索手段と、前記検索手段により検索され
たファイルの識別情報を外部へ送信する送信手段とを有
することを特徴とする。請求項3に係る発明は、メモリ
に格納されている専用ファイルと基礎ファイルとが階層
構造を構成しているICカードにおいて、特定の前記専
用ファイルが管理する領域において、情報の書き込みが
可能な領域の大きさに関する情報を取得する空き容量取
得手段と、前記空き容量取得手段により取得された情報
を外部へ送信する送信手段とを有することを特徴とす
る。In order to solve the above-mentioned problems, the invention according to claim 1 is characterized in that all file IDs under the current exclusive file can be output. According to a second aspect of the present invention, in an IC card in which a dedicated file and a basic file stored in a memory form a hierarchical structure, the dedicated file and the basic file having the specific dedicated file as a parent file It is characterized by having a searching means for searching and a transmitting means for transmitting the identification information of the file searched by the searching means to the outside. According to a third aspect of the present invention, in an IC card in which a dedicated file and a basic file stored in a memory form a hierarchical structure, an area in which information can be written in an area managed by the specific dedicated file It is characterized by comprising free space acquisition means for acquiring information regarding the size of, and transmission means for transmitting the information acquired by the free space acquisition means to the outside.
【0013】[0013]
【発明の実施の形態】以下、図面等を参照して、本発明
に係る実施形態について、さらに詳しく説明する。 (第1実施形態)はじめに、本発明に係るICカードの
第1実施形態について説明する。本実施形態は、ハード
ウェア構成において従来のICカードと同一であるが、
カレントDF配下の全てのファイルのファイルIDを出
力する機能を備える点において従来のICカードと異な
っている。上記機能は、リーダライタ装置20よりBR
OWSEコマンドを受信し、これを処理することにより
発揮される。Embodiments of the present invention will be described below in more detail with reference to the drawings. (First Embodiment) First, a first embodiment of the IC card according to the present invention will be described. This embodiment has the same hardware configuration as the conventional IC card,
It is different from the conventional IC card in that it has a function of outputting the file IDs of all files under the current DF. The above functions are provided by the BR
It is activated by receiving the OWSE command and processing it.
【0014】図1は、BROWSEコマンドのAPDU
を示す図である。BROWSEコマンドの第1バイト目
から第4バイト目は、順にコマンドのクラス(CL
A)、種別コード(INS)、パラメータ(P1、P
2)である。BROWSEコマンドは、LCフィールド
及びデータフィールドに該当するパラメータを備えてい
ない。BROWSEコマンドの第5バイト目は、コマン
ドに対するレスポンスのデータフィールド内に期待され
る最大バイト数を指定するLEフィールドである。本実
施形態では、LEが値「00h」であるときは、レスポ
ンスに256バイト以下の全データを送信すべきこと
を、また、「000000h」であるときは、6553
6バイト以下の全データを送信すべきことが意味され
る。なお、本明細書において数値の末尾に「h」が付さ
れているときは、その数値が16進数で表されているこ
とが意味される。FIG. 1 shows the APDU of the BROWSE command.
FIG. The 1st to 4th bytes of the BROWSE command are command classes (CL
A), type code (INS), parameters (P1, P)
2). The BROWSE command has no parameters corresponding to the LC field and the data field. The fifth byte of the BROWSE command is the LE field that specifies the maximum number of bytes expected in the data field of the response to the command. In the present embodiment, when LE has the value “00h”, all data of 256 bytes or less should be transmitted to the response, and when “LE” has the value “000000h”, 6553 does.
It means that all data of 6 bytes or less should be transmitted. In addition, in this specification, when "h" is added to the end of the numerical value, it means that the numerical value is represented by a hexadecimal number.
【0015】図2は、BROWSEコマンドを処理する
ICカードの処理内容を示す流れ図である。以下、図2
にしたがい、BROWSEコマンドを処理する場合のI
Cカードの動作について説明する。リーダライタ装置2
0から「BROWSE」コマンドがあった場合には、C
PU12は、実行前チェックを行い(S401)、エラ
ーがあった場合には(S402)、その旨のエラーメッ
セージ(S403)を送信して(S417)、コマンド
を終了する。FIG. 2 is a flow chart showing the processing contents of the IC card that processes the BROWSE command. Hereinafter, FIG.
I when processing the BROWSE command according to
The operation of the C card will be described. Reader / writer device 2
If there is a "BROWSE" command from 0, C
The PU 12 performs a pre-execution check (S401), and if there is an error (S402), transmits an error message to that effect (S403) (S417) and terminates the command.
【0016】次に、CPU12は、「操作フアイルの検
索」の出力長の割り出しを行う(S404)。このとき
に、RAM14に対しては、送信ワークエリアへのセッ
トは行わない。Next, the CPU 12 determines the output length of "search for operation file" (S404). At this time, the RAM 14 is not set in the transmission work area.
【0017】次いで、CPU12は、操作ファイルの検
索とデータ送信を行う。まず、カレントDFのDIRの
送信を行う(S405)。すなわち、TLV=85h+
02h+管理領域内空きバイト数(フリー設定時FFF
Fh)をRAM12のワークエリアにセットする。カレ
ントDFを親DFに持つファイルを、ファイルエントリ
テーブルからエントリーされているものを、すべて検索
して(S406)、該当フアイルがあるか否かを判定す
る。Next, the CPU 12 searches for an operation file and transmits data. First, the DIR of the current DF is transmitted (S405). That is, TLV = 85h +
02h + number of free bytes in management area (FFF when free is set
Fh) is set in the work area of the RAM 12. All the files having the current DF as a parent DF are searched for in the file entry table (S406), and it is determined whether or not there is a corresponding file.
【0018】該当ファイルがあったときには(S40
7)、そのファイルをRAM14の送信ワークエリアに
セットする。該当フアイルがEFの場合には、TLV=
83h+02h+ファイルID、該当フアイルがDFの
場合には、TLV=84h+DF名長十DF名をセット
する。該当ファイルがないときには、検索対象ファイル
を次のものとして、S406を実行する。When there is a corresponding file (S40)
7) The file is set in the transmission work area of the RAM 14. If the corresponding file is EF, TLV =
83h + 02h + file ID, and when the corresponding file is DF, TLV = 84h + DF name length + DF name is set. When there is no corresponding file, the file to be searched is set as the next file and S406 is executed.
【0019】次に、CPU12は、RAM14内の送信
ワークエリアがいっぱいになったか否かを判断し(S4
09)、いっぱいになった場合には、送信モジュールを
CALLして、その時点までの検索結果を送信して(S
411)、S405に戻る。Next, the CPU 12 judges whether or not the transmission work area in the RAM 14 is full (S4).
09), when it is full, CALL the transmission module and transmit the search results up to that point (S
411) and the process returns to S405.
【0020】いっぱいでない場合には、ファイルエント
リテーブルが終了したか否かを判断し(S412)、終
了していない場合には、S406に戻り、終了した場合
には、S413を実行する。S413では、送信ワーク
エリアにセットしたデータ長がLeFieldを超えて
いないか否かを判定する。同じ又は超えていた場合に
は、LeFieldまでを有効データとしてセットしそ
の旨のメッセージを生成し、全送信データがLeFie
ldに満たない場合には、その旨のメッセージを生成し
(S414)、それ以外の場合には、正常である旨のメ
ッセージを生成し(S415)、送信モジュールをCA
LLして(S416)、送信し(S417)、処理を終
了する。If it is not full, it is judged whether or not the file entry table is finished (S412). If it is not finished, the procedure returns to S406, and if it is finished, S413 is executed. In S413, it is determined whether the data length set in the transmission work area does not exceed LeField. If it is the same or more, the data up to LeField is set as valid data, a message to that effect is generated, and all transmission data is LeField.
If it is less than 1d, a message to that effect is generated (S414), otherwise a message to the effect that it is normal is generated (S415), and the transmission module is set to CA.
LL is performed (S416), transmitted (S417), and the process ends.
【0021】(第1実施形態の変形例)第1実施形態で
説明したBROWSEコマンドの処理内容は、種々の態
様に変形することが可能である。図3は、BROWSE
コマンドの処理内容の変形例を示す流れ図である。本変
形例において、BROWSEコマンドを受信したICカ
ード10は、はじめにBROWSEコマンドについての
実行前チェックを行う(S105)。具体的には、コマ
ンドのパラメータP1、P2の値が「00h」であるか
否か、コマンドがパラメータLEを有しているか否かを
確認する。また、カレントDFのディレクトリを参照
し、カレントDFが閉塞されているか否かを確認し、さ
らに、カレントDFのCRCチェックを行う。以上の確
認をした結果いずれかでエラーを発見した場合には、R
AM14の所定アドレスにエラーステータスを生成し、
コマンド処理を終了する(S165)。(Modification of First Embodiment) The processing contents of the BROWSE command described in the first embodiment can be modified in various ways. Figure 3 shows BROWSE
It is a flowchart which shows the modification of the processing content of a command. In this modification, the IC card 10 that has received the BROWSE command first performs a pre-execution check for the BROWSE command (S105). Specifically, it is confirmed whether the values of the parameters P1 and P2 of the command are “00h” and whether the command has the parameter LE. Further, the directory of the current DF is referred to, whether or not the current DF is blocked is checked, and the CRC of the current DF is checked. If an error is found in any of the above confirmation results, R
Generate an error status at a predetermined address of AM14,
The command processing ends (S165).
【0022】S105においてエラーが発見されなかっ
た場合には、次に、カレントDFのディレクトリ内の情
報を参照することにより、カレントDFの管理領域の空
きバイト数が取得される(S110)。取得された情報
は、RAM14の所定領域にTLV=85h+02h+
「管理領域内空きバイト数」のフォーマットで保存され
る。TLVは、それぞれTag、Length、Val
ueの略である。例えば、カレントDFのディレクトリ
に3000バイトの空きバイトがある旨の情報があった
場合は、TLVは「85h+02h+0BB8h」とな
る。一方、カレントDF管理領域サイズについて指定が
なかった場合には、「管理領域内空きバイト数」には空
きバイト数の代わりに管理領域サイズの指定がないこと
を意味する「FFFFh」が用いられ、TLVは「85
h+02h+FFFFh」となる。If no error is found in S105, then the number of free bytes in the management area of the current DF is acquired by referring to the information in the directory of the current DF (S110). The acquired information is TLV = 85h + 02h + in a predetermined area of the RAM 14.
It is saved in the format of "number of free bytes in management area". TLVs are Tag, Length, and Val, respectively.
Abbreviation of ue. For example, if there is information that the current DF directory has 3000 free bytes, the TLV is “85h + 02h + 0BB8h”. On the other hand, if the current DF management area size is not specified, “FFFFh” is used for “the number of free bytes in the management area” instead of the number of free bytes, which is “FFFFh”. TLV is "85
h + 02h + FFFFh ”.
【0023】次に、レスポンスとして出力するデータの
全出力長が求められる(S115〜S120)。具体的
には、EEPROM15に保存されているファイルエン
トリーテーブルが参照され、そこに記録されているファ
イル・ディレクトリから、カレントDFを親DFとする
ものが検索される(S115)。カレントDFを親DF
とするファイルが発見されると、DFの場合はDF名の
長さに2バイトが加えられた値が、EFの場合はファイ
ルIDに2バイトが加えられた値が、それぞれRAM1
4の所定領域(以下「出力長加算領域」という)に加算
される(S120)。以上の作業がファイルエントリテ
ーブルの全体について検索が終了するまで、すなわち、
EEPROM15に存在する全てのファイルディレクト
リについて検索が終了するまで行われ(S115、N
o)、検索終了後に出力長加算領域にある値が全出力長
とされる。Next, the total output length of the data output as a response is obtained (S115 to S120). Specifically, the file entry table stored in the EEPROM 15 is referred to, and the file / directory recorded therein is searched for a file having the current DF as a parent DF (S115). Current DF to parent DF
When the file is found, the value obtained by adding 2 bytes to the length of the DF name in the case of DF and the value obtained by adding 2 bytes to the file ID in the case of EF are stored in RAM1.
4 is added to a predetermined area (hereinafter referred to as “output length addition area”) (S120). The above operation is performed until the search is completed for the entire file entry table, that is,
The search is performed until all the file directories existing in the EEPROM 15 are completed (S115, N
o), the value in the output length addition area after the search is set as the total output length.
【0024】次に、リーダライタ装置20へのデータ送
信が行われる(S125〜S150)。まず、ファイル
エントリテーブルの先頭より順にファイルディレクトリ
が参照され、カレントDFを親DFとするファイルが検
索される(S125)。カレントDFを親DFとするフ
ァイルが発見された場合は、それがDFである場合にに
は、TLV=「84h+DF名長(1バイト)+DF名
(1〜16バイト)」が、また、それがEFである場合
には、TLV=「83h+02h+ファイルID(2バ
イト)」がそれぞれ送信バッファーに書き込まれる(S
130)。Next, data transmission to the reader / writer device 20 is performed (S125 to S150). First, the file directory is sequentially referred to from the top of the file entry table, and a file having the current DF as a parent DF is searched (S125). When a file having the current DF as a parent DF is found, if it is a DF, TLV = “84h + DF name length (1 byte) + DF name (1 to 16 bytes)” In the case of EF, TLV = “83h + 02h + file ID (2 bytes)” is written in the transmission buffer (S).
130).
【0025】次に、これまで検索され、送信バッファー
に書き込まれたデータ全部の大きさが、RAM14の出
力長加算領域の保存されている全出力長、又はパラメー
タLEで指定された送信データ長に達しているか否かが
判断される(S135)。達していない場合には、次に
送信バッファーに書き込まれたデータの大きさが送信バ
ッファーの許容容量に達したか否か、本実施形態の場合
には240バイトに達したか否かが判断される(S14
0)。240バイトに達している場合には、送信バッフ
ァーのデータはリーダライタ装置20に送信される(S
145)。240バイトに達していない場合には、さら
にファイルの検索を続行するためにS125の処理に戻
る。Next, the size of all the data retrieved so far and written in the transmission buffer becomes the total output length stored in the output length addition area of the RAM 14 or the transmission data length designated by the parameter LE. It is determined whether or not it has reached (S135). If not, it is determined whether or not the size of the data written in the next transmission buffer has reached the allowable capacity of the transmission buffer, and in the case of the present embodiment, 240 bytes. (S14
0). If it reaches 240 bytes, the data in the transmission buffer is transmitted to the reader / writer device 20 (S
145). If the number of bytes is less than 240 bytes, the process returns to S125 in order to continue searching for files.
【0026】一方、S135において、これまで送信バ
ッファーに書き込まれたデータ全部の大きさが全出力長
又はパラメータLEで指定された送信データ長に達して
いると判断された場合には、直ちに送信バッファーのデ
ータがリーダライタ装置20に送信される(S15
0)。また、S110においてRAM14の所定領域に
保存された管理領域空きバイト数、及びステータスワー
ドがリーダライタ装置20に送信される(S155、S
160)。なお、ステータスワードは、全出力長がパラ
メータLEで指定された送信データ長より大きいときは
6281h、小さいときは6282h、その他のときは
9000hに設定される。したがって、リーダライタ装
置20は、ステータスワードの内容より、カレントDF
配下の全てのファイルについての情報が出力されたか否
かが判断可能である。On the other hand, if it is determined in S135 that the size of all the data written in the transmission buffer has reached the total output length or the transmission data length specified by the parameter LE, the transmission buffer is immediately returned. Data is transmitted to the reader / writer device 20 (S15).
0). Further, the number of free bytes in the management area and the status word stored in the predetermined area of the RAM 14 in S110 are transmitted to the reader / writer device 20 (S155, S).
160). The status word is set to 6281h when the total output length is larger than the transmission data length specified by the parameter LE, 6228h when it is smaller, and 9000h otherwise. Therefore, the reader / writer device 20 determines the current DF from the contents of the status word.
It is possible to determine whether or not the information about all the files under the control has been output.
【0027】以上説明したように、本発明に係るICカ
ードでは、カレントDF配下のファイルIDをICカー
ドからリーダライタ装置に出力するBROWSEコマン
ドを処理する機能を備えている。したがって、本発明の
ICカードと接続されたリーダライタ装置は、必要に応
じてICカードに格納されているファイルを一覧し、例
えば取引を行うのに必要なファイルをICカードが所有
しているか否かについてその場で確認することができ
る。これにより、リーダライタ装置は、ICカード内に
格納されているファイルに関する情報を予め所有する必
要から解放され、また、ファイルの階層構造が未知であ
る他のシステムのICカードと適切な取引を行うことが
可能となっている。As described above, the IC card according to the present invention has a function of processing the BROWSE command for outputting the file ID under the current DF from the IC card to the reader / writer device. Therefore, the reader / writer device connected to the IC card of the present invention makes a list of the files stored in the IC card as needed, and determines whether the IC card possesses the files necessary for conducting a transaction, for example. You can check whether it is on the spot. As a result, the reader / writer device is relieved from the need to previously possess the information regarding the files stored in the IC card, and also performs appropriate transactions with IC cards of other systems whose file hierarchical structure is unknown. It is possible.
【0028】また、BROWSEコマンドを実行したI
Cカードは、ファイルIDのほかに、カレントDFの管
理領域の空きバイト数をもリーダライタ装置に出力す
る。これにより、例えば、新しいファイルをカレントD
F内に生成しようとする場合に、予め新たなファイルを
生成するのに十分な空き領域がカレントDF内にあるか
否かを確認することが可能となっている。また、カレン
トDFの管理領域サイズが指定されていない場合には、
空き領域サイズの代わりにその旨を表す特定の値(「F
FFFh」)が出力されるので、リーダライタ装置で
は、カレントDFが管理領域を指定されているのか否か
を正しく把握することができる。In addition, I which has executed the BROWSE command
In addition to the file ID, the C card also outputs the number of free bytes in the management area of the current DF to the reader / writer device. This allows, for example, a new file to be
When an attempt is made to create a file in F, it is possible to confirm in advance whether or not there is a sufficient free area in the current DF to create a new file. If the management area size of the current DF is not specified,
Instead of the free space size, a specific value (“F
Since FFFh ”) is output, the reader / writer device can correctly grasp whether or not the management area is specified by the current DF.
【0029】[0029]
【発明の効果】以上詳しく説明したように、本発明によ
れば、メモリに保存されているファイル及び、メモリの
空き領域に関する情報を随時参照することが可能である
ので、異なるシステム間におけるICカードを円滑に利
用することが可能となる。As described above in detail, according to the present invention, it is possible to refer to the file stored in the memory and the information about the free area of the memory at any time, so that the IC card between different systems can be referred to. Can be used smoothly.
【図1】BROWSEコマンドのAPDUを示す図であ
る。FIG. 1 is a diagram showing an APDU of a BROWSE command.
【図2】BROWSEコマンドの処理内容を示す流れ図
である。FIG. 2 is a flowchart showing the processing contents of a BROWSE command.
【図3】BROWSEコマンドの処理内容を示す流れ図
であって、図2の変形例を示す図である。3 is a flowchart showing the processing contents of a BROWSE command, which is a diagram showing a modification of FIG.
【図4】従来のICカードの構成、及びそのICカード
とリーダライタ装置との接続関係を示すブロック図であ
る。FIG. 4 is a block diagram showing a configuration of a conventional IC card and a connection relationship between the IC card and a reader / writer device.
【図5】EEPROM15内のファイルの階層構造を示
すブロック図である。5 is a block diagram showing a hierarchical structure of files in the EEPROM 15. FIG.
11 I/Oインタフェース 12 CPU 13 ROM 14 RAM 15 EEPROM 20 リーダライタ装置 11 I / O Interface 12 CPU 13 ROM 14 RAM 15 EEPROM 20 Reader / Writer Device
Claims (3)
イルIDを出力することができることを特徴とするIC
カード。1. An IC characterized in that all file IDs under the current exclusive file can be output.
card.
基礎ファイルとが階層構造を構成しているICカードに
おいて、 特定の前記専用ファイルを親ファイルとする前記専用フ
ァイル及び前記基礎ファイルを検索する検索手段と、 前記検索手段により検索されたファイルの識別情報を外
部へ送信する送信手段とを有することを特徴とするIC
カード。2. An IC card in which a special file and a basic file stored in a memory form a hierarchical structure, and a search for searching the special file and the basic file with the specific special file as a parent file. And an transmitting unit for transmitting the identification information of the file searched by the searching unit to the outside.
card.
基礎ファイルとが階層構造を構成しているICカードに
おいて、 特定の前記専用ファイルが管理する領域において、情報
の書き込みが可能な領域の大きさに関する情報を取得す
る空き容量取得手段と、 前記空き容量取得手段により取得された情報を外部へ送
信する送信手段とを有することを特徴とするICカー
ド。3. In an IC card in which a dedicated file and a basic file stored in a memory form a hierarchical structure, a size of an area in which information can be written in an area managed by the specific dedicated file. An IC card, comprising: a free space acquisition unit for acquiring information on the free space; and a transmission unit for transmitting the information acquired by the free space acquisition unit to the outside.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP8290264A JPH09231112A (en) | 1995-12-22 | 1996-10-31 | IC card |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33550995 | 1995-12-22 | ||
| JP7-335509 | 1995-12-22 | ||
| JP8290264A JPH09231112A (en) | 1995-12-22 | 1996-10-31 | IC card |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH09231112A true JPH09231112A (en) | 1997-09-05 |
| JPH09231112A5 JPH09231112A5 (en) | 2006-07-20 |
Family
ID=26557970
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP8290264A Pending JPH09231112A (en) | 1995-12-22 | 1996-10-31 | IC card |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09231112A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002005095A1 (en) * | 2000-07-07 | 2002-01-17 | Fujitsu Limited | Ic card |
-
1996
- 1996-10-31 JP JP8290264A patent/JPH09231112A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002005095A1 (en) * | 2000-07-07 | 2002-01-17 | Fujitsu Limited | Ic card |
| US6766961B2 (en) | 2000-07-07 | 2004-07-27 | Fujitsu Limited | IC card |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4930129A (en) | IC card having internal error checking capability | |
| US6402026B1 (en) | Smart card and method for bidirectional data transfer between a terminal and a smart card | |
| EP0451936B1 (en) | Program control system for portable data storage device | |
| US20100070707A1 (en) | Portable electronic device and data processing method in portable electronic device | |
| JP2001525958A (en) | IC card with shell features | |
| US6766961B2 (en) | IC card | |
| US7287098B2 (en) | Control method and electronic device enabling recognition of functions installed in the electronic device | |
| JPH09231112A (en) | IC card | |
| JP3718564B2 (en) | IC card | |
| JP3782261B2 (en) | Portable electronic device | |
| JP4590201B2 (en) | Data carrier and data carrier program | |
| EP1384197B1 (en) | Method of manufacturing smart cards | |
| US8074023B2 (en) | In-system programming to switch memory access from one area to another in memory cards | |
| JPH09231113A (en) | IC card | |
| JPH1074243A (en) | IC card | |
| AU723007B2 (en) | Method of dynamically interpreting data by a chip card | |
| JP7438432B1 (en) | Electronic information storage medium, IC chip, IC card, record writing method, and program | |
| JP4001652B2 (en) | IC card | |
| JP7582527B1 (en) | Electronic information storage medium, IC chip, record processing method, and program | |
| JP7533142B2 (en) | Electronic information storage medium, initialization sequence execution method, and program | |
| JP2005301657A (en) | IC card storing a plurality of command tables in rewritable memory and command execution method | |
| JP2026054830A (en) | Electronic information storage medium, IC chip, IC card, terminal device, data rewriting method, data transmission method, medium program, and terminal program | |
| JP4026796B2 (en) | IC card with command distribution function | |
| JP2025099278A (en) | Electronic information storage medium, ic card, ic chip, method of using logical channel, and program | |
| JP3718565B2 (en) | IC card |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060605 |
|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20061115 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070313 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070511 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070626 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070824 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20071023 |