JPH03171386A - Portable electronic device - Google Patents

Portable electronic device

Info

Publication number
JPH03171386A
JPH03171386A JP1311403A JP31140389A JPH03171386A JP H03171386 A JPH03171386 A JP H03171386A JP 1311403 A JP1311403 A JP 1311403A JP 31140389 A JP31140389 A JP 31140389A JP H03171386 A JPH03171386 A JP H03171386A
Authority
JP
Japan
Prior art keywords
subprogram
data
card
confirmation information
area
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
JP1311403A
Other languages
Japanese (ja)
Inventor
Ryoichi Kuriyama
量一 栗山
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
Toshiba Intelligent Technology Co Ltd
Original Assignee
Toshiba Corp
Toshiba Intelligent Technology 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 Toshiba Corp, Toshiba Intelligent Technology Co Ltd filed Critical Toshiba Corp
Priority to JP1311403A priority Critical patent/JPH03171386A/en
Priority to US07/618,638 priority patent/US5202923A/en
Priority to KR1019900019727A priority patent/KR930007047B1/en
Priority to FR9015077A priority patent/FR2655170B1/en
Publication of JPH03171386A publication Critical patent/JPH03171386A/en
Pending legal-status Critical Current

Links

Landscapes

  • Credit Cards Or The Like (AREA)

Abstract

PURPOSE:To execute a subprogram only when subprogram data is decided to be correct, and to prevent malfunction by checking correctness confirmation information stored in a correctness confirmation information storage means at the time of the execution of the subprogram. CONSTITUTION:A portable electronic device is constituted so that an IC card can be connected to a control part 3 consisting of a CPU, etc., through a card reader.writer 2, and the subprogram to be executed by the control part 3 can be registered in a nonvolatile memory in the IC card 1. Then, the correctness confirmation information storage means 25 to store the correctness confirmation information to decide whether the data of that subprogram is correct or not at the time of the execution of the subprogram is provided in the IC card 1. Accordingly, it can be decided whether the data of the subprogram is correct or not. Thus, only when the data of the subprogram is decided to be correct, the subprogram is executed, and the malfunction can be prevented.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえば消去可能な不揮発性メモリおよびC
PUなとの制御素子を有するIC(集枯同路)チップを
内蔵した、いわゆるICカードと称される携借可能電子
装置に係り、特に不揮発性メモリ内に制御素子によって
実行されるサブプログラムが登録可能な帯可能電子装置
に関する。
Detailed Description of the Invention [Object of the Invention] (Industrial Application Field) The present invention relates to erasable non-volatile memory and C
It relates to a portable electronic device called an IC card, which has a built-in IC (collection and collection and collection) chip that has a control element such as a PU. Relates to registrable wearable electronic devices.

(従来の技術) 近年、新たな携帯可能なデータ記憶媒体として、消去可
能な不揮発性メモリおよびCPUなどの制御素子を有す
るICチップを内蔵したICカードが開発されている。
(Prior Art) In recent years, as a new portable data storage medium, an IC card containing an IC chip having an erasable nonvolatile memory and a control element such as a CPU has been developed.

この種のICカードは、内蔵する制御素子によって内蔵
するメモリをアクセスし、外部装置からの要求に応じて
必要なデータの入出力を行なうものである。
This type of IC card accesses a built-in memory using a built-in control element, and inputs and outputs necessary data in response to a request from an external device.

最近、このようなICカードにおいて、不揮発性メモリ
内にカード内のメインプログラムより実行されるサブプ
ログラム(たとえばデータ書込時の暗号化プログラムな
ど)が登録可能なICカードが開発されている。
Recently, an IC card has been developed in which a subprogram (for example, an encryption program when writing data) executed by a main program in the card can be registered in a nonvolatile memory.

(発明が解決しようとする課題) 上記したようなサブプログラムが登録可能なICカード
において、サブプログラムを実行する際、そのサブプロ
グラムのデータが正当であるか?かを判断ずる必要があ
る。f)シ、サブプログラムデ・一タが正当でなかった
場含は誤動作を生じて1,まう。
(Problem to be Solved by the Invention) When executing a subprogram in an IC card in which a subprogram as described above can be registered, is the data of the subprogram valid? It is necessary to judge whether f) If the subprogram data is not valid, a malfunction will occur.

そこで、本発明は、ザブプログラムの実iテ11、シ、
そのザブプログラムのデータが正当であるか盃かをtl
I断でき、これ(、二より正ご1と判断きれたときのみ
ザブプログラムを丈行でき、誤動作を防止できる携帯可
能電子装置をJν供することを目的とする。
Therefore, the present invention provides the actual item 11 of the Zabu program,
Tl whether the data of that subprogram is valid or not.
It is an object of the present invention to provide a portable electronic device that can run a subprogram only when it is determined that the correct one is correct, and can prevent malfunctions.

[発明の構成] (課題を解決するための手段) 本発明は、lr1去可能な不J’lli発性メ毫りと、
この不押発性メモリに対1,てデータの読出しおよび書
込みを行なうための制御部をl!−fl〜、かつ選択的
に外部からのデータの入出力を行ない、前記不揮発性メ
モリ内にiij記制御部によって実行されるザブプログ
ラムが登■,A可能な携帯可能電子装置であって、前記
ザブプログラムの丈行特、そのザブプログラムのデータ
がi「当であるか否かを判断ずるi[当性W認情報を記
憶する正当性確認情報記憶手段を具崗し,たことを特徴
と1,ている。
[Structure of the Invention] (Means for Solving the Problems) The present invention provides a method for solving the problem,
A control unit for reading and writing data to this non-pushable memory is controlled by l! A portable electronic device capable of selectively inputting and outputting data from the outside, and registering a subprogram executed by the controller described in iii in the nonvolatile memory, A special feature of the Zab program is that the data of the Zab program is equipped with a validity confirmation information storage means for storing validity information for determining whether or not the data of the Zab program is valid. 1, there is.

(作 用) ザブプログラムの実行時、正当性確認情報記憶手段に紀
taキれている正当性確認情報をチェックすることによ
り、サブプログラムのデータが正当であるか否かを判断
できる。これにより、サブプログラムデータが正当占判
断きれたときのみサブプログラムを実行でき、誤動作を
防止することができる。
(Function) When a subprogram is executed, it can be determined whether or not the data of the subprogram is valid by checking the validation information stored in the validation information storage means. As a result, the subprogram can be executed only when the subprogram data can be correctly determined, and malfunctions can be prevented.

(実施例) 以下、本発明の一実施例について図面を#照して説明す
る。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.

第7図は本発明に係る携帯可能電子装置としてのICカ
ードを取扱う端末装置の構或例を示すものである。すな
わち、この端末装置は、ICカード1をカードリーダe
ライタ2を介してCPUなどからなる制御部3色接続可
能にするとLもに、制御部3にキーボード4、CRTデ
ィスプレイ装置5、プリンタ6およびフロッピィディス
ク装置7を接続1,て構成きれる。
FIG. 7 shows an example of the structure of a terminal device that handles an IC card as a portable electronic device according to the present invention. That is, this terminal device transfers the IC card 1 to the card reader e.
By making it possible to connect three color controllers consisting of CPUs and the like through the writer 2, a keyboard 4, a CRT display device 5, a printer 6, and a floppy disk device 7 can be connected to the controller 3.

ICカ一ド1は、ユーザが保持1,、たとえば商1,、
前記基本機能のうち心雲(な機能を選択1−て実行さぜ
る機能である。
IC card 1 is held by the user 1, for example, quotient 1,...
This is a function that selects and executes one of the basic functions mentioned above.

1=れらの諸機能を発揮させるために、1cカ一ド1は
例えば第5図1に示すように、制御部L1,てのIIQ
御素子(たとえばCPU)15、データメモリ16、プ
ログラムメモリ17、およびカードリーダ・ライタ2と
の電気的接触を得るためのコンタクト部18によって横
1戊されており、これらのうち破線内の部分(制御累子
15、データメモリ16、プログラムメモリ17)は1
つのICチップ(あるいは複数のICチップ)で構成さ
れてICカード本体内に埋設きれている。
1=In order to perform these various functions, the 1c card 1 has the control unit L1, the IIQ, as shown in FIG.
It is horizontally bordered by a contact part 18 for obtaining electrical contact with a control element (for example, a CPU) 15, a data memory 16, a program memory 17, and a card reader/writer 2, and the part within the broken line ( Control unit 15, data memory 16, program memory 17) are 1
It consists of one IC chip (or multiple IC chips) and is embedded within the IC card body.

プログラムメモリ17は、たとえばマスクROMで措成
島れており、前記各基本機能を実現するザブルーチンを
向えた制i素子−15の制御プログラムなどを記憶する
ものである。
The program memory 17 is, for example, a mask ROM, and is used to store control programs for the control element 15 for subroutines that implement the aforementioned basic functions.

データメモリ16は、各種データの記憶に使用され、た
εえばE E P R O Mなどの消去可能な不揮発
性メモリで構成されている。そして、データメモリ16
は、たとえば第1図に示すように、ザ品購入なと゛の際
にユーザのみが知得している暗証番号の参照や必要デー
タの蓄積などを行なうもので、第6図にその機能ブロッ
クを示す上うに、リード・ライト部11、昭証設定・暗
証照合部12、および暗号化・復号化部13などの基本
機能を実行する部分と、これらの基本機能を管理するス
ーパバイザ14とで構成されている。リードeライ1・
部11は、後述するデータメモリ16との間でデータを
読出(7、書込み、あるいは消去を行なう機能である。
The data memory 16 is used to store various data, and is composed of an erasable nonvolatile memory such as EEPROM. And data memory 16
For example, as shown in Figure 1, when purchasing a product, the system refers to a personal identification number known only to the user and stores necessary data. Figure 6 shows its functional blocks. It is composed of parts that execute basic functions such as a read/write section 11, a password setting/password verification section 12, and an encryption/decryption section 13, and a supervisor 14 that manages these basic functions. There is. Lead e-rai 1・
The unit 11 has a function of reading (7) writing or erasing data from/to a data memory 16, which will be described later.

M証設定・鴫証照合部12は、ユーザが設定l2た暗証
番号の記憶および読出禁+1、処理を行なうとともに、
暗証番号の設定後にその暗証番号の照合を行ない、以後
の処理の許可を与える機能である。暗号化・復号化部1
3は、たとえば通信回線を介l2て制御部3から他の端
末装置へデータを送(Hする場含の通(gデータの漏洩
、偽造を防止するための11B号化や暗号化されたデー
タの複号化を行なうものである。スーパバイザ14は、
力〜ドリーダ・ライタ2から人力された機能コドもしく
はデータの付加された機能コードを解読ブプログラムエ
リア21とユーザエリア22とに分割されている。サブ
プログラムエリア21は、サブプログラム登録コマンド
という命令でサブプログラムが登録されるエリアであり
、そのサブプログラムは、プログラムメモリ17内のメ
インプログラムより実行されるものである。サブプログ
ラムエリア21は、サブプログラムが登録されているか
否かを識別するフラグを記憶するフラグエリア23と、
サブプログラムデータを記憶するサブプログラムデータ
エリア24と、サブプログラムデータが正当であるか否
かを判断する正当性確認情報、すなわちフラグエリア2
3およびサブプログラムデータエリア24内の全てのデ
ータのXOR (俳他的論理和)を計算した結果を記憶
するBCC (ブロック◆チェック・キャラクタ)エリ
ア(正当性確認情報記憶手段)25とで構成される。ユ
ーザエリア22は、各種記憶データを格納するエリアで
ある。
The M ID setting/pass ID verification unit 12 stores the PIN number set by the user and processes the reading prohibition +1.
This is a function that verifies the password after setting the password and grants permission for further processing. Encryption/decryption section 1
3, for example, when transmitting data from the control unit 3 to another terminal device via a communication line (11B encryption and encrypted data to prevent data leakage and forgery). The supervisor 14 decrypts the
It is divided into a program area 21 and a user area 22 for decoding a function code input manually from the reader/writer 2 or a function code to which data is added. The subprogram area 21 is an area in which a subprogram is registered using a subprogram registration command, and the subprogram is executed by the main program in the program memory 17. The subprogram area 21 includes a flag area 23 that stores a flag for identifying whether or not a subprogram is registered;
A subprogram data area 24 that stores subprogram data, and validity confirmation information that determines whether or not the subprogram data is valid, that is, a flag area 2.
3 and a BCC (block◆check character) area (validity confirmation information storage means) 25 that stores the result of calculating the XOR (transitive disjunction) of all data in the subprogram data area 24. Ru. The user area 22 is an area for storing various types of storage data.

次に、このような構成において動作を説明する。Next, the operation in such a configuration will be explained.

まず、データメモリ16にサブプログラムを登録する際
は第2図に示すようなフォーマットを持つサブプログラ
ム登録命令データを入力する。この命令データは、図示
するようにサブプログラム登録機能コード、サブプログ
ラムデータ長、およびサブプログラムデータから構成さ
れている。
First, when registering a subprogram in the data memory 16, subprogram registration command data having a format as shown in FIG. 2 is input. This command data is composed of a subprogram registration function code, subprogram data length, and subprogram data as shown in the figure.

サブプログラムの登録動作は第3図に示すフローチャー
トにしたがって行なわれる。すなわち、サブプログラム
登録命令データが人力されると、制御素子15は、フラ
グエリア23内のフラグを参照することにより、サブプ
ログラムが既に登録されているか否かを識別する。この
とき、フラグが例えばroO(II)Jとなっていれば
、既に登録されていることを意味し、この場合、制御素
子15は、登録済みを意味するステータスを出力し、命
令データ待ち状態に戻る。
The subprogram registration operation is performed according to the flowchart shown in FIG. That is, when the subprogram registration command data is input manually, the control element 15 refers to the flag in the flag area 23 to identify whether or not the subprogram has already been registered. At this time, if the flag is roO(II)J, for example, it means that it has already been registered, and in this case, the control element 15 outputs a status that means registered, and enters the instruction data waiting state. return.

一方、フラグが例えばrFF(11)Jとなっていれば
、未登録を意味し、この場合、制御素子15は、人力さ
れた命令データ内のサブプログラムデータをサブプログ
ラムデータエリア24に書き込み、フラグエリア23内
のフラグを登録済み状態?00(I!))とする。そし
て、制御素子15は、フラグエリア23およびサブプロ
グラムデータエリア24内の全てのデータのXORを計
算した桔果を正当性確認情報としてBCCエリア25に
書込み、書込みが終了しだら書込終了を意味するステー
タスを出力し、命令データ待ち状態に戻る。
On the other hand, if the flag is rFF(11)J, for example, it means unregistered, and in this case, the control element 15 writes subprogram data in the manually inputted command data to the subprogram data area 24, and flags Is the flag in area 23 already registered? 00(I!)). Then, the control element 15 writes the result of calculating the XOR of all the data in the flag area 23 and the subprogram data area 24 to the BCC area 25 as validity confirmation information, and when the writing is completed, it means that the writing is finished. Outputs the status and returns to the instruction data waiting state.

次に、サブプログラムが実行される動作について第4図
に示すフローチャートを参照して説明する。サブプログ
ラムは、図示するようにプログラムメモリ17内のメイ
ンプログラムより実行される。まず、制御素子15は、
フラグエリア23内のフラグを■照することにより、サ
ブプログラムが既に登録されているか否かを識別し、登
録されていない場合( F F (I+)の場合)はメ
インプログラムに戻る。登録されている場合( 0 0
 (I1)の場合)、制御素子15は、フラグエリア2
3およびサブプログラムデータエリア24内の全てのデ
ータのXORを計算し、既にBCCエリア25に格納さ
れているBCCデータと比較し、両者が一致していれば
サブプログラムデータが正当であると判断してサブプロ
グラムを実行し、メインプログラムに戻る。すなわち、
サブプログラムが登録されている場合、そのサブプログ
ラムのデータが正当であるか否かを判断し、正当であれ
ばサブプログラムを実行し、メインプログラムに戻るも
のである。
Next, the operation of executing the subprogram will be explained with reference to the flowchart shown in FIG. The subprograms are executed from the main program in the program memory 17 as shown in the figure. First, the control element 15 is
By checking the flag in the flag area 23, it is determined whether the subprogram has already been registered, and if it has not been registered (in the case of FF (I+)), the process returns to the main program. If registered (0 0
(In the case of I1)), the control element 15 controls the flag area 2
3 and all the data in the subprogram data area 24, and compare it with the BCC data already stored in the BCC area 25. If the two match, it is determined that the subprogram data is valid. to execute the subprogram and return to the main program. That is,
If a subprogram is registered, it is determined whether the data of the subprogram is valid or not, and if the data is valid, the subprogram is executed and the process returns to the main program.

[発明の効果】 以上詳述したように本発明の携帯可能電子装置によれば
、サブプログラムの実行時、正当性確認情報記憶手段に
記憶されている正当性確認情報をチェックすることによ
り、サブプログラムのデータが正当であるか否かを判断
できる。これにより、サブプログラムデータが正当と判
断されたときのみサブプログラムを実行でき、誤動作を
防止することができる。
[Effects of the Invention] As detailed above, according to the portable electronic device of the present invention, when a subprogram is executed, by checking the validity confirmation information stored in the validity confirmation information storage means, the subprogram is executed. It can be determined whether the program data is valid or not. Thereby, the subprogram can be executed only when the subprogram data is determined to be valid, and malfunctions can be prevented.

【図面の簡単な説明】[Brief explanation of the drawing]

図は本発明の一実施例を説明するためのもので、第1図
はデータメモリの構成を示す図、第2図はサブプログラ
ム登録命令データのフォーマット例を示す図、第3図は
サブプログラムの登録動作を説明するフローヂャート、
箪4図はサブプログラムの実行動作を説明するフローヂ
ャー1・、第5図はICカードに内蔵するICチップの
構戚を示すブロック図、第6図はICカードの機能ブロ
ックを示す図、第7図は端末装置の構成を示すブロック
図である。 l・・・ICカード(携帯可能7株子装置)、2・・・
カードリーダ・ライタ、15・・・制御素子(制御部)
、16・・・データメモリ(不揮発性メモリ)、17・
・・プログラムメモリ、21・・・サブプログラムエリ
ア、22・・・ユーザエリア、23・・・フラグエリア
、24・・・サブプログラムデータエリア、25・・・
BCCエリア(正当性確認情報記憶手段)。
The figures are for explaining one embodiment of the present invention, and FIG. 1 is a diagram showing the configuration of a data memory, FIG. 2 is a diagram showing an example of the format of subprogram registration command data, and FIG. 3 is a diagram showing a subprogram registration command data format example. A flowchart explaining the registration operation of
Figure 4 is a flowchart 1 explaining the execution operation of the subprogram, Figure 5 is a block diagram showing the structure of the IC chip built into the IC card, Figure 6 is a diagram showing the functional blocks of the IC card, and Figure 7 is a diagram showing the functional blocks of the IC card. The figure is a block diagram showing the configuration of a terminal device. l...IC card (portable 7-share device), 2...
Card reader/writer, 15...control element (control unit)
, 16... data memory (non-volatile memory), 17.
...Program memory, 21...Subprogram area, 22...User area, 23...Flag area, 24...Subprogram data area, 25...
BCC area (validity confirmation information storage means).

Claims (1)

【特許請求の範囲】[Claims] 消去可能な不揮発性メモリと、この不揮発性メモリに対
してデータの読出しおよび書込みを行なうための制御部
を有し、かつ選択的に外部からのデータの入出力を行な
い、前記不揮発性メモリ内に前記制御部によって実行さ
れるサブプログラムが登録可能な携帯可能電子装置であ
って、前記サブプログラムの実行時、そのサブプログラ
ムのデータが正当であるか否かを判断する正当性確認情
報を記憶する正当性確認情報記憶手段を具備したことを
特徴とする携帯可能電子装置。
It has an erasable nonvolatile memory and a control unit for reading and writing data to the nonvolatile memory, and selectively inputs and outputs data from the outside, and stores data in the nonvolatile memory. A portable electronic device in which a subprogram executed by the control unit can be registered, and stores validity confirmation information for determining whether data of the subprogram is valid when the subprogram is executed. A portable electronic device characterized by comprising a validity confirmation information storage means.
JP1311403A 1989-11-30 1989-11-30 Portable electronic device Pending JPH03171386A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP1311403A JPH03171386A (en) 1989-11-30 1989-11-30 Portable electronic device
US07/618,638 US5202923A (en) 1989-11-30 1990-11-27 Portable electronic device capable of registering subprograms
KR1019900019727A KR930007047B1 (en) 1989-11-30 1990-11-30 Portable electronic apparatus
FR9015077A FR2655170B1 (en) 1989-11-30 1990-11-30 PORTABLE ELECTRONIC DEVICE CAPABLE OF RECORDING SUB-PROGRAMS.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1311403A JPH03171386A (en) 1989-11-30 1989-11-30 Portable electronic device

Publications (1)

Publication Number Publication Date
JPH03171386A true JPH03171386A (en) 1991-07-24

Family

ID=18016780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1311403A Pending JPH03171386A (en) 1989-11-30 1989-11-30 Portable electronic device

Country Status (1)

Country Link
JP (1) JPH03171386A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006252284A (en) * 2005-03-11 2006-09-21 Toshiba Corp Portable electronic device and ic card

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63234378A (en) * 1987-03-23 1988-09-29 Toshiba Corp Portable electronic device
JPS6459485A (en) * 1987-08-31 1989-03-07 Asahi Chemical Ind Ic card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63234378A (en) * 1987-03-23 1988-09-29 Toshiba Corp Portable electronic device
JPS6459485A (en) * 1987-08-31 1989-03-07 Asahi Chemical Ind Ic card

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006252284A (en) * 2005-03-11 2006-09-21 Toshiba Corp Portable electronic device and ic card
JP4764034B2 (en) * 2005-03-11 2011-08-31 株式会社東芝 Portable electronic device, IC card and portable electronic device self-diagnosis method

Similar Documents

Publication Publication Date Title
JP2856393B2 (en) Portable electronic devices
US5202923A (en) Portable electronic device capable of registering subprograms
JPS63182795A (en) Portable card and manufacture thereof
JP5177556B2 (en) IC card module
JPH021090A (en) Ic card and method for writing its operation program
US5039850A (en) IC card
JPH0654507B2 (en) Portable electronic device
JPH03171386A (en) Portable electronic device
JPH03175596A (en) Portable electronic equipment
JP3251579B2 (en) Portable electronic devices
JP3302348B2 (en) Portable electronic device and key matching method
JPH03171387A (en) Portable electronic device
JP2003162740A (en) Non-contact ic card system
JPH03171389A (en) Portable electronic device
JPH01194093A (en) Portable electronic device
KR930007047B1 (en) Portable electronic apparatus
JPH01248292A (en) Ic card
JPH03224047A (en) Portable electronic device
JPS636690A (en) Portable electronic device
JPH03224083A (en) Portable electronic device
JPS60153581A (en) Ic card having function inhibiting illegal use
JPS62128390A (en) Portable electronic device
JPH01177184A (en) Portable electronic device
JPH01177183A (en) Portable electronic device
JP2005056259A (en) Portable electronic medium and portable electronic medium handling device