JP2009075797A - Portable electronic equipment - Google Patents

Portable electronic equipment Download PDF

Info

Publication number
JP2009075797A
JP2009075797A JP2007243257A JP2007243257A JP2009075797A JP 2009075797 A JP2009075797 A JP 2009075797A JP 2007243257 A JP2007243257 A JP 2007243257A JP 2007243257 A JP2007243257 A JP 2007243257A JP 2009075797 A JP2009075797 A JP 2009075797A
Authority
JP
Japan
Prior art keywords
file
application
card
access
channel
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.)
Granted
Application number
JP2007243257A
Other languages
Japanese (ja)
Other versions
JP4896842B2 (en
Inventor
Norio Ishibashi
則夫 石橋
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 JP2007243257A priority Critical patent/JP4896842B2/en
Priority to SG200806667-2A priority patent/SG151197A1/en
Priority to US12/205,235 priority patent/US20090083273A1/en
Priority to FR0856176A priority patent/FR2923630B1/en
Publication of JP2009075797A publication Critical patent/JP2009075797A/en
Application granted granted Critical
Publication of JP4896842B2 publication Critical patent/JP4896842B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide portable electronic equipment for surely and efficiently performing access control in a plurality of channels. <P>SOLUTION: In an IC card, an operating system 41 and an application 22A capable of performing processing by a plurality of local channels operate, wherein the operating system 41 manages information showing a channel under access to each file stored in a non-volatile memory by a channel management table 42a, and provides information indicating a logical channel under access to the file targeted as access by a received command to the application 22A which processes the command by referring to information managed by the channel management table 42a, and the application 22A decides the possibility/impossibility of the execution of processing to the command based on the information provided from the operating system. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、たとえば、データの書込み、書換え可能な不揮発性メモリおよびCPUなどの制御素子を有したモジュールを内蔵し、外部から入力されるコマンドに対応した処理を実行するICカードなどの携帯可能電子装置に関する。   The present invention includes, for example, a portable electronic device such as an IC card that incorporates a module having a control element such as a non-volatile memory capable of writing and rewriting data and a CPU, and executes processing corresponding to an externally input command. Relates to the device.

従来、携帯可能電子装置としては、たとえば、メモリやCPUなどの機能を有したICモジュールがプラスチック板などで構成される筐体内に埋設されているICカードがある。このようなICカードでは、外部装置からのコマンドに応じて書き換え可能な不揮発性メモリにデータを書き込んだり、不揮発性メモリからデータを読み出したりするようになっている。このようなICカードは、セキュリティの重要性から、入退出管理、クレジットカード、携帯電話機、電子商取引など様々な分野で利用されている。さらに、近年では、1つのICカードを様々な用途で利用するために、複数のアプリケーションを動作させる運用形態も多くなってきている。   Conventionally, as a portable electronic device, for example, there is an IC card in which an IC module having functions such as a memory and a CPU is embedded in a casing made of a plastic plate or the like. In such an IC card, data is written to a rewritable nonvolatile memory in accordance with a command from an external device, and data is read from the nonvolatile memory. Such IC cards are used in various fields such as entrance / exit management, credit cards, mobile phones, and electronic commerce because of the importance of security. Furthermore, in recent years, in order to use a single IC card for various purposes, there are an increasing number of operation modes in which a plurality of applications are operated.

一般に、ICカードと上位装置(端末)のデータの送受信は、ロジカルチャネルと呼ばれる「通信のためのチャネル」を経由して実施される。従来、一般的な運用形態では、ICカードと端末とが1対1で通信を行うことが多いため、1つのチャネルのみで処理が完結することが多い。ただし、近年では、1つのICカードと複数の端末とで通信を行うケースが増えてきている。これは、ICカードの基本性能が向上したこと、あるいは、外部との複数のインターフェース(接触型、非接触型、あるいは、高速タイプの接触型など)を有するICカードが多くなってきていることなどが要因である。複数の端末と通信を行う場合、ICカードは、複数のチャネルを開設し、それぞれのチャネルがそれぞれの対象ファイル(あるいはアプリケーション)にアクセスする制御を行う。   In general, transmission / reception of data between an IC card and a host device (terminal) is performed via a “channel for communication” called a logical channel. Conventionally, in a general operation mode, since the IC card and the terminal often communicate one-to-one, the processing is often completed with only one channel. However, in recent years, there are an increasing number of cases where communication is performed between one IC card and a plurality of terminals. This is because the basic performance of IC cards has been improved, or the number of IC cards having a plurality of interfaces (contact type, non-contact type, high-speed type contact type, etc.) with the outside has increased. Is a factor. When communicating with a plurality of terminals, the IC card opens a plurality of channels, and each channel performs control to access each target file (or application).

しかしながら、ICカードにおける各ファイルへのアクセスは、複数のチャネルごとに管理されていないのが現状である。つまり、従来のICカードでは、複数のチャネルから各ファイルに無条件にアクセスことが可能となっている。このように複数のチャネルから無条件で各ファイルにアクセス可能であると、ICカード内で、様々が問題が発生することがある。たとえば、第1のチャネルでアクセス中のファイルが第2のチャネルで書換えられてしまうようなことが起こりうる。このような現象が起こると、第1のチャネルで期待された処理が実現できなくなってしまうという問題がある。
特開2005−11147号公報
However, at present, access to each file in the IC card is not managed for each of a plurality of channels. That is, in the conventional IC card, each file can be accessed unconditionally from a plurality of channels. If each file can be accessed unconditionally from a plurality of channels as described above, various problems may occur in the IC card. For example, a file being accessed on the first channel may be rewritten on the second channel. When such a phenomenon occurs, there is a problem that the processing expected in the first channel cannot be realized.
JP 2005-11147 A

この発明は、複数のチャネルでのアクセス制御を確実かつ効率的に行うことができる携帯可能電子装置を提供することを目的する。   An object of the present invention is to provide a portable electronic device that can reliably and efficiently perform access control in a plurality of channels.

この発明の一形態としての携帯可能電子装置は、オペレーティングシステムプログラムを記憶する第1の記憶手段と、アプリケーションプログラムを記憶する第2の記憶手段と、前記第2の記憶手段に記憶されているアプリケーションプログラムで用いられるデータを記憶している第3の記憶手段と、前記第1の記憶手段に記憶されているオペレーティングシステムプログラムおよび前記第2の記憶手段に記憶されているアプリケーションプログラムを実行する制御手段とを有するものであって、前記オペレーティングシステムプログラムは、前記第3の記憶手段に記憶している各ファイルに対してアクセス中のチャネルを示す情報を管理する管理機能と、前記管理機能に管理されている情報を参照することにより、特定のファイルにアクセスしようとするアプリケーションに、前記ファイルにアクセス中のチャネルを示す情報を提供する提供機能とを有し、前記アプリケーションプログラムは、前記オペレーティングシステムから提供された情報と自身に割り当てられているチャネルとに基づいて前記ファイルへのアクセスの可否を判定する判定機能と、この判定機能により前記ファイルへのアクセスが不可であると判定した場合、前記ファイルへのアクセスを中断する中断機能と、前記判定機能により前記ファイルへのアクセスを許可すると判定した場合、前記ファイルへのアクセスを実行する実行機能とを有する。   A portable electronic device according to one aspect of the present invention includes a first storage unit that stores an operating system program, a second storage unit that stores an application program, and an application stored in the second storage unit. Control means for executing third storage means for storing data used in the program, an operating system program stored in the first storage means, and an application program stored in the second storage means The operating system program is managed by a management function for managing information indicating a channel being accessed for each file stored in the third storage means, and the management function. Access specific files by browsing A providing function for providing information indicating a channel that is accessing the file to an application to be executed, and the application program is based on information provided from the operating system and a channel assigned to the application program. A determination function for determining whether or not access to the file is possible, an interruption function for interrupting access to the file when the determination function determines that access to the file is impossible, and the determination function And an execution function for executing access to the file when it is determined that access to the file is permitted.

この発明によれば、複数のチャネルでのアクセス制御を確実かつ効率的に行うことができる携帯可能電子装置を提供することができる。   According to the present invention, it is possible to provide a portable electronic device that can reliably and efficiently perform access control in a plurality of channels.

以下、この発明を実施するための最良の形態について図面を参照して説明する。
図1は、この実施の形態に係る携帯可能電子装置としてのICカード1のハードウエア構成を概略的に示すものである。
図1に示すように、ICカード1は、CPU(セントラル・プロセッシング・ユニット)11、ROM(リード・オンリ・メモリ)12、RAM(ランダム・アクセス・メモリ)13、通信ユニット(UART)14、不揮発性メモリ(NV(EEPROM))15、および、コプロセッサ(Co−Processor)16などを有している。
The best mode for carrying out the present invention will be described below with reference to the drawings.
FIG. 1 schematically shows a hardware configuration of an IC card 1 as a portable electronic device according to this embodiment.
As shown in FIG. 1, an IC card 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a communication unit (UART) 14, a nonvolatile memory A memory (NV (EEPROM)) 15 and a co-processor 16.

上記CPU11、ROM12、RAM13、通信ユニット14、コプロセッサ15および不揮発性メモリ16は、ICチップなどにより一体的に形成されたモジュールCaにより構成される。このモジュールCaは、当該ICカード1を形成する筐体Cの内部に埋設される。すなわち、上記ICカード1は、モジュールCaが埋設された筐体Cにより構成されている。
また、上記ICカード1は、上位装置としての上記ICカード処理装置2から電力などの供給を受けた際、活性化し(動作可能な状態となり)、上記ICカード処理装置2からのコマンドに応じて動作するようになっている。
The CPU 11, ROM 12, RAM 13, communication unit 14, coprocessor 15, and nonvolatile memory 16 are configured by a module Ca formed integrally with an IC chip or the like. The module Ca is embedded in the housing C that forms the IC card 1. That is, the IC card 1 is constituted by a casing C in which a module Ca is embedded.
The IC card 1 is activated (becomes operable) when supplied with power from the IC card processing device 2 as a host device, and responds to a command from the IC card processing device 2. It is supposed to work.

上記CPU11は、全体的な管理や制御を司るものである。上記CPU11は、処理手段や判断手段として機能する。上記CPU11は、制御プログラム等に基づいて動作することにより種々の処理を行う。上記ROM12は、制御用プログラムや制御データなどが予め格納されている不揮発性メモリである。上記RAM13は、ワーキングメモリとして機能する揮発性のメモリである。   The CPU 11 is responsible for overall management and control. The CPU 11 functions as a processing unit and a determination unit. The CPU 11 performs various processes by operating based on a control program or the like. The ROM 12 is a non-volatile memory in which a control program and control data are stored in advance. The RAM 13 is a volatile memory that functions as a working memory.

上記通信ユニット14は、通信手段として機能し、上位装置としてのICカード処理装置2とのデータ通信を制御するものである。また、上記通信ユニット14は、上記ICカード1が動作するための電源を受給する手段としても機能する。上記コプロセッサ15は、暗号化あるいは復号化などの演算の補助を行うものである。上記不揮発性メモリ16は、各種データやアプリケーション(アプリケーションプログラム)などを記憶する書き換え可能な不揮発性メモリである。なお、上記不揮発性メモリ16に記憶されるデータの構造については、後で詳細に説明する。   The communication unit 14 functions as a communication unit and controls data communication with the IC card processing device 2 as a host device. The communication unit 14 also functions as a means for receiving power for operating the IC card 1. The coprocessor 15 assists operations such as encryption or decryption. The nonvolatile memory 16 is a rewritable nonvolatile memory that stores various data, applications (application programs), and the like. The structure of data stored in the nonvolatile memory 16 will be described in detail later.

また、上記通信ユニット14は、ICカード1の通信方式に応じた構成を有している。たとえば、上記ICカード1の通信方式が接触式の通信方式である場合、上記通信ユニット14は、上位装置としてのICカード処理装置2のコンタクト部と物理的に接触するためのコンタクト部などにより構成される。この場合、ICカード1は、ICカード処理装置2と物理的に接触している上記通信ユニット14によりICカード処理装置2からの電源を受給する。つまり、上記ICカード1が接触式ICカードである場合、上記ICカード1は、通信ユニット14としてのコンタクト部を介してICカード処理装置2からの動作電源および動作クロックの供給を受けて活性化される。   The communication unit 14 has a configuration corresponding to the communication method of the IC card 1. For example, when the communication method of the IC card 1 is a contact-type communication method, the communication unit 14 is configured by a contact portion for physically contacting the contact portion of the IC card processing device 2 as a host device. Is done. In this case, the IC card 1 receives power from the IC card processing device 2 through the communication unit 14 that is in physical contact with the IC card processing device 2. That is, when the IC card 1 is a contact IC card, the IC card 1 is activated by receiving the operation power and the operation clock from the IC card processing device 2 through the contact unit as the communication unit 14. Is done.

また、上記ICカード1の通信方式が非接触式(無線式)の通信方式である場合、上記通信ユニット14は、電波の送受信を行うアンテナおよび通信を制御する通信制御部等により構成される。この場合、上記ICカード1は、通信ユニット14により受信した電波から図示しない電源部により動作電源および動作クロックを生成するようになっている。つまり、上記ICカード2が非接触式ICカードである場合、上記ICカード2は、通信ユニット14としてのアンテナおよび通信制御部等を介してICカード処理装置2からの電波を受信し、その電波から図示しない電源部により動作電源および動作クロックを生成して活性化するようになっている。   When the communication method of the IC card 1 is a non-contact (wireless) communication method, the communication unit 14 includes an antenna that transmits and receives radio waves, a communication control unit that controls communication, and the like. In this case, the IC card 1 generates an operation power supply and an operation clock from a radio wave received by the communication unit 14 by a power supply unit (not shown). That is, when the IC card 2 is a non-contact IC card, the IC card 2 receives radio waves from the IC card processing device 2 via an antenna as a communication unit 14 and a communication control unit, and the radio waves Thus, an operation power supply and an operation clock are generated and activated by a power supply unit (not shown).

次に、上記不揮発性メモリ16に記憶されるデータの構成について説明する。
上記不揮発性メモリ16には、たとえば、ISO/IEC7816において定義されたファイル構造で各種のデータが記憶される。たとえば、上記不揮発性メモリ16には、複数階層構造(ツリー構造)で管理されるデータファイルとしてのファイル(EF:Elementary File)、および、データフォルダとしてのファイル(DF:Dedicated File)が記憶されている。
Next, the configuration of data stored in the nonvolatile memory 16 will be described.
Various types of data are stored in the nonvolatile memory 16 in a file structure defined in ISO / IEC7816, for example. For example, the nonvolatile memory 16 stores a file (EF: Elementary File) managed as a multi-level structure (tree structure) and a file (DF: Dedicated File) as a data folder. .

図2は、上記不揮発性メモリ16に記憶されているファイル構造の例を示す図である。
図2に示す例では、最上位がマスタファイルとしてのファイル(MF:Master File)21である。上記MF21の配下には、フォルダとしてのDF(アプリケーションA)22A、および、フォルダとしてのDF(2アプリケーションB)22Bが設けられている。さらに、上記DF(アプリケーションA)22Aの配下には、データの格納などに使用されるEF(ファイルA1)23A1およびEF(ファイルA2)23A2が設けられている構成になっている。さらに、上記DF(アプリケーションB)22Bの配下には、データの格納などに使用されるEF(ファイルB1)23B1が設けられている構成になっている。このようなファイル構造では、各種のデータは、データファイルとしてのEFに記憶される。
FIG. 2 is a diagram showing an example of the file structure stored in the nonvolatile memory 16.
In the example shown in FIG. 2, the highest level is a file (MF: Master File) 21 as a master file. Under the MF 21, a DF (application A) 22A as a folder and a DF (2 application B) 22B as a folder are provided. Further, under the DF (application A) 22A, an EF (file A1) 23A1 and an EF (file A2) 23A2 used for data storage and the like are provided. Further, an EF (file B1) 23B1 used for data storage and the like is provided under the DF (application B) 22B. In such a file structure, various data are stored in the EF as a data file.

次に、上記ICカード1におけるソフトウエア構成について説明する。
上記ICカード1では、上述したように、CPU11がROM12あるいは不揮発性メモリ16に記憶されているプログラムを実行することにより、種々の処理を実現している。すなわち、上記ICカード1では、CPU11が実行するソフトウエアによってROM12、RAM13、不揮発性メモリ16、UART14あるいはコプロセッサ15などを制御することにより種々の処理を実現している。
Next, the software configuration in the IC card 1 will be described.
In the IC card 1, various processes are realized by the CPU 11 executing programs stored in the ROM 12 or the nonvolatile memory 16 as described above. That is, in the IC card 1, various processes are realized by controlling the ROM 12, the RAM 13, the nonvolatile memory 16, the UART 14, the coprocessor 15 and the like by software executed by the CPU 11.

図3は、上記ICカード1におけるソフトウエア構成を模式的に示す図である。
上記ICカード1におけるソフトウエアは、ハードウエア(H/W)層31、OS(オペレーティングシステム)層32、および、アプリケーション層33から構成される。図3に示すように、上記ICカード1では、上記アプリケーション層33が最上位に位置し、上記OS層32が上記H/W層31の上位に位置するような構造となっている。
FIG. 3 is a diagram schematically showing a software configuration in the IC card 1.
The software in the IC card 1 includes a hardware (H / W) layer 31, an OS (operating system) layer 32, and an application layer 33. As shown in FIG. 3, the IC card 1 has a structure in which the application layer 33 is positioned at the top and the OS layer 32 is positioned above the H / W layer 31.

上記H/W層31は、上記CPU11、ROM12、RAM13、UART14、コプロセッサ15、不揮発性メモリ16などのハードウエアから構成される。上記H/W層31の各ハードウエアは、上記OS層32からの処理要求に応じて処理を実行したり、実行した処理の結果を上記OS層32に送ったりするものである。   The H / W layer 31 includes hardware such as the CPU 11, ROM 12, RAM 13, UART 14, coprocessor 15, and nonvolatile memory 16. Each hardware of the H / W layer 31 executes processing in response to a processing request from the OS layer 32, and sends the result of the executed processing to the OS layer 32.

上記OS層32は、当該ICカード1における基本的な制御を実行するためのプログラムとしてのカードOS(オペレーティングシステム)41を有する。なお、上記OS層32は、環境設定モジュール、アプリケーションインタフェース群などのモジュールなどを有するようにしても良い。上記カードOS41としてのソフトウエアは、当該ICカードの基本的な動作を司るプログラムであり、上記H/W層31の各ハードウエアを制御したり、各ハードウエアからの処理結果などの情報を受けて動作したりするプログラムである。上記カードOS41としてのソフトウエアは、ICカード内における不揮発性のメモリに予め記憶されているものであり、たとえば、上記ROM23などに記憶される。   The OS layer 32 has a card OS (operating system) 41 as a program for executing basic control in the IC card 1. The OS layer 32 may include modules such as an environment setting module and an application interface group. The software as the card OS 41 is a program for controlling the basic operation of the IC card, and controls each hardware of the H / W layer 31 and receives information such as processing results from each hardware. It is a program that operates. The software as the card OS 41 is stored in advance in a non-volatile memory in the IC card, and is stored in the ROM 23, for example.

また、上記カードOS41は、当該ICカード1の基本動作を実現するためのH/W層の各ハードウエアを制御する基本機能に加えて、ロジカルチャネル管理機能42を有している。ロジカルチャネルとは、上記不揮発性メモリ16内の各ファイルあるいは各アプリケーションに対してアクセスするための論理的なチャネルを管理するものである。たとえば、複数の通信方式で通信を行っている場合、各通信方式ごとにロジカルチャネルが割り当てられる。このようなロジカルチャネルによる制御を行うことにより、ICカード1では、各チャネルごとに複数系列のコマンド群を処理することができる。たとえば、アプリケーションAでは、第1のチャネルでコマンド処理を実行し、アプリケーションBでは、第2のチャネルでコマンド処理を実行するという処理が可能となっている。すなわち、上記ロジカルチャネル管理機能42は、チャネル管理テーブル42aを用いて各ロジカルチャネルの管理を行う機能である。チャネル管理テーブル42aの構成例については、後で詳細に説明するものとする。   The card OS 41 has a logical channel management function 42 in addition to a basic function for controlling each hardware of the H / W layer for realizing the basic operation of the IC card 1. The logical channel manages a logical channel for accessing each file or each application in the nonvolatile memory 16. For example, when communication is performed using a plurality of communication methods, a logical channel is assigned to each communication method. By performing control using such logical channels, the IC card 1 can process a plurality of command groups for each channel. For example, the application A can execute a command process on a first channel, and the application B can execute a command process on a second channel. That is, the logical channel management function 42 is a function for managing each logical channel using the channel management table 42a. A configuration example of the channel management table 42a will be described in detail later.

上記アプリケーション層33は、各種の処理を実現するためのプログラムとしての各種のアプリケーション(アプリケーションA、アプリケーションB、…)から構成される。上記各アプリケーションとしてのソフトウエアは、当該ICカード1の運用形態に応じた各種の処理を実現するためのプログラムおよびデータなどにより構成される。上記アプリケーションとしてのソフトウエアは、予めICカード1内の不揮発性のメモリ16に記憶されたり、適宜外部装置からダウンロードしてICカード1内の不揮発性メモリ16に記憶されたりするものである。
すなわち、上記H/W層31の各ハードウエアは、上記OS層32のカードOS41により制御される。上記OS層32のカードOS41は、上記アプリケーション層33の各アプリケーションから要求に応じて各ハードウエアの動作を制御する。また、上記H/W層31の各ハードウエアによる処理結果等は、上記OS層32のカードOS41を介してアプリケーションへ供給される。たとえば、外部装置からのコマンドは、上記H/W層31のハードウエアにより受信され、上記OS層32のカードOS41へ供給される。上記カードOS41では、上記H/W層31で受信したコマンドを選択的にアプリケーション層33における特定のアプリケーションへ供給する。
The application layer 33 includes various applications (application A, application B,...) As programs for realizing various processes. The software as each application includes a program and data for realizing various processes according to the operation mode of the IC card 1. The software as the application is stored in advance in the nonvolatile memory 16 in the IC card 1 or downloaded from an external device as appropriate and stored in the nonvolatile memory 16 in the IC card 1.
That is, each hardware of the H / W layer 31 is controlled by the card OS 41 of the OS layer 32. The card OS 41 in the OS layer 32 controls the operation of each hardware in response to a request from each application in the application layer 33. Further, the processing results by the hardware of the H / W layer 31 are supplied to the application via the card OS 41 of the OS layer 32. For example, a command from an external device is received by the hardware of the H / W layer 31 and supplied to the card OS 41 of the OS layer 32. The card OS 41 selectively supplies the command received by the H / W layer 31 to a specific application in the application layer 33.

たとえば、上記H/W層31で外部装置からアプリケーション選択コマンドを受信した場合、上記カードOS41は、上記アプリケーション層33から当該アプリケーション選択コマンドで指定されたアプリケーションをカレント状態とする。この状態において上記H/W層31で外部装置からコマンドを受信した場合、上記カードOS41は、当該コマンドをカレント状態のアプリケーションへ供給する。これにより、アプリケーション層33の各アプリケーションは、上記OS層32のカードOS41から供給されるコマンドに応じた処理を実行する。すなわち、上記カードOS41は、カレント状態のアプリケーション(以下、カレントアプリケーションとも称する)を指定し、カレントアプリケーションに対してコマンドを供給するようになっている。   For example, when the H / W layer 31 receives an application selection command from an external device, the card OS 41 sets the application specified by the application selection command from the application layer 33 in the current state. In this state, when the H / W layer 31 receives a command from an external device, the card OS 41 supplies the command to the application in the current state. Thereby, each application of the application layer 33 executes a process according to the command supplied from the card OS 41 of the OS layer 32. That is, the card OS 41 designates an application in a current state (hereinafter also referred to as a current application) and supplies a command to the current application.

次に、上記ロジカルチャネル管理機能42について説明する。
図4及び図5は、チャネル管理テーブル42aの構成例を示す図である。
すなわち、図4及び図5に示すように、チャネル管理テーブル42aは、各アプリケーションおよび各ファイルごとに各ロジカルチャネルのアクセス順番が格納されている。つまり、チャネル管理テーブル42aに格納されるアクセス順番は、各ファイルあるいは各アプリケーションをカレントに設定したロジカルチャネルの順番(つまり、各ファイルあるいは各アプリケーションにアクセスしたロジカルチャネルの順番)である。
Next, the logical channel management function 42 will be described.
4 and 5 are diagrams showing a configuration example of the channel management table 42a.
That is, as shown in FIGS. 4 and 5, the channel management table 42a stores the access order of each logical channel for each application and each file. That is, the access order stored in the channel management table 42a is the order of logical channels in which each file or each application is set as current (that is, the order of logical channels that have accessed each file or each application).

従って、図4に示すチャネル管理テーブル42aでは、アプリケーションAは、ロジカルチャネル「ch.1」、「ch.0」の順にカレント設定されたことを示している。また、図4に示すチャネル管理テーブル42aでは、ロジカルチャネル「ch.1」は、アプリケーションAとファイルA1とをそれぞれカレント設定していることを示している。また、図4に示すチャネル管理テーブル42aでは、アプリケーションBがロジカルチャネル「ch.2」でカレント設定されていることを示している。   Therefore, the channel management table 42a shown in FIG. 4 indicates that the application A is set in the current order of the logical channels “ch.1” and “ch.0”. Further, the channel management table 42a shown in FIG. 4 indicates that the logical channel “ch.1” is currently set to the application A and the file A1. Further, the channel management table 42a shown in FIG. 4 indicates that the application B is currently set in the logical channel “ch.2”.

たとえば、図4に示す状態において、ロジカルチャネル「ch.2」で、アプリケーションAのファイルA1を選択する処理(ロジカルチャネル「ch.2」でアプリケーションA及びファイルA1をカレント設定する処理)を実施したものとする。この場合、上記ロジカルチャネル管理機能42は、チャネル管理テーブル42aの状態を図5に示すような状態に遷移させる。   For example, in the state shown in FIG. 4, the process of selecting the file A1 of the application A on the logical channel “ch.2” (the process of setting the application A and the file A1 on the logical channel “ch.2”) is performed. Shall. In this case, the logical channel management function 42 changes the state of the channel management table 42a to the state shown in FIG.

すなわち、上記ロジカルチャネル管理機能42は、チャネル管理テーブル42aにおけるアプリケーションBに対するアクセス順番からロジカルチャネル「ch.2」を削除する。これと共に、上記ロジカルチャネル管理機能42は、チャネル管理テーブル42aにおけるアプリケーションA及びファイルA1に対するアクセス順番の最後尾にそれぞれロジカルチャネル「ch.2」を追加する。これにより、チャネル管理テーブル42aは、図5に示すような状態となり、アプリケーションA及びファイルA1を最後にカレントに設定したロジカルチャネルが「ch.2」であることを示す状態となる。図5に示すようなチャネル管理テーブル42aによれば、ロジカルチャネル「ch.2」でファイルA1にアクセスしたい場合、ロジカルチャネル「ch.2」のアクセス順番は、ロジカルチャネル「ch.1」の次であることが判別できる。   That is, the logical channel management function 42 deletes the logical channel “ch.2” from the access order for the application B in the channel management table 42a. At the same time, the logical channel management function 42 adds the logical channel “ch.2” to the tail of the access order for the application A and the file A1 in the channel management table 42a. As a result, the channel management table 42a is in a state as shown in FIG. 5, and is in a state indicating that the logical channel in which the application A and the file A1 are last set to current is “ch.2”. According to the channel management table 42a as shown in FIG. 5, when accessing the file A1 with the logical channel “ch.2”, the access order of the logical channel “ch.2” is next to the logical channel “ch.1”. Can be determined.

上記カードOS41のロジカルチャネル管理機能42では、上記のようなチャネル管理テーブル42aによって、各アプリケーションに処理を実施しているチャネル番号を通知したり、各ファイルあるいは各アプリケーションに対する各ロジカルチャネルの優先権(アクセス順序)を通知したりする。これにより、コマンドを受けた各アプリケーションでは、カードOS41から提供される優先権を示す情報に基づいて、当該コマンドに対する処理内容を決定することが可能となる。   In the logical channel management function 42 of the card OS 41, the channel management table 42a as described above notifies each application of the channel number being processed, and the priority of each logical channel for each file or each application ( Access order). Thereby, each application that receives the command can determine the processing content for the command based on the information indicating the priority provided from the card OS 41.

各アプリケーションでは、カードOS41を介してICカード処理装置2からのコマンドが与えられる。この場合、アプリケーションは、自身のロジカルチャネルの優先順位に基づいて受信したコマンドに対する処理を実行するか否かを判断する。さらに、各アプリケーションでは、自身のロジカルチャネルの優先順位と受信したコマンドの種類とに基づいて、当該コマンドに対する処理を実行するか否かを判断するようにしても良い。言い換えると、受信したコマンドを実行するか否かを判断するか否かは、各アプリケーションがカードOS41から提供されるロジカルチャネルのアクセス順序(優先権)を示す情報により決定するようになっている。   In each application, a command from the IC card processing apparatus 2 is given via the card OS 41. In this case, the application determines whether or not to execute processing for the received command based on the priority of its own logical channel. Furthermore, each application may determine whether or not to execute processing for the command based on the priority of its own logical channel and the type of the received command. In other words, whether or not to execute the received command is determined by information indicating the logical channel access order (priority) provided by each application from the card OS 41.

たとえば、コマンドを受信したアプリケーションでは、自身のロジカルチャネルの優先順位が最上位である場合、全てのコマンドに対する処理を実行可を判断するようにする。また、コマンドを受信したアプリケーションでは、自身のロジカルチャネルの優先順位が最上位でない場合、受信したコマンドがファイルの状態を変更するコマンド(たとえば、書換えあるいは削除などのコマンド)に対する処理を実行不可と判断し、受信したコマンドがファイルの状態を変更しないコマンド(たとえば、読出しなどのコマンド)に対する処理を実行可と判断するようにする。   For example, in the application that has received the command, if the priority of its own logical channel is the highest, it is determined whether or not processing for all commands can be executed. Also, in the application that received the command, if the priority of its own logical channel is not the highest priority, it is determined that the received command cannot execute processing for a command that changes the file status (for example, a command for rewriting or deleting). Then, it is determined that the received command can execute a process for a command that does not change the file status (for example, a command such as a read command).

上記のように、受信したコマンドに対する処理内容(実行の可否)は、アプリケーションが決定ようにすることができる。従って、各アプリケーションにより実現される処理は、上述した例にかかわずに、以下のような種々の形態が可能である。
たとえば、特定のアプリケーション(最優先とするアプリケーション)は、ロジカルチャネルの優先順位によらずに、常に全てのコマンドに対する処理を実行するようにしても良い。また、受信したコマンドの種類によらずに、最上位のロジカルチャネルでなければ、全てのコマンドに対する処理を実行しないようにしても良い。さらには、たとえば、履歴情報をレコード単位で順次格納する特定のファイルについては、ロジカルチャネルの優先順位によらずに、書込み処理を許可するようにしても良い。
上記のように、本ICカード1では、アプリケーションごとに、別のロジカルチャネルとカレント設定が競合する場合のコマンドに対する処理内容に自由に設計でき、運用形態などに応じた自由度の高いシステムを実現できる。
As described above, the processing content (executability) of the received command can be determined by the application. Accordingly, the processing realized by each application can take the following various forms regardless of the above-described example.
For example, a specific application (the application with the highest priority) may always execute processing for all commands regardless of the priority order of the logical channels. In addition, regardless of the type of received command, if it is not the highest logical channel, processing for all commands may not be executed. Furthermore, for example, a specific file that sequentially stores history information in record units may be allowed to be written regardless of the priority of the logical channel.
As described above, this IC card 1 can freely design the processing contents for commands when the current setting conflicts with another logical channel for each application, and realizes a system with a high degree of freedom according to the operation mode it can.

次に、ICカード処理装置2からのコマンドに対する処理について説明する。
図6は、ICカード処理装置2からのコマンドに対する処理例を説明するためのフローチャートである。なお、カードOS41および各アプリケーションの動作は、CPU11により実現されるものであるが、以下の処理例では、カードOS41の動作と各アプリケーション22(22A、22B、…)の動作とに分けて説明するものとする。
まず、ICカード処理装置2からのコマンドをUART14により受信すると(ステップS10)、CPU11により実行されるカードOS41は、受信したコマンドをアプリケーション(ここではアプリケーション22Aとする)に通知する(ステップS11)。
Next, processing for commands from the IC card processing apparatus 2 will be described.
FIG. 6 is a flowchart for explaining a processing example for a command from the IC card processing apparatus 2. The operation of the card OS 41 and each application is realized by the CPU 11. However, in the following processing example, the operation of the card OS 41 and the operation of each application 22 (22A, 22B,...) Will be described separately. Shall.
First, when a command from the IC card processing device 2 is received by the UART 14 (step S10), the card OS 41 executed by the CPU 11 notifies the received command to the application (here, the application 22A) (step S11).

上記カードOS41からコマンドを取得すると(ステップS12)、上記アプリケーション22Aは、自身のロジカルチャネルをカードOS41に対して問合せる(ステップS13)。
この問合せに対して、カードOS41は、ロジカルチャネル管理機能42によりチャネル管理テーブル42aを参照し、当該アプリケーション22Aのロジカルチャネルを判別する(ステップS14)。上記アプリケーション22Aのロジカルチャネルを判別すると、カードOS41は、上記アプリケーション22Aに対してロジカルチャネルを示す情報を通知する(ステップS15)。
これにより、上記アプリケーション22Aは、自身のロジカルチャネルを確認する。なお、コマンドを受信したアプリケーションが自身に割り当てられたロジカルチャネルを確認する方法としては、上記ステップS13〜S16の処理に限らず、受信したコマンドのCLASSバイトから直接確認する方法、あるいは、カード仕様によって予め用意されてる専用のAPIにより取得する方法なども適用可能である。
When a command is acquired from the card OS 41 (step S12), the application 22A inquires of the card OS 41 about its own logical channel (step S13).
In response to this inquiry, the card OS 41 refers to the channel management table 42a by the logical channel management function 42, and determines the logical channel of the application 22A (step S14). When determining the logical channel of the application 22A, the card OS 41 notifies the application 22A of information indicating the logical channel (step S15).
Thereby, the application 22A confirms its own logical channel. Note that the method for confirming the logical channel assigned to the application that has received the command is not limited to the processing in steps S13 to S16, but may be a method for confirming directly from the CLASS byte of the received command, or depending on the card specifications. A method of acquiring with a dedicated API prepared in advance is also applicable.

上記カードOS41から自身のロジカルチャネルを示す情報を取得すると、上記アプリケーション22Aは、当該コマンドにおいてアクセス対象となるファイルを判別し、アクセス対象となるファイルの各ロジカルチャネルによるアクセス状況をカードOS41に問い合わせる(ステップS21)。
この問合せに対して、カードOS41は、上記ロジカルチャネル管理機能42によりチャネル管理テーブル42aを参照して、アクセス対象とするファイルに対する各ロジカルチャネルのアクセス順番(優先順位)を判定する(ステップS22)。上記アクセス対象のファイルに対する各ロジカルチャネルのアクセス順番を判別すると、カードOS41は、上記アプリケーション22Aに対して当該ファイルに対する各ロジカルチャネルのアクセス順番を示す情報を通知する(ステップS23)。
When acquiring information indicating its own logical channel from the card OS 41, the application 22A determines the file to be accessed in the command, and inquires the card OS 41 about the access status of each file to be accessed by each logical channel ( Step S21).
In response to this inquiry, the card OS 41 refers to the channel management table 42a by the logical channel management function 42 and determines the access order (priority order) of each logical channel for the file to be accessed (step S22). When the access order of each logical channel for the access target file is determined, the card OS 41 notifies the application 22A of information indicating the access order of each logical channel for the file (step S23).

上記アクセス対象とするファイルに対する各ロジカルチャネルのアクセス順番を示す情報を取得すると(ステップS24)、アプリケーション22Aは、当該コマンドに対する処理を実行するか否かを判定する処理を行う(ステップS25〜S26)。すなわち、アプリケーション22Aは、当該コマンドがアクセス対象とするファイルにアクセスしている(当該ファイルをカレントに設定している)別のロジカルチャネルが存在するか否かを判断する(ステップS25)。   When information indicating the access order of each logical channel for the file to be accessed is acquired (step S24), the application 22A performs a process of determining whether or not to execute the process for the command (steps S25 to S26). . That is, the application 22A determines whether there is another logical channel that is accessing the file to be accessed by the command (sets the file to be current) (step S25).

別のロジカルチャネルで当該ファイルへのアクセスが無いと判断した場合(ステップS25、NO)、上記アプリケーション22Aは、当該コマンドに対する処理を実行し(ステップS28)、その処理結果をカードOS41へ通知する(ステップS29)。なお、上記ステップS28のコマンドに対する処理では、アプリケーション22Aは、カードOS41と共同して当該ファイルが格納されているメモリへのアクセスなどを実現するようになっている。   When it is determined that there is no access to the file on another logical channel (step S25, NO), the application 22A executes processing for the command (step S28) and notifies the card OS 41 of the processing result (step S28). Step S29). In the process for the command in step S28, the application 22A realizes access to the memory storing the file in cooperation with the card OS 41.

また、別のロジカルチャネルで当該ファイルへのアクセスが有ると判断した場合(ステップS25、NO)、上記アプリケーション22Aは、カードOS41から取得した各ロジカルチャネルのアクセス順番を示す情報に基づいて、自身のロジカルチャネルに当該ファイルに対する優先権があるか否かを判断する(ステップS26)。たとえば、上記アプリケーション22Aは、カードOS41から取得した各ロジカルチャネルのアクセス順番において、自身のロジカルチャネルが最上位であるか否かにより、当該ファイルに対する優先権があるか否かを判断する。   When it is determined that there is access to the file on another logical channel (step S25, NO), the application 22A determines its own access based on the information indicating the access order of each logical channel acquired from the card OS 41. It is determined whether or not the logical channel has priority for the file (step S26). For example, the application 22A determines whether or not there is a priority for the file based on whether or not its own logical channel is the highest in the access order of each logical channel acquired from the card OS 41.

上記判断により自身のロジカルチャネルに優先権があると判断した場合(ステップS26、YES)、上記アプリケーション22Aは、当該コマンドに対する処理を実行し(ステップS28)、その処理結果をカードOS41へ通知する(ステップS29)。   If it is determined that the logical channel has priority from the above determination (step S26, YES), the application 22A executes processing for the command (step S28) and notifies the card OS 41 of the processing result (step S28). Step S29).

また、上記判断により自身のロジカルチャネルに優先権がないと判断した場合(ステップS26、NO)、上記アプリケーション22Aは、当該コマンドの種類が実行可能なコマンドであるか否かを判断する(ステップS27)。上記ステップS27の処理は、各アプリケーションごとの設定に応じて判断されるものである。たとえば、ライト系のコマンドを実行不可とし、リード系のコマンドを実行可能となるような形態が可能である。また、全コマンドを実行不可としたり、全コマンドを実行可としたりする形態も可能である。さらには、アクセス対象となるファイルのタイプによって、実行の可否を判定するような形態も可能である。   If it is determined that the logical channel has no priority (NO in step S26), the application 22A determines whether the command type is an executable command (step S27). ). The process of step S27 is determined according to the setting for each application. For example, a configuration in which a write command cannot be executed and a read command can be executed is possible. Also, it is possible to make all commands unexecutable or make all commands executable. Furthermore, it is also possible to determine whether execution is possible depending on the type of file to be accessed.

たとえば、アプリケーション22Aでは、書換えなどのファイルの状態を書き換えてしまうようなコマンドを実行不可とし、それ以外のコマンドを実行可と設定されているものとする。このような場合、上記アプリケーション22Aは、受信したコマンドが書換えコマンドであれば、当該コマンドの処理を実行不可を判断する。また、受信したコマンドが読出しコマンドであれば、上記アプリケーション22Aは、当該コマンドの処理を実行可と判断する。   For example, in the application 22A, it is assumed that a command that rewrites the state of a file such as rewriting is not executable, and other commands are set to be executable. In such a case, if the received command is a rewrite command, the application 22A determines that the command cannot be processed. If the received command is a read command, the application 22A determines that the command can be processed.

上記判断により受信したコマンドの処理を実行可と判断した場合(ステップS27、YES)、上記アプリケーション22Aは、当該コマンドに対する処理を実行し(ステップS28)、その処理結果をカードOS41へ通知する(ステップS29)。また、上記判断により受信したコマンドの処理を実行不可と判断した場合(ステップS27、NO)、上記アプリケーション22Aは、当該コマンドに対する処理を実行不可(中断)し、当該コマンドに対する処理を中断した旨を処理結果としてカードOS41へ通知する(ステップS29)。   When it is determined that the process of the received command is executable by the above determination (step S27, YES), the application 22A executes the process for the command (step S28) and notifies the card OS 41 of the processing result (step S28). S29). If it is determined that the received command cannot be processed (NO in step S27), the application 22A cannot execute (interrupt) the process for the command, and interrupts the process for the command. The card OS 41 is notified as a processing result (step S29).

上記アプリケーション22Aから受信したコマンドに対する処理を取得すると(ステップS30)、カードOS41は、上記アプリケーション22Aから通知された処理結果を受信したコマンドに対するレスポンスデータとしてICカード処理装置2へ送信する(ステップS31)
上記のように、本ICカード1のカードOS41では、各ファイルに対してカレント設定しているチャネルとそれらのチャネルのアクセス順番とを管理しておき、アプリケーションが、受信したコマンドに応じてアクセスしようとするファイルについて、「既に他のチャネルが対象のファイルをカレント設定しているか」、「アクセスする優先権(アクセスした順番)はどのチャネルにあるか」をカードOS41から提供される情報により確認することにより、複数のチャネルでのカレント設定に応じたアクセス制御を行うようにしたものである。
When processing for the command received from the application 22A is acquired (step S30), the card OS 41 transmits the processing result notified from the application 22A to the IC card processing device 2 as response data for the received command (step S31).
As described above, the card OS 41 of the IC card 1 manages the channels currently set for each file and the access order of those channels, and the application tries to access according to the received command. For the file to be confirmed, “whether another channel has already set the target file as current” or “which channel has the priority to access (accessed order)” is confirmed by information provided from the card OS 41 Thus, access control according to the current setting in a plurality of channels is performed.

上記のような処理により、あるアプリケーションのコマンド処理において、アクセスするファイルが他のチャネルで既にカレント設定されていなかをカードOS41が確認することができ、複数のチャネルでカレント設定されているファイルに対する処理を確実に管理することができる。   With the processing as described above, the card OS 41 can confirm whether a file to be accessed is already set in another channel in command processing of a certain application, and processing for a file that is currently set in a plurality of channels. Can be managed reliably.

次に、2つの具体例について説明する。
まず、第1の具体例として、優先権がない場合(アクセス順番が最上位でいない場合)に、書換えを不可とするように設計されたアプリケーションによる書換えコマンドに対する処理例について説明する。また、ここでは、各ロジカルチャネルが図5に示すような状態となっている場合を想定するものとする。
Next, two specific examples will be described.
First, as a first specific example, a processing example for a rewrite command by an application designed so that rewriting is disabled when there is no priority (when the access order is not the highest) will be described. Here, it is assumed that each logical channel is in a state as shown in FIG.

このような状態において、「ch.2」でアプリケーションAのファイルA1のデータを書き換えるコマンドを受信したものとする。すると、アプリケーションAは、カードOS41から自身のロジカルチャネル番号を取得する。続いて、アプリケーションAは、カードOSからアクセス対象のファイルであるファイルA1に対する各ロジカルチャネルのアクセス状況を示す情報(各ロジカルチャネルのアクセス順番)を取得する。   In such a state, it is assumed that a command for rewriting the data of the file A1 of the application A is received by “ch.2”. Then, the application A acquires its own logical channel number from the card OS 41. Subsequently, the application A acquires information (access order of each logical channel) indicating the access status of each logical channel with respect to the file A1, which is a file to be accessed, from the card OS.

ここで、図5に示す例では、チャネル「ch.1」が既にカレント設定済みで、アクセス順番が「ch.1」、「ch.2」である旨の情報を取得する。このような情報により、アプリケーションAは、アクセス順が先の「ch.1」に優先権があると判定する。従って、「ch.2」のアプリケーションAは、ファイルA1に対する書換え処理については、優先権が無いため(「ch.1」に優先権があるため)、書換え処理を実行せずに、コマンド処理を終了する。   In the example illustrated in FIG. 5, information indicating that the channel “ch.1” has already been set and the access order is “ch.1” and “ch.2” is acquired. Based on such information, the application A determines that “ch. Therefore, the application A of “ch.2” has no priority for the rewriting process for the file A1 (because “ch.1” has the priority), so the command process is executed without executing the rewriting process. finish.

次に、第2の具体例として、優先権がない場合(アクセス順番が最上位でいない場合)にであっても、ファイルの状態を変更させない読出し処理は実行を許可とするように設計されたアプリケーションによる読出しコマンドに対する処理例について説明する。また、ここでは、各ロジカルチャネルが図5に示すような状態となっている場合を想定するものとする。   Next, as a second specific example, it is designed to permit execution of read processing that does not change the file state even when there is no priority (when the access order is not the highest). A processing example for a read command by the application will be described. Here, it is assumed that each logical channel is in a state as shown in FIG.

このような状態において、「ch.2」でアプリケーションAのファイルA1のデータを読出しコマンドを受信したものとする。すると、アプリケーションAは、カードOS41から自身のロジカルチャネル番号を取得する。続いて、アプリケーションAは、カードOS41からアクセス対象のファイルであるファイルA1に対する各ロジカルチャネルのアクセス状況を示す情報(各ロジカルチャネルのアクセス順番)を取得する。   In such a state, it is assumed that the command for reading the data of the file A1 of the application A is received by “ch.2”. Then, the application A acquires its own logical channel number from the card OS 41. Subsequently, the application A acquires information (access order of each logical channel) indicating the access status of each logical channel with respect to the file A1, which is a file to be accessed, from the card OS 41.

ここで、図5に示す例では、チャネル「ch.1」が既にカレント設定済みで、アクセス順番が「ch.1」、「ch.2」である旨の情報を取得する。このような情報により、アプリケーションAは、アクセス順が先の「ch.1」に優先権があると判定する。ここで、「ch.2」のアプリケーションAは、ファイルA1に対する優先権は無いが、当該読出しコマンドの処理が、ファイルA1の状態を変更させない(つまり、「ch.1」での処理に影響を与えない)ものと判断し、当該読出しコマンドに応じたファイルA1の読出し処理を実行する。   In the example illustrated in FIG. 5, information indicating that the channel “ch.1” has already been set and the access order is “ch.1” and “ch.2” is acquired. Based on such information, the application A determines that “ch. Here, the application A of “ch.2” has no priority over the file A1, but the processing of the read command does not change the state of the file A1 (that is, it affects the processing of “ch.1”). The file A1 is read according to the read command.

上記のように、本実施の形態のICカードでは、オペレーティングシステムが、不揮発性メモリに記憶されている各ファイルに対してアクセス中のチャネルを示す情報をチャネル管理テーブルにより管理し、前記チャネル管理テーブルで管理されている情報を参照することにより受信したコマンドがアクセス対象とするファイルにアクセス中のロジカルチャネルを示す情報を当該コマンドを処理するアプリケーションに提供し、前記アプリケーションが前記オペレーティングシステムから提供された情報に基づいて前記コマンドに対する処理の実行の可否を判定するようにしたものである。   As described above, in the IC card according to the present embodiment, the operating system manages information indicating the channel being accessed for each file stored in the nonvolatile memory by the channel management table, and the channel management table The information received by referring to the information managed in the command is provided to the application that processes the command, and the application is provided from the operating system. Whether to execute the process for the command is determined based on the information.

すなわち、この発明の一形態としての携帯可能電子装置は、外部装置から与えられるコマンドに対する処理を行うものであって、複数のチャネルで外部装置との通信を行う通信手段と、複数のファイルを記憶する記憶手段と、前記記憶手段に記憶している各ファイルに対してアクセス中のチャネルを示す情報を管理する管理手段と、前記管理手段に管理されている情報を参照することにより、前記通信手段により受信したコマンドがアクセス対象とするファイルにアクセス中のチャネルを示す情報を当該コマンドを処理するアプリケーションに提供する提供手段と、前記アプリケーションが前記提供手段により提供された情報と自身に割り当てられているチャネルとに基づいて前記コマンドの処理を実行するか否かを判定する判定手段と、前記アプリケーションが前記コマンドの処理を実行しないと判定した場合、前記コマンドに対する処理を中断する中断手段と、前記アプリケーションが前記コマンドの処理を実行すると判定した場合、前記コマンドに対する処理を実行する実行手段とを有する。   That is, a portable electronic device as one aspect of the present invention performs processing for a command given from an external device, and stores communication means for communicating with the external device through a plurality of channels and a plurality of files. Storage means, management means for managing information indicating a channel being accessed for each file stored in the storage means, and the communication means by referring to the information managed by the management means Providing means for providing information indicating a channel that is being accessed to a file to be accessed by the command received to the application that processes the command, and the application is assigned to the information provided by the providing means and to itself Determining means for determining whether to execute the processing of the command based on the channel; When it is determined that the application does not execute the process of the command, an interruption unit that interrupts the process for the command; and when the application determines that the process of the command is executed, an execution unit that executes the process for the command Have.

上記のような携帯可能電子装置としてのICカードによれば、複数チャネルでのアクセス制御を実現でき、別のロジカルチャネルとカレント設定(アクセス中のファイル)が競合する場合のコマンドに対する処理内容をアプリケーションごとに運用形態などに応じて設計できる。   According to the IC card as a portable electronic device as described above, access control in multiple channels can be realized, and the processing contents for the command when another logical channel and the current setting (file being accessed) compete with the application Each can be designed according to the operation mode.

この発明の実施の形態に係る携帯可能電子装置としてのICカードのハードウエア構成を概略的に示すブロック図。1 is a block diagram schematically showing a hardware configuration of an IC card as a portable electronic device according to an embodiment of the present invention. 不揮発性メモリに記憶されるデータのファイル構成例を示す図。The figure which shows the file structural example of the data memorize | stored in a non-volatile memory. ICカードにおけるソフトウエア構成を説明するための模式図。The schematic diagram for demonstrating the software structure in an IC card. チャネルのアクセス順序を管理するためのチャネル管理テーブルの構成例を示す図。The figure which shows the structural example of the channel management table for managing the access order of a channel. チャネルのアクセス順序を管理するためのチャネル管理テーブルの構成例を示す図。The figure which shows the structural example of the channel management table for managing the access order of a channel. ICカードにおけるコマンドに対する処理例を説明するためのフローチャート。The flowchart for demonstrating the process example with respect to the command in an IC card.

符号の説明Explanation of symbols

1…ICカード、2…ICカード処理装置、11…CPU、12…ROM、13…RAM、14…通信ユニット(UART)、15…コプロセッサ、16…不揮発性メモリ、Ca…モジュール、C…本体、31…ハードウエア層、32…OS層、33…アプリケーション層、41…カードOS、42…ロジカルチャネル管理機能、42a…チャネル管理テーブル。   DESCRIPTION OF SYMBOLS 1 ... IC card, 2 ... IC card processing apparatus, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Communication unit (UART), 15 ... Coprocessor, 16 ... Non-volatile memory, Ca ... Module, C ... Main body 31 ... Hardware layer, 32 ... OS layer, 33 ... Application layer, 41 ... Card OS, 42 ... Logical channel management function, 42a ... Channel management table.

Claims (5)

オペレーティングシステムプログラムを記憶する第1の記憶手段と、
アプリケーションプログラムを記憶する第2の記憶手段と、
前記第2の記憶手段に記憶されているアプリケーションプログラムで用いられるデータを記憶している第3の記憶手段と、
前記第1の記憶手段に記憶されているオペレーティングシステムプログラムおよび前記第2の記憶手段に記憶されているアプリケーションプログラムを実行する制御手段と、を有する携帯可能電子装置であって、
前記オペレーティングシステムプログラムは、
前記第3の記憶手段に記憶している各ファイルに対してアクセス中のチャネルを示す情報を管理する管理機能と、
前記管理機能に管理されている情報を参照することにより、特定のファイルにアクセスしようとするアプリケーションに、前記ファイルにアクセス中のチャネルを示す情報を提供する提供機能とを有し、
前記アプリケーションプログラムは、
前記オペレーティングシステムから提供された情報と自身に割り当てられているチャネルとに基づいて前記ファイルへのアクセスの可否を判定する判定機能と、
この判定機能により前記ファイルへのアクセスが不可であると判定した場合、前記ファイルへのアクセスを中断する中断機能と、
前記判定機能により前記ファイルへのアクセスを許可すると判定した場合、前記ファイルへのアクセスを実行する実行機能と、を有する、
ことを特徴とする携帯可能電子装置。
First storage means for storing an operating system program;
Second storage means for storing an application program;
Third storage means for storing data used in the application program stored in the second storage means;
A portable electronic device comprising: an operating system program stored in the first storage means; and a control means for executing an application program stored in the second storage means,
The operating system program is
A management function for managing information indicating a channel being accessed for each file stored in the third storage unit;
A function for providing information indicating a channel that is accessing the file to an application that attempts to access the specific file by referring to the information managed by the management function;
The application program is
A determination function for determining whether or not the file can be accessed based on information provided from the operating system and a channel assigned to the operating system;
When it is determined that access to the file is impossible by this determination function, an interruption function for interrupting access to the file;
An execution function for executing access to the file when it is determined that access to the file is permitted by the determination function;
A portable electronic device characterized by that.
前記管理機能は、前記第2の記憶手段に記憶している各ファイルに対してアクセス中のチャネルとそれらのファイルの各ファイルへのアクセス順番とを示す情報を管理し、
前記提供機能は、前記管理機能に管理されている情報を参照することにより、前記アクセス対象とするファイルにアクセス中のチャネルとそれらのチャネルごとのアクセス順番とを示す情報を前記コマンドを処理するアプリケーションに提供する、
ことを特徴とする前記請求項1に記載の携帯可能電子装置。
The management function manages information indicating a channel being accessed for each file stored in the second storage unit and an access order of the files to the files,
The providing function is an application that processes the command with information indicating the channel being accessed to the file to be accessed and the access order for each channel by referring to the information managed by the management function To provide,
The portable electronic device according to claim 1, wherein the portable electronic device is a portable electronic device.
前記判定機能は、前記アクセス対象とするファイルに対するアクセス順番の先頭が当該アプリケーションに割り当てられているチャネルであれば、前記ファイルに対するアクセスを許可と判定する、
ことを特徴とする前記請求項1又は2に記載の携帯可能電子装置。
The determination function determines that access to the file is permitted if the head of the access order for the file to be accessed is a channel assigned to the application.
The portable electronic device according to claim 1, wherein the portable electronic device is a portable electronic device.
前記判定機能は、前記アクセス対象とするファイルの状態を変更する処理である場合、前記アクセス対象とするファイルに対して既にアクセス中の別のチャネルがあれば、前記ファイルへのアクセスを不可と判定する、
ことを特徴とする前記請求項1乃至3の何れか1項に記載の携帯可能電子装置。
When the determination function is a process of changing the state of the file to be accessed, if there is another channel that is already being accessed for the file to be accessed, it is determined that access to the file is impossible To
The portable electronic device according to any one of claims 1 to 3, wherein the portable electronic device is any one of the above.
前記判定機能は、前記アクセス対象とするファイルの状態を変更させない処理である場合、前記アクセス対象とするファイルにアクセス中のチャネルの有無にかかわらず、前記ファイルへのアクセスを許可と判定する、
ことを特徴とする前記請求項1乃至4の何れか1項に記載の携帯可能電子装置。
When the determination function is a process that does not change the state of the file to be accessed, it is determined that access to the file is permitted regardless of the presence or absence of a channel that is accessing the file to be accessed.
The portable electronic device according to any one of claims 1 to 4, wherein the portable electronic device is any one of the above.
JP2007243257A 2007-09-20 2007-09-20 Portable electronic device Expired - Fee Related JP4896842B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2007243257A JP4896842B2 (en) 2007-09-20 2007-09-20 Portable electronic device
SG200806667-2A SG151197A1 (en) 2007-09-20 2008-09-03 Portable electronic apparatus and control method for portable electronic apparatus
US12/205,235 US20090083273A1 (en) 2007-09-20 2008-09-05 Portable electronic apparatus and control method for portable electronic apparatus
FR0856176A FR2923630B1 (en) 2007-09-20 2008-09-15 PORTABLE ELECTRONIC DEVICE AND METHOD FOR CONTROLLING A PORTABLE ELECTRONIC DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007243257A JP4896842B2 (en) 2007-09-20 2007-09-20 Portable electronic device

Publications (2)

Publication Number Publication Date
JP2009075797A true JP2009075797A (en) 2009-04-09
JP4896842B2 JP4896842B2 (en) 2012-03-14

Family

ID=40610711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007243257A Expired - Fee Related JP4896842B2 (en) 2007-09-20 2007-09-20 Portable electronic device

Country Status (1)

Country Link
JP (1) JP4896842B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010146410A (en) * 2008-12-19 2010-07-01 Toshiba Corp Portable electronic device
EP2228734A1 (en) * 2009-03-10 2010-09-15 Kabushiki Kaisha Toshiba Portable electronic device and access control method in portable electronic device
JP2013025407A (en) * 2011-07-15 2013-02-04 Toshiba Corp Ic card, ic card processor, and ic card processing system
JP2013196346A (en) * 2012-03-19 2013-09-30 Toshiba Corp Ic card, portable electronic device, and command processing method for ic card
JP2015130001A (en) * 2014-01-06 2015-07-16 凸版印刷株式会社 Portable electronic medium, and input/output control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005196730A (en) * 2003-12-10 2005-07-21 Toshiba Corp Portable electronic device
JP2007206895A (en) * 2006-01-31 2007-08-16 Dainippon Printing Co Ltd Ic card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005196730A (en) * 2003-12-10 2005-07-21 Toshiba Corp Portable electronic device
JP2007206895A (en) * 2006-01-31 2007-08-16 Dainippon Printing Co Ltd Ic card

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010146410A (en) * 2008-12-19 2010-07-01 Toshiba Corp Portable electronic device
EP2228734A1 (en) * 2009-03-10 2010-09-15 Kabushiki Kaisha Toshiba Portable electronic device and access control method in portable electronic device
JP2013025407A (en) * 2011-07-15 2013-02-04 Toshiba Corp Ic card, ic card processor, and ic card processing system
JP2013196346A (en) * 2012-03-19 2013-09-30 Toshiba Corp Ic card, portable electronic device, and command processing method for ic card
US9672390B2 (en) 2012-03-19 2017-06-06 Kabushiki Kaisha Toshiba IC card and command processing method for IC card
JP2015130001A (en) * 2014-01-06 2015-07-16 凸版印刷株式会社 Portable electronic medium, and input/output control method

Also Published As

Publication number Publication date
JP4896842B2 (en) 2012-03-14

Similar Documents

Publication Publication Date Title
JP4896837B2 (en) Portable electronic device and method for controlling portable electronic device
JP5225054B2 (en) IC card
JP4896842B2 (en) Portable electronic device
KR101783526B1 (en) Ic card, electronic device and portable electronic device
KR100399603B1 (en) Smart card and method for writing/erasing and operating an os program the same
JP2008123203A (en) Portable electronic device and method for controlling portable electronic device
KR101530479B1 (en) Ic card and portable electronic device
JP2007087120A (en) Ic card mounted with multiple os (operating system) and issue consignment method
JP2006293706A (en) Multi-application ic card with application updating function
JP5214291B2 (en) IC card and IC card control method
JP2010211516A (en) Portable electronic device and access control method in the same
JP5957347B2 (en) IC card and portable electronic device
JP4784138B2 (en) IC card and IC card program
JP2006338311A (en) Computer system for processing device loaded with multiple applications, device and computer program
US20090083273A1 (en) Portable electronic apparatus and control method for portable electronic apparatus
JP7322923B2 (en) Secure element, transaction control method and device
JP5341947B2 (en) IC card, control method of IC card, and control method of portable electronic device
JP2012133656A (en) Portable electronic apparatus and ic card
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
JP2006172271A (en) Multi-application ic card, and program for ic card
JP4734838B2 (en) Information recording medium, program, and command execution control method
JP2008152411A (en) Information processor, information processing method and program
JP5492172B2 (en) Portable electronic device, IC card and IC module
JP5242091B2 (en) Portable electronic device, IC card, and portable electronic device control method
JP5038918B2 (en) Portable electronic device and method for controlling portable electronic device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100226

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111031

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111129

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111221

R151 Written notification of patent or utility model registration

Ref document number: 4896842

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20150106

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees