[go: up one dir, main page]

JP4185715B2 - IC card and IC card program - Google Patents

IC card and IC card program Download PDF

Info

Publication number
JP4185715B2
JP4185715B2 JP2002189932A JP2002189932A JP4185715B2 JP 4185715 B2 JP4185715 B2 JP 4185715B2 JP 2002189932 A JP2002189932 A JP 2002189932A JP 2002189932 A JP2002189932 A JP 2002189932A JP 4185715 B2 JP4185715 B2 JP 4185715B2
Authority
JP
Japan
Prior art keywords
program
application
information
card
association
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2002189932A
Other languages
Japanese (ja)
Other versions
JP2004030532A (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 JP2002189932A priority Critical patent/JP4185715B2/en
Publication of JP2004030532A publication Critical patent/JP2004030532A/en
Application granted granted Critical
Publication of JP4185715B2 publication Critical patent/JP4185715B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数のアプリケーションを登録することが可能なICカード、及び、登録されているアプリケーションがICカードのハードウェアを利用するためにCPUを実行させるICカードプログラムに関するものである。
【0002】
【従来の技術】
従来のICカードに搭載されているオペレーティングシステム(以下、「オペレーティングシステム」を「OS」という。)は、以下の2種類に分類することができる。一方は単一のアプリケーションをICカードで利用できるようにするためのシングルアプリケーションOSであり、他方は複数のアプリケーションを利用できるようにするマルチアプリケーションOSである。
シングルアプリケーションOSを搭載したシングルアプリケーションICカードは、ほとんどのプログラムが内容を書換えることができない読出し専用メモリ(ROM)に記憶されており、読み出し及び書換え可能な不揮発性メモリ(EEPROM)のメモリ領域のほとんどは、データを記憶する領域として使用されている。従って、シングルアプリケーションICカードでは、容量あたりのコストが高いEEPROMに大きな容量が必要とされず、チップ価格が安価であるため、そのICカード価格は、低廉である。
【0003】
一方、MULTOSカード、JAVAカード(「JAVA」は登録商標)等のマルチアプリケーションOSを搭載したマルチアプリケーションICカードは、EEPROMにプログラム及びデータを含む複数のアプリケーションを格納し、ユーザ独自の機能を備える独自プログラムを登録することができるため、利便性が高い。なお、登録とは、利用できるように記憶することであって、認証等のための一時的な記憶を含まない。
【0004】
【発明が解決しようとする課題】
しかし、シングルアプリケーションICカード及びマルチアプリケーションICカードは、以下の問題があった。
シングルアプリケーションICカードは、複数のアプリケーションを登録することができないため、拡張性及び利便性に欠けるという問題があった。
【0005】
一方、マルチアプリケーションICカードは、容量あたりのコストが高価なEEPROMに複数のアプリケーションを格納するため、シングルアプリケーションICカードよりも容量の大きいEEPROMを備える必要があり、ICカード価格が高価になるという問題があった。
更に、マルチアプリケーションICカードは、アプリケーション毎にEEPROMへ記憶するため、異なるアプリケーションに同一のプログラムコードが含まれる場合であっても、それぞれのアプリケーションの機能として個別にEEPROMに記憶しなければならず、大変不経済である。
【0006】
本発明の課題は、シングルアプリケーションICカード及びマルチアプリケーションICカードのメリットを有する、つまり、製造コストの低減を図ることができ、利便性の高いICカード及びICカードプログラムを提供することである。
【0007】
【課題を解決するための手段】
本発明は、以下のような解決手段により、前記課題を解決する。なお、理解を容易にするために、本発明の実施形態に対応する符号を付して説明するが、これに限定されるものではない。すなわち、請求項1の発明は、複数のアプリケーションにおいて共通し、各アプリケーション内で実行されるプログラムである共通プログラムを記憶し、読み出し専用であって不揮発性の第1の記憶部(15)と、メモリ領域がプログラム領域(17p)と、データ領域(17d)とに割り当てられ、個々のアプリケーションに独自のプログラムである独自プログラムをプログラム領域に、アプリケーションデータをデータ領域に、互いに関連づけて記憶する、書き換え可能な不揮発性の第2の記憶部(17−2)とを備え、前記共通プログラム、前記独自プログラム及び前記アプリケーションデータを含む複数のアプリケーションを登録することが可能なICカードであって、独自プログラムを含む独自プログラム登録要求又はアプリケーションデータを含むアプリケーションデータ登録要求を受信する登録要求受信手段(11)と、前記登録要求受信手段によって受信された前記独自プログラム又はアプリケーションデータを前記第2の記憶部の所定の領域に書き込む登録要求情報書込手段(148)と、前記登録要求情報書込手段によって前記第2の記憶部の所定の領域に書き込まれた前記独自プログラム又は前記アプリケーションデータに基づいて、前記アプリケーションを識別するアプリケーション識別情報、独自プログラム識別情報、及び、前記独自プログラムが記憶されている場所を示す場所情報を含む管理情報を作成する管理情報作成手段とを備えること、を特徴とするICカード(1−2)である。
【0008】
請求項2の発明は、請求項1に記載のICカードにおいて、前記登録要求受信手段によって受信される独自プログラム又はアプリケーションデータを前記第2の記憶部に記憶されているいずれのアプリケーションデータ又はいずれの独自プログラムに関連づけるかを示す関連づけ情報を受信する関連づけ情報受信手段(11)と、前記関連づけ情報受信手段によって受信される関連づけ情報が正当であるか否かを判定する関連づけ正当性判定手段(147)とを備え、前記登録要求情報書込手段は、前記関連づけ正当性判定手段によって肯と判定された場合に書き込みを行うこと、を特徴とするICカード(1−2)である。
【0009】
請求項3の発明は、請求項2に記載のICカードにおいて、前記第2の記憶部は、アプリケーション識別情報を、同一のアプリケーションに含まれる前記プログラム領域に記憶されている独自プログラムと、前記データ領域に記憶されているアプリケーションデータとに結びつけて記憶し、前記関連づけ情報受信手段は、関連づけ情報として、前記アプリケーション識別情報を受信すること、を特徴とするICカード(1−2)である。
【0010】
請求項4の発明は、請求項3に記載のICカードにおいて、前記関連づけ情報受信手段によって受信されたアプリケーション識別情報と同一のアプリケーション識別情報が前記第2の記憶部に記憶されているか否かを判定する登録済判定手段(144)と、前記関連づけ情報受信手段によって受信される関連づけ情報に対応する関連づけ正当性認証情報を受信する関連づけ正当性認証情報受信手段(11)とを備え、前記関連づけ正当性判定手段は、前記登録済判定手段によって記憶されていると判定された場合に、前記第2の記憶部に記憶されている同一のアプリケーション識別情報に対応する登録関連づけ正当性認証情報と、前記関連づけ正当性認証情報受信手段によって受信された関連づけ正当性認証情報とを照合することによって判定を行うこと、を特徴とするICカード(1−2)である。
【0011】
請求項5の発明は、請求項1から請求項4までのいずれか1項に記載のICカードにおいて、前記登録要求受信手段によって受信される独自プログラム又はアプリケーションデータが正当なものであるか否かを判定する登録要求情報正当性判定手段(146)を備え、前記登録要求情報書込手段は、前記登録要求情報正当性判定手段によって肯と判定された場合に書き込みを行うこと、を特徴とするICカード(1−2)である。
【0012】
請求項6の発明は、請求項1から請求項5までのいずれか1項に記載のICカードにおいて、前記第2の記憶部は、前記プログラム領域及び/又は前記データ領域の空き容量を示す領域空き容量情報、及び/又は、前記登録要求情報書込手段が独自プログラム又はアプリケーションデータを書き込む位置を示す書込位置情報を記憶すること、を特徴とするICカード(1−2)である。
【0013】
請求項7の発明は、複数のアプリケーションにおいて共通し、各アプリケーション内で実行されるプログラムである共通プログラムを記憶し、読み出し専用であって不揮発性の第1の記憶部(15)と、メモリ領域がプログラム領域(17p)と、データ領域(17d)とに割り当てられ、個々のアプリケーションに独自のプログラムである独自プログラムをプログラム領域に、アプリケーションデータをデータ領域に、互いに関連づけて記憶する、書き換え可能な不揮発性の第2の記憶部(17−2)と、前記第1及び/又は第2の記憶部に記憶されているプログラムを実行するCPU(14)とを備え、前記共通プログラム、前記独自プログラム及び前記アプリケーションデータを含む複数のアプリケーションを登録することが可能なICカードへアプリケーションを登録するために前記CPUに実行させるICカードプログラムであって、独自プログラムを含む独自プログラム登録要求又はアプリケーションデータを含むアプリケーションデータ登録要求を受信する登録要求受信手順(S209、S306)と、前記登録要求受信手順において受信した前記独自プログラム又は前記アプリケーションデータを前記第2の記憶部の所定の領域に書き込む登録要求情報書込手順(S210、S307)と、前記登録要求情報書込手順によって前記第2の記憶部の所定の領域に書き込んだ前記独自プログラム又は前記アプリケーションデータに基づいて、前記アプリケーションを識別するアプリケーション識別情報、独自プログラム識別情報、及び、前記独自プログラムが記憶されている場所を示す場所情報を含む管理情報を作成する管理情報作成手順(S213)とを備えること、を特徴とするICカードプログラムである。
【0014】
請求項8の発明は、請求項7に記載のICカードプログラムにおいて、前記登録要求受信手順において受信する独自プログラム又はアプリケーションデータを前記第2の記憶部に記憶されているいずれのアプリケーションデータ又はいずれの独自プログラムに関連づけるかを示す関連づけ情報を受信する関連づけ情報受信手順(S203、S303)と、前記関連づけ情報受信手順において受信する関連づけ情報の正当性を認証するための関連づけ正当性認証情報を受信する関連づけ正当性認証情報受信手順(S203、S303)と、前記関連づけ情報受信手順において受信する関連づけ情報が正当であるか否かを前記関連づけ正当性認証情報受信手順で受信した関連づけ正当性認証情報に基づいて判定する関連づけ正当性判定手順(S205、S305)とを備え、前記登録要求情報書込手順は、前記関連づけ正当性判定手順において正当であると判定した場合に実行されること、を特徴とするICカードプログラムである。
【0015】
請求項9の発明は、請求項7又は請求項8に記載のICカードプログラムにおいて、前記登録要求受信手順において受信する独自プログラム又はアプリケーションデータが正当なものであるか否かを判定する登録要求情報正当性判定手順(S202、S302)を備え、前記登録要求情報書込手順は、前記登録要求情報正当性判定手順において正当なものと判定した場合に実行されること、を特徴とするICカードプログラムである。
【0016】
【発明の実施の形態】
以下、図面等を参照しながら、本発明の実施の形態について、更に詳しく説明する。
(第1実施形態)
図1は、本発明によるICカードの第1実施形態を説明するための図であって、図1(a)は表面図、図1(b)及び図1(c)はICチップ内部及びCPUを示すブロック図である。
図1に示すように、ICカード1は、接触型のICチップ10を備えている。ICカード1は、図示しない外部装置である接触式のリーダライタ(以下、「リーダライタ」を「R/W」という。)から電源の供給を受け、通信を行う、複数のアプリケーションを登録することが可能なマルチアプリケーションICカードである。ICカード1は、所定のプログラムの実行を要求する命令であるコマンドをR/Wから受信すると、このコマンドを解釈実行し、その結果をレスポンスとしてR/Wへ送信する。
【0017】
アプリケーションとは、ユーザの目的を実現するために業務等に応じて作成されたソフトウェアプログラムであって、主にプログラムコードの部分であるプログラム部と、プログラム部の実行に必要な情報であるアプリケーションデータとを含んでいる。プログラム部は、共通プログラムと、ユーザプログラムとを含み、ユーザプログラムは、ユーザが任意に規定した独自のコマンドに対応した処理を行うプログラム等、個々のアプリケーションにおいて独自のプログラムである。なお、ユーザとは、ICカード1に登録されているアプリケーションを利用して業務等を行う銀行、カード会社等である。
【0018】
シングルアプリケーションの場合は、ほとんどの場合、ソフトウェアプログラムを読み出し可能な不揮発性メモリに記録するが、マルチアプリケーションの場合は異なる目的を実現するために複数のソフトウェアプログラムをEEPROMに記録する。
異なる目的を実現するために作成されたソフトウェアプログラムであっても、いくつかの機能、例えばデータを読み出す機能やパスワードを照合する機能は、共通している場合が多い。特に最近では、業種間で規格を制定するケースが増え、業務種により共通化できるプログラム(共通プログラム)が増えている。
一方、同じ業種間でも同業者との差別化を図るべく、業種規格に加えて、ある会社独自のプログラム(ユーザプログラム)が必要とされるケースも増えている。
【0019】
共通プログラムとは、例えば、R/Wより受け取ったコマンドを解析するプログラム、R/Wにデータを送信するプログラム、ユーザプログラムのコードを不揮発性メモリ17に書込むプログラム、データの読み書き、パスワード照合等のISO7816に規格化されているコマンドに対応した処理を行うプログラム等のICカード1に登録されている複数のアプリケーションが共通に使用できるプログラムである。
【0020】
ICチップ10は、カード表面に、信号及び電力を送受信する通信手段である接触端子11と、R/Wとの通信を制御する送受信回路12と、マイクロプロセッサ13とを備えている。
マイクロプロセッサ13は、CPU14、3つのメモリ15,16,17等を備えている。CPU14は、メモリに記憶されているプログラムを実行することによってICカード1を統括制御し、アプリケーション選択部141、正当性判定部142及びプログラム実行部143を実現する。
【0021】
アプリケーション選択部141は、R/Wから受信したアプリケーション選択要求に対応してアプリケーションの選択を実行する。アプリケーションの選択とは、アプリケーション選択要求で指定されるアプリケーションデータを含むファイルを識別する識別情報をRAM16に保持し、カレントファイル等のコマンドのアクセス対象を設定することである。
正当性判定部142は、R/Wからプログラム実行要求であるコマンドを受信した場合に、アプリケーション選択部141によって選択されたアプリケーションがこのコマンドに対応するプログラムの実行等のアクセスをすることができる正当なアプリケーションであるか否かを判定する。
プログラム実行部143は、正当性判定部142が正当なアプリケーションであると判定した場合に、コマンドに対応するユーザプログラム又は共通プログラムを実行する。
【0022】
3つのメモリは、それぞれ読み出し専用であって、電源が切れてもデータが消去されない不揮発性のメモリであるROM15、読み出し及び書換え可能であって、電源が切れるとデータが消去されてしまう揮発性のメモリであるRAM16、EPROM、EEPROM等の読み出し及び書換えが可能な不揮発性メモリ17である。本実施形態におけるメモリ容量は、ROM15が16Kバイト、RAM16が1Kバイト、不揮発性メモリ17が8Kバイトである。
【0023】
ROM15は、ICチップ製造時に記憶されたOS、実行環境等のICカード1が動作するために必要な機能(プログラム)を記憶している。また、ROM15は、種別毎に一の共通プログラムを記憶している。この共通プログラムは、すべてのアプリケーションで使用できる。
RAM16は、OSが動作するために必要な情報が逐次書き込まれるCPU14の作業領域であって、プログラム等は、記憶されていない。
不揮発性メモリ17は、ユーザプログラム、アプリケーションデータ等を記憶している。
【0024】
図2は、書き換え可能な不揮発性メモリのメモリ構造図である。
図2に示すように、不揮発性メモリ17のメモリ領域は、OSの管理のもとで、ユーザが利用できない使用禁止領域と、ユーザが利用可能なデータ領域17d及びプログラム領域17pとに割り当てられている。データ領域17d及びプログラム領域17pには、それぞれ、アプリケーションデータ及びユーザプログラムが記憶されている。本実施形態では、不揮発性メモリ17においてユーザが利用できる領域は、アドレスが「0100H〜1FFFH」の領域に、プログラム領域17pは「0100H〜0FFFH」に、データ領域17dは「1000H〜1FFFH」にそれぞれ割り当てられている。
【0025】
図3は、書き換え可能な不揮発性メモリのデータ領域を示すメモリ構造図である。
図3に示すように、不揮発性メモリ17のデータ領域17dには、情報が階層構造を構成するように格納されている。専用ファイルDF(DedicatedFile)は、通常、アプリケーション毎に設定されている。不揮発性メモリ17は、アプリケーションデータをこの専用ファイルの下に関連づけて記憶している。
【0026】
専用ファイルは、少なくともICカード1に格納されている他の専用ファイルから識別するためのDF識別情報を付属情報として格納している。DF識別情報は、専用ファイル名と、アプリケーションIDとを含み、専用ファイル名は、アプリケーションの名前を示す値であって、1〜16バイトの値をユーザが設定する。アプリケーションIDは、OSの管理下において一のアプリケーションを少なくともICカード1に格納されている他のアプリケーションから識別するための情報であって、アプリケーションの種別毎に設けられている。なお、アプリケーションIDの設定方法は、任意である。
【0027】
図4は、DF識別情報を説明するための図である。
図4(a)に示すように、ICカード1には、ユーザA社のアプリケーションAと、ユーザB社のアプリケーションBが登録され、不揮発性メモリ17のデータ領域には、アプリケーションA用の専用ファイルと、アプリケーションB用の専用ファイルが格納されている。
【0028】
例えば、ポイントカードアプリケーションに含まれる、複数の店舗にそれぞれ対応する専用ファイル等、アプリケーションAに含まれる複数の専用ファイル(DF1,DF2,DF3)のアプリケーションIDは、アプリケーションAを示す「A0」となる。DF1、DF2及びDF3は、DF識別情報がそれぞれ「APA1A0」、「APA2A0」、「APA3A0」であり、店舗毎のポイント等のアプリケーションAの処理において使用されるアプリケーションデータを格納している。
【0029】
また、アプリケーションBに含まれる複数の専用ファイル(DF4,DF5)のアプリケーションIDは、アプリケーションBを示す「B0」となる。DF4及びDF5は、DF識別情報がそれぞれ「APB1B0」、「APB2B0」であり、アプリケーションBの処理において使用されるアプリケーションデータを格納している。本実施形態では、アプリケーションIDを1バイトとしているが、これに限られず、2バイト等、これ以上であってもよく、データサイズは任意である。
【0030】
図4(b)に示すように、A社が、例えば、ポイントカードアプリケーションA、クレジットアプリケーションAA等の種類の異なる複数のアプリケーションをICカード1に登録したい場合には、A社は、それぞれのアプリケーションに使用するための専用ファイルを個別に作成し、異なったアプリケーションID「A0」、「A1」がそれぞれ設定される。このアプリケーションIDの違いから、OSの処理下におけるCPU14は、アプリケーションAと、アプリケーションAAとを異なったアプリケーションと認識する。
【0031】
次に、書き換え可能な不揮発性メモリのプログラム領域について説明する。
図5及び図6は、書き換え可能な不揮発性メモリのプログラム領域を示すメモリ構造図である。
図5に示すように、プログラム領域17pは、INDEX領域17piとプログラムコード領域17pcとに分けられ、INDEX領域17piには、INDEX情報が、プログラムコード領域17pcには、ユーザプログラム本体であるプログラムコードが互いに関連づけて、ユーザプログラムの数(n)だけ記憶されている。
INDEX情報は、一のユーザプログラムを少なくともICカード1内の他のユーザプログラムから識別するユーザプログラム識別子(2バイト)、プログラムコードが記憶されている場所を示すプログラム番地(2バイト)、アプリケーションID(1バイト)を含む管理情報である。
【0032】
INDEX情報内のアプリケーションIDは、少なくとも一のアプリケーションをICカード1に登録されている他のアプリケーションから識別するための識別情報であって、DF識別情報と同様にアプリケーションの種別毎に設けられている。このアプリケーションIDが示すアプリケーションにおいてのみユーザプログラムが実行される。つまり、正当性判定部142は、ユーザプログラム実行前に、選択されているアプリケーションを示すアプリケーション識別情報に含まれるアプリケーションIDと、INDEX情報に含まれるアプリケーションIDを比較し、一致する場合のみ、プログラム実行部143は、ユーザプログラムを実行する。
【0033】
例えば、選択されたアプリケーションを示すアプリケーションIDが「A0」の場合には、プログラム実行部143は、INDEX情報に含まれるアプリケーションIDが「A0」のユーザプログラムのみを実行する。プログラム実行部143は、INDEX情報に含まれるアプリケーションIDが「01」、「20」等の異なった値であるユーザプログラムを実行しない。
プログラムコード領域17pcには、ユーザプログラムコード本体が指定されたアドレスから記憶され、この先頭アドレスがINDEX情報に含まれる。
【0034】
図6に示すように、プログラム領域17pには、データ領域17dに記憶されているアプリケーションAの独自コマンドに対応した処理を行うユーザプログラムCAと、アプリケーションBの独自コマンドに対応した処理を行うユーザプログラムCBとが記憶されている。ユーザプログラムCAのINDEX情報は、「00CA020001」であり、「00CA」、「0200」、「01」がそれぞれユーザプログラム識別子、プログラムコードの先頭アドレス及びアプリケーションIDである。このINDEX情報は、ユーザプログラムCAのプログラムコードが不揮発性メモリ17の200番地から記憶され、アプリケーション識別子「01」の示すアプリケーションAにおいてのみ、ユーザプログラムCAが実行されることを示している。
【0035】
同様にユーザプログラムCBのINDEX情報「00CB060002」は、ユーザプログラムCBのプログラムコードが不揮発性メモリ17の600番地から記憶され、アプリケーション識別子「02」の示すアプリケーションBにおいてのみ、ユーザプログラムCBが実行されることを示している。
【0036】
図7は、専用ファイル及びユーザプログラムの相互関係について説明するためのメモリ構造図である。
図7に示すように、データ領域17dには、アプリケーションA用専用ファイル、アプリケーションB用専用ファイル及びアプリケーションC用専用ファイルの3つの専用ファイルが記憶され、プログラム領域17pには、これらアプリケーションでそれぞれ実行されるユーザプログラムA,B及びCが記憶されている。このように、専用ファイル及びユーザプログラムは、DF識別情報に含まれるアプリケーションIDと、ユーザプログラムのINDEX情報に含まれるアプリケーションIDによって関連づけられている。
【0037】
図8及び図9は、本発明によるICカードの発行を説明するための図である。カード発行者がA社及びB社の要求に応じて2つのアプリケーションであるサービスA及びサービスBをICカード1へ登録し、ICカード1を発行する過程を説明する。なお、サービスAに含まれるプログラムは、READ、WRITE等の共通コマンドに対応する処理を行うための共通プログラムと、サービスAの独自コマンドに対応する処理を行うためのユーザプログラムAであり、サービスBに含まれるプログラムは、共通プログラムと、サービスBの独自コマンドに対応する処理を行うためのユーザプログラムBである。
【0038】
先ず、図8及び図9に示すように、カード発行者は、ユーザプログラムを登録する所定の専用コマンドをR/WからICカード1へ送信することによってユーザプログラムA及びユーザプログラムBを不揮発性メモリ17へ登録する。この登録によって、プログラム領域17pにユーザプログラムA及びユーザプログラムBのINDEX情報及びプログラムコードが記憶される。
【0039】
次いで、カード発行者は、共通コマンドをR/WからICカード1へ送信することによって、ユーザプログラムA及び共通プログラムが使用するアプリケーションデータが格納されているデータファイルA1をアプリケーションA用の専用ファイル(DF名は、APPAである。)に関連づけて不揮発性メモリ17のデータ領域17dに形成する。同様に、カード発行者は、データファイルA2をアプリケーションB用の専用ファイル(DF名は、APPB)に関連づけてデータ領域17dに形成し、ICカード1を発行する。なお、INDEX情報及びデータファイルに含まれるアプリケーションIDは、アプリケーション登録前に予め設定してもよいし、ICカード1がユーザプログラム等の登録情報を受信後に割り当ててもよい。
【0040】
図10は、本発明によるICカードの動作及び本発明によるICカードプログラムの第1実施形態を示すフローチャートである。なお、ICカード1には、サービスA及びサービスBの2つのアプリケーションが登録されている。
ステップ100(以下、「ステップ」を「S」という。)において、カード所有者は、サービスAを動作させることのできる所定のR/WにICカード1を挿入する。
【0041】
S101においてICカード1は、開始処理を行う。具体的には、ICカード1は、R/Wと通信を行い、活性化され、R/Wからの命令を受付けることができる状態となる。また、ICカード1は、R/WからサービスAを選択するコマンドを受信し、アプリケーション選択部141は、RAM16内部にDF名「APPA」及びアプリケーションID「01」のデータを保持することによってサービスAを選択する(S102)。
【0042】
S103において、ICカード1は、R/Wから所定のフォーマットのコマンド「00CA0123456789ABCDEF」を受信する。本実施形態におけるコマンドのフォーマットは、2バイト長のユーザプログラム識別子と、8バイト長のデータ(長さは任意である。)との構成である。
正当性判定部142は、受信した2バイトのユーザプログラム識別子「00CA」をINDEX情報内で探索し、同一のユーザプログラム識別子を有するユーザプログラムがあるか否かを判定する。
本実施形態においては、不揮発性メモリ17のプログラム領域に記憶されているユーザプログラムAのユーザプログラム識別子が「00CA」であるため、正当性判定部142は、肯と判定する。
【0043】
次に、正当性判定部142は、ユーザプログラムAのINDEX情報に含まれるアプリケーションID及びS101で選択したアプリケーションを示すアプリケーションIDが一致するか否かを判定する(S105)。双方ともに「01」であるため、正当性判定部142は、肯と判定し、プログラム実行部143は、INDEX情報内のプログラムコード先頭アドレスを参照してユーザプログラムAを実行し(S106)、その結果をレスポンスとしてR/Wへ送信し(S110)、処理を終了する(S111)。
【0044】
一方、S104において、否と判定した場合には、正当性判定部142は、ROM15を探索し、ユーザプログラム識別子が一致する共通プログラムがあるか否かを判定する(S107)。一致する共通プログラムがあった場合には、プログラム実行部143は、その共通プログラムを実行し(S109)、一致する共通プログラムがない場合には、エラーとなり(S108)、ICカード1は、その結果をレスポンスとしてR/Wへ送信し(S110)、処理を終了する(S111)。
【0045】
また、S105において、アプリケーションIDが一致しない場合、例えばS101でアプリケーションIDが「02」であるサービスBが選択されているときには、ICカード1は、ユーザプログラム識別子が一致する共通プログラムがあるか否かを判定する(S107)。一致する共通プログラムがあった場合には、プログラム実行部143は、その共通プログラムを実行し(S109)、一致する共通プログラムがない場合には、エラーとなり(S108)、ICカード1は、その結果をレスポンスとしてR/Wへ送信し(S110)、処理を終了する(S111)。
【0046】
本実施形態によれば、ICカード1は、不揮発性メモリ17にユーザプログラム及びアプリケーションデータを記憶し、ROM15に共通プログラムを記憶することによって複数のアプリケーションを登録するため、従来のマルチアプリケーションICカードと比べて不揮発性メモリ17の容量を低く抑え、利便性を高く維持しつつ、製造コストの低減を図ることが可能となった。
また、種別毎に一の共通プログラムを記憶することによって、共通プログラムをアプリケーション毎に記憶する必要がないため、メモリ全体の容量を低く抑え、製造コストの低減を図ることが可能となった。
更に、ICカード1は、共通プログラム、ユーザプログラム及びアプリケーションデータを分けて登録するため、汎用性を向上するとともに、利便性の向上を図ることが可能となった。
【0047】
更に、正当性判定部142は、R/Wから受信したコマンドに対応するユーザプログラムのINDEX情報に含まれるアプリケーション識別情報と、選択されているアプリケーションを示すアプリケーション識別情報とを比較し、正当なアプリケーションであるか否かを判定するため、アクセス権限のない不当なアプリケーションによるユーザプログラムの実行を防止し、セキュリティ性の向上を図ることが可能となった。
【0048】
(第2実施形態)
図11は、本発明によるICカードの第2実施形態を説明するための図であって、図11(a)は表面図、図11(b)及び図11(c)はICチップ内部及びCPUを示すブロック図である。
なお、前述した第1実施形態と同様の機能を果たす部分には、同一の符号を付して、重複する説明を適宜省略する。
図11に示すように、第2実施形態におけるICカード1−2は、CPU14−2と、書き換え可能な不揮発性メモリ17−2とを備えている。カード所有者は、ICカード1−2を図示しない外部装置である書込装置のR/Wに挿入することによって、ICカード1−2にユーザが提供するアプリケーションを登録することができる。書込装置は、ユーザプログラム又はアプリケーションデータを含み、ユーザプログラム又はアプリケーションデータのICカード1−2への登録を要求する登録要求である登録コマンド等をICカード1−2へ送信することによって、このユーザプログラム、アプリケーションデータを含むアプリケーションの登録を行う。
【0049】
CPU14−2は、登録済判定部144と、容量判定部145と、登録要求情報正当性判定部146と、関連づけ正当性判定部147と、登録要求情報書込部148とを備えている。CPU14−2は、ROM15、不揮発性メモリ17−2に記憶されているOS等のプログラムを実行することによって、これらの各部を実現する。
登録済判定部144は、アプリケーションIDを含む第2認証コマンド(後述する)をR/Wから受信した場合に、このアプリケーションIDと同一のアプリケーションIDが不揮発性メモリ17−2に登録されているか否かを判定する登録済判定処理を行う。
【0050】
容量判定部145は、不揮発性メモリ17−2のプログラム領域17p又はデータ領域17dに、R/Wから受信するユーザプログラム又はアプリケーションデータを書き込むことができる空き容量があるか否かを、受信したこのユーザプログラム又はアプリケーションデータのデータ量と、不揮発性メモリ17−2に記憶されている空き容量とを照合することによって判定する容量判定処理を行う。本実施形態において、容量判定部145は、ユーザプログラム又はアプリケーションデータのデータ量を含み、この処理の実行を要求する容量判定要求である容量判定コマンドを書込装置から受信した場合に処理を行う。
【0051】
登録要求情報正当性判定部146は、書込装置等の登録要求パスワードの送信元がユーザプログラム又はアプリケーションデータ等の登録要求情報を登録する権限を有するか否か、つまり、この登録要求情報が正当なものであるか否かを受信した登録要求パスワードと、不揮発性メモリ17−2に記憶されている登録権限認証情報とを照合して判定する登録要求情報正当性判定処理を行う。
本実施形態において、登録要求情報正当性判定部146は、登録要求パスワードを含み、この処理の実行を要求する登録要求情報正当性判定要求である第1認証コマンドを書込装置から受信した場合にこの処理を行う。なお、登録要求情報正当性判定部146が正当と判定した場合には、ICカード1−2は、登録権限が認証済であることを示すフラグを立てる。
【0052】
関連づけ正当性判定部147は、書込装置等のアプリケーションID及びID利用パスワードの送信元がこのアプリケーションIDを正当に利用できるものであるか否かを、受信したID利用パスワードと、不揮発性メモリ17に記憶されているID登録パスワードとを照合して判定する。つまり、関連づけ正当性判定部147は、この判定を行うことによって、受信したアプリケーションIDが、登録要求に含まれるユーザプログラム又はアプリケーションデータと、不揮発性メモリ17−2に記憶されているアプリケーションデータ又はプログラム領域17pに記憶されているユーザプログラムとを関連づけるべき正当なものか否かを判定する関連づけ正当性判定処理を行う。
【0053】
本実施形態において、関連づけ正当性判定部147は、アプリケーションID及びID利用パスワードを含み、この処理の実行を要求する関連づけ正当性判定要求である第2認証コマンドを書込装置から受信し、登録済判定部144が肯と判定した場合に処理を行う。なお、関連づけ正当性判定部147が正当と判定した場合又は登録済判定部144が否と判定した場合には、ICカード1−2は、受信したアプリケーションIDが認証済であることを示すフラグを立てる。
【0054】
登録要求情報書込部148は、ユーザプログラム又はアプリケーションデータを含む登録コマンドを受信した場合であって、登録権限が認証済であることを示すフラグ及びアプリケーションIDが認証済であることを示すフラグが双方ともに立っているときに、登録コマンドに含まれる登録要求情報であるユーザプログラム又はアプリケーションデータを不揮発性メモリ17−2のプログラムコード領域17pc又はデータ領域17dに書き込む登録要求情報書込処理を行う。
【0055】
図12は、書き換え可能な不揮発性メモリのメモリ構造図である。
図12に示すように、第2実施形態における不揮発性メモリ17−2のメモリ領域は、OSの処理に必要な情報、カードが動作するために必要な情報等を記憶するシステム領域17sと、データ領域17dと、プログラム領域17pとにOSの管理のもとに割り当てられている。
本実施形態では、図12(b)に示すように、システム領域17sは「0000H〜05FFH」に、プログラム領域17pは「0600H〜13FFH」に、データ領域17dは「1400H〜1FFFH」にそれぞれ割り当てられている。
【0056】
図13に示すように、データ領域17dには、付属情報としてDF識別情報が格納されているDF1及びDF2と、この専用ファイルの下にアプリケーションデータを格納しているデータファイル1−1,1−2、2−1,2−2とが記憶されている。ICカード1−2に登録されているアプリケーションは、DFによって定義され、アプリケーション選択要求によってそのアプリケーションを定義しているDFが選択されることによって、アプリケーション選択部141は、実行するアプリケーションを選択する。
【0057】
図14は、第2実施形態における書き換え可能な不揮発性メモリのシステム領域を示すメモリ構造図である。
図14に示すように、システム領域17sには、OSが動作するために必要な基本情報であるOS管理情報(D10)と、登録権限認証情報(D21)及び第1不成功回数(D22)を含む登録認証管理情報(D20)と、アプリケーションID(D31)、ID登録パスワード(D32)及び第2不成功回数(D33)を含むAC認証情報(D30)とを含む管理情報が隠匿に記憶されている。また、システム領域17sには、プログラム領域空き容量(D41)と、次ユーザプログラム登録アドレス(D42)とが記憶されている。
【0058】
登録権限認証情報(D21)は、登録要求情報正当性判定部146による登録要求情報正当性判定処理において、登録要求パスワードと照合される参照情報である。
第1不成功回数(D22)は、この登録権限認証情報(D21)に基づく認証が不成功であっても、再認証を要求できる回数であって、登録要求情報正当性判定部146の判定結果が否となった場合に1減算される。なお、不成功回数が「0」になると、ICカード1−2は、認証を受け付けない閉塞状態となる。
AC認証情報(D30)は、ICカード1−2に登録されているアプリケーションのアプリケーションID(D31)毎に、ID登録パスワード(D32)及び不成功回数(D33)を結びつけた情報であって、アプリケーションID(D31)の認証を管理するための関連づけ管理情報である。
【0059】
ID登録パスワード(D32)は、関連づけ正当性判定部147の関連づけ正当性判定処理において、関連づけ正当性認証情報であるID利用パスワードと照合される登録関連づけ正当性認証情報であって、書込装置等のこのID利用パスワードの送信元がアプリケーションID(D31)の正当な利用者であることを認証するためのID利用権限認証情報である。ICカード1−2に登録されているID登録パスワード(D32)は、例えば、このアプリケーションID(D31)が示すアプリケーションを正当に利用できるユーザのみが知りうるパスワードである。
第2不成功回数(D33)は、第1不成功回数(D22)と同様に、このID登録パスワード(D32)に基づく認証が不成功であっても、再認証を要求できる回数である。
【0060】
領域空き容量(D41)は、INDEX領域17pi並びにプログラムコード領域17pc及びデータ領域17dの空き容量を示し、次ロードアドレス(D42)は、登録要求情報書込部148がプログラム領域17pcにユーザプログラムを書き込む空き領域の先頭アドレスと、データ領域17dにアプリケーションデータを書き込む空き領域の先頭アドレスとを示している。
【0061】
次に、アプリケーションを登録する場合のICカード1−2の動作について説明する。
図15は、本発明によるICカードの第2実施形態における動作及び本発明によるICカードプログラムの第2実施形態を示すフローチャートであって、ユーザプログラムをICカード1−2に登録するユーザプログラム登録処理を示している。
また、図16は、ユーザプログラム登録処理前の書き換え可能な不揮発性メモリのメモリ構造図であり、図17及び図18は、ユーザプログラム登録処理前、処理中、処理後のシステム領域17s及びプログラム領域17pを示すメモリ構造図である。
【0062】
以下、ICカード1−2にA社及びB社のそれぞれのアプリケーションであるアプリケーションA(アプリケーションIDは「01」、アプリケーションデータを格納するDFのDF名は「APPA」)及びアプリケーションB(アプリケーションIDは「02」、DF名は「APPB」)を登録する場合について、ICカード1−2の処理を中心に説明する。
なお、アプリケーションAに含まれるユーザプログラムのユーザプログラム識別子は「CA00」、ユーザプログラムの容量は512バイトであり、アプリケーションBに含まれるユーザプログラムのユーザプログラム識別子は「CB00」、容量は512バイトである。
【0063】
先ず、図15に示すユーザプログラム登録処理のS200におけるICカード1−2の初期状態について説明する。
ICカード1−2は、S200において、アプリケーションA及びアプリケーションB等の複数のアプリケーションに共通する所定の共通プログラムがROM15に記憶されている。
図16及び図17(a)に示すように、ICカード1−2の初期状態において、不揮発性メモリ17−2のメモリ領域は、システム領域17s、プログラム領域17p及びデータ領域17dに割り当てられ、システム領域17sは、OS管理情報(D10)、登録権限認証情報「1234567」(D22)を含む登録認証管理情報(D20)、領域空き容量(D41)、次ロードアドレス(D42)「0800H」が記憶され、AC認証情報(D30)が未登録の状態である。
【0064】
登録認証管理情報(D20)の登録権限認証情報(D21)は、「01234567」、第1不成功回数(D22)及び第2不成功回数(D33)は、3回に設定されている。また、領域空き容量(D41)は、INDEX領域17piが512バイト、プログラムコード領域17pcが3072バイトであり、次ロードアドレスが「0800H」である。
図18(a)に示すように、プログラム領域17pは、プログラムINDEX領域17pi及びプログラムコード領域17pcにユーザプログラムが未登録の状態であり、図16に示すように、データ領域17dは、アプリケーションデータを格納するDFが未登録の状態である。
【0065】
図15を参照しながら、アプリケーションAに含まれるユーザプログラムをICカード1−2へ登録するユーザプログラム登録処理について説明する。
S201において、ICカード1−2は、第1認証コマンドを書込装置のR/Wから受信する。ICカード1−2の登録要求情報正当性判定部146は、登録要求情報正当性判定処理を行う(S202)。S201において受信した登録要求パスワードが「1234567」以外であって、登録要求情報正当性判定部146が否と判定した場合には、ICカード1−2は、エラーのレスポンスをR/Wへ送信し、第1不成功回数を1減算し(S216)、再び登録要求パスワードを受信し(S201)、同様の処理を繰り返す(S202)。
【0066】
一方、肯と判定した場合には、ICカード1−2は、その旨を示すレスポンスを送信し、アプリケーションID及びID利用パスワードを含む第2認証コマンドを受信する(S203)。登録済判定部144は、登録済判定処理を行い、受信したアプリケーションID「01」と同一のものが不揮発性メモリ17−2のシステム領域17sに登録されているか否かを判定する(S204)。登録済判定部144は、システム領域17sにAC認証情報のアプリケーションIDが未登録であるため、否と判定し、ICカード1−2は、S203において受信したアプリケーションID(D31)及びID登録パスワード(D32)(ID利用パスワード)をシステム領域17sに登録し(S218)、その旨をレスポンスとして送信し、S206へ進む。
【0067】
なお、S204において、既にアプリケーションID「01」がシステム領域17sに登録され、肯と判定した場合には、ICカード1−2の関連づけ正当性判定部147は、関連づけ正当性判定処理を行う(S205)。この処理において否と判定した場合には、S216と同様に、ICカード1−2は、エラーのレスポンスを送信し、第2不成功回数を1減算し(S217)、同様の処理を繰り返す(S203からS205まで)。
【0068】
S205において肯と判定した場合及びS204において否と判定した場合には、ICカード1−2は、ユーザプログラムのバイト数を含む容量判定コマンドを受信する(S206)。容量判定部145は、領域空き容量(D41)を参照し、INDEX領域17piにINDEX情報を書き込む空き(5バイト)があるか否かを判定する容量判定処理を行う(S207)。INDEX領域17piの空き容量は、512バイトであるため、容量判定部145は、肯と判定し、同様にS206で受信したユーザプログラムのバイト数(512バイト)について容量判定処理を行う(S208)。システム領域17sのプログラムコード領域空き容量は、3072バイトであるため、容量判定部145は、肯と判定し、ICカード1−2は、その旨のレスポンスを送信する。
【0069】
S207又はS208において容量判定部145が否と判定した場合には、ICカード1−2は、エラーのレスポンスを送信し(S219)、処理を終了する。
S209において、ICカード1−2は、ユーザプログラム及びユーザプログラム識別子「CA00」を含む登録コマンドを受信し、登録要求情報書込部148は、登録要求情報書込処理を行い、このユーザプログラムをプログラムコード領域17pcの次ロードアドレス(D42)から書き込む(S210)。この書込がプログラムコード領域17pc外である場合には、ICカード1−2は、エラーのレスポンスを送信し(S219)、処理を終了する(S215)。
【0070】
書込が正常に終了した場合には、ICカード1−2は、その旨を示すレスポンスを送信し、INDEX領域17piにINDEX情報「00CA080001」を作成する(S213)。ICカード1−2は、不揮発性メモリ17−2に記憶されている領域空き容量(D41)、次ロードアドレス(D42)を更新し(S214)、ユーザプログラム登録処理を終了する(S215)。なお、本実施形態では、更新後のINDEX領域空き容量(D41)は、507バイト、プログラムコード領域空き容量(D41)は、2560バイト、次ロードアドレス(D42)は、「0A00H」となる[図17(b)参照]。
【0071】
また、アプリケーションBに含まれるユーザプログラム「00CB」も同様にICカード1−2に登録される。このユーザプログラムを登録する場合には、すでにアプリケーションID「01」がシステム領域17sに登録されているが、アプリケーションBに含まれるユーザプログラムのアプリケーションID「02」とは、異なるため、ICカード1−2は、同様の処理を行うこととなる。
このユーザプログラム「00CB]の登録後には、図17(c)及び図18(c)に示すように、INDEX領域空き容量(D41)は、502バイト、プログラムコード領域の空き容量(D41)は2048バイト、次ロードアドレス(D42)は「0C00H」となり、不揮発性メモリ17−2のプログラム領域17pには、2つのアプリケーションID「01」、「02」と、2つのユーザプログラム「00CA」、「00CB]及びINDEX情報が登録されている。
【0072】
次に、A社のアプリケーションC(アプリケーションIDは「01」)に含まれるユーザプログラム(識別子は「00DC」、データ量は1Kバイト)を次ロードアドレス(「0C00H」(D42)から追加登録する場合について説明する。
登録する流れは、前述のユーザプログラム「00CA」に係る処理と同様であるが、第2認証コマンドに対応する動作が一部異なるため、図15を参照しながらこの点について説明する。
【0073】
S200、S201及びS202において、ICカード1−2は、前述したユーザプログラム「00CA」の場合と同様の処理を行う。S203において、ICカード1−2は、アプリケーションID「01」及びID利用パスワードを含む第2認証コマンドを受信する。登録済判定部144は、受信したアプリケーションID「01」と同一のものが不揮発性メモリ17−2のシステム領域17sに登録されていると判定する[S204、図17(c)参照]。
【0074】
関連づけ正当性判定部147は、S203で受信したID利用パスワードと、システム領域17sに記憶されているアプリケーションID「01」に対応するID登録パスワード(D32)とを照合する[図17(c)参照]。この場合に、S203で受信したID利用パスワードが「11111111」であれば、関連づけの正当性が認証され、パスワードが「11111111」以外、例えば「00000000」であれば認証されない(S217)。ICカード1−2は、認証した場合には、以下、ユーザプログラム「00CA]と同様の処理を行う(S206からS215まで)。
【0075】
図19は、本発明によるICカードの第2実施形態における動作及び本発明によるICカードプログラムの第2実施形態を示すフローチャートであって、アプリケーションデータをICカード1−2に登録するアプリケーションデータ登録処理を示している。
S301からS305及びS310からS312において、ICカード1−2は、ユーザプログラム登録処理のS201からS205及びS216からS218までと同様の処理を行う。
S306において、ICカード1−2は、アプリケーションデータを含む登録コマンドを受信し、登録要求情報書込部148は、登録要求情報書込処理を行い、このアプリケーションデータをデータ領域17dの次ロードアドレス(D42)から書き込み、専用ファイルと、この専用ファイルの下にデータファイルを生成する(S307)。ICカード1−2は、不揮発性メモリ17−2に記憶されている領域空き容量(D41)、次ロードアドレス(D42)を更新し(S308)、アプリケーションデータ登録処理を終了する(S309)。
【0076】
図20は、ユーザプログラム登録処理及びアプリケーションデータ登録処理後(アプリケーション登録後)の不揮発性メモリ17−2の各領域を示すメモリ構造図である。
図20に示すように、データ領域17dには、アプリケーションデータ登録処理によって登録されたアプリケーションA用DF及びアプリケーションB用DFが格納されている。
説明の便宜上、アプリケーションAのユーザプログラム、アプリケーションBのユーザプログラム、アプリケーションAのアプリケーションデータ、アプリケーションBのアプリケーションデータの登録を順に記述したが、登録する順番は、これに限られるものではない。例えば、アプリケーションAのアプリケーションデータ登録後にアプリケーションAのユーザプログラムを登録してもよい。
【0077】
本実施形態によれば、第1実施形態の効果に加え、ICカード1−2は、独自プログラム単位、アプリケーションデータ単位で通信を行うことによって、アプリケーションの登録を行うため、一度の通信における通信量を軽減することが可能となり、通信の安全性の向上、利便性の向上を図ることが可能となった。
また、ICカード1−2は、受信した関連づけ情報としてのアプリケーションIDが正当であるか否かを判定する関連づけ正当性判定部147と、登録が要求されているユーザプログラム又はアプリケーションデータが正当なものであるか否かを判定する登録要求情報正当性判定部146とを備えるため、セキュリティ性を高く維持しつつ、アプリケーションを登録することが可能となった。
【0078】
更に、ICカード1−2は、空き容量(D41)、次ロードアドレス(D42)を不揮発性メモリ17−2のシステム領域17sに記憶するため、空き容量の確認及び書込に係る処理の簡易化を図り、処理速度の向上を図ることが可能となった。また、ICカード1−2は、不成功回数(D22,D33)をシステム領域17sに記憶するため、よりセキュリティ性を向上することが可能となった。更にまた、ユーザプログラム、アプリケーションデータを個々に登録することができるため、例えば、ポイントアプリケーションでポイント換算のユーザプログラムを追加する場合であっても、新たにアプリケーション全体を登録する必要がなく、登録されているアプリケーションの汎用性の向上を図るとともに、利便性の向上を図ることが可能となった。
【0079】
(変形形態)
以上説明した実施形態に限定されることなく、種々の変形や変更が可能であって、それらも本発明の均等の範囲内である。例えば、本実施例ではICカード1は、接触型ICチップ10を備えているが、これに限られず、非接触用ICチップでも良く、接触/非接触両方で動作するICチップでもよい。
【0080】
不揮発性メモリ17は、INDEX情報にアプリケーションがアクセスするための条件を示すアクセス条件情報を含めて記憶してもよく、アプリケーションIDとともにユーザプログラムを実行する条件としてもよい。更にセキュリティ性を向上することが可能である。
【0081】
不揮発性メモリ17の領域をデータ領域17d及びプログラム領域17pに割り当てて、それぞれアプリケーションデータ及びユーザプログラムを記憶しているが、これらの領域に分割せず、従来のアプリケーションから共通プログラムを抜き出した形でユーザプログラム及びアプリケーションデータを記憶していてもよい。
【0082】
【発明の効果】
以上詳しく説明したように、本発明によれば、以下の効果を得ることが可能となった。
(1)共通プログラムを第1の記憶部に記憶し、登録が要求されている独自プログラムをプログラム領域に、アプリケーションデータをデータ領域に書き込むことによって、複数のアプリケーションを搭載することによって、セキュリティ性及び利便性を高く維持しつつ、製造コストの低減を図り、登録されているアプリケーションの汎用性を向上するとともに、利便性を向上する。
(2)独自プログラム単位、アプリケーションデータ単位で通信を行い、アプリケーションの登録を行うことによって、一度の通信における通信量を軽減し、通信の安全性の向上、利便性の向上を図る。
(3)関連づけ情報が正当であるか否かを判定することによって、セキュリティ性を保持しつつ、アプリケーションを追加登録する。
(4)同様に、登録が要求されている独自プログラム又はアプリケーションデータが正当なものであるか否かを判定することによって、セキュリティ性を保持しつつ、アプリケーションを追加登録する。
(5)空き容量情報、書込位置情報を記憶することによって、空き容量の確認及び書込に係る処理の簡易化を図り、処理速度を向上する。
【図面の簡単な説明】
【図1】本発明によるICカードの第1実施形態を説明する図である。
【図2】第1実施形態における書き換え可能な不揮発性メモリのメモリ構造図である。
【図3】第1実施形態における書き換え可能な不揮発性メモリのデータ領域を示すメモリ構造図である。
【図4】第1実施形態におけるDF識別情報を説明するための図である。
【図5】第1実施形態における書き換え可能な不揮発性メモリのプログラム領域を示すメモリ構造図である。
【図6】第1実施形態における書き換え可能な不揮発性メモリのプログラム領域を示すメモリ構造図である。
【図7】第1実施形態における専用ファイルと、ユーザプログラムの相互関係について説明するためのメモリ構造図である。
【図8】本発明によるICカードの発行を説明するための図である。
【図9】本発明によるICカードの発行を説明するための図である。
【図10】本発明によるICカードの第1実施形態における動作及び本発明によるICカードプログラムの第1実施形態を示すフローチャートである。
【図11】本発明によるICカードの第2実施形態を示すブロック図である。
【図12】第2実施形態における書き換え可能な不揮発性メモリのメモリ構造図である。
【図13】第2実施形態における書き換え可能な不揮発性メモリのデータ領域を示すメモリ構造図である。
【図14】第2実施形態における書き換え可能な不揮発性メモリのシステム領域を示すメモリ構造図である。
【図15】本発明によるICカードの第2実施形態における動作及び本発明によるICカードプログラムの第2実施形態を示すフローチャートである。
【図16】第2実施形態における独自プログラム登録処理前の書き換え可能な不揮発性メモリのメモリ構造図である。
【図17】第2実施形態における独自プログラム登録処理前、処理中、処理後のシステム領域を示すメモリ構造図である。
【図18】第2実施形態における独自プログラム登録処理前、処理中、処理後のプログラム領域を示すメモリ構造図である。
【図19】本発明によるICカードの第2実施形態における動作及び本発明によるICカードプログラムの第2実施形態を示すフローチャートである。
【図20】第2実施形態における独自プログラム登録処理及びアプリケーションデータ登録処理後の書き換え可能な不揮発性メモリのメモリ構造図である。
【符号の説明】
1,1−2 ICカード
10,10−2 ICチップ
11 接触端子
12 送受信回路
13,13−2 マイクロプロセッサ
14,14−2 CPU
15 ROM
16 RAM
17,17−2 不揮発性メモリ
17p プログラム領域
17d データ領域
17s システム領域
141 アプリケーション選択部
142 正当性判定部
143 プログラム実行部
144 登録判定部
145 容量判定部
146 登録要求情報正当性判定部
147 関連づけ正当性判定部
148 登録要求情報書込部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an IC card capable of registering a plurality of applications, and an IC card program that executes a CPU so that the registered applications use the hardware of the IC card.
[0002]
[Prior art]
Operating systems (hereinafter, “operating system” is referred to as “OS”) mounted on a conventional IC card can be classified into the following two types. One is a single application OS that allows a single application to be used with an IC card, and the other is a multi-application OS that allows a plurality of applications to be used.
A single application IC card equipped with a single application OS is stored in a read-only memory (ROM) in which most programs cannot be rewritten, and is in a memory area of a readable / rewritable nonvolatile memory (EEPROM). Most of them are used as areas for storing data. Therefore, in a single application IC card, an EEPROM having a high cost per capacity does not require a large capacity, and the chip price is low, so the IC card price is low.
[0003]
On the other hand, a multi-application IC card equipped with a multi-application OS such as a MULTIS card or JAVA card (“JAVA” is a registered trademark) stores a plurality of applications including programs and data in an EEPROM, and has a unique function with a user-specific function. Since the program can be registered, it is very convenient. Note that registration means storing so that it can be used, and does not include temporary storage for authentication or the like.
[0004]
[Problems to be solved by the invention]
However, the single application IC card and the multi-application IC card have the following problems.
Since the single application IC card cannot register a plurality of applications, there is a problem in that it lacks expandability and convenience.
[0005]
On the other hand, since a multi-application IC card stores a plurality of applications in an EEPROM having a high cost per capacity, it is necessary to provide an EEPROM having a capacity larger than that of a single application IC card, resulting in a high IC card price. was there.
Further, since the multi-application IC card is stored in the EEPROM for each application, even if the same program code is included in different applications, it must be individually stored in the EEPROM as a function of each application. It is very uneconomical.
[0006]
An object of the present invention is to provide an IC card and an IC card program that have the advantages of a single application IC card and a multi-application IC card, that is, can reduce manufacturing costs and are highly convenient.
[0007]
[Means for Solving the Problems]
The present invention solves the above problems by the following means. In addition, in order to make an understanding easy, although the code | symbol corresponding to embodiment of this invention is attached | subjected and demonstrated, it is not limited to this. That is, the invention of claim 1 is common to a plurality of applications. And run within each application A common program, which is a program, stores a read-only non-volatile first storage unit (15), a memory area is allocated to a program area (17p), and a data area (17d), and each application A rewritable non-volatile second storage unit (17-2) for storing the unique program, which is a unique program, in the program area and the application data in the data area in association with each other, the common program, An IC card capable of registering a plurality of applications including the unique program and the application data, and a registration request receiving means for receiving a unique program registration request including the unique program or an application data registration request including the application data. 11) and the registration request Registration request information writing means for writing the own program or application data received by the signal means in a predetermined area of the second storage section (148) Application identification information for identifying the application based on the unique program or the application data written in the predetermined area of the second storage unit by the registration request information writing means, unique program identification information, and Management information creating means for creating management information including location information indicating the location where the unique program is stored; IC card (1-2) characterized by
[0008]
According to a second aspect of the present invention, in the IC card according to the first aspect, any application data stored in the second storage unit or any application data received by the registration request receiving unit is stored. Association information receiving means (11) for receiving association information indicating whether to associate with an original program, and association validity determining means (147) for determining whether or not the association information received by the association information receiving means is valid. The IC card (1-2) is characterized in that the registration request information writing means writes data when it is determined affirmative by the association validity determining means.
[0009]
According to a third aspect of the present invention, in the IC card according to the second aspect, the second storage unit stores application identification information, a unique program stored in the program area included in the same application, and the data The IC card (1-2) is characterized in that it is stored in association with application data stored in an area, and the association information receiving means receives the application identification information as association information.
[0010]
According to a fourth aspect of the present invention, in the IC card according to the third aspect, whether or not the same application identification information as the application identification information received by the association information receiving means is stored in the second storage unit. A registration determination unit (144) for determining, and an association validity authentication information receiving unit (11) for receiving association validity authentication information corresponding to the association information received by the association information receiving unit; The sex determination means, when it is determined by the registered determination means that it is stored, registration association validity authentication information corresponding to the same application identification information stored in the second storage unit, It is determined by collating with the associated validity authentication information received by the associated validity authentication information receiving means. Performing the an IC card (1-2), characterized in.
[0011]
The invention of claim 5 is the IC card according to any one of claims 1 to 4, wherein the original program or application data received by the registration request receiving means is valid. Registration request information validity determining means (146) for determining the registration request information, and the registration request information writing means performs writing when the registration request information validity determining means determines affirmative. IC card (1-2).
[0012]
According to a sixth aspect of the present invention, in the IC card according to any one of the first to fifth aspects, the second storage unit is an area indicating a free capacity of the program area and / or the data area. The IC card (1-2) is characterized by storing free space information and / or writing position information indicating a position where the registration request information writing means writes a unique program or application data.
[0013]
The invention of claim 7 is common to a plurality of applications. And run within each application A common program, which is a program, stores a read-only non-volatile first storage unit (15), a memory area is allocated to a program area (17p), and a data area (17d), and each application A rewritable nonvolatile second storage unit (17-2) for storing a unique program, which is a unique program, in the program area and application data in the data area in association with each other; A CPU (14) for executing a program stored in the second storage unit, and an application to an IC card capable of registering a plurality of applications including the common program, the unique program, and the application data. An IC card program that is executed by the CPU for registration. A registration request receiving procedure (S209, S306) for receiving a unique program registration request including a unique program or an application data registration request including application data, and the unique program or the application data received in the registration request receiving procedure. Registration request information writing procedure (S210, S307) to be written in a predetermined area of the second storage unit Application identification information for identifying the application based on the unique program or the application data written in a predetermined area of the second storage unit by the registration request information writing procedure, unique program identification information, and A management information creation procedure (S213) for creating management information including location information indicating a location where the unique program is stored; Is an IC card program characterized by
[0014]
The invention according to claim 8 is the IC card program according to claim 7, wherein any application data or any application data stored in the second storage unit is received in the registration request receiving procedure. Association information reception procedure (S203, S303) for receiving association information indicating whether to associate with an original program, and association for receiving association validity authentication information for authenticating the validity of association information received in the association information reception procedure The validity authentication information receiving procedure (S203, S303) and whether or not the association information received in the association information receiving procedure is valid based on the association validity authentication information received in the association validity authentication information receiving procedure. Association validity determination procedure for determination (S2 5, S305) and wherein the registration request information writing procedure to be executed when it is determined to be valid in the associated validity determining step, an IC card program characterized.
[0015]
The invention according to claim 9 is the registration request information for determining whether the original program or application data received in the registration request receiving procedure is valid in the IC card program according to claim 7 or claim 8. An IC card program comprising a legitimacy determination procedure (S202, S302), wherein the registration request information writing procedure is executed when it is determined to be legitimate in the registration request information legitimacy determination procedure It is.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in more detail with reference to the drawings.
(First embodiment)
FIG. 1 is a diagram for explaining a first embodiment of an IC card according to the present invention. FIG. 1A is a front view, FIG. 1B and FIG. FIG.
As shown in FIG. 1, the IC card 1 includes a contact type IC chip 10. The IC card 1 registers a plurality of applications that receive power from a contact reader / writer (hereinafter referred to as “R / W”), which is an external device (not shown), and perform communication. Is a multi-application IC card capable of When the IC card 1 receives from the R / W a command that is an instruction requesting execution of a predetermined program, the IC card 1 interprets and executes the command, and transmits the result to the R / W as a response.
[0017]
An application is a software program created according to a business or the like to realize a user's purpose, and is mainly a program part that is a part of a program code and application data that is information necessary for executing the program part. Including. The program unit includes a common program and a user program, and the user program is a unique program in each application, such as a program that performs processing corresponding to a unique command arbitrarily defined by the user. The user is a bank, a card company, or the like that performs business using an application registered in the IC card 1.
[0018]
In the case of a single application, in most cases, a software program is recorded in a readable non-volatile memory. In the case of a multi-application, a plurality of software programs are recorded in an EEPROM in order to realize different purposes.
Even software programs created to achieve different purposes often have several functions in common, such as a function for reading data and a function for collating passwords. In recent years, in particular, the number of cases where standards are established between industries has increased, and programs (common programs) that can be shared by business types have increased.
On the other hand, in addition to industry standards, a company-specific program (user program) is increasingly required in order to differentiate between the same industries.
[0019]
The common program is, for example, a program for analyzing a command received from the R / W, a program for transmitting data to the R / W, a program for writing a user program code in the nonvolatile memory 17, data reading / writing, password verification, etc. A program that can be used in common by a plurality of applications registered in the IC card 1, such as a program that performs processing corresponding to a command standardized by ISO 7816.
[0020]
The IC chip 10 includes, on the card surface, a contact terminal 11 that is a communication unit that transmits and receives signals and power, a transmission / reception circuit 12 that controls communication with the R / W, and a microprocessor 13.
The microprocessor 13 includes a CPU 14, three memories 15, 16, 17 and the like. The CPU 14 performs overall control of the IC card 1 by executing a program stored in the memory, and realizes an application selection unit 141, a validity determination unit 142, and a program execution unit 143.
[0021]
The application selection unit 141 executes application selection in response to the application selection request received from the R / W. The selection of an application is to hold identification information for identifying a file including application data specified by an application selection request in the RAM 16 and set an access target of a command such as a current file.
When the legitimacy determination unit 142 receives a command that is a program execution request from the R / W, the legitimacy that allows the application selected by the application selection unit 141 to access the execution of the program corresponding to the command. It is determined whether the application is a simple application.
The program execution unit 143 executes a user program or a common program corresponding to the command when the validity determination unit 142 determines that the application is a valid application.
[0022]
Each of the three memories is a read-only ROM 15 that is a non-volatile memory in which data is not erased even when the power is turned off, and can be read and rewritten. The volatile data that is erased when the power is turned off. This is a nonvolatile memory 17 that can read and rewrite RAM 16, EPROM, EEPROM, and the like, which are memories. In this embodiment, the memory capacity of the ROM 15 is 16 Kbytes, the RAM 16 is 1 Kbyte, and the nonvolatile memory 17 is 8 Kbytes.
[0023]
The ROM 15 stores functions (programs) necessary for the operation of the IC card 1 such as an OS and an execution environment stored when the IC chip is manufactured. The ROM 15 stores one common program for each type. This common program can be used by all applications.
The RAM 16 is a work area of the CPU 14 in which information necessary for operating the OS is sequentially written, and no program or the like is stored therein.
The nonvolatile memory 17 stores user programs, application data, and the like.
[0024]
FIG. 2 is a memory structure diagram of a rewritable nonvolatile memory.
As shown in FIG. 2, the memory area of the non-volatile memory 17 is allocated to a use-prohibited area that cannot be used by the user, a data area 17d that can be used by the user, and a program area 17p under the management of the OS. Yes. Application data and user programs are stored in the data area 17d and the program area 17p, respectively. In the present embodiment, the area that can be used by the user in the non-volatile memory 17 is an area whose address is “0100H to 1FFFH”, the program area 17p is “0100H to 0FFFH”, and the data area 17d is “1000H to 1FFFH”. Assigned.
[0025]
FIG. 3 is a memory structure diagram showing a data area of a rewritable nonvolatile memory.
As shown in FIG. 3, information is stored in the data area 17d of the nonvolatile memory 17 so as to form a hierarchical structure. A dedicated file DF (Dedicated File) is normally set for each application. The nonvolatile memory 17 stores application data in association with this dedicated file.
[0026]
The dedicated file stores DF identification information for identifying at least other dedicated files stored in the IC card 1 as attached information. The DF identification information includes a dedicated file name and an application ID. The dedicated file name is a value indicating the name of the application, and the user sets a value of 1 to 16 bytes. The application ID is information for identifying at least one application from other applications stored in the IC card 1 under the management of the OS, and is provided for each type of application. The application ID setting method is arbitrary.
[0027]
FIG. 4 is a diagram for explaining the DF identification information.
As shown in FIG. 4A, the application A of user A and the application B of user B are registered in the IC card 1, and a dedicated file for application A is stored in the data area of the nonvolatile memory 17. And a dedicated file for application B is stored.
[0028]
For example, the application IDs of a plurality of dedicated files (DF1, DF2, DF3) included in the application A such as dedicated files corresponding to a plurality of stores included in the point card application are “A0” indicating the application A. . DF1, DF2, and DF3 have DF identification information “APA1A0”, “APA2A0”, and “APA3A0”, respectively, and store application data used in processing of application A such as points for each store.
[0029]
The application IDs of the plurality of dedicated files (DF4, DF5) included in the application B are “B0” indicating the application B. DF4 and DF5 have DF identification information “APB1B0” and “APB2B0”, respectively, and store application data used in processing of application B. In this embodiment, the application ID is 1 byte. However, the application ID is not limited to this, and may be 2 bytes or more, and the data size is arbitrary.
[0030]
As shown in FIG. 4B, when company A wants to register a plurality of different types of applications such as a point card application A and a credit application AA in the IC card 1, for example, Dedicated files for use separately are created, and different application IDs “A0” and “A1” are set respectively. From the difference in the application ID, the CPU 14 under the processing of the OS recognizes the application A and the application AA as different applications.
[0031]
Next, the program area of the rewritable nonvolatile memory will be described.
5 and 6 are memory structure diagrams showing program areas of a rewritable nonvolatile memory.
As shown in FIG. 5, the program area 17p is divided into an INDEX area 17pi and a program code area 17pc. The INDEX area 17pi contains INDEX information, and the program code area 17pc contains program code that is the main body of the user program. The number (n) of user programs is stored in association with each other.
The INDEX information includes a user program identifier (2 bytes) for identifying one user program from at least another user program in the IC card 1, a program address (2 bytes) indicating a location where the program code is stored, an application ID ( Management information including 1 byte).
[0032]
The application ID in the INDEX information is identification information for identifying at least one application from other applications registered in the IC card 1, and is provided for each type of application as with the DF identification information. . The user program is executed only in the application indicated by the application ID. In other words, the validity determination unit 142 compares the application ID included in the application identification information indicating the selected application with the application ID included in the INDEX information before executing the user program, and executes the program only when they match. The unit 143 executes a user program.
[0033]
For example, when the application ID indicating the selected application is “A0”, the program execution unit 143 executes only the user program whose application ID included in the INDEX information is “A0”. The program execution unit 143 does not execute a user program whose application ID included in the INDEX information has different values such as “01” and “20”.
In the program code area 17pc, the user program code body is stored from the designated address, and this head address is included in the INDEX information.
[0034]
As shown in FIG. 6, in the program area 17p, a user program CA that performs processing corresponding to the unique command of the application A stored in the data area 17d and a user program that performs processing corresponding to the unique command of the application B are stored. CB is stored. The INDEX information of the user program CA is “00CA020001”, and “00CA”, “0200”, and “01” are the user program identifier, the start address of the program code, and the application ID, respectively. This INDEX information indicates that the program code of the user program CA is stored from the address 200 of the nonvolatile memory 17 and the user program CA is executed only in the application A indicated by the application identifier “01”.
[0035]
Similarly, in the INDEX information “00CB060002” of the user program CB, the program code of the user program CB is stored from the address 600 of the nonvolatile memory 17, and the user program CB is executed only in the application B indicated by the application identifier “02”. It is shown that.
[0036]
FIG. 7 is a memory structure diagram for explaining the mutual relationship between the dedicated file and the user program.
As shown in FIG. 7, the data area 17d stores three dedicated files: an application A dedicated file, an application B dedicated file, and an application C dedicated file. The program area 17p is executed by each of these applications. User programs A, B and C to be executed are stored. As described above, the dedicated file and the user program are associated with each other by the application ID included in the DF identification information and the application ID included in the INDEX information of the user program.
[0037]
8 and 9 are diagrams for explaining the issue of an IC card according to the present invention. A process in which the card issuer registers services A and B, which are two applications, in response to a request from company A and company B in IC card 1 and issues IC card 1 will be described. The programs included in the service A are a common program for performing processing corresponding to a common command such as READ and WRITE, and a user program A for performing processing corresponding to a unique command of the service A, and a service B The programs included in are a common program and a user program B for performing processing corresponding to the unique command of service B.
[0038]
First, as shown in FIGS. 8 and 9, the card issuer transmits the user program A and the user program B to the non-volatile memory by transmitting a predetermined dedicated command for registering the user program from the R / W to the IC card 1. 17 is registered. By this registration, INDEX information and program codes of the user program A and the user program B are stored in the program area 17p.
[0039]
Next, the card issuer transmits a common command from the R / W to the IC card 1 to convert the user program A and the data file A1 in which application data used by the common program is stored into a dedicated file for the application A ( The DF name is APPA.) And is formed in the data area 17d of the nonvolatile memory 17. Similarly, the card issuer forms the data file A2 in the data area 17d in association with the dedicated file for application B (DF name is APPB), and issues the IC card 1. Note that the INDEX information and the application ID included in the data file may be set in advance before application registration, or may be assigned after the IC card 1 receives registration information such as a user program.
[0040]
FIG. 10 is a flowchart showing the operation of the IC card according to the present invention and the first embodiment of the IC card program according to the present invention. Note that two applications of service A and service B are registered in the IC card 1.
In step 100 (hereinafter, “step” is referred to as “S”), the cardholder inserts the IC card 1 into a predetermined R / W capable of operating the service A.
[0041]
In S101, the IC card 1 performs a start process. Specifically, the IC card 1 communicates with the R / W, is activated, and can receive a command from the R / W. Further, the IC card 1 receives a command for selecting the service A from the R / W, and the application selection unit 141 stores the data of the DF name “APPA” and the application ID “01” in the RAM 16 to thereby provide the service A Is selected (S102).
[0042]
In S <b> 103, the IC card 1 receives a command “00CA01234456789ABCDEF” in a predetermined format from the R / W. The format of the command in this embodiment is a configuration of a 2-byte long user program identifier and 8-byte long data (the length is arbitrary).
The validity determination unit 142 searches the INDEX information for the received 2-byte user program identifier “00CA” and determines whether there is a user program having the same user program identifier.
In the present embodiment, since the user program identifier of the user program A stored in the program area of the nonvolatile memory 17 is “00CA”, the validity determination unit 142 determines positive.
[0043]
Next, the validity determination unit 142 determines whether or not the application ID included in the INDEX information of the user program A matches the application ID indicating the application selected in S101 (S105). Since both are “01”, the validity determination unit 142 determines that the result is positive, and the program execution unit 143 executes the user program A with reference to the program code head address in the INDEX information (S106). The result is transmitted as a response to the R / W (S110), and the process is terminated (S111).
[0044]
On the other hand, when it is determined NO in S104, the validity determination unit 142 searches the ROM 15 and determines whether there is a common program with the matching user program identifier (S107). If there is a matching common program, the program execution unit 143 executes the common program (S109), and if there is no matching common program, an error occurs (S108), and the IC card 1 Is transmitted to the R / W as a response (S110), and the process is terminated (S111).
[0045]
If the application IDs do not match in S105, for example, if the service B whose application ID is “02” is selected in S101, the IC card 1 determines whether there is a common program that matches the user program identifier. Is determined (S107). If there is a matching common program, the program execution unit 143 executes the common program (S109), and if there is no matching common program, an error occurs (S108), and the IC card 1 Is transmitted to the R / W as a response (S110), and the process is terminated (S111).
[0046]
According to the present embodiment, the IC card 1 stores a user program and application data in the nonvolatile memory 17 and registers a plurality of applications by storing a common program in the ROM 15. In comparison, it is possible to reduce the manufacturing cost while keeping the capacity of the nonvolatile memory 17 low and maintaining high convenience.
Further, by storing one common program for each type, it is not necessary to store the common program for each application, so that the capacity of the entire memory can be suppressed and the manufacturing cost can be reduced.
Furthermore, since the IC card 1 registers the common program, the user program and the application data separately, it is possible to improve versatility and improve convenience.
[0047]
Further, the validity determination unit 142 compares the application identification information included in the INDEX information of the user program corresponding to the command received from the R / W with the application identification information indicating the selected application, and compares the application identification information with the legitimate application. Therefore, it is possible to prevent execution of a user program by an unauthorized application without access authority and improve security.
[0048]
(Second Embodiment)
FIG. 11 is a diagram for explaining a second embodiment of the IC card according to the present invention, where FIG. 11A is a front view, FIG. 11B and FIG. 11C are the inside of the IC chip and the CPU. FIG.
In addition, the same code | symbol is attached | subjected to the part which fulfill | performs the same function as 1st Embodiment mentioned above, and the overlapping description is abbreviate | omitted suitably.
As shown in FIG. 11, the IC card 1-2 in the second embodiment includes a CPU 14-2 and a rewritable nonvolatile memory 17-2. The cardholder can register the application provided by the user in the IC card 1-2 by inserting the IC card 1-2 into the R / W of the writing device which is an external device (not shown). The writing device includes a user program or application data, and transmits a registration command, which is a registration request for requesting registration of the user program or application data to the IC card 1-2, to the IC card 1-2. Registers applications including user programs and application data.
[0049]
The CPU 14-2 includes a registered determination unit 144, a capacity determination unit 145, a registration request information validity determination unit 146, an association validity determination unit 147, and a registration request information writing unit 148. The CPU 14-2 implements these units by executing programs such as an OS stored in the ROM 15 and the nonvolatile memory 17-2.
When the registered determination unit 144 receives a second authentication command (described later) including an application ID from the R / W, whether or not the same application ID as the application ID is registered in the nonvolatile memory 17-2. A registered determination process is performed to determine whether or not.
[0050]
The capacity determination unit 145 determines whether or not the program area 17p or the data area 17d of the non-volatile memory 17-2 has a free capacity for writing the user program or application data received from the R / W. A capacity determination process is performed by determining the amount of user program or application data against the free capacity stored in the nonvolatile memory 17-2. In the present embodiment, the capacity determination unit 145 includes a data amount of the user program or application data, and performs processing when a capacity determination command that is a capacity determination request for requesting execution of this process is received from the writing device.
[0051]
The registration request information validity determination unit 146 determines whether or not the transmission source of the registration request password such as a writing device has the authority to register registration request information such as a user program or application data, that is, the registration request information is valid. The registration request information validity determination process is performed by comparing the registration request password received as to whether or not the password is registered with the registration authority authentication information stored in the nonvolatile memory 17-2.
In the present embodiment, the registration request information validity determination unit 146 includes a registration request password and receives a first authentication command, which is a registration request information validity determination request for requesting execution of this process, from the writing device. This process is performed. When the registration request information validity determination unit 146 determines that the registration request information is correct, the IC card 1-2 sets a flag indicating that the registration authority has been authenticated.
[0052]
The association validity determination unit 147 determines whether the transmission source of the application ID and ID usage password of the writing device or the like can use this application ID properly, and the received ID usage password and the nonvolatile memory 17. It is determined by collating with the ID registration password stored in. In other words, the association validity determination unit 147 makes this determination so that the received application ID includes the user program or application data included in the registration request and the application data or program stored in the nonvolatile memory 17-2. An association validity determination process for determining whether or not the user program stored in the area 17p should be associated is performed.
[0053]
In the present embodiment, the association validity determination unit 147 receives the second authentication command that is an association validity determination request that includes the application ID and the ID use password and requests execution of this process from the writing device, and has been registered. If the determination unit 144 determines positive, the process is performed. When the association validity determination unit 147 determines that the association is valid or when the registered determination unit 144 determines that the determination is negative, the IC card 1-2 sets a flag indicating that the received application ID has been authenticated. Stand up.
[0054]
The registration request information writing unit 148 receives a registration command including a user program or application data, and has a flag indicating that the registration authority is authenticated and a flag indicating that the application ID is authenticated. When both are standing, a registration request information writing process for writing the user program or application data, which is registration request information included in the registration command, into the program code area 17pc or the data area 17d of the nonvolatile memory 17-2 is performed.
[0055]
FIG. 12 is a memory structure diagram of a rewritable nonvolatile memory.
As shown in FIG. 12, the memory area of the nonvolatile memory 17-2 in the second embodiment includes a system area 17s for storing information necessary for OS processing, information necessary for card operation, and data The area 17d and the program area 17p are allocated under the management of the OS.
In this embodiment, as shown in FIG. 12B, the system area 17s is assigned to “0000H to 05FFH”, the program area 17p is assigned to “0600H to 13FFH”, and the data area 17d is assigned to “1400H to 1FFFH”. ing.
[0056]
As shown in FIG. 13, in the data area 17d, DF1 and DF2 storing DF identification information as attached information, and data files 1-1, 1- 1 storing application data under the dedicated file. 2, 2-1 and 2-2 are stored. The application registered in the IC card 1-2 is defined by the DF, and the application selection unit 141 selects the application to be executed by selecting the DF defining the application by the application selection request.
[0057]
FIG. 14 is a memory structure diagram showing a system area of a rewritable nonvolatile memory according to the second embodiment.
As shown in FIG. 14, the system area 17s contains OS management information (D10), registration authority authentication information (D21), and first unsuccessful count (D22), which are basic information necessary for the OS to operate. Management information including registration authentication management information (D20) including the application ID (D31), ID registration password (D32), and AC authentication information (D30) including the second unsuccessful count (D33) is concealedly stored. Yes. The system area 17s stores a program area free space (D41) and a next user program registration address (D42).
[0058]
The registration authority authentication information (D21) is reference information that is collated with the registration request password in the registration request information validity determination process by the registration request information validity determination unit 146.
The first unsuccessful count (D22) is the number of times that re-authentication can be requested even if the authentication based on the registration authority authentication information (D21) is unsuccessful, and the determination result of the registration request information validity determining unit 146 1 is subtracted when the answer is NO. When the number of unsuccessful times is “0”, the IC card 1-2 is in a closed state where authentication is not accepted.
The AC authentication information (D30) is information in which the ID registration password (D32) and the number of unsuccessful attempts (D33) are associated with each application ID (D31) of the application registered in the IC card 1-2. This is association management information for managing authentication of ID (D31).
[0059]
The ID registration password (D32) is registration association validity authentication information that is collated with an ID use password that is association validity authentication information in the association validity determination processing of the association validity determination unit 147, and is a writing device or the like. ID usage authority authentication information for authenticating that the transmission source of the ID usage password is an authorized user of the application ID (D31). The ID registration password (D32) registered in the IC card 1-2 is, for example, a password that only a user who can use the application indicated by the application ID (D31) can know.
Similar to the first unsuccessful count (D22), the second unsuccessful count (D33) is the number of times that re-authentication can be requested even if the authentication based on the ID registration password (D32) is unsuccessful.
[0060]
The area free capacity (D41) indicates the free capacity of the INDEX area 17pi, the program code area 17pc, and the data area 17d, and the registration request information writing unit 148 writes the user program in the program area 17pc for the next load address (D42). The head address of the empty area and the head address of the empty area where application data is written in the data area 17d are shown.
[0061]
Next, the operation of the IC card 1-2 when registering an application will be described.
FIG. 15 is a flowchart showing the operation of the IC card according to the second embodiment of the present invention and the second embodiment of the IC card program according to the present invention, and the user program registration process for registering the user program in the IC card 1-2. Is shown.
16 is a memory structure diagram of the rewritable nonvolatile memory before the user program registration process. FIGS. 17 and 18 are a system area 17s and a program area before, during, and after the user program registration process. It is a memory structure figure showing 17p.
[0062]
Hereinafter, the application A (application ID is “01”, the DF name of the DF storing the application data is “APPA”) and the application B (application ID are the application IDs) of the A company and the B company on the IC card 1-2. The case of registering “02” and DF name “APPB”) will be described focusing on the processing of the IC card 1-2.
Note that the user program identifier of the user program included in application A is “CA00”, the capacity of the user program is 512 bytes, the user program identifier of the user program included in application B is “CB00”, and the capacity is 512 bytes. .
[0063]
First, the initial state of the IC card 1-2 in S200 of the user program registration process shown in FIG. 15 will be described.
In the IC card 1-2, a predetermined common program common to a plurality of applications such as the application A and the application B is stored in the ROM 15 in S200.
As shown in FIGS. 16 and 17A, in the initial state of the IC card 1-2, the memory area of the nonvolatile memory 17-2 is allocated to the system area 17s, the program area 17p, and the data area 17d, The area 17s stores OS management information (D10), registration authentication management information (D20) including registration authority authentication information “1234567” (D22), area free capacity (D41), and next load address (D42) “0800H”. The AC authentication information (D30) is unregistered.
[0064]
The registration authority authentication information (D21) of the registration authentication management information (D20) is set to “01234567”, and the first unsuccessful number (D22) and the second unsuccessful number (D33) are set to three times. The area free space (D41) is 512 bytes for the INDEX area 17pi, 3072 bytes for the program code area 17pc, and the next load address is “0800H”.
As shown in FIG. 18A, the program area 17p is a state in which no user program is registered in the program INDEX area 17pi and the program code area 17pc, and as shown in FIG. 16, the data area 17d contains application data. The DF to be stored is in an unregistered state.
[0065]
A user program registration process for registering the user program included in the application A in the IC card 1-2 will be described with reference to FIG.
In S201, the IC card 1-2 receives the first authentication command from the R / W of the writing device. The registration request information validity determination unit 146 of the IC card 1-2 performs registration request information validity determination processing (S202). If the registration request password received in S201 is other than “1234567” and the registration request information validity determination unit 146 determines NO, the IC card 1-2 transmits an error response to the R / W. The first unsuccessful count is decremented by 1 (S216), the registration request password is received again (S201), and the same processing is repeated (S202).
[0066]
On the other hand, when it determines with affirmation, IC card 1-2 transmits the response which shows that, and receives the 2nd authentication command containing application ID and an ID utilization password (S203). The registered determination unit 144 performs a registered determination process, and determines whether or not the same application ID “01” received is registered in the system area 17s of the nonvolatile memory 17-2 (S204). The registered determination unit 144 determines that the application ID of the AC authentication information is unregistered in the system area 17s, so that the IC card 1-2 determines that the application ID (D31) and the ID registration password ( D32) (ID use password) is registered in the system area 17s (S218), a message to that effect is sent, and the process proceeds to S206.
[0067]
In S204, when the application ID “01” is already registered in the system area 17s and the determination is affirmative, the association validity determination unit 147 of the IC card 1-2 performs an association validity determination process (S205). ). If it is determined NO in this process, the IC card 1-2 transmits an error response, decrements the second unsuccessful count by 1 (S217), and repeats the same process (S203). To S205).
[0068]
When it is determined positive in S205 and when it is determined negative in S204, the IC card 1-2 receives a capacity determination command including the number of bytes of the user program (S206). The capacity determination unit 145 refers to the area free capacity (D41), and performs capacity determination processing for determining whether or not there is a space (5 bytes) in which the INDEX information is written in the INDEX area 17pi (S207). Since the free capacity of the INDEX area 17pi is 512 bytes, the capacity determination unit 145 determines affirmatively, and similarly performs capacity determination processing for the number of bytes (512 bytes) of the user program received in S206 (S208). Since the free space in the program area of the system area 17s is 3072 bytes, the capacity determination unit 145 determines affirmative and the IC card 1-2 transmits a response to that effect.
[0069]
If the capacity determination unit 145 determines NO in S207 or S208, the IC card 1-2 transmits an error response (S219), and ends the process.
In S209, the IC card 1-2 receives the registration command including the user program and the user program identifier “CA00”, and the registration request information writing unit 148 performs a registration request information writing process, and the user program is programmed. Write from the next load address (D42) of the code area 17pc (S210). If this writing is outside the program code area 17pc, the IC card 1-2 transmits an error response (S219) and ends the process (S215).
[0070]
When the writing is normally completed, the IC card 1-2 transmits a response indicating that and creates the INDEX information “00CA080001” in the INDEX area 17pi (S213). The IC card 1-2 updates the area free space (D41) and the next load address (D42) stored in the nonvolatile memory 17-2 (S214), and ends the user program registration process (S215). In this embodiment, the updated INDEX area free space (D41) is 507 bytes, the program code space free space (D41) is 2560 bytes, and the next load address (D42) is “0A00H” [FIG. 17 (b)].
[0071]
Similarly, the user program “00CB” included in the application B is also registered in the IC card 1-2. When registering this user program, the application ID “01” has already been registered in the system area 17s, but since it is different from the application ID “02” of the user program included in the application B, the IC card 1- 2 performs the same processing.
After the registration of the user program “00CB”, as shown in FIGS. 17C and 18C, the INDEX area free capacity (D41) is 502 bytes, and the program code area free capacity (D41) is 2048. The byte and next load address (D42) are “0C00H”, and two application IDs “01” and “02” and two user programs “00CA” and “00CB” are stored in the program area 17p of the nonvolatile memory 17-2. ] And INDEX information are registered.
[0072]
Next, a user program (identifier is “00DC”, data amount is 1 Kbyte) included in application C of company A (application ID is “01”) is additionally registered from the next load address (“0C00H” (D42)) Will be described.
The flow of registration is the same as the processing related to the user program “00CA” described above, but the operation corresponding to the second authentication command is partially different, and this point will be described with reference to FIG.
[0073]
In S200, S201, and S202, the IC card 1-2 performs the same processing as that of the user program “00CA” described above. In S203, the IC card 1-2 receives the second authentication command including the application ID “01” and the ID use password. The registered determination unit 144 determines that the same application ID “01” as received is registered in the system area 17s of the nonvolatile memory 17-2 [see S204, FIG. 17 (c)].
[0074]
The association validity determination unit 147 collates the ID use password received in S203 with the ID registration password (D32) corresponding to the application ID “01” stored in the system area 17s [see FIG. 17 (c)]. ]. In this case, if the ID use password received in S203 is “11111111”, the validity of the association is authenticated, and if the password is other than “11111111”, for example “00000000”, the authentication is not performed (S217). When the IC card 1-2 is authenticated, the IC card 1-2 performs the same processing as the user program “00CA” (S206 to S215).
[0075]
FIG. 19 is a flowchart showing the operation of the second embodiment of the IC card according to the present invention and the second embodiment of the IC card program according to the present invention, and an application data registration process for registering application data in the IC card 1-2. Is shown.
In S301 to S305 and S310 to S312, the IC card 1-2 performs the same processing as S201 to S205 and S216 to S218 of the user program registration processing.
In S306, the IC card 1-2 receives a registration command including application data, and the registration request information writing unit 148 performs a registration request information writing process, and the application data is stored in the next load address (in the data area 17d ( D42), a dedicated file and a data file are generated under this dedicated file (S307). The IC card 1-2 updates the area free capacity (D41) and the next load address (D42) stored in the nonvolatile memory 17-2 (S308), and ends the application data registration process (S309).
[0076]
FIG. 20 is a memory structure diagram showing each area of the nonvolatile memory 17-2 after user program registration processing and application data registration processing (after application registration).
As shown in FIG. 20, the application area DF and the application B DF registered by the application data registration process are stored in the data area 17d.
For convenience of explanation, the registration of the user program of application A, the user program of application B, the application data of application A, and the application data of application B are described in order, but the order of registration is not limited to this. For example, the user program of application A may be registered after application data of application A is registered.
[0077]
According to the present embodiment, in addition to the effects of the first embodiment, the IC card 1-2 performs application registration by performing communication in units of unique programs and units of application data. As a result, communication safety and convenience can be improved.
Further, the IC card 1-2 includes an association validity determining unit 147 that determines whether or not the received application ID as the association information is valid, and a user program or application data for which registration is requested is valid. Therefore, it is possible to register the application while maintaining high security.
[0078]
Furthermore, since the IC card 1-2 stores the free capacity (D41) and the next load address (D42) in the system area 17s of the nonvolatile memory 17-2, the process for checking and writing the free capacity is simplified. As a result, the processing speed can be improved. Further, since the IC card 1-2 stores the number of unsuccessful attempts (D22, D33) in the system area 17s, it is possible to further improve the security. Furthermore, since the user program and application data can be individually registered, for example, even when a point conversion user program is added in the point application, it is not necessary to newly register the entire application. In addition to improving the versatility of existing applications, it has become possible to improve convenience.
[0079]
(Deformation)
The present invention is not limited to the embodiment described above, and various modifications and changes are possible, and these are also within the equivalent scope of the present invention. For example, in the present embodiment, the IC card 1 includes the contact IC chip 10, but is not limited thereto, and may be a non-contact IC chip or an IC chip that operates in both contact and non-contact.
[0080]
The nonvolatile memory 17 may store the INDEX information including access condition information indicating a condition for the application to access, or may be a condition for executing the user program together with the application ID. Furthermore, security can be improved.
[0081]
The areas of the non-volatile memory 17 are allocated to the data area 17d and the program area 17p, and the application data and the user program are stored, respectively. User programs and application data may be stored.
[0082]
【The invention's effect】
As described above in detail, according to the present invention, the following effects can be obtained.
(1) By storing a common program in the first storage unit, writing a unique program for which registration is requested in the program area, and writing application data in the data area, and mounting a plurality of applications, security and While maintaining high convenience, the manufacturing cost is reduced, the versatility of registered applications is improved, and the convenience is improved.
(2) Communication is performed in units of unique programs and application data, and application registration is performed to reduce the amount of communication in a single communication, thereby improving communication safety and convenience.
(3) The application is additionally registered while maintaining security by determining whether or not the association information is valid.
(4) Similarly, an application is additionally registered while maintaining security by determining whether or not the original program or application data requested to be registered is valid.
(5) By storing the free space information and the writing position information, it is possible to simplify the processing related to the confirmation and writing of the free space and improve the processing speed.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining a first embodiment of an IC card according to the present invention.
FIG. 2 is a memory structure diagram of a rewritable nonvolatile memory according to the first embodiment.
FIG. 3 is a memory structure diagram showing a data area of a rewritable nonvolatile memory according to the first embodiment.
FIG. 4 is a diagram for explaining DF identification information in the first embodiment.
FIG. 5 is a memory structure diagram showing a program area of a rewritable nonvolatile memory according to the first embodiment.
FIG. 6 is a memory structure diagram showing a program area of a rewritable nonvolatile memory according to the first embodiment.
FIG. 7 is a memory structure diagram for explaining a mutual relationship between a dedicated file and a user program in the first embodiment.
FIG. 8 is a diagram for explaining the issue of an IC card according to the present invention.
FIG. 9 is a diagram for explaining issuance of an IC card according to the present invention.
FIG. 10 is a flowchart showing the operation of the IC card according to the first embodiment of the present invention and the first embodiment of the IC card program according to the present invention.
FIG. 11 is a block diagram showing a second embodiment of the IC card according to the present invention.
FIG. 12 is a memory structure diagram of a rewritable nonvolatile memory according to a second embodiment.
FIG. 13 is a memory structure diagram showing a data area of a rewritable nonvolatile memory according to the second embodiment.
FIG. 14 is a memory structure diagram showing a system area of a rewritable nonvolatile memory according to the second embodiment.
FIG. 15 is a flowchart showing the operation of the second embodiment of the IC card according to the present invention and the second embodiment of the IC card program according to the present invention.
FIG. 16 is a memory structure diagram of a rewritable nonvolatile memory before a unique program registration process in the second embodiment.
FIG. 17 is a memory structure diagram showing system areas before, during, and after a unique program registration process in the second embodiment.
FIG. 18 is a memory structure diagram showing program areas before, during and after a unique program registration process in the second embodiment.
FIG. 19 is a flowchart showing the operation of the IC card according to the second embodiment of the present invention and the second embodiment of the IC card program according to the present invention.
FIG. 20 is a memory structure diagram of a rewritable nonvolatile memory after a unique program registration process and an application data registration process in the second embodiment.
[Explanation of symbols]
1,1-2 IC card
10, 10-2 IC chip
11 Contact terminal
12 Transceiver circuit
13, 13-2 Microprocessor
14, 14-2 CPU
15 ROM
16 RAM
17, 17-2 Nonvolatile memory
17p program area
17d Data area
17s system area
141 Application selection part
142 Validity judgment unit
143 Program execution unit
144 Registration judgment part
145 Capacity determination unit
146 Registration Request Information Validity Determination Unit
147 Association validity determination unit
148 Registration Request Information Writing Unit

Claims (9)

複数のアプリケーションにおいて共通し、各アプリケーション内で実行されるプログラムである共通プログラムを記憶し、読み出し専用であって不揮発性の第1の記憶部と、メモリ領域がプログラム領域と、データ領域とに割り当てられ、個々のアプリケーションに独自のプログラムである独自プログラムをプログラム領域に、アプリケーションデータをデータ領域に、互いに関連づけて記憶する、書き換え可能な不揮発性の第2の記憶部とを備え、前記共通プログラム、前記独自プログラム及び前記アプリケーションデータを含む複数のアプリケーションを登録することが可能なICカードであって、
独自プログラムを含む独自プログラム登録要求又はアプリケーションデータを含むアプリケーションデータ登録要求を受信する登録要求受信手段と、
前記登録要求受信手段によって受信された前記独自プログラム又はアプリケーションデータを前記第2の記憶部の所定の領域に書き込む登録要求情報書込手段と
前記登録要求情報書込手段によって前記第2の記憶部の所定の領域に書き込まれた前記独自プログラム又は前記アプリケーションデータに基づいて、前記アプリケーションを識別するアプリケーション識別情報、独自プログラム識別情報、及び、前記独自プログラムが記憶されている場所を示す場所情報を含む管理情報を作成する管理情報作成手段とを備えること、
を特徴とするICカード。
A common program that is common to a plurality of applications and is executed in each application is stored, a read-only non-volatile first storage unit, and a memory area are allocated to a program area and a data area A rewritable non-volatile second storage unit that stores a unique program, which is a unique program for each application, in a program area and application data in a data area in association with each other, the common program, An IC card capable of registering a plurality of applications including the unique program and the application data,
Registration request receiving means for receiving a unique program registration request including a unique program or an application data registration request including application data;
Registration request information writing means for writing the unique program or application data received by the registration request receiving means in a predetermined area of the second storage unit ;
Based on the unique program or the application data written in a predetermined area of the second storage unit by the registration request information writing means, application identification information for identifying the application, unique program identification information, and Management information creation means for creating management information including location information indicating the location where the unique program is stored;
IC card characterized by
請求項1に記載のICカードにおいて、
前記登録要求受信手段によって受信される独自プログラム又はアプリケーションデータを前記第2の記憶部に記憶されているいずれのアプリケーションデータ又はいずれの独自プログラムに関連づけるかを示す関連づけ情報を受信する関連づけ情報受信手段と、
前記関連づけ情報受信手段によって受信される関連づけ情報が正当であるか否かを判定する関連づけ正当性判定手段とを備え、
前記登録要求情報書込手段は、前記関連づけ正当性判定手段によって肯と判定された場合に書き込みを行うこと、
を特徴とするICカード。
In the IC card according to claim 1,
Association information receiving means for receiving association information indicating which application data or application program stored in the second storage unit is associated with the unique program or application data received by the registration request receiving means; ,
Association validity determining means for determining whether or not the association information received by the association information receiving means is valid,
The registration request information writing means performs writing when it is determined affirmative by the association validity determining means;
IC card characterized by
請求項2に記載のICカードにおいて、
前記第2の記憶部は、アプリケーション識別情報を、同一のアプリケーションに含まれる前記プログラム領域に記憶されている独自プログラムと、前記データ領域に記憶されているアプリケーションデータとに結びつけて記憶し、
前記関連づけ情報受信手段は、関連づけ情報として、前記アプリケーション識別情報を受信すること、
を特徴とするICカード。
In the IC card according to claim 2,
The second storage unit stores application identification information in association with a unique program stored in the program area included in the same application and application data stored in the data area,
The association information receiving means receives the application identification information as association information;
IC card characterized by
請求項3に記載のICカードにおいて、
前記関連づけ情報受信手段によって受信されたアプリケーション識別情報と同一のアプリケーション識別情報が前記第2の記憶部に記憶されているか否かを判定する登録済判定手段と、
前記関連づけ情報受信手段によって受信される関連づけ情報に対応する関連づけ正当性認証情報を受信する関連づけ正当性認証情報受信手段とを備え、
前記関連づけ正当性判定手段は、前記登録済判定手段によって記憶されていると判定された場合に、前記第2の記憶部に記憶されている同一のアプリケーション識別情報に対応する登録関連づけ正当性認証情報と、前記関連づけ正当性認証情報受信手段によって受信された関連づけ正当性認証情報とを照合することによって判定を行うこと、
を特徴とするICカード。
In the IC card according to claim 3,
Registered determination means for determining whether or not the same application identification information as the application identification information received by the association information receiving means is stored in the second storage unit;
Association validity authentication information receiving means for receiving association validity authentication information corresponding to association information received by the association information receiving means,
The association validity determining means is registered association validity authentication information corresponding to the same application identification information stored in the second storage unit when it is determined by the registered determination means that it is stored. And making a determination by collating the association validity authentication information received by the association validity authentication information receiving means,
IC card characterized by
請求項1から請求項4までのいずれか1項に記載のICカードにおいて、
前記登録要求受信手段によって受信される独自プログラム又はアプリケーションデータが正当なものであるか否かを判定する登録要求情報正当性判定手段を備え、
前記登録要求情報書込手段は、前記登録要求情報正当性判定手段によって肯と判定された場合に書き込みを行うこと、
を特徴とするICカード。
In the IC card according to any one of claims 1 to 4,
A registration request information validity determination unit that determines whether the unique program or application data received by the registration request reception unit is valid;
The registration request information writing unit performs writing when the registration request information validity determining unit determines affirmative;
IC card characterized by
請求項1から請求項5までのいずれか1項に記載のICカードにおいて、
前記第2の記憶部は、前記プログラム領域及び/又は前記データ領域の空き容量を示す領域空き容量情報、及び/又は、前記登録要求情報書込手段が独自プログラム又はアプリケーションデータを書き込む位置を示す書込位置情報を記憶すること、
を特徴とするICカード。
In the IC card according to any one of claims 1 to 5,
The second storage unit is an area free space information indicating a free space of the program area and / or the data area, and / or a document indicating a position where the registration request information writing unit writes a unique program or application data. Storing location information,
IC card characterized by
複数のアプリケーションにおいて共通し、各アプリケーション内で実行されるプログラムである共通プログラムを記憶し、読み出し専用であって不揮発性の第1の記憶部と、メモリ領域がプログラム領域と、データ領域とに割り当てられ、個々のアプリケーションに独自のプログラムである独自プログラムをプログラム領域に、アプリケーションデータをデータ領域に、互いに関連づけて記憶する、書き換え可能な不揮発性の第2の記憶部と、前記第1及び/又は第2の記憶部に記憶されているプログラムを実行するCPUとを備え、前記共通プログラム、前記独自プログラム及び前記アプリケーションデータを含む複数のアプリケーションを登録することが可能なICカードへアプリケーションを登録するために前記CPUに実行させるICカードプログラムであって、
独自プログラムを含む独自プログラム登録要求又はアプリケーションデータを含むアプリケーションデータ登録要求を受信する登録要求受信手順と、
前記登録要求受信手順において受信した前記独自プログラム又は前記アプリケーションデータを前記第2の記憶部の所定の領域に書き込む登録要求情報書込手順と
前記登録要求情報書込手順によって前記第2の記憶部の所定の領域に書き込んだ前記独自プログラム又は前記アプリケーションデータに基づいて、前記アプリケーションを識別するアプリケーション識別情報、独自プログラム識別情報、及び、前記独自プログラムが記憶されている場所を示す場所情報を含む管理情報を作成する管理情報作成手順とを備えること、
を特徴とするICカードプログラム。
A common program that is common to a plurality of applications and is executed in each application is stored, a read-only non-volatile first storage unit, and a memory area are allocated to a program area and a data area A rewritable non-volatile second storage unit that stores a unique program that is unique to each application in a program area and application data in a data area in association with each other, and the first and / or A CPU for executing a program stored in a second storage unit, and for registering an application in an IC card capable of registering a plurality of applications including the common program, the unique program, and the application data Causes the CPU to execute A card program,
A registration request receiving procedure for receiving an original program registration request including an original program or an application data registration request including application data;
A registration request information writing procedure for writing the original program or the application data received in the registration request receiving procedure in a predetermined area of the second storage unit ;
Based on the unique program or the application data written in the predetermined area of the second storage unit by the registration request information writing procedure, application identification information for identifying the application, unique program identification information, and the unique A management information creation procedure for creating management information including location information indicating a location where the program is stored;
IC card program characterized by this.
請求項7に記載のICカードプログラムにおいて、
前記登録要求受信手順において受信する独自プログラム又はアプリケーションデータを前記第2の記憶部に記憶されているいずれのアプリケーションデータ又はいずれの独自プログラムに関連づけるかを示す関連づけ情報を受信する関連づけ情報受信手順と、
前記関連づけ情報受信手順において受信する関連づけ情報の正当性を認証するための関連づけ正当性認証情報を受信する関連づけ正当性認証情報受信手順と、
前記関連づけ情報受信手順において受信する関連づけ情報が正当であるか否かを前記関連づけ正当性認証情報受信手順で受信した関連づけ正当性認証情報に基づいて判定する関連づけ正当性判定手順とを備え、
前記登録要求情報書込手順は、前記関連づけ正当性判定手順において正当であると判定した場合に実行されること、
を特徴とするICカードプログラム。
In the IC card program according to claim 7,
An association information reception procedure for receiving association information indicating which application data or application program stored in the second storage unit is associated with the unique program or application data received in the registration request reception procedure;
An association validity authentication information reception procedure for receiving association validity authentication information for authenticating the validity of the association information received in the association information reception procedure;
An association validity determination procedure for determining whether or not the association information received in the association information reception procedure is valid based on the association validity authentication information received in the association validity authentication information reception procedure;
The registration request information writing procedure is executed when it is determined to be valid in the association validity determination procedure;
IC card program characterized by this.
請求項7又は請求項8に記載のICカードプログラムにおいて、
前記登録要求受信手順において受信する独自プログラム又はアプリケーションデータが正当なものであるか否かを判定する登録要求情報正当性判定手順を備え、
前記登録要求情報書込手順は、前記登録要求情報正当性判定手順において正当なものと判定した場合に実行されること、
を特徴とするICカードプログラム。
In the IC card program according to claim 7 or 8,
A registration request information validity determination procedure for determining whether or not the unique program or application data received in the registration request reception procedure is valid,
The registration request information writing procedure is executed when it is determined to be valid in the registration request information validity determination procedure;
IC card program characterized by this.
JP2002189932A 2002-06-28 2002-06-28 IC card and IC card program Expired - Lifetime JP4185715B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002189932A JP4185715B2 (en) 2002-06-28 2002-06-28 IC card and IC card program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002189932A JP4185715B2 (en) 2002-06-28 2002-06-28 IC card and IC card program

Publications (2)

Publication Number Publication Date
JP2004030532A JP2004030532A (en) 2004-01-29
JP4185715B2 true JP4185715B2 (en) 2008-11-26

Family

ID=31184211

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002189932A Expired - Lifetime JP4185715B2 (en) 2002-06-28 2002-06-28 IC card and IC card program

Country Status (1)

Country Link
JP (1) JP4185715B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4774681B2 (en) * 2004-05-18 2011-09-14 大日本印刷株式会社 Multi-application IC card with common command application
JP4863058B2 (en) * 2006-03-20 2012-01-25 大日本印刷株式会社 IC card and application writing method
EP2199993A1 (en) * 2008-12-17 2010-06-23 Gemalto SA Method and token for managing one processing relating to an application supported or to be supported by a token
CN114185568A (en) * 2021-12-15 2022-03-15 恒宝股份有限公司 Smart card and smart card upgrading method thereof

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63158683A (en) * 1986-07-21 1988-07-01 Toshiba Corp Ic card
JP2555096B2 (en) * 1987-10-05 1996-11-20 富士通株式会社 IC card
JP2753565B2 (en) * 1988-01-26 1998-05-20 日立マクセル株式会社 IC card data transmission method
JP2671213B2 (en) * 1988-02-25 1997-10-29 日立マクセル株式会社 IC card
JPH04220788A (en) * 1990-12-20 1992-08-11 Fujitsu Ltd How to register an IC card program
ATE152539T1 (en) * 1994-02-08 1997-05-15 Belle Gate Invest Bv DATA EXCHANGE SYSTEM WITH PORTABLE DATA PROCESSING UNITS
JPH11212774A (en) * 1998-01-23 1999-08-06 Fujitsu Ltd Application management method and information processing apparatus using the same
JP4274675B2 (en) * 2000-04-28 2009-06-10 株式会社エヌ・ティ・ティ・データ Card system, IC card and recording medium
AU2000255731A1 (en) * 2000-07-04 2002-01-14 Hitachi Ltd. Ic card, method for backing up ic card, and restoring method
JP4548758B2 (en) * 2000-09-05 2010-09-22 大日本印刷株式会社 Portable information processing device with shared access management function

Also Published As

Publication number Publication date
JP2004030532A (en) 2004-01-29

Similar Documents

Publication Publication Date Title
KR101429736B1 (en) Secure application directory
JP4322021B2 (en) Memory card
JP3636984B2 (en) Recording medium for IC card system and IC card system
EP1898370A2 (en) IC card, and access control method
EP1089156A2 (en) Device, system and method for data access control
JPH087720B2 (en) Area access method for IC cards for multiple services
JPS63503335A (en) Secure file system for portable data carriers
JP2007226839A (en) Memory unit and system for storing data structure
JPH06274397A (en) File control system
JP2941361B2 (en) Portable electronic devices
JPH0793203A (en) File managing system
EP1710688A2 (en) Tamper resistant device and file generation method
JP5833118B2 (en) Electronic ticket storage device, electronic ticket confirmation system and method
US8112662B2 (en) Portable electronic apparatus, processing apparatus for portable electronic apparatus, and data processing method in portable electronic apparatus
JP4185715B2 (en) IC card and IC card program
EP1450235B1 (en) Memory device
JP4815912B2 (en) IC card, IC card program
US7769963B1 (en) RF tag system with single step read and write commands
JP4445718B2 (en) IC card and IC card program
JP4443699B2 (en) Portable electronic device and method for controlling portable electronic device
US7096366B1 (en) Portable electronic device with a security function and a nonvolatile memory
JP2004029945A (en) Ic card and ic card program
GB2350703A (en) Smart devices
US7296289B2 (en) Setting or changing an access condition for an access management apparatus and method of a portable electronic device
JP2005011147A (en) Ic card and ic card program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050621

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20061116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070814

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071012

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: 20080902

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: 20080908

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4185715

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

EXPY Cancellation because of completion of term