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 PDFInfo
- 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
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
[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
[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
[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
[0026]
The
[0027]
The
[0028]
The
[0029]
The
The
[0030]
The
[0031]
The area of the
[0032]
The
[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
[0034]
While being connected to the
[0035]
The
[0036]
When the
[0037]
Thus, in this embodiment, when the
[0038]
Next, details of the processing in step S1, that is, the processing for writing the
[0039]
First, the
[0040]
When the
[0041]
Next, the
[0042]
When the
[0043]
Next, details of the process of step S2 (program download process according to
First, the
[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
[0045]
The
[0046]
If the
[0047]
On the other hand, if the
[0048]
When step S35 or S36 is executed in accordance with
[0049]
[First Modification]
Next, the 1st modification in one Embodiment of this invention is demonstrated.
First, the first modification is characterized in that the
[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
[0051]
Next, details of the processes of steps S41 and S42 will be described with reference to the flowchart of FIG.
When the
[0052]
First, the
[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
[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
[0055]
Then, according to the erasure check routine ECR, the
[0056]
If the
[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
[0058]
Thus, in the first modification of the present embodiment, not only the
[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
[0060]
Assume that the
[0061]
When the user wants to download the
[0062]
Hereinafter, an operation when the user-specified
[0063]
First, the terminal 30 writes
[0064]
The terminal 30 activates the
[0065]
When the user-specified
[0066]
When erasure is designated in response to the DLP erasure inquiry (step S74), the
[0067]
As described above, in the second modification of the present embodiment, when the program download to the
[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
[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
[0070]
The
[0071]
In the second and third modified examples, as in the first modified example,
[0072]
In addition, the
[0073]
Further, the
[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
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
FIG. 12 is a flowchart for explaining an operation when a user-specified application is downloaded to the
[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)
前記ダウンロードプログラムを格納するための第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の領域に格納されている前記消去プログラムに従って当該消去プログラム自身をも消去することを特徴とする請求項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バイトの所定の消去データを前記第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:
前記消去手段は、前記問い合わせ手段による問い合わせに対して前記ダウンロードプログラムの消去が指定された場合に、当該ダウンロードプログラムを消去することを特徴とする請求項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の領域に格納されている前記ダウンロードプログラムに従って前記書き換え可能な不揮発性メモリの前記ダウンロード領域の前記第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.
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)
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 |
-
2003
- 2003-01-23 JP JP2003014710A patent/JP4385604B2/en not_active Expired - Fee Related
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 |