JP5492172B2 - Portable electronic device, IC card and IC module - Google Patents

Portable electronic device, IC card and IC module Download PDF

Info

Publication number
JP5492172B2
JP5492172B2 JP2011242562A JP2011242562A JP5492172B2 JP 5492172 B2 JP5492172 B2 JP 5492172B2 JP 2011242562 A JP2011242562 A JP 2011242562A JP 2011242562 A JP2011242562 A JP 2011242562A JP 5492172 B2 JP5492172 B2 JP 5492172B2
Authority
JP
Japan
Prior art keywords
program
nonvolatile memory
stored
data
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011242562A
Other languages
Japanese (ja)
Other versions
JP2012033197A (en
Inventor
亜紀 福田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011242562A priority Critical patent/JP5492172B2/en
Publication of JP2012033197A publication Critical patent/JP2012033197A/en
Application granted granted Critical
Publication of JP5492172B2 publication Critical patent/JP5492172B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明の実施形態は、携帯可能電子装置、ICカードおよびICモジュールに関する。 Embodiments described herein relate generally to a portable electronic device , an IC card, and an IC module .

最近、携帯可能電子装置として、データメモリとしてのEEPROM、ワーキングメモリとしてのRAM、これらのメモリに対してアクセス(データの読出しおよびまたは書込み等)を行なう制御素子としてのCPU、および、CPUの動作用プログラム(コマンドを解釈して実行するプログラム等)を格納したプログラムメモリとしてのROMを有し、外部のカードリーダ・ライタから入力されるコマンドを解釈してデータの書込み処理や読出し処理を実行し、その結果を外部のカードリーダ・ライタへ出力するICカードが産業各方面で利用されている。   Recently, as a portable electronic device, an EEPROM as a data memory, a RAM as a working memory, a CPU as a control element for accessing (reading or writing data, etc.) the memory, and an operation of the CPU It has a ROM as a program memory that stores programs (programs that interpret and execute commands, etc.), interprets commands input from an external card reader / writer, executes data write processing and read processing, IC cards that output the result to an external card reader / writer are used in various industries.

一般に、この種のICカードにあっては、たとえば、データメモリ内にファイルを創生するファイル創生コマンドなどに対してメモリ書込みに関連する処理を行なうプログラム(プログラムコード)、あるいは、書込みコマンドや読出しコマンドに対してメモリ書込み処理や読出し処理を行なうプログラムなど、コマンドを解釈して実行するプログラムは、あらかじめROMに格納されているのが普通である。   In general, in this type of IC card, for example, a program (program code) for performing processing related to memory writing in response to a file creation command for creating a file in a data memory, a write command, A program that interprets and executes a command, such as a program that performs a memory write process or a read process in response to a read command, is usually stored in advance in a ROM.

しかしながら、従来は、上記したように、コマンドを解釈して実行するプログラムはROMにあらかじめ格納されており、そのため、ハードウェアの誤動作などの際にプログラムカウンタの値によっては、データメモリへのデータ誤書込み、あるいは、データメモリ内のデータの誤読出しを行なうことがあるという問題がある。   Conventionally, however, as described above, a program for interpreting and executing a command is stored in the ROM in advance. Therefore, depending on the value of the program counter in the event of a hardware malfunction, the data error to the data memory may be reduced. There is a problem that writing or erroneous reading of data in the data memory may occur.

特開2003−22425号公報JP 2003-22425 A

本発明が解決しようとする課題は、ハードウェアの誤動作などによるデータの誤書込みや誤読出しを未然に防止することができる携帯可能電子装置、ICカードおよびICモジュールを提供することを目的とする。 An object of the present invention is to provide a portable electronic device , an IC card, and an IC module that can prevent erroneous data writing and erroneous reading due to hardware malfunctions.

実施形態に係る携帯可能電子装置は、データを記憶する揮発性メモリと、命令を解釈して実行するプログラムのうち不揮発性メモリに対しデータを処理するためのプログラムを除く残りのプログラムがあらかじめ格納され、かつ、特定領域に前記不揮発性メモリに対しデータを処理するためのプログラムが本来とは異なる状態に変換されてあらかじめ格納された前記不揮発性メモリと、外部から命令が入力されると、前記不揮発性メモリの特定領域に本来とは異なる状態に変換されて格納されている前記不揮発性メモリに対しデータを処理するためのプログラムを本来の状態に変換してから前記揮発性メモリの特定領域に展開するとともに、前記不揮発性メモリに格納された当該命令を解釈して実行するプログラムを実行し、当該プログラムの実行中に前記揮発性メモリの特定領域に格納された本来の状態に変換された前記不揮発性メモリに対しデータを処理するためのプログラムを参照あるいは呼び出すことで当該プログラムを実行する処理手段とを具備する。 In the portable electronic device according to the embodiment, a volatile memory that stores data and a remaining program other than a program for processing data in the nonvolatile memory among programs that interpret and execute instructions are stored in advance. When the program for processing data for the nonvolatile memory in the specific area is converted into a state different from the original and stored in advance, and when an instruction is input from the outside, the nonvolatile memory A program for processing data in the non-volatile memory that has been converted to a different state from the original state and stored in a specific area of the volatile memory is converted into the original state and then expanded in the specific area of the volatile memory. And executing a program that interprets and executes the instruction stored in the nonvolatile memory. Processing means for executing the program by referring to or calling a program for processing data with respect to the nonvolatile memory converted into the original state stored in the specific area of the volatile memory during execution. To do.

実施形態に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すブロック図。The block diagram which shows the structural example of the IC card system which handles the IC card as a portable electronic device which concerns on embodiment. 実施形態に係るICカードの構成例を示すブロック図。The block diagram which shows the structural example of the IC card which concerns on embodiment. 実施形態に係るICカードに入力されるコマンドのフォーマットの一例を示す図。The figure which shows an example of the format of the command input into the IC card which concerns on embodiment. 実施形態に係るワーキングメモリの構成を概略的に示す模式図。The schematic diagram which shows roughly the structure of the working memory which concerns on embodiment. 第1の実施形態に係るプログラムメモリの構成およびワーキングメモリのプログラム格納領域との関係を示す模式図。The schematic diagram which shows the relationship between the structure of the program memory which concerns on 1st Embodiment, and the program storage area of a working memory. 第1の実施形態に係るコマンド処理の流れを説明するフローチャート。5 is a flowchart for explaining a flow of command processing according to the first embodiment. 第2の実施形態に係るプログラムメモリの構成およびワーキングメモリのプログラム格納領域との関係を示す模式図。The schematic diagram which shows the structure of the program memory which concerns on 2nd Embodiment, and the relationship with the program storage area of a working memory. 第2の実施形態に係るコマンド処理の流れを説明するフローチャート。10 is a flowchart for explaining a flow of command processing according to the second embodiment.

以下、実施形態に係る携帯可能電子装置としてのICカードについて図面を参照して説明する。
まず、第1の実施形態について説明する。
Hereinafter, an IC card as a portable electronic device according to an embodiment will be described with reference to the drawings.
First, the first embodiment will be described.

図1は、本実施形態に係る携帯可能電子装置としてのICカードを取扱うICカードシステムの構成例を示すものである。このICカードシステムは、ICカード101をカードリーダ・ライタ102を介してパーソナルコンピュータなどの端末装置103と接続可能にするとともに、端末装置103にキーボード104、CRT表示部105、プリンタ106を接続して構成される。   FIG. 1 shows a configuration example of an IC card system that handles an IC card as a portable electronic device according to the present embodiment. In this IC card system, an IC card 101 can be connected to a terminal device 103 such as a personal computer via a card reader / writer 102, and a keyboard 104, a CRT display unit 105, and a printer 106 are connected to the terminal device 103. Composed.

図2は、ICカード101の構成例を示すもので、制御手段としての制御素子(たとえば、CPU)201、記憶手段としてのデータメモリ202、ワーキングメモリ203、プログラムメモリ204、および、カードリーダ・ライタ102との通信を行なうための通信部205によって構成されている。そして、これらのうち、破線内の部分(制御素子201、データメモリ202、ワーキングメモリ203、プログラムメモリ204)は1つ(あるいは複数)のICチップ206で構成され、さらに、このICチップ206と通信部205とが接続された状態で一体的にICモジュール207化されて、ICカード本体(図示省略)内に埋設されている。   FIG. 2 shows a configuration example of the IC card 101. A control element (for example, CPU) 201 as a control means, a data memory 202 as a storage means, a working memory 203, a program memory 204, and a card reader / writer The communication unit 205 is configured to perform communication with the communication unit 102. Of these, the portion within the broken line (control element 201, data memory 202, working memory 203, program memory 204) is composed of one (or a plurality) of IC chips 206, and further communicates with this IC chip 206. The IC module 207 is integrated with the unit 205 in a connected state, and is embedded in an IC card body (not shown).

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

データメモリ202は、アプリケーションデータなどの各種データの記憶に使用され、たとえば、EEPROM(エレクトリカリ・イレーザブル・アンド・プログラマブル・リード・オンリ・メモリ)などの消去(書換え)可能な不揮発性メモリで構成されている。   The data memory 202 is used for storing various types of data such as application data, and includes, for example, an erasable (rewritable) non-volatile memory such as an EEPROM (Electrical Erasable and Programmable Read Only Memory). ing.

ワーキングメモリ203は、制御素子201が処理を行なう際の処理データや外部から入力されるプログラムの一部などを一時的に保持するための作業用メモリであり、たとえば、RAM(ランダム・アクセス・メモリ)などの揮発性メモリで構成されている。   The working memory 203 is a working memory for temporarily storing processing data when the control element 201 performs processing, a part of a program input from the outside, and the like, for example, a RAM (random access memory). ) And other volatile memories.

プログラムメモリ204は、たとえば、マスクROM(リード・オンリ・メモリ)などの書換え不可能な不揮発性メモリで構成されており、制御素子201が実行するコマンド処理プログラム(コマンドを解釈して実行するプログラム等)や固定の設定データなどが記憶される。   The program memory 204 is composed of, for example, a non-rewritable nonvolatile memory such as a mask ROM (read only memory), and a command processing program executed by the control element 201 (a program executed by interpreting a command, etc.) ) And fixed setting data are stored.

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

図3は、ICカード101に外部から入力されるコマンドのフォーマットの一例を示すものである。図3において、301はクラスバイト(CLA)、302はインストラクションバイト(INS)、303,304はパラメータバイト(P1,P2)、305はLcフィールド、306はコマンドデータフィールド、307はLeフィールドと呼ばれ、コマンドデータフィールド306にダウンロードする一部のプログラムが暗号化されて格納される。   FIG. 3 shows an example of the format of a command input from the outside to the IC card 101. In FIG. 3, 301 is called a class byte (CLA), 302 is an instruction byte (INS), 303 and 304 are parameter bytes (P1, P2), 305 is an Lc field, 306 is a command data field, and 307 is called a Le field. A part of the program to be downloaded is encrypted and stored in the command data field 306.

図4は、ワーキングメモリ203の構成を概略的に示すものである。ワーキングメモリ203は、外部から受信したコマンドを一時格納するコマンドバッファ領域401、および、コマンドに付加されて入力される一部のプログラムを一時的に格納するプログラム格納領域402を有している。   FIG. 4 schematically shows the configuration of the working memory 203. The working memory 203 has a command buffer area 401 for temporarily storing a command received from the outside, and a program storage area 402 for temporarily storing a part of a program input in addition to the command.

図5は、第1の実施形態に係るプログラムメモリ204の構成、および、ワーキングメモリ203のプログラム格納領域402との関係を示している。プログラムメモリ204は、コマンド処理プログラムが格納されているコマンド処理プログラム領域501、コマンドに付加されて入力される暗号化された一部のプログラムを復号化する復号化処理プログラムが格納されている復号化処理プログラム領域502、ワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを呼び出すためのプログラム呼び出しプログラムが格納されているプログラム呼び出しプログラム領域503、コマンド処理プログラムが格納されているコマンド処理プログラム領域504を有していて、その順番にプログラム処理が実行される。   FIG. 5 shows the configuration of the program memory 204 according to the first embodiment and the relationship with the program storage area 402 of the working memory 203. The program memory 204 has a command processing program area 501 in which a command processing program is stored, and a decryption processing program in which a decryption processing program for decrypting a part of the encrypted program added to the command and input is stored. Processing program area 502, program calling program area 503 storing a program calling program for calling a part of the program stored in the program storage area 402 of the working memory 203, command processing program storing a command processing program An area 504 is provided, and program processing is executed in that order.

次に、上記のような構成において、第1の実施形態に係るコマンド処理について図6に示すフローチャートを参照して説明する。   Next, command processing according to the first embodiment in the above configuration will be described with reference to the flowchart shown in FIG.

まず、プログラムメモリ204のコマンド処理プログラム領域501,504には、コマンド処理プログラム(コマンドを解釈して実行するプログラム)のうち一部のプログラム(たとえば、データの書込み処理プログラムおよびデータの読出し処理プログラム)を除く残りのプログラムがあらかじめ格納されているものとする。また、上記一部のプログラムは、コマンドのコマンドデータフィールド306に暗号化されて格納され、コマンドとともに入力されるものとする。   First, in the command processing program areas 501 and 504 of the program memory 204, some of the command processing programs (programs that interpret and execute commands) (for example, data write processing programs and data read processing programs). It is assumed that the remaining programs except for are stored in advance. The part of the program is encrypted and stored in the command data field 306 of the command, and is input together with the command.

さて、カードリーダ・ライタ102から送信されるコマンドを受信すると(ステップS1)、制御素子201は、受信したコマンドをワーキングメモリ203のコマンドバッファ領域401に格納した後(ステップS2)、プログラムメモリ204のコマンド処理プログラム領域501に格納されたプログラムに基づくコマンド処理を開始する(ステップS3)。   When a command transmitted from the card reader / writer 102 is received (step S1), the control element 201 stores the received command in the command buffer area 401 of the working memory 203 (step S2), and then stores the received command in the program memory 204. Command processing based on the program stored in the command processing program area 501 is started (step S3).

ステップS3の処理が終了すると、制御素子201は、復号化処理プログラム領域502に格納されたプログラムの処理に進み、コマンドに付加されて入力された一部のプログラムの復号化処理を行なう(ステップS4)。すなわち、ワーキングメモリ203のコマンドバッファ領域401に格納されているコマンドのコマンドデータフィールド306内の暗号化されたデータ(すなわち、一部のプログラム)を復号化する。   When the process of step S3 is completed, the control element 201 proceeds to the process of the program stored in the decryption process program area 502, and performs the decryption process of a part of the program added to the command and input (step S4). ). That is, the encrypted data (that is, a part of the program) in the command data field 306 of the command stored in the command buffer area 401 of the working memory 203 is decrypted.

次に、制御素子201は、復号化した一部のプログラムをワーキングメモリ203のプログラム格納領域402に格納する(ステップS5)。
ステップS5の処理が終了すると、制御素子201は、プログラム呼び出しプログラム領域503に格納されたプログラムの処理に進む(ステップS6)。すなわち、ワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを呼び出して、そのプログラム処理(たとえば、データメモリ202に対するデータ書込み処理やデータ読出し処理等)を実施する。
Next, the control element 201 stores a part of the decrypted program in the program storage area 402 of the working memory 203 (step S5).
When the process of step S5 is completed, the control element 201 proceeds to the process of the program stored in the program call program area 503 (step S6). That is, a part of the program stored in the program storage area 402 of the working memory 203 is called and the program processing (for example, data writing processing or data reading processing for the data memory 202) is performed.

ステップS6の処理が終了すると、制御素子201は、プログラムメモリ204のコマンド処理プログラム領域504に格納されたプログラムに基づくコマンド処理に戻る(ステップS7)。   When the process of step S6 ends, the control element 201 returns to the command process based on the program stored in the command process program area 504 of the program memory 204 (step S7).

ステップS7の処理が終了すると、制御素子201は、ワーキングメモリ203のプログラム格納領域402に対しホールト(HALT)処理を実施し(ステップS8)、コマンド処理を全て終了する。   When the process of step S7 ends, the control element 201 performs a halt (HALT) process on the program storage area 402 of the working memory 203 (step S8) and ends all the command processes.

このように、第1の実施形態によれば、コマンドを解釈して実行するプログラムのうち一部のプログラムを除く残りのプログラムはプログラムメモリ204に格納し、一部のプログラムは外部から入力されるコマンドによりワーキングメモリ203のプログラム格納領域402に格納し、当該コマンドを解釈して実行するプログラムの実行中にワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを参照あるいは呼び出して処理を実行することで、ハードウェアの誤動作などによるデータメモリ202に対するデータの誤書込みや誤読出しを未然に防止することができる。   Thus, according to the first embodiment, of the programs that interpret and execute commands, the remaining programs except for some programs are stored in the program memory 204, and some programs are input from the outside. A command is stored in the program storage area 402 of the working memory 203 by a command, and processing is performed by referring to or calling a part of the program stored in the program storage area 402 of the working memory 203 during execution of the program that interprets and executes the command. By executing this, it is possible to prevent erroneous writing or erroneous reading of data in the data memory 202 due to a hardware malfunction or the like.

次に、第2の実施形態について説明する。
第2の実施形態の第1の実施形態と異なる点は、第1の実施形態のように一部のプログラムをコマンドに付加して入力するのではなく、一部のプログラムをプログラムメモリ204の特定領域にあらかじめ格納しておき、コマンドが入力されると、その特定領域内の一部のプログラムをワーキングメモリ203のプログラム格納領域402に展開して使用する点にあり、その外は第1の実施形態と同様であるので説明は省略し、異なる点についてだけ以下に説明する。
Next, a second embodiment will be described.
The difference of the second embodiment from the first embodiment is that a part of the program is specified in the program memory 204 instead of being input by adding a part of the program to the command as in the first embodiment. When a command is input, the program is stored in advance in the area, and a part of the program in the specific area is expanded and used in the program storage area 402 of the working memory 203. The rest is the first implementation. Since it is the same as the embodiment, the description is omitted, and only different points will be described below.

図7は、第2の実施形態に係るプログラムメモリ204の構成、および、ワーキングメモリ203のプログラム格納領域402との関係を示している。プログラムメモリ204は、コマンド処理プログラムが格納されているコマンド処理プログラム領域501、一部のプログラムが本来とは異なる状態に変換されて、たとえば、暗号化されて格納されているとともに、その暗号化された一部のプログラムを復号化してワーキングメモリ203のプログラム格納領域402に展開するプログラム展開処理プログラムが格納されているプログラム展開処理プログラム領域505、ワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを呼び出すためのプログラム呼び出しプログラムが格納されているプログラム呼び出しプログラム領域503、コマンド処理プログラムが格納されているコマンド処理プログラム領域504を有していて、その順番にプログラム処理が実行される。   FIG. 7 shows the configuration of the program memory 204 according to the second embodiment and the relationship with the program storage area 402 of the working memory 203. In the program memory 204, a command processing program area 501 in which a command processing program is stored, a part of the program is converted into a state different from the original, for example, encrypted and stored. The program expansion processing program area 505 in which a program expansion processing program for decoding a part of the program and expanding it in the program storage area 402 of the working memory 203 is stored, and the part stored in the program storage area 402 of the working memory 203 A program calling program area 503 in which a program calling program for calling the program is stored, and a command processing program area 504 in which a command processing program is stored. It is the row.

次に、上記のような構成において、第2の実施形態に係るコマンド処理について図8に示すフローチャートを参照して説明する。   Next, command processing according to the second embodiment in the above configuration will be described with reference to the flowchart shown in FIG.

まず、プログラムメモリ204のコマンド処理プログラム領域501,504には、コマンド処理プログラム(コマンドを解釈して実行するプログラム)のうち一部のプログラム(たとえば、データの書込み処理プログラムおよびデータの読出し処理プログラム)を除く残りのプログラムがあらかじめ格納されているものとする。また、上記一部のプログラムは、プログラムメモリ204のプログラム展開処理プログラム領域505にあらかじめ暗号化されて格納されているものとする。   First, in the command processing program areas 501 and 504 of the program memory 204, some of the command processing programs (programs that interpret and execute commands) (for example, data write processing programs and data read processing programs). It is assumed that the remaining programs except for are stored in advance. Further, it is assumed that the above-mentioned part of the program is pre-encrypted and stored in the program development processing program area 505 of the program memory 204.

さて、カードリーダ・ライタ102から送信されるコマンドを受信すると(ステップS11)、制御素子201は、受信したコマンドをワーキングメモリ203のコマンドバッファ領域401に格納した後(ステップS12)、プログラムメモリ204のコマンド処理プログラム領域501に格納されたプログラムに基づくコマンド処理を開始する(ステップS13)。   When a command transmitted from the card reader / writer 102 is received (step S11), the control element 201 stores the received command in the command buffer area 401 of the working memory 203 (step S12), and then stores the received command in the program memory 204. Command processing based on the program stored in the command processing program area 501 is started (step S13).

ステップS13の処理が終了すると、制御素子201は、プログラム展開処理プログラム領域505に格納されたプログラムの処理に進み、展開する一部のプログラムの変換処理(復号化)を行なう(ステップS14)。すなわち、プログラムメモリ204のプログラム展開処理プログラム領域505に暗号化されて格納されている一部のプログラムを復号化する。   When the process of step S13 is completed, the control element 201 proceeds to the process of the program stored in the program expansion process program area 505, and performs the conversion process (decoding) of a part of the program to be expanded (step S14). That is, a part of the program encrypted and stored in the program expansion processing program area 505 of the program memory 204 is decrypted.

次に、制御素子201は、復号化した一部のプログラムをワーキングメモリ203のプログラム格納領域402に格納(展開)する(ステップS15)。
ステップS15の処理が終了すると、制御素子201は、プログラム呼び出しプログラム領域503に格納されたプログラムの処理に進む(ステップS16)。すなわち、ワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを呼び出して、そのプログラム処理(たとえば、データメモリ202に対するデータ書込み処理やデータ読出し処理等)を実施する。
Next, the control element 201 stores (decompresses) a part of the decrypted program in the program storage area 402 of the working memory 203 (step S15).
When the process of step S15 ends, the control element 201 proceeds to the process of the program stored in the program call program area 503 (step S16). That is, a part of the program stored in the program storage area 402 of the working memory 203 is called and the program processing (for example, data writing processing or data reading processing for the data memory 202) is performed.

ステップS16の処理が終了すると、制御素子201は、プログラムメモリ204のコマンド処理プログラム領域504に格納されたプログラムに基づくコマンド処理に戻る(ステップS17)。   When the process of step S16 ends, the control element 201 returns to the command process based on the program stored in the command processing program area 504 of the program memory 204 (step S17).

ステップS17の処理が終了すると、制御素子201は、ワーキングメモリ203のプログラム格納領域402に対しホールト(HALT)処理を実施し(ステップS18)、コマンド処理を全て終了する。   When the process of step S17 is completed, the control element 201 performs a halt (HALT) process on the program storage area 402 of the working memory 203 (step S18) and ends all the command processes.

このように、第2の実施形態によれば、コマンドを解釈して実行するプログラムのうち一部のプログラムを除く残りのプログラムはプログラムメモリ204に格納するとともに、一部のプログラムはプログラムメモリ204のプログラム展開処理プログラム領域505に格納しておき、コマンドが入力されると、プログラムメモリ204のプログラム展開処理プログラム領域505に格納されている一部のプログラムをワーキングメモリ203のプログラム格納領域402に展開し、当該コマンドを解釈して実行するプログラムの実行中にワーキングメモリ203のプログラム格納領域402に格納された一部のプログラムを参照あるいは呼び出して処理を実行することで、ハードウェアの誤動作などによるデータメモリ202に対するデータの誤書込みや誤読出しを未然に防止することができる。   As described above, according to the second embodiment, among the programs that interpret and execute commands, the remaining programs except for some programs are stored in the program memory 204, and some programs are stored in the program memory 204. When stored in the program expansion process program area 505 and a command is input, a part of the program stored in the program expansion process program area 505 of the program memory 204 is expanded in the program storage area 402 of the working memory 203. A data memory caused by a hardware malfunction or the like by executing a process by referring to or calling a part of the program stored in the program storage area 402 of the working memory 203 during execution of a program that interprets and executes the command. Day 202 It is possible to prevent the erroneous writing and erroneous reading in advance.

なお、前記実施形態では、携帯可能情報処理媒体として非接触式ICカードに適用した場合について説明したが、これに限定されるものではなく、たとえば、非接触式ICカードの機能を備えたPDAと称される携帯端末装置や携帯電話機などであっても適用でき、また、カード型に限らず、冊子型、ブロック形あるいはタグ型であってもよい。   In the above embodiment, the case where the portable information processing medium is applied to a non-contact type IC card has been described. However, the present invention is not limited to this. For example, a PDA having a function of a non-contact type IC card and The present invention can also be applied to a portable terminal device or a mobile phone referred to, and is not limited to a card type, but may be a booklet type, a block type, or a tag type.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行なうことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.

101…ICカード(携帯可能電子装置)、102…カードリーダ・ライタ、103…端末装置、104…キーボード、105…CRT表示部、106…プリンタ、201…制御素子(CPU)、202…データメモリ、203…ワーキングメモリ、204…プログラムメモリ、205…通信部、206…ICチップ、207…ICモジュール。   DESCRIPTION OF SYMBOLS 101 ... IC card (portable electronic device), 102 ... Card reader / writer, 103 ... Terminal device, 104 ... Keyboard, 105 ... CRT display part, 106 ... Printer, 201 ... Control element (CPU), 202 ... Data memory, 203 ... Working memory, 204 ... Program memory, 205 ... Communication unit, 206 ... IC chip, 207 ... IC module.

Claims (5)

データを記憶する揮発性メモリと、
命令を解釈して実行するプログラムのうち不揮発性メモリに対しデータを処理するための一部のプログラムを除く残りのプログラムがあらかじめ格納され、かつ、特定領域に前記不揮発性メモリに対しデータを処理するための一部のプログラムが本来とは異なる状態に変換されてあらかじめ格納された前記不揮発性メモリと、
外部から命令が入力されると、前記不揮発性メモリの特定領域に本来とは異なる状態に変換されて格納されている前記不揮発性メモリに対しデータを処理するための一部のプログラムを本来の状態に変換してから前記揮発性メモリの特定領域に展開するとともに、前記不揮発性メモリに格納された当該命令を解釈して実行するプログラムを実行し、当該プログラムの実行中に前記揮発性メモリの特定領域に格納された本来の状態に変換された前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出すことで当該プログラムを実行する処理手段と、
を具備し、
前記不揮発性メモリに対しデータを処理するための一部のプログラムは、前記不揮発性メモリに対し外部から入力されるデータを書込む書込み処理を行なうためのプログラム、および、前記不揮発性メモリ内のデータを外部へ読出す読出し処理を行なうためのプログラムであり、
前記不揮発性メモリは、プログラム呼び出しプログラム領域を備え、
前記処理手段は、前記プログラム呼び出しプログラム領域に格納されたプログラム呼び出しプログラムに基づき、前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出す携帯可能電子装置。
Volatile memory for storing data;
Of the programs that interpret and execute instructions, the remaining programs except for some programs for processing data in the nonvolatile memory are stored in advance, and the data is processed in the specific area in the nonvolatile memory The non-volatile memory in which a part of the program is converted into a state different from the original state and stored in advance,
When an instruction is input from the outside, a part of the program for processing data for the nonvolatile memory stored in the non-volatile memory after being converted into a state different from the original state is restored to the original state. The program is expanded into a specific area of the volatile memory after being converted to the program, and a program that interprets and executes the instruction stored in the nonvolatile memory is executed, and the volatile memory is specified during the execution of the program. Processing means for executing the program by calling a part of the program for processing data to the nonvolatile memory converted into the original state stored in the area;
Comprising
Some programs for processing data in the nonvolatile memory include a program for performing a writing process for writing data input from the outside to the nonvolatile memory, and data in the nonvolatile memory. Is a program for performing read processing to read out to the outside,
The nonvolatile memory includes a program call program area,
The processing means, based on the program call program stored in said program call program area, portable electronic device to call a part of a program for processing data to the nonvolatile memory.
前記揮発性メモリの特定領域は、前記一部のプログラムが格納されていないときにホールト(HALT)処理が施されている請求項1記載の携帯可能電子装置。   The portable electronic device according to claim 1, wherein the specific area of the volatile memory is subjected to a halt process when the part of the program is not stored. 前記揮発性メモリの特定領域に対するホールト(HALT)処理は、命令処理の終了時にその都度実施される請求項1記載の携帯可能電子装置。   The portable electronic device according to claim 1, wherein a halt (HALT) process for a specific area of the volatile memory is performed each time an instruction process ends. データを記憶する揮発性メモリと、命令を解釈して実行するプログラムのうち不揮発性メモリに対しデータを処理するための一部のプログラムを除く残りのプログラムがあらかじめ格納され、かつ、特定領域に前記不揮発性メモリに対しデータを処理するための一部のプログラムが本来とは異なる状態に変換されてあらかじめ格納された前記不揮発性メモリと、外部から命令が入力されると、前記不揮発性メモリの特定領域に本来とは異なる状態に変換されて格納されている前記不揮発性メモリに対しデータを処理するための一部のプログラムを本来の状態に変換してから前記揮発性メモリの特定領域に展開するとともに、前記不揮発性メモリに格納された当該命令を解釈して実行するプログラムを実行し、当該プログラムの実行中に前記揮発性メモリの特定領域に格納された本来の状態に変換された前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出すことで当該プログラムを実行する処理手段とを有して構成されるICモジュールと、
このICモジュールを収納したICカード本体と、
を具備し、
前記不揮発性メモリに対しデータを処理するための一部のプログラムは、前記不揮発性メモリに対し外部から入力されるデータを書込む書込み処理を行なうためのプログラム、および、前記不揮発性メモリ内のデータを外部へ読出す読出し処理を行なうためのプログラムであり、
前記不揮発性メモリは、プログラム呼び出しプログラム領域を備え、
前記処理手段は、前記プログラム呼び出しプログラム領域に格納されたプログラム呼び出しプログラムに基づき、前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出すICカード。
A volatile memory for storing data and a program other than a part of the program for processing the data in the nonvolatile memory among the programs for interpreting and executing the instructions are stored in advance, and the specific area has the aforementioned program A part of a program for processing data to the nonvolatile memory is converted into a state different from the original and stored in advance, and when an instruction is input from the outside, the nonvolatile memory is specified. A part of a program for processing data for the nonvolatile memory stored in the area after being converted to a state different from the original state is converted to the original state, and then expanded to a specific area of the volatile memory. At the same time, a program that interprets and executes the instruction stored in the nonvolatile memory is executed, and the program is executed during the execution of the program. And processing means for executing the program by calling a part of the program for processing the data to the nonvolatile memory converted into the original state stored in the specific area of the memory. IC module
An IC card body containing the IC module;
Comprising
Some programs for processing data in the nonvolatile memory include a program for performing a writing process for writing data input from the outside to the nonvolatile memory, and data in the nonvolatile memory. Is a program for performing read processing to read out to the outside,
The nonvolatile memory includes a program call program area,
The processing means, based on the program call program stored in said program call program area, IC card to call a part of a program for processing data to the nonvolatile memory.
データを記憶する揮発性メモリと、
命令を解釈して実行するプログラムのうち不揮発性メモリに対しデータを処理するための一部のプログラムを除く残りのプログラムがあらかじめ格納され、かつ、特定領域に前記不揮発性メモリに対しデータを処理するための一部のプログラムが本来とは異なる状態に変換されてあらかじめ格納された前記不揮発性メモリと、
外部から命令が入力されると、前記不揮発性メモリの特定領域に本来とは異なる状態に変換されて格納されている前記不揮発性メモリに対しデータを処理するための一部のプログラムを本来の状態に変換してから前記揮発性メモリの特定領域に展開するとともに、前記不揮発性メモリに格納された当該命令を解釈して実行するプログラムを実行し、当該プログラムの実行中に前記揮発性メモリの特定領域に格納された本来の状態に変換された前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出すことで当該プログラムを実行する処理手段と、
を具備し、
前記不揮発性メモリに対しデータを処理するための一部のプログラムは、前記不揮発性メモリに対し外部から入力されるデータを書込む書込み処理を行なうためのプログラム、および、前記不揮発性メモリ内のデータを外部へ読出す読出し処理を行なうためのプログラムであり、
前記不揮発性メモリは、プログラム呼び出しプログラム領域を備え、
前記処理手段は、前記プログラム呼び出しプログラム領域に格納されたプログラム呼び出しプログラムに基づき、前記不揮発性メモリに対しデータを処理するための一部のプログラムを呼び出すICモジュール。
Volatile memory for storing data;
Of the programs that interpret and execute instructions, the remaining programs except for some programs for processing data in the nonvolatile memory are stored in advance, and the data is processed in the specific area in the nonvolatile memory The non-volatile memory in which a part of the program is converted into a state different from the original state and stored in advance,
When an instruction is input from the outside, a part of the program for processing data for the nonvolatile memory stored in the non-volatile memory after being converted into a state different from the original state is restored to the original state. The program is expanded into a specific area of the volatile memory after being converted to the program, and a program that interprets and executes the instruction stored in the nonvolatile memory is executed, and the volatile memory is specified during the execution of the program. Processing means for executing the program by calling a part of the program for processing data to the nonvolatile memory converted into the original state stored in the area;
Comprising
Some programs for processing data in the nonvolatile memory include a program for performing a writing process for writing data input from the outside to the nonvolatile memory, and data in the nonvolatile memory. Is a program for performing read processing to read out to the outside,
The nonvolatile memory includes a program call program area,
The processing means, IC module invoking the basis of the program calling program stored program calling program in the area, part of a program for processing data to the nonvolatile memory.
JP2011242562A 2011-11-04 2011-11-04 Portable electronic device, IC card and IC module Active JP5492172B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011242562A JP5492172B2 (en) 2011-11-04 2011-11-04 Portable electronic device, IC card and IC module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011242562A JP5492172B2 (en) 2011-11-04 2011-11-04 Portable electronic device, IC card and IC module

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006224322A Division JP2008047041A (en) 2006-08-21 2006-08-21 Portable electronic device and ic card

Publications (2)

Publication Number Publication Date
JP2012033197A JP2012033197A (en) 2012-02-16
JP5492172B2 true JP5492172B2 (en) 2014-05-14

Family

ID=45846457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011242562A Active JP5492172B2 (en) 2011-11-04 2011-11-04 Portable electronic device, IC card and IC module

Country Status (1)

Country Link
JP (1) JP5492172B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0250787A (en) * 1988-08-12 1990-02-20 Hitachi Maxell Ltd Ic card and its program rewriting system
EP0750283A4 (en) * 1994-03-08 2000-03-01 Oki Electric Ind Co Ltd Transaction processing system and transaction processing method
JP4080079B2 (en) * 1998-11-20 2008-04-23 大日本印刷株式会社 IC card

Also Published As

Publication number Publication date
JP2012033197A (en) 2012-02-16

Similar Documents

Publication Publication Date Title
KR101783526B1 (en) Ic card, electronic device and portable electronic device
JP5795921B2 (en) IC card, portable electronic device, and IC card control method
JP4896842B2 (en) Portable electronic device
JP5492172B2 (en) Portable electronic device, IC card and IC module
JP2007115187A (en) Portable electronic device and ic card
JP4950533B2 (en) Portable electronic device and IC card
JP2008299416A (en) Portable electronic device, file access method in portable electronic device, and ic card
JP5341947B2 (en) IC card, control method of IC card, and control method of portable electronic device
JP4950730B2 (en) Portable electronic device, file access method and IC card in portable electronic device
JP4868979B2 (en) Portable electronic device and IC card
JP2006293706A (en) Multi-application ic card with application updating function
JP2008047041A (en) Portable electronic device and ic card
JP4836707B2 (en) Portable electronic device and IC card
JP6102305B2 (en) IC chip issuance program, IC chip issuance control device, and IC card issuance system
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
JP2004334745A (en) Ic card
JP2014186367A (en) Ic card and portable electronic device
JP7438432B1 (en) Electronic information storage medium, IC chip, IC card, record writing method, and program
JP2012133656A (en) Portable electronic apparatus and ic card
JP5269661B2 (en) Portable electronic device and method for controlling portable electronic device
JP4810108B2 (en) IC card and control method thereof
JP5112123B2 (en) Portable electronic device and IC card
JP4533665B2 (en) Portable electronic device
JP2007034434A (en) Ic card, method for writing data to ic card, and ic card program
JP2008071185A (en) Portable electronic equipment and ic card

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130108

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130311

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130716

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131016

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20131023

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140117

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140228

R151 Written notification of patent or utility model registration

Ref document number: 5492172

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151