JP2018151695A - Ic card, start processing method of ic card, and start processing program of ic card - Google Patents
Ic card, start processing method of ic card, and start processing program of ic card Download PDFInfo
- Publication number
- JP2018151695A JP2018151695A JP2017045309A JP2017045309A JP2018151695A JP 2018151695 A JP2018151695 A JP 2018151695A JP 2017045309 A JP2017045309 A JP 2017045309A JP 2017045309 A JP2017045309 A JP 2017045309A JP 2018151695 A JP2018151695 A JP 2018151695A
- Authority
- JP
- Japan
- Prior art keywords
- card
- activation
- character
- initial response
- writer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、ICカード、ICカードの起動処理方法、およびICカードの起動処理プログラムに関する。 The present invention relates to an IC card, an IC card activation processing method, and an IC card activation processing program.
IC(Integrated Circuit;集積回路)カードは、リーダライタとの情報のやりとりの方式により、接触型と非接触型とに分類される。これらのいずれのタイプのICカードにおいても、リーダライタからの電源投入、リセット信号などのICカード起動要求に対して、ICカードが初期応答を返すまでの時間範囲(応答時間)が規定されている。
例えば接触型ICカードの場合、ICカードは、リセット信号を受信すると、初期設定として通信関係のパラメータ設定を行い、初期応答としてATR(Answer to reset)をレスポンスする。このATRのレスポンスは、リーダライタからのリセット信号に対して、規定時間内になされる必要がある。
An IC (Integrated Circuit) card is classified into a contact type and a non-contact type according to a method of exchanging information with a reader / writer. In any of these types of IC cards, a time range (response time) until the IC card returns an initial response to an IC card activation request such as power-on from a reader / writer or a reset signal is defined. .
For example, in the case of a contact type IC card, when receiving a reset signal, the IC card performs communication-related parameter setting as an initial setting and responds with an ATR (Answer to reset) as an initial response. This ATR response needs to be made within a specified time in response to a reset signal from the reader / writer.
この起動処理は、実際には、例えば400クロックサイクルから40000クロックサイクル程度の非常に短い応答時間になされるように規定されているため、規定の応答時間内にICカードの起動処理を間に合わせるべく、短い時間で実施可能な起動処理のみが行なわれる。すなわち、通常のICカードの起動処理では、ICカードの動作において最低限必要な設定のみが行われるだけであって、処理時間がかかるチェックは上記の応答時間内には行えない。そのため、上記従来の起動処理方法では、ICカードからの初期応答を規定時間内に収めるべく必要最低限の設定やチェックしか行なうことができないため、ICカードの一部に何らかの異常があった場合でも、その異常を検知することが困難であった。 Since this activation process is actually defined to have a very short response time, for example, from 400 clock cycles to 40,000 clock cycles, the IC card activation process must be completed within the specified response time. Only the startup process that can be performed in a short time is performed. That is, in the normal IC card activation process, only the minimum setting necessary for the operation of the IC card is performed, and a check that requires processing time cannot be performed within the above response time. For this reason, in the above conventional activation processing method, only the minimum necessary settings and checks can be performed to keep the initial response from the IC card within the specified time, so even if there is some abnormality in the IC card. It was difficult to detect the abnormality.
リーダライタは、起動したICカードを制御するために、制御内容を格納したコマンドAPDU(Application Protocol Data Unit)を送信している。ICカードは、このコマンドAPDUを受け取ると、受け取ったコマンドAPDUの内容に応じたAPDU処理を行い、応答として規定時間内にレスポンスAPDUを返信する。そして、リーダライタは、このレスポンスAPDUを確認することで、制御が成功したか否かなどを特定している。このように、従来の起動処理方法では、起動時に検知できなかった異常がその後も検知されないままAPDU処理が開始されるため、APDU処理の動作中にエラーが発生したり、不正な動作が行われたりする可能性があった。 The reader / writer transmits a command APDU (Application Protocol Data Unit) storing control contents in order to control the activated IC card. Upon receiving this command APDU, the IC card performs APDU processing according to the content of the received command APDU, and returns a response APDU as a response within a specified time. Then, the reader / writer confirms the response APDU to identify whether or not the control is successful. As described above, in the conventional activation processing method, since the APDU processing is started without detecting any abnormality that could not be detected at the time of activation, an error occurs during the operation of the APDU processing or an illegal operation is performed. There was a possibility.
上記のようなAPDU処理の動作中のエラーや不正な動作は、悪意のある攻撃者にとってICカード内の秘密のデータを取り出す手がかりとなるなど、ICカードにとって致命的な欠陥となり得るという問題がある。例えば、メモリチェックが行われなかった場合、チェックされていないメモリが悪意のある攻撃にさらされると、フラッシュメモリ、EEPROMやRAMが書き換えられてしまい、ICカードが誤動作するという問題がある。
とくに近年、ソフトウェアのセキュリティ基準がより厳格になってきているため、セキュリティ面での問題を発生させないための完全なチェックがなされる必要がある。
There is a problem that an error or illegal operation during the operation of the APDU processing as described above can be a fatal defect for the IC card, such as a clue to a malicious attacker extracting the secret data in the IC card. . For example, when the memory check is not performed, if the unchecked memory is exposed to a malicious attack, the flash memory, the EEPROM, or the RAM is rewritten, and there is a problem that the IC card malfunctions.
Particularly in recent years, software security standards have become stricter, and a complete check must be made to prevent problems in terms of security.
これに対し、特許文献1に記載のICカードは、リセット動作中に、当該ICカードの機能を実行させるカード機能部が起動するまでの間、リセット応答の各バイトに所定の割合で誤りを発生させて当該リセット応答を再送させることによって、意図的に遅延を発生させてトランザクションを維持する。
On the other hand, the IC card described in
しかしながら、特許文献1に記載のICカードは、上述したように、意図的に誤りを発生させてリセット応答(初期応答(ATR))を再送させる処理を行うため、リセット動作(起動処理)が煩雑になるという課題がある。これに伴い、例えば、ICカードの設計や製造に係るコストが大きくなるなどの問題が生じる。
However, as described above, the IC card described in
本発明は上記の点に鑑みてなされたものであり、起動処理を煩雑にすることなく、起動処理を完了させることができるICカード、ICカードの起動処理方法、およびICカードの起動処理プログラムを提供する。 The present invention has been made in view of the above points, and provides an IC card, an IC card activation processing method, and an IC card activation processing program capable of completing the activation processing without complicating the activation processing. provide.
本発明は上記の課題を解決するためになされたものであり、本発明の一態様としては、リーダライタからの起動要求信号に対して規定時間内に初期応答を行うICカードであって、前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理部、を備えることを特徴するICカードである。 The present invention has been made in order to solve the above-described problems. As one aspect of the present invention, an IC card that makes an initial response within a specified time to a start request signal from a reader / writer, The activation process is executed after the activation request signal is received until the initial response is started. If the activation process is not completed by the transmission of the first character in the initial response, the character is transmitted. And an activation processing unit that executes the activation process incomplete during a period from when the next character is transmitted.
また、本発明の一態様としては、上記のICカードであって、前記起動処理は、メモリにおける異常の有無についての確認処理、またはプログラムにおける改ざんの有無についての確認処理、暗号演算用ハードウェアの動作における異常の有無についての確認処理、および乱数発生器の動作における異常の有無についての確認処理のうち少なくとも1つを含むことを特徴する。 Further, according to one aspect of the present invention, in the IC card described above, the activation process includes a confirmation process for presence / absence of abnormality in the memory, a confirmation process for presence / absence of tampering in the program, It includes at least one of a confirmation process for the presence or absence of an abnormality in the operation and a confirmation process for the presence or absence of an abnormality in the operation of the random number generator.
また、本発明の一態様としては、リーダライタからの起動要求信号に対して規定時間内に初期応答を行うICカードの起動処理方法であって、起動処理部が、前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理ステップ、を有することを特徴するICカードの起動処理方法である。 According to another aspect of the present invention, there is provided an IC card activation processing method for making an initial response to a activation request signal from a reader / writer within a specified time, wherein the activation processing unit receives the activation request signal. The start process is executed after the initial response is started, and when the start process is not completed by the transmission of the first character in the initial response, the character is transmitted and then the next An activation processing method for an IC card, comprising: an activation processing step for executing the incomplete activation processing in a period until a character is transmitted.
また、本発明の一態様としては、リーダライタからの起動要求信号に対して規定時間内に初期応答を行うICカードのコンピュータに、前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理ステップ、を実行させるためのICカードの起動処理プログラムである。 Further, as one aspect of the present invention, an IC card computer that makes an initial response within a specified time with respect to an activation request signal from a reader / writer until the initial response is started after the activation request signal is received. If the activation process is not completed before the transmission of the first character in the initial response, the process is incomplete during the period from the transmission of the character to the transmission of the next character. An activation process program for an IC card for executing the activation process step of executing the activation process.
本発明によれば、起動処理を煩雑にすることなく、起動処理を完了させることができる。 According to the present invention, the startup process can be completed without complicating the startup process.
<実施形態>
本発明は、起動時にハードウェアやソフトウェアの初期処理が必要なICカードにおいて、規格(ISO7816−3)上で規定された規定時間内に全ての処理を行わずに、分割して初期処理を行うことができるようにする方法に関するものである。ここで言う規定時間とは、リーダライタから送信されたリセット信号(起動要求信号)をICカードが受信してから、ICカードがリーダライタへの初期応答(ATR)の送信を開始するまでの時間である。
<Embodiment>
According to the present invention, in an IC card that requires initial processing of hardware and software at the time of startup, the initial processing is performed in a divided manner without performing all processing within a specified time specified in the standard (ISO7816-3). It is about how to be able to. The specified time here refers to the time from when the IC card receives the reset signal (start-up request signal) transmitted from the reader / writer until the IC card starts transmitting the initial response (ATR) to the reader / writer. It is.
具体的には、まず、ICカードは、規格(ISO7816−3)上で規定された規定時間内に、最低限必要となる初期処理を行う。そして、ICカードは、残りの(未完の)初期処理を、初期応答(ATR)においてキャラクタ(バイト)単位でリーダライタへデータを送信する際の、各キャラクタとキャラクタとの期間(以下、「Pause期間」と言う)に行う。 Specifically, first, the IC card performs minimum necessary initial processing within a specified time specified in the standard (ISO7816-3). Then, the IC card performs the remaining (unfinished) initial processing in a period between characters (hereinafter referred to as “Pause”) when transmitting data to the reader / writer in units of characters (bytes) in the initial response (ATR). Period ").
以下、本実施形態にかかるICカード1およびICカード1の起動処理方法について、詳細に説明する。
Hereinafter, the
[ICカードのハードウェア構成]
以下、ICカード1のハードウェア構成について、図面を参照しながら説明する。
図1は、本発明の実施形態に係るICカード1のハードウェア構成を示すブロックである。
[IC card hardware configuration]
Hereinafter, the hardware configuration of the
FIG. 1 is a block diagram showing a hardware configuration of an
ICカード1は、ISO7816−3に準じたシリアルインターフェースを備えたICカードである。図1に図示するように、ICカード1は、CPU11(Central Processing Unit;中央演算処理装置)と、コプロセッサ12と、乱数発生器13と、I/O14(Input/Output;入出力部)と、ROM15(Read Only Memory;読み出し専用メモリ)と、RAM16(Random Access Memory;読み書き可能なメモリ)と、EEPROM17(Electrically Erasable Programmable Read Only Memory;イーイーピーロム)と、を備えている。
なお、ROM15、およびEEPROM17の代わりに、他の不揮発性メモリ、例えばフラッシュメモリが用いられた構成であっても構わない。 また、CPU11と、コプロセッサ12と、乱数発生器13と、I/O14と、ROM15と、RAM16と、EEPROM17とは、バスを介して相互に通信接続されている。
The
In place of the
CPU11は、ICカード1全体を制御する制御部として機能する。CPU11は、ROM15やEEPROM17に記憶されている制御プログラムや制御データに基づいて、各種の処理を実行する。例えば、CPU11は、リーダライタ10から受信した信号やコマンドに応じて様々な処理を実行し、処理結果としての初期応答(ATR)およびレスポンスAPDUなどのデータの生成を行う。
The
コプロセッサ12は、暗号演算専用の処理装置として機能する。コプロセッサ12は、リーダライタ10から送信されたコマンドAPDUなどに基づいて、CPU11に制御され、暗号化および復号などの必要な暗号演算を行い、演算の結果をCPU11へ送信する。
The
乱数発生器13は、乱数発生専用の処理装置として機能する。乱数発生器13は、リーダライタからのコマンドAPDUなどに基づいて、CPU11に制御され、乱数の生成処理を行う。例えば、ICカード1が相互認証コマンドを受信した場合、乱数発生器13は、乱数を生成し、生成した乱数をCPU11へ送信する。
The
I/O14は、リーダライタ10と通信接続するための接触通信インターフェースであり、ISO7816−3に準じたシリアルインターフェースである。
The I /
ROM15は、予め制御用のプログラムや制御データなどを記憶する、不揮発性のメモリである。ROM15は、製造段階において制御プログラムや制御データなどを記憶した状態でICカード1内に組み込まれる。すなわち、ROM15に記憶される制御プログラムや制御データは、予めICカード1の仕様に応じて組み込まれる。
なお上述したように、ROM15の代わりに、他の不揮発性メモリ、例えばフラッシュメモリが用いられた構成であっても構わない。
The
As described above, another nonvolatile memory, for example, a flash memory may be used instead of the
RAM16は、ワーキングメモリとして機能する揮発性のメモリである。RAM16は、CPU11やコプロセッサ12において処理中のデータなどを一時的に格納する。
The
EEPROM17は、データの書き込み及び書き換えが可能な不揮発性メモリである。EEPROM17は、例えば、制御用のプログラム、制御データ、アプリケーション、個人情報、暗号鍵などのセキュリティ情報、アプリケーションに用いられるデータなどを記憶することができる。
なお上述したように、EEPROM17の代わりに、他の不揮発性メモリ、例えばフラッシュメモリが用いられた構成であっても構わない。
The
As described above, instead of the
[ICカードの機能構成]
以下、リーダライタ10と通信するICカード1の機能構成について、図面を参照しながら説明する。
図2は、本発明の実施形態に係るICカード1の機能構成を示すブロック図である。
[Functional structure of IC card]
Hereinafter, the functional configuration of the
FIG. 2 is a block diagram showing a functional configuration of the
図示するように、実施形態に係るICカード1は、リセット信号受信部21と、起動処理部22と、データ受信部23と、データ送信部24と、コマンド処理部25と、を備えている。また、コマンド処理部25は、APDU処理部26と、レスポンス処理部27と、を備えている。
As shown in the figure, the
リセット信号受信部21は、リーダライタ10から送信されるリセット信号(起動要求信号)を受信する。
起動処理部22は、リセット信号受信部21がリセット信号(起動要求信号)を受信したことをトリガとして、ICカード1の起動処理を実行する。
データ受信部23は、リーダライタ10から送信されるコマンドAPDUを受信する。
データ送信部24は、後述するレスポンス処理部27によって生成されたレスポンスAPDUをリーダライタ10へ送信する。
The reset
The
The data receiving unit 23 receives a command APDU transmitted from the reader /
The
コマンド処理部25は、取得したコマンドAPDUに基づいてコマンドAPDU処理を実行し、実行した結果に基づくレスポンスAPDUを生成する。
APDU処理部26は、データ送信部24によって受信されたコマンドAPDUに基づいてコマンドAPDU処理を実行する。
レスポンス処理部27は、APDU処理部26によって実行されたAPDU処理の実行結果に基づいて、リーダライタ10に対して応答をするためのレスポンスAPDUを生成する。
The
The
The
起動処理部22が実行する、ICカード1の起動処理について、以下に更に詳しく説明する。
起動処理部22は、リセット信号受信部21によって受信される、リーダライタ10から送信されたリセット信号(起動要求信号)に基づく起動要求にしたがってICカード1を起動する起動処理を実行する。起動処理としては、例えば、前回のICカード1の動作時において、EEPROM17への書き込み処理中に電源オフ(OFF)となった場合にデータを復旧する処理などが実行され、メモリが壊れていないかどうかなどをチェックすることができる。また、起動処理部22は、ROM15およびEEPROM17の完全性チェックや、プログラムコードのチェックを実行することにより、プログラム自体が改ざんされていないかをチェックすることができる。
The activation processing of the
The
さらに、起動処理部22は、サンプルデータで暗号演算を行い、正しい結果が出力されるかを確認することにより、コプロセッサ12などの暗号演算用ハードウェアが正常に動作しているかをチェックすることができる、また、起動処理部22は、乱数発生器13によって複数乱数を発生させ、乱数性をチェックすることにより、乱数発生器13が正常に動作しているかをチェックすることができる。
Furthermore, the
本実施形態に係るICカード1のような接触型のICカードにおいては、リーダライタ10からのリセット信号(起動要求信号)を受信したことをトリガとして、起動処理部22が、起動処理である通信パラメータの設定などを行う。
一般的に、リセット信号(起動要求信号)を受信してから初期応答を開始するまでの間(後述する図3、期間tc)にICカードが実行する起動処理は、上述したように一部の限られた(必要最低限の)処理のみとなることが多い。これは、コールドリセット待ち状態でクロック信号の供給が開始されてから少なくとも400クロックサイクルの間に受け取るリセット信号の受信から、40000クロックサイクル以内に開始される初期応答(ATR)までの間に、起動処理が実行される必要があるからである。
In the contact type IC card such as the
Generally, the startup process executed by the IC card during the period from the reception of the reset signal (startup request signal) to the start of the initial response (FIG. 3, period tc described later) In many cases, only limited (minimum necessary) processing is performed. This is activated between the reception of the reset signal received for at least 400 clock cycles after the clock signal supply is started in the cold reset waiting state and the initial response (ATR) started within 40000 clock cycles. This is because processing needs to be executed.
本実施形態の起動処理部22は、リセット信号(起動要求信号)を受信してから初期応答(ATR)を開始するまでの間に起動処理を実行し、初期応答(ATR)における最初のキャラクタの送信までに起動処理が完了していない場合には、キャラクタ(バイト)単位で送信される初期応答(ATR)の各キャラクタ(バイト)を送信完了してから次のキャラクタ(バイト)を送信するまでの期間(Pause期間)に、残りの起動処理を実行する。このように、起動処理部22は、各Pause期間に未完の初期処理を行うことによって、起動処理を完了させることができる。
The
また、上述したように、コマンド処理部25は、リーダライタ10からのコマンドAPDUを実行処理するAPDU処理部26と、コマンドAPDUに対するレスポンスとして、当該コマンドAPDUの実行処理の結果であるレスポンスAPDUを生成するレスポンス処理部27と、を備える。例えば、APDU処理部26は、コマンドAPDUとしてselectコマンドを、データ受信部23を介して取得した場合にはコマンドAPDU処理としてselect処理を実行し、レスポンス処理部27は、当該select処理の実行に対するレスポンス処理として、レスポンスAPDUを生成する。生成されたレスポンスAPDUは、データ送信部24によりリーダライタ10へ送信される。
Further, as described above, the
[起動処理方法の詳細]
以下、ICカード1の起動処理方法の詳細について、図面を参照しながら説明する。
図3は、本発明の実施形態に係るICカード1が初期応答を行うタイミングを示す概略図である。
[Details of startup processing method]
Hereinafter, details of the activation processing method of the
FIG. 3 is a schematic diagram showing timing when the
図3に示す、「VCC」、「CLK」、「RST」、および「I/O」は、それぞれICカード1に備えられた端子を表す。具体的には、VCC端子はICカード1に電源を供給するための電源端子、CLK端子はICカード1にクロック信号を供給するためのクロック端子、RST端子はICカード1にリセット信号を供給するためのリセット端子(リセット信号受信部21)、およびI/O端子(データ受信部23およびデータ送信部24)はシリアル形式で各種信号の入出力を可能とする入出力端子である。
また、図3の横軸は時間を表す。
“VCC”, “CLK”, “RST”, and “I / O” shown in FIG. 3 represent terminals provided in the
Also, the horizontal axis in FIG. 3 represents time.
図3に図示するように、まず、リーダライタ10から、電源電圧がICカード1のVCC端子に供給された後、時刻Taにクロック信号がCLK端子に供給される。そして、時刻Ta以後の期間ta(200クロックサイクル以内)に、I/O信号の回線が所定の状態とされ、時刻Ta以後の期間tb(400クロックサイクル以内)の間、リセット信号がLow(ロー)の状態に保たれ、リセット信号の立ち上がり(Low→High(ハイ))が検出されると、ICカードはリセットされる(時刻Tb)。そして、期間tc(400〜40000クロックサイクル)の経過後、初期応答(ATR)がI/O端子からリーダライタ10へ送り出される。
As shown in FIG. 3, first, after the power supply voltage is supplied from the reader /
従来のICカードにおいては、この期間tcに、最低限必要な初期処理(例えば、通信関係のパラメータ設定など)のみが行われる。 In the conventional IC card, only the minimum necessary initial processing (for example, communication-related parameter setting) is performed during this period tc.
図4は、本発明の実施形態に係るICカード1が行う初期応答(ATR)の構成の一例を示す概略図である。
図4に示す例においては、初期応答(ATR)は、複数のキャラクタ、すなわち、イニシャルバイト(Initial Byte)であるTSと、フォーマットバイト(Format Byte)であるT0と、i=1、2、3、・・・として、インターフェースバイツ(Interface Bytes)であるTA(i)、TB(i)、TC(i)、TD(i)と、maxk=15として、情報管理に関するヒストリカルバイツ(Historical Bytes)であるT1〜TKと、チェックパラメータであるTCKとが並べて配置されたデータである。
したがって、初期応答(ATR)には、当該初期応答(ATR)を構成するキャラクタの個数−1個のPause期間が存在する。なお、T0からTCKまでのデータバイトは、最大で32バイトである。
FIG. 4 is a schematic diagram illustrating an example of a configuration of an initial response (ATR) performed by the
In the example shown in FIG. 4, the initial response (ATR) includes a plurality of characters, that is, TS that is an initial byte, T0 that is a format byte, and i = 1, 2, 3, and so on. ,..., TA (i), TB (i), TC (i), TD (i), which are interface bytes, and maxk = 15, and historical bytes related to information management (historical bytes). This is data in which certain T1 to TK and a check parameter TCK are arranged side by side.
Accordingly, the initial response (ATR) has a Pause period equal to the number of characters constituting the initial response (ATR) minus one. Note that the maximum number of data bytes from T0 to TCK is 32 bytes.
図5は、本発明の実施形態に係るICカード1が行う初期応答(ATR)のキャラクタ構成を示す概略図である。
図示するように、初期応答(ATR)においてI/O端子から送信される全てのキャラクタは10ビットで構成される。キャラクタの最初のビットはスタートビットと呼ばれ、常にLowの状態になる。スタートビットよりも前の時点では、Highの状態に維持されている。キャラクタの最後のビットはパリティビットであり、キャラクタに含まれる、値が「1」であるビット数が偶数になるように、当該パリティビットがHighまたはLowに決定される。
FIG. 5 is a schematic diagram showing a character configuration of an initial response (ATR) performed by the
As shown in the figure, all characters transmitted from the I / O terminal in the initial response (ATR) are composed of 10 bits. The first bit of the character is called the start bit and is always low. At a time prior to the start bit, the state is maintained High. The last bit of the character is a parity bit, and the parity bit is determined as High or Low so that the number of bits having a value of “1” included in the character is an even number.
また、図示するように、キャラクタの最後のビット(パリティビット)の後には、Pause期間が設けられている。なお、Pause期間の長さは、上限値と下限値とが予め規定されており、規定の範囲内であれば、ICカード1は、任意のタイミングで次のキャラクタの送信を行うことができる。なお、ICカード1とリーダライタ10との間のデータ通信には、二つの通信機器の間でデータの伝送を交互に行う半二重通信方式が利用されている。すなわち、一方がデータを送信するときは他方はデータを受信することとなり、双方が同時にデータを送信することはできない。そこで、データの受信または送信開始からの経過時間を計時し、その経過時間が一定時間を経過してからでないと次のデータを送受信しないガードタイム(Pause期間)が必要となる。
As shown in the figure, a Pause period is provided after the last bit (parity bit) of the character. Note that an upper limit value and a lower limit value are specified in advance for the length of the Pause period, and the
上述したように、本発明は、起動時にハードウェアやソフトウェアの初期処理が必要なICカード1において、規格(ISO7816−3)上で規定された規定時間内に全ての処理を行わずに、分割して初期処理を行うことができるようにする方法に関するものである。具体的には、ICカード1は、規格(ISO7816−3)上で規定された規定時間内に、最低限必要となる初期処理を行う。そして、ICカード1は、残りの(未完の)初期処理を、初期応答(ATR)に含まれる各Pause期間に行う。
As described above, according to the present invention, in the
なお、上述したように、最低限必要となる初期処理には、例えば、通信関係のパラメータ設定などが含まれ、それ以外の初期処理には、例えば、メモリにおける異常の有無についての確認処理、またはプログラムにおける改ざんの有無についての確認処理、暗号演算用ハードウェアの動作における異常の有無についての確認処理、および乱数発生器の動作における異常の有無についての確認処理などが含まれる。 Note that, as described above, the minimum required initial processing includes, for example, communication-related parameter setting, and other initial processing includes, for example, confirmation processing for the presence or absence of abnormality in the memory, or Processing for confirming whether or not the program has been tampered with, processing for confirming whether or not there is an abnormality in the operation of the cryptographic calculation hardware, and processing for confirming whether or not there is an abnormality in the operation of the random number generator are included.
[起動処理の流れ]
以下、起動処理においてICカード1とリーダライタ10との間で行われる通信の流れについて、図面を参照しながら説明する。
図6は、本発明の実施形態に係るICカード1とリーダライタ10との間で行われる通信の一例を示すシーケンス図である。
[Flow of startup processing]
Hereinafter, a flow of communication performed between the
FIG. 6 is a sequence diagram illustrating an example of communication performed between the
まず、ICカード1が、リーダライタ10に挿入されると(リーダライタ10と接触すると)、リーダライタ10は、ICカード1へリセット信号(起動要求信号)を送信する(図6、S001)。
ICカード1は、リセット信号(起動要求信号)を受信すると、期間tcに、(期間tcの間に完了させることが可能な)最低限必要な初期処理(例えば、通信関係のパラメータ設定など)を実行する(図6、S002)。最低限必要な初期処理が完了すると、リーダライタ10は、イニシャルバイト(TS)をリーダライタ10へ送信する(図6、S003)。
リーダライタ10は、イニシャルバイト(TS)を受信する。
First, when the
When the
The reader /
ICカード1は、イニシャルバイト(TS)の送信が完了してから、次のキャラクタ(すなわち、フォーマットバイト(T0))を送信するまでの期間であるPause期間に、残りの初期処理(例えば、メモリのチェックなど)を実行する(図6、S004)。残りの初期処理が完了した場合、または、Pause期間の上限に達した場合、リーダライタ10は、フォーマットバイト(T0)をリーダライタ10へ送信する(図6、S005)。
リーダライタ10は、フォーマットバイト(T0)を受信する。
The
The reader /
初期処理が未完の場合には、ICカード1は、フォーマットバイト(T0)の送信が完了してから、次のキャラクタ(すなわち、インターフェースバイト(TA(1)))を送信するまでの期間であるPause期間に、残りの初期処理を実行する(図6、S006)。残りの初期処理が完了した場合、または、Pause期間の上限に達した場合、リーダライタ10は、インターフェースバイト(TA(1))をリーダライタ10へ送信する(図6、S007)。
リーダライタ10は、インターフェースバイト(TA(1))を受信する。
When the initial processing is not completed, the
The reader /
その後も同様に、ICカード1は、初期処理が未完の場合には、Pause期間に残りの初期処理を実行しながら、初期応答(ATR)を構成する各キャラクタを順にリーダライタ10へ送信する。
Similarly, thereafter, when the initial processing is not completed, the
そして、ICカード1が、最後のキャラクタ(すなわち、チェックパラメータ(TCK))をリーダライタ10へ送信すると(図6、S009)、初期応答(ATR)の送信が完了する。
リーダライタ10は、チェックパラメータ(TCK)を受信すると、コマンドAPDU
をICカード1へ送信する(図6、S010)。
ICカード1は、コマンドAPDUを受信する。
When the
Upon receiving the check parameter (TCK), the reader /
Is transmitted to the IC card 1 (FIG. 6, S010).
The
以上説明したように、本発明は、起動時にハードウェアやソフトウェアの初期処理が必要なICカード1において、規格(ISO7816−3)上で規定された時間内に全ての処理を行わずに、分割して初期処理を行うことができるようにする方法に関するものである。具体的には、ICカード1は、規格(ISO7816−3)上で規定された規定時間内に、最低限必要となる初期処理を行う。そして、ICカード1は、残りの(未完の)初期処理を、初期応答(ATR)に含まれる各Pause期間に行う。
これにより、本発明の実施形態に係るICカード1は、起動処理を煩雑にすることなく、起動処理を完了させることができる。
As described above, according to the present invention, in the
Thereby, the
以上、この発明の実施形態について詳しく説明をしてきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更などをすることが可能である。 The embodiment of the present invention has been described in detail above, but the specific configuration is not limited to the above-described one, and various design changes can be made without departing from the scope of the present invention. It is.
なお、上述した実施形態におけるICカード1の一部または全部を当該ICカード1のコンピュータで実現するようにしてもよい。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。
なお、ここでいう「コンピュータシステム」とは、ICカード1に内蔵されたコンピュータシステムであって、OSなどを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROMなどの可搬媒体、コンピュータシステムに内蔵されるハードディスクなどの記憶装置のことをいう。
Note that a part or all of the
Here, the “computer system” is a computer system built in the
さらに「コンピュータ読み取り可能な記録媒体」とは、インターネットなどのネットワークや電話回線などの通信回線を介してプログラムを送信する場合の通信回線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。 Furthermore, “computer-readable recording medium” means a program that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, In this case, a volatile memory inside a computer system that serves as a server or a client may be included that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
1・・・ICカード、10・・・リーダライタ、11・・・CPU、12・・・コプロセッサ、13・・・乱数発生器、14・・・I/O、15・・・ROM、16・・・RAM、17・・・EEPROM、21・・・リセット信号受信部、22・・・起動処理部、23・・・データ受信部、24・・・データ送信部、25・・・コマンド処理部、26・・・APDU処理部、27・・・レスポンス処理部
DESCRIPTION OF
Claims (4)
前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理部、
を備えることを特徴するICカード。 An IC card that makes an initial response within a specified time in response to an activation request signal from a reader / writer,
When the activation process is performed after the activation request signal is received and before the initial response is started, and the activation process is not completed by the transmission of the first character in the initial response, the character is An activation processing unit that executes the activation process incomplete during a period from transmission to transmission of the next character;
An IC card characterized by comprising:
ことを特徴する請求項1に記載のICカード。 The activation process includes a confirmation process for the presence or absence of abnormality in the memory, a confirmation process for the presence or absence of falsification in the program, a confirmation process for the presence or absence of abnormality in the operation of the cryptographic operation hardware, and an abnormality in the operation of the random number generator. The IC card according to claim 1, comprising at least one of confirmation processes for the presence or absence of the card.
起動処理部が、前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理ステップ、
を有することを特徴するICカードの起動処理方法。 An IC card activation processing method for making an initial response within a specified time to an activation request signal from a reader / writer,
When the activation processing unit executes the activation process after receiving the activation request signal until starting the initial response, and the activation process is not completed by the transmission of the first character in the initial response Is an activation process step for executing the incomplete activation process in a period from when the character is transmitted until the next character is transmitted;
An IC card activation processing method characterized by comprising:
前記起動要求信号を受信してから初期応答を開始するまでの間に起動処理を実行し、前記初期応答における最初のキャラクタの送信までに前記起動処理が完了していない場合には、前記キャラクタを送信してから次の前記キャラクタを送信するまでの期間に未完の前記起動処理を実行する起動処理ステップ、
を実行させるためのICカードの起動処理プログラム。 To the computer of the IC card that makes an initial response within a specified time to the activation request signal from the reader / writer,
When the activation process is performed after the activation request signal is received and before the initial response is started, and the activation process is not completed by the transmission of the first character in the initial response, the character is An activation process step for executing the incomplete activation process in a period from transmission to transmission of the next character;
IC card activation processing program for executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017045309A JP6969114B2 (en) | 2017-03-09 | 2017-03-09 | IC card, IC card startup processing method, and IC card startup processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017045309A JP6969114B2 (en) | 2017-03-09 | 2017-03-09 | IC card, IC card startup processing method, and IC card startup processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018151695A true JP2018151695A (en) | 2018-09-27 |
JP6969114B2 JP6969114B2 (en) | 2021-11-24 |
Family
ID=63680405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017045309A Active JP6969114B2 (en) | 2017-03-09 | 2017-03-09 | IC card, IC card startup processing method, and IC card startup processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6969114B2 (en) |
-
2017
- 2017-03-09 JP JP2017045309A patent/JP6969114B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP6969114B2 (en) | 2021-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103069384A (en) | Host device and method for securely booting the host device with operating system code loaded from a storage device | |
EP2159728A2 (en) | Method and system of upgrading firmware of a card reader | |
KR101824249B1 (en) | Method for managing electronic devices, for example, of integrated circuits type, having internal generation of a personal authetication key | |
US9021504B2 (en) | Method and device for automatically selecting an application that can be implemented by said device | |
KR101783526B1 (en) | Ic card, electronic device and portable electronic device | |
CN112560120B (en) | Secure memory bank and method for starting secure memory bank | |
JP2009032003A (en) | Portable electronic device, terminal device, authentication system, and authentication method | |
JP6969114B2 (en) | IC card, IC card startup processing method, and IC card startup processing program | |
CN108270767B (en) | Data verification method | |
JP2011022841A (en) | Processing system for portable electronic apparatus, portable electronic apparatus, and processing apparatus for portable electronic apparatus | |
JP6182940B2 (en) | IC card, status word output method, and status word output processing program | |
US11151338B2 (en) | Securing a transaction by means of a smart card and smart card | |
JP5019210B2 (en) | Portable electronic device, IC card, and control method for portable electronic device | |
CN115516483A (en) | Techniques to store and process data for transaction attempts through transaction cards | |
JP2009015651A (en) | Information storage medium | |
CN106484477B (en) | The software download and starting method of safety | |
JP2005258968A (en) | Validity verification method of data written in ic card, and program for ic card | |
JP4792906B2 (en) | Authentication code registration device, electronic device and control program | |
JP4899499B2 (en) | IC card issuing method, IC card issuing system, and IC card | |
JP2008097415A (en) | Information system, authentication method, information processor, and program | |
JP2007011591A (en) | Portable electronic device and ic card | |
TW201635205A (en) | Security digital memory card with embedded smart chip, card reader terminal and controlling method thereof | |
CN105320980A (en) | Integrated circuit device and signal processing method in integrated circuit device | |
JP2016099711A (en) | Ic card and its starting method | |
JP2006172271A (en) | Multi-application ic card, and program for ic card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20170310 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20181102 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200221 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210209 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210408 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210928 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211011 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6969114 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |