JP2009251818A - Apparatus and method for writing data for ic chip - Google Patents
Apparatus and method for writing data for ic chip Download PDFInfo
- Publication number
- JP2009251818A JP2009251818A JP2008097433A JP2008097433A JP2009251818A JP 2009251818 A JP2009251818 A JP 2009251818A JP 2008097433 A JP2008097433 A JP 2008097433A JP 2008097433 A JP2008097433 A JP 2008097433A JP 2009251818 A JP2009251818 A JP 2009251818A
- Authority
- JP
- Japan
- Prior art keywords
- processing unit
- data
- cache memory
- processing
- virtual machine
- 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.)
- Pending
Links
Images
Landscapes
- Storage Device Security (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は、IC(Integrated Circuit)カードに搭載されるICチップに関し、特に、ICチップにおける不揮発性メモリにデータを書き込む技術に関する。 The present invention relates to an IC chip mounted on an IC (Integrated Circuit) card, and more particularly to a technique for writing data to a nonvolatile memory in the IC chip.
従来から、ICチップにおける不揮発性メモリ(例えば、EEPROM)へのデータの書き込み処理速度が、ICチップ全体の処理速度のボトルネックになっていることが知られている。このため、当該不揮発生メモリへの書き込み処理をキャッシングするシステムが知られている(例えば、特許文献1及び特許文献2参照)。不揮発性メモリへの書き込み処理1回の速度は、書き込むデータ容量に関係なく一定であり、容量の小さいデータの書き込みを複数回実行するのではなく、ある程度書き込むデータ容量をまとめることで、不揮発性メモリへの書き込み回数を減らして処理を速くすることができる。
Conventionally, it is known that the processing speed of writing data to a nonvolatile memory (for example, EEPROM) in an IC chip has become a bottleneck of the processing speed of the entire IC chip. For this reason, a system that caches the writing process to the nonvolatile raw memory is known (see, for example,
ところで、一般に、セキュリティを確保するための処理、例えばパスワード等の認証に係る比較処理では、内部に記憶された内部データと外部から入力された外部データとが比較され、一致した場合に認証成功として次の処理へ移行するようになっているが、一致しない場合には認証失敗として、予め設定されたリトライ回数(制限回数)に達するまで、当該比較処理のリトライが行われるようになっている。ここで、リトライ回数は、「リトライが可能な回数」でもよいし、或いは「リトライ済み回数」でもよい。 By the way, in general, in a process for ensuring security, for example, a comparison process related to authentication of a password or the like, internal data stored inside is compared with external data input from the outside, and if they match, the authentication is successful. Although the process proceeds to the next process, if they do not match, the comparison process is retried until the preset number of retries (restricted number) is reached as an authentication failure. Here, the number of retries may be the “number of retries” or the “number of retries”.
上記比較処理がリトライされる回数は、例えば、当該リトライが行われる度に1減算されるリトライカウンタにより管理されるようになっており、当該リトライカウンタの値は不揮発性メモリに記憶される。また、通常、当該リトライカウンタの減算は、上記比較処理前に行われる方式になっている。これは、リトライカウンタの減算を比較処理後に行う方式では、当該比較処理後、不揮発性メモリにリトライカウンタの値が書き込まれるまでの間に電源供給が絶たれた場合に、当該比較処理において認証失敗してもリトライカウンタは減らず、何度でも比較処理が実行可能となってしまうからである。 The number of times the comparison process is retried is managed by, for example, a retry counter that is decremented by 1 each time the retry is performed, and the value of the retry counter is stored in the nonvolatile memory. In general, the retry counter is subtracted before the comparison process. This is because in the method in which the retry counter is subtracted after the comparison process, if the power supply is cut off after the comparison process and before the retry counter value is written to the nonvolatile memory, the authentication process fails in the comparison process. This is because the retry counter does not decrease and comparison processing can be executed any number of times.
また、従来、ICチップにおける不揮発性メモリ(例えば、EEPROM)のデータ容量は非常に小さい容量(例えば、数Kバイト)であったため、アプリケーションの追加/削除が不可能なNativeICカードが主流であった。しかし、例えば、特許文献3に開示されるように、近年の半導体技術の進歩によって、現在は、数十Kバイトから100Kバイトを超える不揮発性メモリの容量を有するICチップがリリースされていることもあり、JAVA(登録商標)に代表される高級言語の解釈機能を備えたバーチャルマシンが組み込まれ、アプリケーションの追加/削除が可能なマルチアプリケーションICカードが普及しつつある。
しかしながら、キャッシングするシステムを、上述したバーチャルマシンが組み込まれたマルチアプリケーションICカードに採用した場合、リトライカウンタの減算を比較処理前に行う方式において、プログラムが意図しない動作をするため、セキュリティ上の問題が発生する。例えば、キャッシュから不揮発性メモリにデータがライトバック(Write back)される前に電源供給が絶たれると、認証失敗時において不揮発性メモリにおけるリトライカウンタの値が減らないという問題が生じる。このことは、上記比較処理ばかりでなく、セキュリティを確保するためのその他の処理においても同様である。 However, when the caching system is used in a multi-application IC card in which the above-described virtual machine is incorporated, in the method in which the retry counter is subtracted before the comparison process, the program performs an unintended operation. Will occur. For example, if the power supply is cut off before the data is written back from the cache to the nonvolatile memory, there is a problem that the value of the retry counter in the nonvolatile memory does not decrease when authentication fails. This is the same not only in the comparison process but also in other processes for ensuring security.
そこで、本発明は、このような問題等に鑑みてなされたものであり、キャッシングするシステムを、バーチャルマシンが組み込まれたマルチアプリケーションICカードに採用した場合であっても、リトライカウンタの減算を処理前に行う方式におけるセキュリティ上の問題を無くし、ICカードのセキュリティ(安全性)を担保しつつ、処理を高速化することが可能なICチップ用データ書き込み装置及びデータ書き込み方法を提供することを課題とする。 Therefore, the present invention has been made in view of such problems and the like, and even when a caching system is adopted for a multi-application IC card in which a virtual machine is incorporated, the retry counter is processed. An object of the present invention is to provide an IC chip data writing apparatus and a data writing method capable of accelerating the processing while eliminating security problems in the previous method and ensuring the security (safety) of the IC card. And
上記課題を解決するために、請求項1に記載の発明は、バーチャルマシンと、バーチャルマシンから命令を受けて指定されたデータを処理する処理部と、前記処理部によって処理されたデータを一時的に蓄積するキャッシュメモリと、前記処理部からの書き込み指令に応じて前記キャッシュメモリから出力されたデータを書き込む不揮発性メモリと、を備えたICチップ用データ書き込み装置であって、前記処理部は、秘密情報に関する演算を処理する場合には、前記演算を実行する前にキャッシュメモリに蓄積されたデータを不揮発性メモリに書き込むことを特徴とする。
In order to solve the above-mentioned problem, the invention according to
請求項2に記載の発明は、請求項1に記載のICチップ用データ書き込み装置であって、前記秘密情報に関する演算の処理は、セキュリティを確保するための比較処理又は暗号処理を行う演算処理であることを特徴とする。
The invention according to
請求項3に記載の発明は、バーチャルマシンと、バーチャルマシンから命令を受けて指定されたデータを処理する処理部と、前記処理部によって処理されたデータを一時的に蓄積するキャッシュメモリと、前記処理部からの書き込み指令に応じて前記キャッシュメモリから出力されたデータを書き込む不揮発性メモリと、を備えたICチップ用データ書き込み装置におけるデータ書き込み方法であって、前記処理部は、秘密情報に関する演算を処理する場合には、前記演算を実行する前にキャッシュメモリに蓄積されたデータを不揮発性メモリに書き込むことを特徴とする。
The invention according to
本発明によれば、処理部は、秘密情報に関する演算を処理する場合には、演算を実行する前にキャッシュメモリに蓄積されたデータを不揮発性メモリに書き込むように構成したので、キャッシングするシステムを、バーチャルマシンが組み込まれたマルチアプリケーションICカードに採用した場合であっても、セキュリティ上の問題を無くし、ICカードのセキュリティを担保しつつ、処理を高速化することができる。 According to the present invention, the processing unit is configured to write the data accumulated in the cache memory before executing the calculation when processing the calculation related to the secret information. Even when it is employed in a multi-application IC card with a built-in virtual machine, it is possible to eliminate the security problem and to speed up the processing while ensuring the security of the IC card.
以下、図面を参照して本発明の最良の実施形態について詳細に説明する。以下に説明する実施形態は、キャッシュカード、クレジットカード、会員カード、社員カード、又は学生カード等として用いられるICカードに搭載される(埋め込まれる)ICチップに対して本発明を適用した場合の実施の形態である。 Hereinafter, the best embodiment of the present invention will be described in detail with reference to the drawings. The embodiment described below is an implementation when the present invention is applied to an IC chip mounted (embedded) in an IC card used as a cash card, credit card, membership card, employee card, student card, or the like. It is a form.
先ず、本発明の一実施形態に係るICチップの構成及び機能について、図1を用いて説明する。 First, the configuration and function of an IC chip according to an embodiment of the present invention will be described with reference to FIG.
図1は、本実施形態に係るICチップのハードウェア構成例を示す図である。 FIG. 1 is a diagram illustrating a hardware configuration example of an IC chip according to the present embodiment.
図1に示すように、ICチップ1は、演算機能を有するCPU(Central Processing Unit)11、プログラム及びデータが記憶されたROM(Read Only Memory)12、作業用のRAM(Random Access Memory)13、不揮発性メモリ(例えば、EEPROM(Electrically Erasable and Programmable Read Only Memory))14、及び外部機器とデータ通信するためのI/O回路16等を備えて構成されている。そして、RAM13の所定の記憶領域に、不揮発生メモリ14への書き込み処理をキャッシングするためのキャッシュメモリ15が割り当てられている。なお、I/O回路16を介した外部機器とのデータ通信は、接触方式と非接触方式の何れの方式であっても良い。
As shown in FIG. 1, an
図2は、図1に示すハードウェアを前提にしたソフトウェア構成例を示す図である。 FIG. 2 is a diagram illustrating a software configuration example based on the hardware illustrated in FIG.
図2に示すように、OS11d上でアプリケーション11a及びVM(バーチャルマシン,仮想計算機ともいう)11bが動作するようになっている。VM11bはプログラム言語を逐一機械語に変換して実行するインタープリタである。
As shown in FIG. 2, an
アプリケーション11aは、例えばJAVA(登録商標)等のプログラム言語で記述され、VM11bは、アプリケーション11aからの命令に応じた処理を受け、書き込み処理部(書き込み制御機関である処理部)11c(処理部の一例)に書き込み命令を出す処理を実行するようになっている。書き込み処理部11cは、VM11bから命令を受けて指定されたデータを処理するようになっている。
The
また、キャッシュメモリ15は、書き込み処理部(書き込み制御機関である処理部)11cによって処理されたデータを一時的に蓄積し、不揮発性メモリ14は、VM11bからの書き込み(以下、「ライトバック」という)指令に応じてキャッシュメモリ15から出力されたデータを書き込むようになっている。これは、不揮発性メモリ14より書き込み速度が速いキャッシュメモリ15により、ある程度書き込むデータ容量をまとめることで、不揮発性メモリ14への書き込み回数を減らして処理を速くする趣旨である。
The
なお、本実施形態においては、書き込み処理部11cが、秘密情報に関する演算の処理として、セキュリティを確保するための比較処理を実行する場合を例にとるものとするが、これに限定されるものではなく、例えば暗号処理等を行う演算処理であっても良い。ここで、上記秘密情報とは、例えばPIN(Personal identification number)や鍵などに関する情報を意味する。
In the present embodiment, the case where the
そして、書き込み処理部11cは、VM11bからの命令に応じて、例えばパスワード等の認証に係る比較処理を実行する場合には、当該演算を実行する前にキャッシュメモリ15に蓄積されたデータ(例えば、当該比較処理の残りのリトライ回数(処理回数に関する情報の一例)を不揮発性メモリ14に書き込む(ライトバック)ようになっている。これにより、比較処理が行われ認証失敗したにも関わらず、電源供給断によりリトライカウンタの値が減らないことを防止することができ、何度でも比較処理が実行可能となることを回避することができる。
Then, in response to an instruction from the
なお、当該比較処理においては、例えば、外部機器からI/O回路16を介して入力されたパスワードと、予めICチップ1内(例えば、不揮発性メモリ14)に記憶されているパスワードが比較され、双方が一致の場合、認証成功として処理され、双方が不一致の場合、認証失敗として処理されることになる。
In the comparison process, for example, a password input from an external device via the I /
図3は、比較処理が成功したときの動作例を示すシーケンス図である。 FIG. 3 is a sequence diagram illustrating an operation example when the comparison process is successful.
先ず、図3の動作例では、先ず、比較処理が開始されると、アプリケーション11aがリトライカウンタを1減らす命令をVM11bに対して与える(ステップS1)。当該VM11bは、この命令に応じてリトライカウンタ(リトライ回数を規定)を1減らす指令をキャッシュメモリ15に与え(ステップS2)、リトライカウンタの値を「N」(Nは自然数)→「N−1」にさせる(つまり、比較処理の残りのリトライ回数を蓄積させる)。
First, in the operation example of FIG. 3, first, when the comparison process is started, the
次に、アプリケーション11aが比較処理を実行する命令をVM11bに対して与える(ステップS3)。当該VM11b(書き込み処理部11c)は、この命令に応じてキャッシュメモリ15に対してライトバック指令をキャッシュメモリ15に与え、キャッシュメモリ15に蓄積されているリトライカウンタの値(残りのリトライ回数)を含むデータを不揮発性メモリ14にライトバックさせる(ステップS4)。こうして、キャッシュメモリ15に蓄積されたリトライカウンタの値が不揮発性メモリ14に書き込まれることになる。
Next, the
その後、VM11bは、比較処理を実行する(ステップS5)。仮に、当該比較処理後に、キャッシュメモリ15に蓄積されているリトライカウンタの値を不揮発性メモリ14にライトバックさせるように構成した場合、認証失敗に係る比較処理後に電源供給が断たれると、不揮発性メモリ14ではリトライカウンタの値が減らず、電源復旧により何度でも比較処理が可能(故意に電源断が実行されることによる)になってしまう。上記実施形態では、当該比較処理前のタイミングで、キャッシュメモリ15に蓄積されているリトライカウンタの値を不揮発性メモリ14にライトバックさせているので、認証失敗に係る比較処理後に電源供給が断たれても、リトライカウンタの値が減らないことを防止することができ、何度でも比較処理が実行可能となることを回避することができる。
Thereafter, the VM 11b performs a comparison process (step S5). If the retry counter value stored in the
上記ステップS5における比較処理において、認証成功した場合、アプリケーション11aがリトライカウンタの初期化命令をVM11bに対して与える(ステップS6)。当該VM11b(書き込み処理部11c)は、この命令に応じてキャッシュメモリ15に対してリトライカウンタの初期化指令をキャッシュメモリ15に与え(ステップS7)、リトライカウンタの値を初期化させる。
In the comparison process in step S5, if the authentication is successful, the
そして、アプリケーションの終了等により、VM11b(書き込み処理部11c)は、キャッシュメモリ15に対してライトバック指令をキャッシュメモリ15に与え、キャッシュメモリ15に蓄積されているリトライカウンタの値を含むデータを不揮発性メモリ14にライトバックさせる(ステップS8)。
When the application is terminated, the
一方、図4は、比較処理が失敗したときの動作例を示すシーケンス図であり、この場合、ステップS10〜S14までの処理は、図3のステップS1〜S5と同様であるが、図3のステップS6以降に相当する処理は行われない。 On the other hand, FIG. 4 is a sequence diagram showing an operation example when the comparison process fails. In this case, the processes from Steps S10 to S14 are the same as Steps S1 to S5 in FIG. Processing corresponding to step S6 and subsequent steps is not performed.
以上説明したように、上記実施形態によれば、VM11bと、VM11bから命令を受けて指定されたデータを処理する書き込み処理部11cと、書き込み処理部11cによって処理されたデータを一時的に蓄積するキャッシュメモリ15と、書き込み処理部11cからの書き込み指令に応じてキャッシュメモリ15から出力されたデータを書き込む不揮発性メモリ14と、を備え、書き込み処理部11cは、例えばセキュリティを確保するための比較処理等の秘密情報に関する演算を処理する場合には、当該演算を実行する前にキャッシュメモリ15に蓄積されたデータを不揮発性メモリ14に書き込むように構成したので、リトライカウンタの減算を処理前に行う方式を、バーチャルマシンが組み込まれたマルチアプリケーションICカードに採用した場合であっても、セキュリティ上の問題を無くし、ICカードのセキュリティ(安全性)を担保しつつ、処理を高速化することができる。
As described above, according to the above embodiment, the
1 ICチップ
11 CPU
11a アプリケーション
11b VM
11c 書き込み処理部
11d OS
12 ROM
13 RAM
14 不揮発性メモリ
15 キャッシュメモリ
16 I/O回路
1
11c
12 ROM
13 RAM
14
Claims (3)
前記処理部は、秘密情報に関する演算を処理する場合には、前記演算を実行する前にキャッシュメモリに蓄積されたデータを不揮発性メモリに書き込むことを特徴とするICチップ用データ書き込み装置。 In response to a virtual machine, a processing unit that receives a command from the virtual machine, processes specified data, a cache memory that temporarily stores data processed by the processing unit, and a write command from the processing unit A data writing device for an IC chip, comprising: a nonvolatile memory for writing data output from the cache memory;
In the IC chip data writing device, the processing unit writes data stored in the cache memory into the nonvolatile memory before executing the calculation when processing the calculation related to the secret information.
前記秘密情報に関する演算の処理は、セキュリティを確保するための比較処理又は暗号処理を行う演算処理であることを特徴とするICチップ用データ書き込み装置。 The IC chip data writing device according to claim 1,
The IC chip data writing device according to claim 1, wherein the calculation processing relating to the secret information is a calculation processing for performing comparison processing or encryption processing for ensuring security.
前記処理部は、秘密情報に関する演算を処理する場合には、前記演算を実行する前にキャッシュメモリに蓄積されたデータを不揮発性メモリに書き込むことを特徴とするデータ書き込み方法。 In response to a virtual machine, a processing unit that receives a command from the virtual machine, processes specified data, a cache memory that temporarily stores data processed by the processing unit, and a write command from the processing unit A data writing method in an IC chip data writing device comprising: a nonvolatile memory for writing data output from the cache memory,
The processing unit writes data accumulated in a cache memory to a nonvolatile memory before executing the calculation when processing the calculation related to secret information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008097433A JP2009251818A (en) | 2008-04-03 | 2008-04-03 | Apparatus and method for writing data for ic chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008097433A JP2009251818A (en) | 2008-04-03 | 2008-04-03 | Apparatus and method for writing data for ic chip |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009251818A true JP2009251818A (en) | 2009-10-29 |
Family
ID=41312487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008097433A Pending JP2009251818A (en) | 2008-04-03 | 2008-04-03 | Apparatus and method for writing data for ic chip |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009251818A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63503335A (en) * | 1986-05-16 | 1988-12-02 | エイ・ティ・アンド・ティ・コーポレーション | Secure file system for portable data carriers |
JP2000172804A (en) * | 1998-12-01 | 2000-06-23 | Toshiba Corp | Ic card and method for updating its data |
JP2003203213A (en) * | 2002-01-08 | 2003-07-18 | Dainippon Printing Co Ltd | Authentication management application, authentication application and ic card |
JP2006099616A (en) * | 2004-09-30 | 2006-04-13 | Toshiba Corp | Portable electronic equipment and control method for portable electronic equipment |
-
2008
- 2008-04-03 JP JP2008097433A patent/JP2009251818A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63503335A (en) * | 1986-05-16 | 1988-12-02 | エイ・ティ・アンド・ティ・コーポレーション | Secure file system for portable data carriers |
JP2000172804A (en) * | 1998-12-01 | 2000-06-23 | Toshiba Corp | Ic card and method for updating its data |
JP2003203213A (en) * | 2002-01-08 | 2003-07-18 | Dainippon Printing Co Ltd | Authentication management application, authentication application and ic card |
JP2006099616A (en) * | 2004-09-30 | 2006-04-13 | Toshiba Corp | Portable electronic equipment and control method for portable electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3547195B1 (en) | System-on-chip and method for switching secure operating systems | |
US7681024B2 (en) | Secure booting apparatus and method | |
US8983072B2 (en) | Portable data carrier featuring secure data processing | |
JP2003521034A (en) | Microprocessor system and method of operating the same | |
JP5225054B2 (en) | IC card | |
JP2008537240A (en) | Method for verifying pseudo code loaded on embedded systems, especially smart cards | |
JP4896842B2 (en) | Portable electronic device | |
KR20150135753A (en) | Ic card, electronic device and portable electronic device | |
JP2004503860A (en) | Data processing method and apparatus for execution of protected instructions | |
JP2009251818A (en) | Apparatus and method for writing data for ic chip | |
US20110022852A1 (en) | Cryptographic computation apparatus, cryptographic computation program, and storage medium | |
US20060053269A1 (en) | System, microcontroller and methods thereof | |
US20150333903A1 (en) | Method for Operating a Portable Data Carrier, and Such a Portable Data Carrier | |
JP4961834B2 (en) | IC card issuing method and IC card | |
JP2006293706A (en) | Multi-application ic card with application updating function | |
EP1384197B1 (en) | Method of manufacturing smart cards | |
JP2001283160A (en) | Ic card and device and method for updating ic card | |
JP2009015651A (en) | Information storage medium | |
JP7322923B2 (en) | Secure element, transaction control method and device | |
JP5724387B2 (en) | Portable device and dynamic data storage position changing method | |
JP2004348342A (en) | Ic card and method for processing ic card | |
JP2007034434A (en) | Ic card, method for writing data to ic card, and ic card program | |
JP2004185419A (en) | Portable electronic medium, issuing system of portable electronic medium, processing method, and issuing method | |
JP4899499B2 (en) | IC card issuing method, IC card issuing system, and IC card | |
JP2013003831A (en) | Ic chip, processing program for ic chip, and writing processing method in ic chip |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120726 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120807 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121005 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130226 |