JP4385604B2 - IC card with download program erasing function and download program erasing method for the card - Google Patents

IC card with download program erasing function and download program erasing method for the card Download PDF

Info

Publication number
JP4385604B2
JP4385604B2 JP2003014710A JP2003014710A JP4385604B2 JP 4385604 B2 JP4385604 B2 JP 4385604B2 JP 2003014710 A JP2003014710 A JP 2003014710A JP 2003014710 A JP2003014710 A JP 2003014710A JP 4385604 B2 JP4385604 B2 JP 4385604B2
Authority
JP
Japan
Prior art keywords
program
download
card
erasing
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003014710A
Other languages
Japanese (ja)
Other versions
JP2004227306A (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.)
Toppan Inc
Original Assignee
Toppan Inc
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 Toppan Inc filed Critical Toppan Inc
Priority to JP2003014710A priority Critical patent/JP4385604B2/en
Publication of JP2004227306A publication Critical patent/JP2004227306A/en
Application granted granted Critical
Publication of JP4385604B2 publication Critical patent/JP4385604B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、書き換え可能な不揮発性メモリに格納されたダウンロードプログラムに従ってプログラムをダウンロード可能なICカードに係り、特にプログラムのダウンロードに用いられたダウンロードプログラムを消去することが可能なダウンロードプログラム消去機能付きICカード及び同カードにおけるダウンロードプログラム消去方法に関する。
【0002】
【従来の技術】
最近、ICチップが実装されたカード、即ちICカードが普及している。このICチップは、演算処理及び各部の制御を行うCPU及び書き換え可能な不揮発性メモリを含んでいる。この書き換え可能な不揮発性メモリには、一般にEEPROM(Electrically Erasable and Programmable Read Only Memory)が用いられる(例えば、非特許文献1参照)。また最近は、非特許文献1にも記載されているように、各種のアプリケーション(アプリケーションプログラム)を書き換え可能な不揮発性メモリ(EEPROM)に外部からダウンロードすることが可能なICカードが出現している。このようなICカードの出現により、当該ICカードの発行(流通)後でも、アプリケーションのバージョンアップ、更にはアプリケーションの追加等が可能となり、非常に汎用性が高まっている。
【0003】
【非特許文献1】
“Maos Platforms Technical Status Report”、[online]、平成12年4月10日、Eurpoay International S.A、p.26-27、[平成14年4月10日検索]、インターネット<URL:http://webbox3.noveous.net/multoslib/pdf/00-04-10%20Europay-maos-report.pdf>
【0004】
【発明が解決しようとする課題】
ICカード内の書き換え可能な不揮発性メモリ(EEPROM)にアプリケーションをダウンロードするためには、ダウンロードを制御するためのプログラム、即ちダウンロードプログラムをICカード内に持つ必要がある。このダウンロードプログラムにより、アプリケーション(アプリケーションプログラム)だけでなく、例えばICカードの基本ソフトウエアであるICカードOS(オペレーティングシステム)と呼ばれるOSをダウンロードすることも可能である。
【0005】
しかしながら、ダウンロードプログラムは一般に、書き換えが不可能な不揮発性メモリ、例えばROM(非プログラマブルな読み出し専用メモリ)またはPROM(プログラマブルな読み出し専用メモリ)に予め格納されている。このため、ダウンロードプログラムは、アプリケーション(プログラム)のダウンロード完了後もICカード内に残ったままとなる。このようなICカードでは、アプリケーション(プログラム)が不正にダウンロードされる可能性がある。
【0006】
本発明は上記事情を考慮してなされたものでその目的は、ダウンロードプログラムに従うプログラムのダウンロード完了後に当該ダウンロードプログラムを消去可能とすることで、プログラムが不正にダウンロードされるのを防止できるダウンロードプログラム消去機能付きICカード及び同カードにおけるダウンロードプログラム消去方法を提供することにある。
【0007】
【課題を解決するための手段】
本発明はかかる課題を解決するものであり、請求項1に係る発明は、プログラムをダウンロードするためのダウンロードプログラムの消去が可能なダウンロードプログラム消去機能付きICカードであって、前記ダウンロードプログラムを格納するための第1の領域を含むダウンロード領域が確保された書き換え可能な不揮発性メモリと、前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記ダウンロードプログラムに従って前記書き換え可能な不揮発性メモリの前記ダウンロード領域の前記第1の領域とは異なる第2の領域に前記ダウンロードプログラムとは別のプログラムをダウンロードするためのプログラムダウンロードを実行するダウンロード手段と、記ダウンロード手段による前記プログラムダウンロードの完了後で且つ前記ICカードの発行前に前記ダウンロードプログラムを前記書き換え可能な不揮発性メモリの前記第1の領域から消去する消去手段とを具備するダウンロードプログラム消去機能付きICカードであることを特徴とする。
【0008】
請求項2に係る発明は、請求項1に記載のダウンロードプログラム消去機能付きICカードにおいて、前記消去手段が、所定の消去プログラムに従って前記ダウンロードプログラムを消去することを特徴とする。
【0009】
請求項3に係る発明は、請求項2に記載のダウンロードプログラム消去機能付きICカードにおいて、前記消去プログラムが前記書き換え可能な不揮発性メモリの前記第1の領域に格納され、前記消去手段が、前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記消去プログラムに従って当該消去プログラム自身をも消去することを特徴とする。
【0010】
請求項4に係る発明は、請求項3に記載のダウンロードプログラム消去機能付きICカードにおいて、前記消去プログラムが、当該消去プログラムに従う前記ダウンロードプログラムの消去が完了した後に実行される特定コール命令であって、当該消去プログラムを消去するのに用いられる特定関数を呼び出すための特定コール命令を含んでおり、前記消去手段は、前記特定コールによって前記特定関数が呼び出された場合、当該特定関数に従って前記消去プログラムを消去することを特徴とする。
【0011】
請求項5に係る発明は、請求項2または請求項3に記載のダウンロードプログラム消去機能付きICカードにおいて、前記消去手段が、消去の対象となるプログラムが格納されている前記書き換え可能な不揮発性メモリの前記第1の領域に前記消去プログラムに従って消去データを書き込むことにより当該消去の対象となるプログラムを消去することを特徴とする。
【0012】
請求項6に係る発明は、請求項5に記載のダウンロードプログラム消去機能付きICカードにおいて、消去チェック手段を更に具備し、前記消去手段は、1バイトの所定の消去データを前記第1の領域に繰り返し書き込むことにより前記第1の領域に格納されている前記消去の対象となるプログラムを消去し、前記消去チェック手段は、前記消去手段によるプログラムの消去が正常に行われたかを、前記第1の領域の少なくとも先頭バイト及び最終バイトが前記1バイトの所定の消去データであるかにより判定することを特徴とする。
【0013】
請求項7に係る発明は、請求項1に記載のダウンロードプログラム消去機能付きICカードにおいて、前記ダウンロードプログラムに従う前記ダウンロード手段による前記書き換え可能な不揮発性メモリへのプログラムダウンロードの完了後に、前記ICカードと接続される電子機器を介して当該電子機器の操作者に、前記ダウンロードプログラムを消去するかを問い合わせる問い合わせ手段を更に具備し、前記消去手段は、前記問い合わせ手段による問い合わせに対して前記ダウンロードプログラムの消去が指定された場合に、当該ダウンロードプログラムを消去することを特徴とする。
【0014】
請求項8に係る発明は、請求項1に記載のダウンロードプログラム消去機能付きICカードにおいて、前記ダウンロードプログラムが消去済みであることを示すためのフラグ領域が確保されるプログラマブルな読み出し専用の不揮発性メモリと、前記ダウンロードプログラムが正常に消去できた場合、前記プログラマブルな読み出し専用の不揮発性メモリの前記フラグ領域に特定フラグを書き込むフラグ書き込み手段とを更に具備することを特徴とする。
【0015】
請求項9に係る発明は、ログラムをダウンロードするためのダウンロードプログラムを格納する第1の領域を含むダウンロード領域が確保された書き換え可能な不揮発性メモリと、ダウンロード手段と、消去手段とを具備するICカードにおけるダウンロードプログラム消去方法であって、前記ダウンロード手段が、前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記ダウンロードプログラムに従って前記書き換え可能な不揮発性メモリの前記ダウンロード領域の前記第1の領域とは異なる第2の領域に前記ダウンロードプログラムとは別のプログラムをダウンロードするためのプログラムダウンロードを実行するステップと、前記プログラムダウンロードの完了後で且つ前記ICカードの発行前、前記消去手段が、前記ダウンロードプログラムを前記書き換え可能な不揮発性メモリの前記第1の領域から消去するステップとを具備するICカードにおけるダウンロードプログラム消去方法であることを特徴とする。
【0016】
請求項1または請求項9に係る発明においては、書き換え可能な不揮発性メモリの第1の領域に格納されているに格納されているダウンロードプログラムに従って当該不揮発性メモリのダウンロード領域の第1の領域とは異なる第2の領域にダウンロードプログラムとは別のプログラムをダウンロードするためのプログラムダウンロードがダウンロード手段により実行される。このダウンロード手段によるダウンロードプログラムに従うプログラムダウンロードの完了後で且つICカードの発行前に、当該ダウンロードプログラムが書き換え可能な不揮発性メモリの第1の領域から消去手段により消去される。
【0017】
このようにプログラムダウンロード完了後で且つICカードの発行前に、ダウンロードプログラムが消去されることにより、ICカードに不正にプログラムがダウンロードされるのを防止できる。
【0018】
次に、請求項2に係る発明においては、消去手段によるダウンロードプログラムの消去が所定の消去プログラムに従って行われる。これにより、消去プログラムを用意するだけで、ダウンロードプログラムの消去が実現できる。
【0019】
次に、請求項3に係る発明においては、書き換え可能な不揮発性メモリの第1の領域に格納されている消去プログラムに従って、ダウンロードプログラムだけでなく当該消去プログラム自身も消去手段により消去される。これにより、消去プログラムによって他のプログラム等が誤って消去されるのを防止できる。
【0020】
次に、請求項4に係る発明においては、消去プログラムに従うダウンロードプログラムの消去が完了すると、当該消去プログラムに含まれている特定コール命令が実行されて特定関数が呼び出される。すると、この呼び出された特定関数に従って消去手段により消去プログラムが消去される。即ち、消去プログラムに従う当該消去プログラム自身の消去が容易に実現される。
【0021】
次に、請求項5に係る発明においては、消去の対象となるプログラム、即ちダウンロードプログラム、またはダウンロードプログラムと消去プログラムとが格納されている書き換え可能な不揮発性メモリの第1の領域に、消去手段により、消去プログラムに従って消去データが書き込まれる。これにより、ダウンロードプログラム、またはダウンロードプログラムと消去プログラムとが、簡単に消去できる。
【0022】
次に、請求項6に係る発明においては、消去手段は、1バイトの所定の消去データを第1の領域に繰り返し書き込むことにより消去の対象となるプログラムを消去し、消去手段によるプログラムの消去が正常に行われたか否かが、第1の領域の少なくとも先頭バイト及び最終バイトが上記1バイトの所定の消去データであるか否かを消去チェック手段が調べることにより、簡単に判定できる
【0023】
次に、請求項7に係る発明においては、書き換え可能な不揮発性メモリへのプログラムダウンロードが完了すると、ICカードと接続される電子機器を介し、ダウンロードプログラムを消去するかが当該電子機器の操作者に対して問い合わせ手段により問い合わされる。この問い合わせに対してダウンロードプログラムの消去が指定された場合に、当該ダウンロードプログラムが消去手段により消去される。このように、電子機器の操作者(例えばユーザ)の指定に応じてダウンロードプログラムが消去されるため、当該操作者は必要な場合だけダウンロードプログラムの消去を指定すればよく、複数のプログラムをダウンロードする場合に、その都度ダウンロードプログラムを対応するICカード内の書き換え可能な不揮発性メモリに書き込ませるための操作を行わなくても済む。
【0024】
次に、請求項8に係る発明においては、ダウンロードプログラムが正常に消去できた場合、プログラマブルな読み出し専用の不揮発性メモリのフラグ領域にフラグ書き込み手段により特定フラグが書き込まれる。これにより、このフラグ領域を参照するだけで、対応するICカードがダウンロードプログラムの消去済みのカードであるかが簡単に判定できる。
【0025】
【発明の実施の形態】
以下、本発明の実施の形態につき図面を参照して説明する。
図1は本発明の一実施形態に係るダウンロードプログラム消去機能付きICカード10の構成を示すブロック図である。
【0026】
図1に示すICカード10は例えば接触型のICカードである。このICカード10は、ROM(Read Only Memory)11と、PROM(Programmable ROM)12と、EEPROM(Electrically Erasable and Programmable ROM)13と、RAM(Random Access Memory)14と、CPU15と、通信インタフェース16とから構成される。
【0027】
ROM11は、読み出し専用メモリ(非プログラマブルな読み出し専用の不揮発性メモリ)である。ROM11には、ICカード10の初期化時に当該ICカード10内をリセットするためのリセット信号を出力するのに必要なルーチンと、外部の装置からICカード10内のEEPROM13にライトコマンド(物理ライトコマンド)によりプログラム(例えば後述するDLP132a及びEP132b)を書き込むのに必要なルーチン(いずれも図示せず)とが予め格納されている。
【0028】
PROM12は、プログラマブルな読み出し専用メモリ(プログラマブルな読み出し専用の不揮発性メモリ)である。PROM12の特定アドレスは、後述するDLP132aが消去済みのICカード10であることを示す特定フラグを保存するためのフラグ領域120に割り当てられる。
【0029】
EEPROM13は書き換え可能な不揮発性メモリである。EEPROM13の領域は、主として、管理用の領域であるシステム領域131とダウンロード領域(以下、DL領域と称する)132とデータ領域133とに割り当てられる。
システム領域131は、ICカード10(に搭載されたICチップ)に固有のキー(チップKEY)など、システムを管理するのに必要な情報を格納するのに用いられる。
【0030】
DL領域132は、プログラムのダウンロードに関係するプログラム、例えば、ダウンロードプログラム(以下、DLPと称する)132a及び消去プログラム(以下、EPと称する)132bと、ダウンロードされたプログラム、例えばOS(ICカードOS)132c及び各種アプリケーション132dとを格納するのに用いられる。DLP132aは、各種のプログラムをダウンロードするためのプログラムである。ここでは、DLP132aによりOS132c及び各種アプリケーション132dがダウンロードされる。EP132bは、DLP132aを消去するためのプログラムである。
【0031】
RAM14の領域は、CPU15のワーク領域等に用いられる。RAM14には、プログラムの戻り先を示す戻り値等を格納するためのスタック140が確保される。
【0032】
CPU15は、OS132cに従って各種アプリケーション132dを実行する。またCPU15は、外部からの指示によりDLP132aを実行する。またCPU15は、DLP132aの実行終了に応じて自動的に或いは外部からの指示に応じてEP132bを実行する。CPU15は更に、通信インタフェース16を介して外部の装置(電子機器)との間でデータの入出力を行う。
【0033】
次に、本発明の一実施形態の動作の概要を、ICカード10を発行する場合を例に、図2のシステム構成図及び図3のフローチャートを参照して説明する。 まず、図1に示す構成のICカード10を発行する際には、当該ICカード10は、図2に示すように、ホスト(電子機器)20のカードスロット21に挿入される。これにより、ICカード10はホスト20と接続される。この状態で、ホスト20は、ICカード10との間でデータの授受が可能となる。
【0034】
ホスト20は、ICカード10と接続されている状態で、当該ICカード10内のEEPROM13に確保されたDL領域132に、DLP132a及びEP132bを書き込むための動作を行う(ステップS1)。この書き込み動作は、ホスト20からICカード10に物理ライトコマンドを発行することにより行われる。
【0035】
ホスト20は、DL領域132へのDLP132a及びEP132bの書き込みが正常に行われた場合、DLP132aを起動する。これにより、ICカード10内のCPU15はダウンロード手段として機能し、DLP132aに従って、EEPROM13内のDL領域132にOS132c及びアプリケーション132dをダウンロードする(ステップS2)。
【0036】
OS132c及びアプリケーション132dが全てEEPROM13内のDL領域132に正常にダウンロードされると、EP132bが起動される。これにより、CPU15は消去手段として機能し、DL領域132に書き込まれているDLP132aをEP132bに従って消去する(ステップS3)。ユーザに対して発行されるICカード10は、このDLP132aが消去されたICカードである。
【0037】
このように、本実施形態においては、ICカード10の発行に際し、当該ICカード10のEEPROM13内に確保されたDL領域132に、DLP132a値に従ってプログラム(OS132c及びアプリケーション132d)がダウンロードされる。そして、このプログラムのダウンロード完了後に、DLP132aが自動的に消去される。これにより、ICカード10の発行後に当該ICカード10に不正にプログラムがダウンロードされるのを防止できる。
【0038】
次に、上記ステップS1の処理、即ちICカード10のEEPROM13に確保されたDL領域132へのDLP132a及びEP132bの書き込み処理の詳細を、図4のフローチャートを参照して説明する。
【0039】
まずホスト20は、ICカード10にチップKEYを送ることにより、当該ICカード10によるチップKEYチェックを行わせる(ステップS11)。このチップKEYチェックは、ホスト20から送られたチップKEYを、EEPROM13に確保されたシステム領域131の所定位置に格納されているチップKEYとCPU15が照合することにより行われる。CPU15は、両チップKEYが一致するならば、ICカード10はプログラムのダウンロードが許される正当なICカードであると判定し、その旨をホスト20に通知する。
【0040】
ホスト20は、ICカード10が正当なICカードの場合、EEPROM13中のDL領域132の所定アドレス、例えば先頭アドレスから、DLP132aを構成するDLPデータを順次書き込む(ステップS12)。これにより、DL領域132の先頭アドレスから始まる領域に、図1に示すように、DLP132aが格納される。つまり本実施形態では、DLP132aが格納される領域の先頭アドレスを、DL領域132の先頭アドレスに一致させるようにしている。これにより、DLP132aがDL領域132に格納されている証とすることが簡単にできる。DLP132aがDL領域132に格納されていない場合、当該DL領域132の先頭部分は空白(または消去状態)を表す同一値となる。
【0041】
次にホスト20は、DL領域132内の、EP132bのサイズに一致する大きさの所定領域、例えば最終領域に、EP132bを構成するEPデータを順次書き込む(ステップS13)。これにより、DL領域132の最終領域に、図1に示すように、EP132bが格納される。
【0042】
ホスト20は、DLP132a及びEP132bの書き込みを終了すると、ICカード10のステータスを読み込むことにより、当該DLP132a及びEP132bの書き込みが正常終了したか否かを判定するためのステータスチェックを行う(ステップS14)。ホスト20は、このステータスチェックの結果、DLP132a及びEP132bの書き込みが正常終了したと判定できた場合、DLP132aを起動する(ステップS15)。これにより上記ステップS2の処理、即ちDLP132aに従うプログラムダウンロード処理が実行される。
【0043】
次に、上記ステップS2の処理(DLP132aに従うプログラムダウンロード処理)の詳細について、図5のフローチャートを参照して説明する。
まずCPU15は、EEPROM13に確保されたDL領域132中の、DLP132a及びEP132bが格納されている領域とは異なる領域に、DLP132aに従って、OS132c及びアプリケーション132dをダウンロードする(ステップS21)。次にCPU15は、OS132c及びアプリケーション132dのダウンロードが正常終了したか否かを判定するためのステータスチェックを行う(ステップS22)。ホスト20は、このステータスチェックの結果、OS132c及びアプリケーション132dのダウンロードが正常終了したと判定できた場合、EP132bを起動する(ステップS23)。これにより上記ステップS3の処理、即ちEP132bに従うDLP消去処理が実行される。
【0044】
次に、上記ステップS3の処理(EP132bに従うDLP消去処理)の詳細について、図6のフローチャートを参照して説明する。
まずCPU15は、EEPROM13に確保されたDL領域132の先頭領域に格納されているDLP132aを消去するための例えば1バイトの所定の消去データを、EP132bに従ってRAM14内にセットする(ステップS31)。次にCPU15は、セットされた消去データを、DL領域132の先頭領域、即ちDL領域132中の、DLP132aが格納されている領域(以下、DLP領域と称する)に連続して繰り返し書き込む(ステップS32)。
【0045】
CPU15は、DLP領域への消去データの書き込みを終了すると消去チェック手段として機能し、当該DLP領域に格納されていたDLP132aを正しく消去できたかをチェックするための消去チェックを次のように行う(ステップS33)。まずCPU15は、DLP領域の例えば先頭バイトが消去データであるかをチェックする(ステップS33a)。次にCPU15は、DLP領域の例えば最終バイトが消去データであるかをチェックする(ステップS33b)。
【0046】
CPU15は、上記の消去チェック(ステップS33)により、DLP領域の先頭及び最終バイトが共に消去データであると判定された場合、DLP132aが正しく消去されたものと判定する(ステップS34)。この場合、CPU15はフラグ書き込み手段として機能し、PROM12の特定アドレスに確保されたフラグ領域120に、DLP132aが消去済みであることを示す特定フラグを書き込む(ステップS35)。このフラグ領域120への特定フラグ書き込みにより、当該フラグ領域120を参照するだけで、対応するICカード10がDLP132aを消去済みのICカードであるかを判定することが可能となる。また、フラグ領域120への特定フラグの書き込みにより、DLP132aが消去済みのICカード10を対象とする、新たなプログラムダウンロードを禁止することも可能となる。
【0047】
またCPU15は、上記の消去チェック(ステップS33)により、DLP領域の先頭及び最終バイトの少なくとも一方が消去データ以外であると判定された場合、DLP132aが正しく消去されなかったものと判定する(ステップS34)。この場合、CPU15は、DL領域132にダウンロードされているアプリケーション132dが使用できないように当該アプリケーション132dをロックする(ステップS36)。このアプリケーション132dのロックは、当該アプリケーション132dの実行可を示すフラグを他の値に変更することにより実現される。
【0048】
EP132bに従って、上記ステップS35またはS36が実行されると、例えばOS132cのメインルーチンに制御が渡される。
【0049】
[第1の変形例]
次に、本発明の一実施形態における第1の変形例について説明する。
まず、第1の変形例の特徴は、DLP132aを消去するためのEP132bにより当該EP132b自身も消去する点にある。このため第1の変形例では、図7に示すように、EP132bから呼び出されることにより当該EP132bを消去するのに用いられる特定関数SFが、例えばROM11の特定アドレスに予め格納されている。また、EP132bは、DLP132aの消去完了後に当該EP132b自身を消去するために、上記特定関数SFをコールする特定コール命令CALLSFを含む(図7参照)。この特定コール命令CALLSFは、EP132b中の最後に実行される命令である。また、OS132cは、図7に示すように、DLP132a及びEP132bの消去完了後に実行される消去チェックルーチンECRを含む。この消去チェックルーチンECRが、OS132cから独立して、例えばROM11の所定領域に格納されていても構わない。
【0050】
次に、本発明の一実施形態における第1の変形例の動作の概要を、上記一実施形態と相違する部分について、図8のフローチャートを参照して説明する。
CPU15は、図3のフローチャート中の上記ステップS2の処理(DLP132aに従うプログラムダウンロード処理)を実行すると、当該フローチャート中のステップS3の処理(EP132bに従うDLP消去処理)に代えて、図8のフローチャートに示すステップS41及びS42の処理を実行する。即ちCPU15は、まず消去手段として機能して、EP132bに従い、DLP132a及び当該EP132b自身を消去する処理(ステップS41)を実行する。次にCPU15は消去チェック手段として機能し、DLP132a及びEP132bを正しく消去できたかを、消去チェックルーチンECRに従ってチェックする処理(ステップS42)を実行する。このように、EP132bに従って、DLP132aだけでなく、当該EP132b自身も消去することにより、当該EP132bによって他のプログラム等が誤って消去されるのを防止できる。
【0051】
次に、上記ステップS41及びS42の処理の詳細について、図9のフローチャートを参照して説明する。
CPU15は、上記ステップS2のプログラムダウンロードの終了時にDLP132aが起動されると(ステップS15)、当該DLP132aに従って、以下の処理を実行する。
【0052】
まずCPU15は、消去チェックルーチンECRを指す戻り値(例えば、消去チェックルーチンECRの先頭アドレス)をRAM14内に確保されたスタック140に積む(ステップS51)。次にCPU15は、EEPROM13に確保されたDL領域132の先頭領域に格納されているDLP132aを消去するための例えば1バイトの消去データをRAM14内にセットする(ステップS52)。次にCPU15は、セットされた消去データを、DL領域132の先頭領域、即ちDLP領域に連続して繰り返し書き込む(ステップS53)。
【0053】
本実施形態の第1の変形例では、EP132bに従って、DLP領域に消去データを書き込む処理(ステップS53)が終了すると、当該EP132bの最後の命令である特定コール命令CALLSFがCPU15により実行される。これにより、ROM11の特定アドレスに格納されている特定関数SFが呼び出される(ステップS54)。この際、特定関数SFに、DL領域132の最終領域、即ちDL領域132中の、EP132bが格納されている領域(以下、EP領域と称する)の先頭アドレス及びサイズと、当該サイズに一致するバイト数の、書き込みデータとしての消去データとが、引数として渡される。この特定関数SFは、データ書き込みを司る関数である。
【0054】
CPU15は、特定コール命令CALLSFによって呼び出された特定関数SFを実行することにより、DL領域132中のEP領域への消去データの書き込みを行う(ステップS55)。CPU15は特定関数SFを実行すると、RAM14内のスタック140に積まれている戻り値に従って、当該戻り値により指定される消去チェックルーチンECRを起動する(ステップS56)。
【0055】
するとCPU15は、消去チェックルーチンECRに従い、DL領域132中のDLP領域及びEP領域にそれぞれ格納されていたDLP132a及びEP132bを正しく消去できたかをチェックするための消去チェックを次のように行う(ステップS57)。まずCPU15は、上記ステップS33a,S33bと同様に、DLP領域の例えば先頭バイト及び最終バイトがそれぞれ消去データであるかをチェックする(ステップS57a,S57b)。またCPU15は、EP領域の例えば例えば先頭バイト及び最終バイトがそれぞれ消去データであるかをチェックする(ステップS57c,S57d)。
【0056】
CPU15は、上記の消去チェック(ステップS57)により、DLP領域の先頭及び最終バイト、並びにEP領域の先頭及び最終バイトが共に消去データであると判定された場合、DLP132a及びEP132bが正しく消去されたものと判定する(ステップS58)。この場合、CPU15はフラグ書き込み手段として機能し、上記ステップS35と同様に、PROM12のフラグ領域120に特定フラグを書き込む(ステップS59)。これに対し、DLP領域の先頭及び最終バイト、並びにEP領域の先頭及び最終バイトのうちの少なくとも1バイトが消去データ以外であると判定された場合、CPU15は、DLP132aまたはEP132bの少なくとも一方が正しく消去されなかったものと判定する(ステップS58)。この場合、CPU15は、上記ステップS36と同様に、DL領域132にダウンロードされているアプリケーション132dをロックする(ステップS60)。
【0057】
消去チェックルーチンECRに従って、上記ステップS59またはS60が実行されると、例えばOS132cのメインルーチンに制御が渡される。
【0058】
このように、本実施形態の第1の変形例においては、EP132bにより、DLP132aだけでなく、当該EP132b自身も消去することができる。第1の変形例では、このDLP132a及びEP132bが共に消去されたICカード10がユーザに対して発行されることになる。
【0059】
[第2の変形例]
次に、本発明の一実施形態における第2の変形例について説明する。
ます、第2の変形例の特徴は、ユーザに対して発行されたICカード10に、ユーザの指示によりプログラムがダウンロードされる都度、ユーザの指示によりDLP132aを消去する点にある。
【0060】
今、図1の構成のICカード10が、ユーザに対して発行されているものとする。このICカード10が、上記第1の変形例を適用して発行されたICカードであるものとする。したがって、ICカード10のEEPROM13に確保されたDL領域132には、図1に示すようにOS132c及びアプリケーション132dがダウンロードされている。一方、DLP132a及びEP132bはDL領域132から消去されている。また、ICカード10の発行時点で、DL領域132にダウンロードされているアプリケーション132dは、当該ICカード10に標準的に用意される基本のアプリケーションであるものとする。
【0061】
ユーザが、この基本のアプリケーション以外のアプリケーション132dをICカード10にダウンロードしたいときは、当該ICカード10を、図10に示すように、端末(電子機器)30のカードスロット31に挿入する。これにより、ICカード10は端末30と接続される。この状態で、端末30は、ICカード10との間でデータの授受が可能となる。そこで、ユーザが端末30を操作することで、ユーザが指定したアプリケーション132dを当該端末30によりICカード10のEEPROM13に確保されたDL領域132にダウンロードすることができる。
【0062】
以下、端末30によるユーザ指定のアプリケーション132dをICカード10にダウンロードする際の動作について、図11のフローチャートを参照して説明する。
【0063】
まず、端末30は、図10に示すようにICカード10と接続された状態で、ユーザの操作に従い、当該ICカード10内のEEPROM13に確保されたDL領域132に、所定のDLP132a及びEP132bを書き込むための動作を行う(ステップS71)。このステップS71は、ICカード10の発行時におけるホスト20によるDLP132a及びEP132bの書き込み(ステップS1)と同様である。但し、ステップS71では、端末30にて周知のユーザ認証が行われ(ステップS71a)、認証に成功した場合、即ち正当なユーザである場合に限り、DLP132a及びEP132bの書き込みが実行される。
【0064】
端末30は、DL領域132へのDLP132a及びEP132bの書き込みが正常に行われた場合、DLP132aを起動する。これにより、ICカード10内のCPU15はダウンロード手段として機能し、端末30を介してユーザにより指定されるアプリケーション132dを、DLP132aに従って、EEPROM13内のDL領域132にダウンロードする(ステップS72)。このステップS72は、ユーザ指定のEP132bがダウンロードされる点を除けば、ICカード10の発行時におけるDLP132aに従うOS132c及びアプリケーション132dのダウンロード(ステップS2)と同様である。
【0065】
DLP132aに従ってユーザ指定のアプリケーション132dがEEPROM13内のDL領域132に正常にダウンロードされると、EP132bが起動される。するとCPU15は問い合わせ手段として機能して、EP132bに従い、DLP132aを消去するか否かをユーザに問い合わせるためのDLP消去問い合わせ指示を、通信インタフェース16を介して端末30に送信する(ステップS73)。このDLP消去問い合わせ指示は端末30によって画面で表示される。これにより、DLP132aを消去するか否かがユーザに対して問い合わされる。ユーザは、端末30に表示されているDLP消去問い合わせ画面上で、DLP132aを消去するか否かを選択する操作を行う。この選択操作の結果は端末30からICカード10に通知される。
【0066】
CPU15は、DLP消去問い合わせに対して消去が指定された場合に(ステップS74)、消去手段として機能して、上記ステップS41と同様に、EP132bに従ってDLP132a及び当該EP132b自身を消去する(ステップS75)。そしてCPU15は消去チェック手段として機能し、上記ステップS42と同様に、DLP132a及びEP132bを正しく消去できたかを、消去チェックルーチンECRに従ってチェックする(ステップS76)。
【0067】
このように本実施形態の第2の変形例においては、ICカード10の発行後に、正当なユーザの指定に応じてICカード10へのプログラムダウンロードを実行すると、そのダウンロードに用いられたDLP132aを消去するか否かをユーザが選択することができる。これにより、ICカード10の発行後に当該ICカード10へのプログラムダウンロードを実行しても、その後、当該ICカード10に不正にプログラムがダウンロードされるのを防止できる。
【0068】
[第3の変形例]
次に、本発明の一実施形態における第3の変形例について、図12のフローチャートを参照して簡単に説明する。
まず、第3の変形例の特徴は、ユーザに対して発行されたICカード10に、ユーザの指示によりプログラムがダウンロードされる都度、自動的にDLP132aを消去する点にある。このため、図12のフローチャートに示すように、ユーザ指定のアプリケーション132dがDLP132aに従ってICカード10にダウンロードされると(ステップS82)、当該DLP132aによりEP132bが起動される。そして、EP132bに従って、DLP132a及びEP132b自身が消去される(ステップS83)。
【0069】
このように、本実施形態の第3の変形例においては、ICカード10の発行後に、正当なユーザにより端末30を通して指定されたプログラムがDLP132aに従ってICカード10にダウンロードされる毎に、当該DLP132aが自動的に消去される。これにより、ICカード10の発行後に正当なユーザの指定に応じて当該ICカード10へのプログラムダウンロードを実行しても、特別な操作を行うことなく、その後、当該ICカード10に不正にプログラムがダウンロードされるのを防止できる。
【0070】
上記第2及び第3の変形例において端末30に接続されるICカード10は、ユーザに対して発行されたICカードである。しかし、ICカード10がユーザへの発行前のICカードであり、端末30の操作者がカード発行者であっても構わない。
【0071】
また、上記第2及び第3の変形例では、上記第1の変形例と同様に、DLP132aを消去するためのプログラムであるEP132b自身も消去される。しかし、上記実施形態と同様に、DLP132aだけが消去される構成であっても構わない。但し、EP132bを消去しない場合、当該EP132bにより他のプログラム等が誤って消去される虞がある。また、EP132bを消去しない場合、当該EP132bが予めEEPROM13に格納されている構成であっても構わない。また、EP132bが、ROM11に予め格納されていてもよい。
【0072】
また、ユーザに発行されたICカード10に内蔵のEEPROM13(に確保されたDL領域132)に、必ずしもOS132c及び(標準的な)アプリケーション132dが格納されている必要はない。即ち、ステップS72またはS82でのDLP132aに従うプログラムダウンロード処理において、OS132c及び(標準的な)アプリケーション132dをダウンロードすることも可能である。
【0073】
また、上記実施形態及びその変形例で適用されるICカード10は接触型のICカードである。しかし、ICカード10が非接触型のICカードであっても構わないし、ハイブリッド型と呼ばれる接触型と非接触型とを組み合わせたICカードであっても構わない。
【0074】
なお、本発明は、上記実施形態及びその変形例に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。更に、上記実施形態及びその変形例には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出され得る。例えば、実施形態またはその変形例に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果の少なくとも1つが得られる場合には、この構成要件が削除された構成が発明として抽出され得る。
【0075】
【発明の効果】
以上詳述したように、請求項1または請求項9に係る発明によれば、ダウンロードプログラムに従うプログラムダウンロードの完了後で且つICカードの発行前に、当該ダウンロードプログラムを消去するようにしたので、ICカードに不正にプログラムがダウンロードされるのを防止できる。
【0076】
次に、請求項2に係る発明によれば、消去プログラムに従ってダウンロードプログラムを消去するようにしたので、消去プログラムを用意するだけで、ダウンロードプログラムの消去が実現できる。
【0077】
次に、請求項3に係る発明によれば、書き換え可能な不揮発性メモリに消去プログラムが格納される構成とし、当該消去プログラムに従って、ダウンロードプログラムだけでなく当該消去プログラム自身も消去されるようにしたので、当該消去プログラムによって他のプログラム等が誤って消去されるのを防止できる。
【0078】
次に、請求項4に係る発明によれば、消去プログラムに従うダウンロードプログラムの消去が完了すると、当該消去プログラムに含まれている特定コール命令が実行されて特定関数が呼び出され、この特定関数に従って消去プログラムが消去されるようにしたので、当該消去プログラムに従う当該消去プログラム自身の消去が容易に実現できる。
【0079】
次に、請求項5に係る発明によれば、消去の対象となるプログラム、即ちダウンロードプログラム、またはダウンロードプログラムと消去プログラムとが格納されている書き換え可能な不揮発性メモリの領域(第1の領域)に消去データを書き込むことにより当該プログラムを消去するようにしたので、プログラムの消去が簡単に実現できる。
【0080】
次に、請求項6に係る発明によれば、1バイトの所定の消去データを第1の領域に繰り返し書き込むことにより当該第1の領域に格納されているプログラムが消去され、このプログラムの消去が正常に行われたか否かが、当該第1の領域の少なくとも先頭バイト及び最終バイトが上記1バイトの所定の消去データであるか否かを調べるだけで、簡単に判定できる。
【0081】
次に、請求項7に係る発明によれば、プログラムダウンロードの完了時に、ICカードと接続される電子機器の操作者によるダウンロードプログラム消去の指定(選択)が可能な構成としたので、当該操作者は必要な場合だけダウンロードプログラム消去を指定すればよく、複数のプログラムをダウンロードする場合に、その都度ダウンロードプログラムを対応するICカード内の書き換え可能な不揮発性メモリに書き込ませるための操作を行わなくても済む。
【0082】
次に、請求項8に係る発明によれば、ダウンロードプログラムが正常に消去できた場合、プログラマブルな読み出し専用の不揮発性メモリのフラグ領域に特定フラグを書き込むようにしたので、このフラグ領域を参照するだけで、対応するICカードがダウンロードプログラムの消去済みのカードであるかが簡単に判定できる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係るダウンロードプログラム消去機能付きICカード10の構成を示すブロック図。
【図2】図1のICカード10を発行するのに用いられるシステムの構成を示すブロック図。
【図3】同実施形態の動作の概要を説明するためのフローチャート。
【図4】図3中のステップS1の処理の詳細を説明するためのフローチャート。
【図5】図3中のステップS2の処理の詳細を説明するためのフローチャート。
【図6】図3中のステップS3の処理の詳細を説明するためのフローチャート。
【図7】同実施形態の第1の変形例で適用されるプログラムの構造を示す図。
【図8】同第1の変形例の動作の概要を、図3と相違する部分について説明するためのフローチャート。
【図9】図8中のステップS41及びS42の処理の詳細を説明するためのフローチャート。
【図10】同実施形態の第2の変形例で適用されるシステムの構成を示すブロック図。
【図11】同第2の変形例において、ユーザ指定のアプリケーションをICカード10にダウンロードする際の動作を説明するためのフローチャート。
【図12】同実施形態の第3の変形例で適用される、ユーザ指定のアプリケーションをICカード10にダウンロードする際の動作を説明するためのフローチャート。
【符号の説明】
10…ICカード
11…ROM
12…PROM
13…EEPROM
14…RAM
15…CPU
20…ホスト
30…端末
120…フラグ領域
131…システム領域
132…DL領域
132a…DLP(ダウンロードプログラム)
132b…EP(消去プログラム)
132c…OS(オペレーティングシステム)
132d…アプリケーション
140…スタック
CALLSF…特定コール命令
ECR…消去チェックルーチン
SF…特定関数
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an IC card capable of downloading a program in accordance with a download program stored in a rewritable nonvolatile memory, and in particular, an IC with a download program erasure function capable of erasing a download program used for downloading the program. The present invention relates to a card and a download program erasing method for the card.
[0002]
[Prior art]
Recently, a card on which an IC chip is mounted, that is, an IC card has been widely used. This IC chip includes a CPU that performs arithmetic processing and control of each unit, and a rewritable nonvolatile memory. As the rewritable nonvolatile memory, generally an EEPROM (Electrically Erasable and Programmable Read Only Memory) is used (see, for example, Non-Patent Document 1). Recently, as described in Non-Patent Document 1, IC cards that can be downloaded from the outside to a rewritable nonvolatile memory (EEPROM) of various applications (application programs) have appeared. . With the advent of such an IC card, it is possible to upgrade an application and add an application even after the IC card is issued (distributed), and the versatility is greatly increased.
[0003]
[Non-Patent Document 1]
“Maos Platforms Technical Status Report”, [online], April 10, 2000, Europoay International SA, p.26-27, [Search April 10, 2002], Internet <URL: http: // webbox3 .noveous.net / multoslib / pdf / 00-04-10% 20Europay-maos-report.pdf>
[0004]
[Problems to be solved by the invention]
In order to download an application to a rewritable nonvolatile memory (EEPROM) in the IC card, it is necessary to have a program for controlling the download, that is, a download program in the IC card. With this download program, it is possible to download not only an application (application program) but also an OS called an IC card OS (operating system), which is basic software of an IC card, for example.
[0005]
However, the download program is generally stored in advance in a non-rewritable nonvolatile memory such as a ROM (non-programmable read-only memory) or a PROM (programmable read-only memory). For this reason, the download program remains in the IC card even after the download of the application (program) is completed. With such an IC card, there is a possibility that an application (program) may be downloaded illegally.
[0006]
The present invention has been made in view of the above circumstances, and its purpose is to delete a download program that can prevent the program from being illegally downloaded by enabling the download program to be deleted after the download of the program according to the download program is completed. It is an object to provide an IC card with a function and a method for deleting a download program in the card.
[0007]
[Means for Solving the Problems]
  The present invention solves such a problem, and the invention according to claim 1 is an IC card with a download program erasing function capable of erasing a download program for downloading a program, wherein the download programTheFor storingDownload area including the first area was securedRewritable nonvolatile memory,Stored in the first area of the rewritable nonvolatile memoryThe rewritable nonvolatile memory according to the download programFor downloading a program different from the download program to a second area different from the first area of the download areaDownload means for executing program download;in frontBefore download meansRecordAfter program download is completeAnd before issuing the IC cardThe rewritable nonvolatile memory for the download programSaid first region ofAnd an erasing unit for erasing from the IC card with a download program erasing function.
[0008]
The invention according to claim 2 is the IC card with download program erasure function according to claim 1, wherein the erasure means erases the download program according to a predetermined erasure program.
[0009]
  According to a third aspect of the present invention, there is provided an IC card with a download program erasing function according to the second aspect, wherein the erasing program is the rewritable nonvolatile memory.Said first region ofAnd the erasing means is the rewritable nonvolatile memorySaid first region ofThe erasing program itself is erased according to the erasing program stored in the memory.
[0010]
According to a fourth aspect of the present invention, in the IC card with a download program erasing function according to the third aspect, the erasure program is a specific call instruction executed after erasure of the download program according to the erasure program is completed. A specific call instruction for calling a specific function used for erasing the erasure program, and the erasure means, when the specific function is called by the specific call, the erasure program according to the specific function It is characterized by erasing.
[0011]
  The invention according to claim 5 is the rewritable nonvolatile memory according to claim 2 or 3, wherein the erasing means stores a program to be erased. ofSaid first regionFollow the erase program toDisappearBy writing last dataEligible for deletionIt is characterized by erasing the program.
[0012]
  The invention according to claim 6 is the IC card with download program erasing function according to claim 5,An erasure check means is further provided, and the erasure means erases the program to be erased stored in the first area by repeatedly writing predetermined erase data of 1 byte in the first area. The erasure check meansWhether the program has been successfully erased by the eraser, At least the first byte and the last byte of the first area areSaid1 bytePredetermined erase dataIsJudgment byRukoAnd features.
[0013]
The invention according to claim 7 is the IC card with a download program erasing function according to claim 1, wherein after the download of the program to the rewritable nonvolatile memory by the download means according to the download program is completed, Inquiry means for inquiring to the operator of the electronic device via the connected electronic device whether to delete the download program is further included, and the deletion means deletes the download program in response to the inquiry by the inquiry means. When this is specified, the download program is erased.
[0014]
The invention according to claim 8 is the programmable read-only nonvolatile memory in which the flag area for indicating that the download program has been erased is secured in the IC card with download program erase function according to claim 1 And a flag writing means for writing a specific flag in the flag area of the programmable read-only nonvolatile memory when the download program is successfully erased.
[0015]
  The invention according to claim 9 is:TheDownload program for downloading programsA rewritable nonvolatile memory in which a download area including a first area to be stored is secured, download means, and erase means are provided.A method for erasing a download program in an IC card,The download means is in accordance with the download program stored in the first area of the rewritable nonvolatile memory.Rewritable non-volatile memoryFor downloading a program different from the download program to a second area different from the first area of the download areaDownload programThe fruitStep to run and beforeRecordAfter program download is completeAnd before issuing the IC cardInThe erasing means isThe rewritable nonvolatile memory for the download programSaid first region ofA method for deleting a downloaded program in an IC card.
[0016]
  In the invention which concerns on Claim 1 or Claim 9, the rewritable non-volatile memoryStored in the first area ofAccording to the download program stored inFor downloading a program different from the download program to a second area different from the first area of the download areaThe program download is executed by the download means. After completion of the program download according to the download program by this download meansAnd before issuing an IC cardThe download program isFrom the first area of the rewritable nonvolatile memoryIt is erased by the erasing means.
[0017]
After completing the program download in this wayBefore IC card issuanceIn addition, by deleting the download program, it is possible to prevent the program from being illegally downloaded to the IC card.
[0018]
Next, in the invention according to claim 2, erasing of the download program by the erasing means is performed according to a predetermined erasing program. As a result, the download program can be erased simply by preparing an erase program.
[0019]
  Next, in the invention according to claim 3, the rewritable nonvolatile memoryFirst region ofAccording to the erasure program stored in, not only the download program but also the erasure program itself is erased by the erasure means. Thereby, it is possible to prevent other programs and the like from being accidentally erased by the erase program.
[0020]
Next, in the invention according to claim 4, when the erasure of the download program according to the erasure program is completed, the specific call instruction included in the erasure program is executed to call the specific function. Then, the erasing program is erased by the erasing means in accordance with the called specific function. That is, erasing of the erasing program itself according to the erasing program is easily realized.
[0021]
  Next, in the invention according to claim 5, a program to be erased, that is, a download program, or a rewritable nonvolatile memory in which a download program and an erase program are stored.FirstIn the area, follow the erase program by the eraserDisappearLast data is written. Thereby, the download program or the download program and the erasure program can be easily erased.
[0022]
  Next, in the invention according to claim 6,The erasing means erases the program to be erased by repeatedly writing 1-byte predetermined erase data to the first area,Whether or not the program was successfully erased by the eraser,At least the first byte and the last byte of the first areathe above1 bytePredetermined erase dataIsIt can be easily determined by checking whether or not the erasure check means.
[0023]
Next, in the invention according to claim 7, when the program download to the rewritable non-volatile memory is completed, the operator of the electronic device may delete the download program via the electronic device connected to the IC card. Is inquired by inquiry means. When erasure of the download program is designated in response to this inquiry, the download program is erased by the erasure means. As described above, since the download program is erased according to the designation of the operator (for example, user) of the electronic device, the operator only needs to designate the erasure of the download program only when necessary, and downloads a plurality of programs. In this case, it is not necessary to perform an operation for writing the download program to the rewritable nonvolatile memory in the corresponding IC card each time.
[0024]
Next, in the invention according to claim 8, when the download program can be normally erased, the specific flag is written into the flag area of the programmable read-only nonvolatile memory by the flag writing means. As a result, it is possible to easily determine whether the corresponding IC card is an erased card of the download program simply by referring to this flag area.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of an IC card 10 with a download program erasing function according to an embodiment of the present invention.
[0026]
The IC card 10 shown in FIG. 1 is, for example, a contact type IC card. This IC card 10 includes a ROM (Read Only Memory) 11, a PROM (Programmable ROM) 12, an EEPROM (Electrically Erasable and Programmable ROM) 13, a RAM (Random Access Memory) 14, a CPU 15, a communication interface 16, Consists of
[0027]
The ROM 11 is a read-only memory (a non-programmable read-only nonvolatile memory). The ROM 11 has a routine necessary for outputting a reset signal for resetting the inside of the IC card 10 when the IC card 10 is initialized, and a write command (physical write command) from the external device to the EEPROM 13 in the IC card 10. ) (For example, DLP 132a and EP 132b, which will be described later) are stored in advance in a routine (not shown) necessary for writing.
[0028]
The PROM 12 is a programmable read-only memory (programmable read-only nonvolatile memory). The specific address of the PROM 12 is assigned to a flag area 120 for storing a specific flag indicating that a later-described DLP 132a is an erased IC card 10.
[0029]
The EEPROM 13 is a rewritable nonvolatile memory. The area of the EEPROM 13 is mainly allocated to a system area 131, a download area (hereinafter referred to as a DL area) 132, and a data area 133, which are management areas.
The system area 131 is used for storing information necessary for managing the system, such as a key (chip KEY) unique to the IC card 10 (IC chip mounted on the IC card 10).
[0030]
The DL area 132 includes programs related to program download, such as a download program (hereinafter referred to as DLP) 132a and an erase program (hereinafter referred to as EP) 132b, and a downloaded program, such as an OS (IC card OS). It is used to store 132c and various applications 132d. The DLP 132a is a program for downloading various programs. Here, the OS 132c and various applications 132d are downloaded by the DLP 132a. The EP 132b is a program for deleting the DLP 132a.
[0031]
The area of the RAM 14 is used as a work area for the CPU 15. The RAM 14 has a stack 140 for storing a return value indicating the return destination of the program.
[0032]
The CPU 15 executes various applications 132d according to the OS 132c. Further, the CPU 15 executes the DLP 132a according to an instruction from the outside. Further, the CPU 15 executes the EP 132b automatically in response to the completion of the execution of the DLP 132a or in response to an instruction from the outside. The CPU 15 further inputs / outputs data to / from an external device (electronic device) via the communication interface 16.
[0033]
Next, an outline of the operation of the embodiment of the present invention will be described with reference to the system configuration diagram of FIG. 2 and the flowchart of FIG. First, when the IC card 10 having the configuration shown in FIG. 1 is issued, the IC card 10 is inserted into the card slot 21 of the host (electronic device) 20 as shown in FIG. As a result, the IC card 10 is connected to the host 20. In this state, the host 20 can exchange data with the IC card 10.
[0034]
While being connected to the IC card 10, the host 20 performs an operation for writing the DLP 132a and the EP 132b in the DL area 132 secured in the EEPROM 13 in the IC card 10 (step S1). This write operation is performed by issuing a physical write command from the host 20 to the IC card 10.
[0035]
The host 20 activates the DLP 132a when the writing of the DLP 132a and the EP 132b to the DL area 132 is normally performed. Thereby, the CPU 15 in the IC card 10 functions as a download unit, and downloads the OS 132c and the application 132d to the DL area 132 in the EEPROM 13 according to the DLP 132a (step S2).
[0036]
When the OS 132c and the application 132d are all successfully downloaded to the DL area 132 in the EEPROM 13, the EP 132b is activated. Thereby, the CPU 15 functions as an erasing unit, and erases the DLP 132a written in the DL area 132 in accordance with EP 132b (step S3). The IC card 10 issued to the user is an IC card from which this DLP 132a has been deleted.
[0037]
Thus, in this embodiment, when the IC card 10 is issued, the program (OS 132c and application 132d) is downloaded to the DL area 132 secured in the EEPROM 13 of the IC card 10 according to the value of the DLP 132a. Then, after the download of this program is completed, the DLP 132a is automatically deleted. Thereby, it is possible to prevent the program from being illegally downloaded to the IC card 10 after the IC card 10 is issued.
[0038]
Next, details of the processing in step S1, that is, the processing for writing the DLP 132a and EP 132b to the DL area 132 secured in the EEPROM 13 of the IC card 10 will be described with reference to the flowchart of FIG.
[0039]
First, the host 20 sends a chip KEY to the IC card 10 to perform a chip KEY check by the IC card 10 (step S11). This chip KEY check is performed by the CPU 15 comparing the chip KEY sent from the host 20 with the chip KEY stored at a predetermined position in the system area 131 secured in the EEPROM 13. If both chips KEY match, the CPU 15 determines that the IC card 10 is a legitimate IC card that is allowed to download a program, and notifies the host 20 to that effect.
[0040]
When the IC card 10 is a valid IC card, the host 20 sequentially writes DLP data constituting the DLP 132a from a predetermined address of the DL area 132 in the EEPROM 13, for example, the head address (step S12). As a result, the DLP 132a is stored in the area starting from the start address of the DL area 132, as shown in FIG. That is, in this embodiment, the head address of the area where the DLP 132a is stored is made to coincide with the head address of the DL area 132. As a result, it is possible to easily establish that the DLP 132a is stored in the DL area 132. When the DLP 132a is not stored in the DL area 132, the leading portion of the DL area 132 has the same value representing a blank (or erased state).
[0041]
Next, the host 20 sequentially writes the EP data constituting the EP 132b in a predetermined area in the DL area 132 having a size matching the size of the EP 132b, for example, the final area (step S13). As a result, the EP 132b is stored in the final area of the DL area 132 as shown in FIG.
[0042]
When the host 20 finishes writing the DLP 132a and the EP 132b, the host 20 reads the status of the IC card 10 to perform a status check to determine whether or not the writing of the DLP 132a and the EP 132b has been completed normally (step S14). As a result of this status check, the host 20 activates the DLP 132a if it can be determined that the writing of the DLP 132a and EP 132b has been completed normally (step S15). As a result, the process of step S2, that is, the program download process according to the DLP 132a is executed.
[0043]
Next, details of the process of step S2 (program download process according to DLP 132a) will be described with reference to the flowchart of FIG.
First, the CPU 15 downloads the OS 132c and the application 132d in accordance with the DLP 132a into an area in the DL area 132 secured in the EEPROM 13 that is different from the area where the DLP 132a and the EP 132b are stored (Step S21). Next, the CPU 15 performs a status check for determining whether or not the download of the OS 132c and the application 132d has been normally completed (step S22). If the host 20 determines that the download of the OS 132c and the application 132d has been normally completed as a result of the status check, the host 20 activates the EP 132b (step S23). As a result, the process of step S3, that is, the DLP erasure process according to EP132b is executed.
[0044]
Next, details of the process of step S3 (DLP erasing process according to EP132b) will be described with reference to the flowchart of FIG.
First, the CPU 15 sets, for example, predetermined erase data of 1 byte for erasing the DLP 132a stored in the head area of the DL area 132 secured in the EEPROM 13 in the RAM 14 according to the EP 132b (step S31). Next, the CPU 15 repeatedly writes the set erase data continuously in the head area of the DL area 132, that is, in the area where the DLP 132a is stored in the DL area 132 (hereinafter referred to as the DLP area) (step S32). ).
[0045]
The CPU 15 functions as an erasure check unit when writing of the erasure data to the DLP area is completed, and performs an erasure check for checking whether or not the DLP 132a stored in the DLP area has been correctly erased as follows (step) S33). First, the CPU 15 checks whether, for example, the first byte of the DLP area is erased data (step S33a). Next, the CPU 15 checks whether, for example, the last byte in the DLP area is erased data (step S33b).
[0046]
If the CPU 15 determines that both the first byte and the last byte of the DLP area are erased data by the erase check (step S33), the CPU 15 determines that the DLP 132a has been correctly erased (step S34). In this case, the CPU 15 functions as a flag writing means, and writes a specific flag indicating that the DLP 132a has been erased in the flag area 120 secured at the specific address of the PROM 12 (step S35). By writing the specific flag in the flag area 120, it is possible to determine whether the corresponding IC card 10 is an IC card from which the DLP 132a has been deleted simply by referring to the flag area 120. Further, by writing a specific flag in the flag area 120, it is possible to prohibit a new program download for the IC card 10 from which the DLP 132a has been deleted.
[0047]
On the other hand, if the CPU 15 determines that at least one of the first and last bytes of the DLP area is other than erased data by the erase check (step S33), the CPU 15 determines that the DLP 132a has not been erased correctly (step S34). ). In this case, the CPU 15 locks the application 132d so that the application 132d downloaded to the DL area 132 cannot be used (step S36). The lock of the application 132d is realized by changing a flag indicating that the application 132d can be executed to another value.
[0048]
When step S35 or S36 is executed in accordance with EP 132b, control is transferred to the main routine of the OS 132c, for example.
[0049]
[First Modification]
Next, the 1st modification in one Embodiment of this invention is demonstrated.
First, the first modification is characterized in that the EP 132b itself is erased by the EP 132b for erasing the DLP 132a. Therefore, in the first modified example, as shown in FIG. 7, a specific function SF that is called from the EP 132 b and is used to erase the EP 132 b is stored in advance at a specific address in the ROM 11, for example. In addition, the EP 132b calls the specific call instruction CALL that calls the specific function SF in order to delete the EP 132b itself after the deletion of the DLP 132a is completed.science fiction(See FIG. 7). This specific call instruction CALLscience fictionIs the last executed instruction in EP132b. Further, as shown in FIG. 7, the OS 132c includes an erasure check routine ECR that is executed after the erasure of the DLP 132a and the EP 132b is completed. This erasure check routine ECR may be stored in a predetermined area of the ROM 11, for example, independently of the OS 132c.
[0050]
Next, the outline of the operation of the first modification in one embodiment of the present invention will be described with reference to the flowchart of FIG.
When the CPU 15 executes the process of step S2 in the flowchart of FIG. 3 (program download process according to DLP132a), the process shown in the flowchart of FIG. 8 replaces the process of step S3 in the flowchart (DLP erase process according to EP132b). Steps S41 and S42 are executed. That is, the CPU 15 first functions as an erasing unit, and executes a process (step S41) for erasing the DLP 132a and the EP 132b itself according to the EP 132b. Next, the CPU 15 functions as an erasure check unit, and executes a process (step S42) for checking whether the DLP 132a and the EP 132b have been correctly erased according to the erasure check routine ECR. Thus, by deleting not only the DLP 132a but also the EP 132b itself according to the EP 132b, it is possible to prevent other programs and the like from being erroneously deleted by the EP 132b.
[0051]
Next, details of the processes of steps S41 and S42 will be described with reference to the flowchart of FIG.
When the DLP 132a is activated at the end of the program download in step S2 (step S15), the CPU 15 executes the following processing according to the DLP 132a.
[0052]
First, the CPU 15 loads a return value indicating the erase check routine ECR (for example, the start address of the erase check routine ECR) on the stack 140 secured in the RAM 14 (step S51). Next, the CPU 15 sets, for example, 1-byte erase data in the RAM 14 for erasing the DLP 132a stored in the head area of the DL area 132 secured in the EEPROM 13 (step S52). Next, the CPU 15 repeatedly writes the set erase data continuously in the head area of the DL area 132, that is, the DLP area (step S53).
[0053]
In the first modification of the present embodiment, when the process of writing erase data in the DLP area (step S53) is completed according to EP 132b, the specific call instruction CALL, which is the last instruction of the EP 132b.science fictionIs executed by the CPU 15. As a result, the specific function SF stored in the specific address of the ROM 11 is called (step S54). At this time, in the specific function SF, the last address of the DL area 132, that is, the start address and size of the area where the EP 132b is stored in the DL area 132 (hereinafter referred to as the EP area), and the bytes that match the size. A number of erase data as write data is passed as an argument. The specific function SF is a function that controls data writing.
[0054]
CPU15, specific call instruction CALLscience fictionBy executing the specific function SF called by the above, erase data is written to the EP area in the DL area 132 (step S55). When executing the specific function SF, the CPU 15 starts an erasure check routine ECR specified by the return value according to the return value stored in the stack 140 in the RAM 14 (step S56).
[0055]
Then, according to the erasure check routine ECR, the CPU 15 performs an erasure check for checking whether the DLP 132a and EP 132b stored in the DLP area and EP area in the DL area 132 have been correctly erased as follows (step S57). ). First, the CPU 15 checks whether, for example, the first byte and the last byte of the DLP area are erased data, respectively, in the same manner as in steps S33a and S33b (steps S57a and S57b). Further, the CPU 15 checks whether, for example, the first byte and the last byte of the EP area are erase data (steps S57c and S57d).
[0056]
If the CPU 15 determines that both the first and last bytes of the DLP area and the first and last bytes of the EP area are erased data by the erasure check (step S57), the DLP 132a and EP132b are correctly erased. Is determined (step S58). In this case, the CPU 15 functions as a flag writing means, and writes a specific flag in the flag area 120 of the PROM 12 as in step S35 (step S59). On the other hand, if it is determined that at least one of the first and last bytes of the DLP area and the first and last bytes of the EP area is other than erased data, the CPU 15 correctly erases at least one of the DLP 132a or EP132b. It is determined that it has not been performed (step S58). In this case, the CPU 15 locks the application 132d downloaded to the DL area 132 as in step S36 (step S60).
[0057]
When step S59 or S60 is executed in accordance with the erase check routine ECR, control is transferred to the main routine of the OS 132c, for example.
[0058]
Thus, in the first modification of the present embodiment, not only the DLP 132a but also the EP 132b itself can be erased by the EP 132b. In the first modification, the IC card 10 from which both the DLP 132a and the EP 132b are erased is issued to the user.
[0059]
[Second Modification]
Next, a second modification of the embodiment of the present invention will be described.
Furthermore, the feature of the second modification is that the DLP 132a is erased by the user's instruction every time the program is downloaded to the IC card 10 issued to the user by the user's instruction.
[0060]
Assume that the IC card 10 having the configuration shown in FIG. 1 is issued to the user. It is assumed that the IC card 10 is an IC card issued by applying the first modification. Therefore, the OS 132c and the application 132d are downloaded into the DL area 132 secured in the EEPROM 13 of the IC card 10 as shown in FIG. On the other hand, DLP 132 a and EP 132 b are erased from DL region 132. Further, it is assumed that the application 132d downloaded to the DL area 132 at the time of issuing the IC card 10 is a basic application prepared as a standard in the IC card 10.
[0061]
When the user wants to download the application 132d other than the basic application to the IC card 10, the IC card 10 is inserted into the card slot 31 of the terminal (electronic device) 30 as shown in FIG. Thereby, the IC card 10 is connected to the terminal 30. In this state, the terminal 30 can exchange data with the IC card 10. Therefore, when the user operates the terminal 30, the application 132 d designated by the user can be downloaded to the DL area 132 secured in the EEPROM 13 of the IC card 10 by the terminal 30.
[0062]
Hereinafter, an operation when the user-specified application 132d by the terminal 30 is downloaded to the IC card 10 will be described with reference to a flowchart of FIG.
[0063]
First, the terminal 30 writes predetermined DLP 132a and EP 132b in the DL area 132 secured in the EEPROM 13 in the IC card 10 in accordance with a user operation while being connected to the IC card 10 as shown in FIG. The operation | movement for this is performed (step S71). This step S71 is the same as the writing of the DLP 132a and EP 132b by the host 20 when the IC card 10 is issued (step S1). However, in step S71, well-known user authentication is performed in the terminal 30 (step S71a), and writing of the DLP 132a and EP 132b is executed only when the authentication is successful, that is, when the user is a valid user.
[0064]
The terminal 30 activates the DLP 132a when the DLP 132a and the EP 132b are normally written in the DL area 132. Thereby, the CPU 15 in the IC card 10 functions as a download unit, and downloads the application 132d designated by the user via the terminal 30 to the DL area 132 in the EEPROM 13 according to the DLP 132a (step S72). This step S72 is the same as the download of the OS 132c and the application 132d according to the DLP 132a when the IC card 10 is issued (step S2) except that the user-specified EP 132b is downloaded.
[0065]
When the user-specified application 132d is normally downloaded to the DL area 132 in the EEPROM 13 in accordance with the DLP 132a, the EP 132b is activated. Then, the CPU 15 functions as an inquiry unit, and transmits a DLP deletion inquiry instruction for inquiring of the user whether or not to delete the DLP 132a to the terminal 30 via the communication interface 16 according to EP 132b (step S73). This DLP deletion inquiry instruction is displayed on the screen by the terminal 30. As a result, the user is inquired whether to delete the DLP 132a. The user performs an operation of selecting whether or not to delete the DLP 132a on the DLP deletion inquiry screen displayed on the terminal 30. The result of this selection operation is notified from the terminal 30 to the IC card 10.
[0066]
When erasure is designated in response to the DLP erasure inquiry (step S74), the CPU 15 functions as an erasure unit and erases the DLP 132a and the EP 132b itself in accordance with EP 132b (step S75) as in step S41. The CPU 15 functions as an erasure check means, and checks whether the DLP 132a and EP 132b have been correctly erased according to the erasure check routine ECR, similarly to step S42 (step S76).
[0067]
As described above, in the second modification of the present embodiment, when the program download to the IC card 10 is executed according to the designation of a valid user after the IC card 10 is issued, the DLP 132a used for the download is deleted. The user can select whether or not to do so. Thereby, even if the program download to the IC card 10 is executed after the IC card 10 is issued, the program can be prevented from being illegally downloaded to the IC card 10 thereafter.
[0068]
[Third Modification]
Next, a third modification of the embodiment of the present invention will be briefly described with reference to the flowchart of FIG.
First, a feature of the third modification is that the DLP 132a is automatically deleted every time a program is downloaded to the IC card 10 issued to the user according to the user's instruction. Therefore, as shown in the flowchart of FIG. 12, when the user-specified application 132d is downloaded to the IC card 10 according to the DLP 132a (step S82), the EP 132b is activated by the DLP 132a. Then, according to EP 132b, DLP 132a and EP 132b themselves are erased (step S83).
[0069]
As described above, in the third modification example of the present embodiment, each time the program specified through the terminal 30 by the authorized user is downloaded to the IC card 10 according to the DLP 132a after the IC card 10 is issued, the DLP 132a is It is automatically deleted. As a result, even if the program download to the IC card 10 is executed in accordance with the designation of a legitimate user after the IC card 10 is issued, the program is illegally stored in the IC card 10 after that without performing any special operation. Can be downloaded.
[0070]
The IC card 10 connected to the terminal 30 in the second and third modifications is an IC card issued to the user. However, the IC card 10 may be an IC card before being issued to a user, and the operator of the terminal 30 may be a card issuer.
[0071]
In the second and third modified examples, as in the first modified example, EP 132b itself, which is a program for erasing DLP 132a, is also erased. However, similar to the above embodiment, only the DLP 132a may be deleted. However, when the EP 132b is not erased, there is a possibility that other programs and the like may be mistakenly erased by the EP 132b. Further, when the EP 132b is not erased, the EP 132b may be stored in the EEPROM 13 in advance. Further, the EP 132b may be stored in the ROM 11 in advance.
[0072]
In addition, the OS 132c and the (standard) application 132d do not necessarily need to be stored in the EEPROM 13 (the DL area 132 secured in the EEPROM 13) built in the IC card 10 issued to the user. That is, in the program download process according to the DLP 132a in step S72 or S82, it is possible to download the OS 132c and the (standard) application 132d.
[0073]
Further, the IC card 10 applied in the above embodiment and its modification is a contact type IC card. However, the IC card 10 may be a non-contact type IC card, or an IC card combining a contact type called a hybrid type and a non-contact type.
[0074]
In addition, this invention is not limited to the said embodiment and its modification, In the implementation stage, it can change variously in the range which does not deviate from the summary. Further, the above embodiment and its modifications include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent elements are deleted from all the constituent elements shown in the embodiment or its modification, the problems described in the column of the problem to be solved by the invention can be solved, and are described in the column of the effect of the invention. In a case where at least one of the obtained effects can be obtained, a configuration in which this configuration requirement is deleted can be extracted as an invention.
[0075]
【The invention's effect】
  As described in detail above, according to the invention according to claim 1 or claim 9, after the program download according to the download program is completed.Before IC card issuanceIn addition, since the download program is erased, it is possible to prevent the program from being illegally downloaded to the IC card.
[0076]
According to the second aspect of the invention, since the download program is erased according to the erase program, the download program can be erased only by preparing the erase program.
[0077]
Next, according to the invention of claim 3, the erasing program is stored in the rewritable nonvolatile memory, and not only the download program but also the erasing program itself is erased according to the erasing program. Therefore, it is possible to prevent other programs and the like from being accidentally erased by the erase program.
[0078]
Next, according to the invention of claim 4, when the erasure of the download program according to the erasure program is completed, the specific call instruction included in the erasure program is executed and the specific function is called, and the erasure is performed according to the specific function. Since the program is erased, the erasing of the erasing program itself according to the erasing program can be easily realized.
[0079]
  Next, according to the invention of claim 5, a program to be erased, that is, a download program, or a rewritable nonvolatile memory area in which the download program and the erase program are stored (In the first area)Since the program is erased by writing the last data, the program can be easily erased.
[0080]
  Next, according to the invention of claim 6,By repeatedly writing 1 byte of predetermined erase data to the first area, the program stored in the first area is erased.Whether or not the program was successfully erasedAt least the first byte and the last byte of the first areathe above1 bytePredetermined erase dataIsYou can easily determine whether or not it is.
[0081]
Next, according to the invention of claim 7, when the program download is completed, the operator of the electronic device connected to the IC card can be designated (selected) to delete the download program. You only need to specify erasure of the download program only when necessary. When downloading multiple programs, there is no need to perform an operation to write the download program to the rewritable nonvolatile memory in the corresponding IC card each time. It will be over.
[0082]
Next, according to the invention according to claim 8, when the download program can be normally erased, the specific flag is written in the flag area of the programmable read-only nonvolatile memory. With this, it can be easily determined whether the corresponding IC card is an erased card of the download program.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an IC card with a download program erasing function according to an embodiment of the present invention.
FIG. 2 is a block diagram showing the configuration of a system used to issue the IC card 10 of FIG.
FIG. 3 is a flowchart for explaining an outline of the operation of the embodiment;
FIG. 4 is a flowchart for explaining details of processing in step S1 in FIG. 3;
FIG. 5 is a flowchart for explaining details of processing in step S2 in FIG. 3;
6 is a flowchart for explaining details of processing in step S3 in FIG. 3;
FIG. 7 is an exemplary view showing the structure of a program applied in the first modification of the embodiment;
FIG. 8 is a flowchart for explaining the outline of the operation of the first modified example with respect to a portion different from FIG. 3;
FIG. 9 is a flowchart for explaining details of processes in steps S41 and S42 in FIG. 8;
FIG. 10 is an exemplary block diagram showing the configuration of a system applied in a second modification of the embodiment;
FIG. 11 is a flowchart for explaining the operation when a user-specified application is downloaded to the IC card 10 in the second modification.
FIG. 12 is a flowchart for explaining an operation when a user-specified application is downloaded to the IC card 10, which is applied in the third modification of the embodiment;
[Explanation of symbols]
10 ... IC card
11 ... ROM
12 ... PROM
13… EEPROM
14 ... RAM
15 ... CPU
20 ... Host
30 ... terminal
120 ... Flag area
131 ... System area
132 ... DL region
132a ... DLP (download program)
132b ... EP (erase program)
132c ... OS (Operating System)
132d ... Application
140 ... Stack
CALLscience fiction... specific call instructions
ECR ... Erase check routine
SF: Specific function

Claims (9)

プログラムをダウンロードするためのダウンロードプログラムの消去が可能なダウンロードプログラム消去機能付きICカードであって、
前記ダウンロードプログラムを格納するための第1の領域を含むダウンロード領域が確保された書き換え可能な不揮発性メモリと、
前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記ダウンロードプログラムに従って前記書き換え可能な不揮発性メモリの前記ダウンロード領域の前記第1の領域とは異なる第2の領域に前記ダウンロードプログラムとは別のプログラムをダウンロードするためのプログラムダウンロードを実行するダウンロード手段と、
記ダウンロード手段による前記プログラムダウンロードの完了後で且つ前記ICカードの発行前に前記ダウンロードプログラムを前記書き換え可能な不揮発性メモリの前記第1の領域から消去する消去手段と
を具備することを特徴とするダウンロードプログラム消去機能付きICカード。
An IC card with a download program erasure function capable of erasing a download program for downloading a program,
A rewritable nonvolatile memory the download area is secured comprising a first area for storing the downloaded program,
The download program in a second area different from the first area of the download area of the rewritable nonvolatile memory according to the download program stored in the first area of the rewritable nonvolatile memory Download means for executing a program download for downloading a program different from the program ;
By comprising an erasing means for erasing the downloaded program before and issuance of the IC card after the completion of the download before Kipu program from said first region of said rewritable non-volatile memory according to prior Symbol downloading means IC card with download program erasing function.
前記消去手段は、所定の消去プログラムに従って前記ダウンロードプログラムを消去することを特徴とする請求項1記載のダウンロードプログラム消去機能付きICカード。2. The IC card with a download program erasure function according to claim 1, wherein the erasure means erases the download program in accordance with a predetermined erasure program. 前記消去プログラムが前記書き換え可能な不揮発性メモリの前記第1の領域に格納され、
前記消去手段は、前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記消去プログラムに従って当該消去プログラム自身をも消去することを特徴とする請求項2記載のダウンロードプログラム消去機能付きICカード。
The erase program is stored in the first area of the rewritable nonvolatile memory;
3. The download program erasing function according to claim 2, wherein the erasing means erases the erasing program itself according to the erasing program stored in the first area of the rewritable nonvolatile memory. IC card.
前記消去プログラムは、当該消去プログラムに従う前記ダウンロードプログラムの消去が完了した後に実行される特定コール命令であって、当該消去プログラムを消去するのに用いられる特定関数を呼び出すための特定コール命令を含んでおり、
前記消去手段は、前記特定コールによって前記特定関数が呼び出された場合、当該特定関数に従って前記消去プログラムを消去することを特徴とする請求項3記載のダウンロードプログラム消去機能付きICカード。
The erasing program includes a specific call instruction that is executed after the erasure of the download program according to the erasing program is completed, and includes a specific call instruction for calling a specific function used for erasing the erasing program. And
4. The IC card with a download program erasing function according to claim 3, wherein when the specific function is called by the specific call, the erasing unit deletes the erasing program according to the specific function.
前記消去手段は、消去の対象となるプログラムが格納されている前記書き換え可能な不揮発性メモリの前記第1の領域に前記消去プログラムに従って消去データを書き込むことにより当該消去の対象となるプログラムを消去することを特徴とする請求項2または請求項3記載のダウンロードプログラム消去機能付きICカード。Said erasing means, a program to be the erasing by writing erase data in accordance with the erase program to said first region of said rewritable non-volatile memory in which the program to be erased is stored 4. The IC card with a download program erasing function according to claim 2, wherein the erasing function is erased. 消去チェック手段を更に具備し、
前記消去手段は、1バイトの所定の消去データを前記第1の領域に繰り返し書き込むことにより前記第1の領域に格納されている前記消去の対象となるプログラムを消去し、
前記消去チェック手段は、前記消去手段によるプログラムの消去が正常に行われたかを、前記第1の領域の少なくとも先頭バイト及び最終バイトが前記1バイトの所定の消去データであるかにより判定することを特徴とする請求項5記載のICカード。
Further comprising an erasure check means,
The erasing means erases the program to be erased stored in the first area by repeatedly writing 1-byte predetermined erasure data in the first area,
The erase check means to determine whether erasure of program is done properly by the erasing means, the or at least the first byte and the last byte of the first region is a predetermined erasing data of one byte Turkey The IC card according to claim 5, wherein:
前記ダウンロードプログラムに従う前記ダウンロード手段による前記書き換え可能な不揮発性メモリへのプログラムダウンロードの完了後に、前記ICカードと接続される電子機器を介して当該電子機器の操作者に、前記ダウンロードプログラムを消去するかを問い合わせる問い合わせ手段を更に具備し、
前記消去手段は、前記問い合わせ手段による問い合わせに対して前記ダウンロードプログラムの消去が指定された場合に、当該ダウンロードプログラムを消去することを特徴とする請求項1記載のダウンロードプログラム消去機能付きICカード。
Whether the download program is erased by the operator of the electronic device via the electronic device connected to the IC card after the download of the program to the rewritable nonvolatile memory by the download unit according to the download program is completed. Inquiry means for inquiring
2. The IC card with a download program erasure function according to claim 1, wherein the erasure unit erases the download program when erasure of the download program is designated in response to an inquiry by the inquiry unit.
前記ダウンロードプログラムが消去済みであることを示すためのフラグ領域が確保されるプログラマブルな読み出し専用の不揮発性メモリと、
前記ダウンロードプログラムが正常に消去できた場合、前記プログラマブルな読み出し専用の不揮発性メモリの前記フラグ領域に特定フラグを書き込むフラグ書き込み手段と
を更に具備することを特徴とする請求項1記載のダウンロードプログラム消去機能付きICカード。
A programmable read-only nonvolatile memory in which a flag area for indicating that the download program has been erased is secured;
The download program erase according to claim 1, further comprising flag writing means for writing a specific flag in the flag area of the programmable read-only nonvolatile memory when the download program is successfully erased. IC card with function.
ログラムをダウンロードするためのダウンロードプログラムを格納する第1の領域を含むダウンロード領域が確保された書き換え可能な不揮発性メモリと、ダウンロード手段と、消去手段とを具備するICカードにおけるダウンロードプログラム消去方法であって、
前記ダウンロード手段が、前記書き換え可能な不揮発性メモリの前記第1の領域に格納されている前記ダウンロードプログラムに従って前記書き換え可能な不揮発性メモリの前記ダウンロード領域の前記第1の領域とは異なる第2の領域に前記ダウンロードプログラムとは別のプログラムをダウンロードするためのプログラムダウンロードを実行するステップと、
記プログラムダウンロードの完了後で且つ前記ICカードの発行前、前記消去手段が、前記ダウンロードプログラムを前記書き換え可能な不揮発性メモリの前記第1の領域から消去するステップと
を具備することを特徴とするICカードにおけるダウンロードプログラム消去方法。
A rewritable nonvolatile memory the download area is secured comprising a first region for storing a download program for downloading programs, the download program erasing method in an IC card comprising a downloading means, an erasing means There,
The download means has a second different from the first area of the download area of the rewritable nonvolatile memory according to the download program stored in the first area of the rewritable nonvolatile memory . a step of executing a program download to download another program with the downloaded program in the region,
Before the issuance of and prior to the IC card after the completion of the program download Kipu, said erase means, and a step of erasing the downloaded program from said first region of said rewritable non-volatile memory A method for erasing a download program in an IC card.
JP2003014710A 2003-01-23 2003-01-23 IC card with download program erasing function and download program erasing method for the card Expired - Fee Related JP4385604B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003014710A JP4385604B2 (en) 2003-01-23 2003-01-23 IC card with download program erasing function and download program erasing method for the card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003014710A JP4385604B2 (en) 2003-01-23 2003-01-23 IC card with download program erasing function and download program erasing method for the card

Publications (2)

Publication Number Publication Date
JP2004227306A JP2004227306A (en) 2004-08-12
JP4385604B2 true JP4385604B2 (en) 2009-12-16

Family

ID=32902672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003014710A Expired - Fee Related JP4385604B2 (en) 2003-01-23 2003-01-23 IC card with download program erasing function and download program erasing method for the card

Country Status (1)

Country Link
JP (1) JP4385604B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010003130A (en) * 2008-06-20 2010-01-07 Nidec Sankyo Corp Unauthorized act prevention method for electronic device
JP6160326B2 (en) * 2013-07-22 2017-07-12 大日本印刷株式会社 Information storage medium, information writing method, and writing program
JP2016129072A (en) * 2016-03-11 2016-07-14 株式会社東芝 Ic card, portable electronic device and ic card processor
JP2016177850A (en) * 2016-07-01 2016-10-06 株式会社東芝 Ic card, portable electronic device and ic card processor

Also Published As

Publication number Publication date
JP2004227306A (en) 2004-08-12

Similar Documents

Publication Publication Date Title
US9183400B2 (en) IC card and IC card control method
JP5259513B2 (en) Portable electronic device, IC card, and portable electronic device control method
JP2009530697A (en) Auto-configurable smart card and smart card auto-configuration method
JP4385604B2 (en) IC card with download program erasing function and download program erasing method for the card
JP5332845B2 (en) IC chip and data protection method, etc.
JP3592335B2 (en) Apparatus for executing a code sequence in addition to the code stored in the non-programmable memory means and a method for writing a new code sequence to the device
JP2001056848A (en) Command execution control method for ic card, ic card, and recording medium where ic card program is recorded
JP2010211516A (en) Portable electronic device and access control method in the same
JP2001167236A (en) Portable electronic device
JP4836707B2 (en) Portable electronic device and IC card
JP2006293706A (en) Multi-application ic card with application updating function
JP6769150B2 (en) Electronic information storage media, information processing methods, and information processing programs
JP2006338311A (en) Computer system for processing device loaded with multiple applications, device and computer program
JP4580660B2 (en) Multi-application IC card and application program with application installed in ROM
JP2004348342A (en) Ic card and method for processing ic card
JP4211890B2 (en) How to change memory card data in a transaction
JP2004334745A (en) Ic card
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
US20070145157A1 (en) Recording method, recorder and IC card
US20240134651A1 (en) Download method of program to settlement terminal and settlement terminal
JP6160326B2 (en) Information storage medium, information writing method, and writing program
JP2002049904A (en) Ic card and method for changing/adding processing program mounted on ic card
JP2001092713A (en) Device and method for writing data
JP2006302130A (en) Ic card and program for ic card
KR20060014600A (en) Apparatus and methods for checking the change of data stored in the external storage

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090519

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090721

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131009

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees