JP2720701B2 - Program writing device for IC card - Google Patents
Program writing device for IC cardInfo
- Publication number
- JP2720701B2 JP2720701B2 JP4105946A JP10594692A JP2720701B2 JP 2720701 B2 JP2720701 B2 JP 2720701B2 JP 4105946 A JP4105946 A JP 4105946A JP 10594692 A JP10594692 A JP 10594692A JP 2720701 B2 JP2720701 B2 JP 2720701B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- card
- code
- object program
- writing
- 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.)
- Expired - Lifetime
Links
Landscapes
- Stored Programmes (AREA)
- Storage Device Security (AREA)
- Devices For Executing Special Programs (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明はICカードのデータメモ
リ中にソースファイルからプログラムをダウンロードす
るICカード用プログラム書き込み装置、詳しくはダウ
ンロードするプログラムが正常か否かの確認を行ってダ
ウンロードすることにより、ICカードでのプログラム
の正常動作を保証するプログラム書き込み装置に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program writing device for an IC card which downloads a program from a source file into a data memory of the IC card. And a program writing device for guaranteeing a normal operation of a program in an IC card.
【0002】[0002]
【従来の技術】ICカードのデータメモリ中にソースフ
ァイルからアプリケーションプログラムをダウンロード
してこのプログラムを使用する場合がある。この場合に
おいて、ソースプログラムからオブジェクトプログラム
に翻訳(コンパイル)した際に、そのプログラムにコン
パイルエラーが生じていれば、コンパイルエラーリスト
に示される。しかし、このコンパイルエラーリストを見
逃すと、中途半端なオブジェクトプログラムをICカー
ドにダウンロードしてしまう結果となる。すなわち、I
Cカードにダウンロードする際には、そのオブジェクト
プログラムが正常に翻訳されたものか否かを判別するこ
とは不可能であった。2. Description of the Related Art In some cases, an application program is downloaded from a source file into a data memory of an IC card and used. In this case, when the source program is translated (compiled) into an object program, if a compile error occurs in the program, it is indicated in a compile error list. However, if this compile error list is overlooked, an incomplete object program will be downloaded to the IC card. That is, I
When downloading the object program to the C card, it was impossible to determine whether or not the object program was correctly translated.
【0003】[0003]
【発明が解決しようとする課題】このように従来のIC
カードへのプログラム書き込み装置においては、メモリ
への不正なプログラムまたはコンパイルエラーを有する
プログラムの書き込みを防止することができず、このた
め、ICカードの不正な使用、例えばデータの改ざん等
を防ぐことができなかった。また、プログラムの暴走、
データの破壊を防止することができなかった。As described above, the conventional IC
In a device for writing a program to a card, it is not possible to prevent an unauthorized program or a program having a compile error from being written into a memory, and therefore, it is possible to prevent an unauthorized use of an IC card, for example, falsification of data. could not. Also, program runaway,
Data destruction could not be prevented.
【0004】そこで、本発明は、ICカードの不正使
用、例えばメモリのデータの改ざんを防止するととも
に、そのプログラムの暴走、データの破壊を防止するこ
とができるICカード用プログラム書き込み装置を提供
することを、その目的としている。SUMMARY OF THE INVENTION Accordingly, the present invention provides an IC card program writing device capable of preventing unauthorized use of an IC card, for example, falsification of data in a memory, and preventing runaway of the program and destruction of the data. For that purpose.
【0005】[0005]
【課題を解決するための手段】請求項1に記載の発明
は、ICカードにプログラムを書き込むICカード用プ
ログラム書き込み装置において、ソースプログラムをオ
ブジェクトプログラムに翻訳する翻訳手段と、このオブ
ジェクトプログラムに翻訳のエラーが存在するか否か、
および、このオブジェクトプログラムが正当に作成され
たか否かをチェックするチェック手段と、正当に作成さ
れ、かつ、翻訳エラーのないオブジェクトプログラムに
ついて認証コードを付与するコード付与手段と、オブジ
ェクトプログラムについて上記認証コードの有無を判別
するコード判別手段と、認証コードを有するオブジェク
トプログラムをメモリに書き込む書き込み手段と、を備
えたICカード用プログラム書き込み装置である。According to a first aspect of the present invention, there is provided an IC card program writing apparatus for writing a program on an IC card, comprising: a translating means for translating a source program into an object program; Whether there is an error,
Checking means for checking whether or not the object program has been properly created; code assigning means for assigning an authentication code to an object program that has been created properly and having no translation error; An IC card program writing device comprising: a code determination unit for determining the presence or absence of an authentication code; and a writing unit for writing an object program having an authentication code into a memory.
【0006】[0006]
【作用】本発明に係るICカード用プログラム書き込み
装置にあっては、ソースプログラムをオブジェクトプロ
グラムに翻訳し、その翻訳にエラーがない場合にそのオ
ブジェクトプログラムに認証コードを付す。また、この
オブジェクトプログラムが正当に作成されたものか否か
をチェックし、正当なプログラムについてのみ認証コー
ドを付与する。そして、ICカードのメモリへのプログ
ラムの書き込みに際してこの認証コードをチェックし、
認証コードを有するオブジェクトプログラムのみをダウ
ンロードする。In the IC card program writing device according to the present invention, the source program is translated into an object program, and if there is no error in the translation, an authentication code is added to the object program. Also, it checks whether or not this object program has been properly created, and assigns an authentication code only to a valid program. Then, when writing the program to the memory of the IC card, the authentication code is checked,
Download only the object program that has the authentication code.
【0007】[0007]
【実施例】以下、本発明に係るICカード用プログラム
書き込み装置の実施例を図面を参照して説明する。図1
〜図3は本発明の一実施例を説明するためのものであ
る。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of a program writing device for an IC card according to the present invention. FIG.
FIG. 3 to FIG. 3 are for explaining one embodiment of the present invention.
【0008】図1において、10はICカードを示し、
20はこのICカード10にプログラム等を書き込むこ
とができるリーダライタ(端末)を示している。ICカ
ード10は周知の構成を有しており、I/O、CPU、
ROM、RAM等を備えている。また、リーダライタ2
0にあっても同様にI/O、CPU、ROM、RAMを
有して構成されているものである。In FIG. 1, reference numeral 10 denotes an IC card,
Reference numeral 20 denotes a reader / writer (terminal) that can write a program or the like on the IC card 10. The IC card 10 has a known configuration, and includes an I / O, a CPU,
A ROM, a RAM and the like are provided. Also, reader / writer 2
Even if it is set to 0, it is similarly configured to have an I / O, CPU, ROM, and RAM.
【0009】同図に示すように、リーダライタ20にあ
っては、ソースプログラムをコンパイルするためのコン
パイル手段21と、コンパイルエラーのチェック、プロ
グラム正当性のチェックを行うチェック手段22と、オ
ブジェクトプログラムに認証コードを付与するためのコ
ード付与手段23と、を有している。一方、ICカード
10にあっても、オブジェクトプログラムについて認証
コードの有無等を判別するためのコード判別手段11、
および、オブジェクトプログラムをメモリ(例えばEE
PROM)に書き込むための書き込み手段12を有して
構成されている。As shown in FIG. 1, in a reader / writer 20, a compiling means 21 for compiling a source program, a checking means 22 for checking a compile error and a program validity, and Code assigning means 23 for assigning an authentication code. On the other hand, even in the case of the IC card 10, a code discriminating means 11 for discriminating the presence or absence of an authentication code for the object program,
And storing the object program in a memory (for example, EE
(PROM).
【0010】コンパイル手段21は、アセンブラ言語、
手続向き言語で記述されたソースプログラムを、機械語
形式のオブジェクトプログラムに翻訳するものである。
チェック手段22は、コンパイルエラーのチェック、お
よび、そのソースプログラムが正当な端末、正当な者に
よって作成されたか否かをチェックするものである。そ
して、コード付与手段23は、コンパイル手段21が出
力する上記オブジェクトプログラムの一部もしくは全て
に対して少なくとも1つの秘密データを考慮に入れた演
算処理を行い、認証コードを生成、付与するものであ
る。なお、チェック手段22によって翻訳エラーが検出
されなかった場合、および、ソースプログラムの正当性
が確認された場合に限り、このコード付与手段23は動
作するものである。さらに、コード判別手段11は、書
き込みの対象となるオブジェクトプログラムについて上
記認証コードが付与されているかをチェックするもので
ある。例えば書き込みコマンドについて比較用コードを
作成し、この比較用コードとオブジェクトプログラムの
有する認証コードとを比較するものである。書き込み手
段12は、周知の構成であって、ICカード10のメモ
リ(EEROMまたはRAMでもよい)に機械語形式の
オブジェクトプログラムを書き込むものである。そし
て、この書き込まれたオブジェクトプログラムに基づい
てCPUが動作してそのプログラムを実行するものであ
る。このオブジェクトプログラムとしては銀行カードの
場合には預金残高照会プログラム、通帳記入プログラム
等がある。The compiling means 21 includes an assembler language,
It translates a source program written in a procedural language into a machine language object program.
The checking means 22 checks a compile error and checks whether the source program is created by a valid terminal or a valid person. Then, the code adding unit 23 performs an arithmetic process on at least one part of the object program output by the compiling unit 21 in consideration of at least one secret data to generate and add an authentication code. . The code adding unit 23 operates only when a translation error is not detected by the checking unit 22 and when the validity of the source program is confirmed. Further, the code discriminating means 11 checks whether or not the above-mentioned authentication code is given to the object program to be written. For example, a comparison code is created for a write command, and the comparison code is compared with an authentication code of the object program. The writing unit 12 has a known configuration, and writes an object program in a machine language format into a memory (may be an EEPROM or a RAM) of the IC card 10. The CPU operates based on the written object program to execute the program. As the object program, in the case of a bank card, there are a deposit balance inquiry program, a passbook entry program, and the like.
【0011】以下、図2および図3のフローチャートを
参照して本発明の作用について説明する。まず、コード
付与のためのルーチンについて図2を参照して説明す
る。このルーチンにあっては、ソースファイルから所望
のソースプログラム(コンパイラ言語、アセンブラ言語
等によるアプリケーションプログラム)を読み込み(S
21)、このソースプログラムが正当なものか否かをチ
ェックする(S22)。例えば正当な端末、正当なソー
スファイルから読み込まれたものか等を、チェックする
ものである。正当性が確認された場合、そのソースプロ
グラムを機械語プログラムに翻訳し(S23)、その翻
訳にエラーがないかをチェックする(S24)。エラー
がない場合にはこのオブジェクトプログラムについて認
証コードを付す(S25)。そして、このオブジェクト
プログラムをオブジェクトファイルとして格納する(S
26)。なお、ソースプログラムに正当性がない場合、
例えば偽造等された不正なプログラムの場合、または、
コンパイルエラーが生じた場合は、その時点で処理を中
断するものとする。The operation of the present invention will be described below with reference to the flowcharts of FIGS. First, a routine for assigning a code will be described with reference to FIG. In this routine, a desired source program (application program in a compiler language, an assembler language, or the like) is read from a source file (S
21) It is checked whether this source program is legitimate (S22). For example, it is checked whether the terminal is read from a legitimate terminal or a legitimate source file. If the validity is confirmed, the source program is translated into a machine language program (S23), and it is checked whether there is an error in the translation (S24). If there is no error, an authentication code is attached to this object program (S25). Then, this object program is stored as an object file (S
26). If the source program is not valid,
For example, in the case of a forged fraudulent program, or
If a compile error occurs, the processing is interrupted at that point.
【0012】図3はこのようにして作成したオブジェク
トプログラムをICカード10のメモリに書き込むため
のルーチンを示している。この場合、書き込みコマンド
が入力されたとすると(S31)、ICカード10はそ
のコマンドで指定されたオブジェクトプログラムをいっ
たん読み込む(S32)。そして、このオブジェクトプ
ログラムについて認証コードをチェックし(S33)、
認証コードの無い場合は処理を中断する(S37)。ま
た、認証コードを有する場合は、上記書き込みコマンド
に基づいてこの比較用のコードを演算、作成する(S3
4)。例えば装置ID、操作者ID等に基づいて演算を
行うものとする。そして、この比較用コードを認証コー
ドと照合し(S35)、これらのコードが一致している
場合は、そのオブジェクトプログラムをメモリのCPU
予定のエリアにダウンロードする(S36)。一致しな
い場合は処理の中断となる(S37)。FIG. 3 shows a routine for writing the object program created in this way to the memory of the IC card 10. In this case, if a write command is input (S31), the IC card 10 once reads the object program specified by the command (S32). Then, the authentication code is checked for this object program (S33),
If there is no authentication code, the process is interrupted (S37). If the user has an authentication code, the comparison code is calculated and created based on the write command (S3).
4). For example, it is assumed that the calculation is performed based on the device ID, the operator ID, and the like. Then, the comparison code is compared with the authentication code (S35). If these codes match, the object program is stored in the CPU of the memory.
Download to the scheduled area (S36). If they do not match, the process is interrupted (S37).
【0013】また、本発明にあっては、上記実施例に限
られることなく、例えばICカードのメモリへのプログ
ラムの書き込みをリーダライタ(端末)によって行うよ
うに構成してもよいことはもちろんである。Further, the present invention is not limited to the above-described embodiment, and it is needless to say that a program may be written into a memory of an IC card by a reader / writer (terminal). is there.
【0014】なお、本発明にあっては、ICカードに限
られることなく光カード等他の情報カードにも適用する
ことができる。It should be noted that the present invention is not limited to an IC card, but can be applied to other information cards such as an optical card.
【0015】[0015]
【発明の効果】本発明によれば、翻訳エラーがあるオブ
ジェクトプログラムをICカード内にダウンロードする
おそれがなくなり、その結果、原因不明のICカードの
暴走、データの破壊がなくなる。また、不正に作成され
たオブジェクトプログラムのダウンロードを妨げること
ができる。その結果、ICカードの不正使用、例えばメ
モリ中のデータの改ざんを防止することができる。According to the present invention, there is no possibility of downloading an object program having a translation error into an IC card, and as a result, runaway of an unknown unknown IC card and destruction of data are eliminated. In addition, it is possible to prevent download of an illegally created object program. As a result, unauthorized use of the IC card, for example, falsification of data in the memory can be prevented.
【図1】本発明の一実施例に係るICカード用プログラ
ム書き込み装置を示すブロック図である。FIG. 1 is a block diagram showing an IC card program writing device according to one embodiment of the present invention.
【図2】本発明の一実施例に係るICカード用プログラ
ム書き込み装置でのプログラムへのコード付与の手順を
示すフローチャートである。FIG. 2 is a flowchart showing a procedure for assigning a code to a program in the IC card program writing device according to one embodiment of the present invention.
【図3】本発明の一実施例に係るICカード用プログラ
ム書き込み装置でのICカードのメモリへのプログラム
の書き込み手順を示すフローチャートである。FIG. 3 is a flowchart showing a procedure for writing a program to a memory of an IC card in the IC card program writing device according to one embodiment of the present invention.
10 ICカード 11 コード判別手段 12 書き込み手段 20 リーダライタ 21 コンパイル手段 22 チェック手段 23 コード付与手段 DESCRIPTION OF SYMBOLS 10 IC card 11 Code discrimination means 12 Writing means 20 Reader / writer 21 Compile means 22 Check means 23 Code addition means
Claims (1)
カード用プログラム書き込み装置において、 ソースプログラムをオブジェクトプログラムに翻訳する
翻訳手段と、 このオブジェクトプログラムに翻訳のエラーが存在する
か否か、および、このオブジェクトプログラムが正当に
作成されたか否かをチェックするチェック手段と、 正当に作成され、かつ、翻訳エラーのないオブジェクト
プログラムについて認証コードを付与するコード付与手
段と、 オブジェクトプログラムについて上記認証コードの有無
を判別するコード判別手段と、 認証コードを有するオブジェクトプログラムをメモリに
書き込む書き込み手段と、を備えたことを特徴とするI
Cカード用プログラム書き込み装置。An IC for writing a program to an IC card
A translation means for translating a source program into an object program in a card program writing device; a check for checking whether or not a translation error exists in the object program and whether or not this object program has been properly created; Means, a code providing means for providing an authentication code for an object program which is properly created and has no translation error, a code determining means for determining the presence or absence of the authentication code for the object program, and an object program having the authentication code. Writing means for writing to a memory.
Program writing device for C card.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4105946A JP2720701B2 (en) | 1992-03-31 | 1992-03-31 | Program writing device for IC card |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4105946A JP2720701B2 (en) | 1992-03-31 | 1992-03-31 | Program writing device for IC card |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06176209A JPH06176209A (en) | 1994-06-24 |
| JP2720701B2 true JP2720701B2 (en) | 1998-03-04 |
Family
ID=14421017
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4105946A Expired - Lifetime JP2720701B2 (en) | 1992-03-31 | 1992-03-31 | Program writing device for IC card |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2720701B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6938165B2 (en) | 1996-09-03 | 2005-08-30 | Hitachi, Ltd. | Program writable IC card and method thereof |
| JPH1079000A (en) | 1996-09-03 | 1998-03-24 | Hitachi Ltd | Program-writable IC card |
-
1992
- 1992-03-31 JP JP4105946A patent/JP2720701B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH06176209A (en) | 1994-06-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3766052B2 (en) | Microcontroller using high-level programming language | |
| US6454173B2 (en) | Smart card technology | |
| US4904851A (en) | Identification authenticating system | |
| AU706393B2 (en) | Data exchange system comprising portable data processing units | |
| US20050086497A1 (en) | IC card system | |
| KR970701884A (en) | A TELLERS PROCESSING MACHINE AND A PROCESSING METHOD THEREOF | |
| JPH0440587A (en) | Portable electronic equipment | |
| Faugeron | Manipulating the frame information with an underflow attack | |
| JP2720701B2 (en) | Program writing device for IC card | |
| KR19980079600A (en) | How to enter information on the chip card | |
| KR19990028574A (en) | Method and apparatus for changing fixed programs | |
| KR100562090B1 (en) | How to insecure multiple non-volatile memory locations in microcircuit cards, especially contactless cards | |
| JP2002342734A (en) | Portable electronic device and its history data storage method | |
| JP3231466B2 (en) | Information recording medium storing keys | |
| JP3375111B2 (en) | Inspection method and method of program in IC card | |
| JP2001216495A (en) | IC card, IC card reader and IC card system | |
| KR101089383B1 (en) | Card terminal device for card application (or data) | |
| KR100609679B1 (en) | Efficient execution code verification method and device | |
| JP4728939B2 (en) | Personal authentication device | |
| JP2000112749A (en) | Instruction protected execution data processing method and apparatus | |
| Faugeron | Manipulating the Frame Information | |
| JP2000163532A (en) | Fingerprint registration device and IC card | |
| JP2006012104A (en) | Authentication system | |
| JP2001160085A (en) | IC card, IC card reader and IC card system | |
| JPS62251947A (en) | Address system for storage memory |