JP2001043323A - IC card issuing system and IC card issuing method - Google Patents
IC card issuing system and IC card issuing methodInfo
- Publication number
- JP2001043323A JP2001043323A JP11218856A JP21885699A JP2001043323A JP 2001043323 A JP2001043323 A JP 2001043323A JP 11218856 A JP11218856 A JP 11218856A JP 21885699 A JP21885699 A JP 21885699A JP 2001043323 A JP2001043323 A JP 2001043323A
- Authority
- JP
- Japan
- Prior art keywords
- command
- card
- data
- transmitting
- issued
- 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
Links
Landscapes
- Credit Cards Or The Like (AREA)
Abstract
(57)【要約】
【課題】 この発明は、暗号化処理が必要なコマンドに
対応してICカードからの暗号の元となるデータを要求
するコマンドを予め設定する手間を省き、コマンド群を
記憶する際の記憶容量を減らすことができる。
【解決手段】 この発明は、発行コマンドが乱数データ
による暗号化が必要なコマンドである場合、当該発行コ
マンドを送信する前に、ICカードに乱数データを要求
するコマンドを自動的に送信し、ICカードからの乱数
データを受信した際に、受信した乱数データと、暗号キ
ーファイルに格納されている暗号キーとを用いて、暗号
データを生成し、生成した暗号データを、発行コマンド
に格納してICカードへ送信するようにしたものであ
る。
(57) [Problem] To save a command group in which a command for requesting data to be encrypted from an IC card in advance corresponding to a command requiring encryption processing is saved, and a command group is stored. Storage capacity can be reduced. The present invention automatically transmits a command requesting random number data to an IC card before transmitting the issued command when the issued command requires encryption by random number data. When receiving the random number data from the card, using the received random number data and the encryption key stored in the encryption key file, generate encryption data, and store the generated encryption data in the issuance command. This is transmitted to an IC card.
Description
【0001】[0001]
【発明の属する技術分野】この発明は、ICカードに所
定の情報を記録して発行するICカード発行システムと
ICカード発行方法に関する。[0001] 1. Field of the Invention [0002] The present invention relates to an IC card issuing system and an IC card issuing method for recording and issuing predetermined information on an IC card.
【0002】[0002]
【従来の技術】従来、携帯可能記憶媒体として不揮発性
のデータメモリおよびこれらを制御するCPU(中央処
理演算装置)を有するICチップを内蔵したICカード
が産業各方面で利用されてきている。この種のICカー
ドは、カードを発行するカード発行会社においてICカ
ード発行システムを用いて発行される。2. Description of the Related Art Conventionally, as a portable storage medium, an IC card having a built-in IC chip having a nonvolatile data memory and a CPU (Central Processing Unit) for controlling the data memory has been used in various industrial fields. This type of IC card is issued by a card issuing company that issues the card using an IC card issuing system.
【0003】このようなICカードの発行において、送
信すべき発行コマンド群をICカード発行システムが予
めファイル等に格納しておくことが行われている。今日
ではセキュリティ上の要求から、発行時に暗号化処理を
用いた認証を行うことがある。In issuing such an IC card, an IC card issuing system stores in advance a command group to be transmitted in a file or the like. Today, due to security requirements, authentication using encryption processing may be performed at the time of issuance.
【0004】この場合、ICカードに対して、暗号の元
となるデータとして乱数データの生成と生成した乱数デ
ータの返信を要求するコマンド(以下、乱数要求コマン
ドという)を送信することがあるが、このような乱数要
求コマンドを発行コマンド群に予め含めている。In this case, a command requesting generation of random number data and return of the generated random number data (hereinafter referred to as a random number request command) may be transmitted to the IC card as data to be encrypted. Such a random number request command is included in the issued command group in advance.
【0005】また、暗号化処理に必要な暗号キーとなる
データは、通常、発行コマンド群内に存在しない場合が
多い。このような場合、暗号キーとなるデータは、発行
コマンド群とは別のファイル等に格納されている。[0005] Also, in many cases, data serving as an encryption key required for the encryption processing does not normally exist in the issued command group. In such a case, the data serving as the encryption key is stored in a file or the like different from the issued command group.
【0006】しかしながら、上記のようなICカード発
行システムでは、乱数を用いた暗号化処理が必要なコマ
ンドに対して、上記のような乱数要求コマンドを必要な
だけ発行コマンド群に含めるという手間がかかる。However, in the above-described IC card issuing system, it takes time to include as many random number request commands as necessary in the issued command group for commands that require encryption processing using random numbers. .
【0007】また、乱数を用いた暗号化処理が必要なコ
マンドが多く存在する場合、発行コマンド群を格納した
ファイルの容量が多くなるという問題がある。In addition, when there are many commands that require encryption processing using random numbers, there is a problem that the capacity of the file storing the issued command group increases.
【0008】また、暗号化処理に必要な暗号キーとなる
データを、発行コマンド群を納めているファイル等とは
別のファイル等に格納しているため、ICカードの発行
に関連するファイル等の管理が煩雑になっている。In addition, since data serving as an encryption key required for encryption processing is stored in a file or the like different from a file or the like in which issuance command groups are stored, files such as files related to the issuance of an IC card are stored. Management is complicated.
【0009】[0009]
【発明が解決しようとする課題】上記したように、乱数
要求コマンドを必要なだけ発行コマンド群に含めておく
という手間がかかり、発行コマンド群を格納したファイ
ルの容量が多くなるという欠点を除去したもので、乱数
要求コマンドを必要なだけ発行コマンド群に含めておく
という手間を省き、発行コマンド群を格納したファイル
の容量が多くなることを防ぐことができるICカード発
行システムとICカード発行方法を提供することを目的
とする。As described above, it is troublesome to include a random number request command in an issued command group as needed, and the disadvantage of increasing the capacity of a file storing the issued command group has been eliminated. An IC card issuance system and an IC card issuance method which can eliminate the trouble of including a random number request command in an issuance command group as necessary and prevent the capacity of a file storing the issuance command group from increasing. The purpose is to provide.
【0010】また、暗号キーのデータなどの発行に関連
するファイルの管理が煩雑になっているという欠点を除
去したもので、暗号キーのデータなどの発行に関連する
ファイルの管理が煩雑になることを防ぐことができるI
Cカード発行システムとICカード発行方法を提供する
ことを目的とする。In addition, it eliminates the disadvantage that management of files related to issuance of encryption key data and the like is complicated, and management of files related to issuance of encryption key data and the like is complicated. I can prevent
An object is to provide a C card issuing system and an IC card issuing method.
【0011】[0011]
【課題を解決するための手段】この発明のICカード発
行システムは、データメモリおよび制御素子を有するI
Cカードとのデータ通信を行ってICカードを発行する
ものにおいて、上記データ通信において暗号化処理を行
う際に用いる暗号キーを記憶する記憶手段、上記ICカ
ードへ発行コマンドを送信する前に、発行コマンドが暗
号化処理を必要とするか否かを判断する判断手段、この
判断手段により発行コマンドが暗号化処理を必要としな
いと判断した際に、上記発行コマンドを送信する第1の
送信手段、上記判断手段により発行コマンドが暗号化処
理を必要とすると判断した際に、該発行コマンドを送信
する前に、上記ICカードからの暗号の元となるデータ
を要求するコマンドを送信する第2の送信手段、この第
2の送信手段により送信したコマンドに対応して上記I
Cカードから返信される暗号の元となるデータと、上記
記憶手段に記憶されている暗号キーとを用いて暗号デー
タを生成する生成手段、およびこの生成手段により生成
した暗号データを該発行コマンドに設定して上記ICカ
ードへ送信する第3の送信手段から構成されている。According to the present invention, there is provided an IC card issuance system comprising a data memory and a control element.
In a device for issuing an IC card by performing data communication with a C card, a storage means for storing an encryption key used for performing an encryption process in the data communication, and issuing an issuance command before transmitting an issuance command to the IC card. Determining means for determining whether or not the command requires encryption processing; first transmitting means for transmitting the issued command when the determining means determines that the issued command does not require encryption processing; A second transmission for transmitting, from the IC card, a command requesting data to be encrypted, before transmitting the issued command when the determining unit determines that the issued command requires encryption processing; Means, corresponding to the command transmitted by the second transmitting means,
Generating means for generating encrypted data using the data which is the source of the encryption returned from the C card and the encryption key stored in the storage means, and adding the encrypted data generated by the generating means to the issuing command It comprises a third transmission means for setting and transmitting to the IC card.
【0012】この発明のICカード発行システムは、デ
ータメモリおよび制御素子を有するICカードとのデー
タ通信を行ってICカードを発行するものにおいて、上
記ICカードへ複数の発行コマンドを順次送信する第1
の送信手段、この第1の送信手段により送信した発行コ
マンドが暗号の元となるデータを要求するコマンドであ
る場合に、このコマンドに対応して上記ICカードから
返信される暗号の元となるデータと、次に送信する発行
コマンドに予め設定されている暗号キーとを用いて暗号
データを生成する生成手段、およびこの生成手段により
生成した暗号データを次に送信する発行コマンドに設定
してICカードへ送信する第2の送信手段から構成され
ている。An IC card issuance system according to the present invention is for issuing an IC card by performing data communication with an IC card having a data memory and a control element, wherein a first issuance command for sequentially transmitting a plurality of issuance commands to the IC card is provided.
Transmitting means, when the issued command transmitted by the first transmitting means is a command for requesting data to be encrypted, the data to be encrypted which is returned from the IC card in response to this command Generating means for generating encrypted data using an encryption key set in advance in an issuance command to be transmitted next, and an IC card which sets the encrypted data generated by the generation means in an issuance command to be transmitted next And a second transmitting means for transmitting the data to the server.
【0013】この発明のICカード発行システムは、デ
ータメモリおよび制御素子を有するICカードとのデー
タ通信を行ってICカードを発行するものにおいて、上
記ICカードへ発行コマンドを送信する前に、発行コマ
ンドが暗号化処理を必要とするか否かを判断する判断手
段、この判断手段により発行コマンドが暗号化処理を必
要としないと判断した際に、上記発行コマンドを送信す
る第1の送信手段、上記判断手段により発行コマンドが
暗号化処理を必要とすると判断した際に、該発行コマン
ドを送信する前に、上記ICカードからの暗号の元とな
るデータを要求するコマンドを上記ICカードへ送信す
る第2の送信手段、この第2の送信手段により送信した
コマンドに対してICカードから送信された暗号の元と
なるデータと、該発行コマンドに予め設定されている暗
号キーとを用いて暗号データを生成する生成手段、およ
びこの生成手段により生成した暗号データを該発行コマ
ンドに設定して上記ICカードへ送信する第3の送信手
段から構成されている。An IC card issuance system according to the present invention is for issuing an IC card by performing data communication with an IC card having a data memory and a control element. Determining means for determining whether or not encryption processing is required; first transmission means for transmitting the issued command when the determination means determines that the issued command does not require encryption processing; When the determining unit determines that the issued command requires an encryption process, before transmitting the issued command, a command requesting data to be encrypted from the IC card is transmitted to the IC card. (2) transmitting means, data that is a source of encryption transmitted from the IC card in response to the command transmitted by the second transmitting means, Generating means for generating encrypted data using an encryption key preset in a line command, and third transmitting means for setting the encrypted data generated by the generating means in the issuing command and transmitting the issued command to the IC card It is composed of
【0014】この発明のICカード発行システムは、デ
ータメモリおよび制御素子を有するICカードとのデー
タ通信を行ってICカードを発行するものにおいて、上
記ICカードを発行する際の発行データを個人ごとに記
憶する第1の記憶手段、上記ICカードを発行する際に
用いる発行コマンド群を記憶する第2の記憶手段、上記
データ通信において暗号化処理を行う際に用いる暗号キ
ーを記憶する第3の記憶手段、上記第1の記憶手段から
ICカードを発行する個人に対する発行データを読み出
し、上記第2の記憶手段により記憶されている各発行コ
マンドと組合わせて、上記ICカードへ送信する各発行
コマンドを設定する設定手段、この設定手段により設定
した発行コマンドが暗号化処理を必要とするか否かを判
断する判断手段、この判断手段により発行コマンドが暗
号化処理を必要としないと判断した際に、上記設定手段
により設定した発行コマンドを送信する第1の送信手
段、上記判断手段により発行コマンドが暗号化処理を必
要とすると判断した際に、該発行コマンドを送信する前
に、上記ICカードからの暗号の元となるデータを要求
するコマンドを上記ICカードへ送信する第2の送信手
段、この第2の送信手段により送信したコマンドに対応
して上記ICカードから送信された暗号の元となるデー
タと、上記第3の記憶手段に記憶されている暗号キーと
を用いて暗号データを生成する生成手段、およびこの生
成手段により生成した暗号データを上記設定手段により
設定されている暗号化処理を必要とする発行コマンドに
設定して上記送信手段によりICカードへ送信する第3
の送信手段から構成されている。An IC card issuance system according to the present invention is for issuing an IC card by performing data communication with an IC card having a data memory and a control element. First storage means for storing, second storage means for storing an issuance command group used when issuing the IC card, and third storage for storing an encryption key used for performing encryption processing in the data communication. Means for reading issue data for an individual who issues an IC card from the first storage means, and combining each issue command transmitted to the IC card with each issue command stored in the second storage means. Setting means for setting, judging means for judging whether or not the issuance command set by the setting means requires encryption processing; The first transmitting means for transmitting the issued command set by the setting means when the issued command does not require the encryption processing by the determining means, and the issuing command requires the encryption processing by the determining means. When it is determined, before transmitting the issuance command, a second transmission unit for transmitting a command for requesting data to be encrypted from the IC card to the IC card, the second transmission unit Generating means for generating encrypted data by using the encryption data transmitted from the IC card in response to the transmitted command and the encryption key stored in the third storage means; The encryption data generated by the means is set to an issuance command which requires the encryption processing set by the setting means, and the IC card is transmitted by the transmission means. The third to be sent to the
Transmission means.
【0015】この発明のICカード発行システムは、デ
ータメモリおよび制御素子を有するICカードとのデー
タ通信を行ってICカードを発行するものにおいて、上
記ICカードを発行する際の発行データを個人ごとに記
憶する第1の記憶手段、上記ICカードを発行する際に
用いる発行コマンド群を記憶する第2の記憶手段、上記
第1の記憶手段からICカードを発行する個人に対する
発行データを読み出し、上記第2の記憶手段により記憶
されている各発行コマンドと組合わせて、上記ICカー
ドへ送信する各発行コマンドを設定する設定手段、この
設定手段により設定した発行コマンドを順次上記ICカ
ードへ送信する第1の送信手段、この送信手段により送
信した発行コマンドが暗号の元となるデータを要求する
コマンドである場合に、このコマンドに対応して上記I
Cカードから返信される暗号の元となるデータと、次に
送信する発行コマンドに予め設定されている暗号キーと
を用いて暗号データを生成する生成手段、およびこの生
成手段により生成した暗号データを上記設定手段により
設定されている次に送信する発行コマンドに設定して上
記ICカードへ送信する第2の送信手段から構成されて
いる。An IC card issuance system according to the present invention is for issuing an IC card by performing data communication with an IC card having a data memory and a control element. The first storage means for storing, the second storage means for storing an issuance command group used when issuing the IC card, and the issuance data for the individual who issues the IC card is read out from the first storage means. Setting means for setting each issue command to be transmitted to the IC card in combination with each issue command stored by the second storage means; and a first means for sequentially transmitting the issue commands set by the setting means to the IC card. Transmitting means, if the issued command transmitted by the transmitting means is a command requesting data to be encrypted. To, the I in response to this command
Generating means for generating encrypted data by using the encryption source data returned from the C card and an encryption key set in advance in an issuance command to be transmitted next; and generating encrypted data generated by the generating means. The second transmission means is configured to set the issuance command to be transmitted next set by the setting means and transmit the command to the IC card.
【0016】この発明のICカード発行システムは、デ
ータメモリおよび制御素子を有するICカードとのデー
タ通信を行ってICカードを発行するものにおいて、上
記ICカードを発行する際の発行データを個人ごとに記
憶する第1の記憶手段、上記ICカードを発行する際に
用いる発行コマンド群を記憶する第2の記憶手段、上記
第1の記憶手段からICカードを発行する個人に対する
発行データを読み出し、上記第2の記憶手段により記憶
されている各発行コマンドと組合わせて、上記ICカー
ドへ送信する各発行コマンドを設定する設定手段、この
設定手段により設定した発行コマンドが暗号化処理を必
要とするか否かを判断する判断手段、この判断手段によ
り発行コマンドが暗号化処理を必要としないと判断した
際に、上記設定手段により設定した発行コマンドを順次
送信する第1の送信手段、上記判断手段により発行コマ
ンドが暗号化処理を必要とすると判断した際に、該発行
コマンドを送信する前に、上記ICカードからの暗号の
元となるデータを要求するコマンドを上記ICカードへ
送信する第2の送信手段、この第2の送信手段により送
信したコマンドに対応して上記ICカードから返信され
るデータと、該発行コマンドに予め設定されている暗号
キーとを用いて、暗号データを生成する生成手段、およ
びこの生成手段により生成した暗号データを上記設定手
段により設定された暗号化処理を必要とする発行コマン
ドに設定して上記ICカードへ送信する第3の送信手段
から構成されている。An IC card issuance system according to the present invention is for issuing an IC card by performing data communication with an IC card having a data memory and a control element. The first storage means for storing, the second storage means for storing an issuance command group used when issuing the IC card, and the issuance data for the individual who issues the IC card is read out from the first storage means. Setting means for setting each issue command to be transmitted to the IC card in combination with each issue command stored by the second storage means, and whether the issue command set by this setting means requires encryption processing Determining means for determining whether the issued command does not require encryption processing by the determining means. The first transmitting means for sequentially transmitting the issued commands set by the above-described method. When the determining means determines that the issued command requires an encryption process, the transmitting means issues the encryption command from the IC card before transmitting the issued command. Second transmitting means for transmitting a command requesting the original data to the IC card; data returned from the IC card corresponding to the command transmitted by the second transmitting means; Generating means for generating encrypted data using the set encryption key, and setting the encrypted data generated by the generating means to an issue command requiring the encryption processing set by the setting means, It comprises a third transmitting means for transmitting to the IC card.
【0017】[0017]
【発明の実施の形態】以下、この発明の実施の形態につ
いて図面を参照して説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0018】図1は、この発明のICカード発行システ
ムの全体構成とICカードCの構成を示すブロック図で
ある。FIG. 1 is a block diagram showing the overall configuration of an IC card issuing system and the configuration of an IC card C according to the present invention.
【0019】このICカード発行システムにより発行さ
れるICカードCは、EEPROMなどの不揮発性メモ
リからなり、種々のデータが記憶されるデータメモリ部
Caと、これらを制御する制御素子としてのCPUCb
とが1つのICチップに集積化されたICチップを内蔵
している。The IC card C issued by this IC card issuing system is composed of a nonvolatile memory such as an EEPROM, and stores a data memory section Ca for storing various data and a CPU Cb as a control element for controlling these.
Have a built-in IC chip integrated into one IC chip.
【0020】このICカードCは、発行時に、上記IC
カード発行システムからのコマンド電文(後述する)に
よりデータメモリCaにデータを書込んだり、暗号化す
る元となるデータとしての乱数データを生成し、生成し
た乱数データをレスポンス電文(後述する)によりIC
カード発行システムへ返信したりする。When the IC card C is issued,
Data is written to the data memory Ca by a command message (described later) from the card issuing system, random number data as data to be encrypted is generated, and the generated random number data is converted into an IC by a response message (described later).
Reply to the card issuing system.
【0021】上記ICカード発行システムは、ホストコ
ンピュータ1、補助記憶装置2、ディスプレイ装置3、
キーボード4、リーダライタ5、プリンタ装置6などに
より構成される。The IC card issuing system includes a host computer 1, an auxiliary storage device 2, a display device 3,
It comprises a keyboard 4, a reader / writer 5, a printer 6, and the like.
【0022】上記ホストコンピュータ1は、ICカード
発行システム全体を制御する。The host computer 1 controls the entire IC card issuing system.
【0023】上記補助記憶装置2(記憶手段)は、IC
カード発行システムを制御する制御プログラム(図示し
ない)や暗号化処理に用いられるSingeDESアル
ゴリズムなどが記憶され、上記ICカードCを発行する
際のデータが記憶(格納)される発行データファイル2
aを有している。The auxiliary storage device 2 (storage means) includes an IC
An issue data file 2 in which a control program (not shown) for controlling the card issuing system, a SingleDES algorithm used for encryption processing, and the like are stored, and data for issuing the IC card C is stored (stored).
a.
【0024】上記ディスプレイ装置3は、ICカード発
行システムを操作する際の操作手順や処理状態をオペレ
ータに知らせる。The display device 3 informs an operator of an operation procedure and a processing state when operating the IC card issuing system.
【0025】上記キーボード4は、オペレータによるI
CカードCの発行の操作、あるいはデータの入力を行う
ものである。The keyboard 4 is operated by an operator.
The user issues an operation for issuing a C card C or inputs data.
【0026】上記リーダライタ5は、ホストコンピュー
タ1の制御に基いてICカードCとのデータ通信を行
い、ICカードへ発行データを書き込むものである。The reader / writer 5 performs data communication with the IC card C under the control of the host computer 1 and writes issued data to the IC card.
【0027】上記プリンタ装置6は、上記ICカードC
の発行記録として、日時、発行データ、ファイル名、カ
ード番号、発行枚数等を印刷出力する。The printer device 6 includes the IC card C
As an issuance record, date and time, issuance data, file name, card number, issuance number, etc. are printed out.
【0028】また、上記発行データファイル2aは、発
行データ群21、発行コマンド群22、発行データ管理
情報群23、テーブル情報群24、および暗号キーファ
イル25等からなる。The issued data file 2a includes an issued data group 21, an issued command group 22, an issued data management information group 23, a table information group 24, an encryption key file 25, and the like.
【0029】上記発行データ群21は、各個人ごとに発
行データが格納されている。上記発行コマンド群22
は、ICカードの発行時に上記発行データと組み合わさ
れてICカードへ送信される1つまたは複数の発行コマ
ンドが格納されている。上記発行データ管理情報群23
は、各発行データをどの発行コマンドのどの位置に格納
すべきかを示す情報が格納されている。上記テーブル情
報群24は、テーブル情報としてICカードCからの暗
号の元となるデータ(乱数)による暗号化処理が必要な
コマンドを示すデータ、つまり、乱数による暗号化処理
が必要なコマンドの値(コード)が1つまたは複数格納
されている。上記暗号キーファイル25は、暗号化処理
に用いられる暗号キーが格納されている。The issuance data group 21 stores the issuance data for each individual. The issued command group 22
Stores one or a plurality of issuance commands transmitted to the IC card in combination with the issuance data when the IC card is issued. The issuance data management information group 23
Stores information indicating which issue command should be stored in which position in each issue command. The table information group 24 includes, as table information, data indicating a command that requires encryption processing from data (random number) serving as a source of encryption from the IC card C, that is, a value of a command that requires encryption processing using random numbers ( Code) is stored. The encryption key file 25 stores an encryption key used for encryption processing.
【0030】次に、図2は、リーダライタ5を介してI
Cカード発行システムとICカードCとの間で実行され
るデータ送受信の電文(コマンド電文)のフォーマット
を示す。Next, FIG.
5 shows a format of a data transmission / reception message (command message) executed between the C card issuing system and the IC card C.
【0031】すなわち、図2に示すように、ICカード
発行システムとICカードCとの間で送受信される電文
は、ノードアドレス(NAD)部、プロトコル制御バイ
ト(PCB)部、および長さ(LEN)部からなる制御
情報部としての先頭フィールドと、送信する情報の内容
が格納される情報フィールド(INF)部と、誤り検出
符号(EDC)部としての最終フィールドとから構成さ
れている。なお、このフォーマットは、ISO/IEC
7816−3で規定されている。That is, as shown in FIG. 2, a message transmitted / received between the IC card issuing system and the IC card C includes a node address (NAD) section, a protocol control byte (PCB) section, and a length (LEN). ) Section as a control information section, an information field (INF) section in which the content of information to be transmitted is stored, and a last field as an error detection code (EDC) section. This format is compatible with ISO / IEC
7816-3.
【0032】次に、図3は、上記補助記憶装置2に記憶
されている発行データファイル2a内の発行コマンド群
22のデータ形式(フォーマット)を示している。FIG. 3 shows the data format of the issued command group 22 in the issued data file 2a stored in the auxiliary storage device 2.
【0033】すなわち、図3に示すように、発行コマン
ド群に格納(記憶)されている各発行コマンドは、ノー
ドアドレス(NAD)部およびインフォメーション(I
NF)部の組み合わせの集合で構成されている。That is, as shown in FIG. 3, each issued command stored (stored) in the issued command group includes a node address (NAD) portion and an information (I
It is composed of a set of combinations of NF) parts.
【0034】上記NAD部は、電文の先頭フィールドに
おける制御情報の一部として、伝送ブロックの送信元及
びあて先を示すデータが格納される。The NAD section stores data indicating the transmission source and destination of the transmission block as a part of the control information in the first field of the message.
【0035】上記INF部は、送信するコマンドやデー
タなどが格納されるものである。このINF部は、コマ
ンドヘッダ(CMD)部、Lc部、データ(Data)
部からなっている。The INF section stores commands and data to be transmitted. The INF section includes a command header (CMD) section, an Lc section, and data (Data).
Department.
【0036】上記コマンドヘッダ部は、例えば、ICカ
ードC内のデータメモリの指定するアドレスに発行コマ
ンドのデータ部の内容を書き込むなどの制御命令などが
格納される。上記Lc部は、INF部におけるデータ部
全体のデータ長を示す。上記データ部は、送信するデー
タの内容を示す。The command header section stores, for example, a control command for writing the contents of the data section of the issued command to an address specified by the data memory in the IC card C. The Lc section indicates the data length of the entire data section in the INF section. The data section indicates the content of data to be transmitted.
【0037】次に、図4(a)、(b)、(c)は、I
CカードCの発行時にICカードCへ送信する電文の構
成を示す図である。ICカードCを発行する際、ICカ
ード発行システムは、図3に示すような上記発行コマン
ドに発行データを格納したコマンドを準備する。このコ
マンドをICカードCに送信する際、ICカード発行シ
ステムは、上記コマンドをNAD部およびINF部と
し、上記図2に示すフォーマットに基いて、図4の
(a)に示すような発行コマンドからなるコマンド電文
を作成し、ICカードCへ送信する。Next, FIGS. 4 (a), (b) and (c) show I
FIG. 4 is a diagram illustrating a configuration of a message transmitted to the IC card C when the C card C is issued. When issuing the IC card C, the IC card issuing system prepares a command in which issue data is stored in the above-mentioned issue command as shown in FIG. When transmitting this command to the IC card C, the IC card issuing system converts the command into an NAD section and an INF section, and converts the command from the issuance command as shown in FIG. A command message is created and transmitted to the IC card C.
【0038】このコマンド電文のINF部内には、図4
の(b)に示すように、上記コマンドが格納される。In the INF part of this command message, FIG.
The command is stored as shown in FIG.
【0039】さらに、コマンド電文のINF部内のコマ
ンドヘッダ部は、図4の(c)に示すように、CLA
(クラス)、INS(インストラクト)、P1(ポジシ
ョン1)、P2(ポジション2)からなる。上記CLA
およびINSに格納されるデータはコマンドの種類を示
す値である。上記P1およびP2は、データの格納され
ているエリア(ポジション)等を示すものであり、例え
ば、上記コマンドが暗号化を必要するコマンドである場
合、暗号キーが格納されている場所を示す。Further, the command header section in the INF section of the command message has a CLA as shown in FIG.
(Class), INS (instruction), P1 (position 1), and P2 (position 2). The above CLA
And the data stored in INS are values indicating the type of command. The P1 and P2 indicate an area (position) where data is stored, and, for example, when the command is a command requiring encryption, indicates a location where an encryption key is stored.
【0040】次に、図3に示す発行コマンドの具体例を
図4〜図6を用いて説明する。Next, a specific example of the issuance command shown in FIG. 3 will be described with reference to FIGS.
【0041】図5は、暗号化処理が必要な発行コマンド
のデータ部が記録されない場合の具体例を示す。すなわ
ち、発行コマンドのうち、乱数などのICカードCから
の暗号の元となるデータに基く暗号化処理が必要な発行
コマンドのデータ部には、予めデータが格納されること
なく、さらに、ICカードCからの暗号の元となるデー
タを要求する乱数要求コマンドなどの発行コマンド自体
も準備されていない。FIG. 5 shows a specific example in the case where the data portion of the issued command requiring the encryption process is not recorded. That is, the data portion of the issued command which needs to be encrypted based on the data from the IC card C such as a random number, which is a random number, is not stored in advance in the data portion of the issued command. No issuance command itself such as a random number request command for requesting data to be encrypted from C is prepared.
【0042】例えば、図5のAは、ICカードCがIC
カード発行システムを認証する処理を行う外部認証コマ
ンドを示す。なお、外部認証コマンドとは、ICカード
発行システムが、ICカードCへ暗号の元となるデータ
(乱数)を要求し、ICカードCからの送信される乱数
と、暗号キーファイル25に格納されている暗号キーと
を用いて、暗号化したデータをICカードCへ送信す
る。さらに、ICカードCでは、ICカード発行システ
ムへ要求に応じて送信した乱数を保持しておき、この乱
数データと予めデータメモリに記憶されている暗号キー
と用いて暗号化を行う。そして、ICカードは、暗号化
したデータと、ICカード発行システムから送信された
データと一致するか否かを判断してICカード発行シス
テムを認証するものである。For example, FIG. 5A shows that an IC card C is an IC card.
3 shows an external authentication command for performing processing for authenticating the card issuing system. The external authentication command means that the IC card issuing system requests the IC card C for data (random number) to be encrypted and the random number transmitted from the IC card C and the encryption key file 25 The encrypted data is transmitted to the IC card C using the existing encryption key. Further, the IC card C holds a random number transmitted to the IC card issuing system in response to the request, and performs encryption using the random number data and an encryption key stored in the data memory in advance. The IC card authenticates the IC card issuing system by determining whether the encrypted data matches the data transmitted from the IC card issuing system.
【0043】図5に示す例では、図5のAに示すよう
に、外部認証コマンド(CLA/INS=0X82(X
=0、1、2))のデータ部に暗号キーが格納されてお
らず、Lc部には00hが格納されている場合を示す。In the example shown in FIG. 5, as shown in FIG. 5A, the external authentication command (CLA / INS = 0X82 (X
= 0, 1, 2)), the encryption key is not stored in the data portion, and 00h is stored in the Lc portion.
【0044】次に、図6は、暗号化処理が必要な発行コ
マンドのデータ部に暗号キーが予め準備され、さらに、
暗号化処理が必要な発行コマンドの前に、ICカードへ
の暗号の元となるデータの送信要求を行うコマンドが予
め準備されている場合の具体例を示すものである。Next, FIG. 6 shows that an encryption key is prepared in advance in a data portion of an issued command requiring encryption processing.
This shows a specific example in a case where a command for requesting transmission of data serving as a source of encryption to an IC card is prepared before an issued command requiring encryption processing.
【0045】図6に示す例では、図6のBに示すような
外部認証コマンド(CLA/INS=0×82(X=
0、1、2))の前に、図6のAに示すようなICカー
ドCへの乱数要求コマンドが予め格納されている場合を
示す。In the example shown in FIG. 6, an external authentication command (CLA / INS = 0 × 82 (X =
A case where a random number request command to the IC card C as shown in FIG. 6A is stored before 0, 1, 2)).
【0046】また、図6のBは、外部認証コマンドのデ
ータ部に暗号化処理用の暗号キー(A1 E7 6C
42 F0 53 B9 8D)が格納され、Lc部に
は暗号キーのデータ長として08hが格納されている。FIG. 6B shows an encryption key (A1 E76C) for encryption processing in the data portion of the external authentication command.
42 F0 53 B98D), and 08h is stored in the Lc part as the data length of the encryption key.
【0047】次に、図7は、暗号化処理が必要な発行コ
マンドのデータ部に暗号キーが予め準備されるが、暗号
化処理が必要な発行コマンドの前に、ICカードへの暗
号の元となるデータの送信要求を行うコマンドが予め準
備されていない場合の具体例を示すものである。Next, FIG. 7 shows that an encryption key is prepared in advance in the data portion of the issued command requiring the encryption process, but before the issued command requiring the encryption process, the base of the encryption to the IC card is performed. 9 shows a specific example in a case where a command for requesting data transmission is not prepared in advance.
【0048】図7に示す例では、図7のAに示すような
外部認証コマンド(CLA/INS=0×82(X=
0、1、2))の前に、ICカードCへの乱数要求コマ
ンドがない場合を示す。また、図7のAに示すように、
外部認証コマンドのデータ部には、暗号化処理用の暗号
キー(A1 E7 6C 42 F0 53 B9 8
D)が格納され、Lc部には暗号キーのデータ長として
08hが格納されている。In the example shown in FIG. 7, an external authentication command (CLA / INS = 0 × 82 (X =
The case where there is no random number request command to the IC card C before 0, 1, 2)) is shown. Also, as shown in FIG.
The data part of the external authentication command includes an encryption key for encryption processing (A1 E7 6C 42 F0 53 B98).
D) is stored, and 08h is stored in the Lc portion as the data length of the encryption key.
【0049】次に、図8の(a)、(b)、(c)は、
ICカード発行システムからのコマンド電文に対するI
CカードCからの返信の電文としてのレスポンス電文の
フォーマットを示す。Next, (a), (b) and (c) of FIG.
I for command message from IC card issuing system
The format of a response message as a message returned from the C card C is shown.
【0050】図8の(a)に示すように、レスポンス電
文のフォーマットは、上記図2に示す電文のフォーマッ
トに基くものであり、このフォーマットについても、I
SO/IEC7816−3および7816−4で規定さ
れている。As shown in FIG. 8A, the format of the response message is based on the format of the message shown in FIG. 2 described above.
It is specified in SO / IEC 7816-3 and 7816-4.
【0051】図8(b)は、レスポンス電文におけるI
NF部内のフォーマットを示すものであり、INF部
は、Lc部、データ部、STS1部およびSTS2部か
らなっている。FIG. 8 (b) shows the I in the response message.
It shows a format in the NF section, and the INF section is composed of an Lc section, a data section, an STS1 section, and an STS2 section.
【0052】図8(c)は、ICカード発行システムか
らの乱数要求コマンド(データ要求コマンド)に対する
一例として、データ部に乱数データが格納されたレスポ
ンス電文の一例を示す。FIG. 8C shows an example of a response message in which random number data is stored in the data section as an example of a random number request command (data request command) from the IC card issuing system.
【0053】次に、図9は、乱数データに基いて生成し
た暗号データを送信する際のコマンドの具体例を示す図
である。例えば、上記した図5のAに示すような外部認
証コマンドでは、このコマンドのP1およびP2が示す
暗号キーファイル25内の暗号キーを用いて、上記IC
カードからの乱数データとにより暗号データを生成す
る。さらに、生成した暗号データ(B8 37 2C
F9 04 16 DA5E)はコマンドのデータ部に
格納するとともに、Lc部に暗号データのデータ長(0
8)を格納する。また、上記した図6のB、あるいは図
7のAに示すようなコマンドの場合は、コマンドのデー
タ部に予め格納されている暗号キーを用いて、上記乱数
データとにより暗号データを生成し、生成した暗号デー
タをコマンドのデータ部に格納されている暗号キーに上
書きするとともに、Lc部に暗号データのデータ長を上
書きすることにより暗号データをデータ部およびLc部
に格納する。Next, FIG. 9 is a diagram showing a specific example of a command when transmitting encrypted data generated based on random number data. For example, in the case of the external authentication command shown in FIG. 5A described above, the IC
The encryption data is generated using the random number data from the card. Further, the generated encrypted data (B8 372C
F9 04 16 DA5E) is stored in the data part of the command, and the data length (0
8) is stored. In addition, in the case of a command as shown in FIG. 6B or FIG. 7A, encrypted data is generated with the random number data using an encryption key stored in advance in the data portion of the command, The generated encrypted data is overwritten on the encryption key stored in the data portion of the command, and the encrypted data is stored in the data portion and the Lc portion by overwriting the data length of the encrypted data in the Lc portion.
【0054】次に、上記のような構成において、暗号化
処理を要する発行コマンドを含むコマンド電文によるI
CカードCの発行動作について図10に示すフローチャ
ートを参照しつつ説明する。Next, in the above-described configuration, the I-command based on the command message including the issued command requiring the encryption process is used.
The issuing operation of the C card C will be described with reference to the flowchart shown in FIG.
【0055】まず、キーボード4により個人IDが入力
されると、ホストコンピュータ1は、入力された個人I
Dに対応する個人の発行データを上記補助記録装置2内
の発行データファイル2a内の発行データ群21から読
み出す(ステップ1)。First, when a personal ID is input through the keyboard 4, the host computer 1 sets the input personal ID.
The personal issue data corresponding to D is read from the issue data group 21 in the issue data file 2a in the auxiliary recording device 2 (step 1).
【0056】ホストコンピュータ1は、発行データ群2
1から読み出された発行データを、発行データ管理情報
群23の内容に従い、発行コマンド群22内の所定の発
行コマンドにおける所定の位置に格納する(ステップ
2)。The host computer 1 transmits the issued data group 2
The issue data read from No. 1 is stored at a predetermined position in a predetermined issue command in the issue command group 22 according to the contents of the issue data management information group 23 (step 2).
【0057】ここまでで、ある特定の個人に関する、各
発行コマンドのNAD部およびINF部の情報が、乱数
要求コマンド、および暗号化処理が必要なコマンドのデ
ータ部を除き、準備される。Up to this point, the information of the NAD portion and the INF portion of each issued command concerning a specific individual is prepared, except for the random number request command and the data portion of the command requiring encryption processing.
【0058】ここで、オペレータがリーダライタ5にI
CカードCを挿入する(ステップ3)。Here, the operator sends the I / O to the reader / writer 5.
Insert C card C (step 3).
【0059】すると、これらの準備された発行コンマド
は、順次、ホストコンピュータ1によりコマンド電文と
して作成され、リーダライタ5を介してICカードCへ
送信される。Then, these prepared issuing commands are sequentially created as command messages by the host computer 1 and transmitted to the IC card C via the reader / writer 5.
【0060】コマンド電文を送信する際、ホストコンピ
ュータ1は、発行コマンドが暗号化処理が必要なコマン
ドか否かを判断する(ステップ4)。この際、ホストコ
ンピュータ1は、上記テーブル情報群24にICカード
からの暗号化の元となるデータ(乱数データ)による暗
号化処理が必要なコマンドのデータ(CLA/INSの
値)がCLA部およびINS部に格納されているので、
このテーブル情報群24に格納されている内容に基い
て、発行コマンドが暗号化処理が必要か否か判断する。When transmitting a command message, the host computer 1 determines whether the issued command is a command requiring encryption processing (step 4). At this time, the host computer 1 stores, in the table information group 24, command data (CLA / INS value) that needs to be encrypted by data (random number data) that is the source of encryption from the IC card and the CLA unit. Since it is stored in the INS section,
Based on the contents stored in the table information group 24, it is determined whether or not the issued command requires encryption processing.
【0061】そして、ホストコンピュータ1は、発行コ
マンドが暗号化処理が必要なコマンドであると判断する
と、この暗号化処理が必要な発行コマンドを送信する前
に、自動的にリーダライタ5を介してICカードCへ乱
数要求コマンドのコマンド電文を送信する(ステップ
5)。When the host computer 1 determines that the issued command requires encryption processing, the host computer 1 automatically transmits the issued command requiring encryption processing via the reader / writer 5 before transmitting the issued command requiring encryption processing. A command message of the random number request command is transmitted to the IC card C (step 5).
【0062】この後、ICカードCへ送信した乱数要求
コマンドに対するICカードCからのレスポンス電文を
受信すると、ホストコンピュータ1は、レスポンス電文
が正常であるか否かを判断する(ステップ6)。この判
断によりレスポンス電文が正常であると判断すると、ホ
ストコンピュータ11は、レスポンス電文のINF部に
格納されている乱数データを取り出す。ホストコンピュ
ータ1は、レスポンス電文より取り出した乱数データ
と、暗号キーファイル25に格納されている暗号キーと
を用いて、例えば、Sing1eDESアルゴリズムに
より、暗号データを生成する(ステップ7)。Thereafter, upon receiving a response message from the IC card C in response to the random number request command transmitted to the IC card C, the host computer 1 determines whether or not the response message is normal (step 6). If it is determined that the response message is normal, the host computer 11 extracts the random number data stored in the INF section of the response message. The host computer 1 uses the random number data extracted from the response message and the encryption key stored in the encryption key file 25 to generate encrypted data by, for example, the Sing1eDES algorithm (step 7).
【0063】このように暗号データを生成すると、ホス
トコンピュータ1は、上記のようにして得られた暗号デ
ータを、その暗号データのサイズとともに、図5のAに
示す外部認証コマンドのような暗号化処理が必要な発行
コマンドのデータ部およびLc部に設定する(ステップ
8)。When the encrypted data is generated in this manner, the host computer 1 converts the encrypted data obtained as described above, together with the size of the encrypted data, into an encrypted data such as an external authentication command shown in FIG. It is set in the data section and the Lc section of the issued command requiring processing (step 8).
【0064】これにより、暗号データが設定された暗号
化処理が必要な発行コマンドは、図9に示すように、I
NF部として完成される。この後、ホストコンピュータ
1は、図3に示すように、PCB部,LEN部,EDC
部が付加されたコマンド電文として、リーダライタ5を
介してICカードCに送信する(ステップ9)。As a result, an issuance command in which encryption processing is set and in which encryption processing is required is transmitted as shown in FIG.
Completed as NF part. After that, the host computer 1, as shown in FIG.
A command message to which the copy has been added is transmitted to the IC card C via the reader / writer 5 (step 9).
【0065】このICカードCへ送信したコマンド電文
に対するレスポンス電文をリーダライタ5を介して受信
すると、ホストコンピュータ1は、レスポンス電文が正
常か否かにより送信したコマンド電文がICカードCに
おいて正常に処理されたか否かを判断する(ステップ1
0)。When a response message corresponding to the command message transmitted to the IC card C is received via the reader / writer 5, the host computer 1 determines whether the transmitted command message is normal in the IC card C based on whether the response message is normal. (Step 1)
0).
【0066】この判断により正常に処理されたことを判
断すると、ホストコンピュータ1は、次の発行コマンド
が準備されていか否かにより、コマンド電文の送信が完
了したか否かを判断する(ステップ11)。この判断に
より次の発行コマンドが準備されている場合、上記ステ
ップ3へ戻り、上記の処理を繰り返す。また、準備され
たコマンド電文の発行コマンドをすべて送信した場合、
つまり、コマンド電文の送信を完了したと判断した場合
(ステップ11)、ICカードCを排出し(ステップ1
2)、処理を終了する。When the host computer 1 determines that the processing has been normally performed, the host computer 1 determines whether the transmission of the command message has been completed based on whether the next issued command has been prepared (step 11). ). If it is determined that the next issuance command is prepared, the process returns to step 3 and the above process is repeated. Also, if all of the prepared command message issuing commands are sent,
That is, when it is determined that the transmission of the command message has been completed (step 11), the IC card C is ejected (step 1).
2), end the process.
【0067】また、上記ステップ6あるいは上記ステッ
プ10で、ICカードからのレスポンス電文が正常でな
いと判断した場合、ホストコンピュータ1は、ICカー
ドを排出し(ステップ12)、処理を終了する。If it is determined in step 6 or step 10 that the response message from the IC card is not normal, the host computer 1 ejects the IC card (step 12) and terminates the processing.
【0068】上記のような処理について、例えば、テー
ブル情報群24に暗号化処理が必要な発行コマンドとし
て、外部認証コマンドを示す0X82(X=0、1、
2)が格納されている場合について説明する。For the above processing, for example, as an issued command requiring encryption processing in the table information group 24, 0X82 (X = 0, 1,.
The case where (2) is stored will be described.
【0069】この場合、ホストコンピュータ1は、図5
のAに示すようなCMDn部のCLA/INSが01
82(hex)の発行コマンドが準備されている際、I
CカードCからの乱数データによる暗号化処理が必要な
コマンドであると解釈する。In this case, the host computer 1
CLA / INS of the CMDn portion as indicated by A in FIG.
82 (hex) issuance command is prepared, I
The command is interpreted as a command that requires encryption processing using random number data from the C card C.
【0070】そして、ホストコンピュータ1は、発行コ
マンドがICカードCからの乱数データによる暗号化処
理が必要となる図5のAに示すような外部認証コマンド
と判断すると、外部認証コマンドを送信する前に、IC
カードCに乱数データを要求する乱数要求コマンド(I
NF=00 84 00 00 08)を自動的に送信
する。When the host computer 1 determines that the issued command is an external authentication command such as that shown in FIG. 5A that requires encryption processing using random number data from the IC card C, the host computer 1 transmits the external authentication command. And IC
A random number request command (I
NF = 00 84 00 00 08) is automatically transmitted.
【0071】この送信した乱数要求コマンドに対してI
CカードCから、図8に示すような乱数データが格納さ
れたレスポンス電文を受信すると、ホストコンピュータ
1は、レスポンス電文のINF部のデータ部に記録され
ている乱数データ(1C 24 5D F0 78 9
B 3A E6)を取り出す。In response to the transmitted random number request command, I
Upon receiving a response message storing random number data as shown in FIG. 8 from the C card C, the host computer 1 sends the random number data (1C 245D F0 789) recorded in the data section of the INF section of the response message.
Take out B3A E6).
【0072】そして、ホストコンピュータ1は、図5の
Aに示すような発行コマンドのコマンドヘッダ部の後半
部分P1、P2(00 81)が示す暗号キーを暗号キ
ーファイル25から判断する。この暗号キーとレスポン
ス電文から取り出した乱数データとを用いて、ホストコ
ンピュータ1は、Sing1eDESアルゴリズムによ
り暗号データを生成する。The host computer 1 determines from the encryption key file 25 the encryption key indicated by the latter part P1, P2 (0081) of the command header portion of the issued command as shown in FIG. Using the encryption key and the random number data extracted from the response message, the host computer 1 generates encrypted data by the Sing1eDES algorithm.
【0073】このような暗号データを生成すると、ホス
トコンピュータ1は、図5のAに示す発行コマンドのデ
ータ部に暗号データ、Lc部に暗号データのデータ長を
格納した図9に示すような発行コマンドを設定する。こ
の暗号データが設定された発行コマンドは、ホストコン
ピュータ1によりコマンド電文として作成され、ICカ
ードへ送信される。When such encrypted data is generated, the host computer 1 issues an issuance command as shown in FIG. 9 in which the encrypted data is stored in the data portion of the issued command shown in FIG. 5A and the data length of the encrypted data is stored in the Lc portion. Set the command. The issuing command in which the encrypted data is set is created as a command message by the host computer 1 and transmitted to the IC card.
【0074】上記のように、乱数による暗号化が必要な
コマンドを示すデータが格納されているテーブル情報に
基いて、発行コマンドが暗号処理の元となるデータとし
ての乱数データによる暗号化が必要なコマンドである場
合、ホストコンピュータは、当該発行コマンドをコマン
ド電文として送信する前に、ICカードに乱数データを
要求するコマンドを自動的に送信する。そして、ICカ
ードからの乱数データを受信した際に、ホストコンピュ
ータは、受信した乱数データと、暗号キーファイルに格
納されている暗号キーとを用いて、暗号データを生成
し、生成した暗号データを、上記の発行コマンドに格納
してICカードへ送信する。As described above, based on the table information in which the data indicating the command requiring the encryption by the random number is stored, the issued command needs to be encrypted by the random number data as the source data of the encryption processing. If the command is a command, the host computer automatically transmits a command requesting random number data to the IC card before transmitting the issued command as a command message. Then, when receiving the random number data from the IC card, the host computer generates encrypted data using the received random number data and the encryption key stored in the encryption key file, and generates the generated encrypted data. , Stored in the above issue command and transmitted to the IC card.
【0075】これにより、暗号化処理が必要なコマンド
に対応してICカードからの暗号の元となるデータを要
求するコマンドを予め設定する手間を省き、コマンド群
を記憶する際の記憶容量を減らすことができる。As a result, it is possible to omit the step of setting in advance a command for requesting data to be encrypted from the IC card corresponding to a command requiring encryption processing, and to reduce the storage capacity when storing a command group. be able to.
【0076】また、データメモリと制御素子とを有する
携帯可能記憶媒体の1つ1つに対して、上記データメモ
リに各個人の発行データを書き込むことにより、各個人
ごとにICカードを発行するICカード発行システムに
おいて、上記各個人の発行データがICカードあるいは
リーダライタへ送信するコマンド電文のNAD(ノード
アドレス)部およびINF(インフォメーション)部の
集合として構成され、各コマンドが乱数を用いた暗号化
処理を必要とするコマンドであるかどうかを識別し、乱
数を用いた暗号化処理を必要とするコマンドであると識
別した場合、当該コマンドを送信する前に乱数要求コマ
ンドを自動的に送信し、送信したコマンドに対するレス
ポンス電文に含まれる乱数データを用いて暗号化処理を
行うことにより暗号データを生成し、当該暗号データを
暗号化処理を必要とするコマンドにセットした後、IC
カードあるいはリーダライタへ送信する。Further, an IC card for issuing an IC card for each individual by writing issue data of each individual to the portable memory medium having a data memory and a control element in the data memory. In the card issuing system, the issued data of each individual is configured as a set of a NAD (node address) portion and an INF (information) portion of a command message transmitted to an IC card or a reader / writer, and each command is encrypted using a random number. Identify whether it is a command that requires processing, and if it is identified as a command that requires encryption processing using random numbers, automatically send a random number request command before sending the command, Encryption is performed by using the random number data included in the response message for the transmitted command. After generating the data were the encrypted data set in the command that requires encryption, IC
Send to card or reader / writer.
【0077】これにより、暗号化処理が必要なコマンド
に対応してICカードに乱数データを要求する乱数要求
コマンドを予め設定する手間を省き、発行コマンド群を
記憶する際の記憶容量を減らすことができる。As a result, it is possible to save the trouble of setting in advance a random number request command for requesting random number data from the IC card in response to a command requiring encryption processing, and to reduce the storage capacity when storing issued command groups. it can.
【0078】次に、ICカードCの発行動作において発
行コマンドに乱数要求コマンドが予め格納されている場
合について、図11に示すフローチャートを参照しつつ
説明する。Next, a case where a random number request command is stored in advance as an issue command in an issue operation of the IC card C will be described with reference to a flowchart shown in FIG.
【0079】この場合、上記した図10のフローチャー
トで示すように、自動的に乱数要求コマンドを送信する
ことはしないが、乱数要求コマンドの次のコマンドを、
暗号化処理を必要とするコマンドとみなして処理を行
う。また、この場合、発行に関するデータとして、コマ
ンドが暗号化処理を必要とするか否かを判断するための
上記テーブル情報群24と、暗号キーが別に格納される
上記暗号キーファイル25が必要ない。In this case, as shown in the flowchart of FIG. 10, the random number request command is not automatically transmitted, but the command next to the random number request command is
Processing is performed by regarding the command as requiring encryption processing. In this case, the table information group 24 for determining whether or not the command requires an encryption process and the encryption key file 25 in which an encryption key is separately stored are not required as data relating to issuance.
【0080】すなわち、ICカードCを発行する個人の
発行データを発行データ群21から読み出すと(ステッ
プ21)、ホストコンピュータ1は、発行データを発行
コマンド群22の各発行コマンド内の所定位置に格納す
る(ステップ22)。この際、発行コマンド群22に
は、暗号化処理が必要なコマンドの直前に乱数要求コマ
ンドが設定され、暗号化処理が必要なコマンドのデータ
部内には、暗号キーとなるデータが格納されて発行コマ
ンドとして準備されている。That is, when the issue data of the individual who issues the IC card C is read from the issue data group 21 (step 21), the host computer 1 stores the issue data at a predetermined position in each issue command of the issue command group 22. (Step 22). At this time, a random number request command is set in the issued command group 22 immediately before the command requiring encryption processing, and data serving as an encryption key is stored and issued in the data portion of the command requiring encryption processing. Prepared as a command.
【0081】これらの発行コマンドが準備され、オペレ
ータによりICカードがリーダライタ5に挿入されると
(ステップ23)、ホストコンピュータ1は、まず、最
初の発行コマンドをコマンド電文として作成し、リーダ
ライタ5を介してICカードCへ送信する(ステップ2
4)。When these issuing commands are prepared and the operator inserts the IC card into the reader / writer 5 (step 23), the host computer 1 first creates the first issuing command as a command message, and To the IC card C via the
4).
【0082】この送信したコマンド電文に対するICカ
ードCからレスポンス電文を受信すると、ホストコンピ
ュータ1は、レスポンス電文が正常か否かを判断する
(ステップ25)。この判断によりレスポンス電文が正
常であると判断すると、ホストコンピュータ1は、送信
したコマンド電文のコマンドが乱数要求コマンドであっ
たか否かを判断する(ステップ26)。Upon receiving a response message from the IC card C for the transmitted command message, the host computer 1 determines whether the response message is normal (step 25). When determining that the response message is normal, the host computer 1 determines whether the command of the transmitted command message is a random number request command (step 26).
【0083】この判断により送信したコマンドが乱数要
求コマンドであると判断すると、ホストコンピュータ1
は、次に送信する発行コマンドが暗号化処理を必要とす
るコマンドであると見なし、レスポンス電文から乱数デ
ータを取り出す。そして、ホストコンピュータ1は、レ
スポンス電文から取り出した乱数データと、次に送信す
る発行コマンドとして準備されているコマンドのINF
部のデータを暗号キーとを用いて、暗号データを生成す
る(ステップ27)。If it is determined that the transmitted command is a random number request command, the host computer 1
Regards the issued command to be transmitted next as a command requiring encryption processing, and extracts random number data from the response message. Then, the host computer 1 compares the random number data extracted from the response message with the INF of the command prepared as the next command to be transmitted.
The encrypted data is generated using the data of the copy and the encryption key (step 27).
【0084】このようにして暗号データを得ると、ホス
トコンピュータ1は、暗号データを発行コマンドのデー
タ部に記録されている暗号キー(外部認証キー)に上書
きし、PCB部、LEN部、EDC部を有するコマンド
電文に設定する(ステップ28)。When the encrypted data is obtained in this manner, the host computer 1 overwrites the encrypted data with the encryption key (external authentication key) recorded in the data section of the issued command, and converts the PCB section, the LEN section, and the EDC section. (Step 28).
【0085】ホストコンピュータ1は、上記ステップ2
6で、送信したコマンド電文が乱数要求コマンドでない
と判断した場合、あるいは生成した暗号データをコマン
ド電文に設定した場合、次のコマンドが準備されている
か否かによりコマンド電文の送信が完了したか否かを判
断する(ステップ29)。The host computer 1 executes step 2
If it is determined in step 6 that the transmitted command message is not a random number request command, or if the generated encrypted data is set in the command message, whether the transmission of the command message has been completed depends on whether the next command is prepared or not. Is determined (step 29).
【0086】この判断によりコマンド電文の送信を完了
したと判断した場合、ホストコンピュータ1は、リーダ
ライタ5からICカードを排出し(ステップ30)、I
Cカードの発行処理を終了する。また、次のコマンド電
文が準備されている場合、つまりコマンド電文の送信を
完了していないと判断した場合、ホストコンピュータ1
は、上記ステップ24へ戻り、処理を繰り返す。When the host computer 1 determines that the transmission of the command message has been completed, the host computer 1 ejects the IC card from the reader / writer 5 (step 30).
The C card issuing process ends. When the next command message is prepared, that is, when it is determined that the transmission of the command message has not been completed, the host computer 1
Returns to step 24 and repeats the process.
【0087】上記の発行処理の具体例として、例えば、
図6に示す発行コマンドが準備された場合について説明
する。この場合、ホストコンピュータ1は、上記ステッ
プ25で、送信したコマンドが、図6のAに示すような
乱数要求コマンド(INF=00 84 00 00
08)である際に、次の発行コマンドを暗号化処理が必
要な発行コマンドであるとみなす。As a specific example of the above issuance processing, for example,
A case where the issuing command shown in FIG. 6 is prepared will be described. In this case, the host computer 1 determines in step 25 that the transmitted command is a random number request command (INF = 00 84 00 00 00) as shown in FIG.
08), the next issued command is regarded as an issued command requiring encryption processing.
【0088】そして、上記乱数要求コマンドに対してI
Cカードから、図8に示すような、レスポンス電文を受
信すると、INF部に格納されている乱数データを取り
出す。ホストコンピュータ1は、レスポンス電文から取
り出した乱数データと、乱数データによる暗号化処理が
必要なコマンドである図6のBに示すような外部認証コ
マンドのデータ部に格納されている暗号キーとを用い
て、Sing1eDESアルゴリズムにより暗号データ
(8バイト)を得る。Then, in response to the random number request command, I
When a response message as shown in FIG. 8 is received from the C card, the random number data stored in the INF section is extracted. The host computer 1 uses the random number data extracted from the response message and the encryption key stored in the data portion of the external authentication command as shown in FIG. 6B, which is a command requiring encryption processing using the random number data. Then, encrypted data (8 bytes) is obtained by the Sing1eDES algorithm.
【0089】このようにして得られた暗号データは、図
9に示すように、外部認証コマンドのデータ部に、暗号
キー(外部認証キー)を上書きすることにより格納さ
れ、Lc部にデータ長が上書きされて格納される。この
ように設定された発行コマンドには、PCB部,LEN
部,EDC部が付加されてコマンド電文として構成さ
れ、ICカードに送信される。As shown in FIG. 9, the encrypted data thus obtained is stored in the data part of the external authentication command by overwriting the encryption key (external authentication key), and the data length is stored in the Lc part. Overwritten and stored. The issuance commands set in this way include the PCB section, LEN
And an EDC unit are added to form a command message, which is transmitted to the IC card.
【0090】上記のように、乱数による暗号化処理が必
要なコマンドに暗号キーを格納しておき、乱数要求コマ
ンドの次の発行コマンドを暗号化処理が必要なコマンド
と判断し、ICカードから乱数データを受信した際に、
受信した乱数データと、上記暗号化処理が必要なコマン
ドのデータ部に格納されている暗号キーとを用いて、暗
号データを生成し、生成した暗号データを、上記発行コ
マンドに格納してICカードへ送信する。As described above, an encryption key is stored in a command that requires encryption processing using a random number, and a command issued next to the random number request command is determined to be a command that requires encryption processing. When data is received,
Using the received random number data and an encryption key stored in the data portion of the command requiring the encryption process, generate encrypted data, store the generated encrypted data in the issued command, Send to
【0091】これにより、暗号化処理に必要となる暗号
キーを予め発行コマンド群に含めて格納しておくことが
でき、暗号キーを別のファイルとして記憶しておく必要
がなく、発行に関連する種々のファイルの管理が煩雑に
なるのを防ぐことができる。Thus, the encryption key required for the encryption processing can be included in the issued command group and stored in advance, and it is not necessary to store the encryption key as a separate file, and the key related to the issuance is not required. The management of various files can be prevented from becoming complicated.
【0092】また、コマンドが暗号化処理が必要なコマ
ンドか否かを判定するためのテーブル情報の必要がな
く、発行に関連する種々のファイルの管理が煩雑になる
のを防ぐことができる。Further, there is no need for table information for determining whether or not a command is a command that requires encryption processing, so that it is possible to prevent complicated management of various files related to issuance.
【0093】また、データメモリと制御素子とを有する
携帯可能記憶媒体の1つ1つに対して、上記データメモ
リに各個人の発行データを書き込むことにより、各個人
ごとにICカードを発行するICカード発行システムに
おいて、上記各個人の発行データが、ICカードあるい
はリーダライタへ送信するコマンド電文のNAD(ノー
ドアドレス)部およびINF(インフォメーション)部
の集合として構成され、各コマンドが暗号化処理を必要
とするコマンドである場合、当該コマンドのINF部内
のデータ部に暗号キーを格納させておき、当該コマンド
を送信する前に暗号化処理を行う際に、当該暗号キーを
用いて暗号データを作成し、コマンドに格納された暗号
キーの代わりに本暗号データを格納した後、ICカード
またはリーダライタに送信する。Further, an IC card that issues an IC card for each individual is written in each of the portable storage media having a data memory and a control element by writing issuance data of each individual to the data memory. In the card issuing system, the issued data of each individual is configured as a set of a NAD (node address) portion and an INF (information) portion of a command message transmitted to an IC card or a reader / writer, and each command requires an encryption process. In the case of the command, the encryption key is stored in the data part in the INF part of the command, and when performing the encryption processing before transmitting the command, the encryption data is created using the encryption key. After storing this encrypted data in place of the encryption key stored in the command, the IC card or reader / To send to.
【0094】これにより、暗号化処理に必要となる暗号
キーを予め発行コマンド群に含めて格納でき、暗号キー
を別のファイルとして記憶しておく必要がなく、さら
に、コマンドが暗号化処理が必要なコマンドか否かを判
定するためのテーブル情報の必要がなくため、発行に関
連するファイルの種類やデータ量が多くなることを防
ぎ、それらのファイルの管理が煩雑になるのを防ぐこと
ができる。Thus, the encryption key required for the encryption processing can be included in the issued command group and stored in advance, and it is not necessary to store the encryption key as a separate file. Since there is no need for table information for determining whether the command is a simple command, it is possible to prevent an increase in the type and data amount of files related to issuance, and to prevent complicated management of those files. .
【0095】次に、乱数による暗号化処理が必要なコマ
ンド電文に暗号キーが予め格納され、さらに、乱数によ
る暗号化処理が必要なコマンド電文の前に、自動的に乱
数要求コマンドが送信される場合のICカードの発行動
作について、図12に示すフローチャートを参照しつつ
説明する。この場合、発行に関するデータとして、暗号
キーが別に格納される上記暗号キーファイル25が必要
ない。Next, an encryption key is stored in advance in a command message requiring encryption processing using random numbers, and a random number request command is automatically transmitted before a command message requiring encryption processing using random numbers. The issuing operation of the IC card in this case will be described with reference to the flowchart shown in FIG. In this case, the encryption key file 25 in which the encryption key is separately stored is unnecessary as the data relating to the issuance.
【0096】すなわち、ICカードCを発行する個人の
発行データを発行データ群21から読み出すと(ステッ
プ31)、ホストコンピュータ1は、発行データを発行
コマンド群22の各発行コマンド内の所定位置に格納す
る(ステップ32)。この際、発行コマンド群22に
は、乱数要求コマンドが含まれず、暗号化処理が必要な
コマンドのデータ部内には、暗号キーとなるデータが格
納されて準備される。That is, when the issued data of the individual who issues the IC card C is read from the issued data group 21 (step 31), the host computer 1 stores the issued data at a predetermined position in each issued command of the issued command group 22. (Step 32). At this time, the issued command group 22 does not include a random number request command, and data serving as an encryption key is stored and prepared in a data portion of a command requiring encryption processing.
【0097】発行コマンドが準備され、オペレータによ
りリーダライタ5にICカードが挿入されると(ステッ
プ33)、発行コマンドは、順次、ホストコンピュータ
1によりコマンド電文として作成されてリーダライタ5
を介してICカードCへ送信される。When an issuance command is prepared and an IC card is inserted into the reader / writer 5 by the operator (step 33), the issuance command is sequentially created as a command message by the host computer 1 and is read.
Is transmitted to the IC card C via.
【0098】このようにコマンド電文を送信する際、ホ
ストコンピュータ1は、送信するコマンドが暗号化処理
を必要とするか否かを判断する(ステップ34)。この
場合、ホストコンピュータ1は、上記テーブル情報群2
4に乱数による暗号化処理が必要なコマンドを示すデー
タ(CLA/INSの値)が格納されているので、この
テーブル情報群24に格納されている内容に基いて、コ
マンドが暗号化処理を必要とするか否か判断する。When transmitting a command message in this way, the host computer 1 determines whether the command to be transmitted requires an encryption process (step 34). In this case, the host computer 1 transmits the table information group 2
4 stores data (CLA / INS value) indicating a command that requires an encryption process using a random number. Therefore, based on the contents stored in the table information group 24, the command needs an encryption process. Is determined.
【0099】この判断により送信するコマンドが暗号化
処理を必要とすると判断すると、ホストコンピュータ1
は、当該コマンドを送信する前に、リーダライタ5を介
してICカードCへ乱数要求コマンドのコマンド電文を
送信する(ステップ35)。If it is determined that the command to be transmitted requires encryption processing, the host computer 1
Transmits the command message of the random number request command to the IC card C via the reader / writer 5 before transmitting the command (step 35).
【0100】この送信したコマンド電文に対するICカ
ードCからレスポンス電文を受信すると、ホストコンピ
ュータ1は、レスポンス電文が正常か否かを判断する
(ステップ36)。この判断によりレスポンス電文が正
常であると判断すると、ホストコンピュータ1は、レス
ポンス電文のINF部に格納されている乱数データを取
り出す。そして、ホストコンピュータ1は、レスポンス
電文より取り出した乱数データと、コマンド電文のデー
タ部に格納されれている暗号キーとを用いて、例えば、
Sing1eDESアルゴリズムにより、暗号データを
生成する(ステップ37)。Upon receiving a response message from the IC card C for the transmitted command message, the host computer 1 determines whether or not the response message is normal (step 36). If it is determined that the response message is normal, the host computer 1 extracts the random number data stored in the INF section of the response message. Then, the host computer 1 uses the random number data extracted from the response message and the encryption key stored in the data section of the command message, for example,
Encrypted data is generated by the Sing1eDES algorithm (step 37).
【0101】暗号データを生成すると、ホストコンピュ
ータ1は、生成した暗号データを暗号キーに上書きし、
その暗号データのサイズとともに、図7のAに示す外部
認証コマンドのような暗号化処理が必要なコマンド電文
のデータ部およびLc部に設定する(ステップ38)。After generating the encrypted data, the host computer 1 overwrites the generated encrypted data with the encryption key,
Along with the size of the encrypted data, it is set in the data portion and the Lc portion of the command message requiring encryption such as the external authentication command shown in FIG. 7A (step 38).
【0102】この暗号データが設定された暗号化処理が
必要なコマンドは、ホストコンピュータ1により、図9
に示すように、INF部として完成された後、図3に示
すように、PCB部,LEN部,EDC部が付加された
コマンド電文として、リーダライタ5を介してICカー
ドCに送信される(ステップ39)。The command that requires the encryption processing in which the encrypted data is set is sent by the host computer 1 to the host computer 1 as shown in FIG.
As shown in FIG. 3, after being completed as an INF section, as shown in FIG. 3, a command message to which a PCB section, a LEN section, and an EDC section are added is transmitted to the IC card C via the reader / writer 5 ( Step 39).
【0103】このICカードCへ送信したコマンド電文
に対するレスポンス電文を受信すると、ホストコンピュ
ータ1は、レスポンス電文が正常か否かを判断する(ス
テップ40)。この判断によりレスポンス電文が正常で
あると判断すると、ホストコンピュータ1は、次に送信
すべきコマンド電文が準備されているか否かによりコマ
ンド電文の送信が完了したか否かを判断する(ステップ
41)。この判断によりコマンド電文の送信を完了して
いないと判断した場合に、ホストコンピュータ1は、上
記ステップ34へ戻り、上記の処理を繰り返す。また、
コマンド電文の送信が完了した判断した送信した場合、
ホストコンピュータ1は、リーダライタ5からICカー
ドを排出し(ステップ42)、処理を終了する。Upon receiving a response message corresponding to the command message transmitted to the IC card C, the host computer 1 determines whether the response message is normal (step 40). If it is determined that the response message is normal, the host computer 1 determines whether the transmission of the command message has been completed based on whether a command message to be transmitted next is prepared (step 41). . If it is determined that the transmission of the command message has not been completed, the host computer 1 returns to step 34 and repeats the above processing. Also,
If it is determined that the transmission of the command message has been completed,
The host computer 1 ejects the IC card from the reader / writer 5 (Step 42), and ends the processing.
【0104】上記の発行処理の具体例として、例えば、
図7のAに示すような外部認証コマンドを送信する前
に、ホストコンピュータ1が乱数要求コマンドを自動的
に送信する場合について説明する。As a specific example of the above issuance processing, for example,
A case where the host computer 1 automatically transmits a random number request command before transmitting the external authentication command as shown in FIG. 7A will be described.
【0105】この場合、外部認証コマンドを送信する前
に、自動的に送信した乱数要求コマンドに対して、図8
に示すようなレスポンス電文を受信すると、ホストコン
ピュータ1は、レスポンス電文のINF部のデータ部に
記録されている乱数データ(1C 24 5D F0
78 9B 3A E6)を取り出す。In this case, before the external authentication command is transmitted, the automatically transmitted random number request command is
When the host computer 1 receives the response message as shown in (1), the host computer 1 generates the random number data (1C 245D F0) recorded in the data section of the INF section of the response message.
Remove 789B 3A E6).
【0106】そして、ホストコンピュータ1は、レスポ
ンス電文から取り出した乱数データと図7のAに示すよ
うな発行コマンドのデータ部に格納されている暗号キー
とを用いて、Sing1eDESアルゴリズムにより暗
号データを生成する。Then, the host computer 1 generates encrypted data by the Sing1eDES algorithm using the random number data extracted from the response message and the encryption key stored in the data portion of the issued command as shown in FIG. 7A. I do.
【0107】ホストコンピュータ1は、上記のようにし
て得られた暗号データを、その暗号データのサイズ(0
8h)とともに、暗号化処理が必要なコマンドである図
7のAに示す外部認証コマンドのデータ部およびにLc
部に上書きすることにより設定する。The host computer 1 converts the encrypted data obtained as described above into the size of the encrypted data (0
8h), the data part of the external authentication command shown in FIG.
Set by overwriting the section.
【0108】この暗号データが設定された発行コマンド
は、図9に示すように、INF部として完成された後、
PCB部,LEN部,EDC部が付加されたコマンド電
文として、リーダライタ5を介してICカードCに送信
される。After the issuance command in which the encrypted data is set is completed as an INF section as shown in FIG.
It is transmitted to the IC card C via the reader / writer 5 as a command message to which the PCB section, the LEN section, and the EDC section are added.
【0109】上記のように、乱数による暗号化処理が必
要なコマンドに暗号キーを格納しておき、乱数による暗
号化処理が必要なコマンドを示すデータが格納されてい
るテーブル情報の内容に基いて、発行コマンドが乱数に
よる暗号化処理が必要なコマンドか否かを判断し、暗号
化処理が必要なコマンドと判断した場合、当該コマンド
を送信する前に、ICカードに乱数データを要求する乱
数要求コマンドを自動的に送信し、ICカードから乱数
データを受信した際に、受信した乱数データと、上記暗
号化処理が必要なコマンドのデータ部に格納されている
暗号キーとを用いて、暗号データを生成し、生成した暗
号データを、上記の発行コマンドに格納してICカード
へ送信するようにしたものである。As described above, an encryption key is stored in a command that requires encryption processing using a random number, and based on the contents of table information in which data indicating a command that requires encryption processing using a random number is stored. It is determined whether the issued command is a command that requires encryption processing by using a random number. If it is determined that the command requires encryption processing, a random number request that requests the IC card for random number data before transmitting the command. When a command is automatically transmitted and random number data is received from the IC card, the received random number data and the encryption key stored in the data portion of the command requiring the above-described encryption processing are used to encrypt data. Is generated, and the generated encrypted data is stored in the above issue command and transmitted to the IC card.
【0110】これにより、暗号化処理が必要なコマンド
に対応する乱数要求コマンドを予め設定する必要がなく
なり、上記乱数要求コマンドを設定する手間を省き、コ
マンド群を記憶する際の記憶容量を減らすことができ
る。As a result, there is no need to set in advance a random number request command corresponding to a command requiring encryption processing, so that it is not necessary to set the random number request command, and the storage capacity for storing a command group can be reduced. Can be.
【0111】また、暗号化処理に必要となる暗号キーの
データを予め発行コマンド群に含めて格納しておくこと
により、暗号キーを別のファイルとして記憶しておく必
要がなく、発行に関連する種々のファイルの管理が煩雑
になるのを防ぐことができる。Further, by storing the data of the encryption key required for the encryption process in the issuance command group in advance, it is not necessary to store the encryption key as a separate file, and the data related to the issuance can be obtained. The management of various files can be prevented from becoming complicated.
【0112】また、データメモリと制御素子とを有する
携帯可能記憶媒体の1つ1つに対して、上記データメモ
リに各個人の発行データを書き込むことにより、各個人
ごとにICカードを発行するICカード発行システムに
おいて、上記各個人の発行データが、ICカードあるい
はリーダライタへ送信するコマンド電文のNAD(ノー
ドアドレス)部およびINF(インフォメーション)部
の集合として構成され、各コマンドが乱数を用いた暗号
化処理を必要とするコマンドであるかどうかを識別し、
乱数を用いた暗号化処理を必要とするコマンドであると
識別された場合、当該コマンドを送信する前に乱数要求
コマンドを自動的に送信し、そのレスポンス電文に含ま
れる乱数データを用いて暗号化処理を行う際に、当該コ
マンドのINF部内のデータ部に暗号キーを格納させて
おき、当該暗号キーを用いて暗号データを作成し、コマ
ンドに格納された暗号キーの代わりに本暗号データを格
納した後、ICカードまたはリーダライタに送信する。[0112] Further, by writing issuance data of each individual in the data memory for each portable storage medium having a data memory and a control element, an IC card for issuing an IC card for each individual is provided. In the card issuing system, the issued data of each individual is configured as a set of a NAD (node address) portion and an INF (information) portion of a command message transmitted to an IC card or a reader / writer, and each command is an encryption using a random number. Identify whether the command needs to be
If it is identified as a command that requires encryption using random numbers, it automatically sends a random number request command before sending the command and encrypts it using the random number data included in the response message. At the time of processing, an encryption key is stored in the data part in the INF part of the command, encrypted data is created using the encryption key, and the actual encrypted data is stored instead of the encryption key stored in the command. Then, it transmits to the IC card or the reader / writer.
【0113】これにより、暗号化処理が必要なコマンド
に対応する乱数要求コマンドを予め設定する手間を省
き、コマンド群を記憶する際の記憶容量を減らすことが
できる。As a result, it is possible to save the trouble of setting in advance a random number request command corresponding to a command requiring encryption processing, and to reduce the storage capacity for storing a command group.
【0114】また、暗号化処理に必要となる暗号キーを
予め発行コマンド群に含めて格納しておくことができ、
暗号キーを別のファイルとして記憶しておく必要がな
く、発行に関連する種々のファイルの管理が煩雑になる
のを防ぐことができる。Also, an encryption key required for the encryption process can be stored in advance in the issued command group.
It is not necessary to store the encryption key as a separate file, and it is possible to prevent management of various files related to issuance from becoming complicated.
【0115】[0115]
【発明の効果】以上詳述したように、この発明によれ
ば、乱数要求コマンドを必要なだけ発行コマンド群に含
めておくという手間を省き、発行コマンド群を格納した
ファイルの容量が多くなることを防ぐことができるIC
カード発行システムとICカード発行方法を提供でき
る。As described above in detail, according to the present invention, it is possible to eliminate the trouble of including a random number request command in the issued command group as necessary, and to increase the capacity of the file storing the issued command group. IC that can prevent
A card issuing system and an IC card issuing method can be provided.
【0116】また、この発明によれば、暗号キーのデー
タを、関連する発行コマンドのデータ部、すなわち暗号
化後のデータを格納すべき場所に仮に格納しておくこと
により、発行に関連するファイルの管理が煩雑になるの
を防ぐことができるICカード発行システムとICカー
ド発行方法を提供できる。Further, according to the present invention, by temporarily storing the data of the encryption key in the data portion of the related issuance command, that is, in the location where the encrypted data is to be stored, the file related to the issuance is issued. An IC card issuing system and an IC card issuing method that can prevent the management of the IC card from becoming complicated can be provided.
【図1】この発明の実施の形態に係わるICカードシス
テムの全体構成を示す図。FIG. 1 is a diagram showing an overall configuration of an IC card system according to an embodiment of the present invention.
【図2】電文のフォーマットを示す図。FIG. 2 is a diagram showing a message format.
【図3】発行コマンドのフォーマットを示す図。FIG. 3 is a diagram showing a format of an issue command.
【図4】コマンド電文のフォーマットを示す図。FIG. 4 is a diagram showing a format of a command message.
【図5】発行コマンドの具体例を示す図。FIG. 5 is a diagram showing a specific example of an issue command.
【図6】発行コマンドの具体例を示す図。FIG. 6 is a diagram showing a specific example of an issue command.
【図7】発行コマンドの具体例を示す図。FIG. 7 is a diagram showing a specific example of an issue command.
【図8】レスポンス電文のフォーマットを示す図。FIG. 8 is a diagram showing a format of a response message.
【図9】暗号処理を必要とする発行コマンドの具体例を
示す図。FIG. 9 is a diagram showing a specific example of an issued command requiring encryption processing.
【図10】ICカードの発行処理の動作を説明するため
のフローチャート。FIG. 10 is a flowchart for explaining the operation of an IC card issuing process.
【図11】ICカードの発行処理の動作を説明するため
のフローチャート。FIG. 11 is a flowchart for explaining the operation of an IC card issuing process.
【図12】ICカードの発行処理の動作を説明するため
のフローチャート。FIG. 12 is a flowchart for explaining the operation of an IC card issuing process.
C…ICカード Ca…データメモリ部 Cb…CPU 1…ホストコンピュータ 2…補助記憶装置 2a…発行データファイル 4…キーボード 5…リーダライタ 21…発行データ群 22…発行コマンド群 23…発行データ管理情報群 24…テーブル情報群 25…暗号キーファイル C: IC card Ca: Data memory section Cb: CPU 1: Host computer 2: Auxiliary storage device 2a: Issued data file 4: Keyboard 5: Reader / writer 21: Issued data group 22: Issued command group 23: Issued data management information group 24: table information group 25: encryption key file
Claims (9)
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記データ通信において暗号化処理を行う際に用いる暗
号キーを記憶する記憶手段と、 上記ICカードへ発行コマンドを送信する前に、発行コ
マンドが暗号化処理を必要とするか否かを判断する判断
手段と、 この判断手段により発行コマンドが暗号化処理を必要と
しないと判断した際に、上記発行コマンドを送信する第
1の送信手段と、 上記判断手段により発行コマンドが暗号化処理を必要と
すると判断した際に、該発行コマンドを送信する前に、
上記ICカードからの暗号の元となるデータを要求する
コマンドを送信する第2の送信手段と、 この第2の送信手段により送信したコマンドに対応して
上記ICカードから返信される暗号の元となるデータ
と、上記記憶手段に記憶されている暗号キーとを用いて
暗号データを生成する生成手段と、 この生成手段により生成した暗号データを該発行コマン
ドに設定して上記ICカードへ送信する第3の送信手段
と、 を具備したことを特徴とするICカード発行システム。1. An I / O having a data memory and a control element.
In an IC card issuing system that issues an IC card by performing data communication with a C card, a storage unit that stores an encryption key used when performing an encryption process in the data communication, and transmits an issue command to the IC card. A determining means for determining whether the issued command requires the encryption processing; and a transmitting means for transmitting the issued command when the determining means determines that the issued command does not require the encryption processing. And when the issuing command determines that the issued command requires an encryption process, and before transmitting the issued command,
A second transmitting means for transmitting a command requesting data to be a source of encryption from the IC card; and a source of encryption returned from the IC card in response to the command transmitted by the second transmitting means. Means for generating encrypted data using the data and the encryption key stored in the storage means; and setting the encrypted data generated by the generating means in the issuing command and transmitting the issued command to the IC card. 3. An IC card issuing system comprising: (3) transmitting means.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードへ複数の発行コマンドを順次送信する第
1の送信手段と、 この第1の送信手段により送信した発行コマンドが暗号
の元となるデータを要求するコマンドである場合に、こ
のコマンドに対応して上記ICカードから返信される暗
号の元となるデータと、次に送信する発行コマンドに予
め設定されている暗号キーとを用いて暗号データを生成
する生成手段と、 この生成手段により生成した暗号データを次に送信する
発行コマンドに設定してICカードへ送信する第2の送
信手段と、 を具備したことを特徴とするICカード発行システム。2. An IC having a data memory and a control element.
In an IC card issuing system for issuing an IC card by performing data communication with a C card, a first transmitting means for sequentially transmitting a plurality of issuing commands to the IC card, and an issuing command transmitted by the first transmitting means. Is a command requesting the data to be encrypted, the data to be encrypted is returned from the IC card corresponding to this command, and the encryption is set in advance in the issuance command to be transmitted next. Generating means for generating encrypted data using the key; and second transmitting means for setting the encrypted data generated by the generating means as an issue command to be transmitted next and transmitting the issued command to the IC card. Characterized IC card issuing system.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードへ発行コマンドを送信する前に、発行コ
マンドが暗号化処理を必要とするか否かを判断する判断
手段と、 この判断手段により発行コマンドが暗号化処理を必要と
しないと判断した際に、上記発行コマンドを送信する第
1の送信手段と、 上記判断手段により発行コマンドが暗号化処理を必要と
すると判断した際に、該発行コマンドを送信する前に、
上記ICカードからの暗号の元となるデータを要求する
コマンドを上記ICカードへ送信する第2の送信手段
と、 この第2の送信手段により送信したコマンドに対してI
Cカードから送信された暗号の元となるデータと、該発
行コマンドに予め設定されている暗号キーとを用いて暗
号データを生成する生成手段と、 この生成手段により生成した暗号データを該発行コマン
ドに設定して上記ICカードへ送信する第3の送信手段
と、 を具備したことを特徴とするICカード発行システム。3. An I memory having a data memory and a control element.
In an IC card issuing system for issuing an IC card by performing data communication with a C card, a determination unit for determining whether or not the issued command requires an encryption process before transmitting the issued command to the IC card. A first transmitting unit for transmitting the issued command when the determining unit determines that the issued command does not require the encryption process; and determining that the issued command requires the encrypting process by the determining unit. Before sending the issued command,
A second transmitting means for transmitting a command for requesting data to be encrypted from the IC card to the IC card; and a second transmitting means for transmitting the command transmitted by the second transmitting means.
Generating means for generating encrypted data by using the encryption source data transmitted from the C card and an encryption key preset in the issued command; And a third transmitting means for transmitting the information to the IC card.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードを発行する際の発行データを個人ごとに
記憶する第1の記憶手段と、 上記ICカードを発行する際に用いる発行コマンド群を
記憶する第2の記憶手段と、 上記データ通信において暗号化処理を行う際に用いる暗
号キーを記憶する第3の記憶手段と、 上記第1の記憶手段からICカードを発行する個人に対
する発行データを読み出し、上記第2の記憶手段により
記憶されている各発行コマンドと組合わせて、上記IC
カードへ送信する各発行コマンドを設定する設定手段
と、 この設定手段により設定した発行コマンドが暗号化処理
を必要とするか否かを判断する判断手段と、 この判断手段により発行コマンドが暗号化処理を必要と
しないと判断した際に、上記設定手段により設定した発
行コマンドを送信する第1の送信手段と、 上記判断手段により発行コマンドが暗号化処理を必要と
すると判断した際に、該発行コマンドを送信する前に、
上記ICカードからの暗号の元となるデータを要求する
コマンドを上記ICカードへ送信する第2の送信手段
と、 この第2の送信手段により送信したコマンドに対応して
上記ICカードから送信された暗号の元となるデータ
と、上記第3の記憶手段に記憶されている暗号キーとを
用いて暗号データを生成する生成手段と、 この生成手段により生成した暗号データを上記設定手段
により設定されている暗号化処理を必要とする発行コマ
ンドに設定して上記送信手段によりICカードへ送信す
る第3の送信手段と、 を具備したことを特徴とするICカード発行システム。4. An I-type memory having a data memory and a control element.
In an IC card issuing system for issuing an IC card by performing data communication with a C card, a first storage means for storing issue data for issuing the IC card for each individual; A second storage unit for storing an issuance command group to be used for encryption, a third storage unit for storing an encryption key used for performing an encryption process in the data communication, and an IC card issued from the first storage unit. Issuance data for an individual to be read and combined with each of the issuance commands stored by the second storage means,
Setting means for setting each issued command to be transmitted to the card; determining means for determining whether or not the issued command set by the setting means requires encryption processing; A first transmitting unit for transmitting the issued command set by the setting unit when it is determined that the issuing command is not required; and Before sending
A second transmitting means for transmitting a command for requesting data to be encrypted from the IC card to the IC card; and a second transmitting means for transmitting the command transmitted from the IC card in response to the command transmitted by the second transmitting means. Generating means for generating encrypted data using data as a source of encryption and an encryption key stored in the third storage means; and setting the encrypted data generated by the generating means by the setting means. And a third transmitting means for setting the issued command requiring an encryption process and transmitting the command to the IC card by the transmitting means.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードを発行する際の発行データを個人ごとに
記憶する第1の記憶手段と、 上記ICカードを発行する際に用いる発行コマンド群を
記憶する第2の記憶手段と、 上記第1の記憶手段からICカードを発行する個人に対
する発行データを読み出し、上記第2の記憶手段により
記憶されている各発行コマンドと組合わせて、上記IC
カードへ送信する各発行コマンドを設定する設定手段
と、 この設定手段により設定した発行コマンドを順次上記I
Cカードへ送信する第1の送信手段と、 この送信手段により送信した発行コマンドが暗号の元と
なるデータを要求するコマンドである場合に、このコマ
ンドに対応して上記ICカードから返信される暗号の元
となるデータと、次に送信する発行コマンドに予め設定
されている暗号キーとを用いて暗号データを生成する生
成手段と、 この生成手段により生成した暗号データを上記設定手段
により設定されている次に送信する発行コマンドに設定
して上記ICカードへ送信する第2の送信手段と、 を具備したことを特徴とするICカード発行システム。5. An I-type memory having a data memory and a control element.
In an IC card issuing system for issuing an IC card by performing data communication with a C card, a first storage means for storing issue data for issuing the IC card for each individual; A second storage unit for storing a group of issuance commands to be used for reading the issuance data for the individual who issues the IC card from the first storage unit, and combining with the issuance commands stored in the second storage unit Together with the above IC
Setting means for setting each issue command to be transmitted to the card;
A first transmitting means for transmitting to the C card; and, when the issued command transmitted by the transmitting means is a command for requesting data to be encrypted, a cipher returned from the IC card in response to the command. Generating means for generating encrypted data by using the original data of the data and an encryption key which is set in advance in an issue command to be transmitted next; and the setting means sets the encrypted data generated by the generating means by the setting means. And a second transmission means for setting an issue command to be transmitted next and transmitting the command to the IC card.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードを発行する際の発行データを個人ごとに
記憶する第1の記憶手段と、 上記ICカードを発行する際に用いる発行コマンド群を
記憶する第2の記憶手段と、 上記第1の記憶手段からICカードを発行する個人に対
する発行データを読み出し、上記第2の記憶手段により
記憶されている各発行コマンドと組合わせて、上記IC
カードへ送信する各発行コマンドを設定する設定手段
と、 この設定手段により設定した発行コマンドが暗号化処理
を必要とするか否かを判断する判断手段と、 この判断手段により発行コマンドが暗号化処理を必要と
しないと判断した際に、上記設定手段により設定した発
行コマンドを順次送信する第1の送信手段と、 上記判断手段により発行コマンドが暗号化処理を必要と
すると判断した際に、該発行コマンドを送信する前に、
上記ICカードからの暗号の元となるデータを要求する
コマンドを上記ICカードへ送信する第2の送信手段
と、 この第2の送信手段により送信したコマンドに対応して
上記ICカードから返信されるデータと、該発行コマン
ドに予め設定されている暗号キーとを用いて、暗号デー
タを生成する生成手段と、 この生成手段により生成した暗号データを上記設定手段
により設定された暗号化処理を必要とする発行コマンド
に設定して上記ICカードへ送信する第3の送信手段
と、 を具備したことを特徴とするICカード発行システム。6. I / O having a data memory and a control element
In an IC card issuing system for issuing an IC card by performing data communication with a C card, a first storage means for storing issue data for issuing the IC card for each individual; A second storage unit for storing a group of issuance commands to be used for reading the issuance data for the individual who issues the IC card from the first storage unit, and combining with each of the issuance commands stored in the second storage unit. Together with the above IC
Setting means for setting each issued command to be transmitted to the card; determining means for determining whether or not the issued command set by the setting means requires encryption processing; A first transmitting means for sequentially transmitting the issued command set by the setting means when it is determined that the issued command does not need to be issued; Before sending the command,
A second transmitting means for transmitting a command requesting data to be encrypted from the IC card to the IC card; and a reply from the IC card corresponding to the command transmitted by the second transmitting means. Generating means for generating encrypted data by using the data and an encryption key preset in the issued command; and requiring the encryption processing generated by the generating means to perform the encryption processing set by the setting means. And a third transmission unit that sets the command to be issued and transmits the command to the IC card.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記データ通信において暗号化処理を行う際に用いる暗
号キーを記憶手段に記憶し、 上記ICカードへ発行コマンドを送信する前に、発行コ
マンドが暗号化処理を必要とするか否かを判断し、 この判断により発行コマンドが暗号化処理を必要としな
いと判断した際に、上記発行コマンドを送信し、 上記判断により発行コマンドが暗号化処理を必要とする
と判断した際に、該発行コマンドを送信する前に、上記
ICカードからの暗号の元となるデータを要求するコマ
ンドを送信し、 この送信したコマンドに対応して上記ICカードから返
信される暗号の元となるデータと、上記記憶手段に記憶
されている暗号キーとを用いて暗号データを生成し、 この生成した暗号データを該発行コマンドに設定して上
記ICカードへ送信する、 ことを特徴とするICカード発行方法。7. I / O having a data memory and a control element
In an IC card issuing system that issues an IC card by performing data communication with a C card, an encryption key used for performing an encryption process in the data communication is stored in a storage unit, and an issue command is transmitted to the IC card. Before determining whether the issued command requires encryption processing, if the determined that the issued command does not require encryption processing, transmitting the issued command, and issuing based on the determination When it is determined that the command requires an encryption process, before transmitting the issued command, a command for requesting data to be encrypted from the IC card is transmitted, and a command corresponding to the transmitted command is transmitted. Generating encrypted data using the encryption source data returned from the IC card and the encryption key stored in the storage means; The resulting encrypted data is set to the issued command transmitted to the IC cards, IC card issuing method, characterized in that.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードへ複数の発行コマンドを順次送信し、 これにより送信した発行コマンドが暗号の元となるデー
タを要求するコマンドである場合に、このコマンドに対
応して上記ICカードから返信される暗号の元となるデ
ータと、次に送信する発行コマンドに予め設定されてい
る暗号キーとを用いて暗号データを生成し、 この生成した暗号データを次に送信する発行コマンドに
設定してICカードへ送信する、 ことを特徴とするICカード発行方法。8. I / O having a data memory and a control element
In an IC card issuance system for issuing an IC card by performing data communication with a C card, a plurality of issuance commands are sequentially transmitted to the IC card, and the transmitted issuance command is a command for requesting data as a source of encryption. In the case of, the encrypted data is generated using the data that is the source of the encryption returned from the IC card in response to this command, and the encryption key that is set in advance in the issued command to be transmitted next, A method of issuing an IC card, wherein the generated encrypted data is set as an issue command to be transmitted next and transmitted to an IC card.
Cカードとのデータ通信を行ってICカードを発行する
ICカード発行システムにおいて、 上記ICカードへ発行コマンドを送信する前に、発行コ
マンドが暗号化処理を必要とするか否かを判断し、 この判断により発行コマンドが暗号化処理を必要としな
いと判断した際に、上記発行コマンドを送信し、 上記判断により発行コマンドが暗号化処理を必要とする
と判断した際に、該発行コマンドを送信する前に、上記
ICカードからの暗号の元となるデータを要求するコマ
ンドを上記ICカードへ送信し、 この送信したコマンドに対してICカードから送信され
た暗号の元となるデータと、該発行コマンドに予め設定
されている暗号キーとを用いて暗号データを生成し、 この生成した暗号データを該発行コマンドに設定して上
記ICカードへ送信する、 ことを特徴とするICカード発行方法。9. An I memory having a data memory and a control element.
In an IC card issuing system for issuing an IC card by performing data communication with a C card, it is determined whether or not the issued command requires encryption before transmitting the issued command to the IC card. When it is determined that the issued command does not require the encryption processing, the above-mentioned issued command is transmitted. When it is determined that the issued command requires the encryption processing, the above-mentioned issued command is transmitted. A command for requesting data to be ciphered from the IC card is transmitted to the IC card, and the data to be ciphered transmitted from the IC card in response to the transmitted command and the issued command Generating encrypted data by using a predetermined encryption key; setting the generated encrypted data in the issued command; IC card issuing method comprising transmitting to it.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11218856A JP2001043323A (en) | 1999-08-02 | 1999-08-02 | IC card issuing system and IC card issuing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11218856A JP2001043323A (en) | 1999-08-02 | 1999-08-02 | IC card issuing system and IC card issuing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2001043323A true JP2001043323A (en) | 2001-02-16 |
Family
ID=16726404
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11218856A Pending JP2001043323A (en) | 1999-08-02 | 1999-08-02 | IC card issuing system and IC card issuing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2001043323A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006031286A (en) * | 2004-07-14 | 2006-02-02 | Toshiba Corp | Card issuing system, issuing terminal device and portable electronic device |
| KR100882617B1 (en) | 2005-10-26 | 2009-02-06 | 가부시키가이샤 히타치세이사쿠쇼 | Storage medium issuing method and storage medium issuing device |
-
1999
- 1999-08-02 JP JP11218856A patent/JP2001043323A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006031286A (en) * | 2004-07-14 | 2006-02-02 | Toshiba Corp | Card issuing system, issuing terminal device and portable electronic device |
| KR100882617B1 (en) | 2005-10-26 | 2009-02-06 | 가부시키가이샤 히타치세이사쿠쇼 | Storage medium issuing method and storage medium issuing device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8630955B2 (en) | Financial card system, communications device, authentication terminal, authentication method, and program | |
| US6612486B2 (en) | Smart card managing system | |
| JP3568970B2 (en) | IC card issuing device | |
| RU2188514C2 (en) | Device for reliable generation of electronic signatures | |
| EP1577780A1 (en) | Memory device and electronic device using the same | |
| JP4649403B2 (en) | Value information management system, recording medium, printer device, payment device, electronic data printing method, and computer program | |
| JP2007004522A (en) | Storage device | |
| KR100676087B1 (en) | Secured data storage device and method with a USB interface | |
| US7076800B2 (en) | IC card terminal unit and IC card duplication method | |
| CN100474323C (en) | Tamper resistant device and file generation method | |
| JP3545627B2 (en) | Portable electronic devices | |
| JP4373239B2 (en) | IC card issuance method, IC card program and IC card | |
| JP2001043323A (en) | IC card issuing system and IC card issuing method | |
| JPH09179950A (en) | Individual IC card, authentication IC card, and IC card system using them | |
| JP4809955B2 (en) | Portable electronic device and message processing method | |
| JP2001101362A (en) | IC card system | |
| JP2011060136A (en) | Portable electronic apparatus, and data management method in the same | |
| JP2003203207A (en) | IC card issuing device and IC card issuing method | |
| JP2009118011A (en) | Image forming apparatus and image forming system | |
| JPH09179949A (en) | Portable information recording medium and its reader / writer device | |
| KR100574238B1 (en) | Data storage device and method having security chip with USB interface | |
| JP3231466B2 (en) | Information recording medium storing keys | |
| JP2001291066A (en) | IC card issuing method | |
| US20030056106A1 (en) | Encryption system for preventing data from being copied illegally and method of the same | |
| JP4371696B2 (en) | IC card issuing system |