JP2013118473A - Ic card, portable electronic device and control program of ic card - Google Patents

Ic card, portable electronic device and control program of ic card Download PDF

Info

Publication number
JP2013118473A
JP2013118473A JP2011264496A JP2011264496A JP2013118473A JP 2013118473 A JP2013118473 A JP 2013118473A JP 2011264496 A JP2011264496 A JP 2011264496A JP 2011264496 A JP2011264496 A JP 2011264496A JP 2013118473 A JP2013118473 A JP 2013118473A
Authority
JP
Japan
Prior art keywords
card
key
secret
information
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011264496A
Other languages
Japanese (ja)
Inventor
Hiroki Tomoe
裕樹 友枝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011264496A priority Critical patent/JP2013118473A/en
Publication of JP2013118473A publication Critical patent/JP2013118473A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an IC card capable of executing processing at a faster speed, and further to provide a portable electronic device and a control program of the IC card.SOLUTION: An IC card related to one embodiment that executes processing in response to a command input from an external apparatus comprises: receiving means for receiving a key sharing command transmitted from the external apparatus; first calculating means that calculates secret information in response to the key sharing command and shares the secret information with the external apparatus; second calculating means for calculating a secret key on the basis of the secret information; and key storage means for storing the secret key calculated by the second calculating means.

Description

本発明の実施形態は、ICカード、携帯可能電子装置、及びICカードの制御プログラムに関する。   Embodiments described herein relate generally to an IC card, a portable electronic device, and an IC card control program.

一般的に、携帯可能電子装置として用いられるICカードは、プラスチックなどで形成されたカード状の本体と本体に埋め込まれたICモジュールとを備えている。ICモジュールは、ICチップを有している。ICチップは、電源が無い状態でもデータを保持することができるEEPROM(Electrically Erasable Programmable Read−Only Memory)またはフラッシュROMなどの不揮発性メモリと、種々の演算を実行するCPUと、CPUの処理に利用されるRAMメモリなどを有している。   In general, an IC card used as a portable electronic device includes a card-like main body formed of plastic or the like and an IC module embedded in the main body. The IC module has an IC chip. The IC chip is used for EEPROM (Electrically Erasable Programmable Read-Only Memory) or flash ROM that can hold data even when there is no power supply, a CPU that executes various operations, and processing of the CPU RAM memory to be used.

ICカードは、例えば、国際標準規格ISO/IEC7816に準拠したICカードである。ICカードは、ICチップのメモリに種々のアプリケーションを格納することができる。ICカードは、ICカードを処理する端末(リーダライタ)から送信されたコマンドに応じてアプリケーションを実行することにより、種々の処理を実行することができる。   The IC card is, for example, an IC card conforming to the international standard ISO / IEC7816. The IC card can store various applications in the memory of the IC chip. The IC card can execute various processes by executing an application in accordance with a command transmitted from a terminal (reader / writer) that processes the IC card.

また、ICカードは、保持している情報の安全性を高める為に、暗号鍵を用いてデータを暗号化し、暗号化したデータをリーダライタと送受信することができる。   In addition, the IC card can encrypt data using an encryption key and transmit / receive the encrypted data to / from a reader / writer in order to increase the security of the stored information.

特開2005−45760号公報JP-A-2005-45760

ICカード及びリーダライタは、通信が確立した後に、コマンド及びレスポンスを互いに交換し、鍵共有方式により種々の処理に用いることができる暗号鍵(秘密鍵)を生成する。ICカード及びリーダライタは、秘密鍵を用いて送受信するデータの暗号化及び復号を行う。これにより、ICカード及びリーダライタは、互いに暗号化された通信を行なうことができる。   After the communication is established, the IC card and the reader / writer exchange commands and responses with each other, and generate an encryption key (secret key) that can be used for various processes by a key sharing method. The IC card and the reader / writer encrypt and decrypt data transmitted / received using a secret key. Thereby, the IC card and the reader / writer can perform encrypted communication with each other.

しかし、ICカード及びリーダライタは、鍵共有方式による鍵共有処理で、複雑な暗号アルゴリズムを用いた認証処理を行う場合がある。これらの認証処理の中には、非常に時間を要する処理がある。例えば、ICカード及びリーダライタは、通信(セッション)が切れた場合、この認証処理を再度実行する必要がある。この為、処理に時間を要する可能性があるという課題がある。   However, the IC card and the reader / writer may perform an authentication process using a complicated encryption algorithm in a key sharing process using a key sharing method. Among these authentication processes, there is a process that takes a very long time. For example, the IC card and the reader / writer need to execute this authentication process again when communication (session) is disconnected. For this reason, there exists a subject that processing may require time.

そこで、より速く処理を実行することができるICカード、携帯可能電子装置、及びICカードの制御プログラムを提供することを目的とする。   Therefore, an object is to provide an IC card, a portable electronic device, and an IC card control program capable of executing processing faster.

一実施形態に係るICカードは、外部機器から入力されるコマンドに応じて処理を行うICカードであって、前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第1の演算手段と、前記秘密情報に基づいて秘密鍵を算出する第2の演算手段と、前記第2の演算手段により算出された前記秘密鍵を格納する鍵記憶手段と、を具備する。   An IC card according to an embodiment is an IC card that performs processing in accordance with a command input from an external device, the receiving unit receiving a key sharing command transmitted from the external device, and the key sharing First calculation means for calculating secret information in response to the command and sharing the secret information with the external device; second calculation means for calculating a secret key based on the secret information; Key storage means for storing the secret key calculated by the calculation means.

図1は、一実施形態に係るICカード処理システムの例について説明するための図である。FIG. 1 is a diagram for explaining an example of an IC card processing system according to an embodiment. 図2は、一実施形態に係るICカードの例について説明するための図である。FIG. 2 is a diagram for explaining an example of an IC card according to an embodiment. 図3は、一実施形態に係るICカードの処理の例について説明するための図である。FIG. 3 is a diagram for explaining an example of processing of the IC card according to the embodiment.

以下、図面を参照しながら、一実施形態に係るICカード、携帯可能電子装置、及びICカードの制御プログラムについて詳細に説明する。   Hereinafter, an IC card, a portable electronic device, and an IC card control program according to an embodiment will be described in detail with reference to the drawings.

本実施形態に係る端末装置10のカードリーダライタ17及びICカード20は、例えば、ETSI TS 102 613により規定されているSingle Wire Protocol(SWP)、二重伝送通信などの接触通信の機能、及びISO/IEC14443などにより規定されている非接触通信の機能の両方またはいずれかの機能を備える。これにより、カードリーダライタ17及びICカード20は、互いにデータの送受信を行うことができる。   The card reader / writer 17 and the IC card 20 of the terminal device 10 according to the present embodiment include, for example, a single communication protocol (SWP) defined by ETSI TS 102 613, contact communication functions such as dual transmission communication, and ISO. / IEC14443 is provided with both or any of the functions of non-contact communication defined by IEC14443. Thereby, the card reader / writer 17 and the IC card 20 can transmit and receive data to and from each other.

図1は、一実施形態に係るICカード処理システム1の構成例について示す。
ICカード処理システム1は、携帯可能電子装置(ICカード)20を処理する端末装置10と、ICカード20と、を備える。端末装置10とICカード20とは、上記したように接触通信、または非接触通信により互いに種々のデータを送受信する。
FIG. 1 shows a configuration example of an IC card processing system 1 according to an embodiment.
The IC card processing system 1 includes a terminal device 10 that processes a portable electronic device (IC card) 20 and an IC card 20. As described above, the terminal device 10 and the IC card 20 transmit / receive various data to / from each other by contact communication or non-contact communication.

端末装置10は、CPU11、RAM12、ROM13、不揮発性メモリ14、操作部15、表示部16、及びカードリーダライタ17を備える。CPU11、RAM12、ROM13、操作部15、表示部16、及びカードリーダライタ17は、それぞれバス19を介して互いに接続されている。   The terminal device 10 includes a CPU 11, a RAM 12, a ROM 13, a nonvolatile memory 14, an operation unit 15, a display unit 16, and a card reader / writer 17. The CPU 11, RAM 12, ROM 13, operation unit 15, display unit 16, and card reader / writer 17 are connected to each other via a bus 19.

CPU11は、端末装置10全体の制御を司る制御部として機能する。CPU11は、ROM13に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、CPU11は、カードリーダライタ17を介してICカード20とコマンド及びレスポンスの送受信を行う。   The CPU 11 functions as a control unit that controls the entire terminal device 10. The CPU 11 performs various processes based on the control program and control data stored in the ROM 13. For example, the CPU 11 transmits and receives commands and responses to and from the IC card 20 via the card reader / writer 17.

RAM12は、ワーキングメモリとして機能する揮発性のメモリである。RAM12は、CPU11の処理中のデータなどを一時的に格納する。例えば、RAM12は、カードリーダライタ17を介して外部の機器と送受信するデータを一時的に格納する。また、RAM12は、CPU11が実行するプログラムを一時的に格納する。ROM13は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。   The RAM 12 is a volatile memory that functions as a working memory. The RAM 12 temporarily stores data being processed by the CPU 11. For example, the RAM 12 temporarily stores data to be transmitted / received to / from an external device via the card reader / writer 17. The RAM 12 temporarily stores a program executed by the CPU 11. The ROM 13 is a non-volatile memory that stores a control program, control data, and the like in advance.

不揮発性メモリ14は、例えばEEPROM、FRAMなどを備える。不揮発性メモリ14は、例えば、制御用のプログラム、制御データ、アプリケーション、及びアプリケーションに用いられるデータなどを記憶する。   The nonvolatile memory 14 includes, for example, an EEPROM, an FRAM, and the like. The nonvolatile memory 14 stores, for example, a control program, control data, an application, and data used for the application.

操作部15は、例えば操作キーなどを備える。操作部15は、端末装置10の操作者により入力される操作に基づいて、操作信号を生成する。操作部15は、生成した操作信号をCPU11に入力する。   The operation unit 15 includes, for example, operation keys. The operation unit 15 generates an operation signal based on an operation input by an operator of the terminal device 10. The operation unit 15 inputs the generated operation signal to the CPU 11.

表示部16は、CPU11、またはCPU11により制御されるグラフィック処理部から入力される表示信号に基づいて、種々の情報を表示する。なお、端末装置10は、操作部15と表示部16とが一体に形成されるタッチパネルを備える構成であってもよい。   The display unit 16 displays various information based on a display signal input from the CPU 11 or a graphic processing unit controlled by the CPU 11. The terminal device 10 may be configured to include a touch panel in which the operation unit 15 and the display unit 16 are integrally formed.

カードリーダライタ17は、ICカード20と通信を行うためのインターフェース装置である。カードリーダライタ17は、ICカード20が装着されるスロット18を備える。カードリーダライタ17は、接触通信、または非接触通信によりスロット18に装着されたICカード20とデータの送受信を行う。   The card reader / writer 17 is an interface device for communicating with the IC card 20. The card reader / writer 17 includes a slot 18 in which the IC card 20 is inserted. The card reader / writer 17 transmits / receives data to / from the IC card 20 mounted in the slot 18 by contact communication or non-contact communication.

接触通信のインターフェースとして用いられる場合、カードリーダライタ17は、ICカード20が備えるコンタクトパターンと接続される複数の接触端子を備える。スロット18にICカード20が装着される場合、カードリーダライタ17の複数の接触端子は、ICカード20のコンタクトパターンに接続される。これにより、端末装置10とICカード20とは電気的に接続される。カードリーダライタ17は、スロットに装着されたICカード20に対して、電力の供給、クロックの供給、リセット信号の入力、及びデータの送受信などを行う。   When used as an interface for contact communication, the card reader / writer 17 includes a plurality of contact terminals connected to a contact pattern included in the IC card 20. When the IC card 20 is inserted into the slot 18, the plurality of contact terminals of the card reader / writer 17 are connected to the contact pattern of the IC card 20. Thereby, the terminal device 10 and the IC card 20 are electrically connected. The card reader / writer 17 performs power supply, clock supply, reset signal input, data transmission / reception, and the like to the IC card 20 installed in the slot.

また、非接触通信のインターフェースとして用いられる場合、カードリーダライタ17は、送受信するデータに対して信号処理を施す信号処理部と、所定の共振周波数を有するアンテナとを備える。   When used as an interface for non-contact communication, the card reader / writer 17 includes a signal processing unit that performs signal processing on data to be transmitted and received, and an antenna having a predetermined resonance frequency.

カードリーダライタ17は、例えば、信号処理部により、送受信するデータに対して符号化、復号、変調、及び復調などの信号処理を行なう。また、カードリーダライタ17は、符号化及び変調を施したデータをアンテナに供給する。アンテナは、供給されたデータに応じて磁界を発生させる。これにより、端末装置10は、スロットに装着されたICカード20に対してデータを非接触で送信することができる。   For example, the card reader / writer 17 performs signal processing such as encoding, decoding, modulation, and demodulation on data to be transmitted and received by a signal processing unit. The card reader / writer 17 supplies the encoded and modulated data to the antenna. The antenna generates a magnetic field according to the supplied data. Thereby, the terminal device 10 can transmit data to the IC card 20 mounted in the slot in a contactless manner.

さらに、カードリーダライタ17のアンテナは、磁界を検知し、検知した磁界に応じて信号を生成する。これにより、カードリーダライタ17は、信号を非接触で受信することができる。信号処理部は、アンテナにより受信された信号に対して復調及び復号を行う。これにより、端末装置10は、スロットに装着されたICカード20から送信された元のデータを取得することができる。   Further, the antenna of the card reader / writer 17 detects a magnetic field and generates a signal according to the detected magnetic field. Thereby, the card reader / writer 17 can receive a signal in a non-contact manner. The signal processing unit demodulates and decodes the signal received by the antenna. Thereby, the terminal device 10 can acquire the original data transmitted from the IC card 20 mounted in the slot.

CPU11は、カードリーダライタ17によりICカード20に対して種々のコマンドを入力する。ICカード20は、例えば、カードリーダライタ17からデータの書き込みコマンドを受信した場合、受信したデータを内部の不揮発性メモリに書き込む処理を行う。   The CPU 11 inputs various commands to the IC card 20 by the card reader / writer 17. For example, when the IC card 20 receives a data write command from the card reader / writer 17, the IC card 20 performs a process of writing the received data in the internal nonvolatile memory.

また、CPU11は、ICカード20に読み取りコマンドを送信することにより、ICカード20からデータを読み出す。CPU11は、ICカード20から受信したデータに基づいて種々の処理を行う。   Further, the CPU 11 reads data from the IC card 20 by transmitting a read command to the IC card 20. The CPU 11 performs various processes based on the data received from the IC card 20.

図2は、図1に示すICカード20の構成例を示す。
図2に示すように、ICカード20は、矩形状の本体と、本体内に内蔵されるICモジュール21を備えている。ICモジュール21は、ICチップ22を備える。
FIG. 2 shows a configuration example of the IC card 20 shown in FIG.
As shown in FIG. 2, the IC card 20 includes a rectangular main body and an IC module 21 built in the main body. The IC module 21 includes an IC chip 22.

ICチップ22は、通信インターフェース23、CPU24、ROM25、RAM26、不揮発性メモリ27、電源部28、及びコプロセッサ29を備える。   The IC chip 22 includes a communication interface 23, a CPU 24, a ROM 25, a RAM 26, a nonvolatile memory 27, a power supply unit 28, and a coprocessor 29.

通信インターフェース23は、ICカード20に接続される外部機器(例えば端末装置10)との間で送受信するデータに対して符号化、復号、変調、及び復調などを行う。   The communication interface 23 performs encoding, decoding, modulation, demodulation, and the like on data transmitted / received to / from an external device (for example, the terminal device 10) connected to the IC card 20.

ICカード20が端末装置10との間で接触通信によりデータの送受信を行う構成である場合、通信インターフェース23は、コンタクトパターンを備える。コンタクトパターンは、導電性を有する金属などによりICモジュール21の表面に形成される接触端子である。即ち、コンタクトパターンは、端末装置10と接触可能な状態で形成されている。コンタクトパターンは、金属により形成される面が複数のエリアに区切られて形成される。区切られた各エリアは、それぞれコンタクトパターンの端子として機能する。通信インターフェース23は、コンタクトパターンを介してカードリーダライタ17とデータの送受信を行うことができる。   When the IC card 20 is configured to transmit / receive data to / from the terminal device 10 by contact communication, the communication interface 23 includes a contact pattern. The contact pattern is a contact terminal formed on the surface of the IC module 21 with a conductive metal or the like. That is, the contact pattern is formed so as to be in contact with the terminal device 10. The contact pattern is formed by dividing a surface formed of metal into a plurality of areas. Each divided area functions as a contact pattern terminal. The communication interface 23 can transmit / receive data to / from the card reader / writer 17 via the contact pattern.

また、非接触通信のインターフェースとして用いられる場合、通信インターフェース23は、信号処理部とアンテナとを備える。   When used as an interface for non-contact communication, the communication interface 23 includes a signal processing unit and an antenna.

信号処理部は、端末装置10に送信するデータに対して符号化、負荷変調などの信号処理を行う。例えば、信号処理部は、端末装置10に送信するデータの変調(増幅)を行う。信号処理部は、信号処理を施したデータをアンテナに供給する。   The signal processing unit performs signal processing such as encoding and load modulation on data to be transmitted to the terminal device 10. For example, the signal processing unit modulates (amplifies) data to be transmitted to the terminal device 10. The signal processing unit supplies the signal-processed data to the antenna.

アンテナは、例えば、ICモジュール21が内蔵される本体に所定の形状で配設される金属線により構成される。ICカード20は、端末装置10に送信するデータに応じてアンテナにより磁界を発生させる。これにより、ICカード20は、端末装置10に対してデータを送信することができる。また、ICカード20は、電磁誘導によりアンテナに発生する誘導電流に基づいて端末装置10から送信されるデータを認識する。   The antenna is constituted by, for example, a metal wire disposed in a predetermined shape on a main body in which the IC module 21 is built. The IC card 20 generates a magnetic field by an antenna according to data transmitted to the terminal device 10. Thereby, the IC card 20 can transmit data to the terminal device 10. Further, the IC card 20 recognizes data transmitted from the terminal device 10 based on an induced current generated in the antenna by electromagnetic induction.

例えば、信号処理部は、アンテナに発生する誘導電流に対して復調、及び復号を行う。例えば、信号処理部は、アンテナにより受信する信号の解析を行う。これにより、通信インターフェース23は、2値の論理データを取得する。通信インターフェース23は、解析したデータをバスを介してCPU24に送信する。   For example, the signal processing unit demodulates and decodes the induced current generated in the antenna. For example, the signal processing unit analyzes a signal received by the antenna. As a result, the communication interface 23 acquires binary logical data. The communication interface 23 transmits the analyzed data to the CPU 24 via the bus.

また、通信インターフェース23は、受信レジスタ及び送信レジスタを備える。受信レジスタ及び送信レジスタは、一般的なレジスタであり、ICカード20が送受信するデータを一時的に格納する。即ち、受信レジスタは、通信インターフェース23を介して端末装置10から受信するデータを一時的に格納する。また、送信レジスタは、通信インターフェース23を介して端末装置10に送信するデータを一時的に格納する。   The communication interface 23 includes a reception register and a transmission register. The reception register and the transmission register are general registers, and temporarily store data transmitted and received by the IC card 20. That is, the reception register temporarily stores data received from the terminal device 10 via the communication interface 23. The transmission register temporarily stores data to be transmitted to the terminal device 10 via the communication interface 23.

CPU24は、種々の演算を行う演算素子である。CPU24は、ROM25あるいは不揮発性メモリ27に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。これにより、CPU24は、ICカード20の全体の制御を司ることができる。例えば、CPU24は、端末装置10のカードリーダライタ17から受信したコマンドに応じて種々の処理を行い、処理結果に基づいて、レスポンスの生成を行なう。   The CPU 24 is an arithmetic element that performs various calculations. The CPU 24 performs various processes based on the control program and control data stored in the ROM 25 or the nonvolatile memory 27. As a result, the CPU 24 can control the entire IC card 20. For example, the CPU 24 performs various processes according to commands received from the card reader / writer 17 of the terminal device 10 and generates a response based on the processing result.

ROM25は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。ROM25は、製造段階で制御プログラム及び制御データなどを記憶した状態でICカード20内に組み込まれる。即ち、ROM25に記憶される制御プログラム及び制御データは、予めICカード20の仕様に応じて組み込まれる。   The ROM 25 is a non-volatile memory that stores a control program and control data in advance. The ROM 25 is incorporated in the IC card 20 in a state where a control program, control data, and the like are stored at the manufacturing stage. That is, the control program and control data stored in the ROM 25 are incorporated according to the specifications of the IC card 20 in advance.

RAM26は、ワーキングメモリとして機能する揮発性のメモリである。RAM26は、CPU24の処理中のデータなどを一時的に格納する。例えば、RAM26は、CPU24が実行するプログラムを一時的に格納する。   The RAM 26 is a volatile memory that functions as a working memory. The RAM 26 temporarily stores data being processed by the CPU 24. For example, the RAM 26 temporarily stores a program executed by the CPU 24.

不揮発性メモリ27は、例えば、EEPROMあるいはフラッシュROMなどのデータの書き込み及び書換えが可能な不揮発性のメモリにより構成される。不揮発性メモリ27は、ICカード20の運用用途に応じて制御プログラム及び種々のデータを格納する。   The non-volatile memory 27 is configured by a non-volatile memory capable of writing and rewriting data, such as an EEPROM or a flash ROM. The non-volatile memory 27 stores a control program and various data according to the usage application of the IC card 20.

たとえば、不揮発性メモリ27では、プログラムファイル及びデータファイルなどが創成される。創成された各ファイルには、制御プログラム及び種々のデータなどが書き込まれる。CPU24は、不揮発性メモリ27、または、ROM25に記憶されているプログラムを実行することにより、種々の処理を実現することができる。   For example, in the nonvolatile memory 27, a program file, a data file, and the like are created. A control program and various data are written in each created file. The CPU 24 can realize various processes by executing a program stored in the nonvolatile memory 27 or the ROM 25.

電源部28は、通信インターフェース23を介してカードリーダライタ17から電力を受給し、受給した電力をICカード20の各部に供給する。ICカード20が接触通信を行う構成を備える場合、電源部28は、通信インターフェース23のコンタクトパターンを介してカードリーダライタ17から供給される電力をICカード20の各部に供給する。   The power supply unit 28 receives power from the card reader / writer 17 via the communication interface 23 and supplies the received power to each unit of the IC card 20. When the IC card 20 has a configuration for performing contact communication, the power supply unit 28 supplies power supplied from the card reader / writer 17 to each unit of the IC card 20 via the contact pattern of the communication interface 23.

また、ICカード20が非接触通信を行う構成を備える場合、カードリーダライタ17のアンテナから送信される電波、特にキャリア波に基づいて電力を生成する。さらに、電源部28は、動作クロックを生成する。電源部28は、発生させた電力及び動作クロックをICカード20の各部に電力を供給する。ICカード20の各部は、電力の供給を受けた場合、動作可能な状態になる。   Further, when the IC card 20 has a configuration for performing non-contact communication, power is generated based on a radio wave transmitted from the antenna of the card reader / writer 17, particularly a carrier wave. Further, the power supply unit 28 generates an operation clock. The power supply unit 28 supplies the generated power and operation clock to each unit of the IC card 20. Each unit of the IC card 20 becomes operable when supplied with power.

コプロセッサ29は、演算素子及びレジスタなどを有する演算処理部である。コプロセッサ29は、演算処理をハードウエアにより行う。例えば、コプロセッサ29は、端末装置10からのコマンドに基づいて、暗号化、復号、ハッシュ計算、及び乱数の生成などの処理を行う。例えば、端末装置10から相互認証コマンドを受信する場合、コプロセッサ29は、相互認証処理に係る演算処理を実行する。CPU24は、コプロセッサ29にデータを入力し、コプロセッサ29に演算処理を実行させ、処理結果をコプロセッサ29から受け取る。   The coprocessor 29 is an arithmetic processing unit having arithmetic elements and registers. The coprocessor 29 performs arithmetic processing by hardware. For example, the coprocessor 29 performs processing such as encryption, decryption, hash calculation, and random number generation based on a command from the terminal device 10. For example, when receiving a mutual authentication command from the terminal device 10, the coprocessor 29 executes a calculation process related to the mutual authentication process. The CPU 24 inputs data to the coprocessor 29, causes the coprocessor 29 to execute arithmetic processing, and receives a processing result from the coprocessor 29.

コプロセッサ29は、例えば、DES(Data Encryption Standard)、またはAES(Advanced Encryption Standard)等の規格に基づいて暗号処理を行う。コプロセッサ29は、例えば不揮発性メモリ27、またはROM25に格納された暗号鍵を用いて暗号化、及び復号などの暗号処理を行う。   The coprocessor 29 performs encryption processing based on a standard such as DES (Data Encryption Standard) or AES (Advanced Encryption Standard). The coprocessor 29 performs encryption processing such as encryption and decryption using an encryption key stored in the nonvolatile memory 27 or the ROM 25, for example.

ICカード20は、一次発行と二次発行とにより発行される。ICカード20を発行する発行装置は、一次発行において、ICカード20にコマンド(初期化コマンド)を送信することにより、ICカード20の不揮発性メモリ27の初期化を行う。これにより、端末装置10は、ICカード20の不揮発性メモリ27内にICカード20の使用目的、及び使用用途などに応じた鍵ファイルやデータファイル等を定義する。   The IC card 20 is issued by primary issue and secondary issue. The issuing device that issues the IC card 20 initializes the nonvolatile memory 27 of the IC card 20 by transmitting a command (initialization command) to the IC card 20 in the primary issue. Accordingly, the terminal device 10 defines a key file, a data file, and the like corresponding to the purpose of use and use of the IC card 20 in the nonvolatile memory 27 of the IC card 20.

発行装置は、例えば、ISO/IEC7816により規定されているファイル構造を不揮発性メモリ27内に創成する。上記の初期化が行われた不揮発性メモリ27は、Master File(MF)、Dedicated File(DF)、及びElementary File(EF)などを有する。   For example, the issuing device creates a file structure defined in ISO / IEC7816 in the nonvolatile memory 27. The nonvolatile memory 27 that has been initialized includes a Master File (MF), a Dedicated File (DF), and an Elementary File (EF).

MFは、ファイル構造の根幹となるファイルである。DFは、MFの下位に創成される。DFは、アプリケーション及びアプリケーションに用いられるデータなどをグループ化して格納するファイルである。EFは、DFの下位に創成される。EFは、様々なデータを格納するためのファイルである。また、MFの直下にEFが置かれる場合もある。   The MF is a file that is the basis of the file structure. The DF is created below the MF. The DF is a file that stores applications and data used for the applications in groups. EF is created below DF. The EF is a file for storing various data. In some cases, an EF is placed directly under the MF.

EFには、Working Elementary File(WEF)とInternal Elementary File(IEF)などの種類がある。WEFは、作業用EFであり、個人情報などを格納する。IEFは、内部EFであり、例えば、セキュリティのための暗号鍵などのデータを記憶する。   There are various types of EFs, such as a Working Elementary File (WEF) and an Internal Elementary File (IEF). The WEF is a working EF and stores personal information and the like. The IEF is an internal EF and stores data such as an encryption key for security.

二次発行では、EFに例えば顧客データなどの個別データが格納される。これにより、ICカード20が運用可能な状態になる。即ち、CPU24は、不揮発性メモリ27、または、ROM25に記憶されているプログラムを実行することにより、種々の処理を実現することができる。   In the secondary issue, individual data such as customer data is stored in the EF. Thereby, the IC card 20 becomes operable. That is, the CPU 24 can implement various processes by executing programs stored in the nonvolatile memory 27 or the ROM 25.

ICカード20と端末装置10とは、通信(セッション)が確立した後に、鍵共有方式により種々の処理に用いることができる暗号鍵(秘密鍵)を生成し、共有する。ICカード20及び端末装置10は、例えば、ディフィー・ヘルマン鍵共有(Diffie−Hellman key exchange:DH方式)により秘密鍵を共有する。また、例えば、ICカード20及び端末装置10は、Elliptic curve DH方式(ECDH方式)により秘密鍵を共有する。   After the communication (session) is established, the IC card 20 and the terminal device 10 generate and share an encryption key (secret key) that can be used for various processes by a key sharing method. The IC card 20 and the terminal device 10 share a secret key by, for example, Diffie-Hellman key exchange (DH system). In addition, for example, the IC card 20 and the terminal device 10 share a secret key by an elliptic curve DH method (ECDH method).

ICカード20及び端末装置10は、上記したような鍵共有方式により、秘密情報を共有することができる。ICカード20及び端末装置10は、共有した秘密情報から秘密鍵を生成する。ICカード20及び端末装置10は、例えば、共有した秘密情報からSHA256などのハッシュ関数により秘密鍵を生成する。ICカード20及び端末装置10は、生成した秘密鍵により、上記のDES、またはAESなどによる暗号処理を行う。   The IC card 20 and the terminal device 10 can share secret information by the key sharing method as described above. The IC card 20 and the terminal device 10 generate a secret key from the shared secret information. For example, the IC card 20 and the terminal device 10 generate a secret key from the shared secret information using a hash function such as SHA256. The IC card 20 and the terminal device 10 perform encryption processing by DES or AES using the generated secret key.

鍵共有方式を行う場合、端末装置10は、公開情報P(例えば素数及びドメインパラメータ)をICカード20との間で共有化する。端末装置10は、鍵共有方式をICカード20に行わせるためのコマンドにより、素数及びドメインパラメータを指定する。これにより、端末装置10とICカード20との間で素数及びドメインパラメータが共有化される。   When performing the key sharing method, the terminal device 10 shares the public information P (for example, prime numbers and domain parameters) with the IC card 20. The terminal device 10 designates a prime number and a domain parameter by a command for causing the IC card 20 to perform the key sharing method. As a result, the prime number and the domain parameter are shared between the terminal device 10 and the IC card 20.

端末装置10は、まず乱数Aを生成する。端末装置10は、公開情報Pと、生成した乱数Aとに基づいて演算結果Pを算出する。また、ICカード20は、まず乱数Bを生成する。ICカード20は、上記した公開情報Pと、生成した乱数Bとに基づいて演算結果Pを算出する。 The terminal device 10 first generates a random number A. Terminal device 10, a public information P, the operation result and calculates the P A on the basis of the generated random number A. The IC card 20 first generates a random number B. The IC card 20 calculates the calculation result P B based on the public information P described above and the generated random number B.

端末装置10は、演算結果PをICカード20に送信する。また、ICカード20は、演算結果Pを端末装置10に送信する。 Terminal device 10, the operation result to transmit the P A in the IC card 20. In addition, the IC card 20 transmits the calculation result P B to the terminal device 10.

端末装置10は、ICカード20から送信された演算結果Pと乱数Aとに基づいて演算結果PBAを算出する。また、ICカード20は、端末装置10から送信された演算結果Pと乱数Bとに基づいて演算結果PABを算出する。 The terminal device 10 calculates the calculation result P BA based on the calculation result P B and the random number A transmitted from the IC card 20. Further, IC card 20 calculates the calculation result P AB based on the transmitted operation result P A and the random number B from the terminal device 10.

この演算結果PBAと演算結果PABとは等しい。即ち、ICカード20及び端末装置10は、上記の演算を行うことにより、秘密情報J=PBA=PABを共有することができる。 Equal to the result of this calculation P BA and the operation result P AB. That is, the IC card 20 and the terminal device 10 can share the secret information J = P BA = P AB by performing the above calculation.

この方法によると、通信路により演算結果P及び演算結果Pが伝送される。この演算結果P及び演算結果Pからは、乱数A及び乱数Bを特定することができない。この為、最終的に秘密鍵の算出に用いられる秘密情報Jを類推することができない。この結果、ICカード20及び端末装置10は、安全に秘密情報Jを共有することができる。 According to this method, the calculation result P A and the calculation result P B are transmitted through the communication path. From this calculation result P A and the operation result P B, it is impossible to identify the random number A and the random number B. For this reason, the secret information J that is finally used for calculating the secret key cannot be inferred. As a result, the IC card 20 and the terminal device 10 can safely share the secret information J.

ICカード20及び端末装置10は、秘密情報Jに基づいてハッシュ関数の演算により秘密鍵Kを生成する。Secure Hash Algorithm(SHA)は、一群の関連したハッシュ関数であり、ビット長によりSHA224、SHA256、SHA384、SHA512などの種類が存在する。ICカード20及び端末装置10は、これらのうちのいずれか、または他のハッシュ関数に基づいて、秘密情報Jから暗号処理に用いることができる秘密鍵Kを生成することができる。   The IC card 20 and the terminal device 10 generate a secret key K by calculation of a hash function based on the secret information J. Secure Hash Algorithm (SHA) is a group of related hash functions, and there are types such as SHA224, SHA256, SHA384, and SHA512 depending on the bit length. The IC card 20 and the terminal device 10 can generate a secret key K that can be used for encryption processing from the secret information J based on any of these or other hash functions.

端末装置10は、生成した秘密鍵Kを格納する。端末装置10は、例えば、不揮発性メモリ14に生成した秘密鍵Kを格納する。また、端末装置10は、秘密鍵Kを共有したICカード20を識別する為の識別情報(例えばPUPI)を秘密鍵Kと対応付けて格納する。また、ICカード20は、生成した秘密鍵Kを格納する。例えば、ICカード20は、不揮発性メモリ27に生成した秘密鍵Kを格納する。また、端末装置10及びICカード20は、秘密情報Jを格納する構成であってもよい。   The terminal device 10 stores the generated secret key K. The terminal device 10 stores the generated secret key K in the nonvolatile memory 14, for example. Further, the terminal device 10 stores identification information (for example, PUPI) for identifying the IC card 20 sharing the secret key K in association with the secret key K. Further, the IC card 20 stores the generated secret key K. For example, the IC card 20 stores the generated secret key K in the nonvolatile memory 27. Further, the terminal device 10 and the IC card 20 may be configured to store the secret information J.

図3は、ICカード20の処理の例を示す。
まず、ICカード20が端末装置10のカードリーダライタ17のスロット18に装着される場合、端末装置10は、カードリーダライタを介してICカード20に電力を供給する。これにより、ICカード20は、動作可能な起動状態になる。
FIG. 3 shows an example of processing of the IC card 20.
First, when the IC card 20 is inserted into the slot 18 of the card reader / writer 17 of the terminal device 10, the terminal device 10 supplies power to the IC card 20 via the card reader / writer. As a result, the IC card 20 enters an operable start state.

端末装置10は、ICカード20に対して初期設定コマンドを送信する。この初期設定コマンドは、通信における種々の設定をICカード20と端末装置10との間で設定するためのコマンドである。   The terminal device 10 transmits an initial setting command to the IC card 20. This initial setting command is a command for setting various settings in communication between the IC card 20 and the terminal device 10.

端末装置10がICカード20に送信するコマンドは、「CLA」、「INS」、「P1」、「P2」、「Lc」、「Data」、及び「Le」などのフィールドを有する。   The command transmitted from the terminal device 10 to the IC card 20 has fields such as “CLA”, “INS”, “P1”, “P2”, “Lc”, “Data”, and “Le”.

「CLA」は、コマンドの層別を示すclass byteである。「INS」は、コマンドの種別を示すinstruction byteである。「P1」及び「P2」は、「INS」に応じたパラメータを示すparameter byteである。   “CLA” is a class byte indicating the stratification of the command. “INS” is an instruction byte indicating the type of command. “P1” and “P2” are parameter bytes indicating parameters according to “INS”.

「Lc」は、「Data」のデータの長さ(バイト数)を示すlength field for cording number Ncである。「Data」は、当該コマンドのデータ本体を示すcommand data fieldである。「Le」は、当該コマンドに対するレスポンスのデータ長を示すlength field for cording number Neである。   “Lc” is a length field for coding number Nc indicating the length (number of bytes) of data of “Data”. “Data” is a command data field indicating the data body of the command. “Le” is a length field for coding number Ne indicating the data length of the response to the command.

即ち、「CLA」及び「INS」により、当該コマンドの種類が示される。ICカード20は、受信したコマンドの「CLA」及び「INS」の値を解析することにより、受信したコマンドの種類を認識する。   That is, “CLA” and “INS” indicate the type of the command. The IC card 20 recognizes the type of the received command by analyzing the “CLA” and “INS” values of the received command.

端末装置10は、「CLA」、「INS」、「P1」、「P2」、「Lc」、「Data」、及び「Le」の値を設定することにより、ICカード20に上記の初期設定を行なわせる為の初期設定コマンドを生成する。   The terminal device 10 sets the above initial settings to the IC card 20 by setting the values of “CLA”, “INS”, “P1”, “P2”, “Lc”, “Data”, and “Le”. Generate an initial setting command to be executed.

また、端末装置10は、不揮発性メモリ14に格納されている秘密鍵Kに対応付けられているICカードの識別情報を初期設定コマンドに付加する。   Further, the terminal device 10 adds the identification information of the IC card associated with the secret key K stored in the nonvolatile memory 14 to the initial setting command.

ICカード20は、端末装置10から送信された初期設定コマンドを受信する(ステップS31)。ICカード20は、受信した初期設定コマンドを解析する(ステップS32)。これにより、ICカード20は、端末装置10から指定された設定の内容を認識する。   The IC card 20 receives the initial setting command transmitted from the terminal device 10 (step S31). The IC card 20 analyzes the received initial setting command (step S32). Thereby, the IC card 20 recognizes the content of the setting designated from the terminal device 10.

ICカード20は、初期設定コマンドに応じて通信に関する種々の設定を行ない、処理結果に応じたレスポンスを端末装置10に送信する。これにより、ICカード20は、端末装置10との間で通信(セッション)を確立する(ステップS33)。なお、ICカード20は、自身のPUPIをレスポンスに付加し、端末装置10に送信する。   The IC card 20 performs various settings related to communication according to the initial setting command, and transmits a response according to the processing result to the terminal device 10. Thereby, the IC card 20 establishes communication (session) with the terminal device 10 (step S33). The IC card 20 adds its own PUPI to the response and transmits it to the terminal device 10.

また、ICカード20は、初期設定コマンドを解析することにより、端末装置10に秘密鍵Kが登録されているICカードの識別情報を認識する。即ち、ICカード20は、この識別情報を認識することにより、端末装置10に秘密鍵Kが登録されているICカードを特定することができる。ICカード20は、特定情報が初期設定コマンドに含まれているか否か判断する(ステップS34)。即ち、ICカード20は、自身の識別情報(PUPI)と一致する識別情報が初期設定コマンドに含まれているか否か判断する。   Further, the IC card 20 recognizes the identification information of the IC card in which the secret key K is registered in the terminal device 10 by analyzing the initial setting command. That is, the IC card 20 can identify the IC card in which the secret key K is registered in the terminal device 10 by recognizing the identification information. The IC card 20 determines whether specific information is included in the initial setting command (step S34). That is, the IC card 20 determines whether or not identification information that matches its own identification information (PUPI) is included in the initial setting command.

端末装置10は、ICカード20からレスポンスを受信した場合、受信したレスポンス中のPUPIを認識する。端末装置10は、受信したPUPIと対応付けられた秘密鍵Kが不揮発性メモリ14に記憶されているか否か判断する。受信したPUPIと対応付けられた秘密鍵Kが不揮発性メモリ14に記憶されている場合、端末装置10は、ICカード20と共有化された秘密鍵Kが不揮発性メモリ14に記憶されていることを認識する。   When receiving a response from the IC card 20, the terminal device 10 recognizes the PUPI in the received response. The terminal device 10 determines whether or not the secret key K associated with the received PUPI is stored in the nonvolatile memory 14. When the secret key K associated with the received PUPI is stored in the nonvolatile memory 14, the terminal device 10 stores the secret key K shared with the IC card 20 in the nonvolatile memory 14. Recognize

ICカード20と共有化された秘密鍵Kが不揮発性メモリ14に記憶されていない場合、端末装置10及びICカード20は、鍵共有方式により秘密鍵Kを共有化する。この場合、端末装置10は、鍵共有方式をICカード20に行わせるためのコマンド(鍵共有化コマンド)を生成し、ICカード20に送信する。なお、端末装置10は、公開情報Pを鍵共有化コマンドに付加する。   When the secret key K shared with the IC card 20 is not stored in the nonvolatile memory 14, the terminal device 10 and the IC card 20 share the secret key K by the key sharing method. In this case, the terminal device 10 generates a command (key sharing command) for causing the IC card 20 to perform the key sharing method, and transmits the command to the IC card 20. Note that the terminal device 10 adds the public information P to the key sharing command.

ICカード20は、端末装置10から送信された鍵共有化コマンドを受信する。ICカード20は、受信した鍵共有化コマンドを解析する。これにより、ICカード20は、端末装置10から指定された公開情報Pを認識する。この結果、ICカード20は、端末装置10との間で公開情報Pを共有化する(ステップS35)。即ち、ICカード20及び端末装置10は、素数及びドメインパラメータを共有化する。   The IC card 20 receives the key sharing command transmitted from the terminal device 10. The IC card 20 analyzes the received key sharing command. Thereby, the IC card 20 recognizes the public information P specified from the terminal device 10. As a result, the IC card 20 shares the public information P with the terminal device 10 (step S35). That is, the IC card 20 and the terminal device 10 share the prime number and the domain parameter.

まず、ICカード20は、鍵共有方式の第1の処理を実行する(ステップS36)。また、端末装置10も同様に鍵共有方式の第1の処理を実行する。端末装置10は、乱数Aを生成する。端末装置10は、公開情報Pと、生成した乱数Aとに基づいて演算結果Pを算出する。端末装置10は、演算結果PをICカード20に送信する。 First, the IC card 20 executes the first process of the key sharing method (step S36). Similarly, the terminal device 10 executes the first process of the key sharing method. The terminal device 10 generates a random number A. Terminal device 10, a public information P, the operation result and calculates the P A on the basis of the generated random number A. Terminal device 10, the operation result to transmit the P A in the IC card 20.

ICカード20は、乱数Bを生成する。ICカード20は、上記した公開情報Pと、生成した乱数Bとに基づいて演算結果Pを算出する。また、ICカード20は、演算結果Pを端末装置10に送信する。 The IC card 20 generates a random number B. The IC card 20 calculates the calculation result P B based on the public information P described above and the generated random number B. In addition, the IC card 20 transmits the calculation result P B to the terminal device 10.

次に、ICカード20は、鍵共有方式の第2の処理を実行する(ステップS37)。また、端末装置10も同様に鍵共有方式の第2の処理を実行する。端末装置10は、ICカード20から送信された演算結果Pと乱数Aとに基づいて演算結果PBA(秘密情報J)を算出する。また、ICカード20は、端末装置10から送信された演算結果Pと乱数Bとに基づいて演算結果PAB(秘密情報J)を算出する。これにより、ICカード20及び端末装置10は、秘密情報Jを共有することができる。 Next, the IC card 20 executes the second process of the key sharing method (step S37). Similarly, the terminal device 10 executes the second process of the key sharing method. The terminal device 10 calculates the calculation result P BA (secret information J) based on the calculation result P B and the random number A transmitted from the IC card 20. Further, IC card 20 calculates the calculation result P AB (secret information J) based on the calculation result P A and the random number B transmitted from the terminal device 10. Thereby, the IC card 20 and the terminal device 10 can share the secret information J.

さらに、ICカード20は、秘密鍵Kを生成する(ステップS38)。また、端末装置10も同様に秘密鍵Kを生成する。ICカード20及び端末装置10は、秘密情報Jに基づいてハッシュ関数の演算により秘密鍵Kを生成する。即ち、ICカード20及び端末装置10は、秘密情報Jをハッシュ関数の入力として演算を行い、秘密鍵Kを算出する。   Further, the IC card 20 generates a secret key K (step S38). Similarly, the terminal device 10 also generates a secret key K. The IC card 20 and the terminal device 10 generate a secret key K by calculation of a hash function based on the secret information J. That is, the IC card 20 and the terminal device 10 perform an operation using the secret information J as an input of the hash function, and calculate the secret key K.

ICカード20は、生成した秘密鍵Kを不揮発性メモリ27に格納する(ステップS39)。上記したように、ICカード20は、秘密鍵Kを不揮発性メモリ27のIEFに格納する。また、端末装置10は、例えば、不揮発性メモリ14に生成した秘密鍵Kを格納する。端末装置10は、初期設定コマンドのレスポンスに付加されていたPUPIと、秘密鍵Kとを対応付けて、不揮発性メモリ14に格納する。上記の処理により、秘密鍵KがICカード20と端末装置10との間で共有化された。   The IC card 20 stores the generated secret key K in the nonvolatile memory 27 (step S39). As described above, the IC card 20 stores the secret key K in the IEF of the nonvolatile memory 27. The terminal device 10 stores the generated secret key K in the nonvolatile memory 14, for example. The terminal device 10 stores the PUPI added to the response of the initial setting command and the secret key K in the nonvolatile memory 14 in association with each other. Through the above processing, the secret key K is shared between the IC card 20 and the terminal device 10.

さらに、ICカード20及び端末装置10は、相互認証処理を行う。相互認証では、ICカード20及び端末装置10は、秘密鍵Kを用いて乱数を使ったGetChallenge処理を行う。ICカード20及び端末装置10は、相互認証が成功した場合、お互いに生成した乱数を共有し、以降のコマンドデータの秘匿のための暗号化のセッション鍵として利用する。   Further, the IC card 20 and the terminal device 10 perform mutual authentication processing. In the mutual authentication, the IC card 20 and the terminal device 10 perform a GetChallenge process using a random number using the secret key K. When the mutual authentication is successful, the IC card 20 and the terminal device 10 share the generated random numbers and use them as encryption session keys for concealing subsequent command data.

相互認証処理を行う場合、端末装置10は、相互認証処理をICカード20に実行させる為の相互認証コマンドを生成し、ICカード20に送信する。   When performing the mutual authentication process, the terminal device 10 generates a mutual authentication command for causing the IC card 20 to execute the mutual authentication process, and transmits the mutual authentication command to the IC card 20.

ICカード20は、端末装置10から送信された相互認証コマンドを受信する(ステップS40)。ICカード20は、受信した相互認証コマンドを解析する(ステップS41)。ICカード20は、相互認証コマンドに相互認証処理を実行する(ステップS42)。即ち、ICカード20は、乱数を生成し、秘密鍵Kと乱数とに基づいて、暗号化及び復号を行う。また、ICカード20は、端末装置10から送信されたデータに対して、秘密鍵Kを用いて暗号化及び復号を行う。ICカード20及び端末装置10は、この結果に基づいて互いを認証する。   The IC card 20 receives the mutual authentication command transmitted from the terminal device 10 (step S40). The IC card 20 analyzes the received mutual authentication command (step S41). The IC card 20 performs a mutual authentication process on the mutual authentication command (step S42). In other words, the IC card 20 generates a random number and performs encryption and decryption based on the secret key K and the random number. Further, the IC card 20 encrypts and decrypts the data transmitted from the terminal device 10 using the secret key K. The IC card 20 and the terminal device 10 authenticate each other based on this result.

また、ステップS34で、特定情報が初期設定コマンドに含まれていると判断した場合、即ち、端末装置10とICカード20とで共通した秘密鍵Kが端末装置10に格納されていると判断した場合、ICカード20は、ステップS40に移行する。即ち、端末装置10及びICカード20は、不揮発性メモリ14及び27に格納されている秘密鍵Kをそれぞれ読み出し、相互認証処理に用いることが出来る。   If it is determined in step S34 that the specific information is included in the initial setting command, that is, it is determined that the secret key K common to the terminal device 10 and the IC card 20 is stored in the terminal device 10. In this case, the IC card 20 proceeds to step S40. That is, the terminal device 10 and the IC card 20 can read the secret key K stored in the nonvolatile memories 14 and 27, respectively, and use it for mutual authentication processing.

この場合、端末装置10及びICカード20は、鍵共有化方式による処理を省略することができる。即ち、ICカード20は、端末装置10から送信された初期設定コマンドに、自身のPUPIと一致するPUPIが付加されていた場合、鍵共有方式の第1の処理と第2の処理とを行なうことなくDES、またはAESなどを用いた相互認証処理を実行することができる。   In this case, the terminal device 10 and the IC card 20 can omit processing by the key sharing method. That is, the IC card 20 performs the first process and the second process of the key sharing method when a PUPI that matches its own PUPI is added to the initial setting command transmitted from the terminal device 10. Mutual authentication processing using DES or AES can be executed.

これにより、ICカード及びリーダライタは、通信(セッション)が切れた場合であっても、鍵共有方式による処理を再度実行することなく、種々の処理を実行することが出来る。即ち、ICカード20及び端末装置10は、鍵の共有から相互認証、コマンドデータ秘匿までのセッション確立処理の一部を簡易化することで、大きくセキュリティレベルを下げることなく1つのトランザクションにかかる処理時間を低減することができる。この為、処理時間の短縮、及び省電力化を実現することができる。この結果、より速く処理を実行することができるICカード、携帯可能電子装置、及びICカードの制御プログラムを提供することができる。   Thereby, even if the IC card and the reader / writer are disconnected from the communication (session), various processes can be executed without executing the process by the key sharing method again. That is, the IC card 20 and the terminal device 10 can simplify a part of the session establishment process from key sharing to mutual authentication and command data concealment, so that the processing time required for one transaction without greatly reducing the security level. Can be reduced. For this reason, shortening of processing time and power saving can be realized. As a result, it is possible to provide an IC card, a portable electronic device, and an IC card control program that can execute processing faster.

なお、上記の実施形態では、端末装置10及びICカード20は、生成した秘密鍵Kを格納する構成であると説明したが、この構成に限定されない。端末装置10及びICカード20は、秘密情報Jを格納する構成であってもよい。この場合も、端末装置10及びICカード20は、図3のステップS35乃至ステップS39の処理を省略することができる。なお、この場合、端末装置10及びICカード20は、相互認証処理の前に、秘密情報Jからハッシュ関数により秘密鍵Kを生成する必要がある。   In the above embodiment, the terminal device 10 and the IC card 20 have been described as being configured to store the generated secret key K. However, the present invention is not limited to this configuration. The terminal device 10 and the IC card 20 may be configured to store the secret information J. Also in this case, the terminal device 10 and the IC card 20 can omit the processes in steps S35 to S39 in FIG. In this case, the terminal device 10 and the IC card 20 need to generate a secret key K from the secret information J using a hash function before mutual authentication processing.

また、端末装置10から送られてくる初期設定コマンド内の特定情報は、前回共有した秘密情報Jから生成した秘密鍵Kで暗号化されていてもよい。この場合、ICカード20は、受信した初期設定コマンドの特定情報を、不揮発性メモリ27に記憶されている秘密鍵Kにより復号する。ICカード20は、自身の識別情報(PUPI)と一致する情報が、復号した特定情報の中にある場合、秘密鍵Kが端末装置10との間で共有化されていると判断する。   Further, the specific information in the initial setting command sent from the terminal device 10 may be encrypted with the secret key K generated from the secret information J shared last time. In this case, the IC card 20 decrypts the received specific information of the initial setting command with the secret key K stored in the nonvolatile memory 27. The IC card 20 determines that the secret key K is shared with the terminal device 10 when the information that matches the identification information (PUPI) of the IC card 20 is included in the decrypted specific information.

また、ICカード20は、特定情報と、自身のPUPIとを比較するのではなく、日付情報などを利用することも考えられる。即ち、端末装置10は、日付情報を初期設定コマンドに付加する。ICカード20は、日付情報が所定の範囲に収まっているか否か判断する。日付情報が所定の範囲に収まっている場合、ICカード20は、鍵共有方式による処理を行わずに、不揮発性メモリ27に格納されている秘密鍵Kを用いて処理を行う。また、日付情報が所定の範囲に収まっていない場合、ICカード20は、鍵共有方式により秘密鍵Kを端末装置10と共有化する処理を行う。   Further, the IC card 20 may use date information or the like instead of comparing the specific information with its own PUPI. That is, the terminal device 10 adds date information to the initial setting command. The IC card 20 determines whether the date information is within a predetermined range. When the date information is within a predetermined range, the IC card 20 performs processing using the secret key K stored in the nonvolatile memory 27 without performing processing by the key sharing method. If the date information does not fall within the predetermined range, the IC card 20 performs processing for sharing the secret key K with the terminal device 10 by the key sharing method.

即ち、ICカード20は、秘密鍵Kが有効である期限を示す期限情報を不揮発性メモリ27に記憶する。ICカード20は、初期設定コマンドに付加されている日付情報が期限情報を満たすか否か判断する。即ち、ICカード20は、初期設定コマンドに付加されている日付情報が期限情報を満たし、且つ、自身の識別情報(PUPI)と一致する情報が、特定情報の中にある場合、有効な秘密鍵Kが端末装置10との間で共有化されていると判断する。   That is, the IC card 20 stores time limit information indicating the time limit for which the secret key K is valid in the nonvolatile memory 27. The IC card 20 determines whether the date information added to the initial setting command satisfies the time limit information. That is, when the date information added to the initial setting command satisfies the deadline information and the information that matches the identification information (PUPI) of the IC card 20 is included in the specific information, the IC card 20 has a valid secret key. It is determined that K is shared with the terminal device 10.

なお、上述の各実施の形態で説明した機能は、ハードウエアを用いて構成するに留まらず、ソフトウエアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウエア、ハードウエアのいずれかを選択して構成するものであっても良い。   It should be noted that the functions described in the above embodiments are not limited to being configured using hardware, but can be realized by causing a computer to read a program describing each function using software. Each function may be configured by appropriately selecting either software or hardware.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment.

1…ICカード処理システム、10…端末装置、11…CPU、12…RAM、13…ROM、14…不揮発性メモリ、15…操作部、16…表示部、17…カードリーダライタ、18…スロット、19…バス、20…ICカード、21…ICモジュール、22…ICチップ、23…通信インターフェース、23a…通信インターフェース、24…CPU、25…ROM、26…RAM、27…不揮発性メモリ、28…電源部、29…コプロセッサ。   DESCRIPTION OF SYMBOLS 1 ... IC card processing system, 10 ... Terminal device, 11 ... CPU, 12 ... RAM, 13 ... ROM, 14 ... Nonvolatile memory, 15 ... Operation part, 16 ... Display part, 17 ... Card reader / writer, 18 ... Slot, DESCRIPTION OF SYMBOLS 19 ... Bus, 20 ... IC card, 21 ... IC module, 22 ... IC chip, 23 ... Communication interface, 23a ... Communication interface, 24 ... CPU, 25 ... ROM, 26 ... RAM, 27 ... Non-volatile memory, 28 ... Power supply Part, 29 ... coprocessor.

Claims (9)

外部機器から入力されるコマンドに応じて処理を行うICカードであって、
前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、
前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第1の演算手段と、
前記秘密情報に基づいて秘密鍵を算出する第2の演算手段と、
前記第2の演算手段により算出された前記秘密鍵を格納する鍵記憶手段と、
を具備するICカード。
An IC card that performs processing in response to a command input from an external device,
Receiving means for receiving a key sharing command transmitted from the external device;
First calculation means for calculating secret information in response to the key sharing command and sharing the secret information with the external device;
Second computing means for calculating a secret key based on the secret information;
Key storage means for storing the secret key calculated by the second calculation means;
IC card comprising:
前記ICカードの動作を制御する制御手段をさらに具備し、
前記受信手段は、前記外部機器から送信された初期設定コマンドを受信し、
前記制御手段は、前記初期設定コマンドに付加されている特定情報に応じて、前記秘密鍵を前記鍵記憶手段から読み出すか、前記第1の演算手段及び前記第2の演算手段により前記秘密鍵を算出するか、を選択する、
請求項1に記載のICカード。
Further comprising control means for controlling the operation of the IC card,
The receiving means receives an initial setting command transmitted from the external device,
The control means reads out the secret key from the key storage means according to the specific information added to the initial setting command, or obtains the secret key by the first calculation means and the second calculation means. Select whether to calculate,
The IC card according to claim 1.
識別情報を記憶する識別情報記憶手段をさらに具備し、
前記制御手段は、前記特定情報と、前記識別情報とを比較し、一致した場合、前記秘密鍵を前記鍵記憶手段から読み出すように制御する、
請求項2に記載のICカード。
Further comprising identification information storage means for storing identification information;
The control means compares the specific information with the identification information, and controls to read the secret key from the key storage means when they match.
The IC card according to claim 2.
前記外部機器との間で相互認証を行う相互認証手段をさらに具備し、
前記受信手段は、前記外部機器から送信された相互認証コマンドを受信し、
前記相互認証手段は、前記鍵記憶手段から読み出された前記秘密鍵を用いて前記相互認証を行なう、
請求項3に記載のICカード。
Further comprising mutual authentication means for performing mutual authentication with the external device,
The receiving means receives a mutual authentication command transmitted from the external device,
The mutual authentication means performs the mutual authentication using the secret key read from the key storage means.
The IC card according to claim 3.
前記初期設定コマンドに付加されている特定情報を前記鍵記憶手段により記憶されている前記秘密鍵により復号する復号手段をさらに具備し、
前記制御手段は、復号された前記特定情報と、前記識別情報とを比較し、一致した場合、前記秘密鍵を前記鍵記憶手段から読み出すように制御する、
請求項2に記載のICカード。
Further comprising decryption means for decrypting the specific information added to the initial setting command with the secret key stored in the key storage means;
The control means compares the decrypted specific information with the identification information, and controls to read the secret key from the key storage means when they match.
The IC card according to claim 2.
識別情報を記憶する識別情報記憶手段と、
前記秘密鍵が有効な期限を示す期限情報を記憶する期限情報記憶手段と、
をさらに具備し、
前記制御手段は、前記初期設定コマンドに付加されている特定情報と前記識別情報とが一致し、且つ、前記初期設定コマンドに付加されている日付情報が前記期限情報を満たす場合、前記秘密鍵を前記鍵記憶手段から読み出すように制御する、
請求項2に記載のICカード。
Identification information storage means for storing identification information;
Time limit information storage means for storing time limit information indicating a time limit during which the secret key is valid;
Further comprising
When the specific information added to the initial setting command matches the identification information, and the date information added to the initial setting command satisfies the deadline information, the control means uses the secret key. Control to read from the key storage means,
The IC card according to claim 2.
前記各部を備えるICモジュールと、
前記ICモジュールが配設される本体と、
を具備する請求項1に記載のICカード。
An IC module comprising the above-mentioned parts;
A main body on which the IC module is disposed;
The IC card according to claim 1, comprising:
外部機器から入力されるコマンドに応じて処理を行う携帯可能電子装置であって、
前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、
前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第1の演算手段と、
前記秘密情報に基づいて秘密鍵を算出する第2の演算手段と、
前記第2の演算手段により算出された前記秘密鍵を格納する鍵記憶手段と、
を具備する携帯可能電子装置。
A portable electronic device that performs processing in response to a command input from an external device,
Receiving means for receiving a key sharing command transmitted from the external device;
First calculation means for calculating secret information in response to the key sharing command and sharing the secret information with the external device;
Second computing means for calculating a secret key based on the secret information;
Key storage means for storing the secret key calculated by the second calculation means;
A portable electronic device comprising:
外部機器から入力されるコマンドに応じて処理を行うICカードにおいて実行される制御プログラムであって、前記ICカードを、
前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、
前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第1の演算手段と、
前記秘密情報に基づいて秘密鍵を算出する第2の演算手段と、
前記第2の演算手段により算出された前記秘密鍵を格納する鍵記憶手段と、
して動作させる制御プログラム。
A control program executed in an IC card that performs processing according to a command input from an external device, wherein the IC card is
Receiving means for receiving a key sharing command transmitted from the external device;
First calculation means for calculating secret information in response to the key sharing command and sharing the secret information with the external device;
Second computing means for calculating a secret key based on the secret information;
Key storage means for storing the secret key calculated by the second calculation means;
Control program to be operated.
JP2011264496A 2011-12-02 2011-12-02 Ic card, portable electronic device and control program of ic card Pending JP2013118473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011264496A JP2013118473A (en) 2011-12-02 2011-12-02 Ic card, portable electronic device and control program of ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011264496A JP2013118473A (en) 2011-12-02 2011-12-02 Ic card, portable electronic device and control program of ic card

Publications (1)

Publication Number Publication Date
JP2013118473A true JP2013118473A (en) 2013-06-13

Family

ID=48712755

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011264496A Pending JP2013118473A (en) 2011-12-02 2011-12-02 Ic card, portable electronic device and control program of ic card

Country Status (1)

Country Link
JP (1) JP2013118473A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457083A (en) * 2019-07-04 2019-11-15 深圳市中易通安全芯科技有限公司 A kind of starting method and device of chip file system
US11974127B2 (en) 2021-08-18 2024-04-30 Capital One Services, Llc Systems and methods for cryptographic authentication of contactless cards

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04223787A (en) * 1990-03-29 1992-08-13 Gte Lab Inc Video control system
JPH09138643A (en) * 1995-11-15 1997-05-27 Fujitsu Ltd Key storage system for data secrecy and data signature and security module provided with key storage function
JP2002330125A (en) * 2001-04-27 2002-11-15 Nippon Telegr & Teleph Corp <Ntt> Method to establish an encripted communication channel, program and program medium, and encrypted communication system
JP2003244123A (en) * 2002-02-14 2003-08-29 Nec Corp Common key management system, server, and method and program
JP2011524099A (en) * 2008-04-07 2011-08-25 インターデイジタル パテント ホールディングス インコーポレイテッド Secure session key generation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04223787A (en) * 1990-03-29 1992-08-13 Gte Lab Inc Video control system
JPH09138643A (en) * 1995-11-15 1997-05-27 Fujitsu Ltd Key storage system for data secrecy and data signature and security module provided with key storage function
JP2002330125A (en) * 2001-04-27 2002-11-15 Nippon Telegr & Teleph Corp <Ntt> Method to establish an encripted communication channel, program and program medium, and encrypted communication system
JP2003244123A (en) * 2002-02-14 2003-08-29 Nec Corp Common key management system, server, and method and program
JP2011524099A (en) * 2008-04-07 2011-08-25 インターデイジタル パテント ホールディングス インコーポレイテッド Secure session key generation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457083A (en) * 2019-07-04 2019-11-15 深圳市中易通安全芯科技有限公司 A kind of starting method and device of chip file system
CN110457083B (en) * 2019-07-04 2023-07-18 深圳市中易通安全芯科技有限公司 Method and device for starting chip file system
US11974127B2 (en) 2021-08-18 2024-04-30 Capital One Services, Llc Systems and methods for cryptographic authentication of contactless cards

Similar Documents

Publication Publication Date Title
US7845567B2 (en) Contactless card reader and information processing system
TWI524275B (en) Storage device and method of operating a storage device
JP4834748B2 (en) Information storage medium, medium authentication device, medium authentication system, and IC card
JP6382521B2 (en) Portable electronic device and electronic circuit
US20140189223A1 (en) Ic card, portable electronic device, and method of controlling ic card
JP2009032003A (en) Portable electronic device, terminal device, authentication system, and authentication method
JP2011022841A (en) Processing system for portable electronic apparatus, portable electronic apparatus, and processing apparatus for portable electronic apparatus
JP5459845B2 (en) Portable electronic device, method for controlling portable electronic device, and IC card
JP2013118473A (en) Ic card, portable electronic device and control program of ic card
JP5693824B2 (en) IC card processing device, IC card, and IC card processing system
US20150324411A1 (en) Data processing apparatus for ic card issuing, ic card issuing apparatus, ic card issuing system, data processing program for ic card issuing, ic card issuing program
JP2014186385A (en) Ic card and ic card control method
JP5677195B2 (en) Portable electronic device and method for controlling portable electronic device
JP5684051B2 (en) Portable electronic device, IC card, and control method for portable electronic device
JP6092342B2 (en) Non-contact portable electronic device and method for issuing non-contact portable electronic device
KR20070059946A (en) Rfid tag device and method for operating the same
JP2009015375A (en) Ic card with function of encrypting data, method, and program for ic card
JP2014002471A (en) Ic card processor and ic card
JP2014063292A (en) Ic card, portable electronic device, and ic card reader/writer
JP2013125400A (en) Ic card, portable electronic device, and control program for ic card
JP2013196010A (en) Portable electronic device, portable electronic device processor and portable electronic device control program
JP5726700B2 (en) IC card and IC card processing method
JP6800732B2 (en) Processing system and terminal
JP2014063263A (en) Ic card, portable electronic device, and ic card reader/writer
JP2014032601A (en) Ic card, portable electronic device, and ic card control program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131212

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131226

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140731

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150210

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150623