JP5112123B2 - Portable electronic device and IC card - Google Patents

Portable electronic device and IC card Download PDF

Info

Publication number
JP5112123B2
JP5112123B2 JP2008065999A JP2008065999A JP5112123B2 JP 5112123 B2 JP5112123 B2 JP 5112123B2 JP 2008065999 A JP2008065999 A JP 2008065999A JP 2008065999 A JP2008065999 A JP 2008065999A JP 5112123 B2 JP5112123 B2 JP 5112123B2
Authority
JP
Japan
Prior art keywords
encryption
data
processing
memory
card
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.)
Active
Application number
JP2008065999A
Other languages
Japanese (ja)
Other versions
JP2009223503A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008065999A priority Critical patent/JP5112123B2/en
Publication of JP2009223503A publication Critical patent/JP2009223503A/en
Application granted granted Critical
Publication of JP5112123B2 publication Critical patent/JP5112123B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Description

本発明は、たとえば、書込み、書換えが可能な不揮発性メモリおよびCPU(セントラル・プロセッシング・ユニット)などの制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えたIC(集積回路)チップを内蔵した、いわゆるICカードと称される携帯可能電子装置に係り、特に、外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化手段を備えた携帯可能電子装置およびICカードに関する。   The present invention has a control element such as a non-volatile memory that can be written and rewritten and a CPU (Central Processing Unit), and includes means for selectively inputting / outputting data to / from the outside. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a portable electronic device called an IC card that incorporates an IC (integrated circuit) chip. The present invention relates to portable electronic devices and IC cards.

最近、携帯可能電子装置として、不揮発性メモリとしてのEEPROM、揮発性メモリとしてのRAM、これらのメモリに対してアクセス(データの読出しおよびまたは書込み等)を行なう制御素子としてのCPU、および、CPUの動作用プログラム等を格納したROMを有し、外部装置(カードリーダ・ライタ)から供給される命令データ(コマンド)に基づいてデータの入出力等を行なう手段を備えたICチップを内蔵したICカードが産業各方面で利用されている。   Recently, as a portable electronic device, an EEPROM as a nonvolatile memory, a RAM as a volatile memory, a CPU as a control element for accessing (reading or writing data, etc.) the memory, and the CPU An IC card having a ROM storing an operation program and the like, and including an IC chip having means for inputting and outputting data based on command data (command) supplied from an external device (card reader / writer) Is used in various industries.

一般に、このようなICカードにあっては、コマンドやレスポンスを用いて、外部装置との間でデータの入出力を行なうようになっている。
また、この種のICカードでは、外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化機能を備えたものがある。暗号化処理を行なう際には、ドライバソフトウェアを介してコプロセッサや転置回路といったハードウェア(暗号モジュール)の制御を行なっている(たとえば、特許文献1、特許文献2を参照)。
In general, in such an IC card, data is input / output to / from an external device using commands and responses.
Some IC cards of this type have an encryption function for performing encryption processing on data input from the outside or data output to the outside. When performing the encryption process, hardware (encryption module) such as a coprocessor and a transposition circuit is controlled via driver software (see, for example, Patent Document 1 and Patent Document 2).

ドライバソフトウェアは、入力データアドレス、入力データサイズ、出力データアドレス、暗号方式、暗号/復号鍵アドレス、鍵サイズ等の情報をCPU内のレジスタに入力し、暗号モジュールの処理を実行すると、その処理結果が出力データアドレスで指定したメモリ空間に格納されるようになっている。
特開2005−223477号公報 特表2000−507072号公報
The driver software inputs information such as an input data address, input data size, output data address, encryption method, encryption / decryption key address, and key size to a register in the CPU and executes the processing of the encryption module. Are stored in the memory space designated by the output data address.
JP 2005-223477 A Special Table 2000-507072

ところが、従来のICカードでは、ドライバソフトウェアを使った暗号化処理中にパータベーション(Perturbation)攻撃を受けると、暗号モジュールでの処理結果を格納する出力データアドレスの値を改竄され、予期しないメモリ空間にデータを格納してしまうことがある。   However, in the conventional IC card, if a perturbation attack is received during the encryption processing using the driver software, the value of the output data address for storing the processing result in the encryption module is altered, resulting in an unexpected memory space. May store data.

このパータベーション攻撃が成功すると、従来、暗号化処理結果が格納されるメモリ空間にはデータが格納されず、「0x00」や「0xFF」といった初期値データが残ってしまい、この初期値データを暗号モジュールの処理結果とみなして以降の処理が行なわれてしまう可能性がある。   If this perturbation attack is successful, conventionally, no data is stored in the memory space where the encryption processing result is stored, and initial value data such as “0x00” and “0xFF” remains, and this initial value data is encrypted. Subsequent processing may be performed assuming that the processing result of the module.

そこで、本発明は、暗号化処理結果の出力データが予測不能となり、暗号化処理結果を的中させることが困難となり、かつ、暗号化処理で使用するパラメータが改竄されたとしても、暗号化処理結果を推測するのは困難となる携帯可能電子装置およびICカードを提供することを目的とする。   Therefore, according to the present invention, the output data of the encryption processing result becomes unpredictable, it becomes difficult to hit the encryption processing result, and even if the parameters used in the encryption processing are falsified, the encryption processing It is an object to provide a portable electronic device and an IC card in which it is difficult to guess the result.

本発明の携帯可能電子装置は、データを記憶するためのメモリと、このメモリに対してデータの書込みおよびまたは読出しを行なう制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えた携帯可能電子装置において、外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化手段と、この暗号化手段により暗号化処理を行なう際の処理データを一時的に保持するもので、初期値としてあらかじめ所定の定数が格納されている記憶手段と、前記暗号化手段による暗号化処理が終了した後、前記記憶手段内が所定の定数であるか否かを確認する確認手段と、この確認手段による確認の結果、前記記憶手段内が所定の定数である場合、前記暗号化手段による暗号化処理を正常終了せず、エラー処理を行なう制御手段とを具備している。 The portable electronic device of the present invention has a memory for storing data and a control element for writing and reading data to and from the memory, and selectively inputs / outputs data to / from the outside. In a portable electronic device having means for performing, encryption means for performing encryption processing on data input from outside or data output to outside, and processing data when encryption processing is performed by this encryption means A storage means that is temporarily held and stores a predetermined constant in advance as an initial value, and whether or not the storage means is a predetermined constant after the encryption processing by the encryption means is completed If the result of confirmation by the confirmation means is that the storage means is a predetermined constant, the encryption process by the encryption means does not end normally and an error occurs. And a control means for performing management.

また、本発明のICカードは、データを記憶するためのメモリと、このメモリに対してデータの書込みおよびまたは読出しを行なう制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えたICカードにおいて、外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化手段と、この暗号化手段により暗号化処理を行なう際の処理データを一時的に保持するもので、初期値としてあらかじめ所定の定数が格納されている記憶手段と、前記暗号化手段による暗号化処理が終了した後、前記記憶手段内が所定の定数であるか否かを確認する確認手段と、この確認手段による確認の結果、前記記憶手段内が所定の定数である場合、前記暗号化手段による暗号化処理を正常終了せず、エラー処理を行なう制御手段とを有したICモジュールと、このICモジュールを収納したICカード本体とを具備している。 Further, IC card of the present invention includes a memory for storing data, a control device for writing and or reading of data to the memory, the input and output of data to and from the selective external In an IC card provided with means for performing encryption, encryption means for performing encryption processing on data input from the outside or data output to the outside, and processing data when performing encryption processing by this encryption means are temporarily stored Storage means storing a predetermined constant in advance as an initial value, and confirming whether or not the storage means is a predetermined constant after the encryption processing by the encryption means is completed And when the result of confirmation by the confirmation means is a predetermined constant, the encryption process by the encryption means is not terminated normally and error processing is performed. An IC module having a Nau control unit, and an IC card main body which houses the IC module.

本発明によれば、パータベーション攻撃により入力データが正しく所定の領域に格納されていなかったとしても、暗号化処理結果の出力データが予測不能となり、暗号化処理結果を的中させることが困難となる。 According to the present invention, even if the input data is not correctly stored in the predetermined area due to the perturbation attack, the output data of the encryption processing result becomes unpredictable, and it is difficult to hit the encryption processing result. Become.

また、その他の暗号化処理で使用するパラメータ(入力データの先頭アドレス、入力データサイズ、暗号鍵の先頭アドレス、出力データ先アドレス、出力データサイズ等)のいずれかが改竄されたとしても、暗号化処理結果を推測するのは困難となる。
Also, other parameters used in the encryption process (the start address of the input data, the input data size, the start address of the encryption key, the output data address, the output data size, etc.) as either has been tampered, the cryptographic It is difficult to guess the result of the conversion process.

以下、本発明の実施の形態について図面を参照して説明する。
図1は、本発明に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すものである。このICカードシステムは、ICカード101を外部装置としてのカードリーダ・ライタ102を介して端末装置103と接続可能にするとともに、端末装置103にキーボード104、CRT表示部105、プリンタ106を接続して構成される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows a configuration example of an IC card system that handles an IC card as a portable electronic device according to the present invention. In this IC card system, an IC card 101 can be connected to a terminal device 103 via a card reader / writer 102 as an external device, and a keyboard 104, a CRT display unit 105, and a printer 106 are connected to the terminal device 103. Composed.

ICカード101は、カードリーダ・ライタ102からの電源供給により動作可能な状態となり、カードリーダ・ライタ102から供給されるコマンド(命令)に応じて種々の処理を実行する。カードリーダ・ライタ102は、ICカード101に対し動作電源を供給するとともに種々の処理を要求するコマンドを供給する。   The IC card 101 becomes operable by supplying power from the card reader / writer 102, and executes various processes in accordance with commands (commands) supplied from the card reader / writer 102. The card reader / writer 102 supplies operating power to the IC card 101 and commands for requesting various processes.

端末装置103は、たとえば、パーソナルコンピュータなどにより構成されていて、図示しないメモリに記憶されている各種制御プログラムを実行することにより、各種の処理を実行するとともに、カードリーダ・ライタ102を介してICカード101との間でデータの入出力を行なう。   The terminal device 103 is constituted by, for example, a personal computer, and executes various processes by executing various control programs stored in a memory (not shown), and also performs an IC via the card reader / writer 102. Data is input to and output from the card 101.

図2は、ICカード101の構成を示すもので、制御素子としてのCPU201、記憶内容が書換え可能な記憶手段としてのデータメモリ202、ワーキングメモリ203、プログラムメモリ204、記憶手段としてのコプロメモリ205、および、カードリーダ・ライタ102との通信を行なうための通信部206、暗号化処理を行なう暗号化手段としての暗号モジュール207、および、乱数を生成する乱数生成手段としての乱数生成モジュール208によって構成されていて、これらのうち、破線内の部分(CPU201、データメモリ202、ワーキングメモリ203、プログラムメモリ204、記憶手段としてのコプロメモリ205、暗号モジュール207、乱数生成モジュール208)は1つ(あるいは複数)のICチップ209で構成され、さらに、このICチップ209と通信部206とが接続された状態で一体的にICモジュール化されて、ICカード本体101a内に埋設されている。   FIG. 2 shows a configuration of the IC card 101. The CPU 201 as a control element, a data memory 202 as a storage means capable of rewriting stored contents, a working memory 203, a program memory 204, a co-pro memory 205 as a storage means, A communication unit 206 for communicating with the card reader / writer 102, an encryption module 207 as an encryption unit for performing an encryption process, and a random number generation module 208 as a random number generation unit for generating a random number. Of these, the portion within the broken line (CPU 201, data memory 202, working memory 203, program memory 204, coprocessor memory 205 as storage means, encryption module 207, random number generation module 208) is one (or more) IC. Chip 20 In the configuration, furthermore, it is integrally IC module in a state in which this IC chip 209 and communication unit 206 are connected, are embedded in the IC card body 101a.

CPU201は、各種の判定処理や判断処理およびメモリに対するデータの書込みや読出しなどの各種のデータ処理を行なう制御部である。   The CPU 201 is a control unit that performs various types of data processing such as various types of determination processing and determination processing, and writing and reading of data to and from the memory.

データメモリ202は、たとえば、EEPROM(エレクトリカリ・イレーザブル・アンド・プログラマブル・リード・オンリ・メモリ)などの消去(書換え)可能な不揮発性メモリで構成されていて、各種アプリケーションデータなどの各種データがファイル構造で記憶される。   The data memory 202 is composed of an erasable (rewritable) non-volatile memory such as an EEPROM (Electrical Eraseable and Programmable Read Only Memory), and various data such as various application data are files. Stored in structure.

ワーキングメモリ203は、CPU201が処理を行なう際の処理データを一時的に保持するための作業用のメモリであり、たとえば、RAM(ランダム・アクセス・メモリ)などの揮発性メモリで構成されている。   The working memory 203 is a working memory for temporarily storing processing data when the CPU 201 performs processing. For example, the working memory 203 includes a volatile memory such as a RAM (Random Access Memory).

プログラムメモリ204は、たとえば、マスクROM(リード・オンリ・メモリ)などの書換え不可能な固定メモリで構成されており、CPU201の制御プログラムなどを記憶している。   The program memory 204 is configured by a non-rewritable fixed memory such as a mask ROM (read only memory), for example, and stores a control program of the CPU 201 and the like.

コプロメモリ205は、暗号モジュール207で暗号化処理を行なう際の処理データを一時的に保持するためのメモリであり、たとえば、RAM(Co−RAMと称す)などの揮発性メモリで構成される。   The coprocessor memory 205 is a memory for temporarily storing processing data when the encryption module 207 performs encryption processing, and is configured by a volatile memory such as a RAM (referred to as Co-RAM), for example.

通信部206は、ICカード101が非接触式(無線式)ICカードの場合にはアンテナ部として構成され、カードリーダ・ライタ102から送信された変調波を非接触で受信したり外部へ変調波を発信したりするようになっている。また、この通信部206で受信した変調波から内部回路に供給するための電源やクロックを生成するようになっている。また、接触式ICカードの場合にはコンタクト部として構成され、カードリーダ・ライタ102に設けられたICカード端子部(図示しない)と接触することにより電源やクロックを得るようになっている。   The communication unit 206 is configured as an antenna unit when the IC card 101 is a non-contact (wireless) IC card, and receives a modulated wave transmitted from the card reader / writer 102 in a non-contact manner or a modulated wave to the outside. Or to send. Further, a power supply and a clock for supplying to the internal circuit are generated from the modulated wave received by the communication unit 206. In the case of a contact type IC card, it is configured as a contact portion, and a power source and a clock are obtained by contacting with an IC card terminal portion (not shown) provided in the card reader / writer 102.

暗号モジュール207は、暗号計算(暗号化処理)を行なうものであり、たとえば、DES、RSA、AES等の暗号方式に対応したコプロセッサ、転置回路などで構成されている。乱数生成モジュール208は、乱数を生成するものである。   The cryptographic module 207 performs cryptographic calculation (encryption processing), and includes, for example, a coprocessor corresponding to a cryptographic scheme such as DES, RSA, AES, and a transposition circuit. The random number generation module 208 generates a random number.

図3は、ICカード101のメモリ空間とその構造を示すものである。図3の例では、同一のアドレス空間に、ROM領域301(プログラムメモリ204)、EEPROM領域302(データメモリ202)、Co−RAM領域303(コプロメモリ205)、RAM領域304(ワーキングメモリ203)の順番にメモリが配置されている。   FIG. 3 shows the memory space of the IC card 101 and its structure. In the example of FIG. 3, the ROM area 301 (program memory 204), the EEPROM area 302 (data memory 202), the Co-RAM area 303 (coprocessor memory 205), and the RAM area 304 (working memory 203) are arranged in the same address space. The memory is arranged in

図4は、一般的なICカード101内でのCo−RAM領域303(コプロメモリ205)とDES暗号方式の暗号モジュール207での動作例を示しており、以下、これについて簡単に説明する。   FIG. 4 shows an operation example in the Co-RAM area 303 (coprocessor memory 205) and the DES encryption system encryption module 207 in the general IC card 101, which will be briefly described below.

まず、Co−RAM領域303内の入力データ領域401にデータを設定し、DES鍵領域402にDES鍵を設定する。次に、Co−RAM領域303内の入力データ領域401に格納された入力データの先頭アドレスと入力データサイズをCPU201内のレジスタ(図示省略)に設定する。次に、暗号方式を決定するためにDES暗号方式で実行することを示す値をCPU201のレジスタに設定する。次に、DES鍵領域402に格納されたDES鍵の先頭アドレスとDES鍵サイズをCPU201内のレジスタに設定する。次に、Co−RAM領域303内の出力データ領域403に暗号化処理結果を格納する先頭アドレスをCPU201内のレジスタに設定する。
以上の設定を行なった後に暗号モジュール207による暗号化処理を実行すると、その暗号化処理結果が出力先アドレス設定で指定した出力データ領域403内のアドレスに格納される。
First, data is set in the input data area 401 in the Co-RAM area 303, and a DES key is set in the DES key area 402. Next, the head address and input data size of the input data stored in the input data area 401 in the Co-RAM area 303 are set in a register (not shown) in the CPU 201. Next, a value indicating execution by the DES encryption method is set in the register of the CPU 201 in order to determine the encryption method. Next, the head address and DES key size of the DES key stored in the DES key area 402 are set in a register in the CPU 201. Next, the head address for storing the encryption processing result in the output data area 403 in the Co-RAM area 303 is set in a register in the CPU 201.
When the encryption process by the encryption module 207 is executed after the above settings are made, the result of the encryption process is stored at the address in the output data area 403 specified by the output destination address setting.

次に、第1の実施の形態に係る動作例について図5に示すフローチャートを参照して説明する。なお、この動作例はDES暗号方式の暗号モジュール207を用いた場合を示している。   Next, an operation example according to the first embodiment will be described with reference to a flowchart shown in FIG. This operation example shows a case where the DES encryption system encryption module 207 is used.

まず、Co−RAM領域303(入力データ領域401、DES鍵領域402、出力データ領域403)に、乱数生成モジュール208で生成される乱数を格納する(ステップS501)。次に、Co−RAM領域303内に初期値ではなく乱数が正しく格納されていることをチェックし(ステップS502)、乱数が正しく格納されていない場合は、エラー処理を行ない(ステップS503)、その後、当該処理を終了する。   First, the random numbers generated by the random number generation module 208 are stored in the Co-RAM area 303 (input data area 401, DES key area 402, output data area 403) (step S501). Next, it is checked whether the random number is stored correctly instead of the initial value in the Co-RAM area 303 (step S502). If the random number is not stored correctly, error processing is performed (step S503), and thereafter Then, the process ends.

ステップS502におけるチェックの結果、Co−RAM領域303内に乱数が正しく格納されている場合、Co−RAM領域303内の入力データ領域401に暗号化するための入力データを上書きし(ステップS504)、また、DES鍵領域402にDES鍵を上書きする(ステップS505)。   If the random number is correctly stored in the Co-RAM area 303 as a result of the check in step S502, the input data to be encrypted is overwritten in the input data area 401 in the Co-RAM area 303 (step S504), Further, the DES key is overwritten in the DES key area 402 (step S505).

次に、Co−RAM領域303内の入力データ領域401に格納された入力データの先頭アドレスと、当該入力データのサイズをCPU201内のレジスタ(図示省略)に設定する(ステップS506)。   Next, the head address of the input data stored in the input data area 401 in the Co-RAM area 303 and the size of the input data are set in a register (not shown) in the CPU 201 (step S506).

次に、暗号方式を決定するためにDES暗号方式で実行することを示す値をCPU201内のレジスタに設定する(ステップS507)。次に、DES鍵領域402に格納されているDES鍵の先頭アドレスと、当該DES鍵のサイズをCPU201内のレジスタに設定する(ステップS508)。   Next, a value indicating execution by the DES encryption method is set in a register in the CPU 201 in order to determine the encryption method (step S507). Next, the head address of the DES key stored in the DES key area 402 and the size of the DES key are set in the register in the CPU 201 (step S508).

次に、出力データ領域403内の暗号化処理結果を格納する先頭アドレスをCPU201内のレジスタに設定する(ステップS509)。   Next, the head address for storing the encryption processing result in the output data area 403 is set in a register in the CPU 201 (step S509).

以上の設定を行なった後に暗号モジュール207による暗号化処理を実行すると(ステップS510)、その暗号化処理結果がステップS509で設定された出力データ領域403内のアドレスに格納され(ステップS511)、その後、当該処理を終了する。   When the encryption processing by the encryption module 207 is executed after performing the above settings (step S510), the result of the encryption processing is stored at the address in the output data area 403 set in step S509 (step S511), and thereafter Then, the process ends.

なお、ステップS503におけるエラー処理としては、たとえば、以降の暗号モジュール207へのアクセスを禁止したり、あるいは、当該ICカード101内の全ての処理を禁止したりするなどの処理が考えられる。   As the error processing in step S503, for example, processing such as prohibiting subsequent access to the cryptographic module 207 or prohibiting all processing in the IC card 101 can be considered.

このように、第1の実施の形態によれば、暗号モジュール207による暗号化処理を実施する前に、Co−RAM領域303内に乱数を格納することにより、パータベーション攻撃により入力データが正しくCo−RAM領域303に格納されていなかったとしても、入力データ領域401には乱数が格納されているため、暗号化処理結果の出力データが予測不能となり、暗号化処理結果を的中させることが極めて困難となる。   As described above, according to the first embodiment, the random number is stored in the Co-RAM area 303 before the encryption process by the encryption module 207 is performed, so that the input data is correctly copied by the perturbation attack. -Even if it is not stored in the RAM area 303, since the random number is stored in the input data area 401, the output data of the encryption processing result becomes unpredictable, and it is extremely difficult to hit the encryption processing result. It becomes difficult.

また、暗号モジュール207で使用するその他のパラメータ(入力データの先頭アドレス、入力データサイズ、DES鍵の先頭アドレス、出力データ先アドレス、出力データサイズ等)のいずれかが改竄されたとしても、改竄後のアドレスにも乱数があらかじめ格納されているため、暗号化処理結果を推測するのは極めて困難となる。   Even if any of the other parameters used in the cryptographic module 207 (input data start address, input data size, DES key start address, output data destination address, output data size, etc.) is altered, Since the random number is also stored in advance in the address, it is extremely difficult to guess the encryption processing result.

次に、第2の実施の形態に係る動作例について図6に示すフローチャートを参照して説明する。なお、Co−RAM領域303内の各領域401〜403には、初期値としてあらかじめ所定の定数(たとえば、オール「F」の値)が格納されているものとする。   Next, an operation example according to the second embodiment will be described with reference to a flowchart shown in FIG. It is assumed that a predetermined constant (for example, the value of all “F”) is stored in advance in each of the areas 401 to 403 in the Co-RAM area 303 as an initial value.

まず、Co−RAM領域303内の入力データ領域401に暗号化するための入力データを上書きし(ステップS601)、また、DES鍵領域402にDES鍵を上書きする(ステップS602)。   First, the input data area 401 in the Co-RAM area 303 is overwritten with the input data for encryption (step S601), and the DES key area 402 is overwritten with the DES key (step S602).

次に、Co−RAM領域303内の入力データ領域401に格納された入力データの先頭アドレスと、当該入力データのサイズをCPU201内のレジスタ(図示省略)に設定する(ステップS603)。   Next, the head address of the input data stored in the input data area 401 in the Co-RAM area 303 and the size of the input data are set in a register (not shown) in the CPU 201 (step S603).

次に、暗号方式を決定するためにDES暗号方式で実行することを示す値をCPU201内のレジスタに設定する(ステップS604)。次に、DES鍵領域402に格納されているDES鍵の先頭アドレスと、当該DES鍵のサイズをCPU201内のレジスタに設定する(ステップS605)。   Next, a value indicating execution by the DES encryption method is set in a register in the CPU 201 in order to determine the encryption method (step S604). Next, the head address of the DES key stored in the DES key area 402 and the size of the DES key are set in the register in the CPU 201 (step S605).

次に、出力データ領域403内の暗号化処理結果を格納する先頭アドレスをCPU201内のレジスタに設定する(ステップS606)。次に、暗号モジュール207による暗号化処理を実行し(ステップS607)、その暗号化処理結果をステップS606で設定された出力データ領域403内のアドレスに格納する(ステップS608)。   Next, the head address for storing the encryption processing result in the output data area 403 is set in the register in the CPU 201 (step S606). Next, encryption processing by the encryption module 207 is executed (step S607), and the result of the encryption processing is stored at the address in the output data area 403 set in step S606 (step S608).

次に、Co−RAM領域303内が所定の定数(オール「F」)でないことをチェックし(ステップS609)、所定の定数であった場合は、暗号化処理を正常終了せず、エラー処理を行ない(ステップS610)、その後、当該処理を終了する。
ステップS609におけるチェックの結果、Co−RAM領域303内が所定の定数でなかった場合、当該処理を正常終了する。
Next, it is checked whether or not the inside of the Co-RAM area 303 is not a predetermined constant (all “F”) (step S609). If it is a predetermined constant, the encryption processing is not terminated normally and error processing is performed. (Step S610), and then the process is terminated.
As a result of the check in step S609, if the inside of the Co-RAM area 303 is not a predetermined constant, the process ends normally.

なお、ステップS610におけるエラー処理としては、たとえば、以降の暗号モジュール207へのアクセスを禁止したり、あるいは、当該ICカード101内の全ての処理を禁止したりするなどの処理が考えられる。   As the error processing in step S610, for example, processing such as prohibiting subsequent access to the cryptographic module 207 or prohibiting all processing in the IC card 101 can be considered.

このように、第2の実施の形態によれば、Co−RAM領域303内にあらかじめ所定の定数を格納しておき、暗号モジュール207による暗号化処理が終了した後、Co−RAM領域303内が所定の定数である場合、暗号化処理を正常終了せず、エラー処理を行なうことにより、第1の実施の形態と同様な作用効果が期待できる。   Thus, according to the second embodiment, a predetermined constant is stored in advance in the Co-RAM area 303, and after the encryption processing by the encryption module 207 is completed, the contents of the Co-RAM area 303 are stored. If it is a predetermined constant, the same effect as in the first embodiment can be expected by performing error processing without normally completing the encryption processing.

本発明に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すブロック図。The block diagram which shows the structural example of the IC card system which handles the IC card as a portable electronic device concerning the present invention. ICカードの構成を概略的に示すブロック図。1 is a block diagram schematically showing the configuration of an IC card. ICカードのメモリ空間とその構造を示す模式図。The schematic diagram which shows the memory space of IC card, and its structure. 一般的なICカード内でのCo−RAM領域とDES暗号方式の暗号モジュールでの動作例を説明する模式図。The schematic diagram explaining the operation example in the Co-RAM area | region in a general IC card, and the encryption module of a DES encryption system. 第1の実施の形態に係る動作例について説明するフローチャート。The flowchart explaining the operation example which concerns on 1st Embodiment. 第2の実施の形態に係る動作例について説明するフローチャート。The flowchart explaining the operation example which concerns on 2nd Embodiment.

符号の説明Explanation of symbols

101…ICカード(携帯可能電子装置)、101a…ICカード本体、102…カードリーダ・ライタ(外部装置)、103…端末装置、104…キーボード、105…CRT表示部、106…プリンタ、201…CPU(制御素子)、202…データメモリ(記憶手段)、203…ワーキングメモリ、204…プログラムメモリ、205…コプロメモリ(記憶手段)、206…通信部、207…暗号モジュール(暗号化手段)、208…乱数生成モジュール(乱数生成手段)、209…ICチップ。   DESCRIPTION OF SYMBOLS 101 ... IC card (portable electronic device), 101a ... IC card main body, 102 ... Card reader / writer (external device), 103 ... Terminal device, 104 ... Keyboard, 105 ... CRT display part, 106 ... Printer, 201 ... CPU (Control element), 202 ... data memory (storage means), 203 ... working memory, 204 ... program memory, 205 ... copro memory (storage means), 206 ... communication unit, 207 ... encryption module (encryption means), 208 ... random number Generation module (random number generation means), 209... IC chip.

Claims (2)

データを記憶するためのメモリと、このメモリに対してデータの書込みおよびまたは読出しを行なう制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えた携帯可能電子装置において、
外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化手段と、
この暗号化手段により暗号化処理を行なう際の処理データを一時的に保持するもので、初期値としてあらかじめ所定の定数が格納されている記憶手段と、
前記暗号化手段による暗号化処理が終了した後、前記記憶手段内が所定の定数であるか否かを確認する確認手段と、
この確認手段による確認の結果、前記記憶手段内が所定の定数である場合、前記暗号化手段による暗号化処理を正常終了せず、エラー処理を行なう制御手段と、
を具備したことを特徴とする携帯可能電子装置。
A portable electronic device having a memory for storing data and a control element for writing and reading data to and from the memory, and means for selectively inputting / outputting data to / from the outside In
Encryption means for performing encryption processing on data input from the outside or data output to the outside;
A process for temporarily storing processing data when performing encryption processing by the encryption means, and a storage means in which a predetermined constant is stored in advance as an initial value;
Confirmation means for confirming whether or not the inside of the storage means is a predetermined constant after the encryption processing by the encryption means is completed;
As a result of confirmation by the confirmation means, if the storage means is a predetermined constant, the control means for performing error processing without normally terminating the encryption processing by the encryption means;
A portable electronic device comprising:
データを記憶するためのメモリと、このメモリに対してデータの書込みおよびまたは読出しを行なう制御素子を有し、選択的に外部との間でデータの入出力を行なう手段を備えたICカードにおいて、
外部から入力されるデータあるいは外部へ出力するデータに対し暗号化処理を行なう暗号化手段と、この暗号化手段により暗号化処理を行なう際の処理データを一時的に保持するもので、初期値としてあらかじめ所定の定数が格納されている記憶手段と、前記暗号化手段による暗号化処理が終了した後、前記記憶手段内が所定の定数であるか否かを確認する確認手段と、この確認手段による確認の結果、前記記憶手段内が所定の定数である場合、前記暗号化手段による暗号化処理を正常終了せず、エラー処理を行なう制御手段とを有したICモジュールと、
このICモジュールを収納したICカード本体と、
を具備したことを特徴とするICカード。
In an IC card having a memory for storing data and a control element for writing and reading data to and from the memory, and having means for selectively inputting / outputting data to / from the outside,
Encryption means for performing encryption processing on data input from the outside or data output to the outside, and temporarily holding processing data when encryption processing is performed by this encryption means, as an initial value A storage means in which a predetermined constant is stored in advance, a confirmation means for confirming whether or not the inside of the storage means is a predetermined constant after the encryption processing by the encryption means is completed, and the confirmation means If the result of the confirmation is that the inside of the storage means is a predetermined constant, the IC module having a control means for performing error processing without normally completing the encryption processing by the encryption means;
An IC card body containing the IC module;
An IC card comprising:
JP2008065999A 2008-03-14 2008-03-14 Portable electronic device and IC card Active JP5112123B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008065999A JP5112123B2 (en) 2008-03-14 2008-03-14 Portable electronic device and IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008065999A JP5112123B2 (en) 2008-03-14 2008-03-14 Portable electronic device and IC card

Publications (2)

Publication Number Publication Date
JP2009223503A JP2009223503A (en) 2009-10-01
JP5112123B2 true JP5112123B2 (en) 2013-01-09

Family

ID=41240232

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008065999A Active JP5112123B2 (en) 2008-03-14 2008-03-14 Portable electronic device and IC card

Country Status (1)

Country Link
JP (1) JP5112123B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4127587B2 (en) * 1999-07-09 2008-07-30 株式会社東芝 Content management method, content management apparatus, and recording medium
JP2004326335A (en) * 2003-04-23 2004-11-18 Toshiba Corp Ic card and encryption processing system
JP4435593B2 (en) * 2004-02-04 2010-03-17 株式会社ルネサステクノロジ Tamper resistant information processing equipment
JP2006019872A (en) * 2004-06-30 2006-01-19 Sony Corp Encryption processing apparatus
JP2007004456A (en) * 2005-06-23 2007-01-11 Toshiba Corp Portable electronic device and data output device of portable electronic device
JP2007195132A (en) * 2005-12-20 2007-08-02 Sony Corp Encryption processing apparatus
JP2007323167A (en) * 2006-05-30 2007-12-13 Oki Electric Ind Co Ltd Method of testing memory

Also Published As

Publication number Publication date
JP2009223503A (en) 2009-10-01

Similar Documents

Publication Publication Date Title
JP2008243045A (en) Portable electronic apparatus and ic card
US20100131747A1 (en) Information processing system, information processing apparatus, information processing method, and storage medium
JP5112123B2 (en) Portable electronic device and IC card
EP2259488A1 (en) Encryption operation device, encryption operation program, and recording medium
JP2008109276A (en) Portable electronic device
JP4950730B2 (en) Portable electronic device, file access method and IC card in portable electronic device
JP4950533B2 (en) Portable electronic device and IC card
JP5459845B2 (en) Portable electronic device, method for controlling portable electronic device, and IC card
JP2008310596A (en) Portable electronic equipment and control method for potable electronic equipment
JP2008299416A (en) Portable electronic device, file access method in portable electronic device, and ic card
JP5444143B2 (en) Portable electronic device and IC card
JP2008134881A (en) Ic card issue system, issue module, program thereof, and issuing device
JP2005165493A (en) Shared computer, control program therefor and recording medium
JP5492172B2 (en) Portable electronic device, IC card and IC module
JP5269661B2 (en) Portable electronic device and method for controlling portable electronic device
JP4533665B2 (en) Portable electronic device
JP2012133656A (en) Portable electronic apparatus and ic card
JP2009134545A (en) Portable electronic device and ic card
JP4859574B2 (en) Security management apparatus and security management method
JP2005056259A (en) Portable electronic medium and portable electronic medium handling device
JP2017033492A (en) Information processing apparatus, information processing system, and control method of information processing apparatus
JP2006172005A (en) Portable electronic instrument
JP5038918B2 (en) Portable electronic device and method for controlling portable electronic device
JP2012138008A (en) Portable electronic device and ic card
JP2016081117A (en) Ic card, portable electronic device, and manufacturing method for ic card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120717

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120810

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

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

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

Free format text: PAYMENT UNTIL: 20151019

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5112123

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20151019

Year of fee payment: 3