JP2004334747A - Portable electronic device - Google Patents
Portable electronic device Download PDFInfo
- Publication number
- JP2004334747A JP2004334747A JP2003132704A JP2003132704A JP2004334747A JP 2004334747 A JP2004334747 A JP 2004334747A JP 2003132704 A JP2003132704 A JP 2003132704A JP 2003132704 A JP2003132704 A JP 2003132704A JP 2004334747 A JP2004334747 A JP 2004334747A
- Authority
- JP
- Japan
- Prior art keywords
- command
- application
- input
- registered
- electronic device
- 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
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、たとえば、外部から入力されるリセット信号により活性化されると、初期応答データを外部へ出力し、その後、外部からコマンドが入力されると、このコマンドに対応した所定の処理を実行してその処理結果を外部へ出力する、いわゆるICカードと称される携帯可能電子装置に係り、特に少なくとも2つ以上のアプリケーションが登録されている携帯可能電子装置に関する。
【0002】
【従来の技術】
一般に、この種のICカードは、書込み、書換え可能な不揮発性メモリおよびこれらを制御するCPUなどの制御素子を有し、外部との間でデータの入出力を行なうもので、様々な分野(金融機関、行政機関、医療機関、通信業界など)において利用されており、このため複数のアプリケーションをサポートしているものが多用されつつある。
【0003】
【発明が解決しようとする課題】
従来、複数のアプリケーションをサポートしているICカードにあっては、同一セッション(活性化から非活性化までの間)中に、複数のアプリケーションが混在して動作可能であった。このため、各アプリケーションで共有しているデータをアクセスする場合、たとえば、あるアプリケーションがデータを参照した後に、もう一方のアプリケーションで当該データの書換えを行ない、そのため、セッション中にデータが統一されず、誤動作を起す危険性がある。
【0004】
そこで、本発明は、同一セッション中は1つのアプリケーションのみが動作し、これにより、複数のアプリケーションが同一セッション中に動作することができなくなり、共有データ等が参照後に書換えられことを防止できる携帯可能電子装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
本発明の携帯可能電子装置は、活性化されると初期応答データを外部へ出力し、かつ、外部からコマンドが入力されると、このコマンドに対応した所定の処理を実行してその処理結果を外部へ出力するもので、少なくとも2つ以上のアプリケーションが登録されている携帯可能電子装置において、前記初期応答データの出力後に最初に入力されたコマンドに対応するアプリケーションのみを、当該携帯可能電子装置が非活性化されるまで有効とする手段を具備したことを特徴とする。
【0006】
また、本発明の携帯可能電子装置は、活性化されると初期応答データを外部へ出力し、かつ、外部からコマンドが入力されると、このコマンドに対応した所定の処理を実行してその処理結果を外部へ出力するもので、少なくとも2つ以上のアプリケーションが登録されている携帯可能電子装置において、前記初期応答データの出力後にコマンドが入力されると、動作アプリケーションがあるか否かを示すアプリケーションフラグを確認するフラグ確認手段と、このフラグ確認手段による確認の結果、前記アプリケーションフラグが未設定状態にある場合、前記入力されたコマンドがあらかじめ登録されたアプリケーションのコマンドに対応しているか否かをチェックするコマンドチェック手段と、このコマンドチェック手段によるチェックの結果、前記入力されたコマンドがあらかじめ登録されたアプリケーションのコマンドに対応している場合、前記アプリケーションフラグを設定状態にセットし、対応するコマンドの処理を実行する第1の処理手段と、前記フラグ確認手段による確認の結果、前記アプリケーションフラグが設定状態にある場合、その設定されたアプリケーションに前記入力されたコマンドが登録されているか否かを確認するコマンド確認手段と、このコマンド確認手段による確認の結果、設定されたアプリケーションに前記入力されたコマンドが登録されている場合、対応するコマンドの処理を実行する第2の処理手段とを具備している。
【0007】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照して説明する。
図1は、本実施の形態に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すものである。このICカードシステムでは、ICカード101はカードリーダ・ライタ102を介してパーソナルコンピュータなどの端末装置103と接続され、さらに端末装置103と接続されたホストコンピュータ104とも通信可能に構成されている。
【0008】
図2は、ICカード101の構成例を示すもので、全体的な制御を司る制御手段としてのCPUなどの制御素子201、記憶内容が書換え可能な記憶手段としての不揮発性のデータメモリ202、ワーキングメモリ203、プログラムメモリ204、および、カードリーダ・ライタ102との通信を行なうための通信部205によって構成されていて、これらは1つのICチップ(あるいは、複数のICチップ)で構成されている。このICチップはICカード内に埋設されており、接触式の場合にはICカード表面の接点部分(通信部205)を介してカードリーダ・ライタ102と電気的に接続するようになっている。
【0009】
データメモリ202は、各種データの記憶に使用されるもので、たとえば、EEPROMなどの書込み、書換え可能な不揮発性メモリで構成されている。
ワーキングメモリ203は、制御素子201が処理を行なう際の処理データなどを一時的に保持するための作業用メモリであり、たとえば、RAMなどで構成される。
プログラムメモリ204は、たとえば、マスクROMで構成されており、制御素子201の制御プログラムや各種アプリケーションプログラムなどを記憶するものである。
通信部205は、外部装置であるカードリーダ・ライタ102との通信を行なうためのもので、接触式の場合はICカード表面に設けられた接点部分であり、非接触式の場合はアンテナを含む無線通信部である。
【0010】
図3は、プログラムメモリ204の構成を示している。プログラムメモリ204は、制御素子201の制御プログラムや複数のアプリケーションプログラムが格納されるプログラム領域301、複数のアプリケーションのコマンド・コントロール・テーブル(CCT)、たとえば、第1アプリケーションのコマンド・コントロール・テーブル302、および、第2アプリケーションのコマンド・コントロール・テーブル303の各領域から構成されている。
【0011】
図4は、コマンド・コントロール・テーブル302,303の構成例を示している。このコマンド・コントロール・テーブル302,303には、コマンド電文の命令コード(CLA/INS)、および、対応するプログラムが格納されているプログラム領域301のアドレス(プログラム格納アドレス)がそれぞれ登録されている。なお、図4(a)は第1アプリケーションのコマンド・コントロール・テーブル302を示し、図4(b)は第2アプリケーションのコマンド・コントロール・テーブル303を示している。
【0012】
図5は、動作アプリケーションフラグの構成を示しており、この動作アプリケーションフラグはワーキングメモリ203内に設けられている。動作アプリケーションが未設定の場合は図5(a)のように全て「0」のデータがセットされ、動作アプリケーションが設定されると図5(b)のようにアプリケーションが識別できる情報(アプリケーション名)がセットされる。
【0013】
図6は、ICカード101に入力されるコマンド電文の構成例を示している。このコマンド電文は、たとえば、命令コード(CLA/INS)とパラメータデータ(P1/P2/Lc/Data/Le)で構成されている。なお、Le、Data部については存在しないコマンド電文もある。
【0014】
次に、上記のような構成において、ICカード101の動作を図7に示すフローチャートを参照して説明する。
制御素子201は、カードリーダ・ライタ102からのリセット信号(RST信号)がオフになると(ステップS1)、初期応答データ(ATR)をカードリーダ・ライタ102へ出力し(ステップS2)、コマンド受信待ち状態となる(ステップS3)。
【0015】
コマンド受信待ち状態において、カードリーダ・ライタ102からのコマンドを受信すると、制御素子201は、ワーキングメモリ203内の動作アプリケーションフラグを確認する(ステップS4)。
この確認の結果、動作アプリケーションフラグが未設定の場合、制御素子201は、入力されたコマンドの命令コード(CLA/INS)があらかじめプログラムメモリ204内に登録された各アプリケーションのコマンド・コントロール・テーブルに登録された命令コード(CLA/INS)か否かをチェックする(ステップS5〜S7)。このチェックは、登録されている全てのアプリケーションのコマンド・コントロール・テーブル、この例ではコマンド・コントロール・テーブル302,303に対して実行される。
【0016】
こうして全てのコマンド・コントロール・テーブル302,303をサーチしてコマンドが見つからなかった場合、すなわち、入力されたコマンドの命令コード(CLA/INS)が各アプリケーションのコマンド・コントロール・テーブル302,303に登録された命令コード(CLA/INS)と一致しなかった場合、制御素子201は、コマンド未定義を意味するステータスをカードリーダ・ライタ102へ出力し(ステップS8)、処理を終了する。
【0017】
全てのコマンド・コントロール・テーブル302,303をサーチしてコマンドが見つかった場合、すなわち、入力されたコマンドの命令コード(CLA/INS)が各アプリケーションのコマンド・コントロール・テーブル302,303に登録された命令コード(CLA/INS)と一致した場合、制御素子201は、ワーキングメモリ203内の動作アプリケーションフラグをセットする(ステップS9)。この場合は、コマンドが見つかったアプリケーションが識別できる情報(アプリケーション名)をセットする。
【0018】
次に、制御素子201は、入力されたコマンドに対する処理を実行する(ステップS10)。すなわち、コマンド・コントロール・テーブル302,303内の入力されたコマンドの命令コード(CLA/INS)と一致する命令コード(CLA/INS)に対応するプログラム格納先アドレスに格納されたプログラムを実行する。コマンド実行後、制御素子201は、コマンド実行結果のステータスをカードリーダ・ライタ102へ出力し(ステップS11)、コマンド受信待ち状態(ステップS3)に戻る。
【0019】
コマンド受信待ち状態において、カードリーダ・ライタ102から再度、コマンドを受信すると、制御素子201は、ワーキングメモリ203内の動作アプリケーションフラグを確認する(ステップS4)。この場合、動作アプリケーションフラグが設定されているので、制御素子201は、設定された内容のアプリケーションのコマンド・コントロール・テーブルに対し、入力されたコマンドの命令コード(CLA/INS)が登録されているか否かをチェックする(ステップS12)。
【0020】
このチェックの結果、コマンドが見つかった場合、制御素子201は、入力されたコマンドに対する処理を実行し(ステップS10)、コマンド実行後、コマンド実行結果のステータスをカードリーダ・ライタ102へ出力し(ステップS11)、コマンド受信待ち状態(ステップS3)に戻る。
【0021】
ステップS12のチェックの結果、設定された内容のアプリケーションのコマンド・コントロール・テーブルにコマンドが登録されていない場合、制御素子201は、コマンド未定義を意味するステータスをカードリーダ・ライタ102へ出力し(ステップS13)、処理を終了する。
【0022】
このように、初期応答データの出力後に最初に入力されたコマンドに対応するアプリケーションのみを当該ICカードが非活性化されるまで有効とすることができるので、同一セッション(活性化から非活性化までの間)中は1つのアプリケーションのみが動作する。これにより、複数のアプリケーションが同一セッション中に動作することができなくなり、共有データなどが参照後に書換えられことを防止できるものである。
【0023】
【発明の効果】
以上詳述したように本発明によれば、同一セッション中は1つのアプリケーションのみが動作し、これにより、複数のアプリケーションが同一セッション中に動作することができなくなり、共有データなどが参照後に書換えられことを防止できる携帯可能電子装置を提供できる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るICカードを取扱うICカードシステムの構成を示すブロック図。
【図2】ICカードの構成を概略的に示すブロック図。
【図3】プログラムメモリの構成を概略的に示す模式図。
【図4】アプリケーションのコマンド・コントロール・テーブルの構成を概略的に示す模式図。
【図5】動作アプリケーションフラグの構成を示す図。
【図6】ICカードに入力されるコマンド電文の構成例を示す図。
【図7】ICカードの動作を説明するフローチャート。
【符号の説明】
101…ICカード(携帯可能電子装置)、102…カードリーダ・ライタ、103…端末装置、104…ホストコンピュータ、201…制御素子、202…データメモリ、203…ワーキングメモリ、204…プログラムメモリ、205…通信部、301…プログラム領域、302…第1アプリケーションのコマンド・コントロール・テーブル、303…第2アプリケーションのコマンド・コントロール・テーブル。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention outputs, for example, initial response data to the outside when activated by a reset signal input from the outside, and then executes a predetermined process corresponding to the command when a command is input from the outside. More particularly, the present invention relates to a portable electronic device called an IC card which outputs the processing result to the outside, and particularly to a portable electronic device in which at least two or more applications are registered.
[0002]
[Prior art]
Generally, this type of IC card has a writable and rewritable nonvolatile memory and a control element such as a CPU for controlling these, and inputs and outputs data to and from the outside. Institutions, government agencies, medical institutions, the telecommunications industry, etc.), and those that support multiple applications are becoming increasingly used.
[0003]
[Problems to be solved by the invention]
Conventionally, in an IC card supporting a plurality of applications, a plurality of applications can coexist and operate during the same session (between activation and deactivation). Therefore, when accessing data shared by each application, for example, after one application refers to the data, the other application rewrites the data, so that the data is not unified during the session, There is a risk of malfunction.
[0004]
Therefore, the present invention provides a portable device that can operate only one application during the same session, thereby preventing a plurality of applications from operating during the same session and preventing shared data and the like from being rewritten after reference. An object is to provide an electronic device.
[0005]
[Means for Solving the Problems]
The portable electronic device of the present invention outputs the initial response data to the outside when activated, and executes a predetermined process corresponding to the command when a command is input from the outside, and outputs the processing result. In the portable electronic device that outputs to the outside and at least two or more applications are registered, only the application corresponding to the command first input after the output of the initial response data is performed by the portable electronic device. It is characterized in that it has means for making it effective until deactivated.
[0006]
Further, the portable electronic device of the present invention outputs the initial response data to the outside when activated, and executes a predetermined process corresponding to the command when the command is input from the outside to execute the process. In a portable electronic device in which at least two or more applications are registered, when a command is input after the output of the initial response data, an application indicating whether there is an operation application is provided. Flag confirming means for confirming a flag, and as a result of the confirmation by the flag confirming means, when the application flag is in an unset state, it is determined whether or not the input command corresponds to a command of an application registered in advance. Command check means to be checked As a result, when the input command corresponds to a command of an application registered in advance, first processing means for setting the application flag to a set state and executing processing of the corresponding command; When the application flag is in a set state as a result of the confirmation by the means, a command confirmation means for confirming whether or not the input command is registered in the set application, and a result of the confirmation by the command confirmation means And second processing means for executing processing of a corresponding command when the input command is registered in the set application.
[0007]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a configuration example of an IC card system that handles an IC card as a portable electronic device according to the present embodiment. In this IC card system, the
[0008]
FIG. 2 shows an example of the configuration of the
[0009]
The
The
The
The
[0010]
FIG. 3 shows a configuration of the
[0011]
FIG. 4 shows a configuration example of the command control tables 302 and 303. In the command control tables 302 and 303, the instruction code (CLA / INS) of the command message and the address (program storage address) of the
[0012]
FIG. 5 shows a configuration of the operation application flag. The operation application flag is provided in the
[0013]
FIG. 6 shows a configuration example of a command message input to the
[0014]
Next, the operation of the
When the reset signal (RST signal) from the card reader /
[0015]
When a command is received from the card reader /
As a result of this confirmation, when the operation application flag is not set, the
[0016]
When all the command control tables 302 and 303 are searched and no command is found, that is, the command code (CLA / INS) of the input command is registered in the command control tables 302 and 303 of each application. If the command code does not match the command code (CLA / INS), the
[0017]
When a command is found by searching all the command control tables 302 and 303, that is, the instruction code (CLA / INS) of the input command is registered in the command control tables 302 and 303 of each application. If it matches the instruction code (CLA / INS), the
[0018]
Next, the
[0019]
When the command is received again from the card reader /
[0020]
As a result of this check, if a command is found, the
[0021]
As a result of the check in step S12, if the command is not registered in the command control table of the application having the set content, the
[0022]
As described above, only the application corresponding to the command input first after the output of the initial response data can be made effective until the IC card is deactivated, so that the same session (from activation to deactivation) During the period), only one application operates. As a result, a plurality of applications cannot operate during the same session, and it is possible to prevent shared data and the like from being rewritten after reference.
[0023]
【The invention's effect】
As described above in detail, according to the present invention, only one application operates during the same session, whereby a plurality of applications cannot operate during the same session, and the shared data or the like is rewritten after the reference. It is possible to provide a portable electronic device capable of preventing such a situation.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an IC card system for handling an IC card according to an embodiment of the present invention.
FIG. 2 is a block diagram schematically showing a configuration of an IC card.
FIG. 3 is a schematic diagram schematically showing a configuration of a program memory.
FIG. 4 is a schematic diagram schematically showing a configuration of a command control table of an application.
FIG. 5 is a diagram showing a configuration of an operation application flag.
FIG. 6 is a diagram showing a configuration example of a command message input to an IC card.
FIG. 7 is a flowchart illustrating the operation of the IC card.
[Explanation of symbols]
101: IC card (portable electronic device), 102: card reader / writer, 103: terminal device, 104: host computer, 201: control element, 202: data memory, 203: working memory, 204: program memory, 205: Communication unit, 301: program area, 302: command control table of the first application, 303: command control table of the second application.
Claims (3)
前記初期応答データの出力後に最初に入力されたコマンドに対応するアプリケーションのみを、当該携帯可能電子装置が非活性化されるまで有効とする手段を具備したことを特徴とする携帯可能電子装置。When activated, it outputs initial response data to the outside, and when a command is input from outside, executes a predetermined process corresponding to the command and outputs the processing result to the outside. In a portable electronic device in which one or more applications are registered,
A portable electronic device comprising means for validating only an application corresponding to a command input first after the output of the initial response data until the portable electronic device is deactivated.
前記初期応答データの出力後にコマンドが入力されると、動作アプリケーションがあるか否かを示すアプリケーションフラグを確認するフラグ確認手段と、
このフラグ確認手段による確認の結果、前記アプリケーションフラグが未設定状態にある場合、前記入力されたコマンドがあらかじめ登録されたアプリケーションのコマンドに対応しているか否かをチェックするコマンドチェック手段と、
このコマンドチェック手段によるチェックの結果、前記入力されたコマンドがあらかじめ登録されたアプリケーションのコマンドに対応している場合、前記アプリケーションフラグを設定状態にセットし、対応するコマンドの処理を実行する第1の処理手段と、
前記フラグ確認手段による確認の結果、前記アプリケーションフラグが設定状態にある場合、その設定されたアプリケーションに前記入力されたコマンドが登録されているか否かを確認するコマンド確認手段と、
このコマンド確認手段による確認の結果、設定されたアプリケーションに前記入力されたコマンドが登録されている場合、対応するコマンドの処理を実行する第2の処理手段と、
を具備したことを特徴とする携帯可能電子装置。When activated, it outputs initial response data to the outside, and when a command is input from outside, executes a predetermined process corresponding to the command and outputs the processing result to the outside. In a portable electronic device in which one or more applications are registered,
When a command is input after the output of the initial response data, a flag confirmation unit that confirms an application flag indicating whether or not there is an operation application,
As a result of the check by the flag check unit, when the application flag is in an unset state, a command check unit that checks whether the input command corresponds to a command of an application registered in advance,
As a result of the check by the command check means, if the input command corresponds to a command of an application registered in advance, the application flag is set to a set state, and the processing of the corresponding command is executed. Processing means;
As a result of the confirmation by the flag confirmation unit, when the application flag is in a set state, a command confirmation unit that confirms whether the input command is registered in the set application,
If the input command is registered in the set application as a result of the confirmation by the command confirmation unit, a second processing unit that executes processing of the corresponding command;
A portable electronic device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003132704A JP2004334747A (en) | 2003-05-12 | 2003-05-12 | Portable electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003132704A JP2004334747A (en) | 2003-05-12 | 2003-05-12 | Portable electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004334747A true JP2004334747A (en) | 2004-11-25 |
Family
ID=33507473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003132704A Pending JP2004334747A (en) | 2003-05-12 | 2003-05-12 | Portable electronic device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004334747A (en) |
-
2003
- 2003-05-12 JP JP2003132704A patent/JP2004334747A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4896837B2 (en) | Portable electronic device and method for controlling portable electronic device | |
JP2012064048A (en) | Portable electronic device, non-contact ic card and command processing method for portable electronic device | |
JP4896842B2 (en) | Portable electronic device | |
JP5085254B2 (en) | Portable electronic device, IC card, and command processing method in portable electronic device | |
JP2004334747A (en) | Portable electronic device | |
JP4784138B2 (en) | IC card and IC card program | |
JP3607658B2 (en) | Portable electronic device | |
JP2007087120A (en) | Ic card mounted with multiple os (operating system) and issue consignment method | |
JP2006172271A (en) | Multi-application ic card, and program for ic card | |
JP4774681B2 (en) | Multi-application IC card with common command application | |
JP4549731B2 (en) | Multi-application IC card with command code that is commonly used by applications | |
JP2012133656A (en) | Portable electronic apparatus and ic card | |
JP2006293706A (en) | Multi-application ic card with application updating function | |
JP7439847B2 (en) | Electronic information storage medium, key data setting method, and program | |
JP2005301657A (en) | Ic card having multiple command tables stored in rewritable memory and executing method for command | |
JP7397402B2 (en) | Electronic information storage medium, data transmission method, and program | |
JP2014186367A (en) | Ic card and portable electronic device | |
JP2007034434A (en) | Ic card, method for writing data to ic card, and ic card program | |
JP6281302B2 (en) | Information processing apparatus, IC card, and data processing method | |
JP2003281487A (en) | Portable electronic device, and method for providing application and data area in memory | |
JP7206942B2 (en) | Electronic information storage medium, IC chip, initial setting method, and initial setting program | |
JP2008146343A (en) | Ic card, and method for calling update program | |
JP4641157B2 (en) | Multi-application IC card and application program | |
JP6750450B2 (en) | Electronic information storage medium, data transmission method, IC card, and data transmission program | |
JP2006209172A (en) | Ic card and program for ic card |