[go: up one dir, main page]

JP4742469B2 - IC card, IC card processing apparatus and processing method using a plurality of OSs - Google Patents

IC card, IC card processing apparatus and processing method using a plurality of OSs Download PDF

Info

Publication number
JP4742469B2
JP4742469B2 JP2001266292A JP2001266292A JP4742469B2 JP 4742469 B2 JP4742469 B2 JP 4742469B2 JP 2001266292 A JP2001266292 A JP 2001266292A JP 2001266292 A JP2001266292 A JP 2001266292A JP 4742469 B2 JP4742469 B2 JP 4742469B2
Authority
JP
Japan
Prior art keywords
card
command
external device
application
loader
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001266292A
Other languages
Japanese (ja)
Other versions
JP2003076954A (en
Inventor
祐一 中込
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2001266292A priority Critical patent/JP4742469B2/en
Publication of JP2003076954A publication Critical patent/JP2003076954A/en
Application granted granted Critical
Publication of JP4742469B2 publication Critical patent/JP4742469B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は複数のOSを搭載したICカード、それを用いるICカード処理装置および処理方法に関する。
【0002】
【従来の技術】
集積回路技術などの進展につれて、CPUとメモリを内蔵したICカードが実用されつつ、注目を集めている。高度なセキュリティ機能と多機能化が可能のため、種々の分野での使用が期待されている。
【0003】
最近のICカードのICチップには、一般的に、CPU、メモリ、及び、暗号処理専用回路などが含まれている。
そのメモリは通常、読み出し専用メモリ(ROM)、書き換え可能な不揮発性メモリ、たとえば、EEPROM、或は、FRAM、及び、ランダム・アクセス・メモリ(RAM)を含む。
【0004】
これまでは、特定の機能を実現する専用の機械語プログラムをROMに記憶してICカードに収容する場合がほとんどであった。例えば、ROMには、ICカードのオペレーティング・システム(OS)、各種OSレベルのプログラム、および、サービスを提供する応用プログラムを格納し、EEPROMにユーザの個人データを収容する。
最近では、マルチアプリケーション型カードOSと言われるインタプリタを常駐させた構成のICカードが出現している。このようなインタプリタを搭載したICカードにおいては、プログラム言語で記述されたプログラムを書き換え可能な不揮発性メモリに記録することにより、カードにOSを搭載後、さらに、カード発行後でも応用プログラムを追加することができる、また、不必要なプログラムを削除することもできる。
代表的なマルチアプリケーションOSとしては、MULTOS、JavaCard、Windows for SmartCardがある。
この種のICカードにおいては、OSカーネルがROMに格納され、各種OSレベルのプログラム、サービスを提供する応用プログラム、およびユーザの個人データなどが書き換え可能な不揮発性メモリに収容する事が多い。OSレベルのプログラムをROMに収容することもある。
【0005】
今までは、OSの処理能力やICカード内蔵メモリの容量等の理由で、マルチアプリケーションOSは、1種類のプログラム言語に対応するインタプリタしか持っていない。従って、所定のマルチアプリケーションOSを搭載したICカードは、そのOSに属するプログラム言語で作成されたアプロケーションプログラムしか使えない。例えば、MULTOSのICカードに搭載したアプリケーションはMEL言語(MULTOS Executable Language)で記述され、JavaCardではJava言語を使用し、また、Windows for SmartCardではVirtual Basic言語で書かれたアプリケーションしかサポートしない。
【0006】
図1は、マルチアプリケーションOSを用いるICカードおよびICカード処理装置の例示的な構成を示すブロック図である。
ICカード処理装置1は、ICカード10、端末装置20、例えば、リード・ライト装置、および、ホストコンピュータ30を有する。
端末装置20がICカード10を管理するホストコンピュータ30の端末装置であり、ホストコンピュータ30からの指示に基づいて、ICカード10に対して、様々な処理を行う。
【0007】
ICカード10は、図1に示すように、CPU11、インタフェース(I/F)12、暗号処理器13、ランダム・アクセス・メモリ(RAM)14、読み出し専用メモリ(ROM)15、および書き換え可能な不揮発性メモリEEPROM16を有する。各構成成分の機能は後述の本発明の実施の形態の記述において詳細に説明する。
【0008】
このようなハードウエアを有するICカードには、図2に示した構成のソフトウエアが搭載されている。
図2は、従来の1つのOSを収容したマルチアプリケーションOSのICカード(以降、シングルOSICカードと称する)におけるソフトウエア構成の一例を示す概略図である。
【0009】
この階層構造の中核はROM15に記憶されるOSのカーネル部21である。OSカーネル部21は、ICカードのハードウエア資源を管理し、上層のプログラムからICカードのハードウエアをアクセスするためのインタフェースを提供する。また、OSカーネル部21は上層のプログラムの動作を制御する。
【0010】
図2において、OSカーネル部21の上層には、OSレベルのソフトウエアである処理モジュールが配置されている。処理モジュールは、OSカーネルの多様な機能を上層の応用プログラムが便利に利用できるようにする。これら処理モジュールはEEPROM16、又は、ROM15に記録されている。ここでは、EEPROM16に記録されていることを例にして説明する。
【0011】
このような処理モジュールとしては、例えば、プログラム言語を処理するインタプリタ、プログラムの追加、または、更新するプログラムローダ、アプリケーション・プログラミング・インタフェース、暗号処理ライブラリなどがある。説明の便宜上、ここでは、インタプリタ以外の様々な処理モジュールをモジュール23とする。
OSカーネル21、インタプリタ22、および他の各種OSレベルの処理モジュール23を合わせて、ICカードのOSとなる。
処理モジュール23の上層には具体的なサービスを提供する様々なアプリケーションプログラムが配置されている。ここでは、アプリケーション1とアプリケーション2が配置されているとする。
【0012】
図3は図2に示されたソフトウエア構成を有するICカードにおいて、外部から受信したコマンドを処理する手順を示すフローチャートである。ここでは、ICカードにあるアプリケーション1を実行するコマンド、及びアプリケーションをICカードにダウンロードするコマンドの処理を例として説明する。
ホスト・コンピュ−タ30よりコマンドが送信され、I/F12がそれを受信すると、該コマンドはOSにより解釈され、その内容が確認される(ステップ31)。
【0013】
そのコマンドがICカードにすでに存在するアプリケーション1を実行するコマンドである場合は、コマンドに含まれているアプリケーション1のアドレス情報を用いて、ファイルマネージャ処理モジュールによって、ICカードのEEPROM16内にアプリケーション1を検索する(ステップ32)。見つけた場合は、アプリケーション1が実行される(ステップ33)、即ち、アプリケーション1がRAM14に読みこまれて、または、EEPROM16において直接に参照されて、CPU11においてアプリケーション1に記述された手続きを逐次実行する。
【0014】
そのコマンドがICカードにアプリケーション2をダウンロードするコマンドである場合は、OSのプログラムローダ処理モジュールは動作され、ロードコマンドに続いて送信される該アプリケーション2の構成成分を認証処理しながらEEPROM16の指定された領域に書き込む(ステップ34)。
【0015】
また、認証処理の結果、そのコマンドは搭載されているOSに属するコマンドではない場合は、そのコマンドの処理が拒否される(ステップ35)。
【0016】
【発明が解決しようとする課題】
以上に示すように、1枚ICカードに1つのOSしか搭載していない場合は、ICカードの用途が制限されて、カード所有者は該ICカードのOSに対応するプログラム言語で記述されたアプリケーションしか使えない。該OSサポートしないプログラム言語で作成されたアプリケーションを利用したい場合は、それらのアプリケ−ションが動作可能なOSを搭載したICカードを複数保持し、必要に応じて使い分ける必要がある。例えば、MULTOSのICカードに搭載可能なアプリケーションはJavaCardやWindows for SmartCardを搭載したICカードで利用できないので、3種類のカードを持つことになる。
さらに、新しいアプリケーションを利用したい場合は、ICカードOSの制御で、ICカードに該アプリケーションをロードする必要があるので、アプリケーションがどの言語で記述されているかを知らないと、そのアプリケーションのロード操作はできず、カード所有者はその異なる言語のアプリケーションを自分所有のICカードに搭載することができない。
ICカードは迅速に普及され、種々の目的に使用されて、異なる言語で書かれたアプリケーションが大量に出現することが予想される。従って、シングルOSのICカードは利便性を追求する上で問題になる。
【0017】
もし複数のOSを一枚のカードに搭載できれば、異なるプログラム言語のインタプリタを1枚のICカードに収納し、異なるプログラム言語で作成された多くのアプリケーションを1枚のカードで利用することが可能になる。
複数のOSを一枚のカードに搭載するには、まずは大容量メモリが必要である。現在ICカードに良く使われるROMの容量は32〜64kバイト程度であり、EEPROMは、16kバイト程度、または、32kバイト程度が主流である。一方、OSのカーネルのサイズは約数kバイト〜20kバイト程度であり、典型的なアプリケーションのサイズも数kバイト程度である。従って、現時点では、1枚のICカードに複数のOSおよび複数のアプリケーションを同時に搭載することはメモリ容量の制限で厳しい。
だが、ICカード内蔵メモリの大容量化が進化しつつ、近い将来にICカードメモリの容量はより大きくなり、より大きなサイズのソフトウエアをICカードに格納できると予想される。たとえば、64kバイトのEEPROMは間もなく実用化される可能性がある。従って、複数のOSを一枚のカードに搭載するには、メモリ容量の制限は問題にならない可能性がある。
【0018】
しかし、複数のOSを一枚のICカードに搭載する場合は、プログラミング技術上は難しさがある。例えば、図3のシングルOSのICカードのソフトウエアを基づいて、複数のOSのソフトウエアをどのような構造でICカードのROM15とEEPROM16に配置し、動作させるのか。また、ICカードは、例えば、コマンドを受信した後、どのように複数のOSから利用すべきOSを識別し、円滑にOSを切り替えるのか、また、どのようにアプリケーションの属するOSを気にせずに、カード所有者の指示だけに従い、希望のアプリケーションプログラムをロード、追加、または、実行等の処理を行うのか、などの問題がある。
【0019】
本発明は、このような問題点に鑑みてなされたものであり、本発明の目的は、複数のICカードOSを搭載したICカード、その複数のOSを搭載したICカードを用いるICカード処理装置および処理方法を提供することにある。
【0020】
【課題を解決するための手段】
上記目的を達成するために、本発明に係わるICカードは、CPUと、メモリと、外部装置と入出力を行うインタフェースとを有するICカードであって、該メモリには、少なくとも、該外部装置との入出力を制御するオペレーティング・システムの基本部(OS基本部)と、前記OS基本部を参照しながら、ICカードの所定の機能を提供するアプリケーション・プログラムを実行させ管理する複数のICカードOSと、前記インタフェースを介して外部装置から入力されたコマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動するOSローダとが記憶され、前記OS基本部の制御の下で前記インタフェースを介して外部装置からのコマンドを受信し、前記OSローダは当該コマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動し、当該ICカードOSによって当該コマンドを実行させる。
【0021】
また、好ましくは、前記外部装置から入力されたコマンドには、当該コマンドの実行可能なICカードOSの情報が含まれている。
【0022】
また、上記目的を達成するために、本発明に係わるICカード処理装置は、前記ICカードはCPUと、メモリと、外部装置と入出力を行うインタフェースとを有し、前記メモリには、少なくとも、前記外部装置との入出力を制御するオペレーティング・システムの基本部(OS基本部)と、前記OS基本部を参照しながら、ICカード所定の機能を提供するアプリケーション・プログラムを実行させ管理する複数のICカードOSと、前記インタフェースを介して外部装置から入力されたコマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動するOSローダとが記憶され、前記外部装置は属するICカードOSの情報を含むコマンドを前記ICカードへ送信し、当該ICカードは前記OS基本部の制御の下で前記インタフェースを介して当該コマンドを受信し、前記OSローダは当該コマンドに含まれているICカードOSの情報を解読し、該ICカードOSを起動し、該ICカードOSを介して当該コマンドを実行させる。
【0023】
また、上記目的を達成するために、本発明に係わるICカード処理方法は、CPUと、メモリと、外部装置と入出力を行うインタフェースとを有し、OS基本部と複数のICカードOSとOSローダとを搭載したICカードの処理方法であって、前記外部装置は属するICカードOSの情報を含むコマンドを前記ICカードへ送信し、前記ICカードは前記OS基本部の制御の下で前記インタフェースを介して当該コマンドを受信し、前記OSローダは当該コマンドに含まれているICカードOSの情報を解読し、該ICカードOSを識別して起動し、該ICカードOSによって当該コマンドを実行させる。
【0024】
OSローダを設けることによって、OS基本部の制御でOSローダが外部装置からICカードへ送られたコマンドを受信し、該コマンドに含まれるOS情報を解読し、利用すべきICカードOSを識別してから、そのOSに切り替え、該利用すべきカードOSによって、アプリケーションのロードや実行などの処理を行うことが可能になる。カード所有者は、複数のカードOSの存在やアプリケーションが何のプログラム言語で記述されたかを意識する必要がなく、便利且つ円滑にカードOSを選択し、アプリケーションをロードまたは実行することができる。
【0025】
【発明の実施の形態】
以下、本発明の一実施の形態を添付の図面を参照して説明する。
ICカードおよびICカード処理装置
本実施形態に係わるICカードおよびICカード処理装置は前述した図1に示されたICカード10およびICカード処理装置1と同じ構成を有し、以下、引き続き図1を参照して本実施形態を説明する。
【0026】
すでに述べたように、ICカード処理装置1は、ICカード10、端末装置20、例えば、リード・ライト装置、および、ホストコンピュータ30を有する。端末装置20がICカード10を管理するホストコンピュータ30からの指示に基づいて、ICカード10に対して、様々な処理を行う。
本実施形態には、ICカード10は、ICカード発行会社から発行され、管理されて、複数のOSとそれぞれのOSレベルのソフトウエアを搭載済み、ICカード所有者が携帯している複数のOSを用いるICカードである。また、ICカードの例として、接触型ICカードについて述べる。
ICカード10は、図1に示すように、例えば、CPU11、インタフェース(I/F)12、暗号処理器13、ランダム・アクセス・メモリ(RAM)14、読み出し専用メモリ(ROM)15、および書き換え可能な不揮発性メモリEEPROM16を有する。
【0027】
CPU11は、端末装置20からのコマンド、あるいは、予めICカードに設定されたコマンドに基づいて、EEPROM16に記憶されているアプリケーションに従って、I/F12を介して端末装置20と適宜通信を行いながら、所望の処理を行う、たとえば、所有者とICカードの認証、代金の決済、ICカードの診断などの処理を行う。
CPU11において処理を行う際に一時的に発生するデータをRAM14に記憶する。
【0028】
I/F12を介して、ICカード10が端末装置20に装着された場合に、電力とクロックの供給を受けるとともに、端末装置20と信号の送受信を行う。すなわち、I/F12は、端末装置20から受信した信号をCPU11に出力し、また、CPU11から入力された信号を端末装置20に送信する。
【0029】
暗号処理器13は、専用の暗号処理回路である。暗号処理器13は乱数の生成や、RSAなどの暗号の演算を行う。
【0030】
RAM14、ROM15、および、EEPROM16がICカード10のメモリシステムを構成する。それぞれの機能は次に述べるICカードのソフトウエアの構成で説明する。
【0031】
このようなハードウエアを有する複数のOSを有するICカードには、図4に示されたソフトウエア構成が配置されている。
図4は、本発明に係わる複数OSを収容したマルチアプリケーションOSのICカード(以降、マルチOSICカードと称する)におけるソフトウエア構成の一例を示す概念図である。
【0032】
前述したシングルOSICカードと同様に、マルチOSのICカードにおけるソフトウエア階層構造の中核には、ROM15に記憶されているOSのカーネル部41がある。OSカーネル部41は、ICカード10のハードウエアに対応して設計され、そのハードウエア資源を管理する。OSカーネル部41はICカード10のインタフェース(I/F)12を制御し、外部装置とのデータの入出力を行う。また、OSカーネル部41は、上層のプログラムからICカードのハードウエアをアクセスするためのインタフェースを提供する。以上の機能に基づいて、OSカネール41は上層の各プログラムの動作を制御する。
ROM15に記憶されるOSのカーネル部41はICカード製造会社がICカード発行前に搭載したもので、書き換えることはできない。
【0033】
本実施形態において、図4に示しているように、OSカーネル部41の上層には、OSローダ42がEEPROM16に配置されている。OSローダ42はOSカネール41の制御の下で、I/F12を介して外部装置から受信したコマンドの内容を解読し、コマンドやコマンドに付加されているアプリケーションの利用すべきOSを識別して選択する。
【0034】
OSローダ42の上層には、ICカードに搭載した複数のOSの処理モジュール部分である。この部分もEEPROM16に記録されている。OSカーネル41と各OSの複数の処理モジュールから各ICカードOSが構成される。各OSの処理モジュールは、OSカーネルの機能を上層の応用プログラムが便利に利用できるように設けられている。処理速度、容量、また、セキュリティの関係で、これらOSレベルのソフトウエアは機械語で記述することが望まれる。
このような処理モジュールとして、例えば、プログラム言語を処理するインタプリタや、コマンドを処理するコマンドインタプリタ、プログラムを外から追加又は更新するプログラムローダ、アプリケーション・プログラミング・インタフェース、暗号処理ライブラリなどがある。説明の便宜上、ここでは、インタプリタ以外の様々な処理モジュールを1つのモジュールで表す。
また、本発明の実施形態の例として、2つのOS(OSaとOSbと記する)を搭載する場合を例として説明する。2つのOSはそれぞれインタプリタa43と処理モジュールa44,インタプリタb45と処理モジュールb46を有する。
【0035】
OSローダ42は受信したコマンドの内容から属するOS認識し、対応するインタプリタなどのOSレベルのソフトウエアを起動させ、コマンドとアプリケーションの処理を行う。
OSローダ42と各OSの処理モジュール43、44、45、46を書き換え可能なEEPROM16に配置することによって、OSの追加や削除も可能になり、その場合、OSローダ42の内容を適切に修正して、新しく追加されたOSの識別と選択も容易に実現できる。
【0036】
各処理モジュールの上層には種々のサービスを提供するアプリケーションプログラムが配置されている。図4に示すように、OSaに属するアプリケーション1(47)とアプリケーション2(48)、OSbに属するアプリケーション3(49)とアプリケーション4(50)が配置されている。
【0037】
既に述べたように、プログラム言語で書かれた応用プログラムを実行するには、インタプリタが必要である。インタプリタは応用プログラムのソースコードを、逐次、実行形式のコードに変換する。必要に応じて、必要な処理モジュールを呼出し、ICカードのシステムデータを利用し、ICカードのハードウエアをアクセスしながら、ICカードの所定の機能を実現する。
なお、ICチップのCPUの機械語で動作し、プログラム言語のアプリケーションではないものもある、その場合は、インタプリタを動作させる必要がない。
【0038】
ICカードが提供するサービスにより、応用プログラムは様々あり、そのような応用プログラムは、通常カード発行前にICカードに搭載する。マルチアプリケーションOSを用いるICカードにおいては、ICカード発行後であっても、プログラムの追加、および、更新することが可能である。
【0039】
次は、OSローダ42の構成を図5と図6を参照して説明する。
OSローダ42はOSカーネルレベルで実行可能なプログラムである。例えば、図5に示されたように、EEPROM16の先頭に配置する。
図5は本発明の実施形態に係わる複数のOSを用いるICカードのOSローダのEEPROM16における配置の一例を示す図である。
図5においては、EEPROM16の容量は64kバイトであり、左側のアドレスはブロック(1ブロック=16バイト)を単位として、16進数で表示されている。OSローダ42のサイズは1kバイト以下、OSaの全ての処理モジュールはOSaシステムソフトウエアと称し、OSbの全ての処理モジュールはOSbシステムソフトウエアと称し、それぞれのサイズは2kバイト以下とする。
【0040】
OSローダ42には、図6に示された内容が含まれている。
図6は本発明の実施形態に係わる複数のOSを用いるICカードのOSローダの内容の一例を示す図である。
OSローダ42はI/F12から受け取ったコマンドを解読するプログラムであるコマンド解読部を有する。該コマンド解読部61は、受け取ったコマンドを解釈し、コマンドに付属されているICカードOS情報を識別する。
また、ICカードに搭載されている各OSの情報が定数としてOSローダ42登録されている。本実施形態には、例えば、第1番目のOSはOSa、記録された場所はEEPROM、アドレスは0041Hである、というように登録されている。同様に、第2番目のOSはOSb、記録された場所はEEPROM、アドレスは00C1Hであると登録されている。
【0041】
OSローダ42は、受け取ったコマンドに含まれているOSの情報に基づいて、該コマンドの属するOSを識別して、選択する。
図7は本発明に係わる複数のOSを用いるICカードが受信したコマンドのフォーマットを示す図である。
このコマンドの先頭に制御コードを含むコマンドヘッダ有し、該コマンドヘッダには、コマンドが実行可能なOSを識別するデータであるICカードOS識別子と、該コマンドの操作内容を示すコマンドの種別コードとがある。該種別コードにより、たとえば、アプリケーションのロード、実行などの操作を行うことを判明できる。コマンドの本体には、該コマンドが操作するアプリケーションやデータのアドレスがあり、必要な場合は、該コマンドが操作する対象となるデータも付加されている。
OSローダ42は、OSカーネル41の制御の下で、I/F12から受信したコマンドを受け取って、コマンドヘッダにあるOS識別子から、該コマンドの属するOSを識別して起動する。起動されたOSはコマンドインタプリタによりコマンドの種別を得て、指定されたアドレスにデータを書き込み、或は、指定されたアドレスにあるアプリケーションを実行する等の処理を行う。
以上が、ICカード処理装置1におけるICカード10のハードウエア及びソフトウエアの構成の説明である。
【0042】
このようなハードウエア構成およびソフトウエア構成のICカード10は、端末装置20に装着されると、I/F12を介して端末装置20より電源とクロック信号の供給を受けて起動される。そして、端末装置20を介して、ホストコンピュータ30からのコマンドに基づいて、ICカード10が処理を行う。
端末装置20は、例えば、通常店舗などで使用されている端末装置であり、ICカード製造会社、または、サービスを提供する会社のホストコンピュータ30に通信回線を介して接続されており、ホストコンピュータ30と装着されたICカード10との間の通信データを転送する。
【0043】
ICカード10が端末装置20に装着され起動されて、そして、ICカード自身の認証処理、即ち、ICカード10がICカード処理装置1で処理できるICカードか否かの処理を行う。後は、所有者が正当な所有者か否かがチェックされる。ICカード10が認定された場合には、端末装置20を介して、ICカード10はホストコンピュータ30と通信できる。ホストコンピュータ30とICカード10とは通信を順次に行いながら、ホストコンピュータ30より送信されたICカード10に対する指示を実行する。
【0044】
マルチOSのICカードの処理
以上のICカード処理装置1を用い、以上のハードウエアとソフトウエア構成を有するマルチOSのICカード10を処理する工程について、図8を参照して説明する。
図8は、本発明の実施形態に係わる複数のOSを用いるICカード10はOSローダにより利用すべきICカードOSを識別、選択して、起動する工程を示すフローチャートである。
ICカード10が端末装置20に装着されると、ICカード10が起動される(ステップS81)。即ち、OSカーネル41はRAM14に読み込まれて(または、ROM15において直接に参照されて)、端末装置20を介してホストコンピュータ30とのデータの入出力、ICカード10の認証処理、暗号処理などの動作を制御する。OSローダ42もRAM14に読み込まれて、ICカード10が端末装置20に装着される間に、RAM14に常駐させる。端末装置20を介してホストコンピュータ30からのコマンドをICカード10が受信するたびに、OSローダ42はそのコマンドの利用すべきOSの識別処理を行う。
【0045】
次は、OSカーネル41の制御で、ICカード10と端末装置20の間で認証処理が行われる(ステップS82)。例えば、ICカード所有者はパスワードを入力して、正当な所有者であり、かつ、ICカードは当該処理装置1で処理できるICカードであることが判明されたら、ホストコンピュータ30は所有者が希望する処理の指定を待つ。
【0046】
次は、ICカード10の所有者は端末装置20から入力し、ホストコンピュータ30が提供するサービスに対する操作を行うと指定すると(例えば、ダウンロード、実行など)、ホストコンピュータ30がその操作をするコマンドをICカードに送信し、端末装置20を介してICカード10が該コマンドを受信する(ステップS83)。
【0047】
ICカード10が該コマンドを受信すると、OSカーネル41はOSローダ42を呼出し、OSローダ42により、コマンドの解釈を行い(ステップS84)、即ち、コマンドヘッダにあるOS識別子を読み取って、コマンドの属するOSを識別する。
【0048】
次は、OSローダ42に登録されているICカード10に搭載したOSのリストから、OS識別子に対応するOSを検索し、そのOSの記憶場所、詳細なアドレスを特定する(ステップS85)。
【0049】
次は、特定された場所に記憶されたOSの必要なシステムソフトウエアをRAM14に読み込んで(または、EEPROM16において直接に実行し)、当該OSのインタプリタなどの処理モジュールを動作させる(ステップS86)。
【0050】
コマンド処理の制御は起動されたOSに移行し、以降の処理は当該OSの制御で行う(ステップS87)。当該OSはコマンドインタプリタによりコマンドを解読し続き、コマンドの種別コードからコマンドの種別を判別し、コマンドの操作を行うアドレスを得て、必要な場合、書き込みデータも得る。
ICカードOSによるコマンドの処理の具体的な例は図9と図10において説明する。
該ICカードOSによるコマンドの処理を終了した後、当該OSのソフトウエアがRAM14から退去させ、制御はOSカーネル41に戻り、次のコマンドの受信を待つ(ステップS88)。
以上が、ICカード処理装置1において、OSローダ42によるマルチOSのICカード10のOSを識別、選択、および起動する工程の説明である。
【0051】
図3に示された従来のシングルOSのICカードにおいてロードや実行コマンドの処理の流れと比べるために、以上に説明したマルチOSのICカード10が同じコマンドに対する処理は、図9と図10に示された。
図9は、本発明に係わるマルチOSのICカードを用いて、アプリケーションをロードするコマンドを受信した場合、ICカードの処理のフローチャートである。
【0052】
OSカーネル41の管理でホスト・コンピュ−タ30よりコマンドが送信されると、OSローダ42によって該コマンドが解釈され、コマンドヘッドにあるOS識別子から、該コマンドの利用すべきOSを識別する(ステップ91)。
【0053】
そのOSがOSaである場合は、OSaのシステムソフトウエアをRAM14に読み込んで(または、EEPROM16において直接に実行し)、以降は、OSaの制御の下で該コマンドの処理を行う(ステップ92)。
【0054】
OSaはコマンドインタプリタにより該コマンドを解読し、コマンドの種別コードからコマンドの種別を判別する(ステップ93)。そのコマンドはICカード10にアプリケーション1をダウンロードするコマンドであることを確認したら、OSaのプログラムローダは動作され、ロードコマンドに続いて送信されるアプリケーション1の構成成分を認証処理しながらEEPROM16の指定された領域に書き込む(ステップ94)。
【0055】
そのOSはOSbである場合は、OSbのシステムソフトウエアをRAM14に読み込んで(または、EEPROM16において直接に実行し)、以降は、OSbの制御の下で該コマンドの処理を行う(ステップ95)。
【0056】
OSbはコマンドインタプリタにより該コマンドを解読し、コマンドの種別コードからコマンドの種別を判別する(ステップ96)。そのコマンドはICカード10にアプリケーション3をダウンロードするコマンドであることを確認したら、OSbのプログラムローダは動作され、ロードコマンドに続いて送信されるアプリケーション3の構成成分を認証処理しながらEEPROM16の指定された領域に書き込む(ステップ97)。
アプリケーションプログラムを書き込んだ後、OSa、または、OSbがRAM14から退去され、OSa、または、OSbの処理が終了する。
【0057】
図10は、本発明に係わるマルチOSのICカードを用いて、アプリケーションを実行するコマンドを受信した場合、ICカードの処理のフローチャートである。
【0058】
OSカーネル41の管理でホスト・コンピュ−タ30よりコマンドが送信されると、OSローダ42によって該コマンドを解釈され、コマンドのヘッドにあるOS識別子から、該コマンドの利用すべきOSを識別する(ステップ101)。
【0059】
そのOSはOSaである場合は、OSaのシステムソフトウエアをRAM14に読み込んで(または、EEPROM16において直接に実行し)、以降は、OSaの制御の下で該コマンドの処理を行う(ステップ102)。
【0060】
OSaはコマンドインタプリタによりコマンドを解読し、コマンドの種別コードからコマンドの種別を判別する(ステップ103)。そのコマンドはICカード10に存在するアプリケーション2を実行するコマンドであることを確認したら、コマンド内容からアプリケーション2が記録されるアドレスを得る。
続いて、OSaのファイルマネージャによって、ICカード10のEEPROM16内にアプリケーション2を検索する(ステップ104)。発見したら、アプリケーション2を実行する(ステップ105)。即ち、アプリケーション2をRAM14に読み込んで(または、EEPROM16において直接に実行し)、CPU11においてアプリケーション2に記述された手続きを逐次実行する。
【0061】
そのOSはOSbである場合は、OSbのシステムソフトウエアをRAM14に読み込んで(または、EEPROM16において直接に実行し)、以降は、OSbの制御の下で該コマンドの処理を行う(ステップ106)。
【0062】
OSbはコマンドインタプリタによりコマンドを解読し、コマンドの種別コードからコマンドの種別を判別する(ステップ107)。そのコマンドはすでにICカード10に存在するアプリケーション4を実行するコマンドであることを確認したら、コマンド内容からアプリケーション4が記録されるアドレスを得る。
続いて、OSbのファイルマネージャによって、ICカード10のEEPROM16内にアプリケーション4を検索する(ステップ108)。発見したら、アプリケーション4を実行する(ステップ109)。即ち、アプリケーション4をRAM14に読み込んで(または、EEPROM16において直接に実行し)、CPU11においてアプリケーション4に記述された手続きを逐次実行する。
【0063】
アプリケーション2、又は、アプリケーション4を実行した後、OSa、または、OSbがRAM14から退去され、OSa、または、OSbの処理が終了する。
【0064】
本発明は以上に説明した実施の形態に限られるものではなく、種々の改変が可能である。
前述した実施の形態において、図4に示されたように、OSローダ42と各OSの処理モジュール43、44、45、46がEEPROM16に記憶されているが、これらのプログラム、または、その中の一部をROMに記憶してもいい。その場合、ICカードに搭載するOSとOSローダ42の内容を事前に決め、ICカード発行前にROMに搭載して、発行後は搭載するOSの修正はできない。
以上の方法では、例示として2つのOSを搭載した場合について述べたが、本発明において、2つ以上のOSを搭載することができるのは明らかである。
【0065】
また、本実施の形態においては、接触型のICカードを例示して本発明を説明した。しかし、インタフェース(I/F)12としては端子が設けられておらず、コイルを用いて電磁的に外部装置と接続されるような構成の非接触型のICカードであってもよい。
【0066】
【発明の効果】
本発明によれば、1枚のICカードに複数のOSを搭載することができ、ICカードの用途を大幅に広げ、ICカード使用上の便利性が優れている。
また、OSローダを設けることにより、コマンドを受信した度に、コマンドの属するOSの識別と選択が行われ、コマンドの属するOSの制御でアプリケーションの処理を行うことから、ICカードの所有者はカードに搭載されたOSの範囲内では利用すべきOSを意識する必要がなくICカードを使用することができ、あたかも1つのOSの上で、複数の言語を処理可能なマルチアプリケーションICカードとなる、汎用性及び便利性に優れている。
また、OSローダやOSの処理モジュールを書き換え可能なEEPROMに記録し、OSローダを修正可能となっていることから、新しいOSの追加も可能となり、さらに、不必要なOSを削除も可能であり、ICカードの使用上の柔軟性に優れている。
【図面の簡単な説明】
【図1】本発明に係わるICカード処理装置の構成を示すブロック図である。
【図2】従来のICカードのソフトウエア構成を示す概念図である。
【図3】図2に示されたソフトウエア構成を有する従来のICカードを用いて、コマンドを処理する工程を示すフローチャートである。
【図4】本発明に係わる複数OSを用いるICカードのソフトウエア構成を示す概念図である。
【図5】本発明に係わる複数OSを用いるICカードのOSローダと各OSのシステムソフトウエアがEEPROMにおける配置を示す図である。
【図6】本発明に係わる複数OSを用いるICカードのOSローダの概略な内容を示す図である。
【図7】本発明に係わる複数OSを用いるICカードが受信したコマンドのフォーマットを示す概略図である。
【図8】本発明に係わる複数OSを用いるICカードのOSローダによりICカードOSの識別、選択、および起動の工程を示すフローチャートである。
【図9】本発明に係わる複数OSを用いるICカードにおいて、アプリケーションプログラムをICカードにロードする工程を示すフローチャートである。
【図10】本発明に係わる複数OSを用いるICカードにおいて、すでにICカードに存在するアプリケーションを実行する工程を示すフローチャートである。
【符号の説明】
1…ICカード処理装置
10…ICカード
11…CPU
12…インタフェース(I/F)
13…暗号処理器
14…RAM
15…ROM
16…書き換え可能な不揮発性メモリ(EEPROM)
20…端末装置
21…OSのカーネル部
22…インタプリタ
23…処理モジュール
24…アプリケーション1
25…アプリケーション2
30…ホストコンピュータ
41…OSのカーネル部
42…OSローダ
43…インタプリタa
44…処理モジュールa
45…インタプリタb
46…処理モジュールb
47…アプリケーション1
48…アプリケーション2
49…アプリケーション3
50…アプリケーション4
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an IC card equipped with a plurality of OSs, an IC card processing apparatus using the IC card, and a processing method.
[0002]
[Prior art]
With the progress of integrated circuit technology and the like, an IC card incorporating a CPU and a memory is being put into practical use and attracting attention. Since advanced security functions and multi-functions are possible, it is expected to be used in various fields.
[0003]
An IC chip of a recent IC card generally includes a CPU, a memory, a cryptographic processing dedicated circuit, and the like.
The memory typically includes read-only memory (ROM), rewritable non-volatile memory, such as EEPROM or FRAM, and random access memory (RAM).
[0004]
In the past, dedicated machine language programs that realize specific functions have been stored in ROM and stored in IC cards. For example, an operating system (OS) of an IC card, various OS level programs, and application programs that provide services are stored in the ROM, and personal data of the user is stored in the EEPROM.
Recently, an IC card having a configuration in which an interpreter called a multi-application type card OS is resident has appeared. In an IC card equipped with such an interpreter, a program written in a program language is recorded in a rewritable nonvolatile memory, so that an application program is added even after the card is issued after the OS is installed on the card. You can also delete unnecessary programs.
Typical multi-application OSs include MULTOS, JavaCard, and Windows for SmartCard.
In this type of IC card, the OS kernel is often stored in a ROM and stored in a non-volatile memory in which various OS level programs, service providing application programs, and user personal data can be rewritten. An OS level program may be stored in the ROM.
[0005]
Until now, the multi-application OS has only an interpreter corresponding to one kind of program language because of the processing capability of the OS and the capacity of the IC card built-in memory. Therefore, an IC card equipped with a predetermined multi-application OS can only use an allocation program created in a program language belonging to the OS. For example, an application mounted on a MULTOS IC card is written in MEL language (MULTOS Executable Language), JavaCard uses Java language, and Windows for SmartCard supports only applications written in Virtual Basic language.
[0006]
FIG. 1 is a block diagram illustrating an exemplary configuration of an IC card using a multi-application OS and an IC card processing apparatus.
The IC card processing device 1 includes an IC card 10, a terminal device 20, for example, a read / write device, and a host computer 30.
The terminal device 20 is a terminal device of the host computer 30 that manages the IC card 10, and performs various processes on the IC card 10 based on instructions from the host computer 30.
[0007]
As shown in FIG. 1, the IC card 10 includes a CPU 11, an interface (I / F) 12, a cryptographic processor 13, a random access memory (RAM) 14, a read-only memory (ROM) 15, and a rewritable nonvolatile memory. A memory 16 is provided. The function of each component will be described in detail in the description of the embodiment of the present invention described later.
[0008]
The IC card having such hardware is equipped with software having the configuration shown in FIG.
FIG. 2 is a schematic diagram showing an example of a software configuration in a conventional multi-application OS IC card (hereinafter referred to as a single OS IC card) containing one OS.
[0009]
The core of this hierarchical structure is an OS kernel unit 21 stored in the ROM 15. The OS kernel unit 21 manages hardware resources of the IC card and provides an interface for accessing the IC card hardware from an upper layer program. The OS kernel unit 21 controls the operation of the upper layer program.
[0010]
In FIG. 2, a processing module which is OS level software is arranged in the upper layer of the OS kernel unit 21. The processing module allows various functions of the OS kernel to be conveniently used by upper layer application programs. These processing modules are recorded in the EEPROM 16 or the ROM 15. Here, a description will be given taking the case of being recorded in the EEPROM 16 as an example.
[0011]
Examples of such processing modules include an interpreter that processes a program language, a program loader that adds or updates a program, an application programming interface, and a cryptographic processing library. For convenience of explanation, various processing modules other than the interpreter are referred to as a module 23 here.
The OS kernel 21, interpreter 22, and other various OS level processing modules 23 are combined into an IC card OS.
Various application programs that provide specific services are arranged in the upper layer of the processing module 23. Here, it is assumed that application 1 and application 2 are arranged.
[0012]
FIG. 3 is a flowchart showing a procedure for processing a command received from the outside in the IC card having the software configuration shown in FIG. Here, a description will be given by taking as an example processing of a command for executing the application 1 in the IC card and a command for downloading the application to the IC card.
When a command is transmitted from the host computer 30 and the I / F 12 receives the command, the command is interpreted by the OS and its contents are confirmed (step 31).
[0013]
If the command is a command for executing the application 1 that already exists in the IC card, the application 1 is stored in the EEPROM 16 of the IC card by the file manager processing module using the address information of the application 1 included in the command. Search (step 32). If found, the application 1 is executed (step 33), that is, the application 1 is read into the RAM 14 or directly referred to in the EEPROM 16, and the procedure described in the application 1 is sequentially executed in the CPU 11. To do.
[0014]
If the command is a command for downloading the application 2 to the IC card, the program loader processing module of the OS is operated, and the components of the application 2 transmitted following the load command are authenticated and specified in the EEPROM 16. (Step 34).
[0015]
As a result of the authentication process, if the command is not a command belonging to the installed OS, the process of the command is rejected (step 35).
[0016]
[Problems to be solved by the invention]
As described above, when only one OS is mounted on one IC card, the use of the IC card is restricted, and the card owner can use an application written in a program language corresponding to the OS of the IC card. Can only be used. In order to use an application created in a programming language that does not support the OS, it is necessary to hold a plurality of IC cards equipped with an OS capable of operating those applications and use them appropriately as necessary. For example, since an application that can be mounted on a MULTOS IC card cannot be used with an IC card mounted with JavaCard or Windows for SmartCard, it has three types of cards.
Furthermore, when a new application is to be used, it is necessary to load the application on the IC card under the control of the IC card OS. Therefore, if the application is not described in which language, the load operation of the application is performed. The card holder cannot install the application in the different language on his own IC card.
IC cards are quickly spread and used for various purposes, and it is expected that a large number of applications written in different languages will appear. Therefore, a single OS IC card is a problem in pursuing convenience.
[0017]
If multiple operating systems can be installed on a single card, interpreters of different programming languages can be stored on a single IC card, and many applications created in different programming languages can be used on a single card. Become.
In order to install a plurality of OSs on a single card, a large capacity memory is required first. Currently, the capacity of ROM often used for IC cards is about 32 to 64 kbytes, and about 16 kbytes or about 32 kbytes of EEPROM is the mainstream. On the other hand, the OS kernel size is about several kilobytes to 20 kilobytes, and the typical application size is also several kilobytes. Therefore, at the present time, it is difficult to simultaneously install a plurality of OSs and a plurality of applications on a single IC card due to a limitation on memory capacity.
However, as the capacity of the IC card built-in memory increases, the capacity of the IC card memory will increase in the near future, and it is expected that larger size software can be stored in the IC card. For example, a 64 kbyte EEPROM may soon be put into practical use. Therefore, in order to mount a plurality of OSs on a single card, there is a possibility that the limitation of memory capacity is not a problem.
[0018]
However, when a plurality of OSs are mounted on one IC card, there is a difficulty in programming technology. For example, based on the single OS IC card software of FIG. 3, how is the structure of multiple OS software arranged in the ROM 15 and EEPROM 16 of the IC card and operated? In addition, for example, after receiving a command, the IC card identifies an OS to be used from a plurality of OSs, smoothly switches between OSs, and without worrying about the OS to which the application belongs. There are problems such as whether to load, add, or execute a desired application program in accordance with only the card owner's instructions.
[0019]
The present invention has been made in view of such problems, and an object of the present invention is to provide an IC card having a plurality of IC card OSs and an IC card processing apparatus using the IC cards having the plurality of OSs. And providing a processing method.
[0020]
[Means for Solving the Problems]
In order to achieve the above object, an IC card according to the present invention is an IC card having a CPU, a memory, and an interface for performing input / output with an external device, and the memory includes at least the external device and the IC card. Operating system basic part (OS basic part) for controlling the input / output of the IC card, and a plurality of IC card OSs that execute and manage application programs that provide predetermined functions of the IC card while referring to the OS basic part And an OS loader that decodes a command input from an external device via the interface and identifies and activates an IC card OS that can execute the command, and is stored under the control of the OS basic unit. Upon receiving a command from an external device via the interface, the OS loader decodes the command and executes the command Start by identifying the ability of the IC card OS, to execute the command by the IC card OS.
[0021]
Preferably, the command input from the external device includes information on an IC card OS that can execute the command.
[0022]
In order to achieve the above object, the IC card processing device according to the present invention includes a CPU, a memory, and an interface for performing input / output with an external device, and the memory includes at least A basic part (OS basic part) of an operating system that controls input / output with the external device, and a plurality of applications that execute and manage application programs that provide predetermined functions of the IC card while referring to the OS basic part An IC card OS and an OS loader that decodes a command input from an external device via the interface and identifies an IC card OS that can execute the command are stored. The IC card to which the external device belongs A command including OS information is transmitted to the IC card, and the IC card is controlled under the control of the OS basic unit. The command is received via the interface, and the OS loader decodes the information of the IC card OS included in the command, starts the IC card OS, and executes the command via the IC card OS. .
[0023]
In order to achieve the above object, an IC card processing method according to the present invention includes a CPU, a memory, and an interface for performing input / output with an external device, and includes an OS basic unit, a plurality of IC card OSs, and an OS. A method of processing an IC card equipped with a loader, wherein the external device transmits a command including information of an IC card OS to which the external device belongs to the IC card, and the IC card controls the interface under the control of the OS basic unit. The OS loader decodes the information of the IC card OS included in the command, identifies and activates the IC card OS, and causes the IC card OS to execute the command. .
[0024]
By providing the OS loader, the OS loader receives a command sent from an external device to the IC card under the control of the OS basic unit, decodes the OS information included in the command, and identifies the IC card OS to be used. After that, it is possible to switch to the OS and perform processing such as loading and execution of an application depending on the card OS to be used. The cardholder does not need to be aware of the existence of a plurality of card OSs and what programming language the application is written in, and can select and easily execute the card OS by loading or executing the application.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
IC card and IC card processing device
The IC card and the IC card processing apparatus according to the present embodiment have the same configuration as the IC card 10 and the IC card processing apparatus 1 shown in FIG. 1 described above. Hereinafter, the present embodiment will be described with reference to FIG. explain.
[0026]
As described above, the IC card processing device 1 includes the IC card 10, the terminal device 20, for example, the read / write device, and the host computer 30. The terminal device 20 performs various processes on the IC card 10 based on instructions from the host computer 30 that manages the IC card 10.
In this embodiment, the IC card 10 is issued and managed by an IC card issuing company, and has a plurality of OSs and respective OS level software installed therein, and a plurality of OSs carried by the IC card owner. IC card using A contact IC card will be described as an example of the IC card.
As shown in FIG. 1, the IC card 10 includes, for example, a CPU 11, an interface (I / F) 12, a cryptographic processor 13, a random access memory (RAM) 14, a read-only memory (ROM) 15, and a rewritable memory. A non-volatile memory EEPROM 16 is provided.
[0027]
Based on a command from the terminal device 20 or a command preset in the IC card, the CPU 11 performs communication with the terminal device 20 through the I / F 12 according to an application stored in the EEPROM 16 as desired. For example, processing such as authentication of the owner and the IC card, settlement of the price, diagnosis of the IC card, and the like are performed.
Data temporarily generated when the CPU 11 performs processing is stored in the RAM 14.
[0028]
When the IC card 10 is attached to the terminal device 20 via the I / F 12, the power and clock are supplied and signals are transmitted to and received from the terminal device 20. That is, the I / F 12 outputs a signal received from the terminal device 20 to the CPU 11 and transmits a signal input from the CPU 11 to the terminal device 20.
[0029]
The cryptographic processor 13 is a dedicated cryptographic processing circuit. The cryptographic processor 13 generates random numbers and performs cryptographic operations such as RSA.
[0030]
The RAM 14, ROM 15, and EEPROM 16 constitute a memory system of the IC card 10. Each function will be described with the software configuration of the IC card described below.
[0031]
The IC card having a plurality of OSs having such hardware has the software configuration shown in FIG.
FIG. 4 is a conceptual diagram showing an example of a software configuration in a multi-application OS IC card (hereinafter referred to as a multi-OS IC card) containing a plurality of OSs according to the present invention.
[0032]
Similar to the single OSIC card described above, the kernel part 41 of the OS stored in the ROM 15 is at the core of the software hierarchical structure in the multi-OS IC card. The OS kernel unit 41 is designed corresponding to the hardware of the IC card 10 and manages its hardware resources. The OS kernel unit 41 controls the interface (I / F) 12 of the IC card 10 and inputs / outputs data to / from an external device. The OS kernel unit 41 provides an interface for accessing the IC card hardware from the upper layer program. Based on the above functions, the OS cannel 41 controls the operation of each upper layer program.
The kernel part 41 of the OS stored in the ROM 15 is installed before the IC card is issued by the IC card manufacturer and cannot be rewritten.
[0033]
In the present embodiment, as shown in FIG. 4, the OS loader 42 is arranged in the EEPROM 16 in the upper layer of the OS kernel unit 41. The OS loader 42 decodes the content of the command received from the external device via the I / F 12 under the control of the OS cannel 41, and identifies and selects the OS to be used by the command and the application added to the command. To do.
[0034]
On the upper layer of the OS loader 42 are a plurality of OS processing module portions mounted on the IC card. This part is also recorded in the EEPROM 16. Each IC card OS is composed of the OS kernel 41 and a plurality of processing modules of each OS. Each OS processing module is provided so that the OS kernel functions can be conveniently used by upper layer application programs. It is desirable to describe these OS-level software in machine language because of processing speed, capacity, and security.
Examples of such processing modules include an interpreter that processes a program language, a command interpreter that processes commands, a program loader that adds or updates programs from the outside, an application programming interface, and a cryptographic processing library. For convenience of explanation, here, various processing modules other than the interpreter are represented by one module.
Further, as an example of the embodiment of the present invention, a case where two OSs (OSa and OSb) are mounted will be described as an example. Each of the two OSs includes an interpreter a43 and a processing module a44, and an interpreter b45 and a processing module b46.
[0035]
The OS loader 42 recognizes the OS belonging from the contents of the received command, activates OS level software such as a corresponding interpreter, and processes the command and application.
By placing the OS loader 42 and the processing modules 43, 44, 45, and 46 of each OS in the rewritable EEPROM 16, it is possible to add and delete OSs. In this case, the contents of the OS loader 42 are corrected appropriately. Thus, the newly added OS can be easily identified and selected.
[0036]
Application programs that provide various services are arranged in the upper layer of each processing module. As shown in FIG. 4, application 1 (47) and application 2 (48) belonging to OSa, and application 3 (49) and application 4 (50) belonging to OSb are arranged.
[0037]
As described above, an interpreter is required to execute an application program written in a programming language. The interpreter sequentially converts the source code of the application program into executable code. If necessary, necessary processing modules are called, and the IC card system data is used to access the IC card hardware, thereby realizing predetermined functions of the IC card.
Note that there are some which operate in the machine language of the CPU of the IC chip and are not a program language application. In this case, it is not necessary to operate the interpreter.
[0038]
There are various application programs depending on the service provided by the IC card, and such an application program is usually installed in the IC card before issuing the card. In an IC card using a multi-application OS, programs can be added and updated even after the IC card is issued.
[0039]
Next, the configuration of the OS loader 42 will be described with reference to FIGS.
The OS loader 42 is a program that can be executed at the OS kernel level. For example, as shown in FIG.
FIG. 5 is a diagram showing an example of the arrangement in the EEPROM 16 of the OS loader of the IC card using a plurality of OSs according to the embodiment of the present invention.
In FIG. 5, the capacity of the EEPROM 16 is 64 kbytes, and the address on the left is displayed in hexadecimal notation in units of blocks (1 block = 16 bytes). The size of the OS loader 42 is 1 kbyte or less, all the processing modules of OSa are called OSa system software, and all the processing modules of OSb are called OSb system software, and each size is 2 kbytes or less.
[0040]
The OS loader 42 includes the contents shown in FIG.
FIG. 6 is a diagram showing an example of contents of an OS loader of an IC card using a plurality of OSs according to the embodiment of the present invention.
The OS loader 42 has a command decoding unit that is a program for decoding commands received from the I / F 12. The command decoding unit 61 interprets the received command and identifies the IC card OS information attached to the command.
In addition, information of each OS mounted on the IC card is registered as an OS loader 42 as a constant. In the present embodiment, for example, the first OS is registered as OSa, the recorded location is EEPROM, and the address is 0041H. Similarly, it is registered that the second OS is OSb, the recorded location is EEPROM, and the address is 00C1H.
[0041]
Based on the OS information included in the received command, the OS loader 42 identifies and selects the OS to which the command belongs.
FIG. 7 is a diagram showing a format of a command received by an IC card using a plurality of OSs according to the present invention.
This command has a command header including a control code at the head, and the command header includes an IC card OS identifier that is data for identifying an OS that can execute the command, and a command type code indicating the operation content of the command. There is. From the type code, for example, it can be determined that operations such as loading and execution of an application are performed. The body of the command has an address of an application or data operated by the command, and data to be operated by the command is also added if necessary.
The OS loader 42 receives the command received from the I / F 12 under the control of the OS kernel 41, identifies the OS to which the command belongs from the OS identifier in the command header, and starts up. The activated OS obtains a command type by a command interpreter, writes data to a specified address, or executes an application at a specified address.
The above is the description of the hardware and software configuration of the IC card 10 in the IC card processing apparatus 1.
[0042]
When the IC card 10 having such a hardware configuration and software configuration is mounted on the terminal device 20, the IC card 10 is activated by receiving power and a clock signal from the terminal device 20 via the I / F 12. Then, the IC card 10 performs processing based on a command from the host computer 30 via the terminal device 20.
The terminal device 20 is, for example, a terminal device normally used in a store or the like, and is connected to a host computer 30 of an IC card manufacturing company or a company providing a service via a communication line. And communication data between the attached IC card 10 are transferred.
[0043]
The IC card 10 is mounted on the terminal device 20 and activated, and the IC card itself authenticates, that is, whether the IC card 10 is an IC card that can be processed by the IC card processing device 1. After that, it is checked whether the owner is a valid owner. When the IC card 10 is authorized, the IC card 10 can communicate with the host computer 30 via the terminal device 20. The host computer 30 and the IC card 10 execute instructions to the IC card 10 transmitted from the host computer 30 while sequentially performing communication.
[0044]
Multi-OS IC card processing
A process of processing the multi-OS IC card 10 having the above hardware and software configuration using the above IC card processing apparatus 1 will be described with reference to FIG.
FIG. 8 is a flowchart showing a process of identifying and selecting an IC card OS to be used by the OS loader and starting the IC card 10 using a plurality of OSs according to the embodiment of the present invention.
When the IC card 10 is attached to the terminal device 20, the IC card 10 is activated (step S81). That is, the OS kernel 41 is read into the RAM 14 (or directly referred to in the ROM 15), and data input / output with the host computer 30 via the terminal device 20, authentication processing of the IC card 10, encryption processing, etc. Control the behavior. The OS loader 42 is also read into the RAM 14 and is resident in the RAM 14 while the IC card 10 is attached to the terminal device 20. Each time the IC card 10 receives a command from the host computer 30 via the terminal device 20, the OS loader 42 performs an OS identification process to be used by the command.
[0045]
Next, under the control of the OS kernel 41, an authentication process is performed between the IC card 10 and the terminal device 20 (step S82). For example, if the IC card owner inputs a password and is an authorized owner, and the IC card is found to be an IC card that can be processed by the processing device 1, the host computer 30 requests the owner of the host computer 30. Wait for specification of processing to be performed.
[0046]
Next, when the owner of the IC card 10 inputs from the terminal device 20 and specifies that an operation is performed on a service provided by the host computer 30 (for example, download, execution, etc.), the host computer 30 issues a command to perform the operation. The data is transmitted to the IC card, and the IC card 10 receives the command via the terminal device 20 (step S83).
[0047]
When the IC card 10 receives the command, the OS kernel 41 calls the OS loader 42, interprets the command by the OS loader 42 (step S84), that is, reads the OS identifier in the command header and belongs to the command. Identify the OS.
[0048]
Next, the OS corresponding to the OS identifier is searched from the list of OSs installed in the IC card 10 registered in the OS loader 42, and the storage location and detailed address of the OS are specified (step S85).
[0049]
Next, the necessary system software of the OS stored in the specified location is read into the RAM 14 (or directly executed in the EEPROM 16), and a processing module such as an interpreter of the OS is operated (step S86).
[0050]
Control of command processing shifts to the activated OS, and subsequent processing is performed by control of the OS (step S87). The OS continues to decode the command using the command interpreter, determines the command type from the command type code, obtains an address for operating the command, and obtains write data if necessary.
A specific example of command processing by the IC card OS will be described with reference to FIGS.
After completing the command processing by the IC card OS, the software of the OS leaves the RAM 14, the control returns to the OS kernel 41, and waits for the reception of the next command (step S88).
The above is the description of the process of identifying, selecting, and starting the OS of the multi-OS IC card 10 by the OS loader 42 in the IC card processing apparatus 1.
[0051]
In order to compare the load and execution command processing flow in the conventional single OS IC card shown in FIG. 3, the processing for the same command in the multi-OS IC card 10 described above is shown in FIG. 9 and FIG. Indicated.
FIG. 9 is a flowchart of processing of an IC card when a command for loading an application is received using the multi-OS IC card according to the present invention.
[0052]
When a command is transmitted from the host computer 30 under the management of the OS kernel 41, the command is interpreted by the OS loader 42, and the OS to be used by the command is identified from the OS identifier in the command head (step 91).
[0053]
If the OS is OSa, the OSa system software is read into the RAM 14 (or directly executed in the EEPROM 16), and thereafter, the command is processed under the control of the OSa (step 92).
[0054]
The OSa interprets the command by the command interpreter, and determines the command type from the command type code (step 93). If it is confirmed that the command is a command for downloading the application 1 to the IC card 10, the OSa program loader is operated, and the component of the application 1 transmitted following the load command is authenticated, and the EEPROM 16 is designated. (Step 94).
[0055]
If the OS is OSb, the OSb system software is read into the RAM 14 (or directly executed in the EEPROM 16), and thereafter, the command is processed under the control of the OSb (step 95).
[0056]
The OSb interprets the command by the command interpreter, and determines the command type from the command type code (step 96). When it is confirmed that the command is a command for downloading the application 3 to the IC card 10, the OSb program loader is operated, and the components of the application 3 transmitted following the load command are authenticated and specified in the EEPROM 16. (Step 97).
After the application program is written, OSa or OSb is withdrawn from the RAM 14, and the processing of OSa or OSb ends.
[0057]
FIG. 10 is a flowchart of processing of an IC card when a command for executing an application is received using the multi-OS IC card according to the present invention.
[0058]
When a command is transmitted from the host computer 30 under the management of the OS kernel 41, the command is interpreted by the OS loader 42, and the OS to be used by the command is identified from the OS identifier at the head of the command ( Step 101).
[0059]
If the OS is OSa, the OSa system software is read into the RAM 14 (or directly executed in the EEPROM 16), and thereafter, the command is processed under the control of the OSa (step 102).
[0060]
The OSa decodes the command by the command interpreter and determines the command type from the command type code (step 103). When it is confirmed that the command is a command for executing the application 2 existing in the IC card 10, an address where the application 2 is recorded is obtained from the command content.
Subsequently, the application 2 is searched for in the EEPROM 16 of the IC card 10 by the OSa file manager (step 104). If found, the application 2 is executed (step 105). That is, the application 2 is read into the RAM 14 (or directly executed in the EEPROM 16), and the procedure described in the application 2 is sequentially executed in the CPU 11.
[0061]
If the OS is OSb, the OSb system software is read into the RAM 14 (or directly executed in the EEPROM 16), and thereafter, the command is processed under the control of the OSb (step 106).
[0062]
The OSb interprets the command by the command interpreter and determines the command type from the command type code (step 107). If it is confirmed that the command is a command for executing the application 4 already existing in the IC card 10, the address where the application 4 is recorded is obtained from the command content.
Subsequently, the application 4 is searched for in the EEPROM 16 of the IC card 10 by the OSb file manager (step 108). If found, the application 4 is executed (step 109). That is, the application 4 is read into the RAM 14 (or directly executed in the EEPROM 16), and the procedure described in the application 4 is sequentially executed in the CPU 11.
[0063]
After executing the application 2 or the application 4, the OSa or OSb is withdrawn from the RAM 14, and the processing of the OSa or OSb is ended.
[0064]
The present invention is not limited to the embodiment described above, and various modifications can be made.
In the above-described embodiment, as shown in FIG. 4, the OS loader 42 and the processing modules 43, 44, 45, 46 of each OS are stored in the EEPROM 16. A part may be stored in the ROM. In that case, the OS to be loaded on the IC card and the contents of the OS loader 42 are determined in advance, loaded into the ROM before issuing the IC card, and the loaded OS cannot be modified after issuance.
In the above method, the case where two OSs are mounted is described as an example, but it is obvious that two or more OSs can be mounted in the present invention.
[0065]
Further, in the present embodiment, the present invention has been described by exemplifying a contact type IC card. However, the interface (I / F) 12 is not provided with a terminal, and may be a non-contact type IC card configured to be electromagnetically connected to an external device using a coil.
[0066]
【The invention's effect】
According to the present invention, a plurality of OSs can be mounted on a single IC card, the use of the IC card is greatly expanded, and the convenience in using the IC card is excellent.
Also, by providing an OS loader, each time a command is received, the OS to which the command belongs is identified and selected, and application processing is performed under the control of the OS to which the command belongs. It is not necessary to be aware of the OS to be used within the range of the OS installed in the IC card, and the IC card can be used as if it is a multi-application IC card that can process a plurality of languages on one OS. Excellent versatility and convenience.
In addition, since the OS loader and the OS processing module are recorded in a rewritable EEPROM and the OS loader can be modified, a new OS can be added, and unnecessary OSs can be deleted. Excellent flexibility in use of IC card.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an IC card processing apparatus according to the present invention.
FIG. 2 is a conceptual diagram showing a software configuration of a conventional IC card.
FIG. 3 is a flowchart showing a process of processing a command using the conventional IC card having the software configuration shown in FIG. 2;
FIG. 4 is a conceptual diagram showing a software configuration of an IC card using a plurality of OSs according to the present invention.
FIG. 5 is a diagram showing an arrangement in an EEPROM of an OS loader of an IC card using a plurality of OSs and system software of each OS according to the present invention.
FIG. 6 is a diagram showing a schematic content of an OS loader of an IC card using a plurality of OSs according to the present invention.
FIG. 7 is a schematic diagram showing a format of a command received by an IC card using a plurality of OSs according to the present invention.
FIG. 8 is a flowchart showing the steps of identifying, selecting and starting an IC card OS by an IC card OS loader using a plurality of OSs according to the present invention.
FIG. 9 is a flowchart showing a process of loading an application program onto an IC card in an IC card using a plurality of OSs according to the present invention.
FIG. 10 is a flowchart showing a process of executing an application that already exists in the IC card in the IC card using a plurality of OSs according to the present invention.
[Explanation of symbols]
1 ... IC card processing device
10 ... IC card
11 ... CPU
12 ... Interface (I / F)
13 ... Cryptographic processor
14 ... RAM
15 ... ROM
16: Rewritable non-volatile memory (EEPROM)
20 ... Terminal device
21 ... OS kernel part
22 Interpreter
23 ... Processing module
24 ... Application 1
25 ... Application 2
30: Host computer
41 ... OS kernel part
42 ... OS loader
43 ... interpreter a
44 ... Processing module a
45 ... interpreter b
46 ... Processing module b
47. Application 1
48 ... Application 2
49 ... Application 3
50 ... Application 4

Claims (4)

CPUと、メモリと、外部装置と入出力を行うインタフェースとを有するICカードであって、
該メモリには、少なくとも、該外部装置との入出力を制御するオペレーティング・システムの基本部(OS基本部)と、前記OS基本部を参照しながら、ICカードの所定の機能を提供するアプリケーション・プログラムを実行させ管理する複数のICカードOSと、前記インタフェースを介して外部装置から入力されたコマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動するOSローダとが記憶され、
前記OS基本部の制御の下で前記インタフェースを介して外部装置からのコマンドを受信し、前記OSローダは当該コマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動し、当該ICカードOSによって当該コマンドを実行させる
ICカード。
An IC card having a CPU, a memory, and an interface for performing input / output with an external device,
The memory includes at least a basic part (OS basic part) of an operating system that controls input / output with the external device, and an application that provides a predetermined function of the IC card while referring to the OS basic part. A plurality of IC card OSs that execute and manage programs and an OS loader that decodes a command input from an external device via the interface, identifies an IC card OS that can execute the command, and is activated are stored. ,
The OS loader receives a command from an external device via the interface under the control of the OS basic unit, the OS loader decodes the command, identifies an IC card OS that can execute the command, starts up, An IC card for executing the command by the IC card OS.
前記外部装置から入力されたコマンドには、当該コマンドの実行可能なICカードOSの情報が含まれている
請求項1記載のICカード。
The IC card according to claim 1, wherein the command input from the external device includes information of an IC card OS capable of executing the command.
ICカードの処理を行う外部装置と、該外部装置とデータの入出力を行うICカードとを有するICカード処理装置であって、
前記ICカードはCPUと、メモリと、外部装置と入出力を行うインタフェースとを有し、
前記メモリには、少なくとも、前記外部装置との入出力を制御するオペレーティング・システムの基本部(OS基本部)と、前記OS基本部を参照しながら、ICカード所定の機能を提供するアプリケーション・プログラムを実行させ管理する複数のICカードOSと、前記インタフェースを介して外部装置から入力されたコマンドを解読し、当該コマンドの実行可能なICカードOSを識別して起動するOSローダとが記憶され、
前記外部装置は属するICカードOSの情報を含むコマンドを前記ICカードへ送信し、当該ICカードは前記OS基本部の制御の下で前記インタフェースを介して当該コマンドを受信し、前記OSローダは当該コマンドに含まれているICカードOSの情報を解読し、該ICカードOSを起動し、該ICカードOSを介して当該コマンドを実行させる
ICカード処理装置。
An IC card processing device having an external device for processing an IC card and an IC card for inputting / outputting data to / from the external device,
The IC card has a CPU, a memory, and an interface for performing input / output with an external device,
In the memory, at least a basic part (OS basic part) of an operating system that controls input / output with the external device, and an application program that provides a predetermined function of an IC card while referring to the OS basic part A plurality of IC card OSs that execute and manage and an OS loader that decodes a command input from an external device via the interface, identifies an IC card OS that can execute the command, and is activated,
The external device transmits a command including information of the IC card OS to which the external device belongs to, the IC card receives the command via the interface under the control of the OS basic unit, and the OS loader An IC card processing device that decodes information of an IC card OS included in a command, activates the IC card OS, and executes the command via the IC card OS.
CPUと、メモリと、外部装置と入出力を行うインタフェースとを有し、OS基本部と複数のICカードOSとOSローダとを搭載したICカードの処理方法であって、
前記外部装置は属するICカードOSの情報を含むコマンドを前記ICカードへ送信し、
前記ICカードは前記OS基本部の制御の下で前記インタフェースを介して当該コマンドを受信し、前記OSローダは当該コマンドに含まれているICカードOSの情報を解読し、該ICカードOSを識別して起動し、該ICカードOSによって当該コマンドを実行させる
ICカード処理方法。
A processing method of an IC card having a CPU, a memory, an interface for inputting / outputting to / from an external device, and including an OS basic unit, a plurality of IC card OSs, and an OS loader,
The external device transmits a command including information of the IC card OS to which the external device belongs to the IC card,
The IC card receives the command via the interface under the control of the OS basic unit, and the OS loader decodes the information of the IC card OS included in the command to identify the IC card OS. The IC card processing method of starting and executing the command by the IC card OS.
JP2001266292A 2001-09-03 2001-09-03 IC card, IC card processing apparatus and processing method using a plurality of OSs Expired - Fee Related JP4742469B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001266292A JP4742469B2 (en) 2001-09-03 2001-09-03 IC card, IC card processing apparatus and processing method using a plurality of OSs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001266292A JP4742469B2 (en) 2001-09-03 2001-09-03 IC card, IC card processing apparatus and processing method using a plurality of OSs

Publications (2)

Publication Number Publication Date
JP2003076954A JP2003076954A (en) 2003-03-14
JP4742469B2 true JP4742469B2 (en) 2011-08-10

Family

ID=19092619

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001266292A Expired - Fee Related JP4742469B2 (en) 2001-09-03 2001-09-03 IC card, IC card processing apparatus and processing method using a plurality of OSs

Country Status (1)

Country Link
JP (1) JP4742469B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4717329B2 (en) * 2003-03-14 2011-07-06 キヤノン株式会社 Digital signature generator
JP3958243B2 (en) 2003-04-14 2007-08-15 松下電器産業株式会社 IC card and its OS startup method
US7559468B2 (en) 2004-05-24 2009-07-14 Panasonic Corporation Reader/writer secure module access control method
DE102006021382B4 (en) * 2006-05-08 2015-08-20 Giesecke & Devrient Gmbh Personalization of portable data carriers
JP2009086930A (en) * 2007-09-28 2009-04-23 Toppan Printing Co Ltd Operating system start control device, operating system start control method, recording medium, and embedded device
JP4888742B2 (en) * 2009-02-25 2012-02-29 ソニー株式会社 Information processing apparatus and method, and program
JP2011118837A (en) * 2009-12-07 2011-06-16 Sony Corp Information processing device, information processing method and program
US9575777B2 (en) * 2011-03-08 2017-02-21 Sony Corporation Information processing device for performing contactless communication with an external device using multiple communication standards
JP6515850B2 (en) * 2012-01-17 2019-05-22 ソニー株式会社 INFORMATION PROCESSING APPARATUS, IC CHIP, INFORMATION PROCESSING METHOD, PROGRAM, AND INFORMATION PROCESSING SYSTEM
JP5910297B2 (en) * 2012-01-17 2016-04-27 ソニー株式会社 Information processing apparatus, IC chip, information processing method, program, and information processing system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02280229A (en) * 1989-04-21 1990-11-16 Nec Corp System for executing program
JPH05224894A (en) * 1991-11-19 1993-09-03 Hitachi Ltd Switching system for os
JP3149904B2 (en) * 1995-06-14 2001-03-26 日本電気株式会社 OS switching device

Also Published As

Publication number Publication date
JP2003076954A (en) 2003-03-14

Similar Documents

Publication Publication Date Title
EP0451936B1 (en) Program control system for portable data storage device
US7191288B2 (en) Method and apparatus for providing an application on a smart card
US6390374B1 (en) System and method for installing/de-installing an application on a smart card
EP0985202B1 (en) Multi-application ic card with delegation feature
US20050184164A1 (en) Method and apparatus for installing an application onto a smart card
JP2000514584A (en) Microcontroller using high-level programming language
JP2004272400A (en) Memory card
CN1316360C (en) Techniques for permitting access across a context barrier on a small footprint device using run time environment privileges
CN105653470A (en) Mobile communication device and method for swapping mifare applications
CN100353324C (en) Techniques for permitting access across a context barrier in a small footprint device using shared object interfaces
JP4742469B2 (en) IC card, IC card processing apparatus and processing method using a plurality of OSs
US8082395B2 (en) Portable electronic device
CN107798256B (en) Smart card based on cryptographic algorithm separation storage and design method
JP3515417B2 (en) Methods and apparatus for creating objects in non-persistent memory and methods for maintaining accessibility to objects
JP7439798B2 (en) Electronic information storage medium, application selection processing method, and program
JP2001283160A (en) Ic card and device and method for updating ic card
JP2001067210A (en) IC card and method of installing application on IC card
JP5202634B2 (en) Mobile communication device and method for defragmenting MIFARE memory
WO2001016865A1 (en) System and method for installing/de-installing an application on a smart card
JP2002351567A (en) Program control device and method, and program
CA2545292C (en) A method for writing data and applications into identification media
EP3926504B1 (en) Hiding and unhiding java card applet instances
JP3788886B2 (en) IC card and IC card using device
JP7206942B2 (en) Electronic information storage medium, IC chip, initial setting method, and initial setting program
JP2002244865A (en) Data processing method and semiconductor circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080514

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110406

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110412

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110425

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

Free format text: PAYMENT UNTIL: 20140520

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees