Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4373239B2 - IC card issuance method, IC card program and IC card - Google Patents
[go: Go Back, main page]

JP4373239B2 - IC card issuance method, IC card program and IC card - Google Patents

IC card issuance method, IC card program and IC card Download PDF

Info

Publication number
JP4373239B2
JP4373239B2 JP2004037729A JP2004037729A JP4373239B2 JP 4373239 B2 JP4373239 B2 JP 4373239B2 JP 2004037729 A JP2004037729 A JP 2004037729A JP 2004037729 A JP2004037729 A JP 2004037729A JP 4373239 B2 JP4373239 B2 JP 4373239B2
Authority
JP
Japan
Prior art keywords
card
data
data block
transmission order
transmitted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004037729A
Other languages
Japanese (ja)
Other versions
JP2005228181A (en
Inventor
智謙 牧野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2004037729A priority Critical patent/JP4373239B2/en
Publication of JP2005228181A publication Critical patent/JP2005228181A/en
Application granted granted Critical
Publication of JP4373239B2 publication Critical patent/JP4373239B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Credit Cards Or The Like (AREA)

Description

本発明は、クレジットカードサイズのプラスチックカードに半導体集積回路(以下、ICチップと記す)を埋め込んだICカードの発行技術に関し、詳しくは容量の大きいデータを分割してICカードに送信し、ICカードに所定のデータを書込む発行方法に関する。更には、本発明は、前述の発行方法で必要となるICカード用プログラムおよび前記プログラムを実装したICカードにも関する。   The present invention relates to an IC card issuance technique in which a semiconductor integrated circuit (hereinafter referred to as an IC chip) is embedded in a credit card-sized plastic card, and more specifically, a large-capacity data is divided and transmitted to the IC card. The present invention relates to a method for issuing predetermined data. Furthermore, the present invention also relates to an IC card program required for the above issuing method and an IC card on which the program is mounted.

ICカードとは、クレジットカードサイズのプラスチックカードにICチップを埋め込み、前記ICチップのメモリにデータを記録するカードである。近年ICカードはキャッシュカード、クレジットカードまたは電子マネーなどに幅広く応用されている。   An IC card is a card that embeds an IC chip in a credit card-sized plastic card and records data in the memory of the IC chip. In recent years, IC cards have been widely applied to cash cards, credit cards, electronic money, and the like.

従来、ICカードには用途ごとに単一のソフトウェアすなわちアプリケーションを読み出し専用メモリ(Read Only Memory 、以下ROMと記す)に実装することが主流であったため、一枚のICカードは単一の機能しか持たず、用途ごとにICカードが必要であった。このため、利用者側は複数枚のICカードを常に所持する必要があり大変不便であった。現在は利用者の利便性を向上させるべく、一枚のICカードに複数のアプリケーションを組み込むことができるマルチアプリケーション型ICカードが主流になりつつある。   Conventionally, it has been the mainstream to install a single software, that is, an application in a read only memory (hereinafter referred to as ROM) for each IC card, so a single IC card has only a single function. IC card was necessary for each application. For this reason, the user must always have a plurality of IC cards, which is very inconvenient. Currently, in order to improve user convenience, multi-application type IC cards that can incorporate a plurality of applications into one IC card are becoming mainstream.

マルチアプリケーション型ICカードとは、前述の通り、複数のアプリケーションを搭載することができるICカードで、ICチップが備えているROMに基本処理を行うマルチアプリケーションオペレーティングシステム(Operating System、以下OSと記す)を実装し、同じくICチップが備えている電気的に消去・書き換えができるROM、例えばEEPROM(Electrically Erasable Programmable Read Only Memoryの略)に一つまたは複数のアプリケーションを実装する。前記EEPROMにアプリケーションを実装することで、利用者は好みに応じて複数のアプリケーションをICカードに搭載でき、ICカード製造後のアプリケーションの追加や不必要なアプリケーションの削除も行なえ、かつアプリケーションの機能拡充も容易になる。   As described above, the multi-application type IC card is an IC card capable of mounting a plurality of applications, and a multi-application operating system (hereinafter referred to as an OS) that performs basic processing on a ROM provided in the IC chip. One or a plurality of applications are mounted on an electrically erasable / rewritable ROM, such as an EEPROM (abbreviation of Electrically Erasable Programmable Read Only Memory), which is also included in the IC chip. By installing applications in the EEPROM, users can install multiple applications on their IC cards according to their preferences, add applications after IC card manufacture, delete unnecessary applications, and expand application functions. Will also be easier.

EEPROMに書込まれるアプリケーションには、アプリケーションで利用するクレジット番号等のカード番号、カード所持者の氏名等の個人情報が含まれることが多い。当然のことながら、ICカードの発行処理すなわちアプリケーションをEEPROMに実装する処理においては、前記個人情報が外部に漏洩することは防がねばならず、ICカードを発行する発行システムは、通常、高いセキュリティ管理がなされた特別な環境内に設置されている。   An application written in the EEPROM often includes personal information such as a card number such as a credit number used in the application and the name of the card holder. Of course, in the process of issuing an IC card, that is, the process of mounting an application in an EEPROM, it is necessary to prevent the personal information from leaking to the outside. An issuing system that issues an IC card usually has high security. It is installed in a specially managed environment.

しかし、常に高いセキュリティ環境内に発行システムを設置することは現実的に難しく、この問題を解決するために他人の出願に係る特許文献1においては、ICカードを発行する際、ICカードに書込むデータを暗号化してICカードに伝送し、ICカード内部で復号化することによって、ICカードに書込むデータの内容そのものが外部に漏洩しない発行システムを開示している。
特開平1−81084号公報
However, it is practically difficult to install an issuance system in a high security environment at all times. In order to solve this problem, in Patent Document 1 related to another person's application, when an IC card is issued, the IC card is written. An issuance system is disclosed in which data is encrypted, transmitted to an IC card, and decrypted inside the IC card, so that the content of data written to the IC card itself is not leaked to the outside.
JP-A-1-81084

ただし前述の従来の手法においては、以下に述べるような解決すべき課題も残っている。
第1の解決すべき課題は、暗号データの復号化に時間を要する点である。プラスチックカードに埋め込まれる都合上、ICカード用ICチップは非常に薄くかつ小さいICチップであるため、ICカード用ICチップの演算速度には限界がある。例えばマルチアプリケーションICカードに搭載するアプリケーションは、アプリケーションの種類によっても異なるが、アプリケーションのデータサイズは数キロバイトから数十キロバイトにも及ぶため、データをすべて復号化する処理時間が問題になる。ICカード製造会社等の大量にICカードを発行し、かつ高いセキュリティを有する環境を備えているような会社においては、ICカードに書込むデータを暗号化しなくとも、ICカードに書込むデータが解読されにくく、かつ処理速度が速い発行システムが望まれている。
However, the above-described conventional method still has problems to be solved as described below.
The first problem to be solved is that it takes time to decrypt the encrypted data. Since the IC chip for the IC card is a very thin and small IC chip for the purpose of being embedded in the plastic card, the calculation speed of the IC chip for the IC card is limited. For example, the application mounted on the multi-application IC card varies depending on the type of application, but the data size of the application ranges from several kilobytes to several tens of kilobytes, so that the processing time for decoding all data becomes a problem. In companies that issue IC cards in large quantities, such as IC card manufacturers, and have a high security environment, the data to be written to the IC card can be decrypted without encrypting the data to be written to the IC card. There is a need for an issuance system that is difficult to perform and has a high processing speed.

また第2の解決すべき課題は、特許文献1においては発行システムからICカードに伝送するデータを暗号化しているが、暗号を解読しようとする暗号解読者が、前記暗号化されたデータとともにカード利用者氏名、カード番号等のカード表面に印字されるデータから暗号化されていないデータ(以下、平文と記す)の一部を入手した場合、前記暗号化されたデータと平文を対応させることが容易な点である。前記暗号化されたデータと平文の一部を複数入手し、それぞれ対応させることができるならば、それは前記暗号解読者が暗号に対する攻撃をしやすくなることを意味する。よって、発行システムからICカードに伝送するデータが暗号化されている場合においても、暗号解読に対する耐タンパー性を向上させる余地がある。   The second problem to be solved is that in Patent Document 1, the data transmitted from the issuing system to the IC card is encrypted. However, the decryptor who wants to decrypt the cipher is connected to the card together with the encrypted data. When a part of unencrypted data (hereinafter referred to as plaintext) is obtained from data printed on the card surface such as the user name and card number, the encrypted data can be associated with plaintext. Easy point. If a plurality of encrypted data and a part of plaintext can be obtained and corresponded to each other, this means that it becomes easy for the decryptor to attack the cipher. Therefore, even when data transmitted from the issuing system to the IC card is encrypted, there is room for improving tamper resistance against decryption.

本発明は前述の2つの課題を鑑みて、ICカードに伝送するデータを暗号化しなくてもICカードに書き込むデータの中身が解読されにくく、かつICカードに伝送するデータが暗号化されている場合は暗号解読に対してより高い耐タンパー性を有するICカード発行方法およびICカード用プログラムを提供することを目的とする。   In the present invention, in view of the above two problems, the content of data to be written to the IC card is difficult to be decrypted without encrypting the data to be transmitted to the IC card, and the data to be transmitted to the IC card is encrypted. An object of the present invention is to provide an IC card issuing method and an IC card program having higher tamper resistance against decryption.

前述の課題を解決するために第1の発明は、ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書き込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、前記ICカードは受信した前記データブロックをICカードに内蔵しているメモリに書きこむICカード発行方法であって、本発明の方法は、前記ICカードが前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記ICカードが前記送信順序データを前記ICカード発行システムに送信するステップと、前記ICカード発行システムが前記送信順序データに従い前記データブロックを送信するステップと、前記ICカードは送信された前記データブロックを前記送信順序データに基き前記メモリの一部の領域に書きこむステップを順に実行する手順を含むことから成るICカード発行方法である。第1の発明によれば、ICカードへ送信される前記データブロックの送信順序が先頭の前記データブロックから順に送信されないため、万が一、ICカードへ送信されるデータブロックを盗み見されたとしても、盗み見されたデータブロックからICカードに書込まれる発行データすべてを復元することは困難になる。   In order to solve the above-mentioned problem, the first invention is that a plurality of pieces of issue data to be written to one IC card stored in a data storage means provided in the IC card issue system are smaller than the data size of the issue data. An IC card issuance method in which data blocks are divided and transmitted to an IC card, and the IC card writes the received data blocks to a memory built in the IC card. The method of the present invention includes the IC card Calculating transmission order data indicating the transmission order of the data blocks transmitted from the IC card issuing system, the IC card transmitting the transmission order data to the IC card issuing system, and the IC card An issuing system transmitting the data blocks according to the transmission order data; and the IC Over de is an IC card issuing method consists in comprising the steps of performing the step of writing in a partial area of the memory based the data block sent to the transmission order data to the order. According to the first invention, since the transmission order of the data blocks transmitted to the IC card is not transmitted in order from the first data block, even if the data block transmitted to the IC card is stolen, It is difficult to restore all the issued data written to the IC card from the data block that has been written.

第2の発明は、前記送信順序データの演算は乱数を使用する演算方法であることを特徴とする第1の発明に記載のICカード発行方法である。前記送信順序データの演算に乱数を用いることで、ICカードへ送信される前記データブロックの送信順序がランダムになる。   A second invention is the IC card issuing method according to the first invention, wherein the calculation of the transmission order data is a calculation method using a random number. By using random numbers for the calculation of the transmission order data, the transmission order of the data blocks transmitted to the IC card becomes random.

第3の発明は、前記ICカード発行システムから送信されるデータブロックは暗号化されたデータであって、前記メモリに書込まれるデータは前記暗号化されたデータブロックを前記ICカード内部で復号化したデータであることを特徴とした第1の発明または第2の発明に記載のICカード発行方法である。ICカードへ送信されるデータが暗号化されていることで、ICカードに送信されるデータから発行データを復元することは困難になり、かつデータブロックの送信順序がICカード毎に異なることで、たとえ平文の一部が入手されたとしても、前記暗号化されたデータと前記平文の一部を対応させることが困難になり、前記暗号化されたデータの解読に対する耐タンパー性が向上する。   According to a third aspect of the present invention, the data block transmitted from the IC card issuing system is encrypted data, and the data written to the memory is decrypted in the IC card. The IC card issuance method according to the first invention or the second invention, wherein the IC card issuance data. Since the data transmitted to the IC card is encrypted, it becomes difficult to restore the issued data from the data transmitted to the IC card, and the transmission order of the data blocks is different for each IC card. Even if a part of the plaintext is obtained, it becomes difficult to associate the encrypted data with a part of the plaintext, and the tamper resistance against the decryption of the encrypted data is improved.

前記課題を解決するために第4の発明は、ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、送信された前記データブロックをICカードに内蔵しているメモリに書きこむICカード用プログラムであって、本発明のプログラムは、前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記送信順序データを前記ICカード発行システムに送信するステップと、前記ICカード発行システムから前記送信順序データに従い送信される前記データブロックを受信するステップと、前記送信順序データに基き前記メモリの一部の領域に受信した前記データブロックを書きこむステップを順に実行する手順を含むことから成るICカード用プログラムである。第4の発明のプログラムをICカードに実装することで、請求項1または請求項2に記載のICカード発行方法を実現できる。   In order to solve the above-described problem, a fourth aspect of the present invention provides a plurality of issuance data to be written to a single IC card stored in a data storage means included in an IC card issuance system. An IC card program that divides data blocks and transmits them to an IC card, and writes the transmitted data blocks to a memory built in the IC card. The program of the present invention is provided by the IC card issuing system. A step of calculating transmission order data indicating a transmission order of the data blocks to be transmitted, a step of transmitting the transmission order data to the IC card issuing system, and a transmission from the IC card issuing system according to the transmission order data Receiving the data block; and in the memory based on the transmission order data. The step of writing said data blocks received in the area of the part which is a program for an IC card which comprises including a procedure executed in sequence. By mounting the program of the fourth invention on an IC card, the IC card issuing method according to claim 1 or claim 2 can be realized.

前記課題を解決するために第5の発明は、ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、送信された前記データブロックをICカードに内蔵しているメモリに書きこむICカード用プログラムであって、本発明のプログラムは、前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記送信順序データを暗号化するかもしくは暗号化せずに前記ICカード発行システムに送信するステップと、前記ICカード発行システムから前記送信順序データに従い送信される暗号化された前記データブロックを受信するステップと、前記暗号化されたデータブロックを復号化するステップと、前記送信順序データに基き前記メモリの一部の領域に前記復号化したデータブロックを書きこむステップを順に実行する手順を含むことから成るICカード用プログラムである。第5の発明のプログラムを前記ICカードに実装することで、第3の発明に記載のICカード発行方法を実現できる。   In order to solve the above-mentioned problem, a fifth aspect of the invention provides a plurality of issuance data written to a single IC card stored in a data storage means included in an IC card issuance system, wherein the issuance data is smaller than the data size of the issuance data. An IC card program that divides data blocks and transmits them to an IC card, and writes the transmitted data blocks to a memory built in the IC card. The program of the present invention is provided by the IC card issuing system. Calculating transmission order data indicating the transmission order of the data blocks to be transmitted; transmitting the transmission order data to the IC card issuing system with or without encryption; and issuing the IC card A step of receiving the encrypted data block transmitted from the system according to the transmission order data. And a step of decrypting the encrypted data block and a step of sequentially writing the decrypted data block to a partial area of the memory based on the transmission order data. This is an IC card program. By mounting the program of the fifth invention on the IC card, the IC card issuing method described in the third invention can be realized.

第6の発明は、第4または第5の発明に記載のICカード用プログラムを記録したこと特徴とするICカードである。前記ICカードとは、接触型ICカード、非接触型ICカードおよび接触インターフェースと非接触インターフェースの両方のインターフェースを備えたデュアルインターフェースICカードを意味する。加えて、ICチップが内蔵されている近辺を短冊形に切り取ったSIM(Subscriber Identity Module)も含む。   A sixth invention is an IC card in which the IC card program according to the fourth or fifth invention is recorded. The IC card means a contact type IC card, a non-contact type IC card, and a dual interface IC card having both a contact interface and a non-contact interface. In addition, it includes a SIM (Subscriber Identity Module) in which the vicinity of the IC chip is cut into a strip shape.

上記に述べた本発明によれば、第1の効果は、ICカードに送信する前記データブロックの送信順序はICカード毎に異なるため、前記データブロックを盗み見されたとしても、盗み見された前記データブロックからICカードに書き込まれる発行データそのものを復元することが困難なICカード発行方法を提供でき、加えて第2の効果は、ICカードに送信されるデータが暗号化されている場合には、暗号解読に対してより高いタンパー性を有するICカード発行方法を提供できる。   According to the present invention described above, the first effect is that the transmission order of the data blocks to be transmitted to the IC card is different for each IC card. Therefore, even if the data block is stolen, the stolen data It is possible to provide an IC card issuance method in which it is difficult to restore the issuance data itself written from the block to the IC card. In addition, the second effect is that when data transmitted to the IC card is encrypted, It is possible to provide an IC card issuance method having higher tampering properties for decryption.

マルチアプリケーション型ICカードの発行処理、すわなちマルチアプリケーション型ICカードが具備するメモリにアプリケーションを書き込む処理に本発明を適用した実施の形態を、以下に図を参照にしながら詳細に説明する。まず初めに発行システムおよびマルチアプリケーション型ICカードについて説明し、つづいてICカードの発行方法の手順について説明し、つづいて前記ICカードに搭載するプログラムの動作手順について説明し、最後にICカードに送信されるデータが暗号化されている場合の処理について説明する。   An embodiment in which the present invention is applied to a process for issuing a multi-application IC card, that is, a process for writing an application in a memory included in the multi-application IC card will be described in detail below with reference to the drawings. First, the issue system and multi-application IC card will be explained, followed by the procedure of the IC card issuance method, followed by the operation procedure of the program mounted on the IC card, and finally the transmission to the IC card Processing when the data to be encrypted is encrypted will be described.

<発行システムおよびマルチアプリケーションICカードの説明>
図1は発行システム100の概略図である。発行システム100は、ICカード200とデータ通信しICカード200が具備する書換え可能なメモリにデータを書き込むシステムである。発行システム100には、ICカード200に書込むデータを記憶する記憶装置110、ICカード200に書込むデータを基にICカード200に送信するAPDU(Application Protocol Data Unitの略)を生成するAPDU生成装置120、前記APDUに含まれるデータの一部またはデータすべてをDES(Data Encryption Standardの略)を用いて暗号化する暗号装置130、ICカード200とデータ通信しデータの読み書きを行なうリーダライタ140を少なくとも備えている。なお図1のICカード200は、マルチアプリケーション型ICカードである。
<Description of issuing system and multi-application IC card>
FIG. 1 is a schematic diagram of an issuing system 100. The issuing system 100 is a system that performs data communication with the IC card 200 and writes data to a rewritable memory included in the IC card 200. The issuing system 100 includes a storage device 110 that stores data to be written to the IC card 200, and an APDU generation that generates an APDU (abbreviation of Application Protocol Data Unit) to be transmitted to the IC card 200 based on the data to be written to the IC card 200. An apparatus 120, an encryption apparatus 130 that encrypts part or all of the data included in the APDU using DES (abbreviation of Data Encryption Standard), and a reader / writer 140 that performs data communication with the IC card 200 and reads / writes data At least. The IC card 200 in FIG. 1 is a multi-application IC card.

なお、本実施の形態においては、ICカード200をマルチアプリケーション型ICカードとしているが、本発明は何らICカード200のOS種類に依存するものではない。一つのデータを複数のデータブロックに分割してICカードに送信する場合であれば、例えば単一のアプリケーションを読み出し専用メモリに記録した専用OSにおける発行処理にも適用できるし、データファイルの集合を1つのアプリケーションとしてICカード200内部の書換え可能メモリに記録するファイル型アプリケーションの発行処理にも適用できる。   In this embodiment, the IC card 200 is a multi-application IC card, but the present invention does not depend on the OS type of the IC card 200 at all. If one data is divided into a plurality of data blocks and transmitted to the IC card, for example, it can be applied to issue processing in a dedicated OS in which a single application is recorded in a read-only memory. The present invention can also be applied to file-type application issuance processing that is recorded in a rewritable memory inside the IC card 200 as one application.

図2は、本実施の形態で用いるマルチアプリケーション型ICカードの階層モデル300である。図1に示すように、一般的にマルチアプリケーション型ICカードの階層モデル300は、ICチップ310、マルチアプリケーションOS320およびアプリケーション330の3階層構造である。   FIG. 2 shows a hierarchical model 300 of a multi-application IC card used in this embodiment. As shown in FIG. 1, the hierarchical model 300 of a multi-application IC card generally has a three-layer structure of an IC chip 310, a multi-application OS 320, and an application 330.

図3はICチップ310の構成図である。ICチップ310には、演算機能およびICチップ310が具備するデバイスを制御する機能を備えた中央演算装置311(Central Processing Unit、以下CPUと記す)、読み出し専用メモリ312(Read Only Memory、以下ROMと記す)、書換え可能なメモリとしてEEPROM313(Electrically Erasable Programmable Read-Only Memoryの略)、揮発性メモリとしてランダムアクセスメモリ314(Random Access Memory、以下RAMと記す)、乱数を生成する乱数生成回路315、DESの演算を行う暗号演算回路316およびリーダライタ140とデータ通信するためのI/O回路317を少なくとも備なえている。本発明は、ICチップ310の仕様をなんら限定するものではなく、ICカード200の用途に適した仕様のICチップ310を選択することができる。例えばROM312およびEEPROM313の容量については限定しないし、書換え可能なメモリは強誘電体メモリまたはフラッシュメモリ等のEEPROM以外のメモリであっても構わない。またICチップ310はタイマー回路、コプロセッサ回路等の図示していない他のデバイスを備えていても構わない。   FIG. 3 is a configuration diagram of the IC chip 310. The IC chip 310 includes a central processing unit 311 (Central Processing Unit, hereinafter referred to as CPU) having a calculation function and a function of controlling devices included in the IC chip 310, a read only memory 312 (Read Only Memory, hereinafter referred to as ROM). EEPROM 313 (Electrically Erasable Programmable Read-Only Memory) as rewritable memory, random access memory 314 (Random Access Memory, hereinafter referred to as RAM) as volatile memory, random number generation circuit 315 for generating random numbers, DES And at least an I / O circuit 317 for data communication with the reader / writer 140. The present invention does not limit the specifications of the IC chip 310 at all, and an IC chip 310 having specifications suitable for the application of the IC card 200 can be selected. For example, the capacities of the ROM 312 and the EEPROM 313 are not limited, and the rewritable memory may be a memory other than the EEPROM such as a ferroelectric memory or a flash memory. The IC chip 310 may include other devices (not shown) such as a timer circuit and a coprocessor circuit.

マルチアプリケーションOS320は、アプリケーション330をEEPROM313に書込む機能、EEPROM313に搭載したアプリケーション330の削除機能、ならびにI/O回路317を制御しリーダライタ140とデータ通信する機能等のICカード200が動作するために必要な基本機能を備えたプログラムで、ROM312に実装される。   The multi-application OS 320 operates because the IC card 200 operates such as a function for writing the application 330 to the EEPROM 313, a function for deleting the application 330 mounted on the EEPROM 313, and a function for controlling the I / O circuit 317 and performing data communication with the reader / writer 140. The program having the basic functions necessary for the above is installed in the ROM 312.

アプリケーション330はある用途ために設計されたプログラムであり、マルチアプリケーションOS320が対応している中間言語で記述された一つのデータのかたまり(以下、アプリケーションデータと記す)である。ICチップ310が具備するEEPROM313には、利用者が必要とする一つまたは複数のアプリケーションデータが書き込まれる。アプリケーションデータの容量は、アプリケーション330の種類によって異なるが数キロバイトから数十キロバイトになる。   The application 330 is a program designed for a certain use, and is a piece of data (hereinafter referred to as application data) described in an intermediate language supported by the multi-application OS 320. One or more application data required by the user is written in the EEPROM 313 included in the IC chip 310. The capacity of application data varies from several kilobytes to several tens of kilobytes depending on the type of application 330.

<アプリケーション発行手順の詳細な説明>
ここから、ICカード200が具備するEEPROM313にアプリケーションデータを書き込む処理、すなわちアプリケーション330の発行処理の詳細な手順について、本発明を適用した実施の形態を図を参照しながら詳細に説明する。なお上述した通り、アプリケーションデータをEEPROM313に書き込む機能は、マルチアプリケーションOS320の機能である。
<Detailed description of application issuance procedure>
From here, a detailed procedure of processing for writing application data in the EEPROM 313 included in the IC card 200, that is, a detailed procedure for issuing processing of the application 330 will be described in detail with reference to the drawings. As described above, the function of writing application data to the EEPROM 313 is a function of the multi-application OS 320.

図4は、本実施の形態におけるICカード発行手順の概要を説明するための図である。図4(a)はICカード発行前の状態を説明するための図である。発行システム100の記憶装置110には少なくとも一つのアプリケーションデータ400が記憶され、ICカード200のEEPROM313領域にはアプリケーションデータ400を書き込むためのアプリケーション領域500が設定される。前述した通り、アプリケーションデータ400のデータサイズは数キロバイトから数十キロバイトになるため、ICカード200は一度にアプリケーションデータすべてを受信できず、発行システム100は記憶装置110に記憶しているアプリケーションデータ400をアプリケーションデータ400のサイズよりも小さいサイズのデータブロック410に分割してICカード200に送信する。図4(a)においては説明を分かり易くするために、アプリケーションデータ400をデータブロック1からデータブロック4までの4つのデータブロック410に分割している。   FIG. 4 is a diagram for explaining the outline of the IC card issuing procedure in the present embodiment. FIG. 4A is a diagram for explaining a state before the IC card issuance. At least one application data 400 is stored in the storage device 110 of the issuing system 100, and an application area 500 for writing the application data 400 is set in the EEPROM 313 area of the IC card 200. As described above, since the data size of the application data 400 is several kilobytes to several tens of kilobytes, the IC card 200 cannot receive all the application data at one time, and the issuing system 100 stores the application data 400 stored in the storage device 110. Is divided into data blocks 410 having a size smaller than that of the application data 400 and transmitted to the IC card 200. In FIG. 4A, the application data 400 is divided into four data blocks 410 from data block 1 to data block 4 for easy understanding.

本発明を適用していないICカード発行方法においては、データブロック410をデータブロック1からデータブロック4までを順通りにICカード200に送信し、ICカード200は受信したデータブロック410をEEPROM313領域の先頭から書込む。この際、特許文献1で開示されている発明に記載されているように、発行システム100から送信されるデータブロック410は暗号化されたデータである場合もある。   In the IC card issuing method to which the present invention is not applied, the data block 410 is transmitted from the data block 1 to the data block 4 to the IC card 200 in order, and the IC card 200 transmits the received data block 410 to the EEPROM 313 area. Write from the beginning. At this time, as described in the invention disclosed in Patent Document 1, the data block 410 transmitted from the issuing system 100 may be encrypted data.

これに対して本発明を適用したICカード発行方法は、図4(a)から図4(e)に示したように、ICカード200へ送信するデータブロック410の送信順序は不規則である。図4(a)に記載しているように、ICカード発行開始時には発行システム100からICカード200にアプリケーション発行情報が送信され、ICカード200はICカード200内部でデータブロック410の送信順序を示す送信順序データを前記アプリケーション発行情報に基き演算し、演算した送信順序データをRAM314に記憶すると共に発行システム100へ送信する。図4(a)においては、前記送信順序はデータブロック4、データブロック3、データブロック1そしてデータブロック2の順で、前記送信順序データは〔04、03、01、02〕である。発行システム100は記憶装置110に記憶しているデータブロック410を受信した送信順序データに従いICカード200に送信する。図4(b)に図示したように、発行システム100からICカード300に最初に送信するデータブロックはデータブロック4で、ICカード200はデータブロック4をRAM314に記憶している送信順序データに従いアプリケーション領域500内の所定に位置に書き込み、発行システム100から次のデータブロック3を受信する。   On the other hand, in the IC card issuance method to which the present invention is applied, as shown in FIGS. 4A to 4E, the transmission order of the data blocks 410 transmitted to the IC card 200 is irregular. As shown in FIG. 4A, when the IC card issuance is started, application issuance information is transmitted from the issuance system 100 to the IC card 200. The IC card 200 indicates the transmission order of the data blocks 410 inside the IC card 200. The transmission order data is calculated based on the application issue information, and the calculated transmission order data is stored in the RAM 314 and transmitted to the issuing system 100. In FIG. 4A, the transmission order is data block 4, data block 3, data block 1, and data block 2, and the transmission order data is [04, 03, 01, 02]. The issuing system 100 transmits the data block 410 stored in the storage device 110 to the IC card 200 according to the received transmission order data. As shown in FIG. 4B, the first data block to be transmitted from the issuing system 100 to the IC card 300 is the data block 4, and the IC card 200 has the application according to the transmission order data stored in the RAM 314. A predetermined position in the area 500 is written and the next data block 3 is received from the issuing system 100.

図4(b)から図4(e)にそれぞれ図示したように、本実施の形態においては、発行システム100からICカード200に送信されるデータブロックの送信順序は、先頭のデータブロック1から順番通りに送信する送信順序ではなく、図4(a)に記載しているようにICカード200で演算された送信順序であり、発行システム100はICカード200から送信された送信順序データに従いデータブロック4、データブロック3、データブロック1そしてデータブロック2の順に送信する。   As shown in FIGS. 4B to 4E, in the present embodiment, the transmission order of the data blocks transmitted from the issuing system 100 to the IC card 200 is the order from the top data block 1. The transmission order calculated by the IC card 200 as described in FIG. 4A is used instead of the transmission order transmitted in the street, and the issuing system 100 performs data block according to the transmission order data transmitted from the IC card 200. 4. Data block 3, data block 1 and data block 2 are transmitted in this order.

ここから、本発明を適用したICカード発行方法のより詳細な手順について、図を参照しながら説明する。図5はICカード発行方法の手順を示した流れ図である。   From here, a more detailed procedure of the IC card issuing method to which the present invention is applied will be described with reference to the drawings. FIG. 5 is a flowchart showing the procedure of the IC card issuing method.

最初のステップは、発行システム100がデータブロックの大きさすなわちデータブロックサイズを決定するステップである(ステップS100)。前記データブロックサイズは、リーダライタ140に記憶されているICカード200が一度に受信できる最大受信データ長と、リーダライタ140が一度にICカード200へ送信できる最大送信データ長を比較し、どちらか小さいデータ長を選択する。例えば、ICカード200が受信できる最大データ長が128バイトであり、リーダライタ140がICカード200に送信できる最大データ長が256バイトであるならば、データブロックサイズは128バイトに決定される。データブロックサイズの決定方法は、発行システム100とICカード200の間でデータブロックのデータ通信が正常にできれば、上述の方法ではなくてもよい。データブロックサイズを決定した後、次のステップへ進む。   The first step is a step in which the issuing system 100 determines the size of the data block, that is, the data block size (step S100). The data block size is obtained by comparing the maximum received data length that can be received at one time by the IC card 200 stored in the reader / writer 140 with the maximum transmission data length that the reader / writer 140 can transmit to the IC card 200 at one time. Select a smaller data length. For example, if the maximum data length that can be received by the IC card 200 is 128 bytes and the maximum data length that the reader / writer 140 can transmit to the IC card 200 is 256 bytes, the data block size is determined to be 128 bytes. The data block size determination method may not be the above-described method as long as data communication of the data block can be normally performed between the issuing system 100 and the IC card 200. After determining the data block size, proceed to the next step.

次のステップは、アプリケーションデータサイズとデータブロックサイズから、発行システム100がICカード200へ送信するデータブロックの数(以下、データブロック数と記す)を計算するステップ(ステップS110)である。データブロック数は、アプリケーションデータサイズをデータブロックサイズで割り算し、余りが生じない場合は商がデータブロック数となり、余りが発生する場合は商に1を加算した値がデータブロック数となる。   The next step is a step of calculating the number of data blocks (hereinafter referred to as the number of data blocks) transmitted from the issuing system 100 to the IC card 200 from the application data size and the data block size (step S110). The number of data blocks is obtained by dividing the application data size by the data block size. If there is no remainder, the quotient is the number of data blocks. If the remainder is generated, the value obtained by adding 1 to the quotient is the number of data blocks.

次のステップは、発行システム100が、アプリケーションデータサイズ、データブロックサイズおよびデータブロック数をICカード200に送信するステップ(ステップS120)である。ICカード発行開始時に発行システム100からICカード200へ送信されるアプリケーション発行開始コマンドにはアプリケーション発行情報が含まれ、前記アプリケーション発行情報には前記3つのデータが少なくとも含まれている。発行システム100が、前記3つのデータを送信した後、次のステップへ進む。   The next step is a step in which the issuing system 100 transmits the application data size, data block size, and number of data blocks to the IC card 200 (step S120). The application issuance start command transmitted from the issuance system 100 to the IC card 200 when the IC card issuance is started includes application issuance information, and the application issuance information includes at least the three data. After the issuing system 100 transmits the three data, the issuing system 100 proceeds to the next step.

次のステップは、ICカード200が前記アプリケーション発行開始コマンドを受信し、前記コマンドのアプリケーション発行情報からアプリケーションサイズ、データブロックサイズおよびデータブロック数を取得し、RAM314にそれぞれ記憶するステップ(ステップS121)である。前記3つのデータを取得した後、次のステップへ進む。   In the next step, the IC card 200 receives the application issuance start command, acquires the application size, data block size, and number of data blocks from the application issuance information of the command, and stores them in the RAM 314 (step S121). is there. After acquiring the three data, the process proceeds to the next step.

次のステップは、ICカード200が取得したアプリケーションデータサイズと同じサイズのアプリケーション領域をEEPROM313に設定するステップ(ステップS130)である。前記アプリケーション領域は、発行システム100から送信されるデータブロックを書込む領域で、前記アプリケーション領域の先頭アドレスはEEPROM313のマルチアプリケーションOS320が使用できる領域に記録される。ICカード200は、前記アプリケーションサイズと同じサイズのアプリケーション領域をEEPROM313に設定できない場合は、発行システム100に発行不可能であるメッセージを送信し、ICカード発行処理を中止する。EEPROM313に前記アプリケーション領域が設定できた場合は、次のステップへ進む。   The next step is a step of setting an application area having the same size as the application data size acquired by the IC card 200 in the EEPROM 313 (step S130). The application area is an area in which a data block transmitted from the issuing system 100 is written, and the start address of the application area is recorded in an area that can be used by the multi-application OS 320 of the EEPROM 313. If the application area having the same size as the application size cannot be set in the EEPROM 313, the IC card 200 transmits a message that cannot be issued to the issuing system 100 and stops the IC card issuing process. If the application area can be set in the EEPROM 313, the process proceeds to the next step.

次のステップは、ICカード200は受信したデータブロック数からデータブロックの送信順序を示すデータブロックテーブルを生成するステップ(ステップS140)である。前記データブロックテーブルとは、発行システム100が送信するデータブロックの送信順序を定めるデータで、詳しくはデータブロック番号が不規則に並べられた順列である。前記データブロック番号とは、アプリケーションデータを複数のデータブロックサイズに分割する際、先頭のデータブロックから順に最終データブロックまでをそれぞれ区別するための番号である。例えば、データブロック番号が3のデータブロックとは、アプリケーションデータの先頭から3番目のデータブロックを意味する。ICカード200は、RAM314に記憶されたデータブロック数に基いて、1から前記データブロック数までのデータブロック番号を並び順が不規則になるように演算処理を実行し、演算した不規則なデータブロック番号の順列をRAM314内に展開することで、前記データブロックテーブルを生成する。前記データブロックテーブルの生成手順の一例については、後に記述する。データブロックテーブル生成後、受信したデータブロックの数を示す受信ブロックレジスタもRAM314領域に設け、次のステップへ進む。なお前記受信ブロックレジスタの初期値は00h(hは16進表記を表す)である。   The next step is a step (step S140) in which the IC card 200 generates a data block table indicating the transmission order of the data blocks from the number of received data blocks. The data block table is data that determines the transmission order of data blocks transmitted by the issuing system 100. Specifically, the data block table is a permutation in which data block numbers are irregularly arranged. The data block number is a number for distinguishing each of the first data block to the last data block in order when the application data is divided into a plurality of data block sizes. For example, the data block with the data block number 3 means the third data block from the top of the application data. Based on the number of data blocks stored in the RAM 314, the IC card 200 executes arithmetic processing so that the data block numbers from 1 to the number of data blocks are arranged in an irregular order, and the calculated irregular data The data block table is generated by expanding a permutation of block numbers in the RAM 314. An example of the data block table generation procedure will be described later. After the data block table is generated, a reception block register indicating the number of received data blocks is also provided in the RAM 314 area, and the process proceeds to the next step. The initial value of the reception block register is 00h (h represents hexadecimal notation).

次のステップは、ICカード200が生成した前記データブロックテーブルを発行システム100に送信するステップ(ステップS150)である。前記データブロックテーブルは、前記アプリケーション発行開始コマンドのレスポンスとして、ICカード200から発行システム100に送信される。   The next step is a step of transmitting the data block table generated by the IC card 200 to the issuing system 100 (step S150). The data block table is transmitted from the IC card 200 to the issuing system 100 as a response to the application issue start command.

次のステップは、発行システム100がICカード200から送信された前記データブロックテーブルを受信するステップ(ステップS151)である。発行システム100は前記データブロックを受信すると、受信したデータブロックテーブルを記憶装置110に記憶し、次のステップへ進む。   The next step is a step in which the issuing system 100 receives the data block table transmitted from the IC card 200 (step S151). When the issuing system 100 receives the data block, it stores the received data block table in the storage device 110 and proceeds to the next step.

次のステップは、発行システム100が、記憶したデータブロックテーブルに記録されている不規則なデータブロック番号の順列に従い、一つのデータブロックをICカード200へ送信するステップ(ステップS160)である。例えば、図4においては前記データブロックテーブルに記録されているデータブロック番号の順列は〔04h、03h、01h、02h〕であり、発行システム100はアプリケーションデータの先頭から4番目のデータブロックのみを最初にICカード200に送信する。   The next step is a step in which the issuing system 100 transmits one data block to the IC card 200 in accordance with the permutation of irregular data block numbers recorded in the stored data block table (step S160). For example, in FIG. 4, the permutation of the data block numbers recorded in the data block table is [04h, 03h, 01h, 02h], and the issuing system 100 starts with only the fourth data block from the beginning of application data. To the IC card 200.

次のステップは、ICカード200が、発行システム100から送信されたデータブロックを受信するステップ(ステップS161)である。ICカード200は、発行システム100からデータブロックを受信すると、データブロックテーブルから受信したデータブロックに対応するデータブロック番号を取得する。この動作は、データブロックテーブルの記憶開始アドレスに受信ブロックレジスタの値を加算したアドレスに記録されているデータブロック番号を取得することで実現できる。データブロック番号取得後、次のステップへ進む。   The next step is a step in which the IC card 200 receives the data block transmitted from the issuing system 100 (step S161). When receiving the data block from the issuing system 100, the IC card 200 acquires a data block number corresponding to the received data block from the data block table. This operation can be realized by acquiring the data block number recorded at the address obtained by adding the value of the reception block register to the storage start address of the data block table. After obtaining the data block number, proceed to the next step.

次のステップでは、取得したデータブロック番号に基きアプリケーション領域の所定のアドレスに受信したデータブロックを書き込むステップ(ステップS170)である。例えば、図4において、最初に受信するデータブロックのデータブロック番号は04であり、最初のデータブロックを受信すると、アプリケーション領域の先頭から4番目のデータブロックの位置に受信したデータブロックを書込む。データブロック番号からデータブロック番号を書込む開始アドレスを計算する式は(1)式で計算できる。
アプリケーションデータの記憶開始アドレス+(データブロック番号−1)×データブロックサイズ ・・・・・・・(1)
受信したデータブロックを書込み終了した後は、受信ブロックレジスタを+1加算し、次のステップへ進む。
In the next step, the received data block is written to a predetermined address in the application area based on the acquired data block number (step S170). For example, in FIG. 4, the data block number of the data block received first is 04, and when the first data block is received, the received data block is written at the position of the fourth data block from the beginning of the application area. The equation for calculating the start address for writing the data block number from the data block number can be calculated by equation (1).
Application data storage start address + (data block number -1) x data block size (1)
After the received data block has been written, the reception block register is incremented by 1, and the process proceeds to the next step.

次のステップでは、受信したデータブロックが発行システム100から最後に送信される最終のデータブロックであるか確認するステップ(ステップS180)である。確認作業は、RAM314に記憶されている受信ブロックレジスタの値とデータブロック数とを比較することで行ない、値が一致していれば受信したデータブロックは最終のデータブロックと判断し、最終のデータブロックを書込み終了であるメッセージを発行システムに送信した後、発行処理を終了し(ステップS190)、一致しなければ受信したデータブロックの書込み終了を示すメッセージを発行システム100に送信し、ステップS160に戻り次のデータブロックを受信する。   The next step is a step of confirming whether the received data block is the last data block transmitted last from the issuing system 100 (step S180). The confirmation operation is performed by comparing the value of the reception block register stored in the RAM 314 with the number of data blocks. If the values match, the received data block is determined as the final data block, and the final data After sending a message indicating that the block has been written to the issuing system, the issuing process is terminated (step S190). If there is no match, a message indicating the completion of writing of the received data block is sent to the issuing system 100, and the process proceeds to step S160. Return Receive next data block.

前述のステップS160以降の手順を繰り返すことで、発行システム100はICカード200にすべてのアプリケーションデータを送信し、ICカード200はデータブロックを受信する毎にアプリケーション領域に書き込むことで、アプリケーションデータすべてをアプリケーション領域に書き込むことができる。例えば図4においては、4番目のデータブロックを送信後、ICカード200からデータブロックの書込み終了を示すメッセージを受信すると、発行システム100は、ステップS160以降の手順で先頭から3番目のデータブロック、先頭から1番目のデータブロックそして最後に先頭から2番目のデータブロックを順にICカード200へ送信する。   The issuance system 100 transmits all application data to the IC card 200 by repeating the procedure after step S160 described above, and the IC card 200 writes all the application data in the application area every time it receives a data block. You can write to the application area. For example, in FIG. 4, after transmitting the fourth data block and receiving a message indicating the end of writing of the data block from the IC card 200, the issuing system 100 performs the third data block from the top in the procedure after step S 160. The first data block from the beginning and the second data block from the beginning are transmitted to the IC card 200 in order.

ここで、データブロックテーブルの生成方法の一例について説明する。説明を分かり易くするために、データブロック数は4つにしている。図6はデータブロックテーブルの生成手順の流れ図、図7はデータブロックテーブル内のデータブロック番号を説明するための図である。   Here, an example of a data block table generation method will be described. In order to make the explanation easy to understand, the number of data blocks is four. FIG. 6 is a flowchart of a data block table generation procedure, and FIG. 7 is a diagram for explaining data block numbers in the data block table.

最初のステップでは、1からデータブロック数までのデータブロック番号を連番でRAM314に展開する(ステップS200)。データブロックテーブルの記憶開始アドレス(以下、アドレスSTART_ADDと記す)は、CPU310に備わったレジスタに記憶される。   In the first step, data block numbers from 1 to the number of data blocks are serially expanded in the RAM 314 (step S200). A data block table storage start address (hereinafter referred to as an address START_ADD) is stored in a register provided in the CPU 310.

次のステップでは、乱数生成器315を利用してICカード200は1バイトの乱数を生成する(ステップS210)。次にCPU311に備わっている演算機能にて生成した乱数をデータブロック数で割り算し、余りGを計算する(ステップS220)。余りGを計算した後、CPU311はレジスタに記憶されているSTART_ADDに余りGを加算したアドレスSTART_ADD+Gを演算し、CPU311は、アドレスSTART_ADDに記録されているデータブロック番号と、アドレスSTART_ADD+Gに記録されているデータブロック番号を入れ替える処理を行う(ステップS230)。次のステップでは、CPU311は、データ入れ替え処理をデータブロック数回実行したか確認する(ステップS240)。データの入れ替え処理をデータブロック数回実行した場合はデータブロックテーブルを生成する処理を終了し(ステップS250)、実行していない場合はステップS210に戻る。   In the next step, the IC card 200 generates a 1-byte random number using the random number generator 315 (step S210). Next, the random number generated by the arithmetic function provided in the CPU 311 is divided by the number of data blocks, and the remainder G is calculated (step S220). After calculating the remainder G, the CPU 311 calculates an address START_ADD + G obtained by adding the remainder G to START_ADD stored in the register, and the CPU 311 records the data block number recorded in the address START_ADD and the address START_ADD + G. A process of exchanging data block numbers is performed (step S230). In the next step, the CPU 311 confirms whether or not the data replacement process has been executed several times (step S240). If the data replacement process is executed several times in the number of data blocks, the process for generating the data block table is terminated (step S250), and if not, the process returns to step S210.

図7は、データブロック数が4つの場合に、上述の手順で入れ替え動作を4回行なったときの、データブロックテーブルに記憶されているデータブロック番号を示した図である。図7(a)は入れ替え動作を行なう前のデータブロックテーブル図でる。図7(b)から図7(e)は、それぞれ1回目の入れ替え動作を実行した後のデータブロックテーブル図、2回目の入れ替え動作を実行した後のデータブロックテーブル図、3回目の入れ替え動作を実行した後のデータブロックテーブル図そして4回目の入れ替え動作を実行した後のデータブロックテーブル図である。   FIG. 7 is a diagram showing data block numbers stored in the data block table when the replacement operation is performed four times according to the above procedure when the number of data blocks is four. FIG. 7A is a data block table diagram before the replacement operation. FIG. 7B to FIG. 7E show the data block table diagram after the first replacement operation, the data block table diagram after the second replacement operation, and the third replacement operation, respectively. It is the data block table figure after performing, and the data block table figure after performing the 4th exchange operation.

図7(a)に図示した通り、入れ替え動作を実行する前のデータテーブル600には、RAM314領域のアドレスSTART_ADDを始点として、1から4までのデータブロック番号が連番で展開されている。図7(b)は、1回目のデータ入れ替え処理を行なった後のデータテーブルブロック600に記録されているデータブロック番号を示した図である。1回目に計算された余りGは02hであり、アドレスSTART_ADDに記録されているデータブロック番号すなわち「1」とアドレスSTART_ADD+02hに記録されているデータブロック番号すなわち「3」を入れ替えている。図7(e)は前述の入れ替え動作を4回実行した後のデータブロックテーブル600である。なお図7(c)と図7(d)においては、余りGが00hであるため、アドレスSTART_ADDに記録されているデータブロック番号の入れ替え先がアドレスSTART_ADD+00hになるので、図7(c)に記載のデータブロック600と図7(d)とに記載のデータブロックテーブル600に記録されているデータブロック番号の順列は変更されていない。   As shown in FIG. 7A, in the data table 600 before the replacement operation is executed, data block numbers 1 to 4 are expanded in sequence starting from the address START_ADD in the RAM 314 area. FIG. 7B is a diagram showing the data block numbers recorded in the data table block 600 after the first data replacement process. The remainder G calculated for the first time is 02h, and the data block number recorded at the address START_ADD, ie “1”, is replaced with the data block number recorded at the address START_ADD + 02h, ie “3”. FIG. 7E shows the data block table 600 after the above-described replacement operation is performed four times. In FIG. 7C and FIG. 7D, since the remainder G is 00h, the replacement destination of the data block number recorded in the address START_ADD is the address START_ADD + 00h, which is described in FIG. 7C. The permutation of the data block numbers recorded in the data block 600 and the data block table 600 shown in FIG. 7D is not changed.

また上述の演算手順にて生成する乱数を1バイトにしているのは、通常データブロック数は255個(FFh)以下であるからである。発行システム100から受信したデータブロック数が1バイトの値を超える場合、すなわち255個以上になる場合は、データブロック数に応じて生成する乱数を1バイトより大きくすればよい。   The reason why the random number generated by the above-described calculation procedure is 1 byte is that the number of normal data blocks is 255 (FFh) or less. When the number of data blocks received from the issuing system 100 exceeds the value of 1 byte, that is, when the number is 255 or more, the random number generated according to the number of data blocks may be larger than 1 byte.

<ICカードに実装するプログラムの動作手順の説明>
次にICカード200に実装するプログラムの動作手順について、図を参照しながら説明する。図8は前記プログラムの動作手順の流れ図である。
<Description of the operation procedure of the program mounted on the IC card>
Next, the operation procedure of the program mounted on the IC card 200 will be described with reference to the drawings. FIG. 8 is a flowchart of the operation procedure of the program.

まず最初にICカード200は、発行システム100からアプリケーション発行開始コマンドを受信する(ステップS300)。前記コマンドを受信すると、前記コマンドに含まれるアプリケーションデータサイズと同じサイズのアプリケーション領域をEEPROM313に設定する(ステップS310)。次に同じく前記コマンドに含まれるデータブロック数と同じ個数のデータブロック番号を不規則な並べた順列であるデータブロックテーブルと受信ブロックレジスタをRAM314に生成する(ステップS320)。次に生成したデータブロックテーブルを発行システム100に前記コマンドのレスポンスデータとして送信する(ステップS330)。データブロックテーブルを送信後、ICカード200は発行システム100からデータブロックを受信する(ステップS340)。データブロックを受信すると、データブロックテーブルから受信したデータブロックに対応するデータブロック番号を取得し(ステップS350)、取得したデータブロック番号から受信したデータブロックを書込み開始するEEPROM313のアドレスを算出する(ステップS360)。次に算出したEEPROM313のアドレスから受信したデータブロックを書込み、RAM314に記憶している受信ブロックレジスタの値に+1を加算する(ステップS370)。データブロックを書込んだ後、受信ブロックレジスタの値とデータブロック数を比較する(ステップ380)。それぞれの値が一致していればICカード発行処理を終了し(ステップS390)、一致していない場合はステップS340に戻り、次のデータブロックを受信する。   First, the IC card 200 receives an application issue start command from the issue system 100 (step S300). When the command is received, an application area having the same size as the application data size included in the command is set in the EEPROM 313 (step S310). Next, a data block table and a reception block register which are permutations in which the same number of data block numbers as the number of data blocks included in the command are irregularly arranged are generated in the RAM 314 (step S320). Next, the generated data block table is transmitted to the issuing system 100 as response data of the command (step S330). After transmitting the data block table, the IC card 200 receives the data block from the issuing system 100 (step S340). When the data block is received, the data block number corresponding to the received data block is obtained from the data block table (step S350), and the address of the EEPROM 313 to start writing the received data block is calculated from the obtained data block number (step S350). S360). Next, the data block received from the calculated address of the EEPROM 313 is written, and +1 is added to the value of the reception block register stored in the RAM 314 (step S370). After writing the data block, the value of the reception block register is compared with the number of data blocks (step 380). If the values match, the IC card issuance process is terminated (step S390). If they do not match, the process returns to step S340 to receive the next data block.

<発行システムから送信されるデータが暗号化されている場合について>
これまで、発行システム100から送信されるデータブロックは暗号化されていない場合の実施の形態について説明をした。データブロックが暗号化されている場合の実施の形態について説明する。
<When data sent from the issuing system is encrypted>
So far, the embodiment in the case where the data block transmitted from the issuing system 100 is not encrypted has been described. An embodiment in the case where the data block is encrypted will be described.

発行システム100とICカード200間で伝送されるデータを暗号化する場合は、発行システム100の暗号装置130とICカード200内部にはDESの暗号鍵が機密に記憶される。データを暗号化する際の発行手順は、前述の発行手順に加え、前記暗号鍵を用いた暗号化・復号化のステップが加わる。つまり、発行システム100はデータブロック等のデータをICカード200に送信する際、暗号装置130にてAPDUに含まれるデータブロック等のデータを暗号化する。ICカード200は発行システム100から前記APDUを受信すると、ICカード200内部の暗号回路にて受信したAPDUに含まれる暗号化されたデータを複合化する。具体的には発行手順については、以下に記述する発行システム100とICカード200間で伝送されるデータが暗号化されている場合に、ICカード200に実装するプログラムの動作手順より明らかになる。図9は、発行システム100とICカード200間で伝送されるデータを暗号化する場合に、ICカード200に実装されるプログラム動作の流れ図である。   When data transmitted between the issuing system 100 and the IC card 200 is encrypted, the DES encryption key is stored secretly inside the encryption device 130 and the IC card 200 of the issuing system 100. The issuance procedure for encrypting data includes an encryption / decryption step using the encryption key in addition to the aforementioned issuance procedure. That is, when the issuance system 100 transmits data such as data blocks to the IC card 200, the encryption device 130 encrypts data such as data blocks included in the APDU. When the IC card 200 receives the APDU from the issuing system 100, the IC card 200 decrypts the encrypted data contained in the APDU received by the encryption circuit inside the IC card 200. Specifically, the issuing procedure becomes clear from the operating procedure of the program installed in the IC card 200 when data transmitted between the issuing system 100 and the IC card 200 described below is encrypted. FIG. 9 is a flowchart of a program operation implemented in the IC card 200 when data transmitted between the issuing system 100 and the IC card 200 is encrypted.

まず最初にICカード200は、発行システム100から、アプリケーション発行開始コマンドを受信する(ステップS400)。前記コマンドを受信すると、前記コマンドに含まれる暗号化されたアプリケーション発行情報を復号化する(ステップS401)。前記発行情報に含まれるアプリケーションデータサイズと同じサイズのアプリケーション領域をEEPROM313に設定する(ステップS410)。次に同じく前記発行情報に含まれるデータブロック数と同じ個数のデータブロック番号を不規則な並べた順列であるデータブロックテーブルと受信ブロックレジスタとをRAM314に生成する(ステップS420)。次にICカード200は生成したデータブロックテーブルを暗号回路316を用いて暗号化する(ステップS421)。データブロックテーブルを暗号化した後、ICカード200は、前記暗号化したデータブロックテーブルを発行システム100に前記コマンドのレスポンスデータとして送信する(ステップS430)。暗号化したデータブロックテーブルを送信後、ICカード200は発行システム100から暗号化されたデータブロックを受信する(ステップS440)し、暗号化されたデータブロックを暗号回路316を用いて復号化(ステップS441)する。データブロックテーブルから受信したデータブロックに対応するデータブロック番号を取得した後(ステップS450)、データブロック番号から受信したデータブロックを書込み開始するEEPROM313のアドレスを算出する(ステップS460)。次に算出したEEPROM313のアドレスに受信したデータブロックを書込み、RAM314に記憶している前記受信ブロックレジスタの値に+1を加算する(ステップS470)。データブロックを書込んだ後、受信ブロックレジスタの値とデータブロック数を比較する(ステップ480)。それぞれの値が一致していればICカード発行処理を終了し(ステップS490)、一致していない場合はステップS440に戻り、次のデータブロックを受信する。   First, the IC card 200 receives an application issue start command from the issue system 100 (step S400). When the command is received, the encrypted application issue information included in the command is decrypted (step S401). An application area having the same size as the application data size included in the issue information is set in the EEPROM 313 (step S410). Next, a data block table and a reception block register which are permutations in which the same number of data block numbers as the number of data blocks included in the issue information are irregularly arranged are generated in the RAM 314 (step S420). Next, the IC card 200 encrypts the generated data block table using the encryption circuit 316 (step S421). After encrypting the data block table, the IC card 200 transmits the encrypted data block table to the issuing system 100 as response data of the command (step S430). After transmitting the encrypted data block table, the IC card 200 receives the encrypted data block from the issuing system 100 (step S440), and decrypts the encrypted data block using the encryption circuit 316 (step S440). S441). After obtaining the data block number corresponding to the data block received from the data block table (step S450), the address of the EEPROM 313 that starts writing the received data block is calculated from the data block number (step S460). Next, the received data block is written to the calculated address of the EEPROM 313, and +1 is added to the value of the reception block register stored in the RAM 314 (step S470). After writing the data block, the value of the reception block register is compared with the number of data blocks (step 480). If the values match, the IC card issuance process is terminated (step S490). If they do not match, the process returns to step S440 to receive the next data block.

なお、本発明は何らデータを暗号化する暗号アルゴリズムを限定するものではない。発行システム100が具備する暗号装置およびICカード200が具備する暗号演算回路316にDES暗号アルゴリズム以外の暗号演算機能(例えばRSA暗号演算機能)を持たせれば、DES暗号アルゴリズム以外の暗号アルゴリズムを利用できる。   The present invention does not limit the encryption algorithm for encrypting data. If the cryptographic apparatus provided in the issuing system 100 and the cryptographic operation circuit 316 provided in the IC card 200 have a cryptographic operation function other than the DES cryptographic algorithm (for example, an RSA cryptographic operation function), a cryptographic algorithm other than the DES cryptographic algorithm can be used. .

本発明はデータ量の多いデータを分割してホストコンピュータから端末に送信する技術に関する発明であり、インターネットのパケット通信等の通信にも適用できる可能性がある。   The present invention relates to a technology for dividing a large amount of data and transmitting it from a host computer to a terminal, and may be applicable to communications such as Internet packet communications.

発行システム100の概略図。1 is a schematic diagram of an issuing system 100. FIG. マルチアプリケーションICカードの階層モデル図。The hierarchical model figure of a multi application IC card. ICチップの構造図。IC chip structure diagram. ICカード発行処理の概要説明図。Outline | summary explanatory drawing of IC card issue processing. ICカード発行処理の動作流れを示した図。The figure which showed the operation | movement flow of IC card issue processing. データブロックテーブルの演算流れを示した図。The figure which showed the calculation flow of the data block table. データブロックテーブルの演算説明図。Explanatory drawing of a calculation of a data block table. ICカード用プログラムの動作流れを示した図。The figure which showed the operation | movement flow of the program for IC cards. データ暗号化時のICカード用プログラムの動作流れを示した図。The figure which showed the operation | movement flow of the program for IC cards at the time of data encryption.

符号の説明Explanation of symbols

100 発行システム100
110 発行システム100が具備する記憶装置
120 発行システム100が具備するAPUD生成装置
130 発行システム100が具備する暗号装置
140 発行システム100が具備するリーダライタ
200 ICカード
300 マルチアプリケーション型ICカードの階層モデル
310 ICチップ
311 ICチップが具備するCPU
312 ICチップが具備するROM
313 ICチップが具備するEEPROM
314 ICチップが具備するRAM
315 ICチップが具備する乱数生成器I/O回路
316 ICチップが具備する暗号演算回路
317 ICチップが具備するI/O回路
320 マルチアプリケーションOS
330 アプリケーション
400 アプリケーションデータ
410 データブロック
500 アプリケーション領域
600 データブロックテーブル
100 Issuing system 100
110 A storage device 120 included in the issuing system 100 An APUD generation device 130 included in the issuing system 100 A cryptographic device 140 included in the issuing system 100 A reader / writer 200 included in the issuing system 100 IC card 300 A hierarchical model 310 of a multi-application IC card IC chip 311 CPU provided in the IC chip
312 ROM included in the IC chip
313 EEPROM of IC chip
314 RAM included in IC chip
315 Random number generator I / O circuit 316 provided in the IC chip Cryptographic operation circuit 317 provided in the IC chip I / O circuit 320 provided in the IC chip 320 Multi-application OS
330 Application 400 Application Data 410 Data Block 500 Application Area 600 Data Block Table

Claims (6)

ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書き込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、前記ICカードは受信した前記データブロックをICカードに内蔵しているメモリに書きこむICカード発行方法であって、本発明の方法は、
前記ICカードが前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記ICカードが前記送信順序データを前記ICカード発行システムに送信するステップと、前記ICカード発行システムが前記送信順序データに従い前記データブロックを送信するステップと、前記ICカードは送信された前記データブロックを前記送信順序データに基き前記メモリの一部の領域に書きこむステップを順に実行する手順を含むことから成るICカード発行方法。
The issuance data to be written to one IC card stored in the data storage means included in the IC card issuance system is divided into a plurality of data blocks smaller than the data size of the issuance data and transmitted to the IC card, and the IC The card is an IC card issuing method for writing the received data block into a memory built in the IC card, and the method of the present invention comprises:
Calculating the transmission order data indicating the transmission order of the data blocks transmitted by the IC card from the IC card issuing system; and transmitting the transmission order data to the IC card issuing system by the IC card; The IC card issuing system transmits the data blocks according to the transmission order data, and the IC card sequentially writes the transmitted data blocks into a partial area of the memory based on the transmission order data. An IC card issuing method comprising the steps of executing.
前記送信順序データの演算は乱数を使用する演算方法であることを特徴とする請求項1に記載のICカード発行方法。   2. The IC card issuing method according to claim 1, wherein the transmission order data is calculated using a random number. 前記ICカード発行システムから送信されるデータブロックは暗号化されたデータであって、前記メモリに書込まれるデータは前記暗号化されたデータブロックを前記ICカード内部で復号化したデータであることを特徴とした請求項1または請求項2に記載のICカード発行方法。   The data block transmitted from the IC card issuing system is encrypted data, and the data written to the memory is data obtained by decrypting the encrypted data block inside the IC card. The IC card issuance method according to claim 1 or 2, wherein the IC card issuance method is characterized. ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、送信された前記データブロックをICカードに内蔵しているメモリに書きこむICカード用プログラムであって、本発明のプログラムは、前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記送信順序データを前記ICカード発行システムに送信するステップと、前記ICカード発行システムから前記送信順序データに従い送信される前記データブロックを受信するステップと、前記送信順序データに基き前記メモリの一部の領域に受信した前記データブロックを書きこむステップを順に実行する手順を含むことから成るICカード用プログラム。   Issuance data to be written to one IC card stored in the data storage means provided in the IC card issuance system is divided into a plurality of data blocks smaller than the data size of the issuance data, and is transmitted to the IC card. An IC card program for writing the data block to a memory built in the IC card, wherein the program of the present invention is a transmission order indicating a transmission order of the data blocks transmitted from the IC card issuing system. A step of calculating data, a step of transmitting the transmission order data to the IC card issuing system, a step of receiving the data block transmitted from the IC card issuing system according to the transmission order data, and the transmission order data The data block received in a partial area of the memory based on Program IC card consisting comprise instructions for performing writing step in order. ICカード発行システムが具備するデータ記憶手段に記憶された一枚のICカードに書込む発行データを、前記発行データのデータサイズよりも小さい複数のデータブロックに分割してICカードに送信し、送信された前記データブロックをICカードに内蔵しているメモリに書きこむICカード用プログラムであって、本発明のプログラムは、前記ICカード発行システムから送信される前記データブロックの送信順序を示す送信順序データを演算するステップと、前記送信順序データを暗号化するかもしくは暗号化せずに前記ICカード発行システムに送信するステップと、前記ICカード発行システムから前記送信順序データに従い送信される暗号化された前記データブロックを受信するステップと、前記暗号化されたデータブロックを復号化するステップと、前記送信順序データに基き前記メモリの一部の領域に前記復号化したデータブロックを書きこむステップを順に実行する手順を含むことから成るICカード用プログラム。   Issuance data to be written to one IC card stored in the data storage means provided in the IC card issuance system is divided into a plurality of data blocks smaller than the data size of the issuance data, and is transmitted to the IC card. An IC card program for writing the data block to a memory built in the IC card, wherein the program of the present invention is a transmission order indicating a transmission order of the data blocks transmitted from the IC card issuing system. A step of calculating data, a step of encrypting the transmission order data or transmitting the data to the IC card issuing system without encryption, and an encrypted data transmitted from the IC card issuing system according to the transmission order data. Receiving said data block; and said encrypted data block A step of decoding, a program for an IC card which comprises including a procedure for performing the step of writing the decrypted data blocks in a partial area of the memory based on the transmission order data to the order. 請求項4または請求項5に記載のICカード用プログラムを記録したこと特徴とするICカード。
6. An IC card in which the IC card program according to claim 4 is recorded.
JP2004037729A 2004-02-16 2004-02-16 IC card issuance method, IC card program and IC card Expired - Fee Related JP4373239B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004037729A JP4373239B2 (en) 2004-02-16 2004-02-16 IC card issuance method, IC card program and IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004037729A JP4373239B2 (en) 2004-02-16 2004-02-16 IC card issuance method, IC card program and IC card

Publications (2)

Publication Number Publication Date
JP2005228181A JP2005228181A (en) 2005-08-25
JP4373239B2 true JP4373239B2 (en) 2009-11-25

Family

ID=35002836

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004037729A Expired - Fee Related JP4373239B2 (en) 2004-02-16 2004-02-16 IC card issuance method, IC card program and IC card

Country Status (1)

Country Link
JP (1) JP4373239B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122451A (en) * 2005-10-28 2007-05-17 Toshiba Corp Communication medium and communication medium processing apparatus
JP4899499B2 (en) * 2006-01-31 2012-03-21 大日本印刷株式会社 IC card issuing method, IC card issuing system, and IC card
JP2007288230A (en) * 2006-03-24 2007-11-01 Tatsuomi Sakata Computer communication apparatus, decrypted information generating apparatus and program
JP4961834B2 (en) * 2006-05-30 2012-06-27 大日本印刷株式会社 IC card issuing method and IC card
MX2010011376A (en) 2008-05-26 2011-02-24 Nxp Bv Reader and transponder for obscuring the applications supported by a reader and/or a transponder and method thereof.
JP5152697B2 (en) * 2008-09-24 2013-02-27 ブラザー工業株式会社 Radio tag communication apparatus and radio tag communication system
JP5212810B2 (en) * 2008-09-25 2013-06-19 ブラザー工業株式会社 Radio tag communication system and radio tag communication apparatus
JP5481464B2 (en) * 2011-12-13 2014-04-23 株式会社東芝 Communication medium and communication medium processing apparatus

Also Published As

Publication number Publication date
JP2005228181A (en) 2005-08-25

Similar Documents

Publication Publication Date Title
US7406604B2 (en) Method for protecting a memory card, and a memory card
CN1592877B (en) Method and apparatus for encrypting/decrypting data on a mass storage device
JP5123524B2 (en) Smart card with protected memory access
JP2007004522A (en) Storage device
US20040059916A1 (en) Memory card
JP4073974B2 (en) Method for securing access to a removable card for a computer
JP4373239B2 (en) IC card issuance method, IC card program and IC card
KR100676087B1 (en) Secured data storage device and method with a USB interface
US20200204339A1 (en) Portable electronic device and ic module
JP2002111660A (en) Encryption communication method and encryption communication device
WO2001039140A1 (en) Security device, and computer-readable medium storing security program
JP2004139242A (en) IC card, IC card issuing system and IC card issuing method
JP2009032003A (en) Portable electronic device, terminal device, authentication system, and authentication method
JP2000231329A (en) Method for exchanging at least one secret initial value between a processing station and a chip card
JP5241065B2 (en) Apparatus and method for checking whether data stored in external memory is changed
JP4899499B2 (en) IC card issuing method, IC card issuing system, and IC card
JP2007072957A (en) Read / write device and debug system
JP7487837B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM
JPH09179949A (en) Portable information recording medium and its reader / writer device
JP7444197B2 (en) Electronic information storage medium, cryptographic operation method selection method, and program
JP7439847B2 (en) Electronic information storage medium, key data setting method, and program
KR20070076848A (en) Apparatus and method for improving the security level of card authentication system
JP4961834B2 (en) IC card issuing method and IC card
CN114064559B (en) Memory card device ensuring information security and chip control method used therein
JP2008109276A (en) Portable electronic device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090821

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: 20090901

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: 20090903

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4373239

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: 20120911

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130911

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees