JP5347417B2 - IC card system, its host device, program - Google Patents
IC card system, its host device, program Download PDFInfo
- Publication number
- JP5347417B2 JP5347417B2 JP2008263379A JP2008263379A JP5347417B2 JP 5347417 B2 JP5347417 B2 JP 5347417B2 JP 2008263379 A JP2008263379 A JP 2008263379A JP 2008263379 A JP2008263379 A JP 2008263379A JP 5347417 B2 JP5347417 B2 JP 5347417B2
- Authority
- JP
- Japan
- Prior art keywords
- card
- command
- writer
- reader
- mutual authentication
- 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
Links
Abstract
Description
本発明は、ICカードとの通信を仲介するICカード・リーダ/ライタとその上位装置等から成るICカードシステムに関する。 The present invention relates to an IC card system comprising an IC card reader / writer that mediates communication with an IC card and its host device.
従来より、カードリーダライタと上位機器とが接続されて成るICカードシステム(カード利用機器という場合もあるものとする)が存在する。
カードリーダライタは、上位機器と顧客のICカード間に位置し、カード認証、暗号化通信、カード情報のリードライトを、上位機器と連携して行ない、ICカードとの通信に必要な電気的整合、通信電文の通信レートの整合、ACK応答の送受信・通信タイムアウト監視等の通信に関与する下位レイヤの制御を行なうことで、ICカードとのインタフェースを実現する機能を担う。さらに、上位装置に代行してカードとの通信手順の制御、通信電文の生成、一部データについてはその内容の生成及び判定を実施する場合もある。
Conventionally, there is an IC card system (also referred to as a card using device) in which a card reader / writer and a host device are connected.
The card reader / writer is located between the higher-level device and the customer's IC card, and performs card authentication, encrypted communication, and card information read / write in cooperation with the higher-level device, and electrical matching required for communication with the IC card. It controls the lower layers involved in communication such as communication rate matching of communication messages, transmission / reception of ACK responses, and communication timeout monitoring, thereby realizing a function of realizing an interface with an IC card. Furthermore, on behalf of the host device, control of communication procedures with the card, generation of communication messages, and generation and determination of the contents of some data may be performed.
セキュリティを伴うカードアクセスを実施する場合には、カードアクセス(実際のデータのリード/ライト等)を行う前にICカードとの相互認証処理(暗号化処理等を伴う)が必要となり、その後の通信(上記カードアクセス)も暗号化されるのが一般的である。相互認証処理に係わる暗号化/復号化処理は、予め決められて登録されている所定のカードアクセス鍵を用いて実行される。一方、その後のカードアクセスにおける暗号化/復号化処理には、相互認証処理によって得られる所定データに基づいて一時的に生成される鍵(セッション鍵という)を用いて実行される。 When performing card access with security, mutual authentication processing (including encryption processing) with the IC card is required before card access (actual data read / write, etc.), and subsequent communication (The above card access) is also generally encrypted. The encryption / decryption process related to the mutual authentication process is executed using a predetermined card access key registered in advance. On the other hand, the encryption / decryption process in the subsequent card access is executed using a key (referred to as a session key) that is temporarily generated based on predetermined data obtained by the mutual authentication process.
上記相互認証処理に伴う暗号化/復号化に必要なカードアクセス鍵は、従来は以下の(1)、(2)等の例のようにカードリーダライタに登録されているか、もしくは必要になる都度、上位機器からカードリーダライタに渡される。 The card access key necessary for encryption / decryption associated with the mutual authentication process has been registered in the card reader / writer as in the following examples (1), (2), etc. , It is passed from the host device to the card reader / writer.
(1)カードリーダライタにカードアクセス鍵を登録しておき、ICカードとの相互認証処理をカードリーダライタが行い、認証以降のICカードへのリードライト処理も、カードリーダライタが行う。 (1) A card access key is registered in the card reader / writer, the card reader / writer performs mutual authentication processing with the IC card, and the card reader / writer also performs read / write processing to the IC card after authentication.
(2)カードリータライタにはカードアクセス鍵は登録されていないが、上位機器に登録されている。ICカードと認証する必要がある場合に、上位装置がカードリータライタにカードアクセス鍵を一時的に引渡し、カードリーダライタがICカードとの相互認証処理を実施する。カードリーダライタに引き渡されたカードアクセス鍵は、認証完了後にカードリーダライタが放棄する場合と、カードリーダライタの電源が切断されるまで、あるいは消去指令を受取るまでカードリーダライタが保持する場合が想定される。認証以降のカードへのリードライト処理は、カードリーダライタが行う。 (2) Although the card access key is not registered in the card writer, it is registered in the host device. When it is necessary to authenticate with the IC card, the host device temporarily passes the card access key to the card writer, and the card reader / writer performs mutual authentication processing with the IC card. The card access key handed over to the card reader / writer is assumed to be held by the card reader / writer after the authentication is completed, or until the card reader / writer is turned off or an erase command is received. Is done. The card reader / writer performs read / write processing on the card after authentication.
また、上位機器がインターネット等のネットワークを介してICカード発行・運用会社等のサーバ装置(管理サーバという)に接続する構成であってもよい。管理サーバは、例えば、ICカード決済処理に係わる各種情報(履歴等)や、暗号鍵(カードアクセス鍵等)の管理を行うサーバ装置である。特にカードアクセス鍵は、バージョンアップ等される場合があり、管理サーバはこのバージョンアップ版等の新たなカードアクセス鍵を、ネットワークを介して各上位機器へ配信するものである。あるいはカード利用機器側で運用中以外はカードアクセス鍵を消去している運用形態の場合には、定期的に(カード利用機器側の運用開始毎に)カードアクセス鍵をネットワークを介して上位機器へ配信する。上位機器は、配信されたカードアクセス鍵をカードリーダライタに渡して再登録させることに
なる。
Alternatively, the host device may be connected to a server device (referred to as a management server) such as an IC card issuing / operating company via a network such as the Internet. The management server is, for example, a server device that manages various information (such as history) related to IC card payment processing and encryption keys (such as card access keys). In particular, the card access key may be upgraded, and the management server distributes a new card access key such as the upgraded version to each host device via the network. Alternatively, in the case of an operation mode in which the card access key is erased except when the card using device side is operating, the card access key is periodically sent to the host device via the network (every time the card using device side starts operation). To deliver. The host device passes the distributed card access key to the card reader / writer for re-registration.
また、特許文献1記載の従来技術が知られている。
特許文献1には例えばその図9等に相互認証処理手順が示されている。
For example, Patent Document 1 shows a mutual authentication processing procedure in FIG.
上述したICカードとの相互認証を行うために為の必要となるカードアクセス鍵は、通常、ICカードの種類毎に異なるものであるが、換言すれば同種のICカード全てに共通の鍵であるので、これが漏洩することは絶対に避けなければならない。 The card access key required for mutual authentication with the above-described IC card is usually different for each type of IC card, in other words, it is a key common to all the same type of IC cards. So it must be absolutely avoided that this leaks.
従来技術では、カードリーダライタにカードアクセス鍵を登録しておくか(上記(1)の場合)、もしくはカードアクセス鍵をカードリーダライタに引き渡すことになるため(上記(2)の場合)、何れにしてもカードリーダライタ内にカードアクセス鍵が保持されることになる。よって、カードリーダライタにカードアクセス鍵の漏洩を防止するための強固なセキュリティの仕組みが必要であった。例えば、カードリーダライタの筐体を耐タンパ筐体とし、更にカードアクセス鍵を記憶するメモリを耐タンパメモリとする等の強固なセキュリティ対策を施していた。 In the prior art, the card access key is registered in the card reader / writer (in the case of (1) above), or the card access key is transferred to the card reader / writer (in the case of (2) above). Even so, the card access key is held in the card reader / writer. Therefore, a strong security mechanism is required to prevent the card access key from leaking to the card reader / writer. For example, a strong security measure has been taken, such as a tamper-resistant case for the card reader / writer and a tamper-resistant memory for storing the card access key.
また、上記(2)の場合には上位機器にカードアクセス鍵が登録されるので、上位機器に対してもカードリーダライタと同様に、上記カードアクセス鍵の漏洩を防止するための強固なセキュリティの仕組みが必要であった。また、上記(1)の場合でも、管理サーバは、管理サーバから配信されたカードアクセス鍵を(一時的にせよ)保持することになるし、また上位機器はカードリーダライタに直接接続される機器であることも考えれば、やはり上記カードアクセス鍵の漏洩を防止するための強固なセキュリティの仕組みが必要であった。 In the case of (2) above, since the card access key is registered in the higher-level device, the high-level device has a strong security for preventing leakage of the card access key as in the case of the card reader / writer. A mechanism was necessary. Also in the case of (1) above, the management server holds (temporarily) the card access key distributed from the management server, and the upper device is a device directly connected to the card reader / writer. In view of this, it is necessary to have a strong security mechanism for preventing leakage of the card access key.
上記の通り、従来では、カードリーダライタと上位機器を有するICカードシステムにおいて、カードリーダライタと上位機器の両方に強固なセキュリティ対策を施す必要があり、コスト高となっていた。また、カードリーダライタに強固なセキュリティ対策を施しても、カードリーダライタ内にカードアクセス鍵が存在する以上、カードアクセス鍵が漏洩する可能性は0ではない。特に、一般的にカードリーダライタは上位機器に比べると比較的盗難され易い状況に置かれている場合が多く、カードリーダライタが盗難された場合、カードリーダライタからカードアクセス鍵が漏洩する危険性があった。 As described above, conventionally, in an IC card system having a card reader / writer and a host device, it is necessary to take strong security measures for both the card reader / writer and the host device, resulting in high costs. Even if a strong security measure is applied to the card reader / writer, the possibility of leakage of the card access key is not zero as long as the card access key exists in the card reader / writer. In particular, the card reader / writer is generally more likely to be stolen than the host device, and if the card reader / writer is stolen, there is a risk that the card access key will be leaked from the card reader / writer. was there.
本発明の課題は、上位機器とICカードリーダライタを有するICカードシステムに係わり、ICカードリーダライタからのカードアクセス鍵の漏洩を防止でき、更にICカードリーダライタに強固なセキュリティ対策を施す必要がなくなるICカードシステム等を提供することにある。 An object of the present invention relates to an IC card system having a host device and an IC card reader / writer, can prevent leakage of a card access key from the IC card reader / writer, and further needs to take strong security measures for the IC card reader / writer. The purpose is to provide an IC card system and the like that will disappear.
本発明のICカードシステムは、カードリーダライタに上位機器が接続されたICカードシステムであって、前記上位機器は、カードアクセス鍵を記憶するカードアクセス鍵記憶手段と、該カードアクセス鍵を用いた暗号化通信によりICカードとの相互認証処理を行う相互認証手段とを有し、前記カードリーダライタは、前記相互認証処理の為に前記上位機器−ICカード間で送受信するパケットを、中継する中継手段を有する。 The IC card system of the present invention is an IC card system in which a host device is connected to a card reader / writer, and the host device uses a card access key storage means for storing a card access key and the card access key. A mutual authentication unit that performs mutual authentication processing with the IC card by encrypted communication, and the card reader / writer relays a packet that is transmitted and received between the host device and the IC card for the mutual authentication processing. Have means.
上記構成のICカードシステムでは、ICカードとの相互認証処理の際に必要となるカ
ードアクセス鍵は、上位機器に登録されている。そして、上位機器がカードリーダライタを介してICカードとの通信を行って、カードアクセス鍵を用いてICカードとの相互認証処理を行う。カードリーダライタは、パケット中継処理を行うものであり、従来のような相互認証処理を行うものではなく、よってカードアクセス鍵を保持する必要はない。
In the IC card system configured as described above, the card access key necessary for mutual authentication processing with the IC card is registered in the host device. Then, the host device communicates with the IC card via the card reader / writer, and performs mutual authentication processing with the IC card using the card access key. The card reader / writer performs packet relay processing, does not perform mutual authentication processing as in the prior art, and therefore does not need to hold a card access key.
よって、カードリーダライタからカードアクセス鍵が漏洩する可能性はなく、カードリーダライタからのカードアクセス鍵の漏洩を防止できる。
また、上記の様に、カードアクセス鍵は、上位機器が保持し、カードリーダライタが保持することはないので、カードリーダライタには従来のような強固なセキュリティ対策を施す必要はない。
Therefore, there is no possibility that the card access key is leaked from the card reader / writer, and leakage of the card access key from the card reader / writer can be prevented.
Further, as described above, the card access key is held by the host device and is not held by the card reader / writer. Therefore, it is not necessary for the card reader / writer to take a strong security measure as in the prior art.
すなわち、例えば、前記上位機器は、耐タンパ筐体を備える、または/及び、前記カードアクセス鍵記憶手段を耐タンパメモリとする、強固なセキュリティ対策が施されており、前記カードリーダライタには前記強固なセキュリティ対策は必要ない。よって、従来のように上位機器とカードリーダライタの両方に強固なセキュリティ対策が施す必要がある場合に比べてコスト削減効果が得られる。 That is, for example, the host device has a tamper-resistant housing, and / or a strong security measure is taken with the card access key storage means being a tamper-resistant memory. Strong security measures are not necessary. Therefore, a cost reduction effect can be obtained as compared with the case where it is necessary to take a strong security measure for both the host device and the card reader / writer as in the prior art.
また、例えば、前記上位装置は、更に、前記相互認証処理過程で得られた特定情報に基づいてセッション鍵を生成して、該セッション鍵を前記カードリーダライタへ送信するセッション鍵生成・送信手段を有し、前記カードリーダライタは、更に、該セッション鍵生成・送信手段から渡されたセッション鍵を用いて、前記相互認証処理成功後の前記ICカードに対するカードアクセス処理を、該セッション鍵を用いた暗号化通信により行うカードアクセス手段を有する。 In addition, for example, the higher-level device further includes a session key generation / transmission unit that generates a session key based on the specific information obtained in the mutual authentication process and transmits the session key to the card reader / writer. The card reader / writer further uses the session key to perform card access processing for the IC card after the mutual authentication processing succeeds, using the session key passed from the session key generation / transmission means. It has card access means for performing encrypted communication.
上記相互認証処理に比べて比較的軽い処理により短時間での処理が要求されるカードアクセス処理に関しては、セッション鍵をカードリーダライタに渡してカードリーダライタで実行させる。これにより、短時間での処理、及び上位機器の処理負荷を軽減させることが可能となる。 With respect to the card access process that requires a relatively short process compared to the mutual authentication process, a session key is passed to the card reader / writer to be executed by the card reader / writer. As a result, it is possible to reduce processing in a short time and processing load on the host device.
本発明のICカードシステム等によれば、上位機器とICカードリーダライタを有するICカードシステムに係わり、ICカードリーダライタからのカードアクセス鍵の漏洩を防止でき、更にICカードリーダライタに強固なセキュリティ対策を施す必要がなくなる。 According to the IC card system and the like of the present invention, it is related to an IC card system having a host device and an IC card reader / writer, and it is possible to prevent leakage of a card access key from the IC card reader / writer. There is no need to take measures.
以下、図面を参照して本発明の実施の形態について説明する。
図1は、本例のICカードシステムの構成・機能ブロック図である。
本例のICカードシステムは、基本的に図示の上位機器10とカードリーダライタ20とから成る(後述するように、これらをまとめて「カード利用機器」という場合もある)。また、本例のICカードシステムは、上位機器10はインターネット等のネットワーク1を介して管理サーバ2等の外部装置に接続する構成であってもよい。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration / function block diagram of the IC card system of this example.
The IC card system of this example basically comprises a higher-level device 10 and a card reader / writer 20 shown in the drawing (as will be described later, these may be collectively referred to as “card-using device”). Further, the IC card system of this example may be configured such that the higher-level device 10 is connected to an external device such as the management server 2 via the network 1 such as the Internet.
管理サーバ2は上述したICカード発行・運用会社等のサーバ装置等である。よって、管理サーバ2の動作は特に詳細には説明しないが、簡単に説明するならば、ICカード決済処理に係わる各種情報(履歴等)や、暗号鍵(カードアクセス鍵等)の管理を行うものであり、特にカードアクセス鍵は、バージョンアップ等される場合があり、管理サーバ2はこのバージョンアップ版等の新たなカードアクセス鍵を、ネットワーク1を介して上位機器10へ配信する。あるいはカード利用機器側で運用中以外はカードアクセス鍵を消去している運用形態の場合には、定期的に(カード利用機器側の運用開始毎に)カードアク
セス鍵をネットワーク1を介して上位機器10へ配信する。
The management server 2 is a server device or the like of the IC card issuing / operating company described above. Therefore, the operation of the management server 2 will not be described in detail, but if it is briefly described, it manages various information (history etc.) related to IC card payment processing and encryption key (card access key etc.). In particular, the card access key may be upgraded, and the management server 2 distributes a new card access key such as the upgraded version to the host device 10 via the network 1. Alternatively, in the case of an operation mode in which the card access key is erased except when being operated on the card using device side, the card access key is periodically transferred to the host device via the network 1 (every time the card using device side starts operation). Deliver to 10.
上位機器10は、機器全体の動作制御を行なうCPU11、CPU11に実行させる所定のアプリケーションプログラムが格納されているプログラムメモリ12、処理中のデータを一時保管するデータメモリ13、予め登録されるカードアクセス鍵等の各種鍵情報を記憶する鍵情報格納用セキュアメモリ14、カードリーダライタ20とリーダライタコマンドによる通信を行なうためのカードリーダライタ通信制御部15及びカードリーダライタ接続I/F16、システム全体を監視している管理サーバ2との通信を行なうためのネットワーク通信制御部17及びネットワーク通信I/F18等から構成されている。 The host device 10 includes a CPU 11 that controls the operation of the entire device, a program memory 12 that stores a predetermined application program to be executed by the CPU 11, a data memory 13 that temporarily stores data being processed, and a card access key that is registered in advance. The key information storing secure memory 14 for storing various key information such as, the card reader / writer communication control unit 15 and the card reader / writer connection I / F 16 for communicating with the card reader / writer 20 by a reader / writer command, and the entire system are monitored. The network communication control unit 17 and the network communication I / F 18 for communicating with the management server 2 are configured.
また、カードリーダライタ20は、当該カードリーダライタ20全体の動作制御を行なうCPU21、CPU21に実行させる所定のアプリケーションプログラムが格納されているプログラムメモリ22、処理中のデータを一時保管するデータメモリ23、非接触ICカード3との非接触の通信を行なうためのRF回路24及びアンテナ25、上位機器10と通信を行なうための上位機器通信制御部26及び上位機器接続I/F27等から構成されている。 The card reader / writer 20 includes a CPU 21 that controls the operation of the card reader / writer 20 as a whole, a program memory 22 that stores a predetermined application program to be executed by the CPU 21, a data memory 23 that temporarily stores data being processed, An RF circuit 24 and an antenna 25 for performing contactless communication with the contactless IC card 3, a host device communication control unit 26 for communicating with the host device 10, a host device connection I / F 27, and the like. .
カードリーダライタ接続I/F16と上位機器接続I/F27とを接続することによって上位機器10とカードリーダライタ20とが接続され、カードリーダライタ通信制御部15及び上位機器通信制御部26によって上位機器10−カードリーダライタ20間の通信が行われる。尚、上位機器10−カードリーダライタ20間の通信は上記の通りリーダライタコマンドによる通信であるが、カードリーダライタ20−非接触ICカード3間の通信はカードコマンドによる通信である。これらについては後に説明する。 The host device 10 and the card reader / writer 20 are connected by connecting the card reader / writer connection I / F 16 and the host device connection I / F 27, and the card reader / writer communication control unit 15 and the host device communication control unit 26 connect the host device. Communication between the 10 and the card reader / writer 20 is performed. The communication between the host device 10 and the card reader / writer 20 is communication by a reader / writer command as described above, but the communication between the card reader / writer 20 and the non-contact IC card 3 is communication by a card command. These will be described later.
ここで、非接触ICカード3との通信手順は、上記従来の特許文献1等に記載の様に、まず相互認証処理を行い、相互認証成功した場合にはカードアクセス処理(カード情報のリードライト等)を行う。相互認証処理は予め登録される所定のカードアクセス鍵を用いて行われる。相互認証成功後のリードライト処理等は相互認証処理の都度生成されるセッション鍵を用いて行われる。 Here, the communication procedure with the non-contact IC card 3 is as follows. First, mutual authentication processing is performed as described in the above-mentioned conventional patent document 1 and the like, and when mutual authentication is successful, card access processing (read / write of card information). Etc.). The mutual authentication process is performed using a predetermined card access key registered in advance. The read / write process after successful mutual authentication is performed using a session key generated each time the mutual authentication process is performed.
ここで、本手法では、上記カードアクセス鍵をカードリーダライタ20が保持することはない。すなわち、カードリーダライタ20に予めカードアクセス鍵が登録されることは無いし、必要なときに上位機器10がカードアクセス鍵をカードリーダライタ20に渡すようなこともない。 Here, in this method, the card reader / writer 20 does not hold the card access key. That is, the card access key is not registered in advance in the card reader / writer 20, and the host device 10 does not pass the card access key to the card reader / writer 20 when necessary.
本手法では、カードアクセス鍵は上位機器10に登録される。これより、上位機器10は、カードアクセス鍵の漏洩を防止するために、耐タンパ筐体によって保護されている。耐タンパ筐体は、図示しないが、例えば筐体の不正開封検知センサ等を有するものである。更に、鍵情報が格納されるメモリである上記鍵情報格納用セキュアメモリ14は、メモリチップ自身に耐タンパ機能が付与されているセキュアメモリ(耐タンパメモリ)を使用している。つまり、強固なセキュリティ対策を施してある。尚、強固なセキュリティ対策の方法として、必ず耐タンパ筐体と耐タンパメモリの両方を用いなければならないというわけではなく、どちらか一方のみであってもよい。 In this method, the card access key is registered in the host device 10. Thus, the host device 10 is protected by the tamper-resistant housing in order to prevent leakage of the card access key. Although the tamper resistant casing is not shown, the tamper resistant casing includes, for example, an unauthorized opening detection sensor of the casing. Further, the key information storing secure memory 14, which is a memory in which key information is stored, uses a secure memory (tamper resistant memory) in which a memory chip itself is provided with a tamper resistant function. In other words, strong security measures are taken. It should be noted that as a strong security measure method, it is not always necessary to use both a tamper-resistant housing and a tamper-resistant memory, and only one of them may be used.
また、尚、図示していないが、耐タンパ筐体に付与されている筐体の不正開封検知センサからの警報を受信すると、鍵情報格納用セキュアメモリ14に記憶される鍵情報(特にカードアクセス鍵)を消去する機能も装備していることが望ましい。 Although not shown, when an alarm is received from the tamper-resistant detection sensor of the case attached to the tamper-resistant case, the key information (especially card access stored in the key information storage secure memory 14) is received. It is desirable to have a function to delete keys.
一方、カードリーダライタ20に関しては、上記の通りカードアクセス鍵が予め登録される訳ではないし、非接触ICカード3との通信のときだけ上位機器10からカードアク
セス鍵を渡されて一時的に保持するようなことも無い。つまり、カードリーダライタ20にカードアクセス鍵が保持されることは一切無い。よって、カードリーダライタ20からカードアクセス鍵が漏洩することはあり得ない。また、上位機器10のような鍵情報漏洩に対する強固なセキュリティ対策(上記耐タンパ筐体や不正開封検知センサや耐タンパメモリ)を施す必要もない。
On the other hand, with respect to the card reader / writer 20, the card access key is not registered in advance as described above, and the card access key is passed from the host device 10 and temporarily held only when communicating with the non-contact IC card 3. There is nothing to do. That is, the card access key is never held in the card reader / writer 20. Therefore, the card access key cannot be leaked from the card reader / writer 20. Further, it is not necessary to take a strong security measure against the leakage of key information (the tamper-resistant housing, the tamper-evident detection sensor, or the tamper-resistant memory) as in the host device 10.
但し、カードリーダライタ20に関しては、セッション鍵を一時的に記憶したり、場合によっては上位機器10との間の通信の暗号化を行なうための上位機器10との相互認証用の鍵が登録される場合があるため、図示していないが必要充分な情報漏洩対策は施される場合が一般的である(筐体による回路基板に対する解析防止、情報の暗号化保存、バスのスクランブル処理等)。しかし、カードリーダライタ20には、上記耐タンパ筐体や耐タンパメモリのような強固なセキュリティ対策を施すことまでは必要ない。 However, with respect to the card reader / writer 20, a key for mutual authentication with the host device 10 for temporarily storing a session key or for encrypting communication with the host device 10 in some cases is registered. However, although not shown, necessary and sufficient information leakage countermeasures are generally taken (prevention of analysis of circuit board by casing, encrypted storage of information, bus scramble processing, etc.). However, it is not necessary for the card reader / writer 20 to take strong security measures such as the tamper-resistant housing and the tamper-resistant memory.
上記の通り、カードアクセス鍵は上位機器10が保持し、たとえ一時的であってもカードリーダライタ20が保持することはない。これより、本手法では、任意の1つの非接触ICカード3との一連の通信処理(セッション)において、カードアクセス鍵を用いる必要がある処理、すなわち上記相互認証処理に関しては、上位機器10が行う。但し、上位機器10は、非接触ICカード3と直接通信を行うことはできないので、カードリーダライタ20を介して行う。カードリーダライタ20は、相互認証処理の際に上位機器10−非接触ICカード3間で送受信するパケットを、中継する処理機能部(不図示)を備える。 As described above, the card access key is held by the host device 10 and is not held by the card reader / writer 20 even temporarily. Thus, in this method, the host device 10 performs processing that requires the use of the card access key in a series of communication processing (session) with any one contactless IC card 3, that is, the mutual authentication processing. . However, since the host device 10 cannot directly communicate with the non-contact IC card 3, it is performed via the card reader / writer 20. The card reader / writer 20 includes a processing function unit (not shown) that relays packets transmitted and received between the host device 10 and the non-contact IC card 3 during the mutual authentication process.
一方、相互認証成功後のICカード3のデータ・リード/ライト処理等に関しては、上位機器10が自己が生成したセッション鍵をカードリーダライタ20に渡すことで、カードリーダライタ20が行う。 On the other hand, the data reading / writing processing of the IC card 3 after successful mutual authentication is performed by the card reader / writer 20 by passing the session key generated by the host device 10 to the card reader / writer 20.
尚、上記上位機器10のプログラムメモリ12には、ICカード3との上記相互認証処理やセッション鍵を生成してカードリーダライタ20に渡す処理等をCPU11により実行させる為のアプリケーションプログラムが記憶されている。また、上記カードリーダライタ20のプログラムメモリ22には、上記セッション鍵を用いるカードアクセス処理(データ・リード/ライト処理等)や、上位機器10−ICカード3間の通信を中継する処理(パケット中継・転送処理)を、CPU11により実行させる為のアプリケーションプログラムが記憶されている。 The program memory 12 of the host device 10 stores an application program for causing the CPU 11 to execute the mutual authentication process with the IC card 3 and the process of generating a session key and passing it to the card reader / writer 20. Yes. The program memory 22 of the card reader / writer 20 stores a card access process (data read / write process, etc.) using the session key and a process for relaying communication between the host device 10 and the IC card 3 (packet relay). An application program for causing the CPU 11 to execute (transfer processing) is stored.
このように、本提案手法では、上位機器10は、カードアクセス鍵を保持すると共に、このカードアクセス鍵をカードリーダライタ20に引き渡すことなく、カードアクセス鍵を用いた暗号化通信によりICカード(本例では非接触ICカード3)との相互認証処理を行う。また、この相互認証成功後の当該セッションにおける当該ICカードとの間の通信(カードアクセス処理の為の通信)は、セッション鍵を用いた暗号化通信により行われる。 As described above, in the proposed method, the host device 10 holds the card access key, and does not deliver the card access key to the card reader / writer 20, but performs encrypted communication using the card access key. In the example, mutual authentication processing with the non-contact IC card 3) is performed. Further, communication with the IC card in the session after successful mutual authentication (communication for card access processing) is performed by encrypted communication using a session key.
ここで、セッション鍵は、各セッション毎にそのセッションに限定して、ICカードとカード利用機器の両方で一時的に生成される通信用秘匿鍵であり、それ故、ICカードとカード利用機器の組合せが異なる場合には利用出来ないし、同じICカードとカード利用機器間の通信であっても、セッションが中断した場合には、次回以降のセッションでは再利用出来ない鍵である。 Here, the session key is a secret key for communication that is temporarily generated in both the IC card and the card-using device for each session, and is therefore limited to the session. This key cannot be used if the combination is different, and cannot be reused in the next and subsequent sessions if the session is interrupted even if communication is performed between the same IC card and the card-using device.
このため、カードリーダライタ20のセキュリティ性能が、強固なセキュリティ対策を施した場合に比べて劣っていることによってセッション鍵が漏洩したとしても、これは当該セッション終了後は利用する価値のない鍵情報となる。最悪、当該セッションを中断す
ることなく、カードアクセスを不正に引き継ぐことが可能であったとしても、当該セッションで使用されている1枚のICカードに対してのみ、行われる不正となるため、鍵情報漏洩によるカードシステム全体(ICカードシステムの意味ではなく、例えば管理サーバ2が管理するシステム全体)のセキュリティ崩壊と言った事態は回避することが可能となる。
For this reason, even if the session key leaks because the security performance of the card reader / writer 20 is inferior to the case where strong security measures are taken, this is key information that is not worth using after the session ends. It becomes. In the worst case, even if it is possible to illegally take over the card access without interrupting the session, it will be performed only for one IC card used in the session. It is possible to avoid a situation such as a security collapse of the entire card system (not the meaning of the IC card system but the entire system managed by the management server 2) due to information leakage.
更に、ICカードを捕捉するためのポーリング処理や、ICカードに対する実際のカードアクセス処理(リード/ライト処理等)は、カードリーダライタ20が代行するため、上位機器10側のプログラム処理の負荷増加分は抑えることが可能となる。 Further, since the card reader / writer 20 performs the polling processing for capturing the IC card and the actual card access processing (read / write processing, etc.) for the IC card, the program processing load increase on the host device 10 side is increased. Can be suppressed.
尚、上記“カード利用機器”とは、ここでは「上位機器10+カードリーダライタ20」である。
また、本方式の場合、ICカードとの相互認証処理の為のプログラムをカードリーダライタ20に搭載する必要が無いため、カードリーダライタ20が盗難等で解析された場合にカード認証のアルゴリズムが漏洩することも防止可能である。あるいは、複数のカード規格毎に異なる認証手順・認証時の暗号仕様をサポートする必要がある場合でも、カードリーダライタ20に多くの対応機能を搭載する必要がない。
The “card using device” here is “the upper device 10 + card reader / writer 20”.
In the case of this method, since there is no need to install a program for mutual authentication processing with an IC card in the card reader / writer 20, the card authentication algorithm leaks when the card reader / writer 20 is analyzed due to theft or the like. It is also possible to prevent this. Alternatively, even if it is necessary to support different authentication procedures and encryption specifications at the time of authentication for each of a plurality of card standards, the card reader / writer 20 does not need to be equipped with many corresponding functions.
一般的に相互認証によるカードと利用機器間の認証のための暗号化情報の生成と、セッション鍵の生成アルゴリズムについては、多少時間が掛かっても安全性を重視した複雑な暗号方式等が採用されるが、生成されたセッション鍵によるその後のカードアクセスのための通信の暗号化は、比較的軽い処理により時間短縮することが要求されている。特に非接触ICカードの場合には、ICカードがカードリーダライタ20と通信可能な距離に存在する間だけの、短時間のセッション中の通信に限定されると共に、通信の処理時間がカード利用者の利便性に関わるため、セッション鍵による暗号化処理については処理時間の短縮が重要視される傾向にある。 In general, for the generation of encryption information for authentication between the card and the device used by mutual authentication and the session key generation algorithm, a complicated encryption method that emphasizes safety is adopted even if it takes some time. However, the encryption of communication for subsequent card access using the generated session key is required to reduce the time by a relatively light process. In particular, in the case of a non-contact IC card, the communication is limited to the communication during a short session only while the IC card exists within a communicable distance with the card reader / writer 20, and the communication processing time is the card user. Therefore, in the encryption process using a session key, shortening the processing time tends to be regarded as important.
すなわちカードアクセス鍵とそれを使った認証処理のプロセスは、多数のカードとの認証を行なうための重要な情報であるために、そのセキュリティ対策が重要視されるが、生成されたセッション鍵とそれを用いたセッション中に限定した暗号化通信は、利便性にも配慮した取り扱いが求められる。 In other words, the card access key and the authentication process using it are important information for authenticating with a large number of cards, so security measures are regarded as important. Encrypted communication that is limited to sessions using, requires handling with consideration for convenience.
本手法によれば、まず、カードアクセス鍵がカードリーダライタから漏洩することを防止することができる。更に、カードリーダライタに対して耐タンパ筐体、耐タンパメモリ等の強固なセキュリティ対策を施す必要がなく、コスト削減効果も得られる。更に、認証処理後のカードアクセス処理に関しては、当該カードアクセス処理に用いられるセッション鍵をカードリーダライタに渡して、カードリーダライタによってカードアクセス処理を実行させるので、カードリーダライタによる中継処理は必要ない為に短時間での処理が可能となりカード利用者の利便性を損なうことがなく、且つ上位機器の処理負荷を軽減させることが可能となる。 According to this method, the card access key can be prevented from leaking from the card reader / writer. Furthermore, it is not necessary to take strong security measures such as a tamper-resistant housing and tamper-resistant memory for the card reader / writer, and a cost reduction effect can be obtained. Further, regarding the card access process after the authentication process, the session key used for the card access process is passed to the card reader / writer, and the card reader / writer executes the card access process. Therefore, the relay process by the card reader / writer is not necessary. Therefore, it is possible to perform processing in a short time, without impairing the convenience for the card user, and to reduce the processing load on the host device.
以下、図2以降を参照して更に詳細に説明する。
図2は、カード利用機器−ICカード間の概略的な通信シーケンス例である。
尚、図2に示す概略的なシーケンス自体は、従来技術と略同様であってよい。また、後述する図3に示す相互認証処理の処理内容自体も、従来技術と略同様であってよい(但し、上記の通り、相互認証処理は、従来ではカードリーダライタ20が実行したが、本手法では上位機器10が実行する)。
Hereinafter, further details will be described with reference to FIG.
FIG. 2 is a schematic communication sequence example between the card using device and the IC card.
Note that the schematic sequence itself shown in FIG. 2 may be substantially the same as that of the prior art. Also, the processing content itself of the mutual authentication process shown in FIG. 3 to be described later may be substantially the same as in the prior art (however, as described above, the mutual authentication process has been executed by the card reader / writer 20 in the past, The method is executed by the host device 10).
また、上記の通り、“カード利用機器”とは、ここでは「上位機器10+カードリーダライタ20」であるが、物理的にICカードとの通信を行うのはカードリーダライタ20
である。また、尚、本例では、図1に示すように、ICカードとして非接触ICカード3を例に示しており、それ故、カードリーダライタ20は非接触ICカードリーダライタであることになるが、この例に限るものではなく、例えば接触型のICカードに係るICカードシステムに関しても本手法は適用可能である。但し、ここでは、非接触ICカード3に係るICカードシステムを例にして説明するものとする。尚、以下の説明では、非接触ICカード3を単にICカード3等という場合もある。
In addition, as described above, the “card using device” is “the higher-level device 10 + card reader / writer 20” here, but the card reader / writer 20 physically communicates with the IC card.
It is. In this example, as shown in FIG. 1, a non-contact IC card 3 is shown as an example of an IC card. Therefore, the card reader / writer 20 is a non-contact IC card reader / writer. The method is not limited to this example, and the present technique can also be applied to an IC card system related to a contact IC card, for example. However, here, an IC card system related to the non-contact IC card 3 will be described as an example. In the following description, the non-contact IC card 3 may be simply referred to as an IC card 3 or the like.
また、「非接触ICカード」は、カード型の形態に限らず、例えばICタグやリストバンド等の形態であってもよく、あるいはICカード機能内蔵の携帯電話等の形態であってもよく、よってここでは「非接触ICカード」という言葉は、これら各種形態を含むものであるものとする。そして、上記の通り、「ICカード」とは、上記「非接触ICカード」に限らず、接触型ICカードも含まれる意味である。 In addition, the “non-contact IC card” is not limited to a card type, and may be in the form of an IC tag or a wristband, or may be in the form of a mobile phone with a built-in IC card function, Therefore, here, the term “non-contact IC card” includes these various forms. As described above, the “IC card” means not only the “non-contact IC card” but also a contact IC card.
図2に示すように、カード利用機器は、定期的にカード捕捉コマンドを発しており、これに対する応答(カード捕捉応答)がICカード3から返って来ることでカードの存在を確認する。このカード捕捉コマンド、カード捕捉応答は、平文通信であってよく、特に暗号化等は必要ない。 As shown in FIG. 2, the card-using device periodically issues a card capture command, and a response to the card (card capture response) is returned from the IC card 3 to confirm the presence of the card. The card capture command and the card capture response may be plaintext communication and need not be encrypted.
カード利用機器は、カード捕捉応答を受信すると、予め決められて登録されているカードアクセス鍵を使って相互認証処理を実施する。この相互認証処理に係るカード利用機器−ICカード3間の通信は、図示の通り、カード利用機器は、まず、第一相互認証コマンドを送信して、これに対するICカード3からの第一相互認証応答を受信すると、続いて、第二相互認証コマンドを送信して、これに対するICカード3からの第二相互認証応答を受信する。 When the card using device receives the card capture response, the card using device performs a mutual authentication process using a card access key registered in advance. In the communication between the card using device and the IC card 3 related to the mutual authentication processing, as shown in the figure, the card using device first transmits a first mutual authentication command, and the first mutual authentication from the IC card 3 in response thereto. When the response is received, the second mutual authentication command is subsequently transmitted, and the second mutual authentication response from the IC card 3 is received.
上記相互認証処理は、カード利用機器、ICカード3の双方で生成した乱数を、カードアクセス鍵によって暗号化して交換することで、双方で有するカードアクセス鍵が一致していることを確認することで、互いに正当な接続相手であることを確認するものであり、その詳細な処理例は上記特許文献1等に記載されており、後に図3を参照して説明するものとする。そして、認証OKである場合には、カード利用機器、ICカード3の各々で、上記交換した乱数に基づいて以降の通信を秘匿暗号化するためのセッション鍵を生成する。
これより、認証成功後のカードデータアクセスの為のコマンド/応答(図示のカードアクセスコマンド、カードアクセス応答)は、このセッション鍵によって暗号化されて送受される。
The mutual authentication process is performed by encrypting and exchanging random numbers generated by both the card using device and the IC card 3 with the card access key, and confirming that the card access keys possessed by both are the same. Are mutually valid connection partners, and a detailed processing example thereof is described in the above-mentioned Patent Document 1 and the like, and will be described later with reference to FIG. If the authentication is OK, a session key for secretly encrypting subsequent communication is generated based on the exchanged random number in each of the card using device and the IC card 3.
Thus, the command / response for card data access after successful authentication (the card access command and the card access response shown in the figure) is encrypted by this session key and transmitted / received.
図3は、上記相互認証処理の一例を示す図である。ここでは、上記の通り、上記特許文献1等に記載の処理例を示している。
図示の処理は、概略的には、カード利用機器側で任意に生成された乱数RndAと、ICカード3側で任意に生成された乱数RndBが、カード利用機器、カード双方で有するカードアクセス鍵Ka、Kbによって暗号化されて交換されるものである。双方で有するカードアクセス鍵Ka、Kbが同じであれば、自身の生成した乱数が相手より戻ってくることから、互いに相手が有するカードアクセス鍵が自身の有するカードアクセス鍵と同じであることを確認し、カードアクセス鍵が同じであることから互いに正当な通信相手であると判断する。
FIG. 3 is a diagram showing an example of the mutual authentication process. Here, as described above, an example of processing described in Patent Document 1 and the like is shown.
The illustrated process generally includes a card access key Ka that a random number RndA arbitrarily generated on the card using device side and a random number RndB arbitrarily generated on the IC card 3 side are included in both the card using device and the card. , Encrypted and exchanged by Kb. If both card access keys Ka and Kb are the same, the other party's generated random number will be returned from the other party, so check that the other party's card access key is the same as the card access key they own. Since the card access keys are the same, it is determined that the communication partners are valid communication partners.
詳細には、まず、カード利用機器は乱数RndAを生成し(ステップS1)、このRndAを自己のカードアクセス鍵Kbによって暗号化して暗号化データ〔RndA〕Kbを生成し(ステップS2)、この〔RndA〕Kbを含む上記第一相互認証コマンドを生成して送信する(ステップS3)。 Specifically, first, the card using device generates a random number RndA (step S1), encrypts this RndA with its own card access key Kb to generate encrypted data [RndA] Kb (step S2), RndA] The first mutual authentication command including Kb is generated and transmitted (step S3).
この第一相互認証コマンドを受信したICカード3は、上記〔RndA〕Kbを自己のカードアクセス鍵Kbで復号化することでRndAを得て(ステップS21)、このRndAをメモリ等に記憶すると共に(ステップS22)、このRndAを自己のカードアクセス鍵Kaで暗号化して暗号化データ〔RndA〕Kaを生成する(ステップS23)。更に、任意の乱数RndBを生成して(ステップS24)、このRndBを自己のカードアクセス鍵Kaで暗号化して暗号化データ〔RndB〕Kaを生成する(ステップS25)。そして、これら生成した〔RndA〕Ka及び〔RndB〕Kaを含む上記第一相互認証応答を生成して送信する(ステップS26)。 The IC card 3 that has received this first mutual authentication command obtains RndA by decrypting [RndA] Kb with its own card access key Kb (step S21), and stores this RndA in a memory or the like. (Step S22) The RndA is encrypted with its own card access key Ka to generate encrypted data [RndA] Ka (Step S23). Further, an arbitrary random number RndB is generated (step S24), and this RndB is encrypted with its own card access key Ka to generate encrypted data [RndB] Ka (step S25). Then, the first mutual authentication response including the generated [RndA] Ka and [RndB] Ka is generated and transmitted (step S26).
カード利用機器は、上記第一相互認証応答を受信すると、まず、その〔RndA〕Kaを自己のカードアクセス鍵Kaで復号化して(ステップS4)、この復号化データを上記ステップS1で生成した(記憶しておく)RndAと比較して、一致するか否かを判定する(ステップS5)。もし不一致であれば認証失敗として本処理を終了する。一致する場合には、続いて、上記第一相互認証応答の〔RndB〕Kaを自己のカードアクセス鍵Kaで復号化してRndBを得て(ステップS6)、このRndBを自己のメモリ等に記憶すると共に(ステップS7)、このRndBを自己のカードアクセス鍵Kbによって暗号化して暗号化データ〔RndB〕Kbを生成し(ステップS8)、この〔RndB〕Kbを含む上記第二相互認証コマンドを生成して送信する(ステップS9)。 Upon receiving the first mutual authentication response, the card using device first decrypts [RndA] Ka with its own card access key Ka (step S4), and generates the decrypted data in step S1 (step S1). Compared with (stored) RndA, it is determined whether or not they match (step S5). If they do not match, this processing is terminated as an authentication failure. If they match, then [RndB] Ka of the first mutual authentication response is decrypted with its own card access key Ka to obtain RndB (step S6), and this RndB is stored in its own memory or the like. At the same time (step S7), this RndB is encrypted with its own card access key Kb to generate encrypted data [RndB] Kb (step S8), and the second mutual authentication command including this [RndB] Kb is generated. (Step S9).
この第二相互認証コマンドを受信したICカード3は、その〔RndB〕Kbを自己のカードアクセス鍵Kbで復号化して復号化データを得て(ステップS27)、この復号化データを上記ステップS24で生成した(記憶しておく)RndBと比較して一致するか否かを判定する(ステップS28)。もし、不一致であれば、上記第二相互認証応答として相互認証NG応答を送信し(不図示)、本処理は終了する。一致する場合には、上記第二相互認証応答として相互認証完了(OK)応答を送信すると共に(ステップS29)、上記ステップS22で記憶したRndAと上記ステップS24で生成した(記憶しておく)RndBとからセッション鍵Ksを生成する(ステップS30)。 The IC card 3 that has received the second mutual authentication command decrypts the [RndB] Kb with its own card access key Kb to obtain decrypted data (step S27). It is determined whether or not they match with the generated (stored) RndB (step S28). If they do not match, a mutual authentication NG response is transmitted as the second mutual authentication response (not shown), and this process ends. If they match, a mutual authentication completion (OK) response is transmitted as the second mutual authentication response (step S29), and RndA stored in step S22 and RndB generated (stored) in step S24. And generates a session key Ks (step S30).
また、カード利用機器側でも同様にして、上記相互認証完了応答を受信すると、認証成功したものとして、ステップS1で生成した(記憶しておく)RndAとステップS7で記憶した(記憶しておく)RndBとからセッション鍵Ksを生成する(ステップS10)。尚、セッション鍵Ksの生成方法は何でもよいが、カード利用機器側で生成するセッション鍵KsとICカード3側で生成するセッション鍵Ksとが同じとなるようにする(例えば単純にKs=RndA+RndB等とする)。 Similarly, when the mutual authentication completion response is received on the card-using device side, RndA generated (stored) in step S1 and stored (stored) in step S1 as having been successfully authenticated. A session key Ks is generated from RndB (step S10). The session key Ks can be generated by any method, but the session key Ks generated on the card using device side and the session key Ks generated on the IC card 3 side should be the same (for example, simply Ks = RndA + RndB etc. And).
この様に、カード利用機器とICカード3の両方で、認証処理の際に交換された乱数RndA、RndBよりセッション鍵Ksを生成し、以降の通信はセッション鍵Ksによって暗号化することで秘匿化して行われる。 In this way, both the card using device and the IC card 3 generate the session key Ks from the random numbers RndA and RndB exchanged at the time of authentication processing, and the subsequent communication is encrypted by encrypting with the session key Ks. Done.
すなわち、以降、当該セッションの期間内は、上記ステップS10、S30で生成したセッション鍵Ksを用いて暗号化通信を行う。すなわち、カード利用機器側では、上記カードアクセスコマンドを上記ステップS10で生成したセッション鍵Ksで暗号化して送信する。このコマンドを受信したICカード3は、上記ステップS30で生成したセッション鍵Ksを用いて復号化する。同様に、上記カードアクセス応答は自己のセッション鍵Ksを用いて暗号化して送信し、カード利用機器は自己のセッション鍵Ksを用いてこの応答を復号化する。 That is, thereafter, during the session period, encrypted communication is performed using the session key Ks generated in steps S10 and S30. That is, on the card using device side, the card access command is encrypted with the session key Ks generated in step S10 and transmitted. The IC card 3 that has received this command decrypts it using the session key Ks generated in step S30. Similarly, the card access response is encrypted and transmitted using its own session key Ks, and the card-using device decrypts this response using its own session key Ks.
このようにセッション鍵は、カード利用機器とICカード間で相互認証を行なう毎に生成されるため、相互認証を行なう毎に異なる鍵が生成されることから、セッション鍵は、カード利用機器とICカード間で相互認証が完了してから、ICカード3がカードリーダライタ20と通信可能な範囲から外れて動作を停止するまでの間に限定して有効な鍵情報
である。
As described above, since the session key is generated every time mutual authentication is performed between the card using device and the IC card, a different key is generated every time mutual authentication is performed. The key information is valid only after the mutual authentication is completed between the cards and before the IC card 3 is out of the communication range with the card reader / writer 20 and stops operating.
よって、各ICカードと通信する毎に異なるセッション鍵によって暗号化が行なわれるため、セッション鍵を不正取得することにより可能となる不正操作は、漏洩した鍵が使用される当該セッションの期間内(1つのICカードとの通信)に限られることになる。一方、カードアクセス鍵は一般的には同種の全てのICカードに共通であり、カードアクセス鍵が不正に取得された場合、当該ICカードと同種の他のICカードに対しても不正操作が行われる可能性がある(重大な不正操作が行われる可能性がある)。 Therefore, since encryption is performed with a different session key every time communication is performed with each IC card, an unauthorized operation that can be performed by unauthorized acquisition of the session key is performed within the period of the session in which the leaked key is used (1 Communication with one IC card). On the other hand, the card access key is generally common to all IC cards of the same type, and if the card access key is obtained illegally, the unauthorized operation is also performed on other IC cards of the same type as the IC card. (Serious manipulation may occur).
このため、セッション鍵はカードアクセス鍵と比較して、漏洩に対するリスクが少ないことになる。本手法では、セッション鍵はそのセッションの期間(認証成功後の通信の期間)カードリーダライタ20内に保持されるが、カードアクセス鍵はカードリーダライタ20には一切保持させないことで、カードリーダライタ20に対しては上位機器10のような鍵情報漏洩に対する強固な対策(耐タンパ等)を施さなくても、上記の重大な不正操作に対してはこれを防止することができる。 For this reason, the risk of leakage is less for the session key than for the card access key. In this method, the session key is held in the card reader / writer 20 during the session period (communication period after successful authentication), but the card reader / writer 20 does not hold any card access key. Even if a strong countermeasure (such as tamper resistance) for the key information leakage as in the host device 10 is not applied to 20, the above-mentioned serious illegal operation can be prevented.
図4は、本手法による上位機器−カードリーダライタ−ICカード間の通信シーケンス例である。
尚、特に図示及び説明を行わないが、図示の通信シーケンスが実行される前段の処理として、上位機器10−カードリーダライタ20間において相互認証が行われ、以降のリーダライタコマンド通信(上位機器10−カードリーダライタ20間の通信)は暗号化されて行われる場合もある。
FIG. 4 is an example of a communication sequence between the host device, the card reader / writer, and the IC card according to this method.
Although not shown or described in particular, mutual authentication is performed between the host device 10 and the card reader / writer 20 as a process preceding the execution of the illustrated communication sequence, and subsequent reader / writer command communication (the host device 10). -Communication between the card reader / writer 20) may be performed encrypted.
また、尚、通信シーケンス例、パケット構成例においては、ACK/NACKパケットについては言及していないが、通信仕様に準拠して付与されるケースと不要なケースがあるが、本発明においては、これは特に関係ないものであり、どちらであっても構わないし、特に説明しないものとする。 In the communication sequence example and packet configuration example, the ACK / NACK packet is not mentioned, but there are cases where it is given according to the communication specifications and cases where it is not necessary. Is not particularly relevant, either of which may be used and will not be described in particular.
また、尚、上位機器10−カードリーダライタ20間の通信はリーダライタコマンドによって行われ、カードリーダライタ20−ICカード間の通信はカードコマンドによって行われる。カードコマンドのパケット構成例は図5(a)に示し、リーダライタコマンドのパケット構成例は図6(a)に示す。これらについては、後に説明する。
図4において、まずカード捕捉に関する通信処理は従来と同様であってよい。
Further, communication between the host device 10 and the card reader / writer 20 is performed by a reader / writer command, and communication between the card reader / writer 20 and the IC card is performed by a card command. A packet configuration example of the card command is shown in FIG. 5A, and a packet configuration example of the reader / writer command is shown in FIG. 6A. These will be described later.
In FIG. 4, first, the communication processing related to card capture may be the same as that in the prior art.
すなわち、上位機器10は、ICカードとの通信を開始する際に、カードリーダライタ20に対して上記リーダライタコマンドによるカード捕捉コマンドを送信する。カードリーダライタ20は、このカード捕捉コマンドを受信すると、上記カードコマンドによるカード捕捉コマンドを継続的に送信する。 That is, the host device 10 transmits a card capture command based on the reader / writer command to the card reader / writer 20 when starting communication with the IC card. When receiving the card capture command, the card reader / writer 20 continuously transmits a card capture command based on the card command.
ICカードが非接触ICカード3の場合、カードリーダライタ20による通信可能範囲にICカード3が入ると、上記カードコマンドによるカード捕捉コマンドを受信したICカード3は、カードコマンドによるカード捕捉応答をカードリーダライタ20に返信する。ICカード3からのカード捕捉応答を受信したカードリーダライタ20は、上位機器10に対して、リーダライタコマンドによるカード捕捉応答を送信する。 When the IC card is a contactless IC card 3, when the IC card 3 enters the communicable range of the card reader / writer 20, the IC card 3 that has received the card capture command by the card command sends a card capture response by the card command to the card. A reply is sent to the reader / writer 20. The card reader / writer 20 that has received the card capture response from the IC card 3 transmits a card capture response based on the reader / writer command to the higher-level device 10.
尚、本例では、上位機器10からのカード捕捉コマンド(リーダライタコマンド)を受信したカードリーダライタ20は、カード捕捉コマンド(カードコマンド)を、ICカード3からの応答が返って来るまで複数回送信し続けているが、1回のリーダライタコマンド受信に対して、カードコマンドを1回のみ発行する場合もある。このような、1つのリーダライタコマンドに対して、対応するカードコマンドを1回のみ送信する処理や、複数
回あるいは複数種のコマンドを組合わせて送信するような処理は、カードリーダライタに搭載される機能に依存するが、本発明の本質には影響しない。
In this example, the card reader / writer 20 that has received the card capture command (reader / writer command) from the host device 10 sends the card capture command (card command) multiple times until the response from the IC card 3 is returned. Although it continues to transmit, a card command may be issued only once in response to one reader / writer command reception. Such a process for transmitting a corresponding card command only once for a single reader / writer command, or a process for transmitting multiple times or a combination of multiple types of commands, is mounted on the card reader / writer. It does not affect the essence of the present invention.
尚、これ以降の説明では、上記のような「リーダライタコマンドによる」、「カードコマンドによる」等の説明は逐一述べないが、上述したように、上位機器10−カードリーダライタ20間の通信は全てリーダライタコマンドで行われ、カードリーダライタ20−ICカード間の通信は全てカードコマンドで行われる。 In the following explanation, explanations such as “by reader / writer command” and “by card command” will not be given one by one. However, as described above, communication between the host device 10 and the card reader / writer 20 is not performed. All communication is performed by a reader / writer command, and all communication between the card reader / writer 20 and the IC card is performed by a card command.
カードの捕捉に成功した上位機器10は、捕捉したICカード3との相互認証処理を、カードリーダライタ20を介して行う。上位機器10は自身が保持しているカードアクセス鍵を使用して、図3で示した例のような手順で、ICカード3との間で相互認証処理を実施する。 The host device 10 that has successfully captured the card performs mutual authentication processing with the captured IC card 3 via the card reader / writer 20. The host device 10 uses the card access key held by itself to perform mutual authentication processing with the IC card 3 according to the procedure shown in FIG.
その際、上位機器10とICカード3の間にはカードリーダライタ20が存在しているが、例えば上位機器10からの相互認証コマンドに対してカードリーダライタ20は、リーダライタコマンドからカードコマンドへの変換とパラメータ部(特に暗号化データ;例えば上記〔RndB〕Kb等)の中継は行うが、このパラメータ部自体には関与せずに(変換などしないで)そのままICカード3に引き渡す動作を実行する。ICカード3からの相互認証応答受信時も同様にして、カードリーダライタ20は、カードコマンドからリーダライタコマンドへの変換とパラメータ部の中継は行うが、このパラメータ部自体には関与せずにそのまま上位機器10に引き渡す動作を実行する。これらについては、後に詳細に説明する。 At this time, the card reader / writer 20 exists between the higher level device 10 and the IC card 3. For example, the card reader / writer 20 changes the reader / writer command to the card command in response to the mutual authentication command from the higher level device 10. Conversion and parameter part (especially encrypted data; for example, [RndB] Kb etc.) are relayed, but without being involved in the parameter part itself (without conversion or the like), the operation is directly transferred to the IC card 3 To do. Similarly, when the mutual authentication response is received from the IC card 3, the card reader / writer 20 performs conversion from the card command to the reader / writer command and relays the parameter portion. An operation of handing over to the higher-level device 10 is executed. These will be described in detail later.
このような動作を行うことで、カードリーダライタ20がカードアクセス鍵を保持していなくても、上位機器10−ICカード3間での相互認証処理を実行することが可能となる。そして特に、カードアクセス鍵がカードリーダライタ20に渡されることなく、カードアクセス鍵で暗号化された乱数だけがカードリーダライタ20を介してICカード3と上位機器10間で交換されるため、カードリーダライタ20からカードアクセス鍵が漏洩するリスクが無くなる。 By performing such an operation, it is possible to execute the mutual authentication process between the host device 10 and the IC card 3 even if the card reader / writer 20 does not hold the card access key. In particular, since the card access key is not passed to the card reader / writer 20, only the random number encrypted with the card access key is exchanged between the IC card 3 and the host device 10 via the card reader / writer 20. There is no risk of the card access key leaking from the reader / writer 20.
尚、既に図3で説明しているが、上記「上位機器10からの相互認証コマンド」は、図4に示す第一相互認証コマンドと第二相互認証コマンドであり、これら各コマンドに応じてICカード3は図示の第一相互認証応答、第二相互認証応答を返信するものである。 As already described in FIG. 3, the “mutual authentication command from the host device 10” is the first mutual authentication command and the second mutual authentication command shown in FIG. The card 3 sends back the first mutual authentication response and the second mutual authentication response shown in the figure.
一般的に、非接触ICカードに電子マネー等の価値情報を記憶させて決済処理に利用する場合、ICカード利用者が自己のICカードをカードリーダライタ20に翳す(タッチする)ことで決済処理が行われる為、カードリーダライタ20はレジ横等の顧客の手が届き易い場所に置かれている場合が多い。更に、カードリーダライタ20は、通常、少なくとも上位機器10に比べると非常に小型である。一方、上位機器10は、具体例は例えばPOSレジ端末であり、カードリーダライタ20と比べると大型の機器であり、また金銭を保管する機能を有するため、盗難に対する対策が施されていることが一般的である。また、上記カードリーダライタ20のようにICカード利用者に操作させる必要はないので、ICカード利用者の目に触れない場所に設置することが可能である。このように、カードリーダライタ20は、上位機器10に比べて盗まれ易い状況にある。 Generally, when value information such as electronic money is stored in a contactless IC card and used for payment processing, the IC card user pays his IC card to the card reader / writer 20 (touches) for payment. Since the processing is performed, the card reader / writer 20 is often placed in a place where a customer can easily reach, such as the cash register. Furthermore, the card reader / writer 20 is usually very small compared to at least the host device 10. On the other hand, the host device 10 is, for example, a POS cash register terminal, which is a larger device than the card reader / writer 20 and has a function of storing money, so that measures against theft may be taken. It is common. Further, unlike the card reader / writer 20, it is not necessary for the IC card user to operate, so that it can be installed in a place where the IC card user cannot see. Thus, the card reader / writer 20 is more likely to be stolen than the host device 10.
従来では、上位機器10とカードリーダライタ20の両方に対しても耐タンパ筐体や耐タンパメモリ等による強固なセキュリティ対策を施していたが、カードリーダライタ20が盗まれた場合、カードリーダライタ20からカードアクセス鍵が漏洩する可能性があった(内部に保持されているので、可能性は0ではない)。一方、本手法では、カードリーダライタ20が(たとえ一時的であっても)カードアクセス鍵を保持することは無いので
、たとえカードリーダライタ20が盗まれても、カードリーダライタ20からカードアクセス鍵が漏洩する可能性はない。更に、本手法ではカードリーダライタ20に対して上記の強固なセキュリティ対策を施す必要はないので、カードリーダライタ20に関するコスト削減効果も得られる。
Conventionally, both the host device 10 and the card reader / writer 20 have been provided with strong security measures such as a tamper-resistant housing and a tamper-resistant memory. However, if the card reader / writer 20 is stolen, the card reader / writer There is a possibility that the card access key is leaked from 20 (the possibility is not 0 because it is held inside). On the other hand, in this method, since the card reader / writer 20 does not hold the card access key (even temporarily), even if the card reader / writer 20 is stolen, the card reader / writer 20 does not hold the card access key. There is no possibility of leakage. Furthermore, in this method, since it is not necessary to apply the above-mentioned strong security measures to the card reader / writer 20, the cost reduction effect regarding the card reader / writer 20 can also be obtained.
尚、図1に示す構成例では、1台の上位機器10に対して1台のカードリーダライタ20が接続されているが(1対1の関係)、この例に限るものではなく、1台の上位機器10に対して複数台のカードリーダライタ20が接続された構成であってもよい(1対多の関係)。この様な構成の場合には、従来であれば複数台のカードリーダライタ20全てに対してそれぞれに強固なセキュリティ対策を施す必要があったが、本手法では必要ないので、上記コスト削減効果が更に顕著なものとなる。さらに、相互認証後のセッション鍵はカードリーダライタ20に引き渡すため、1台の上位機器10で複数のカードリーダライタ20を制御する場合であっても、上位機器10の処理負荷を軽減させる効果が顕著である。 In the configuration example shown in FIG. 1, one card reader / writer 20 is connected to one host device 10 (one-to-one relationship), but the present invention is not limited to this example. A plurality of card reader / writers 20 may be connected to the higher-level device 10 (one-to-many relationship). In the case of such a configuration, conventionally, it has been necessary to take a strong security measure for each of a plurality of card reader / writers 20, but this method is not necessary, so the cost reduction effect described above can be achieved. Even more noticeable. Furthermore, since the session key after mutual authentication is delivered to the card reader / writer 20, even when a plurality of card reader / writers 20 are controlled by a single higher-level device 10, the processing load of the higher-level device 10 can be reduced. It is remarkable.
尚、上位機器10に関しては、カードアクセス鍵のバージョンアップや期限切れ等の為に管理サーバ2がネットワーク1を介して新たなカードアクセス鍵を上位機器10に配信してくる場合がある。この為、従来のようにカードアクセス鍵をカードリーダライタが保持する構成であっても、上位機器に上記配信時にカードアクセス鍵が存在することになる等の理由により、上位機器に対して耐タンパ筐体や耐タンパメモリ等による強固なセキュリティ対策を施していた。 As for the higher level device 10, the management server 2 may distribute a new card access key to the higher level device 10 via the network 1 due to version upgrade or expiration of the card access key. For this reason, even if the card reader / writer holds the card access key as in the conventional case, the card access key is present in the host device at the time of the above distribution, and therefore, the tamper resistant against the host device. Strong security measures such as a case and tamper-resistant memory were taken.
この様に、従来では、上位機器とカードリーダライタの両方に強固なセキュリティ対策を施す必要があったが、本手法によればカードリーダライタに対してはこの様な対策は必要なくなる。 Thus, in the past, it was necessary to take strong security measures for both the host device and the card reader / writer, but according to this method, such measures are not necessary for the card reader / writer.
図4の説明を続ける。
上位機器10は、上述した動作によりICカード3との相互認証処理を行い、相互認証に成功すると(ケース1とする)、あるいはその前に(ケース2とする)、相互認証処理において得られた乱数(上記RndA、RndB)に基づいて、上記セッション鍵Ksを生成する。そして、生成したセッション鍵Ksをカードリーダライタ20へ送信する。
The description of FIG. 4 is continued.
The host device 10 performs mutual authentication processing with the IC card 3 by the above-described operation, and when mutual authentication is successful (case 1) or before (case 2), the mutual authentication processing is obtained. The session key Ks is generated based on random numbers (RndA, RndB). Then, the generated session key Ks is transmitted to the card reader / writer 20.
すなわち、上記ケース1の場合、上位機器10は、相互認証に成功すると、上記セッション鍵Ksを生成し、これを図4に示すセッション鍵セットコマンドに含めて、カードリーダライタ20へ送信する。これを受信したカードリーダライタ20は、セッション鍵Ksを正常受信・セットしたことを通知する為のセッション鍵セット応答を返信する。 That is, in the case 1 described above, when the mutual authentication is successful, the host device 10 generates the session key Ks and includes it in the session key set command shown in FIG. 4 and transmits it to the card reader / writer 20. Upon receiving this, the card reader / writer 20 returns a session key set response for notifying that the session key Ks has been normally received / set.
一方、上記ケース2の方法を用いる場合には、上記セッション鍵セットコマンド/応答の送受信は行わない。代わりに、第二相互認証コマンドにセッション鍵Ksを含めて送信する。すなわち、ケース2の場合、相互認証処理の途中の第二相互認証コマンド送信の段階で、上位機器10はセッション鍵Ksを生成してこれをカードリーダライタ20に渡す。この場合、未だ、相互認証成功が確定しているわけではないが、相互認証が成功することを前提として見込みで、セッション鍵Ksを生成してカードリーダライタ20に引き渡す。よって、その後に、もし相互認証が失敗した場合には(第二相互認証コマンドに対してICカード3が認証成功の応答を返さなかった場合等)、引き渡したセッション鍵は無効となる。 On the other hand, when the method of case 2 is used, the session key set command / response is not transmitted / received. Instead, the second mutual authentication command is transmitted including the session key Ks. That is, in case 2, at the stage of transmitting the second mutual authentication command in the middle of the mutual authentication process, the higher-level device 10 generates a session key Ks and passes it to the card reader / writer 20. In this case, although the mutual authentication success is not yet confirmed, the session key Ks is generated and delivered to the card reader / writer 20 on the assumption that the mutual authentication is successful. Therefore, if the mutual authentication fails thereafter (for example, when the IC card 3 does not return an authentication success response to the second mutual authentication command), the delivered session key becomes invalid.
上記ケース1、ケース2の何れかの方法でカードリーダライタ20にセッション鍵Ksを渡し、相互認証成功により正当なカードであることを確認した上位機器10は、ICカード3からのデータリード、ICカード3へのデータライト等のカードアクセス処理を、カ
ードリーダライタ20で実行させるために、図4に示すカードアクセスコマンド(リードコマンドやライトコマンド等)を、カードリーダライタ20へ送信する。
The host device 10 that has passed the session key Ks to the card reader / writer 20 by either of the above methods 1 and 2 and confirmed that the card is a valid card by the success of the mutual authentication, reads the data from the IC card 3 and the IC In order for the card reader / writer 20 to execute card access processing such as data write to the card 3, the card access command (read command, write command, etc.) shown in FIG. 4 is transmitted to the card reader / writer 20.
上記カードアクセスコマンドを受信したカードリーダライタ20は、上記何れかの方法で上位機器10より入手したセッション鍵Ksによって、ICカード3へのカードアクセスコマンドを暗号化する。ここで、相互認証成功した場合、ICカード3側においても上記上位機器10と同様に上記乱数(上記RndA、RndB)に基づくセッション鍵Ksの生成を行える。これより、上記カードアクセスコマンドを受信したICカード3は、これを自己のセッション鍵Ksを用いて復号化する。そして、このカードアクセスコマンドに応じた処理を実行し(指定された領域からのデータ読出し、あるいは指定された領域へのデータ書き込み等)、この処理結果に基づき、更に自己のセッション鍵Ksを用いて、暗号化されたカードアクセス応答を生成して送信する。これを受信したカードリーダライタ20は、このカードアクセス応答を自己のセッション鍵Ksを用いて復号化する。 The card reader / writer 20 that has received the card access command encrypts the card access command to the IC card 3 using the session key Ks obtained from the higher-level device 10 by any one of the methods described above. Here, when the mutual authentication is successful, the session key Ks based on the random number (the RndA and RndB) can be generated on the IC card 3 side as well as the host device 10. Thus, the IC card 3 that has received the card access command decrypts it using its own session key Ks. Then, processing corresponding to this card access command is executed (reading data from a specified area or writing data to a specified area), and based on the processing result, further using its own session key Ks , Generate and send an encrypted card access response. Receiving this, the card reader / writer 20 decrypts this card access response using its own session key Ks.
上述したように、カードリーダライタ20は、ICカード3からのデータ・リード、あるいはICカード3へのデータ・ライト等のカードアクセス処理を、上位機器10からの指示に従って、セッション鍵Ksを用いた暗号化通信により実行する。 As described above, the card reader / writer 20 uses the session key Ks for card access processing such as data read from the IC card 3 or data write to the IC card 3 in accordance with an instruction from the host device 10. Execute by encrypted communication.
尚、図4に示す例では、カードリーダライタ20は、上位機器10からの1つのリーダライタコマンドに対して1つのカードコマンドを生成して送信するが、この例に限らない。例えば、カードリーダライタ20に、予め1つのリーダライタコマンドに対して複数種類のカードコマンドを登録しておくことで、カードリーダライタ20が、受信したリーダライタコマンドに対応する複数種類のカードコマンドを、順次、ICカード3に送信する構成としてもよい。 In the example shown in FIG. 4, the card reader / writer 20 generates and transmits one card command in response to one reader / writer command from the higher-level device 10, but the present invention is not limited to this example. For example, by registering a plurality of types of card commands for one reader / writer command in advance in the card reader / writer 20, the card reader / writer 20 can output a plurality of types of card commands corresponding to the received reader / writer command. Alternatively, the information may be sequentially transmitted to the IC card 3.
上記構成の場合、例えば、図4に示す上位機器10が送信するカードアクセスコマンドは、上述したリードコマンドまたはライトコマンドを意味するものではなく、文字通りの“カードアクセスコマンド”を意味するものであるとし、これを受信したカードリーダライタ20は、不図示のリードコマンド送信とその応答受信、ライトコマンド送信とその応答の受信を、連続的に実行する等の処理が考えられる。 In the case of the above configuration, for example, the card access command transmitted by the host device 10 shown in FIG. 4 does not mean the above-described read command or write command, but literally means “card access command”. The card reader / writer 20 that has received this can consider processing such as continuously executing transmission of a read command (not shown) and reception of a response thereof, and transmission of a write command and reception of the response thereof.
図5(a)は上記“カードコマンド”のパケット構成例である。つまり、カードリーダライタ20−ICカード3間の通信に用いられるパケットの構成例である。尚、この構成例に限定されるものではなく、通常は使用するICカードの通信規格に準拠した構成となる。 FIG. 5A shows a packet configuration example of the “card command”. That is, this is a configuration example of a packet used for communication between the card reader / writer 20 and the IC card 3. Note that the present invention is not limited to this configuration example, and usually has a configuration conforming to the communication standard of the IC card to be used.
図5(a)に示すカードコマンドパケット30は、通信データの通信タイミングの同期を取るためのプリアンブル部31、パケットの先頭部を検出するための同期コード部32、カードコマンドのデータ量を示すデータ長33、実際にカードリーダライタ20−ICカード3間で交換する各種コマンドデータ/応答データが格納されているカードコマンド部34、通信途中でパケットデータがノイズ等で変化しなかったかを確認するためのチェックコード35、通信の最後に付与されるポストアンブル部36等から構成されている。 A card command packet 30 shown in FIG. 5A includes a preamble part 31 for synchronizing communication timing of communication data, a synchronization code part 32 for detecting the head part of the packet, and data indicating the data amount of the card command. A length 33, a card command unit 34 in which various command data / response data to be actually exchanged between the card reader / writer 20 and the IC card 3 are stored. In order to confirm whether packet data has not changed due to noise or the like during communication. The check code 35, the postamble part 36 added at the end of communication, and the like.
図4に示すカードリーダライタ20−ICカード3間で送受信される各種コマンド/応答は、上記カードコマンドパケット30において上記カードコマンド部34に格納されるコマンドデータ/応答データとして、図5(b)〜(i)に示す各種コマンドデータ/応答データの何れかが格納されたものである。 Various commands / responses transmitted / received between the card reader / writer 20 and the IC card 3 shown in FIG. 4 are represented as command data / response data stored in the card command section 34 in the card command packet 30 as shown in FIG. Any one of the various command data / response data shown in (i) is stored.
例えば、図4に示すカードリーダライタ20がICカード3へ送信する「カード捕捉コマンド」は、上記カードコマンドパケット30において上記カードコマンド部34に図5
(b)に示すカード捕捉コマンド40が格納されたものである。他の各種コマンド/応答についても同様であり、以下の図5(c)〜(i)の説明の際に説明するが、逐一説明しないが何れもカードリーダライタ20−ICカード3間の通信におけるコマンド/応答である。
For example, the “card capture command” transmitted from the card reader / writer 20 shown in FIG. 4 to the IC card 3 is sent to the card command section 34 in the card command packet 30 as shown in FIG.
The card capture command 40 shown in (b) is stored. The same applies to other various commands / responses, which will be described in the following description of FIGS. 5C to 5I. However, although not described one by one, none of them are in communication between the card reader / writer 20 and the IC card 3. Command / response.
以下、図5(b)〜(i)に示す各種コマンドデータ/応答データの構成例について説明する。尚、これらの構成例は一例であり、この例に限るものではない。
まず、図5(b)に示すカード捕捉コマンド40は、コマンド種別を示すコマンドコード(ここではカード捕捉コマンド・コマンドコード41)と、捕捉するICカード3の属性種別等を指定するためのパラメータであるコマンドパラメータ42等から構成されている。
Hereinafter, configuration examples of various command data / response data shown in FIGS. 5B to 5I will be described. In addition, these structural examples are examples and are not limited to this example.
First, the card capture command 40 shown in FIG. 5 (b) is a command code indicating a command type (here, a card capture command / command code 41) and parameters for designating the attribute type of the IC card 3 to be captured. It consists of a certain command parameter 42 and the like.
コマンドパラメータ42は、例えば、捕捉したいカード種別を事前に指定することで、初めから応答させるICカード3を絞り込むために指定するパラメータとなる。尚、非接触ICカードを対象とした場合には、本パラメータ以外に、複数のICカードからの一斉応答に対応するための応答タイムスロット数の指定等が含まれる場合があるが、本発明の本質には影響しないため、詳細説明は割愛する。 The command parameter 42 is a parameter that is specified to narrow down the IC cards 3 to be responded from the beginning by, for example, specifying the card type to be captured in advance. In the case of targeting a non-contact IC card, in addition to this parameter, designation of the number of response time slots for responding to simultaneous responses from a plurality of IC cards may be included. The detailed explanation is omitted because it does not affect the essence.
上記カード捕捉コマンドに対するICカード3からの応答である、図4に示すカード捕捉応答は、上記カードコマンドパケット30において上記カードコマンド部34に図5(c)に示すカード捕捉応答50が格納されたものである。 The card capture response shown in FIG. 4, which is a response from the IC card 3 to the card capture command, is stored in the card command packet 34 in the card command portion 34 as shown in FIG. Is.
図5(c)に示すカード捕捉応答50は、カード捕捉応答であることを示す応答コード(カード捕捉コマンド応答コード51)、カードID52で構成されている。カードIDは予め各ICカード3毎に一意に設定・記憶されている識別コードであり、上記カードID52は当該カード捕捉応答50のパケットの送信元のICカード3自身のカードIDである。カードID52は、カード捕捉コマンドに応答するICカード3が自身を識別させるために付与するものであり、上位機器10がICカード3との相互認証時に相互認証する対象となるICカード3を指定するための識別情報となる(例えばこのカードID52を後述する認証先カードID62とする)。 The card capture response 50 shown in FIG. 5C is composed of a response code (card capture command response code 51) indicating a card capture response and a card ID 52. The card ID is an identification code that is uniquely set and stored for each IC card 3 in advance, and the card ID 52 is the card ID of the IC card 3 itself that is the transmission source of the card capture response 50 packet. The card ID 52 is assigned to allow the IC card 3 responding to the card capture command to identify itself, and designates the IC card 3 that is the target of mutual authentication when the host device 10 performs mutual authentication with the IC card 3. (For example, this card ID 52 is an authentication destination card ID 62 described later).
図4に示す第一相互認証コマンドは、上記カードコマンドパケット30において上記カードコマンド部34に図5(d)に示す第一相互認証コマンド60が格納されたものである。 The first mutual authentication command shown in FIG. 4 is obtained by storing the first mutual authentication command 60 shown in FIG. 5D in the card command part 34 in the card command packet 30.
図5(d)に示す第一相互認証コマンド60は、コマンド種別を示すコマンドコード(ここでは第一相互認証コマンド・コマンドコード61)、相互認証するICカード3を指定するための認証先カードID62、ICカード3と認証する際の条件を示す認証用条件情報63、認証用暗号化データA64(図3の例では上記〔RndA〕Kb(乱数RndAをカードアクセス鍵Kbで暗号化したデータ))から構成されている。 The first mutual authentication command 60 shown in FIG. 5D includes a command code indicating the command type (here, the first mutual authentication command / command code 61), and an authentication destination card ID 62 for designating the IC card 3 to be mutually authenticated. Authentication condition information 63 indicating the conditions for authenticating with the IC card 3, and encrypted data A64 for authentication (in the example of FIG. 3, [RndA] Kb (data obtained by encrypting the random number RndA with the card access key Kb)) It is composed of
上記認証用条件情報63とは、ICカード3と相互認証する際に当該ICカード3の如何なる情報に対して認証を取るかを指定するためのパラメータであり、例えばカード内のどのサービスブロックをアクセスするための認証を実施するかを、指定するためのデータとなる。 The authentication condition information 63 is a parameter for designating what information of the IC card 3 is to be authenticated when mutual authentication with the IC card 3 is performed. For example, which service block in the card is accessed This is data for designating whether to perform authentication for
図4に示す第一相互認証応答は、上記カードコマンドパケット30において上記カードコマンド部34に図5(e)に示す第一相互認証応答70が格納されたものである。
図5(e)に示す第一相互認証応答70は、第一相互認証コマンドに対する応答であることを示す応答コード(第一相互認証コマンド応答コード71)、認証用暗号化データB
72(図3の例の〔RndA〕Ka(乱数RndAをカードアクセス鍵Kaで暗号化したデータ))、及び認証用暗号化データC73(図3の例の〔RndB〕Ka(乱数RndBをカードアクセス鍵Kaで暗号化したデータ))から構成されている。
The first mutual authentication response shown in FIG. 4 is obtained by storing the first mutual authentication response 70 shown in FIG. 5E in the card command part 34 in the card command packet 30.
The first mutual authentication response 70 shown in FIG. 5 (e) is a response code (first mutual authentication command response code 71) indicating that it is a response to the first mutual authentication command, and encrypted data B for authentication.
72 ([RndA] Ka in the example of FIG. 3 (data obtained by encrypting the random number RndA with the card access key Ka)) and encrypted data C73 for authentication ([RndB] Ka in the example of FIG. 3 (card access to the random number RndB) Data encrypted with key Ka)).
尚、図示していないが、第一相互認証応答70や後述する第二相互認証応答90にも上記カードID52が含まれていてもよい。同様に、後述する第二相互認証コマンド80にも(図示していないが)上記認証先カードID62が含まれていてもよい。 Although not shown, the card ID 52 may also be included in the first mutual authentication response 70 and the second mutual authentication response 90 described later. Similarly, the second mutual authentication command 80 described later may include the authentication destination card ID 62 (not shown).
図4に示す第二相互認証コマンドは、上記カードコマンドパケット30において上記カードコマンド部34に図5(f)に示す第二相互認証コマンド80が格納されたものである。 The second mutual authentication command shown in FIG. 4 is obtained by storing the second mutual authentication command 80 shown in FIG. 5 (f) in the card command part 34 in the card command packet 30.
図5(f)に示す第二相互認証コマンド80は、コマンド種別を示すコマンドコード(ここでは第二相互認証コマンド・コマンドコード81)、認証用暗号化データD82(図3の例の〔RndB〕Kb(乱数RndBをカードアクセス鍵Kbで暗号化したデータ))から構成されている。 The second mutual authentication command 80 shown in FIG. 5 (f) includes a command code indicating a command type (here, the second mutual authentication command / command code 81), authentication encrypted data D82 ([RndB] in the example of FIG. 3). Kb (data obtained by encrypting the random number RndB with the card access key Kb)).
図4に示す第二相互認証応答は、上記カードコマンドパケット30において上記カードコマンド部34に図5(g)に示す第二相互認証応答90が格納されたものである。
図5(g)に示す第二相互認証応答90は、第二相互認証コマンドに対する応答であることを示す応答コード(第二相互認証コマンド応答コード91)、ICカード3による認証結果を示す(認証OK/NG等)認証結果データ92等から構成されている。
The second mutual authentication response shown in FIG. 4 is obtained by storing the second mutual authentication response 90 shown in FIG. 5G in the card command part 34 in the card command packet 30.
The second mutual authentication response 90 shown in FIG. 5G shows a response code (second mutual authentication command response code 91) indicating that the response is for the second mutual authentication command, and an authentication result by the IC card 3 (authentication). OK / NG etc.) authentication result data 92 etc.
図4に示すカードアクセスコマンド(ここでは仮にカードリードコマンドであるものとする)は、上記カードコマンドパケット30において上記カードコマンド部34に図5(h)に示すカードアクセスコマンド100が格納されたものである。 The card access command shown in FIG. 4 (here, it is assumed that it is a card read command) is the card command packet 30 in which the card access command 100 shown in FIG. It is.
図5(h)に示すカードアクセスコマンド100(カードリードコマンド例)は、コマンド種別を示すコマンドコード(カードリードコマンド・コマンドコード101)、読出し対象を指定するためのリード対象部指定情報102等から構成されている。この指定情報102は、ICカード3内のどの情報を読み出したいかを指定するための情報で、例えばカード内のメモリにおける読み出したいブロックのブロック番号等を指定する。尚、コマンドコード以外は一般的にはセッション鍵によって暗号化されて秘匿される。よって、上記リード対象部指定情報102は上記セッション鍵Ksによって暗号化された暗号化データである。 A card access command 100 (card read command example) shown in FIG. 5 (h) includes a command code indicating a command type (card read command / command code 101), read target portion specifying information 102 for specifying a read target, and the like. It is configured. This designation information 102 is information for designating which information in the IC card 3 is to be read, and designates, for example, the block number of the block to be read in the memory in the card. It should be noted that other than the command code is generally encrypted and concealed with a session key. Therefore, the read target part designation information 102 is encrypted data encrypted with the session key Ks.
図5(h)に示すカードアクセスコマンド100に対する応答であるカードアクセス応答110の構成例を図5(i)に示す。尚、図示のカードアクセス応答110は上記カードコマンドパケット30において上記カードコマンド部34に格納される。 A configuration example of a card access response 110 that is a response to the card access command 100 shown in FIG. 5 (h) is shown in FIG. 5 (i). The illustrated card access response 110 is stored in the card command unit 34 in the card command packet 30.
図5(i)に示すカードアクセス応答110は、上記カードリードコマンドに対する応答であることを示す応答コード(カードリードコマンド・応答コード111)、ICカード3から読み出されたデータであるリードデータ112等から構成されている。尚、カードアクセスコマンドと同様に、応答コード以外はセッション鍵によって暗号化されて秘匿される場合が一般的である。よって、上記リードデータ112は、ICカード3がリードデータを自己のセッション鍵Ksによって暗号化した暗号化データである。 The card access response 110 shown in FIG. 5 (i) is a response code (card read command / response code 111) indicating that it is a response to the card read command, and read data 112 that is data read from the IC card 3. Etc. As in the case of the card access command, other than the response code is generally encrypted by a session key and kept secret. Therefore, the read data 112 is encrypted data obtained by the IC card 3 encrypting the read data with its own session key Ks.
図6(a)は上記“リーダライタコマンド”のパケット構成例である。つまり、カードリーダライタ20−上位機器10間の通信に用いられるパケットの構成例である。尚、この構成例に限定されるものではなく、一般的にはカードリーダライタ20と上位機器10
間の通信インタフェイスの規格に適したパケット構成が適用される。
FIG. 6A shows a packet configuration example of the “reader / writer command”. That is, this is a configuration example of a packet used for communication between the card reader / writer 20 and the host device 10. Note that the present invention is not limited to this configuration example. In general, the card reader / writer 20 and the host device 10 are not limited.
A packet configuration suitable for the communication interface standard is applied.
図6(a)に示す例のリーダライタコマンドパケット120は、通信データの通信タイミングの同期を取るためのプリアンブル部121、パケットの先頭部を示すスタートコード部122、リーダライタコマンドのデータ量を示すデータ長123、実際に上位機器10とカードリーダライタ20間で交換する各種コマンドデータ/応答データが格納されているリーダライタコマンド部124、通信途中でパケットデータがノイズ等で変化しなかったかを確認するためのチェックコード125、通信の最後に付与されるポストアンブル部126等から構成されている。 The reader / writer command packet 120 in the example shown in FIG. 6A indicates a preamble portion 121 for synchronizing communication timing of communication data, a start code portion 122 indicating the head portion of the packet, and a data amount of the reader / writer command. Data length 123, reader / writer command unit 124 storing various command data / response data to be exchanged between the host device 10 and the card reader / writer 20, and whether packet data has not changed due to noise during communication For example, a check code 125, a postamble unit 126 added at the end of communication, and the like.
ここで、カードリーダライタ20による上記カードコマンドからリーダライタコマンドへの変換は、上記図5(a)に示すパケット構成から上記図6(a)に示すパケット構成への変換である。同様に、カードリーダライタ20による上記リーダライタコマンドからカードコマンドへの変換は、上記図6(a)に示すパケット構成から上記図5(a)に示すパケット構成への変換である。 Here, the conversion from the card command to the reader / writer command by the card reader / writer 20 is the conversion from the packet configuration shown in FIG. 5 (a) to the packet configuration shown in FIG. 6 (a). Similarly, the conversion from the reader / writer command to the card command by the card reader / writer 20 is the conversion from the packet configuration shown in FIG. 6 (a) to the packet configuration shown in FIG. 5 (a).
この変換処理に関しては、カードリーダライタ20はそもそも従来よりICカード3とは上記図5(a)に示すフォーマットのパケットで通信しており、同様に上位機器10とは図6(a)に示すフォーマットのパケットで通信しているので、単に例えばICカード3からの図5(a)のフォーマットのパケットを受信したら、その内容データを図6(a)のフォーマットのパケットにより上位機器10へ送信すればよい。内容データとは、例えば上記データ長33、カードコマンド部34であり、これらをデータ長123、リーダライタコマンド部124として格納すればよい。但し、この例に限定されるものではない。尚、特にカードコマンド部34/リーダライタコマンド部124における上記コマンドコード/応答コード以外の部分を、パラメータ部という場合もある。あるいは、そのなかでも特に暗号化データの部分を、パラメータ部という場合もある。 With regard to this conversion processing, the card reader / writer 20 originally communicated with the IC card 3 in the format shown in FIG. 5A, and similarly with the host device 10 as shown in FIG. 6A. Since communication is performed using a format packet, for example, when a packet of the format shown in FIG. 5A is received from the IC card 3, the content data is transmitted to the host device 10 using the packet of the format shown in FIG. 6A. That's fine. The content data is, for example, the data length 33 and the card command section 34, and these may be stored as the data length 123 and the reader / writer command section 124. However, it is not limited to this example. In particular, the part other than the command code / response code in the card command part 34 / reader / writer command part 124 may be referred to as a parameter part. Alternatively, in particular, the encrypted data portion may be referred to as a parameter portion.
また、同じコマンド/応答であっても、カードコマンド部34におけるコマンドコード/応答コードと、リーダライタコマンド部124におけるコマンドコード/応答コードが同じであるとは限らないので、この場合にはコマンドコード/応答コードの変換も行う。 Even in the same command / response, the command code / response code in the card command unit 34 and the command code / response code in the reader / writer command unit 124 are not always the same. / Response code conversion is also performed.
例えば、図5(b)、図6(b)に示すカード捕捉コマンド40、130を例にすると、“カードコマンド”においてカード捕捉コマンドを示すコード41は例えば‘01’であり、“リーダライタコマンド”においてカード捕捉コマンドを示すコード131は例えば‘0012’である等というように、同じ「カード捕捉コマンド」であってもコードが異なる場合もあり得る。各種コマンド/応答を示すコードは、予め“カードコマンド”、“リーダライタコマンド”それぞれにおいて決められているので、カードリーダライタ20においてこれらをそれぞれ対応付けて記憶しておくことで(上記の例では、カード捕捉コマンドに関して‘01’と‘0012’を記憶しておく)、上記コマンドコード/応答コードの変換を行うことができる。 For example, taking the card capture commands 40 and 130 shown in FIGS. 5B and 6B as an example, the code 41 indicating the card capture command in the “card command” is, for example, “01”, and the “reader / writer command” The code 131 indicating the card capture command may be different even for the same “card capture command”, such as “0012”. Since codes indicating various commands / responses are determined in advance for each of the “card command” and “reader / writer command”, the card reader / writer 20 stores them in association with each other (in the above example, , “01” and “0012” are stored for the card capture command), and the command code / response code can be converted.
図4に示すカードリーダライタ20−上位機器10間で送受信される各種コマンド/応答は、上記リーダライタコマンドパケット120において上記リーダライタコマンド部124に格納されるコマンドデータ/応答データとして、図6(b)〜(g)、図7(a)〜(f)に示す各種コマンドデータ/応答データの何れかが格納されたものである。 Various commands / responses transmitted / received between the card reader / writer 20 and the host device 10 shown in FIG. 4 are stored as command data / response data stored in the reader / writer command section 124 in the reader / writer command packet 120 as shown in FIG. Any one of various command data / response data shown in FIGS. 7B to 7F and FIGS. 7A to 7F is stored.
例えば、図4に示す上位機器10がカードリーダライタ20へ送信する「カード捕捉コマンド」は、上記リーダライタコマンドパケット120において上記リーダライタコマンド部124に図6(b)に示すカード捕捉コマンド130が格納されたものである。他の各種コマンド/応答についても同様であり、ここでは特に説明しないものとする。また、
逐一説明しないが、図6(b)〜(g)、図7(a)〜(f)に示す各種コマンドデータ/応答データは、何れも、カードリーダライタ20−ICカード3間の通信におけるパケット120における各種コマンドデータ/応答データである。
For example, the “card capture command” transmitted from the host device 10 shown in FIG. 4 to the card reader / writer 20 is sent to the reader / writer command unit 124 in the reader / writer command packet 120 by the card capture command 130 shown in FIG. It is stored. The same applies to other various commands / responses, and will not be particularly described here. Also,
Although not described one by one, the various command data / response data shown in FIGS. 6B to 6G and FIGS. 7A to 7F are all packets in communication between the card reader / writer 20 and the IC card 3. Various command data / response data in 120.
以下、図6(b)〜(g)、図7(a)〜(f)に示す各種コマンドデータ/応答データの構成例について説明する。尚、これらの構成例は一例であり、この例に限るものではない。 Hereinafter, configuration examples of various command data / response data shown in FIGS. 6B to 6G and FIGS. 7A to 7F will be described. In addition, these structural examples are examples and are not limited to this example.
まず、図6(b)に示すカード捕捉コマンド130は、コマンド種別を示すコマンドコード(ここではカード捕捉コマンド・コマンドコード131)、捕捉するICカードの属性種別等を指定するためのコマンドパラメータ132等から構成されている。 First, a card capture command 130 shown in FIG. 6B includes a command code indicating a command type (here, a card capture command / command code 131), a command parameter 132 for designating an attribute type of an IC card to be captured, and the like. It is composed of
尚、図示の通り、本構成例では、上述したカードコマンドのカード捕捉コマンド40と同様の構成となっている。これは、他の各種コマンド/応答に関しても同様である。すなわち、カードコマンドと同じコマンド名のリーダライタコマンドについては、カードコマンドと同様な構成を構成例としている。但し、この例に限るものではなく、構成が異なる場合もあってよい(上記のようなコマンドコード/応答コードのみが異なるという意味ではなく、構成自体が異なる意味)。 As shown in the figure, this configuration example has the same configuration as the card capture command 40 of the card command described above. The same applies to other various commands / responses. That is, the reader / writer command having the same command name as the card command has a configuration similar to that of the card command. However, the configuration is not limited to this example, and the configuration may be different (not only the command code / response code as described above is different, but the configuration itself is different).
本例では、上記のことから、図6(b)〜(g)、図7(a)〜(f)に示す各種コマンドデータの構成例について、“カードコマンド”に関して同様の構成がある場合には、既に上記“カードコマンド”に関して説明済みであるので、ここでは詳細に説明することなく簡単に説明するのみとする。 In the present example, because of the above, the configuration examples of various command data shown in FIGS. 6B to 6G and FIGS. 7A to 7F have the same configuration regarding the “card command”. Has already been described with respect to the above-mentioned “card command”, and therefore only a brief description will be given here without detailed description.
図6(c)に示すカード捕捉応答140は、上記カード捕捉コマンド130に応答するICカード3から返信され、その構成例としては、カード捕捉応答であることを示す応答コード(カード捕捉コマンド応答コード141)、そのICカード自身のカードID142等で構成されている。 A card capture response 140 shown in FIG. 6C is returned from the IC card 3 responding to the card capture command 130. As an example of the configuration, a response code (card capture command response code indicating a card capture response) is shown. 141), and the card ID 142 of the IC card itself.
図6(d)に示す第一相互認証コマンド150は、コマンド種別を示すコマンドコード(ここでは第一認証コマンド・コマンドコード151)、相互認証するICカードを指定するための認証先カードID152、ICカードと認証するための条件である認証用条件情報153、認証用暗号化データA154(図3の例の〔RndA〕Kb等)から構成されている。 The first mutual authentication command 150 shown in FIG. 6D includes a command code indicating a command type (here, a first authentication command / command code 151), an authentication destination card ID 152 for designating an IC card to be mutually authenticated, an IC It comprises authentication condition information 153 which is a condition for authenticating with a card, and authentication encrypted data A154 ([RndA] Kb in the example of FIG. 3).
図6(e)に示す第一相互認証応答160は、第一相互認証コマンドに対する応答であることを示す応答コード(第一認証コマンド応答コード161)、認証用暗号化データB162(図3の例の〔RndA〕Ka等)及び認証用暗号化データC163(図3の例の〔RndB〕Ka等)から構成されている。 The first mutual authentication response 160 shown in FIG. 6E is a response code (first authentication command response code 161) indicating that it is a response to the first mutual authentication command, and encrypted data B162 for authentication (example of FIG. 3). [RndA] Ka, etc.) and authentication encrypted data C163 ([RndB] Ka, etc. in the example of FIG. 3).
図6(f)に示す第二相互認証コマンド170は、コマンド種別を示すコマンドコード(ここでは第二認証コマンド・コマンドコード171)、認証用暗号化データD172(図3の例の〔RndB〕Kb等)から構成されている。また、上述したケース2の場合には、更に、図示のセッション鍵173も含まれる。 The second mutual authentication command 170 shown in FIG. 6F includes a command code indicating the command type (here, the second authentication command / command code 171), and authentication encrypted data D172 ([RndB] Kb in the example of FIG. 3). Etc.). Further, in case 2 described above, the illustrated session key 173 is also included.
セッション鍵173は上記の通り乱数RndAと乱数RndBとに基づいて生成される。すなわち、上位機器10は、自身で生成した乱数RndAとICカード3から取得した乱数RndBとからセッション鍵Ksを生成してカードリーダライタ20に引き渡すが、上記の通りケース2の場合には、この処理は相互認証処理完了前に行う為、セッション鍵Ksを第二相互認証コマンド170に付加するものである。 The session key 173 is generated based on the random number RndA and the random number RndB as described above. That is, the host device 10 generates a session key Ks from the random number RndA generated by itself and the random number RndB acquired from the IC card 3 and delivers it to the card reader / writer 20. In case 2 as described above, Since the process is performed before the mutual authentication process is completed, the session key Ks is added to the second mutual authentication command 170.
尚、上記ケース1,2の何れの場合でも、セッション鍵173が上位機器10からカードリーダライタ20へ送信される途中で漏洩する可能性も考えられ、これを防止するために、個別に秘匿化するための暗号化等の処理が追加される場合もあるが、これは本発明には特に関係ないので秘匿化処理の方式までは特定/説明しない。 In both cases 1 and 2, there is a possibility that the session key 173 may be leaked in the middle of transmission from the higher-level device 10 to the card reader / writer 20. In some cases, a process such as encryption is added for this purpose, but since this is not particularly relevant to the present invention, the method of the concealment process is not specified / explained.
図6(g)に示す第二相互認証応答180は、第二相互認証コマンドに対する応答であることを示す応答コード(第二認証コマンド応答コード181)、ICカード3側での認証結果を示す認証結果データ182(OK/NGに相当するデータ等)から構成されている。 The second mutual authentication response 180 shown in FIG. 6G is a response code (second authentication command response code 181) indicating a response to the second mutual authentication command, and an authentication indicating the authentication result on the IC card 3 side. It consists of result data 182 (data corresponding to OK / NG, etc.).
上記第一相互認証コマンド150、第一相互認証応答160、第二相互認証コマンド170、第二相互認証応答180に付与されているパラメータ部(コマンドコード/応答コード部以外の部分(特に暗号化データ))は、カードリーダライタ20のコマンド中継処理によって、上述してあるように基本的には“カードコマンド”のパラメータ部としてそのまま“カードコマンド”に付与されてICカード3へ送信される(同様にICカード3からの“カードコマンド”による応答に付与されているパラメータ部は、“リーダライタコマンド”のパラメータ部にそのまま付与される)。 Parameter parts (parts other than the command code / response code part (especially encrypted data) given to the first mutual authentication command 150, the first mutual authentication response 160, the second mutual authentication command 170, and the second mutual authentication response 180. )) Is basically added to the “card command” as it is as the parameter portion of the “card command” as described above by the command relay process of the card reader / writer 20 and transmitted to the IC card 3 (similarly). The parameter part assigned to the response by the “card command” from the IC card 3 is added to the parameter part of the “reader / writer command” as it is).
但し、第二相互認証コマンド170において上記セッション鍵173がある場合については、このセッション鍵173はカードリーダライタ20が記憶・保管するのであり、ICカード3への“カードコマンド”には付与しない。 However, in the case where the second mutual authentication command 170 has the session key 173, the session key 173 is stored and stored by the card reader / writer 20, and is not given to the "card command" to the IC card 3.
一方、上記ケース1の場合には、相互認証中の通信内でセッション鍵Ksをカードリーダライタ20に引き渡すことはないので、第二相互認証コマンドのパラメータ部にセッション鍵情報は付与されていない。その代わりに図4で説明したセッション鍵セットコマンドによってセッション鍵Ksが上位機器10からカードリーダライタ20に引き渡される。 On the other hand, in the case 1 described above, the session key Ks is not delivered to the card reader / writer 20 within the communication during mutual authentication, so no session key information is given to the parameter part of the second mutual authentication command. Instead, the session key Ks is delivered from the higher-level device 10 to the card reader / writer 20 by the session key set command described in FIG.
図7(a)にセッション鍵セットコマンドの構成例を示し、これに対する応答であるセッション鍵セット応答の構成例を図7(b)に示す。
図7(a)に示す例のセッション鍵セットコマンド190は、コマンド種別を示すコマンドコード(ここではセッション鍵セットコマンド・コマンドコード191)、カードリーダライタ20に引き渡すべきセッション鍵(鍵情報192)から構成されている。
FIG. 7A shows a configuration example of a session key set command, and FIG. 7B shows a configuration example of a session key set response that is a response to the command.
The session key set command 190 in the example shown in FIG. 7A includes a command code indicating a command type (here, a session key set command / command code 191), and a session key (key information 192) to be delivered to the card reader / writer 20. It is configured.
尚、既に述べた通り、図示のセッション鍵セットコマンド190は、上記リーダライタコマンドパケット120のリーダライタコマンド部124に格納されてパケット送受信されるものである(これは後述する図7(b)〜図7(f)の各コマンド/応答についても同様である)。また、尚、鍵情報192はセッション鍵が秘匿化(暗号化)されたものであってもよいが、鍵情報192の秘匿化処理については、上記第二相互認証コマンド170のセッション鍵173の場合と同様に、秘匿化処理の方式については特に特定/説明しない。 As already described, the illustrated session key set command 190 is stored in the reader / writer command section 124 of the reader / writer command packet 120 and transmitted and received (this will be described later with reference to FIGS. 7B to 7B). The same applies to each command / response in FIG. Further, the key information 192 may be a session key concealed (encrypted), but the concealment processing of the key information 192 is the case of the session key 173 of the second mutual authentication command 170. Similarly, the method of concealment processing is not particularly specified / explained.
図7(b)に示す例のセッション鍵セット応答200は、セッション鍵セットコマンドに対する応答であることを示す応答コード(セッション鍵セットコマンド応答コード201)、セッション鍵の引渡しに成功したか否かを示す、OK/NGに相当する結果データ202等から構成されている。 The session key set response 200 in the example shown in FIG. 7B is a response code (session key set command response code 201) indicating that it is a response to the session key set command, and whether or not the session key has been successfully delivered. The result data 202 and the like corresponding to OK / NG are shown.
上記図4に示すリーダライタコマンドとしてのカードアクセスコマンド、カードアクセス応答の構成例を2例、図7(c)〜(f)に示す。すなわち、図7(c),(d)は
カードアクセスコマンド、カードアクセス応答の構成例(その1)であり、図7(e),(f)はカードアクセスコマンド、カードアクセス応答の構成例(その2)である。
Two examples of the configuration of the card access command and card access response as the reader / writer command shown in FIG. 4 are shown in FIGS. 7 (c) to 7 (f). 7C and 7D are configuration examples of the card access command and the card access response (part 1), and FIGS. 7E and 7F are configuration examples of the card access command and the card access response ( Part 2).
まず、図7(c),(d)に示す構成例(その1)について説明する。
この構成例(その1)は、カードアクセスコマンドがICカード3からデータを読み出すためのカードリードコマンドである場合の例である。
First, a configuration example (No. 1) shown in FIGS. 7C and 7D will be described.
This configuration example (part 1) is an example in which the card access command is a card read command for reading data from the IC card 3.
図7(c)に示すカードアクセスコマンド(1)210(カードリードコマンド例)は、コマンド種別を示すコマンドコード(ここではカードリードコマンド・コマンドコード211)、読出し対象を指定するための情報であるリード対象部指定情報212等から構成されている。 A card access command (1) 210 (card read command example) shown in FIG. 7C is a command code indicating a command type (here, a card read command / command code 211) and information for designating a reading target. It consists of read target part designation information 212 and the like.
また、上記コマンド210に対する上位機器10への応答である、図7(c)に示すカードアクセス応答(1)220(カードリードコマンド例)は、上記カードリードコマンド210に対する応答であることを示す応答コード(カードリードコマンド応答コード221、ICカードから読み出されたリードデータ222から構成されている。尚、このリードデータ222は、上記セッション鍵による暗号化データであるリードデータ112を、カードリーダライタ20が自己のセッション鍵によって復号化して得たものである。 A card access response (1) 220 (card read command example) shown in FIG. 7C, which is a response to the host device 10 in response to the command 210, is a response indicating that it is a response to the card read command 210. Code (card read command response code 221 and read data 222 read from the IC card. The read data 222 is read data 112 which is encrypted data by the session key, and is read from the card reader / writer. 20 is obtained by decrypting with its own session key.
次に、図7(e),(f)に示す構成例(その2)について説明する。
この構成例(その2)は、カードリーダライタ20で1つのリーダライタコマンドに対して複数のカードコマンドの処理を行う場合のコマンドとして、カードアクセスコマンドがカードライト&リードコマンドである場合の例である。このカードライト&リードコマンドは、ICカード3におけるこのコマンドにより指定した情報(アドレス等)に対してデータの書き込みを行う処理、書き込み完了後に書き込みを行った部分の読み返しを行う処理、及び読み返したデータを上位機器10に返信させる処理を、カードリーダライタ20に実行させるための処理コマンドである。
Next, a configuration example (No. 2) shown in FIGS. 7E and 7F will be described.
This configuration example (No. 2) is an example in which the card access command is a card write & read command as a command when the card reader / writer 20 processes a plurality of card commands for one reader / writer command. is there. This card write & read command is a process for writing data to the information (address, etc.) specified by this command in the IC card 3, a process for reading back the part that was written after the writing was completed, and the data read back. Is a processing command for causing the card reader / writer 20 to execute a process of returning the message to the host device 10.
図7(e)に示すカードアクセスコマンド(2)230(カードライト&リードコマンド例)は、コマンド種別を示すコマンドコード(ここではカードライト&リードコマンド・コマンドコード231)、書き込み及び読み返しを行うカード内の情報部位(アドレス等)を示すライト&リード対象部指定情報232、書き込むべきデータであるライトデータ233等から構成されている。 A card access command (2) 230 (card write & read command example) shown in FIG. 7E is a command code indicating a command type (here, a card write & read command / command code 231), a card for writing and reading back. It includes write & read target portion designation information 232 indicating the information part (address, etc.), write data 233 which is data to be written, and the like.
また、上記コマンド230に対する上位機器10への応答である、図7(f)に示すカードアクセス応答(2)240(カードライト&リードコマンド例)は、カードライト&リードコマンドに対する応答であることを示す応答コード(カードライト&リードコマンド応答コード241)、ICカードから読み返されたリードデータである読み返しデータ242等から構成されている。 Further, the card access response (2) 240 (example of card write & read command) shown in FIG. 7 (f), which is a response to the command 230 for the command 230, is a response to the card write & read command. A response code (card write & read command response code 241), read-back data 242 as read data read back from the IC card, and the like.
上記コマンド230を受信したカードリーダライタ20は、上記各種処理をそれぞれ実行する為のパケット(“カードコマンド”パケット30)を順次生成してICカード3へ送信する。すなわち、まず、カードライトコマンドに上記指定情報232、ライトデータ233をパラメータとして付与したパケット30を生成・送信し、続けて、カードリードコマンドに上記指定情報232をパラメータとして付与したパケット30を生成・送信することで、書き込んだデータの読み返しを行う。そして、カードリーダライタ20は、ICカード3から返信される読み返しデータ(セッション鍵で暗号化されている)を、自己のセッション鍵で復号化することで、上記読み返しデータ242を取得して、これを上記カードアクセス応答(2)240に付加して上位機器10へ送信する。 The card reader / writer 20 that has received the command 230 sequentially generates and transmits to the IC card 3 packets (“card command” packet 30) for executing the various processes. That is, first, a packet 30 in which the designation information 232 and the write data 233 are added as parameters to the card write command is generated / transmitted, and subsequently, a packet 30 in which the designation information 232 is assigned as a parameter to the card read command By transmitting, the written data is read back. Then, the card reader / writer 20 obtains the read-back data 242 by decrypting the read-back data (encrypted with the session key) returned from the IC card 3 with its own session key. Is added to the card access response (2) 240 and transmitted to the host device 10.
尚、これら複数のカードコマンドを実行するリーダライタコマンド例は、本例に限定されるものではなく、各種組合せ及びカードリーダライタ20による判断処理の付加が考えられる。 Note that the reader / writer command example for executing the plurality of card commands is not limited to this example, and various combinations and addition of determination processing by the card reader / writer 20 are conceivable.
ここで、図8〜図11に、従来技術における通信シーケンス例やパケット構成例を示すことで、上述した本手法と従来技術との違いについて説明する。
尚、特に図示しないが、従来技術における上位機器、カードリーダライタにはそれぞれ符号4、5を与えるものとし、以下、上位機器4、カードリーダライタ5と記すものとする。尚、ICカード自体は同じであってよいので、ICカード3と記すものとする。
Here, FIGS. 8 to 11 illustrate differences between the above-described technique and the prior art by showing communication sequence examples and packet configuration examples in the prior art.
Although not particularly shown, the upper device and the card reader / writer in the prior art are given reference numerals 4 and 5 respectively, and are hereinafter referred to as the upper device 4 and the card reader / writer 5. Since the IC card itself may be the same, it is described as an IC card 3.
上記の通り、従来では、上位機器4だけでなく、カードリーダライタ5にも、上位機器4と同様の強固なセキュリティ対策(耐タンパ筐体、耐タンパメモリ等)を施している。そして、カードリーダライタ5内の上記耐タンパメモリにカードアクセス鍵が記憶される。これは、予め登録されて記憶される場合と、上位機器4から渡されて一時的に記憶する場合とがある。何れの場合でも、従来では、カードリーダライタ5が、このカードアクセス鍵を用いてICカード3との相互認証処理を実行していた。 As described above, conventionally, not only the host device 4 but also the card reader / writer 5 is provided with the same strong security measures (tamper-resistant housing, tamper-resistant memory, etc.) as the host device 4. Then, the card access key is stored in the tamper resistant memory in the card reader / writer 5. This may be registered in advance and stored, or may be transferred from the host device 4 and temporarily stored. In any case, conventionally, the card reader / writer 5 executes mutual authentication processing with the IC card 3 using this card access key.
図8は、従来例(その1)における通信シーケンス例である。
従来例(その1)は、カードアクセス鍵がカードリーダライタ5に登録されている場合のシーケンス例である。
FIG. 8 is an example of a communication sequence in the conventional example (part 1).
The conventional example (No. 1) is a sequence example when the card access key is registered in the card reader / writer 5.
尚、後述する従来例(その2)は、カードリータライタ5にはカードアクセス鍵は登録されていないが、必要なときに上位装置4からカードアクセス鍵を一時的に引渡す場合の例である。 The conventional example (No. 2) described later is an example in which the card access key is not temporarily registered in the card writer 5, but the card access key is temporarily transferred from the host device 4 when necessary.
従来例(その1)の通信シーケンスでは、図8に示すように、まず、カード捕捉時に関しては図4に示す本手法と略同様であってよく、ここでは説明しない。
ICカード3との相互認証時には、上位機器4からの相互認証実行指示により、カードリーダライタ5が、上記図3の処理を実行する。すなわち、例えば、カードコマンド、相互認証に必要な乱数生成、暗号化データの生成等を行う。また、ICカード3からの応答内容の判定(その際、暗号化データの復号化も行う)、及びセッション鍵の生成も、カードリーダライタ5が内部処理として実行する。上位機器4に対しては相互認証の結果として成否結果を通知するだけになる。
In the communication sequence of the conventional example (part 1), as shown in FIG. 8, the card capture may be substantially the same as the present method shown in FIG. 4 and will not be described here.
At the time of mutual authentication with the IC card 3, the card reader / writer 5 executes the process of FIG. That is, for example, a card command, random number generation necessary for mutual authentication, generation of encrypted data, and the like are performed. Further, the card reader / writer 5 also executes determination of response contents from the IC card 3 (in this case, decryption of encrypted data) and generation of a session key as internal processing. Only the success / failure result is notified to the host device 4 as a result of mutual authentication.
上記相互認証時の処理に関して上位機器4−カードリーダライタ5間あるいはカードリーダライタ5−ICカード3間で送受信するコマンド/応答は、図8に示す例では、まず上位機器4がカードリーダライタ5へ相互認証コマンドを送信する。このコマンドを受信したカードリーダライタ5は、まず、第一相互認証コマンドを生成してICカード3へ送信し、これに対するICカード3からの第一相互認証応答を受信すると、続いて、第二相互認証コマンドを生成してICカード3へ送信し、これに対するICカード3からの第二相互認証応答を受信すると、この応答内容(上記成否結果)を含む相互認証応答を生成して上位機器4へ送信する。 In the example shown in FIG. 8, the command / response transmitted / received between the host device 4 -card reader / writer 5 or between the card reader / writer 5 -IC card 3 in the example shown in FIG. Send a mutual authentication command to Upon receiving this command, the card reader / writer 5 first generates a first mutual authentication command and transmits it to the IC card 3. When the first mutual authentication response from the IC card 3 is received, When a mutual authentication command is generated and transmitted to the IC card 3 and a second mutual authentication response from the IC card 3 is received, a mutual authentication response including the response content (success / failure result) is generated and the upper device 4 Send to.
上記相互認証時の処理に関する暗号化データの生成や復号化は、上記の通りカードアクセス鍵はカードリーダライタ5が保持しているので、このカードアクセス鍵を用いて行う。 Since the card reader / writer 5 holds the card access key as described above, the generation and decryption of the encrypted data related to the processing at the time of the mutual authentication are performed using this card access key.
上記相互認証処理は、例えば上述した図3の処理を行うものであり、従来例(その1)では図3に示すカード利用機器の処理を全てカードリーダライタ5が実行することになる。ICカード3側の処理は図3に示す通りであり、本手法と同様であってよい。 The mutual authentication process is performed, for example, by the process shown in FIG. 3 described above. In the conventional example (part 1), the card reader / writer 5 executes all the processes of the card using device shown in FIG. The processing on the IC card 3 side is as shown in FIG. 3 and may be the same as this method.
そして、上記相互認証処理の結果、認証成功した場合には、以降のカードアクセスコマンドによるカードアクセス処理に関しては、セッション鍵はカードリーダライタ5が生成できるので、本手法のような上位機器がセッション鍵を生成してカードリーダライタに渡す処理は必要なく、カードリーダライタ5は自己が生成したセッション鍵を用いて、本手法と同様のシーケンスでカードアクセス処理(カードデータのリード/ライト等)を実行する。 If the authentication is successful as a result of the mutual authentication process, the card reader / writer 5 can generate the session key for the card access process by the subsequent card access command. The card reader / writer 5 executes card access processing (read / write of card data, etc.) in the same sequence as this method using the session key generated by itself. To do.
図9(a)は、上記従来例(その1)における、上位機器4−カードリーダライタ5間の通信に用いられるリーダライタコマンドのパケット構成例である。
図示のリーダライタコマンドパケット250は、プリアンブル251、スタートコード252、データ長253、リーダライタコマンド部254、チェックコード255、及びポストアンブル256より成る。この様に、パケット構成自体は、上記図6(a)に示す本手法のリーダライタコマンドパケット120と同じであってよい。尚、特に図示しないが、従来例(その1)におけるカードコマンドパケットも、図5(a)に示す本手法のカードコマンドパケット30と同じであってよい。
FIG. 9A is a packet configuration example of a reader / writer command used for communication between the host device 4 and the card reader / writer 5 in the conventional example (part 1).
The illustrated reader / writer command packet 250 includes a preamble 251, a start code 252, a data length 253, a reader / writer command unit 254, a check code 255, and a postamble 256. Thus, the packet configuration itself may be the same as the reader / writer command packet 120 of the present technique shown in FIG. Although not particularly shown, the card command packet in the conventional example (part 1) may be the same as the card command packet 30 of the present method shown in FIG.
ここで、カードコマンドパケットに関しては、そのカードコマンド部34の構成も、本手法と同じであってよい。すなわち、上記図5(b)〜(i)の構成と同じであってよい。 Here, regarding the card command packet, the configuration of the card command section 34 may be the same as that of the present method. That is, it may be the same as the structure of the said FIG.5 (b)-(i).
一方、リーダライタコマンドパケット250に関しては、そのリーダライタコマンド部254の構成が、本手法のリーダライタコマンド部124と異なる場合もあるので、これについて図9(b)〜(g)を参照して説明する。 On the other hand, regarding the reader / writer command packet 250, the configuration of the reader / writer command unit 254 may be different from that of the reader / writer command unit 124 of the present method, and this will be described with reference to FIGS. explain.
図9(b)〜(g)は、上記リーダライタコマンド部254に格納される各種コマンドデータ/応答データの構成例である。
まず、図9(b)に示すカード捕捉コマンド260はカード捕捉コマンド・コマンドコード261、コマンドパラメータ262から成り、図9(c)に示すカード捕捉応答270はカード捕捉コマンド・応答コード271、カードID272から成る。この様に、カード捕捉に関しては、本手法の上記図6(b)、(c)に示す構成と同様であってよい。
FIGS. 9B to 9G are configuration examples of various command data / response data stored in the reader / writer command unit 254.
First, the card capture command 260 shown in FIG. 9B includes a card capture command / command code 261 and a command parameter 262, and the card capture response 270 shown in FIG. 9C includes a card capture command / response code 271 and a card ID 272. Consists of. As described above, the card capture may be the same as the configuration shown in FIGS. 6B and 6C of the present method.
本手法の構成例との差異は、基本的には相互認証コマンドに関する部分となる。
すなわち、本手法ではカードアクセス鍵が上位機器10に登録されており且つカードリーダライタ20に渡すことはないので、ICカード3との相互認証に必要な乱数生成や、生成した乱数に対するカードアクセス鍵による暗号化処理等は、上位機器10で実行されることになり、上位機器10は上記図6(d)〜図6(g)に示すコマンド/応答を含むパケットを送受信することになる。
The difference from the configuration example of this method is basically the part related to the mutual authentication command.
That is, in this method, since the card access key is registered in the host device 10 and is not passed to the card reader / writer 20, random number generation necessary for mutual authentication with the IC card 3 and card access key for the generated random number are used. The higher-level device 10 executes the encryption process and the like by the higher-level device 10, and the higher-level device 10 transmits and receives packets including the command / response shown in FIGS. 6 (d) to 6 (g).
一方、従来例(その1)の場合には、上記図8の説明で示したように、カードアクセス鍵がカードリーダライタ5に登録されているため、上位機器4はカードリーダライタ5に対して、カードと認証条件を指定して相互認証の開始を指示し、カードリーダライタ5から相互認証成否の結果を受取るだけになる。すなわち、図8で説明した相互認証コマンドを生成・送信して、相互認証応答を受信する。 On the other hand, in the case of the conventional example (part 1), the card access key is registered in the card reader / writer 5 as shown in the description of FIG. The card and the authentication condition are specified, the start of mutual authentication is instructed, and the result of mutual authentication success / failure is simply received from the card reader / writer 5. That is, the mutual authentication command described in FIG. 8 is generated and transmitted, and the mutual authentication response is received.
図9(d)は、上記相互認証コマンドの構成例である。図示の相互認証コマンド280は、コマンド種別を示すコマンドコード(ここでは相互認証コマンド・コマンドコード281)、相互認証対象のICカードを指定するための認証先カードID282、ICカードと認証する際の任意の条件である認証用条件情報283から構成されている。上記のように上位機器4では認証のための暗号化乱数データは生成出来ないため、コマンド280
には暗号化乱数データがパラメータとして付与されることはない。
FIG. 9D shows a configuration example of the mutual authentication command. The illustrated mutual authentication command 280 includes a command code indicating a command type (in this case, a mutual authentication command / command code 281), an authentication destination card ID 282 for designating an IC card as a mutual authentication target, and an optional for authentication with the IC card. Authentication condition information 283, which is the above condition. As described above, since the host device 4 cannot generate encrypted random number data for authentication, the command 280
No encrypted random number data is assigned as a parameter.
図9(e)に示す相互認証応答290は、相互認証コマンドに対する応答であることを示す応答コード(相互認証コマンド・応答コード291)、認証結果(OK/NG;成否)を示す認証結果データ292から構成されている。 The mutual authentication response 290 shown in FIG. 9E is a response code (mutual authentication command / response code 291) indicating that it is a response to the mutual authentication command, and authentication result data 292 indicating an authentication result (OK / NG; success / failure). It is composed of
尚、図9(f)、(g)に示すカードアクセスコマンド300(リードコマンド)、カードアクセス応答310の構成例は、上記本手法の図7(c),(d)の構成と同様である。尚、特に図示しないが、ライトコマンドについても同様である。図9(f)に示すカードアクセスコマンド300は、カードリードコマンド・コマンドコード301、リード対象部指定情報302より成る。図9(g)に示すカードアクセス応答310は、カードリードコマンド応答コード311、リードデータ312より成る。 The configuration examples of the card access command 300 (read command) and the card access response 310 shown in FIGS. 9 (f) and 9 (g) are the same as the configurations of FIGS. 7 (c) and (d) of the present method. . Although not specifically shown, the same applies to the write command. The card access command 300 shown in FIG. 9F includes a card read command / command code 301 and read target portion designation information 302. A card access response 310 shown in FIG. 9G includes a card read command response code 311 and read data 312.
図10は、従来例(その2)における通信シーケンス例である。
ここでは、上記図8の従来例(その1)の通信シーケンスとの違いについてのみ説明する。
FIG. 10 is an example of a communication sequence in the conventional example (part 2).
Here, only the difference from the communication sequence of the conventional example (part 1) of FIG. 8 will be described.
上記の通り、従来例(その2)は、カードアクセス鍵が上位機器4に登録されているが、ICカードとの通信を始める前の段階で、カードアクセス鍵をカードリーダライタ5に渡すものである。 As described above, in the conventional example (No. 2), the card access key is registered in the higher-level device 4, but the card access key is passed to the card reader / writer 5 before starting communication with the IC card. is there.
すなわち、図10に示すように、上位機器4は、カード捕捉コマンドを送信する前の段階で、自己が保持するカードアクセス鍵を付加したカードアクセス鍵セットコマンドを、カードリーダライタ5へ送信する。このセットコマンドを受信したカードリーダライタ5は、カードアクセス鍵を取得して自己のメモリ(耐タンパメモリ)に記憶し、カードアクセス鍵セット応答を返信する。以降の通信シーケンスは従来例(その1)と同様となる。 That is, as shown in FIG. 10, the upper device 4 transmits a card access key set command to which the card access key held by itself is added to the card reader / writer 5 before transmitting the card capture command. Upon receiving this set command, the card reader / writer 5 acquires the card access key, stores it in its own memory (tamper resistant memory), and returns a card access key set response. The subsequent communication sequence is the same as that of the conventional example (part 1).
図11(a)、(b)に、上記カードアクセス鍵セットコマンド、カードアクセス鍵セット応答の構成例を示す。勿論、これらコマンド/応答は、図9(a)に示すパケットのリーダライタコマンド部254に格納されるものである。尚、他のコマンド/応答に関しては、上記従来例(その1)と同様であり、既に図9(b)〜(g)に示して説明してあるので、ここでは特に図示・説明はしない。 FIGS. 11A and 11B show configuration examples of the card access key set command and the card access key set response. Of course, these commands / responses are stored in the packet reader / writer command section 254 shown in FIG. Other commands / responses are the same as those in the conventional example (No. 1) and have already been described with reference to FIGS. 9B to 9G, and therefore are not particularly illustrated or described here.
図11(a)に示すカードアクセス鍵セットコマンド320は、コマンド種別を示すコマンドコード(ここではアクセス鍵セットコマンド・コマンドコード321)と、カードリーダライタ5に渡すべきカードアクセス鍵である鍵情報322から成る。尚、鍵情報322の秘匿化に関しては、本手法におけるセッション鍵の秘匿化と同様に、詳細方式については言及しない。 A card access key set command 320 shown in FIG. 11A includes a command code indicating a command type (here, an access key set command / command code 321) and key information 322 which is a card access key to be passed to the card reader / writer 5. Consists of. As for the concealment of the key information 322, the detailed method is not mentioned as in the concealment of the session key in this method.
図11(b)に示すカードアクセス鍵セット応答330は、カードアクセス鍵セットコマンドに対する応答であることを示す応答コード(アクセス鍵セットコマンド・応答コード331)、カードアクセス鍵の記憶に成功したか否かを示す、OK/NGに相当する結果データ332から構成されている。 The card access key set response 330 shown in FIG. 11B is a response code (access key set command / response code 331) indicating that it is a response to the card access key set command, and whether or not the card access key has been successfully stored. This is composed of result data 332 corresponding to OK / NG.
本手法では、カードアクセス鍵をカードリーダライタに渡すことはないので、当然、上記のようなコマンド320、応答330を生成・送受信する処理は必要ない。
以上説明したように、本手法によれば、まず、カードアクセス鍵がカードリーダライタから漏洩することを防止することができる。更に、カードリーダライタに対して耐タンパ筐体、耐タンパメモリ等の強固なセキュリティ対策を施す必要がなく、コスト削減効果も得られる。更に、認証処理後のカードアクセス処理に関しては、当該カードアクセス処理
に用いられるセッション鍵をカードリーダライタに渡して、カードリーダライタによってカードアクセス処理を実行させるので、カード利用者の利便性を損なうことなく、且つ上位機器の処理負荷を軽減させることが可能となる。
In this method, since the card access key is not passed to the card reader / writer, naturally, the process for generating / transmitting / receiving the command 320 and the response 330 as described above is not necessary.
As described above, according to this method, first, it is possible to prevent the card access key from leaking from the card reader / writer. Furthermore, it is not necessary to take strong security measures such as a tamper-resistant housing and tamper-resistant memory for the card reader / writer, and a cost reduction effect can be obtained. Further, regarding the card access process after the authentication process, the session key used for the card access process is passed to the card reader / writer, and the card reader / writer executes the card access process, which impairs the convenience of the card user. And the processing load on the host device can be reduced.
1 ネットワーク
2 管理サーバ
3 非接触ICカード
10 上位機器
11 CPU
12 プログラムメモリ
13 データメモリ
14 鍵情報格納用セキュアメモリ
15 カードリーダライタ通信制御部
16 カードリーダライタ接続I/F
17 ネットワーク通信制御部
18 ネットワーク通信I/F
20 カードリーダライタ
21 CPU
22 プログラムメモリ
23 データメモリ
24 RF回路
25 アンテナ
26 上位機器通信制御部
27 上位機器接続I/F
30 カードコマンドパケット
31 プリアンブル
32 同期コード
33 データ長
34 カードコマンド部
35 チェックコード
36 ポストアンブル
40 カード捕捉コマンド(カードコマンド)
41 カード捕捉コマンド・コマンドコード
42 コマンドパラメータ
50 カード捕捉応答(カードコマンド)
51 カード捕捉コマンド応答コード
52 カードID
60 第一相互認証コマンド(カードコマンド)
61 第一相互認証コマンド・コマンドコード
62 認証先カードID
63 認証用条件情報
64 認証用暗号化データA
70 第一相互認証応答(カードコマンド)
71 第一相互認証コマンド応答コード
72 認証用暗号化データB
73 認証用暗号化データC
80 第二相互認証コマンド(カードコマンド)
81 第二相互認証コマンド・コマンドコード
82 認証用暗号化データD
90 第二相互認証応答(カードコマンド)
91 第二相互認証コマンド応答コード
92 認証結果データ
100 カードアクセスコマンド(カードコマンド)
101 カードリードコマンド・コマンドコード
102 リード対象部指定情報
110 カードアクセス応答(カードコマンド)
111 カードリードコマンド・応答コード
112 リードデータ
120 リーダライタコマンドパケット
121 プリアンブル部
122 スタートコード部
123 データ長
124 リーダライタコマンド部
125 チェックコード
126 ポストアンブル
130 カード捕捉コマンド(リーダライタコマンド)
131 カード捕捉コマンド・コマンドコード
132 コマンドパラメータ
140 カード捕捉応答(リーダライタコマンド)
141 カード捕捉コマンド応答コード
142 カードID
150 第一相互認証コマンド(リーダライタコマンド)
151 第一相互認証コマンド・コマンドコード
152 認証先カードID
153 認証用条件情報
154 認証用暗号化データA
160 第一相互認証応答(リーダライタコマンド)
161 第一相互認証コマンド応答コード
162 認証用暗号化データB
163 認証用暗号化データC
170 第二相互認証コマンド(リーダライタコマンド)
171 第二相互認証コマンド・コマンドコード
172 認証用暗号化データD
173 セッション鍵
180 第二相互認証応答(リーダライタコマンド)
181 第二相互認証コマンド応答コード
182 認証結果データ
190 セッション鍵セットコマンド(リーダライタコマンド)
191 セッション鍵セットコマンド・コマンドコード
192 鍵情報
200 セッション鍵セット応答(リーダライタコマンド)
201 セッション鍵セットコマンド応答コード
202 結果データ
210 カードアクセスコマンド(1)(リーダライタコマンド)
211 カードリードコマンド・コマンドコード
212 リード対象部指定情報
220 カードアクセス応答(1)(リーダライタコマンド)
221 カードリードコマンド・応答コード
222 リードデータ
230 カードアクセスコマンド(2)(リーダライタコマンド)
231 カードライト&リードコマンド・コマンドコード
232 ライト&リード対象部指定情報
233 ライトデータ
240 カードアクセス応答(2)(リーダライタコマンド)
241 カードライト&リードコマンド応答コード
242 読み返しデータ
1 Network 2 Management Server 3 Contactless IC Card 10 Host Device 11 CPU
12 Program memory 13 Data memory 14 Secure memory for storing key information 15 Card reader / writer communication control unit 16 Card reader / writer connection I / F
17 Network communication control unit 18 Network communication I / F
20 Card reader / writer 21 CPU
22 Program memory 23 Data memory 24 RF circuit 25 Antenna 26 Host device communication control unit 27 Host device connection I / F
30 Card command packet 31 Preamble 32 Synchronization code 33 Data length 34 Card command part 35 Check code 36 Postamble 40 Card capture command (card command)
41 Card capture command / command code 42 Command parameter 50 Card capture response (card command)
51 Card capture command response code 52 Card ID
60 First mutual authentication command (card command)
61 First mutual authentication command / command code 62 Authentication card ID
63 Authentication condition information 64 Authentication encrypted data A
70 First mutual authentication response (card command)
71 First mutual authentication command response code 72 Authentication encrypted data B
73 Encrypted data C for authentication
80 Second mutual authentication command (card command)
81 Second mutual authentication command / command code 82 Encryption data D for authentication
90 Second mutual authentication response (card command)
91 Second mutual authentication command response code 92 Authentication result data 100 Card access command (card command)
101 Card read command / command code 102 Read target part designation information 110 Card access response (card command)
111 Card read command / response code 112 Read data 120 Reader / writer command packet 121 Preamble unit 122 Start code unit 123 Data length 124 Reader / writer command unit 125 Check code 126 Postamble 130 Card capture command (reader / writer command)
131 Card capture command / command code 132 Command parameter 140 Card capture response (reader / writer command)
141 Card capture command response code 142 Card ID
150 First mutual authentication command (Reader / Writer command)
151 First mutual authentication command / command code 152 Authentication card ID
153 Authentication condition information 154 Authentication encrypted data A
160 First mutual authentication response (Reader / Writer command)
161 First mutual authentication command response code 162 Encrypted data B for authentication
163 Authentication encrypted data C
170 Second mutual authentication command (Reader / Writer command)
171 Second mutual authentication command / command code 172 Authentication encrypted data D
173 Session Key 180 Second Mutual Authentication Response (Reader / Writer Command)
181 Second mutual authentication command response code 182 Authentication result data 190 Session key set command (reader / writer command)
191 Session key set command / command code 192 Key information 200 Session key set response (reader / writer command)
201 Session key set command response code 202 Result data 210 Card access command (1) (reader / writer command)
211 Card Read Command / Command Code 212 Read Target Part Specification Information 220 Card Access Response (1) (Reader / Writer Command)
221 Card Read Command / Response Code 222 Read Data 230 Card Access Command (2) (Reader / Writer Command)
231 Card Write & Read Command / Command Code 232 Write & Read Target Part Specification Information 233 Write Data 240 Card Access Response (2) (Reader / Writer Command)
241 Card write & read command response code 242 Read back data
Claims (2)
前記上位機器は、
カードアクセス鍵を記憶するカードアクセス鍵記憶手段と、
該カードアクセス鍵を用いた暗号化通信によりICカードとの相互認証処理を行う相互認証手段とを有し、
前記カードリーダライタは、
前記相互認証処理の為に前記上位機器−ICカード間で送受信するパケットを、中継する中継手段を有し、
前記上位機器は、耐タンパ筐体を備える、または、前記カードアクセス鍵記憶手段を耐タンパメモリとする、強固なセキュリティ対策が施されており、
前記カードリーダライタには前記強固なセキュリティ対策は施されておらず、
前記上位機器は、更に、前記相互認証処理過程で得られた特定情報に基づいてセッション鍵を生成して、該セッション鍵を前記カードリーダライタへ送信するセッション鍵生成・送信手段を有し、
前記カードリーダライタは、更に、該セッション鍵生成・送信手段から渡されたセッション鍵を用いて、前記相互認証処理成功後の前記ICカードに対するカードアクセス処理を、該セッション鍵を用いた暗号化通信により行うカードアクセス手段を有することを特徴とするICカードシステム。 An IC card system in which a host device is connected to a card reader / writer,
The host device is
Card access key storage means for storing a card access key;
Mutual authentication means for performing mutual authentication processing with the IC card by encrypted communication using the card access key,
The card reader / writer is
Relay means for relaying packets transmitted and received between the host device and the IC card for the mutual authentication processing;
The host device is provided with a tamper-resistant housing, or the card access key storage means is a tamper-resistant memory, and has a strong security measure,
The card reader / writer is not subjected to the strong security measures ,
The host device further has a session key generation / transmission means for generating a session key based on the specific information obtained in the mutual authentication process and transmitting the session key to the card reader / writer,
The card reader / writer further uses the session key passed from the session key generation / transmission means to perform card access processing for the IC card after the mutual authentication processing has succeeded in encrypted communication using the session key. An IC card system comprising card access means for performing according to the above .
カードアクセス鍵を記憶するカードアクセス鍵記憶手段を有し、
耐タンパ筐体を備える、または、前記カードアクセス鍵記憶手段を耐タンパメモリとする、強固なセキュリティ対策が施されており、
前記強固なセキュリティ対策は施されていない前記カードリーダライタを介して、任意のICカードとの通信を行って、前記カードアクセス鍵を用いた暗号化通信により該ICカードとの相互認証処理を行う相互認証手段と、
前記相互認証処理過程で得られた特定情報に基づいてセッション鍵を生成して、該セッション鍵を前記カードリーダライタへ送信することで、該カードリーダライタに該セッション鍵を用いた前記ICカードに対するカードアクセス処理を実行させるセッション鍵生成・送信手段とを更に有することを特徴とするICカードシステムにおける上位機器。
The host device in an IC card system in which a host device is connected to a card reader / writer,
Card access key storage means for storing a card access key;
Strong security measures are taken, including a tamper-resistant housing, or the card access key storage means as a tamper-resistant memory,
Communication with an arbitrary IC card is performed via the card reader / writer that is not subjected to the strong security measures, and mutual authentication processing with the IC card is performed by encrypted communication using the card access key. Mutual authentication means;
A session key is generated based on the specific information obtained in the mutual authentication process, and the session key is transmitted to the card reader / writer, whereby the IC card using the session key is sent to the card reader / writer. A host device in an IC card system, further comprising session key generation / transmission means for executing card access processing .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008263379A JP5347417B2 (en) | 2008-10-10 | 2008-10-10 | IC card system, its host device, program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008263379A JP5347417B2 (en) | 2008-10-10 | 2008-10-10 | IC card system, its host device, program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010093663A JP2010093663A (en) | 2010-04-22 |
JP5347417B2 true JP5347417B2 (en) | 2013-11-20 |
Family
ID=42255933
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008263379A Expired - Fee Related JP5347417B2 (en) | 2008-10-10 | 2008-10-10 | IC card system, its host device, program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5347417B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5451159B2 (en) * | 2009-04-14 | 2014-03-26 | Necシステムテクノロジー株式会社 | Data transfer method, data transfer system, and data relay program |
US10714427B2 (en) * | 2016-09-08 | 2020-07-14 | Asml Netherlands B.V. | Secure chips with serial numbers |
US10418324B2 (en) | 2016-10-27 | 2019-09-17 | Asml Netherlands B.V. | Fabricating unique chips using a charged particle multi-beamlet lithography system |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000113049A (en) * | 1998-10-01 | 2000-04-21 | Hitachi Ltd | System and method for distributing electronic book using purchase certification of book |
JP4176898B2 (en) * | 1999-02-19 | 2008-11-05 | 株式会社東芝 | Personal authentication system, portable device and storage medium used therefor |
JP2002312325A (en) * | 2001-04-13 | 2002-10-25 | Nippon Telegr & Teleph Corp <Ntt> | Service access terminal device cooperated with ic card and its method |
JP2004013728A (en) * | 2002-06-10 | 2004-01-15 | Dainippon Printing Co Ltd | Ic card program download system |
JP2004072423A (en) * | 2002-08-06 | 2004-03-04 | Sony Corp | Contents distribution system, center server, user terminal device, mobile authentication apparatus, computer program, storage medium, and contents distribution method for center server |
JP2004295502A (en) * | 2003-03-27 | 2004-10-21 | Jr East Mechatronics Co Ltd | Security system using ic medium |
JP2005122402A (en) * | 2003-10-15 | 2005-05-12 | Systemneeds Inc | Ic card system |
JP2005295408A (en) * | 2004-04-02 | 2005-10-20 | Tepco Uquest Ltd | Enciphering device, decoding device, enciphering and decoding system, and key information updating system |
JP2008187373A (en) * | 2007-01-29 | 2008-08-14 | Fuji Electric Retail Systems Co Ltd | Equipment system |
JP2008191873A (en) * | 2007-02-02 | 2008-08-21 | Felica Networks Inc | Information processor and information processing system |
JP4976891B2 (en) * | 2007-03-15 | 2012-07-18 | 富士電機株式会社 | IC card system, its division information / secret information generation terminal, program |
-
2008
- 2008-10-10 JP JP2008263379A patent/JP5347417B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010093663A (en) | 2010-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7735132B2 (en) | System and method for encrypted smart card PIN entry | |
JP2006155045A (en) | Electronic value information transmission system, and electronic value information transmission method | |
WO2004077344A1 (en) | Noncontact ic card communication system and communication method | |
JP2008287335A (en) | Authentication information management system, authentication information management server, and authentication information management method and program | |
CN116648711A (en) | Web-based activation of contactless cards | |
US9054881B2 (en) | Radio frequency identification (RFID) tag and interrogator for supporting normal mode and secure mode, and operation method thereof | |
EP2175428B1 (en) | Semiconductor element, biometric authentication method and biometric authentication system | |
JP2025016511A (en) | System and method for notifying potential attacks on contactless cards - Patents.com | |
KR20090109979A (en) | Specialized Payment Processing Method of Large Merchants and Large Merchant Payment Terminals and Record Media | |
US12205103B2 (en) | Contactless card with multiple rotating security keys | |
JP5347417B2 (en) | IC card system, its host device, program | |
JP2010171721A (en) | Ic card system, host device thereof, program | |
KR20140011975A (en) | Digital system for card settlement by tagging, settlment side system and providing method thereof | |
JP4290098B2 (en) | COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION SYSTEM, COMMUNICATION PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION PROGRAM | |
KR20090000990A (en) | Online payment method and system using card terminal, card terminal and recording medium | |
JP7516133B2 (en) | Payment Device | |
JP2015203909A (en) | contact IC card activation system and method | |
JP2000138672A (en) | Communication method and card system | |
JP7461564B2 (en) | Secure end-to-end pairing of secure elements with mobile devices | |
JP5386860B2 (en) | Payment system, payment processing apparatus, validity verification apparatus, validity verification request processing program, validity verification processing program, and validity verification method | |
JP4284237B2 (en) | Authentication method, mobile communication terminal device and card type device | |
JP2006072565A (en) | Security terminal activation system and activation terminal device | |
JP4852929B2 (en) | Restriction release method, security system, operation target device, and program | |
WO2020003958A1 (en) | Mutual authentication system and mutual authentication method | |
KR20100001888A (en) | Pos terminal for information security and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20110301 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20110302 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110913 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120928 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121002 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20121025 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121130 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130507 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130702 |
|
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: 20130723 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130805 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5347417 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |