JP2007323133A - Method for issuing ic card, and ic card - Google Patents

Method for issuing ic card, and ic card Download PDF

Info

Publication number
JP2007323133A
JP2007323133A JP2006149559A JP2006149559A JP2007323133A JP 2007323133 A JP2007323133 A JP 2007323133A JP 2006149559 A JP2006149559 A JP 2006149559A JP 2006149559 A JP2006149559 A JP 2006149559A JP 2007323133 A JP2007323133 A JP 2007323133A
Authority
JP
Japan
Prior art keywords
card
data
command
memory
issue
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.)
Granted
Application number
JP2006149559A
Other languages
Japanese (ja)
Other versions
JP4961834B2 (en
Inventor
Kazuyoshi Irisawa
和義 入澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2006149559A priority Critical patent/JP4961834B2/en
Publication of JP2007323133A publication Critical patent/JP2007323133A/en
Application granted granted Critical
Publication of JP4961834B2 publication Critical patent/JP4961834B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for issuing an IC card that allows issuing all kinds of IC cards at high speed, and an IC card. <P>SOLUTION: The IC card 1 has an electrically rewritable EEPROM 21, a ROM 22 that stores common data 120 necessary at the time of issuance, and the like. When an IC card issuer sends data to the IC card 1 including the physical writing start address of the EEPROM 21 to which the common data 120 is written, the physical reading start address of the ROM 22 from which the common data 120 is written, a memory copy command having length data indicating the size of the common data 120, and individual data necessary at the time of issuance, the IC card 1 writes the common data 120 and the individual data in the EEPROM 21 according to the data received from the IC card issuer. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ICカードを発行するICカード発行方法およびICカードの技術分野に属し、更に詳しくは、バーチャルマシンを備えたICカードを発行するための技術分野に属する。   The present invention belongs to an IC card issuing method for issuing an IC card and an IC card technical field, and more particularly to a technical field for issuing an IC card provided with a virtual machine.

ICカードとは、クレジットカードサイズのカード媒体にICチップを埋め込み、ICチップのメモリにデータを記録できるカードである。近年、ICカードはキャッシュカード、クレジットカードまたは電子マネーなどに幅広い用途で利用されている。   An IC card is a card in which an IC chip is embedded in a credit card size card medium and data can be recorded in the memory of the IC chip. In recent years, IC cards are used in a wide range of applications such as cash cards, credit cards, and electronic money.

従来、ICカード用ICチップの電気的に書換え可能な不揮発性メモリ(例えば、EEPROM)の容量は非常に小さい容量(例えば、数Kバイト)であったため、アプリケーションの追加/削除が不可能なNativeICカードが主流であった。   Conventionally, the capacity of an electrically rewritable non-volatile memory (for example, EEPROM) of an IC chip for an IC card has been very small (for example, several kilobytes). Cards were mainstream.

しかし、近年の半導体技術の進歩によって、現在は、数十Kバイトから100Kバイトを超えるEEPROMの容量を有するICカード用ICチップがリリースされていることもあり、Java(登録商標)に代表される高級言語の解釈機能を備えたバーチャルマシンが組み込まれ、アプリケーションの追加/削除が可能なマルチアプリケーションICカードが普及しつつある。   However, due to recent advances in semiconductor technology, IC card IC chips having an EEPROM capacity of more than several tens of kilobytes to more than 100 kilobytes have been released and are represented by Java (registered trademark). A multi-application IC card in which a virtual machine having a high-level language interpretation function is incorporated and an application can be added / deleted is becoming widespread.

バーチャルマシンを備えたマルチアプリケーションICカードにおいては、バーチャルマシンに対応した高級言語でアプリケーションの開発が行えるため、アプリケーションの開発効率が向上するなどのメリットはあるが、大量にICカードを発行するICカード製造会社では、1枚のICカードを発行する時間が長くなってしまう問題がある。   A multi-application IC card equipped with a virtual machine can develop applications in a high-level language compatible with the virtual machine, so there are advantages such as improved application development efficiency, but an IC card that issues a large number of IC cards The manufacturing company has a problem that it takes a long time to issue one IC card.

ICカード自体に工夫を施し、高速でICカードを発行する一つの発明として、ICカードの発行内容が同じ場合には、マスターとなるICカードを予め所定のコマンドで発行し、発行後のメモリマップをダンプし、他のICカードにコピーすることで、ICカードへ送信するコマンドを減らし、ICカードがコマンドを処理する時間を短縮することで、高速にICカードを発行する発明が特許文献1で開示されている。   As one invention to devise the IC card itself and issue the IC card at high speed, if the issued contents of the IC card are the same, issue the master IC card with a predetermined command in advance, and the memory map after issuance Patent Document 1 discloses an invention in which an IC card is issued at high speed by reducing commands transmitted to the IC card by dumping and copying to other IC cards, and reducing the time for the IC card to process the commands. It is disclosed.

また、特許文献2では、ICカード発行時はカード発行専用通信経路を用いてデータ通信することによって、一般的に用いられるISOプロトコルの時間制限に制約されることなく、高速で発行データの書込みを行なうことのできる技術が開示されている。   Further, in Patent Document 2, when issuing an IC card, data communication is performed using a card issuance-dedicated communication path, so that issuance data can be written at high speed without being restricted by a time limit of a commonly used ISO protocol. Techniques that can be performed are disclosed.

しかし、これらの技術は、上述のマルチアプリケーションICカードを、バーチャルマシンを利用して発行するときにバーチャルマシンに起因する時間、例えば、バーチャルマシンが動作するために必要な時間や、バーチャルマシンが高級言語を解釈する時間を削減することができない。
特願2005−376977号公報 特開2003−16404号公報
However, these technologies are based on the time caused by the virtual machine when the above-mentioned multi-application IC card is issued using the virtual machine, for example, the time required for the virtual machine to operate, The time to interpret the language cannot be reduced.
Japanese Patent Application No. 2005-376977 JP 2003-16404 A

そこで、本発明は、どのような種類のICカードであっても、ICカードを高速に発行することができるICカード発行方法および本発明のICカード発行方法に必要なICカードを提供することを目的とする。   Therefore, the present invention provides an IC card issuing method capable of issuing an IC card at high speed regardless of the type of IC card, and an IC card necessary for the IC card issuing method of the present invention. Objective.

上述した課題を解決するために、請求項1の発明は、電気的に書換え可能な不揮発性メモリを備えたICカードを発行するICカード発行方法であって、前記ICカードの所定のメモリに、発行時に必要な共通データを記憶させる記憶工程と、ICカード発行機に、メモリコピーコマンドと発行時に必要な個別データとを含むデータを設定する設定工程と、前記設定工程で設定したデータを、前記ICカード発行機が、前記ICカードに送信する送信工程と、前記送信工程によって送信されたデータ、および、前記共通データの書込み先となる前記不揮発性メモリの物理的な書込み開始アドレス,前記共通データの書込み元となる前記所定のメモリの物理的な読出し開始アドレスおよび前記共通データのサイズを示すレングスデータに基づいて、前記ICカードが、前記不揮発性メモリに前記共通データおよび前記個別データを書込む書込み工程と、を備えるICカード発行方法である。   In order to solve the above-described problem, the invention of claim 1 is an IC card issuing method for issuing an IC card including an electrically rewritable nonvolatile memory, and a predetermined memory of the IC card is provided with a predetermined memory. A storage process for storing common data required at the time of issuance, a setting process for setting data including a memory copy command and individual data required at the time of issuance in the IC card issuing machine, and the data set in the setting process, An IC card issuing machine transmits to the IC card, the data transmitted by the transmitting process, the physical write start address of the non-volatile memory to which the common data is written, the common data Based on the physical read start address of the predetermined memory that is the write source of the data and the length data indicating the size of the common data The IC card includes a write step of writing the common data and write the individual data in the nonvolatile memory, an IC card issuing method comprising.

請求項2の発明は、請求項1に記載のICカード発行方法において、前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータは、前記メモリコピーコマンドに含まれていること、を特徴とするICカード発行方法である。   According to a second aspect of the present invention, in the IC card issuing method according to the first aspect, the write start address, the read start address, and the length data are included in the memory copy command. It is a card issue method.

請求項3の発明は、請求項1に記載のICカード発行方法において、前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータは、前記所定のメモリに記憶されていること、を特徴とするICカード発行方法である。   According to a third aspect of the present invention, in the IC card issuing method according to the first aspect, the write start address, the read start address, and the length data are stored in the predetermined memory. It is a card issue method.

請求項4の発明は、請求項1から請求項3のいずれかに記載のICカード発行方法において、前記ICカードは、バーチャルマシンを備えたICカードであり、前記記憶工程では、前記ICカード以外の装置を用い、前記バーチャルマシンで解釈実行される命令により作動するコマンドを利用して前記ICカードを発行したとき、前記不揮発性メモリに形成されるメモリマップを作成し、そのメモリマップを前記共通データとして前記ICカードの所定のメモリに記憶させること、を特徴とするICカード発行方法である。   According to a fourth aspect of the present invention, in the IC card issuing method according to any one of the first to third aspects, the IC card is an IC card provided with a virtual machine, and in the storage step, other than the IC card. When the IC card is issued using a command that operates according to an instruction that is interpreted and executed in the virtual machine, a memory map formed in the nonvolatile memory is created, and the memory map is used as the common memory map. The IC card issuance method is characterized in that data is stored in a predetermined memory of the IC card.

請求項5の発明は、請求項1から請求項4のいずれかに記載のICカード発行方法において、前記送信工程では、前記ICカード発行機が、前記個別データの内容の全て或いは一部を平文で前記ICカードに送信し、前記書込み工程では、前記ICカードが、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによって、前記平文の内容を前記不揮発性メモリに書込むこと、を特徴とするICカード発行方法である。   According to a fifth aspect of the present invention, in the IC card issuing method according to any one of the first to fourth aspects, in the transmission step, the IC card issuing machine converts all or part of the contents of the individual data into plain text. In the writing step, the contents of the plaintext are transferred to the non-volatile memory by a command operated by a machine language that is interpreted and executed by an IC chip mounted on the IC card. An IC card issuing method characterized by writing.

請求項6の発明は、請求項1から請求項5のいずれかに記載のICカード発行方法において、前記送信工程では、前記ICカード発行機が、前記個別データの内容の全て或いは一部を暗号化した暗号文を前記ICカードに送信し、前記書込み工程では、前記ICカードが、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによって、前記ICカードの内部に記憶された暗号鍵を用いて前記暗号文を復号し、復号した内容を前記不揮発性メモリに書込むこと、を特徴とするICカード発行方法である。   According to a sixth aspect of the present invention, in the IC card issuing method according to any one of the first to fifth aspects, in the transmitting step, the IC card issuing machine encrypts all or part of the contents of the individual data. The encrypted ciphertext is transmitted to the IC card, and in the writing step, the IC card is inserted into the IC card by a command operated by a machine language interpreted and executed by an IC chip mounted on the IC card. An IC card issuance method characterized by decrypting the ciphertext using a stored encryption key and writing the decrypted contents into the nonvolatile memory.

請求項7の発明は、請求項1から請求項6のいずれかに記載のICカード発行方法において、前記不揮発性メモリに書込んだデータの内容の整合性を確認する工程を備えること、を特徴とするICカード発行方法である。   The invention according to claim 7 is the IC card issuing method according to any one of claims 1 to 6, further comprising a step of confirming the consistency of the contents of the data written in the nonvolatile memory. IC card issuing method.

請求項8の発明は、請求項1から請求項7のいずれかに記載のICカード発行方法において、前記ICカードが活性化されたときに前記ICカードが参照し、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによる前記ICカードの発行が可能または不可能な状態であることが示され、前記ICカード自身が発行を制御するための発行フラグが前記不揮発性メモリに備えられ、前記ICカード発行方法は、前記ICカードの前記発行フラグを不可能の状態にセットする工程を備えること、を特徴とするICカード発行方法である。   The invention of claim 8 is the IC card issuance method according to any one of claims 1 to 7, wherein the IC card is referred to when the IC card is activated, and is mounted on the IC card. It is indicated that the IC card can be issued by a command operated by a machine language interpreted and executed by the IC chip, and the issue flag for controlling the issue by the IC card itself is the non-volatile The IC card issuance method is provided in a memory, and includes a step of setting the issuance flag of the IC card to an impossible state.

請求項9の発明は、請求項1から請求項8のいずれかに記載のICカード発行方法によって発行されたICカードである。   The invention of claim 9 is an IC card issued by the IC card issuing method according to any one of claims 1 to 8.

請求項10の発明は、電気的に書換え可能な不揮発性メモリ、および、発行時に必要な共通データが記憶された所定のメモリを備え、バーチャルマシンを有するICカードであって、前記ICカードは発行時に利用され、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動する発行コマンドとして、前記共通データの書込み先となる前記不揮発性メモリの物理的な書込み開始アドレス,前記共通データの書込み元となる前記所定のメモリの物理的な読出し開始アドレスおよび前記共通データのサイズを示すレングスデータに基づいて、前記不揮発性メモリに前記所定のメモリの共通データを書込むメモリコピーコマンドを備えること、を特徴とするICカードである。   The invention of claim 10 is an IC card having a virtual machine comprising an electrically rewritable non-volatile memory and a predetermined memory storing common data necessary for issuance, and the IC card is issued An issuance command that is sometimes used and that is operated by a machine language that is interpreted and executed by an IC chip mounted on the IC card, as a physical write start address of the non-volatile memory to which the common data is written, the common data A memory copy command for writing the common data of the predetermined memory to the non-volatile memory based on the physical read start address of the predetermined memory serving as the write source of the memory and the length data indicating the size of the common data This is an IC card characterized by that.

請求項11の発明は、請求項10に記載のICカードにおいて、前記ICカードは前記発行コマンドとして、ICカード発行機から送信されてくる個別データを、前記ICカードの前記不揮発性メモリの指定されたアドレス空間に書込むライトコマンドを備えること、を特徴とするICカードである。   The invention of claim 11 is the IC card according to claim 10, wherein the IC card uses the issuance command to specify individual data transmitted from an IC card issuing machine as designated in the nonvolatile memory of the IC card. The IC card is provided with a write command for writing into the address space.

請求項12の発明は、請求項10または請求項11に記載のICカードにおいて、前記ICカードは前記発行コマンドとして、ICカード発行機から送信されてくる暗号化された個別データを、前記ICカードの内部に記憶された暗号鍵を用いて復号し、復号した内容を指定されたアドレス空間に書込む暗号ライトコマンドを備えること、を特徴とするICカードである。   According to a twelfth aspect of the present invention, in the IC card according to the tenth or eleventh aspect, the IC card receives the encrypted individual data transmitted from the IC card issuing machine as the issue command. The IC card is provided with an encryption write command for decrypting using an encryption key stored in the memory and writing the decrypted contents into a designated address space.

請求項13の発明は、請求項10から請求項12のいずれかに記載のICカードにおいて、前記ICカードは前記発行コマンドとして、前記不揮発性メモリに書込んだデータの内容の整合性を確認するメモリチェックコマンドを備えること、を特徴とするICカードである。   According to a thirteenth aspect of the present invention, in the IC card according to any one of the tenth to twelfth aspects, the IC card confirms the consistency of the contents of the data written in the nonvolatile memory as the issue command. An IC card comprising a memory check command.

請求項14の発明は、請求項10から請求項13のいずれかに記載のICカードにおいて、前記ICカードの前記不揮発性メモリには、活性化されたときに参照し、前記ICカードに備えられた前記発行コマンドの実行を制御するための発行フラグが設けられ、前記ICカードが活性化されたときに前記発行フラグが発行不可に設定されている場合は、前記発行コマンドを実行しない手段を備えること、を特徴とするICカードである。   According to a fourteenth aspect of the present invention, in the IC card according to any one of the tenth to thirteenth aspects, the nonvolatile memory of the IC card is referred to when activated, and is provided in the IC card. An issue flag for controlling execution of the issue command is provided, and when the IC card is activated, when the issue flag is set to be non-issueable, means for not executing the issue command is provided. This is an IC card characterized by that.

請求項15の発明は、請求項10から請求項14のいずれかに記載のICカードにおいて、前記メモリチェックコマンドは、前記不揮発性メモリの指定されたアドレス空間の内容から、予め定められたアルゴリズムに従い演算されるチェックコードと、端末装置から送信される前記チェックコードの期待値とを照合するコマンドであること、を特徴とするICカードである。   According to a fifteenth aspect of the present invention, in the IC card according to any one of the tenth to fourteenth aspects, the memory check command is determined according to a predetermined algorithm from the contents of a specified address space of the nonvolatile memory. The IC card is a command for collating a check code to be calculated with an expected value of the check code transmitted from a terminal device.

請求項16の発明は、請求項10から請求項15のいずれかに記載のICカードにおいて、前記所定のメモリは、前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータを記憶していること、を特徴とするICカードである。   The invention of claim 16 is the IC card according to any one of claims 10 to 15, wherein the predetermined memory stores the write start address, the read start address, and the length data. Is an IC card characterized by

請求項17の発明は、請求項10から請求項16のいずれかに記載のICカードにおいて、前記所定のメモリは、読出し専用の不揮発性メモリであること、を特徴とするICカードである。   The invention of claim 17 is the IC card according to any one of claims 10 to 16, wherein the predetermined memory is a read-only nonvolatile memory.

本発明によれば、ICカードの所定のメモリに、発行時に必要な共通データをあらかじめ記憶させておき、書込み開始アドレス,読出し開始アドレスおよびレングスデータに基づいて、ICカード自身に共通データの書込み処理を行わせることができるので、ICカードの発行時間を大幅に短縮することができる。
また、書込み開始アドレス,読出し開始アドレスおよびレングスデータをメモリコピーコマンドに含ませることによって、様々な状況に合わせた各値の設定が可能となる。
さらに、書込み開始アドレス,読出し開始アドレスおよびレングスデータを所定のメモリに記憶させることによって、これらのデータをICカード発行機に設定する手間が省け、発行時間をより短縮することができる。
According to the present invention, common data required at the time of issuance is stored in a predetermined memory of the IC card in advance, and the common data is written to the IC card itself based on the write start address, the read start address, and the length data. Therefore, the IC card issuance time can be greatly shortened.
Also, by including the write start address, read start address, and length data in the memory copy command, it is possible to set each value in accordance with various situations.
Further, by storing the write start address, the read start address, and the length data in a predetermined memory, it is possible to save the trouble of setting these data in the IC card issuer and to further reduce the issue time.

また、ICカード以外の装置(開発用エミュレータ等)を用い、バーチャルマシンで解釈実行される命令により作動するコマンドを利用して前記ICカードを発行したとき、前記不揮発性メモリに形成されるメモリマップを作成し、作成したメモリマップの内容を共通データとしてICカードの所定のメモリに記憶させておき、ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによって、ICカードの不揮発性メモリのアドレス空間にコピーすることで、ICカード発行時にICカードに送信するコマンドを減らすことができるとともに、バーチャルマシンを作動させることなく発行できるため、1枚当たりのICカード発行時間を短縮できる。   A memory map formed in the non-volatile memory when a device other than an IC card (such as a development emulator) is used to issue the IC card using a command that operates according to an instruction interpreted and executed by a virtual machine The contents of the created memory map are stored as common data in a predetermined memory of the IC card, and the command of the IC card is operated by a command operated by a machine language interpreted and executed by the IC chip mounted on the IC card. By copying to the address space of the non-volatile memory, it is possible to reduce the number of commands sent to the IC card when issuing the IC card, and to issue without operating the virtual machine, shortening the IC card issue time per card it can.

なお、不揮発性メモリのアドレス空間にコピーされる内容は、本来、バーチャルマシンで解釈実行される命令により作動するコマンドを利用したときに形成されるメモリマップの内容であるため、前記ICカードにコピーした後でもバーチャルマシンは前記不揮発性メモリに正常にアクセスできる。なお、作成したメモリマップの内容を不揮発性メモリのアドレス空間にコピーする際は、大量なデータが一度に不揮発性メモリに書込まれるため、不揮発性メモリの内容の整合性を確認することが望ましい。   The content copied to the address space of the non-volatile memory is originally the content of the memory map that is formed when using a command that operates according to an instruction that is interpreted and executed by the virtual machine. After that, the virtual machine can normally access the nonvolatile memory. When copying the contents of the created memory map to the address space of the nonvolatile memory, it is desirable to check the consistency of the contents of the nonvolatile memory because a large amount of data is written to the nonvolatile memory at once. .

ここで、不揮発性メモリの内容の整合性確認は、不揮発性メモリの指定されたアドレス空間から演算されるチェックコードを用いて確認する方法が望ましい。なお、チェックコードとは、チェックサム、DES鍵を用いたMAC(Message Authentication Code)や、SHA1によって演算されるハッシュ値などを意味する。   Here, it is desirable that the consistency of the contents of the nonvolatile memory is confirmed using a check code calculated from a designated address space of the nonvolatile memory. The check code means a checksum, a MAC (Message Authentication Code) using a DES key, a hash value calculated by SHA1, and the like.

加えて、個別データの内容を暗号化した暗号文をICカードの内部に記憶された暗号鍵を用いて暗号文を復号し、復号した内容を不揮発性メモリのアドレス空間に書込むことで、例えば、暗証番号などの個人情報がICカードとICカード発行機の通信中に盗聴されることを防止できる。   In addition, the ciphertext obtained by encrypting the content of the individual data is decrypted using the encryption key stored in the IC card, and the decrypted content is written in the address space of the nonvolatile memory, for example, It is possible to prevent personal information such as a personal identification number from being wiretapped during communication between the IC card and the IC card issuing machine.

ここから、本発明に関わるICカード発行システムおよびICカード1について、図を参照しながら詳細に説明する。図1は、ICカード発行システムのアーキテクチャを説明する図である。図1に示したようにICカード発行システムは、電気的に書換え可能な不揮発性メモリ(ここでは、EEPROM)を有するICカード1と、ICカード1のEEPROMにデータを書込むICカード発行機3とから構成される。   From here, the IC card issuing system and the IC card 1 according to the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram for explaining the architecture of an IC card issuing system. As shown in FIG. 1, the IC card issuing system includes an IC card 1 having an electrically rewritable non-volatile memory (in this case, an EEPROM), and an IC card issuing machine 3 for writing data to the EEPROM of the IC card 1. It consists of.

図1で示したICカード1は、Java(登録商標)やMULTOS(登録商標)などに代表されるバーチャルマシンが実装されたマルチアプリケーションICカードで、バーチャルマシンで解釈実行される命令で記述されたアプリケーションを、ICカード1のEEPROMに登録/削除できる。   The IC card 1 shown in FIG. 1 is a multi-application IC card on which a virtual machine represented by Java (registered trademark) or MULTIS (registered trademark) is mounted, and is described by instructions that are interpreted and executed by the virtual machine. An application can be registered / deleted in the EEPROM of the IC card 1.

本発明に係るICカード1は発行専用のコマンドである複数の発行コマンドを有する。また、ICカード1は、ICカード1のバーチャルマシンで解釈実行される命令により作動するコマンドを利用してICカード1を発行したときEEPROMに形成されるメモリマップを自身のROMに記憶している。
ICカード1を発行するためのICカード発行機3は、複数の発行コマンドを組み合せてICカード1に送信し、メモリマップの全て或いは一部の内容をICカード1のROMからEEPROMに書込ませることで、ICカード1を発行する。
The IC card 1 according to the present invention has a plurality of issue commands which are issue-only commands. Further, the IC card 1 stores in its own ROM a memory map formed in the EEPROM when the IC card 1 is issued using a command that operates according to a command that is interpreted and executed by the virtual machine of the IC card 1. .
The IC card issuer 3 for issuing the IC card 1 transmits a combination of a plurality of issue commands to the IC card 1, and writes all or part of the contents of the memory map from the ROM of the IC card 1 to the EEPROM. Thus, the IC card 1 is issued.

この発行コマンドはICカード1に実装されたICチップのCPUに対応したマシン語で記述され、発行時はバーチャルマシンが起動することなく、ICカード1を発行できるため、バーチャルマシンが動作するために必要な時間を削減でき、1枚のICカード1の発行に要する時間を短縮することができる。   This issuance command is described in a machine language corresponding to the CPU of the IC chip mounted on the IC card 1, and when issuing the IC card 1 can be issued without starting the virtual machine, the virtual machine operates. The required time can be reduced, and the time required to issue one IC card 1 can be reduced.

図2は、図1で示したICカード1に実装されるICチップ2の内部構成図で、図3は、図1で示したICカード発行システムの機能構成図である。
図2に示したようにICカード1のICチップ2には、演算機能およびICチップ2が具備するデバイスを制御する機能を備えた中央演算装置20(CPU:Central Processing Unit)、読出し専用の不揮発性メモリ22(ROM:Read Only Memory)、電気的に書換え可能な不揮発性メモリとしてEEPROM21(EEPROM:Electrically Erasable Programmable Read-Only Memoryの略)、揮発性メモリとしてランダムアクセスメモリ23(RAM:Random Access Memory)、および、外部の端末装置とデータ通信するための接触I/F回路24と、暗号演算回路25を少なくとも備えている。
FIG. 2 is an internal configuration diagram of the IC chip 2 mounted on the IC card 1 shown in FIG. 1, and FIG. 3 is a functional configuration diagram of the IC card issuing system shown in FIG.
As shown in FIG. 2, an IC chip 2 of the IC card 1 includes a central processing unit 20 (CPU: Central Processing Unit) having a calculation function and a function for controlling a device included in the IC chip 2, and a read-only nonvolatile memory. Memory 22 (ROM: Read Only Memory), EEPROM 21 (EEPROM: Electrically Erasable Programmable Read-Only Memory) as electrically rewritable nonvolatile memory, and Random Access Memory 23 (RAM: Random Access Memory) as volatile memory ), And a contact I / F circuit 24 for data communication with an external terminal device, and a cryptographic operation circuit 25.

本発明は、ICカード1に実装されるICチップ2の仕様をなんら限定するものではなく、ICカード1の用途に適した仕様のICチップ2を選択することができる。例えば、ROM22およびEEPROM21の容量については限定しないし、書換え可能な不揮発性メモリはフラッシュメモリなどであっても構わない。またICチップ2は乱数を生成する乱数生成回路などの図示していない他のデバイスを備えていても構わない。さらに、ICチップ2は、ROM22を搭載せずに、書換え可能な不揮発性メモリだけを搭載しているチップであってもよい。なお、この場合、後述する記憶工程では、IC製造メーカの工場などで一括で共通データを書換え可能な不揮発性メモリに記憶させる。   The present invention does not limit the specifications of the IC chip 2 mounted on the IC card 1, and the IC chip 2 having specifications suitable for the application of the IC card 1 can be selected. For example, the capacities of the ROM 22 and the EEPROM 21 are not limited, and the rewritable nonvolatile memory may be a flash memory. Further, the IC chip 2 may include other devices (not shown) such as a random number generation circuit for generating random numbers. Further, the IC chip 2 may be a chip on which only a rewritable nonvolatile memory is mounted without mounting the ROM 22. In this case, in a storage step described later, common data is stored in a rewritable nonvolatile memory at a time in a factory of an IC manufacturer.

なお、図1においては、ICカード1を接触ICカードとして図示しているが、本発明は何らICカード1の通信方式に依存するものではなく、無線でデータ通信する非接触ICカード、または、接触データ通信と非接触データ通信の2つの通信機能を備えたデュアルインターフェースICカードであってもよい。加えて、ICカード1は、ICチップ2の近辺を短冊状に切り取った形状をしているSIM(Subscriber Identity Module)カードやUIM(User Identity Module)カードであってもよい。   In FIG. 1, the IC card 1 is illustrated as a contact IC card, but the present invention does not depend on the communication method of the IC card 1, and is a non-contact IC card for wireless data communication, or A dual interface IC card having two communication functions of contact data communication and non-contact data communication may be used. In addition, the IC card 1 may be a SIM (Subscriber Identity Module) card or a UIM (User Identity Module) card that has a shape obtained by cutting the vicinity of the IC chip 2 into a strip shape.

図3で示したように、ICカード1のROM22には、ICカード1に実装されるICチップ2の仕様差分を吸収するためのプログラムであるカードOS11(Operating System)上に、言語の解釈機能を備えたバーチャルマシン10が実装されている。
また、ROM22には、発行時に必要なデータであって、アプリケーションデータ,ファイルの制限情報を含むシステムデータおよび修正パッチプログラムを含むプログラムなどの共通データ120が記憶されている。この共通データ120は、エミュレータなどの装置を用い、ICカード1のバーチャルマシン10で解釈実行される命令により作動するコマンドを利用してICカード1を発行したときEEPROM21に形成されるメモリマップの内容を発行データとして記憶しているものである。共通データ120は、アプリケーションエリア12に格納される一つまたは複数のアプリケーションごとに共通なデータであるため、アプリケーションごとに一つの共通データ120が記憶される。
なお、共通データ120は、ICチップメーカの記憶装置など(不図示)によって、あらかじめROM22に記憶(マスク化)されている。
As shown in FIG. 3, the ROM 22 of the IC card 1 has a language interpretation function on a card OS 11 (Operating System) which is a program for absorbing the specification difference of the IC chip 2 mounted on the IC card 1. A virtual machine 10 having the above is mounted.
The ROM 22 stores common data 120 such as application data, system data including file restriction information, and a program including a correction patch program, which are data necessary at the time of issuance. The common data 120 is the contents of a memory map formed in the EEPROM 21 when a device such as an emulator is used and the IC card 1 is issued using a command that operates according to a command interpreted and executed by the virtual machine 10 of the IC card 1. Is stored as issuance data. Since the common data 120 is data common to one or a plurality of applications stored in the application area 12, one common data 120 is stored for each application.
The common data 120 is stored (masked) in the ROM 22 in advance by a storage device (not shown) of an IC chip manufacturer.

カードOS11は、ICチップ2に対応したマシン語で記述され、バーチャルマシン10を介さずに動作する複数の発行コマンドを備え、少なくともこの発行コマンドには、ICカード発行機3から送信される平文をICカード1のEEPROM21に書込むためのコマンドであるライトコマンド110と、ICカード発行機3から送信される暗号文をICカード1のEEPROM21に書込むためのコマンドである暗号ライトコマンド111と、ICカード1のEEPROM21に書込んだ内容をチェックするためのコマンドであるメモリチェックコマンド112と、ICカード発行機3からの指令に基づいて、ROM22の共通データ120をEEPROM21にコピーするメモリコピーコマンド114とが含まれる。   The card OS 11 is described in a machine language corresponding to the IC chip 2 and includes a plurality of issuing commands that operate without going through the virtual machine 10. At least a plain text transmitted from the IC card issuing machine 3 is included in the issuing command. A write command 110 that is a command for writing to the EEPROM 21 of the IC card 1, an encryption write command 111 that is a command for writing the ciphertext transmitted from the IC card issuer 3 to the EEPROM 21 of the IC card 1, and the IC A memory check command 112 that is a command for checking the contents written in the EEPROM 21 of the card 1, and a memory copy command 114 that copies the common data 120 of the ROM 22 to the EEPROM 21 based on a command from the IC card issuer 3. Is included.

上述しているように、これらのコマンドはICチップ2に対応したマシン語で記述され、図2で示したICチップ2のハードウェア資源を利用したプログラムある。マシン語で記述されているこれらのコマンドは、バーチャルマシン10で解釈されることなく動作するため、バーチャルマシン10を利用するために必要な時間、例えば、バーチャルマシン10の起動時間、バーチャルマシン10が命令を解釈する時間を削減でき、バーチャルマシン10を利用するときよりも高速でEEPROM21にアクセスでき、1枚当たりの発行時間を短縮できる。   As described above, these commands are described in machine language corresponding to the IC chip 2 and are programs using the hardware resources of the IC chip 2 shown in FIG. Since these commands written in machine language operate without being interpreted by the virtual machine 10, the time required to use the virtual machine 10, for example, the startup time of the virtual machine 10, the virtual machine 10 The time for interpreting the instructions can be reduced, the EEPROM 21 can be accessed at a higher speed than when the virtual machine 10 is used, and the issue time per sheet can be shortened.

アプリケーションが発行される前にEEPROM21には、カードOS11が利用するデータとして、少なくとも、ICカード1ごとに固有であり、発行コマンドを用いてICカード1を発行するときに利用される暗号鍵であるセッション鍵13と、ICカード1に備えられた発行コマンドの実行を制御するために設けられた発行フラグ14が書込まれている。これらのデータは、上述しているライトコマンド110または専用のコマンドによって、カードOS11が管理するEEPROM21の領域に記憶される。   Before the application is issued, the EEPROM 21 is an encryption key that is unique to at least the IC card 1 as data used by the card OS 11 and is used when the IC card 1 is issued using the issue command. A session key 13 and an issue flag 14 provided for controlling execution of an issue command provided in the IC card 1 are written. These data are stored in the area of the EEPROM 21 managed by the card OS 11 by the write command 110 described above or a dedicated command.

セッション鍵13とは、ICカード発行機3から送信される暗号文を復号するときや、EEPROM21に書込まれたデータのチェックコードを演算するときに利用される暗号鍵である。本実施の形態において、セッション鍵13は、ROM22に記憶されたROM鍵113によって暗号化された状態でEEPROM21に記憶される。そして、セッション鍵13を利用するときは、ROM鍵113で復号され使用される。   The session key 13 is an encryption key used when decrypting a ciphertext transmitted from the IC card issuer 3 or calculating a check code of data written in the EEPROM 21. In the present embodiment, the session key 13 is stored in the EEPROM 21 in a state encrypted with the ROM key 113 stored in the ROM 22. When the session key 13 is used, it is decrypted with the ROM key 113 and used.

ICカード1ごとにセッション鍵13を設けるのは、セキュリティ高くICカード1を発行するためである。例えば、ユーザの暗証番号など外部に漏洩してはならない機密なデータをICカード1に書込むときは、ICカード発行機3から機密なデータは、セッション鍵13で暗号化された状態でICカード1に送信される。   The reason why the session key 13 is provided for each IC card 1 is to issue the IC card 1 with high security. For example, when writing confidential data, such as a user's personal identification number, that should not be leaked to the IC card 1, the confidential data from the IC card issuer 3 is encrypted with the session key 13 in the IC card. 1 is transmitted.

この機密データを暗号化する暗号鍵がICカード1すべてにおいて共通であると、共通の暗号鍵が何らかの理由で漏洩した場合、ICカード発行機3とICカード1間で伝送されるデータを傍受すれば機密なデータのすべてが解読されてしまう。そこで、ICカード1ごとに固有のセッション鍵13を設けることで、発行時のセキュリティを高める。   If the encryption key for encrypting the confidential data is common to all the IC cards 1, if the common encryption key is leaked for some reason, the data transmitted between the IC card issuer 3 and the IC card 1 is intercepted. All sensitive data will be deciphered. Therefore, by providing a unique session key 13 for each IC card 1, security at the time of issuance is enhanced.

発行フラグ14とは、ICカード1に備えられた発行コマンドの実行を制御するために設けられたフラグである。ICカード1発行後においても発行コマンドが動作すると、バーチャルマシン10を介さずにEEPROM21に直接アクセスでき、セキュリティ的に脆弱になるため、発行後にICカード1の発行コマンドが動作しない制御をするために、EEPROM21には発行フラグ14が設けられている。   The issue flag 14 is a flag provided for controlling the execution of the issue command provided in the IC card 1. If the issue command is operated even after the IC card 1 is issued, the EEPROM 21 can be directly accessed without going through the virtual machine 10 and security is weakened. In order to control the issue command of the IC card 1 not to operate after issuance, An issue flag 14 is provided in the EEPROM 21.

ICカード1が活性化されると、ICカード1はEEPROM21に記憶されている発行フラグ14をRAM23にコピーし、RAM23にコピーされた発行フラグ14によって、発行コマンドの実行が制御される。   When the IC card 1 is activated, the IC card 1 copies the issue flag 14 stored in the EEPROM 21 to the RAM 23, and execution of the issue command is controlled by the issue flag 14 copied to the RAM 23.

RAM23にコピーされた発行フラグ14によって、カードOS11の発行コマンドの実行許可が示されている場合には、ICカード1はカードOS11の発行コマンドを実行し、RAM23にコピーされた発行フラグ14によって、カードOS11の発行コマンドの実行不可が示されている場合には、ICカード1はカードOS11の発行コマンドの実行を禁止する。この発行フラグ14は、ICカード製造会社などにおいてICカード1が発行された後に、カードOS11の発行コマンドの実行不可に設定される。   When the issue flag 14 copied to the RAM 23 indicates permission to execute the issue command of the card OS 11, the IC card 1 executes the issue command of the card OS 11, and the issue flag 14 copied to the RAM 23 When it is indicated that the issue command of the card OS 11 cannot be executed, the IC card 1 prohibits the execution of the issue command of the card OS 11. The issuance flag 14 is set so that an issuance command of the card OS 11 cannot be executed after the IC card 1 is issued by an IC card manufacturing company or the like.

加えて、EEPROM21には、ICカード製造会社などで、上述した発行コマンドを用いて、少なくとも一つのアプリケーションが書込まれる。   In addition, at least one application is written in the EEPROM 21 by using the issue command described above by an IC card manufacturer or the like.

図4は、アプリケーションエリア12のアプリケーションに含まれるデータを説明するための図である。EEPROM21に書込まれる一つのアプリケーションには、アプリケーションで共通のデータである共通データ120と、ICカード1ごとに個別のデータである個別データ121と、ICカード1ごとに個別で機密性の極めて高い個別機密データ122(例えば、ユーザの暗証番号など)とが含まれる。   FIG. 4 is a diagram for explaining data included in an application in the application area 12. One application written in the EEPROM 21 includes common data 120 which is data common to the applications, individual data 121 which is individual data for each IC card 1, and extremely high confidentiality individually for each IC card 1. Individual confidential data 122 (for example, a user's personal identification number) is included.

発行時においては、共通データ120はメモリコピーコマンドでEEPROM21に書込まれ、個別データ121はライトコマンド110でEEPROM21に書込まれ、個別機密データ122は暗号ライトコマンド111によって書込まれ、EEPROM21に書込まれたデータはメモリチェックコマンド112によってデータの整合性が確認される。   At the time of issuance, the common data 120 is written to the EEPROM 21 by the memory copy command, the individual data 121 is written to the EEPROM 21 by the write command 110, and the individual confidential data 122 is written by the encryption write command 111, and is written to the EEPROM 21. The stored data is checked for data consistency by the memory check command 112.

なお、図4は単にアプリケーションエリア12に含まれるデータを説明するための図であって、実際のアプリケーションエリア12のデータ構造は図4とは異なり、共通データ120のデータ構造の中に個別データ121や個別機密データ122のデータ構造が含まれていてもよい。データを書込むEEPROM21のアドレスが既知でさえあれば、上述したライトコマンド110や暗号ライトコマンド111を用いて、このアドレスから所定のデータを書込むことができる。   Note that FIG. 4 is simply a diagram for explaining data included in the application area 12, and the actual data structure of the application area 12 is different from FIG. 4, and the individual data 121 is included in the data structure of the common data 120. Alternatively, the data structure of the individual confidential data 122 may be included. As long as the address of the EEPROM 21 to which data is written is known, predetermined data can be written from this address using the write command 110 and the encryption write command 111 described above.

ここから、カードOS11が有する各発行コマンドについて詳細に説明する。上述した4つのコマンドは、いずれもISO/IEC7816−4のCASE3のコマンド構造に準拠し、それぞれの発行コマンドのデータフィールドの内容を図5に示す。図5は、ライトコマンド110、暗号ライトコマンド111、メモリチェックコマンド112およびメモリコピーコマンド114、それぞれのコマンドのデータフィールドの内容を説明する図である。   From here, each issue command which card | curd OS11 has is demonstrated in detail. All of the four commands described above conform to the CASE3 command structure of ISO / IEC7816-4, and the contents of the data field of each issued command are shown in FIG. FIG. 5 is a diagram for explaining the contents of the data fields of the write command 110, the encryption write command 111, the memory check command 112, and the memory copy command 114.

図5(a)は、ライトコマンド110のデータフィールドを説明する図で、ICカード発行機3からICカード1に送信されるライトコマンド110のコマンドAPDU(Application Protocol Data Unit)のデータフィールドには、少なくとも、EEPROM21に書込まれるデータである平文110cと、平文110cの長さを示すデータ長110bと、平文110cを書込むEEPROM21の物理的あるいは論理的な開始アドレス110aとが含まれる。平文110cが書込まれるEEPROM21のアドレス空間は、この開始アドレス110aとデータ長110bによって規定される。   FIG. 5A illustrates the data field of the write command 110. The data field of the command APDU (Application Protocol Data Unit) of the write command 110 transmitted from the IC card issuer 3 to the IC card 1 includes: It includes at least plain text 110c that is data to be written to the EEPROM 21, a data length 110b indicating the length of the plain text 110c, and a physical or logical start address 110a of the EEPROM 21 to which the plain text 110c is written. The address space of the EEPROM 21 in which the plain text 110c is written is defined by the start address 110a and the data length 110b.

ICカード発行機3からICカード1にライトコマンド110のコマンドAPDUが送信されると、カードOS11は受信したコマンドAPDUを解釈し、ライトコマンド110が実行される。ライトコマンド110が実行されると、ライトコマンド110はデータフィールドから開始アドレス110aを取得し、バーチャルマシン10を作動させることなく、開始アドレス110aから平文110cをEEPROM21にメモリの書換単位ごとに効率的に書込み、書込み結果を示すデータをレスポンスAPDUとして、ICカード発行機3に返信する。   When the command APDU of the write command 110 is transmitted from the IC card issuing machine 3 to the IC card 1, the card OS 11 interprets the received command APDU, and the write command 110 is executed. When the write command 110 is executed, the write command 110 obtains the start address 110a from the data field, and the plain text 110c is efficiently transferred from the start address 110a to the EEPROM 21 for each memory rewrite unit without operating the virtual machine 10. Data indicating the writing and the writing result is returned to the IC card issuing machine 3 as a response APDU.

図5(b)は、暗号ライトコマンド111のデータフィールドを説明する図で、ICカード発行機3からICカード1に送信される暗号ライトコマンド111のコマンドAPDUのデータフィールドには、少なくとも、EEPROM21に書込まれるデータがセッション鍵13で暗号化された暗号文111cと、暗号文111cの長さを示すデータ長111bと、暗号文111cをセッション鍵13で復号したデータを書込むEEPROM21の物理的あるいは論理的な開始アドレス111aとが含まれる。暗号文111cを復号した内容が書込まれるEEPROM21のアドレス空間は、この開始アドレス111aとデータ長111bによって規定される。   FIG. 5B illustrates the data field of the encryption write command 111. The data field of the command APDU of the encryption write command 111 transmitted from the IC card issuer 3 to the IC card 1 includes at least the EEPROM 21. The ciphertext 111c in which the data to be written is encrypted with the session key 13, the data length 111b indicating the length of the ciphertext 111c, and the physical or EEPROM 21 in which the data obtained by decrypting the ciphertext 111c with the session key 13 is written And a logical start address 111a. The address space of the EEPROM 21 in which the decrypted content of the ciphertext 111c is written is defined by the start address 111a and the data length 111b.

また、ICカード発行機3からICカード1へ暗号ライトコマンド111のコマンドAPDUが送信されると、カードOS11が受信したコマンドAPDUを解釈し、暗号ライトコマンド111が作動する。暗号ライトコマンド111は、データフィールドから暗号文111cを取得すると、EEPROM21に記憶されたセッション鍵13をROM鍵113で復号して、復号したセッション鍵13で暗号文111cを復号し、暗号文111cを復号したデータをEEPROM21に開始アドレス111aからデータ長111bだけメモリの書換単位ごとに効率的に書込み、書込み結果を示すデータをレスポンスAPDUとして、ICカード発行機3に返信する。   When the command APDU of the encryption write command 111 is transmitted from the IC card issuer 3 to the IC card 1, the command APDU received by the card OS 11 is interpreted, and the encryption write command 111 operates. When the ciphertext command 111 obtains the ciphertext 111c from the data field, the session key 13 stored in the EEPROM 21 is decrypted by the ROM key 113, the ciphertext 111c is decrypted by the decrypted session key 13, and the ciphertext 111c is decrypted. The decrypted data is efficiently written in the EEPROM 21 from the start address 111a by the data length 111b for each memory rewrite unit, and data indicating the write result is returned to the IC card issuer 3 as a response APDU.

暗号ライトコマンド111に適用される暗号アルゴリズムは、ICチップ2に備えられた暗号演算回路25に依存し、本発明は何ら暗号アルゴリズムを規定するものではない。ICカード1が発行される環境にもよるが、ICカード発行会社やクレジットカード発行会社などのようにセキュリティ高くICカード1を発行する環境が整っている場所においては、暗号ライトコマンド111に適用される暗号アルゴリズムはトリプルDESが発行時間を短縮できるため望ましいが、RSAなどの公開鍵アルゴリズムであってもよい。   The encryption algorithm applied to the encryption write command 111 depends on the encryption operation circuit 25 provided in the IC chip 2, and the present invention does not define any encryption algorithm. Although it depends on the environment in which the IC card 1 is issued, it is applied to the encryption write command 111 in places where the environment for issuing the IC card 1 with high security is prepared, such as an IC card issuing company or a credit card issuing company. The encryption algorithm is desirable because Triple DES can shorten the issue time, but may be a public key algorithm such as RSA.

図5(c)は、メモリチェックコマンド112のデータフィールドを説明する図で、ICカード発行機3からICカード1に送信されるメモリチェックコマンド112のコマンドAPDUのデータフィールドには、少なくとも、ICカード1によって照合される照合チェックコード112cと、チェックコードを計算するデータの長さを示すデータ長112bと、チェックコードを演算するデータが記憶されたEEPROM21の物理的あるいは論理的な開始アドレス112aとが含まれる。データの整合性が確認されるEEPROM21のアドレス空間は、この開始アドレス112aとデータ長112bによって規定される。   FIG. 5C illustrates the data field of the memory check command 112. The data field of the command APDU of the memory check command 112 transmitted from the IC card issuer 3 to the IC card 1 includes at least an IC card. 1 is a collation check code 112c collated by 1, a data length 112b indicating the length of data for calculating the check code, and a physical or logical start address 112a of the EEPROM 21 in which data for calculating the check code is stored. included. The address space of the EEPROM 21 in which data consistency is confirmed is defined by the start address 112a and the data length 112b.

本実施の形態において、メモリチェックコマンド112に適用されたチェックコードの演算アルゴリズムは、Triple−DESを利用したMAC(168bit)演算アルゴリズムを採用し、MACの演算に用いられる暗号鍵はセッション鍵13である。   In the present embodiment, the check code calculation algorithm applied to the memory check command 112 employs a MAC (168 bit) calculation algorithm using Triple-DES, and the encryption key used for the MAC calculation is the session key 13. is there.

ICカード発行機3からICカード1へメモリチェックコマンド112のコマンドAPDUが送信されると、カードOS11が受信したコマンドAPDUを解釈し、メモリチェックコマンド112が作動する。暗号ライトコマンド111は、EEPROM21に記憶され暗号化されたセッション鍵13をROM鍵113で復号し、EEPROM21に記憶され、開始アドレス112aからデータ長112bで指定されるアドレス空間に記憶されたデータからチェックコードを演算し、演算したチェックコードとICカード発行機3から受信した照合チェックコード112cを照合し、照合結果を含むレスポンスAPDUをICカード発行機3に返信する。   When the command APDU of the memory check command 112 is transmitted from the IC card issuing machine 3 to the IC card 1, the command APDU received by the card OS 11 is interpreted, and the memory check command 112 is activated. The encryption write command 111 decrypts the encrypted session key 13 stored in the EEPROM 21 with the ROM key 113, stores it in the EEPROM 21, and checks it from the data stored in the address space specified by the data length 112b from the start address 112a. The code is calculated, the calculated check code is compared with the verification check code 112c received from the IC card issuer 3, and a response APDU including the verification result is returned to the IC card issuer 3.

図5(d)は、メモリコピーコマンド114のデータフィールドを説明する図で、ICカード発行機3からICカード1に送信されるメモリコピーコマンド114のコマンドAPDUのデータフィールドには、少なくとも、共通データ120の書込み先となるEEPROM21の物理的な書込み開始アドレス114aと、共通データ120の書込み元となるROM22の物理的な読出し開始アドレス114bと、共通データ120のサイズを示す領域サイズ114cとが含まれる。   FIG. 5D illustrates the data field of the memory copy command 114. The data field of the command APDU of the memory copy command 114 transmitted from the IC card issuer 3 to the IC card 1 includes at least common data. The physical write start address 114 a of the EEPROM 21 that is the write destination of 120, the physical read start address 114 b of the ROM 22 that is the write source of the common data 120, and an area size 114 c that indicates the size of the common data 120 are included. .

ICカード発行機3からICカード1にメモリコピーコマンド114のコマンドAPDUが送信されると、カードOS11は受信したコマンドAPDUを解釈し、メモリコピーコマンド114が実行される。メモリコピーコマンド114が実行されると、メモリコピーコマンド114はデータフィールドから各データを取得し、バーチャルマシン10を作動させることなく、読出し開始アドレス114aから領域サイズ114c分のデータを読出し、その読出したデータをEEPROM21の書込み開始アドレス114bから、メモリの書換単位ごとに効率的に書込み、書込み結果を示すデータをレスポンスAPDUとして、ICカード発行機3に返信する。   When the command APDU of the memory copy command 114 is transmitted from the IC card issuer 3 to the IC card 1, the card OS 11 interprets the received command APDU, and the memory copy command 114 is executed. When the memory copy command 114 is executed, the memory copy command 114 acquires each data from the data field, reads the data for the area size 114c from the read start address 114a without operating the virtual machine 10, and reads the data. Data is efficiently written from the write start address 114b of the EEPROM 21 for each memory rewrite unit, and data indicating the write result is returned to the IC card issuer 3 as a response APDU.

図3に示したように、ICカード発行機3には、上述したカードOS11に備えられた発行コマンドなどを利用してICカード1を発行する発行アプリケーション30と、ICカード1と電気的に接続し、ICカード1とデータ通信するデータ通信手段31と、データを記憶するためのデータ記憶装置32を備える。   As shown in FIG. 3, the IC card issuer 3 is electrically connected to the IC card 1 and an issue application 30 that issues the IC card 1 using the issue command provided in the card OS 11 described above. And a data communication means 31 for data communication with the IC card 1 and a data storage device 32 for storing data.

ICカード発行機3の発行アプリケーション30は、サーバなどのコンピュータ装置を動作させるプログラムで実現され、データ通信手段31はICカードリーダライタと同じ手段で実現され、データ記憶装置32はハードディスクなどで実現される。   The issuing application 30 of the IC card issuing machine 3 is realized by a program for operating a computer device such as a server, the data communication means 31 is realized by the same means as the IC card reader / writer, and the data storage device 32 is realized by a hard disk or the like. The

データ記憶装置32は、アプリケーションエリア12の個別データ121と個別データ121を書込むアドレス空間、アプリケーションエリア12の個別機密データ122と個別機密データ122を書込むアドレス空間とを記憶している。   The data storage device 32 stores the individual data 121 in the application area 12 and the address space in which the individual data 121 is written, and the individual confidential data 122 in the application area 12 and the address space in which the individual confidential data 122 is written.

個別データ121と個別機密データ122は、ICカード1ごとに異なるデータであるため、データ記憶装置32には発行枚数の数だけ個別データ121および個別機密データ122が記憶される。   Since the individual data 121 and the individual confidential data 122 are different for each IC card 1, the data storage device 32 stores the individual data 121 and the individual confidential data 122 by the number of issued sheets.

ICカード発行機3の発行アプリケーション30は、ICカード1に備えられたライトコマンド110を用いて、EEPROM21の所定のアドレス空間に、個別データ121を書込み、また、ユーザの暗証番号などの個別機密データ122は、暗号ライトコマンド111を用いて、EEPROM21の所定のアドレス空間に書込まれる。   The issuing application 30 of the IC card issuing machine 3 uses the write command 110 provided in the IC card 1 to write the individual data 121 in a predetermined address space of the EEPROM 21 and also the individual confidential data such as the user's personal identification number. 122 is written into a predetermined address space of the EEPROM 21 using the encryption write command 111.

ここから、ICカード発行機3が上述したカードOS11に備えられた発行コマンドを利用してICカード1を発行する手順を説明する。図6は、ICカード発行機3が0次発行を行う手順を示したフロー図で、図7は、ICカード発行機3が1次および2次発行を行う手順を示したフロー図である。   From here, a procedure for the IC card issuing machine 3 to issue the IC card 1 using the issue command provided in the card OS 11 described above will be described. FIG. 6 is a flowchart showing a procedure for the IC card issuer 3 to issue the 0th-order issue. FIG. 7 is a flowchart showing a procedure for the IC card issuer 3 to issue the primary and secondary issues.

まず、ICカード発行機3が0次発行を行う手順について説明する。0次発行では、ICカード1が動作するために最低限必要なデータがICカード1に書込まれ、本実施の形態においては、図3で示したデータの中で、セッション鍵13と発行フラグ14がEEPROM21に書込まれる。なお、バーチャルマシン10、カードOS11および共通データ120は、ICチップメーカなどであらかじめROM22に記憶される(記憶工程)。   First, a procedure in which the IC card issuer 3 performs the 0th order issue will be described. In the 0th issue, the minimum data necessary for the operation of the IC card 1 is written into the IC card 1, and in this embodiment, the session key 13 and the issue flag are included in the data shown in FIG. 14 is written in the EEPROM 21. Note that the virtual machine 10, the card OS 11, and the common data 120 are stored in advance in the ROM 22 by an IC chip manufacturer or the like (storage process).

この手順で最初に実行されるステップS1は、ICカード1を活性化するステップである。このステップでは、ICカード発行機3は、例えば、ISO/IEC7816などで定められた手順に従いICカード1を活性化する。このステップでICカード1を活性化した後は、定められた伝送プロトコルを用いたICカード発行機3とICカード1間のデータ通信が可能となる。なお、このステップが実行されるとき、ICカード1は0次発行前であるため、発行フラグ14はRAM23にコピーされない。   Step S1 first executed in this procedure is a step of activating the IC card 1. In this step, the IC card issuing machine 3 activates the IC card 1 according to a procedure defined by, for example, ISO / IEC7816. After the IC card 1 is activated in this step, data communication between the IC card issuer 3 and the IC card 1 using a predetermined transmission protocol becomes possible. When this step is executed, the issue flag 14 is not copied to the RAM 23 because the IC card 1 is before the 0th issue.

次のステップS2は、EEPROM21にセッション鍵13とコマンド制御フラグとを書込むステップである。例えば、ICカード発行機3からICカード1に送信されるライトコマンド110のコマンドAPDUには、ROM鍵113で暗号化されたセッション鍵13が含まれ、ICカード1はROM鍵113で暗号化されたセッション鍵13をEEPROM21の所定のアドレス空間に書込む。また、発行フラグ14は、ライトコマンド110によって、発行コマンドの実行許可にセットされる。発行フラグ14を発行コマンドの実行許可にセットした後、発行フラグ14の内容はメモリチェックコマンド112などによってチェックされる。なお、実行許可の設定値はICメーカの工場出荷の初期値とすることで、S2の「コマンド制御フラグを書込む」工程を省略してもよい。   The next step S2 is a step of writing the session key 13 and the command control flag in the EEPROM 21. For example, the command APDU of the write command 110 transmitted from the IC card issuer 3 to the IC card 1 includes the session key 13 encrypted with the ROM key 113, and the IC card 1 is encrypted with the ROM key 113. The session key 13 is written in a predetermined address space of the EEPROM 21. The issue flag 14 is set to permit execution of the issue command by the write command 110. After the issue flag 14 is set to permit execution of the issue command, the contents of the issue flag 14 are checked by the memory check command 112 or the like. Note that the execution permission setting value is set to the factory default value of the IC manufacturer, so that the “write command control flag” step of S2 may be omitted.

次のステップS3は、ICカード1を非活性化するステップである。このステップでは、ICカード発行機3は、例えば、ISO/IEC7816などで定められた手順に従いICカード1を非活性化する。このステップでICカード1を非活性化した後に活性化されても、ICカード1にはユーザごとに個別のデータは記憶されていないため、ICカード1が悪用されることはない。なお、この制御フラグが初期設定されている場合は0次発行における「ICカードの非活性化」の工程を省略して1次発行へと連続させて処理してもよい。   The next step S3 is a step of deactivating the IC card 1. In this step, the IC card issuing machine 3 deactivates the IC card 1 according to a procedure defined by ISO / IEC7816, for example. Even if the IC card 1 is activated after being deactivated in this step, since the IC card 1 does not store individual data for each user, the IC card 1 is not abused. When this control flag is initially set, the process of “deactivation of the IC card” in the 0th issue may be omitted and the process may be continued to the primary issue.

まず、ICカード発行機3が1次および2次発行を行う手順について説明する。一般的に、1次発行ではアプリケーションのカード1ごとに固定値のデータがICカード発行機3によってICカード1に書込まれ、2次発行ではICカード1ごとに個別なデータがICカード発行機3によってICカード1に書込まれる。   First, a procedure in which the IC card issuing machine 3 performs primary and secondary issuance will be described. In general, in the primary issue, fixed value data is written to the IC card 1 by the IC card issuer 3 for each application card 1, and in the secondary issue, individual data for each IC card 1 is written in the IC card issuer. 3 is written on the IC card 1.

本実施の形態においては、1次発行と2次発行は1連のシーケンスで実施されるものとし、図3で示した共通データ120がアプリケーションのカード1ごとに固定値のデータとして1次発行で書込まれ、個別データ121と個別機密データ122が2次発行で書込まれる。なお、ICカード発行機3には、メモリコピーコマンド114と発行時に必要な個別データ121,122とを含むデータが設定されている(設定工程)。   In this embodiment, it is assumed that the primary issue and the secondary issue are performed in a single sequence, and the common data 120 shown in FIG. 3 is the primary issue as fixed value data for each application card 1. The individual data 121 and the individual confidential data 122 are written in the secondary issue. The IC card issuing machine 3 is set with data including the memory copy command 114 and the individual data 121 and 122 required at the time of issuing (setting process).

この手順で最初に実行されるステップS10は、ICカード1を活性化するステップである。このステップでは、ICカード発行機3は、例えば、ISO/IEC7816などで定められた手順に従いICカード1を活性化する。このステップでICカード1を活性化した後は、定められた伝送プロトコルを用いたICカード発行機3とICカード1間のデータ通信が可能となる。なお、このステップが実行されるとき、ICカード1は0次発行済みであるため、発行フラグ14をRAM23にコピーする。   Step S10 executed first in this procedure is a step of activating the IC card 1. In this step, the IC card issuing machine 3 activates the IC card 1 according to a procedure defined by, for example, ISO / IEC7816. After the IC card 1 is activated in this step, data communication between the IC card issuer 3 and the IC card 1 using a predetermined transmission protocol becomes possible. When this step is executed, since the IC card 1 has already been issued in the 0th order, the issue flag 14 is copied to the RAM 23.

次のステップS11は、アプリケーションの共通データ120が書込まれるステップである。このステップにおいては、ICカード発行機3は、メモリコピーコマンド114のコマンドAPDUをICカード1に送信し(送信工程)、ICカード1のメモリコピーコマンド114が作動することで、共通データ120は指定されたEEPROM21のアドレス空間に書込まれる(書込み工程)。なお、メモリコピー時には、「データサイズが正当か」、「書込み先・元のアドレスが正当か」、「書込み先のアドレスがEEPROM21に割り当てられているページの先頭アドレスであるか」、「書込みエラーが発生していないか」などを判断しながら処理を行うことが好ましい。   The next step S11 is a step in which the common data 120 of the application is written. In this step, the IC card issuing machine 3 transmits the command APDU of the memory copy command 114 to the IC card 1 (transmission process), and the common data 120 is designated by the operation of the memory copy command 114 of the IC card 1. Is written in the address space of the EEPROM 21 thus written (writing process). At the time of memory copy, “data size is valid”, “write destination / original address is valid”, “write destination address is top address of page assigned to EEPROM 21”, “write error” It is preferable to perform the processing while judging whether or not “has occurred”.

次のステップS12は、ステップS11でEEPROM21に書込まれた共通データ120の内容をチェックするステップである。このステップにおいては、ICカード発行機3は、少なくとも共通データ120の照合チェックコードを含むメモリチェックコマンド112のコマンドAPDUをICカード1に送信し、ICカード1のメモリチェックコマンド112が作動することで、このコマンドAPDUに含まれる照合チェックコードと、EEPROM21に書込まれた共通データ120から演算されたチェックコードとが照合される。このコマンドにより、書込まれたデータを読出したり送ったりしないため、通信データ量が少なくなり発行時間が短縮できる。照合に成功した場合はステップS13に進み、照合に失敗した場合、この手順は終了し、照合に失敗したICカード1は発行失敗カードとして取り扱われる。   The next step S12 is a step for checking the contents of the common data 120 written in the EEPROM 21 in step S11. In this step, the IC card issuing machine 3 transmits the command APDU of the memory check command 112 including at least the verification check code of the common data 120 to the IC card 1, and the memory check command 112 of the IC card 1 is activated. The collation check code included in the command APDU is collated with the check code calculated from the common data 120 written in the EEPROM 21. Since this command does not read or send written data, the amount of communication data is reduced and the issuing time can be shortened. If the collation is successful, the process proceeds to step S13. If the collation is unsuccessful, this procedure is terminated, and the IC card 1 that fails the collation is handled as an issue failure card.

次のステップS13は、発行フラグ14を無効にセットするステップである。このステップにおいて、ICカード発行機3は、EEPROM21の発行フラグ14を、発行コマンドの実行不可にセットするためのコマンドAPDUをICカード1に送信し、ICカード1は発行フラグ14を発行コマンドの実行不可にセットする。発行フラグ14を発行コマンドの実行不可にセットした後、発行フラグ14の内容はメモリチェックコマンド112などによってチェックされる。   The next step S13 is a step for setting the issue flag 14 to be invalid. In this step, the IC card issuer 3 transmits a command APDU for setting the issue flag 14 of the EEPROM 21 to disable execution of the issue command to the IC card 1, and the IC card 1 executes the issue command 14 with the issue flag 14 being executed. Set to impossible. After setting the issue flag 14 to disable execution of the issue command, the contents of the issue flag 14 are checked by the memory check command 112 or the like.

上述しているように、ICカード1はRAM23にコピーされた発行フラグ14を参照して発行コマンドの実行を制御するため、このステップにおいてEEPROM21の発行フラグ14を発行コマンドの実行不可にセットしたとしても、ICカード1が非活性化されない限りは発行コマンドの実行が可能である。   As described above, since the IC card 1 controls the execution of the issuance command with reference to the issuance flag 14 copied to the RAM 23, it is assumed that the issuance command 14 of the EEPROM 21 is set to be unexecutable in this step. However, the issue command can be executed as long as the IC card 1 is not deactivated.

なお、共通データ120をICカード1に書込んだ後にEEPROM21に記憶された発行フラグ14を発行コマンドの実行不可にセットするのは、個別データ121の書込みに失敗したICカード1が利用され、個別データ121や個別機密データ122が読出されるなどして悪用されることを防止するためである。   The issue flag 14 stored in the EEPROM 21 after the common data 120 is written to the IC card 1 is set so that the issue command cannot be executed because the IC card 1 that failed to write the individual data 121 is used. This is to prevent the data 121 and the individual confidential data 122 from being misused by being read.

次のステップS14は、アプリケーションの個別データ121が書込まれるステップである。このステップにおいては、ICカード発行機3は、少なくとも個別データ121を含むライトコマンド110のコマンドAPDUをICカード1に送信し(送信工程)、ICカード1のライトコマンド110が作動することで、このコマンドAPDUに含まれる個別データ121は指定されたEEPROM21のアドレス空間に書込まれる(書込み工程)。   The next step S14 is a step in which the individual data 121 of the application is written. In this step, the IC card issuing machine 3 transmits the command APDU of the write command 110 including at least the individual data 121 to the IC card 1 (transmission process), and the write command 110 of the IC card 1 is activated. The individual data 121 included in the command APDU is written in the address space of the designated EEPROM 21 (writing process).

次のステップS15は、ステップS14でEEPROM21に書込まれた個別データ121の内容をチェックするステップである。このステップにおいては、ICカード発行機3は、少なくとも共通データ120の照合チェックコードを含むメモリチェックコマンド112のコマンドAPDUをICカード1に送信し、ICカード1のメモリチェックコマンド112が作動することで、このコマンドAPDUに含まれるチェックコードと、EEPROM21に記憶された個別データ121から演算されたチェックコードとが照合される。照合に成功した場合はステップS16に進み、照合に失敗した場合、この手順は終了し、照合に失敗したICカード1は発行失敗カードとして取り扱われる。   The next step S15 is a step of checking the contents of the individual data 121 written in the EEPROM 21 in step S14. In this step, the IC card issuing machine 3 transmits the command APDU of the memory check command 112 including at least the verification check code of the common data 120 to the IC card 1, and the memory check command 112 of the IC card 1 is activated. The check code included in the command APDU and the check code calculated from the individual data 121 stored in the EEPROM 21 are collated. If the collation is successful, the process proceeds to step S16. If the collation is unsuccessful, this procedure ends, and the IC card 1 that has failed the collation is handled as an issue failure card.

次のステップS16は、アプリケーションの個別機密データ122が書込まれるステップである。このステップにおいては、ICカード発行機3は、少なくともセッション鍵13で個別機密データ122を暗号化した暗号文を含む暗号ライトコマンド111のコマンドAPDUをICカード1に送信し(送信工程)、ICカード1の暗号ライトコマンド111が作動する。   The next step S16 is a step in which the individual confidential data 122 of the application is written. In this step, the IC card issuer 3 transmits to the IC card 1 a command APDU of the encrypted write command 111 including a ciphertext obtained by encrypting the individual confidential data 122 with at least the session key 13 (transmission process). 1 encryption write command 111 is activated.

ICカード1の暗号ライトコマンド111が作動すると、EEPROM21に暗号化された状態で記憶されているセッション鍵13をROM鍵113で復号し、復号したセッション鍵13でこのコマンドAPDUに含まれる暗号文を復号した後、暗号文を復号した内容を指定されたEEPROM21のアドレス空間に書込む(書込み工程)。   When the encryption write command 111 of the IC card 1 is activated, the session key 13 stored in an encrypted state in the EEPROM 21 is decrypted with the ROM key 113, and the encrypted text contained in the command APDU is decrypted with the decrypted session key 13. After decryption, the decrypted content of the ciphertext is written into the designated address space of the EEPROM 21 (writing step).

次のステップS17は、ステップS16でEEPROM21に書込まれた個別機密データ122の内容をチェックするステップである。このステップにおいては、ICカード発行機3は、少なくとも個別機密データ122の照合チェックコードを含むメモリチェックコマンド112のコマンドAPDUをICカード1に送信し、ICカード1のメモリチェックコマンド112が作動することで、このコマンドAPDUに含まれるチェックコードと、EEPROM21に記憶された個別機密データ122から演算されたチェックコードとが照合される。照合に成功した場合はステップS18に進み、照合に失敗した場合、この手順は終了し、照合に失敗したICカード1は発行失敗カードとして取り扱われる。   The next step S17 is a step of checking the contents of the individual confidential data 122 written in the EEPROM 21 in step S16. In this step, the IC card issuing machine 3 transmits the command APDU of the memory check command 112 including at least the verification check code of the individual confidential data 122 to the IC card 1, and the memory check command 112 of the IC card 1 is activated. Thus, the check code included in the command APDU is collated with the check code calculated from the individual confidential data 122 stored in the EEPROM 21. If the collation is successful, the process proceeds to step S18. If the collation is unsuccessful, this procedure is terminated, and the IC card 1 that has failed the collation is handled as an issue failure card.

次のステップS18は、ICカード1を非活性化するステップである。このステップでは、ICカード発行機3は、例えば、ISO/IEC7816などで定められた手順に従いICカード1を非活性化する。このステップでICカード1を非活性化した後に活性化されても、発行フラグ14は発行コマンドの実行不可にセットされているため、カードOS11に備えられた発行コマンドが悪用されることはない。   The next step S18 is a step of deactivating the IC card 1. In this step, the IC card issuing machine 3 deactivates the IC card 1 according to a procedure defined by ISO / IEC7816, for example. Even if the IC card 1 is activated after being deactivated in this step, the issue flag 14 is set so that the issue command cannot be executed, so that the issue command provided in the card OS 11 is not abused.

図8〜図10は、上述した仕組みを適用していない変更前のICカード1Aと、上述した仕組みを適用している変更後のICカード1とを対比して説明する図である。
図8に示すように、変更前のICカード1Aは、300KバイトのROM22と、120KバイトのEEPROM21などとを備え、ICカード発行時には、ICカード発行機からその都度、EEPROM21に共通データ120を書込んでいた。
これに対して、変更後のICカード1は、400KバイトのROM22と、120KバイトのEEPROM21などとを備え、ICカード発行時には、ICカード1自身が、ROM22に記憶されている共通データ120をEEPROM21にコピーする。なお、変更後のICカード1のROM22のサイズが大きいのは、近年の半導体技術の進歩に伴う容量増加によるものであり、その容量が増えた部分を利用して、共通データ120を書込んでいる。
FIGS. 8 to 10 are diagrams illustrating a comparison between the IC card 1A before the change to which the above-described mechanism is not applied and the IC card 1 after the change to which the above-described mechanism is applied.
As shown in FIG. 8, the IC card 1A before the change is provided with a 300 Kbyte ROM 22, a 120 Kbyte EEPROM 21 and the like. When the IC card is issued, the common data 120 is written to the EEPROM 21 from the IC card issuing machine each time. It was crowded.
On the other hand, the IC card 1 after the change includes the ROM 22 of 400 Kbytes and the EEPROM 21 of 120 Kbytes. When the IC card is issued, the IC card 1 itself stores the common data 120 stored in the ROM 22 as the EEPROM 21. Copy to. Note that the size of the ROM 22 of the IC card 1 after the change is large due to an increase in capacity accompanying recent advances in semiconductor technology, and the common data 120 is written using the increased capacity. Yes.

このようにすることで、図9に示すように、変更前のICカード1Aでは、ICカード発行機3に共通データ120と個別データ121,122とを設定し、両方のデータをICカード1Aに送信しなければならなかったが、変更後のICカード1では、1つのメモリコピーコマンド114と個別データ121,122だけの送信でICカードの発行が可能となる。
したがって、図10に示すように、変更後のICカード1では、共通データ120の送信処理がなくなり、大幅に発行時間を短縮することができる。具体的には、数分かかっていた発行時間を数秒に短縮することができる。なお、個別データ121,122の送信時間は、変更の前後で同じであるが、個別データ121,122は数Kバイトであり、発行時間にそれほど影響を与えるものではない。
In this way, as shown in FIG. 9, in the IC card 1A before the change, the common data 120 and the individual data 121 and 122 are set in the IC card issuing machine 3, and both data are stored in the IC card 1A. Although it had to be transmitted, in the IC card 1 after the change, the IC card can be issued by transmitting only one memory copy command 114 and individual data 121 and 122.
Therefore, as shown in FIG. 10, in the IC card 1 after the change, the transmission process of the common data 120 is eliminated, and the issuing time can be greatly shortened. Specifically, the issue time which took several minutes can be reduced to several seconds. The transmission times of the individual data 121 and 122 are the same before and after the change, but the individual data 121 and 122 are several kilobytes and do not significantly affect the issue time.

さらに、このような構成を採用することにより、以下のような付随のメリットがある。
(1)共通データ120のIC書込み処理が数秒に短縮される。
(2)通信量が減少するため、通信エラー率を低減させることができる。
(3)通信量が減少するため、ICカード発行機3の負荷が減り、故障が減る。
Further, by adopting such a configuration, there are following merits.
(1) The IC writing process of the common data 120 is shortened to several seconds.
(2) Since the amount of communication decreases, the communication error rate can be reduced.
(3) Since the amount of communication decreases, the load on the IC card issuer 3 is reduced and the failure is reduced.

(変形例)
以上説明した実施の形態に限定されることなく、種々の変形や変更が可能であって、それらも本発明の均等の範囲内である。
(1)共通データ120は、ROM22からEEPROM21へ、直接書込む例で説明したが、バーチャルマシン10に解釈させるようなデータとして、間接的に書込むようにしてもよい。このようにしても、通信量が減少するので、ICカードの発行時間を短縮させることがでる。
(2)ICカードは、バーチャルマシンが実装されていないものであってもよい。
(3)書込み開始アドレス114a,読出し開始アドレス114bおよび領域サイズ114cは、メモリコピーコマンド114に含ませる例で説明したが、メモリコピーコマンドには含ませず、これらのデータをROM22に記憶させておいてもよい。この場合には、メモリコピーの指令をICカードに送信するだけでよく、ICカードは、その指令と自身のROM22に記憶されている書込み開始アドレスなどに基づいてメモリコピーの処理を行う。
(Modification)
The present invention is not limited to the embodiment described above, and various modifications and changes are possible, and these are also within the equivalent scope of the present invention.
(1) The common data 120 has been described as an example of writing directly from the ROM 22 to the EEPROM 21. However, the common data 120 may be written indirectly as data that the virtual machine 10 interprets. Even in this case, since the amount of communication is reduced, the IC card issuance time can be shortened.
(2) The IC card may not be mounted with a virtual machine.
(3) Although the write start address 114a, the read start address 114b, and the area size 114c have been described as examples included in the memory copy command 114, they are not included in the memory copy command, and these data are stored in the ROM 22. May be. In this case, it is only necessary to send a memory copy command to the IC card, and the IC card performs a memory copy process based on the command and a write start address stored in its own ROM 22.

ICカード発行システムのアーキテクチャを説明する図。The figure explaining the architecture of an IC card issue system. ICカードに実装されるICチップの内部構成図。The internal block diagram of the IC chip mounted in an IC card. ICカード発行システムの機能構成図。The functional block diagram of an IC card issue system. アプリケーションエリア12のアプリケーションに含まれるデータを説明するための図。The figure for demonstrating the data contained in the application of the application area 12. FIG. 発行コマンドのデータフィールドの内容を説明する図。The figure explaining the content of the data field of an issue command. ICカード発行機が次発行を行う手順を示したフロー図。The flowchart which showed the procedure which an IC card issuing machine performs next issuing. ICカード発行機が1次および2次発行を行う手順を示したフロー図。The flowchart which showed the procedure in which an IC card issuing machine performs primary and secondary issuing. 変更前後のICカードを対比して説明する図。The figure explaining the IC card before and behind the comparison. 変更前後のICカードを対比して説明する図。The figure explaining the IC card before and behind the comparison. 変更前後のICカードを対比して説明する図。The figure explaining the IC card before and behind the comparison.

符号の説明Explanation of symbols

1 ICカード
10 バーチャルマシン
11 カードOS
110 ライトコマンド
111 暗号ライトコマンド
112 メモリチェックコマンド
113 ROM鍵
114 メモリコピーコマンド
12 アプリケーションエリア
120 共通データ
121 個別データ
122 個別機密データ
13 暗号化された状態のセッション鍵
14 発行フラグ
2 ICチップ
21 EEPROM
22 ROM
23 RAM
3 ICカード発行機
1 IC card 10 Virtual machine 11 Card OS
110 Write command 111 Encryption write command 112 Memory check command 113 ROM key 114 Memory copy command 12 Application area 120 Common data 121 Individual data 122 Individual confidential data 13 Session key 14 in an encrypted state Issue flag 2 IC chip 21 EEPROM
22 ROM
23 RAM
3 IC card issuing machine

Claims (17)

電気的に書換え可能な不揮発性メモリを備えたICカードを発行するICカード発行方法であって、
前記ICカードの所定のメモリに、発行時に必要な共通データを記憶させる記憶工程と、
ICカード発行機に、メモリコピーコマンドと発行時に必要な個別データとを含むデータを設定する設定工程と、
前記設定工程で設定したデータを、前記ICカード発行機が、前記ICカードに送信する送信工程と、
前記送信工程によって送信されたデータ、および、前記共通データの書込み先となる前記不揮発性メモリの物理的な書込み開始アドレス,前記共通データの書込み元となる前記所定のメモリの物理的な読出し開始アドレスおよび前記共通データのサイズを示すレングスデータに基づいて、前記ICカードが、前記不揮発性メモリに前記共通データおよび前記個別データを書込む書込み工程と、
を備えるICカード発行方法。
An IC card issuing method for issuing an IC card having an electrically rewritable nonvolatile memory,
A storage step of storing common data required at the time of issuance in a predetermined memory of the IC card;
A setting process for setting data including a memory copy command and individual data required at the time of issuance in an IC card issuing machine;
The data set in the setting step, the IC card issuer transmits the IC card to the IC card,
The data transmitted by the transmission step, the physical write start address of the non-volatile memory that is the write destination of the common data, and the physical read start address of the predetermined memory that is the write source of the common data And based on the length data indicating the size of the common data, the IC card writes the common data and the individual data to the nonvolatile memory,
An IC card issuing method comprising:
請求項1に記載のICカード発行方法において、
前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータは、前記メモリコピーコマンドに含まれていること、
を特徴とするICカード発行方法。
The IC card issuing method according to claim 1,
The write start address, the read start address, and the length data are included in the memory copy command;
IC card issuing method characterized by the above.
請求項1に記載のICカード発行方法において、
前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータは、前記所定のメモリに記憶されていること、
を特徴とするICカード発行方法。
The IC card issuing method according to claim 1,
The write start address, the read start address and the length data are stored in the predetermined memory;
IC card issuing method characterized by the above.
請求項1から請求項3のいずれかに記載のICカード発行方法において、
前記ICカードは、バーチャルマシンを備えたICカードであり、
前記記憶工程では、前記ICカード以外の装置を用い、前記バーチャルマシンで解釈実行される命令により作動するコマンドを利用して前記ICカードを発行したとき、前記不揮発性メモリに形成されるメモリマップを作成し、そのメモリマップを前記共通データとして前記ICカードの所定のメモリに記憶させること、
を特徴とするICカード発行方法。
In the IC card issuing method according to any one of claims 1 to 3,
The IC card is an IC card equipped with a virtual machine,
In the storing step, when a device other than the IC card is used and the IC card is issued by using a command that operates according to an instruction interpreted and executed by the virtual machine, a memory map formed in the nonvolatile memory is Creating and storing the memory map in the predetermined memory of the IC card as the common data;
IC card issuing method characterized by the above.
請求項1から請求項4のいずれかに記載のICカード発行方法において、
前記送信工程では、前記ICカード発行機が、前記個別データの内容の全て或いは一部を平文で前記ICカードに送信し、
前記書込み工程では、前記ICカードが、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによって、前記平文の内容を前記不揮発性メモリに書込むこと、
を特徴とするICカード発行方法。
In the IC card issuing method according to any one of claims 1 to 4,
In the transmission step, the IC card issuing machine transmits all or part of the content of the individual data to the IC card in plain text,
In the writing step, the IC card writes the contents of the plaintext into the nonvolatile memory by a command operated by a machine language that is interpreted and executed by an IC chip mounted on the IC card.
IC card issuing method characterized by the above.
請求項1から請求項5のいずれかに記載のICカード発行方法において、
前記送信工程では、前記ICカード発行機が、前記個別データの内容の全て或いは一部を暗号化した暗号文を前記ICカードに送信し、
前記書込み工程では、前記ICカードが、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによって、前記ICカードの内部に記憶された暗号鍵を用いて前記暗号文を復号し、復号した内容を前記不揮発性メモリに書込むこと、
を特徴とするICカード発行方法。
In the IC card issuing method according to any one of claims 1 to 5,
In the transmitting step, the IC card issuing machine transmits a ciphertext obtained by encrypting all or part of the content of the individual data to the IC card,
In the writing step, the IC card uses the encryption key stored in the IC card to execute the ciphertext by a command operated by a machine language that is interpreted and executed by an IC chip mounted on the IC card. Decrypting and writing the decrypted content to the non-volatile memory;
IC card issuing method characterized by the above.
請求項1から請求項6のいずれかに記載のICカード発行方法において、
前記不揮発性メモリに書込んだデータの内容の整合性を確認する工程を備えること、
を特徴とするICカード発行方法。
In the IC card issuing method according to any one of claims 1 to 6,
Comprising the step of confirming the consistency of the contents of the data written in the nonvolatile memory;
IC card issuing method characterized by the above.
請求項1から請求項7のいずれかに記載のICカード発行方法において、
前記ICカードが活性化されたときに前記ICカードが参照し、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動するコマンドによる前記ICカードの発行が可能または不可能な状態であることが示され、前記ICカード自身が発行を制御するための発行フラグが前記不揮発性メモリに備えられ、前記ICカード発行方法は、前記ICカードの前記発行フラグを不可能の状態にセットする工程を備えること、
を特徴とするICカード発行方法。
In the IC card issuing method according to any one of claims 1 to 7,
A state in which the IC card can be issued by a command that is operated by a machine language that is referred to by the IC card when the IC card is activated and is interpreted and executed by an IC chip mounted on the IC card. The non-volatile memory has an issue flag for controlling the issue by the IC card itself, and the IC card issue method sets the issue flag of the IC card to an impossible state. Comprising the step of:
IC card issuing method characterized by the above.
請求項1から請求項8のいずれかに記載のICカード発行方法によって発行されたICカード。   An IC card issued by the IC card issuing method according to claim 1. 電気的に書換え可能な不揮発性メモリ、および、発行時に必要な共通データが記憶された所定のメモリを備え、バーチャルマシンを有するICカードであって、
前記ICカードは発行時に利用され、前記ICカードに実装されたICチップで解釈実行されるマシン語により作動する発行コマンドとして、前記共通データの書込み先となる前記不揮発性メモリの物理的な書込み開始アドレス,前記共通データの書込み元となる前記所定のメモリの物理的な読出し開始アドレスおよび前記共通データのサイズを示すレングスデータに基づいて、前記不揮発性メモリに前記所定のメモリの共通データを書込むメモリコピーコマンドを備えること、
を特徴とするICカード。
An IC card having a virtual machine, comprising an electrically rewritable non-volatile memory, and a predetermined memory storing common data required at the time of issuance,
The IC card is used at the time of issuance, and a physical write start of the non-volatile memory to which the common data is written is issued as an issuance command operated by a machine language interpreted and executed by an IC chip mounted on the IC card. Based on the address, the physical read start address of the predetermined memory that is the writing source of the common data, and the length data indicating the size of the common data, the common data of the predetermined memory is written into the nonvolatile memory Having a memory copy command,
IC card characterized by
請求項10に記載のICカードにおいて、
前記ICカードは前記発行コマンドとして、ICカード発行機から送信されてくる個別データを、前記ICカードの前記不揮発性メモリの指定されたアドレス空間に書込むライトコマンドを備えること、
を特徴とするICカード。
The IC card according to claim 10,
The IC card includes a write command for writing individual data transmitted from the IC card issuing machine in the designated address space of the nonvolatile memory of the IC card as the issue command,
IC card characterized by
請求項10または請求項11に記載のICカードにおいて、
前記ICカードは前記発行コマンドとして、ICカード発行機から送信されてくる暗号化された個別データを、前記ICカードの内部に記憶された暗号鍵を用いて復号し、復号した内容を指定されたアドレス空間に書込む暗号ライトコマンドを備えること、
を特徴とするICカード。
In the IC card according to claim 10 or 11,
The IC card uses the encryption key stored in the IC card to decrypt the encrypted individual data transmitted from the IC card issuing machine as the issue command, and the decrypted content is designated. Having an encryption write command to write to the address space,
IC card characterized by
請求項10から請求項12のいずれかに記載のICカードにおいて、
前記ICカードは前記発行コマンドとして、前記不揮発性メモリに書込んだデータの内容の整合性を確認するメモリチェックコマンドを備えること、
を特徴とするICカード。
The IC card according to any one of claims 10 to 12,
The IC card has a memory check command for confirming the consistency of the contents of data written in the nonvolatile memory as the issue command,
IC card characterized by
請求項10から請求項13のいずれかに記載のICカードにおいて、
前記ICカードの前記不揮発性メモリには、活性化されたときに参照し、前記ICカードに備えられた前記発行コマンドの実行を制御するための発行フラグが設けられ、前記ICカードが活性化されたときに前記発行フラグが発行不可に設定されている場合は、前記発行コマンドを実行しない手段を備えること、
を特徴とするICカード。
In the IC card according to any one of claims 10 to 13,
The non-volatile memory of the IC card is provided with an issue flag for referencing when activated and for controlling the execution of the issue command provided in the IC card, and the IC card is activated. A means for not executing the issue command if the issue flag is set not to be issued when
IC card characterized by
請求項10から請求項14のいずれかに記載のICカードにおいて、
前記メモリチェックコマンドは、前記不揮発性メモリの指定されたアドレス空間の内容から、予め定められたアルゴリズムに従い演算されるチェックコードと、端末装置から送信される前記チェックコードの期待値とを照合するコマンドであること、
を特徴とするICカード。
The IC card according to any one of claims 10 to 14,
The memory check command is a command for collating a check code calculated according to a predetermined algorithm and an expected value of the check code transmitted from a terminal device from the contents of a specified address space of the nonvolatile memory. Being
IC card characterized by
請求項10から請求項15のいずれかに記載のICカードにおいて、
前記所定のメモリは、前記書込み開始アドレス,前記読出し開始アドレスおよび前記レングスデータを記憶していること、
を特徴とするICカード。
The IC card according to any one of claims 10 to 15,
The predetermined memory stores the write start address, the read start address, and the length data;
IC card characterized by
請求項10から請求項16のいずれかに記載のICカードにおいて、
前記所定のメモリは、読出し専用の不揮発性メモリであること、
を特徴とするICカード。
The IC card according to any one of claims 10 to 16,
The predetermined memory is a read-only nonvolatile memory;
IC card characterized by
JP2006149559A 2006-05-30 2006-05-30 IC card issuing method and IC card Expired - Fee Related JP4961834B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006149559A JP4961834B2 (en) 2006-05-30 2006-05-30 IC card issuing method and IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006149559A JP4961834B2 (en) 2006-05-30 2006-05-30 IC card issuing method and IC card

Publications (2)

Publication Number Publication Date
JP2007323133A true JP2007323133A (en) 2007-12-13
JP4961834B2 JP4961834B2 (en) 2012-06-27

Family

ID=38855920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006149559A Expired - Fee Related JP4961834B2 (en) 2006-05-30 2006-05-30 IC card issuing method and IC card

Country Status (1)

Country Link
JP (1) JP4961834B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010224892A (en) * 2009-03-24 2010-10-07 Toppan Printing Co Ltd Inspection issuing system for ic card
WO2010116488A1 (en) * 2009-04-07 2010-10-14 三菱電機株式会社 Communication adapter device
JP2016212497A (en) * 2015-04-30 2016-12-15 株式会社東芝 Ic card, ic module, issuance device, issuance method and issuance program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0935018A (en) * 1995-07-17 1997-02-07 Dainippon Printing Co Ltd Portable information recording medium and its access method
JP2001052131A (en) * 1999-08-04 2001-02-23 Dainippon Printing Co Ltd Ic card, issuing method therefor and program
JP2003067679A (en) * 2001-08-29 2003-03-07 Toshiba Corp Portable electronic device and data write method therefor
JP2003091463A (en) * 2001-06-13 2003-03-28 Hitachi Ltd Memory device
JP2003288214A (en) * 2002-03-28 2003-10-10 Toshiba Corp Information processing apparatus and method
JP2005228181A (en) * 2004-02-16 2005-08-25 Dainippon Printing Co Ltd Method for issuing ic card, program for ic card, and ic card
JP2005275457A (en) * 2004-03-22 2005-10-06 Toshiba Corp Portable electronic medium issuing device, portable electronic medium, and portable electronic medium issuing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0935018A (en) * 1995-07-17 1997-02-07 Dainippon Printing Co Ltd Portable information recording medium and its access method
JP2001052131A (en) * 1999-08-04 2001-02-23 Dainippon Printing Co Ltd Ic card, issuing method therefor and program
JP2003091463A (en) * 2001-06-13 2003-03-28 Hitachi Ltd Memory device
JP2003067679A (en) * 2001-08-29 2003-03-07 Toshiba Corp Portable electronic device and data write method therefor
JP2003288214A (en) * 2002-03-28 2003-10-10 Toshiba Corp Information processing apparatus and method
JP2005228181A (en) * 2004-02-16 2005-08-25 Dainippon Printing Co Ltd Method for issuing ic card, program for ic card, and ic card
JP2005275457A (en) * 2004-03-22 2005-10-06 Toshiba Corp Portable electronic medium issuing device, portable electronic medium, and portable electronic medium issuing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010224892A (en) * 2009-03-24 2010-10-07 Toppan Printing Co Ltd Inspection issuing system for ic card
WO2010116488A1 (en) * 2009-04-07 2010-10-14 三菱電機株式会社 Communication adapter device
JPWO2010116488A1 (en) * 2009-04-07 2012-10-11 三菱電機株式会社 Communication adapter device
JP2016212497A (en) * 2015-04-30 2016-12-15 株式会社東芝 Ic card, ic module, issuance device, issuance method and issuance program

Also Published As

Publication number Publication date
JP4961834B2 (en) 2012-06-27

Similar Documents

Publication Publication Date Title
US9607192B2 (en) MIFARE push
JP4806639B2 (en) Secure device and IC card issuing system
US9430650B2 (en) Method for managing memory space in a secure non-volatile memory of a secure element
JPWO2002057904A1 (en) Control device with download function
JP2007004522A (en) Storage device
JP2004104539A (en) Memory card
JP4869337B2 (en) Safe processing of data
US9606810B2 (en) Method and apparatus for replacing the operating system of a limited-resource portable data carrier
JP4961834B2 (en) IC card issuing method and IC card
CN112199740B (en) Encryption lock implementation method and encryption lock
JP2004252707A (en) Memory device
AU2006256601B2 (en) ITSO FVC2 application monitor
WO2019059148A1 (en) Bios management device, bios management system, bios management method, and bios management program-stored recording medium
JP2018508063A (en) Secure element
JP4899499B2 (en) IC card issuing method, IC card issuing system, and IC card
JP3545627B2 (en) Portable electronic devices
JPH10301854A (en) Chip card and method for importing information on the same
JP2006053916A (en) Device and method for checking whether data stored in external memory is changed or not
JP7322923B2 (en) Secure element, transaction control method and device
JP2013097524A (en) Ic chip, data protection method, data protection program, ic card and recording medium
JP2004348526A (en) Ic card, ic card program, and switching method of code section
JP2008033549A (en) Portable electronic device, ic card, and important data concealment method for portable electronic device
BRPI0409234B1 (en) secure electronic entity comprising means for storing a maximum allowed number of uses of a secret data and process for modifying a maximum permitted number of uses of a secret data memorized by a secure electronic entity
JP2022025986A (en) Electronic information storage medium, program addition method, and program
JP2007280196A (en) Portable electronic equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090410

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120210

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120228

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120312

R150 Certificate of patent or registration of utility model

Ref document number: 4961834

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150406

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees