JP6340916B2 - Data output method, data read method, storage medium device, and data read device - Google Patents
Data output method, data read method, storage medium device, and data read device Download PDFInfo
- Publication number
- JP6340916B2 JP6340916B2 JP2014106336A JP2014106336A JP6340916B2 JP 6340916 B2 JP6340916 B2 JP 6340916B2 JP 2014106336 A JP2014106336 A JP 2014106336A JP 2014106336 A JP2014106336 A JP 2014106336A JP 6340916 B2 JP6340916 B2 JP 6340916B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- unit
- file
- encryption
- storage medium
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、データ出力方法、データ読出方法、記憶媒体装置及びデータ読出装置に関する。 The present invention relates to a data output method, a data read method, a storage medium device, and a data read device.
ICカードにはファイル単位でデータが記憶される。また、ICカードに記憶されるデータには特定のユーザでなければ読み出されないようにすべきデータが含まれる場合がある。このような場合には、データにアクセス権を設定し、アクセス権を有するユーザによってのみICカードからのデータの読み出しが可能なようにアクセス制限をかければよい。 The IC card stores data in units of files. In addition, data stored in the IC card may include data that should be read only by a specific user. In such a case, it is only necessary to set an access right to the data and restrict access so that only the user having the access right can read the data from the IC card.
ICカードにおいて、アクセス権はファイル単位で設定される。従って、或るアクセス権が設定されたファイルについて、アクセス権を有するユーザであればファイル単位で読み出しを行うことができる。これに対して、同じアクセス権が設定されたファイルについて、アクセス権を有さないユーザは、ファイルそのものの読み出しを行うことができない。 In the IC card, the access right is set for each file. Therefore, a file having a certain access right can be read in file units by a user having the access right. On the other hand, a user who does not have an access right cannot read the file itself for a file to which the same access right is set.
ICカードに記憶されるデータ用途などに応じては、複数の異なる種別のデータを1つのファイルにまとめることが可能な場合がある。しかし、1つのファイルに含めることが可能なデータであっても、これらのデータ間で異なるアクセス権を設定したい場合がある。 Depending on the use of data stored in the IC card, it may be possible to combine a plurality of different types of data into one file. However, even for data that can be included in one file, there are cases where it is desired to set different access rights between these data.
上記したように、ICカードにおけるデータのアクセス権はファイル単位で設定される。このために、上記のようにデータ間で異なるアクセス権が設定されている場合には、異なるアクセス権ごとに対応して複数のファイルを用意し、これらのファイルの各々に対して、対応のアクセス権が設定されたデータを格納することになる。
即ち、複数のデータについて、例えば用途的には1つのファイルに含めることが可能であっても、アクセス権が異なるような場合には、アクセス権ごとにファイルが生成される。そのうえで、生成されたファイルごとに対応のアクセス権のデータが格納される。
As described above, the data access right in the IC card is set in units of files. For this reason, when different access rights are set between data as described above, a plurality of files are prepared for each different access right, and the corresponding access is made to each of these files. The data to which the right is set is stored.
That is, even if a plurality of data can be included in one file for use, for example, if the access right is different, a file is generated for each access right. In addition, access right data corresponding to each generated file is stored.
このように、1つのファイルにまとめておきたいようなデータが複数のファイルに分散されることによっては、同じ内訳のデータをICカードに記憶させるのに必要なファイルの数が複数に増加してしまう。
ファイルが増加することによっては、ファイルの管理のためにICカードに記憶されるファイルヘッダやファイルシステムなどのファイル管理情報もファイル数に応じて増加する。このようにファイル管理情報の数が増加することによっては、同じデータをICカードに記憶させるにあたって必要な記憶容量も増加し、ICカードの記憶領域の使用効率が低下することになってしまう。
As described above, when data that is desired to be collected in one file is distributed to a plurality of files, the number of files required to store the same breakdown data in the IC card increases to a plurality. .
As the number of files increases, file management information such as a file header and a file system stored in the IC card for file management also increases according to the number of files. As the number of file management information increases in this way, the storage capacity required to store the same data in the IC card also increases, and the use efficiency of the storage area of the IC card decreases.
本発明は、このような事情に鑑みてなされたもので、アクセス権の異なる複数のデータが含まれるファイルを記憶媒体装置から読み出すにあたり、アクセス権に応じてアクセス可能なデータのみを適切に読み出せるようにすることを目的とする。 The present invention has been made in view of such circumstances, and when reading a file including a plurality of data having different access rights from a storage medium device, only accessible data can be appropriately read according to the access rights. The purpose is to do so.
上述した課題を解決する本発明の一態様は、記憶媒体を備える記憶媒体装置におけるデータ出力方法であって、データ読出部が、データ読出装置から送信されたデータ読出コマンドの受信に応じて、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する前記記憶媒体から、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すステップと、データ送信部が、前記データ読出部によって読み出された単位データと暗号状態情報とを前記データ読出装置に対して送信するステップとを含むデータ出力方法である。 One embodiment of the present invention for solving the above-described problem is a data output method in a storage medium device including a storage medium, in which a data reading unit performs encryption in response to reception of a data read command transmitted from the data reading device. Reading unit data requested by the received data read command and encryption state information associated with the unit data from the storage medium storing unit data associated with the encryption state information indicating the state; The data transmission method includes a step in which the data transmission unit transmits the unit data and the encryption state information read by the data reading unit to the data reading device.
本発明は、上記のデータ出力方法であって、前記暗号状態情報が示す暗号状態は、暗号文の状態と、暗号化されていない平文の状態とのうちのいずれか1つであってもよい。 The present invention is the above data output method, wherein the cipher state indicated by the cipher state information may be any one of a ciphertext state and an unencrypted plaintext state. .
本発明は、上記のデータ出力方法であって、前記暗号文の状態は、前記外部通信装置から受信されたときの原暗号文の状態と、前記原暗号文を暗号化したときと異なる暗号化処理により再び暗号化して得られる再暗号文の状態との少なくともいずれか一方であってもよい。 The present invention is the above-described data output method, wherein the ciphertext state is different from the state of the original ciphertext when received from the external communication device and the encryption of the original ciphertext It may be at least one of a re-ciphertext state obtained by re-encrypting by processing.
本発明は、上記のデータ出力方法であって、前記単位データは、ファイルにおける単位データ格納領域に格納されるデータであってもよい。 The present invention is the above data output method, wherein the unit data may be data stored in a unit data storage area in a file.
本発明は、上記のデータ出力方法であって、前記暗号状態情報は、前記単位データが格納される単位データ格納領域における所定位置に格納されてもよい。 The present invention is the data output method described above, wherein the encryption state information may be stored at a predetermined position in a unit data storage area in which the unit data is stored.
本発明は、上記のデータ出力方法であって、前記暗号状態情報は、前記単位データを格納するファイルの管理のために前記記憶媒体に記憶される管理情報に含まれてもよい。 The present invention is the data output method described above, wherein the encryption state information may be included in management information stored in the storage medium for management of a file storing the unit data.
本発明は、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する記憶媒体を備える記憶媒体装置からデータの読み出しを行うデータ読出装置におけるデータ読出方法であって、データ読出コマンド送信部が、単位データの読み出しを要求するデータ読出コマンドを前記記憶媒体装置に送信するステップと、復号部が、前記データ読出コマンドに対する応答として前記記憶媒体から読み出された単位データと前記単位データに対応付けられた暗号状態情報とを前記記憶媒体装置から受信するのに応じて、受信された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データの復号を行い、前記単位データへのアクセス権を有さない場合には前記単位データの復号を行わないステップとを含むデータ読出方法である。 The present invention relates to a data reading method in a data reading device for reading data from a storage medium device including a storage medium that stores unit data associated with encryption state information indicating an encryption state, and includes a data read command transmission unit Transmitting a data read command requesting reading of unit data to the storage medium device, and a decoding unit corresponding to the unit data and the unit data read from the storage medium in response to the data read command In response to receiving the attached encryption state information from the storage medium device, the unit data is decrypted when having access right to the unit data of the encryption state indicated by the received encryption state information, Including a step of not decrypting the unit data when the user does not have an access right to the unit data. A reading method.
本発明は、記憶媒体を備える記憶媒体装置におけるデータ出力方法であって、データ読出部が、データ読出装置から送信されたデータ読出コマンドの受信に応じて、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する記憶媒体から、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すステップと、復号部が、前記データ読出部によって読み出された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データを復号して出力し、前記単位データへのアクセス権を有さない場合には前記単位データを復号せずに出力するステップと、データ送信部が、前記復号部から出力された単位データを前記データ読出装置に対して送信するステップとを備えるデータ出力方法である。 The present invention relates to a data output method in a storage medium device including a storage medium, wherein a data reading unit associates encryption state information indicating an encryption state in response to reception of a data read command transmitted from the data reading device. Reading out the unit data requested by the received data read command and the encryption state information associated with the unit data from the storage medium storing the received unit data, and the decrypting unit by the data reading unit The unit data is decrypted and output when it has an access right to the unit data in the encryption state indicated by the read encryption state information, and when it does not have the access right to the unit data, the unit data And outputting the unit data output from the decoding unit to the data reading device A data output method and a step.
本発明は、上記のデータ出力方法であって、前記暗号状態情報が示す暗号状態は、暗号文の状態と、暗号化されていない平文の状態とのうちのいずれか1つであってもよい。 The present invention is the above data output method, wherein the cipher state indicated by the cipher state information may be any one of a ciphertext state and an unencrypted plaintext state. .
本発明は、上記のデータ出力方法であって、前記暗号文の状態は、前記外部通信装置から受信されたときの原暗号文の状態と、前記原暗号文を暗号化したときと異なる暗号化処理により再び暗号化して得られる再暗号文の状態との少なくともいずれか一方であってもよい。 The present invention is the above-described data output method, wherein the ciphertext state is different from the state of the original ciphertext when received from the external communication device and the encryption of the original ciphertext It may be at least one of a re-ciphertext state obtained by re-encrypting by processing.
本発明は、上記のデータ出力方法であって、前記復号部は、前記データ読出部によって読み出された暗号状態情報が示す暗号状態が暗号文の状態であって、前記暗号文の状態の単位データへのアクセス権を有する場合には、前記データ読出部によって読み出された単位データを第1復号アルゴリズムにより復号して出力し、前記データ読出部によって読み出された暗号状態情報が示す暗号状態が平文の状態である場合には、前記データ読出部によって読み出された単位データを復号することなく出力し、前記データ読出部によって読み出された暗号状態情報が示す暗号状態が再暗号文の状態であって、前記再暗号文の状態の単位データへのアクセス権を有する場合には、前記データ読出部によって読み出された単位データを前記第1復号アルゴリズムとは異なる第2復号アルゴリズムにより復号して出力してもよい。 The present invention is the above-described data output method, wherein the decryption unit is a ciphertext state unit in which the cipher state indicated by the cipher state information read by the data read unit is a ciphertext state. In the case of having the right to access data, the unit data read by the data reading unit is decrypted and output by the first decryption algorithm, and the encryption state indicated by the encryption state information read by the data reading unit Is a plaintext state, the unit data read by the data reading unit is output without being decrypted, and the encryption state indicated by the encryption state information read by the data reading unit is the re-ciphertext. If it is in the state and has the right to access the unit data in the re-ciphertext state, the unit data read by the data reading unit is Rhythm may be output by decoding by different second decryption algorithm to the.
本発明は、上記のデータ出力方法であって、前記単位データは、ファイルにおける単位データ格納領域に格納されるデータであってもよい。 The present invention is the above data output method, wherein the unit data may be data stored in a unit data storage area in a file.
本発明は、上記のデータ出力方法であって、前記暗号状態情報は、前記単位データが格納される単位データ格納領域における所定位置に格納されてもよい。 The present invention is the data output method described above, wherein the encryption state information may be stored at a predetermined position in a unit data storage area in which the unit data is stored.
本発明は、上記のデータ出力方法であって、前記暗号状態情報は、前記単位データを格納するファイルの管理のために前記記憶媒体に記憶される管理情報に含まれてもよい。 The present invention is the data output method described above, wherein the encryption state information may be included in management information stored in the storage medium for management of a file storing the unit data.
本発明は、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する記憶媒体と、データ読出装置と通信を行う通信部と、前記データ読出装置から送信されたデータ読出コマンドが前記通信部にて受信されるのに応じて、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを前記記憶媒体から読み出すデータ読出部と、前記データ読出部によって読み出された単位データと暗号状態情報とを前記通信部から前記データ読出装置に対して送信させるデータ送信部とを備える記憶媒体装置である。 The present invention includes a storage medium that stores unit data associated with encryption state information indicating an encryption state, a communication unit that communicates with a data reading device, and a data reading command transmitted from the data reading device. A data reading unit for reading out the unit data requested by the received data read command and the encryption state information associated with the unit data from the storage medium, and the data reading And a data transmission unit that transmits the unit data read by the unit and the encryption state information from the communication unit to the data reading device.
本発明は、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する記憶媒体を備える記憶媒体装置と通信を行う通信部と、単位データの読み出しを要求するデータ読出コマンドを前記記憶媒体装置に送信するデータ読出コマンド送信部と、前記データ読出コマンドに対する応答として前記記憶媒体から読み出された単位データと前記単位データに対応付けられた暗号状態情報とを前記記憶媒体装置から受信するのに応じて、受信された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データの復号を行い、前記単位データへのアクセス権を有さない場合には前記単位データの復号を行わない復号部とを備えるデータ読出装置である。 The present invention provides a communication unit that communicates with a storage medium device including a storage medium that stores unit data associated with encryption state information indicating an encryption state, and a data read command that requests reading of unit data. A data read command transmitting unit for transmitting to the device, unit data read from the storage medium as a response to the data read command, and encryption state information associated with the unit data from the storage medium device; Accordingly, the unit data is decrypted when having access right to the unit data in the encryption state indicated by the received encryption state information, and when the unit data is not having access right to the unit data, the unit is decrypted. A data reading device including a decoding unit that does not decode data.
本発明は、暗号状態を示す暗号状態情報が対応付けられた単位データを記憶する記憶媒体と、データ読出装置と通信を行う通信部と、前記データ読出装置が送信したデータ読出コマンドが前記通信部にて受信されるのに応じて、受信された前記データ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを前記記憶媒体から読み出すデータ読出部と、前記データ読出部によって読み出された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データを復号して出力し、前記単位データへのアクセス権を有さない場合には前記単位データを復号せずに出力する復号部と、前記復号部から出力された単位データを前記データ読出装置に対して送信するデータ送信部とを備える記憶媒体装置である。 The present invention relates to a storage medium that stores unit data associated with encryption state information indicating an encryption state, a communication unit that communicates with a data reading device, and a data reading command transmitted from the data reading device includes the communication unit. A data reading unit for reading out the unit data requested by the received data read command and the encryption state information associated with the unit data from the storage medium, and the data reading The unit data is decrypted and output when the right to access the unit data in the encryption state indicated by the encryption state information read by the unit is obtained, and when the right to access the unit data is not included A decoding unit that outputs the unit data without decoding, and a data transmission unit that transmits the unit data output from the decoding unit to the data reading device. Is a media devices.
以上説明したように、本発明によれば、アクセス権の異なる複数のデータが含まれるファイルを記憶媒体装置から読み出すにあたり、アクセス権に応じてアクセス可能なデータのみを適切に読み出すことが可能になるという効果が得られる。 As described above, according to the present invention, when a file including a plurality of data having different access rights is read from the storage medium device, only accessible data can be appropriately read according to the access right. The effect is obtained.
<第1実施形態>
[ICカードの記憶媒体におけるデータ構造]
以下、本発明の実施形態としてのICカード(記憶媒体装置の一例)とリーダライタ(データ読出装置の一例)とについて図面を参照して説明する。
本実施形態のICカードは、内部に記憶媒体を備え、リーダライタなどの外部通信装置と通信が可能に構成される。リーダライタとの通信が可能とされることで、リーダライタからデータ読み出しの指示が行われた場合、ICカードは、記憶媒体からデータを読み出し、読み出したデータをリーダライタに出力する。
<First Embodiment>
[Data Structure in IC Card Storage Medium]
Hereinafter, an IC card (an example of a storage medium device) and a reader / writer (an example of a data reading device) as embodiments of the present invention will be described with reference to the drawings.
The IC card of this embodiment includes a storage medium inside and is configured to be able to communicate with an external communication device such as a reader / writer. By enabling communication with the reader / writer, when an instruction to read data is issued from the reader / writer, the IC card reads the data from the storage medium and outputs the read data to the reader / writer.
本実施形態において、ICカードの記憶媒体にはファイル単位で管理されるようにしてデータの書き込み、読み出しが行われる。
ICカードの記憶媒体に書き込まれるファイルは、DF(Dedicated File:専用ファイル)あるいはEF(Elementary File:基礎ファイル)である。
DFは、下位のEFやDFをグループ化するためのファイルである。
EFは、データを格納するファイルである。EFは、IEF(Internal Elementary File:内部基礎ファイル)とWEF(Work Elementary File:作業基礎ファイル)との2つの種別に分けられる。
IEFは、セキュリティのためのキーデータが格納されるファイルである。IEFは、セキュリティ上、ICカードから外部への出力が不可のファイルであり、ICカードの内部においてのみ使用される。
WEFは、ICカードから外部への出力が可能なファイルである。WEFは、例えば、ユーザに付与されたポイントに関する情報などの一般的なデータを格納する。
In the present embodiment, data is written to and read from the storage medium of the IC card so as to be managed in units of files.
The file written to the storage medium of the IC card is a DF (Dedicated File) or an EF (Elementary File).
DF is a file for grouping subordinate EFs and DFs.
The EF is a file for storing data. EF is classified into two types, ie, IEF (Internal Elementary File) and WEF (Work Elementary File).
The IEF is a file in which key data for security is stored. The IEF is a file that cannot be output from the IC card to the outside for security, and is used only inside the IC card.
WEF is a file that can be output from an IC card to the outside. The WEF stores, for example, general data such as information on points given to the user.
図1から図3を参照して、ICカードの記憶媒体のユーザデータ領域AR3に格納される基本的データ構造と、本実施形態に至った経緯について説明する。
図1は、本実施形態のICカードが備える記憶媒体203の記憶領域についてのマッピング例を示している。同図に示すように、記憶媒体203の記憶領域は、ファイル管理領域AR1、システム領域AR2及びユーザデータ領域AR3を備える。
With reference to FIGS. 1 to 3, the basic data structure stored in the user data area AR3 of the storage medium of the IC card and the background to the present embodiment will be described.
FIG. 1 shows a mapping example of the storage area of the
ファイル管理領域AR1は、システム領域AR2、ユーザデータ領域AR3に記憶されるデータをファイル単位で管理するファイル管理情報が記憶される領域である。一例として本実施形態におけるファイル管理領域AR1には、FAT(File Allocation Table)ファイルシステムに対応したファイル管理情報が格納されればよい。 The file management area AR1 is an area in which file management information for managing data stored in the system area AR2 and the user data area AR3 in units of files is stored. As an example, file management information corresponding to a FAT (File Allocation Table) file system may be stored in the file management area AR1 in the present embodiment.
システム領域AR2は、OS(Operating System)や各種設定情報などをはじめとするシステム情報が記憶される領域である。
ユーザデータ領域AR3は、アプリケーションが使用するユーザデータが記憶される領域である。ファイルのデータは、ユーザデータ領域AR3に記憶される。
なお、記憶媒体203の記憶領域においては、ファイル管理領域AR1、システム領域AR2及びユーザデータ領域AR3以外の領域が含まれていてもよい。
The system area AR2 is an area for storing system information including an OS (Operating System) and various setting information.
The user data area AR3 is an area in which user data used by the application is stored. The file data is stored in the user data area AR3.
Note that the storage area of the
図2は、EFであるファイルFLの構造例を示している。同図に示すように、ファイルFLは、ファイルヘッダとデータ領域とを含む構造である。
ファイルヘッダには、ファイルに関連する所定のパラメータが格納される。
データ領域には、ファイルとしてのデータが格納される。本実施形態において、データ領域に格納されるファイルは、固定長によるレコード(単位データ格納領域の一例)が配置されるレコード構造を有する。このようなレコード構造においては、レコードごとにデータ(単位データの一例)が格納される。レコードに格納されるデータ(レコードデータ)は、以下に例示するように、それぞれ所定の定義に従った内容を有する。
FIG. 2 shows an example of the structure of a file FL that is an EF. As shown in the figure, the file FL has a structure including a file header and a data area.
The file header stores predetermined parameters related to the file.
Data as a file is stored in the data area. In the present embodiment, the file stored in the data area has a record structure in which records of fixed length (an example of unit data storage areas) are arranged. In such a record structure, data (an example of unit data) is stored for each record. Data stored in a record (record data) has contents according to a predetermined definition, as exemplified below.
ここで、同図に示すファイルFLを記憶するICカードはクレジットカードであって、クレジットカードとしてICカードが記憶すべき情報には氏名、住所、カード番号が含まれる場合を例に挙げる。
同図には、レコード#1に氏名のデータが格納され、レコード#2に住所のデータが格納され、レコード#3にカード番号が格納された例が示されている。
このように、1つのファイルは1以上のレコードにより形成され、各レコードには、所定の定義に従った種別のデータが格納される。即ち、データをレコード単位で書き込むことにより、1つのファイルに複数の異なる種別のデータをまとめて格納することができる。
Here, the IC card that stores the file FL shown in the figure is a credit card, and a case where a name, an address, and a card number are included in the information that the IC card should store as a credit card is taken as an example.
The figure shows an example in which name data is stored in
Thus, one file is formed by one or more records, and each record stores data of a type according to a predetermined definition. That is, by writing data in record units, a plurality of different types of data can be stored together in one file.
ただし、上記のようにファイルに書き込まれる種別ごとのデータの間で、例えばセキュリティのために、アクセス権が異なるような場合がある。ここでは、具体例として、同図に例示したようにアクセス権が異なる態様を例に挙げる。
即ち、同図のレコード#1〜#3に格納される氏名、住所、カード番号の各データのうち、氏名のデータとカード番号のデータは、例えばICカードのカード面にも印字されていることから、機密性を要さないデータである。そこで、氏名のデータとカード番号のデータについては、特にアクセス権が設定されない(アクセス権無し)。
一方、レコード#2に格納される住所は、個人情報の1つであって、クレジットカードであるICカード200のカード面には印字されていない。従って、住所のデータは個人情報として機密性を要するデータである。そこで、住所のデータについては、所定のアクセス権を有するユーザのみがアクセス可能なアクセス権が設定される(アクセス権有り)。
However, there are cases where the access right differs among the data for each type written in the file as described above, for security reasons, for example. Here, as a specific example, a mode in which access rights are different as illustrated in FIG.
That is, among the name, address, and card number data stored in the
On the other hand, the address stored in the
ICカードの記憶媒体203に記憶されるデータについてのアクセス権はファイル単位で指定されることが定められている。このために、上記のように、氏名、カード番号、住所の各データについて、アクセス権無しとアクセス権有りとで異なるアクセス権が設定された場合には、図3のようにファイルへのデータの書き込みを行う。
The access right for data stored in the
図3においては、ファイルFL1とファイルFL2の2つのファイルが示されている。ファイルFL1とファイルFL2のうち、ファイルFL1は、アクセス権は特に設定されておらず、いかなるユーザであってもアクセスすることができる。
このようにアクセス権が設定されていないファイルFL1においては、氏名、住所、カード番号のデータのうち、アクセス権が設定されていない氏名とカード番号のデータがそれぞれレコード#1とレコード#2とに書き込まれている。
In FIG. 3, two files, file FL1 and file FL2, are shown. Of the files FL1 and FL2, the file FL1 has no particular access right and can be accessed by any user.
As described above, in the file FL1 in which the access right is not set, among the name, address, and card number data, the name and card number data for which the access right is not set are recorded in the
また、ファイルFL2は、所定のアクセス権を有するユーザのみがアクセス可能なアクセス権が設定されており、アクセス権を有するユーザによる認証が成立しなければアクセスすることができないファイルである。そのうえで、ファイルFL2については、住所のデータへのアクセスが許可されたユーザに対応するアクセス権が設定されたうえで、氏名、住所、カード番号のデータのうち、住所のデータがレコード#1に書き込まれている。
In addition, the file FL2 is an access right that can be accessed only by a user having a predetermined access right, and cannot be accessed unless authentication by the user having the access right is established. In addition, for the file FL2, the access right corresponding to the user who is permitted to access the address data is set, and the address data is written to the
このように作成されたファイルFL1とファイルFL2とを記憶媒体203に記憶させておくことによって、住所のデータにアクセスできるユーザを制限できる。つまり、氏名とカード番号のデータについては全てのユーザが読み出し可能である。一方、住所のデータについてはアクセス権を有するユーザは読み出せるが、アクセス権を有さないユーザによっては読み出せないようにできる。
By storing the file FL1 and the file FL2 thus created in the
図2にて例示したように、クレジットカードであるICカードにおいて、氏名、住所、カード番号のデータは、例えばアクセス権の設定に相違が無ければ、1つのファイルにまとめて格納されてもよいファイルである。
しかし、図3にてファイルFL1、FL2として示したように、例えば氏名、カード番号のデータと、住所のデータとでアクセス権の設定が異なる場合には、アクセス権有りのデータとアクセス権無しのデータとのそれぞれに応じて複数のファイルが必要になる。
As illustrated in FIG. 2, in an IC card that is a credit card, the name, address, and card number data may be stored together in one file, for example, if there is no difference in access right settings. It is.
However, as shown as files FL1 and FL2 in FIG. 3, for example, when the access right setting is different between the name and card number data and the address data, the data with access right and the data with no access right Multiple files are required for each data.
図3のようにファイルが複数になるのに応じては、ファイルごとに対応して作成されるファイルヘッダやファイルシステムのディレクトリ情報(ディレクトリエントリ)などのファイルについての管理情報も複数に増加する。このために、同じ内訳のデータを格納するために必要な容量としては、図2のように1つのファイルにデータをまとめる場合よりも大きくなってしまい、例えば記憶媒体203の記憶容量の効率的な使用の妨げとなってしまう。
As the number of files increases as shown in FIG. 3, management information about the files such as file headers and file system directory information (directory entries) created corresponding to each file also increases. For this reason, the capacity required to store the same breakdown data becomes larger than the case where the data is combined into one file as shown in FIG. 2, and for example, the storage capacity of the
[本実施形態のファイルにおけるデータ構造]
そこで、本実施形態としては、ICカードの記憶媒体203において、図4に示す構造によりファイルのデータが書き込まれるようにする。同図の説明にあたり、図2にて説明したのと同様に、氏名、住所、カード番号の各データのうち、氏名、カード番号のデータについてはアクセス権無しが設定され、住所のデータについてはアクセス権有りが設定されている場合を例に挙げる。
[Data structure in file of this embodiment]
Therefore, in this embodiment, file data is written in the
図4に示すファイルFLのデータ領域における各レコードは、先頭の1バイトに暗号状態情報が書き込まれ、続く2バイト目以降にデータ(レコードデータ)が書き込まれる構造を有する。
暗号状態情報は、同じレコード#1に格納されるレコードデータの暗号状態を示す。ここでの暗号状態は、暗号化が施されていない平文の状態と、暗号化が施されて発行装置から送信されたままの暗号文(原暗号文)の状態のうちのいずれかである。
この場合の暗号状態情報は、00hの値により平文の状態であることを示し、01hの値により暗号文の状態であることを示している。
Each record in the data area of the file FL shown in FIG. 4 has a structure in which encryption state information is written in the first byte and data (record data) is written in the second and subsequent bytes.
The encryption state information indicates the encryption state of the record data stored in the
The cipher state information in this case indicates that the state is plaintext by a value of 00h, and indicates that the state is ciphertext by a value of 01h.
具体的に、レコード#1に格納されるべき氏名のデータはアクセス権無しが設定されたレコードデータである。このようなアクセス権の設定に応じて、レコード#1においては、先頭の1バイトに00hの値の暗号状態情報が格納され、続く2バイト目以降において、平文による氏名のデータが格納される。
また、レコード#2に格納されるべき住所のデータはアクセス権有りが設定されたレコードデータである。このようなアクセス権の設定に応じて、レコード#2においては、先頭の1バイトに01hの値の暗号状態情報が格納され、続く2バイト目以降において、原暗号文による住所のデータが格納される。
また、レコード#3に格納されるべき氏名のデータはアクセス権無しが設定されたレコードデータである。このようなアクセス権の設定に応じて、レコード#3においては、先頭の1バイトに00hの値の暗号状態情報が格納され、続く2バイト目以降において、平文による氏名のデータが格納される。
なお、同図においては、暗号状態情報が1バイト(8ビット)である場合を例に挙げているが、暗号状態情報のサイズとしては特に限定されない。
Specifically, the name data to be stored in the
The address data to be stored in the
The name data to be stored in the
In the figure, the case where the encryption state information is 1 byte (8 bits) is taken as an example, but the size of the encryption state information is not particularly limited.
図4に示した構造により書き込まれるファイルのデータ(暗号状態情報、レコードデータ)は、例えばICカードの発行を行う発行装置によって以下のように書き込みが行われる。発行装置は、ICカード200に対してファイルへのデータの書き込みを行うに先だってファイル生成を行う。つまり、発行装置は、ICカード200の記憶媒体203におけるユーザデータ領域AR3にファイル格納領域が作成されるようにするための制御を実行する。
The file data (encryption state information, record data) written by the structure shown in FIG. 4 is written as follows by, for example, an issuing device that issues an IC card. The issuing device generates a file prior to writing data to the file to the
発行装置は、1つのファイルに対応するファイル格納領域の作成をICカード200に指示するためにICカード200に対してファイル生成コマンドを送信する。図5は、ファイル生成コマンドの構造例を示している。
同図に示すファイル生成コマンドは、コマンドヘッダCH、第1パラメータP1、第2パラメータP2、データ長Lc、データ部Dataが配置された構造を有する。
コマンドヘッダCHは、当該コマンドの種別を示す。ファイル生成コマンドの場合、コマンドヘッダCHには、ファイル生成コマンドであることを示す所定値が格納される。
第1パラメータP1、第2パラメータP2による領域は、コマンドヘッダCHが示すコマンドの種別に応じた所定のパラメータを格納する。
データ長Lcは、データ部Dataのデータ長(サイズ)を示す。
ファイル生成コマンドにおけるデータ部Dataは、ファイル種別情報、サイズ情報、ファイル識別子、初期値情報及び暗号状態情報を含む。
The issuing device transmits a file generation command to the
The file generation command shown in the figure has a structure in which a command header CH, a first parameter P1, a second parameter P2, a data length Lc, and a data part Data are arranged.
The command header CH indicates the type of the command. In the case of a file generation command, a predetermined value indicating a file generation command is stored in the command header CH.
The area defined by the first parameter P1 and the second parameter P2 stores a predetermined parameter corresponding to the type of command indicated by the command header CH.
The data length Lc indicates the data length (size) of the data part Data.
The data part Data in the file generation command includes file type information, size information, file identifier, initial value information, and encryption state information.
ファイル種別情報は、作成対象のファイル格納領域が対応するファイルの種別が、例えばDF、IEF、WEFのうちのいずれであるのかを示す情報である。即ち、ファイル種別情報がDFを示す場合、当該ファイル生成コマンドは、DFのファイル格納領域の作成を指示する。また、ファイル種別情報がIEFを示す場合、当該ファイル生成コマンドは、IEFのファイル格納領域の作成を指示する。また、ファイル種別情報がWEFを示す場合、当該ファイル生成コマンドは、WEFのファイル格納領域の作成を指示する。
サイズ情報は、作成対象のファイル格納領域のサイズを示す情報である。
ファイル識別子は、作成対象のファイル格納領域に格納されるべきEFのファイル識別子を示す。
初期値情報は、ファイル格納領域の作成にあたって書き込むべき初期値を示す情報である。
The file type information is information indicating whether the file type corresponding to the file storage area to be created is, for example, DF, IEF, or WEF. That is, when the file type information indicates DF, the file generation command instructs creation of a DF file storage area. When the file type information indicates IEF, the file generation command instructs creation of a file storage area of IEF. If the file type information indicates WEF, the file generation command instructs creation of a WEF file storage area.
The size information is information indicating the size of the file storage area to be created.
The file identifier indicates an EF file identifier to be stored in the file storage area to be created.
The initial value information is information indicating an initial value to be written when the file storage area is created.
暗号状態情報は、作成対象のファイル格納領域に格納されるファイルに含まれるレコードごとに対応付けられた情報である。1つの暗号状態情報は、対応付けされたレコードに格納されるレコードデータの暗号状態を示す。 The encryption state information is information associated with each record included in the file stored in the file storage area to be created. One encryption state information indicates the encryption state of the record data stored in the associated record.
図6は、ファイル生成コマンドのデータ部Dataに含まれる暗号状態情報の内容例を示している。同図に示す暗号状態情報は、図4に示したファイルFLの内容に対応している。
同図に示すように、ファイル生成コマンドのデータ部Dataに含まれる暗号状態情報は、レコード番号ごとに対応付けられている。
レコード#1に対応付けられた暗号状態情報は、平文状態を示す00hである。レコード#2に対応付けられた暗号状態情報は、原暗号文を示す01hである。レコード#3に対応付けられた暗号状態情報は、平文状態を示す00hである。
FIG. 6 shows an example of the contents of the encryption state information included in the data part Data of the file generation command. The encryption state information shown in the figure corresponds to the contents of the file FL shown in FIG.
As shown in the figure, the encryption state information included in the data part Data of the file generation command is associated with each record number.
The encryption state information associated with the
このように、ファイル生成コマンドのデータ部Dataに含まれる暗号状態情報は、対応のレコードに格納すべきデータの暗号状態を指示する。
つまり、ファイル生成コマンドのデータ部Dataに含まれる00hの暗号状態情報は、発行装置が暗号化して送信したときのままの原暗号文の状態のレコードデータを対応のレコードに格納すべきことを指示する。
また、ファイル生成コマンドのデータ部Dataに含まれる01hの暗号状態情報は、平文の状態のデータを対応のレコードに格納すべきことを指示する。
As described above, the encryption state information included in the data part Data of the file generation command indicates the encryption state of the data to be stored in the corresponding record.
In other words, the encryption status information of 00h included in the data part Data of the file generation command indicates that the record data in the original ciphertext state as it was when the issuing device encrypted and transmitted should be stored in the corresponding record. To do.
Also, the 01h encryption state information included in the data portion Data of the file generation command indicates that plaintext state data should be stored in the corresponding record.
発行装置から送信されたファイル生成コマンドは、ICカードにて受信される。ファイル生成コマンドが受信されると、本実施形態のICカードは、データ部Dataから取得したサイズ情報が示すサイズによる領域をユーザデータ領域AR3から確保する。そして、ICカードは、確保した領域がデータ部Dataから取得したファイル種別情報により示されるファイルの領域として管理されるようにファイル管理情報(例えばFATなど)を更新する。なお、ファイル管理情報としてのデータは、ファイルのデータとは異なるものであり、従ってレコードに格納される構造を有さなくともよい。 The file generation command transmitted from the issuing device is received by the IC card. When the file generation command is received, the IC card according to the present embodiment secures an area according to the size indicated by the size information acquired from the data part Data from the user data area AR3. Then, the IC card updates the file management information (for example, FAT) so that the secured area is managed as the file area indicated by the file type information acquired from the data part Data. Note that the data as the file management information is different from the file data, and therefore does not have to have a structure stored in the record.
また、ICカードは、上記のように新規に登録されたファイルの領域におけるファイルヘッダと、データ領域に初期値を書き込む処理を実行する。ファイルヘッダと、データ領域に書き込むべき初期値は、ファイル生成コマンドのデータ部Dataに格納される初期値情報によって指定されている。また、データ領域は固定長のレコード単位が連結して形成されている。このために、データ領域に対応する初期値情報はレコードごとに設けられる。 Further, the IC card executes a process of writing an initial value to the file header and the data area in the newly registered file area as described above. The file header and the initial value to be written in the data area are specified by the initial value information stored in the data part Data of the file generation command. The data area is formed by connecting fixed-length record units. For this purpose, initial value information corresponding to the data area is provided for each record.
以下、図7を参照して、本実施形態のICカードによるファイルFLへの初期値の書き込み手順例について説明する。
先ず、ICカードは、ファイルヘッダの初期値を指定する初期値情報が示す初期値を、ファイルFLにおけるファイルヘッダに書き込む。
次に、ICカードは、ファイルFLのデータ領域におけるレコード#1に対して、初期値を書き込む。レコード#1への初期値の書き込みにあたり、先ず、レコード#1の領域の先頭の1バイトに、レコード#1に対応する暗号状態情報の値である00hを書き込む。次に、ICカードは、レコード#1の2バイト目以降に、レコード#1の初期値情報が示す初期値を書き込む。
また、ICカードは、データ領域におけるレコード#2の領域において、先頭の1バイトに、レコード#2に対応する暗号状態情報の値である01hを書き込み、2バイト目以降に、レコード#2の初期値情報が示す初期値を書き込む。
また、ICカードは、データ領域におけるレコード#3の領域において、先頭の1バイトにレコード#3に対応する暗号状態情報の値である00hを書き込み、2バイト目以降に、レコード#3の初期値情報が示す初期値を書き込む。
以降同様にして、ICカードは、レコード#3以降の各領域において、先頭の1バイトには、当該レコードに対応付けられた暗号状態情報の値を書き込み、2バイト目以降に対応のレコード番号の初期値情報が示す初期値を書き込む。
Hereinafter, an example of a procedure for writing an initial value to the file FL by the IC card of the present embodiment will be described with reference to FIG.
First, the IC card writes the initial value indicated by the initial value information specifying the initial value of the file header into the file header in the file FL.
Next, the IC card writes an initial value to
Further, the IC card writes 01h, which is the value of the encryption state information corresponding to the
Further, the IC card writes 00h, which is the value of the encryption state information corresponding to the
Thereafter, in the same manner, the IC card writes the value of the encryption status information associated with the record in the first 1 byte in each area after
このようにファイル生成が行われることで、記憶媒体203のユーザデータ領域AR3上に確保されたファイルFLの領域において、データ領域における各レコードには暗号状態情報とレコードデータの初期値とが書き込まれる。このように初期値の書き込み時においてレコードに暗号状態情報が書き込まれることにより、レコードと暗号状態情報との対応付けが行われる。
By performing the file generation in this way, the encryption state information and the initial value of the record data are written in each record in the data area in the area of the file FL secured on the user data area AR3 of the
そして、上記のようにファイル生成が行われた後において、発行装置は、ICカードにおいて作成されたファイル格納領域におけるファイルヘッダと、データ領域における各レコードに、アプリケーションに応じたデータの書き込みを行う。 After the file is generated as described above, the issuing device writes data corresponding to the application to the file header in the file storage area created in the IC card and each record in the data area.
ICカードにファイルのデータの書き込みを行う際、発行装置は、書込データとしてのレコードデータを格納したデータ書き込みコマンドをICカードに対して送信する。
本実施形態の発行装置は、レコード単位に対応するデータ書き込みコマンドをICカードに送信する。なお、ファイルヘッダは、1つのレコードとして扱われればよい。
データ書き込みコマンドには書込データとしてレコードに格納すべきデータが格納される。本実施形態の発行装置は、データ書き込みコマンドに格納する書込データについては、全て所定の鍵により暗号化されており、暗号文の状態である。
このように発行装置からICカードに送信する書込データについて全て暗号化することによっては、例えばデータ書き込みに際してのデータの傍受に対するセキュリティを高めることができる。
When writing file data to the IC card, the issuing device transmits a data write command storing record data as write data to the IC card.
The issuing device of the present embodiment transmits a data write command corresponding to the record unit to the IC card. The file header may be handled as one record.
The data write command stores data to be stored in the record as write data. In the issuing device of the present embodiment, all the write data stored in the data write command is encrypted with a predetermined key and is in a ciphertext state.
Thus, by encrypting all the write data transmitted from the issuing device to the IC card, for example, security against data interception at the time of data writing can be enhanced.
ここで、レコード#1、#2、#3のそれぞれに、図4と同様の平文による氏名のデータ、原暗号文による住所のデータ、平文によるカード番号のデータを書き込む場合の手順例について、再度、図4を参照して説明する。
Here, for each of the
発行装置は、先ず、ファイルヘッダ、レコード#1、レコード#2、レコード#3・・・・の順に従って、データ書込コマンドを送信する。
ICカードは、ファイルヘッダのデータ書込コマンドが受信されると、受信したデータ書込コマンドからファイルヘッダのデータを取得する。ICカードは、ファイルヘッダのデータについては例えば平文によりファイルヘッダに書き込むようにされている。従って、この場合のICカードは、データ書込コマンドから取得した暗号文の状態のファイルヘッダを復号して平文化し、平文によるデータをファイルヘッダの領域に書き込めばよい。
The issuing device first transmits a data write command in the order of file header,
When the IC card receives the data write command of the file header, the IC card acquires the data of the file header from the received data write command. The IC card writes the file header data in the file header, for example, in plain text. Therefore, the IC card in this case only has to decrypt the plaintext file header obtained from the data write command and write the plaintext data in the file header area.
一方、ファイルのデータ領域については、レコードごとに平文の状態と暗号文の状態のいずれのデータを格納すべきなのかは、ファイルに応じて異なる。
そこで、ICカードは、レコードに対しては以下のようにレコードデータの書き込みを行う。
On the other hand, regarding the data area of the file, which data should be stored in the plaintext state or the ciphertext state for each record differs depending on the file.
Therefore, the IC card writes record data to the record as follows.
先ず、レコード#1に対応するデータ書込コマンドを受信するのに応じて、ICカードは、レコード#1の先頭の1バイトに書き込まれている暗号状態情報の値が何であるのかを認識する。この場合、レコード#1の先頭の1バイトに書き込まれている暗号状態情報の値は00hであり、平文の状態であることを示す。
そこで、この場合のICカードは、レコード#1に対応するデータ書込コマンドから取得した氏名のデータについて復号を行って平文とする。そして、ICカードは、平文による氏名のデータを、レコード#1における2バイト目を開始位置として書き込みを行う。
このように書き込みが行われることで、図4に示されるように、レコード#1は、先頭の1バイトにおける00hの暗号状態情報に続けて、平文による氏名のデータが格納された状態となる。
First, in response to receiving the data write command corresponding to the
Therefore, the IC card in this case decrypts the name data acquired from the data write command corresponding to the
By writing in this way, as shown in FIG. 4, the
次に、ICカードは、レコード#2に対応するデータ書込コマンドを受信するのに応じて、レコード#2の先頭の1バイトに書き込まれている暗号状態情報の値が01hであり、原暗号文の状態を示していることを認識する。
そこで、この場合のICカードは、レコード#2に対応するデータ書込コマンドから取得した住所のデータについては、復号を行わない。そして、ICカードは、発行装置から送信されたときと同じ原暗号文のままの住所のデータを、レコード#2における2バイト目を開始位置として書き込みを行う。
このように書き込みが行われることで、図4に例示するように、レコード#2は、先頭の1バイトにおける01hの暗号状態情報に続けて、原暗号文による住所のデータが格納された状態となる。
Next, in response to receiving the data write command corresponding to the
Therefore, the IC card in this case does not decode the address data acquired from the data write command corresponding to the
By performing the writing in this way, as illustrated in FIG. 4, the
次に、レコード#3に対応するデータ書込コマンドを受信するのに応じて、ICカードは、レコード#3の先頭の1バイトに書き込まれている暗号状態情報の値が00hであり、平文の状態を示していることを認識する。
そこで、この場合のICカードは、レコード#3に対応するデータ書込コマンドから取得したカード番号のデータについて復号を行って平文を得る。そして、ICカードは、平文によるカード番号のデータを、レコード#3における2バイト目を開始位置として書き込みを行う。
このように書き込みが行われることで、図7に例示するように、レコード#3は、先頭の1バイトにおける00hの暗号状態情報に続けて、平文によるカード番号のデータが格納された状態となる。
Next, in response to receiving the data write command corresponding to the
Therefore, the IC card in this case decrypts the data of the card number acquired from the data write command corresponding to the
By performing the writing in this way, as illustrated in FIG. 7, the
以降、ICカードは、同様にして、レコードに対応するデータ書込コマンドを受信するのに応じて、受信されたデータ書込コマンドが対応するレコードの先頭に書き込まれた暗号状態情報が示す暗号状態を認識する。そして、ICカードは、認識した暗号状態が平文の状態であれば、原暗号文の状態で受信された書込データの復号を行って平文とし、対応のレコードにおける暗号状態情報に続けて平文の書込データを書き込む。
これに対して、ICカードは、認識した暗号状態が原暗号文の状態であれば、原暗号文の状態で受信された書込データについて復号を行うことなく、対応のレコードにおける暗号状態情報に続けて書き込みを行う。
このようにして、ファイルFLにおけるレコードの各々には、暗号状態情報と、暗号状態情報が示す暗号状態によるデータが格納される。
Thereafter, the IC card similarly receives the data write command corresponding to the record, and the encryption state indicated by the encryption state information written at the head of the record corresponding to the received data write command Recognize Then, if the recognized encryption state is a plaintext state, the IC card decrypts the write data received in the original ciphertext state to make a plaintext, and then follows the encryption state information in the corresponding record. Write the write data.
On the other hand, if the recognized encryption state is the state of the original ciphertext, the IC card does not decrypt the write data received in the state of the original ciphertext and converts it into the encryption state information in the corresponding record. Continue writing.
In this way, each record in the file FL stores encryption state information and data based on the encryption state indicated by the encryption state information.
上記のように記憶媒体203にファイルのデータが書き込まれた本実施形態のICカードによるデータ出力の動作について、図4に示したファイルの場合を例に挙げて説明する。
この場合、リーダライタは、図4に示したファイルFLのレコードに格納されるレコードデータの読み出しを要求するデータ読出コマンドを、例えばレコードの番号の昇順に従って送信する。
上記のようにリーダライタから順次送信されるデータ読出コマンドの受信に応じて、ICカードは、ファイルFLのデータ領域におけるレコード#1から、順次、各レコードに格納されるレコードデータを読み出し、読み出したレコードデータをリーダライタに送信する。
ここで、本実施形態におけるICカードは、上記のように読み出したレコードデータを、レコードに格納されていたときと同じ暗号状態のままでリーダライタに送信する。
The operation of data output by the IC card of this embodiment in which file data is written in the
In this case, the reader / writer transmits a data read command for requesting reading of record data stored in the record of the file FL shown in FIG. 4, for example, in ascending order of record numbers.
As described above, in response to the reception of the data read command sequentially transmitted from the reader / writer, the IC card sequentially reads and reads the record data stored in each record from the
Here, the IC card according to the present embodiment transmits the record data read as described above to the reader / writer in the same encryption state as that stored in the record.
従って、図4のファイルFLの場合であれば、ICカードは、レコード#1に格納された平文の状態の氏名のデータを読み出し、平文のままの状態でリーダライタに送信する。
次に、ICカードは、レコード#2に格納された原暗号文の状態の住所のデータを読み出し、原暗号文のままの状態でリーダライタに送信する。
次に、ICカードは、レコード#3に格納された平文の状態のカード番号のデータを読み出し、平文のままの状態でリーダライタに送信する。
以降、ICカードは、残るレコードについても同様に、レコードから読み出したデータを、レコードに格納されていたのと同じ暗号状態のままでリーダライタに送信する。
Therefore, in the case of the file FL shown in FIG. 4, the IC card reads the plaintext name data stored in the
Next, the IC card reads the address data in the original ciphertext state stored in the
Next, the IC card reads the data of the card number in the plain text state stored in the
Thereafter, the IC card similarly transmits the data read from the record to the reader / writer in the same encryption state as that stored in the record for the remaining records.
上記のようにレコードデータが送信されることで、リーダライタは、レコードの番号順に従って、平文による氏名とカード番号の各データと原暗号文による住所のデータとを受信する。ここで、住所のデータへのアクセス権を有していないユーザのリーダライタの場合には、以下のように受信されたレコードデータの取得が行われる。
先ず、氏名、住所、カード番号の各データのうち、氏名とカード番号のデータについては受信された段階で平文の状態である。従って、この場合のリーダライタは、氏名とカード番号の各データについては特に復号を行うことなく正常に取得できる。
By transmitting the record data as described above, the reader / writer receives the plaintext name and card number data and the address data in the original ciphertext according to the record number order. Here, in the case of a reader / writer of a user who does not have access rights to address data, acquisition of record data received as follows is performed.
First, among the name, address, and card number data, the name and card number data are in plain text when received. Therefore, the reader / writer in this case can normally acquire the name and card number data without performing any decryption.
一方、受信された住所のデータは原暗号文の状態である。しかし、住所のデータへのアクセス権を有さないユーザのリーダライタは、受信された原暗号文の状態の住所のデータを復号できる正当な鍵を有していない。従って、この場合のリーダライタは、住所のデータを復号することができない。この場合、住所のデータは原暗号文のままであって有意性を持たないために、正常に取得できたことにはならない。
このように、住所のデータへのアクセス権を有さないユーザのリーダライタは、ファイルFLの読み出し結果として、アクセス権無しのレコードデータを正常に取得することはできるが、アクセス権有りのレコードデータを正常に取得することはできない。
On the other hand, the received address data is in the original ciphertext state. However, the reader / writer of the user who does not have access right to the address data does not have a valid key that can decrypt the received address data in the original ciphertext state. Therefore, the reader / writer in this case cannot decode the address data. In this case, since the address data remains in the original ciphertext and has no significance, it cannot be normally acquired.
As described above, the reader / writer of the user who does not have the access right to the address data can normally obtain the record data without the access right as the read result of the file FL, but the record data with the access right is obtained. Can't get it successfully.
一方、住所のデータへのアクセス権を有するユーザのリーダライタの場合、先ず、氏名とカード番号のデータについては、住所のデータへのアクセス権を有するユーザのリーダライタと同様に特に復号を行うこと無く正常に取得できる。
そのうえで、住所のデータへのアクセス権を有するユーザのリーダライタは、原暗号文による住所のデータを復号できる鍵を有している。具体的には、リーダライタは、00hの値による暗号状態情報が示す原暗号文のデータを復号できる鍵を有している。リーダライタは、受信された暗号状態情報が01hを示していることにより、受信されたデータにについて自己が有する鍵で復号可能であることを認識できる。そこで、リーダライタは、自己が有する鍵を利用して住所のデータを復号して平文とすることができる。即ち、この場合のリーダライタは、氏名とカード番号のデータとともに、住所のデータについても正常に取得できる。
On the other hand, in the case of a reader / writer of a user who has access rights to address data, first, the name and card number data are decrypted in the same manner as the reader / writer of the user who has access rights to address data. It can be acquired normally.
In addition, the reader / writer of the user who has access rights to the address data has a key that can decrypt the address data in the original ciphertext. Specifically, the reader / writer has a key that can decrypt the original ciphertext data indicated by the encryption state information with a value of 00h. The reader / writer can recognize that the received data can be decrypted with the key that the reader / writer can have with respect to the received data by indicating 01h. Therefore, the reader / writer can decrypt the address data using the key of the reader / writer into plain text. That is, the reader / writer in this case can normally acquire the address data as well as the name and card number data.
このように、本実施形態においては、同じ1つのファイルを対象としてデータの読み出しを行うリーダライタでありながら、各リーダライタが有するアクセス権に応じてアクセス可能なデータのみが適切に取得されるようになっている。 As described above, in the present embodiment, only the data that can be accessed according to the access right of each reader / writer is appropriately acquired even though the reader / writer reads data for the same single file. It has become.
これまでの説明から理解されるように、本実施形態におけるICカードの記憶媒体203は、1つのファイルに対してアクセス権の異なる種別のレコードデータがまとめて格納されるデータ構造を有する。そのうえで、レコードデータごとに、アクセス権に対応する暗号状態を示す暗号状態情報が対応付けられ、リーダライタは、データとともに受信された暗号状態情報に基づいて、自己がアクセス権を有するデータについては復号を行って正常に取得できる。
As can be understood from the above description, the
このような構成により、本実施形態においては、例えば図3に示したようにアクセス権の異なるデータをそれぞれ異なるファイルに格納する必要が無く、アクセス権の異なるデータを1つのファイルにまとめて格納することが可能になる。
これにより、本実施形態では、アクセス権の異なる複数のデータを格納するファイルは1つでよいことになり、これに伴って、ファイルヘッダやファイルシステムにおけるディレクトリ情報などのファイルについての管理情報も1つでよいことになる。この結果、本実施形態は、図3の場合と比較してユーザデータ領域AR3の使用サイズを小さくすることが可能になり、記憶媒体203の記憶領域の使用効率が向上する。
With this configuration, in this embodiment, for example, as shown in FIG. 3, there is no need to store data with different access rights in different files, and data with different access rights are stored together in one file. It becomes possible.
As a result, in this embodiment, only one file is required to store a plurality of data with different access rights. Along with this, management information about files such as a file header and directory information in the file system is also 1 One thing will be good. As a result, according to the present embodiment, the use size of the user data area AR3 can be reduced compared to the case of FIG. 3, and the use efficiency of the storage area of the
次に、図8を参照して、本実施形態における暗号状態情報の拡張例について説明する。先ず、同図に示すファイルFLにおけるレコード#1、レコード#2、レコード#3に格納されるデータの内容は、それぞれ、図4と同様である。
つまり、レコード#1においては、先頭の1バイトに平文の状態を示す00hの値による暗号状態情報が格納され、2バイト目以降に平文による氏名のデータが格納される。
また、レコード#2においては、先頭の1バイトに原暗号文の状態を示す01hの値による暗号状態情報が格納され、2バイト目以降に原暗号文による住所のデータが格納される。
また、レコード#3においては、先頭の1バイトに平文の状態を示す00hの値による暗号状態情報が格納され、2バイト目以降に平文によるカード番号のデータが格納される。
Next, with reference to FIG. 8, an example of extension of encryption state information in this embodiment will be described. First, the contents of data stored in the
That is, in the
In
In
そのうえで、さらにレコード#4において、先頭の1バイトに02hの値による暗号状態情報が格納され、2バイト目以降において再暗号文による電話番号のデータが格納される。
暗号状態情報としての02hは、暗号状態として再暗号文の状態であることを示す。また、再暗号文とは、発行装置から受信された原暗号文としての書込データを、原暗号文を暗号化したときと異なる暗号化処理により再び暗号化して得られる暗号文である。本実施形態において、原暗号文を暗号化したときと異なる暗号化処理は、例えば、原暗号文を暗号化したときと異なる鍵により暗号化することである。
また、02hの値の暗号状態情報は、00h、01hの値の暗号状態情報と同様に、ファイル生成の際に、ファイル生成コマンドに含まれる暗号状態情報に基づいてレコード#4の先頭に書き込まれたものである。
In addition, in record # 4, encryption status information with a value of 02h is stored in the first byte, and telephone number data in re-ciphertext is stored in the second and subsequent bytes.
02h as encryption state information indicates a re-ciphertext state as the encryption state. The re-ciphertext is a ciphertext obtained by re-encrypting the writing data as the original ciphertext received from the issuing device by an encryption process different from that when the original ciphertext is encrypted. In the present embodiment, the encryption process different from when the original ciphertext is encrypted is, for example, encryption with a key different from that when the original ciphertext is encrypted.
Similarly to the encryption state information of 00h and 01h, the encryption state information with a value of 02h is written at the top of the record # 4 based on the encryption state information included in the file generation command at the time of file generation. It is a thing.
本実施形態のICカードは、ファイルヘッダとレコード#1〜#3までについては、図7と同様にデータ書き込みを実行する。
そして、ICカードは、同図に示すレコード#4についてのデータ書込コマンドを受信した場合には、以下のようにデータ書き込みを行う。
ICカードは、レコード#4の先頭の1バイトに書き込まれた02hの暗号状態情報を参照することによって、レコード#4に対して再暗号文を書き込むべきことを認識する。
そこで、ICカードは、受信されたデータ書込コマンドから取得した原暗号文による電話番号の書込データについて、一旦復号を行って平文とする。そのうえで、ICカードは、平文とした書込データについて、原暗号文を暗号化したときとは異なる鍵を使用して、再び暗号化して暗号文とする。このように得られた暗号文が再暗号文である。
ICカードは、上記のようにして再暗号文として生成した電話番号の書込データをレコード#4の2バイト目以降を開始位置として書き込みを行う。
The IC card of this embodiment executes data writing for the file header and
When the IC card receives a data write command for record # 4 shown in the figure, it writes data as follows.
The IC card recognizes that the re-ciphertext should be written to the record # 4 by referring to the encryption state information of 02h written in the first byte of the record # 4.
Therefore, the IC card once decrypts the written data of the telephone number in the original ciphertext obtained from the received data write command into plaintext. In addition, the IC card re-encrypts the written data in plain text using a key different from that used when the original cipher text was encrypted to obtain a cipher text. The ciphertext obtained in this way is a re-ciphertext.
The IC card writes the telephone number write data generated as the re-ciphertext as described above, starting from the second byte of record # 4.
このようにして、暗号状態情報を拡張することによって、ファイルのレコードには、原暗号文によるレコードデータと、平文によるレコードデータとに加え、再暗号文によるレコードデータも格納することができる。
図8のように、暗号文として原暗号文と再暗号文とが併用される場合、原暗号文と再暗号文とについて、それぞれ異なるアクセス権を対応させることが可能である。
なお、図8の変形例として、ファイルのレコードに格納されるレコードデータの暗号状態については、原暗号文は使用せずに、平文と再暗号文による2つを使用するように構成してもよい。
In this way, by expanding the encryption state information, the record of the file can store the record data based on the recipher text in addition to the record data based on the original cipher text and the record data based on the plain text.
As shown in FIG. 8, when the original ciphertext and the re-ciphertext are used together as the ciphertext, different access rights can be associated with the original ciphertext and the re-ciphertext.
As a modification of FIG. 8, the encryption state of the record data stored in the record of the file may be configured to use two plaintext and re-ciphertext without using the original ciphertext. Good.
[データ読出システムの構成例]
続いて、図9を参照して、第1実施形態におけるデータ読出システムの構成例について説明する。同図に示すように、本実施形態のデータ読出システムは、リーダライタ100(データ読出装置の一例)とICカード200とを通信経由で接続して構成される。
[Configuration example of data reading system]
Next, a configuration example of the data reading system in the first embodiment will be described with reference to FIG. As shown in the figure, the data reading system of this embodiment is configured by connecting a reader / writer 100 (an example of a data reading device) and an
リーダライタ100は、ICカード200からデータの読み出しを行う。リーダライタ100は、ファイル単位でのデータの読み出しを行う。リーダライタ100はファイル単位によるデータの読み出しに際して、さらに、ファイルに格納されるレコード単位で、順次、レコードデータの読み出しを行う。
The reader /
同図に示すリーダライタ100は、通信部101と制御部102とを備える。
通信部101は、ICカード200と通信を実行する。通信部101によるICカード200との通信は接触式であってもよいし非接触式であってもよい。
A reader /
The
制御部102は、リーダライタ100における各種制御を実行する。制御部102としての機能は、例えばリーダライタ100が備えるCPU(Central Processing Unit)がプログラムを実行することにより実現される。
本実施形態における制御部102は、ICカード200からのデータの読み出しに対応する機能部として、データ読出コマンド送信部121と、復号部122とを備える。
The
The
データ読出コマンド送信部121は、レコードデータの読み出しを要求するデータ読出コマンドをICカード200に送信する。
The data read
上記のように送信されたデータ読出コマンドを受信すると、ICカード200はデータ読出コマンドが指定するレコードに格納される暗号状態情報とレコードデータとを記憶媒体203から読み出してリーダライタ100に送信する。送信された暗号状態情報とレコードデータは、リーダライタ100の通信部101にて受信される。
When receiving the data read command transmitted as described above, the
復号部122は、データ読出コマンドに対する応答として記憶媒体203から読み出されたレコードデータと、レコードデータに対応付けられた暗号状態情報とをICカード200から受信するのに応じて、以下の処理を実行する。つまり、復号部122は、受信された暗号状態情報が示す暗号状態のレコードデータへのアクセス権を有する場合にはレコードデータの復号を行い、レコードデータへのアクセス権を有さない場合にはレコードデータの復号を行わない。
In response to receiving from the
また、同図に示すICカード200は、通信部201、制御部202及び記憶媒体203を備える。
通信部201は、リーダライタ100と通信を実行する。
制御部202は、ICカード200における各種制御を実行する。制御部202としての機能は、例えばICカード200が備えるCPUが、記憶媒体203に記憶されたプログラムを実行することにより実現される。
本実施形態における制御部202は、リーダライタ100から受信したデータ読出コマンドに応じた記憶媒体203からのデータ読み出しに対応する機能部として、データ読出部221とデータ送信部222とを備える。
The
The
The
The
データ読出部221は、リーダライタ100から送信されたデータ読出コマンドの受信に応じて以下の処理を実行する。つまり、データ読出部221は、記憶媒体203から、受信されたデータ読出コマンドが要求するレコードデータと、レコードデータに対応付けられた暗号状態情報とを読み出す。
The
データ送信部222は、データ読出部221によって読み出されたレコードデータと暗号状態情報とをリーダライタ100に対して送信する。
The
記憶媒体203は、制御部202が利用する各種の情報を記憶する。前述のように、本実施形態の記憶媒体203は、図1に示した領域の設定が行われたうえで、ユーザデータ領域AR3において図4、図8などに示した構造のファイルを記憶することができる。
なお、記憶媒体203が対応するハードウェアは、例えばEEPROM(Electrically Erasable Programmable Read-Only Memory)やフラッシュメモリなどであればよい。
The
Note that the hardware supported by the
[処理手順例]
図10のフローチャートを参照して、本実施形態におけるリーダライタ100とICカード200がデータ読み出しに関して実行する処理手順例について説明する。なお、同図においては、読み出し対象である1つのファイルが指定されたうえで、読み出し対象のファイルのデータ領域における1つのレコードに格納されたデータを読み出すための処理が示される。
[Example of processing procedure]
With reference to the flowchart of FIG. 10, an example of a processing procedure executed by the reader /
また、同図に示す処理は、レコードデータの暗号状態として、図8に例示したように、00hによる平文の状態、01hによる原暗号文の状態、02hによる再暗号文の状態が定義されている場合を例に挙げる。
そのうえで、同図に示す処理を実行するリーダライタ100は、以下のユーザに対応する場合を例に挙げる。つまり、リーダライタ100は、01hの値の暗号状態情報に対応する原暗号文の状態のレコードデータへのアクセス権は有するが、02hの値の暗号状態情報に対応する再暗号文の状態のレコードデータへのアクセス権は有さないユーザに対応する。
Further, in the processing shown in the figure, as shown in FIG. 8, the plaintext state by 00h, the original ciphertext state by 01h, and the re-ciphertext state by 02h are defined as the encryption state of the record data. Take the case as an example.
In addition, the reader /
また、同図に示す処理は、例えば、ファイルの読み出しに先だってICカード200からデータを読み出すことのできる正当なリーダライタ100であるか否かについての認証処理が行われてもよい。そして、認証処理による認証が成立して、正当な権限を有するリーダライタ100であるとICカード200側で認識された場合に、同図に示す処理が実行されればよい。
Further, for example, the process shown in the figure may be an authentication process as to whether or not the reader /
リーダライタ100におけるデータ読出コマンド送信部121は、1つのレコードを指定してデータの読み出しを要求するデータ読出コマンドを、通信部101からICカード200に対して送信する(ステップS101)。
The data read
ステップS101によるデータ読出コマンドの送信に応じて、ICカード200からは送信したデータ読出コマンドが指定するレコードに格納されていた暗号状態情報とレコードデータとが送信される。
通信部101は、上記のようにICカード200から送信された暗号状態情報とレコードデータとを受信する(ステップS102)。
In response to the transmission of the data read command in step S101, the
The
次に、復号部122は、ステップS102にて受信された暗号状態情報を参照し(ステップS103)、暗号状態情報の値について判定する(ステップS104)。
暗号状態の値が00hである場合(ステップS104:00h)、受信されたレコードデータは平文の状態である。そこで、この場合の復号部122は、受信されたレコードデータについて特に復号を行うことなく、受信されたレコードデータをそのまま読出データとして取得する(ステップS105)。
Next, the
When the value of the encryption state is 00h (step S104: 00h), the received record data is in a plaintext state. Accordingly, the
また、暗号状態情報の値が01hである場合(ステップS104:01h)、受信されたレコードデータは原暗号文の状態である。前述のように、この場合のリーダライタ100は、原暗号文へのアクセス権を有しており、例えば記憶媒体203には原暗号文に対応する鍵が記憶されている。復号部122は、暗号状態情報の値が01hである場合には、アクセスが可能であると判断する。
そこで、この場合の復号部122は、受信されたレコードデータについて、自己が有する原暗号文に対応する鍵により復号し、復号により得られたレコードデータを読出データとして取得する(ステップS106)。
If the value of the encryption state information is 01h (step S104: 01h), the received record data is in the original ciphertext state. As described above, the reader /
Therefore, the
これに対して、暗号状態情報の値が00h、01h以外の値である場合(ステップS104:その他)、受信されたレコードデータは、原暗号文以外の形式の暗号文である。具体的に、この場合のレコードデータは、02hの値の暗号状態情報が示す再暗号文である。この場合において、再暗号文は、原暗号文とは異なる暗号文である。そして、再暗号文は、原暗号文とは異なる鍵を用いて復号が行われる。
しかし、この場合のリーダライタ100は、再暗号文のレコードデータへのアクセス権を有しておらず、従って、記憶媒体203には再暗号文を復号可能な鍵も記憶されていない。このため、復号部122は、受信された再暗号文としてのレコードデータを正常に復号することができないことから復号エラーであると判定する(ステップS107)。この場合、正常な読出データは得られない。
なお、リーダライタ100に対応するユーザが再暗号文のレコードデータへのアクセス権を有している場合、復号部122は、ステップS107において、再暗号文を復号可能な鍵を用いてレコードデータを復号することができる。
On the other hand, when the value of the encryption state information is a value other than 00h and 01h (step S104: other), the received record data is a ciphertext in a format other than the original ciphertext. Specifically, the record data in this case is a re-ciphertext indicated by the encryption state information having a value of 02h. In this case, the re-ciphertext is a ciphertext different from the original ciphertext. The re-ciphertext is decrypted using a key different from the original ciphertext.
However, the reader /
If the user corresponding to the reader /
また、ICカード200において通信部201は、ステップS101によりリーダライタ100から送信されたデータ読出コマンドを受信する(ステップS201)。
データ読出コマンドが受信されるのに応じて、データ読出部221は、受信されたデータ読出コマンドによって指定されたファイルのレコードに格納される暗号状態情報とレコードデータとを記憶媒体203から読み出す(ステップS202)。
In the
In response to the reception of the data read command, the data read
次に、データ送信部222は、ステップS202により記憶媒体203から読み出された暗号状態情報とレコードデータとを通信部201からリーダライタ100に送信させる(ステップS203)。
Next, the
このようにリーダライタ100とICカード200とが処理を実行することによって、アクセス権の異なるデータが混在して格納されたファイルを対象として、リーダライタ100が有するアクセス権に応じた適切なレコードデータの読み出しが行われる。つまり、リーダライタ100は、アクセス権を有するレコードデータについては平文の状態で取得可能であるが、アクセス権を有さないレコードデータについては暗号文のままとされて平文の状態では取得できないように適切にアクセスが制限される。
As described above, when the reader /
<第2実施形態>
[データ読出システムの構成例]
続いて、第2実施形態について説明する。第2実施形態においては、データ読出コマンドが要求するレコードデータが暗号文である場合には、読み出し対象のレコードデータについての認証が成立していればICカード200側で暗号文の復号を行ったうえでリーダライタ100に送信する。一方、読み出し対象のレコードデータについての認証が成立していなければ、ICカード200においては復号を行わずに、暗号文の状態のままでリーダライタ100に送信するように構成される。
このように構成することにより、リーダライタ100では、ファイルにおいてアクセス権を有するレコードデータについては平文の状態で取得できるが、アクセス権を有さないレコードデータについては暗号文の状態で取得される。つまり、ファイルにおいてアクセス権を有するレコードデータのみが正常に読み出されるように適切なアクセス制限が実現される。
Second Embodiment
[Configuration example of data reading system]
Next, the second embodiment will be described. In the second embodiment, when the record data requested by the data read command is a ciphertext, the
With this configuration, the reader /
図11は、本実施形態におけるリーダライタ100とICカード200との構成例を示している。同図において、図9と同一部分には同一符号を付して説明を省略する。
本実施形態のリーダライタ100における制御部102は、データ読出コマンド送信部121、認証処理部123及びデータ取得部124を備える。
データ読出コマンド送信部121は、図9と同様に、ICカード200からファイルのデータを読み出すにあたり、レコード単位でデータの読み出しを要求するデータ読出コマンドをICカード200に送信する。
認証処理部123は、ICカード200との間で認証処理を実行する。認証処理部123が実行する認証処理は、ファイルに格納される特定の暗号状態のレコードデータへのアクセス権を有するか否かをICカード200側で判断するために実行される。
データ取得部124は、データ読出コマンドの送信に応じてICカード200から送信されるレコードデータを、通信部101経由で取得する。
FIG. 11 shows a configuration example of the reader /
The
Similarly to FIG. 9, the data read
The
The
また、同図に示されるICカードにおいて制御部202は、データ読出部221、データ送信部222、認証処理部223及び復号部224を備える。
認証処理部223は、リーダライタ100との間で認証処理を実行する。具体的に、認証処理部223は、リーダライタ100に対応するユーザについて、特定の暗号状態の暗号文によるレコードデータへのアクセス権を有するか否かを判断するための認証処理を実行する。
In addition, in the IC card shown in the figure, the
The
データ読出部221は、認証処理部223による認証の後において、図9の場合と同様に、リーダライタ100から受信されたデータ読出コマンドが指定するファイルのレコードに格納された暗号状態情報とレコードデータとを読み出す。
After the authentication by the
復号部224は、データ読出部221によって読み出された暗号状態情報が示す暗号状態のレコードデータへのアクセス権を有する場合には、レコードデータを復号して出力し、レコードデータへのアクセス権を有さない場合にはレコードデータを復号せずに出力する。
データ送信部222は、復号部224から出力されたレコードデータを通信部201からリーダライタ100に対して送信させる。
When the
The
[処理手順例]
本実施形態のリーダライタ100における認証処理部123とICカード200における認証処理部223とは、ICカード200からのファイルの読み出しに先立ち、所定のタイミングで、ファイルのレコードデータへのアクセス権に対応する認証処理を実行する。
[Example of processing procedure]
The
図12のフローチャートは、本実施形態のリーダライタ100とICカード200とが実行する処理手順例を示している。
リーダライタ100における認証処理部123は、レコードデータへのアクセス権に対応する認証処理を要求するための認証コマンドをICカード200に対して送信する(ステップS301)。認証処理部123は、ステップS301により送信する認証コマンドに、認証キーを含める。
The flowchart of FIG. 12 shows an example of a processing procedure executed by the reader /
The
ステップS301により送信された認証コマンドの送信に応答して、ICカード200は認証処理を実行し、認証処理の結果として認証が成立したか否かを示す認証応答をリーダライタ100に対して送信する。
リーダライタ100の通信部101は、上記のようにリーダライタ100から送信された認証応答を受信する(ステップS302)。
認証処理部123は、ステップS302にて受信された認証応答により、ICカード200側で実行された認証処理の認証結果を認識する(ステップS303)。具体的に、認証処理部123は、ステップS303において認証が成立したか否かについて認識することができる。
In response to the transmission of the authentication command transmitted in step S301, the
The
The
また、ICカード200において、通信部201は、は、ステップS301によりリーダライタ100から送信された認証コマンドを受信する(ステップS401)。
認証処理部223は、ステップS401にて認証コマンドが受信されるのに応じて認証処理を実行する(ステップS402)。この場合の認証処理部223は、受信された認証コマンドに含まれていた認証キーが、特定の暗号状態のレコードデータに設定されたアクセス権に応じた正当なユーザのものであるか否かについて判定する。認証キーが正当なユーザのものであれば認証が成立し、認証キーが正当なユーザのものでなければ、認証は不成立となる。
In the
The
認証処理部223は、ステップS402による認証処理の結果として、認証が成立したか否かについて判定する(ステップS403)。
認証が成立した場合(ステップS403:YES)、認証が成立したユーザが有するアクセス権に対応する認証フラグの値について、認証が成立したことを示す1を設定する(ステップS404)。認証フラグは、記憶媒体203における所定の領域に記憶されればよい。
一方、認証が不成立であった場合(ステップS403:NO)、認証処理部223は、認証フラグの値について、認証が不成立であったことを示す0を設定する(ステップS405)。
The
When the authentication is established (step S403: YES), 1 indicating that the authentication is established is set as the value of the authentication flag corresponding to the access right possessed by the authenticated user (step S404). The authentication flag may be stored in a predetermined area in the
On the other hand, when the authentication is not established (step S403: NO), the
ステップS404あるいはステップS405の処理により、認証フラグに1あるいは0の値を設定した後、認証処理部223は、ステップS403にて判定された認証結果を示す認証応答をリーダライタ100に対して送信する(ステップS406)。
ステップS406として、認証処理部223は、ステップS403にて認証が成立したと判定された場合には、認証が成立したことを示す認証応答を送信する。一方、認証が不成立であると判定された場合、認証処理部223は、認証が不成立であることを示す認証応答を送信する。
このようにして、ICカード200により、リーダライタ100からの認証コマンドに応答して、レコードデータへのアクセス権に対応する認証処理が行われる。
After setting the value of 1 or 0 to the authentication flag by the processing in step S404 or step S405, the
In step S406, if it is determined in step S403 that the authentication has been established, the
In this way, in response to the authentication command from the reader /
なお、図12に示した認証処理は、ファイルに格納されるレコードデータの読み出しに先立って、一回実行されるものであってもよいし、レコードデータの読み出しごとに対応して毎回実行されるものであってもよい。
そして、図12に示した認証処理が実行された後において、リーダライタ100はICカードから以下のようにレコードデータの読み出しを行う。
Note that the authentication process shown in FIG. 12 may be executed once before reading the record data stored in the file, or is executed every time the record data is read. It may be a thing.
After the authentication process shown in FIG. 12 is executed, the reader /
図13のフローチャートは、レコードデータの読み出しに対応してリーダライタ100とICカード200とが実行する処理手順例を示している。
リーダライタ100において、データ読出コマンド送信部121は、レコードを指定してデータの読み出しを要求するデータ読み出しコマンドを送信する(ステップS501)。
ステップS501により送信されたデータ読出コマンドに応答して、ICカード200は、記憶媒体203から読み出した読出データをリーダライタ100に送信する。
リーダライタ100において、データ取得部124は、ICカード200から送信された読出データを、通信部101を介して受信する(ステップS502)。
The flowchart of FIG. 13 shows an example of a processing procedure executed by the reader /
In the reader /
In response to the data read command transmitted in step S501, the
In the reader /
続いて、ICカード200の処理について説明する。ICカード200において、データ読出部221は、ステップS501によりリーダライタ100から送信されたデータ読出コマンドを、通信部201を介して受信する(ステップS601)。
ステップS601によりデータ読出コマンドを受信するのに応じて、データ読出部221は、受信されたデータ読出コマンドが指定するファイルのレコードに格納される暗号状態情報とレコードデータとを記憶媒体203から読み出す(ステップS602)。
Next, processing of the
In response to receiving the data read command in step S601, the data read
次に、復号部224は、ステップS602により読み出した暗号状態情報を参照し(ステップS603)、参照した暗号状態情報の値が00hであるか否かについて判定する(ステップS604)。
暗号状態情報の値が00hである場合(ステップS604:00h)、ステップS602により読み出したレコードデータは、平文の状態である。そこで、この場合の復号部224は、ステップS602にて読み出したレコードデータについて特に復号を行うことなく、そのまま読出データとして出力する(ステップS605)。この場合のステップS607によっては、平文の状態による読出データが出力される。
Next, the
When the value of the encryption state information is 00h (step S604: 00h), the record data read in step S602 is in plain text. Therefore, the
一方、暗号状態情報の値が00h以外の値である場合(ステップS604:00h以外)、暗号状態情報の値は、図8の暗号状態情報の定義例との対応では、01hまたは02hであって、ステップS602により読み出したレコードデータは、原暗号文または再暗号文である。
例えば、図8のように、暗号文として原暗号文と再暗号文とが定義されている場合、図12による認証処理によっては、以下のように複数のパターンの認証が成立する。
1つは原暗号文と再暗号文とのいずれについてもアクセス権を有するユーザについて認証が成立するパターンである。もう1つは原暗号文へのアクセス権を有するが、再暗号文へのアクセス権を有さないユーザについて認証が成立するパターンである。さらにもう1つは、原暗号文へのアクセス権を有さないが、再暗号文へのアクセス権を有するユーザについて認証が成立するパターンである。
On the other hand, when the value of the encryption state information is a value other than 00h (step S604: other than 00h), the value of the encryption state information is 01h or 02h in correspondence with the definition example of the encryption state information in FIG. The record data read in step S602 is an original ciphertext or a re-ciphertext.
For example, as shown in FIG. 8, when an original ciphertext and a re-ciphertext are defined as ciphertext, a plurality of patterns of authentication are established as follows depending on the authentication processing shown in FIG.
One is a pattern in which authentication is established for a user who has an access right for both the original ciphertext and the re-ciphertext. The other is a pattern in which authentication is established for a user who has an access right to the original ciphertext but does not have an access right to the re-ciphertext. The other is a pattern in which authentication is established for a user who does not have access to the original ciphertext but has access to the re-ciphertext.
そこで、この場合の復号部224は、ステップS602にて読み出されたレコードデータについて、先の図12による認証処理によって認証が成立したユーザがアクセス権を有しているか否かについて判定する(ステップS606)。
アクセス権を有していない場合(ステップS606:NO)、復号部224は、ステップS602にて読み出したレコードデータについて特に復号を行うことなく、そのまま読出データとして出力する(ステップS605)。この場合のステップS605によっては、暗号文(原暗号文または再暗号文)の状態による読出データが取得される。
Therefore, the
If the user does not have the access right (step S606: NO), the
これに対して、アクセス権を有している場合(ステップS606:YES)、復号部224は、ステップS602にて読み出したレコードデータを、暗号状態に対応する鍵で復号し、復号したレコードデータを読出データとして出力する(ステップS607)。
具体的に、復号部224は、レコードデータが原暗号文の状態であれば、原暗号文を復号可能な鍵を用いた復号アルゴリズム(第1復号アルゴリズムの一例)によりレコードデータを復号する。また、復号部224は、レコードデータが再暗号文の状態であれば、原暗号文を復号可能な鍵とは異なる、再暗号文を復号可能な鍵を用いた復号アルゴリズム(第2復号アルゴリズムの一例)によりレコードデータを復号する。そして、復号部224は、上記のように復号されたレコードデータを読出データとして出力する。
On the other hand, if the user has an access right (step S606: YES), the
Specifically, when the record data is in the original ciphertext, the
データ送信部222は、ステップS605またはステップS607によって出力された読出データを通信部201からリーダライタ100に送信させる(ステップS608)。
The
上記の処理によれば、データ読出コマンドにより指定されたレコードに格納されるデータが平文の状態である場合には、平文による読出データがICカード200からリーダライタ100に送信される。
また、データ読出コマンドにより指定されたレコードに格納されるデータが暗号文の状態である場合には、認証が成立したユーザにアクセス権が有れば、ICカード200側にて復号された平文の状態による読出データがリーダライタ100に送信される。
一方、認証が成立したユーザにアクセス権が無ければ、復号されずに暗号文のままとされた暗号文の状態による読出データがリーダライタ100に送信される。
According to the above processing, when the data stored in the record designated by the data read command is in the plaintext state, the read data in plaintext is transmitted from the
Also, if the data stored in the record specified by the data read command is in a ciphertext state, the plaintext decrypted on the
On the other hand, if the authenticated user does not have the access right, read data based on the state of the ciphertext that is not decrypted and remains in the ciphertext is transmitted to the reader /
従って、リーダライタ100は、アクセス権が設定されていないレコードデータと、ユーザがアクセス権を有するレコードデータとを平文の状態による読出データとして取得することができる。一方、リーダライタ100は、ユーザがアクセス権を有さないレコードデータについては、暗号文の状態のままの読出データとして取得する。リーダライタ100は、このように暗号文の状態で取得された読出データについては復号可能な鍵を有していないことから復号が行えない。復号できなければ、有意な読出データとして処理できないため、この場合には読出エラーとなる。
Therefore, the reader /
このように、本実施形態においても、リーダライタ100によって対応のユーザが有するアクセス権によりアクセス可能なレコードデータのみを正常に読み出せるように適切にアクセス制限が行われる。
As described above, also in this embodiment, the reader /
なお、図13におけるICカード200の処理として、ステップS606にてアクセス権を有していないことが判定された場合には、暗号状態のままの読出データを送信するのに代えて、データ読出コマンドに対するエラー応答をリーダライタ100に送信してもよい。
As a process of the
<第3実施形態>
続いて、第3実施形態について説明する。先の第1実施形態及び第2実施形態においては、ファイルのデータ領域が、固定長のレコードにより形成されている場合を例に挙げた。
ファイルにおけるデータ領域としては、上記の固定長のレコードによる構造の他に、TLV構造と呼ばれる、可変長のレコードによる構造であってもよい。第3実施形態は、ファイルにおけるデータ領域がTLV構造である場合に対応する構成である。
<Third Embodiment>
Subsequently, the third embodiment will be described. In the first embodiment and the second embodiment, the case where the data area of the file is formed by a fixed-length record is taken as an example.
The data area in the file may have a variable length record structure called a TLV structure in addition to the fixed length record structure. The third embodiment has a configuration corresponding to the case where the data area in the file has a TLV structure.
図14を参照してTLV構造について説明する。同図に示すように、TLV構造における1つのレコードは、先頭から順にTag領域、Length領域、Value領域を配列させた構造を有する。
Tag領域には、レコードを識別する識別子(タグ)が格納される。
Length領域には、続くValue領域のデータ長(サイズ)を示す情報が格納される。
Value領域には、Length領域により示されるデータ長によるデータ(レコードデータ)が格納される。
そして、ファイルFLのデータ領域においては、上記のTLV構造によるレコードが、同じ図14に示すように、先頭から詰められていくように格納される。このようにして、TLV構造によるファイルが形成される。
The TLV structure will be described with reference to FIG. As shown in the figure, one record in the TLV structure has a structure in which a Tag area, a Length area, and a Value area are arranged in order from the top.
In the Tag area, an identifier (tag) for identifying a record is stored.
Information indicating the data length (size) of the subsequent Value area is stored in the Length area.
In the Value area, data (record data) having a data length indicated by the Length area is stored.
In the data area of the file FL, records having the above TLV structure are stored so as to be packed from the top as shown in FIG. In this way, a file having a TLV structure is formed.
図15には、TLV構造によるファイルに対して図8と同様のデータが書き込まれた場合のデータマッピング例が示されている。
つまり、同図に示すファイルFLのデータ領域においては、TLV構造のもとで、1番目のレコードのValue領域において、先頭の1バイトに00hの値の暗号状態情報が書き込まれ、続く2バイト目以降において平文による氏名のデータが書き込まれている。
また、2番目のレコードのValue領域において、先頭の1バイトに01hの値の暗号状態情報が書き込まれ、続く2バイト目以降において原暗号文による住所のデータが書き込まれている。
また、3番目のレコードのValue領域において、先頭の1バイトに00hの値の暗号状態情報が書き込まれ、続く2バイト目以降において平文によるカード番号のデータが書き込まれている。
また、4番目のレコードのValue領域において、先頭の1バイトに02hの値の暗号状態情報が書き込まれ、続く2バイト目以降において再暗号文による電話番号のデータが書き込まれている。
FIG. 15 shows an example of data mapping when data similar to that in FIG. 8 is written to a file having a TLV structure.
That is, in the data area of the file FL shown in the figure, the encryption state information having a value of 00h is written in the first byte in the value area of the first record under the TLV structure, and the subsequent second byte. After that, name data in plain text is written.
Also, in the value area of the second record, encryption state information having a value of 01h is written in the first byte, and address data in the original ciphertext is written in the second and subsequent bytes.
Also, in the Value area of the third record, the encryption status information having a value of 00h is written in the first byte, and the card number data in plain text is written in the second and subsequent bytes.
Also, in the value area of the fourth record, the encryption status information having a value of 02h is written in the first byte, and the telephone number data by re-ciphertext is written in the second and subsequent bytes.
このようにファイルのデータ領域がTLV構造である場合においても、データの読み出しの処理は、第1実施形態における図10の処理、あるいは第2実施形態における図13の処理と同様に実行されればよい。
従って、ファイルのデータ領域がTLV構造である場合にも、異なるアクセス権が設定されたレコードデータを1つのファイルに格納することが可能であり、記憶媒体203の容量を効率的に使用できる。そのうえで、アクセス権を有するレコードデータのみがICカード200から正常に読み出されるように適切にアクセス制限が行われる。
As described above, even when the data area of the file has the TLV structure, the data reading process is performed in the same manner as the process of FIG. 10 in the first embodiment or the process of FIG. 13 in the second embodiment. Good.
Therefore, even when the data area of the file has a TLV structure, it is possible to store record data to which different access rights are set in one file, and the capacity of the
なお、これまでの実施形態において、暗号状態情報は、対応のレコードデータが格納されるレコードに格納されていた。これに対して、各レコードデータに対応する暗号状態情報は、対応のレコードデータが格納されるファイルを管理する管理情報に含められてもよい。
具体的に、暗号状態情報は、レコードとの対応関係が示された状態でファイルヘッダに書き込まれてもよい。あるいは、暗号状態情報は、ファイルシステムにおいてファイルを管理するディレクトリ情報などの管理情報において、レコードとの対応関係が示された状態で書き込まれてもよい。
In the embodiments described so far, the encryption state information is stored in a record in which corresponding record data is stored. On the other hand, the encryption state information corresponding to each record data may be included in management information for managing a file in which the corresponding record data is stored.
Specifically, the encryption state information may be written in the file header in a state where the correspondence relationship with the record is indicated. Alternatively, the encryption state information may be written in a state in which management information such as directory information for managing a file in the file system indicates a correspondence relationship with a record.
なお、上述のリーダライタ100またはICカード200の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述のリーダライタ100またはICカード200としての処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD−ROM等の非一過性の記録媒体であってもよい。また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部または外部に設けられた記録媒体も含まれる。配信サーバの記録媒体に記憶されるプログラムのコードは、端末装置で実行可能な形式のプログラムのコードと異なるものでもよい。すなわち、配信サーバからダウンロードされて端末装置で実行可能な形でインストールができるものであれば、配信サーバで記憶される形式は問わない。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に端末装置で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。
A program for realizing the functions of the reader /
100 リーダライタ 、101 通信部 、102 制御部 、121 データ読出コマンド送信部 、122 復号部 、123 認証処理部 、124 データ取得部 、200 ICカード 、201 通信部 、202 制御部 、203 記憶媒体 、221 データ読出部 、222 データ送信部 、223 認証処理部 、223 認証処理部 、224 復号部
DESCRIPTION OF
Claims (17)
データ読出部が、所定のアクセス権に対応するデータ読出装置から1ファイルにおける単位データごとに対応して順次送信され、単位データの読み出しを要求するデータ読出コマンドの受信に応じて、設定されたアクセス権に応じた暗号状態を示す暗号状態情報が対応付けられるとともに所定の定義に従った種別のデータが格納される単位データを格納するファイルを記憶する前記記憶媒体から、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すステップと、
データ送信部が、前記データ読出部によって読み出された単位データと暗号状態情報とを前記データ読出装置に対して送信するステップと
を含むデータ出力方法。 A data output method in a storage medium device comprising a storage medium,
The data reading unit sequentially transmits corresponding to each unit data in one file from the data reading device corresponding to the predetermined access right, and the access set in response to reception of the data read command requesting reading of the unit data from the storage medium in which data of types encryption status information indicating the encryption state in accordance with a Rutotomoni predetermined definitions associated in accordance with the rights to store the file to store the unit data to be stored, the received data read command Reading the unit data requested by and the cryptographic state information associated with the unit data;
A data output method comprising: a data transmission unit transmitting unit data and encryption state information read by the data reading unit to the data reading device.
請求項1に記載のデータ出力方法。 The data output method according to claim 1, wherein the encryption state indicated by the encryption state information is one of a ciphertext state and an unencrypted plaintext state.
請求項2に記載のデータ出力方法。 The state of the ciphertext is the state of the original ciphertext when received from an external communication device, and the state of the re-ciphertext obtained by re-encrypting by an encryption process different from when the original ciphertext is encrypted The data output method according to claim 2, which is at least one of the following.
請求項1から3のいずれか一項に記載のデータ出力方法。 The data output method according to any one of claims 1 to 3, wherein the unit data is data stored in a unit data storage area in a file.
請求項4に記載のデータ出力方法。 The data output method according to claim 4, wherein the encryption state information is stored at a predetermined position in a unit data storage area in which the unit data is stored.
請求項1から4のいずれか一項に記載のデータ出力方法。 The data output method according to any one of claims 1 to 4, wherein the encryption state information is included in management information stored in the storage medium for management of a file storing the unit data.
データ読出コマンド送信部が、1ファイルにおける単位データごとに対応して、順次、単位データの読み出しを要求するデータ読出コマンドを前記記憶媒体装置に送信するステップと、
復号部が、前記データ読出コマンドに対する応答として前記記憶媒体から読み出された単位データと前記単位データに対応付けられた暗号状態情報とを前記記憶媒体装置から受信するのに応じて、受信された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データの復号を行い、前記単位データへのアクセス権を有さない場合には前記単位データの復号を行わないステップと
を含むデータ読出方法。 Storage medium device including a storage medium for storing a file that stores unit data set data type encryption status information indicating the encryption status in accordance with the access rights according to Rutotomoni predetermined definition associated is stored A data reading method in a data reading device corresponding to a predetermined access right for reading data from:
A step in which a data read command transmitting unit sequentially transmits a data read command for requesting reading of unit data to the storage medium device in correspondence with each unit data in one file ;
The decryption unit is received in response to receiving from the storage medium device the unit data read from the storage medium as a response to the data read command and the encryption state information associated with the unit data A step of decrypting the unit data when having an access right to the unit data in the encryption state indicated by the encryption state information, and a step not performing decryption of the unit data when not having an access right to the unit data A data reading method including and.
データ読出部が、所定のアクセス権に対応するデータ読出装置から1ファイルにおける単位データごとに対応して順次送信され、単位データの読み出しを要求するデータ読出コマンドの受信に応じて、設定されたアクセス権に応じた暗号状態を示す暗号状態情報が対応付けられるとともに所定の定義に従った種別のデータが格納される単位データを格納するファイルを記憶する前記記憶媒体から、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すステップと、
復号部が、前記データ読出部によって読み出された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データを復号して出力し、前記単位データへのアクセス権を有さない場合には前記単位データを復号せずに出力するステップと、
データ送信部が、前記復号部から出力された単位データを前記データ読出装置に対して送信するステップと
を備えるデータ出力方法。 A data output method in a storage medium device comprising a storage medium,
The data reading unit sequentially transmits corresponding to each unit data in one file from the data reading device corresponding to the predetermined access right, and the access set in response to reception of the data read command requesting reading of the unit data from the storage medium in which data of types encryption status information indicating the encryption state in accordance with a Rutotomoni predetermined definitions associated in accordance with the rights to store the file to store the unit data to be stored, the received data read command Reading the unit data requested by and the cryptographic state information associated with the unit data;
When the decryption unit has an access right to the unit data in the encryption state indicated by the encryption state information read by the data reading unit, the unit data is decrypted and output, and the access right to the unit data is given. If not, outputting the unit data without decoding;
A data transmission method comprising: a data transmission unit transmitting the unit data output from the decoding unit to the data reading device.
請求項8に記載のデータ出力方法。 The data output method according to claim 8, wherein the cipher state indicated by the cipher state information is one of a ciphertext state and an unencrypted plaintext state.
請求項9に記載のデータ出力方法。 The state of the ciphertext is the state of the original ciphertext when received from an external communication device, and the state of the re-ciphertext obtained by re-encrypting by an encryption process different from when the original ciphertext is encrypted The data output method according to claim 9, wherein the data output method is at least one of the following.
前記データ読出部によって読み出された暗号状態情報が示す暗号状態が暗号文の状態であって、前記暗号文の状態の単位データへのアクセス権を有する場合には、前記データ読出部によって読み出された単位データを第1復号アルゴリズムにより復号して出力し、
前記データ読出部によって読み出された暗号状態情報が示す暗号状態が平文の状態である場合には、前記データ読出部によって読み出された単位データを復号することなく出力し、
前記データ読出部によって読み出された暗号状態情報が示す暗号状態が再暗号文の状態であって、前記再暗号文の状態の単位データへのアクセス権を有する場合には、前記データ読出部によって読み出された単位データを前記第1復号アルゴリズムとは異なる第2復号アルゴリズムにより復号して出力する
請求項10に記載のデータ出力方法。 The decoding unit
When the cipher state indicated by the cipher state information read by the data reading unit is a ciphertext state and has an access right to the unit data in the ciphertext state, the data is read by the data reading unit. The decoded unit data is decoded by the first decoding algorithm and output,
When the encryption state indicated by the encryption state information read by the data reading unit is a plaintext state, the unit data read by the data reading unit is output without being decrypted,
When the cipher state indicated by the cipher state information read by the data reading unit is a re-ciphertext state and has access rights to the unit data in the re-ciphertext state, the data reading unit The data output method according to claim 10, wherein the read unit data is decoded and output by a second decoding algorithm different from the first decoding algorithm.
請求項8から11のいずれか一項に記載のデータ出力方法。 The data output method according to any one of claims 8 to 11, wherein the unit data is data stored in a unit data storage area in a file.
請求項12に記載のデータ出力方法。 The data output method according to claim 12, wherein the encryption state information is stored at a predetermined position in a unit data storage area in which the unit data is stored.
請求項8から12のいずれか一項に記載のデータ出力方法。 The data output method according to any one of claims 8 to 12, wherein the encryption state information is included in management information stored in the storage medium for management of a file storing the unit data.
所定のアクセス権に対応するデータ読出装置と通信を行う通信部と、
前記データ読出装置から1ファイルにおける単位データごとに対応して順次送信され、単位データの読み出しを要求するデータ読出コマンドの受信に応じて、設定されたアクセス権に応じた暗号状態を示す暗号状態情報が対応付けられるとともに所定の定義に従った種別のデータが格納される単位データを格納するファイルを記憶する前記記憶媒体から、受信されたデータ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すデータ読出部と、
前記データ読出部によって読み出された単位データと暗号状態情報とを前記通信部から前記データ読出装置に対して送信させるデータ送信部と
を備える記憶媒体装置。 A storage medium for storing unit data associated with encryption state information indicating an encryption state;
A communication unit for communicating with a data reading device corresponding to a predetermined access right ;
Encryption state information indicating an encryption state corresponding to a set access right in response to reception of a data read command sequentially transmitted corresponding to each unit data in one file from the data reading device and requesting reading of unit data from the storage medium for storing a file that stores unit data type of the data is stored in accordance with the association is Rutotomoni predetermined definition, the unit data requested by the received data read command, the unit data A data reading unit for reading the associated encryption state information;
A storage medium device comprising: a data transmission unit that transmits unit data and encryption state information read by the data reading unit from the communication unit to the data reading device.
1ファイルにおける単位データごとに対応して、順次、単位データの読み出しを要求するデータ読出コマンドを前記記憶媒体装置に送信するデータ読出コマンド送信部と、
前記データ読出コマンドに対する応答として前記記憶媒体から読み出された単位データと前記単位データに対応付けられた暗号状態情報とを前記記憶媒体装置から受信するのに応じて、受信された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データの復号を行い、前記単位データへのアクセス権を有さない場合には前記単位データの復号を行わない復号部と
を備えるデータ読出装置。 Storage medium device including a storage medium for storing a file that stores unit data set data type encryption status information indicating the encryption status in accordance with the access rights according to Rutotomoni predetermined definition associated is stored A communication unit that communicates with
A data read command transmitting unit for sequentially transmitting a data read command for requesting reading of unit data to the storage medium device in correspondence with each unit data in one file ;
In response to receiving from the storage medium device unit data read from the storage medium as a response to the data read command and encryption state information associated with the unit data, the received encryption state information is A decrypting unit that decrypts the unit data when having access right to the unit data in the encryption state shown, and does not decrypt the unit data when not having access right to the unit data. Data reading device.
所定のアクセス権に対応するデータ読出装置と通信を行う通信部と、
前記データ読出装置が1ファイルにおける単位データごとに対応して順次送信し、単位データの読み出しを要求するデータ読出コマンドが前記通信部にて受信されるのに応じて、設定されたアクセス権に応じた暗号状態を示す暗号状態情報が対応付けられるとともに所定の定義に従った種別のデータが格納される単位データを格納するファイルを記憶する前記記憶媒体から、受信された前記データ読出コマンドが要求する単位データと、前記単位データに対応付けられた暗号状態情報とを読み出すデータ読出部と、
前記データ読出部によって読み出された暗号状態情報が示す暗号状態の単位データへのアクセス権を有する場合には前記単位データを復号して出力し、前記単位データへのアクセス権を有さない場合には前記単位データを復号せずに出力する復号部と、
前記復号部から出力された単位データを前記データ読出装置に対して送信するデータ送信部と
を備える記憶媒体装置。 A storage medium for storing unit data associated with encryption state information indicating an encryption state;
A communication unit for communicating with a data reading device corresponding to a predetermined access right ;
The data reading device sequentially transmits corresponding to each unit data in one file , and responds to the set access right in response to the data reading command for requesting reading of the unit data being received by the communication unit. from the storage medium in which the type of data to store a file for storing the unit data stored encryption state information indicating the encryption status obeyed Rutotomoni predetermined definitions associated, the data read command received request A data reading unit that reads unit data to be read and encryption state information associated with the unit data;
When the right to access the unit data in the encryption state indicated by the encryption state information read by the data reading unit is decrypted and output, and the right to access the unit data is not present Includes a decoding unit that outputs the unit data without decoding,
A storage medium device comprising: a data transmission unit configured to transmit unit data output from the decoding unit to the data reading device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014106336A JP6340916B2 (en) | 2014-05-22 | 2014-05-22 | Data output method, data read method, storage medium device, and data read device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014106336A JP6340916B2 (en) | 2014-05-22 | 2014-05-22 | Data output method, data read method, storage medium device, and data read device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015222484A JP2015222484A (en) | 2015-12-10 |
| JP6340916B2 true JP6340916B2 (en) | 2018-06-13 |
Family
ID=54785455
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014106336A Active JP6340916B2 (en) | 2014-05-22 | 2014-05-22 | Data output method, data read method, storage medium device, and data read device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6340916B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111367476B (en) * | 2020-03-11 | 2024-01-30 | 楚天龙股份有限公司 | Data reading method and device of SIM card |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002009757A (en) * | 2000-06-20 | 2002-01-11 | Casio Comput Co Ltd | Data encryption device and data decryption device |
| MXPA06009235A (en) * | 2004-02-13 | 2007-02-02 | Ivi Smart Technologies Inc | Method and apparatus for cryptographically processing data. |
| JP2008109276A (en) * | 2006-10-24 | 2008-05-08 | Toshiba Corp | Portable electronic device |
| US8880879B2 (en) * | 2008-09-04 | 2014-11-04 | Intel Corporation | Accelerated cryptography with an encryption attribute |
| JP2013153327A (en) * | 2012-01-25 | 2013-08-08 | Toshiba Corp | Storage device, host device, and information processing method |
-
2014
- 2014-05-22 JP JP2014106336A patent/JP6340916B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015222484A (en) | 2015-12-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4624732B2 (en) | how to access | |
| CN102915263B (en) | A kind of data back up method, system and equipment | |
| JP5604929B2 (en) | Memory device and memory system | |
| JP2010050760A (en) | Content protection apparatus, and content utilization apparatus | |
| KR20110018331A (en) | Secure data cache | |
| WO2013002833A2 (en) | Binding of cryptographic content using unique device characteristics with server heuristics | |
| CN1889426B (en) | Method and system for realizing network safety storing and accessing | |
| KR20190040772A (en) | Apparatus for storing device data in internet of things environment and method for the same | |
| JP4768327B2 (en) | Authentication system, information processing apparatus, information processing method, and computer program | |
| JP6340916B2 (en) | Data output method, data read method, storage medium device, and data read device | |
| JP2012234439A (en) | Image processing apparatus, data management method therefor, and program | |
| US20230344623A1 (en) | Memory system | |
| JP2007108833A (en) | Device for storing a plurality of passwords and password management method | |
| JP3587143B2 (en) | INFORMATION USE CONTROL METHOD, DEVICE, AND RECORDING MEDIUM RECORDING THE PROGRAM | |
| JP3963938B2 (en) | Access method, memory device, and information device | |
| JP2015222485A (en) | Data writing method, storage medium device, and data writing system | |
| KR101049472B1 (en) | A portable USB security module device, a method of registering and querying a document file using the portable USB security module device, and a program recording medium for executing the method | |
| US8689014B2 (en) | Data encryption device and control method thereof | |
| JP4385261B2 (en) | Terminal authentication, terminal change method, operation terminal, authentication server, and authentication program | |
| EP3214543A1 (en) | Method for setting encrypted storage area, apparatus for setting encrypted storage area, and terminal | |
| CN100583060C (en) | Access method, access device and information appliance | |
| JP4583428B2 (en) | Management server device and program | |
| JP6492832B2 (en) | ENCRYPTION DEVICE, ENCRYPTION METHOD, ENCRYPTION PROGRAM, DATA STRUCTURE, AND ENCRYPTION SYSTEM | |
| WO2022186367A1 (en) | Data management device, data management system, data management method, and computer readable recording medium | |
| KR20230086559A (en) | Multi secure storage system and method of thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170420 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171228 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180130 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180402 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20180403 |
|
| 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: 20180417 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180430 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6340916 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| 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 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |