JP4618259B2 - Data storage device and data storage method - Google Patents

Data storage device and data storage method Download PDF

Info

Publication number
JP4618259B2
JP4618259B2 JP2007036471A JP2007036471A JP4618259B2 JP 4618259 B2 JP4618259 B2 JP 4618259B2 JP 2007036471 A JP2007036471 A JP 2007036471A JP 2007036471 A JP2007036471 A JP 2007036471A JP 4618259 B2 JP4618259 B2 JP 4618259B2
Authority
JP
Japan
Prior art keywords
area
key
service
data storage
authentication
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.)
Expired - Lifetime
Application number
JP2007036471A
Other languages
Japanese (ja)
Other versions
JP2007133913A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2007036471A priority Critical patent/JP4618259B2/en
Publication of JP2007133913A publication Critical patent/JP2007133913A/en
Application granted granted Critical
Publication of JP4618259B2 publication Critical patent/JP4618259B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

本発明は、データ記憶装置およびデータ記憶方法に関し、例えば、1のIC(Integrated Circuit)カードを利用して、複数の管理者がサービスを提供する場合などにおいて、ICカードに対するフレキシブルでセキュリティの高いアクセス制御を行うことができるようにするデータ記憶装置およびデータ記憶方法に関する。   The present invention relates to a data storage device and a data storage method. For example, when a plurality of managers provide services by using one IC (Integrated Circuit) card, the flexible and high-security access to the IC card is provided. The present invention relates to a data storage device and a data storage method capable of performing control.

例えば、電子マネーシステムやセキュリティシステムなどでの利用が期待されているICカード(スマートカード)が開発されている。   For example, IC cards (smart cards) that are expected to be used in electronic money systems and security systems have been developed.

ICカードは、各種処理を行うCPU(Central Processing Unit)や、処理に必要なデータなどを記憶するメモリを内蔵しており、所定のリーダ/ライタ(R/W)に電気的に接触させた状態で、または電磁波を利用して非接触で、データの送受信が行われる。なお、R/Wとの間で、電磁波を利用して非接触でデータの送受信を行うICカードには、一般に、その電磁波により、必要な電力が供給される。   The IC card has a CPU (Central Processing Unit) for performing various processes and a memory for storing data necessary for the process, and is in a state of being in electrical contact with a predetermined reader / writer (R / W) Data is transmitted and received in a non-contact manner using electromagnetic waves. In general, necessary power is supplied to an IC card that transmits and receives data without contact with an R / W by using electromagnetic waves.

例えば、ISO(International Organization for Standardizaion)7816では、接触式のICカードの標準が規定されており、これによれば、例えば、データを格納するEF(Elementary File)(いわゆるファイルに相当する)と、EFおよびDF(Dedicated File)(いわゆるディレクトリ(フォルダ)に相当する)を格納するDFとによるデータの管理が可能となっている。従って、あるDFを親の階層として、その子の階層のDFを設けることで、階層構造によるデータの管理が可能である。   For example, ISO (International Organization for Standardizaion) 7816 defines a standard for contact IC cards. According to this standard, for example, an EF (Elementary File) for storing data (which corresponds to a so-called file), Data can be managed by the DF storing EF and DF (Dedicated File) (corresponding to a so-called directory (folder)). Therefore, by providing a certain DF as a parent hierarchy and a DF of its child hierarchy, data management by a hierarchical structure is possible.

ところで、ICカードを、電子マネーシステムやセキュリティシステムなどで利用する場合においては、データの隠匿性や、ICカードの偽造を防止すること等のセキュリティが重要であり、例えば、ISO7816では、DFに鍵をかけることで、そのDFの階層に属するDFおよびEFへのアクセスが制限される。即ち、ISO7816では、あるDFにアクセスするには、そのDFに至るまでのパス上の上位階層(親の階層)のDFすべてのキーを知っている必要がある。   By the way, when using an IC card in an electronic money system, a security system, etc., security such as data concealment and prevention of forgery of the IC card is important. , Access to the DF and EF belonging to the DF hierarchy is restricted. That is, in ISO7816, in order to access a certain DF, it is necessary to know the keys of all DFs in the upper hierarchy (parent hierarchy) on the path leading to the DF.

このため、例えば、ある管理者が、親の管理者として、自身に割り当てられたリソースの一部を、その子の管理者となる、他の管理者に分け与え、親の管理者が管理するDFの中に、子の管理者が管理するDFをつくると、子の管理者が、自身のDFにアクセスするには、その親の階層のDF、即ち、親の管理者のDFにアクセスするためのキーを知る必要があり、セキュリティ上の問題が生じることになる。   For this reason, for example, a certain administrator, as a parent manager, shares a part of the resources allocated to himself / herself with other managers who are the child managers, and manages the DF managed by the parent manager. When the child administrator creates a DF managed by the child administrator, the child administrator accesses the parent DF of the parent hierarchy, that is, the DF of the parent administrator. You need to know the key, which creates a security problem.

本発明は、このような状況に鑑みてなされたものであり、データに対するフレキシブルでセキュリティの高いアクセス制御を行うことができるようにするものである。   The present invention has been made in view of such a situation, and makes it possible to perform flexible and high-security access control for data.

請求項1に記載のデータ記憶装置は、データ記憶手段の記憶領域を階層構造にして管理する管理手段と、データ記憶手段の記憶領域の各階層に対する階層キーを記憶する階層キー記憶手段と、データが記憶された記憶領域に対するデータ記憶領域キーを記憶するデータ記憶領域キー記憶手段と、前記記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である記憶領域の階層よりも上の階層に対する階層キーまたはアクセス対象である記憶領域に対するデータ記憶領域キーを予め決められた順序で用いた暗号化により得られる認証キーを生成する生成手段と、生成された認証キーを用いて第1の認証処理を実行る認証処理実行手段とを備える。 The data storage device according to claim 1, comprising: a management unit that manages the storage area of the data storage unit in a hierarchical structure; a hierarchical key storage unit that stores a hierarchical key for each hierarchy of the storage area of the data storage unit; For data storage area key storage means for storing a data storage area key for the storage area in which is stored, and for generating information for generating one or more authentication keys used for authentication for accessing the storage area, Generating means for generating an authentication key obtained by encryption using a hierarchy key for a hierarchy above the hierarchy of the storage area to be accessed or a data storage area key for the storage area to be accessed in a predetermined order ; , and an authentication process execution means that perform first authentication process using the generated authentication key.

請求項12に記載のデータ記憶方法は、生成手段が、記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である記憶領域の階層よりも上の階層に対する階層キーまたはアクセス対象である記憶領域に対するデータ記憶領域キーを予め決められた順序で用いた暗号化により得られる認証キーを生成する生成ステップと、認証処理実行手段が、生成された認証キーを用いて第1の認証処理を実行る認証処理実行ステップとを含む。 The data storage method according to claim 12, wherein the generation unit has a hierarchy of a storage area to be accessed with respect to generation information for generating one or more authentication keys used for authentication for accessing the storage area. A generation step for generating an authentication key obtained by encryption using a hierarchy key for a higher hierarchy or a data storage area key for a storage area to be accessed in a predetermined order; and an authentication processing execution means have been and a authentication process executed steps to run the first authentication process using the authentication key.

請求項1に記載のデータ記憶装置においては、管理手段は、データ記憶手段の記憶領域を階層構造にして管理し、階層キー記憶手段は、データ記憶手段の記憶領域の各階層に対する階層キーを記憶するようになされている。データ記憶領域キー記憶手段は、データが記憶された記憶領域に対するデータ記憶領域キーを記憶し、生成手段は、記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である記憶領域の階層よりも上の階層に対する階層キーまたはアクセス対象である記憶領域に対するデータ記憶領域キーを予め決められた順序で用いた暗号化により得られる認証キーを生成するようになされている。認証手段は、生成された認証キーを用いて第1の認証処理を実行るようになされている。 In the data storage device according to claim 1, the management means manages the storage area of the data storage means in a hierarchical structure, and the hierarchical key storage means stores a hierarchical key for each hierarchy of the storage area of the data storage means. It is made to do. The data storage area key storage means stores a data storage area key for the storage area in which the data is stored, and the generation means is for generating one or more authentication keys used for authentication for accessing the storage area An authentication key obtained by encryption using a hierarchy key for a hierarchy above the hierarchy of the storage area to be accessed or a data storage area key for the storage area to be accessed in a predetermined order. Has been made to generate. Authentication means is adapted to so that to perform a first authentication process using the generated authentication key.

請求項12に記載のデータ記憶方法においては、生成手段が、記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である記憶領域の階層よりも上の階層に対する階層キーまたはアクセス対象である記憶領域に対するデータ記憶領域キーを予め決められた順序で用いた暗号化により得られる認証キーを生成し、認証処理実行手段が、生成された認証キーを用いて第1の認証処理を実行るようになされている。 In the data storage method according to claim 12, the generation unit generates information for generating one or more authentication keys used for authentication for accessing the storage area. An authentication key obtained by encryption using a hierarchy key for a hierarchy above the hierarchy or a data storage area key for a storage area to be accessed in a predetermined order is generated, and an authentication processing execution means is generated It has been made so that to perform a first authentication process using the authentication key.

本発明によれば、フレキシブルでセキュリティの高いアクセス制御を行うことができる。   According to the present invention, flexible and highly secure access control can be performed.

図1は、本発明を適用した非接触カードシステム(システムとは、複数の装置が論理的に集合した物をいい、各構成の装置が同一筐体中にあるか否かは問わない)の一実施の形態の構成例を示している。   FIG. 1 shows a contactless card system to which the present invention is applied (a system is a logical collection of a plurality of devices, regardless of whether or not each component device is in the same casing). 2 shows an example of the configuration of an embodiment.

この非接触カードシステムは、R/W1,ICカード2、およびコントローラ3で構成され、R/W1とICカード2との間では、電磁波を利用して非接触で、データの送受信が行われるようになされている。   This contactless card system is composed of an R / W1, an IC card 2, and a controller 3. Data is transmitted and received between the R / W1 and the IC card 2 in a contactless manner using electromagnetic waves. Has been made.

即ち、R/W1が、所定のコマンドをICカード2に送信し、ICカード2は、そのコマンドを受信し、そのコマンドに対応する処理を行う。そして、ICカード2は、その処理結果に対応する応答データをR/W1に送信する。   That is, the R / W 1 transmits a predetermined command to the IC card 2, and the IC card 2 receives the command and performs processing corresponding to the command. Then, the IC card 2 transmits response data corresponding to the processing result to the R / W 1.

R/W1は、所定のインタフェース(例えば、RS−485Aの規格などに準拠したもの)を介してコントローラ3に接続されており、コントローラ3は、R/W1に対して所定の制御信号を供給することで、所定の処理を行わせる。   The R / W1 is connected to the controller 3 via a predetermined interface (for example, one compliant with the RS-485A standard), and the controller 3 supplies a predetermined control signal to the R / W1. Thus, a predetermined process is performed.

図2は、図1のR/W1の構成例を示している。   FIG. 2 shows a configuration example of the R / W 1 in FIG.

IC21においては、データの処理を行うDPU(Data Processing Unit)31、ICカード2に送信するデータおよびICカード2から受信したデータの処理を行うSPU(Signal Processing Unit)32、コントローラ3との通信を行うSCC(Serial Communication Controller)33、およびデータの処理に必要な情報を予め記憶しているROM部41と処理途中のデータを一時的に記憶するRAM部42とで構成されるメモリ部34が、バスを介して接続されている。   The IC 21 communicates with a DPU (Data Processing Unit) 31 for processing data, an SPU (Signal Processing Unit) 32 for processing data transmitted to the IC card 2 and data received from the IC card 2, and a controller 3. A memory unit 34 including an SCC (Serial Communication Controller) 33 to be performed, a ROM unit 41 that stores information necessary for data processing in advance, and a RAM unit 42 that temporarily stores data being processed, Connected via bus.

また、このバスには、所定のデータを記憶するフラッシュメモリ22も接続されている。   Also connected to this bus is a flash memory 22 for storing predetermined data.

DPU31は、ICカード2に送信するコマンドをSPU32に出力するとともに、ICカード2から受信した応答データをSPU32から受け取るようになされている。   The DPU 31 outputs a command to be transmitted to the IC card 2 to the SPU 32 and receives response data received from the IC card 2 from the SPU 32.

SPU32は、ICカード2に送信するコマンドに対して所定の処理(例えば、BPSK(BiPhase Shift Keying)変調(ワンチェスタコードへのコーディング)など)を行った後、変調回路23に出力するとともに、ICカード2により送信されてきた応答データを復調回路25から受け取り、そのデータに対して所定の処理を施すようになされている。   The SPU 32 performs predetermined processing (for example, BPSK (BiPhase Shift Keying) modulation (coding into a one-chester code), etc.) on the command transmitted to the IC card 2, and then outputs the processed signal to the modulation circuit 23. The response data transmitted from the card 2 is received from the demodulation circuit 25, and predetermined processing is performed on the data.

変調回路23は、発振器(OSC)26より供給される所定の周波数(例えば13.56MHz)の搬送波を、SPU32より供給されるデータで、ASK(Amplitude Shift Keying)変調し、生成された変調波をアンテナ27を介して、電磁波としてICカード2に出力するようになされている。なお、このとき、変調回路23は、変調度を1未満にして、ASK変調を行うようになされており、これにより、データがローレベルのときにおいても、変調波の最大振幅がゼロにならないようになされている。   The modulation circuit 23 performs ASK (Amplitude Shift Keying) modulation on a carrier wave having a predetermined frequency (for example, 13.56 MHz) supplied from an oscillator (OSC) 26 with data supplied from the SPU 32, and generates a modulated wave. An electromagnetic wave is output to the IC card 2 via the antenna 27. At this time, the modulation circuit 23 performs ASK modulation with a modulation degree less than 1, so that the maximum amplitude of the modulated wave does not become zero even when the data is at a low level. Has been made.

復調回路25は、アンテナ27を介して受信した変調波(ASK変調波)を復調し、復調されたデータをSPU32に出力するようになされている。   The demodulation circuit 25 demodulates the modulated wave (ASK modulated wave) received via the antenna 27 and outputs the demodulated data to the SPU 32.

図3は、図1のICカード2の構成例を示している。   FIG. 3 shows a configuration example of the IC card 2 of FIG.

このICカード2においては、IC51が、アンテナ53を介して、R/W1により送信された変調波を受信するようになされている。なお、コンデンサ52は、アンテナ53とともにLC回路を構成し、所定の周波数(キャリア周波数)の電磁波に同調(共振)するようになされている。   In this IC card 2, the IC 51 receives the modulated wave transmitted by the R / W 1 via the antenna 53. The capacitor 52 constitutes an LC circuit together with the antenna 53, and is tuned (resonated) with an electromagnetic wave having a predetermined frequency (carrier frequency).

IC51において、RFインタフェース部61(通信手段)は、ASK復調部81で、アンテナ53を介して受信した変調波(ASK変調波)を検波して復調し、復調後のデータを、BPSK復調回路62およびPLL(Phase Locked Loop)部63に出力するとともに、電圧レギュレータ82で、ASK復調部81が検波した信号を安定化し、各回路に直流電源として供給するようになされている。   In the IC 51, the RF interface unit 61 (communication means) detects and demodulates the modulated wave (ASK modulated wave) received via the antenna 53 by the ASK demodulator 81, and the demodulated data is converted into the BPSK demodulator circuit 62. In addition, the voltage regulator 82 stabilizes the signal detected by the ASK demodulator 81 and supplies it to each circuit as a DC power supply.

また、RFインタフェース部61は、発振回路83でデータのクロック周波数と同一の周波数の信号を発振し、その信号をPLL部63に出力するようになされている。   The RF interface unit 61 oscillates a signal having the same frequency as the data clock frequency by the oscillation circuit 83 and outputs the signal to the PLL unit 63.

さらに、RFインタフェース部61では、ASK変調部81において、演算部64より、BPSK変調回路68を介して供給されるデータに対応して、ICカード2の電源としてのアンテナ53の負荷を変動させる(例えば、データに対応して所定のスイッチング素子をオン/オフさせ、スイッチング素子がオン状態であるときだけ所定の負荷をアンテナ53に並列に接続させる)ことにより、アンテナ53を介して受信している変調波をASK変調し(ICカード2からデータを送信するときは(ICカード2にデータを送信させるときは)、R/W1は、その出力する変調波の最大振幅を一定にしており、この変調波が、アンテナ53の負荷の変動により、ASK変調される)、その変調成分を、アンテナ53を介してR/W1に送信する(R/W1のアンテナ27の端子電圧を変動させる)ようになされている。   Further, in the RF interface unit 61, in the ASK modulation unit 81, the load of the antenna 53 as the power source of the IC card 2 is changed in accordance with the data supplied from the calculation unit 64 via the BPSK modulation circuit 68 ( For example, the predetermined switching element is turned on / off corresponding to the data, and the predetermined load is connected in parallel to the antenna 53 only when the switching element is in the on state). The modulated wave is ASK-modulated (when data is transmitted from the IC card 2 (when data is transmitted to the IC card 2), the R / W1 makes the maximum amplitude of the modulated wave to be output constant, and this The modulated wave is ASK-modulated by the load variation of the antenna 53), and the modulation component is transmitted to the R / W1 via the antenna 53. (Fluctuate terminal voltage of the antenna 27 of R / W1) As is made it is in.

PLL部63は、ASK復調部81より供給されるデータから、そのデータに同期したクロック信号を生成し、そのクロック信号をBPSK復調回路62およびBPSK変調回路68に出力するようになされている。   The PLL unit 63 generates a clock signal synchronized with the data from the data supplied from the ASK demodulation unit 81 and outputs the clock signal to the BPSK demodulation circuit 62 and the BPSK modulation circuit 68.

BPSK復調回路62は、ASK復調部81で復調されたデータが、BPSK変調されている場合、PLL部63より供給されたクロック信号に従って、そのデータの復調(ワンチェスタコードのデコード)を行い、復調したデータを演算部64に出力するようになされている。   When the data demodulated by the ASK demodulator 81 is BPSK modulated, the BPSK demodulator 62 demodulates the data (decodes one-chester code) in accordance with the clock signal supplied from the PLL unit 63 and demodulates the data. The processed data is output to the calculation unit 64.

演算部64は、BPSK復調回路62より供給されたデータが暗号化されている場合、そのデータを暗号/復号部92で復号化した後、そのデータを、シーケンサ91で処理するようになされている。なお、データが暗号化されていない場合、BPSK復調回路62より供給されたデータは、暗号/復号部92を介さず、シーケンサ91に、直接供給される。   When the data supplied from the BPSK demodulator circuit 62 is encrypted, the arithmetic unit 64 decrypts the data with the encryption / decryption unit 92 and then processes the data with the sequencer 91. . If the data is not encrypted, the data supplied from the BPSK demodulation circuit 62 is directly supplied to the sequencer 91 without going through the encryption / decryption unit 92.

シーケンサ91(管理手段)(生成手段)(認証手段)は、そこに供給されるコマンドとしてのデータに対応する処理を行うようになされている。即ち、例えば、シーケンサ91は、EEPROM66に対するデータの書き込みや読み出し、その他データに対する必要な演算処理などを行う。さらに、シーケンサ91は、認証を行うことによるEEPROM66へのアクセス制御や、EEPROM66の管理などをも行うようになされている。   The sequencer 91 (management means) (generation means) (authentication means) performs processing corresponding to data as a command supplied thereto. That is, for example, the sequencer 91 performs data writing and reading with respect to the EEPROM 66 and other necessary arithmetic processing for the data. Further, the sequencer 91 performs control of access to the EEPROM 66 by performing authentication, management of the EEPROM 66, and the like.

演算部64のパリティ演算部93は、EEPROM66に記憶されるデータや、EEPROM66に記憶されているデータから、パリティとして、例えば、リードソロモン符号を算出するようになされている。   The parity calculation unit 93 of the calculation unit 64 calculates a Reed-Solomon code, for example, as parity from data stored in the EEPROM 66 or data stored in the EEPROM 66.

さらに、演算部64は、シーケンサ91で所定の処理を行った後、その処理に対応する応答データ(R/W1に送信するデータ)をBPSK変調回路68に出力するようになされている。   Further, the arithmetic unit 64 performs predetermined processing by the sequencer 91, and then outputs response data (data to be transmitted to the R / W1) corresponding to the processing to the BPSK modulation circuit 68.

BPSK変調回路68は、演算部64より供給されたデータをBPSK変調し、変調後のデータをRFインタフェース部61のASK変調部84に出力するようになされている。   The BPSK modulation circuit 68 performs BPSK modulation on the data supplied from the calculation unit 64 and outputs the modulated data to the ASK modulation unit 84 of the RF interface unit 61.

ROM(Read Only Memory)65は、シーケンサ91が処理を行うためのプログラムその他の必要なデータを記憶している。RAM67は、シーケンサ91が処理を行うとき、その処理の途中のデータなどを、一時的に記憶するようになされている。   A ROM (Read Only Memory) 65 stores a program for the sequencer 91 to perform processing and other necessary data. When the sequencer 91 performs processing, the RAM 67 temporarily stores data in the middle of the processing.

EEPROM(Electrically Erasable and Programmable ROM)66(記憶手段)(データ記憶手段)は、不揮発性のメモリであり、ICカード2がR/W1との通信を終了し、電力供給が停止した後も、データを記憶し続けるようになされている。   An EEPROM (Electrically Erasable and Programmable ROM) 66 (storage means) (data storage means) is a non-volatile memory, and even after the IC card 2 terminates communication with the R / W 1 and the power supply is stopped, the data It is made to keep memorizing.

次に、R/W1とICカード2との間のデータの送受信処理について説明する。   Next, data transmission / reception processing between the R / W 1 and the IC card 2 will be described.

R/W1(図2)は、アンテナ27から所定の電磁波を放射して、アンテナ27の負荷状態を監視し、ICカード2が接近することによる負荷状態の変化が検出されるまで待機する。なお、R/W1には、所定の短いパターンのデータでASK変調した電磁波を放射して、ICカード2への呼びかけを、ICカード2からの応答が一定時間内に得られるまで繰り返す処理(ポーリング)を行わせるようにしてもよい。   The R / W 1 (FIG. 2) emits a predetermined electromagnetic wave from the antenna 27, monitors the load state of the antenna 27, and waits until a change in the load state due to the approach of the IC card 2 is detected. Note that R / W1 emits an ASK-modulated electromagnetic wave with a predetermined short pattern of data, and repeats a call to the IC card 2 until a response from the IC card 2 is obtained within a predetermined time (polling) ) May be performed.

R/W1において、ICカード2の接近が検出されると、R/W1のSPU32は、所定の周波数(例えば、データのクロック周波数の2倍の周波数)の矩形波を搬送波として、ICカード2に送信するデータ(ICカード2に実行させる処理に対応するコマンドや、ICカード2に書き込むデータなど)で、BPSK変調を行い、生成した変調波(BPSK変調信号)(ワンチェスタコード)を変調回路23に出力する。   When the approach of the IC card 2 is detected in the R / W1, the SPU 32 of the R / W1 uses the rectangular wave of a predetermined frequency (for example, a frequency twice the data clock frequency) as a carrier wave to the IC card 2. BPSK modulation is performed with data to be transmitted (commands corresponding to processing to be executed by the IC card 2, data written to the IC card 2, etc.), and the generated modulated wave (BPSK modulation signal) (One Chester code) is converted into the modulation circuit 23 Output to.

なお、BPSK変調時においては、差動変換を利用して、変調波の位相の変化に、データを対応させることができ、このようにした場合、BPSK変調信号が反転しても、元のデータに復調されるので、復調するとき変調波の極性を配慮する必要が無くなる。   At the time of BPSK modulation, data can be made to correspond to a change in the phase of the modulated wave using differential conversion. In this case, even if the BPSK modulation signal is inverted, the original data Therefore, there is no need to consider the polarity of the modulated wave when demodulating.

変調回路23は、入力されたBPSK変調信号で、所定の搬送波を1未満(例えば0.1)の変調度(=データ信号の最大振幅/搬送波の最大振幅)でASK変調し、生成された変調波(ASK変調波)を、アンテナ27を介してICカード2に送信する。   The modulation circuit 23 performs ASK modulation on a predetermined carrier wave with an input BPSK modulation signal with a modulation factor of less than 1 (for example, 0.1) (= maximum amplitude of data signal / maximum amplitude of carrier wave), and generated modulation A wave (ASK modulated wave) is transmitted to the IC card 2 via the antenna 27.

なお、送信を行わないとき、変調回路23は、ディジタル信号の2つのレベル(ハイレベルとローレベル)のうちの、例えばハイレベルで変調波を生成するようになされている。   When transmission is not performed, the modulation circuit 23 generates a modulated wave at a high level, for example, of two levels (high level and low level) of the digital signal.

ICカード2(図3)では、アンテナ53およびコンデンサ52で構成されるLC回路において、R/W1のアンテナ27が放射した電磁波の一部が電気信号に変換され、その電気信号(変調波)が、IC51のRFインタフェース61に出力される。そして、RFインタフェース61のASK復調部81は、その変調波を整流平滑化することで、包絡線検波を行い、これにより生成される信号を電圧レギュレータ82に供給するとともに、その信号の直流成分を抑制してデータ信号を抽出し、そのデータ信号をBPSK復調回路62およびPLL部63に出力する。   In the IC card 2 (FIG. 3), in the LC circuit composed of the antenna 53 and the capacitor 52, part of the electromagnetic wave radiated by the antenna 27 of the R / W 1 is converted into an electric signal, and the electric signal (modulated wave) is converted into an electric signal. , Output to the RF interface 61 of the IC 51. Then, the ASK demodulator 81 of the RF interface 61 performs envelope detection by rectifying and smoothing the modulated wave, and supplies a signal generated thereby to the voltage regulator 82 and also converts the DC component of the signal. The data signal is extracted while being suppressed, and the data signal is output to the BPSK demodulation circuit 62 and the PLL unit 63.

なお、このとき、アンテナ53の端子電圧V0は、例えば次のようになる。
0=V10(1+k×Vs(t))cos(ωt)
但し、V10cos(ωt)は、搬送波を、kは変調度を、Vs(t)はSPU32が出力するデータを、それぞれ表す。
At this time, the terminal voltage V 0 of the antenna 53 is, for example, as follows.
V 0 = V 10 (1 + k × Vs (t)) cos (ωt)
However, V 10 cos (ωt) represents a carrier wave, k represents a modulation degree, and Vs (t) represents data output from the SPU 32.

また、ASK復調部81による整流後の電圧V1におけるローレベルの値VLRは、例えば次のようになる。
LR=V10(1+k×(−1))−Vf
The low level value V LR of the voltage V 1 after rectification by the ASK demodulator 81 is, for example, as follows.
V LR = V 10 (1 + k × (−1)) − Vf

ここで、Vfは、ASK復調部81において、整流平滑化を行うための整流回路を構成するダイオード(図示せず)における電圧降下を示しており、一般に0.7ボルト程度である。   Here, Vf indicates a voltage drop in a diode (not shown) constituting a rectifier circuit for performing rectification and smoothing in the ASK demodulator 81, and is generally about 0.7 volts.

電圧レギュレータ82は、ASK復調部81により整流平滑化された信号を受信すると、その信号を安定化し、直流電源として、演算部64を始めとする各回路に供給する。なお、ここでは、上述したように、変調波の変調度kは1未満であるので、整流後の電圧変動(ハイレベルとローレベルの差)が小さい。従って、電圧レギュレータ82において、直流電源を容易に生成することができる。   When the voltage regulator 82 receives the signal rectified and smoothed by the ASK demodulator 81, the voltage regulator 82 stabilizes the signal and supplies it as a DC power source to each circuit including the arithmetic unit 64. Here, as described above, since the modulation degree k of the modulated wave is less than 1, the voltage fluctuation after rectification (difference between the high level and the low level) is small. Accordingly, the voltage regulator 82 can easily generate a DC power source.

ここで、例えば、変調度kが5%の変調波を、V10が3ボルト以上になるように受信した場合、整流後のローレベル電圧VLRは、2.15(=3×(1−0.05)−0.7)ボルト以上となり、電圧レギュレータ82は、電源として充分な電圧を各回路に供給することができる。さらに、この場合、整流後の電圧V1の交流成分(データ成分)の振幅2×k×V10(Peak-to-Peak値)は、0.3(=2×0.05×3)ボルト以上になり、ASK復調部81は、十分高いS/N比でデータの復調を行うことができる。 Here, for example, when a modulated wave having a modulation degree k of 5% is received so that V 10 is 3 volts or more, the low level voltage V LR after rectification is 2.15 (= 3 × (1− 0.05) −0.7) volts or more, and the voltage regulator 82 can supply each circuit with a voltage sufficient as a power source. Furthermore, in this case, the amplitude 2 × k × V 10 (Peak-to-Peak value) of the AC component (data component) of the rectified voltage V 1 is 0.3 (= 2 × 0.05 × 3) volts. Thus, the ASK demodulator 81 can demodulate data with a sufficiently high S / N ratio.

このように、変調度kが1未満のASK変調波を利用することにより、エラーレートの低い(S/N比の高い状態で)通信を行うとともに、電源として充分な直流電圧がICカード2に供給される。   In this way, by using an ASK modulated wave having a modulation degree k of less than 1, communication is performed with a low error rate (with a high S / N ratio), and a DC voltage sufficient as a power source is applied to the IC card 2. Supplied.

BPSK復調回路62は、ASK復調部81からデータ信号(BPSK変調信号)を受信すると、そのデータ信号を、PLL部63より供給されるクロック信号に従って復調し、復調したデータを演算部64に出力する。   When receiving the data signal (BPSK modulated signal) from the ASK demodulator 81, the BPSK demodulator 62 demodulates the data signal in accordance with the clock signal supplied from the PLL unit 63, and outputs the demodulated data to the calculator 64. .

演算部64は、BPSK復調回路62より供給されたデータが暗号化されている場合は、暗号/復号部92で復号化した後、そのデータ(コマンド)をシーケンサ91に供給して処理する。なお、この期間、即ち、ICカード2にデータを送信後、それに対する返答を受信するまでの間、R/W1は、値が1のデータを送信したまま待機している。従って、この期間においては、ICカード2は、最大振幅が一定である変調波を受信している。   When the data supplied from the BPSK demodulation circuit 62 is encrypted, the arithmetic unit 64 decrypts the data with the encryption / decryption unit 92 and then supplies the data (command) to the sequencer 91 for processing. Note that during this period, that is, after the data is transmitted to the IC card 2 and until a response to the response is received, the R / W 1 stands by while transmitting data having a value of 1. Therefore, during this period, the IC card 2 receives a modulated wave having a constant maximum amplitude.

シーケンサ91は、処理が終了すると、その処理結果などについてのデータ(R/W1に送信するデータ)を、BPSK変調回路68に出力する。BPSK変調回路68は、R/W1のSPU32と同様に、そのデータをBPSK変調(ワンチェスタコードにコーディング)した後、RFインタフェース部61のASK変調部84に出力する。   When the processing is completed, the sequencer 91 outputs data about the processing result (data to be transmitted to the R / W1) to the BPSK modulation circuit 68. The BPSK modulation circuit 68 performs BPSK modulation (coding into a one-chester code) of the data, like the R / W1 SPU 32, and then outputs the data to the ASK modulation unit 84 of the RF interface unit 61.

そして、ASK変調部84は、アンテナ53の両端に接続される負荷を、スイッチング素子などを利用し、BPSK変調回路68からのデータに応じて変動させることにより、受信している変調波(ICカード2によるデータの送信時においては、上述したように、R/W1が出力する変調波の最大振幅は一定になっている)を、送信するデータに応じてASK変調し、これによりR/W1のアンテナ27の端子電圧を変動させて、そのデータをR/W1に送信する。   Then, the ASK modulation unit 84 varies the load connected to both ends of the antenna 53 according to the data from the BPSK modulation circuit 68 using a switching element or the like, thereby receiving a modulated wave (IC card). 2, the maximum amplitude of the modulated wave output by the R / W 1 is constant as described above, and the ASK modulation is performed according to the data to be transmitted. The terminal voltage of the antenna 27 is changed, and the data is transmitted to the R / W1.

一方、R/W1の変調回路23は、ICカード2からのデータの受信時においては、値が1(ハイレベル)のデータの送信を継続している。そして、復調回路25において、ICカード2のアンテナ53と電磁気的に結合しているアンテナ27の端子電圧の微小な変動(例えば、数十マイクロボルト)から、ICカード2により送信されてきたデータが検出される。   On the other hand, the modulation circuit 23 of the R / W 1 continues to transmit data having a value of 1 (high level) when receiving data from the IC card 2. Then, in the demodulation circuit 25, the data transmitted by the IC card 2 from the minute fluctuation (for example, several tens of microvolts) of the terminal voltage of the antenna 27 electromagnetically coupled to the antenna 53 of the IC card 2 is obtained. Detected.

さらに、復調回路25では、検出した信号(ASK変調波)が高利得の増幅器(図示せず)で増幅されて復調され、その結果得られるディジタルデータがSPU32に出力される。SPU32は、そのデータ(BPSK変調信号)を復調し、DPU31に出力する。DPU31は、SPU32からのデータを処理し、その処理結果に応じて、通信を終了するか否かを判断する。そして、再度、通信を行うと判断した場合、上述した場合と同様にして、R/W1とICカード2との間で通信が行われる。一方、通信を終了すると判断した場合、R/W1は、ICカード2との通信処理を終了する。   Further, in the demodulation circuit 25, the detected signal (ASK modulation wave) is amplified and demodulated by a high gain amplifier (not shown), and the resulting digital data is output to the SPU 32. The SPU 32 demodulates the data (BPSK modulation signal) and outputs it to the DPU 31. The DPU 31 processes the data from the SPU 32 and determines whether or not to end the communication according to the processing result. When it is determined that communication is performed again, communication is performed between the R / W 1 and the IC card 2 in the same manner as described above. On the other hand, when it is determined that the communication is to be terminated, the R / W 1 ends the communication process with the IC card 2.

以上のように、R/W1は、変調度kが1未満であるASK変調を利用して、ICカード2にデータを送信し、ICカード2は、そのデータを受け取り、そのデータに対応する処理を行って、その処理の結果に対応するデータを、R/W1に返送する。   As described above, the R / W 1 transmits data to the IC card 2 by using the ASK modulation whose modulation degree k is less than 1, and the IC card 2 receives the data and processes corresponding to the data And the data corresponding to the processing result is returned to the R / W1.

次に、図4は、図3のEEPROM66の論理フォーマットを示している。   Next, FIG. 4 shows a logical format of the EEPROM 66 of FIG.

EEPROM66は、ブロックを単位として構成され、図4の実施の形態では、1ブロックは、例えば、16バイトで構成されている。   The EEPROM 66 is configured in units of blocks. In the embodiment shown in FIG. 4, one block is configured by 16 bytes, for example.

さらに、図4の実施の形態では、最も上のブロックの論理アドレスを#0000h(hは、16進数を表す)として、昇順に、論理アドレスが付されている。なお、図4では、論理アドレスとして、#0000h乃至#FFFFhが付されており、従って、65536(=216)個のブロックが構成されている。 Further, in the embodiment of FIG. 4, the logical address of the uppermost block is # 0000h (h represents a hexadecimal number), and the logical addresses are assigned in ascending order. In FIG. 4, # 0000h to #FFFFh are assigned as logical addresses, and therefore 65536 (= 2 16 ) blocks are configured.

ブロックは、ユーザブロックまたはシステムブロックとして使用されるようになされている。EEPROM66のブロックは、論理アドレスの昇順に、ユーザブロックに割り当てられていき、また、論理アドレスの降順に、システムブロックに割り当てられていくようになされている。即ち、図4において、ユーザブロックは下方向に、システムブロックは上方向に、それぞれ増えていき、空きブロックがなくなった時点で、ユーザブロックおよびシステムブロックをつくることはできなくなる。従って、ユーザブロックとシステムブロックとの境界は固定ではなく、また、ユーザブロックの数、またはシステムブロックの数それぞれには、特に制限がない(但し、図4の実施の形態では、ユーザブロックとシステムブロックとの合計は、65536個以下に制限される)。   The block is designed to be used as a user block or a system block. The blocks of the EEPROM 66 are assigned to user blocks in ascending order of logical addresses, and are assigned to system blocks in descending order of logical addresses. That is, in FIG. 4, the user blocks increase in the downward direction and the system blocks increase in the upward direction. When there are no more empty blocks, the user blocks and the system blocks cannot be created. Therefore, the boundary between the user block and the system block is not fixed, and the number of user blocks or the number of system blocks is not particularly limited (however, in the embodiment of FIG. 4, the user block and the system block are not limited). The total number of blocks is limited to 65536 or less).

システムブロックには、製造ID(Identification)ブロック、発行IDブロック、システム定義ブロック、エリア定義ブロック、サービス定義ブロックの5種類がある。なお、図4の実施の形態では、エリア定義ブロックまたはサービス定義ブロックとなっているブロックを、エリア/サービス定義ブロックと示してある。   There are five types of system blocks: manufacturing ID (Identification) block, issue ID block, system definition block, area definition block, and service definition block. In the embodiment of FIG. 4, blocks that are area definition blocks or service definition blocks are indicated as area / service definition blocks.

システムブロックのうち、製造IDブロック、発行IDブロック、システム定義ブロックの3つは、基本的に、ICカード2の発行時には、既に配置されているもので、論理アドレス#FFFFh,#FFFEh,#FFFDhにそれぞれ配置される。そして、エリア/サービス定義ブロックは、論理アドレス#FFFChより上に、作成順に配置されていく。   Of the system blocks, the manufacturing ID block, the issue ID block, and the system definition block are basically already arranged when the IC card 2 is issued, and logical addresses #FFFFh, #FFFEh, #FFFDh Respectively. The area / service definition blocks are arranged in the order of creation above the logical address #FFFCh.

製造IDブロックには、ICカード2の製造に関する情報が配置される。即ち、製造IDブロックには、例えば、ユニークな製造IDや、製造年月日、製造者のコードなどが配置される。   Information relating to the manufacture of the IC card 2 is arranged in the manufacture ID block. That is, for example, a unique manufacturing ID, a manufacturing date, a manufacturer's code, and the like are arranged in the manufacturing ID block.

発行IDブロックには、ICカード2の発行に関する情報が配置される。即ち、発行IDブロックには、例えば、ICカード2が発行された日付や、ICカードを発行した順番を表すコードなどが配置される。   Information relating to the issue of the IC card 2 is arranged in the issue ID block. That is, in the issue ID block, for example, a date when the IC card 2 is issued, a code indicating the order in which the IC cards are issued, and the like are arranged.

システム定義ブロックには、例えば、EEPROM66が有するシステムブロックまたはユーザブロックの数や、システムキーなどが配置される。なお、システムキーは、ICカード2と、R/W1およびコントローラ3との間で、相互認証を行うときに用いられる。   In the system definition block, for example, the number of system blocks or user blocks included in the EEPROM 66, a system key, and the like are arranged. The system key is used when mutual authentication is performed between the IC card 2, the R / W 1 and the controller 3.

エリア定義ブロックは、例えば、EEPROM66の記憶領域(エリア)が、管理者に割り当てられることにより作成され、そこには、管理者が、自身に割り当てられた記憶領域を管理するための情報などが配置される。即ち、エリア定義ブロックには、例えば、後述するコード範囲、空き容量、およびエリアキーなどが配置される。   The area definition block is created, for example, by assigning a storage area (area) of the EEPROM 66 to the administrator, and information for the administrator to manage the storage area assigned to the administrator is arranged there. Is done. That is, for example, a code range, a free capacity, an area key, and the like, which will be described later, are arranged in the area definition block.

サービス定義ブロックには、後述するサービス領域を管理するための情報(サービス領域の容量やサービスキーなど)などが配置される。   In the service definition block, information (service area capacity, service key, etc.) for managing a service area to be described later is arranged.

次に、シーケンサ91では、EEPROM66の記憶領域が階層化されて管理されるようになされている。   Next, in the sequencer 91, the storage area of the EEPROM 66 is managed hierarchically.

即ち、図5は、EEPROM66のディレクトリ構造を示している。   That is, FIG. 5 shows the directory structure of the EEPROM 66.

EEPROM66の記憶領域は、エリア定義領域を階層とする階層構造をなしており、エリア定義領域は、エリア定義領域およびサービス定義領域を有することができるようになされている。   The storage area of the EEPROM 66 has a hierarchical structure with the area definition area as a hierarchy, and the area definition area can have an area definition area and a service definition area.

エリア定義領域(階層キー記憶手段)は、管理者に割り当てられ、そこには、管理者が、エリア定義領域やサービス定義領域を識別するための名前として使用可能な識別コードの範囲を表すコード範囲、使用可能な空きブロック数を表す空き容量、認証に用いる、後述するアクセスキーを生成するためのエリアキーなどが配置される。ここで、1のエリア定義領域は、図4で説明した1のエリア定義ブロックに対応する。   An area definition area (hierarchical key storage means) is assigned to an administrator, and there is a code range indicating a range of identification codes that can be used as a name for the administrator to identify the area definition area and the service definition area. , A free capacity indicating the number of available free blocks, an area key for generating an access key, which will be described later, used for authentication, and the like are arranged. Here, one area definition area corresponds to one area definition block described in FIG.

図5の実施の形態では、管理者Aに割り当てられたエリア定義領域が最上位階層を構成しており、これを親の階層として、管理者B1およびB2のエリア定義領域が作成されている。さらに、管理者B1のエリア定義領域を、親の階層として、管理者Cのエリア定義領域が作成されている。   In the embodiment of FIG. 5, the area definition area assigned to the manager A constitutes the highest hierarchy, and the area definition areas of the managers B1 and B2 are created using this as the parent hierarchy. Further, the area definition area of the manager C is created with the area definition area of the manager B1 as the parent hierarchy.

サービス定義領域(データ記憶領域キー記憶手段)は、管理者が提供するサービスに割り当てられ、そこには、そのサービスの提供に必要なデータを記憶するサービス領域の容量や、アクセスキーを生成するためのサービスキーなどが配置される。ここで、1のサービス定義領域は、図4で説明した1のサービス定義ブロックに対応する。   A service definition area (data storage area key storage means) is allocated to a service provided by an administrator, and generates a capacity of a service area for storing data necessary for providing the service and an access key. The service key is arranged. Here, one service definition area corresponds to one service definition block described in FIG.

サービス領域は、サービスの提供に必要なデータが記憶される記憶領域で、図4のユーザブロックに対応する。即ち、サービス領域は、0以上のユーザブロックで構成され、サービス領域を構成するユーザブロック数が、そのサービス領域を管理するサービス定義領域の容量として配置される。   The service area is a storage area in which data necessary for providing the service is stored, and corresponds to the user block in FIG. That is, the service area is composed of zero or more user blocks, and the number of user blocks constituting the service area is arranged as the capacity of the service definition area for managing the service area.

また、エリア定義領域およびサービス定義領域には、それらを識別するための識別コードも配置される。ここで、エリア定義領域またはサービス定義領域を識別するための識別コードそれぞれを、以下、適宜、エリアコードまたはサービスコードという。なお、サービスコードは、あるサービス領域を管理するサービス定義領域を識別するものであるから、そのサービス領域を識別する識別コード(サービス領域識別コード)であるということもできる。   In the area definition area and the service definition area, identification codes for identifying them are also arranged. Here, each identification code for identifying an area definition area or a service definition area is hereinafter referred to as an area code or a service code as appropriate. Since the service code identifies a service definition area that manages a certain service area, it can be said that the service code is an identification code (service area identification code) that identifies the service area.

図5の実施の形態では、管理者Aに、最上位階層のエリア定義領域が割り当てられている。そして、使用可能な識別コードの範囲(コード範囲)として、0000h乃至FFFFhが、エリアキーとして、0123456789abcdefが、それぞれ定義されている。ここで、エリア定義領域におけるコード範囲内の識別コードであれば、いずれの識別コードも、そのエリア定義領域のエリアコードとして使用可能であるが、本実施の形態では、例えば、エリア定義領域のコード範囲の最小値が、そのエリアコードとして使用されるようになされている。従って、コード範囲が、0000h乃至FFFFhとなっているエリア定義領域、即ち、管理者Aに割り当てられているエリア定義領域のエリアコードは、0000hとなっている。ここで、エリアコード#xxxxhのエリア定義領域を、以下、適宜、エリア定義領域#xxxxhと記載する。   In the embodiment of FIG. 5, the area definition area of the highest hierarchy is assigned to the administrator A. Then, 0000h to FFFFh are defined as usable identification code ranges (code ranges), and 0123456789abcdef are defined as area keys. Here, any identification code within the code range in the area definition area can be used as the area code of the area definition area. In the present embodiment, for example, the area definition area code The minimum value of the range is used as the area code. Accordingly, the area definition area in which the code range is 0000h to FFFFh, that is, the area definition area assigned to the administrator A is 0000h. Here, the area definition area of area code #xxxxh is hereinafter referred to as area definition area #xxxxh as appropriate.

管理者Aのエリア定義領域#0000hの階層には、管理者Aがサービスを提供するためのサービス定義領域が設けられている。このサービス定義領域には、エリア定義領域#0000hのコード範囲である0000h乃至FFFFhのうち、0008hが、サービスコードとして割り当てられている。ここで、サービスコード#xxxxhのサービス定義領域を、以下、適宜、サービス定義領域#xxxxhと記載する。   In the hierarchy of the area definition area # 0000h of the administrator A, a service definition area for the administrator A to provide a service is provided. 0008h of 0000h to FFFFh, which is the code range of area definition area # 0000h, is assigned to this service definition area as a service code. Here, the service definition area of service code #xxxxh is hereinafter referred to as service definition area #xxxxh as appropriate.

サービス定義領域#0008hの容量は8とされており、従って、8のユーザブロックで構成されるサービス領域の使用が可能となっている。また、サービス定義領域#0008hのサービスキーは、0101010101010101となっている。   The capacity of the service definition area # 0008h is 8. Therefore, the service area composed of 8 user blocks can be used. The service key of the service definition area # 0008h is 001010101010101.

さらに、管理者Aのエリア定義領域#0000hの階層には、管理者B1のエリア定義領域#0100h、および管理者B2のエリア定義領域#1000hが、その子の階層として設けられている。また、エリア定義領域#0000hの階層には、図示せぬその他のエリア定義領域も設けられており、これにより、エリア定義領域#0000hが使用可能なブロック数(空き容量)は、例えば、37ブロックとなっている。   Further, the area definition area # 0000h of the manager A is provided with an area definition area # 0100h of the manager B1 and an area definition area # 1000h of the manager B2 as child hierarchies thereof. In addition, other area definition areas (not shown) are also provided in the hierarchy of the area definition area # 0000h, so that the number of blocks (free capacity) that can be used by the area definition area # 0000h is 37 blocks, for example. It has become.

管理者B1のエリア定義領域#0100hのコード範囲としては、その親の階層であるエリア定義領域#0000hのコード範囲である0000h乃至FFFFhのうちの、0100h乃至03FFhが割り当てられている。ここで、管理者B1のエリア定義領域のコード範囲が0100h乃至03FFhであるため、その最小値である0100hが、管理者B1のエリア定義領域のエリアコードとなっている。   As the code range of the area definition area # 0100h of the administrator B1, 0100h to 03FFh among the code ranges of 0000h to FFFFh that are the code range of the area definition area # 0000h that is the parent hierarchy is assigned. Here, since the code range of the area definition area of the administrator B1 is 0100h to 03FFh, the minimum value 0100h is the area code of the area definition area of the administrator B1.

また、エリア定義領域#0100hの空き容量またはエリアキーは、それぞれ、14またはa0a0a0a0a0a0a0a0になっている。   The free space or area key of the area definition area # 0100h is 14 or a0a0a0a0a0a0a0a0, respectively.

さらに、管理者B1のエリア定義領域#0100hの階層には、管理者Cのエリア定義領域#0300hが、その子の階層として設けられている。そして、管理者Cのエリア定義領域#0300hのコード範囲としては、その親の階層であるエリア定義領域#0100hのコード範囲である0100h乃至03FFhのうちの、0300h乃至03FFhが割り当てられている。ここで、管理者Cのエリア定義領域のコード範囲が0300h乃至03FFhであるため、その最小値である0300hが、管理者Cのエリア定義領域のエリアコードとなっている。   Further, the area definition area # 0100h of the manager B1 is provided with an area definition area # 0300h of the manager C as a child hierarchy. Then, as the code range of the area definition area # 0300h of the administrator C, 0300h to 03FFh is assigned among 0100h to 03FFh which is the code range of the area definition area # 0100h which is the parent hierarchy. Here, since the code range of the area definition area of the administrator C is 0300h to 03FFh, 0300h which is the minimum value is the area code of the area definition area of the administrator C.

また、エリア定義領域#0300hの空き容量またはエリアキーは、それぞれ、0またはb0b0b0b0b0b0b0b0になっている。   The free space or area key of area definition area # 0300h is 0 or b0b0b0b0b0b0b0b0, respectively.

管理者Cのエリア定義領域#0300hの階層には、管理者Cがサービスを提供するためのサービス定義領域が設けられている。このサービス定義領域には、エリア定義領域#0300hのコード範囲である0300h乃至03FFhのうちの、030Chが、サービスコードとして割り当てられている。   In the hierarchy of the area definition area # 0300h of the administrator C, a service definition area for the administrator C to provide a service is provided. In this service definition area, 030Ch of 0300h to 03FFh, which is the code range of area definition area # 0300h, is assigned as a service code.

このサービスコード030Chが割り当てられているサービス定義領域、即ち、サービス定義領域#030Chの容量は16とされており、従って、16のユーザブロックで構成されるサービス領域の使用が可能となっている。また、サービス定義領域#030Chのサービスキーは、0202020202020202となっている。   The service definition area to which the service code 030Ch is assigned, that is, the service definition area # 030Ch has a capacity of 16, so that a service area composed of 16 user blocks can be used. The service key of the service definition area # 030Ch is 0202020202020202.

ここで、サービス定義領域#030Chが管理するサービス領域の容量が16であり、そのサービス定義領域#030Ch自体が、1のブロックを、サービス定義ブロックとして使用することから、サービス定義領域#030Chが存在することによって使用されるブロック数は17(=16+1)ブロックとなる。また、サービス定義領域#030Chが属する階層のエリア定義領域#0300hが使用可能なブロック数は、その空き容量が0であるから、0ブロックである。さらに、エリア定義領域#0300h自体が、1のブロックを、エリア定義ブロックとして使用する。従って、エリア定義領域#0300hの階層においては、使用されているブロックが18(=17+1)ブロックで、使用可能なブロックが0ブロックであるから、その親の階層(上位階層)であるエリア定義領域#0100hから割り当てられたブロック数が、18(=18+0)ブロックであることが分かる。   Here, since the capacity of the service area managed by the service definition area # 030Ch is 16, and the service definition area # 030Ch itself uses one block as a service definition block, the service definition area # 030Ch exists. As a result, the number of blocks used is 17 (= 16 + 1) blocks. Further, the number of blocks that can be used by the area definition area # 0300h of the hierarchy to which the service definition area # 030Ch belongs is 0 block because the free capacity is 0. Furthermore, area definition area # 0300h itself uses one block as an area definition block. Accordingly, in the hierarchy of the area definition area # 0300h, the used blocks are 18 (= 17 + 1) blocks and the usable blocks are 0 blocks, so the area definition area which is the parent hierarchy (upper hierarchy) It can be seen that the number of blocks allocated from # 0100h is 18 (= 18 + 0) blocks.

さらに、エリア定義領域#0100hの階層については、その子の階層(下位階層)であるエリア定義領域#0300hで、上述のように、18ブロックが使用されている。また、エリア定義領域#0100h自体が1のブロックを、エリア定義ブロックとして使用している。そして、エリア定義領域#0100hの空き容量は、上述したように14となっている。従って、エリア定義領域#0100hの階層においては、使用されているブロックが19(=18+1)ブロックで、使用可能なブロックが14であるから、その親の階層であるエリア定義領域#0000hから割り当てられたブロックは、33(=19+14)ブロックであることが分かる。   Further, regarding the hierarchy of the area definition area # 0100h, as described above, 18 blocks are used in the area definition area # 0300h that is a child hierarchy (lower hierarchy). Further, a block whose area definition area # 0100h itself is 1 is used as an area definition block. The free space in area definition area # 0100h is 14 as described above. Accordingly, in the hierarchy of the area definition area # 0100h, since 19 (= 18 + 1) blocks are used and 14 usable blocks are allocated, the area definition area # 0000h that is the parent hierarchy is assigned. It can be seen that the number of blocks is 33 (= 19 + 14) blocks.

一方、管理者B2のエリア定義領域#1000hのコード範囲としては、その親の階層であるエリア定義領域#0000hのコード範囲である0000h乃至FFFFhのうちの、1000h乃至1FFFhが割り当てられている。ここで、管理者B2のエリア定義領域のコード範囲が1000h乃至1FFFhであるため、その最小値である1000hが、管理者B2のエリア定義領域のエリアコードとなっている。   On the other hand, as the code range of the area definition area # 1000h of the administrator B2, 1000h to 1FFFh of the code range of 0000h to FFFFh which is the code range of the area definition area # 0000h that is the parent hierarchy is assigned. Here, since the code range of the area definition area of the administrator B2 is 1000h to 1FFFh, the minimum value 1000h is the area code of the area definition area of the administrator B2.

また、エリア定義領域#1000hの空き容量またはエリアキーは、それぞれ、43またはc0c0c0c0c0c0c0c0になっている。   The free space or area key of the area definition area # 1000h is 43 or c0c0c0c0c0c0c0c0, respectively.

管理者B2のエリア定義領域#1000hの階層には、管理者B2がサービスを提供するためのサービス定義領域が設けられている。このサービス定義領域には、エリア定義領域#1000hのコード範囲である1000h乃至1FFFhのうちの、1022hが、サービスコードとして割り当てられている。   In the hierarchy of the area definition area # 1000h of the administrator B2, a service definition area for the administrator B2 to provide a service is provided. In this service definition area, 1022h out of 1000h to 1FFFh which is the code range of area definition area # 1000h is assigned as a service code.

このサービスコード1022hが割り当てられているサービス定義領域、即ち、サービス定義領域#1022hの容量は4とされており、従って、4のユーザブロックで構成されるサービス領域の使用が可能となっている。また、サービス定義領域#1022hのサービスキーは、0303030303030303となっている。   The capacity of the service definition area to which the service code 1022h is assigned, that is, the service definition area # 1022h is set to 4, so that the service area composed of 4 user blocks can be used. Also, the service key of the service definition area # 1022h is 003030303030303.

ここで、サービス定義領域#1022hが管理するサービス領域の容量が4であり、そのサービス定義領域#1022h自体が、1のブロックを、サービス定義ブロックとして使用することから、サービス定義領域#1022hが存在することによって使用されるブロック数は5(=4+1)ブロックとなる。また、サービス定義領域#1022hが属する階層のエリア定義領域#1000hが使用可能なブロック数は、その空き容量が43であるから、43ブロックである。さらに、エリア定義領域#1000h自体が1のブロックを、エリア定義ブロックとして使用している。従って、エリア定義領域#1000hの階層においては、使用されているブロックが6(=5+1)ブロックで、使用可能なブロックが43ブロックであるから、エリア定義領域#1000hに割り当てられたブロックは、49(=6+43)ブロックであることが分かる。   Here, since the capacity of the service area managed by the service definition area # 1022h is 4, and the service definition area # 1022h itself uses one block as the service definition block, the service definition area # 1022h exists. As a result, the number of blocks used is 5 (= 4 + 1) blocks. Further, the number of blocks that can be used by the area definition area # 1000h of the hierarchy to which the service definition area # 1022h belongs is 43 blocks because the free capacity is 43. Further, a block whose area definition area # 1000h itself is 1 is used as an area definition block. Accordingly, in the hierarchy of the area definition area # 1000h, the number of used blocks is 6 (= 5 + 1) blocks, and the number of usable blocks is 43. Therefore, the blocks allocated to the area definition area # 1000h are 49 blocks. It can be seen that (= 6 + 43) blocks.

以上のように、管理対象のエリア定義領域に割り当て可能な識別コードの範囲であるコード範囲をエリア定義領域に記憶させるようにしたので、そのコード範囲に基づき、管理対象のエリア定義領域を子の階層とし、そのエリア定義領域を管理するエリア定義領域を親の階層とする、図5に示したような階層構造を規定することができる。   As described above, since the code range that is the range of identification codes that can be assigned to the area definition area to be managed is stored in the area definition area, the area definition area to be managed is defined as a child based on the code range. A hierarchical structure as shown in FIG. 5 can be defined in which a hierarchy is used, and an area definition area that manages the area definition area is a parent hierarchy.

次に、図6を参照して、最上位階層のエリア定義領域#0000hが割り当てられた管理者Aが、例えば、ICカード2の発行者であるとして、図5に示した階層構造が構成されていく過程について説明する。   Next, referring to FIG. 6, the hierarchical structure shown in FIG. 5 is configured assuming that administrator A to which area definition area # 0000h of the highest hierarchy is assigned is the issuer of IC card 2, for example. Explain the process.

管理者Aは、例えば、ユーザの要求に応じて、ICカード2を発行する(1)。このICカード2には、図5の階層構造のうち、例えば、エリア定義領域#0000hだけが作成されている。   For example, the administrator A issues the IC card 2 in response to a user request (1). For example, only the area definition area # 0000h is created in the IC card 2 in the hierarchical structure of FIG.

そして、管理者Aは、サービス定義領域#0008hによって管理されるサービス領域を利用して、所定のサービスの提供を開始する場合、そのサービス定義領域#0008hの作成を行うのに必要な情報を、発券機101に登録する(2)。   When the administrator A starts to provide a predetermined service using the service area managed by the service definition area # 0008h, the administrator A obtains information necessary for creating the service definition area # 0008h. Register in the ticket issuing machine 101 (2).

ここで、発券機101は、例えば、図1のR/W1とコントローラ3から構成される。また、発券機101は、例えば、駅や、小売店、その他の施設などに設置することができる。   Here, the ticket-issuing machine 101 is comprised from R / W1 of FIG. In addition, the ticket issuing machine 101 can be installed, for example, at a station, a retail store, or other facilities.

その後、ユーザが、ICカード2を、発券機101に装着すると(ICカード2を、発券機101が内蔵するR/W1との間で通信を行うことが可能な状態にすると)、発券機101は、登録された情報に基づいて、ICカード2にコマンドおよび必要なデータを送信し、サービス定義領域#0008hを作成させる。これにより、ユーザは、サービス定義領域#0008hによって管理されるサービス領域を利用した、管理者Aによるサービスの提供を受けることが可能となる。   Thereafter, when the user attaches the IC card 2 to the ticket issuing machine 101 (when the IC card 2 is in a state where communication with the R / W 1 built in the ticket issuing machine 101 is possible), the ticket issuing machine 101 is installed. Transmits a command and necessary data to the IC card 2 based on the registered information, and creates a service definition area # 0008h. Thus, the user can receive a service provided by the administrator A using the service area managed by the service definition area # 0008h.

一方、管理者B1,B2それぞれは、ICカード2を利用したサービスの提供を行いたい場合、管理者Aとの間で契約を結び、管理者Aに、エリア定義領域#0100hおよび#1000hの作成を行うのに必要な情報を、発券機101に登録してもらう(3),(4)。そして、ユーザが、ICカード2を、発券機101に装着すると、発券機101は、登録された情報に基づいて、ICカード2にコマンドおよび必要なデータを送信し、エリア定義領域#0100hおよび#1000hを作成させる。これにより、管理者B1またはB2は、エリア定義領域#0100hまたは#1000hにおいて定義されている範囲内において、ICカード2のリソースを使用することが可能となる。   On the other hand, when each of the managers B1 and B2 wants to provide a service using the IC card 2, the manager B1 and B2 make a contract with the manager A, and create the area definition areas # 0100h and # 1000h. (3) and (4) are requested to register the information necessary for performing the registration in the ticket issuing machine 101. When the user attaches the IC card 2 to the ticket issuing machine 101, the ticket issuing machine 101 transmits a command and necessary data to the IC card 2 based on the registered information, and the area definition areas # 0100h and # 0 Create 1000h. As a result, the administrator B1 or B2 can use the resources of the IC card 2 within the range defined in the area definition area # 0100h or # 1000h.

その後、管理者B2が、サービス定義領域#1022hによって管理されるサービス領域を利用して、所定のサービスの提供を開始する場合、そのサービス定義領域#1022hの作成を行うのに必要な情報を、発券機101に登録する(5)。そして、ユーザが、ICカード2を、発券機101に装着すると、発券機101は、登録された情報に基づいて、ICカード2にコマンドおよび必要なデータを送信し、サービス定義領域#1022hを作成させる。これにより、ユーザは、サービス定義領域#1022hによって管理されるサービス領域を利用した、管理者B2によるサービスの提供を受けることが可能となる。   Thereafter, when the administrator B2 starts providing a predetermined service using the service area managed by the service definition area # 1022h, information necessary for creating the service definition area # 1022h is Register in the ticket issuing machine 101 (5). When the user attaches the IC card 2 to the ticket issuing machine 101, the ticket issuing machine 101 transmits a command and necessary data to the IC card 2 based on the registered information, and creates a service definition area # 1022h. Let As a result, the user can receive the service provided by the administrator B2 using the service area managed by the service definition area # 1022h.

また、管理者Cは、管理者B1の管理下において、ICカード2を利用したサービスの提供を行いたい場合、管理者B1との間で契約を結び、管理者B1に、エリア定義領域#0300hの作成を行うのに必要な情報を、発券機101に登録してもらう(6)。そして、ユーザが、ICカード2を、発券機101に装着すると、発券機101は、登録された情報に基づいて、ICカード2にコマンドおよび必要なデータを送信し、エリア定義領域#0300hを作成させる。これにより、管理者Cは、エリア定義領域#0300hにおいて定義されている範囲内において、ICカード2のリソースを使用することが可能となる。   In addition, when the manager C wants to provide a service using the IC card 2 under the management of the manager B1, the manager C makes a contract with the manager B1 and sends the area definition area # 0300h to the manager B1. The information necessary for creating the ticket is registered in the ticket issuing machine 101 (6). When the user attaches the IC card 2 to the ticket issuing machine 101, the ticket issuing machine 101 transmits a command and necessary data to the IC card 2 based on the registered information, and creates an area definition area # 0300h. Let As a result, the administrator C can use the resources of the IC card 2 within the range defined in the area definition area # 0300h.

その後、管理者Cが、サービス定義領域#030Chによって管理されるサービス領域を利用して、所定のサービスの提供を開始する場合、そのサービス定義領域#030Chの作成を行うのに必要な情報を、発券機101に登録する(7)。そして、ユーザが、ICカード2を、発券機101に装着すると、発券機101は、登録された情報に基づいて、ICカード2にコマンドおよび必要なデータを送信し、サービス定義領域#030Chを作成させる。これにより、ユーザは、サービス定義領域#030Chによって管理されるサービス領域を利用した、管理者Cによるサービスの提供を受けることが可能となる。   After that, when the administrator C starts providing a predetermined service using the service area managed by the service definition area # 030Ch, information necessary for creating the service definition area # 030Ch is Register in the ticket issuing machine 101 (7). When the user attaches the IC card 2 to the ticket issuing machine 101, the ticket issuing machine 101 transmits a command and necessary data to the IC card 2 based on the registered information, and creates a service definition area # 030Ch. Let As a result, the user can receive the service provided by the administrator C using the service area managed by the service definition area # 030Ch.

ICカード2では、以上のように、発券機101からのコマンドにしたがって、エリア定義領域やサービス定義領域が作成される。このエリア定義領域を作成するエリア作成処理、およびサービス定義領域を作成するサービス作成処理は、例えば、シーケンサ91によって行われるが、このエリア作成処理およびサービス作成処理について、図7および図8を参照して説明する。   In the IC card 2, as described above, the area definition area and the service definition area are created in accordance with the command from the ticket issuing machine 101. The area creation process for creating the area definition area and the service creation process for creating the service definition area are performed by, for example, the sequencer 91. For the area creation process and the service creation process, refer to FIG. 7 and FIG. I will explain.

まず最初に、図7のフローチャートを参照して、エリア作成処理について説明する。   First, the area creation process will be described with reference to the flowchart of FIG.

ICカード2が発券機101に装着されると、発券機101は、ICカード2に対して、エリア定義領域を作成することを指令するコマンド(以下、定義、エリア作成コマンドという)と、そのエリア定義領域を作成するために必要な情報、即ち、例えば、作成するエリア定義領域のコード範囲、そのエリア定義領域に割り当てられたブロック数(以下、適宜、割り当てブロック数という)、エリアキー、および親の階層とするエリア定義領域のエリアコード(以下、適宜、親エリアコードという)などを送信する。   When the IC card 2 is attached to the ticket issuing machine 101, the ticket issuing machine 101 instructs the IC card 2 to create an area definition area (hereinafter referred to as definition, area creation command) and its area. Information necessary for creating the definition area, for example, the code range of the area definition area to be created, the number of blocks allocated to the area definition area (hereinafter referred to as the number of allocated blocks as appropriate), the area key, and the parent The area definition area area code (hereinafter referred to as the parent area code as appropriate) is transmitted.

ここで、エリア定義領域を作成するために必要な情報は、セキュリティの観点から、暗号化した状態で、ICカード2に送信するのが望ましい。なお、暗号化は、例えば、親エリアコードを有するエリア定義領域に記憶されたエリアキーなどと同一のキーを用いて行うことができる。親エリアコードを有するエリア定義領域に記憶されたエリアキーは、EEPROM66に記憶されているから、ICカード2では、その暗号化された情報をデコードすることが可能である。   Here, it is desirable to transmit the information necessary for creating the area definition area to the IC card 2 in an encrypted state from the viewpoint of security. Note that the encryption can be performed using, for example, the same key as the area key stored in the area definition area having the parent area code. Since the area key stored in the area definition area having the parent area code is stored in the EEPROM 66, the IC card 2 can decode the encrypted information.

ICカード2(シーケンサ91)は、エリア作成コマンドを受信すると、それとともに送信されてくる暗号化された情報を復号し、これにより、親エリアコード、並びに作成対象のエリア定義領域のコード範囲、割り当てブロック数、およびエリアキーなどを認識する。さらに、ICカード2では、作成対象のエリア定義領域のエリアコードを認識する。即ち、ここでは、作成対象のエリア定義領域のコード範囲の最小値が、そのエリアコードとして認識される。   When the IC card 2 (sequencer 91) receives the area creation command, it decrypts the encrypted information transmitted together with it, whereby the parent area code, the code range of the area definition area to be created, and the allocation Recognize the number of blocks and area keys. Furthermore, the IC card 2 recognizes the area code of the area definition area to be created. That is, here, the minimum value of the code range of the area definition area to be created is recognized as the area code.

そして、ICカード2では、ステップS1において、作成対象のエリア定義領域が、EEPROM66の中に既に作成されているかどうかが判定される。即ち、ステップS1では、作成対象のエリア定義領域のエリアコードと同一のエリアコードを有するエリア定義領域が、既に作成されているかどうかが判定される。   Then, in the IC card 2, in step S <b> 1, it is determined whether the creation target area definition area has already been created in the EEPROM 66. That is, in step S1, it is determined whether an area definition area having the same area code as the area code of the area definition area to be created has already been created.

ステップS1において、作成対象のエリア定義領域が既に作成されていると判定された場合、エリア作成処理を終了する。即ち、作成対象のエリア定義領域が既に作成されている場合は、同一のエリア定義領域を重複して作成する必要はないから、以降の処理は行われない。   If it is determined in step S1 that the area definition area to be created has already been created, the area creation process is terminated. That is, when the area definition area to be created has already been created, it is not necessary to create the same area definition area in duplicate, and therefore the subsequent processing is not performed.

また、ステップS1において、作成対象のエリア定義領域が作成されていないと判定された場合、ステップS2に進み、作成対象のエリア定義領域のコード範囲および割り当てブロック数(容量)が適正かどうかが判定される。即ち、ステップS2では、作成対象のエリア定義領域のコード範囲が、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれており、かつ作成対象のエリア定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量以下であるかどうかが判定される。   If it is determined in step S1 that the area definition area to be created has not been created, the process proceeds to step S2 to determine whether the code range and the number of allocated blocks (capacity) of the area definition area to be created are appropriate. Is done. That is, in step S2, the code range of the area definition area to be created is included in the code range stored in the area definition area having the parent area code, and the number of blocks allocated to the area definition area to be created is Then, it is determined whether or not it is less than the free space stored in the area definition area having the parent area code.

ステップS2において、作成対象のエリア定義領域のコード範囲および割り当てブロック数が適正でないと判定された場合、即ち、作成対象のエリア定義領域のコード範囲が、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれていないか、または作成対象のエリア定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量を越えている場合、ステップS3に進み、エラー処理が行われ、エリア作成処理を終了する。即ち、ステップS3では、例えば、親エリアコードを有するエリア定義領域を親の階層として、その子の階層となるエリア定義領域を作成することができない旨のメッセージが、発券機101に送信される。従って、この場合、エリア定義領域は作成されない。   If it is determined in step S2 that the code range and the number of allocated blocks of the area definition area to be created are not appropriate, that is, the code range of the area definition area to be created is stored in the area definition area having the parent area code. If it is not included in the code range, or if the number of allocation blocks of the area definition area to be created exceeds the free space stored in the area definition area having the parent area code, the process proceeds to step S3. Error processing is performed, and the area creation processing ends. That is, in step S3, for example, a message that the area definition area having the parent area code is set as a parent hierarchy and an area definition area that is a child hierarchy cannot be created is transmitted to the ticket issuing machine 101. Therefore, in this case, the area definition area is not created.

一方、ステップS2において、作成対象のエリア定義領域のコード範囲および割り当てブロック数が適正であると判定された場合、即ち、作成対象のエリア定義領域のコード範囲が、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれおり、かつ作成対象のエリア定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量以下である場合、ステップS4に進み、作成対象のエリア定義領域が、親エリアコードを有するエリア定義領域の階層(親の階層)の子の階層として作成される。   On the other hand, when it is determined in step S2 that the code range and the number of allocated blocks of the area definition area to be created are appropriate, that is, the code range of the area definition area to be created has an area definition area having a parent area code. If the number of blocks allocated to the area definition area to be created is equal to or less than the free capacity stored in the area definition area having the parent area code, the process proceeds to step S4. The area definition area to be created is created as a child hierarchy of the hierarchy of the area definition area having the parent area code (parent hierarchy).

即ち、ステップS4では、EEPROM66(図4)の中の空きブロックのうち、最も下のブロック(論理アドレスの最も大きい空きブロック)が、作成対象のエリア定義領域に対応するエリア定義ブロックとして確保される。さらに、そのエリア定義ブロックに、コード範囲、空き容量、エリアキーなどが書き込まれる。ここで、ステップS4では、コード範囲およびエリアキーとしては、発券機101から送信されてきたものが、そのまま書き込まれる。また、空き容量としては、発券機101から送信されてきた割り当てブロック数から1を減算した値が書き込まれる。なお、空き容量として、割り当てブロック数から1を減算した値を書き込むのは、作成されたエリア定義領域が、1のブロックを使用するためである。   That is, in step S4, the lowest block (the empty block with the largest logical address) among the empty blocks in the EEPROM 66 (FIG. 4) is secured as the area definition block corresponding to the area definition area to be created. . Further, a code range, a free capacity, an area key, and the like are written in the area definition block. Here, in step S4, the code range and area key transmitted from the ticket issuing machine 101 are written as they are. Further, as the free space, a value obtained by subtracting 1 from the number of allocated blocks transmitted from the ticket issuing machine 101 is written. The reason why the value obtained by subtracting 1 from the number of allocated blocks is written as the free space because the created area definition area uses one block.

その後、ステップS5に進み、親エリアコードを有するエリア定義領域の空き容量が書き換えられ、エリア作成処理を終了する。即ち、ステップS5では、親エリアコードを有するエリア定義領域の空き容量から、割り当てブロック数を減算した値が、そのエリア定義領域の空き容量として、新たに書き込まれる。   Thereafter, the process proceeds to step S5, where the free space in the area definition area having the parent area code is rewritten, and the area creation process is terminated. That is, in step S5, a value obtained by subtracting the number of allocated blocks from the free capacity of the area definition area having the parent area code is newly written as the free capacity of the area definition area.

図5に示した管理者B1,B2,Cのエリア定義領域#0100h,#1000h,#0300hは、以上のエリア作成処理が行われることで作成される。   The area definition areas # 0100h, # 1000h, and # 0300h of the managers B1, B2, and C shown in FIG. 5 are created by performing the above area creation processing.

即ち、ICカード2の発行時において、その発行者でもある管理者Aが、ICカード2のリソースすべてを有しており、ICカード2の使用可能な識別コードまたは容量が、例えば、0000h乃至FFFFhまたは65533ブロックであるとすると、ICカード2の発行時においては、エリア定義領域としては、コード範囲が0000h乃至FFFFhで、空き容量が65532となっている、最上位階層のエリア定義領域#0000hだけが存在している。   That is, when the IC card 2 is issued, the administrator A who is also the issuer has all the resources of the IC card 2, and the usable identification code or capacity of the IC card 2 is, for example, 0000h to FFFFh. Or, if it is 65533 blocks, when the IC card 2 is issued, as the area definition area, only the area definition area # 0000h of the highest hierarchy having a code range of 0000h to FFFFh and a free space of 65532 is provided. Is present.

なお、本実施の形態では、図4に示したように、EEPROM66は、65536のブロックを有しているが、発行直後のICカード2において、使用可能な容量が、それより3ブロック少ない65533ブロックであるのは、図4に示したように、製造IDブロック、発行IDブロック、システム定義ブロックが存在するためである。   In the present embodiment, as shown in FIG. 4, the EEPROM 66 has 65536 blocks. However, in the IC card 2 immediately after issuance, the usable capacity is 3533 blocks less than that. This is because, as shown in FIG. 4, a manufacturing ID block, an issued ID block, and a system definition block exist.

また、最上位階層のエリア定義領域#0000hの空き容量が、使用可能な容量である65533ブロックより1ブロック少ない65532ブロックとなるのは、エリア定義領域#0000h自体が、1ブロックを使用するためである。   The reason why the free space of the area definition area # 0000h in the highest hierarchy is 65532 blocks which is one block less than the usable capacity 65533 blocks is because the area definition area # 0000h itself uses one block. is there.

管理者Aが、自身のリソースのうち、例えば、0100h乃至03FFhの範囲の識別コードと、33ブロックを、管理者B1に分け与える場合には、エリア作成処理が行われることにより、エリア定義領域#0100hが作成される。即ち、この場合、0100h乃至03FFhがコード範囲として、また、32ブロックが空き容量として、エリア定義領域#0100hに書き込まれる。なお、空き容量が、管理者Aから分け与えられる33ブロックより1ブロック少ないのは、エリア定義領域#0100h自体が、1ブロックを使用するからである。   In the case where the administrator A assigns, for example, an identification code in the range of 0100h to 03FFh and 33 blocks among his resources to the administrator B1, the area creation process is performed, so that the area definition area # 0100h Is created. That is, in this case, 0100h to 03FFh are written in the area definition area # 0100h as a code range and 32 blocks as free capacity. The reason why the free space is one block less than the 33 blocks allocated by the administrator A is that the area definition area # 0100h itself uses one block.

エリア定義領域#0100hが作成されると、管理者Aのエリア定義領域#0000hの空き容量は、管理者B1に分け与えた33ブロックだけ減らされる。   When the area definition area # 0100h is created, the free space in the area definition area # 0000h of the manager A is reduced by 33 blocks allocated to the manager B1.

また、管理者Aが、自身のリソースのうち、例えば、1000h乃至1FFFhの範囲の識別コードと、49ブロックを、管理者B2に分け与える場合には、エリア作成処理が行われることにより、エリア定義領域#1000hが作成される。即ち、この場合、1000h乃至1FFFhがコード範囲として、また、48ブロックが空き容量として、エリア定義領域#1000hに書き込まれる。なお、空き容量が、管理者Aから分け与えられる49ブロックより1ブロック少ないのは、エリア定義領域#1000h自体が、1ブロックを使用するからである。   In addition, when the administrator A distributes, for example, an identification code in the range of 1000h to 1FFFh and 49 blocks to his / her administrator B2 among his / her resources, the area definition region is obtained by performing area creation processing. # 1000h is created. That is, in this case, 1000h to 1FFFh are written in the area definition area # 1000h as the code range and 48 blocks as the free capacity. The reason why the free space is one block less than the 49 blocks allocated from the administrator A is that the area definition area # 1000h itself uses one block.

エリア定義領域#1000hが作成されると、管理者Aのエリア定義領域#0000hの空き容量は、管理者B2に分け与えた33ブロックだけ減らされる。   When the area definition area # 1000h is created, the free space in the area definition area # 0000h of the manager A is reduced by 33 blocks allocated to the manager B2.

管理者B1またはB2それぞれは、以上のようにして、エリア定義領域#0100hまたは#1000hが作成されると、そのエリア定義領域#0100hまたは#1000hの階層に、その子の階層としてのエリア定義領域や、サービス定義領域を作成することが可能となる。   When the area definition area # 0100h or # 1000h is created as described above, each of the managers B1 or B2 adds an area definition area as a child hierarchy to the area definition area # 0100h or # 1000h. It is possible to create a service definition area.

例えば、いま、管理者B1が、自身のリソースのうち、例えば、0300h乃至03FFhの範囲の識別コードと、18ブロックを、管理者Cに分け与える場合には、エリア作成処理が行われることにより、エリア定義領域#0300hが作成される。即ち、この場合、0300h乃至03FFhがコード範囲として、また、17ブロックが空き容量として、エリア定義領域#0300hに書き込まれる。なお、空き容量が、管理者B1から分け与えられる18ブロックより1ブロック少ないのは、エリア定義領域#0300h自体が、1ブロックを使用するからである。   For example, now, when the administrator B1 assigns, for example, an identification code in the range of 0300h to 03FFh and 18 blocks among his resources to the administrator C, area creation processing is performed, Definition area # 0300h is created. That is, in this case, 0300h to 03FFh are written in the area definition area # 0300h as the code range and 17 blocks as the free space. The reason why the free space is one block less than the 18 blocks allocated from the administrator B1 is that the area definition area # 0300h itself uses one block.

エリア定義領域#0300hが作成されると、管理者B1エリア定義領域#0100hの空き容量は、管理者Cに分け与えた18ブロックだけ減らされる。即ち、上述したように、エリア定義領域#0100hが作成された時点では、その空き領域は、32ブロックであったが、18ブロックだけ減らされて、図5に示したように、14ブロックとなる。   When the area definition area # 0300h is created, the free space of the administrator B1 area definition area # 0100h is reduced by 18 blocks allocated to the administrator C. That is, as described above, when the area definition area # 0100h is created, the empty area is 32 blocks, but is reduced by 18 blocks to 14 blocks as shown in FIG. .

次に、図8のフローチャートを参照して、サービス作成処理について説明する。   Next, the service creation process will be described with reference to the flowchart of FIG.

ICカード2が発券機101に装着されると、発券機101は、ICカード2に対して、サービス定義領域を作成することを指令するコマンド(以下、定義、サービス作成コマンドという)と、そのサービス定義領域を作成するために必要な情報、即ち、例えば、作成するサービス定義領域のサービスコード、そのサービス定義領域に割り当てられたブロック数(これも、以下、適宜、割り当てブロック数という)、サービスキー、およびサービス定義領域を作成する階層のエリア定義領域のエリアコード(これも、以下、適宜、親エリアコードという)などを送信する。   When the IC card 2 is attached to the ticket issuing machine 101, the ticket issuing machine 101 instructs the IC card 2 to create a service definition area (hereinafter referred to as definition and service creation command) and its service. Information necessary for creating the definition area, for example, the service code of the service definition area to be created, the number of blocks allocated to the service definition area (also referred to as the number of allocated blocks as appropriate hereinafter), service key , And the area code of the area definition area of the hierarchy in which the service definition area is created (hereinafter also referred to as the parent area code as appropriate) and the like.

ここで、サービス定義領域を作成するために必要な情報も、エリア作成処理における場合と同様に、セキュリティの観点から、例えば、親エリアコードを有するエリア定義領域に記憶されたエリアキーと同一のキーを用いて暗号化した状態で、ICカード2に送信するのが望ましい。   Here, the information necessary for creating the service definition area is the same key as the area key stored in the area definition area having the parent area code, for example, from the viewpoint of security, as in the area creation process. It is desirable to transmit the data to the IC card 2 in an encrypted state using.

ICカード2(シーケンサ91)は、サービス作成コマンドを受信すると、それとともに送信されてくる暗号化された情報を復号し、これにより、親エリアコード、並びに作成対象のサービス定義領域のサービスコード、割り当てブロック数、およびサービスキーなどを認識する。   When the IC card 2 (sequencer 91) receives the service creation command, it decrypts the encrypted information transmitted together with it, thereby the parent area code, the service code of the service definition area to be created, and the allocation Recognize the number of blocks and service keys.

そして、ICカード2では、ステップS11において、作成対象のサービス定義領域が、EEPROM66の中に既に作成されているかどうかが判定される。即ち、ステップS11では、作成対象のサービス定義領域のサービスコードと同一のサービスコードを有するサービス定義領域が、既に作成されているかどうかが判定される。   In step S11, the IC card 2 determines whether the service definition area to be created has already been created in the EEPROM 66. That is, in step S11, it is determined whether a service definition area having the same service code as the service code of the service definition area to be created has already been created.

ステップS11において、作成対象のサービス定義領域が既に作成されていると判定された場合、サービス作成処理を終了する。即ち、作成対象のサービス定義領域が既に作成されている場合は、同一のサービス定義領域を重複して作成する必要はないから、以降の処理は行われない。   If it is determined in step S11 that the service definition area to be created has already been created, the service creation process ends. That is, when the service definition area to be created has already been created, it is not necessary to create the same service definition area in duplicate, so that the subsequent processing is not performed.

また、ステップS11において、作成対象のサービス定義領域が作成されていないと判定された場合、ステップS12に進み、作成対象のサービス定義領域のサービスコードおよび割り当てブロック数(容量)が適正かどうかが判定される。即ち、ステップS12では、作成対象のサービス定義領域のサービスコードが、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれており、かつ作成対象のサービス定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量以下であるかどうかが判定される。   If it is determined in step S11 that the creation target service definition area has not been created, the process proceeds to step S12 to determine whether the service code and the number of allocated blocks (capacity) of the creation target service definition area are appropriate. Is done. That is, in step S12, the service code of the service definition area to be created is included in the code range stored in the area definition area having the parent area code, and the number of allocated blocks of the service definition area to be created is Then, it is determined whether or not it is less than the free space stored in the area definition area having the parent area code.

ステップS12において、作成対象のサービス定義領域のサービスコードおよび割り当てブロック数が適正でないと判定された場合、即ち、作成対象のサービス定義領域のサービスコードが、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれていないか、または作成対象のサービス定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量を越えている場合、ステップS13に進み、エラー処理が行われ、エリア作成処理を終了する。即ち、ステップS3では、例えば、親エリアコードを有するエリア定義領域の階層に、サービス定義領域を作成することができない旨のメッセージが、発券機101に送信される。従って、この場合、サービス定義領域は作成されない。   If it is determined in step S12 that the service code and the number of allocated blocks in the service definition area to be created are not appropriate, that is, the service code in the service definition area to be created is stored in the area definition area having the parent area code. If the number is not included in the code range or the number of allocated blocks of the service definition area to be created exceeds the free space stored in the area definition area having the parent area code, the process proceeds to step S13. Error processing is performed, and the area creation processing ends. That is, in step S3, for example, a message indicating that the service definition area cannot be created in the hierarchy of the area definition area having the parent area code is transmitted to the ticket issuing machine 101. Therefore, in this case, the service definition area is not created.

一方、ステップS12において、作成対象のサービス定義領域のサービスコードおよび割り当てブロック数が適正であると判定された場合、即ち、作成対象のサービス定義領域のサービスコードが、親エリアコードを有するエリア定義領域に記憶されているコード範囲に含まれおり、かつ作成対象のサービス定義領域の割り当てブロック数が、親エリアコードを有するエリア定義領域に記憶されている空き容量以下である場合、ステップS14に進み、作成対象のサービス定義領域が、親エリアコードを有するエリア定義領域の階層に作成される。   On the other hand, if it is determined in step S12 that the service code and the number of allocated blocks in the service definition area to be created are appropriate, that is, the area definition area in which the service code in the service definition area to be created has a parent area code. If the number of blocks allocated in the service definition area to be created is equal to or less than the free capacity stored in the area definition area having the parent area code, the process proceeds to step S14. A service definition area to be created is created in a hierarchy of area definition areas having a parent area code.

即ち、ステップS14では、EEPROM66(図4)の中の空きブロックのうち、最も下のブロック(論理アドレスの最も大きい空きブロック)が、作成対象のサービス定義領域に対応するサービス定義ブロックとして確保される。さらに、そのサービス定義ブロックに、サービスコード、容量、サービスキーなどが書き込まれる。ここで、ステップS14では、サービスコードおよびサービスキーとしては、発券機101から送信されてきたものが、そのまま書き込まれる。また、容量としては、発券機101から送信されてきた割り当てブロック数から1を減算した値が書き込まれる。なお、容量として、割り当てブロック数から1を減算した値を書き込むのは、作成されたサービス定義領域が、1のブロックを使用するためである。   That is, in step S14, the lowest block (the empty block with the largest logical address) among the empty blocks in the EEPROM 66 (FIG. 4) is secured as the service definition block corresponding to the service definition area to be created. . Further, a service code, a capacity, a service key, and the like are written in the service definition block. Here, in step S14, the service code and the service key transmitted from the ticket issuing machine 101 are written as they are. As the capacity, a value obtained by subtracting 1 from the number of allocated blocks transmitted from the ticket issuing machine 101 is written. The reason why the value obtained by subtracting 1 from the number of allocated blocks is written as the capacity because the created service definition area uses one block.

また、ステップS14では、作成されたサービス定義領域に書き込まれた容量に対応する数の空きブロックが、論理アドレスの小さい順に選択され、そのサービス定義領域が管理するサービス領域を構成するユーザブロックとして確保され、ステップS15に進む。   In step S14, the number of empty blocks corresponding to the capacity written in the created service definition area is selected in ascending order of logical addresses, and secured as user blocks constituting the service area managed by the service definition area. Then, the process proceeds to step S15.

ステップS15では、親エリアコードを有するエリア定義領域の空き容量が書き換えられ、サービス作成処理を終了する。即ち、ステップS15では、親エリアコードを有するエリア定義領域の空き容量から、割り当てブロック数を減算した値が、そのエリア定義領域の空き容量として、新たに書き込まれる。   In step S15, the free space in the area definition area having the parent area code is rewritten, and the service creation process ends. That is, in step S15, a value obtained by subtracting the number of allocated blocks from the free capacity of the area definition area having the parent area code is newly written as the free capacity of the area definition area.

図5に示した管理者A,B2,Cのサービス定義領域#0008h,#1022h,#030Chは、以上のサービス作成処理が行われることで作成される。   The service definition areas # 0008h, # 1022h, and # 030Ch of the managers A, B2, and C shown in FIG. 5 are created by performing the above service creation process.

即ち、管理者Aが、自身のリソースのうち、例えば、0008hの識別コードと、9ブロックの容量を用いてサービスの提供を行う場合には、サービス作成処理が行われることにより、サービス定義領域#0008hが作成され、そこに、容量として、8ブロックが書き込まれる。さらに、8個の空きブロックがユーザブロックとして確保され、エリア定義領域#0008hによって管理されるサービス領域とされる。なお、サービス定義領域#0008hに書き込まれる容量が、9ブロックより1ブロック少ないのは、サービス定義領域#0008h自体が、1ブロックを使用するからである。   That is, when the administrator A provides a service using, for example, an identification code of 0008h and a capacity of 9 blocks among his own resources, the service creation process is performed, so that the service definition area # 0008h is created, and 8 blocks are written therein as a capacity. Further, eight free blocks are secured as user blocks and are service areas managed by area definition area # 0008h. The reason why the capacity written in service definition area # 0008h is one block less than nine blocks is that service definition area # 0008h itself uses one block.

サービス定義領域#0008hが作成されると、管理者Aのエリア定義領域#0000hの空き容量は、サービス定義領域#0008hに分け与えた9ブロックだけ減らされる。   When the service definition area # 0008h is created, the free space in the area definition area # 0000h of the manager A is reduced by 9 blocks allocated to the service definition area # 0008h.

以上により、管理者Aは、サービス定義領域#0008hで管理される8ブロックのサービス領域を用いて、サービスを提供することが可能となる。   As described above, the administrator A can provide a service using the 8-block service area managed in the service definition area # 0008h.

また、管理者B2が、自身のリソースのうち、例えば、1022hの識別コードと、5ブロックの容量を用いてサービスの提供を行う場合には、サービス作成処理が行われることにより、サービス定義領域#1022hが作成され、そこに、容量として、4ブロックが書き込まれる。さらに、4個の空きブロックがユーザブロックとして確保され、エリア定義領域#1022hによって管理されるサービス領域とされる。なお、サービス定義領域#1022hに書き込まれる容量が、5ブロックより1ブロック少ないのは、サービス定義領域#1022h自体が、1ブロックを使用するからである。   In addition, when the administrator B2 provides a service using, for example, an identification code of 1022h and a capacity of 5 blocks among his own resources, the service creation process is performed, so that the service definition area # 1022h is created, and 4 blocks are written there as capacity. Further, four empty blocks are secured as user blocks and are service areas managed by area definition area # 1022h. The reason that the capacity written in service definition area # 1022h is one block less than five blocks is that service definition area # 1022h itself uses one block.

サービス定義領域#1022hが作成されると、管理者B2のエリア定義領域#1000hの空き容量は、サービス定義領域#1022hに分け与えた5ブロックだけ減らされる。即ち、上述したように、エリア定義領域#1000hが作成された時点では、その空き容量は、48ブロックであったが、5ブロックだけ減らされて、図5に示したように、43ブロックとなる。   When the service definition area # 1022h is created, the free space in the area definition area # 1000h of the administrator B2 is reduced by 5 blocks allocated to the service definition area # 1022h. That is, as described above, when the area definition area # 1000h is created, the free space is 48 blocks, but is reduced by 5 blocks to 43 blocks as shown in FIG. .

以上により、管理者B2は、サービス定義領域#1022hで管理される4ブロックのサービス領域を用いて、サービスを提供することが可能となる。   As described above, the administrator B2 can provide a service by using the 4-block service area managed in the service definition area # 1022h.

さらに、管理者Cが、自身のリソースのうち、例えば、030Chの識別コードと、17ブロックの容量を用いてサービスの提供を行う場合には、サービス作成処理が行われることにより、サービス定義領域#030Chが作成され、そこに、容量として、16ブロックが書き込まれる。さらに、16個の空きブロックがユーザブロックとして確保され、エリア定義領域#030Chによって管理されるサービス領域とされる。なお、サービス定義領域#030Chに書き込まれる容量が、17ブロックより1ブロック少ないのは、サービス定義領域#030Ch自体が、1ブロックを使用するからである。   Furthermore, when the administrator C provides a service using, for example, an identification code of 030Ch and a capacity of 17 blocks among its own resources, the service creation process is performed, so that the service definition area # 030Ch is created, and 16 blocks are written therein as the capacity. Further, 16 free blocks are secured as user blocks, which are service areas managed by area definition area # 030Ch. The reason that the capacity written to the service definition area # 030Ch is one block less than 17 blocks is that the service definition area # 030Ch itself uses one block.

サービス定義領域#030Chが作成されると、管理者Cのエリア定義領域#0300hの空き容量は、サービス定義領域#030Chに分け与えた17ブロックだけ減らされる。即ち、上述したように、エリア定義領域#0300hが作成された時点では、その空き容量は、17ブロックであったが、17ブロックだけ減らされて、図5に示したように、0ブロックとなる。   When the service definition area # 030Ch is created, the free space in the area definition area # 0300h of the administrator C is reduced by 17 blocks allocated to the service definition area # 030Ch. That is, as described above, when the area definition area # 0300h is created, the free space is 17 blocks, but is reduced by 17 blocks to become 0 blocks as shown in FIG. .

以上により、管理者Cは、サービス定義領域#030Chで管理される16ブロックのサービス領域を用いて、サービスを提供することが可能となる。   As described above, the administrator C can provide a service using the 16-block service area managed in the service definition area # 030Ch.

以上のように、コード範囲および空き容量を記憶しているエリア定義領域に基づいて、EEPROM66を管理するようにしたので、ICカード2のリソース管理を行うことが可能となる。即ち、あるエリア定義領域の階層の中で使用可能な容量および識別コードを制限することができる。   As described above, since the EEPROM 66 is managed based on the area definition area storing the code range and the free space, the resource management of the IC card 2 can be performed. That is, it is possible to limit the capacity and identification code that can be used in a certain area definition area hierarchy.

ところで、ICカードを、複数の管理者によるサービスの提供に用いる場合には、その複数の管理者それぞれに、階層としてのDFを割り当て、そのDFに、各管理者によるサービスの提供に供するデータとしてのEFを格納するようにする方法が考えられる。   By the way, when the IC card is used for providing services by a plurality of managers, a DF as a hierarchy is assigned to each of the plurality of managers, and the DF is used as data for providing services by each manager. It is conceivable to store the EFs.

しかしながら、ISO7816等では、DFごとに、使用可能な容量や、DFおよびEFを識別するための識別コード(ファイル名やディレクトリ名に相当する)などのICカードのリソースを制限することが困難であった。   However, in ISO7816 etc., it is difficult to limit the resources of the IC card such as the usable capacity and the identification code (corresponding to the file name and directory name) for identifying the DF and EF for each DF. It was.

このため、識別コードが、異なる管理者の間で重複することを防止したり、管理者が、あらかじめ、契約等で定められた容量を超えてICカードが内蔵するメモリを使用することを制限すること等が困難であった。   For this reason, it is possible to prevent the identification code from being duplicated between different administrators, or to restrict the administrator from using the memory built in the IC card beyond the capacity determined in advance by a contract or the like. It was difficult.

ここで、上述したように、本実施の形態のICカード2においては、コード範囲および空き容量を記憶しているエリア定義領域に基づいて、EEPROM66を管理するようにしたので、ICカード2のリソース管理を行うことが可能となる。即ち、あるエリア定義領域の階層の中で使用可能な容量および識別コードを制限することができる。その結果、例えば、ある管理者が、自身に割り当てられたリソース(ここでは、使用可能な容量および識別コード)の一部を、他の管理者に分け与えて、ICカード2を共有したとしても、識別コードが、異なる管理者の間で重複することや、管理者が、あらかじめ、契約等で定められた容量を超えてEEPROM66を使用することなどを防止することができる。   Here, as described above, in the IC card 2 of the present embodiment, the EEPROM 66 is managed based on the area definition area in which the code range and the free space are stored. Management can be performed. That is, it is possible to limit the capacity and identification code that can be used in a certain area definition area hierarchy. As a result, for example, even if a certain administrator shares a part of the resources (here, usable capacity and identification code) assigned to the other administrator and shares the IC card 2, It is possible to prevent the identification code from being duplicated between different managers, and the manager from using the EEPROM 66 exceeding the capacity determined in advance by a contract or the like.

次に、ICカード2では、図5で説明したように、EEPROM66の記憶領域が、エリア定義領域を階層とする階層構造をなしており、さらに、各エリア定義領域およびサービス定義領域に、認証のためのキー(本実施の形態では、エリア定義領域またはサービス定義領域のキーを、それぞれエリアキーまたはサービスキーと呼んでいる)が記憶されている結果、ICカード2に対するフレキシブルでセキュリティの高いアクセス制御を行うことが可能となっている。   Next, in the IC card 2, as described in FIG. 5, the storage area of the EEPROM 66 has a hierarchical structure with the area definition area as a hierarchy, and each area definition area and service definition area includes authentication. Key (in this embodiment, the area definition area or service definition area key is referred to as an area key or service key, respectively) is stored. As a result, flexible and highly secure access control to the IC card 2 It is possible to do.

即ち、管理者どうしの間において、例えば、図9に示すような情報のやりとりを行うことで、ICカード2に対するフレキシブルでセキュリティの高いアクセス制御を実現することができる。   That is, by exchanging information as shown in FIG. 9 between the managers, for example, flexible and highly secure access control to the IC card 2 can be realized.

具体的には、ICカード2の発行者でもある管理者Aは、EEPROM66(図4)のシステム定義ブロックに記憶させるシステムキーと、自身のエリア定義領域#0000hのエリアキーを決定し、システムキーをシステム定義ブロックに、エリアキー#0000hをエリア定義領域#0000hに、それぞれ記憶させておく。ここで、エリア定義領域#xxxxhのエリアキーを、以下、適宜、エリアキー#xxxxhと記載する。   Specifically, the administrator A who is also the issuer of the IC card 2 determines the system key to be stored in the system definition block of the EEPROM 66 (FIG. 4) and the area key of its own area definition area # 0000h. Are stored in the system definition block, and the area key # 0000h is stored in the area definition area # 0000h. Here, the area key of the area definition area #xxxxh is hereinafter referred to as area key #xxxxh as appropriate.

さらに、管理者Aは、システムキーを、エリアキー#0000hで暗号化し、エリア中間キーKAを生成しておく。なお、暗号化の手法としては、例えば、DES(Data Encryption Standard)や、FEAL(Fast Data Encipherment Algolithm)などを採用することができる。 Further, the manager A is the system key, encrypted with the area key # 0000h, keep generating the area intermediate key K A. As an encryption method, for example, DES (Data Encryption Standard), FEAL (Fast Data Encipherment Algolithm), or the like can be adopted.

そして、管理者Aは、自身のリソースを、管理者B1に分け与えるとき、エリア中間キーKAを、管理者B1に与える。さらに、管理者Aは、管理者B1のエリアキー#0100hを決定し、自身のエリアコード#0000hとともに、管理者B1に与える(配布する)。 Then, the administrator A is, its own resources, when to be given to the manager B1, the area intermediate key K A, give the administrator B1. Furthermore, the administrator A determines the area key # 0100h of the administrator B1, and gives (distributes) it to the administrator B1 together with his area code # 0000h.

従って、管理者B1は、エリア中間キーKAおよび自身のエリアキー#0100hを認識することができるが、システムキー、および、いわば親である管理者Aのエリアキー#0000hは認識することができない。但し、管理者B1のエリアキー#0100hは、親である管理者Aが、いわば子である管理者B1に与えたものであるから、親である管理者Aは、子である管理者B1のエリアキー#0100hを認識している。 Accordingly, the manager B1 is able to recognize the area intermediate key K A and its area key # 0100h, system key, and can not speak area key # 0000h of the manager A which is a parent recognizes . However, the area key # 0100h of the manager B1 is given by the parent manager A to the manager B1 who is a child, so the manager A who is the parent is the child manager B1. Area key # 0100h is recognized.

なお、管理者Aが管理者B1に与えたエリアキー#0100hは、管理者B1のエリア定義領域#0100hのエリア作成処理(図7)において、そのエリア定義領域#0100hに書き込まれる。   The area key # 0100h given by the administrator A to the administrator B1 is written to the area definition area # 0100h in the area creation process (FIG. 7) of the area definition area # 0100h of the administrator B1.

管理者B1は、その親である管理者Aから得たエリア中間キーKAを、やはり管理者Aから得たエリアキー#0100hで暗号化し、エリア中間キーKB1を生成しておく。 The manager B1 is its parent area intermediate key K A obtained from the manager A, encrypted by still area key # 0100h obtained from the manager A, should generate the area intermediate key K B1.

また、管理者Aは、自身のリソースを、管理者B2に分け与えるときも、エリア中間キーKAを、管理者B2に与える。さらに、管理者Aは、管理者B2のエリアキー#1000hを決定し、自身のエリアコード#0000hとともに、管理者B2に与える。 Further, the manager A is the own resources, even when to be given to the manager B2, the area intermediate key K A, giving the administrator B2. Furthermore, the manager A determines the area key # 1000h of the manager B2, and gives it to the manager B2 together with his area code # 0000h.

従って、管理者B2は、エリア中間キーKAおよび自身のエリアキー#1000hを認識することができるが、システムキー、および親である管理者Aのエリアキー#0000hは認識することができない。但し、管理者B2のエリアキー#1000hは、親である管理者Aが、子である管理者B2に与えたものであるから、親である管理者Aは、子である管理者B2のエリアキー#1000hを認識している。 Therefore, the administrator B2 is able to recognize the area intermediate key K A and its area key # 1000h, system key, and the parent manager A area key # 0000h can not recognize. However, the area key # 1000h of the administrator B2 is given to the administrator B2 who is the child by the parent administrator A, so the parent administrator A is the area of the child administrator B2. Key # 1000h is recognized.

なお、管理者Aが管理者B2に与えたエリアキー#1000hは、管理者B2のエリア定義領域#1000hのエリア作成処理において、そのエリア定義領域#1000hに書き込まれる。   The area key # 1000h given by the administrator A to the administrator B2 is written to the area definition area # 1000h in the area creation process of the area definition area # 1000h of the administrator B2.

管理者B2は、その親である管理者Aから得たエリア中間キーKAを、やはり管理者Aから得たエリアキー#1000hで暗号化し、エリア中間キーKB2を生成しておく。 Administrators B2 is its parent area intermediate key K A obtained from the manager A, encrypted by still area key # 1000h obtained from the manager A, should generate the area intermediate key K B2.

一方、管理者B1は、自身のリソースを、管理者Cに分け与えるとき、エリア中間キーKB1を、管理者Cに与える。さらに、管理者B1は、管理者Cのエリアキー#0300hを決定し、自身のエリアコード#0100hおよび親である管理者Aのエリアコード#0000hとともに、管理者Cに与える。 On the other hand, when the administrator B1 assigns his / her resources to the administrator C, the administrator B1 gives the area intermediate key KB1 to the administrator C. Furthermore, the administrator B1 determines the area key # 0300h of the administrator C and gives it to the administrator C together with his area code # 0100h and the area code # 0000h of the parent administrator A.

従って、管理者Cは、エリア中間キーKB1および自身のエリアキー#03000hを認識することができるが、親である管理者B1のエリアキー#0100hは認識することができない。但し、エリアキー#0100hは、親である管理者B1が、子である管理者Cに与えたものであるから、親である管理者B1は、子である管理者Cのエリアキー#0300hを認識している。 Accordingly, the administrator C can recognize the area intermediate key K B1 and his / her area key # 03000h, but cannot recognize the area key # 0100h of the parent administrator B1. However, the area key # 0100h is given by the parent administrator B1 to the child administrator C, and therefore the parent administrator B1 assigns the child administrator C area key # 0300h. It has recognized.

なお、管理者B1が管理者Cに与えたエリアキー#0300hは、管理者Cのエリア定義領域#0300hのエリア作成処理において、そのエリア定義領域#0300hに書き込まれる。   The area key # 0300h given to the administrator C by the administrator B1 is written into the area definition area # 0300h in the area creation process of the area definition area # 0300h of the administrator C.

管理者Cは、その親である管理者B1から得たエリア中間キーKB1を、やはり管理者B1から得たエリアキー#0300hで暗号化し、エリア中間キーKCを生成しておく。 The administrator C encrypts the area intermediate key K B1 obtained from the parent administrator B1 with the area key # 0300h obtained from the administrator B1 to generate the area intermediate key K C.

そして、管理者Aは、自身のエリア定義領域#0000hの階層に作成されたサービス定義領域#0008hで管理されるサービス領域を利用してサービスを提供するとき、図10に示すように、サービス定義領域#0008hに記憶させたサービスキー(サービス定義領域#xxxxhに記憶されたサービスキーを、以下、適宜、サービスキー#xxxxhと記載する)を、エリア中間キーKAで暗号化し、サービス中間キーK#0008hを生成して、エリア中間キーKAとともに、サービス提供装置111に登録する。さらに、管理者Aは、自身のエリア定義領域#0000hのエリアコード#0000hと、そのエリア定義領域#0000hの階層に作成されたサービス定義領域#0008hのサービスコード#0008hも、サービス提供装置111に登録する。 Then, when the administrator A provides a service using the service area managed in the service definition area # 0008h created in the hierarchy of the area definition area # 0000h, as shown in FIG. The service key stored in the area # 0008h (the service key stored in the service definition area #xxxxh is hereinafter referred to as a service key #xxxxh as appropriate) is encrypted with the area intermediate key K A , and the service intermediate key K # to generate 0008h, together with the area intermediate key K a, and registers the service providing apparatus 111. Further, the administrator A also sends the area code # 0000h of the area definition area # 0000h and the service code # 0008h of the service definition area # 0008h created in the hierarchy of the area definition area # 0000h to the service providing apparatus 111. sign up.

ここで、サービス提供装置111は、例えば、図1のR/W1とコントローラ3から構成され、所定のサービス領域に対してデータを読み書きすることで、所定のサービスを提供するようになされている。   Here, the service providing apparatus 111 includes, for example, the R / W 1 and the controller 3 in FIG. 1 and provides a predetermined service by reading and writing data in a predetermined service area.

この場合、サービス提供装置111に、ICカード2が装着されると、サービス提供装置111とICカード2との間で、次のようにして相互認証が行われる。   In this case, when the IC card 2 is attached to the service providing apparatus 111, mutual authentication is performed between the service providing apparatus 111 and the IC card 2 as follows.

即ち、サービス提供装置111は、図11に示すように、登録されているエリアコード#0000hと、サービスコード#0008hとを、ICカード2に送信する。ICカード2(シーケンサ91)では、サービス提供装置111からのエリアコード#0000hおよびサービスコード#0008hが受信される。   That is, the service providing apparatus 111 transmits the registered area code # 0000h and service code # 0008h to the IC card 2 as shown in FIG. The IC card 2 (sequencer 91) receives the area code # 0000h and the service code # 0008h from the service providing apparatus 111.

そして、ICカード2では、システム定義ブロック(図4)に記憶されているシステムキーが読み出されるとともに、サービス提供装置111から受信したエリアコード#0000hを有するエリア定義領域からエリアキー#0000hが読み出される。さらに、システムキーが、エリアキー#0000hで暗号化され、その結果、図10のサービス提供装置111に登録されているエリア中間キーKAと同一のキーが生成される。このエリア中間キーKAと同一のキーは、認証に用いる第1アクセスキー(認証キー)Kbcとされる。 Then, in the IC card 2, the system key stored in the system definition block (FIG. 4) is read, and the area key # 0000h is read from the area definition area having the area code # 0000h received from the service providing apparatus 111. . Further, the system key is encrypted by the area key # 0000h, the result, the same key as the area intermediate key K A registered in the service providing apparatus 111 of FIG. 10 is generated. The area the same key and the intermediate key K A is the first access key (authentication key) K bc used for certification.

また、ICカード2では、サービス提供装置111から受信したサービスコード#0008hを有するサービス定義領域からサービスキー#0008hが読み出される。そして、そのサービスキー#0008hで、エリア中間キーKAが暗号化され、その結果、図10のサービス提供装置111に登録されているサービス中間キーK#0008hと同一のキーが生成される。このサービス中間キーK#0008hと同一のキーは、認証に用いる第2アクセスキーKacとされる。 Also, in the IC card 2, the service key # 0008h is read from the service definition area having the service code # 0008h received from the service providing apparatus 111. Then, in the service key # 0008h, the area intermediate key K A is encrypted, so that the service intermediate key K # 0008h same key as that registered in the service providing apparatus 111 of FIG. 10 is generated. The same key as the service intermediate key K # 0008h is used as the second access key K ac used for authentication.

従って、いまの場合、サービス提供装置111には、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKAまたはサービス中間キーK#0008hが登録されており、ICカード2では、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKAまたはサービス中間キーK#0008hが生成される。 Therefore, in this case, the service providing apparatus 111 is registered with the area intermediate key K A or the service intermediate key K # 0008h which is the first access key K bc or the second access key K ac. The area intermediate key K A or the service intermediate key K # 0008h, which is the first access key K bc or the second access key K ac , is generated.

そして、サービス提供装置111は、例えば、図12に示すようにして、ICカード2の認証を行う。   Then, the service providing apparatus 111 authenticates the IC card 2 as shown in FIG. 12, for example.

即ち、サービス提供装置111では、乱数が発生され、その乱数が、アルゴリズムE1にしたがって変換される。即ち、乱数が、第2アクセスキーKacで暗号化(例えば、DES暗号化)され、その暗号化結果が、第1アクセスキーKbcで復号(例えば、DES復号)される。さらに、その復号結果が、第2アクセスキーKacで暗号化される。アルゴリズムE1による乱数の変換結果は、ICカード2に送信される。 That is, the service providing apparatus 111 generates a random number and converts the random number according to the algorithm E1. That is, the random number is encrypted with the second access key Kac (for example, DES encryption), and the encryption result is decrypted with the first access key Kbc (for example, DES decryption). Further, the decryption result is encrypted with the second access key K ac . The conversion result of the random number by the algorithm E1 is transmitted to the IC card 2.

ICカード2では、サービス提供装置111からのアルゴリズムE1による乱数の変換結果が、アルゴルズムD1にしたがって変換される。即ち、アルゴリズムE1による変換結果が、第2アクセスキーKacで復号され、その復号結果が、第1アクセスキーKbcで暗号化される。さらに、その暗号化結果が、第2アクセスキーKacで復号される。 In the IC card 2, the conversion result of the random number by the algorithm E1 from the service providing apparatus 111 is converted according to the algorithm D1. That is, the conversion result by the algorithm E1 is decrypted with the second access key Kac , and the decryption result is encrypted with the first access key Kbc . Further, the encryption result is decrypted with the second access key K ac .

そして、ICカード2では、アルゴリズムD1による変換結果が、さらに、アルゴリズムE2にしたがって変換される。即ち、アルゴリズムD1による変換結果が、第1アクセスキーKbcで暗号化される一方、第1アクセスキーKbcが、第2アクセスキーKacで暗号化される。そして、アルゴリズムD1による変換結果の、第1アクセスキーKbcでの暗号化結果が、第1アクセスキーKbcの、第2アクセスキーKacでの暗号化結果で復号される。さらに、その復号結果が、第1アクセスキーKbcで暗号化され、サービス提供装置111に送信される。 In the IC card 2, the conversion result by the algorithm D1 is further converted according to the algorithm E2. That is, the conversion result by the algorithm D1 is encrypted with the first access key Kbc , while the first access key Kbc is encrypted with the second access key Kac . Then, the encryption result of the conversion result by the algorithm D1 with the first access key Kbc is decrypted with the encryption result of the first access key Kbc and the second access key Kac . Further, the decryption result is encrypted with the first access key K bc and transmitted to the service providing apparatus 111.

サービス提供装置111では、ICカード2からのアルゴリズムE2による変換結果が、アルゴリズムD2にしたがって変換される。即ち、アルゴリズムE2による変換結果が、第1アクセスキーKbcで復号される一方、第1アクセスキーKbcが、第2アクセスキーKacで暗号化される。そして、アルゴリズムE2による変換結果の、第1アクセスキーKbcでの復号結果が、第1アクセスキーKbcの、第2アクセスキーKacでの暗号化結果で暗号化される。さらに、その暗号化結果が、第1アクセスキーKbcで復号される。 In the service providing apparatus 111, the conversion result by the algorithm E2 from the IC card 2 is converted according to the algorithm D2. That is, the conversion result by the algorithm E2 is decrypted with the first access key Kbc , while the first access key Kbc is encrypted with the second access key Kac . Then, the decryption result of the conversion result by the algorithm E2 with the first access key Kbc is encrypted with the encryption result of the first access key Kbc with the second access key Kac . Further, the encryption result is decrypted with the first access key Kbc .

そして、サービス提供装置111では、元の乱数と、アルゴリズムD2による変換結果とを比較することで、ICカード2の認証を行う。即ち、元の乱数と、アルゴリズムD2による変換結果とが一致している場合は、ICカード2が適正なものとして認識され、一致していない場合は、ICカード2が不適正なもの(例えば、偽造されたもの)として認識される。   Then, the service providing apparatus 111 authenticates the IC card 2 by comparing the original random number and the conversion result by the algorithm D2. That is, when the original random number matches the conversion result by the algorithm D2, the IC card 2 is recognized as appropriate, and when it does not match, the IC card 2 is inappropriate (for example, Forged).

ICカード2が適正なものとして認識されると、ICカード2において、例えば、図13に示すようにして、サービス提供装置111の認証が行われる。   When the IC card 2 is recognized as being appropriate, the service providing apparatus 111 is authenticated in the IC card 2, for example, as shown in FIG.

即ち、ICカード2では、乱数が発生され、その乱数が、アルゴリズムE2にしたがって変換され、サービス提供装置111に送信される。   In other words, the IC card 2 generates a random number, which is converted according to the algorithm E2 and transmitted to the service providing apparatus 111.

サービス提供装置111では、ICカード2からのアルゴリズムE2による乱数の変換結果が、アルゴルズムD2にしたがって変換される。さらに、そのアルゴリズムD2による変換結果が、アルゴリズムE1にしたがって変換され、ICカード2に送信される。   In the service providing apparatus 111, the conversion result of the random number by the algorithm E2 from the IC card 2 is converted according to the algorithm D2. Further, the conversion result by the algorithm D2 is converted according to the algorithm E1 and transmitted to the IC card 2.

ICカード2では、サービス提供装置111からのアルゴリズムE1による変換結果が、アルゴリズムD1にしたがって変換され、その変換結果と、元の乱数とを比較することで、サービス提供装置111の認証が行われる。即ち、元の乱数と、アルゴリズムD2による変換結果とが一致している場合は、サービス提供装置111が適正なものとして認識され、一致していない場合は、サービス提供装置111が不適正なもの(例えば、改造されたもの)として認識される。   In the IC card 2, the conversion result by the algorithm E1 from the service providing apparatus 111 is converted in accordance with the algorithm D1, and the service providing apparatus 111 is authenticated by comparing the conversion result with the original random number. That is, when the original random number matches the conversion result by the algorithm D2, the service providing apparatus 111 is recognized as appropriate, and when the original random number does not match, the service providing apparatus 111 is inappropriate ( For example, it is recognized as a modified one).

ICカード2およびサービス提供装置111のいずれも適正なものと認められた場合、ICカード2では、サービス提供装置111から送信されてきたサービスコードを有するサービス定義領域によって管理されているサービス領域のみへのアクセスが許可される。従って、図10および図11で説明した場合においては、サービス定義領域#0008hで管理されているサービス領域のみへのアクセスが可能となる。   When both the IC card 2 and the service providing apparatus 111 are recognized as being appropriate, the IC card 2 is directed only to the service area managed by the service definition area having the service code transmitted from the service providing apparatus 111. Access is allowed. Accordingly, in the case described with reference to FIGS. 10 and 11, only the service area managed in the service definition area # 0008h can be accessed.

即ち、エリア中間キーKA、エリアコード#0000h、サービスキー#0008h、およびサービスコード#0008hを知っている管理者Aは、サービス定義領域#0008hで管理されているサービス領域にアクセスすることができる。但し、管理者Aは、サービスキー#1022hや#030Chを知らないから、基本的に、サービス定義領域#1022hや#030Chで管理されているサービス領域にアクセスすることはできない。 That is, the administrator A who knows the area intermediate key K A , area code # 0000h, service key # 0008h, and service code # 0008h can access the service area managed in the service definition area # 0008h. . However, since the administrator A does not know the service key # 1022h or # 030Ch, basically, the administrator A cannot access the service area managed by the service definition area # 1022h or # 030Ch.

次に、管理者B2が、自身のエリア定義領域#1000hの階層に作成されたサービス定義領域#1022hで管理されるサービス領域を利用してサービスを提供するときは、図14に示すように、サービス定義領域#1022hに記憶させたサービスキー#1022hを、エリア中間キーKB2で暗号化し、サービス中間キーK#1022hを生成して、エリア中間キーKB2とともに、サービス提供装置111に登録する。そして、管理者B2は、自身のエリア定義領域#1000hの階層より上位の階層のエリア定義領域のエリアコード、即ち、いまの場合、管理者Aのエリア定義領域#0000hのエリアコード#0000h、および自身のエリア定義領域#1000hのエリアコード#1000hと、そのエリア定義領域#1000hの階層に作成されたサービス定義領域#1022hのサービスコード#1022hも、サービス提供装置111に登録する。 Next, when the administrator B2 provides a service using the service area managed in the service definition area # 1022h created in the hierarchy of its own area definition area # 1000h, as shown in FIG. The service key # 1022h stored in the service definition area # 1022h is encrypted with the area intermediate key K B2 to generate the service intermediate key K # 1022h and is registered in the service providing apparatus 111 together with the area intermediate key K B2 . Then, the administrator B2 has the area code of the area definition area higher than the hierarchy of its own area definition area # 1000h, in this case, the area code # 0000h of the area definition area # 0000h of the administrator A, and The area code # 1000h of its own area definition area # 1000h and the service code # 1022h of the service definition area # 1022h created in the hierarchy of the area definition area # 1000h are also registered in the service providing apparatus 111.

この場合、サービス提供装置111に、ICカード2が装着されると、サービス提供装置111とICカード2との間で、次のようにして相互認証が行われる。   In this case, when the IC card 2 is attached to the service providing apparatus 111, mutual authentication is performed between the service providing apparatus 111 and the IC card 2 as follows.

即ち、サービス提供装置111は、図15に示すように、登録されているエリアコード#0000hおよび#1000hと、サービスコード#1022hとを、ICカード2に送信する。ICカード2(シーケンサ91)では、サービス提供装置111からのエリアコード#0000hおよび#1000h、並びにサービスコード#1022hが受信される。   That is, the service providing apparatus 111 transmits the registered area codes # 0000h and # 1000h and the service code # 1022h to the IC card 2 as shown in FIG. The IC card 2 (sequencer 91) receives the area codes # 0000h and # 1000h and the service code # 1022h from the service providing apparatus 111.

そして、ICカード2では、システム定義ブロック(図4)に記憶されているシステムキーが読み出されるとともに、サービス提供装置111から受信したエリアコード#0000hまたは#1000hを有するエリア定義領域それぞれからエリアキー#0000hまたは#1000hが読み出される。さらに、システムキーが、エリアキー#0000hで暗号化され、その結果、エリア中間キーKAと同一のキーが生成される。そして、そのエリア中間キーKAと同一のキーが、エリアキー#1000hで暗号化され、その結果、図14のサービス提供装置111に登録されているエリア中間キーKB2と同一のキーが生成される。このエリア中間キーKB2と同一のキーは、認証に用いる第1アクセスキーKbcとされる。 In the IC card 2, the system key stored in the system definition block (FIG. 4) is read out, and the area key #from each area definition area having the area code # 0000h or # 1000h received from the service providing apparatus 111 is read. 0000h or # 1000h is read out. Further, the system key is encrypted by the area key # 0000h, as a result, the area intermediate key K A same key is generated. Then, the same key as the area intermediate key K A is encrypted with the area key # 1000h, and as a result, the same key as the area intermediate key K B2 registered in the service providing apparatus 111 in FIG. 14 is generated. The The same key as the area intermediate key KB2 is used as the first access key Kbc used for authentication.

また、ICカード2では、サービス提供装置111から受信したサービスコード#1022hを有するサービス定義領域からサービスキー#1022hが読み出される。そして、そのサービスキー#1022hで、エリア中間キーKB2と同一のキーが暗号化され、その結果、図14のサービス提供装置111に登録されているサービス中間キーK#1022hと同一のキーが生成される。このサービス中間キーK#1022hと同一のキーは、認証に用いる第2アクセスキーKacとされる。 In the IC card 2, the service key # 1022h is read from the service definition area having the service code # 1022h received from the service providing apparatus 111. Then, in the service key # 1022h, the same key and the area intermediate key K B2 is encrypted, so that generation service intermediate key K # same key as 1022h registered in the service providing apparatus 111 of FIG. 14 Is done. The service intermediate key K # same key and 1022h is a second access key K ac used for certification.

従って、いまの場合、サービス提供装置111には、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKB2またはサービス中間キーK#1022hが登録されており、ICカード2では、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKB2またはサービス中間キーK#1022hが生成される。 Therefore, in this case, the service providing apparatus 111 is registered with the area intermediate key K B2 or the service intermediate key K # 1022h which is the first access key K bc or the second access key K ac. The area intermediate key K B2 or the service intermediate key K # 1022h, which is the first access key K bc or the second access key K ac , is generated.

そして、ICカード2およびサービス提供装置111の間で、図12および図13で説明した場合と同様にして、相互認証が行われる。   Then, mutual authentication is performed between the IC card 2 and the service providing apparatus 111 in the same manner as described with reference to FIGS.

その相互認証の結果、ICカード2およびサービス提供装置111のいずれも適正なものと認められた場合、ICカード2では、サービス提供装置111から送信されてきたサービスコードを有するサービス定義領域によって管理されているサービス領域のみへのアクセスが許可される。従って、図14および図15で説明した場合においては、サービス定義領域#1022hで管理されているサービス領域のみへのアクセスが可能となる。   As a result of the mutual authentication, if both the IC card 2 and the service providing apparatus 111 are recognized as appropriate, the IC card 2 is managed by the service definition area having the service code transmitted from the service providing apparatus 111. Access to only the service area is permitted. Therefore, in the case described with reference to FIGS. 14 and 15, only the service area managed in the service definition area # 1022h can be accessed.

即ち、エリア中間キーKB2、エリアコード#0000h、#1000h、サービスキー#1022h、並びにサービスコード#1022hを知っている管理者B2は、サービス定義領域#1022hで管理されているサービス領域にアクセスすることができる。但し、管理者B2は、サービスキー#0008hや#030Chを知らないから、基本的に、サービス定義領域#0008hや#030Chで管理されているサービス領域にアクセスすることはできない。 That is, the administrator B2 who knows the area intermediate key K B2 , area code # 0000h, # 1000h, service key # 1022h, and service code # 1022h accesses the service area managed in the service definition area # 1022h. be able to. However, since the administrator B2 does not know the service key # 0008h or # 030Ch, basically, the administrator B2 cannot access the service area managed by the service definition area # 0008h or # 030Ch.

次に、管理者Cが、自身のエリア定義領域#0300hの階層に作成されたサービス定義領域#030Chで管理されるサービス領域を利用してサービスを提供するときは、図16に示すように、サービス定義領域#030Chに記憶させたサービスキー#030Chを、エリア中間キーKCで暗号化し、サービス中間キーK#030Chを生成して、エリア中間キーKCとともに、サービス提供装置111に登録する。そして、管理者Cは、自身のエリア定義領域#0300hの階層より上位の階層のエリア定義領域のエリアコード、即ち、いまの場合、管理者Aのエリア定義領域#0000hのエリアコード#0000hおよび管理者B1のエリア定義領域#0100hのエリアコード0100h、並びに自身のエリア定義領域#0300hのエリアコード#0300hと、そのエリア定義領域#0300hの階層に作成されたサービス定義領域#030Chのサービスコード#030Chも、サービス提供装置111に登録する。 Next, when the administrator C provides a service using the service area managed in the service definition area # 030Ch created in the hierarchy of the area definition area # 0300h, as shown in FIG. The service key # 030Ch stored in the service definition area # 030Ch is encrypted with the area intermediate key K C to generate the service intermediate key K # 030Ch, and is registered in the service providing apparatus 111 together with the area intermediate key K C. Then, the administrator C has the area code of the area definition area higher than the area definition area # 0300h, that is, in this case, the area code # 0000h of the area definition area # 0000h of the administrator A and the management code. The area code 0100h of the area definition area # 0100h of the user B1, the area code # 0300h of its own area definition area # 0300h, and the service code # 030Ch of the service definition area # 030Ch created in the hierarchy of the area definition area # 0300h Is also registered in the service providing apparatus 111.

この場合、サービス提供装置111に、ICカード2が装着されると、サービス提供装置111とICカード2との間で、次のようにして相互認証が行われる。   In this case, when the IC card 2 is attached to the service providing apparatus 111, mutual authentication is performed between the service providing apparatus 111 and the IC card 2 as follows.

即ち、サービス提供装置111は、図17に示すように、登録されているエリアコード#0000h、#0100h、および#0300hと、サービスコード#030Chとを、ICカード2に送信する。ICカード2(シーケンサ91)では、サービス提供装置111からのエリアコード#0000h、#0100h、および#0300h、並びにサービスコード#030Chが受信される。   That is, the service providing apparatus 111 transmits the registered area codes # 0000h, # 0100h, and # 0300h and the service code # 030Ch to the IC card 2, as shown in FIG. The IC card 2 (sequencer 91) receives the area codes # 0000h, # 0100h, and # 0300h and the service code # 030Ch from the service providing apparatus 111.

そして、ICカード2では、システム定義ブロック(図4)に記憶されているシステムキーが読み出されるとともに、サービス提供装置111から受信したエリアコード#0000h、#0100h、または#0300hを有するエリア定義領域それぞれからエリアキー#0000h、#0100h、または#0300hが読み出される。さらに、システムキーが、エリアキー#0000hで暗号化され、その結果、エリア中間キーKAと同一のキーが生成される。また、そのエリア中間キーKAと同一のキーが、エリアキー#0100hで暗号化され、その結果、エリア中間キーKB1と同一のキーが生成される。そして、そのエリア中間キーKB1と同一のキーが、エリアキー#0300hで暗号化され、その結果、図16のサービス提供装置111に登録されているエリア中間キーKCと同一のキーが生成される。このエリア中間キーKCと同一のキーは、認証に用いる第1アクセスキーKbcとされる。 Then, in the IC card 2, the system key stored in the system definition block (FIG. 4) is read, and the area definition areas having the area codes # 0000h, # 0100h, or # 0300h received from the service providing apparatus 111, respectively. Area key # 0000h, # 0100h, or # 0300h. Further, the system key is encrypted by the area key # 0000h, as a result, the area intermediate key K A same key is generated. Also, the same key as the area intermediate key K A is encrypted with the area key # 0100h, and as a result, the same key as the area intermediate key K B1 is generated. Then, the same key as the area intermediate key K B1 is encrypted with the area key # 0300h, and as a result, the same key as the area intermediate key K C registered in the service providing apparatus 111 in FIG. 16 is generated. The The same key as the area intermediate key K C is the first access key K bc used for authentication.

また、ICカード2では、サービス提供装置111から受信したサービスコード#030Chを有するサービス定義領域からサービスキー#030Chが読み出される。そして、そのサービスキー#030Chで、エリア中間キーKCが暗号化され、その結果、図16のサービス提供装置111に登録されているサービス中間キーK#030Chと同一のキーが生成される。このサービス中間キーK#030Chと同一のキーは、認証に用いる第2アクセスキーKacとされる。 Further, in the IC card 2, the service key # 030Ch is read from the service definition area having the service code # 030Ch received from the service providing apparatus 111. Then, the area intermediate key K C is encrypted with the service key # 030Ch, and as a result, the same key as the service intermediate key K # 030Ch registered in the service providing apparatus 111 in FIG. 16 is generated. The same key as the service intermediate key K # 030Ch is used as the second access key K ac used for authentication.

従って、いまの場合、サービス提供装置111には、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKCまたはサービス中間キーK#030Chがそれぞれ登録されており、ICカード2では、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKCまたはサービス中間キーK#030Chがそれぞれ生成される。 Therefore, in this case, the service providing apparatus 111 is registered with the area intermediate key K C or the service intermediate key K # 030Ch , which is the first access key K bc or the second access key K ac , respectively. Then, an area intermediate key K C or a service intermediate key K # 030Ch that is the first access key K bc or the second access key K ac is generated.

そして、ICカード2およびサービス提供装置111の間で、図12および図13で説明した場合と同様にして、相互認証が行われる。   Then, mutual authentication is performed between the IC card 2 and the service providing apparatus 111 in the same manner as described with reference to FIGS.

その相互認証の結果、ICカード2およびサービス提供装置111のいずれも適正なものと認められた場合、ICカード2では、サービス提供装置111から送信されてきたサービスコードを有するサービス定義領域によって管理されているサービス領域のみへのアクセスが許可される。従って、図16および図17で説明した場合においては、サービス定義領域#030Chで管理されているサービス領域のみへのアクセスが可能となる。   As a result of the mutual authentication, if both the IC card 2 and the service providing apparatus 111 are recognized as appropriate, the IC card 2 is managed by the service definition area having the service code transmitted from the service providing apparatus 111. Access to only the service area is permitted. Accordingly, in the case described with reference to FIGS. 16 and 17, only the service area managed in the service definition area # 030Ch can be accessed.

即ち、エリア中間キーKC、エリアコード#0000h、#0100h、#0300h、サービスキー#030Ch、並びにサービスコード#030Chを知っている管理者Cは、サービス定義領域#030Chで管理されているサービス領域にアクセスすることができる。但し、管理者Cは、サービスキー#0008hや#1022Chを知らないから、基本的に、サービス定義領域#0008hや#1022Chで管理されているサービス領域にアクセスすることはできない。 That is, the administrator C who knows the area intermediate key K C , area code # 0000h, # 0100h, # 0300h, service key # 030Ch, and service code # 030Ch is a service area managed in the service definition area # 030Ch. Can be accessed. However, since the administrator C does not know the service keys # 0008h and # 1022Ch, basically, the administrator C cannot access the service areas managed in the service definition areas # 0008h and # 1022Ch.

以上のように、上位の階層のエリアキーを知らなくても、管理者は、自身のサービス領域にアクセスすることができる。   As described above, the administrator can access his / her service area without knowing the area key of the higher hierarchy.

ところで、上述のように、各管理者は、サービスキーを知らないサービス定義領域によって管理されるサービス領域にはアクセスすることができないが、例えば、管理者Cが、自身のサービス定義領域#030Chによって管理されるサービス領域を利用したサービスの他、管理者B2のサービス定義領域#1022hによって管理されるサービス領域を利用したサービスも行いたい場合がある。   By the way, as described above, each administrator cannot access the service area managed by the service definition area that does not know the service key. For example, the administrator C can access the service definition area # 030Ch. In addition to services that use managed service areas, there are cases where it is desirable to provide services that use service areas managed by the service definition area # 1022h of the administrator B2.

この場合、管理者Cが、サービス定義領域#1022hによって管理されるサービス領域にアクセスするには、図14および図15で説明したように、エリア中間キーKB2、エリアコード#0000h、#1000h、サービスキー#1022h、並びにサービスコード#1022hを知る必要があり、従って、単純には、これらの情報を、管理者B2から教えてもらう必要がある。 In this case, in order for the administrator C to access the service area managed by the service definition area # 1022h, as described with reference to FIGS. 14 and 15, the area intermediate key K B2 , area codes # 0000h, # 1000h, It is necessary to know the service key # 1022h and the service code # 1022h. Therefore, it is simply necessary to have the administrator B2 teach these pieces of information.

しかしながら、管理者B2が知っているサービスキー#1022hは、その親である管理者Aでも知り得ないものであり、このような管理者B2しか知り得ないサービスキー#1022hを、管理者Cに教えてしまうのは、セキュリティの観点から好ましくない。   However, the service key # 1022h that the administrator B2 knows cannot be known even by the parent administrator A, and such a service key # 1022h that only the administrator B2 knows can be given to the administrator C. It is not preferable from a security point of view.

また、この場合、セキュリティの問題を無視しても、管理者Cが、サービス定義領域#030Chまたは#1022hによってそれぞれ管理される2つのサービス領域の両方にアクセスするには、ICカード2において、図15で説明した処理を行うことにより、第1アクセスキーKbcおよび第2アクセスキーKacを生成し、サービス定義領域#030Chによって管理されるサービス領域へのアクセスのための相互認証を行うとともに、図17で説明した処理を行うことにより第1アクセスキーKbcおよび第2アクセスキーKacを生成し、サービス定義領域#1022hによって管理されるサービス領域へのアクセスのための相互認証を行う必要がある。 In this case, even if the security problem is ignored, in order for the administrator C to access both of the two service areas respectively managed by the service definition area # 030Ch or # 1022h, in the IC card 2, 15, the first access key K bc and the second access key K ac are generated, and mutual authentication for access to the service area managed by the service definition area # 030Ch is performed. generates the first access key K bc and the second access key K ac by performing the processing described in FIG. 17, it is necessary to perform mutual authentication for access to the service area managed by the service defining area # 1022h is there.

従って、サービス領域ごとに、そのサービス領域へのアクセスのための相互認証を行う場合には、各サービス領域に、迅速にアクセスすることが困難となり、その結果、例えば、図1のカードシステムを駅の改札に通用した場合には、通勤者が、改札口に設けられているゲートを通過する、比較的に短い時間に、ICカード2の所定のサービス領域にアクセスして、データを書き込み、または読み出すことが困難となる。   Accordingly, when mutual authentication is performed for each service area to access the service area, it is difficult to quickly access each service area. As a result, for example, the card system of FIG. If the commuter passes the gate provided at the ticket gate, the commuter accesses the predetermined service area of the IC card 2 and writes data in a relatively short time, or It becomes difficult to read.

そこで、例えば、管理者Cが、自身のサービス定義領域#030Chによって管理されるサービス領域を利用したサービスの他、管理者B2のサービス定義領域#1022hによって管理されるサービス領域を利用したサービスも行う場合には、セキュリティの問題を解決し、かつサービス領域への迅速なアクセスを確保するために、管理者CおよびB2との間で、例えば、図18に示すような、情報のやりとりを行い、サービス提供装置111への登録を行う。   Therefore, for example, the administrator C performs a service using the service area managed by the service definition area # 1022h of the administrator B2 in addition to the service using the service area managed by the own service definition area # 030Ch. In this case, in order to solve the security problem and ensure quick access to the service area, information is exchanged with the managers C and B2, for example, as shown in FIG. Registration with the service providing apparatus 111 is performed.

即ち、管理者Cは、図16における場合と同様に、サービス定義領域#030Chに記憶させたサービスキー#030Chを、エリア中間キーKCで暗号化し、サービス中間キーK#030Chを生成する。さらに、管理者Cは、このサービス中間キーK#030Chを、管理者B2に渡し、サービスキー#1022hで暗号化してもらう。そして、管理者Cは、サービス中間キーK#030Chの、サービスキー#1022hでの暗号化結果であるサービス中間キーK#1022h'を、サービスコード#1022hとともに受け取る。 That is, as in the case of FIG. 16, the administrator C encrypts the service key # 030Ch stored in the service definition area # 030Ch with the area intermediate key K C to generate the service intermediate key K # 030Ch . Furthermore, the administrator C passes this service intermediate key K # 030Ch to the administrator B2, and encrypts it with the service key # 1022h. The manager C the service intermediate key K # 030Ch, the service intermediate key K # 1022h 'is an encryption result of the service key # 1022h, it receives together with the service code # 1022h.

従って、管理者CとB2との間でやりとりされるキーは、サービス中間キーK#030ChおよびK#1022h'だけであり、管理者Cしか知り得ないサービスキー#030Chが、管理者B2に知られたり、また、管理者B2しか知り得ないサービスキー#1022hが、管理者Cに知られることはない。即ち、セキュリティ上の問題はない。 Therefore, the only keys exchanged between the administrators C and B2 are the service intermediate keys K # 030Ch and K # 1022h ' , and the service key # 030Ch that only the administrator C knows knows to the administrator B2. In addition, the service key # 1022h that only the administrator B2 knows is not known to the administrator C. That is, there is no security problem.

管理者B2から、サービス中間キーK#1022h'およびサービスコード#1022hを受け取った管理者Cは、それらとともに、自身のエリア定義領域#0300hの階層より上位の階層のエリア定義領域のエリアコード、即ち、いまの場合、管理者Aのエリア定義領域#0000hのエリアコード#0000hおよび管理者B1のエリア定義領域#0100hのエリアコード0100h、並びに自身のエリア定義領域#0300hのエリアコード#0300hを、サービス提供装置111に登録する。さらに、管理者Cは、エリア中間キーKC、およびエリア定義領域#0300hの階層に作成されたサービス定義領域#030Chのサービスコード#030Chも、サービス提供装置111に登録する。 The administrator C who has received the service intermediate key K # 1022h ′ and the service code # 1022h from the administrator B2, together with them, the area code of the area definition area higher than the hierarchy of its own area definition area # 0300h, that is, In this case, the area code # 0000h of the area definition area # 0000h of the administrator A, the area code 0100h of the area definition area # 0100h of the administrator B1, and the area code # 0300h of the area definition area # 0300h of the administrator A Register with the providing device 111. Furthermore, the administrator C also registers in the service providing apparatus 111 the area intermediate key K C and the service code # 030Ch of the service definition area # 030Ch created in the hierarchy of the area definition area # 0300h.

この場合、サービス提供装置111に、ICカード2が装着されると、サービス提供装置111とICカード2との間で、次のようにして相互認証が行われる。   In this case, when the IC card 2 is attached to the service providing apparatus 111, mutual authentication is performed between the service providing apparatus 111 and the IC card 2 as follows.

即ち、サービス提供装置111は、図19に示すように、登録されているエリアコード#0000h、#0100h、および#0300hと、サービスコード#030Chおよび#1022hとを、ICカード2に送信する。ICカード2(シーケンサ91)では、サービス提供装置111からのエリアコード#0000h、#0100h、および#0300h、並びにサービスコード#030Chおよび#1022hが受信される。   That is, the service providing apparatus 111 transmits the registered area codes # 0000h, # 0100h, and # 0300h and the service codes # 030Ch and # 1022h to the IC card 2, as shown in FIG. The IC card 2 (sequencer 91) receives the area codes # 0000h, # 0100h, and # 0300h and the service codes # 030Ch and # 1022h from the service providing apparatus 111.

そして、ICカード2では、システム定義ブロック(図4)に記憶されているシステムキーが読み出されるとともに、サービス提供装置111から受信したエリアコード#0000h、#0100h、または#0300hを有するエリア定義領域それぞれからエリアキー#0000h、#0100h、または#0300hが読み出され、図17で説明した場合と同様にして、図18のサービス提供装置111に登録されているエリア中間キーKCと同一のキーが生成される。このエリア中間キーKCと同一のキーは、認証に用いる第1アクセスキーKbcとされる。 Then, in the IC card 2, the system key stored in the system definition block (FIG. 4) is read, and the area definition areas having the area codes # 0000h, # 0100h, or # 0300h received from the service providing apparatus 111, respectively. The area key # 0000h, # 0100h, or # 0300h is read from the same area, and the same key as the area intermediate key K C registered in the service providing apparatus 111 in FIG. Generated. The same key as the area intermediate key K C is the first access key K bc used for authentication.

また、ICカード2では、サービス提供装置111から受信したサービスコード#030Chまたは#1022hを有するサービス定義領域それぞれからサービスキー#030Chまたは#1022hが読み出される。そして、まず、サービスキー#030Chで、エリア中間キーKCが暗号化され、その結果、サービス中間キーK#030Chと同一のキーが生成される。さらに、そのサービス中間キーK#030Chと同一のキーが、サービスキー#1022hで暗号化され、図18のサービス提供装置111に登録されているサービス中間キーK#1022h'と同一のキーーが生成される。このサービス中間キーK#1022h'と同一のキーは、認証に用いる第2アクセスキーKacとされる。 In the IC card 2, the service key # 030Ch or # 1022h is read from each service definition area having the service code # 030Ch or # 1022h received from the service providing apparatus 111. First, the area intermediate key K C is encrypted with the service key # 030Ch, and as a result, the same key as the service intermediate key K # 030Ch is generated. Further, the same key as the service intermediate key K # 030Ch is encrypted with the service key # 1022h, and the same key as the service intermediate key K # 1022h ′ registered in the service providing apparatus 111 of FIG. 18 is generated. The The same key as the service intermediate key K # 1022h ′ is used as the second access key K ac used for authentication.

従って、いまの場合、サービス提供装置111には、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKCまたはサービス中間キーK#1022h'が登録されており、ICカード2では、第1アクセスキーKbcまたは第2アクセスキーKacであるエリア中間キーKCまたはサービス中間キーK#1022h'が生成される。 Therefore, in this case, the service providing apparatus 111 is registered with the area intermediate key K C or the service intermediate key K # 1022h ′ , which is the first access key K bc or the second access key K ac , and the IC card 2 Then, the area intermediate key K C or the service intermediate key K # 1022h ′ which is the first access key K bc or the second access key K ac is generated.

そして、ICカード2およびサービス提供装置111の間で、図12および図13で説明した場合と同様にして、相互認証が行われる。   Then, mutual authentication is performed between the IC card 2 and the service providing apparatus 111 in the same manner as described with reference to FIGS.

その相互認証の結果、ICカード2およびサービス提供装置111のいずれも適正なものと認められた場合、ICカード2では、サービス提供装置111から送信されてきたサービスコードを有するサービス定義領域によって管理されているサービス領域のみへのアクセスが許可される。従って、図18および図19で説明した場合においては、サービス定義領域#030Chで管理されているサービス領域、およびサービス定義領域#1022Chで管理されているサービス領域へのアクセスが可能となる。   As a result of the mutual authentication, if both the IC card 2 and the service providing apparatus 111 are recognized as appropriate, the IC card 2 is managed by the service definition area having the service code transmitted from the service providing apparatus 111. Access to only the service area is permitted. Accordingly, in the case described with reference to FIGS. 18 and 19, it is possible to access the service area managed in the service definition area # 030Ch and the service area managed in the service definition area # 1022Ch.

以上のように、システムキーを、2以上のエリアキーまたはサービスキーで暗号化することにより、その2以上のエリアキーまたはサービスキーを、2つの第1アクセスキーKbcおよび第2アクセスキーKacに縮退(合成)し、その第1アクセスキーKbcおよび第2アクセスキーKacを用いて、サービス提供装置111から送信されてきたサービスコードを有するサービス定義領域によって管理されているサービス領域へのアクセスを許可するための相互認証を行うようにしたので、複数のサービス定義領域へのアクセスを対象とする場合でも、短時間で、相互認証を終了することができ、これにより、サービス領域への迅速なアクセスを確保することができる。 As described above, by encrypting the system key with two or more area keys or service keys, the two or more area keys or service keys are converted into two first access keys K bc and second access keys K ac. To the service area managed by the service definition area having the service code transmitted from the service providing apparatus 111 using the first access key Kbc and the second access key Kac . Since mutual authentication is performed to allow access, even when access to multiple service definition areas is targeted, mutual authentication can be completed in a short time. Quick access can be ensured.

なお、図12および図13で説明した場合には、相互認証処理を、第1アクセスキーKbcおよび第2アクセスキーKacの2つのキーを用いて行うようにしたが、例えば、第2アクセスキーKacだけを用いて行うようにすることも可能である。この場合、ICカード2では、システムキーを、2以上のエリアキーまたはサービスキーで暗号化することにより、その2以上のエリアキーまたはサービスキーが、1の第2アクセスキーKacに縮退されることになる。 In the case described with reference to FIGS. 12 and 13, the mutual authentication process is performed using the two keys of the first access key Kbc and the second access key Kac. It is also possible to use only the key K ac . In this case, in the IC card 2, by encrypting the system key with two or more area keys or service keys, the two or more area keys or service keys are degenerated into one second access key Kac. It will be.

また、相互認証には、図20に示すように、第1アクセスキーKbcおよび第2アクセスキーKacを、ICカード2に固有の値である、例えば、製造IDブロックに記憶された製造IDなどで暗号化した暗号化結果を用いることも可能である。ここで、図20においては、第1アクセスキーKbcについては、製造IDとのEXORをとられることで暗号化が行われており、第2アクセスキーKacについては、DES方式による暗号化が行われている。なお、第2アクセスキーKacについては、第1アクセスキーKbcと製造IDとのEXORの結果をキーとして、DES方式による暗号化を行うことも可能である。 For mutual authentication, as shown in FIG. 20, the first access key K bc and the second access key K ac are values unique to the IC card 2, for example, a manufacturing ID stored in a manufacturing ID block. It is also possible to use the encryption result encrypted by the above. Here, in FIG. 20, the first access key K bc is encrypted by being EXORed with the manufacturing ID, and the second access key K ac is encrypted by the DES method. Has been done. Note that the second access key K ac can be encrypted by the DES method using the EXOR result of the first access key K bc and the manufacturing ID as a key.

このように、第1アクセスキーKbcおよび第2アクセスキーKacを暗号化した暗号化結果を相互認証に用いる場合には、セキュリティを、より向上させることが可能となる。なお、この場合、サービス提供装置111において、製造IDが必要となるが、これは、ICカード2から送信するようにすれば良い。 As described above, when the encrypted result obtained by encrypting the first access key Kbc and the second access key Kac is used for mutual authentication, the security can be further improved. In this case, the service providing apparatus 111 needs a manufacturing ID, which may be transmitted from the IC card 2.

次に、EEPROM66の記憶領域が、エリア定義領域を階層とする階層構造をなしており、さらに、各エリア定義領域およびサービス定義領域が、認証のためのエリアキーおよびサービスキーを記憶するようになされている結果、例えば、次のような、フレキシビリティのあるアクセス制御を行うことができる。   Next, the storage area of the EEPROM 66 has a hierarchical structure with the area definition area as a hierarchy, and each area definition area and service definition area stores an area key and a service key for authentication. As a result, for example, the following flexible access control can be performed.

即ち、例えば、ある管理者を、親の管理者として、そのリソースを分け与えられた子の管理者が、不正なサービスなどを行っており、そのサービスの提供を停止させたい場合には、親の管理者が、そのエリア定義領域に記憶されたエリアキーを変更することで、子の管理者による、ICカード2へのアクセスを禁止することができる。   That is, for example, when a certain administrator is a parent administrator and a child administrator who has been assigned the resource is performing an illegal service, etc. and wants to stop providing that service, the parent administrator The administrator can prohibit access to the IC card 2 by the child administrator by changing the area key stored in the area definition area.

具体的には、例えば、図5において、管理者B1が、管理者Cによるサービスの提供を停止させる場合、ICカード2のエリア定義領域#0100hに記憶されたエリアキー#0100hを変更する。この場合、図17において、ICカード2において生成されるエリア中間キーKB1、さらには、エリア中間キーKCも変更されることとなるから、変更前のエリア中間キーKCしか知らない管理者Cは、サービス定義領域#030Chにアクセスすることはできなくなる。 Specifically, for example, in FIG. 5, when the administrator B1 stops providing the service by the administrator C, the area key # 0100h stored in the area definition area # 0100h of the IC card 2 is changed. In this case, in FIG. 17, since the area intermediate key K B1 generated in the IC card 2 and further the area intermediate key K C are changed, the administrator who knows only the area intermediate key K C before the change. C cannot access the service definition area # 030Ch.

なお、管理者Cの親の管理者である管理者B1の、さらに親の管理者である管理者Aが、そのエリア定義領域#0000hに記憶されたエリアキー#0000hを変更することによっても、サービス定義領域#030Chへのアクセスを禁止することが可能である。但し、この場合は、管理者Aの子の管理者B2が、自身のサービス定義領域#1022hによって管理されるサービス領域にアクセスすることもできなくなる。即ち、ある管理者が、そのエリアキーを変更した場合には、そのエリア定義領域の階層の中にある階層(子の階層、孫の階層、・・・)のエリア定義領域が管理しているサービス定義領域へのアクセスはできなくなる。   Note that the administrator B1 who is the parent administrator of the administrator C and the administrator A who is the parent administrator also change the area key # 0000h stored in the area definition area # 0000h. Access to the service definition area # 030Ch can be prohibited. However, in this case, the manager B2 who is a child of the manager A cannot access the service area managed by the own service definition area # 1022h. That is, when a certain administrator changes the area key, the area definition area of the hierarchy (child hierarchy, grandchild hierarchy,...) Within the area definition area hierarchy manages. Access to the service definition area becomes impossible.

また、図18および図19では、管理者Cが、管理者B2のサービス定義領域#1022h(によって管理されるサービス領域)を、管理者B2と共有する場合について説明したが、キーの管理によっては、管理者どうしの間で、より複雑な関係のサービス定義領域の共有が可能となる。   In FIGS. 18 and 19, the case where the administrator C shares the service definition area # 1022h of the administrator B2 (service area managed by the administrator B2) with the administrator B2 has been described. It is possible to share a service definition area having a more complicated relationship between managers.

具体的には、例えば、いま、EEPROM66において、図21に示すような階層構造が構成されているとする。即ち、図21では、ICカード2の発行者でもある管理者Aのエリア定義領域#0000hの階層の子の階層として、管理者Eのエリア定義領域#5000h、および管理者Gのエリア定義領域#7000hが作成されている。さらに、管理者Eのエリア定義領域#5000hの階層には、サービス定義領域#5008h、#5048h、#5088h、および#50C8hが作成されているとともに、管理者Fのエリア定義領域#6000hが作成されている。   Specifically, for example, assume that the EEPROM 66 has a hierarchical structure as shown in FIG. That is, in FIG. 21, as a child layer of the area definition area # 0000h of the administrator A who is also the issuer of the IC card 2, the area definition area # 5000h of the administrator E and the area definition area # of the administrator G 7000h is created. Furthermore, service definition areas # 5008h, # 5048h, # 5088h, and # 50C8h are created in the hierarchy of area definition area # 5000h of administrator E, and area definition area # 6000h of administrator F is created. ing.

また、管理者Fのエリア定義領域#6000hの階層には、サービス定義領域#6008hおよび#6048hが作成されており、管理者Gのエリア定義領域#7000hの階層には、サービス定義領域#7008hおよび#70C8hが作成されている。   Further, service definition areas # 6008h and # 6048h are created in the hierarchy of the area definition area # 6000h of the administrator F, and service definition areas # 7008h and # 6048h are created in the hierarchy of the area definition area # 7000h of the administrator G. # 70C8h is created.

以上のような階層構造において、管理者Aは、図22(A)に示すように、システムキーを、エリアキー#0000hで暗号化し、その暗号化結果を、子の管理者である管理者EおよびGに渡す。   In the hierarchical structure as described above, as shown in FIG. 22A, the administrator A encrypts the system key with the area key # 0000h, and the administrator E who is the child administrator manages the encrypted result. And to G.

管理者Eは、図22(B)に示すように、管理者Aからの、システムキーの、エリアキー#0000hでの暗号化結果を、エリアキー#5000hで暗号化し、その暗号化結果を、第1アクセスキーKE1として用いることとする。さらに、管理者Eは、第1アクセスキーKE1(エリアキー#5000hによる暗号化結果)を、サービスキー#5008h、#5048h、#5088h、#50C8hで順次暗号化し、その最終的な暗号化結果を、第2アクセスキーKE2として用いることとする。 As shown in FIG. 22B, the administrator E encrypts the encryption result of the system key from the administrator A with the area key # 0000h with the area key # 5000h. The first access key K E1 is used. Further, the administrator E sequentially encrypts the first access key K E1 (encryption result by the area key # 5000h) with the service keys # 5008h, # 5048h, # 5088h, # 50C8h, and the final encryption result Is used as the second access key K E2 .

また、管理者Fは、図22(C)に示すように、管理者Eから第1アクセスキーKE1(エリアキー#5000hによる暗号化結果)をもらい、それを、エリアキー#6000hで暗号化し、その暗号化結果を、第1アクセスキーKF1とする。さらに、管理者Fは、第1アクセスキーKF1(エリアキー#6000hによる暗号化結果)を、サービスキー#6008h,#6048hで順次暗号化する。そして、その暗号化結果を、管理者Eに渡し、サービスキー#5048h、#5088hで順次暗号化してもらう。その後、管理者Fは、その暗号化結果を、管理者Eからもらい、管理者Gに渡し、サービスキー#70C8hで暗号化してもらう。そして、管理者Fは、その暗号化結果を、管理者Gからもらい、第2アクセスキーKF2として用いることとする。 Further, as shown in FIG. 22C, the administrator F receives the first access key K E1 (encryption result with the area key # 5000h) from the administrator E, and encrypts it with the area key # 6000h. The encryption result is taken as a first access key K F1 . Further, the administrator F sequentially encrypts the first access key K F1 (encryption result using the area key # 6000h) using the service keys # 6008h and # 6048h. Then, the result of the encryption is transferred to the manager E, and sequentially encrypted with service keys # 5048h and # 5088h. Thereafter, the administrator F receives the encryption result from the administrator E, passes it to the administrator G, and encrypts it with the service key # 70C8h. Then, the administrator F obtains the encryption result from the administrator G and uses it as the second access key K F2 .

一方、管理者Gは、図22(D)に示すように、管理者Aからの、システムキーの、エリアキー#0000hでの暗号化結果を、エリアキー#7000hで暗号化し、その暗号化結果を、第1アクセスキーKG1として用いることとする。さらに、管理者Gは、第1アクセスキーKG1(エリアキー#7000hによる暗号化結果)を、サービスキー#7008h、#70C8hで順次暗号化し、その最終的な暗号化結果を、管理者Fに渡して、サービスキー#6048hで暗号化してもらう。その後、管理者Gは、管理者Fによるサービスキー#6048を用いた暗号化結果を、管理者Eに渡し、サービスキー#5088h、#50C8hで順次暗号化してもらう。そして、管理者Gは、その暗号化結果を、管理者Eからもらい、第2アクセスキーKG2として用いることとする。 On the other hand, as shown in FIG. 22D, the administrator G encrypts the encryption result of the system key from the administrator A with the area key # 0000h with the area key # 7000h, and the encryption result Is used as the first access key KG1. Further, the administrator G sequentially encrypts the first access key K G1 (encryption result using the area key # 7000h) with the service keys # 7008h and # 70C8h, and sends the final encryption result to the administrator F. Pass it and have it encrypted with service key # 6048h. Thereafter, the administrator G gives the administrator E the result of encryption using the service key # 6048 by the administrator F and sequentially encrypts the result using the service keys # 5088h and # 50C8h. Then, the administrator G obtains the encryption result from the administrator E and uses it as the second access key KG2 .

この場合、ICカード2において、図22で説明した場合と同様の手順で、EEPROM66に記憶されているエリアキー、サービスキーを用いて、システムキーを暗号化し、第1アクセスキーおよび第2アクセスキーを生成することで、管理者E,F,G相互の間では、図23に示すようなサービス定義領域の共有が可能となる。   In this case, in the IC card 2, the system key is encrypted using the area key and service key stored in the EEPROM 66 in the same procedure as described in FIG. 22, and the first access key and the second access key are encrypted. 23, the service definition areas as shown in FIG. 23 can be shared between the managers E, F, and G.

即ち、管理者Eは、自身のサービス定義領域#5008、#5048h、#5088h、#50C8hのみにアクセスすることができる。管理者Fは、自身のサービス定義領域#6008h、#6048hにアクセスする他、管理者Eのサービス定義領域#5048h、#5088h、および管理者Gのサービス定義領域#70C8hにアクセスすることが可能となる。管理者Gは、自身のサービス定義領域#7008h、#70C8hにアクセスする他、管理者Eのサービス定義領域#5088h、#50C8h、および管理者Fのサービス定義領域#6048hにアクセスすることが可能となる。   That is, the administrator E can access only his / her own service definition areas # 5008, # 5048h, # 5088h, and # 50C8h. In addition to accessing his / her own service definition areas # 6008h and # 6048h, the administrator F can access the service definition areas # 5048h and # 5088h of the administrator E and the service definition area # 70C8h of the administrator G. Become. The administrator G can access his / her service definition areas # 7008h and # 70C8h, and can also access the service definition areas # 5088h and # 50C8h of the administrator E and the service definition area # 6048h of the administrator F. Become.

なお、図22に示したようなキーの受け渡しにおいて、ある管理者のサービスキー自体が、他の管理者に知られることはない。即ち、管理者Eのサービスキー#5008h、#5048h、#5088h、#50C8hは、親の管理者Aは勿論、管理者FおよびGにも知られることはない。同様に、管理者Fのサービスキー#6008h、#6048hは、管理者EおよびGに知られることはなく、管理者Gのサービスキー#7008h、#70C8hは、管理者EおよびFに知られることはない。   In the delivery of keys as shown in FIG. 22, the service key of a certain manager is not known to other managers. That is, the service key # 5008h, # 5048h, # 5088h, # 50C8h of the manager E is not known to the managers F and G as well as the parent manager A. Similarly, the service keys # 6008h and # 6048h of the administrator F are not known to the managers E and G, and the service keys # 7008h and # 70C8h of the manager G are known to the managers E and F. There is no.

また、上述したように、ある管理者が、そのエリアキーを変更した場合には、そのエリア定義領域の階層の中にある階層のエリア定義領域が管理しているサービス定義領域すべてへのアクセスはできなくなるが、即ち、親の管理者がエリアキーを変更した場合には、その子の管理者は、ICカード2へのアクセスをすることができなくなるが、キー管理の仕方によっては、特定の子の管理者だけのアクセスを禁止することが可能となる。   In addition, as described above, when a certain administrator changes the area key, access to all service definition areas managed by the area definition area in the area definition area hierarchy is not allowed. In other words, when the parent manager changes the area key, the child manager cannot access the IC card 2. However, depending on the key management method, a specific child It is possible to prohibit access only by the administrator of the system.

具体的には、例えば、いま、EEPROM66において、図24に示すような階層構造が構成されているとする。即ち、図24では、ICカード2の発行者でもある管理者Aのエリア定義領域#0000hの階層の子の階層として、管理者Hのエリア定義領域#8000h、管理者Iのエリア定義領域#9000h、および管理者Jのエリア定義領域#A000hが作成されている。さらに、管理者Hのエリア定義領域#8000hの階層には、サービス定義領域#8008h、#8104h、および#8105hが作成されている。   Specifically, for example, assume that the EEPROM 66 has a hierarchical structure as shown in FIG. That is, in FIG. 24, as a child hierarchy of the area definition area # 0000h of the administrator A who is also the issuer of the IC card 2, the area definition area # 8000h of the administrator H and the area definition area # 9000h of the administrator I And the area definition area # A000h of the administrator J are created. Furthermore, service definition areas # 8008h, # 8104h, and # 8105h are created in the hierarchy of the area definition area # 8000h of the administrator H.

以上のような階層構造において、管理者Aは、図25(A)に示すように、システムキーを、エリアキー#0000hで暗号化し、その暗号化結果を、子の管理者である管理者IおよびJに渡す。   In the hierarchical structure as described above, as shown in FIG. 25A, the administrator A encrypts the system key with the area key # 0000h, and the result of the encryption is the administrator I who is the child administrator. And to J.

管理者Iは、図25(C)に示すように、管理者Aからの、システムキーの、エリアキー#0000hでの暗号化結果を、エリアキー#9000hで暗号化し、その暗号化結果を、第1アクセスキーKI1として用いることとする。さらに、管理者Iは、第1アクセスキーKI1(エリアキー#9000hによる暗号化結果)を、管理者Hに渡し、図25(B)に示すように、サービスキー#8008h、#8104hで順次暗号化してもらう。そして、管理者Iは、その暗号化結果を、図25(C)に示すように、第2アクセスキーKI2として用いることとする。 As shown in FIG. 25C, the administrator I encrypts the encryption result of the system key from the administrator A with the area key # 0000h with the area key # 9000h, and the encryption result is The first access key K I1 is used. Furthermore, the administrator I passes the first access key K I1 (encryption result by the area key # 9000h) to the administrator H, and sequentially uses the service keys # 8008h and # 8104h as shown in FIG. Get encrypted. Then, the administrator I uses the encryption result as the second access key K I2 as shown in FIG.

また、管理者Jは、図25(D)に示すように、管理者Aからの、システムキーの、エリアキー#0000hでの暗号化結果を、エリアキー#A000hで暗号化し、その暗号化結果を、第1アクセスキーKJ1として用いることとする。さらに、管理者Jは、第1アクセスキーKJ1(エリアキー#A000hによる暗号化結果)を、管理者Hに渡し、図25(B)に示すように、サービスキー#8008h、#8105hで順次暗号化してもらう。そして、管理者Jは、その暗号化結果を、図25(D)に示すように、第2アクセスキーKJ2として用いることとする。 Further, as shown in FIG. 25D, the administrator J encrypts the encryption result of the system key from the administrator A with the area key # 0000h with the area key # A000h, and the encryption result Is used as the first access key K J1 . Further, the administrator J passes the first access key K J1 (encryption result using the area key # A000h) to the administrator H, and sequentially uses the service keys # 8008h and # 8105h as shown in FIG. Get encrypted. Then, the administrator J uses the encryption result as the second access key K J2 as shown in FIG.

この場合、ICカード2において、図25で説明した場合と同様の手順で、EEPROM66に記憶されているエリアキー、サービスキーを用いて、システムキーを暗号化し、第1アクセスキーおよび第2アクセスキーを生成することで、管理者Iは、管理者Hのサービス定義領域#8008hおよび#8104hにアクセスすることが、管理者Jは、管理者Hのサービス定義領域#8008hおよび#8105hにアクセスすることが、それぞれ可能となる。   In this case, in the IC card 2, the system key is encrypted using the area key and service key stored in the EEPROM 66 in the same procedure as described in FIG. 25, and the first access key and the second access key. The administrator I can access the service definition areas # 8008h and # 8104h of the administrator H, and the administrator J can access the service definition areas # 8008h and # 8105h of the administrator H. Are possible.

一方、管理者Hは、サービス定義領域#8008hを、管理者IおよびJとの間でデータを共有するものとして作成しておき、サービス定義領域#8104hまたは#8105hを、管理者IまたはJそれぞれによるサービス定義領域#8008hへのアクセスを制御するための、いわばダミーのサービス定義領域として作成しておく。従って、サービス定義領域#8104hおよび#8105hで管理されるサービス領域は必要なく、その容量は0ブロックで良い。   On the other hand, the administrator H creates a service definition area # 8008h to share data with the administrators I and J, and sets the service definition area # 8104h or # 8105h as the administrator I or J, respectively. It is created as a dummy service definition area for controlling access to the service definition area # 8008h. Accordingly, the service area managed by the service definition areas # 8104h and # 8105h is not necessary, and the capacity thereof may be 0 block.

この場合において、管理者Hが、例えば、サービスキー#8104hを変更すると、ICカード2において、そのサービスキー#8104hを用いて、第2アクセスキーKI2が生成されて認証が行われる管理者Iは、サービス定義領域#8008hにアクセスすることができなくなる。即ち、管理者Iによるサービス定義領域#8008hへのアクセスだけが禁止される。一方、管理者Hが、例えば、サービスキー#8105hを変更すると、ICカード2において、そのサービスキー#8105hを用いて、第2アクセスキーKJ2が生成されて認証が行われる管理者Jは、サービス定義領域#8008hにアクセスすることができなくなる。即ち、管理者Jによるサービス定義領域#8008hへのアクセスだけが禁止される。 In this case, for example, when the administrator H changes the service key # 8104h, the administrator I who uses the service key # 8104h to generate the second access key K I2 and performs authentication in the IC card 2 Cannot access service definition area # 8008h. That is, only access to the service definition area # 8008h by the administrator I is prohibited. On the other hand, when the administrator H changes the service key # 8105h, for example, the administrator J who is authenticated by generating the second access key K J2 using the service key # 8105h in the IC card 2 The service definition area # 8008h cannot be accessed. That is, only access to the service definition area # 8008h by the administrator J is prohibited.

以上のように、ダミーのサービス定義領域を利用することで、特定の子の管理者だけのアクセスを禁止することができる。   As described above, by using the dummy service definition area, it is possible to prohibit access by only a specific child administrator.

以上、本発明を、非接触で通信が行われる非接触カードシステムに適用した場合について説明したが、本発明は、接触した状態で通信が行われるカードシステムにも適用可能である。また、本発明の適用範囲は、カードシステムに限定されるものではない。   As described above, the case where the present invention is applied to a non-contact card system in which communication is performed in a non-contact manner has been described. The scope of application of the present invention is not limited to the card system.

なお、本実施の形態では、認証を、いわゆる秘密鍵方式で行うようにしたが、認証は、いわゆる公開鍵方式で行うようにすることも可能である。   In the present embodiment, authentication is performed by a so-called secret key method, but authentication can also be performed by a so-called public key method.

また、本実施の形態では、あるエリア定義領域の階層のサービス定義領域にアクセスするときに、そのエリア定義領域の階層から、最上位階層までのパス上にあるエリア定義領域のエリアキーを順次用いて、第1アクセスキーを生成するようにしたが、第1アクセスキーの生成方法は、これに限定されるものではない。さらに、本実施の形態では、アクセス対象のサービス定義領域のサービスキーを順次用いて、第2アクセスキーを生成するようにしたが、第2アクセスキーの生成方法も、これに限定されるものではない。即ち、第1アクセスキーおよび第2アクセスキーは、任意の2以上のエリアキーまたはサービスキーを順次用いて生成することが可能である。   Further, in this embodiment, when accessing a service definition area in a certain area definition area, the area definition area area keys on the path from the area definition area hierarchy to the highest hierarchy are sequentially used. Although the first access key is generated, the method for generating the first access key is not limited to this. Furthermore, in the present embodiment, the second access key is generated by sequentially using the service key of the service definition area to be accessed, but the method of generating the second access key is not limited to this. Absent. That is, the first access key and the second access key can be generated by sequentially using any two or more area keys or service keys.

さらに、本実施の形態では、ユーザブロックおよびシステムブロックのいずれも、1のメモリであるEEPROM66に記憶させるようにしたが、ユーザブロックとシステムブロックとは、物理的に、別々のメモリに記憶させるようにすることが可能である。   Furthermore, in this embodiment, both the user block and the system block are stored in the EEPROM 66 which is one memory. However, the user block and the system block are physically stored in separate memories. It is possible to

また、本実施の形態では、データをEEPROMに記憶させるようにしたが、本発明は、EEPROM以外の半導体メモリや、磁気ディスクなどを対象とすることも可能である。   In this embodiment, data is stored in the EEPROM. However, the present invention can also be applied to a semiconductor memory other than the EEPROM, a magnetic disk, or the like.

本実施の形態に記載のデータ記憶装置およびデータ記憶方法によれば、管理対象の記憶領域に割り当て可能な、記憶領域を識別するための記憶領域識別コードの範囲、および管理対象の記憶領域の空き容量を記憶するエリア定義領域を有する記憶手段のエリア定義領域の記憶内容に基づいて、記憶手段が管理される。従って、記憶手段のリソース管理を行うことが可能となる。   According to the data storage device and the data storage method described in the present embodiment, the range of the storage area identification code for identifying the storage area that can be assigned to the management target storage area, and the free space of the management target storage area The storage means is managed based on the storage contents of the area definition area of the storage means having the area definition area for storing the capacity. Therefore, it is possible to perform resource management of the storage means.

本実施の形態に記載のデータ記憶装置およびに記載のデータ記憶方法によれば、データ記憶手段の記憶領域が階層構造にされて管理されており、データ記憶手段の記憶領域の各階層に対する階層キー、またはデータが記憶された記憶領域に対するデータ記憶領域キーを、2以上用いて、認証に用いる1以上の認証キーが生成され、その認証キーに基づいて、認証が行われる。従って、データ記憶手段に対する、フレキシブルでセキュリティの高いアクセス制御を行うことが可能となる。   According to the data storage device and the data storage method described in the present embodiment, the storage area of the data storage means is managed in a hierarchical structure, and the hierarchy key for each hierarchy of the storage area of the data storage means Alternatively, two or more data storage area keys for a storage area in which data is stored are used to generate one or more authentication keys used for authentication, and authentication is performed based on the authentication keys. Therefore, it is possible to perform flexible and high-security access control for the data storage means.

本発明を適用したカードシステムの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the card system to which this invention is applied. 図1のリーダ/ライタ1の構成例を示すブロック図である。It is a block diagram which shows the structural example of the reader / writer 1 of FIG. 図1のICカード2の構成例を示すブロック図である。It is a block diagram which shows the structural example of IC card 2 of FIG. 図3のEEPROM66の論理フォーマットを示す図である。It is a figure which shows the logical format of EEPROM66 of FIG. 図3のEEPROM66のディレクトリ構造を示す図である。It is a figure which shows the directory structure of EEPROM66 of FIG. 図5の階層構造が構成されていく過程を説明するための図である。It is a figure for demonstrating the process in which the hierarchical structure of FIG. 5 is comprised. エリア作成処理を説明するためのフローチャートである。It is a flowchart for demonstrating an area creation process. サービス作成処理を説明するためのフローチャートである。It is a flowchart for demonstrating a service creation process. 管理者間でのキーの受け渡しを説明するための図である。It is a figure for demonstrating delivery of the key between administrators. 管理者Aがサービスを提供するときに必要な情報を説明するための図である。It is a figure for demonstrating information required when the administrator A provides a service. 管理者Aがサービスを提供するときのICカード2の処理を説明するための図である。It is a figure for demonstrating the process of the IC card 2 when the administrator A provides a service. サービス提供装置111によるICカード2の認証方法を説明するための図である。It is a figure for demonstrating the authentication method of IC card 2 by the service provision apparatus 111. FIG. ICカード2によるサービス提供装置111の認証方法を説明するための図である。It is a figure for demonstrating the authentication method of the service provision apparatus 111 by IC card 2. FIG. 管理者B2がサービスを提供するときに必要な情報を説明するための図である。It is a figure for demonstrating information required when the administrator B2 provides a service. 管理者B2がサービスを提供するときのICカード2の処理を説明するための図である。It is a figure for demonstrating the process of IC card 2 when the administrator B2 provides a service. 管理者Cがサービスを提供するときに必要な情報を説明するための図である。It is a figure for demonstrating information required when the administrator C provides a service. 管理者Cがサービスを提供するときのICカード2の処理を説明するための図である。It is a figure for demonstrating the process of the IC card 2 when the administrator C provides a service. 管理者Cがサービスを提供するときに必要な情報を説明するための図である。It is a figure for demonstrating information required when the administrator C provides a service. 管理者Cがサービスを提供するときのICカード2の処理を説明するための図である。It is a figure for demonstrating the process of the IC card 2 when the administrator C provides a service. 相互認証に用いる第1アクセスキーおよび第2アクセスキーの生成方法を説明するための図である。It is a figure for demonstrating the production | generation method of the 1st access key used for mutual authentication, and a 2nd access key. EEPROM66における階層構造を示す図である。2 is a diagram showing a hierarchical structure in an EEPROM 66. FIG. 管理者間でのキーの受け渡しを説明するための図である。It is a figure for demonstrating delivery of the key between administrators. 管理者間でのサービス(データ)の共有を説明するための図である。It is a figure for demonstrating sharing of the service (data) between administrators. EEPROM66における階層構造を示す図である。2 is a diagram showing a hierarchical structure in an EEPROM 66. FIG. 管理者間でのキーの受け渡しを説明するための図である。It is a figure for demonstrating delivery of the key between administrators.

符号の説明Explanation of symbols

1 リーダ/ライタ, 2 ICカード, 3 コントローラ, 21 IC, 23 変調回路, 25 復調回路, 27 アンテナ, 51 IC, 52 コンデンサ, 53 アンテナ, 61 RFインタフェース部, 62 BPSK復調回路, 63 PLL部, 64 演算部, 65 ROM, 66 EEPROM, 67 RAM, 68 BPSK変調回路, 81 ASK復調部, 82 電圧レギュレータ, 83 発振回路, 84 ASK変調部, 91 シーケンサ, 92 暗号/復号部, 93 パリティ演算部, 101 発券機, 111 サービス提供装置   1 Reader / Writer, 2 IC Card, 3 Controller, 21 IC, 23 Modulation Circuit, 25 Demodulation Circuit, 27 Antenna, 51 IC, 52 Capacitor, 53 Antenna, 61 RF Interface Unit, 62 BPSK Demodulation Circuit, 63 PLL Unit, 64 Arithmetic unit, 65 ROM, 66 EEPROM, 67 RAM, 68 BPSK modulation circuit, 81 ASK demodulation unit, 82 voltage regulator, 83 oscillation circuit, 84 ASK modulation unit, 91 sequencer, 92 encryption / decryption unit, 93 parity calculation unit, 101 Ticketing machine, 111 Service providing device

Claims (12)

所定のサービスを提供するためのデータを記憶するデータ記憶装置であって、
前記データを記憶するデータ記憶手段と、
前記データ記憶手段の記憶領域を階層構造にして管理する管理手段と、
前記データ記憶手段の記憶領域の各階層に対する階層キーを記憶する階層キー記憶手段と、
前記データが記憶された前記記憶領域に対するデータ記憶領域キーを記憶するデータ記憶領域キー記憶手段と、
前記記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である前記記憶領域の階層よりも上の階層に対する前記階層キーまたはアクセス対象である前記記憶領域に対する前記データ記憶領域キーを予め決められた順序で用いた暗号化により得られる前記認証キーを生成する生成手段と、
生成された前記認証キーを用いて第1の認証処理を実行る認証処理実行手段と
を備えるデータ記憶装置。
A data storage device for storing data for providing a predetermined service,
Data storage means for storing the data;
Management means for managing the storage area of the data storage means in a hierarchical structure;
Hierarchical key storage means for storing a hierarchical key for each hierarchy in the storage area of the data storage means;
Data storage area key storage means for storing a data storage area key for the storage area in which the data is stored;
For generation information for generating one or more authentication keys used for authentication for accessing the storage area, the hierarchy key or access target for a hierarchy higher than the hierarchy of the storage area to be accessed Generating means for generating the authentication key obtained by encryption using the data storage area key for the storage area in a predetermined order ;
Data storage device and a authentication process execution means that perform first authentication process using the generated the authentication key is.
前記外部機器との間で通信を行う通信手段をさらに備え、
前記認証処理実行手段は、さらに、生成された前記認証キーを用いて、第2の認証処理を前記外部機器に実行させる
請求項1に記載のデータ記憶装置。
A communication means for communicating with the external device;
The data storage device according to claim 1, wherein the authentication process execution unit further causes the external device to execute a second authentication process using the generated authentication key .
前記認証処理実行手段は、前記認証キーを用いて、前記データ記憶装置が適正な通信対象であるか否かを判定し、適正な通信対象であると判定したときに前記データ記憶装置を認証する前記第2の認証処理を前記外部機器に実行させる場合、前記外部機器から送信されてくる送信情報に対して、前記認証キーを用いた第1の変換アルゴリズムを施して得られる第1の変換結果を、前記外部機器に送信する送信処理を実行して、前記第2の認証処理を実行させる
請求項2に記載のデータ記憶装置。
The authentication processing execution means determines whether the data storage device is an appropriate communication target using the authentication key, and authenticates the data storage device when it is determined that the data storage device is an appropriate communication target. When causing the external device to execute the second authentication process, a first conversion result obtained by applying a first conversion algorithm using the authentication key to transmission information transmitted from the external device The data storage device according to claim 2 , wherein a second authentication process is executed by executing a transmission process for transmitting the data to the external device.
前記認証処理実行手段は、前記認証キーを用いて、前記外部機器は適正な通信対象であるか否かを判定し、適正な通信対象であると判定したときに前記外部機器を認証する前記第1の認証処理を実行する場合、所定の情報に対して、前記認証キーを用いた第2の変換アルゴリズムを施して得られる第2の変換結果を前記外部機器に送信する送信処理を含む前記第1の認証処理を実行する
請求項3に記載のデータ記憶装置。
The authentication processing execution means determines whether the external device is a proper communication target using the authentication key, and authenticates the external device when it is determined that the external device is a proper communication target . When executing the first authentication process, the first process includes a transmission process for transmitting a second conversion result obtained by applying a second conversion algorithm using the authentication key to predetermined information to the external device . The data storage device according to claim 3, wherein authentication processing 1 is executed.
前記外部機器は、前記第2の認証処理を行う際に用いる他の認証キーを予め保持しており、乱数を発生させ、発生させた前記乱数に対して、前記他の認証キーを用いた第3の変換アルゴリズムを施して得られる第3の変換結果を前記送信情報として前記認証処理実行手段に送信し、
前記認証処理実行手段は、前記外部機器から送信されてくる前記送信情報に対して、前記認証キーを用いた前記第1の変換アルゴリズムを施して得られる前記第1の変換結果を、前記外部機器に送信する前記送信処理を実行する
請求項3に記載のデータ記憶装置。
The external device holds in advance another authentication key to be used when performing the second authentication process, generates a random number, and uses the other authentication key for the generated random number. A third conversion result obtained by applying the conversion algorithm 3 is transmitted as the transmission information to the authentication processing execution means;
The authentication processing execution means uses the first conversion result obtained by applying the first conversion algorithm using the authentication key to the transmission information transmitted from the external device, and displays the first conversion result as the external device. The data storage device according to claim 3, wherein the transmission processing to be transmitted is executed.
前記認証処理実行手段は、
前記所定の情報として乱数を発生させ、発生させた前記乱数に対して、前記認証キーを用いた前記第2の変換アルゴリズムを施して得られる前記第2の変換結果を前記外部機器に送信し、
前記第2の変換結果を受信したことに対応して前記外部機器から送信されてくる他の送信情報に対して、前記認証キーを用いた第4の変換アルゴリズムを施して得られる第4の変換結果が、前記乱数と一致するか否かを判定し、
前記第4の変換結果が、前記乱数と一致すると判定した場合、前記外部機器を適正な通信対象として認証する
前記第1の認証処理を実行する
請求項4に記載のデータ記憶装置。
The authentication process executing means includes
A random number is generated as the predetermined information, and the second conversion result obtained by applying the second conversion algorithm using the authentication key to the generated random number is transmitted to the external device,
A fourth conversion obtained by applying a fourth conversion algorithm using the authentication key to other transmission information transmitted from the external device in response to receiving the second conversion result Determine whether the result matches the random number;
The data storage device according to claim 4, wherein when it is determined that the fourth conversion result matches the random number, the first authentication process is performed to authenticate the external device as an appropriate communication target.
前記生成手段は、前記認証キーを生成するための生成用情報を、アクセス対象である前記記憶領域の階層までのパス上の階層に対する前記階層キーを順次用いて暗号化することにより、1以上の前記認証キーとしての第1の認証キーを生成する
請求項1に記載のデータ記憶装置。
The generation means encrypts the generation information for generating the authentication key by sequentially using the hierarchy key for the hierarchy on the path up to the hierarchy of the storage area to be accessed, thereby The data storage device according to claim 1, wherein a first authentication key is generated as the authentication key.
前記生成手段は、前記第1の認証キーを、アクセス対象である前記データ記憶領域に対する前記データ記憶領域キーを順次用いて暗号化することにより、前記第1の認証キーとは異なる第2の認証キーを生成する
請求項7に記載のデータ記憶装置。
The generating means encrypts the first authentication key by sequentially using the data storage area key for the data storage area to be accessed, thereby providing a second authentication different from the first authentication key. The data storage device according to claim 7, wherein a key is generated.
前記データ記憶手段、前記階層キー記憶手段、および前記データ記憶領域キー記憶手段は、不揮発性のメモリにより構成されている
請求項1に記載のデータ記憶装置。
The data storage device according to claim 1, wherein the data storage unit, the hierarchical key storage unit, and the data storage area key storage unit are configured by a nonvolatile memory.
前記外部機器との間で通信を行う通信手段と、
前記外部機器からの情報に基づいて、前記階層キー記憶手段に記憶されている複数の階層キーのうち、前記認証キーを生成するのに用いる前記階層キーを読み出す第1の読み出し手段と、
前記外部機器からの情報に基づいて、前記データ記憶領域キー記憶手段に記憶されている複数のデータ記憶領域キーのうち、前記認証キーを生成するのに用いる前記データ記憶領域キーを読み出す第2の読み出し手段と
をさらに備え、
前記生成手段は、読み出された前記階層キーおよび前記データ記憶領域キーに基づいて、前記認証キーを生成する
請求項1に記載のデータ記憶装置。
A communication means for communicating with the external device;
First reading means for reading out the hierarchical key used to generate the authentication key out of a plurality of hierarchical keys stored in the hierarchical key storage means based on information from the external device;
Based on information from the external device, a second data storage area key that is used to generate the authentication key out of a plurality of data storage area keys stored in the data storage area key storage means is read out. A reading means, and
The data storage device according to claim 1, wherein the generation unit generates the authentication key based on the read hierarchical key and the data storage area key.
前記通信手段は、前記外部機器と接触して、または非接触で、通信を行う
請求項2または10に記載のデータ記憶装置。
The data storage device according to claim 2, wherein the communication unit performs communication in contact with or non-contact with the external device.
所定のサービスを提供するためのデータを記憶するデータ記憶装置のデータ記憶方法であって、
前記データ記憶装置は、
前記データを記憶するデータ記憶手段と、
前記データ記憶手段の記憶領域を階層構造にして管理する管理手段と、
前記データ記憶手段の記憶領域の各階層に対する階層キーを記憶する階層キー記憶手段と、
前記データが記憶された前記記憶領域に対するデータ記憶領域キーを記憶するデータ記憶領域キー記憶手段と、
生成手段と、
認証処理実行手段と
を備え、
前記生成手段が、前記記憶領域にアクセスするための認証に用いる1以上の認証キーを生成するための生成用情報に対して、アクセス対象である前記記憶領域の階層よりも上の階層に対する前記階層キーまたはアクセス対象である前記記憶領域に対する前記データ記憶領域キーを予め決められた順序で用いた暗号化により得られる前記認証キーを生成する生成ステップと、
前記認証処理実行手段が、生成された前記認証キーを用いて第1の認証処理を実行る認証処理実行ステップと
を含むデータ記憶方法。
A data storage method of a data storage device for storing data for providing a predetermined service,
The data storage device comprises:
Data storage means for storing the data;
Management means for managing the storage area of the data storage means in a hierarchical structure;
Hierarchical key storage means for storing a hierarchical key for each hierarchy in the storage area of the data storage means;
Data storage area key storage means for storing a data storage area key for the storage area in which the data is stored;
Generating means;
An authentication processing execution means, and
For the generation information for generating one or more authentication keys used by the generation means for authentication for accessing the storage area, the hierarchy for a hierarchy above the hierarchy of the storage area to be accessed Generating the authentication key obtained by encryption using the data storage area key for the key or the storage area to be accessed in a predetermined order ;
The authentication process executing means, data storing method comprising the authentication process execution step to run a first authentication process using the generated the authentication key.
JP2007036471A 2007-02-16 2007-02-16 Data storage device and data storage method Expired - Lifetime JP4618259B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007036471A JP4618259B2 (en) 2007-02-16 2007-02-16 Data storage device and data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007036471A JP4618259B2 (en) 2007-02-16 2007-02-16 Data storage device and data storage method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP20149898A Division JP4051510B2 (en) 1998-07-16 1998-07-16 Data storage device and data storage method

Publications (2)

Publication Number Publication Date
JP2007133913A JP2007133913A (en) 2007-05-31
JP4618259B2 true JP4618259B2 (en) 2011-01-26

Family

ID=38155457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007036471A Expired - Lifetime JP4618259B2 (en) 2007-02-16 2007-02-16 Data storage device and data storage method

Country Status (1)

Country Link
JP (1) JP4618259B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011064833A1 (en) * 2009-11-24 2011-06-03 三菱電機株式会社 Information processing apparatus, information processing method, and program

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2831660B2 (en) * 1988-08-26 1998-12-02 株式会社東芝 Portable electronic devices
US5280614A (en) * 1990-08-21 1994-01-18 International Business Machines Corporation Apparatus and method for controlling access to data using domains
JPH06131517A (en) * 1992-10-19 1994-05-13 Matsushita Electric Ind Co Ltd Ic card
JP2502894B2 (en) * 1992-08-13 1996-05-29 松下電器産業株式会社 IC card
JPH06289782A (en) * 1993-04-07 1994-10-18 Matsushita Electric Ind Co Ltd Mutual authentication method
JP3594980B2 (en) * 1993-12-10 2004-12-02 株式会社東芝 File management method
JPH09106376A (en) * 1995-10-11 1997-04-22 Dainippon Printing Co Ltd Portable information recording medium
JP4011641B2 (en) * 1995-10-18 2007-11-21 大日本印刷株式会社 Portable information recording medium
JPH09179951A (en) * 1995-12-22 1997-07-11 Dainippon Printing Co Ltd Portable information recording medium and its system
JPH09265254A (en) * 1996-03-28 1997-10-07 Dainippon Printing Co Ltd Mutual authentication system for information recording medium
JPH10105472A (en) * 1996-09-30 1998-04-24 Toshiba Corp Method for managing access of memory
JPH1031626A (en) * 1996-07-17 1998-02-03 Nippon Telegr & Teleph Corp <Ntt> Ic card system

Also Published As

Publication number Publication date
JP2007133913A (en) 2007-05-31

Similar Documents

Publication Publication Date Title
JP4051510B2 (en) Data storage device and data storage method
JP4029234B2 (en) Information processing apparatus and information processing method
US7886970B2 (en) Data communicating apparatus and method for managing memory of data communicating apparatus
TWI395448B (en) Information processing device, information processing method, program and communication system
US7882208B2 (en) Information management apparatus, information management method, and program for managing an integrated circuit
US20070271433A1 (en) Information Management Device and Information Management Method
US7516479B2 (en) Data communicating apparatus and method for managing memory of data communicating apparatus
JP2001325580A (en) Device and method for data storage, device and method for information processing, and recording medium
US7376973B2 (en) Data storage apparatus
JP4576894B2 (en) Information management apparatus and information management method
JP4618259B2 (en) Data storage device and data storage method
JP2005134953A (en) Unset ic card, ic card issue system, and method for issuing ic card application
WO2005103917A1 (en) Data communication system, data communication method, and data communication apparatus
JP2004112476A (en) Data processing apparatus, program thereof, and apparatus thereof

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100329

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100608

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100809

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101011

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131105

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131105

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term