JP2019160191A - Portable electronic device and IC card - Google Patents

Portable electronic device and IC card Download PDF

Info

Publication number
JP2019160191A
JP2019160191A JP2018049680A JP2018049680A JP2019160191A JP 2019160191 A JP2019160191 A JP 2019160191A JP 2018049680 A JP2018049680 A JP 2018049680A JP 2018049680 A JP2018049680 A JP 2018049680A JP 2019160191 A JP2019160191 A JP 2019160191A
Authority
JP
Japan
Prior art keywords
command
data
control unit
storage unit
card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018049680A
Other languages
Japanese (ja)
Other versions
JP7020969B2 (en
Inventor
一成 畠中
Issei Hatanaka
一成 畠中
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
Toshiba Infrastructure Systems and Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Infrastructure Systems and Solutions 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, Toshiba Infrastructure Systems and Solutions Corp filed Critical Toshiba Corp
Priority to JP2018049680A priority Critical patent/JP7020969B2/en
Publication of JP2019160191A publication Critical patent/JP2019160191A/en
Application granted granted Critical
Publication of JP7020969B2 publication Critical patent/JP7020969B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

To provide a portable electronic device and an IC card with which it is possible to realize more appropriate control of access to specific data.SOLUTION: The portable electronic device of an embodiment comprises a storage unit, a state control unit, and an execution unit. The storage unit stores specific data in a specific data area. The state control unit manages a security state in memory that pertains to access to the specific data area in the storage unit. When a prescribed command for accessing the specific data is accepted, the execution unit determines whether or not the accepted prescribed command is executable, on the basis of the security state concerning the specific data area managed by the state control unit, and when determined as executable, executes the processing of the prescribed command. The state control unit initializes the security state when the processing of the prescribed command by the execution unit is terminated.SELECTED DRAWING: Figure 3

Description

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

近年、IC(Integrated Circuit)チップを内蔵したICカードなどの携帯可能電子装置が広く使用されている。従来の携帯可能電子装置では、外部装置から受信したコマンドに応じて、ICカードの記憶領域に記憶されたデータにアクセスを行っている。データに対するセキュリティステータスの更新は、VERIFYコマンド、EXTERNAL AUTHENTICATEコマンド等のセキュリティステータスを設定するコマンドに限られており、これらのコマンドによりセキュリティステータスが設定された後は、アプリケーションのリセットもしくは携帯可能電子装置の電源がオフ状態になるまでステータスが保持される。そのため、ステータスの継続中に不当にコマンドが実行され、ICカード内のデータにアクセスされる場合があった。   In recent years, portable electronic devices such as IC cards incorporating IC (Integrated Circuit) chips have been widely used. In a conventional portable electronic device, data stored in a storage area of an IC card is accessed in accordance with a command received from an external device. The update of the security status for data is limited to commands for setting the security status such as the VERIFY command and the EXTERNAL AUTHENTICATE command. After the security status is set by these commands, the application reset or the portable electronic device The status is maintained until the power is turned off. For this reason, there is a case where the command is illegally executed while the status is continued and the data in the IC card is accessed.

特開2013−196436号公報JP 2013-196436 A 特開2001−307043号公報JP 2001-307043 A 特開平11−306301号公報Japanese Patent Laid-Open No. 11-306301

本発明が解決しようとする課題は、特定のデータに対して、より適切なアクセス制御を実現することができる携帯可能電子装置、及びICカードを提供することである。   The problem to be solved by the present invention is to provide a portable electronic device and an IC card that can realize more appropriate access control for specific data.

実施形態の携帯可能電子装置は、記憶部と、状態制御部と、実行部とを持つ。記憶部は、特定のデータを所定のデータ領域に記憶する。状態制御部は、前記記憶部における前記所定のデータ領域へのアクセスに関するセキュリティ状態をメモリ上で管理する。実行部は、前記特定のデータにアクセスする所定のコマンドを受け付けた場合に、前記状態制御部により管理された前記所定のデータ領域に対するセキュリティ状態に基づいて、受け付けた所定のコマンドが実行可能であるか否かを判定し、実行可能であると判定された場合に、前記所定のコマンドの処理を実行する。また、状態制御部は、前記実行部により所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化する。   The portable electronic device according to the embodiment includes a storage unit, a state control unit, and an execution unit. The storage unit stores specific data in a predetermined data area. The state control unit manages a security state related to access to the predetermined data area in the storage unit on the memory. When the execution unit receives a predetermined command for accessing the specific data, the execution unit can execute the received predetermined command based on a security state for the predetermined data area managed by the state control unit. If it is determined that it can be executed, the predetermined command processing is executed. The state control unit initializes the security state when the execution unit finishes processing the predetermined command.

第1の実施形態のICカードの一例を示す外観図。1 is an external view showing an example of an IC card according to a first embodiment. 第1の実施形態のICカードのハードウェア構成例を示す図。1 is a diagram illustrating a hardware configuration example of an IC card according to a first embodiment. 第1の実施形態のICカードの機能構成例を示すブロック図。The block diagram which shows the function structural example of the IC card of 1st Embodiment. ファイル内に格納されているTLV形式のデータの一例を示す図。The figure which shows an example of the data of the TLV format stored in the file. 第1の実施形態の照合データ記憶部が記憶するデータ例を示す図。The figure which shows the example of data which the collation data memory | storage part of 1st Embodiment memorize | stores. 第1の実施形態のセキュリティステータス記憶部が記憶するデータ例を示す図。The figure which shows the example of data which the security status memory | storage part of 1st Embodiment memorize | stores. 第1の実施形態のアクセス権限記憶部が記憶するデータ例を示す図。The figure which shows the example of data which the access authority memory | storage part of 1st Embodiment memorize | stores. 第1の実施形態のICカード1のVERIFYコマンドの処理の一例を示すフローチャート。5 is a flowchart illustrating an example of processing of a VERIFY command of the IC card 1 according to the first embodiment. 第1の実施形態のICカードのCOMPAREコマンドの処理の一例を示すフローチャート。6 is a flowchart illustrating an example of processing of a COMPARE command of the IC card according to the first embodiment. 第2の実施形態のICカードの機能構成例を示すブロック図。The block diagram which shows the function structural example of the IC card of 2nd Embodiment. 第2の実施形態の回数制限付きアクセス権限記憶部が記憶するデータ例を示す図。The figure which shows the example of data which the access authority memory | storage part with number of times restrictions of 2nd Embodiment memorize | stores. 第2の実施形態のコマンド別実行カウンタ記憶部が記憶するデータ例を示す図。The figure which shows the example of data which the execution counter memory | storage part classified by command of 2nd Embodiment memorize | stores. 第2の実施形態のICカードのCOMPAREコマンドの処理の一例を示すフローチャート。9 is a flowchart illustrating an example of processing of a COMPARE command of an IC card according to a second embodiment.

以下、実施形態の携帯可能電子装置、及びICカードを、図面を参照して説明する。   Hereinafter, a portable electronic device and an IC card according to embodiments will be described with reference to the drawings.

(第1の実施形態)
図1は、第1の実施形態のICカード1の一例を示す外観図である。
図1に示すように、ICカード1は、ICモジュール10を備える。ICモジュール10は、コンタクト部3と、内部にICチップ100とを備える。
(First embodiment)
FIG. 1 is an external view showing an example of an IC card 1 according to the first embodiment.
As shown in FIG. 1, the IC card 1 includes an IC module 10. The IC module 10 includes a contact portion 3 and an IC chip 100 inside.

ICカード1は、例えば、プラスチックのカード基材PT(カード本体の一例)に、ICモジュール10を実装して形成されている。すなわち、ICカード1は、ICモジュール10と、ICモジュール10が埋め込まれたカード基材PTとを備える。また、ICカード1は、コンタクト部3を介して外部装置2と通信可能である。
なお、第1の実施形態では、携帯可能電子装置の一例として、ICカード1について説明する。
The IC card 1 is formed, for example, by mounting an IC module 10 on a plastic card base PT (an example of a card body). That is, the IC card 1 includes an IC module 10 and a card base PT in which the IC module 10 is embedded. Further, the IC card 1 can communicate with the external device 2 via the contact unit 3.
In the first embodiment, an IC card 1 will be described as an example of a portable electronic device.

ICカード1は、例えば、外部装置2が送信したコマンド(処理要求)を、コンタクト部3を介して受信し、受信したコマンドに応じた処理(コマンド処理)を実行する。そして、ICカード1は、コマンド処理の実行結果であるレスポンス(処理応答)を外部装置2にコンタクト部3を介して送信する。
ここで、外部装置2は、ICカード1と通信する装置であり、例えば、リーダ/ライタ装置を含む端末装置などである。
For example, the IC card 1 receives a command (processing request) transmitted from the external device 2 via the contact unit 3 and executes processing (command processing) according to the received command. Then, the IC card 1 transmits a response (processing response) that is an execution result of the command processing to the external device 2 via the contact unit 3.
Here, the external device 2 is a device that communicates with the IC card 1, and is, for example, a terminal device including a reader / writer device.

ICモジュール10は、コンタクト部3と、ICチップ100とを備え、例えば、テープ上にICモジュール10が複数配置されたCOT(Chip On Tape)などの形態で取引されるモジュールである。なお、テープから個片抜きして切り離した単体のICモジュール10をCOTという場合がある。   The IC module 10 includes a contact portion 3 and an IC chip 100, and is a module that is traded in a form such as COT (Chip On Tape) in which a plurality of IC modules 10 are arranged on a tape. Note that the single IC module 10 that has been cut out and separated from the tape may be referred to as COT.

コンタクト部3は、ICカード1が動作するために必要な各種信号の端子を有している。ここで、各種信号の端子は、電源電圧、クロック信号、リセット信号などを外部装置2から供給を受ける端子、及び、外部装置2と通信するためのシリアルデ―タ入出力端子(SIO端子)を有する。
ICチップ100は、例えば、1チップのマイクロプロセッサなどのLSI(Large Scale Integration)である。
The contact part 3 has terminals for various signals necessary for the operation of the IC card 1. Here, the terminals of various signals have a terminal for receiving a power supply voltage, a clock signal, a reset signal and the like from the external device 2 and a serial data input / output terminal (SIO terminal) for communicating with the external device 2 .
The IC chip 100 is, for example, an LSI (Large Scale Integration) such as a one-chip microprocessor.

次に、図2を参照して、第1の実施形態のICカード1のハードウェア構成について説明する。
図2は、第1の実施形態のICカード1のハードウェア構成例を示す図である。
図2に示すように、ICカード1は、コンタクト部3と、ICチップ100とを備えたICモジュール10を備えている。そして、ICチップ100は、UART(Universal Asynchronous Receiver Transmitter)4と、CPU5と、ROM(Read Only Memory)6と、RAM(Random Access Memory)7と、EEPROM(Electrically Erasable Programmable ROM)8とを備えている。また、各構成(4から8)は、内部バスBS1を介して接続されている。
Next, the hardware configuration of the IC card 1 according to the first embodiment will be described with reference to FIG.
FIG. 2 is a diagram illustrating a hardware configuration example of the IC card 1 according to the first embodiment.
As shown in FIG. 2, the IC card 1 includes an IC module 10 including a contact portion 3 and an IC chip 100. The IC chip 100 includes a UART (Universal Asynchronous Receiver Transmitter) 4, a CPU 5, a ROM (Read Only Memory) 6, a RAM (Random Access Memory) 7, and an EEPROM (Electrically Erasable Programmable ROM) 8. Yes. Each component (4 to 8) is connected via an internal bus BS1.

UART4は、上述したSIO端子を介して、外部装置2とシリアルデータ通信を行う。UART4は、SIO端子を介して受信したシリアルデータ信号をパラレル変換したデータ(例えば、1バイトのデータ)を内部バスBS1に出力する。また、UART4は、内部バスBS1を介して取得したデータをシリアル変換して、SIO端子を介して外部装置2に出力する。UART4は、例えば、SIO端子を介してコマンドを外部装置2から受信する。また、UART4は、SIO端子を介してレスポンスを外部装置2に送信する。   The UART 4 performs serial data communication with the external device 2 via the SIO terminal described above. The UART 4 outputs data (for example, 1-byte data) obtained by parallel-converting the serial data signal received via the SIO terminal to the internal bus BS1. The UART 4 serially converts the data acquired via the internal bus BS1 and outputs it to the external device 2 via the SIO terminal. For example, the UART 4 receives a command from the external device 2 via the SIO terminal. The UART 4 transmits a response to the external device 2 via the SIO terminal.

CPU5は、ROM6又はEEPROM8に記憶されているプログラムを実行して、ICカード1の各種処理を行う。CPU5は、例えば、コンタクト部3を介して、UART4が受信したコマンドに応じたコマンド処理を実行する。   The CPU 5 executes programs stored in the ROM 6 or the EEPROM 8 to perform various processes of the IC card 1. For example, the CPU 5 executes command processing according to the command received by the UART 4 via the contact unit 3.

ROM6は、例えば、マスクROMなどの不揮発性メモリであり、ICカード1の各種処理を実行するためのプログラム、及びコマンドテーブルなどのデータを記憶する。
RAM7は、例えば、SRAM(Static RAM)などの揮発性メモリであり、ICカード1の各種処理を行う際に利用されるデータを一時記憶する。
The ROM 6 is a non-volatile memory such as a mask ROM, for example, and stores a program for executing various processes of the IC card 1 and data such as a command table.
The RAM 7 is a volatile memory such as SRAM (Static RAM), for example, and temporarily stores data used when performing various processes of the IC card 1.

EEPROM8は、例えば、電気的に書き換え可能な不揮発性メモリである。EEPROM8は、ICカード1が利用する各種データを記憶する。EEPROM8は、例えば、ICカード1を利用した各種サービス(アプリケーション)に使用される情報を記憶する。   The EEPROM 8 is, for example, an electrically rewritable nonvolatile memory. The EEPROM 8 stores various data used by the IC card 1. The EEPROM 8 stores information used for various services (applications) using the IC card 1, for example.

次に、図3を参照して、第1の実施形態によるICカード1の機能構成例について説明する。
図3は、第1の実施形態のICカード1の機能構成例を示すブロック図である。
図3に示すように、ICカード1は、例えば、通信部40と、制御部50と、AP(アプリケーション)データ記憶部81と、ファイル管理情報記憶部82と、照合データ記憶部83と、セキュリティステータス記憶部71と、アクセス権限記憶部84と、を備える。
ここで、図3に示されるICカード1の各部は、図2に示されるICカード1のハードウェアを用いて実現される。
Next, a functional configuration example of the IC card 1 according to the first embodiment will be described with reference to FIG.
FIG. 3 is a block diagram illustrating a functional configuration example of the IC card 1 according to the first embodiment.
As shown in FIG. 3, the IC card 1 includes, for example, a communication unit 40, a control unit 50, an AP (application) data storage unit 81, a file management information storage unit 82, a collation data storage unit 83, a security A status storage unit 71 and an access authority storage unit 84 are provided.
Here, each part of the IC card 1 shown in FIG. 3 is realized by using the hardware of the IC card 1 shown in FIG.

通信部40は、例えば、UART4と、CPU5と、ROM6に記憶されているプログラムとにより実現され、コンタクト部3を介して、例えば、外部装置2との間でコマンド及びレスポンスの送受信を行う。すなわち、通信部40は、所定の処理を要求するコマンド(処理要求)を外部装置2から受信するとともに、コマンドに対するレスポンス(処理応答)を外部装置2に送信する。   The communication unit 40 is realized by, for example, the UART 4, the CPU 5, and a program stored in the ROM 6, and transmits and receives commands and responses to and from the external device 2 through the contact unit 3, for example. That is, the communication unit 40 receives a command (processing request) requesting a predetermined process from the external device 2 and transmits a response (processing response) to the command to the external device 2.

APデータ記憶部81(記憶部の一例)は、例えば、EEPROM8により構成された記憶部であり、アプリケーションデータを記憶する。APデータ記憶部81は、所定のデータ領域に、MF(Master File)、DF(Dedicated File)、EF(Elementary File)などのファイルが階層構造になって記憶されている。なお、EFは、識別情報(以下、EFID)によって識別可能に管理され、それぞれのEFには、例えば、図4に示すように、TLV形式(Tag-Length-value形式)のデータ(特定のデータ)が格納される。すなわち、APデータ記憶部81は、TLV形式のデータ(特定のデータの一例)を含むファイルを記憶する。   The AP data storage unit 81 (an example of a storage unit) is a storage unit configured by, for example, the EEPROM 8 and stores application data. The AP data storage unit 81 stores files such as MF (Master File), DF (Dedicated File), and EF (Elementary File) in a predetermined data area in a hierarchical structure. The EF is managed so as to be identifiable by identification information (hereinafter referred to as EFID), and each EF includes, for example, data (specific data) in TLV format (Tag-Length-value format) as shown in FIG. ) Is stored. That is, the AP data storage unit 81 stores a file including TLV format data (an example of specific data).

図4は、ファイル内に格納されているTLV形式のデータの一例を示す図である。
図4に示す例は、EF内に、複数のTLV形式のデータ(「データA」、「データB」、・・・)が格納されている例を示している。ここで、「Tag名」は、特定のデータのTagを識別する識別情報であり、「Len」は、特定のデータの長さを示している。また、「Value」には、特定のデータの内容(データ)が格納されている。
特定のデータ(「データA」、「データB」、・・・)には、例えば、「氏名」、「住所」、「生年月日」、「年齢」「電話番号」等の個人情報や、特定の権限者でなければアクセスできない情報、その他情報が含まれる。
各TLV形式のデータは、EFの先頭アドレスから「Len」に基づいて順次検索することにより、選択したいTLV形式のデータを選択することが可能である。したがって、例えば、VERIFYコマンドによりカード使用者の本人照合確認を行い、所定の認証が成立した後に、例えば、SELECT DATAコマンド等で「Tag名」を設定することで、Tag名に対応するValue(データ)を取得することができる。
FIG. 4 is a diagram illustrating an example of TLV format data stored in a file.
The example illustrated in FIG. 4 illustrates an example in which a plurality of TLV format data (“data A”, “data B”,...) Is stored in the EF. Here, “Tag name” is identification information for identifying the Tag of specific data, and “Len” indicates the length of specific data. Further, “Value” stores the contents (data) of specific data.
Specific data (“Data A”, “Data B”,...) Includes, for example, personal information such as “name”, “address”, “date of birth”, “age”, “phone number”, Information that can only be accessed by a specific authority and other information are included.
Each TLV format data can be selected based on “Len” from the start address of the EF, thereby selecting the TLV format data to be selected. Therefore, for example, after verifying the identity of the card user with the VERIFY command and establishing a predetermined authentication, for example, by setting “Tag name” with the SELECT DATA command or the like, the value (data) corresponding to the Tag name is set. ) Can be obtained.

図3の説明に戻り、ファイル管理情報記憶部82は、例えば、EEPROM8により構成された記憶部であり、上述した各種ファイルを管理する管理情報(例えば、ディレクトリ情報)を記憶する。ファイル管理情報記憶部82は、例えば、ファイル名、ファイルIDなどのファイル識別情報と、ファイルの先頭のアドレス(以下、ファイルの先頭アドレスという)とを対応付けて記憶する。ここで、ファイルの先頭アドレスは、例えば、EEPROM8の物理アドレスである。ICカード1において、各ファイルの選択、又は、各ファイルにアクセス処理を実行する場合には、ファイル管理情報記憶部82が記憶するファイル管理情報に基づいて、各ファイルの選択、又は、各ファイルにアクセス処理を実行する。ここで、アクセス処理とは、データの読み出し、書き込み、更新などの処理のことである。   Returning to the description of FIG. 3, the file management information storage unit 82 is, for example, a storage unit configured by the EEPROM 8, and stores management information (for example, directory information) for managing the various files described above. The file management information storage unit 82 stores, for example, file identification information such as a file name and file ID in association with the start address of the file (hereinafter referred to as the start address of the file). Here, the head address of the file is, for example, the physical address of the EEPROM 8. In the IC card 1, when selecting each file or executing an access process for each file, each file is selected or each file is selected based on the file management information stored in the file management information storage unit 82. Execute access processing. Here, the access processing refers to processing such as data reading, writing, and updating.

照合データ記憶部83は、例えば、EEPROM8により構成された記憶部であり、例えば、VERIFYコマンド等によって、EFIDごとに設定されるセキュリティステータス(セキュリティ状態)に関する情報を記憶する。ここで、図5を参照して、照合データ記憶部83が記憶するデータ例について説明する。   The collation data storage unit 83 is, for example, a storage unit configured by the EEPROM 8, and stores information related to a security status (security state) set for each EFID by, for example, a VERIFY command. Here, an example of data stored in the collation data storage unit 83 will be described with reference to FIG.

図5は、第1の実施形態の照合データ記憶部83が記憶するデータ例を示す図である。
図5に示すように、照合データ記憶部83は、は、EFIDと、照合データと、照合結果が設定される位置とを対応付けて記憶する。照合データとは、外部装置から受け付けたコマンドが、指定されたEFIDに対応するデータへアクセスするコマンドである場合に、コマンド実行部53が、コマンドによるデータへのアクセス可否を判定するためのデータである。照合データは、ICカード1の発行時に設定されていてもよく、ICカードの所有者が外部装置から任意に設定してもよい。照合結果が設定される位置とは、例えば、照合結果が設定されるセキュリティステータス情報の位置であり、それぞれをビットの値を用いて管理することができる。例えば、VERIFYコマンド等によって、指定されたEFIDに対する照合データが合致して認証が成立した場合に、セキュリティステータス記憶部71が記憶したデータの対応するビット位置に「1」に設定する。これにより、指定されたEFID内のデータにおいて、このセッション中に行われるSELECT DATAコマンドや、COMPAREコマンドによるデータのアクセスが許可される。なお、照合データ記憶部83は、例えば、APデータ記憶部81に設けられていてもよく、ファイル管理情報記憶部82に設けられてもよい。
FIG. 5 is a diagram illustrating an example of data stored in the collation data storage unit 83 according to the first embodiment.
As shown in FIG. 5, the collation data storage unit 83 stores EFID, collation data, and a position where a collation result is set in association with each other. The collation data is data for the command execution unit 53 to determine whether or not the command can access the data when the command received from the external device is a command for accessing data corresponding to the designated EFID. is there. The verification data may be set when the IC card 1 is issued, or the IC card owner may arbitrarily set it from an external device. The position where the collation result is set is, for example, the position of the security status information where the collation result is set, and each can be managed using a bit value. For example, when the verification data for the designated EFID is matched by the VERIFY command or the like and authentication is established, “1” is set to the corresponding bit position of the data stored in the security status storage unit 71. As a result, data access by the SELECT DATA command or COMPARE command performed during this session is permitted for the data in the designated EFID. The collation data storage unit 83 may be provided in the AP data storage unit 81 or the file management information storage unit 82, for example.

セキュリティステータス記憶部71は、例えば、RAM7により構成された記憶部であり、上述したファイル管理情報記憶部82により記憶されたデータごとのセキュリティステータスを記憶する。ここで、図6を参照して、セキュリティステータス記憶部71が記憶するデータ例について説明する。   The security status storage unit 71 is, for example, a storage unit configured by the RAM 7 and stores the security status for each data stored in the file management information storage unit 82 described above. Here, an example of data stored in the security status storage unit 71 will be described with reference to FIG.

図6は、第1の実施形態のセキュリティステータス記憶部71が記憶するデータ例を示す図である。
図6に示すように、セキュリティステータス記憶部71は、アクセス権限データ(例えば、ビットb1〜b8)と、セキュリティステータスとを対応付けて記憶する。アクセス権限データは、照合データ記憶部83が記憶した照合結果が設定される位置に対応する。例えば、セキュリティステータスが「ゼロ(0)」である場合には、セキュリティステータスが未設定またはセキュリティステータスがアクセスできない状態であることを示し、「1」である場合には、セキュリティステータスが設定済みまたは照合データ記憶部83に記憶されたEFIDに対応付けられたデータへのアクセスが可能であることを示している。
FIG. 6 is a diagram illustrating an example of data stored in the security status storage unit 71 according to the first embodiment.
As illustrated in FIG. 6, the security status storage unit 71 stores access authority data (for example, bits b1 to b8) and security status in association with each other. The access authority data corresponds to the position where the collation result stored in the collation data storage unit 83 is set. For example, when the security status is “zero (0)”, it indicates that the security status is not set or the security status is inaccessible, and when it is “1”, the security status is already set or This shows that access to data associated with the EFID stored in the verification data storage unit 83 is possible.

アクセス権限記憶部84は、例えば、EEPROM8により構成された記憶部であり、コマンドごとのアクセス権限と、外部装置からのコマンドを受け付けた場合に、そのコマンドによりデータをアクセスできるかの権限情報と、コマンド実行後のセキュリティステータスの内容を記憶する。ここで、図7を参照して、アクセス権限記憶部84が記憶するデータ例について説明する。   The access authority storage unit 84 is, for example, a storage unit configured by the EEPROM 8, and when receiving an access authority for each command and a command from an external device, authority information indicating whether data can be accessed by the command, Stores the contents of the security status after command execution. Here, an example of data stored in the access authority storage unit 84 will be described with reference to FIG.

図7は、第1の実施形態のアクセス権限記憶部84が記憶するデータ例を示す図である。
図7に示すように、アクセス権限記憶部84は、対象コマンドと、アクセス権限データと、コマンド実行後のセキュリティステータスとを対応付けて記憶する。対象コマンドは、コマンド実行部53で実行可能なコマンドであり、例えば、読み出し系(GET DATA)、設定系(PUT DATA)、参照系(COMPARE)、および変更系(WRITE)が含まれる。アクセス権限データは、例えば、上述したコマンドごとに割り当てられたデータへのアクセスの許可状態を管理するデータの位置に関する情報である。コマンド実行後のセキュリティステータスとは、例えば、コマンド実行後にセキュリティステータスを初期化(クリア)するか否かを示す情報である。
FIG. 7 is a diagram illustrating an example of data stored in the access authority storage unit 84 according to the first embodiment.
As shown in FIG. 7, the access authority storage unit 84 stores the target command, access authority data, and the security status after command execution in association with each other. The target command is a command that can be executed by the command execution unit 53, and includes, for example, a read system (GET DATA), a setting system (PUT DATA), a reference system (COMPARE), and a change system (WRITE). The access authority data is, for example, information on the position of data that manages the permission state of access to data assigned for each command described above. The security status after command execution is, for example, information indicating whether the security status is initialized (cleared) after command execution.

図7の例では、参照系(COMPARE)のコマンドの場合に、コマンド実行後のセキュリティステータスを初期化し、読み出し系(GET DATA)、設定系(PUT DATA)、または変更系(WRITE)のコマンドの場合に、コマンド実行後のセキュリティステータスを初期化しない。このように、アクセス権限記憶部84により対象コマンドごとに、コマンド実行後のセキュリティステータスを調整できるため、アプリケーションのリセットもしくはICカード1の電源がオフ状態になるまで待つ必要がなく、より適切にデータのアクセス制御を行うことができる。   In the example of FIG. 7, in the case of a command for a reference system (COMPARE), the security status after the command execution is initialized, and a command for a read system (GET DATA), a setting system (PUT DATA), or a change system (WRITE) is initialized. In this case, the security status after command execution is not initialized. As described above, since the security status after the command execution can be adjusted for each target command by the access authority storage unit 84, there is no need to wait until the application is reset or the IC card 1 is turned off. Access control can be performed.

再び、図3の説明に戻り、制御部50は、例えば、CPU5と、RAM7と、ROM6又はEEPROM8とにより実現され、ICカード1を統括的に制御する。制御部50は、例えば、ファイル管理部51と、セキュリティステータス制御部(状態制御部の一例)52と、コマンド実行部53とを備える。   Returning to the description of FIG. 3 again, the control unit 50 is realized by, for example, the CPU 5, the RAM 7, and the ROM 6 or the EEPROM 8, and comprehensively controls the IC card 1. The control unit 50 includes, for example, a file management unit 51, a security status control unit (an example of a state control unit) 52, and a command execution unit 53.

ファイル管理部51は、ファイル管理情報記憶部82が記憶する管理情報(例えば、ディレクトリ情報)に基づいて、APデータ記憶部81内のファイルを管理する。ファイル管理部51は、例えば、ファイルへのアクセス処理を実行する際に、ファイル管理情報記憶部82が記憶する管理情報を検索して、ファイルの記憶場所を特定する。   The file management unit 51 manages files in the AP data storage unit 81 based on management information (for example, directory information) stored in the file management information storage unit 82. For example, when executing file access processing, the file management unit 51 searches the management information stored in the file management information storage unit 82 and identifies the storage location of the file.

セキュリティステータス制御部52は、外部装置2からICカード1に送信されたコマンド(処理要求)に基づいて、コマンドのパラメータに含まれる照合データを用いて、照合データ記憶部83により記憶された照合データと照合し、照合結果に基づいて、セキュリティステータスを設定する。   Based on the command (processing request) transmitted from the external device 2 to the IC card 1, the security status control unit 52 uses the verification data included in the parameter of the command to store the verification data stored in the verification data storage unit 83. And set the security status based on the verification result.

また、セキュリティステータス制御部52は、コマンド実行部53によりコマンドが実行された場合に、セキュリティステータス記憶部71が記憶したセキュリティステータスを初期化する。具体的は、セキュリティステータス制御部52は、コマンド実行部53により実行されたコマンドが正常終了した場合に、セキュリティステータスを初期化する。初期化の一例としては、ビットを「0」にすることである。また、セキュリティステータス制御部52は、コマンド実行中にエラーが発生し、異常終了した場合に、セキュリティステータスを初期化してもよい。   The security status control unit 52 initializes the security status stored in the security status storage unit 71 when a command is executed by the command execution unit 53. Specifically, the security status control unit 52 initializes the security status when the command executed by the command execution unit 53 ends normally. An example of initialization is to set the bit to “0”. In addition, the security status control unit 52 may initialize the security status when an error occurs during command execution and the processing ends abnormally.

コマンド実行部(実行部の一例)53は、外部装置2からICカード1に送信されたコマンド(処理要求)に応じて、各種コマンドの処理(コマンド処理)を実行する。コマンド実行部53は、例えば、通信部40を介して外部装置2から受信したコマンドに応じて、コマンド処理を実行する。また、コマンド実行部53は、コマンド処理の結果であるレスポンスを、通信部40を介して外部装置2に送信する。   The command execution unit (an example of an execution unit) 53 executes various command processing (command processing) in response to a command (processing request) transmitted from the external device 2 to the IC card 1. The command execution unit 53 executes command processing according to a command received from the external device 2 via the communication unit 40, for example. Further, the command execution unit 53 transmits a response that is a result of the command processing to the external device 2 via the communication unit 40.

また、コマンド実行部53は、外部装置2から受信したコマンドが、特定のデータに対する特定の処理要求(特定のコマンド)であるか否かを判定し、特定のコマンドである場合のセキュリティステータスの内容に基づいて、実行の可否を判定する。特定の処理要求とは、例えば、特定のデータとの間で比較結果を取得するCOMPAREコマンドや、特定のデータ(例えば、EF内のTag名)を指定してアクセスするアクセス処理コマンドなどである。また、アクセス処理コマンドとは、例えば、データの書き込み、読み出し、及び、更新などのアクセス処理を実行するコマンドである。   Further, the command execution unit 53 determines whether or not the command received from the external device 2 is a specific processing request (specific command) for specific data, and the contents of the security status when the command is a specific command Based on the above, it is determined whether or not execution is possible. The specific processing request is, for example, a COMPARE command for obtaining a comparison result with specific data, an access processing command for specifying and accessing specific data (for example, Tag name in EF), or the like. The access processing command is a command for executing access processing such as data writing, reading, and updating.

また、コマンド実行部53は、例えば、外部装置2から特定のデータに対するアクセス処理要求(アクセス処理コマンド)を受信した場合に、選択(取得)した特定のデータに対応する先頭アドレスに基づいて、特定のデータにアクセスする処理を実行する。   For example, when the command execution unit 53 receives an access processing request (access processing command) for specific data from the external device 2, the command execution unit 53 specifies based on the start address corresponding to the selected (acquired) specific data. Execute the process to access the data.

次に、図面を参照して、第1の実施形態のICカード1の動作について説明する。なお、以下の処理では、最初に本人確認等の認証処理を行うVERIFYコマンドの処理を中心に説明し、その後、特定のコマンドの一例として、COMPAREコマンドを使用する例を中心に説明するものとする。   Next, the operation of the IC card 1 of the first embodiment will be described with reference to the drawings. In the following processing, the processing of the VERIFY command that performs authentication processing such as identity verification will be mainly described first, and then an example of using the COMPARE command as an example of a specific command will be described. .

図8は、第1の実施形態のICカード1のVERIFYコマンドの処理の一例を示すフローチャートである。
図8に示すように、外部装置2とICカード1とがコンタクト部3を介して接続され、ICカード1がアクティブ(電源供給時)な状態において、コマンド実行部53は、ICカード1がコマンドを受信すると(ステップS100)、受信したコマンドがVERIFYコマンドであるか否かを判定する(ステップS102)。受信したコマンドがVERIFYコマンドコマンドである場合(ステップS102;YES)、コマンド実行部53は、処理をステップS104に進める。また、受信したコマンドがVERIFYコマンドではない場合(ステップS102;NO)、処理をステップS114に進める。
FIG. 8 is a flowchart illustrating an example of processing of the VERIFY command of the IC card 1 according to the first embodiment.
As shown in FIG. 8, in a state where the external device 2 and the IC card 1 are connected via the contact unit 3 and the IC card 1 is active (when power is supplied), the command execution unit 53 Is received (step S100), it is determined whether or not the received command is a VERIFY command (step S102). When the received command is a VERIFY command command (step S102; YES), the command execution unit 53 advances the process to step S104. If the received command is not a VERIFY command (step S102; NO), the process proceeds to step S114.

ステップS104の処理において、コマンド実行部53は、VERIFYコマンドのパラメータが正当なデータか否かを判定する(ステップS104)。VERIFYコマンドのパラメータとは、例えば、ICカード1のカード使用者を認証するパスワードであるPIN(Personal Identification Number)等や照合データ、参照先のデータ等の情報である。例えば、コマンド実行部53は、パラメータのデータの属性(例えば、文字列型、整数型)やデータの内容が、予め設定された条件を満たす場合に正当なデータであると判定し、条件を満たさない場合に正当なデータではないと判定する。また、コマンド実行部53は、例えば、パラメータで指定する参照先のデータが見つからない場合に、正当なデータでないと判定してもよい。コマンド実行部53は、パラメータが正当なデータであると判定した場合(ステップS104;YES)に、処理をステップS106に進め、正当なデータでないと判定した場合(ステップS104;NO)、処理をステップS116に進める。   In the process of step S104, the command execution unit 53 determines whether or not the parameter of the VERIFY command is valid data (step S104). The parameter of the VERIFY command is, for example, information such as a PIN (Personal Identification Number) that is a password for authenticating the card user of the IC card 1, collation data, reference destination data, and the like. For example, the command execution unit 53 determines that the parameter data attribute (for example, character string type, integer type) and data content are valid data when the preset condition is satisfied, and satisfies the condition. If not, it is determined that the data is not valid. For example, the command execution unit 53 may determine that the data is not valid when the reference data specified by the parameter is not found. If the command execution unit 53 determines that the parameter is valid data (step S104; YES), the process proceeds to step S106. If the command execution unit 53 determines that the parameter is not valid data (step S104; NO), the process proceeds to step S106. Proceed to S116.

ステップS106の処理において、コマンド実行部53は、パラメータで指定された対象EF(EFID)に基づいて、照合データ記憶部83のEFIDに対応付けられたデータを選択し(ステップS106)、処理をステップS108に進める。   In the process of step S106, the command execution unit 53 selects data associated with the EFID in the collation data storage unit 83 based on the target EF (EFID) specified by the parameter (step S106), and the process is stepped. Proceed to S108.

ステップS108の処理において、コマンド実行部53は、対象EFの照合データと、コマンドで入力されたPINデータとが合致するか否かを判定する(ステップS108)。コマンド実行部53は、照合データとPINデータとが合致する場合(ステップS108;YES)、処理をステップS110に進め、合致しない場合(ステップS108;NO)、処理をステップS118に進める。   In the process of step S108, the command execution unit 53 determines whether the collation data of the target EF matches the PIN data input by the command (step S108). If the collation data and the PIN data match (step S108; YES), the command execution unit 53 advances the process to step S110. If the match does not match (step S108; NO), the command execution unit 53 advances the process to step S118.

ステップS110の処理において、セキュリティステータス制御部52は、EFIDに対応付けられたセキュリティステータスの位置を取得し、取得した位置にアクセスを許可状態にする値をセットする(ステップS110)。図6に示すセキュリティステータス記憶部71のデータにおいて、b3に「1」が設定されているのは、EFIDが「0003」の照合が成功し、アクセスが許可状態になっていることを意味している。次に、コマンド実行部53は、正常終了を意味するステータスワードを外部装置2に送信する(ステップS112)。   In the process of step S110, the security status control unit 52 acquires the position of the security status associated with the EFID, and sets a value for permitting access to the acquired position (step S110). In the data of the security status storage unit 71 shown in FIG. 6, “1” is set in b3, which means that the collation with the EFID “0003” is successful and the access is permitted. Yes. Next, the command execution unit 53 transmits a status word indicating normal termination to the external device 2 (step S112).

ステップS114の処理において、コマンド実行部53は、VERIFコマンド以外のコマンドに対応する処理を実行する(ステップS114)。   In the process of step S114, the command execution unit 53 executes a process corresponding to a command other than the VERIF command (step S114).

ステップS116の処理において、コマンド実行部53は、パラメータの異常を意味するステータスワードを外部装置2に送信する(ステップS116)。   In the process of step S116, the command execution unit 53 transmits a status word indicating parameter abnormality to the external device 2 (step S116).

ステップS118の処理において、コマンド実行部53は、合致していないことを意味するステータスワードを外部装置2に送信する(ステップS118)。これにより、本フローチャートの処理は、終了する。   In the process of step S118, the command execution unit 53 transmits a status word indicating that they do not match to the external device 2 (step S118). Thereby, the process of this flowchart is complete | finished.

図9は、第1の実施形態のICカード1のCOMPAREコマンドの処理の一例を示すフローチャートである。なお、図9の処理は、コマンドが受信されるごとに繰り返し実行されてよい。   FIG. 9 is a flowchart illustrating an example of processing of the COMPARE command of the IC card 1 according to the first embodiment. Note that the process of FIG. 9 may be repeatedly executed every time a command is received.

図9に示すように、外部装置2とICカード1とがコンタクト部3を介して接続され、ICカード1がアクティブ(電源供給時)な状態において、コマンド実行部53は、ICカード1がコマンドを受信すると(ステップS200)、受信したコマンドがCOMPAREコマンドであるか否かを判定する(ステップS202)。コマンド実行部53は、受信したコマンドがCOMPAREコマンドである場合(ステップS202;YES)に、処理をステップS204に進め、受信したコマンドがCOMPAREコマンドではない場合(ステップS202;NO)に、処理をステップS220に進める。   As shown in FIG. 9, when the external device 2 and the IC card 1 are connected via the contact unit 3 and the IC card 1 is active (when power is supplied), the command execution unit 53 Is received (step S200), it is determined whether or not the received command is a COMPARE command (step S202). If the received command is a COMPARE command (step S202; YES), the command execution unit 53 advances the process to step S204. If the received command is not a COMPARE command (step S202; NO), the command execution unit 53 performs the process. Proceed to S220.

ステップS204の処理において、コマンド実行部53は、COMPAREコマンドのパラメータが正当なデータか否かを判定する(ステップS204)。COMPAREコマンドのパラメータとは、例えば、比較する2つのデータ(変数)に関する情報や、対象データのバイト長、比較結果等である。パラメータが正当であるか否かの判定は、例えば、パラメータとして設定された比較対象の2つのデータの属性等を用いて行うことができる。例えば、コマンド実行部53は、パラメータとして設定された比較対象の2つのデータの一方が整数型であり、他方が文字列型である場合に、お互いの属性が異なるため、正当なデータではないと判定する。また、コマンド実行部53は、比較対象の2つのデータの双方が整数型である場合に、パラメータが正当であると判定する。コマンド実行部53は、COMPAREコマンドのパラメータが正当なデータであると判定した場合(ステップS204;YES)に、処理をステップS206に進め、正当なデータでないと判定した場合(ステップS204;NO)に、処理をステップS216に進める。   In the process of step S204, the command execution unit 53 determines whether the parameter of the COMPARE command is valid data (step S204). The parameters of the COMPARE command are, for example, information on two data (variables) to be compared, the byte length of the target data, the comparison result, and the like. The determination as to whether the parameter is valid can be made using, for example, the attributes of the two comparison target data set as parameters. For example, when one of the two comparison target data set as parameters is an integer type and the other is a character string type, the command execution unit 53 is not valid data because the attributes are different from each other. judge. Further, the command execution unit 53 determines that the parameter is valid when both of the two comparison target data are integer types. When it is determined that the parameter of the COMPARE command is valid data (step S204; YES), the command execution unit 53 advances the processing to step S206, and when it is determined that the parameter is not valid data (step S204; NO). Then, the process proceeds to step S216.

ステップS206の処理において、コマンド実行部53は、パラメータで指定された対象EFを選択し(ステップS206)、COMPAREコマンドに対応するセキュリティステータスが設定されているか否かを判定する(ステップS208)。具体的は、コマンド実行部53は、受信したコマンドに基づいて、図7に示すアクセス権限記憶部84のデータを参照し、受信したコマンドと合致する対象コマンドに対応付けられたアクセス権限データに基づいて、コマンドに対応するセキュリティステータスが設定済み(アクセス許可状態)であるか否かを判定する。例えば、図6および図7の例において、セキュリティステータス記憶部71のデータにおいて、COMPAREコマンドに対応するデータ「b3」のセキュリティステータスが「1」になっているため、セキュリティステータスは、設定済みであると判定される。コマンド実行部53は、コマンドに対応するセキュリティステータスが設定済みであると判定した場合(ステップS208;YES)、処理をステップS210に進め、セキュリティステータスが設定済でないと判定した場合(ステップS208;NO)、処理をステップS214に進める。   In the process of step S206, the command execution unit 53 selects the target EF specified by the parameter (step S206), and determines whether the security status corresponding to the COMPARE command is set (step S208). Specifically, the command execution unit 53 refers to the data in the access authority storage unit 84 shown in FIG. 7 based on the received command, and based on the access authority data associated with the target command that matches the received command. Then, it is determined whether or not the security status corresponding to the command is already set (access permission state). For example, in the example of FIGS. 6 and 7, the security status of the data “b3” corresponding to the COMPARE command is “1” in the data of the security status storage unit 71, so the security status is already set. It is determined. If the command execution unit 53 determines that the security status corresponding to the command has been set (step S208; YES), the command execution unit 53 proceeds to step S210, and determines that the security status has not been set (step S208; NO). ), And the process proceeds to step S214.

ステップS210の処理において、コマンド実行部53は、対象EFの参照されるデータと、COMPAREコマンドのパラメータで入力された比較データとを比較し(ステップS210)、比較結果と正常終了を意味するステータスワードを外部装置2に送信して(ステップS212)、処理をステップS218に進める。   In the process of step S210, the command execution unit 53 compares the data referred to by the target EF with the comparison data input by the parameter of the COMPARE command (step S210), and the status word indicating the comparison result and normal termination Is transmitted to the external device 2 (step S212), and the process proceeds to step S218.

また、ステップS214の処理において、セキュリティステータス制御部52は、セキュリティステータスが設定されていないことを意味するステータスワードを外部装置2に送信し(ステップS214)、処理をステップS218に進める。   In step S214, the security status control unit 52 transmits a status word indicating that the security status is not set to the external apparatus 2 (step S214), and the process proceeds to step S218.

また、ステップS216の処理において、コマンド実行部53は、パラメータの異常を意味するステータスワードを送信し(ステップS216)、処理をステップS218に進める。   Further, in the process of step S216, the command execution unit 53 transmits a status word indicating parameter abnormality (step S216), and the process proceeds to step S218.

ステップS218の処理において、セキュリティステータス制御部52は、セキュリティステータス記憶部71のデータのセキュリティステータスを初期化する(ステップS218)。具体的には、セキュリティステータス制御部52は、VARIFYコマンドにより設定されたビットb3の値を「1」から「0」に初期化する。これにより、COMPAREコマンドが正常終了または異常終了の何れの場合にもセキュリティステータスがコマンド実行後に初期化されることになる。なお、セキュリティステータス制御部52は、正常終了または異常終了した直後のタイミングでセキュリティステータスを初期化してもよく、またコマンドの実行が終了してから所定時間経過後に初期化してもよい。また、セキュリティステータス制御部52は、2回目のCOMPAREコマンドを受信したタイミングでセキュリティステータスを初期化してもよい。これらのタイミングは、例えば、セキュリティステータス制御部52によって、コマンドが実行される対象のデータの種類等に基づいて可変に設定されてよい。   In the process of step S218, the security status control unit 52 initializes the security status of the data in the security status storage unit 71 (step S218). Specifically, the security status control unit 52 initializes the value of the bit b3 set by the VARIFY command from “1” to “0”. As a result, the security status is initialized after the command execution regardless of whether the COMPARE command ends normally or abnormally. The security status control unit 52 may initialize the security status at a timing immediately after normal termination or abnormal termination, or may initialize it after a predetermined time elapses after the command execution is completed. Further, the security status control unit 52 may initialize the security status at the timing when the second COMPARE command is received. These timings may be variably set based on, for example, the type of data on which the command is executed by the security status control unit 52.

また、ステップS220の処理において、コマンド実行部53は、COMPAREコマンド以外のコマンドに対する処理を実行する(ステップS220)。これにより、本フローチャートの処理は、終了する。   In the process of step S220, the command execution unit 53 executes a process for a command other than the COMPARE command (step S220). Thereby, the process of this flowchart is complete | finished.

上述したように第1の実施形態によれば、ICカード1(携帯可能電子装置)は、特定のデータに対して、より適切なアクセス制御を実現することができる。具体的には、第1の実施形態によれば、セキュリティステータスが確立(セッションが確立)した後(アクセス許可状態に設定された後)に、特定のコマンドの実行された場合に、コマンドが正常終了した場合または異常終了した場合の何れの場合にも、セッションの終了、アプリケーションのリセット、もしくはICカード1の電源がオフ状態になるまで待つ必要がなく、セキュリティステータスをクリアすることができる。したがって、例えば、あるサービス業者などが、カード所持者の年齢確認として、何歳以上(若しくは以下)であるかを判定する場合に、COMPAREコマンドのパラメータによって、比較対象を20歳、21歳、22歳、…と順次変えながら繰り返し実行することで、何歳以上かという情報だけでなく、何歳であるかまで不当に特定されてしまうことを抑制することができる。   As described above, according to the first embodiment, the IC card 1 (portable electronic device) can realize more appropriate access control for specific data. Specifically, according to the first embodiment, when a specific command is executed after a security status is established (session is established) (after being set to an access-permitted state), the command is normal. In either case of termination or abnormal termination, it is not necessary to wait until the session is terminated, the application is reset, or the power of the IC card 1 is turned off, and the security status can be cleared. Therefore, for example, when a certain service provider determines how old (or below) the card holder's age is, the comparison target is set to 20 years old, 21 years old, 22 according to the parameters of the COMPARE command. By repeatedly executing while sequentially changing the age,..., It is possible to suppress not being unjustly specified not only about how old but also how old.

なお、第1の実施形態においては、COMPAREコマンドが正常終了した場合または異常終了した場合の何れの場合にも、セキュリティステータス情報を初期化する例について説明したが、これに限定されず、正常終了した場合に、セキュリティステータスを初期化してもよい。これにより、上述したようにCOMPAREコマンドが繰り返し実行されることを抑制することができる。また、パラメータが正当ではなく異常終了した場合には、繰り返しても異常終了が繰り返されるだけであり、パラメータを変えて正常終了となった場合には、その時点で初期化されるため、正常終了を繰り返すような処理は実行されないことになる。   In the first embodiment, an example has been described in which the security status information is initialized when the COMPARE command is normally terminated or abnormally terminated. However, the present invention is not limited to this, and the normal termination is performed. In such a case, the security status may be initialized. As a result, it is possible to prevent the COMPARE command from being repeatedly executed as described above. Also, if the parameter is not valid and ends abnormally, it will only repeat abnormally even if it is repeated. If the parameter is changed and it ends normally, it will be initialized at that time, so it ends normally. Processing that repeats the above is not executed.

また、第1の実施形態において、セキュリティステータス制御部52は、例えば、ICカード1へのアクセス者の権限情報に基づいて、セキュリティステータスを制御してもよい。この場合、セキュリティステータス制御部52は、例えば、アクセス者が管理者レベルまたは所有者レベルの権限である場合に、データに格納された全ての情報へのアクセスを許可状態にしたり、コマンドの繰り返し使用を許可する。これにより、セキュリティステータス制御部52は、アクセス者に応じて、より適切なアクセス制御を行うことができる。   In the first embodiment, the security status control unit 52 may control the security status based on, for example, authority information of an accessor to the IC card 1. In this case, the security status control unit 52, for example, permits access to all information stored in the data when the accessor has administrator level or owner level authority, or repeatedly uses the command. Allow. Thereby, the security status control unit 52 can perform more appropriate access control according to the accessor.

(第2の実施形態)
次に、図面を参照して、第2の実施形態によるICカード1aについて説明する。図10は、第2の実施形態のICカード1aの機能構成例を示すブロック図である。
図10に示すように、ICカード1aは、例えば、通信部40と、制御部50と、APデータ記憶部81と、ファイル管理情報記憶部82と、照合データ記憶部83と、セキュリティステータス記憶部71と、回数制限付きアクセス権限記憶部85と、コマンド別実行カウンタ記憶部72とを備える。
(Second Embodiment)
Next, an IC card 1a according to the second embodiment will be described with reference to the drawings. FIG. 10 is a block diagram illustrating a functional configuration example of the IC card 1a according to the second embodiment.
As shown in FIG. 10, the IC card 1a includes, for example, a communication unit 40, a control unit 50, an AP data storage unit 81, a file management information storage unit 82, a collation data storage unit 83, and a security status storage unit. 71, an access authority storage unit 85 with a limited number of times, and a command-specific execution counter storage unit 72.

なお、第2の実施形態によるICカード1aの外観及びハードウェア構成は、図1及び図2に示す第1の実施形態と同様であるので、ここではその説明を省略する。また、図10において、図3に示す構成と同一の構成については同一の符号を付し、その説明を省略する。また、図10に示されるICカード1aの各部は、図2に示されるICカード1のハードウェアを用いて実現される。   Note that the external appearance and hardware configuration of the IC card 1a according to the second embodiment are the same as those of the first embodiment shown in FIGS. 1 and 2, and the description thereof is omitted here. In FIG. 10, the same components as those shown in FIG. 3 are denoted by the same reference numerals, and the description thereof is omitted. Each part of the IC card 1a shown in FIG. 10 is realized by using the hardware of the IC card 1 shown in FIG.

第2の実施形態では、第1の実施形態のICカード1に比して、セキュリティステータス制御部52およびアクセス権限記憶部84に代えて、セキュリティステータス制御部52aと、回数制限付きアクセス権限記憶部85と、コマンド別実行カウンタ記憶部72とを備える点が異なる。したがって、以下では、主にセキュリティステータス制御部52a、回数制限付きアクセス権限記憶部85、およびコマンド別実行カウンタ記憶部72を中心に説明する。   In the second embodiment, as compared with the IC card 1 of the first embodiment, instead of the security status control unit 52 and the access authority storage unit 84, a security status control unit 52a and an access authority storage unit with a limited number of times are provided. 85 and the command-specific execution counter storage unit 72 are different. Therefore, the following description will mainly focus on the security status control unit 52a, the access authority storage unit 85 with a limited number of times, and the command-specific execution counter storage unit 72.

回数制限付きアクセス権限記憶部85は、例えば、EEPROM8により構成された記憶部である。回数制限付きアクセス権限記憶部85は、対象コマンドと、アクセス権限データと、コマンド実行回数制限値と、コマンド実行後のセキュリティステータスとを対応付けて記憶する。ここで、図11を参照して、回数制限付きアクセス権限記憶部85が記憶するデータ例について説明する。   The access authority storage unit 85 with a limited number of times is, for example, a storage unit configured by the EEPROM 8. The access authority storage unit 85 with a limited number of times stores a target command, access authority data, a command execution number limit value, and a security status after command execution in association with each other. Here, with reference to FIG. 11, an example of data stored in the access authority storage unit 85 with limited number of times will be described.

図11は、第2の実施形態の回数制限付きアクセス権限記憶部85が記憶するデータ例を示す図である。
図11に示すように、回数制限付きアクセス権限記憶部85は、例えば、対象コマンドと、アクセス可否条件と、コマンド実行回数制限値と、コマンド実行後のセキュリティステータスとを対応付けた情報を記憶する。回数制限付きアクセス権限記憶部85のデータは、第1の実施形態のアクセス権限記憶部84のデータと比較して、コマンドを実行する回数を制限するコマンド実行回数制限値が追加されている。図11の例において、参照系(COMPARE)のコマンド実行回数制限値には、所定回数として「3」が設定されている。これは、外部装置2から連続して3回までCOMPAREコマンドを許可することを示している。
なお、コマンド実行回数制限値は、ICカード1aの発行時に設定されていてもよく、特定の外部装置(例えば、管理者端末)からの指示情報により、管理者等が任意のタイミングで実行回数を設定してもよい。
FIG. 11 is a diagram illustrating an example of data stored in the access authority storage unit 85 with limited number of times according to the second embodiment.
As illustrated in FIG. 11, the access authority storage unit 85 with limited number of times stores, for example, information in which a target command, an access permission condition, a command execution number limit value, and a security status after command execution are associated with each other. . Compared with the data in the access authority storage unit 84 of the first embodiment, the data in the access authority storage unit 85 with a limited number of times is added with a command execution frequency limit value that limits the number of times the command is executed. In the example of FIG. 11, “3” is set as the predetermined number in the command execution number limit value of the reference system (COMPARE). This indicates that the COMPARE command is permitted from the external device 2 up to three times continuously.
The command execution frequency limit value may be set when the IC card 1a is issued, and the administrator or the like can execute the execution frequency at an arbitrary timing according to instruction information from a specific external device (for example, an administrator terminal). It may be set.

コマンド別実行カウンタ記憶部72は、例えば、RAM7により構成された記憶部であり、コマンドごとのコマンド実行可能回数を記憶する。ここで、図12を参照して、セキュリティステータス記憶部71が記憶するデータ例について説明する。   The command-specific execution counter storage unit 72 is a storage unit configured by the RAM 7, for example, and stores the command executable count for each command. Here, an example of data stored in the security status storage unit 71 will be described with reference to FIG.

図12は、第2の実施形態のコマンド別実行カウンタ記憶部72が記憶するデータ例を示す図である。
図12に示すように、コマンド別実行カウンタ記憶部72は、コマンド名と、コマンド実行可能回数[回]とを対応付けて記憶する。コマンド実行可能回数は、回数制限付きアクセス権限記憶部85のコマンド実行回数制限値から得られる値である。コマンド実行可能回数は、コマンド実行部53によりコマンドを実行するごとに、セキュリティステータス制御部52aによって、実行されたコマンドの実行可能回数がデクリメントされる。
FIG. 12 is a diagram illustrating an example of data stored in the command-specific execution counter storage unit 72 according to the second embodiment.
As illustrated in FIG. 12, the command-specific execution counter storage unit 72 stores the command name and the command executable count [times] in association with each other. The command executable count is a value obtained from the command execution count limit value in the access authority storage unit 85 with limited count. The number of times the command can be executed is decremented by the security status control unit 52a every time the command is executed by the command execution unit 53.

セキュリティステータス制御部52aは、外部装置2からコマンドの入力を受け付けた場合に、コマンド別実行カウンタ記憶部72のコマンド実行可能回数を参照し、設定された範囲内でコマンド実行部53によるコマンドの繰り返しの実行を許可する。   When the security status control unit 52a receives an input of a command from the external device 2, the security status control unit 52a refers to the command executable count in the command-specific execution counter storage unit 72, and repeats the command by the command execution unit 53 within the set range. Allow execution.

次に、図面を参照して、第2の実施形態のICカード1aの動作について説明する。なお、第2の実施形態におけるVERIFYコマンドの処理は、第1の実施形態と同様であるため、主にCOMPAREコマンドを使用する例を中心に説明するものとする。図13は、第2の実施形態のICカード1aのCOMPAREコマンドの処理の一例を示すフローチャートである。なお、図13の処理は、コマンドが受信されるごとに繰り返し実行されてよい。   Next, the operation of the IC card 1a of the second embodiment will be described with reference to the drawings. Note that the processing of the VERIFY command in the second embodiment is the same as that in the first embodiment, and therefore, an explanation will be made mainly on an example in which the COMPARE command is mainly used. FIG. 13 is a flowchart illustrating an example of a COMPARE command process of the IC card 1a according to the second embodiment. Note that the process of FIG. 13 may be repeatedly executed every time a command is received.

図13の例において、ステップS300〜S308の処理は、図9に示すステップS200〜S208の処理と同様であるため、ここでの説明を省略する。コマンドに対応するセキュリティステータスが設定済みである場合(ステップS308;YES)、ステップS310の処理において、セキュリティステータス制御部52aは、コマンド別実行カウンタ記憶部72のコマンド実行可能回数を参照し、コマンド実行可能回数が1以上か否かを判定する(ステップS310)。ステップS310の処理において、コマンド実行可能回数が設定されていない場合、セキュリティステータス制御部52aは、回数制限付きアクセス権限記憶部85のコマンド実行回数制限値を取得し、取得した値をコマンド実行可能回数に設定する。また、回数制限付きアクセス権限記憶部85のコマンド実行回数制限値にも回数が設定されていない場合、セキュリティステータス制御部52aは、コマンド実行可能回数を固定値(例えば、1回)に設定してもよい。セキュリティステータス制御部52aは、コマンド実行可能回数が1以上である場合に、処理をステップS312に進め、コマンド実行可能回数が0である場合に、処理をステップS320に進める。   In the example of FIG. 13, the processing of steps S300 to S308 is the same as the processing of steps S200 to S208 shown in FIG. When the security status corresponding to the command has been set (step S308; YES), in the process of step S310, the security status control unit 52a refers to the command executable count in the command-specific execution counter storage unit 72 and executes the command. It is determined whether the possible number is 1 or more (step S310). In the process of step S310, when the command executable count is not set, the security status control unit 52a acquires the command execution count limit value of the access authority storage unit 85 with a limited count, and uses the acquired value as the command executable count. Set to. If the command execution frequency limit value in the access authority storage unit 85 with limited number of times is not set, the security status control unit 52a sets the command executable number to a fixed value (for example, once). Also good. The security status control unit 52a advances the process to step S312 when the command executable count is 1 or more, and advances the process to step S320 when the command executable count is 0.

ステップS312の処理において、コマンド実行部53は、対象EFの参照されるデータと、コマンドで入力された比較データを比較し(ステップS312)、比較結果と正常終了を意味するステータスワードを外部装置2に送信する(ステップS314)。次に、セキュリティステータス制御部52aは、コマンド実行可能回数をデクリメントし(ステップS316)、処理をステップS318に進める。   In the process of step S312, the command execution unit 53 compares the data referred to by the target EF with the comparison data input by the command (step S312), and sends the comparison result and a status word indicating normal termination to the external device 2. (Step S314). Next, the security status control unit 52a decrements the command executable count (step S316), and advances the processing to step S318.

ステップS318の処理において、コマンド実行部53は、例えば、同一のセッション内で次のコマンドを受信したか否かを判定する(ステップS318)。コマンド実行部53は、次のコマンドを受信したと判定した場合に(ステップS318;YES)、ステップS302の処理に戻り、次のコマンドを受信していないと判定した場合に(ステップS318;NO)、処理をステップS326の処理に進める。   In the process of step S318, for example, the command execution unit 53 determines whether or not the next command has been received in the same session (step S318). When it is determined that the next command has been received (step S318; YES), the command execution unit 53 returns to the process of step S302, and when it is determined that the next command has not been received (step S318; NO). Then, the process proceeds to the process of step S326.

また、ステップS320の処理において、セキュリティステータス制御部52aは、実行可能回数を超えたため、コマンドの実行が不可能であることを意味するステータスワードを外部装置2に送信し(ステップS320)、処理をステップS326に進める。   In step S320, the security status control unit 52a transmits a status word indicating that the command cannot be executed because the number of executions has been exceeded (step S320). The process proceeds to step S326.

また、ステップS308の処理において、コマンドに対応するセキュリティステータスが設定済みでない場合(ステップS308;NO)、セキュリティステータス制御部52aは、セキュリティステータスが設定されていないことを意味するステータスワードを外部装置2に送信し(ステップS322)、処理をステップS326に進める。   If the security status corresponding to the command has not been set in the process of step S308 (step S308; NO), the security status control unit 52a sends a status word indicating that the security status is not set to the external device 2. (Step S322), and the process proceeds to step S326.

また、ステップS304の処理において、パラメータが正当なデータでないと判定された場合(ステップS304;NO)、コマンド実行部53は、パラメータの異常を意味するステータスワードを送信し(ステップS324)、処理をステップS326に進める。   If it is determined in step S304 that the parameter is not valid data (step S304; NO), the command execution unit 53 transmits a status word indicating a parameter abnormality (step S324), and performs the process. The process proceeds to step S326.

ステップS326の処理において、セキュリティステータス制御部52aは、コマンド別実行カウンタ記憶部72のコマンド名(COMPARE)のコマンド実行可能回数を「0」に初期化し(ステップS326)、セキュリティステータスを「0」に初期化する(ステップS328)。ステップS328の処理は、ステップS218の処理と同様である。   In the process of step S326, the security status control unit 52a initializes the command executable count of the command name (COMPARE) in the command-specific execution counter storage unit 72 to “0” (step S326), and sets the security status to “0”. Initialization is performed (step S328). The process of step S328 is the same as the process of step S218.

また、ステップS302の処理において、COMPAREコマンドでない場合(ステップS302;NO)、コマンド実行部53は、COMPAREコマンド以外のコマンドに対する処理を実行する(ステップS330)。これにより、本フローチャートの処理は、終了する。   If the command is not a COMPARE command in step S302 (step S302; NO), the command execution unit 53 executes processing for a command other than the COMPARE command (step S330). Thereby, the process of this flowchart is complete | finished.

上述したように第2の実施形態によれば、ICカード1a(携帯可能電子装置)は、第1の実施形態におけるICカード1と同様の効果を奏する他、特定のコマンドに対する複数回の実行を許容することができる。したがって、第2の実施形態によれば、例えば、あるサービス業者などが、20歳から40歳までの年齢を対象にサービスを提供するような場合に、ICカード1aに記憶された「年齢」に対し、「20歳以上であるか」と、「40歳以下であるか」の2回のCOMPAREコマンド実行を行うことができるため、より複雑な年齢制限の認証を行うことができる。したがって、特定のデータに対して、より適切なアクセス制御を実現することができる。   As described above, according to the second embodiment, the IC card 1a (portable electronic device) has the same effect as the IC card 1 in the first embodiment, and executes a plurality of times for a specific command. Can be tolerated. Therefore, according to the second embodiment, for example, when a certain service provider provides a service for ages from 20 to 40 years old, the “age” stored in the IC card 1a is set to “age”. On the other hand, since the COMPARE command can be executed twice: “Is it over 20 years old” or “Is it under 40 years old?”, More complicated age restriction authentication can be performed. Therefore, more appropriate access control can be realized for specific data.

上記の各実施形態において、特定のコマンドの一例として、COMPAREコマンドを用いたが、特定のコマンドは、COMPAREコマンドおよびアクセス処理コマンドの何れか一方でもよい。また、アクセス処理コマンドは、ICカード1(1a)が有するアクセス処理コマンドのうちの一部のコマンドであってもよい。また、上記の各実施形態では、アクセスするデータの対象をEF内のデータとしたが、例えば、他の領域(例えば、DF)にアクセス可能なコマンドを用いる場合には、そのコマンドの実行に対して、上述したようにセキュリティステータスの制御を行うことができる。   In each of the above embodiments, the COMPARE command is used as an example of the specific command. However, the specific command may be either the COMPARE command or the access processing command. The access processing command may be a part of the access processing commands that the IC card 1 (1a) has. In each of the above embodiments, the data to be accessed is the data in the EF. For example, when a command that can access another area (for example, DF) is used, Thus, the security status can be controlled as described above.

また、上記の各実施形態において、ICカード1(1a)は、コンタクト部3を介して外部装置2と通信する例を説明したが、コイルなどを用いたコンタクトレスインターフェースを介して外部装置2と通信するように構成してもよい。   In each of the above embodiments, the IC card 1 (1a) has been described as communicating with the external device 2 via the contact unit 3. However, the IC card 1 (1a) communicates with the external device 2 via a contactless interface using a coil or the like. You may comprise so that it may communicate.

また、上記の各実施形態において、ICカード1(1a)は、書き換え可能な不揮発性メモリとして、EEPROM8を備える構成としたが、これに限定されるものではない。
例えば、ICカード1(1a)は、EEPROM8の代わりに、フラッシュメモリ、FeRAM(Ferroelectric Random Access Memory:強誘電体メモリ)などを備えてもよい。
In each of the above embodiments, the IC card 1 (1a) is configured to include the EEPROM 8 as a rewritable nonvolatile memory, but the present invention is not limited to this.
For example, the IC card 1 (1a) may include a flash memory, a FeRAM (Ferroelectric Random Access Memory), etc. instead of the EEPROM 8.

また、上記の各実施形態において、携帯可能電子装置の一例として、ICカード1(1a)を用いる例を説明したが、これに限定されるものではない。携帯可能電子装置は、例えば、カード形状ではないICタグなどの電子装置であってもよい。   In each of the above-described embodiments, the example in which the IC card 1 (1a) is used as an example of the portable electronic device has been described. However, the present invention is not limited to this. The portable electronic device may be, for example, an electronic device such as an IC tag that is not a card shape.

以上説明した少なくともひとつの実施形態によれば、特定のデータを所定のデータ領域に記憶するAPデータ記憶部81と、APデータ記憶部81における所定のデータ領域へのアクセスに関するセキュリティ状態をメモリ上で管理するセキュリティステータス制御部52と、特定のデータにアクセスするコマンドを受け付けた場合に、セキュリティステータス制御部52により管理された所定のデータ領域に対するセキュリティ状態に基づいて、受け付けたコマンドが実行可能であるか否かを判定し、実行可能であると判定された場合に、コマンドの処理を実行するコマンド実行部53と、を持ち、セキュリティステータス制御部52は、コマンド実行部53により所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化することにより、特定のデータに対して、より適切なアクセス制御を実現することができる。   According to at least one embodiment described above, the AP data storage unit 81 that stores specific data in a predetermined data area, and the security status regarding access to the predetermined data area in the AP data storage unit 81 are stored in the memory. When a security status control unit 52 to be managed and a command to access specific data are received, the received command can be executed based on the security state for a predetermined data area managed by the security status control unit 52. A command execution unit 53 that executes command processing when it is determined that the command can be executed. The security status control unit 52 performs processing of a predetermined command by the command execution unit 53. Initialize the security state when The Rukoto can for a particular data, to achieve a more appropriate access control.

上記実施形態は、以下のように表現することができる。
特定のデータを所定のデータ領域に記憶する記憶部と、
前記記憶部に記憶されたプログラムを実行するハードウェアプロセッサと、を備え、
前記記憶部には、前記ハードウェアプロセッサに、
前記記憶部における前記所定のデータ領域へのアクセスに関するセキュリティ状態をメモリ上で管理し、
前記特定のデータにアクセスする所定のコマンドを受け付けた場合に、管理された前記所定のデータ領域に対するセキュリティ状態に基づいて、受け付けた所定のコマンドが実行可能であるか否かを判定し、
実行可能であると判定された場合に、前記所定のコマンドの処理を実行し、
前記所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化する処理
を実行させる前記プログラムが格納されている、携帯可能電子装置。
The above embodiment can be expressed as follows.
A storage unit for storing specific data in a predetermined data area;
A hardware processor for executing a program stored in the storage unit,
In the storage unit, the hardware processor,
Managing on the memory a security state relating to access to the predetermined data area in the storage unit;
When a predetermined command for accessing the specific data is received, it is determined whether or not the received predetermined command is executable based on a security state for the predetermined data area managed;
If it is determined that the command can be executed, the predetermined command processing is executed,
A portable electronic device in which the program for executing processing for initializing the security state when processing of the predetermined command is completed is stored.

なお、実施形態におけるICカード1(1a)が備える各構成の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述したICカード1(1a)が備える各構成における処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。
In addition, the program for realizing the function of each component included in the IC card 1 (1a) in the embodiment is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system, By executing, the processing in each configuration included in the IC card 1 (1a) described above may be performed. Here, “loading and executing a program recorded on a recording medium into a computer system” includes installing the program in the computer system. The “computer system” here includes an OS and hardware such as peripheral devices.
The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.

1,1a…ICカード、2…外部装置、3…コンタクト部、4…UART、5…CPU、6…ROM、7…RAM、8…EEPROM、10‥ICモジュール、40…通信部、50…制御部、51…ファイル管理部、52,52a…セキュリティステータス制御部、53…コマンド実行部、71…セキュリティステータス記憶部、72…コマンド別実行カウンタ記憶部、81…APデータ記憶部、82…ファイル管理情報記憶部、83…照合データ記憶部、84…アクセス権限記憶部、85…回数制限付きアクセス権限記憶部、100…ICチップ、BS1…内部バス、PT…カード基材   DESCRIPTION OF SYMBOLS 1, 1a ... IC card, 2 ... External device, 3 ... Contact part, 4 ... UART, 5 ... CPU, 6 ... ROM, 7 ... RAM, 8 ... EEPROM, 10 ... IC module, 40 ... Communication part, 50 ... Control , 51 ... File management part, 52, 52a ... Security status control part, 53 ... Command execution part, 71 ... Security status storage part, 72 ... Command-specific execution counter storage part, 81 ... AP data storage part, 82 ... File management Information storage unit, 83 ... collation data storage unit, 84 ... access authority storage unit, 85 ... access authority storage unit with limited number of times, 100 ... IC chip, BS1 ... internal bus, PT ... card substrate

Claims (8)

特定のデータを所定のデータ領域に記憶する記憶部と、
前記記憶部における前記所定のデータ領域へのアクセスに関するセキュリティ状態をメモリ上で管理する状態制御部と、
前記特定のデータにアクセスする所定のコマンドを受け付けた場合に、前記状態制御部により管理された前記所定のデータ領域に対するセキュリティ状態に基づいて、受け付けた所定のコマンドが実行可能であるか否かを判定し、実行可能であると判定された場合に、前記所定のコマンドの処理を実行する実行部と、を備え、
前記状態制御部は、前記実行部により所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化する、
携帯可能電子装置。
A storage unit for storing specific data in a predetermined data area;
A state control unit that manages on a memory a security state related to access to the predetermined data area in the storage unit;
Whether or not the received predetermined command can be executed based on the security state for the predetermined data area managed by the state control unit when a predetermined command for accessing the specific data is received. And an execution unit that executes processing of the predetermined command when it is determined that the determination is executable,
The state control unit initializes the security state when processing of a predetermined command is completed by the execution unit.
Portable electronic device.
前記状態制御部は、前記所定のコマンドを受け付ける前に、所定の認証が成立した場合に、前記所定のデータ領域へのセキュリティ状態をアクセス許可状態にする、
請求項1に記載の携帯可能電子装置。
The state control unit sets the security state to the predetermined data area to an access-permitted state when predetermined authentication is established before receiving the predetermined command;
The portable electronic device according to claim 1.
前記状態制御部は、前記所定のデータ領域に対するアクセス権限に基づいて、前記実行部による前記所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化するか否かを判定する、
請求項1または2に記載の携帯可能電子装置。
The state control unit determines whether or not to initialize the security state when processing of the predetermined command by the execution unit is completed based on an access right to the predetermined data area;
The portable electronic device according to claim 1 or 2.
前記セキュリティ状態は、前記所定のコマンドと、前記所定のデータ領域に対するアクセス権限とに対応付けられた状態である、
請求項1から3のうち何れか1項に記載の携帯可能電子装置。
The security state is a state associated with the predetermined command and an access right to the predetermined data area.
The portable electronic device according to any one of claims 1 to 3.
前記状態制御部は、前記実行部による前記所定のコマンドの処理が、正常終了したタイミングまたは異常終了したタイミングに基づいて、前記セキュリティ状態を初期化する、
請求項1から4のうち何れか1項に記載の携帯可能電子装置。
The state control unit initializes the security state based on a timing at which the processing of the predetermined command by the execution unit is normally terminated or abnormally terminated.
The portable electronic device according to any one of claims 1 to 4.
前記状態制御部は、前記実行部により前記所定のコマンドの処理が所定回数実行された場合に、前記セキュリティ状態を初期化する、
請求項1から5のうち何れか1項に記載の携帯可能電子装置。
The state control unit initializes the security state when processing of the predetermined command is executed a predetermined number of times by the execution unit.
The portable electronic device according to any one of claims 1 to 5.
前記状態制御部は、外部からの指示情報に基づいて、前記所定回数を設定する、
請求項6に記載の携帯可能電子装置。
The state control unit sets the predetermined number of times based on external instruction information.
The portable electronic device according to claim 6.
特定のデータを所定のデータ領域に記憶する記憶部と、
前記記憶部における前記所定のデータ領域へのアクセスに関するセキュリティ状態をメモリ上で管理する状態制御部と、
前記特定のデータにアクセスするコマンドを受け付けた場合に、前記状態制御部により管理された前記所定のデータ領域に対するセキュリティ状態に基づいて、受け付けたコマンドが実行可能であるか否かを判定し、実行可能であると判定された場合に、前記所定のコマンドの処理を実行する実行部と、を備えるICモジュールと、
前記ICモジュールが埋め込まれたカード本体と、
を備え、
前記状態制御部は、前記実行部により所定のコマンドの処理が終了した場合に、前記セキュリティ状態を初期化する、
ICカード。
A storage unit for storing specific data in a predetermined data area;
A state control unit that manages on a memory a security state related to access to the predetermined data area in the storage unit;
When a command for accessing the specific data is received, it is determined whether or not the received command can be executed based on a security state for the predetermined data area managed by the state control unit, and executed. An IC module comprising: an execution unit that executes processing of the predetermined command when it is determined that it is possible;
A card body in which the IC module is embedded;
With
The state control unit initializes the security state when processing of a predetermined command is completed by the execution unit.
IC card.
JP2018049680A 2018-03-16 2018-03-16 Portable electronic devices and IC cards Active JP7020969B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018049680A JP7020969B2 (en) 2018-03-16 2018-03-16 Portable electronic devices and IC cards

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018049680A JP7020969B2 (en) 2018-03-16 2018-03-16 Portable electronic devices and IC cards

Publications (2)

Publication Number Publication Date
JP2019160191A true JP2019160191A (en) 2019-09-19
JP7020969B2 JP7020969B2 (en) 2022-02-16

Family

ID=67995223

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018049680A Active JP7020969B2 (en) 2018-03-16 2018-03-16 Portable electronic devices and IC cards

Country Status (1)

Country Link
JP (1) JP7020969B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022107893A (en) * 2021-01-12 2022-07-25 大日本印刷株式会社 Secure device, command execution management method and IC chip
US11741035B2 (en) 2021-02-25 2023-08-29 Seiko Epson Corporation Circuit device and electronic apparatus

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844805A (en) * 1994-08-01 1996-02-16 Fujitsu Ltd Security managing method for card type storage medium, card type storage medium and transaction device for card type storage medium
JPH09171545A (en) * 1995-12-20 1997-06-30 Fujitsu Ltd Ic card, ic card reader/writer, host device for ic card reader/writer, ic card system and multivender dealing method in ic card system
JP2001097652A (en) * 1999-09-28 2001-04-10 Taisei Corp Structure of elevator
JP2002024790A (en) * 2000-07-05 2002-01-25 Toshiba Corp Information processing system, portable electronic device, and key changing method
JP2007257542A (en) * 2006-03-24 2007-10-04 Toshiba Corp Composite portable electronic device and composite ic card
JP2008310595A (en) * 2007-06-14 2008-12-25 Toshiba Corp Portable electronic equipment and control method for portable electronic equipment
JP2010186386A (en) * 2009-02-13 2010-08-26 Oki Semiconductor Co Ltd Processor
JP2012141754A (en) * 2010-12-28 2012-07-26 Dainippon Printing Co Ltd Ic chip, processing method in ic chip, processing program for ic chip, and portable terminal
JP2013196436A (en) * 2012-03-21 2013-09-30 Toshiba Corp Ic card, portable electronic device and ic card control method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0844805A (en) * 1994-08-01 1996-02-16 Fujitsu Ltd Security managing method for card type storage medium, card type storage medium and transaction device for card type storage medium
JPH09171545A (en) * 1995-12-20 1997-06-30 Fujitsu Ltd Ic card, ic card reader/writer, host device for ic card reader/writer, ic card system and multivender dealing method in ic card system
JP2001097652A (en) * 1999-09-28 2001-04-10 Taisei Corp Structure of elevator
JP2002024790A (en) * 2000-07-05 2002-01-25 Toshiba Corp Information processing system, portable electronic device, and key changing method
JP2007257542A (en) * 2006-03-24 2007-10-04 Toshiba Corp Composite portable electronic device and composite ic card
JP2008310595A (en) * 2007-06-14 2008-12-25 Toshiba Corp Portable electronic equipment and control method for portable electronic equipment
JP2010186386A (en) * 2009-02-13 2010-08-26 Oki Semiconductor Co Ltd Processor
JP2012141754A (en) * 2010-12-28 2012-07-26 Dainippon Printing Co Ltd Ic chip, processing method in ic chip, processing program for ic chip, and portable terminal
JP2013196436A (en) * 2012-03-21 2013-09-30 Toshiba Corp Ic card, portable electronic device and ic card control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022107893A (en) * 2021-01-12 2022-07-25 大日本印刷株式会社 Secure device, command execution management method and IC chip
JP7380603B2 (en) 2021-01-12 2023-11-15 大日本印刷株式会社 Secure device, command execution management method, and IC chip
US11741035B2 (en) 2021-02-25 2023-08-29 Seiko Epson Corporation Circuit device and electronic apparatus

Also Published As

Publication number Publication date
JP7020969B2 (en) 2022-02-16

Similar Documents

Publication Publication Date Title
US8286883B2 (en) System and method for updating read-only memory in smart card memory modules
US7775423B2 (en) Portable electronic device and control method of portable electronic device
US9418224B2 (en) Portable electronic device and control method of portable electronic device
US9183400B2 (en) IC card and IC card control method
JP7105540B2 (en) IC card and IC card control method
JPH0440587A (en) Portable electronic equipment
US20090184799A1 (en) Information storage medium and information storage medium processing apparatus
JP7020969B2 (en) Portable electronic devices and IC cards
US9779347B2 (en) Smart card and portable electronic apparatus
JP4993114B2 (en) Shared management method for portable storage device and portable storage device
JP6499052B2 (en) IC card, IC module, and program
JP2005011147A (en) Ic card and ic card program
JP3017736B2 (en) Portable electronic devices
JP2005049957A (en) Ic card and ic card system
US20200057732A1 (en) Ic card and method of controlling ic card
JP7487837B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, KEY DATA STORAGE METHOD, AND PROGRAM
JP6505893B2 (en) Portable electronic devices
JP4533665B2 (en) Portable electronic device
JPH03224047A (en) Portable electronic device
JP2001202487A (en) Portable electronic device and key collation method
US10068168B2 (en) IC card and IC module
KR20050068920A (en) Usb flash driver and its controlling method
JP6396124B2 (en) IC card, IC module, and IC card issuing method
JP2019192094A (en) Ic card and personal authentication method of ic card
JPH03224083A (en) Portable electronic device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210713

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210909

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: 20220104

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220203

R150 Certificate of patent or registration of utility model

Ref document number: 7020969

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150