JP2008109276A - Portable electronic device - Google Patents

Portable electronic device Download PDF

Info

Publication number
JP2008109276A
JP2008109276A JP2006288867A JP2006288867A JP2008109276A JP 2008109276 A JP2008109276 A JP 2008109276A JP 2006288867 A JP2006288867 A JP 2006288867A JP 2006288867 A JP2006288867 A JP 2006288867A JP 2008109276 A JP2008109276 A JP 2008109276A
Authority
JP
Japan
Prior art keywords
encryption
random number
encryption key
data
unit
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
Application number
JP2006288867A
Other languages
Japanese (ja)
Inventor
Atsushi Takahashi
厚志 高橋
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 JP2006288867A priority Critical patent/JP2008109276A/en
Publication of JP2008109276A publication Critical patent/JP2008109276A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a portable electronic device that prevents original data and encryption key from being estimated with high level security. <P>SOLUTION: Encryption key indexes are imparted to and stored in a plurality of encryption keys, and when data is written in a nonvolatile memory, a random number is generated, and on the basis of the generated random number, the encryption key index is specified and one encryption key corresponding to the specified encryption key index is selected from the plurality of the stored encryption keys. Data are encrypted using the selected encryption key and the encrypted data are written in the nonvolatile memory. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、例えば、制御素子、通信インターフェース、不揮発性メモリなどを有するICチップが内蔵されたICカードなどの携帯可能電子装置に関する。   The present invention relates to a portable electronic device such as an IC card in which an IC chip having a control element, a communication interface, a nonvolatile memory, and the like is incorporated.

一般的に、携帯可能電子装置としてのICカードは、プラスチックなどで形成されたカード状の筐体内にICチップが埋め込まれているものである。上記のようなICカードでは、電源が無い状態でもデータを保持することができるEEPROM(Electrically Erasable Programmable Read−Only Memory)、あるいはフラッシュROMなどの不揮発性メモリを有している。このようなICカードは、上記不揮発性メモリに種々のデータを記録する。近年では、不揮発性メモリの小型化等の技術が進歩し、ICカードには、記憶容量の大きい不揮発性メモリを設けることが可能となっている。これにより、ICカードでは、大量のデータを扱うことができることから、次世代のカードとして広く注目を集めている。   In general, an IC card as a portable electronic device is one in which an IC chip is embedded in a card-like casing made of plastic or the like. The IC card as described above has a nonvolatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash ROM that can hold data even when there is no power supply. Such an IC card records various data in the nonvolatile memory. In recent years, technology such as miniaturization of a nonvolatile memory has advanced, and it is possible to provide a nonvolatile memory having a large storage capacity in an IC card. As a result, the IC card can handle a large amount of data, and thus attracts widespread attention as a next-generation card.

たとえば、上記ICカードは、エレクトリック・パース(電子貨幣、電子マネー)、電子商取引(エレクトリック・コマース)、及び企業内部のプライベートセキュリティシステム(ドアセキュリティシステム、ネットワーク上のアクセス管理など)に用いられている。これらのような用途においては、セキュリティが極めて重要となる。従来のICカードには、不正利用を防止するため、不揮発性メモリにPIN(Personal Identification Number)、若しくは、鍵情報などの認証用の情報が記憶されるものがある。このような認証用の情報が悪意のある者により特定されてしまった場合、当該ICカードが不正使用される可能性があるという問題がある。そこで、ICカードの保持している暗号鍵を用いてデータの暗号化及び復号化を行い、書き込み及び読出しを実行するICカードシステムが提示されている(たとえば、特許文献1参照)。   For example, the IC card is used for electric parsing (electronic money, electronic money), electronic commerce (electric commerce), and private security systems (door security system, access management on a network, etc.) inside a company. . In such applications, security is extremely important. Some conventional IC cards store authentication information such as PIN (Personal Identification Number) or key information in a nonvolatile memory in order to prevent unauthorized use. When such authentication information is specified by a malicious person, there is a problem that the IC card may be illegally used. In view of this, an IC card system has been proposed in which data is encrypted and decrypted using an encryption key held by the IC card, and writing and reading are performed (see, for example, Patent Document 1).

しかしながら、上記した従来のICカードシステムでは、常に同一の暗号鍵がデータの暗号化及び復号化に用いられている。この場合、既知の暗号化前のデータ(元データ)と暗号化後のデータ(暗号化データ)の相関関係に着目することにより、暗号化データから未知の元データを解析することができる可能性があるという問題がある。また、暗号化処理の処理内容を解析して暗号鍵を推定することがされた場合、ICカードが容易に不正使用することが可能となってしまうという問題がある。
特開2005−122402号公報
However, in the conventional IC card system described above, the same encryption key is always used for data encryption and decryption. In this case, it is possible to analyze unknown original data from encrypted data by paying attention to the correlation between known data before encryption (original data) and data after encryption (encrypted data) There is a problem that there is. Further, when the encryption key is estimated by analyzing the processing content of the encryption process, there is a problem that the IC card can be used illegally easily.
JP-A-2005-122402

本発明の一形態では、上記のような問題点を解決するものであり、高レベルのセキュリティを有する携帯可能電子装置を提供することを目的とする。   An object of one embodiment of the present invention is to solve the above-described problems and to provide a portable electronic device having a high level of security.

本発明の一実施形態としての携帯可能電子装置は、複数の暗号鍵を記憶している記憶手段と、乱数を生成する乱数生成手段と、前記乱数生成手段により生成された乱数に基づいて前記記憶手段に記憶されている複数の暗号鍵から1つの暗号鍵を選択する選択手段と、前記選択手段により選択された暗号鍵を用いてデータを暗号化する暗号化手段と、前記暗号化手段により暗号化された暗号化データを記憶する不揮発性メモリとを有する。   A portable electronic device according to an embodiment of the present invention includes a storage unit that stores a plurality of encryption keys, a random number generation unit that generates a random number, and the storage based on the random number generated by the random number generation unit. Selection means for selecting one encryption key from a plurality of encryption keys stored in the means, encryption means for encrypting data using the encryption key selected by the selection means, and encryption by the encryption means And a non-volatile memory for storing the encrypted data.

本発明の一実施形態としての携帯可能電子装置は、複数の暗号鍵を記憶している記憶手段と、複数の異なる暗号方式による暗号化を行う複数の暗号処理部と、第1、及び第2の乱数を生成する乱数生成手段と、前記乱数生成手段により生成された第1の乱数に基づいて前記記憶手段に記憶されている複数の暗号鍵から1つの暗号鍵を選択する第1の選択手段と、前記乱数生成手段により生成された第2の乱数に基づいて前記複数の暗号処理部から1つの暗号処理部を選択する第2の選択手段と、前記第1の選択手段により選択された暗号鍵を用いて、前記第2の選択手段により選択された暗号処理部によりデータを暗号化する暗号化手段と、前記暗号化手段により暗号化された暗号化データを記憶する不揮発性メモリとを有する。   A portable electronic device according to an embodiment of the present invention includes a storage unit that stores a plurality of encryption keys, a plurality of encryption processing units that perform encryption using a plurality of different encryption methods, a first and a second Random number generating means for generating a random number, and first selecting means for selecting one encryption key from a plurality of encryption keys stored in the storage means based on the first random number generated by the random number generating means A second selection unit that selects one cryptographic processing unit from the plurality of cryptographic processing units based on the second random number generated by the random number generating unit, and the cipher selected by the first selection unit An encryption unit that encrypts data by the encryption processing unit selected by the second selection unit using a key; and a nonvolatile memory that stores the encrypted data encrypted by the encryption unit. .

この発明の一形態によれば、高レベルのセキュリティを有する携帯可能電子装置を提供することができる。   According to one embodiment of the present invention, a portable electronic device having a high level of security can be provided.

以下、この発明の実施の形態について図面を参照して説明する。
まず、第1の実施の形態について説明する。
図1は、本第1の実施の形態に係る携帯可能電子装置(ICカード)200との通信機能を有する外部装置としてのICカード処理装置100の構成例を概略的に示すブロック図である。
上記ICカード処理装置100は、端末装置110、ディスプレイ120、キーボード130、テンキー140、及び、カードリーダライタ150などを有している。
Embodiments of the present invention will be described below with reference to the drawings.
First, the first embodiment will be described.
FIG. 1 is a block diagram schematically showing a configuration example of an IC card processing device 100 as an external device having a communication function with a portable electronic device (IC card) 200 according to the first embodiment.
The IC card processing apparatus 100 includes a terminal device 110, a display 120, a keyboard 130, a numeric keypad 140, a card reader / writer 150, and the like.

上記端末装置110は、CPU、種々のメモリ及び各種インターフェースなどを有する装置により構成され、ICカード処理装置100全体の動作を制御するものである。上記端末装置110は、上記カードリーダライタ150によりICカード200へコマンドを送信する機能、ICカード200から受信したデータを基に種々の処理を行う機能などを有している。
たとえば、上記端末装置110は、カードリーダライタ150を介してICカード200にデータの書き込みコマンドを送信することによりICカード200内の不揮発性メモリにデータを書き込む。また、上記端末装置110は、ICカード200に読み取りコマンドを送信することによりICカード200からデータを読み出す。
The terminal device 110 is constituted by a device having a CPU, various memories, various interfaces, and the like, and controls the operation of the entire IC card processing device 100. The terminal device 110 has a function of transmitting a command to the IC card 200 by the card reader / writer 150, a function of performing various processes based on data received from the IC card 200, and the like.
For example, the terminal device 110 writes data to the nonvolatile memory in the IC card 200 by transmitting a data write command to the IC card 200 via the card reader / writer 150. The terminal device 110 reads data from the IC card 200 by transmitting a read command to the IC card 200.

上記ディスプレイ120は、上記端末装置110の制御により種々の情報を表示する表示装置である。上記キーボード130は、当該ICカード処理装置100の操作員が操作する操作部として機能し、操作員により種々の操作指示やデータなどが入力される。上記テンキー140は、数字を入力する為の入力部として機能する。
上記カードリーダライタ150は、上記ICカード200との通信を行うためのインターフェース装置である。上記カードリーダライタ150では、上記ICカード200に対する電源供給、クロック供給、リセット制御、データの送受信が行われるようになっている。このような機能によってカードリーダライタ150は、上記端末装置110による制御に基づいて上記ICカード200の活性化(起動)、種々のコマンドの送信、及び送信したコマンドに対する応答の受信などを行なう。
The display 120 is a display device that displays various information under the control of the terminal device 110. The keyboard 130 functions as an operation unit operated by an operator of the IC card processing apparatus 100, and various operation instructions and data are input by the operator. The numeric keypad 140 functions as an input unit for inputting numbers.
The card reader / writer 150 is an interface device for communicating with the IC card 200. The card reader / writer 150 performs power supply, clock supply, reset control, and data transmission / reception with respect to the IC card 200. With such a function, the card reader / writer 150 performs activation (activation) of the IC card 200, transmission of various commands, reception of responses to the transmitted commands, and the like based on control by the terminal device 110.

次に、上記ICカード200について説明する。
上記ICカード200は、上記ICカード処理装置100などの上位機器から電力などの供給を受けた際、活性化される(動作可能な状態になる)ようになっている。例えば、上記ICカード200が接触式通信によりICカード処理装置100と接続される場合、つまり、ICカード200が接触式のICカードで構成される場合、上記ICカード200は、通信インターフェースとしての通信インターフェース220を介してICカード処理装置100からの動作電源及び動作クロックの供給を受けて活性化される。
Next, the IC card 200 will be described.
The IC card 200 is activated (becomes operable) when supplied with power or the like from a host device such as the IC card processing apparatus 100. For example, when the IC card 200 is connected to the IC card processing apparatus 100 by contact communication, that is, when the IC card 200 is configured by a contact IC card, the IC card 200 is a communication as a communication interface. It is activated by receiving an operation power supply and an operation clock from the IC card processing apparatus 100 via the interface 220.

また、上記ICカード200が非接触式の通信方式によりICカード処理装置100と接続される場合、つまり、上記ICカード200が非接触式のICカードで構成される場合、上記ICカード200は、通信インターフェースとしてのアンテナ及び通信制御部などを介してICカード処理装置100からの電波を受信し、その電波から図示しない電源部により動作電源及び動作クロックを生成して活性化するようになっている。   Further, when the IC card 200 is connected to the IC card processing apparatus 100 by a non-contact communication method, that is, when the IC card 200 is configured by a non-contact IC card, the IC card 200 is A radio wave is received from the IC card processing apparatus 100 via an antenna as a communication interface and a communication control unit, and an operation power supply and an operation clock are generated from the radio wave by a power supply unit (not shown) and activated. .

次に、上記ICカード200の構成例について説明する。   Next, a configuration example of the IC card 200 will be described.

図2は、本第1の実施の形態に係るICカード200の構成例を概略的に示すブロック図である。上記ICカード200は、本体201を構成する筐体内にモジュール202が内蔵されている。上記モジュール202は、1つまたは複数のICチップ203と通信用の外部インターフェース(通信インターフェース)とが接続された状態で一体的に形成され、ICカード200の本体201内に埋設されている。また、上記ICカード200のモジュール202は、図2に示すように、制御部210、通信インターフェース220、ROM230、RAM240、不揮発性メモリ250、乱数生成部260、及び暗号復号部270を有してしている。   FIG. 2 is a block diagram schematically showing a configuration example of the IC card 200 according to the first embodiment. The IC card 200 has a module 202 built in a housing constituting the main body 201. The module 202 is integrally formed in a state where one or a plurality of IC chips 203 and a communication external interface (communication interface) are connected, and is embedded in the main body 201 of the IC card 200. The module 202 of the IC card 200 includes a control unit 210, a communication interface 220, a ROM 230, a RAM 240, a nonvolatile memory 250, a random number generation unit 260, and an encryption / decryption unit 270, as shown in FIG. ing.

上記制御部210は、当該ICカード200全体の制御を司るものである。上記制御部210は、上記ROM230あるいは上記不揮発性メモリ250に記憶されている制御プログラムや制御データに基づいて動作することにより、種々の処理手段として機能する。   The control unit 210 controls the entire IC card 200. The control unit 210 functions as various processing means by operating based on a control program and control data stored in the ROM 230 or the nonvolatile memory 250.

上記通信インターフェース220は、上記ICカード処理装置100のカードリーダライタ150との通信を行うためのインターフェースである。当該ICカード200が接触式のICカードとして実現される場合、通信インターフェース220は、上記ICカード処理装置100のカードリーダライタ150と接触して信号の送受信を行うための通信制御部と外部インターフェースとしてのコンタクト部とにより構成される。また、当該ICカード200が非接触式のICカードとして実現される場合、通信インターフェース220は、上記ICカード処理装置100のカードリーダライタ150との無線通信を行うための通信制御部と外部インターフェースとしてのアンテナとにより構成される。   The communication interface 220 is an interface for communicating with the card reader / writer 150 of the IC card processing apparatus 100. When the IC card 200 is realized as a contact type IC card, the communication interface 220 serves as an external interface and a communication control unit for transmitting and receiving signals in contact with the card reader / writer 150 of the IC card processing apparatus 100. And a contact portion. When the IC card 200 is realized as a non-contact type IC card, the communication interface 220 is an external interface and a communication control unit for performing wireless communication with the card reader / writer 150 of the IC card processing device 100. And an antenna.

上記ROM230は、予め制御用のプログラムや制御データなどが記憶されている不揮発性のメモリである。上記ROM230は、製造段階で制御プログラムや制御データなどが記憶された状態でICカード200内に組み込まれるものである。つまり、上記ROM230に記憶されている制御プログラムや制御データは、予め当該ICカード200の仕様に応じて組み込まれる。
上記RAM240は、ワーキングメモリとして機能する揮発性のメモリである。また、上記RAM240は、制御部210が処理中のデータなどを一時保管するバッファとしても機能する。例えば、上記RAM240は、上記通信インターフェース220を介してICカード処理装置100から受信したデータを一時保管するようになっている。
The ROM 230 is a non-volatile memory in which a control program and control data are stored in advance. The ROM 230 is incorporated in the IC card 200 in a state where a control program, control data, and the like are stored at the manufacturing stage. That is, the control program and control data stored in the ROM 230 are incorporated according to the specifications of the IC card 200 in advance.
The RAM 240 is a volatile memory that functions as a working memory. The RAM 240 also functions as a buffer for temporarily storing data being processed by the control unit 210. For example, the RAM 240 temporarily stores data received from the IC card processing apparatus 100 via the communication interface 220.

上記不揮発性メモリ250は、例えば、EEPROMあるいはフラッシュROMなどの、データの書き込み及び書換えが可能な不揮発性のメモリにより構成される。上記不揮発性メモリ250には、当該ICカード200の運用用途に応じて制御プログラムや種々のデータが書込まれる。たとえば、上記不揮発性メモリ250では、プログラムファイルやデータファイルなどが定義され、それらのファイルに制御プログラムや種々のデータが書き込まれる。
上記乱数生成部260は、乱数を生成するものである。上記乱数生成部260は、上記制御部210からの指示に応じて乱数を生成するようになっている。上記乱数生成部260は、たとえば、制御部210に乱数を生成させるためのプログラムにより構成するようにしても良い。
The non-volatile memory 250 is constituted by a non-volatile memory capable of writing and rewriting data, such as an EEPROM or a flash ROM. In the non-volatile memory 250, a control program and various data are written according to the operational use of the IC card 200. For example, in the nonvolatile memory 250, a program file, a data file, and the like are defined, and a control program and various data are written in these files.
The random number generator 260 generates random numbers. The random number generator 260 generates a random number in response to an instruction from the controller 210. The random number generation unit 260 may be configured by a program for causing the control unit 210 to generate a random number, for example.

ここでは、上記ROM230あるいは不揮発性メモリ250には、暗号化及び復号の処理に用いられる複数の暗号鍵情報(以下、単に、暗号鍵とも称する)を記憶しているものとする。各暗号鍵は、数字または文字列などにより構成される認証用の情報である。また、上記ROM230あるいは不揮発性メモリ250に記憶される複数の暗号鍵には、それぞれ、各暗号鍵を識別するための識別情報としての暗号鍵インデックスが付加されているものとする。なお、以下の説明では、ROM230に複数の暗号鍵が記憶されているものとする。   Here, it is assumed that the ROM 230 or the nonvolatile memory 250 stores a plurality of pieces of encryption key information (hereinafter also simply referred to as encryption keys) used for encryption and decryption processing. Each encryption key is authentication information composed of numbers or character strings. In addition, it is assumed that an encryption key index as identification information for identifying each encryption key is added to each of the plurality of encryption keys stored in the ROM 230 or the nonvolatile memory 250. In the following description, it is assumed that the ROM 230 stores a plurality of encryption keys.

また、上記制御部210では、上記乱数生成部260により生成された乱数に基づいて、暗号鍵を特定する機能を有している。すなわち、上記制御部210では、乱数に応じて暗号鍵インデックスを決定し、当該暗号鍵インデックスに対応する暗号鍵を判定するようになっている。   In addition, the control unit 210 has a function of specifying an encryption key based on the random number generated by the random number generation unit 260. That is, the control unit 210 determines an encryption key index according to a random number, and determines an encryption key corresponding to the encryption key index.

たとえば、ICカード処理装置100からのデータの書き込みコマンドを受信した場合、上記制御部210は、上記乱数生成部260により乱数Rを生成する。上記乱数生成部260により乱数Rを生成すると、上記制御部210は、当該乱数Rに応じて暗号鍵インデックスを決定する。当該乱数Rに応じた暗号鍵インデックスを決定すると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する。このように乱数Rに基づいて暗号鍵KRを特定すると、上記制御部210は、当該暗号鍵KRと上記書込みコマンドに応じて不揮発性メモリ250に書込むべきデータとを暗号復号部270へ供給する。これにより、上記暗号復号部270は、暗号鍵KRを用いて不揮発性メモリ250に書込むべきデータを暗号化する。この暗号化されたデータ(暗号化データ)が、上記不揮発性メモリ250に書込まれる。この際、不揮発性メモリ250には、当該暗号化データに対応づけて暗号鍵KRを特定するための乱数Rが記憶されるようになっている。   For example, when a data write command is received from the IC card processing apparatus 100, the control unit 210 generates a random number R using the random number generation unit 260. When the random number R is generated by the random number generator 260, the controller 210 determines an encryption key index according to the random number R. When the encryption key index corresponding to the random number R is determined, the control unit 210 specifies the encryption key KR corresponding to the encryption key index. When the encryption key KR is specified based on the random number R in this way, the control unit 210 supplies the encryption key KR and data to be written to the nonvolatile memory 250 according to the write command to the encryption / decryption unit 270. . Thereby, the encryption / decryption unit 270 encrypts data to be written in the nonvolatile memory 250 using the encryption key KR. The encrypted data (encrypted data) is written into the nonvolatile memory 250. At this time, the nonvolatile memory 250 stores a random number R for specifying the encryption key KR in association with the encrypted data.

また、読出しコマンドに応じて上記不揮発性メモリ250に記憶されている暗号化データを読み出す場合、上記制御部210は、当該暗号化データに対応する乱数Rが読み出し、当該乱数Rに対応する暗号鍵インデックスを特定する。暗号鍵インデックスが特定されると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する。暗号鍵KRが特定されると、上記制御部210は、暗号鍵KRと上記読出しコマンドに応じて読み出すべき暗号化データとを上記暗号復号部270に供給する。これにより、上記暗号復号部270では、当該暗号鍵KRを用いて暗号化データを復号化する。この復号化されたデータが、上記読出しコマンドに応じて外部へ出力されるデータとなる。   When reading the encrypted data stored in the nonvolatile memory 250 in response to the read command, the control unit 210 reads the random number R corresponding to the encrypted data, and the encryption key corresponding to the random number R is read. Identify the index. When the encryption key index is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index. When the encryption key KR is specified, the control unit 210 supplies the encryption key KR and encrypted data to be read according to the read command to the encryption / decryption unit 270. Thereby, the encryption / decryption unit 270 decrypts the encrypted data using the encryption key KR. The decrypted data becomes data output to the outside in response to the read command.

なお、上記不揮発性メモリ250に書込むデータの暗号化は、データのセットであるファイル毎、あるいは、不揮発性メモリ250における所定のアドレス毎で区切られる各ブロックに記憶するデータ毎に行うようにしても良い。これらの場合、上記制御部210は、データのセットであるファイル毎、あるいは、不揮発性メモリ250における所定のアドレス毎で区切られる各ブロックに記憶するデータ毎に、乱数Rを生成し、乱数Rに基づいて暗号鍵を設定するようになっている。   The data to be written into the non-volatile memory 250 is encrypted for each file stored as a data set or for each data stored in each block delimited by a predetermined address in the non-volatile memory 250. Also good. In these cases, the control unit 210 generates a random number R for each file that is a set of data, or for each data stored in each block that is delimited by a predetermined address in the nonvolatile memory 250, and generates the random number R. The encryption key is set based on this.

図3は、上記ROM230(あるいは不揮発性メモリ250)に記憶される複数の暗号鍵を示す図である。なお、図3に示す暗号鍵群231は、これらの複数の暗号鍵を模式的に示したものである。
図3に示すように、上記ROM230には、複数の暗号鍵(暗号鍵A、暗号鍵B、暗号鍵C、…)が暗号鍵インデックスに対応づけて記憶されている。図1に示す例では、暗号鍵A、暗号鍵B、暗号鍵C、…に対して、それぞれ「01」、「02」、「03」、…という暗号インデックスが対応づけて記憶されている。つまり、上記ROM230に記憶されている暗号鍵は、暗号インデックスにより特定されるようになっている。
FIG. 3 is a diagram showing a plurality of encryption keys stored in the ROM 230 (or the non-volatile memory 250). Note that the encryption key group 231 shown in FIG. 3 schematically shows a plurality of these encryption keys.
As shown in FIG. 3, the ROM 230 stores a plurality of encryption keys (encryption key A, encryption key B, encryption key C,...) In association with encryption key indexes. In the example shown in FIG. 1, encryption indexes of “01”, “02”, “03”,... Are stored in association with encryption key A, encryption key B, encryption key C,. That is, the encryption key stored in the ROM 230 is specified by the encryption index.

次に、上記ICカード200に用いられる不揮発性メモリ250に記憶されるデータの構成について説明する。
図4は、上記不揮発性メモリ250に記憶されるデータの構成例を示す図である。
図4に示す例では、上記不揮発性メモリ250には、各データ252が暗号鍵のインデックスデータ251に対応づけて記憶されている。
上記各暗号鍵のインデックスデータ251は、対応する各データを暗号化するために用いられた暗号鍵を特定するための情報である。つまり、上記各暗号鍵のインデックスデータ251としては、ROM230に記憶されている暗号鍵を特定するための乱数Rあるいは暗号鍵インデックスである。従って、上記制御部210は、暗号鍵のインデックスデータ251により対応するデータを暗号化するために用いられた暗号鍵を特定することができるようになっている。また、各暗号鍵のインデックスデータ251は、たとえば、1つのデータのセットである1ファイル毎のデータ、あるいは、所定のアドレス毎に区切られる上記不揮発性メモリ上の各ブロック毎のデータに対して設定されている。なお、図4に示す例では、各ファイル毎のデータ252に対して暗号鍵のインデックスデータ251が設定されているものとする。
Next, the configuration of data stored in the nonvolatile memory 250 used in the IC card 200 will be described.
FIG. 4 is a diagram illustrating a configuration example of data stored in the non-volatile memory 250.
In the example shown in FIG. 4, each data 252 is stored in the nonvolatile memory 250 in association with the index data 251 of the encryption key.
The index data 251 of each encryption key is information for specifying the encryption key used for encrypting each corresponding data. That is, the index data 251 for each encryption key is a random number R or an encryption key index for specifying the encryption key stored in the ROM 230. Therefore, the control unit 210 can specify the encryption key used for encrypting the corresponding data by the index data 251 of the encryption key. Also, the index data 251 for each encryption key is set for, for example, data for each file that is a set of data, or data for each block on the non-volatile memory divided for each predetermined address. Has been. In the example shown in FIG. 4, it is assumed that the index data 251 of the encryption key is set for the data 252 for each file.

また、図4に示す例では、各暗号鍵のインデックスデータ251に対応するデータ252として、複数の管理データのファイルと複数のアプリケーションデータのファイルとが記憶されている状態を示している。これらの各データ252は、それぞれ対応する暗号鍵のインデックスデータ251により特定される暗号鍵で暗号化された状態となっている。従って、各データ252を読み出すためには、対応する暗号鍵のインデックスデータ251により特定される暗号鍵で復号化することが必要となる。   The example shown in FIG. 4 shows a state where a plurality of management data files and a plurality of application data files are stored as data 252 corresponding to the index data 251 of each encryption key. Each of these data 252 is encrypted with the encryption key specified by the index data 251 of the corresponding encryption key. Therefore, in order to read each data 252, it is necessary to decrypt with the encryption key specified by the index data 251 of the corresponding encryption key.

なお、上記管理データは、アプリケーションデータにアクセスする為の情報であり、アプリケーションデータと対になって構成されている。各管理データは、たとえば、対応するアプリケーションデータのアドレス、およびバイト数を示す情報などで構成される。各アプリケーションデータは、プログラムファイルやプログラムで使用されるデータファイルなどである。   The management data is information for accessing the application data, and is configured in pairs with the application data. Each management data includes, for example, the address of the corresponding application data and information indicating the number of bytes. Each application data is a program file or a data file used in the program.

次に、上記のように構成されるICカード200におけるデータ書込み処理について説明する。
図5は、上記ICカード200におけるデータ書き込みコマンドに対する動作例を説明するためのフローチャートである。
まず、上記ICカード処理装置100からの電源供給、動作クロック信号およびリセット信号等を受けて、上記ICカード200が活性化された状態であるものとする。この状態において、上記ICカード処理装置100からデータ書き込みコマンドと書き込むべきデータ(元データ)がICカード200へ送信されたものとする。
Next, a data writing process in the IC card 200 configured as described above will be described.
FIG. 5 is a flowchart for explaining an operation example for the data write command in the IC card 200.
First, it is assumed that the IC card 200 is activated in response to power supply from the IC card processing apparatus 100, an operation clock signal, a reset signal, and the like. In this state, it is assumed that a data write command and data to be written (original data) are transmitted from the IC card processing apparatus 100 to the IC card 200.

上記ICカード200では、ICカード処理装置100からのデータ書き込みコマンドと元データを通信インターフェース220により受信する。すると、上記ICカード200の制御部210は、元データのファイル毎に乱数を生成するように乱数生成部260へ指示を出す(ステップS11)。乱数生成部260は、上記制御部210からの指示に基いて乱数Rを生成し、制御部210へ送信する(ステップS12)。   In the IC card 200, the communication interface 220 receives the data write command and the original data from the IC card processing apparatus 100. Then, the control unit 210 of the IC card 200 instructs the random number generation unit 260 to generate a random number for each original data file (step S11). The random number generation unit 260 generates a random number R based on the instruction from the control unit 210 and transmits the random number R to the control unit 210 (step S12).

上記乱数生成部260から乱数Rを受信すると、上記制御部210は、受信した乱数Rを暗号鍵インデックスとして用いられている桁数に変換することにより、乱数Rに応じた暗号鍵インデックスを特定する。上記乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する(ステップS13)。乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、特定した暗号鍵インデックスに対応する暗号鍵KRをROM230から読み込む(ステップS14)。これにより、上記制御部210では、乱数生成部260により生成された乱数Rに応じた暗号鍵KRを取得することとなる。   When the random number R is received from the random number generator 260, the controller 210 identifies the encryption key index corresponding to the random number R by converting the received random number R into the number of digits used as the encryption key index. . When the encryption key index corresponding to the random number R is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index (step S13). When the encryption key index corresponding to the random number R is specified, the control unit 210 reads the encryption key KR corresponding to the specified encryption key index from the ROM 230 (step S14). As a result, the control unit 210 acquires the encryption key KR corresponding to the random number R generated by the random number generation unit 260.

上記乱数Rに基づいて暗号鍵KRを取得すると、上記制御部210は、取得した暗号鍵KRと元データとを暗号復号部270へ送信し、暗号化を行なうように暗号復号部270へ指示する。上記制御部210から暗号化の要求を受けた暗号復号部270は、指定された暗号鍵KRと所定の暗号方式とを用いて、元データを暗号化する(ステップS15)。上記暗号復号部270により暗号化されたデータ(暗号化データ)は、上記制御部210の制御によりデータ252として不揮発性メモリ250に書き込まれる(ステップS16)。上記不揮発性メモリ250に暗号化データ252を書込むと、上記制御部210は、さらに、当該暗号化データ252の暗号化に用いた暗号鍵KRを選択するために用いた乱数Rあるいは暗号鍵インデックスを、当該暗号化データ252の暗号鍵のインデックスデータ251として、不揮発性メモリ250に書き込み(ステップS17)、処理を終了する。   When the encryption key KR is acquired based on the random number R, the control unit 210 transmits the acquired encryption key KR and original data to the encryption / decryption unit 270 and instructs the encryption / decryption unit 270 to perform encryption. . The encryption / decryption unit 270 that has received the encryption request from the control unit 210 encrypts the original data using the designated encryption key KR and a predetermined encryption method (step S15). The data (encrypted data) encrypted by the encryption / decryption unit 270 is written in the nonvolatile memory 250 as data 252 under the control of the control unit 210 (step S16). When the encrypted data 252 is written into the nonvolatile memory 250, the control unit 210 further selects a random number R or an encryption key index used for selecting the encryption key KR used for encrypting the encrypted data 252. Is written in the nonvolatile memory 250 as the encryption key index data 251 of the encrypted data 252 (step S17), and the process is terminated.

上記のように、第1の実施の形態のデータ書込処理では、制御部210は、乱数Rに応じて暗号鍵インデックスを特定し、上記暗号鍵インデックスに対応する暗号鍵KRをROM230より取得する。暗号復号部270は、暗号鍵KRを用いて、所定の暗号方式によりデータを暗号化する。さらに、制御部210は、上記暗号復号部270により暗号鍵KRを用いて暗号したデータと当該暗号鍵KRを特定するための乱数あるいは乱数から特定された暗号鍵インデックスとを対応づけて不揮発性メモリ250に記憶する。
このようなデータの書込処理によれば、不揮発性メモリに記憶するデータを暗号化するために用いる暗号鍵を乱数に基づいて選択する為、元データおよび暗号鍵の推定を困難にすることができる。この結果として、上記したデータ書込み処理によれば、高レベルのセキュリティを有する携帯可能電子装置を提供することができる。
As described above, in the data writing process according to the first embodiment, the control unit 210 specifies the encryption key index according to the random number R and acquires the encryption key KR corresponding to the encryption key index from the ROM 230. . The encryption / decryption unit 270 encrypts the data by a predetermined encryption method using the encryption key KR. Further, the control unit 210 associates the data encrypted by the encryption / decryption unit 270 with the encryption key KR and a random number for specifying the encryption key KR or an encryption key index specified from the random number, into a nonvolatile memory. 250.
According to such data writing processing, since the encryption key used for encrypting the data stored in the nonvolatile memory is selected based on the random number, it is difficult to estimate the original data and the encryption key. it can. As a result, according to the data writing process described above, a portable electronic device having a high level of security can be provided.

次に、上記ICカード200におけるデータの読出し処理について説明する。
図6は、上記ICカード200におけるデータ読み出しコマンドに対する動作例を説明するためのフローチャートである。
まず、上記ICカード処理装置100からの電源供給、動作クロック信号およびリセット信号等を受けて上記ICカード200が活性化された状態であるものとする。この状態において、上記ICカード処理装置100からデータ読み出しコマンドが上記ICカード200へ送信されたものとする。この読み出しコマンドでは、読み出すべきデータ(暗号化データ)の先頭アドレスおよびデータ長などが指定されているものとする。
Next, data read processing in the IC card 200 will be described.
FIG. 6 is a flowchart for explaining an operation example for the data read command in the IC card 200.
First, it is assumed that the IC card 200 is activated in response to power supply from the IC card processing apparatus 100, an operation clock signal, a reset signal, and the like. In this state, it is assumed that a data read command is transmitted from the IC card processing apparatus 100 to the IC card 200. In this read command, it is assumed that the head address and data length of data to be read (encrypted data) are specified.

上記ICカード200では、上記ICカード処理装置100からのデータ読み出しコマンドを上記通信インターフェース220により受信する。すると、上記ICカード200の制御部210は、当該読み出しコマンドで指定されている先頭アドレスとデータ長とに基いて、上記不揮発性メモリ250に記憶されている暗号化データにアクセスする(ステップS21)。上記制御部210は、アクセスした暗号化データの暗号鍵のインデックスデータ251から乱数Rを読み出す(ステップS22)。   In the IC card 200, the communication interface 220 receives a data read command from the IC card processing device 100. Then, the control unit 210 of the IC card 200 accesses the encrypted data stored in the nonvolatile memory 250 based on the head address and the data length specified by the read command (step S21). . The control unit 210 reads the random number R from the index data 251 of the encryption key of the accessed encrypted data (step S22).

上記暗号鍵のインデックスデータ251から乱数Rを読み出すと、上記制御部210は、読み出した乱数Rを暗号鍵インデックスとして用いられている桁数に変換することにより、乱数Rに応じた暗号鍵インデックスを特定する。上記乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する(ステップS23)。乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、特定した暗号鍵インデックスに対応する暗号鍵KRをROM230から読み込む(ステップS24)。これにより、上記制御部210では、乱数生成部260により生成された乱数Rに応じた暗号鍵KRを取得することとなる。   When the random number R is read from the encryption key index data 251, the control unit 210 converts the read random number R into the number of digits used as the encryption key index, thereby obtaining the encryption key index corresponding to the random number R. Identify. When the encryption key index corresponding to the random number R is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index (step S23). When the encryption key index corresponding to the random number R is specified, the control unit 210 reads the encryption key KR corresponding to the specified encryption key index from the ROM 230 (step S24). As a result, the control unit 210 acquires the encryption key KR corresponding to the random number R generated by the random number generation unit 260.

上記乱数Rに基づいて暗号鍵KRを取得すると、上記制御部210は、上記不揮発性メモリ250から暗号化データを読み出す(ステップS25)。暗号化データを読み出すと、上記制御部210は、取得した暗号鍵KRと読み出した暗号化データとを暗号復号部270へ送信し、復号化を行なうように指示する。上記制御部210から復号化の要求を受けた暗号復号部270は、指定された暗号鍵KRと所定の暗号方式とを用いて、暗号化データを復号化する(ステップS26)。上記暗号復号部270により復号化されたデータ(元データ)は、上記制御部210の制御により通信インターフェース220を介し、上記ICカード処理装置100へ送信され(ステップS27)、処理を終了する。   When the encryption key KR is acquired based on the random number R, the control unit 210 reads the encrypted data from the nonvolatile memory 250 (step S25). When the encrypted data is read, the control unit 210 transmits the acquired encryption key KR and the read encrypted data to the encryption / decryption unit 270 and instructs to perform the decryption. The encryption / decryption unit 270 that has received the decryption request from the control unit 210 decrypts the encrypted data using the designated encryption key KR and a predetermined encryption method (step S26). The data (original data) decrypted by the encryption / decryption unit 270 is transmitted to the IC card processing device 100 via the communication interface 220 under the control of the control unit 210 (step S27), and the process is terminated.

上記のように、第1の実施の形態のデータ読出処理では、制御部210は、暗号化データ252の暗号鍵のインデックスデータ251から乱数Rを読み出し、乱数Rに応じて暗号鍵インデックスを特定し、上記暗号鍵インデックスに対応する暗号鍵KRをROM230より取得する。暗号復号部270は、暗号鍵KRを用いて、所定の暗号方式によりデータを復号化する。さらに、制御部210は、復号化されたデータを通信インターフェースを介して読み出しコマンドの送信元に出力する。
このようなデータ読出処理によれば、暗号化されて不揮発性メモリに記憶されている暗号化データを復号化するのに用いる暗号鍵を当該暗号化データに対応づけて記憶されている乱数に基づいて選択する構成となっている為、元データ及び暗号鍵の推定を困難にすることができる。この結果として、上記したデータ読出処理によれば、高レベルのセキュリティを有する携帯可能電子装置を提供することができる。
As described above, in the data read process according to the first embodiment, the control unit 210 reads the random number R from the encryption key index data 251 of the encrypted data 252 and specifies the encryption key index according to the random number R. The encryption key KR corresponding to the encryption key index is acquired from the ROM 230. The encryption / decryption unit 270 uses the encryption key KR to decrypt the data using a predetermined encryption method. Furthermore, the control unit 210 outputs the decrypted data to the transmission source of the read command via the communication interface.
According to such a data reading process, an encryption key used to decrypt encrypted data stored in the nonvolatile memory is based on a random number stored in association with the encrypted data. Therefore, the estimation of the original data and the encryption key can be made difficult. As a result, according to the data reading process described above, a portable electronic device having a high level of security can be provided.

次に、第2の実施の形態にについて説明する。
図7は、本第2の実施の形態に係るICカード300の構成例を概略的に示すブロック図である。なお、図7に示すICカード300は、たとえば、図1に示すようなICカードシステムに用いられるものとする。また、ICカード300については、図7に示すように、図2に示すICカード200と同一の部分には同一の参照符号を付し、詳細な説明は省略する。
上記ICカード300は、図2に示すICカード200と比較すると、暗号復号部270に替えて暗号復号部370が設けられている。上記暗号復号部370では、種々の暗号方式による暗号化および復号化を行う機能を有している。また、上記暗号復号部370では、種々の暗号方式による暗号化および復号化を各暗号鍵によって行うようになっている。なお、本第2の実施の形態では、説明を簡単化するため、上記暗号復号部370が実現する種々の暗号方式は、DES方式、AES方式などの共通鍵暗号方式であることを想定している。
Next, a second embodiment will be described.
FIG. 7 is a block diagram schematically showing a configuration example of the IC card 300 according to the second embodiment. It is assumed that the IC card 300 shown in FIG. 7 is used in an IC card system as shown in FIG. As for the IC card 300, as shown in FIG. 7, the same parts as those of the IC card 200 shown in FIG.
Compared with the IC card 200 shown in FIG. 2, the IC card 300 includes an encryption / decryption unit 370 instead of the encryption / decryption unit 270. The encryption / decryption unit 370 has a function of performing encryption and decryption by various encryption methods. The encryption / decryption unit 370 performs encryption and decryption using various encryption methods using each encryption key. In the second embodiment, to simplify the description, it is assumed that the various encryption methods realized by the encryption / decryption unit 370 are common key encryption methods such as the DES method and the AES method. Yes.

図8は、上記暗号復号部370の構成例を示す図である。
図8に示すように、上記ICカード300の暗号復号部370は、さらに、暗号化及び復号化の方式である複数の異なる暗号方式による処理を行うための複数の暗号処理部371(371a、371b、371c、…)と、鍵適合化部372とを有している。暗号方式Aの暗号処理部371a、暗号方式Bの暗号処理部371b、暗号方式Cの暗号処理部371c、…には、それぞれ暗号方式インデックスが付加されている。上記暗号方式インデックスは、暗号方式を特定するための識別情報である。
FIG. 8 is a diagram illustrating a configuration example of the encryption / decryption unit 370.
As shown in FIG. 8, the encryption / decryption unit 370 of the IC card 300 further includes a plurality of encryption processing units 371 (371a, 371b) for performing processing by a plurality of different encryption methods which are encryption and decryption methods. , 371c,...) And a key adapting unit 372. An encryption method index is added to the encryption processing unit 371a of the encryption method A, the encryption processing unit 371b of the encryption method B, the encryption processing unit 371c of the encryption method C,. The encryption method index is identification information for specifying the encryption method.

また、各暗号処理部371の各暗号方式は、その種類によって必要とする暗号鍵のビット数が異なることがある。そこで、鍵適合化部372は、暗号鍵のビット数を、使用する暗号方式の暗号鍵に適するビット数に変換するようになっている。なお、本第2の実施形態では、各暗号鍵は、各暗号方式で用いる暗号鍵の中で最長のビット数を有するものとする。つまり、各暗号鍵は、上記鍵適合化部372により各暗号方式で使用可能な暗号鍵に変換されるようになっている。   In addition, each encryption method of each encryption processing unit 371 may require a different number of bits of the encryption key depending on the type. Therefore, the key adapting unit 372 converts the number of bits of the encryption key into the number of bits suitable for the encryption key of the encryption method to be used. In the second embodiment, each encryption key has the longest number of bits among the encryption keys used in each encryption method. That is, each encryption key is converted into an encryption key that can be used in each encryption method by the key matching unit 372.

また、上記ICカード300の制御部210では、上記第1の実施の形態と同様に、上記乱数生成部260により生成された乱数Rに基づいて暗号鍵を特定する機能を有している。さらに、上記ICカード300の制御部210では、上記乱数生成部260により生成された乱数rに基づいて暗号方式を特定する機能を有している。すなわち、上記ICカード300の制御部210では、乱数Rに応じて暗号鍵インデックスを決定することにより暗号鍵を特定するとともに、乱数rに応じて暗号方式インデックスを決定することにより暗号方式を特定するようになっている。   Further, the control unit 210 of the IC card 300 has a function of specifying an encryption key based on the random number R generated by the random number generation unit 260, as in the first embodiment. Further, the control unit 210 of the IC card 300 has a function of specifying an encryption method based on the random number r generated by the random number generation unit 260. That is, the control unit 210 of the IC card 300 specifies the encryption key by determining the encryption key index according to the random number R, and specifies the encryption method by determining the encryption system index according to the random number r. It is like that.

たとえば、ICカード処理装置100からのデータの書き込みコマンドを受信した場合、上記制御部210は、上記乱数生成部260により乱数Rと乱数rとを生成する。すると、上記制御部210は、上記乱数Rに応じて暗号鍵インデックスを決定するとともに、上記乱数rに応じて暗号方式インデックスを決定する。暗号鍵インデックスを決定すると、上記制御部210は、上記暗号鍵インデックスに対応する暗号鍵KRを特定する。暗号鍵KRを特定すると、上記制御部210は、上記暗号鍵KRと暗号方式インデックスと上記書込みコマンドに応じて不揮発性メモリ250に書込むべきデータとを暗号復号部370へ供給する。これにより、上記暗号復号部370は、暗号方式インデックスに応じて暗号方式(暗号処理部)を選択し、鍵適合化部372により暗号鍵KRのビット数を選択した暗号方式に応じたビット数に変換し、その後、選択した暗号方式の暗号処理部371により上記暗号鍵KRを用いて不揮発性メモリ250に書込むべきデータを暗号化する。この暗号化されたデータ(暗号化データ)が、上記不揮発性メモリ250に書込まれる。この際、不揮発性メモリ250には、暗号鍵KRを特定するための乱数Rおよび暗号方式CALCrを特定するための乱数rとが当該暗号化データに対応づけて記憶されるようになっている。   For example, when receiving a data write command from the IC card processing apparatus 100, the control unit 210 generates a random number R and a random number r by using the random number generation unit 260. Then, the control unit 210 determines an encryption key index according to the random number R and determines an encryption method index according to the random number r. When the encryption key index is determined, the control unit 210 specifies the encryption key KR corresponding to the encryption key index. When the encryption key KR is specified, the control unit 210 supplies the encryption key KR, the encryption method index, and data to be written to the nonvolatile memory 250 according to the write command to the encryption / decryption unit 370. As a result, the encryption / decryption unit 370 selects an encryption method (encryption processing unit) according to the encryption method index, and sets the number of bits of the encryption key KR to the number of bits according to the encryption method selected by the key adaptation unit 372. After that, the encryption processing unit 371 of the selected encryption method encrypts the data to be written in the nonvolatile memory 250 using the encryption key KR. The encrypted data (encrypted data) is written into the nonvolatile memory 250. At this time, the nonvolatile memory 250 stores a random number R for specifying the encryption key KR and a random number r for specifying the encryption method CALCr in association with the encrypted data.

また、上記不揮発性メモリ250に記憶されている暗号化データを読出しコマンドに応じて読み出す場合、上記ICカード300の制御部210は、当該暗号化データに対応する乱数Rおよび乱数rを読み出し、乱数Rに対応する暗号鍵インデックスおよび乱数rに対応する暗号方式インデックスとを特定する。暗号鍵インデックスを特定すると、上記制御部210は、暗号鍵インデックスに応じた暗号鍵KRを特定する。暗号鍵KRが特定されると、上記制御部210は、上記暗号鍵KRと暗号方式インデックスと上記読出しコマンドに応じて不揮発性メモリ250から読み出すべきデータ(暗号化データ)とを暗号復号部370へ供給する。これにより、上記暗号復号部370は、暗号方式インデックスに応じて暗号方式(暗号処理部)を選択し、鍵適合化部372により暗号鍵KRのビット数を選択した暗号方式に応じたビット数に変換し、その後、選択した暗号処理部371により上記暗号鍵KRを用いて不揮発性メモリ250から読み出すべき暗号化データを復号化する。この復号化されたデータが、上記読出しコマンドに応じて外部へ出力すべきデータである。   When the encrypted data stored in the nonvolatile memory 250 is read in response to a read command, the control unit 210 of the IC card 300 reads the random number R and the random number r corresponding to the encrypted data, The encryption key index corresponding to R and the encryption method index corresponding to the random number r are specified. When the encryption key index is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index. When the encryption key KR is specified, the control unit 210 sends the encryption key KR, the encryption method index, and the data (encrypted data) to be read from the nonvolatile memory 250 according to the read command to the encryption / decryption unit 370. Supply. As a result, the encryption / decryption unit 370 selects an encryption method (encryption processing unit) according to the encryption method index, and sets the number of bits of the encryption key KR to the number of bits according to the encryption method selected by the key adaptation unit 372. After that, the selected encryption processor 371 decrypts the encrypted data to be read from the nonvolatile memory 250 using the encryption key KR. This decoded data is data to be output to the outside in response to the read command.

なお、上記不揮発性メモリ250に書込むデータの暗号化は、データのセットであるファイル毎、あるいは、不揮発性メモリ250における所定のアドレス毎で区切られる各ブロックに記憶するデータ毎に行うようにしても良い。これらの場合、上記制御部210は、データのセットであるファイル毎、あるいは、不揮発性メモリ250における所定のアドレス毎で区切られる各ブロックに記憶するデータ毎に、乱数R及び乱数rを生成し、乱数Rに基づいて暗号鍵を設定するとともに、乱数rに応じて暗号方式を設定するようになっている。   The data to be written into the non-volatile memory 250 is encrypted for each file stored as a data set or for each data stored in each block delimited by a predetermined address in the non-volatile memory 250. Also good. In these cases, the control unit 210 generates a random number R and a random number r for each file stored in each block, which is a set of data or for each block delimited by a predetermined address in the nonvolatile memory 250, An encryption key is set based on the random number R, and an encryption method is set according to the random number r.

次に、上記ICカード300の不揮発性メモリ250に記憶されるデータの構成について説明する。
図9は、上記ICカード300の不揮発性メモリ250に記憶されるデータの構成例を示す図である。
図9に示す例では、上記不揮発性メモリ250には、各データ252が暗号鍵のインデックスデータ251と暗号方式のインデックスデータ253とに対応づけて記憶されている。
上記各暗号鍵のインデックスデータ251は、上記第1の実施形態で説明したように、対応するデータ252を暗号化するために用いられた暗号鍵を特定するための識別情報である。上記制御部210は、暗号鍵のインデックスデータ251により対応するデータを暗号化するために用いられた暗号鍵を特定することができるようになっている。また、上記暗号方式のインデックスデータ253は、対応するデータ252を暗号化するための暗号方式を特定するための識別情報である。上記制御部210は、暗号方式のインデックスデータ253により対応するデータを暗号化するために用いた暗号方式を特定することができるようになっている。
Next, the configuration of data stored in the nonvolatile memory 250 of the IC card 300 will be described.
FIG. 9 is a diagram showing a configuration example of data stored in the nonvolatile memory 250 of the IC card 300. As shown in FIG.
In the example shown in FIG. 9, each piece of data 252 is stored in the nonvolatile memory 250 in association with encryption key index data 251 and encryption method index data 253.
The index data 251 of each encryption key is identification information for specifying the encryption key used for encrypting the corresponding data 252 as described in the first embodiment. The control unit 210 can specify the encryption key used for encrypting the corresponding data using the encryption key index data 251. The index data 253 of the encryption method is identification information for specifying an encryption method for encrypting the corresponding data 252. The control unit 210 can specify the encryption method used for encrypting the corresponding data using the index data 253 of the encryption method.

すなわち、図9に示すような構成の各データ252は、暗号鍵のインデックスデータ251で暗号鍵が特定され、暗号方式のインデックスデータ253で暗号方式が特定されることができるようになっている。   That is, the data 252 having the configuration as shown in FIG. 9 can specify the encryption key by the encryption key index data 251 and the encryption method by the encryption method index data 253.

また、各データ252としては、たとえば、上記第1の実施の形態と同様に、1つのデータのセットである1ファイル毎のデータ、あるいは、所定のアドレス毎に区切られる上記不揮発性メモリ上の各ブロック毎のデータであることを想定している。つまり、1ファイル毎のデータ252、あるいは、所定のアドレス毎に区切られる各ブロック毎のデータ252には、暗号鍵のインデックスデータ251と暗号方式のインデックスデータ253とが設定されている。なお、図9に示す例では、各ファイル毎のデータ252に対して暗号鍵のインデックスデータ251と暗号方式のインデックスデータ253が設定されているものとする。   Further, as each data 252, for example, as in the first embodiment, data for each file that is a set of data, or each data on the nonvolatile memory divided for each predetermined address. It is assumed that the data is for each block. That is, the encryption key index data 251 and the encryption method index data 253 are set in the data 252 for each file or the data 252 for each block divided for each predetermined address. In the example shown in FIG. 9, it is assumed that index data 251 for the encryption key and index data 253 for the encryption method are set for the data 252 for each file.

次に、上記ICカード300におけるデータ書込み処理について説明する。
図10は、上記ICカード300におけるデータ書き込みコマンドに対する動作例を説明するためのフローチャートである。
まず、上記ICカード処理装置100からの電源供給、動作クロック信号およびリセット信号等を受けて、上記ICカード300が活性化された状態であるものとする。この状態において、上記ICカード処理装置100からデータ書き込みコマンドと書き込むべきデータ(元データ)がICカード300へ送信されたものとする。
Next, a data writing process in the IC card 300 will be described.
FIG. 10 is a flowchart for explaining an operation example for the data write command in the IC card 300.
First, it is assumed that the IC card 300 is activated in response to power supply, an operation clock signal, a reset signal, and the like from the IC card processing apparatus 100. In this state, it is assumed that a data write command and data to be written (original data) are transmitted from the IC card processing apparatus 100 to the IC card 300.

上記ICカード300では、ICカード処理装置100からのデータ書き込みコマンドと元データを通信インターフェース220により受信する。すると、上記ICカード300の制御部210は、元データのファイル毎に乱数を生成するように乱数生成部260へ指示を出す(ステップS31)。乱数生成部260は、上記制御部210からの指示に基いて乱数Rを生成し、制御部210へ送信する(ステップS32)。   In the IC card 300, the communication interface 220 receives the data write command and the original data from the IC card processing apparatus 100. Then, the control unit 210 of the IC card 300 instructs the random number generation unit 260 to generate a random number for each original data file (step S31). The random number generation unit 260 generates a random number R based on the instruction from the control unit 210 and transmits it to the control unit 210 (step S32).

上記乱数生成部260から乱数Rを受信すると、上記制御部210は、受信した乱数Rを暗号鍵インデックスとして用いられている桁数に変換することにより、乱数Rに応じた暗号鍵インデックスを特定する。上記乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する(ステップS33)。乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、特定した暗号鍵インデックスに対応する暗号鍵KRをROM230から読み込む(ステップS34)。これにより、上記制御部210では、乱数生成部260により生成された乱数Rに応じた暗号鍵を取得することとなる。   When the random number R is received from the random number generator 260, the controller 210 identifies the encryption key index corresponding to the random number R by converting the received random number R into the number of digits used as the encryption key index. . When the encryption key index corresponding to the random number R is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index (step S33). When the encryption key index corresponding to the random number R is specified, the control unit 210 reads the encryption key KR corresponding to the specified encryption key index from the ROM 230 (step S34). Thereby, the control unit 210 acquires an encryption key corresponding to the random number R generated by the random number generation unit 260.

次に、乱数生成部260は、上記制御部210からの指示に基いて乱数rを生成し、制御部210へ送信する(ステップS35)。上記乱数生成部260から乱数rを受信すると、上記制御部210は、受信した乱数rを暗号方式インデックスとして用いられている桁数に変換することにより、乱数rに応じた暗号方式インデックスを特定する(ステップS36)。上記乱数rに基づいて暗号方式インデックスを特定すると、上記制御部210は、取得した暗号鍵KRと元データと特定した暗号方式インデックスを上記暗号復号部370へ送信し、暗号化を行なうように上記暗号復号部370へ指示する。   Next, the random number generation unit 260 generates a random number r based on the instruction from the control unit 210 and transmits the random number r to the control unit 210 (step S35). When receiving the random number r from the random number generation unit 260, the control unit 210 converts the received random number r into the number of digits used as the encryption method index, thereby specifying the encryption method index corresponding to the random number r. (Step S36). When the encryption method index is specified based on the random number r, the control unit 210 transmits the acquired encryption key KR, the original data, and the specified encryption method index to the encryption / decryption unit 370 and performs the encryption so as to perform encryption. It instructs the encryption / decryption unit 370.

上記暗号復号部370は、受信した暗号方式インデックスに応じて暗号処理部371を選択する。上記暗号処理部371を選択すると、鍵適合化部372は、選択した上記暗号処理部371の暗号鍵に適するビット数に変換し、暗号鍵の適合化を行う(ステップS37)。暗号鍵の適合化を行うと、上記暗号復号部370は、適合化した暗号鍵KRと選択した上記暗号処理部371とを用いて、元データを暗号化する(ステップS38)。上記暗号復号部370により暗号化されたデータ(暗号化データ)は、上記制御部210の制御によりデータ252として不揮発性メモリ250に書き込まれる(ステップS39)。   The encryption / decryption unit 370 selects the encryption processing unit 371 according to the received encryption method index. When the encryption processing unit 371 is selected, the key adaptation unit 372 converts the number of bits suitable for the encryption key of the selected encryption processing unit 371 and performs encryption key adaptation (step S37). When the encryption key is adapted, the encryption / decryption unit 370 encrypts the original data using the adapted encryption key KR and the selected encryption processing unit 371 (step S38). The data (encrypted data) encrypted by the encryption / decryption unit 370 is written in the nonvolatile memory 250 as data 252 under the control of the control unit 210 (step S39).

上記不揮発性メモリ250に暗号化データを書込むと、上記制御部210は、さらに、当該暗号化データの暗号化に用いた暗号鍵KRを選択するために用いた乱数Rを、当該暗号化データの暗号鍵のインデックスデータ251として、不揮発性メモリ250に書き込む(ステップS40)。また、上記制御部210は、当該暗号化データの暗号化に用いた上記暗号処理部371を選択するために用いた乱数rを、当該暗号化データの暗号方式のインデックスデータ253として、不揮発性メモリ250に書き込み(ステップS41)、処理を終了する。   When the encrypted data is written into the nonvolatile memory 250, the control unit 210 further uses the random number R used for selecting the encryption key KR used for encrypting the encrypted data as the encrypted data. Is written in the nonvolatile memory 250 as the encryption key index data 251 (step S40). In addition, the control unit 210 uses the random number r used for selecting the encryption processing unit 371 used for encrypting the encrypted data as the index data 253 of the encryption method of the encrypted data as a nonvolatile memory. Write to 250 (step S41), and the process ends.

上記のように、第2の実施の形態のデータ書込処理では、制御部210は、乱数Rに応じて暗号鍵インデックスを特定し、上記暗号鍵インデックスに対応する暗号鍵KRをROM230より取得する。また、制御部210は、乱数rに応じて暗号方式インデックスを特定する。暗号復号部370は、特定した暗号方式インデックスに対応する暗号処理部371を選択する。暗号復号部370は、暗号鍵KRを用いて、選択した暗号処理部371によりデータを暗号化する。さらに、制御部210は、上記暗号処理部371により暗号化されたデータと暗号鍵KRを特定するための乱数Rと暗号方式を特定するための乱数rとを対応づけて不揮発性メモリ250に書込む。   As described above, in the data writing process of the second embodiment, the control unit 210 specifies the encryption key index according to the random number R, and acquires the encryption key KR corresponding to the encryption key index from the ROM 230. . In addition, the control unit 210 specifies the encryption method index according to the random number r. The encryption / decryption unit 370 selects the encryption processing unit 371 corresponding to the specified encryption method index. The encryption / decryption unit 370 encrypts data by the selected encryption processing unit 371 using the encryption key KR. Further, the control unit 210 associates the data encrypted by the encryption processing unit 371 with the random number R for specifying the encryption key KR and the random number r for specifying the encryption method in the nonvolatile memory 250. Include.

このようなデータの書込み処理によれば、不揮発性メモリに書込むデータを暗号化するために用いる暗号鍵と暗号方式とをそれぞれ乱数に基づいて選択する為、元データ及び暗号鍵の推定をより困難にすることができる。この結果として、上記のようなデータの書込み処理によれば、高レベルのセキュリティを有する携帯可能電子装置を提供することができる。   According to such data writing processing, since the encryption key and the encryption method used for encrypting the data to be written to the nonvolatile memory are selected based on random numbers, the original data and the encryption key are more estimated. Can be difficult. As a result, according to the data writing process as described above, a portable electronic device having a high level of security can be provided.

次に、上記ICカード300におけるデータの読出し処理について説明する。
図11は、上記ICカード300におけるデータ読み出しコマンドに対する動作例を説明するためのフローチャートである。
まず、上記ICカード処理装置100からの電源供給、動作クロック信号およびリセット信号等を受けて上記ICカード300が活性化された状態であるものとする。この状態において、上記ICカード処理装置100からデータ読み出しコマンドが上記ICカード300へ送信されたものとする。この読み出しコマンドでは、読み出すべきデータ(暗号化データ)の先頭アドレスとデータ長とが指定されている。
Next, data reading processing in the IC card 300 will be described.
FIG. 11 is a flowchart for explaining an operation example for the data read command in the IC card 300.
First, it is assumed that the IC card 300 is activated in response to power supply from the IC card processing apparatus 100, an operation clock signal, a reset signal, and the like. In this state, it is assumed that a data read command is transmitted from the IC card processing apparatus 100 to the IC card 300. In this read command, the head address and the data length of data to be read (encrypted data) are specified.

上記ICカード300では、上記ICカード処理装置100からのデータ読み出しコマンドを上記通信インターフェース220により受信する。すると、上記ICカード300の制御部210は、当該読出しコマンドで指定されている先頭アドレスとデータ長とに基づいて、上記不揮発性メモリ250に記憶されている暗号化データ252にアクセスする(ステップS51)。上記制御部210は、アクセスした暗号化データ252に対応する暗号鍵のインデックスデータ251から乱数Rを読み出す(ステップS52)。   In the IC card 300, the communication interface 220 receives a data read command from the IC card processing device 100. Then, the control unit 210 of the IC card 300 accesses the encrypted data 252 stored in the nonvolatile memory 250 based on the head address and data length specified by the read command (step S51). ). The control unit 210 reads the random number R from the encryption key index data 251 corresponding to the accessed encrypted data 252 (step S52).

上記暗号鍵のインデックスデータ251から乱数Rを読み出すと、上記制御部210は、読み出した乱数Rを暗号鍵インデックスとして用いられている桁数に変換することにより、乱数Rに応じた暗号鍵インデックスを特定する。上記乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、当該暗号鍵インデックスに対応する暗号鍵KRを特定する(ステップS53)。乱数Rに応じた暗号鍵インデックスを特定すると、上記制御部210は、特定した暗号鍵インデックスに対応する暗号鍵KRをROM230から読み込む(ステップS54)。これにより、上記制御部210では、乱数生成部260により生成された乱数Rに応じた暗号鍵を取得することとなる。   When the random number R is read from the encryption key index data 251, the control unit 210 converts the read random number R into the number of digits used as the encryption key index, thereby obtaining the encryption key index corresponding to the random number R. Identify. When the encryption key index corresponding to the random number R is specified, the control unit 210 specifies the encryption key KR corresponding to the encryption key index (step S53). When the encryption key index corresponding to the random number R is specified, the control unit 210 reads the encryption key KR corresponding to the specified encryption key index from the ROM 230 (step S54). Thereby, the control unit 210 acquires an encryption key corresponding to the random number R generated by the random number generation unit 260.

また、上記制御部210は、アクセスした暗号化データ252の暗号方式のインデックスデータ253から乱数rを読み出す(ステップS55)。上記暗号方式のインデックスデータ253から乱数rを読み出すと、上記制御部210は、読み出した乱数rを暗号方式インデックスとして用いられている桁数に変換することにより、乱数rに応じた暗号方式インデックスを特定する(ステップS56)。   Further, the control unit 210 reads the random number r from the encryption-type index data 253 of the accessed encrypted data 252 (step S55). When the random number r is read from the index data 253 of the encryption method, the control unit 210 converts the read random number r into the number of digits used as the encryption method index, thereby obtaining an encryption method index corresponding to the random number r. Specify (step S56).

上記乱数rに基づいて暗号方式インデックスを特定すると、上記制御部210は、上記不揮発性メモリ250から暗号化データを読み出す(ステップS57)。暗号化データを読み出すと、上記制御部210は、取得した暗号鍵KRと特定した暗号方式インデックスと読み出した暗号化データとを暗号復号部370へ送信し、復号化を行なうように暗号復号部370へ指示する。   When the encryption method index is specified based on the random number r, the control unit 210 reads the encrypted data from the nonvolatile memory 250 (step S57). When the encrypted data is read, the control unit 210 transmits the acquired encryption key KR, the specified encryption method index, and the read encrypted data to the encryption / decryption unit 370, and the encryption / decryption unit 370 performs decryption. To instruct.

上記暗号復号部370は、受信した暗号方式インデックスに応じて暗号処理部371を選択する。上記暗号処理部371を選択すると、鍵適合化部372は、暗号鍵KRを選択した上記暗号処理部371の暗号方式に対応する暗号鍵に適するビット数に変換することにより暗号鍵KRの適合化を行う(ステップS58)。暗号鍵の適合化を行うと、上記暗号復号部370は、適合化した暗号鍵KRと選択した上記暗号処理部371とを用いて、暗号化データを復号化する(ステップS59)。上記暗号復号部370により復号化されたデータ(元データ)は、上記制御部210の制御により通信インターフェース220を介し、上記ICカード処理装置100へ送信され(ステップS60)、処理を終了する。   The encryption / decryption unit 370 selects the encryption processing unit 371 according to the received encryption method index. When the encryption processing unit 371 is selected, the key adaptation unit 372 adapts the encryption key KR by converting the encryption key KR into the number of bits suitable for the encryption key corresponding to the encryption method of the selected encryption processing unit 371. Is performed (step S58). When the encryption key is adapted, the encryption / decryption unit 370 decrypts the encrypted data by using the adapted encryption key KR and the selected encryption processing unit 371 (step S59). The data (original data) decrypted by the encryption / decryption unit 370 is transmitted to the IC card processing device 100 via the communication interface 220 under the control of the control unit 210 (step S60), and the process is terminated.

上記のように、第2の実施の形態のデータ読出処理では、制御部210は、暗号化データ252に対応する暗号鍵のインデックスデータ251から乱数R(あるいは暗号鍵インデックス)を読み出し、暗号方式のインデックスデータ253から乱数r(あるいは暗号方式のインデックス)を読み出す。制御部210は、乱数Rに応じて暗号鍵インデックスを特定し、上記暗号鍵インデックスに対応する暗号鍵KRをROM230より取得する。また、制御部210は、乱数rに応じて暗号方式インデックスを特定する。暗号復号部370は、特定した暗号方式インデックスに対応する暗号処理部371を選択する。暗号復号部370は、暗号鍵KRを選択した暗号処理部の暗号方式に適合するものに適合化し、適合化した暗号鍵KRを用いて選択した暗号処理部371により上記暗号化データを復号化する。
このようなデータ読出処理によれば、暗号化されて不揮発性メモリに記憶されている暗号化データを復号化するのに用いる暗号鍵と暗号方式とを、当該暗号化データに対応づけて記憶されている乱数(あるいは暗号鍵インデックス及び暗号方式インデックス)に基づいて選択する構成となっている為、元データ及び暗号鍵の推定をより困難にすることができる。この結果として、上記したデータ読出処理によれば、より高レベルのセキュリティを有する携帯可能電子装置を提供することができる。
As described above, in the data reading process according to the second embodiment, the control unit 210 reads the random number R (or the encryption key index) from the index data 251 of the encryption key corresponding to the encrypted data 252, and determines the encryption method. A random number r (or an encryption index) is read from the index data 253. The control unit 210 specifies an encryption key index according to the random number R, and acquires the encryption key KR corresponding to the encryption key index from the ROM 230. In addition, the control unit 210 specifies the encryption method index according to the random number r. The encryption / decryption unit 370 selects the encryption processing unit 371 corresponding to the specified encryption method index. The encryption / decryption unit 370 adapts the encryption key KR to one that matches the encryption method of the selected encryption processing unit, and decrypts the encrypted data by the selected encryption processing unit 371 using the adapted encryption key KR. .
According to such a data reading process, the encryption key and encryption method used to decrypt the encrypted data stored in the nonvolatile memory are stored in association with the encrypted data. Since it is configured to select based on the random number (or encryption key index and encryption method index), it is possible to make the estimation of the original data and the encryption key more difficult. As a result, according to the data reading process described above, a portable electronic device having a higher level of security can be provided.

なお、この発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具現化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合わせてもよい。   In addition, this invention is not limited to the said embodiment as it is, It can implement by changing a component in the range which does not deviate from the summary in an implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine the component covering different embodiment suitably.

第1の実施の形態に係るICカードとの通信機能を有する外部装置としてのICカード処理装置の構成例を概略的に示すブロック図である。It is a block diagram which shows roughly the structural example of the IC card processing apparatus as an external apparatus which has a communication function with the IC card which concerns on 1st Embodiment. 図1に示すICカードにおける構成例を概略的に示すブロック図である。It is a block diagram which shows roughly the structural example in the IC card shown in FIG. 図2に示すROM若しくは不揮発性メモリに記憶される複数の暗号鍵の例を示す模式的に示す図である。It is a figure which shows typically the example of the some encryption key memorize | stored in ROM or the non-volatile memory shown in FIG. 図2に示す不揮発性メモリ内に記憶されるデータの構成例を示す図である。It is a figure which shows the structural example of the data memorize | stored in the non-volatile memory shown in FIG. 図2に示すICカードにおけるデータ書き込みコマンドに対するデータ書込処理の例を説明するためのフローチャートである。3 is a flowchart for explaining an example of a data writing process for a data writing command in the IC card shown in FIG. 2. 図2に示すICカードにおけるデータ読み出しコマンドに対するデータ読出処理の例を説明するためのフローチャートである。3 is a flowchart for explaining an example of a data read process for a data read command in the IC card shown in FIG. 2. 第2の実施の形態に係るICカードにおける構成例を概略的に示すブロック図である。It is a block diagram which shows roughly the structural example in the IC card which concerns on 2nd Embodiment. 図7に示す暗号復号部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the encryption / decryption part shown in FIG. 図7に示す不揮発性メモリ内に記憶されるデータの構成例を示す図である。It is a figure which shows the structural example of the data memorize | stored in the non-volatile memory shown in FIG. 図7に示すICカードにおけるデータ書き込みコマンドに対するデータ書込処理の例を説明するためのフローチャートである。It is a flowchart for demonstrating the example of the data write process with respect to the data write command in the IC card shown in FIG. 図7に示すICカードにおけるデータ読み出しコマンドに対するデータ読出処理の例を説明するためのフローチャートである。It is a flowchart for demonstrating the example of the data read process with respect to the data read command in the IC card shown in FIG.

符号の説明Explanation of symbols

210…制御部、231…暗号鍵群、250…不揮発性メモリ、260…乱数生成部、270…暗号復号部、371…暗号処理部、372…鍵適合化部、R…乱数、r…乱数、KR…暗号鍵。   210 ... control unit, 231 ... encryption key group, 250 ... nonvolatile memory, 260 ... random number generation unit, 270 ... encryption decryption unit, 371 ... encryption processing unit, 372 ... key adaptation unit, R ... random number, r ... random number, KR: Encryption key.

Claims (12)

複数の暗号鍵を記憶している記憶手段と、
乱数を生成する乱数生成手段と、
前記乱数生成手段により生成された乱数に基づいて前記記憶手段に記憶されている複数の暗号鍵から1つの暗号鍵を選択する選択手段と、
前記選択手段により選択された暗号鍵を用いてデータを暗号化する暗号化手段と、
前記暗号化手段により暗号化された暗号化データを記憶する不揮発性メモリと、
を具備することを特徴とする携帯可能電子装置。
Storage means for storing a plurality of encryption keys;
Random number generating means for generating a random number;
Selection means for selecting one encryption key from a plurality of encryption keys stored in the storage means based on the random number generated by the random number generation means;
Encryption means for encrypting data using the encryption key selected by the selection means;
A non-volatile memory for storing the encrypted data encrypted by the encryption means;
A portable electronic device comprising:
前記不揮発性メモリには、さらに、前記暗号化データに対応づけて前記乱数生成手段により生成された乱数を記憶する、ことを特徴とする前記請求項1に記載の携帯可能電子装置。   The portable electronic device according to claim 1, wherein the nonvolatile memory further stores a random number generated by the random number generation unit in association with the encrypted data. さらに、前記不揮発性メモリに記憶するファイル毎に、前記乱数生成手段による乱数の生成、前記選択手段による暗号鍵の選択、前記暗号化手段による暗号化を行う制御手段を具備することを特徴とする前記請求項1に記載の携帯可能電子装置。   Furthermore, for each file stored in the non-volatile memory, there is provided control means for generating a random number by the random number generation means, selecting an encryption key by the selection means, and performing encryption by the encryption means. The portable electronic device according to claim 1. さらに、前記不揮発性メモリにおける特定のアドレス毎に区切られる各ブロックに記憶するデータ毎に、前記乱数生成手段による乱数の生成、前記選択手段による暗号鍵の選択、前記暗号化手段による暗号化を行う制御手段を具備することを特徴とする前記請求項1に記載の携帯可能電子装置。   Further, random number generation by the random number generation means, selection of an encryption key by the selection means, and encryption by the encryption means are performed for each data stored in each block divided for each specific address in the nonvolatile memory. The portable electronic device according to claim 1, further comprising a control unit. さらに、前記不揮発性メモリに記憶されている暗号化データに対応づけられている乱数に基づいて前記選択手段により選択される暗号鍵を用いて当該暗号化データを復号化する復号化手段を具備することを特徴とする前記請求項2に記載の携帯可能電子装置。   And a decrypting unit configured to decrypt the encrypted data using an encryption key selected by the selecting unit based on a random number associated with the encrypted data stored in the nonvolatile memory. The portable electronic device according to claim 2, wherein: 複数の暗号鍵を記憶している記憶手段と、
複数の異なる暗号方式による暗号化を行う複数の暗号処理部と、
第1、及び第2の乱数を生成する乱数生成手段と、
前記乱数生成手段により生成された第1の乱数に基づいて前記記憶手段に記憶されている複数の暗号鍵から1つの暗号鍵を選択する第1の選択手段と、
前記乱数生成手段により生成された第2の乱数に基づいて前記複数の暗号処理部から1つの暗号処理部を選択する第2の選択手段と、
前記第1の選択手段により選択された暗号鍵を用いて、前記第2の選択手段により選択された暗号処理部によりデータを暗号化する暗号化手段と、
前記暗号化手段により暗号化された暗号化データを記憶する不揮発性メモリと、
を具備することを特徴とする携帯可能電子装置。
Storage means for storing a plurality of encryption keys;
A plurality of encryption processing units for performing encryption by a plurality of different encryption methods;
Random number generating means for generating first and second random numbers;
First selection means for selecting one encryption key from a plurality of encryption keys stored in the storage means based on the first random number generated by the random number generation means;
Second selecting means for selecting one cryptographic processing unit from the plurality of cryptographic processing units based on the second random number generated by the random number generating unit;
Using the encryption key selected by the first selection means, an encryption means for encrypting data by the encryption processing unit selected by the second selection means;
A non-volatile memory for storing the encrypted data encrypted by the encryption means;
A portable electronic device comprising:
前記不揮発性メモリには、さらに、前記暗号化データに対応づけて前記乱数生成手段により生成された第1及び第2の乱数を記憶する、ことを特徴とする前記請求項6に記載の携帯可能電子装置。   The portable device according to claim 6, wherein the nonvolatile memory further stores the first and second random numbers generated by the random number generation unit in association with the encrypted data. Electronic equipment. さらに、前記不揮発性メモリに記憶するファイル毎に、前記乱数生成手段による第1及び第2の乱数の生成、前記第1の選択手段による暗号鍵の選択、前記第2の選択手段による暗号処理部の選択、前記暗号化手段による暗号化を行う制御手段を具備することを特徴とする前記請求項6に記載の携帯可能電子装置。   Further, for each file stored in the non-volatile memory, generation of first and second random numbers by the random number generation unit, selection of an encryption key by the first selection unit, and encryption processing unit by the second selection unit 7. The portable electronic device according to claim 6, further comprising control means for performing selection and encryption by the encryption means. さらに、前記不揮発性メモリにおける特定のアドレス毎に区切られる各ブロックに記憶するデータ毎に、前記乱数生成手段による第1及び第2の乱数の生成、前記第1の選択手段による暗号鍵の選択、前記第2の選択手段による暗号処理部の選択、前記暗号化手段による暗号化を行う制御手段を具備することを特徴とする前記請求項6に記載の携帯可能電子装置。   Further, for each data stored in each block divided for each specific address in the non-volatile memory, generation of first and second random numbers by the random number generation means, selection of an encryption key by the first selection means, The portable electronic device according to claim 6, further comprising a control unit that performs selection by the second selection unit of an encryption processing unit and encryption by the encryption unit. さらに、前記不揮発性メモリに記憶されている暗号化データに対応づけられている第1の乱数に基づいて前記第1の選択手段により選択される暗号鍵を用いて、前記第2の乱数に基づいて前記第2の選択手段により選択される暗号処理部により、当該暗号化データを復号化する復号化手段を具備することを特徴とする前記請求項7に記載の携帯可能電子装置。   Further, based on the second random number using the encryption key selected by the first selection means based on the first random number associated with the encrypted data stored in the nonvolatile memory. The portable electronic device according to claim 7, further comprising: a decrypting unit that decrypts the encrypted data by an encryption processing unit selected by the second selecting unit. さらに、前記暗号化手段は、前記第1の選択手段により選択される暗号鍵のビット数を、前記第2の選択手段により選択される暗号処理部の暗号鍵に適するビット数に変換する鍵適合化手段を具備することを特徴する請求項6記載の携帯可能電子装置。   Further, the encryption unit converts the number of bits of the encryption key selected by the first selection unit into a number of bits suitable for the encryption key of the encryption processing unit selected by the second selection unit. The portable electronic device according to claim 6, further comprising: a converting unit. さらに、前記各手段と前記不揮発性メモリとを有するモジュールと、
前記モジュールが内蔵された本体と、
を具備することを特徴する請求項1乃至11記載の携帯可能電子装置。
Further, a module having each means and the nonvolatile memory,
A body containing the module;
The portable electronic device according to claim 1, further comprising:
JP2006288867A 2006-10-24 2006-10-24 Portable electronic device Pending JP2008109276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006288867A JP2008109276A (en) 2006-10-24 2006-10-24 Portable electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006288867A JP2008109276A (en) 2006-10-24 2006-10-24 Portable electronic device

Publications (1)

Publication Number Publication Date
JP2008109276A true JP2008109276A (en) 2008-05-08

Family

ID=39442297

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006288867A Pending JP2008109276A (en) 2006-10-24 2006-10-24 Portable electronic device

Country Status (1)

Country Link
JP (1) JP2008109276A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010182032A (en) * 2009-02-04 2010-08-19 Yoshikawa Rf System Kk Data carrier and data carrier system
JP2010257457A (en) * 2009-04-21 2010-11-11 Princeton Technology Corp Ic card having display function
JP2012151546A (en) * 2011-01-17 2012-08-09 Kddi Corp Storage device, storage method and program
JP2015222484A (en) * 2014-05-22 2015-12-10 凸版印刷株式会社 Data output method, data reading method, storage medium device and data reading device
US9811476B2 (en) 2013-02-28 2017-11-07 Panasonic Intellectual Property Management Co., Ltd. Encryption and recording apparatus, encryption and recording system, and encryption and recording method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010182032A (en) * 2009-02-04 2010-08-19 Yoshikawa Rf System Kk Data carrier and data carrier system
JP2010257457A (en) * 2009-04-21 2010-11-11 Princeton Technology Corp Ic card having display function
JP2012151546A (en) * 2011-01-17 2012-08-09 Kddi Corp Storage device, storage method and program
US9811476B2 (en) 2013-02-28 2017-11-07 Panasonic Intellectual Property Management Co., Ltd. Encryption and recording apparatus, encryption and recording system, and encryption and recording method
JP2015222484A (en) * 2014-05-22 2015-12-10 凸版印刷株式会社 Data output method, data reading method, storage medium device and data reading device

Similar Documents

Publication Publication Date Title
JP4435084B2 (en) Communication system, reader / writer, authentication method, and computer program
KR100906967B1 (en) Removable computer with mass storage
JP4834748B2 (en) Information storage medium, medium authentication device, medium authentication system, and IC card
KR100676087B1 (en) Secure data storage apparatus with USB interface, and method thereof
US7406604B2 (en) Method for protecting a memory card, and a memory card
US8155309B2 (en) Circuit arrangement with non-volatile memory module and method for en-/decrypting data in the non-volatile memory module
US20070160204A1 (en) Microcontroller and authentication method between the controllers
CN101494645B (en) Apparatus and method for authenticating a flash program
US7434066B2 (en) Portable electronic device
JP2008109276A (en) Portable electronic device
CN103370718B (en) Use the data guard method of distributed security key, equipment and system
JP2009032003A (en) Portable electronic device, terminal device, authentication system, and authentication method
JP2002111660A (en) Cryptographic communication method and apparatus
CN109075974B (en) Binding authentication method of fingerprint algorithm library and fingerprint sensor and fingerprint identification system
JP5471904B2 (en) IC card reader / writer and SAM built in it
KR100862009B1 (en) System and Method for Authenticating RFID Readeror Terminal, Secure RFID Tag for Authenticating RFID Readeror Terminal
US20070180250A1 (en) Apparatus and Method for Improving Security Level In Card Authentication System
JP2004139242A (en) Ic card, and system and method for issuing ic card
KR100574234B1 (en) External memory card insertable secure data storage apparatus with usb interface, and storing method thereof
KR100574238B1 (en) Data storage apparatus with usb interface ic chip, and storing method thereof
JP5693824B2 (en) IC card processing device, IC card, and IC card processing system
JP2011060136A (en) Portable electronic apparatus, and data management method in the same
US20060050871A1 (en) Method and apparatus for securing data stored within a non-volatile memory
JP5692441B2 (en) Information processing apparatus, information processing method, and program
JP2006340287A (en) Communication system, information terminal, control device, information processing method, program and storage medium