JP2006065885A - Memory card device - Google Patents

Memory card device Download PDF

Info

Publication number
JP2006065885A
JP2006065885A JP2005306963A JP2005306963A JP2006065885A JP 2006065885 A JP2006065885 A JP 2006065885A JP 2005306963 A JP2005306963 A JP 2005306963A JP 2005306963 A JP2005306963 A JP 2005306963A JP 2006065885 A JP2006065885 A JP 2006065885A
Authority
JP
Japan
Prior art keywords
memory card
data
authentication
address
secret key
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
JP2005306963A
Other languages
Japanese (ja)
Inventor
Seiichi Harada
聖一 原田
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2005306963A priority Critical patent/JP2006065885A/en
Publication of JP2006065885A publication Critical patent/JP2006065885A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory card device capable of checking the authenticity of a memory card before implementing an application program, and to provide an authentication data creation device for creating authentication data used for checking the authenticity to store it in a memory card. <P>SOLUTION: Authentication data 9 obtained by encrypting an address read from an application program 2 at random and data stored at the address by a private key 8 are stored in a memory card 5, the authentication data 9 are read from the memory card 5 to be decrypted by a private key 8, and the authenticity of the memory card 5 is checked by comparing data read from the application program 2 based on the decrypted address with the decrypted data. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は電子商取引に使用される携帯型電子機器等のメモリカ−ドを使用するメモリカ−ド装置と、そのメモリカ−ドに格納する認証デ−タを作成する認証デ−タ作成装置とに関する。   The present invention relates to a memory card device using a memory card such as a portable electronic device used for electronic commerce, and an authentication data creating device for creating authentication data to be stored in the memory card.

従来、メモリカ−ド装置、例えば、電子商取引に使用される携帯型電子機器では、アプリケ−ションプログラムが格納されてあるメモリカ−ドをメモリカ−ド装置に挿入すると、アプリケ−ションプログラムが即、実行される。
特開2003−85525号
Conventionally, in a memory card device, for example, a portable electronic device used for electronic commerce, when a memory card in which an application program is stored is inserted into the memory card device, the application program is immediately executed. Is done.
JP 2003-85525 A

従来のメモリカ−ド装置にあっては、メモリカ−ドの真偽をチェックする機能が設けてないので、メモリカ−ドがメモリカ−ド装置に挿入されると、たとえ不正なアプリケ−ションプログラムが実装してあっても実行されてしまい、電子商取引の内容が書き替えられてしまう恐れがあるという問題点があった。   The conventional memory card device does not have a function for checking the authenticity of the memory card. Therefore, when a memory card is inserted into the memory card device, an illegal application program is installed. Even then, there is a problem that the contents are executed and the contents of the electronic commerce may be rewritten.

本発明はアプリケ−ションプログラムを実行する前にメモリカ−ドの真偽をチェックできるメモリカ−ド装置と、その真偽のチェックに用いる認証デ−タを作成してメモリカ−ドに格納する認証デ−タ作成装置とを提供することを目的としている。   The present invention provides a memory card device capable of checking the authenticity of a memory card before executing an application program, and authentication data for creating authentication data used for checking the authenticity and storing it in the memory card. -It is intended to provide a data creation device.

上記目的を達成するために本発明は、アプリケ−ションプログラムからランダムに読み出されたアドレスと該アドレスに格納されたデ−タとを秘密キ−により暗号化した認証デ−タをメモリカ−ドに格納する認証デ−タ作成装置と、メモリカ−ドから認証デ−タを読み出して秘密キ−により復号化し、復号化されたアドレスに基づきアプリケ−ションプログラムから読み出したデ−タと復号化されたデ−タとを比較してメモリカ−ドの真偽をチェックするメモリカ−ド装置とを備える。   In order to achieve the above object, the present invention provides a memory card in which authentication data obtained by encrypting an address randomly read from an application program and data stored in the address with a secret key is provided. The authentication data creation device stored in the memory card and the authentication data are read from the memory card, decrypted by the secret key, and decrypted with the data read from the application program based on the decrypted address. And a memory card device for checking the authenticity of the memory card by comparing with the data.

本発明は、以上説明したように構成されているので以下に記載される効果を奏する。アプリケ−ションプログラムと暗号化した認証デ−タとを格納したメモリカ−ドをメモリカ−ド装置に実装し、認証デ−タを復号化して得られたアドレスによりアプリケ−ションプログラムから読み出したデ−タ、あるいは読み出して処理したデ−タと、認証デ−タから得られたデ−タと比較してメモリカ−ドの真偽をチェックするようにしたことにより、不正なアプリケ−ションプログラムを実装したメモリカ−ドがメモリカ−ド装置に挿入されても実行されないので、電子商取引の内容等が書き替えられてしまう恐れがなくなる。   Since the present invention is configured as described above, the following effects can be obtained. A memory card storing the application program and the encrypted authentication data is mounted on the memory card device, and the data read from the application program by the address obtained by decrypting the authentication data. An illegal application program is implemented by checking the authenticity of the memory card by comparing it with the data obtained from the data or the authentication data. Since the executed memory card is not executed even when it is inserted into the memory card device, there is no possibility that the contents of electronic commerce will be rewritten.

以下に本発明を実施するための最良の形態である実施例1乃至4について図面を参照しながら順次説明する。尚、各図面に共通な要素には同一符号を付す。   Embodiments 1 to 4, which are the best modes for carrying out the present invention, will be sequentially described below with reference to the drawings. In addition, the same code | symbol is attached | subjected to the element common to each drawing.

図2はメモリカ−ドライタの構成を示すブロック図である。メモリカ−ドライタ1は、後述するメモリカ−ド装置で実行されるアプリケ−ションプログラム2(以後AP2と記す)を格納した媒体3(以後AP媒体3と記す)を挿抜するAP用I/Oスロット4と、メモリカ−ド5を挿抜するメモリカ−ド接続用I/Oスロット6と、書き込み開始スイッチ7とを有する。   FIG. 2 is a block diagram showing the configuration of the memory card driver. The memory card driver 1 is an AP I / O slot 4 into which a medium 3 (hereinafter referred to as AP medium 3) storing an application program 2 (hereinafter referred to as AP 2) executed by a memory card device to be described later is inserted and removed. And a memory card connection I / O slot 6 for inserting and removing the memory card 5 and a write start switch 7.

AP媒体3、メモリカ−ド5はAP用I/Oスロット4、メモリカ−ド接続用I/Oスロット6に設けられた図示せぬコネクタに挿抜する端子部3a、5aを有する。   The AP medium 3 and the memory card 5 have terminal portions 3 a and 5 a that are inserted into and removed from connectors (not shown) provided in the AP I / O slot 4 and the memory card connection I / O slot 6.

メモリカ−ドライタ1には、AP2の実行コ−ドから、例えば1KB(キロバイト)程度のアドレスとデ−タとのセットをランダムに選択し、そのセットデ−タを秘密キ−8(以後秘密KEY8と記す)を用いて暗号化し、認証デ−タ9としてメモリカ−ド5に格納する認証デ−タ作成手段10と、AP2をメモリカ−ド5に書き込むAP書き込み手段11とを内蔵している。   For the memory card driver 1, a set of addresses and data of about 1 KB (kilobytes), for example, is randomly selected from the execution code of AP2, and the set data is set as a secret key 8 (hereinafter referred to as secret key 8). The authentication data creating means 10 for storing the data in the memory card 5 as the authentication data 9 and the AP writing means 11 for writing the AP 2 in the memory card 5 are incorporated.

具体的には、図示せぬメモリに格納してある認証デ−タ作成プログラム、AP書き込みプログラムをCPU12が実行することによって各手段を達成する。   Specifically, each means is achieved by the CPU 12 executing an authentication data creation program and an AP writing program stored in a memory (not shown).

アドレスとデ−タとのセットをランダムに選択するには、例えば、乱数を発生させ、その乱数でアドレスを構成してデ−タを選択するプログラムを認証デ−タ作成プログラムに含ませておく。   In order to randomly select a set of addresses and data, for example, a program for generating a random number, configuring an address with the random number, and selecting the data is included in the authentication data creation program. .

図3はメモリカ−ド装置の外観斜視図、図4は図3に示したメモリカ−ド装置に搭載される制御ブロック図である。メモリカ−ド装置13、例えば、電子商取引に使用される携帯型電子機器は、表面に操作キ−群14、表示部15を備えてある。側面には矢印A−B方向にメモリカ−ド5を挿抜する際に用いるメモリカ−ド挿入口16及びメモリカ−ド挿入口16に挿入した際メモリカ−ド5をロックする矢印C−D方向に移動自在なスライダ17を有する。   3 is an external perspective view of the memory card device, and FIG. 4 is a control block diagram mounted on the memory card device shown in FIG. The memory card device 13, for example, a portable electronic device used for electronic commerce, includes an operation key group 14 and a display unit 15 on the surface. The memory card insertion slot 16 used when inserting / removing the memory card 5 in the direction of arrow AB on the side surface and the movement in the direction of arrow CD for locking the memory card 5 when inserted into the memory card insertion slot 16 A free slider 17 is provided.

操作キ−群14には電源ボタン14a、リセットボタン14b、テンキ−等があり、表示部15には操作に伴うメッセ−ジが表示される。   The operation key group 14 includes a power button 14a, a reset button 14b, a numeric keypad, and the like, and a message associated with the operation is displayed on the display unit 15.

メモリカ−ド装置13の内部には、メモリカ−ド挿入口16から挿入されるメモリカ−ド5と並行になるように、破線で示す基板18が搭載してある。基板18には、図4に示すように、中央処理装置19(以後CPU19と記す)、ROM20、RAM21、バッテリ−22等が搭載されてある。バッテリ−22はCPU19、ROM20、RAM21にライン23を通じて電力を供給し、CPU19はROM20、RAM21とバスライン24で接続されている。   A substrate 18 indicated by a broken line is mounted inside the memory card device 13 so as to be parallel to the memory card 5 inserted from the memory card insertion port 16. As shown in FIG. 4, a central processing unit 19 (hereinafter referred to as “CPU 19”), a ROM 20, a RAM 21, a battery 22, and the like are mounted on the substrate 18. The battery 22 supplies power to the CPU 19, ROM 20, and RAM 21 through the line 23, and the CPU 19 is connected to the ROM 20 and RAM 21 through the bus line 24.

ROM20には制御プログラム20a、認証プログラム20b、秘密キ−8(以後秘密KEY8と記す)が格納してあり、RAM21はメモリカ−ド5から読み込まれたAP2の格納や各種処理時のデ−タ格納に用いられる。秘密KEY8はメモリカ−ド5の認証デ−タ9を復号化する際に用いられるもので外部からの読み出しに対しプロテクトされてある。   The ROM 20 stores a control program 20a, an authentication program 20b, and a secret key 8 (hereinafter referred to as secret key 8), and the RAM 21 stores AP2 read from the memory card 5 and stores data during various processes. Used for. The secret KEY 8 is used when decrypting the authentication data 9 of the memory card 5 and is protected against reading from the outside.

CPU19は認証プログラム20bを実行することによりメモリカ−ド認証手段26となり、メモリカ−ド5が真の場合には表示部15に「APの実行に移る」旨のメッセ−ジを表示するとともに、RAM21にメモリカ−ド5が真であることを示す認証OKフラグデ−タ21aをセットする。   The CPU 19 becomes the memory card authenticating means 26 by executing the authentication program 20b. When the memory card 5 is true, the CPU 19 displays a message “transfer to AP execution” and the RAM 21 The authentication OK flag data 21a indicating that the memory card 5 is true is set.

また、CPU19は制御プログラム20aを実行することによりタイマ手段25、低電力消費モ−ド切替手段27、カ−ド実装チェック手段28、カ−ド引き抜きチェック手段29等になる。   The CPU 19 becomes a timer means 25, a low power consumption mode switching means 27, a card mounting check means 28, a card removal check means 29, etc. by executing the control program 20a.

低電力消費モ−ド切替手段27はタイマ手段25を用い、待ち状態が予め決められた時間経過すると、CPU19をホ−ルド状態に切り替え、無駄な電力消費を抑える。カ−ド実装チェック手段28はメモリカ−ド5の端子部5aが差し込まれるコネクタの状況を表すレジスタの内容をタイマ手段25を用い、例えば1秒割り込みで確認する。   The low power consumption mode switching means 27 uses the timer means 25, and when the waiting state elapses for a predetermined time, the CPU 19 is switched to the hold state to suppress wasteful power consumption. The card mounting check means 28 uses the timer means 25 to check the contents of the register representing the status of the connector into which the terminal portion 5a of the memory card 5 is inserted, for example, by a one-second interrupt.

また、スライダ17を矢印D方向に移動させると、マスク不可能な割り込み信号(NMI)がCPU19に送られ、カ−ド引き抜きチェック手段29がRAM21の認証OKフラグデ−タ21aをクリアする。   When the slider 17 is moved in the direction of the arrow D, an unmaskable interrupt signal (NMI) is sent to the CPU 19, and the card withdrawal check means 29 clears the authentication OK flag data 21a in the RAM 21.

次に動作について説明する。先ず、図5を参照してメモリカ−ドライタ1の動作について説明する。AP2を格納したAP媒体3、何も書き込まれていないメモリカ−ド5を、それぞれ、AP用I/Oスロット4、メモリカ−ド接続用I/Oスロット6に挿入し、書き込み開始スイッチ7を押下する。   Next, the operation will be described. First, the operation of the memory card driver 1 will be described with reference to FIG. AP medium 3 storing AP2 and memory card 5 to which nothing is written are inserted into AP I / O slot 4 and memory card connection I / O slot 6, respectively, and write start switch 7 is pressed. To do.

CPU12はAP書き込み手段11としてAP媒体3からAP2を読み込み、メモリカ−ド5に書き込む。   The CPU 12 reads AP2 from the AP medium 3 as the AP writing means 11 and writes it to the memory card 5.

次に、CPU12は認証デ−タ作成手段10としてAP2からアドレスとデ−タとのセット2aをランダムに選択し、そのセットデ−タ2aを秘密KEY8を用いて暗号化し、認証デ−タ9としてメモリカ−ド5に書き込む。   Next, the CPU 12 randomly selects an address / data set 2 a from the AP 2 as the authentication data creation means 10, encrypts the set data 2 a using the secret KEY 8, and generates the authentication data 9. Write to memory card 5.

次に、図1、図6を参照してメモリカ−ド認証動作について説明する。図1は実施例1によるメモリカ−ド認証動作の説明図(1)、図6は実施例1によるリセットボタン押下後の動作を示すフロ−チャ−ト(1)である。メモリカ−ド5の端子部5aをメモリカ−ド装置13のメモリカ−ド挿入口16から矢印A方向へ挿入する。端子部5aはメモリカ−ド装置13の内部に設けられた図示せぬコネクタに差し込まれる。   Next, the memory card authentication operation will be described with reference to FIGS. FIG. 1 is an explanatory diagram (1) of the memory card authentication operation according to the first embodiment, and FIG. 6 is a flowchart (1) showing the operation after the reset button is pressed according to the first embodiment. The terminal portion 5a of the memory card 5 is inserted from the memory card insertion port 16 of the memory card device 13 in the direction of arrow A. The terminal portion 5a is inserted into a connector (not shown) provided inside the memory card device 13.

メモリカ−ド5には、メモリカ−ドライタ1によりAP2、認証デ−タ9が格納されてある。リセットボタン14bが押下されると、ステップS1 でCPU19は制御プログラム20aに基づきメモリカ−ド装置13を初期化する。初期化によって、RAM21の認証OKフラグデ−タ21aもクリアされる。   The memory card 5 stores the AP 2 and authentication data 9 by the memory card driver 1. When the reset button 14b is pressed, in step S1, the CPU 19 initializes the memory card device 13 based on the control program 20a. By the initialization, the authentication OK flag data 21a of the RAM 21 is also cleared.

ステップS2 でCPU19はメモリカ−ド認証手段26として、図1に示すように、メモリカ−ド5からAP2を読み出し、RAM21に格納する。ステップS3 でメモリカ−ド5から認証デ−タ9を読み出し、秘密KEY8を用いて復号化し、復号デ−タとしてRAM21に格納する。   In step S2, the CPU 19 reads out AP2 from the memory card 5 and stores it in the RAM 21, as shown in FIG. In step S3, the authentication data 9 is read from the memory card 5, decrypted using the secret KEY 8, and stored in the RAM 21 as decryption data.

ステップS4 で復号デ−タのアドレスに基づいてRAM21に格納してあるAP2からデ−タを読み出す。即ち、CPU19は復号デ−タのアドレスを図示せぬプログラムカウンタに入力し、RAM21に格納してあるAP2からデ−タを読み出す。   In step S4, data is read from AP2 stored in RAM 21 based on the address of the decoded data. That is, the CPU 19 inputs the address of the decrypted data to a program counter (not shown) and reads the data from the AP 2 stored in the RAM 21.

ステップS5 でAP2から読み出したデ−タと復号デ−タのデ−タとを比較する。即ち、CPU19はAP2から読み出したデ−タと復号デ−タのデ−タとを図示せぬ演算部のレジスタにセットして比較する。ステップS6 で一致ならばステップS7 に分岐し、否ならばステップS9 に分岐する。   In step S5, the data read from AP2 is compared with the decoded data. That is, the CPU 19 sets the data read from the AP 2 and the decoded data in the register of the arithmetic unit (not shown) and compares them. If there is a match in step S6, the process branches to step S7, and if not, the process branches to step S9.

ステップS7 で比較するデ−タが未だ有るか否かをチェックし、有ればステップS5 に分岐し、否ならばステップS8 に分岐する。ステップS8 でCPU19は表示部15に「APの実行に移る」旨のメッセ−ジを表示するとともに、RAM21に認証OKフラグデ−タ21aをセットし、メモリカ−ド認証動作を終了する。   In step S7, it is checked whether or not there is still data to be compared. If so, the process branches to step S5, and if not, the process branches to step S8. In step S8, the CPU 19 displays a message to the effect that "transfer to AP execution" on the display unit 15, sets authentication OK flag data 21a in the RAM 21, and ends the memory card authentication operation.

ステップS9 でCPU19は表示部15に「メモリカ−ドは不正である」旨のメッセ−ジを表示してメモリカ−ド認証動作を終了する。   In step S9, the CPU 19 displays a message "Memory card is invalid" on the display unit 15 and ends the memory card authentication operation.

次に図7を参照して電源ボタン押下後の動作を説明する。図7は実施例1による電源ボタン押下後の動作を示すフロ−チャ−ト(1)である。電源ボタン14aが押下されると、ステップS10でCPU19はメモリカ−ド認証手段26として、RAM21の認証OKフラグデ−タ21aがセットされているか否かをチェックし、セットされていればステップS11に分岐し、否ならばステップS12に分岐する。   Next, the operation after the power button is pressed will be described with reference to FIG. FIG. 7 is a flowchart (1) showing the operation after the power button is pressed according to the first embodiment. When the power button 14a is pressed, the CPU 19 checks whether or not the authentication OK flag data 21a of the RAM 21 is set as the memory card authentication means 26 in step S10, and if it is set, branches to step S11. If not, the process branches to step S12.

ステップS11でCPU19は表示部15に「APの実行に移る」旨のメッセ−ジを表示し、メモリカ−ド認証動作を終了する。ステップS12でCPU19は表示部15に「メモリカ−ドは不正である」旨のメッセ−ジを表示し、メモリカ−ド認証動作を終了する。   In step S11, the CPU 19 displays a message “transfer to AP execution” on the display unit 15, and ends the memory card authentication operation. In step S12, the CPU 19 displays a message “Memory card is invalid” on the display unit 15, and ends the memory card authentication operation.

次に図8を参照してカ−ド引き抜き後の動作を説明する。メモリカ−ド認証動作は終了してRAM21に認証OKフラグデ−タ21aがセットされている。メモリカ−ド5を引き抜くためにスライダ17を矢印D方向に移動させると、ステップS20でCPU19はカ−ド引き抜きチェック手段29としてマスク不可能な割り込み信号(NMI)が発生したか否かをセンスしており、発生ならばステップS21に分岐する。ステップS21でRAM21の認証OKフラグデ−タ21aをクリアするとともに表示部15に「認証OKフラグデ−タをクリアした」旨のメッセ−ジを表示して処理を終了する。従って、次回APを実行させるには、リセットボタン14bを押下しなければならない。   Next, the operation after card extraction will be described with reference to FIG. The memory card authentication operation is completed, and the authentication OK flag data 21 a is set in the RAM 21. When the slider 17 is moved in the direction of arrow D in order to pull out the memory card 5, the CPU 19 senses whether or not an unmaskable interrupt signal (NMI) has been generated as the card pull-out check means 29 in step S20. If it occurs, the process branches to step S21. In step S21, the authentication OK flag data 21a in the RAM 21 is cleared, and a message that "the authentication OK flag data has been cleared" is displayed on the display unit 15, and the process is terminated. Therefore, in order to execute the AP next time, the reset button 14b must be pressed.

実施例1によれば、メモリカ−ドライタを装置ベンダ−から信頼できるユ−ザ(システムベンダ−、ソフトハウス等)に提供、管理させることでユ−ザライタブルでしかも、セキュリティを持ったメモリカ−ドの提供が可能なシステムを実現できる。   According to the first embodiment, a memory card driver is provided by a user (system vendor, software house, etc.) that can be trusted from a device vendor, and is managed so that the memory card is secure and secure. A system that can be provided can be realized.

また、APの実行コ−ドのアドレスとデ−タとからなるセットデ−タを暗号化して認証デ−タを作成してメモリカ−ドに格納し、メモリカ−ド装置で認証デ−タを復号化し、APと比較してメモリカ−ドの真偽をチェックできるようにしたので、不正なAPが実行される恐れはなくなる。   Also, the set data consisting of the AP execution code address and data is encrypted to create authentication data, which is stored in the memory card, and the authentication data is decrypted by the memory card device. Since the authenticity of the memory card can be checked as compared with the AP, there is no possibility that an unauthorized AP is executed.

また、メモリカ−ド装置にAPに関する情報が実装されていなくともメモリカ−ドの真偽がチェックできるので、APのバ−ジョンアップ等の変更が生じても、メモリカ−ド装置側では何の変更も伴わず、変更後のメモリカ−ドの真偽をチェックできる。   In addition, since the memory card can be checked for authenticity even if information on the AP is not mounted on the memory card device, even if a change such as an AP version upgrade occurs, there is no change on the memory card device side. In addition, the authenticity of the memory card after the change can be checked.

また、リセットボタン押下に伴うメモリカ−ドの真偽チェックで真と判定されれば、以後、電源ボタン押下に伴う認証OKフラグデ−タのチェックでメモリカ−ドの真偽チェックを行えるので、真偽チェックに要する時間を短縮できる。   If it is determined to be true by checking the authenticity of the memory card when the reset button is pressed, the authenticity of the memory card can be checked by checking the authentication OK flag data when the power button is pressed. The time required for checking can be shortened.

また、メモリカ−ド装置からメモリカ−ドが引き抜かれた場合、認証OKフラグデ−タをクリアするようにしたことにより、その後、偽造メモリカ−ドをメモリカ−ド装置に実装し、電源ボタンを押下しても「メモリカ−ドは不正である」旨のメッセ−ジを表示されるので、偽造メモリカ−ドの使用を防止できる。   In addition, when the memory card is pulled out from the memory card device, the authentication OK flag data is cleared, and then the forged memory card is mounted on the memory card device and the power button is pressed. However, since the message “Memory card is illegal” is displayed, it is possible to prevent the use of a forged memory card.

実施例2が実施例1と異なるところは、電源ボタンがリセットボタンをも兼ねている点と、メモリカ−ド認証手段がRAM21に認証OKフラグデ−タ21aをセットしない点である。   The second embodiment is different from the first embodiment in that the power button also serves as a reset button and that the memory card authentication means does not set the authentication OK flag data 21 a in the RAM 21.

図9は実施例2によるフロ−チャ−トである。実施例1のメモリカ−ド認証動作と異なるところは、電源ボタン14aが押下される毎に、CPU19はリセットされ、ステップS1 でメモリカ−ド装置13を初期化する点と、ステップS8 でRAM21に認証OKフラグデ−タ21aをセットしない点である。   FIG. 9 is a flowchart according to the second embodiment. The difference from the memory card authentication operation of the first embodiment is that the CPU 19 is reset each time the power button 14a is pressed, the memory card device 13 is initialized in step S1, and the RAM 21 is authenticated in step S8. The OK flag data 21a is not set.

実施例2によれば、メモリカ−ド装置を立ち上げる(電源ボタンを押下する)毎に、CPUはメモリカ−ドの認証動作を行うので、実施例1による認証OKフラグデ−タセットに比べてセキュリティが向上し、不正なアプリケ−ションプログラムが実行される恐れはなくなる。   According to the second embodiment, every time the memory card device is activated (the power button is pressed), the CPU performs the memory card authentication operation. Therefore, the security is higher than the authentication OK flag data set according to the first embodiment. And the risk of unauthorized application program execution is eliminated.

実施例3が実施例1と異なるところは、リセットボタン押下により開始されるメモリカ−ドの認証動作である。即ち、認証動作によりメモリカ−ドが真であれば、RAM21に認証OKフラグデ−タ21aをセットするとともに、メモリカ−ド2の認証デ−タをクリア(例えば認証デ−タに有効ビット、無効ビットを立てるようにしておきメモリカ−ドが真であれば無効ビットを立てる)にする点である。   The third embodiment is different from the first embodiment in the memory card authentication operation started by pressing the reset button. That is, if the memory card is true by the authentication operation, the authentication OK flag data 21a is set in the RAM 21 and the authentication data in the memory card 2 is cleared (for example, the valid bit and invalid bit in the authentication data). The invalid bit is set if the memory card is true).

動作については実施例1と同じであるから省略する。   Since the operation is the same as that of the first embodiment, a description thereof will be omitted.

実施例3によれば、AP認証後、メモリカ−ドの認証デ−タをクリアすることにより、一度認証されたメモリカ−ド(又は、その不正コピ−)を他のメモリカ−ド装置で再利用することを不可能にし、さらに、メモリカ−ド装置に実装されて出荷されたメモリカ−ドからの読み出しを不可能にし、偽造メモリカ−ドの製造を防止させることができる。   According to the third embodiment, after the AP authentication, the memory card authentication data (or its illegal copy) is reused by another memory card device by clearing the authentication data of the memory card. In addition, it is possible to make it impossible to read from a memory card that is mounted on a memory card device and shipped, and to prevent manufacture of a forged memory card.

実施例4が実施例1と異なるところは、メモリカ−ドライタ1により認証デ−タ9を作成する際、秘密KEYを用いてアドレスを認証アドレスに暗号化するとともにデ−タを認証ハッシュ値に変換する。   The fourth embodiment is different from the first embodiment in that when the authentication data 9 is created by the memory card writer 1, the address is encrypted to the authentication address by using the secret key and the data is converted into the authentication hash value. To do.

メモリカ−ド装置13では、秘密KEYを用いて認証アドレスを復号化し、復号化されたアドレスに基づいてAPからデ−タを読み出し、秘密KEYを用いてデ−タから比較ハッシュ値を求め、認証ハッシュ値と比較してメモリカ−ドの真偽をチェックする。   The memory card device 13 decrypts the authentication address using the secret KEY, reads data from the AP based on the decrypted address, obtains a comparison hash value from the data using the secret KEY, and performs authentication. The authenticity of the memory card is checked by comparing with the hash value.

図10は実施例4によるメモリカ−ドライタの動作を示す説明図である。先ず、図2に示したように、AP2を格納したAP媒体3、何も書き込まれていないメモリカ−ド5を、それぞれ、AP用I/Oスロット4、メモリカ−ド接続用I/Oスロット6に挿入し、書き込み開始スイッチ7を押下する。   FIG. 10 is an explanatory diagram showing the operation of the memory card driver according to the fourth embodiment. First, as shown in FIG. 2, the AP medium 3 storing the AP 2 and the memory card 5 on which nothing is written are respectively connected to the AP I / O slot 4 and the memory card connection I / O slot 6. And the write start switch 7 is pressed.

CPU12はAP書き込み手段11として、図10に示すように、AP媒体3からAP2を読み込み、メモリカ−ド5に書き込む。   The CPU 12 reads the AP 2 from the AP medium 3 and writes it to the memory card 5 as the AP writing means 11 as shown in FIG.

次に、CPU12は認証デ−タ作成手段10として、読み込んだAP2からアドレスとデ−タとのセットデ−タ2aをランダムに選択し、そのセットデ−タ2aと秘密KEY30とを用いて認証デ−タ9を作成し、メモリカ−ド5に書き込む。   Next, the CPU 12 randomly selects the set data 2a of the address and data from the read AP 2 as the authentication data creating means 10, and uses the set data 2a and the secret KEY 30 for authentication data. Data 9 is created and written to the memory card 5.

セットデ−タ2aのうち、アドレスは秘密KEY30を用いて暗号化され、認証アドレス9aとしてメモリカ−ド5に書き込まれる。同様に、デ−タは秘密KEY30を用いてハッシュ値に変換され、認証ハッシュ値9bとしてメモリカ−ド5に書き込まれる。   Of the set data 2a, the address is encrypted using the secret key 30 and written to the memory card 5 as the authentication address 9a. Similarly, the data is converted into a hash value using the secret KEY 30 and written into the memory card 5 as the authentication hash value 9b.

図11は実施例4によるメモリカ−ド認証動作の説明図、図12は実施例4によるリセットボタン押下後の動作を示すフロ−チャ−ト(2)である。   FIG. 11 is an explanatory diagram of the memory card authentication operation according to the fourth embodiment, and FIG. 12 is a flowchart (2) showing the operation after the reset button is pressed according to the fourth embodiment.

メモリカ−ド5には、メモリカ−ドライタ1によりAP2、認証デ−タ9が格納されてある。リセットボタン14bが押下されると、ステップS1 でCPU19は制御プログラム20aに基づきメモリカ−ド装置13を初期化する。初期化によって、RAM21の認証OKフラグデ−タ21aもクリアされる。   The memory card 5 stores the AP 2 and authentication data 9 by the memory card driver 1. When the reset button 14b is pressed, in step S1, the CPU 19 initializes the memory card device 13 based on the control program 20a. By the initialization, the authentication OK flag data 21a of the RAM 21 is also cleared.

ステップS2 でCPU19はメモリカ−ド認証手段26として、図11に示すように、メモリカ−ド5からAP2を読み出し、RAM21に格納する。ステップS3 でメモリカ−ド5から認証アドレス9aを読み出し、秘密KEY30を用いて復号化し、復号アドレス31としてRAM21に格納する。   In step S2, the CPU 19 reads out AP2 from the memory card 5 as the memory card authenticating means 26 as shown in FIG. In step S3, the authentication address 9a is read from the memory card 5, decrypted using the secret key 30, and stored in the RAM 21 as the decrypted address 31.

ステップS4 で復号アドレス31に基づいてRAM21に格納してあるAP2からデ−タを読み出し、デ−タ群32としてRAM21に格納する。即ち、CPU19は復号化されたアドレスを順に図示せぬプログラムカウンタに入力し、RAM21に格納してあるAP2からデ−タを読み出す。   In step S4, data is read from AP2 stored in the RAM 21 based on the decryption address 31, and stored in the RAM 21 as a data group 32. That is, the CPU 19 inputs the decrypted addresses to a program counter (not shown) in order, and reads data from the AP 2 stored in the RAM 21.

ステップS5 で秘密KEY30を用いてデ−タ群32からハッシュ値を算出し、比較ハッシュ値33としてRAM21に格納する。ステップS6 でメモリカ−ド5の認証ハッシュ値9bと比較ハッシュ値33とを比較する。即ち、CPU19は認証ハッシュ値9bと比較ハッシュ値33とをRAM21から図示せぬ演算部のレジスタにセットして比較する。ステップS7 で一致ならばステップS8 に分岐し、否ならばステップS10に分岐する。   In step S 5, a hash value is calculated from the data group 32 using the secret key 30 and stored in the RAM 21 as the comparison hash value 33. In step S6, the authentication hash value 9b of the memory card 5 is compared with the comparison hash value 33. That is, the CPU 19 sets the authentication hash value 9b and the comparison hash value 33 in the register of the arithmetic unit (not shown) from the RAM 21 and compares them. If there is a match in step S7, the process branches to step S8, and if not, the process branches to step S10.

ステップS8 でCPU19は表示部15に「APの実行に移る」旨のメッセ−ジを表示するとともに、RAM21に認証OKフラグデ−タ21aをセットし、メモリカ−ド認証動作を終了する。   In step S8, the CPU 19 displays a message to the effect that "transfer to AP execution" on the display unit 15, sets authentication OK flag data 21a in the RAM 21, and ends the memory card authentication operation.

ステップS9 でCPU19は表示部15に「メモリカ−ドは不正である」旨のメッセ−ジを表示してメモリカ−ド認証動作を終了する。   In step S9, the CPU 19 displays a message "Memory card is invalid" on the display unit 15 and ends the memory card authentication operation.

実施例4によれば、デ−タは最後のハッシュ値を認証ハッシュ値としてメモリカ−ドに格納されるようにしたので、実施例1に比べてメモリカ−ドに実装する認証デ−タのサイズを大幅に小さくすることができる。   According to the fourth embodiment, since the last hash value is stored in the memory card as the authentication hash value, the size of the authentication data to be mounted on the memory card compared to the first embodiment. Can be significantly reduced.

メモリカ−ド認証動作の説明図(1)である。It is explanatory drawing (1) of a memory card authentication operation | movement. メモリカ−ドライタの構成を示すブロック図である。It is a block diagram which shows the structure of a memory card driver. メモリカ−ド装置の外観斜視図である。1 is an external perspective view of a memory card device. メモリカ−ド装置に搭載される制御ブロック図である。It is a control block diagram mounted in a memory card device. メモリカ−ドライタの動作を示す説明図(1)である。It is explanatory drawing (1) which shows operation | movement of a memory card driver. リセットボタン押下後の動作を示すフロ−チャ−ト(1)である。It is a flowchart (1) showing the operation after the reset button is pressed. 電源ボタン押下後の動作を示すフロ−チャ−ト(1)である。It is a flowchart (1) showing the operation after the power button is pressed. カ−ド引き抜き後の動作を示すフロ−チャ−トである。It is a flowchart which shows the operation | movement after card extraction. 電源ボタン押下後の動作を示すフロ−チャ−ト(2)である。It is a flowchart (2) showing the operation after the power button is pressed. メモリカ−ドライタの動作を示す説明図(2)である。It is explanatory drawing (2) which shows operation | movement of a memory card driver. メモリカ−ド認証動作の説明図(2)である。It is explanatory drawing (2) of a memory card authentication operation | movement. リセットボタン押下後の動作を示すフロ−チャ−ト(2)である。It is a flowchart (2) showing the operation after the reset button is pressed.

符号の説明Explanation of symbols

1 メモリカ−ドライタ
3 AP媒体
5 メモリカ−ド
8、30 秘密KEY
12、19 CPU
13 メモリカ−ド装置
20 ROM
21 RAM
1 Memory Card Driver 3 AP Medium 5 Memory Card 8, 30 Secret KEY
12, 19 CPU
13 Memory card device 20 ROM
21 RAM

Claims (4)

乱数で構成されたアドレスと、前記アドレスにより読み出し可能なデータとからなるアプリケーションプログラムと、前記アドレスとデータを暗号化することにより生成された認証データとを格納したメモリカードから、前記認証データを読み出して前記メモリカードの真偽の判定を行うメモリカード装置であって、
前記装置は秘密キーを格納し、前記認証データから、前記アドレスとデータを前記秘密キーにより復号化し、前記復号化されたアドレスに基づき前記アプリケーションプログラムから読み出したデータと前記復号化されたデータと比較してメモリカードの真偽を判定することを特徴とするメモリカード装置。
Read the authentication data from a memory card that stores an application program comprising an address composed of random numbers, data readable by the address, and authentication data generated by encrypting the address and data. A memory card device for determining the authenticity of the memory card,
The device stores a secret key, decrypts the address and data from the authentication data with the secret key, and compares the data read from the application program based on the decrypted address with the decrypted data And determining whether the memory card is true or false.
乱数で構成されたアドレスと、前記アドレスにより読み出し可能なデータとからなるアプリケーションプログラムと、前記アドレスを前記秘密キーにより暗号化した認証アドレスと、該アドレスに格納されたデータを前記秘密キーにより変換した認証ハッシュ値からなる認証データとを格納したメモリカードから、前記認証データを読み出して前記メモリカードの真偽の判定を行うメモリカード装置であって、
前記装置は秘密キーを格納し、前記認証データを前記秘密キーにより復号化するとともに復号化されたアドレスに基づき前記アプリケーションプログラムから読み出されたデータを比較ハッシュ値に変換し、該ハッシュ値と前記認証ハッシュ値を比較してメモリカードの真偽を判定することを特徴とするメモリカード装置。
An application program composed of an address composed of random numbers, data readable by the address, an authentication address obtained by encrypting the address with the secret key, and data stored at the address converted by the secret key A memory card device that reads out the authentication data from a memory card that stores authentication data consisting of an authentication hash value and determines whether the memory card is true or false,
The device stores a secret key, decrypts the authentication data with the secret key, converts data read from the application program based on the decrypted address to a comparison hash value, and the hash value and the A memory card device that compares authentication hash values to determine whether a memory card is true or false.
前記メモリカード装置は、電源ボタンを備え、該電源ボタンを押下する毎に前記メモリカードの真偽を判定することを特徴とする請求項1または2記載のメモリカード装置。   3. The memory card device according to claim 1, wherein the memory card device includes a power button, and the authenticity of the memory card is determined each time the power button is pressed. 待ち状態が予め決められた時間だけ経過すると、前記装置を低消費電力モードに切り替えることを特徴とする請求項1または2記載のメモリカード装置。   3. The memory card device according to claim 1, wherein the device is switched to a low power consumption mode when a waiting state elapses for a predetermined time.
JP2005306963A 2005-10-21 2005-10-21 Memory card device Pending JP2006065885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005306963A JP2006065885A (en) 2005-10-21 2005-10-21 Memory card device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005306963A JP2006065885A (en) 2005-10-21 2005-10-21 Memory card device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP29844697A Division JP3793629B2 (en) 1997-10-30 1997-10-30 Memory card and memory card device

Publications (1)

Publication Number Publication Date
JP2006065885A true JP2006065885A (en) 2006-03-09

Family

ID=36112262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005306963A Pending JP2006065885A (en) 2005-10-21 2005-10-21 Memory card device

Country Status (1)

Country Link
JP (1) JP2006065885A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2120386A1 (en) 2008-05-13 2009-11-18 Sony Corporation Communication device, communication method, reader/writer, and communication system
JP2012058991A (en) * 2010-09-08 2012-03-22 Fujitsu Toshiba Mobile Communications Ltd Information processor
US8782756B2 (en) 2008-08-06 2014-07-15 Seiko Precision Inc. Time clock

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2120386A1 (en) 2008-05-13 2009-11-18 Sony Corporation Communication device, communication method, reader/writer, and communication system
US9407446B2 (en) 2008-05-13 2016-08-02 Sony Corporation Communication device, communication method, reader/writer, and communication system
US10291398B2 (en) 2008-05-13 2019-05-14 Sony Corporation Communication device, communication method, reader/writer, and communication system
US8782756B2 (en) 2008-08-06 2014-07-15 Seiko Precision Inc. Time clock
JP2012058991A (en) * 2010-09-08 2012-03-22 Fujitsu Toshiba Mobile Communications Ltd Information processor

Similar Documents

Publication Publication Date Title
JP3793629B2 (en) Memory card and memory card device
KR101885393B1 (en) Device for and method of handling sensitive data
EP1273996B1 (en) Secure bootloader for securing digital devices
US9251358B2 (en) System and method for providing secure access to system memory
TW413988B (en) Cryptographic system
JP5002205B2 (en) Data authentication method and data authentication system
JP2002281019A (en) Portable information storage medium and method for authenticating the same
US11328098B2 (en) Electronic circuit
CN114785503A (en) Cipher card, root key protection method thereof and computer readable storage medium
US9076002B2 (en) Stored authorization status for cryptographic operations
JP2006065885A (en) Memory card device
JP2007094879A (en) Authentication system for basic program of operating system, computer used for the same, and computer program
US20190044709A1 (en) Incorporating software date information into a key exchange protocol to reduce software tampering
JPH1115738A (en) Data accumulator having encryption function
JP2007206928A (en) License authentication method and license authentication device
JP4592337B2 (en) Data storage
JP2008060703A (en) Portable storage medium and terminal unit
JP5315422B2 (en) Data authentication method and data authentication system
JP2009111650A (en) Portable storage medium
CN108667594B (en) Software program module integrity detection method based on PKI public key algorithm
CN102129535A (en) Encryption method of nonvolatile computer system based on hardware and computer
JP2002230511A (en) Multiple authentication portable information processing medium
TWI592828B (en) En/decryption device of portable storage device and en/decryption method of the same
JP2006059227A (en) Ic card
JPH11219291A (en) License card manufacturing system

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060923

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060929

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20061013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090508

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20090901

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100209