JP5444143B2 - Portable electronic device and IC card - Google Patents

Portable electronic device and IC card Download PDF

Info

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
Application number
JP2010157174A
Other languages
Japanese (ja)
Other versions
JP2012018635A (en
Inventor
雄介 八木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2010157174A priority Critical patent/JP5444143B2/en
Publication of JP2012018635A publication Critical patent/JP2012018635A/en
Application granted granted Critical
Publication of JP5444143B2 publication Critical patent/JP5444143B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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.

特開2009−48642号公報JP 2009-48642 A

しかし、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.

本実施の形態のICカードを利用した処理システムの構成を示す図。The figure which shows the structure of the processing system using the IC card of this Embodiment. 本実施の形態のICカードの構成例について説明するための図。The figure for demonstrating the structural example of the IC card of this Embodiment. 本実施の形態のICカードの通信部の接続端子構成を示す図。The figure which shows the connection terminal structure of the communication part of the IC card of this Embodiment. 従来技術のICカードのソフトウェア構成例を示す図。The figure which shows the software structural example of the IC card of a prior art. 本実施の形態のICカードのソフトウェア構成例を示す図。The figure which shows the software structural example of the IC card of this Embodiment. 従来技術におけるコマンド送受信シーケンス例を示す図。The figure which shows the command transmission / reception sequence example in a prior art. 本実施の形態におけるコマンド送受信シーケンス例を示す図。The figure which shows the command transmission / reception sequence example in this Embodiment. HWモジュール部の各モジュールに対応する入力パラメータの例を示す図。The figure which shows the example of the input parameter corresponding to each module of a HW module part.

(第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 processing system 100 using an IC card according to the present embodiment. The processing system 100 includes an IC card 101, a card reader / writer 102, a terminal 103, a keyboard 104, a monitor 105, and a printer 106. The IC card 101 can be connected to a card reader / writer 102. The terminal 103 is configured by connecting a card reader / writer 102, a keyboard 104, a monitor 105, and a printer 106.

カードリーダライタ102は、ICカード101と通信を行うためのインターフェース装置である。カードリーダライタ102は、ICカード101に対して、電源供給、クロック供給、リセット制御、及びデータの送受信を行う。   The card reader / writer 102 is an interface device for communicating with the IC card 101. The card reader / writer 102 performs power supply, clock supply, reset control, and data transmission / reception with respect to the IC card 101.

端末103は、カードリーダライタ102を介してICカード101に対して種々のコマンドを入力する。ICカード101は、例えば、カードリーダライタ102からデータの書き込みコマンドを受信した場合、受信したデータを内部の不揮発性メモリに書き込む処理を行う。また、端末103は、ICカード101に読み取りコマンドを送信することにより、ICカード101からデータを読み出す。端末103は、ICカード101から受信したデータに基づいて種々の処理を行う。   The terminal 103 inputs various commands to the IC card 101 via the card reader / writer 102. For example, when the IC card 101 receives a data write command from the card reader / writer 102, the IC card 101 performs a process of writing the received data into the internal nonvolatile memory. Further, the terminal 103 reads data from the IC card 101 by transmitting a read command to the IC card 101. The terminal 103 performs various processes based on the data received from the IC card 101.

モニタ105は、端末103によって制御されて種々の情報を表示する。キーボード104は、処理システム100の操作者による操作を信号に変換して端末103に出力する。プリンタ106は、端末103からの情報を印字出力する。   The monitor 105 is controlled by the terminal 103 and displays various information. The keyboard 104 converts an operation performed by an operator of the processing system 100 into a signal and outputs the signal to the terminal 103. The printer 106 prints out information from the terminal 103.

図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 IC card 101 according to the present embodiment.
The IC card 101 includes a card-shaped main body and an IC module 200 built in the main body. The IC module 200 is provided with a memory unit 200a, an HW (hardware) module unit 200b, a control element 201, and a communication unit 206.

制御素子201は、例えばCPU、レジスタなどを備え、ICカード101における処理を統括して制御する。通信部206は、カードリーダ/ライタ102との間の通信処理を実行する。通信方式は、接触式に限られず、無線式、SWP式、USB式のいずれを採用しても良い。   The control element 201 includes, for example, a CPU, a register, and the like, and performs overall control of processing in the IC card 101. The communication unit 206 executes communication processing with the card reader / writer 102. The communication method is not limited to the contact method, and any of a wireless method, a SWP method, and a USB method may be adopted.

メモリ部200aは、記憶内容が消去可能な不揮発性のデータメモリ202、ワーキングメモリ203、プログラムメモリ204及びコプロメモリ205を備えている。   The memory unit 200a includes a nonvolatile data memory 202, a working memory 203, a program memory 204, and a coprocessor memory 205 whose stored contents can be erased.

データメモリ202は、各種データの記憶に使用され、たとえば、EEPROM、Flash Memoryなどで構成されている。ワーキングメモリ203は、制御素子201が処理を行う際の処理データを一時的に保持するためのメモリであり、たとえば、RAMなどで構成される。プログラムメモリ204は、たとえば、マスクROMで構成されており、制御素子201のプログラムなどを記憶するものである。コプロメモリ205は、暗号処理を行う際の処理データを一時的に保持するためのメモリであり、たとえば、RAMなどで構成される。   The data memory 202 is used for storing various data, and is composed of, for example, an EEPROM or a flash memory. The working memory 203 is a memory for temporarily storing processing data when the control element 201 performs processing, and is configured by a RAM or the like, for example. The program memory 204 is configured by a mask ROM, for example, and stores a program of the control element 201 and the like. The coprocessor memory 205 is a memory for temporarily storing processing data when performing cryptographic processing, and includes, for example, a RAM.

HWモジュール部200bには、暗号処理を行う暗号モジュール207、乱数を生成する乱数生成モジュール208、電源端子に供給された電源電圧を検知する電圧検知モジュール209、クロック端子に供給されるクロック周波数を検知するクロック検知モジュール210、ICカード101の温度状態を検知する温度検知モジュール211及び内部クロックモジュール212が備えられている。   The HW module unit 200b includes a cryptographic module 207 that performs cryptographic processing, a random number generation module 208 that generates random numbers, a voltage detection module 209 that detects a power supply voltage supplied to a power supply terminal, and a clock frequency supplied to a clock terminal. A clock detection module 210 that detects the temperature state of the IC card 101, and an internal clock module 212.

暗号モジュール207は、暗号計算を実行する。暗号モジュール207は、たとえば、DES、RSA、AESのコプロセッサ、転置回路などで構成される。乱数生成モジュール208は、乱数を生成する。電圧検知モジュール209は、供給される電源の電圧値を検知し、予め設定されたICカード動作可能範囲を電圧が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。クロック検知モジュール210は、供給されるクロック周波数を検知し、予め設定されたICカード動作可能範囲をクロック周波数が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。   The cryptographic module 207 performs cryptographic calculation. The cryptographic module 207 includes, for example, a DES, RSA, AES coprocessor, a transposition circuit, and the like. The random number generation module 208 generates a random number. The voltage detection module 209 detects the voltage value of the supplied power, and transmits a signal for stopping the operation of the IC card 101 to the control element 201 when the voltage is out of the IC card operable range set in advance. . The clock detection module 210 detects the supplied clock frequency, and transmits a signal for stopping the operation of the IC card 101 to the control element 201 when the clock frequency is out of the IC card operable range set in advance.

温度検知モジュール211は、ICカード101の温度を検知し、予め設定されたICカード動作可能範囲をICカード101の温度が外れた場合に、ICカード101の動作を停止する信号を制御素子201に送信する。内部クロックモジュール212は、カードリーダ/ライタ102から供給されるクロック(外部クロックと定義する。)とは別に、ICカード構成例200の内部で利用するクロック(内部クロックと定義する。)を生成し、制御素子201とHWモジュール部200bの各モジュール207、208に供給する。   The temperature detection module 211 detects the temperature of the IC card 101, and outputs a signal to the control element 201 to stop the operation of the IC card 101 when the temperature of the IC card 101 deviates from a preset IC card operable range. Send. The internal clock module 212 generates a clock (defined as an internal clock) used inside the IC card configuration example 200 separately from a clock (defined as an external clock) supplied from the card reader / writer 102. The control element 201 and the modules 207 and 208 of the HW module unit 200b are supplied.

図3は、本実施の形態のICカード101の通信部206の接続端子構成を示す図である。なお、上述のように、通信部206の通信方式は、接触式に限られず、無線式、SWP式、USB式のいずれを採用しても良い。   FIG. 3 is a diagram illustrating a connection terminal configuration of the communication unit 206 of the IC card 101 according to the present embodiment. As described above, the communication method of the communication unit 206 is not limited to the contact method, and any of a wireless method, a SWP method, and a USB method may be employed.

電源端子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 / writer 102. The reset terminal 302 receives a reset signal from the card reader / writer 102. The clock terminal 303 receives a clock supplied from the card reader / writer 102. The ground terminal 305 is grounded via the card reader / writer 102. The communication terminal 307 exchanges communication signals with the card reader / writer 102. Note that the unused terminals 304, 306, and 308 may be used as communication terminals by the I wireless type, SWP type, and USB type.

図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 IC card 101 includes a communication driver unit 401, an IC card OS unit 402, and an application unit 403 as software.

通信ドライバ部401は、通信部206を制御する。ICカードOS部402は、ICカードに搭載されたHWの制御、メモリ管理、アプリケーション管理、コマンド管理を行う。アプリケーション部403は、受信したコマンドに対応した処理を実行する。   The communication driver unit 401 controls the communication unit 206. The IC card OS unit 402 performs control of the HW mounted on the IC card, memory management, application management, and command management. The application unit 403 executes processing corresponding to the received command.

図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 IC card 101 includes a communication driver unit 501, an IC card OS unit 502, an application unit 503, and an API library unit 504 as software.

通信ドライバ部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 communication driver unit 501 controls the communication unit 206. The IC card OS unit 502 performs control of the HW mounted on the IC card, memory management, application management, and command management. The application unit 503 executes processing corresponding to the received command. The API library unit 504 includes an API (Application Programming Interface). The API is a set of instructions and functions that can be used by the software application. Applications A, B, and C of the application unit 503 can use the communication unit 206, the encryption module 207, the random number generation module 208, the detection modules 209, 210, and 211, and the internal clock module 212 using the API. In other words, the API has a function of acquiring and exchanging information between the application unit 503 and the HW module unit.

なお、アプリケーション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 communication unit 206 receives the applications A, B, and C as data. The IC card OS unit 502 can add / delete applications A, B, and C to the IC card 101 even after the IC card is issued. Applications A, B, and C can be mounted on different IC cards that conform to the same high-level language specifications. Here, in the present embodiment, the high-level language means a programming language that is less dependent on the configuration of the OS and IC card than the machine language and assembly language.

続いて、ICカード101の動作を説明する。   Next, the operation of the IC card 101 will be described.

図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 processing system 100 using the IC card in FIG. 1, the IC card 101 is connected to a card reader / writer 102. When the connection method is a contact method, the connection terminal of the IC card 101 shown in FIG. 3 and the corresponding terminal of the card reader / writer 102 are connected. When the connection is completed, the card reader / writer 102 supplies power and a clock to the IC card 101 and transmits a reset signal (RST). The IC card 101 detects that the supplied power supply, clock, and temperature are within a preset operable range by a detection circuit, and outputs a signal (ATR) notifying that a reset signal has been received at the reset terminal 302. It transmits from the communication terminal 307. If any one of the power source, clock, and temperature is outside the operable range, the detection module detects that and the operation of the IC card 101 stops.

この後、カードリーダ/ライタ102とICカード101は通信端子を介してデータの送受信を行う。   Thereafter, the card reader / writer 102 and the IC card 101 transmit and receive data via the communication terminal.

図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 IC card 101 is activated, the card reader / writer 102 transmits a command to the IC card 101. In step 601, the communication driver unit 401 receives received data including a command. In step 602, the communication driver unit 401 executes reception processing. The communication driver unit 401 interprets the protocol included in the received data and extracts command data. The communication driver unit 401 converts the extracted command data into a format used by the IC card OS unit 402 and the application unit 403, and transmits the converted command data to the IC card OS unit 402 in step 603.

ステップ604において、ICカードOS部402は、受け取ったコマンドデータに対応した処理をコマンド処理として実行する。コマンド処理ごとに、アプリケーションが割当てられている。そして、ステップ605において、ICカードOS部402は、対応した処理を実行するための関数を呼び出す。関数とは、例えば暗号計算を実行する、メモリの内容を書き換えるなどのHWを直接制御する処理である。ステップ606において、アプリケーションは指定された関数を実行する。関数は、ICカードOS部402の制御の下で実行される。即ち、HWモジュール部はICカードOS部402により制御される。ステップ607において、アプリケーション部403は、関数を実行した結果を戻り値としてICカードOS部402に返信する。   In step 604, the IC card OS unit 402 executes a process corresponding to the received command data as a command process. An application is assigned for each command processing. In step 605, the IC card OS unit 402 calls a function for executing the corresponding processing. The function is a process for directly controlling the HW, for example, executing cryptographic calculation or rewriting the contents of the memory. In step 606, the application executes the specified function. The function is executed under the control of the IC card OS unit 402. That is, the HW module unit is controlled by the IC card OS unit 402. In step 607, the application unit 403 returns the result of executing the function to the IC card OS unit 402 as a return value.

ステップ608において、ICカードOS部402は、戻り値を通信用のフォーマットに変換すると共に、コマンド処理が成功したか否かを表すステータスワードを付加してレスポンスデータを生成する。ステップ609において、ICカードOS部402は、通信ドライバ部401にレスポンスデータを送信する。ステップ610において、通信ドライバ401は、レスポンスデータ609にプロトコル情報などカードリーダ/ライタとの通信に必要な情報を付加する送信処理を実行する。ステップ611において、カードリーダ/ライタ102は、通信ドライバ部401から送信された送信データを受信する。   In step 608, the IC card OS unit 402 converts the return value into a communication format, and adds a status word indicating whether or not the command processing is successful to generate response data. In step 609, the IC card OS unit 402 transmits response data to the communication driver unit 401. In step 610, the communication driver 401 executes transmission processing for adding information necessary for communication with the card reader / writer, such as protocol information, to the response data 609. In step 611, the card reader / writer 102 receives the transmission data transmitted from the communication driver unit 401.

以上のように、従来技術では検知モジュール209、210、211を含むHWモジュール部200bは、ICカードOS部402により制御されている。従って、HWモジュールの取扱を変更しようとするとそれに整合するようにICカードOS部402を変更する必要がある。更にアプリケーションが後で追加された場合、そのアプリケーションでHWモジュールを取り扱うことをICカードOS部402に規定して整合を図らなければならない。   As described above, in the conventional technique, the HW module unit 200b including the detection modules 209, 210, and 211 is controlled by the IC card OS unit 402. Therefore, if the handling of the HW module is to be changed, it is necessary to change the IC card OS unit 402 so as to match it. Further, when an application is added later, the IC card OS unit 402 must be regulated to handle the HW module with the application to achieve matching.

図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 IC card 101 is activated, the card reader / writer 102 transmits a command to the IC card 101. In step 701, the communication driver unit 501 receives received data including a command. In step 702, the communication driver unit 501 executes reception processing. The communication driver unit 501 extracts command data by interpreting the protocol included in the received data. The communication driver unit 501 converts the extracted command data into a format used by the IC card OS unit 502 and the application unit 503, and transmits the converted command data to the IC card OS unit 502 in step 703.

ステップ704において、ICカードOS部502は、受信したコマンドデータが起動しているアプリケーションが処理するコマンドかどうかを確認する。確認がOKの場合、ステップ705おいて、アプリケーション部503に受信したコマンドデータを送信する。従って、ICカードOS部502は、従来のようにコマンドデータを解釈してHWモジュールを制御する関数を指定する動作を実行しない。   In step 704, the IC card OS unit 502 confirms whether the received command data is a command to be processed by an activated application. If the confirmation is OK, the received command data is transmitted to the application unit 503 in step 705. Therefore, the IC card OS unit 502 does not execute an operation of interpreting command data and designating a function for controlling the HW module as in the conventional case.

ステップ706おいて、アプリケーション部503に所属するアプリケーションは、受信したコマンドにHWモジュールを制御する命令が含まれているかどうかを調べる。そのような命令が含まれていた場合は、ステップ707おいて、アプリケーションは、APIライブラリ部504に入力パラメータを送信する。この入力パラメータによってどのHWモジュールをどのように制御するかを指定することができる。例えば、APIライブラリ部504に検知回路から情報を取得するAPIが存在していた場合、電圧回路から電圧を取得したいときは、入力パラメータに01を設定して当該APIを起動する。クロック回路からクロック数を取得したいときは入力パラメータに02を設定して当該APIを起動する。   In step 706, the application belonging to the application unit 503 checks whether the received command includes an instruction for controlling the HW module. If such an instruction is included, in step 707, the application transmits the input parameter to the API library unit 504. It is possible to specify which HW module is controlled by this input parameter. For example, when there is an API for acquiring information from the detection circuit in the API library unit 504, when it is desired to acquire a voltage from the voltage circuit, the input parameter is set to 01 and the API is started. When it is desired to acquire the number of clocks from the clock circuit, the input parameter is set to 02 and the API is activated.

ステップ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 HW module unit 200b. Further, the processing result from the HW module unit 200b is received.

APIとHWモジュール部200bとの情報授受を具体的に説明する。例えば、電源電圧を検知する場合、ステップ709において、APIは、「現在発生している電圧が何ボルトであるかを検知せよ」との指示を表す入力パラメータをHWモジュール部200bに送信する。ステップ710において、HWモジュール部200bは、電源電圧を測定し、ステップ711において、測定した電源電圧値をAPIに送信する。   Information exchange between the API and the HW module unit 200b will be specifically described. For example, when the power supply voltage is detected, in step 709, the API transmits an input parameter indicating an instruction “detect how many volts the currently generated voltage is” to the HW module unit 200b. In step 710, the HW module unit 200b measures the power supply voltage, and in step 711, transmits the measured power supply voltage value to the API.

図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 HW module unit 200b. Note that the operation cutoff instruction described in each detection module in FIG. 8 is an instruction to enable the function of each detection module to block the operation of the IC card 101. For example, the clock detection module 210 has a function of stopping the operation of the IC card 101 when the number of clocks exceeds the range of 1 MHz to several MHz. The API can also instruct such an operation interruption.

ステップ712において、APIライブラリ部504に所属するAPIはアプリケーションに戻り値を送信する。APIは、電圧が正常に取得できたときは戻り値に電圧値を表すコードを設定し、正常に電圧が設定できなかったときはそのことを表すコードを戻り値に設定する。アプリケーションは、送信された戻り値に従って処理を進める。たとえば、電源電圧がソフトウェア実行上の制限となる状態であるかどうかを調べる場合、アプリケーションは、APIライブラリ部504に所属するAPIを介して電圧検知モジュール209を用いて検知した電圧値を取得し、ソフトウェアが実行可能かを判定する。アプリケーションは、処理結果に応じて別のAPIを呼び出して次の処理を実行させることもできるし、繰返しAPIを呼び出すこともできる。   In step 712, the API belonging to the API library unit 504 transmits a return value to the application. The API sets a code indicating the voltage value as a return value when the voltage can be normally acquired, and sets a code indicating that as a return value when the voltage cannot be normally set. The application proceeds with processing according to the returned return value. For example, when examining whether or not the power supply voltage is a state that is a restriction on software execution, the application acquires a voltage value detected using the voltage detection module 209 via an API belonging to the API library unit 504, and Determine if the software is executable. The application can call another API according to the processing result to execute the next processing, or can call the API repeatedly.

従来は図6で示したように、ICカードOS部502がHWモジュールを制御していた。しかし上述のように、アプリケーションがAPIを介してHWモジュールを制御するように構成することで、ICカード101は、より柔軟にHWモジュールを制御することができる。   Conventionally, as shown in FIG. 6, the IC card OS unit 502 controls the HW module. However, as described above, the IC card 101 can more flexibly control the HW module by configuring the application to control the HW module via the API.

例えば、カードリーダ/ライタ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 / writer 102 can supply to the IC card 101 are three levels of 5V, 3V, and 1.8V, and the card reader / writer 102 supplies 5V. The API returns a return value (= “0x03”). This return value (= “0x03”) means that all the HW modules can be executed under this voltage (= 5 V), and there is no restriction on the execution of software. As described above, the application can execute not only the voltage value currently supplied by the card reader / writer 102 but also all the HW modules mounted on the IC card 101 based on the acquired return value. You can also know.

またアプリケーションは、電源電圧が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 step 713, the application creates a command execution result and transmits it to the IC card OS unit 502. The command execution result includes a value acquired by the operation of the HW module, the result of whether the operation of the HW module is successful, or the like. In step 714, the IC card OS unit 502 creates response data by response processing, and transmits it to the communication driver unit 501 in step 715. In addition to the command execution result, the response data is appended with a status word defined by the IC card standard indicating whether or not the command processing is successful.

ステップ716において、通信ドライバ部501は、レスポンスデータ715にプロトコル情報などカードリーダ/ライタ102との通信に必要なプロトコル情報を付加して送信データを生成する。ステップ717において、通信ドライバ部501は、カードリーダ/ライタ102に対して送信処理を行う。   In step 716, the communication driver unit 501 generates transmission data by adding protocol information such as protocol information necessary for communication with the card reader / writer 102 to the response data 715. In step 717, the communication driver unit 501 performs transmission processing on the card reader / writer 102.

上述のように、アプリケーションはHWモジュールの測定値に基づいてICカード101が動作する環境を判断する。動作環境を判断するために用いられる物理量には、ICカード101周辺の温度、外部からICカード101に供給される電源電圧、クロック周波数などがある。また、アプリケーションは、この測定値によってHWモジュールの動作を制限する。動作制限を受けるHWモジュールには、暗号モジュール207、乱数生成モジュール208、内部クロックモジュール212などがある。   As described above, the application determines the environment in which the IC card 101 operates based on the measurement value of the HW module. The physical quantity used for determining the operating environment includes the temperature around the IC card 101, the power supply voltage supplied to the IC card 101 from the outside, the clock frequency, and the like. The application also restricts the operation of the HW module by this measured value. The HW modules subject to operation restrictions include an encryption module 207, a random number generation module 208, an internal clock module 212, and the like.

次に、アプリケーションが実施するコマンド処理は以下に説明するようにフレキシブルに構成することが可能である。アプリケーションは、供給されている電圧・クロック情報に基づいて、処理方法を柔軟に選択することができる。   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 SYMBOLS 101 ... IC card, 102 ... Reader / writer, 103 ... Terminal, 104 ... Keyboard, 105 ... Monitor, 106 ... Printer, 200 ... IC module, 200a ... Memory part, 200b ... Hardware module part, 201 ... Control element, 202 ... Data memory 203 ... Working memory 204 ... Program memory 205 ... Copro memory 206 ... Communication unit 207 ... Cryptographic module 208 ... Random number generating module 209 ... Voltage detection module 210 ... Clock detection module 211 ... Temperature detection module 212, an internal clock module, 501, a communication driver unit, 503, an application unit, and 504, an API library unit.

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.
前記ハードウェアモジュール部は、環境に関する情報を検知するモジュールとして、
外部から供給されるクロック周波数を検知するクロック検知モジュール、前記携帯可能電子装置の周辺温度を検知する温度検知モジュール、及び外部から供給される電源電圧を検知する電圧検知モジュールを備えたことを特徴とする請求項に記載の携帯可能電子装置。
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 .
前記ハードウェアモジュール部は、暗号の生成と解読を処理する暗号モジュール、及び乱数を生成する乱数生成モジュールを備え、
前記アプリケーション部は、前記環境に関する情報に基づいて前記暗号モジュール、及び乱数生成モジュールの動作可否、あるいはソフトウェアによる代替を選択して処理を実行することを特徴とする請求項に記載の携帯可能電子装置。
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部を介して前記内部クロックモジュールが発生するクロック周波数を減少させることを特徴とする請求項に記載の携帯可能電子装置。
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.
前記アプリケーション部は、ソースプログラムが高級言語であるソフトウェアで構成され、前記ソフトウェアは追加、削除可能であることを特徴とする請求項1乃至4の何れか1項に記載の携帯可能電子装置The application part is configured by software source program in a high level language, the software may add, portable electronic device according to any one of claims 1 to 4, characterized in that they can remove. 請求項1乃至5の内のいずれか1項に記載の各部を有するICモジュールと、
この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.
JP2010157174A 2010-07-09 2010-07-09 Portable electronic device and IC card Active JP5444143B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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