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 PDFInfo
- 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
Links
Images
Abstract
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.
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.
以下、図面を参照しながら、一実施形態に係る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
図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
端末装置10は、CPU11、RAM12、ROM13、不揮発性メモリ14、操作部15、表示部16、及びカードリーダライタ17を備える。CPU11、RAM12、ROM13、操作部15、表示部16、及びカードリーダライタ17は、それぞれバス19を介して互いに接続されている。
The
CPU11は、端末装置10全体の制御を司る制御部として機能する。CPU11は、ROM13に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、CPU11は、カードリーダライタ17を介してICカード20とコマンド及びレスポンスの送受信を行う。
The
RAM12は、ワーキングメモリとして機能する揮発性のメモリである。RAM12は、CPU11の処理中のデータなどを一時的に格納する。例えば、RAM12は、カードリーダライタ17を介して外部の機器と送受信するデータを一時的に格納する。また、RAM12は、CPU11が実行するプログラムを一時的に格納する。ROM13は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。
The
不揮発性メモリ14は、例えばEEPROM、FRAMなどを備える。不揮発性メモリ14は、例えば、制御用のプログラム、制御データ、アプリケーション、及びアプリケーションに用いられるデータなどを記憶する。
The
操作部15は、例えば操作キーなどを備える。操作部15は、端末装置10の操作者により入力される操作に基づいて、操作信号を生成する。操作部15は、生成した操作信号をCPU11に入力する。
The
表示部16は、CPU11、またはCPU11により制御されるグラフィック処理部から入力される表示信号に基づいて、種々の情報を表示する。なお、端末装置10は、操作部15と表示部16とが一体に形成されるタッチパネルを備える構成であってもよい。
The
カードリーダライタ17は、ICカード20と通信を行うためのインターフェース装置である。カードリーダライタ17は、ICカード20が装着されるスロット18を備える。カードリーダライタ17は、接触通信、または非接触通信によりスロット18に装着されたICカード20とデータの送受信を行う。
The card reader / writer 17 is an interface device for communicating with the
接触通信のインターフェースとして用いられる場合、カードリーダライタ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
また、非接触通信のインターフェースとして用いられる場合、カードリーダライタ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
さらに、カードリーダライタ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
CPU11は、カードリーダライタ17によりICカード20に対して種々のコマンドを入力する。ICカード20は、例えば、カードリーダライタ17からデータの書き込みコマンドを受信した場合、受信したデータを内部の不揮発性メモリに書き込む処理を行う。
The
また、CPU11は、ICカード20に読み取りコマンドを送信することにより、ICカード20からデータを読み出す。CPU11は、ICカード20から受信したデータに基づいて種々の処理を行う。
Further, the
図2は、図1に示すICカード20の構成例を示す。
図2に示すように、ICカード20は、矩形状の本体と、本体内に内蔵されるICモジュール21を備えている。ICモジュール21は、ICチップ22を備える。
FIG. 2 shows a configuration example of the
As shown in FIG. 2, the
ICチップ22は、通信インターフェース23、CPU24、ROM25、RAM26、不揮発性メモリ27、電源部28、及びコプロセッサ29を備える。
The
通信インターフェース23は、ICカード20に接続される外部機器(例えば端末装置10)との間で送受信するデータに対して符号化、復号、変調、及び復調などを行う。
The
ICカード20が端末装置10との間で接触通信によりデータの送受信を行う構成である場合、通信インターフェース23は、コンタクトパターンを備える。コンタクトパターンは、導電性を有する金属などによりICモジュール21の表面に形成される接触端子である。即ち、コンタクトパターンは、端末装置10と接触可能な状態で形成されている。コンタクトパターンは、金属により形成される面が複数のエリアに区切られて形成される。区切られた各エリアは、それぞれコンタクトパターンの端子として機能する。通信インターフェース23は、コンタクトパターンを介してカードリーダライタ17とデータの送受信を行うことができる。
When the
また、非接触通信のインターフェースとして用いられる場合、通信インターフェース23は、信号処理部とアンテナとを備える。
When used as an interface for non-contact communication, the
信号処理部は、端末装置10に送信するデータに対して符号化、負荷変調などの信号処理を行う。例えば、信号処理部は、端末装置10に送信するデータの変調(増幅)を行う。信号処理部は、信号処理を施したデータをアンテナに供給する。
The signal processing unit performs signal processing such as encoding and load modulation on data to be transmitted to the
アンテナは、例えば、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
例えば、信号処理部は、アンテナに発生する誘導電流に対して復調、及び復号を行う。例えば、信号処理部は、アンテナにより受信する信号の解析を行う。これにより、通信インターフェース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
また、通信インターフェース23は、受信レジスタ及び送信レジスタを備える。受信レジスタ及び送信レジスタは、一般的なレジスタであり、ICカード20が送受信するデータを一時的に格納する。即ち、受信レジスタは、通信インターフェース23を介して端末装置10から受信するデータを一時的に格納する。また、送信レジスタは、通信インターフェース23を介して端末装置10に送信するデータを一時的に格納する。
The
CPU24は、種々の演算を行う演算素子である。CPU24は、ROM25あるいは不揮発性メモリ27に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。これにより、CPU24は、ICカード20の全体の制御を司ることができる。例えば、CPU24は、端末装置10のカードリーダライタ17から受信したコマンドに応じて種々の処理を行い、処理結果に基づいて、レスポンスの生成を行なう。
The
ROM25は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。ROM25は、製造段階で制御プログラム及び制御データなどを記憶した状態でICカード20内に組み込まれる。即ち、ROM25に記憶される制御プログラム及び制御データは、予めICカード20の仕様に応じて組み込まれる。
The
RAM26は、ワーキングメモリとして機能する揮発性のメモリである。RAM26は、CPU24の処理中のデータなどを一時的に格納する。例えば、RAM26は、CPU24が実行するプログラムを一時的に格納する。
The
不揮発性メモリ27は、例えば、EEPROMあるいはフラッシュROMなどのデータの書き込み及び書換えが可能な不揮発性のメモリにより構成される。不揮発性メモリ27は、ICカード20の運用用途に応じて制御プログラム及び種々のデータを格納する。
The
たとえば、不揮発性メモリ27では、プログラムファイル及びデータファイルなどが創成される。創成された各ファイルには、制御プログラム及び種々のデータなどが書き込まれる。CPU24は、不揮発性メモリ27、または、ROM25に記憶されているプログラムを実行することにより、種々の処理を実現することができる。
For example, in the
電源部28は、通信インターフェース23を介してカードリーダライタ17から電力を受給し、受給した電力をICカード20の各部に供給する。ICカード20が接触通信を行う構成を備える場合、電源部28は、通信インターフェース23のコンタクトパターンを介してカードリーダライタ17から供給される電力をICカード20の各部に供給する。
The
また、ICカード20が非接触通信を行う構成を備える場合、カードリーダライタ17のアンテナから送信される電波、特にキャリア波に基づいて電力を生成する。さらに、電源部28は、動作クロックを生成する。電源部28は、発生させた電力及び動作クロックをICカード20の各部に電力を供給する。ICカード20の各部は、電力の供給を受けた場合、動作可能な状態になる。
Further, when the
コプロセッサ29は、演算素子及びレジスタなどを有する演算処理部である。コプロセッサ29は、演算処理をハードウエアにより行う。例えば、コプロセッサ29は、端末装置10からのコマンドに基づいて、暗号化、復号、ハッシュ計算、及び乱数の生成などの処理を行う。例えば、端末装置10から相互認証コマンドを受信する場合、コプロセッサ29は、相互認証処理に係る演算処理を実行する。CPU24は、コプロセッサ29にデータを入力し、コプロセッサ29に演算処理を実行させ、処理結果をコプロセッサ29から受け取る。
The
コプロセッサ29は、例えば、DES(Data Encryption Standard)、またはAES(Advanced Encryption Standard)等の規格に基づいて暗号処理を行う。コプロセッサ29は、例えば不揮発性メモリ27、またはROM25に格納された暗号鍵を用いて暗号化、及び復号などの暗号処理を行う。
The
ICカード20は、一次発行と二次発行とにより発行される。ICカード20を発行する発行装置は、一次発行において、ICカード20にコマンド(初期化コマンド)を送信することにより、ICカード20の不揮発性メモリ27の初期化を行う。これにより、端末装置10は、ICカード20の不揮発性メモリ27内にICカード20の使用目的、及び使用用途などに応じた鍵ファイルやデータファイル等を定義する。
The
発行装置は、例えば、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
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カード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カード20及び端末装置10は、上記したような鍵共有方式により、秘密情報を共有することができる。ICカード20及び端末装置10は、共有した秘密情報から秘密鍵を生成する。ICカード20及び端末装置10は、例えば、共有した秘密情報からSHA256などのハッシュ関数により秘密鍵を生成する。ICカード20及び端末装置10は、生成した秘密鍵により、上記のDES、またはAESなどによる暗号処理を行う。
The
鍵共有方式を行う場合、端末装置10は、公開情報P(例えば素数及びドメインパラメータ)をICカード20との間で共有化する。端末装置10は、鍵共有方式をICカード20に行わせるためのコマンドにより、素数及びドメインパラメータを指定する。これにより、端末装置10とICカード20との間で素数及びドメインパラメータが共有化される。
When performing the key sharing method, the
端末装置10は、まず乱数Aを生成する。端末装置10は、公開情報Pと、生成した乱数Aとに基づいて演算結果PAを算出する。また、ICカード20は、まず乱数Bを生成する。ICカード20は、上記した公開情報Pと、生成した乱数Bとに基づいて演算結果PBを算出する。
The
端末装置10は、演算結果PAをICカード20に送信する。また、ICカード20は、演算結果PBを端末装置10に送信する。
端末装置10は、ICカード20から送信された演算結果PBと乱数Aとに基づいて演算結果PBAを算出する。また、ICカード20は、端末装置10から送信された演算結果PAと乱数Bとに基づいて演算結果PABを算出する。
The
この演算結果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
この方法によると、通信路により演算結果PA及び演算結果PBが伝送される。この演算結果PA及び演算結果PBからは、乱数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カード20及び端末装置10は、秘密情報Jに基づいてハッシュ関数の演算により秘密鍵Kを生成する。Secure Hash Algorithm(SHA)は、一群の関連したハッシュ関数であり、ビット長によりSHA224、SHA256、SHA384、SHA512などの種類が存在する。ICカード20及び端末装置10は、これらのうちのいずれか、または他のハッシュ関数に基づいて、秘密情報Jから暗号処理に用いることができる秘密鍵Kを生成することができる。
The
端末装置10は、生成した秘密鍵Kを格納する。端末装置10は、例えば、不揮発性メモリ14に生成した秘密鍵Kを格納する。また、端末装置10は、秘密鍵Kを共有したICカード20を識別する為の識別情報(例えばPUPI)を秘密鍵Kと対応付けて格納する。また、ICカード20は、生成した秘密鍵Kを格納する。例えば、ICカード20は、不揮発性メモリ27に生成した秘密鍵Kを格納する。また、端末装置10及びICカード20は、秘密情報Jを格納する構成であってもよい。
The
図3は、ICカード20の処理の例を示す。
まず、ICカード20が端末装置10のカードリーダライタ17のスロット18に装着される場合、端末装置10は、カードリーダライタを介してICカード20に電力を供給する。これにより、ICカード20は、動作可能な起動状態になる。
FIG. 3 shows an example of processing of the
First, when the
端末装置10は、ICカード20に対して初期設定コマンドを送信する。この初期設定コマンドは、通信における種々の設定をICカード20と端末装置10との間で設定するためのコマンドである。
The
端末装置10がICカード20に送信するコマンドは、「CLA」、「INS」、「P1」、「P2」、「Lc」、「Data」、及び「Le」などのフィールドを有する。
The command transmitted from the
「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
端末装置10は、「CLA」、「INS」、「P1」、「P2」、「Lc」、「Data」、及び「Le」の値を設定することにより、ICカード20に上記の初期設定を行なわせる為の初期設定コマンドを生成する。
The
また、端末装置10は、不揮発性メモリ14に格納されている秘密鍵Kに対応付けられているICカードの識別情報を初期設定コマンドに付加する。
Further, the
ICカード20は、端末装置10から送信された初期設定コマンドを受信する(ステップS31)。ICカード20は、受信した初期設定コマンドを解析する(ステップS32)。これにより、ICカード20は、端末装置10から指定された設定の内容を認識する。
The
ICカード20は、初期設定コマンドに応じて通信に関する種々の設定を行ない、処理結果に応じたレスポンスを端末装置10に送信する。これにより、ICカード20は、端末装置10との間で通信(セッション)を確立する(ステップS33)。なお、ICカード20は、自身のPUPIをレスポンスに付加し、端末装置10に送信する。
The
また、ICカード20は、初期設定コマンドを解析することにより、端末装置10に秘密鍵Kが登録されているICカードの識別情報を認識する。即ち、ICカード20は、この識別情報を認識することにより、端末装置10に秘密鍵Kが登録されているICカードを特定することができる。ICカード20は、特定情報が初期設定コマンドに含まれているか否か判断する(ステップS34)。即ち、ICカード20は、自身の識別情報(PUPI)と一致する識別情報が初期設定コマンドに含まれているか否か判断する。
Further, the
端末装置10は、ICカード20からレスポンスを受信した場合、受信したレスポンス中のPUPIを認識する。端末装置10は、受信したPUPIと対応付けられた秘密鍵Kが不揮発性メモリ14に記憶されているか否か判断する。受信したPUPIと対応付けられた秘密鍵Kが不揮発性メモリ14に記憶されている場合、端末装置10は、ICカード20と共有化された秘密鍵Kが不揮発性メモリ14に記憶されていることを認識する。
When receiving a response from the
ICカード20と共有化された秘密鍵Kが不揮発性メモリ14に記憶されていない場合、端末装置10及びICカード20は、鍵共有方式により秘密鍵Kを共有化する。この場合、端末装置10は、鍵共有方式をICカード20に行わせるためのコマンド(鍵共有化コマンド)を生成し、ICカード20に送信する。なお、端末装置10は、公開情報Pを鍵共有化コマンドに付加する。
When the secret key K shared with the
ICカード20は、端末装置10から送信された鍵共有化コマンドを受信する。ICカード20は、受信した鍵共有化コマンドを解析する。これにより、ICカード20は、端末装置10から指定された公開情報Pを認識する。この結果、ICカード20は、端末装置10との間で公開情報Pを共有化する(ステップS35)。即ち、ICカード20及び端末装置10は、素数及びドメインパラメータを共有化する。
The
まず、ICカード20は、鍵共有方式の第1の処理を実行する(ステップS36)。また、端末装置10も同様に鍵共有方式の第1の処理を実行する。端末装置10は、乱数Aを生成する。端末装置10は、公開情報Pと、生成した乱数Aとに基づいて演算結果PAを算出する。端末装置10は、演算結果PAをICカード20に送信する。
First, the
ICカード20は、乱数Bを生成する。ICカード20は、上記した公開情報Pと、生成した乱数Bとに基づいて演算結果PBを算出する。また、ICカード20は、演算結果PBを端末装置10に送信する。
The
次に、ICカード20は、鍵共有方式の第2の処理を実行する(ステップS37)。また、端末装置10も同様に鍵共有方式の第2の処理を実行する。端末装置10は、ICカード20から送信された演算結果PBと乱数Aとに基づいて演算結果PBA(秘密情報J)を算出する。また、ICカード20は、端末装置10から送信された演算結果PAと乱数Bとに基づいて演算結果PAB(秘密情報J)を算出する。これにより、ICカード20及び端末装置10は、秘密情報Jを共有することができる。
Next, the
さらに、ICカード20は、秘密鍵Kを生成する(ステップS38)。また、端末装置10も同様に秘密鍵Kを生成する。ICカード20及び端末装置10は、秘密情報Jに基づいてハッシュ関数の演算により秘密鍵Kを生成する。即ち、ICカード20及び端末装置10は、秘密情報Jをハッシュ関数の入力として演算を行い、秘密鍵Kを算出する。
Further, the
ICカード20は、生成した秘密鍵Kを不揮発性メモリ27に格納する(ステップS39)。上記したように、ICカード20は、秘密鍵Kを不揮発性メモリ27のIEFに格納する。また、端末装置10は、例えば、不揮発性メモリ14に生成した秘密鍵Kを格納する。端末装置10は、初期設定コマンドのレスポンスに付加されていたPUPIと、秘密鍵Kとを対応付けて、不揮発性メモリ14に格納する。上記の処理により、秘密鍵KがICカード20と端末装置10との間で共有化された。
The
さらに、ICカード20及び端末装置10は、相互認証処理を行う。相互認証では、ICカード20及び端末装置10は、秘密鍵Kを用いて乱数を使ったGetChallenge処理を行う。ICカード20及び端末装置10は、相互認証が成功した場合、お互いに生成した乱数を共有し、以降のコマンドデータの秘匿のための暗号化のセッション鍵として利用する。
Further, the
相互認証処理を行う場合、端末装置10は、相互認証処理をICカード20に実行させる為の相互認証コマンドを生成し、ICカード20に送信する。
When performing the mutual authentication process, the
ICカード20は、端末装置10から送信された相互認証コマンドを受信する(ステップS40)。ICカード20は、受信した相互認証コマンドを解析する(ステップS41)。ICカード20は、相互認証コマンドに相互認証処理を実行する(ステップS42)。即ち、ICカード20は、乱数を生成し、秘密鍵Kと乱数とに基づいて、暗号化及び復号を行う。また、ICカード20は、端末装置10から送信されたデータに対して、秘密鍵Kを用いて暗号化及び復号を行う。ICカード20及び端末装置10は、この結果に基づいて互いを認証する。
The
また、ステップ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
この場合、端末装置10及びICカード20は、鍵共有化方式による処理を省略することができる。即ち、ICカード20は、端末装置10から送信された初期設定コマンドに、自身のPUPIと一致するPUPIが付加されていた場合、鍵共有方式の第1の処理と第2の処理とを行なうことなくDES、またはAESなどを用いた相互認証処理を実行することができる。
In this case, the
これにより、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
なお、上記の実施形態では、端末装置10及びICカード20は、生成した秘密鍵Kを格納する構成であると説明したが、この構成に限定されない。端末装置10及びICカード20は、秘密情報Jを格納する構成であってもよい。この場合も、端末装置10及びICカード20は、図3のステップS35乃至ステップS39の処理を省略することができる。なお、この場合、端末装置10及びICカード20は、相互認証処理の前に、秘密情報Jからハッシュ関数により秘密鍵Kを生成する必要がある。
In the above embodiment, the
また、端末装置10から送られてくる初期設定コマンド内の特定情報は、前回共有した秘密情報Jから生成した秘密鍵Kで暗号化されていてもよい。この場合、ICカード20は、受信した初期設定コマンドの特定情報を、不揮発性メモリ27に記憶されている秘密鍵Kにより復号する。ICカード20は、自身の識別情報(PUPI)と一致する情報が、復号した特定情報の中にある場合、秘密鍵Kが端末装置10との間で共有化されていると判断する。
Further, the specific information in the initial setting command sent from the
また、ICカード20は、特定情報と、自身のPUPIとを比較するのではなく、日付情報などを利用することも考えられる。即ち、端末装置10は、日付情報を初期設定コマンドに付加する。ICカード20は、日付情報が所定の範囲に収まっているか否か判断する。日付情報が所定の範囲に収まっている場合、ICカード20は、鍵共有方式による処理を行わずに、不揮発性メモリ27に格納されている秘密鍵Kを用いて処理を行う。また、日付情報が所定の範囲に収まっていない場合、ICカード20は、鍵共有方式により秘密鍵Kを端末装置10と共有化する処理を行う。
Further, the
即ち、ICカード20は、秘密鍵Kが有効である期限を示す期限情報を不揮発性メモリ27に記憶する。ICカード20は、初期設定コマンドに付加されている日付情報が期限情報を満たすか否か判断する。即ち、ICカード20は、初期設定コマンドに付加されている日付情報が期限情報を満たし、且つ、自身の識別情報(PUPI)と一致する情報が、特定情報の中にある場合、有効な秘密鍵Kが端末装置10との間で共有化されていると判断する。
That is, the
なお、上述の各実施の形態で説明した機能は、ハードウエアを用いて構成するに留まらず、ソフトウエアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウエア、ハードウエアのいずれかを選択して構成するものであっても良い。 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
Claims (9)
前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、
前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第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:
前記受信手段は、前記外部機器から送信された初期設定コマンドを受信し、
前記制御手段は、前記初期設定コマンドに付加されている特定情報に応じて、前記秘密鍵を前記鍵記憶手段から読み出すか、前記第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モジュールが配設される本体と、
を具備する請求項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:
前記外部機器から送信された鍵共有化コマンドを受信する受信手段と、
前記鍵共有化コマンドに応じて秘密情報を算出し、前記秘密情報を前記外部機器と共有化する第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.
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)
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)
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 |
-
2011
- 2011-12-02 JP JP2011264496A patent/JP2013118473A/en active Pending
Patent Citations (5)
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)
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 |