JP5444143B2 - Portable electronic device and IC card - Google Patents
Portable electronic device and IC card Download PDFInfo
- Publication number
- JP5444143B2 JP5444143B2 JP2010157174A JP2010157174A JP5444143B2 JP 5444143 B2 JP5444143 B2 JP 5444143B2 JP 2010157174 A JP2010157174 A JP 2010157174A JP 2010157174 A JP2010157174 A JP 2010157174A JP 5444143 B2 JP5444143 B2 JP 5444143B2
- Authority
- JP
- Japan
- Prior art keywords
- module
- unit
- card
- application
- portable electronic
- 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.)
- Active
Links
Images
Landscapes
- Credit Cards Or The Like (AREA)
Description
本発明の実施の形態は、ハードウェア(HW)モジュールとAP(アプリケションプログラム)との間で情報の授受を行うAPI(アプリケーション・プログラミング・インタフェース)を備えた携帯可能電子装置及びICカードに関する。 Embodiments described herein relate generally to a portable electronic device and an IC card having an API (Application Programming Interface) that exchanges information between a hardware (HW) module and an AP (Application Program).
一般的に、携帯可能電子装置として用いられるICカードは、プラスチックなどで形成されたカード状の本体と本体に埋め込まれたICモジュールとを備えている。ICモジュールは、ICチップを有している。ICチップは、電源が無い状態でもデータを保持することができるEEPROM(Electrically Erasable Programmable Read−Only Memory)またはフラッシュROMなどの不揮発性メモリと、種々の演算を実行するCPUとを有している。 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 has a nonvolatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash ROM that can hold data even in the absence of a power source, and a CPU that executes various operations.
ICカードは、携帯性に優れ、且つ、外部装置との通信及び複雑な演算処理を行う事ができる。また、偽造が難しい為、ICカードは、機密性の高い情報などを格納してセキュリティシステム、電子商取引などに用いられることが想定される。 The IC card is excellent in portability and can perform communication with an external device and complicated calculation processing. Further, since it is difficult to forge, the IC card is assumed to store highly confidential information and be used for a security system, electronic commerce, and the like.
ICカードは、上位端末から電源・磁界・クロックを供給されることにより動作する。 The IC card operates by being supplied with power, a magnetic field, and a clock from a host terminal.
既存のICカードでは、これらの外部から供給される電源・磁界・クロックがICカードの動作に十分なだけ供給されているかをICカード内に搭載された検知モジュールにて検知し、十分であれば動作し、十分でなければ動作を止める制御を行っていた。 With existing IC cards, the detection module installed in the IC card detects whether the power, magnetic field, and clock supplied from the outside are sufficient for the operation of the IC card. It was operating, and if it wasn't enough, it stopped the operation.
しかし、ICカードは携帯電話端末、テレビ受像機、自動改札機など多様な上位端末と接続して情報を授受する。これら上位端末から供給される電源・磁界・クロックは、上位端末が使用される環境、条件によってそれぞれ異なる。例えば、携帯電話端末では電源が限られているため、携帯電話端末から供給される電源電圧が低い。従って、ICカードとアプリケーションとの組み合わせがその条件に対応していない場合には、動作が出来ない。また、供給される電源電圧が高く、クロック周波数も高い場合ではICカード内部の温度が上昇する。その結果、温度検知モジュールが温度高を検知してICカードの動作が停止する。 However, the IC card is connected to various host terminals such as a mobile phone terminal, a television receiver, and an automatic ticket gate to exchange information. The power, magnetic field, and clock supplied from these upper terminals differ depending on the environment and conditions in which the upper terminals are used. For example, since the power supply of a mobile phone terminal is limited, the power supply voltage supplied from the mobile phone terminal is low. Therefore, the operation cannot be performed when the combination of the IC card and the application does not correspond to the condition. Further, when the power supply voltage supplied is high and the clock frequency is high, the temperature inside the IC card rises. As a result, the temperature detection module detects a high temperature and the operation of the IC card stops.
逆に、供給される電源・磁界・クロックに十分な余裕があり、ICカードを高電圧、高クロックで動作させることが可能であったとしても、そのような高負荷状態を継続すると、消費電力が高くなり、電源を供給する端末の電源負荷を増大させる。 On the other hand, even if there is a sufficient margin for the supplied power, magnetic field, and clock, and the IC card can be operated with a high voltage and high clock, if such a high load state continues, the power consumption Increases, increasing the power load of the terminal supplying the power.
一方、ICカードにおいては、メモリの高密度化、CPUの高速化が図られている。その結果、ICカード発行後に送受信インターフェースを介してアプリケーションの追加・削除を行うことが出来るICカードも登場している。またアプリケーションが高級言語で記述され、準拠しているICカードプラットフォーム仕様が同じであれば、LSIの種類によらずアプリケーションを搭載することが可能となりつつある。しかしながら、ICカードプラットフォーム仕様が同じであっても上述のようにアプリケーションが動作する環境は多様であり、更にLSIには性能差があるため、ICカードによっては、アプリケーションの機能を完全には実行出来ない、あるいはアプリケーションの動作が不安定になる等の制約が発生していた。 On the other hand, in the IC card, the memory density is increased and the CPU speed is increased. As a result, IC cards that allow addition / deletion of applications via a transmission / reception interface after IC card issuance have appeared. If the application is described in a high-level language and conforms to the same IC card platform specification, the application can be mounted regardless of the type of LSI. However, even if the IC card platform specifications are the same, the environment in which applications operate is diverse as described above, and there are performance differences among LSIs. Depending on the IC card, application functions can be executed completely. There were restrictions such as no application or unstable application operation.
従って、多種多様な動作環境に柔軟に対応することのできる携帯可能電子装置及びICカードに対するニーズがある。 Accordingly, there is a need for portable electronic devices and IC cards that can flexibly cope with a wide variety of operating environments.
上記課題を解決するための本発明の実施の形態によれば、外部機器からコマンドを受信する受信部と、受信したコマンドに対応した処理を実行するアプリケーション部と、特定の処理機能をハードウェアで構成したモジュールを複数有するハードウェアモジュール部と、前記アプリケーション部からの指示に基づいて前記モジュールを制御してその結果を取得して前記アプリケーション部に返信するAPI(アプリケーション・プログラミング・インターフェース)部と、前記アプリケーション部から前記コマンドの処理結果を取得して前記外部機器に送信する送信部とを備えた携帯可能電子装置が提供される。 According to an embodiment of the present invention for solving the above problems, a receiving unit that receives a command from an external device, an application unit that executes a process corresponding to the received command, and a specific processing function are implemented by hardware. A hardware module unit having a plurality of configured modules, an API (application programming interface) unit for controlling the module based on an instruction from the application unit, obtaining the result, and returning the result to the application unit; A portable electronic device is provided that includes a transmission unit that acquires a processing result of the command from the application unit and transmits the command processing result to the external device.
(第1の実施形態)
以下、図面を参照しつつ本実施の形態の携帯可能電子装置について説明する。なお、本実施の形態では、携帯可能電子装置はICカードとして説明するが、ICカードに限られない。
(First embodiment)
Hereinafter, the portable electronic device of the present embodiment will be described with reference to the drawings. In this embodiment, the portable electronic device is described as an IC card, but is not limited to an IC card.
図1は、本実施の形態のICカードを利用した処理システム100の構成を示す図である。この処理システム100は、ICカード101、カードリーダ/ライタ102、端末103、キーボード104、モニタ105及びプリンタ106を備える。ICカード101はカードリーダ/ライタ102と接続可能である。端末103は、カードリーダ/ライタ102、キーボード104、モニタ105及びプリンタ106を接続して構成される。
FIG. 1 is a diagram showing a configuration of a
カードリーダライタ102は、ICカード101と通信を行うためのインターフェース装置である。カードリーダライタ102は、ICカード101に対して、電源供給、クロック供給、リセット制御、及びデータの送受信を行う。
The card reader /
端末103は、カードリーダライタ102を介してICカード101に対して種々のコマンドを入力する。ICカード101は、例えば、カードリーダライタ102からデータの書き込みコマンドを受信した場合、受信したデータを内部の不揮発性メモリに書き込む処理を行う。また、端末103は、ICカード101に読み取りコマンドを送信することにより、ICカード101からデータを読み出す。端末103は、ICカード101から受信したデータに基づいて種々の処理を行う。
The
モニタ105は、端末103によって制御されて種々の情報を表示する。キーボード104は、処理システム100の操作者による操作を信号に変換して端末103に出力する。プリンタ106は、端末103からの情報を印字出力する。
The
図2は、本実施の形態のICカード101の構成例について説明するための図である。
ICカード101は、カード状の本体と、本体に内蔵されたICモジュール200とを備えている。そしてICモジュール200には、メモリ部200a、HW(ハードウェア)モジュール部200b、制御素子201及び通信部206が設けられている。
FIG. 2 is a diagram for explaining a configuration example of the
The
制御素子201は、例えばCPU、レジスタなどを備え、ICカード101における処理を統括して制御する。通信部206は、カードリーダ/ライタ102との間の通信処理を実行する。通信方式は、接触式に限られず、無線式、SWP式、USB式のいずれを採用しても良い。
The
メモリ部200aは、記憶内容が消去可能な不揮発性のデータメモリ202、ワーキングメモリ203、プログラムメモリ204及びコプロメモリ205を備えている。
The
データメモリ202は、各種データの記憶に使用され、たとえば、EEPROM、Flash Memoryなどで構成されている。ワーキングメモリ203は、制御素子201が処理を行う際の処理データを一時的に保持するためのメモリであり、たとえば、RAMなどで構成される。プログラムメモリ204は、たとえば、マスクROMで構成されており、制御素子201のプログラムなどを記憶するものである。コプロメモリ205は、暗号処理を行う際の処理データを一時的に保持するためのメモリであり、たとえば、RAMなどで構成される。
The
HWモジュール部200bには、暗号処理を行う暗号モジュール207、乱数を生成する乱数生成モジュール208、電源端子に供給された電源電圧を検知する電圧検知モジュール209、クロック端子に供給されるクロック周波数を検知するクロック検知モジュール210、ICカード101の温度状態を検知する温度検知モジュール211及び内部クロックモジュール212が備えられている。
The
暗号モジュール207は、暗号計算を実行する。暗号モジュール207は、たとえば、DES、RSA、AESのコプロセッサ、転置回路などで構成される。乱数生成モジュール208は、乱数を生成する。電圧検知モジュール209は、供給される電源の電圧値を検知し、予め設定されたICカード動作可能範囲を電圧が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。クロック検知モジュール210は、供給されるクロック周波数を検知し、予め設定されたICカード動作可能範囲をクロック周波数が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。
The
温度検知モジュール211は、ICカード101の温度を検知し、予め設定されたICカード動作可能範囲をICカード101の温度が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。内部クロックモジュール212は、カードリーダ/ライタ102から供給されるクロック(外部クロックと定義する。)とは別に、ICカード構成例200の内部で利用するクロック(内部クロックと定義する。)を生成し、制御素子201とHWモジュール部200bの各モジュール207、208に供給する。
The
図3は、本実施の形態のICカード101の通信部206の接続端子構成を示す図である。なお、上述のように、通信部206の通信方式は、接触式に限られず、無線式、SWP式、USB式のいずれを採用しても良い。
FIG. 3 is a diagram illustrating a connection terminal configuration of the
電源端子301は、カードリーダ/ライタ102から供給電源を受け入れる。リセット端子302は、カードリーダ/ライタ102からリセット信号を受信する。クロック端子303は、カードリーダ/ライタ102から供給されるクロックを受信する。グランド端子305は、カードリーダ/ライタ102を経由して接地される、通信端子307は、カードリーダ/ライタ102と通信信号を授受する。なお、未使用端子304、306、308は、I無線式、SWP式、USB式により通信端子として利用される場合がある。
The power supply terminal 301 receives supply power from the card reader /
図4は、従来技術のICカードのソフトウェア構成例を示す図である。ICカード101は、ソフトウェアとして、通信ドライバ部401、ICカードOS部402及びアプリケーション部403を備えている。
FIG. 4 is a diagram illustrating a software configuration example of a conventional IC card. The
通信ドライバ部401は、通信部206を制御する。ICカードOS部402は、ICカードに搭載されたHWの制御、メモリ管理、アプリケーション管理、コマンド管理を行う。アプリケーション部403は、受信したコマンドに対応した処理を実行する。
The
図5は、本実施の形態のICカードのソフトウェア構成例を示す図である。ICカード101は、ソフトウェアとして、通信ドライバ部501、ICカードOS部502、アプリケーション部503及びAPIライブラリ部504を備えている。
FIG. 5 is a diagram illustrating a software configuration example of the IC card according to the present embodiment. The
通信ドライバ部501は、通信部206を制御する。ICカードOS部502は、ICカードに搭載されたHWの制御、メモリ管理、アプリケーション管理、コマンド管理を行う。アプリケーション部503は、受信したコマンドに対応した処理を実行する。APIライブラリ部504は、API(アプリケーション・プログラミング・インタフェース)を備える。APIは、ソフトウェアアプリケーションが使用できる命令、関数の集合である。アプリケーション部503のアプリケーションA,B,Cは、APIを用いて通信部206、暗号モジュール207、乱数生成モジュール208、各検知モジュール209、210、211、内部クロックモジュール212を利用することができる。即ち、APIは、アプリケーション部503とHWモジュール部との間で、情報を取得して授受する機能を備えている。
The
なお、アプリケーションA、B、Cは、高級言語で記述されるICカード用アプリケーションである。通信部206は、アプリケーションA、B、Cをデータとして受信する。ICカードOS部502は、ICカード発行後であってもアプリケーションA、B、CをICカード101に追加・削除することができる。アプリケーションA、B、Cは、同じ高級言語の仕様に準拠した別のICカードにも搭載可能である。ここで、本実施の形態では、高級言語とは、機械語、アセンブリ言語と比べてOS、ICカードの構成に依存することの少ないプログラミング言語のことを意味する。
The applications A, B, and C are IC card applications written in a high-level language. The
続いて、ICカード101の動作を説明する。
Next, the operation of the
図1のICカードを利用した処理システム100に示すように、ICカード101は、カードリーダ/ライタ102と接続される。接続方法が接触方式の場合は、図3に示すICカード101の接続端子と、対応するカードリーダ/ライタ102の端子とが接続される。接続が完了すると、カードリーダ/ライタ102は、電源、クロックをICカード101に供給し、リセット信号(RST)を送信する。ICカード101は供給された電源、クロックと、温度が予め設定された動作可能範囲内であることを検知回路により検知し、リセット信号をリセット端子302で受信したことを通知する信号(ATR)を通信端子307より送信する。なお、電源、クロック、温度いずれかが、動作可能範囲外となった場合、検知モジュールにより検知され、ICカード101の動作は停止する。
As shown in the
この後、カードリーダ/ライタ102とICカード101は通信端子を介してデータの送受信を行う。
Thereafter, the card reader /
図6は、従来技術におけるコマンド送受信シーケンス例を示す図である。 FIG. 6 is a diagram illustrating an example of a command transmission / reception sequence in the prior art.
上述の初期応答が完了し、ICカード101で処理を実行するアプリケーションが起動した後、カードリーダ/ライタ102は、コマンドをICカード101に対して送信する。ステップ601において、通信ドライバ部401はコマンドを含む受信データを受信する。ステップ602において、通信ドライバ部401は受信処理を実行する。通信ドライバ部401は受信データに含まれるプロトコルを解釈してコマンドデータを抽出する。通信ドライバ部401は、抽出したコマンドデータをICカードOS部402とアプリケーション部403で使用する形式に変換を行い、ステップ603において、変換したコマンドデータをICカードOS部402に送信する。
After the above initial response is completed and an application for executing processing on the
ステップ604において、ICカードOS部402は、受け取ったコマンドデータに対応した処理をコマンド処理として実行する。コマンド処理ごとに、アプリケーションが割当てられている。そして、ステップ605において、ICカードOS部402は、対応した処理を実行するための関数を呼び出す。関数とは、例えば暗号計算を実行する、メモリの内容を書き換えるなどのHWを直接制御する処理である。ステップ606において、アプリケーションは指定された関数を実行する。関数は、ICカードOS部402の制御の下で実行される。即ち、HWモジュール部はICカードOS部402により制御される。ステップ607において、アプリケーション部403は、関数を実行した結果を戻り値としてICカードOS部402に返信する。
In
ステップ608において、ICカードOS部402は、戻り値を通信用のフォーマットに変換すると共に、コマンド処理が成功したか否かを表すステータスワードを付加してレスポンスデータを生成する。ステップ609において、ICカードOS部402は、通信ドライバ部401にレスポンスデータを送信する。ステップ610において、通信ドライバ401は、レスポンスデータ609にプロトコル情報などカードリーダ/ライタとの通信に必要な情報を付加する送信処理を実行する。ステップ611において、カードリーダ/ライタ102は、通信ドライバ部401から送信された送信データを受信する。
In
以上のように、従来技術では検知モジュール209、210、211を含むHWモジュール部200bは、ICカードOS部402により制御されている。従って、HWモジュールの取扱を変更しようとするとそれに整合するようにICカードOS部402を変更する必要がある。更にアプリケーションが後で追加された場合、そのアプリケーションでHWモジュールを取り扱うことをICカードOS部402に規定して整合を図らなければならない。
As described above, in the conventional technique, the
図7は、本実施の形態におけるコマンド送受信シーケンス例を示す図である。 FIG. 7 is a diagram illustrating an example of a command transmission / reception sequence according to the present embodiment.
初期応答が完了し、ICカード101で処理を実行するアプリケーションが起動した後、カードリーダ/ライタ102は、コマンドをICカード101に対して送信する。ステップ701において、通信ドライバ部501はコマンドを含む受信データを受信する。ステップ702において、通信ドライバ部501は受信処理を実行する。通信ドライバ部501は受信データに含まれるプロトコルを解釈してコマンドデータを抽出する。通信ドライバ部501は、抽出したコマンドデータをICカードOS部502とアプリケーション部503で使用する形式に変換を行い、ステップ703において、変換したコマンドデータをICカードOS部502に送信する。
After the initial response is completed and an application for executing processing on the
ステップ704において、ICカードOS部502は、受信したコマンドデータが起動しているアプリケーションが処理するコマンドかどうかを確認する。確認がOKの場合、ステップ705おいて、アプリケーション部503に受信したコマンドデータを送信する。従って、ICカードOS部502は、従来のようにコマンドデータを解釈してHWモジュールを制御する関数を指定する動作を実行しない。
In
ステップ706おいて、アプリケーション部503に所属するアプリケーションは、受信したコマンドにHWモジュールを制御する命令が含まれているかどうかを調べる。そのような命令が含まれていた場合は、ステップ707おいて、アプリケーションは、APIライブラリ部504に入力パラメータを送信する。この入力パラメータによってどのHWモジュールをどのように制御するかを指定することができる。例えば、APIライブラリ部504に検知回路から情報を取得するAPIが存在していた場合、電圧回路から電圧を取得したいときは、入力パラメータに01を設定して当該APIを起動する。クロック回路からクロック数を取得したいときは入力パラメータに02を設定して当該APIを起動する。
In
ステップS708において、APIはAPI処理を実行する。API処理では、APIは、入力パラメータを解析し、該当するHWモジュールが処理できる形の入力パラメータに変換してHWモジュール部200bに送信する。さらに、HWモジュール部200bからの処理結果を受信する。
In step S708, the API executes an API process. In the API process, the API analyzes the input parameter, converts the input parameter into an input parameter that can be processed by the corresponding HW module, and transmits the input parameter to the
APIとHWモジュール部200bとの情報授受を具体的に説明する。例えば、電源電圧を検知する場合、ステップ709において、APIは、「現在発生している電圧が何ボルトであるかを検知せよ」との指示を表す入力パラメータをHWモジュール部200bに送信する。ステップ710において、HWモジュール部200bは、電源電圧を測定し、ステップ711において、測定した電源電圧値をAPIに送信する。
Information exchange between the API and the
図8は、HWモジュール部200bの各モジュールに対応する入力パラメータの例を示す図である。なお、図8の各検知モジュールに記載した動作遮断指示とは、それぞれの検知モジュールがICカード101の動作を遮断する機能を有効にする指示である。例えば、クロック検知モジュール210には、クロック数が1MHz〜数MHzの範囲を超えている場合は、ICカード101の動作を停止させる機能を備えている。このような動作遮断もAPIは指示することができる。
FIG. 8 is a diagram illustrating an example of input parameters corresponding to each module of the
ステップ712において、APIライブラリ部504に所属するAPIはアプリケーションに戻り値を送信する。APIは、電圧が正常に取得できたときは戻り値に電圧値を表すコードを設定し、正常に電圧が設定できなかったときはそのことを表すコードを戻り値に設定する。アプリケーションは、送信された戻り値に従って処理を進める。たとえば、電源電圧がソフトウェア実行上の制限となる状態であるかどうかを調べる場合、アプリケーションは、APIライブラリ部504に所属するAPIを介して電圧検知モジュール209を用いて検知した電圧値を取得し、ソフトウェアが実行可能かを判定する。アプリケーションは、処理結果に応じて別のAPIを呼び出して次の処理を実行させることもできるし、繰返しAPIを呼び出すこともできる。
In
従来は図6で示したように、ICカードOS部502がHWモジュールを制御していた。しかし上述のように、アプリケーションがAPIを介してHWモジュールを制御するように構成することで、ICカード101は、より柔軟にHWモジュールを制御することができる。
Conventionally, as shown in FIG. 6, the IC
例えば、カードリーダ/ライタ102がICカード101に供給可能な電圧値が、5V、3V、1.8Vの3段階であって、カードリーダ/ライタ102が、5Vを供給していたとする。APIは戻り値(=“0x03”)を返却する。この戻り値(=“0x03”)は、この電圧(=5V)の下では、HWモジュールが全て実行可能であり、ソフトウェアの実行には制限が設けられていないことを意味する。このように、アプリケーションは、取得した戻り値により、現在カードリーダ/ライタ102が供給している電圧値を知るだけでなく、ICカード101に搭載されている全てのHWモジュールを実行可能であることも知ることが出来る。
For example, it is assumed that the voltage values that the card reader /
またアプリケーションは、電源電圧が5Vと、3V、1.8Vに対して十分に供給されているため、一般的に消費電力が高くなる暗号処理や、高クロック動作を実行することができる判断する。更に、アプリケーションは、これらの機能を用いて、一連の処理を高速に行うことが可能と判断する。 In addition, since the power supply voltage is sufficiently supplied to 5 V, 3 V, and 1.8 V, the application determines that encryption processing that generally increases power consumption and high clock operation can be executed. Furthermore, the application determines that a series of processing can be performed at high speed using these functions.
ステップ713において、アプリケーションは、コマンド実行結果を作成し、ICカードOS部502に送信する。コマンド実行結果には、HWモジュールが動作して取得した値、HWモジュールの動作が成功か失敗かの結果などが含まれる。ステップ714において、ICカードOS部502は、レスポンス処理によりレスポンスデータを作成し、ステップ715において、通信ドライバ部501へ送信する。レスポンスデータには、コマンド実行結果とともに、コマンド処理が成功か否かを表す、ICカードの規格で定められるステータスワードが付加されている。
In
ステップ716において、通信ドライバ部501は、レスポンスデータ715にプロトコル情報などカードリーダ/ライタ102との通信に必要なプロトコル情報を付加して送信データを生成する。ステップ717において、通信ドライバ部501は、カードリーダ/ライタ102に対して送信処理を行う。
In
上述のように、アプリケーションはHWモジュールの測定値に基づいてICカード101が動作する環境を判断する。動作環境を判断するために用いられる物理量には、ICカード101周辺の温度、外部からICカード101に供給される電源電圧、クロック周波数などがある。また、アプリケーションは、この測定値によってHWモジュールの動作を制限する。動作制限を受けるHWモジュールには、暗号モジュール207、乱数生成モジュール208、内部クロックモジュール212などがある。
As described above, the application determines the environment in which the
次に、アプリケーションが実施するコマンド処理は以下に説明するようにフレキシブルに構成することが可能である。アプリケーションは、供給されている電圧・クロック情報に基づいて、処理方法を柔軟に選択することができる。 Next, the command processing executed by the application can be flexibly configured as described below. The application can flexibly select a processing method based on the supplied voltage / clock information.
(1)供給される電圧・クロックに応じて、HWモジュールを制御するAPIにより内部クロックモジュールを制御し、内部クロックを変更する。電圧が所定値よりも低い、またはクロック周波数が所定値よりも低い場合、内部クロック周波数を低くする。 (1) The internal clock module is controlled by the API that controls the HW module according to the supplied voltage / clock, and the internal clock is changed. When the voltage is lower than the predetermined value or the clock frequency is lower than the predetermined value, the internal clock frequency is lowered.
(2)供給される電圧・クロックに応じて、サポート可能な暗号の鍵長を変更する。電圧が所定値よりも高い、またはクロック周波数が所定値よりも高い場合、暗号の鍵長を長くする。電圧が低い、またはクロック周波数が低い場合、暗号の鍵長を短くする。 (2) The supportable encryption key length is changed according to the supplied voltage and clock. When the voltage is higher than the predetermined value or the clock frequency is higher than the predetermined value, the encryption key length is increased. When the voltage is low or the clock frequency is low, the encryption key length is shortened.
(3)供給される電圧・クロックに応じて、アプリケーションが実行可能かを判断し、実行不可の場合、エラーを送信する。例えば、電圧が所定電圧以上かつクロック周波数が所定の周波数以上である場合は、ハードウェア暗号モジュールの使用を可能とし、そうでない場合は、ハードウェア暗号モジュールの使用を不可としてエラーを送信する。 (3) It is determined whether the application can be executed according to the supplied voltage / clock. If the application cannot be executed, an error is transmitted. For example, when the voltage is equal to or higher than a predetermined voltage and the clock frequency is equal to or higher than the predetermined frequency, the hardware cryptographic module can be used, and otherwise, the hardware cryptographic module cannot be used and an error is transmitted.
(4)供給される電圧・クロックに応じて、アプリケーションが実行可能かを判断し、実行不可の場合、実行可能となる電圧・クロックの値をレスポンスデータとして応答する。例えば、電圧が所定電圧以下あるいはクロック周波数が所定の周波数以下である場合、ハードウェア暗号モジュールの使用を不可とし、さらにレスポンスデータに所定電圧、所定周波数を設定する。 (4) It is determined whether the application can be executed according to the supplied voltage / clock. If the application is not executable, the value of the executable voltage / clock is returned as response data. For example, when the voltage is equal to or lower than the predetermined voltage or the clock frequency is equal to or lower than the predetermined frequency, the use of the hardware cryptographic module is disabled, and the predetermined voltage and the predetermined frequency are set in the response data.
(5)供給される電圧・クロックに応じて、アプリケーションが実行可能かを判断し、実行不可の場合、実行可能となるように内部クロックモジュール、暗号モジュール、乱数生成モジュールの機能を、HWモジュールを制御するAPIにより順次停止する。例えば、電圧が第1の所定値以下になったときはまず内部クロックモジュールを停止する。さらに電圧が第2所定値以下になったときは暗号モジュールを停止する。そして、電圧が第3所定値以下になったときは乱数生成モジュールを停止する。 (5) Determine whether the application can be executed according to the supplied voltage / clock. If not, execute the functions of the internal clock module, cryptographic module, and random number generation module so that the application can be executed. Stop sequentially by controlling API. For example, when the voltage falls below the first predetermined value, the internal clock module is first stopped. Further, when the voltage falls below the second predetermined value, the cryptographic module is stopped. Then, when the voltage becomes equal to or lower than the third predetermined value, the random number generation module is stopped.
(6)供給される電圧・クロックに応じて、アプリケーションが実行可能かを判断し、実行不可の場合、HWモジュールの実行を禁止し、ソフトウェアによる代替機能用いる。例えば、電圧が所定電圧以下あるいはクロック周波数が所定の周波数以下である場合、暗号モジュール、乱数生成モジュールをハードウェアの機能からソフトウェアの機能に切換える。即ち、暗号モジュールに対しては、ソフトウェアによる暗号処理関数を使用し、乱数生成モジュールに対しては、ソフトウェアによる乱数生成関数を用いる。 (6) It is determined whether the application can be executed according to the supplied voltage / clock. If the application cannot be executed, execution of the HW module is prohibited and an alternative function by software is used. For example, when the voltage is a predetermined voltage or less or the clock frequency is a predetermined frequency or less, the cryptographic module and the random number generation module are switched from the hardware function to the software function. That is, a cryptographic processing function by software is used for the cryptographic module, and a random number generating function by software is used for the random number generating module.
また本実施の形態の携帯可能電子装置は、つぎのような機能を備えることができる。
API内処理においてソフトウェア継続実行不可と判断した場合、APIを呼び出したソフトウェア処理へ制御を渡すことなく外部へ特定の結果を出力する。
ソフトウェア継続実行不可との判断が供給電力不足に起因し、暗号モジュールの動作が継続できず、外部からの指示を処理できないときは、外部へ電力供給不足である旨を出力する。
In addition, the portable electronic device of this embodiment can have the following functions.
When it is determined in the API processing that software continuation execution is impossible, a specific result is output to the outside without passing control to the software processing that called the API.
If it is determined that the software cannot be continuously executed due to insufficient supply power, and the operation of the cryptographic module cannot be continued and an instruction from the outside cannot be processed, the fact that the power supply is insufficient is output to the outside.
[効果]
以上説明した実施の形態によれば、種々の効果を奏することができる。
[effect]
According to the embodiment described above, various effects can be achieved.
アプリケーションは、HWモジュールの状態を取得し、ICカードの制限事項を参照してアプリケーションの動作を制御することが出来る。そのためアプリケーションは、ICカードシステムの状態に適した最適な動作を実行することができる。例えば、電源電圧が高く安定していて、制限が設けられていない場合には、内部クロックを上げてアプリケーション実行速度を上げることが可能であり、また、ハードウェアの暗号モジュールの機能を利用して暗号計算処理を高速に行うことも可能である。
一方で電源電圧が低く安定しないためHWモジュールの動作に制限がある場合、例えば、電圧が低くクロックを下げないと暗号モジュールが動作しない場合は、アプリケーションは、内部クロックモジュールを制御するAPIを利用して内部クロックを下げて実行速度を遅くし、暗号モジュール実行APIの利用を止めて、暗号処理をソフトウェア処理に切り替えることで、消費電力を抑えることが可能である。
このような対応が柔軟に追加削除変更できることは顕著な効果として挙げられる。
The application can acquire the status of the HW module and control the operation of the application with reference to the restrictions of the IC card. Therefore, the application can execute an optimum operation suitable for the state of the IC card system. For example, if the power supply voltage is high and stable and there are no restrictions, it is possible to increase the application execution speed by increasing the internal clock, and use the function of the hardware cryptographic module. It is also possible to perform cryptographic calculation processing at high speed.
On the other hand, if the operation of the HW module is limited because the power supply voltage is low and unstable, for example, if the cryptographic module does not operate unless the voltage is low and the clock is lowered, the application uses an API that controls the internal clock module. The power consumption can be reduced by lowering the internal clock to slow down the execution speed, stopping the use of the cryptographic module execution API, and switching the cryptographic processing to software processing.
The fact that such correspondence can be added, deleted, and changed flexibly is a remarkable effect.
また、アプリケーションは、同一の高級言語仕様に準拠したICカード上で動作する。そして、アプリケーションは高級言語仕様に準拠したAPIによりHW状態を検知し、ソフトウェア実行上の制限事項を取得し、ハードウェアの制御を行うことが出来る。このため、個別のハードウェア仕様を意識せずにアプリケーションをプログラミングすることができる。 The application runs on an IC card that conforms to the same high-level language specification. Then, the application can detect the HW state by an API conforming to the high-level language specification, acquire restrictions on software execution, and control the hardware. For this reason, an application can be programmed without being aware of individual hardware specifications.
なお、上述の各実施の形態で説明した機能は、ハードウェアを用いて構成するに留まらず、ソフトウェアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウェア、ハードウェアのいずれかを選択して構成するものであっても良い。 Note that the functions described in the above-described embodiments are not limited to being configured using hardware, and 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.
尚、本発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。
上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。
以下に本件出願当初の特許請求の範囲に記載された発明を付記する。
[1]
外部機器からコマンドを受信する受信部と、
受信したコマンドに対応した処理を実行するアプリケーション部と、
特定の処理機能をハードウェアで構成したモジュールを複数有するハードウェアモジュール部と、
前記アプリケーション部からの指示に基づいて前記モジュールを制御してその結果を取得して前記アプリケーション部に返信するAPI(アプリケーション・プログラミング・インターフェース)部と、
前記アプリケーション部から前記コマンドの処理結果を取得して前記外部機器に送信する送信部と
を備えたことを特徴とする携帯可能電子装置。
[2]
少なくとも一つの前記モジュールは、前記携帯可能電子装置が動作する環境に関する情報を検知し、
前記アプリケーション部は、前記API部を介して取得した前記環境に関する情報に基づいて前記コマンドに対応した処理を実行する方法を選択すること
を特徴とする[1]に記載の携帯可能電子装置。
[3]
前記ハードウェアモジュール部は、環境に関する情報を検知するモジュールとして、
外部から供給されるクロック周波数を検知するクロック検知モジュール、前記携帯可能電子装置の周辺温度を検知する温度検知モジュール、及び外部から供給される電源電圧を検知する電圧検知モジュールを備えたことを特徴とする[2]に記載の携帯可能電子装置。
[4]
前記ハードウェアモジュール部は、暗号の生成と解読を処理する暗号モジュール、及び乱数を生成する乱数生成モジュールを備え、
前記アプリケーション部は、前記環境に関する情報に基づいて前記暗号モジュール、及び乱数生成モジュールの動作可否、あるいはソフトウェアによる代替を選択して処理を実行することを特徴とする[2]に記載の携帯可能電子装置。
[5]
前記ハードウェアモジュール部は、前記携帯可能電子装置の内部クロックを発生する内部クロックモジュールを更に有し、
前記アプリケーション部は、
前記API部を介して電圧検知モジュールから取得した電源電圧が第1の所定値以上のときは、前記API部を介して前記内部クロックモジュールが発生するクロック周波数を増加し、
前記API部を介して電圧検知モジュールから取得した電源電圧が前記第1の所定位置よりも小さい第2の所定値以下のときは、前記API部を介して前記内部クロックモジュールが発生するクロック周波数を減少することを特徴とする[3]に記載の携帯可能電子装置。
[6]
[1]乃至[5]の内のいずれか1項に記載の各部を有するICモジュールと、
このICモジュールを収納したICカード本体と
を備えたことを特徴とするICカード。
[7]
前記アプリケーション部は、ソースプログラムが高級言語であるソフトウェアで構成され、前記ソフトウェアは追加、削除可能であることを特徴とする[6]に記載のICカード。
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.
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.
The invention described in the scope of the claims at the beginning of the present application is added below.
[1]
A receiver for receiving commands from an external device;
An application unit that executes processing corresponding to the received command;
A hardware module unit having a plurality of modules each having a specific processing function configured by hardware;
An API (Application Programming Interface) unit for controlling the module based on an instruction from the application unit, obtaining the result, and returning the result to the application unit;
A transmission unit that acquires a processing result of the command from the application unit and transmits the processing result to the external device;
A portable electronic device comprising:
[2]
At least one module detects information about an environment in which the portable electronic device operates;
The application unit selects a method for executing processing corresponding to the command based on information on the environment acquired through the API unit.
The portable electronic device according to [1], characterized in that
[3]
The hardware module unit is a module that detects information about the environment.
A clock detection module for detecting a clock frequency supplied from the outside, a temperature detection module for detecting the ambient temperature of the portable electronic device, and a voltage detection module for detecting a power supply voltage supplied from the outside The portable electronic device according to [2].
[4]
The hardware module unit includes a cryptographic module that processes generation and decryption of a cipher, and a random number generation module that generates a random number,
The portable electronic device according to [2], wherein the application unit executes processing by selecting whether or not the cryptographic module and the random number generation module can be operated based on information on the environment, or software alternatives. apparatus.
[5]
The hardware module unit further includes an internal clock module that generates an internal clock of the portable electronic device,
The application part is
When the power supply voltage acquired from the voltage detection module through the API unit is equal to or higher than a first predetermined value, the clock frequency generated by the internal clock module through the API unit is increased.
When the power supply voltage acquired from the voltage detection module via the API unit is equal to or smaller than a second predetermined value smaller than the first predetermined position, the clock frequency generated by the internal clock module via the API unit is set. The portable electronic device according to [3], which is reduced.
[6]
An IC module having each part according to any one of [1] to [5];
An IC card body containing the IC module and
An IC card characterized by comprising:
[7]
The IC card according to [6], wherein the application unit is configured by software whose source program is a high-level language, and the software can be added or deleted.
101…ICカード、102…リーダライタ、103…端末、104…キーボード、105…モニタ、106…プリンタ、200…ICモジュール、200a…メモリ部、200b…ハードウェアモジュール部、201…制御素子、202…データメモリ、203…ワーキングメモリ、204…プログラムメモリ、205…コプロメモリ、206…通信部、207…暗号モジュール、208…乱数生成モジュール、209…電圧検知モジュール、210…クロック検知モジュール、211…温度検知モジュール、212…内部クロックモジュール、501…通信ドライバ部、503…アプリケーション部、504…APIライブラリ部。
DESCRIPTION OF
Claims (6)
受信したコマンドに対応した処理を実行するアプリケーション部と、
特定の処理機能をハードウェアで構成したモジュールを複数有するハードウェアモジュール部と、
前記アプリケーション部からの指示に基づいて前記モジュールを制御してその結果を取得して前記アプリケーション部に返信するAPI(アプリケーション・プログラミング・インターフェース)部と、
前記アプリケーション部から前記コマンドの処理結果を取得して前記外部機器に送信する送信部と、を備え
少なくとも一つの前記モジュールは、前記携帯可能電子装置が動作する環境に関する情報を検知し、
前記アプリケーション部は、前記API部を介して取得した前記環境に関する情報に基づいて前記コマンドに対応した処理を実行する方法を選択する、
ことを特徴とする携帯可能電子装置。 A receiver for receiving commands from an external device;
An application unit that executes processing corresponding to the received command;
A hardware module unit having a plurality of modules each having a specific processing function configured by hardware;
An API (Application Programming Interface) unit for controlling the module based on an instruction from the application unit, obtaining the result, and returning the result to the application unit;
And a transmission unit for transmitting to the external device to obtain the processing result of the command from the application section
At least one module detects information about an environment in which the portable electronic device operates;
The application unit selects a method for executing processing corresponding to the command based on information about the environment acquired through the API unit.
A portable electronic device characterized by that.
外部から供給されるクロック周波数を検知するクロック検知モジュール、前記携帯可能電子装置の周辺温度を検知する温度検知モジュール、及び外部から供給される電源電圧を検知する電圧検知モジュールを備えたことを特徴とする請求項1に記載の携帯可能電子装置。 The hardware module unit is a module that detects information about the environment.
A clock detection module for detecting a clock frequency supplied from the outside, a temperature detection module for detecting the ambient temperature of the portable electronic device, and a voltage detection module for detecting a power supply voltage supplied from the outside The portable electronic device according to claim 1 .
前記アプリケーション部は、前記環境に関する情報に基づいて前記暗号モジュール、及び乱数生成モジュールの動作可否、あるいはソフトウェアによる代替を選択して処理を実行することを特徴とする請求項1に記載の携帯可能電子装置。 The hardware module unit includes a cryptographic module that processes generation and decryption of a cipher, and a random number generation module that generates a random number,
2. The portable electronic device according to claim 1 , wherein the application unit executes processing by selecting whether or not the cryptographic module and the random number generation module are operable based on information related to the environment, or software alternatives. apparatus.
前記アプリケーション部は、
前記API部を介して電圧検知モジュールから取得した電源電圧が第1の所定値以上のときは、前記API部を介して前記内部クロックモジュールが発生するクロック周波数を増加させ、
前記API部を介して電圧検知モジュールから取得した電源電圧が前記第1の所定位置よりも小さい第2の所定値以下のときは、前記API部を介して前記内部クロックモジュールが発生するクロック周波数を減少させることを特徴とする請求項2に記載の携帯可能電子装置。 The hardware module unit further includes an internal clock module that generates an internal clock of the portable electronic device,
The application part is
Wherein when API unit power supply voltage obtained from the voltage sensing module via the first predetermined value or more, to increase the clock frequency the internal clock module generates via the API unit,
When the power supply voltage acquired from the voltage detection module via the API unit is equal to or smaller than a second predetermined value smaller than the first predetermined position, the clock frequency generated by the internal clock module via the API unit is set. portable electronic device according to claim 2, characterized in that cause decreased.
このICモジュールを収納したICカード本体と
を備えたことを特徴とするICカード。 An IC module having each part according to any one of claims 1 to 5,
An IC card comprising: an IC card main body storing the IC module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010157174A JP5444143B2 (en) | 2010-07-09 | 2010-07-09 | Portable electronic device and IC card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010157174A JP5444143B2 (en) | 2010-07-09 | 2010-07-09 | Portable electronic device and IC card |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012018635A JP2012018635A (en) | 2012-01-26 |
JP5444143B2 true JP5444143B2 (en) | 2014-03-19 |
Family
ID=45603823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010157174A Active JP5444143B2 (en) | 2010-07-09 | 2010-07-09 | Portable electronic device and IC card |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5444143B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6299892B2 (en) * | 2017-01-18 | 2018-03-28 | 大日本印刷株式会社 | Information processing apparatus, initial response method, and IC card |
CN115174431B (en) * | 2022-06-30 | 2023-09-05 | 无锡融卡科技有限公司 | Simple SWP full duplex logic signal acquisition device and method |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3983521B2 (en) * | 2001-11-14 | 2007-09-26 | シャープ株式会社 | Semiconductor device and IC card |
JP2005191961A (en) * | 2003-12-25 | 2005-07-14 | Sharp Corp | Noncontact ic card, electronic information apparatus, portable electronic information apparatus, open-type system, method for controling electric power consumption, control program, and readable recording medium |
JP2008181225A (en) * | 2007-01-23 | 2008-08-07 | Toshiba Corp | Ic card |
JP5057829B2 (en) * | 2007-04-17 | 2012-10-24 | 株式会社東芝 | Portable electronic device and IC card |
JP2009059304A (en) * | 2007-09-03 | 2009-03-19 | Nxp Bv | Method for communicating with chip of information storage device and information storage device |
JP4821822B2 (en) * | 2008-08-29 | 2011-11-24 | 大日本印刷株式会社 | IC card |
-
2010
- 2010-07-09 JP JP2010157174A patent/JP5444143B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012018635A (en) | 2012-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR20060049641A (en) | Mobile electronic equipment | |
US8931705B2 (en) | IC card, mobile electronic device and data processing method in IC card | |
US10498671B2 (en) | IC card, portable electronic apparatus, and IC card processing apparatus | |
JP5444143B2 (en) | Portable electronic device and IC card | |
US20170200071A1 (en) | Ic card, portable electronic apparatus, and processing apparatus | |
US20140189223A1 (en) | Ic card, portable electronic device, and method of controlling ic card | |
US20120234926A1 (en) | Portable electronic apparatus | |
US9007176B2 (en) | Portable electronic apparatus and control method of portable electronic apparatus | |
JP2007115187A (en) | Portable electronic device and ic card | |
JP2014059731A (en) | Ic card and mobile electronic device | |
KR100399603B1 (en) | Smart card and method for writing/erasing and operating an os program the same | |
JP2013122690A (en) | Ic card, portable electronic device and ic card control method | |
JP2006195901A (en) | Semiconductor device | |
JP2013164686A (en) | Ic card and portable electronic device | |
WO2021124846A1 (en) | Ic card and control program for ic card | |
JP2009134740A (en) | Electronic appliance | |
JP4533665B2 (en) | Portable electronic device | |
JP2008276572A (en) | Non-contact ic card | |
US8521935B2 (en) | Portable electronic apparatus, control method for portable electronic apparatus, and IC card | |
JP5242091B2 (en) | Portable electronic device, IC card, and portable electronic device control method | |
JP6071677B2 (en) | IC card, IC module, and portable electronic device | |
JP5684059B2 (en) | IC card and control method of IC card | |
JP5112123B2 (en) | Portable electronic device and IC card | |
JP5726700B2 (en) | IC card and IC card processing method | |
JP2012155664A (en) | Portable electronic device and ic card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130821 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130910 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131105 |
|
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: 20131126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131220 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5444143 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |