JP5233521B2 - IC chip, data reading method, data reading program, recording medium, etc. - Google Patents

IC chip, data reading method, data reading program, recording medium, etc. Download PDF

Info

Publication number
JP5233521B2
JP5233521B2 JP2008222495A JP2008222495A JP5233521B2 JP 5233521 B2 JP5233521 B2 JP 5233521B2 JP 2008222495 A JP2008222495 A JP 2008222495A JP 2008222495 A JP2008222495 A JP 2008222495A JP 5233521 B2 JP5233521 B2 JP 5233521B2
Authority
JP
Japan
Prior art keywords
data
verification value
verification
data group
validity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008222495A
Other languages
Japanese (ja)
Other versions
JP2010055549A (en
Inventor
裕文 上口
正和 遠山
徹 館下
慎 竹内
充 渡部
隆志 桜井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2008222495A priority Critical patent/JP5233521B2/en
Publication of JP2010055549A publication Critical patent/JP2010055549A/en
Application granted granted Critical
Publication of JP5233521B2 publication Critical patent/JP5233521B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Description

本発明は、ICチップ、データ読出し方法及びデータ読出しプログラム等に関するものであり、より詳しくは、不揮発性メモリに記憶されたデータを読み出す方法等に関する。   The present invention relates to an IC chip, a data reading method, a data reading program, and the like, and more particularly to a method of reading data stored in a nonvolatile memory.

近年、ICカード等に代表される携帯型情報記録媒体は、様々な分野で利用されており、そこでは、極めて重要な情報が取り扱われるようになっている。例えば、電子マネー機能を有する非接触型ICカードは、商品等売買における決算手段として利用されており、顧客の有する資産に関する情報が取り扱われている。また、金融機関が提供するキャッシュカードとしての非接触型ICカードは、顧客の特定及びサービスの提供手段として利用されており、そこでは、顧客の住所、生年月日等の個人情報と顧客の資産についての情報が取り扱われている。   In recent years, portable information recording media represented by IC cards and the like have been used in various fields, and extremely important information has been handled there. For example, a non-contact type IC card having an electronic money function is used as a settlement means for buying and selling merchandise and the like, and information on assets owned by customers is handled. In addition, contactless IC cards as cash cards provided by financial institutions are used to identify customers and provide services, including personal information such as customer address and date of birth, and customer assets. Information about is being dealt with.

従って、ICカードに記憶されている情報に対しては、取引の安全性確保の観点から、正当性が確保されている必要があり、これらの情報を読み出す際に右正当性を確認する手段を備えることが必要となっている。   Therefore, the information stored in the IC card must be ensured from the viewpoint of ensuring the safety of transactions, and means for confirming the right validity when reading such information. It is necessary to prepare.

特許文献1では、EEPROM(Electrically Erasable Programmable Read Only Memory)を採用した記憶装置の記憶領域に、予め記録用EEPROMと予備用EEPROMを用意し、データの書込み時に、書込みエラーが生じた際に予備用EEPROMにデータを記憶する発明が開示されている。   In Patent Document 1, a recording EEPROM and a spare EEPROM are prepared in advance in a storage area of a storage device adopting an EEPROM (Electrically Erasable Programmable Read Only Memory), and a spare is used when a write error occurs during data writing. An invention for storing data in an EEPROM is disclosed.

また、特許文献2では、EEPROMから構成される記憶領域内に、複数のレコードから構成される一つのファイルデータを、ファイルデータについてのレコード数の情報を含み、さらに、所定のセクタ長を定義し、各レコードをセクタ長を一区切りとするセクタデータに分割し、1レコード内におけるこのセクタデータ同士の連結情報を含んだ制御データを作成し、セクタデータ及び制御データに基づいて所定のエラーチェックコードを付加してなる単位データを、前記記憶領域内に記録しておき、各単位データを読み出した際に、前記エラーチェックコードに基づく第一のエラーチェックを行うとともに、読み出した各単位データから夫々制御データを抽出し、この制御データ内の連結情報に基づいて、記録領域内に記録されているファイルデータのレコード数とを比較し、不一致が生じた場合にデータの記録にエラーが生じていると認識する第2のエラーチェックを行い、当該ファイルの正当性を確認する発明が開示されている。
特開平3−25798号公報 特開平4−165487号公報
In Patent Document 2, one file data composed of a plurality of records is included in a storage area composed of EEPROM, and information on the number of records for the file data is defined, and a predetermined sector length is defined. , Each record is divided into sector data with a sector length as one segment, and control data including concatenation information of the sector data in one record is created, and a predetermined error check code is set based on the sector data and the control data. The added unit data is recorded in the storage area, and when each unit data is read out, the first error check based on the error check code is performed and each unit data read out is controlled. Data is extracted and the file recorded in the recording area is based on the connection information in the control data. Comparing the number of records Rudeta performs second error check recognizes that errors in recording data when a mismatch occurs has occurred, the invention to verify the validity of the file is disclosed.
Japanese Patent Laid-Open No. 3-25798 JP-A-4-165487

しかし、特許文献1に記載の発明では、書込みエラーを回避することは出来ても、データを読み込む際に問題が生じた場合には対応することができなかった。   However, in the invention described in Patent Document 1, even if a write error can be avoided, it cannot be coped with when a problem occurs when reading data.

また、特許文献2に記載の発明では、読み出す対象とするデータ全てに対して、個々にエラーチェックを行う必要があり、データの処理を行うCPU(Central Processing Unit)に過度な付加を掛け、処理速度の低下等の問題が生じていた。   Further, in the invention described in Patent Document 2, it is necessary to individually check all data to be read, and an excessive addition is applied to a CPU (Central Processing Unit) that performs data processing. Problems such as a decrease in speed occurred.

そこで、本発明は上記各問題点に鑑みてなされたもので、その目的の一例は、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができるICチップ、データ読出し方法、データ読出しプログラム及び記録媒体等を提供することである。   Therefore, the present invention has been made in view of the above problems, and an example of the purpose thereof is an IC chip that can efficiently and quickly confirm the validity of data stored in a storage area, and data reading A method, a data reading program, a recording medium, and the like are provided.

上記の課題を解決するために、請求項1に記載のICチップは、検証値を含むデータが複数集合したデータ群が記憶される記憶部を有するICチップにおいて、前記データ群についての検証値を生成する検証値生成手段と、前記生成された検証値を記憶する記憶手段と、前記データ群の正当性について検証する検証手段とを備え、前記データ群のうち何れかの前記データが読み出される際に、前記検証値生成手段は前記データ群についての検証値を新たに生成し、前記検証手段は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、前記読み出す対象となるデータの正当性について検証を行うことを特徴とする。 In order to solve the above problem, an IC chip according to claim 1 is an IC chip having a storage unit in which a data group in which a plurality of data including verification values are collected is stored. A verification value generation means for generating, a storage means for storing the generated verification value, and a verification means for verifying the validity of the data group, and when any one of the data groups is read out In addition, the verification value generation unit newly generates a verification value for the data group, and the verification unit compares the stored verification value with the newly generated verification value, thereby obtaining the data group. verifies the validity of the case it is determined that there is no validity of the data group, when the same size of data to the target data to be read is arranged, the same size Without verifying the validity of the data, and performs verification of validity of the data to be the read target.

この発明によれば、必要最小限のデータについて正当性の検証を行うため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。 According to the present invention, the validity of the minimum necessary data is verified, so that the validity of the data stored in the storage area can be confirmed efficiently and quickly.

請求項に記載のICチップは、請求項1に記載のICチップにおいて、前記データ群の正当性があると判断された場合には、読み出す対象となる前記データまでに配列される各データの正当性について検証せずに前記データを読み出すことを特徴とする。 The IC chip according to claim 2 is the IC chip according to claim 1 , wherein when it is determined that the data group is valid, each of the data arranged up to the data to be read is stored. The data is read without verifying validity.

請求項に記載のデータ読出し方法は、検証値を含むデータが複数集合するデータ群が記憶される記憶部を有するICチップにおけるデータ読出し方法において、前記データ群についての検証値を生成する検証値生成工程と、前記生成された検証値を記憶する記憶工程と、前記データ群の正当性について検証する検証工程とを有し、前記データ群のうち何れかの前記データが読み出される際に、前記検証値生成工程は前記データ群についての検証値を新たに生成し、前記検証工程は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、前記読み出す対象となるデータの正当性について検証を行うことを特徴とする。 Data reading method according to claim 3, in the data reading method in the IC chip having a memory unit in which data including verification value data groups a plurality sets are stored, the verification value to generate a verification value for said data groups A generation step, a storage step for storing the generated verification value, and a verification step for verifying the validity of the data group, and when any one of the data groups is read, The verification value generation step newly generates a verification value for the data group, and the verification step compares the stored verification value with the newly generated verification value, thereby verifying the validity of the data group. It examines, if it is determined that there is no validity of the data group, when the same size of data to the target data to be read is arranged, the same large Without verifying the validity of the data, and performs verification of validity of the data to be the read target.

請求項に記載のデータ読出しプログラムは、検証値を含むデータが複数集合するデータ群が記憶される記憶部を有するICチップ含まれるコンピュータを、前記データ群についての検証値を生成する検証値生成手段、前記生成された検証値を記憶する記憶手段、前記データ群の正当性について検証する検証手段とを備え、前記コンピュータによって、前記データ群のうち何れかの前記データが読み出される際に、前記検証値生成手段は前記データ群についての検証値を新たに生成し、前記検証手段は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、前記読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、読み出す対象となるデータの正当性について検証を行うことを特徴とする。 5. The data read program according to claim 4 , wherein a computer including an IC chip having a storage unit in which a data group in which a plurality of data including verification values are collected is stored, generates a verification value for the data group. Means for storing the generated verification value, verification means for verifying the validity of the data group, and when the data is read from the data group by the computer, The verification value generation unit newly generates a verification value for the data group, and the verification unit compares the stored verification value with the newly generated verification value, thereby verifying the validity of the data group. examines, if it is determined that there is no validity of the data group, the reading until the target data to the same size of the data is arranged Expediently, the without verifying the validity of the same size of data, and performs verification of validity of the target data to be read.

以上のように、本発明によれば、検証値を含むデータが複数集合したデータ群が記憶される記憶部を有するICチップにおいて、予め、前記データ群についての検証値が記憶されており、前記データ群のうち何れかの前記データが読み出される際に、読み出す対象となるデータの正当性を確認する前に、データ群全体に対する正当性の確認をすることができるため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   As described above, according to the present invention, in an IC chip having a storage unit in which a data group including a plurality of data including verification values is stored, a verification value for the data group is stored in advance, When any one of the data groups is read, it is possible to confirm the validity of the entire data group before confirming the validity of the data to be read. The validity of the data stored in the storage area can be confirmed.

以下、本願の最良の実施形態を添付図面に基づいて説明する。なお、以下に説明する実施の形態は、ICチップに対して本願を適用した場合の実施形態である。   Hereinafter, the best embodiment of the present application will be described with reference to the accompanying drawings. The embodiment described below is an embodiment when the present application is applied to an IC chip.

先ず、本実施形態に係るICチップの構成及び機能概要について、図1を用いて説明する。なお、これらICチップは、ICカードや携帯型情報記憶装置等に搭載され、データの送受信等を実現する。   First, the configuration and functional overview of the IC chip according to the present embodiment will be described with reference to FIG. These IC chips are mounted on an IC card, a portable information storage device, or the like, and realize data transmission / reception and the like.

図1は、ICチップの全体構成例を示すブロック図である。図1に示すように、ICチップSは、I/O(input/output)インターフェース1、ROM(Read Only Memory)2、RAM(Random Access Memory)3、EEPROM4、CPU(Central Processing Unit)5等を備えて構成されている。   FIG. 1 is a block diagram showing an example of the entire configuration of an IC chip. As shown in FIG. 1, the IC chip S includes an I / O (input / output) interface 1, a ROM (Read Only Memory) 2, a RAM (Random Access Memory) 3, an EEPROM 4, a CPU (Central Processing Unit) 5, and the like. It is prepared for.

I/Oインターフェース1は、データを送受信するための入出力回路であり、CPU5は、このI/Oインターフェース1を介して図示しないリーダライタ装置等と交信する。ROM2内には、CPU5によって実行されるべきプログラムが記憶されており、CPU5は、このプログラムに基づいてICチップSを統括的に制御する。RAM3は、CPU5がICチップを統括的に制御するために作業領域として使用するメモリである。   The I / O interface 1 is an input / output circuit for transmitting and receiving data, and the CPU 5 communicates with a reader / writer device or the like (not shown) via the I / O interface 1. A program to be executed by the CPU 5 is stored in the ROM 2, and the CPU 5 comprehensively controls the IC chip S based on this program. The RAM 3 is a memory used as a work area for the CPU 5 to comprehensively control the IC chip.

EEPROM4は、不揮発性半導体メモリの一種であり、記憶領域に記憶されているデータを消去し、何度でも再記憶ができるPROM(Programmable Rom)である。EEPROM4は、データを記憶する記憶回数に制限があり、通常は、10万回程度の消去、記憶のサイクルが保証されている。   The EEPROM 4 is a kind of nonvolatile semiconductor memory, and is a PROM (Programmable Rom) that can erase data stored in a storage area and re-store it any number of times. The EEPROM 4 has a limit on the number of times data can be stored, and normally, an erase and storage cycle of about 100,000 times is guaranteed.

本実施形態では、EEPROM4に換えて、フラッシュメモリを用いることもできる。フラッシュメモリは、不揮発性半導体メモリの一種であり、オンボード状態で電気的にデータを書き換えることができることを特徴としている。   In the present embodiment, a flash memory can be used instead of the EEPROM 4. A flash memory is a kind of nonvolatile semiconductor memory, and is characterized in that data can be electrically rewritten in an on-board state.

さらに、本実施形態では、EEPROM4に換えて、記憶回数に制限が無い、磁性体であるTMR(Tunnel Magneto Resistance)素子を用いたMRAM(Magnetoresistive Random Access Memory)等を適用することも可能である。   Further, in the present embodiment, instead of the EEPROM 4, an MRAM (Magnetoresistive Random Access Memory) using a TMR (Tunnel Magneto Resistance) element that is a magnetic material that has no limitation on the number of times of storage can be applied.

さらに、EEPROM4は、本願の記憶部として機能し、ICチップSに記録すべきデータを格納(記憶)する。   Furthermore, the EEPROM 4 functions as a storage unit of the present application, and stores (stores) data to be recorded on the IC chip S.

CPU5は、上述したようにICチップS全体の動作を統括的に制御するとともに、本願の検証値生成手段、記憶手段、及び検証手段として機能する。   The CPU 5 controls the overall operation of the IC chip S as described above, and functions as a verification value generation unit, a storage unit, and a verification unit of the present application.

次に、本実施形態に係るEEPROM4内の記憶領域に記憶されるデータ構造を、図2を用いて説明する。   Next, a data structure stored in the storage area in the EEPROM 4 according to the present embodiment will be described with reference to FIG.

図2〜4は、EEPROM4内の記憶領域に記憶されるデータ構造の一例を示す概念図である。   2 to 4 are conceptual diagrams showing an example of the data structure stored in the storage area in the EEPROM 4.

図2は、異なる大きさのデータが複数集合した場合のデータ構造を示す概念図である。
ここで、データの大きさとは、例えばデータサイズであり、単位としてバイト(byte)等で表される。
FIG. 2 is a conceptual diagram showing a data structure when a plurality of pieces of data having different sizes are collected.
Here, the data size is, for example, the data size, and is expressed in units of bytes.

図2に示すように、EEPROM4内の記憶領域には、データ等の集合としてのデータ群11と、データ群11に属するデータとしてのデータA(12)、データB(13)、データC(14)及びデータD(15)の4つのデータが記憶されている。ここで、データA(12)乃至データD(15)の大きさは夫々異なっている。   As shown in FIG. 2, the storage area in the EEPROM 4 includes a data group 11 as a set of data and the like, data A (12), data B (13), and data C (14) as data belonging to the data group 11. ) And data D (15) are stored. Here, the sizes of the data A (12) to the data D (15) are different.

また、各データには、検証値が付加されており、各データ及び各データに対応する各検証値の集合体が、データ群11として記憶されている。データA(12)にはデータAの検証値(12a)が、データB(13)にはデータBの検証値13aが、データC(14)にはデータCの検証値14aが、データD15にはデータDの検証値(15a)が、夫々付加されている。そして、データ群11の検証値として、データ群11の検証値11aが付加されている。   Each data is added with a verification value, and each data and a set of each verification value corresponding to each data are stored as a data group 11. The verification value (12a) of data A is stored in data A (12), the verification value 13a of data B is stored in data B (13), the verification value 14a of data C is stored in data C (14), and data D15 is stored. The verification value (15a) of data D is added to each. The verification value 11a of the data group 11 is added as the verification value of the data group 11.

一般に、記憶装置等に記憶されるデータは、ユーザの管理下におかれ、ユーザが認識しうる範囲内で、当該データの処理(例えば、データの読出し及び変更等)が行われる。しかし、ユーザが意図しない不正な改竄等によって、そのデータの内容が変更され、データの正当性が損なわれてしまう場合がある。このような第三者の不正行為の事実を特定することは、一般的に極めて困難である。   In general, data stored in a storage device or the like is under the control of the user, and the data is processed (for example, reading and changing data) within a range that can be recognized by the user. However, the contents of the data may be changed due to unauthorized tampering or the like not intended by the user, and the validity of the data may be impaired. It is generally very difficult to identify the fact of such third party fraud.

そこで、検証値を付与することにより、上記第三者によるデータの不正な改竄等が行われたことを、認識することができる。検証値の一例として、CRCがある。   Therefore, by giving a verification value, it is possible to recognize that the data has been illegally altered by the third party. An example of the verification value is CRC.

CRCとは、巡回冗長検査(Cyclic Redundancy Check)の略であり、データの誤りを検出する(データの正当性を検証する)仕組みである。CRCによる誤り検出では、まず、データから検証値の一例として、CRCコードを生成する。   CRC is an abbreviation of Cyclic Redundancy Check, and is a mechanism for detecting data errors (verifying the validity of data). In error detection by CRC, first, a CRC code is generated from data as an example of a verification value.

CRCコードは、同一のデータからは必ず同一のCRCコードが生成され、例えば、1バイトでもデータが異なると全く別のCRCコードが生成されるという特徴を持つ。この特徴を利用し、データの正当性について検証するようになっている。   The CRC code is characterized in that the same CRC code is always generated from the same data. For example, if even one byte of data is different, a completely different CRC code is generated. This feature is used to verify the validity of data.

さらに具体的には、まず、データの保存時に当該データからCRCコードを生成し、当該データと共に記憶装置等に記憶する。そして、ユーザが当該データを読み出す際に、新たに当該データからCRCコードを生成し、先に生成され保存された当該データのCRCコードと、読出し時に生成されたCRCコードを夫々比較する。   More specifically, first, a CRC code is generated from the data when the data is stored, and stored in a storage device or the like together with the data. When the user reads out the data, a CRC code is newly generated from the data, and the CRC code of the data generated and stored previously is compared with the CRC code generated at the time of reading.

そして、これら2つのCRCコードを比較し、相互のCRCコードが一致する場合には、上述したCRCコードの特徴から、先に保存されたデータと読出し時に読み出されるデータは同一であることを示している。従って、当該データは、保存中にユーザが意図しない不正な改竄等によってそのデータの内容が変更されず、当該データは正当であることを確認することができる。   Then, when these two CRC codes are compared, and the mutual CRC codes match, the above-mentioned CRC code characteristics indicate that the previously stored data and the data read at the time of reading are the same. Yes. Accordingly, it is possible to confirm that the data is valid because the content of the data is not changed by an unauthorized tampering or the like not intended by the user during storage.

一方、相互のCRCコードが一致しない場合には、先に保存されたデータと読出し時に読み出されるデータは異なることを示している。従って、当該データは、保存中にユーザが意図しない不正な改竄等によってそのデータの内容が変更された可能性があり、当該データは正当でないことを確認することができる。   On the other hand, when the mutual CRC codes do not match, it indicates that the previously stored data and the data read at the time of reading are different. Therefore, it is possible that the content of the data has been changed due to unauthorized tampering or the like not intended by the user during storage, and it can be confirmed that the data is not valid.

本実施形態では、CRCコードを用いてデータの正当性について検証するようになっているが、詳しくは後述する。また、CRCコードは公知の技術であるため、より詳しい説明は省略する。   In this embodiment, the validity of data is verified using a CRC code, which will be described later in detail. Further, since the CRC code is a known technique, a more detailed description is omitted.

図3は、同一の大きさのデータが複数集合した場合のデータ構造を示す概念図である。   FIG. 3 is a conceptual diagram showing a data structure when a plurality of pieces of data having the same size are collected.

図3に示すように、EEPROM4内の記憶領域には、データ等の集合としてのデータ群21と、データ群21に属するデータとしてのデータA(22)、データB(23)、データC(24)及びデータD(25)の4つのデータが記憶されている。ここで、データA(22)乃至データD(25)の大きさ(データサイズであり、例えば、byte等で表される)は全て同一である。   As shown in FIG. 3, the storage area in the EEPROM 4 includes a data group 21 as a set of data and the like, data A (22), data B (23), and data C (24) as data belonging to the data group 21. ) And data D (25) are stored. Here, the sizes of the data A (22) to the data D (25) (the data size, for example, represented by byte or the like) are all the same.

また、図2に示すデータ構造と同様に、データ群にはデータ群の検証値21aが、各データには各データの検証値22a乃至25aが夫々付加されている。   Similarly to the data structure shown in FIG. 2, a data group verification value 21a is added to the data group, and each data verification value 22a to 25a is added to each data.

図4は、同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造を示す概念図である。   FIG. 4 is a conceptual diagram showing a data structure when a plurality of data having the same size and different sizes are collected.

図4に示すように、EEPROM4内の記憶領域には、データ等の集合としてのデータ群31と、データ群31に属するデータとしてのデータA(32)、データB(33)、データC(34)及びデータD(35)の4つのデータが記憶されている。ここで、データA(32)及びデータB(33)の大きさは同一であり、データC(34)及びデータD(35)のデータの大きさは他のデータの大きさと異なっている。   As shown in FIG. 4, the storage area in the EEPROM 4 includes a data group 31 as a set of data and the like, data A (32), data B (33), and data C (34) as data belonging to the data group 31. ) And data D (35) are stored. Here, the data A (32) and the data B (33) have the same size, and the data C (34) and the data D (35) have different data sizes from the other data.

また、図2及び図3に示すデータ構造と同様に、データ群にはデータ群の検証値31aが、各データには各データの検証値32a乃至35aが夫々付加されている。   Similarly to the data structure shown in FIGS. 2 and 3, data group verification values 31a are added to the data group, and verification values 32a to 35a of each data are added to each data.

次に、図5〜図8を用いて、ICチップSの動作を説明する。   Next, the operation of the IC chip S will be described with reference to FIGS.

本実施形態のICチップSに含まれるCPU5は、EEPROM4等に記憶された検証値11a(例えば、上述したCRCコード)を含むデータ等(例えば、データA12等)が複数集合したデータ群11に対して、データ群11についての検証値11aを生成し、記憶する。そして、データ群11の何れかのデータが読み出される際に、データ群11の正当性について検証するようになっている。   The CPU 5 included in the IC chip S of the present embodiment performs the processing for the data group 11 in which a plurality of data (for example, the data A12) including the verification value 11a (for example, the above-described CRC code) stored in the EEPROM 4 or the like is collected. Thus, a verification value 11a for the data group 11 is generated and stored. Then, when any data in the data group 11 is read, the validity of the data group 11 is verified.

以下に上記動作を、データ構造の種類に分けて詳細に説明する。   Hereinafter, the above operation will be described in detail for each type of data structure.

[1.異なる大きさのデータが複数集合した場合のデータ構造におけるICチップの動作]
先ず始めに、異なる大きさのデータが複数集合した場合のデータ構造(例えば、図2)におけるICチップの動作を説明する。
[1. Operation of IC chip in data structure when data of different sizes are collected]
First, an operation of the IC chip in a data structure (for example, FIG. 2) when a plurality of pieces of data having different sizes are collected will be described.

図5は、異なる大きさのデータが複数集合した場合のデータ構造におけるICチップの動作を示すフローチャートである。   FIG. 5 is a flowchart showing the operation of the IC chip in the data structure when a plurality of data of different sizes are collected.

まず、EEPROM4にデータ群の検証値と共に記憶されたデータを読込む場合には(例えば、図2において、データ群11のデータD(15)の読込み指示等)、CPU5は、データD(15)の値取得を開始する。   First, when reading data stored in the EEPROM 4 together with the verification value of the data group (for example, in FIG. 2, an instruction to read data D (15) of the data group 11 in FIG. 2), the CPU 5 uses the data D (15). Starts acquiring the value of.

続いて、CPU5は、データD(15)が属するデータ群の検証値11aが正しいか否かを検証する(ステップS1)。具体的には、まず、検証値生成手段としてのCPU5は、データ群11の検証値を新たに生成する。そして、検証手段としてのCPU5は、先に記憶されているデータ群の検証値11aと新たに生成したデータ群11の検証値を比較することにより、データ群の検証値が正しいか否かを検証するようになっている。   Subsequently, the CPU 5 verifies whether or not the verification value 11a of the data group to which the data D (15) belongs is correct (step S1). Specifically, first, the CPU 5 as the verification value generation unit newly generates a verification value for the data group 11. Then, the CPU 5 as the verification unit verifies whether the verification value of the data group is correct by comparing the verification value 11a of the previously stored data group with the verification value of the newly generated data group 11. It is supposed to be.

データ群の検証値11aが正しい場合には(ステップS1:YES)、CPU5は他のデータの正当性について検証することなく、データD15のデータを読込む、すなわち、データD15の値を取得するために、各データへのオフセットを算出するようになっている。   When the verification value 11a of the data group is correct (step S1: YES), the CPU 5 reads the data D15 without verifying the validity of the other data, that is, to acquire the value of the data D15. In addition, an offset to each data is calculated.

具体的には、まず、データA(12)の情報からデータB(13)へのオフセット算出を行い(ステップS2)、データB(13)の情報からデータC(14)へのオフセット算出を行い(ステップS3)、データC(14)の情報からデータD(15)へのオフセット算出を行い(ステップS4)、データD(15)の値を取得出し処理を終了する。   Specifically, first, an offset calculation from the information of the data A (12) to the data B (13) is performed (step S2), and an offset calculation from the information of the data B (13) to the data C (14) is performed. (Step S3), an offset is calculated from the information of the data C (14) to the data D (15) (Step S4), the value of the data D (15) is obtained, and the process is terminated.

一方、データ群の検証値11aが正しくない場合には(ステップS1:NO)、データ群11に属するデータ(データA(12)等)に対して、ユーザが意図しない不正な改竄等によって、そのデータの内容が変更された可能性がある。従って、CPU5は、データ群11に属する個々のデータについて、データの正当性を検証するようになっている。   On the other hand, if the verification value 11a of the data group is not correct (step S1: NO), the data belonging to the data group 11 (data A (12), etc.) may be altered by unauthorized tampering or the like not intended by the user. Data contents may have been changed. Therefore, the CPU 5 verifies the validity of the data for each piece of data belonging to the data group 11.

具体的には、まず、CPU5は、データAの検証値(12a)が正しいか否かを検証する(ステップS10)。具体的には、上述したように、CPU5は、データA(12)の検証値を新たに生成し、先に記憶されているデータAの検証値12aと新たに生成したデータAの検証値を比較する。   Specifically, first, the CPU 5 verifies whether or not the verification value (12a) of the data A is correct (step S10). Specifically, as described above, the CPU 5 newly generates a verification value of the data A (12), and uses the previously stored verification value 12a of the data A and the verification value of the newly generated data A. Compare.

そして、データAの検証値12aが正しい場合には(ステップS10:YES)、CPU5は、次に記憶されているデータB(13)のアドレスを算出するために、データA(12)の情報からデータB(13)へのオフセット算出をおこなう(ステップS11)。   If the verification value 12a of the data A is correct (step S10: YES), the CPU 5 uses the information of the data A (12) to calculate the address of the data B (13) stored next. Offset calculation to data B (13) is performed (step S11).

一方、データAの検証値12aが正しくない場合には(ステップS10:NO)、ユーザが意図しない不正な改竄等によって、そのデータの内容が変更された可能性があるため、エラー処理として、処理を終了する。   On the other hand, if the verification value 12a of the data A is not correct (step S10: NO), the content of the data may have been changed by an unauthorized tampering or the like not intended by the user. Exit.

次に、CPU5は、データBの検証値(13a)が正しいか否かを検証する(ステップS12)。検証する方法については上述したとおりである。そして、データBの検証値13bが正しい場合には(ステップS12:YES)、CPU5は、次に記憶されているデータC(14)のアドレスを算出するために、データB(13)の情報からデータC(14)のアドレスを算出するようになっている(ステップS13)。   Next, the CPU 5 verifies whether or not the verification value (13a) of the data B is correct (step S12). The method of verification is as described above. If the verification value 13b of the data B is correct (step S12: YES), the CPU 5 uses the information of the data B (13) to calculate the address of the data C (14) stored next. The address of data C (14) is calculated (step S13).

一方、データBの検証値12aが正しくない場合には(ステップS12:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value 12a of the data B is not correct (step S12: NO), the process ends as an error process.

次に、CPU5は、データCの検証値(14a)が正しいか否かを検証する(ステップS14)。検証する方法については上述したとおりである。そして、データCの検証値13aが正しい場合には(ステップS14:YES)、CPU5は、次に記憶されているデータD(14)のアドレスを算出するために、データC(14)の情報からデータD(15)のオフセットを算出する(ステップS15)。   Next, the CPU 5 verifies whether or not the verification value (14a) of the data C is correct (step S14). The method of verification is as described above. When the verification value 13a of the data C is correct (step S14: YES), the CPU 5 uses the information of the data C (14) to calculate the address of the data D (14) stored next. An offset of data D (15) is calculated (step S15).

一方、データCの検証値14aが正しくない場合には(ステップS14:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value 14a of the data C is not correct (step S14: NO), the process ends as an error process.

次に、CPU5は、データDの検証値15aが正しいか否かを検証する(ステップS16)。そして、データDの検証値15aが正しい場合には(ステップS16:YES)、データD(15)の値を取得出し処理を終了する。   Next, the CPU 5 verifies whether or not the verification value 15a of the data D is correct (step S16). When the verification value 15a of the data D is correct (step S16: YES), the value of the data D (15) is acquired and the process is terminated.

一方、データDの検証値15aが正しくない場合には(ステップS16:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value 15a of the data D is not correct (step S16: NO), the process ends as an error process.

[2.同一の大きさのデータが複数集合した場合のデータ構造におけるICチップの動作]
次に、同一の大きさのデータが複数集合した場合のデータ構造におけるICチップの動作を説明する。
[2. Operation of IC chip in data structure when a plurality of data of the same size are collected]
Next, the operation of the IC chip in the data structure when a plurality of data of the same size are collected will be described.

図6は、同一の大きさのデータが複数集合した場合のデータ構造(例えば、図3)におけるICチップの動作を示すフローチャートである。   FIG. 6 is a flowchart showing the operation of the IC chip in the data structure (for example, FIG. 3) when a plurality of pieces of data having the same size are collected.

まず、EEPROM4にデータ群の検証値と共に記憶されたデータを読込む場合には(例えば、図3において、データ群31のデータD(25)の読込み指示等)、CPU5は、データD(25)の値取得を開始する。   First, when reading data stored in the EEPROM 4 together with the verification value of the data group (for example, in FIG. 3, an instruction to read data D (25) of the data group 31), the CPU 5 uses the data D (25). Starts acquiring the value of.

具体的には、先ず、CPU5は、データD(25)へのオフセット値を算出する(ステップS21)。図3に示すように、各データ(データA(22)等)の大きさは同一であり、CPU5の指令によって、例えば、RAM3等に各データの大きさが保持(記憶)されている。   Specifically, first, the CPU 5 calculates an offset value to the data D (25) (step S21). As shown in FIG. 3, the size of each piece of data (data A (22), etc.) is the same, and the size of each piece of data is held (stored) in, for example, the RAM 3 or the like according to a command from the CPU 5.

従って、任意のデータを読込む場合には、任意のデータの順番(データ番号)が指示されることにより、各データの大きさは既知であるため、任意のデータまでのオフセットを直接的に求めることができる。   Therefore, when reading arbitrary data, the order of the arbitrary data (data number) is instructed, and the size of each data is known, so the offset to the arbitrary data is obtained directly. be able to.

換言すれば、システムが各データの大きさ(固定長)を保持しているため、読み出す対象のデータに達するまでに存在するデータの数に、各データの大きさを乗ずることにより、取得対象までのオフセットが求まることとなる。従って、読み出す対象のデータまでに存在するデータの情報からオフセットの算出をする必要がない。   In other words, since the system holds the size (fixed length) of each data, the number of data existing before reaching the data to be read is multiplied by the size of each data to obtain the acquisition target. Will be obtained. Therefore, it is not necessary to calculate an offset from data information existing up to the data to be read.

図6の説明に戻り、次に、CPU5は、データD(25)が属するデータ群の検証値21aが正しいか否かを検証する(ステップS21)。具体的には、上述したように、検証値生成手段としてのCPU5は、データ群21の検証値を新たに生成する。そして、検証手段としてのCPU5は、先に記憶されているデータ群の検証値21aと新たに生成したデータ群21の検証値とを比較することにより、データ群の検証値が正しいか否か検証するようになっている。   Returning to the explanation of FIG. 6, the CPU 5 verifies whether or not the verification value 21a of the data group to which the data D (25) belongs is correct (step S21). Specifically, as described above, the CPU 5 as the verification value generation unit newly generates a verification value for the data group 21. Then, the CPU 5 as the verification unit verifies whether the verification value of the data group is correct by comparing the verification value 21a of the previously stored data group with the verification value of the newly generated data group 21. It is supposed to be.

この場合、上述したようにCPU5は、読み出す対象のデータまでのデータの情報からオフセットの算出をする必要が無いため、前記読み出す対象となるデータの正当性のみについて検証を行えばよい。   In this case, as described above, since the CPU 5 does not need to calculate the offset from the data information up to the data to be read, it is sufficient to verify only the validity of the data to be read.

そして、データ群の検証値21aが正しい場合には(ステップS22:YES)、CPU5は、データD(15)の値を取得出し処理を終了する。   If the verification value 21a of the data group is correct (step S22: YES), the CPU 5 obtains the value of the data D (15) and ends the process.

一方、データ群の検証値21aが正しくない場合には(ステップS22:NO)、データDの検証値(25a)が正しいか否かを検証する(ステップ31)。   On the other hand, if the verification value 21a of the data group is not correct (step S22: NO), it is verified whether the verification value (25a) of the data D is correct (step 31).

この場合、データ群21に属する各データ(データA(22)等)に対して、ユーザが意図しない不正な改竄等によって、そのデータの内容が変更された可能性がある。また、システムは各データの大きさを保持しているため、読込む対象であるデータD(25)までのオフセットを直接的に求めることができる。従って、CPU5は、データDの正当性を検証するようになっている。   In this case, there is a possibility that the contents of the data (data A (22), etc.) belonging to the data group 21 have been changed due to unauthorized tampering or the like not intended by the user. Further, since the system holds the size of each data, the offset to the data D (25) to be read can be directly obtained. Therefore, the CPU 5 verifies the validity of the data D.

そして、データDの検証値(25a)が正しい場合には(ステップS31:YES)、データD(25)の値を取得出し処理を終了する。   If the verification value (25a) of the data D is correct (step S31: YES), the value of the data D (25) is acquired and the process is terminated.

一方、データDの検証値(25a)が正しくない場合には(ステップS31:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value (25a) of the data D is not correct (step S31: NO), the process ends as an error process.

[3.同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造におけるICチップの動作]
次に、図7及び図8を用いて、同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造(例えば、図4)におけるICチップの動作を説明する。
[3. IC chip operation in data structure when multiple data of the same size and different size are collected]
Next, the operation of the IC chip in a data structure (for example, FIG. 4) when a plurality of pieces of data having the same size and different sizes are collected will be described with reference to FIGS.

図4に示すように、同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造では、同一の大きさのデータの集合部分(データA(32)及びデータB(33))と、異なる大きさのデータの集合部分(データC(34)及びデータD(35))とに分類されている。   As shown in FIG. 4, in a data structure in which a plurality of pieces of data having the same size and different sizes are collected, a set portion of data of the same size (data A (32) and data B (33) ) And sets of data having different sizes (data C (34) and data D (35)).

従って、ICチップの動作は、同一の大きさのデータの集合部分に対する動作と、異なる大きさのデータの集合部分に対する動作とでは異なる動作を示す。   Therefore, the operation of the IC chip shows different operation between the operation for the data collection portion having the same size and the operation for the data collection portion having a different size.

まず、同一の大きさのデータの集合部分に対する動作について説明する。   First, an operation for a set portion of data having the same size will be described.

図7は、同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造において、同一のデータが集合する部分のICチップの動作を示すフローチャートである。   FIG. 7 is a flowchart showing the operation of the IC chip of the portion where the same data is collected in the data structure when a plurality of data of the same size and different sizes are collected.

まず、EEPROM4にデータ群の検証値と共に記憶されたデータを読込む場合には(例えば、図5において、データ群31のデータB(33)の読込み指示等)、CPU5は、データB(33)の値取得を開始する。   First, when reading data stored in the EEPROM 4 together with the verification value of the data group (for example, in FIG. 5, an instruction to read data B (33) of the data group 31 in FIG. 5), the CPU 5 uses the data B (33). Starts acquiring the value of.

具体的には、先ず、CPU5は、データB(33)へのオフセット値を算出する(ステップS41)。図4に示すように、この場合にはデータA(32)及びデータB(33)の大きさは同一であり、CPU5の動作により、上記図6の場合同様、データB(33)に達するまでに存在するデータの数に、各データの大きさを乗ずることにより、取得対象までのオフセットが求まることとなる。従って、CPU5は、直接的にデータB(33)へのオフセット値を算出することができる。   Specifically, first, the CPU 5 calculates an offset value to the data B (33) (step S41). As shown in FIG. 4, in this case, the sizes of the data A (32) and the data B (33) are the same, and until the data B (33) is reached by the operation of the CPU 5, as in FIG. By multiplying the number of pieces of data present by the size of each piece of data, an offset to the acquisition target can be obtained. Therefore, the CPU 5 can directly calculate the offset value to the data B (33).

図7の説明に戻り、次に、CPU5は、データB(33)が属するデータ群の検証値31aが正しいか否かを検証する(ステップS41)。検証方法については上述した方法と同様であり、具体的には、CPU5は、データ群31の検証値を新たに生成し、CPU5はさらに、先に記憶されているデータ群の検証値31aと新たに生成したデータ群31の検証値とを比較することにより、データ群の検証値が正しいか否か検証する。   Returning to the description of FIG. 7, the CPU 5 verifies whether or not the verification value 31a of the data group to which the data B (33) belongs is correct (step S41). The verification method is the same as the method described above. Specifically, the CPU 5 newly generates a verification value for the data group 31, and the CPU 5 further adds a verification value 31a for the previously stored data group and a new verification value 31a. It is verified whether the verification value of the data group is correct by comparing with the verification value of the data group 31 generated in (1).

そして、データ群の検証値31aが正しい場合には(ステップS42:YES)、CPU5は、データB(33)の値を取得出し処理を終了する。   If the verification value 31a of the data group is correct (step S42: YES), the CPU 5 obtains the value of the data B (33) and ends the process.

一方、データ群の検証値21aが正しくない場合には(ステップS42:NO)、データBの検証値(33a)が正しいか否かを検証する(ステップ51)。   On the other hand, if the verification value 21a of the data group is not correct (step S42: NO), it is verified whether the verification value (33a) of the data B is correct (step 51).

そして、データBの検証値(33a)が正しい場合には(ステップS51:YES)、データB(33)の値を取得出し処理を終了する。   If the verification value (33a) of data B is correct (step S51: YES), the value of data B (33) is acquired and the process is terminated.

一方、データBの検証値(33a)が正しくない場合には(ステップS51:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value (33a) of data B is not correct (step S51: NO), the process ends as an error process.

異なる大きさのデータの集合部分に対する動作について説明する。   An operation for a set portion of data having different sizes will be described.

図8は、同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造において、異なる大きさのデータが集合する部分のICチップの動作を示すフローチャートである。   FIG. 8 is a flowchart showing the operation of the IC chip in a portion where data of different sizes are collected in a data structure when a plurality of data of the same size and different sizes are collected.

まず、EEPROM4にデータ群の検証値と共に記憶されたデータを読込む場合には(例えば、図5において、データ群31のデータD(35)の読込み指示等)、CPU5は、データD(35)の値取得を開始する。   First, when reading data stored in the EEPROM 4 together with the verification value of the data group (for example, in FIG. 5, an instruction to read the data D (35) of the data group 31), the CPU 5 uses the data D (35). Starts acquiring the value of.

続いて、CPU5は、データC(34)へのオフセット値を算出する。上述した通り、データA(32)及びデータB(33)の大きさは同一であり、CPU5の動作により、上記図6の場合同様、データC(34)に達するまでに存在するデータの数に、各データの大きさを乗ずることにより、取得対象までのオフセットが求まることとなる。   Subsequently, the CPU 5 calculates an offset value to the data C (34). As described above, the sizes of the data A (32) and the data B (33) are the same, and the number of data existing until the data C (34) is reached by the operation of the CPU 5 as in the case of FIG. By multiplying the size of each data, the offset to the acquisition target is obtained.

従って、CPU5は、直接的にデータC(34)へのオフセット値を算出することができる。   Therefore, the CPU 5 can directly calculate the offset value to the data C (34).

次に、CPU5は、データD(35)が属するデータ群の検証値31aが正しいか否かを検証する(ステップS61)。検証方法については上述した方法と同様である。   Next, the CPU 5 verifies whether or not the verification value 31a of the data group to which the data D (35) belongs is correct (step S61). The verification method is the same as the method described above.

そして、データ群の検証値31aが正しい場合には(ステップS62:YES)、CPU5は他のデータの正当性について検証することなく、データD35のデータを読込む、すなわち、データD35aの値を取得するために、各データへのオフセットを算出するようになっている。   If the verification value 31a of the data group is correct (step S62: YES), the CPU 5 reads the data D35 without verifying the validity of other data, that is, acquires the value of the data D35a. In order to do this, an offset to each data is calculated.

具体的には、まず、データC(34)の情報からデータD(35)へのオフセット算出(ステップS63)を行うことにより、データD(35)の値を取得出し処理を終了する。   Specifically, first, an offset calculation (step S63) from the information of the data C (34) to the data D (35) is performed, thereby obtaining the value of the data D (35) and ending the process.

一方、データ群の検証値11aが正しくない場合には(ステップS62:NO)、CPU5は、データCの検証値34aが正しいか否かを検証する(ステップS71)。   On the other hand, when the verification value 11a of the data group is not correct (step S62: NO), the CPU 5 verifies whether the verification value 34a of the data C is correct (step S71).

具体的には、上述したように、CPU5は、データC(34)の検証値を新たに生成し、先に記憶されているデータCの検証値34aと新たに生成したデータCの検証値を比較する。   Specifically, as described above, the CPU 5 newly generates a verification value of the data C (34), and uses the previously stored verification value 34a of the data C and the verification value of the newly generated data C. Compare.

データCの検証値34aが正しくない場合には(ステップS71:NO)、ユーザが意図しない不正な改竄等によって、そのデータの内容が変更された可能性があるため、エラー処理として、処理を終了する。   If the verification value 34a of the data C is not correct (step S71: NO), the content of the data may have been changed due to unauthorized tampering or the like not intended by the user. To do.

一方、データCの検証値34aが正しい場合には(ステップS71:YES)、CPU5は、次に記憶されているデータD(35)のアドレスを算出するために、データC(34)の情報からデータD(35)へのオフセット算出を行う(ステップS72)。   On the other hand, when the verification value 34a of the data C is correct (step S71: YES), the CPU 5 uses the information of the data C (34) to calculate the address of the data D (35) stored next. Offset calculation to the data D (35) is performed (step S72).

次いで、データDの検証値35aが正しいか否かを検証する(ステップS73)。そして、データDの検証値35aが正しい場合には(ステップS73:YES)、データD(35)の値を取得し処理を終了する。 Next, it is verified whether or not the verification value 35a of the data D is correct (step S73). When the verification value 35a of the data D is correct (step S73: YES), ends the Tokushi process taken the value of the data D (35).

一方、データDの検証値35aが正しくない場合には(ステップS73:NO)、エラー処理として、処理を終了する。   On the other hand, when the verification value 35a of the data D is not correct (step S73: NO), the process ends as an error process.

以上説明したように、本実施形態においては、CPU5は、EEPROM4等に記憶された検証値11aを含むデータ等が複数集合したデータ群11に対して、データ群11についての検証値11aを生成し、記憶する。そして、データ群11の何れかのデータが読み出される際に、データ群11の正当性について検証するようになっている。   As described above, in the present embodiment, the CPU 5 generates a verification value 11a for the data group 11 for the data group 11 in which a plurality of data including the verification value 11a stored in the EEPROM 4 or the like is collected. ,Remember. Then, when any data in the data group 11 is read, the validity of the data group 11 is verified.

従って、読み出す対象となるデータの正当性を確認する前に、データ群全体に対する正当性の確認をすることができるため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   Therefore, since the validity of the entire data group can be confirmed before confirming the validity of the data to be read, the validity of the data stored in the storage area can be confirmed efficiently and quickly. be able to.

また、CPU5は、前記データ群の正当性が無いと判断された場合には、読み出す対象となる前記データまでに配列される各データの正当性について検証を行うようになっている。   Further, when it is determined that the data group is not valid, the CPU 5 verifies the validity of each data arranged up to the data to be read.

従って、必要に応じて読み出す対象となるデータの正当性を確認するため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   Therefore, since the validity of the data to be read is confirmed as necessary, the validity of the data stored in the storage area can be confirmed efficiently and quickly.

また、CPU5は、前記データ群の正当性があると判断された場合には、読み出す対象となる前記データまでに配列される各データの正当性について検証せずに前記データを読み出すようになっている。   Further, when it is determined that the data group is valid, the CPU 5 reads the data without verifying the validity of each data arranged up to the data to be read. Yes.

従って、必要に応じて読み出す対象となるデータの正当性を確認するため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   Therefore, since the validity of the data to be read is confirmed as necessary, the validity of the data stored in the storage area can be confirmed efficiently and quickly.

また、データ12等が全て同一の大きさであった場合には、CPU5は、データ群11等の正当性がないと判断された場合であっても、CPU5は、読み出す対象となるデータの正当性のみについて検証を行うようになっている。   If the data 12 and the like are all the same size, the CPU 5 determines that the data to be read is valid even if the CPU 5 determines that the data group 11 and the like are not valid. Only sex is verified.

従って、読み出す対象となるデータの正当性のみについて検証を行うため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   Therefore, since only the validity of the data to be read is verified, the validity of the data stored in the storage area can be confirmed efficiently and quickly.

また、データ群11等に同一の大きさのデータ12等が少なくとも2以上含まれている場合には、CPU5は、読み出す対象となるデータまでに前記同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証しないようになっている。   In addition, when the data group 11 or the like includes at least two or more data 12 or the like having the same size, the CPU 5 determines that the data having the same size is arranged by the data to be read. Does not verify the validity of the data of the same size.

従って、必要最小限のデータのみについて正当性の検証を行うため、効率よく、かつ迅速に記憶領域に記憶されたデータの正当性を確認することができる。   Therefore, the validity of only the minimum necessary data is verified, so that the validity of the data stored in the storage area can be confirmed efficiently and quickly.

なお、上記実施形態においては、本願をICチップに対して適用した場合の例を示したが、その他にも例えば、パーソナルコンピュータ又は家庭用等の電子機器等に対しても適用可能である。   In the above embodiment, an example in which the present application is applied to an IC chip has been described. However, the present invention can be applied to, for example, a personal computer or an electronic device for home use.

ICチップSの全体構成例を示すブロック図である。1 is a block diagram illustrating an example of the overall configuration of an IC chip S. FIG. 異なる大きさ(データサイズ)のデータが複数集合した場合のデータ構造を示す概念図である。It is a conceptual diagram which shows the data structure when the data of a different magnitude | size (data size) gathered. 同一の大きさのデータが複数集合した場合のデータ構造を示す概念図である。It is a conceptual diagram which shows the data structure when the data of the same magnitude | size gathered two or more. 同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造を示す概念図である。It is a conceptual diagram which shows the data structure when the data of the same magnitude | size and the data of a different magnitude | size are aggregated. 異なる大きさのデータが複数集合した場合のデータ構造におけるICチップの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the IC chip in a data structure in case the data of a different magnitude | size are gathered together. 同一の大きさのデータが複数集合した場合のデータ構造(例えば、図3)におけるICチップの動作を示すフローチャートである。4 is a flowchart showing an operation of an IC chip in a data structure (for example, FIG. 3) when a plurality of pieces of data having the same size are collected. 同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造において、同一のデータが集合する部分のICチップの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the IC chip of the part which the same data collects in the data structure when the data of the same size and different data are gathered. 同一の大きさのデータと異なる大きさのデータが複数集合した場合のデータ構造において、異なる大きさのデータが集合する部分のICチップの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the IC chip of the part which data of a different magnitude | size gathers in the data structure when the data of the same magnitude | size and different magnitude | size are gathered.

符号の説明Explanation of symbols

1 I/Oインターフェース
2 ROM
3 RAM
4 EEPROM
5 CPU
S ICチップ
1 I / O interface 2 ROM
3 RAM
4 EEPROM
5 CPU
S IC chip

Claims (5)

検証値を含むデータが複数集合したデータ群が記憶される記憶部を有するICチップにおいて、
前記データ群についての検証値を生成する検証値生成手段と、
前記生成された検証値を記憶する記憶手段と、
前記データ群の正当性について検証する検証手段とを備え、
前記データ群のうち何れかの前記データが読み出される際に、
前記検証値生成手段は前記データ群についての検証値を新たに生成し、
前記検証手段は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、前記読み出す対象となるデータの正当性について検証を行うことを特徴とするICチップ。
In an IC chip having a storage unit in which a data group in which a plurality of data including verification values are collected is stored,
Verification value generation means for generating a verification value for the data group;
Storage means for storing the generated verification value;
Verification means for verifying the validity of the data group,
When any one of the data groups is read,
The verification value generation means newly generates a verification value for the data group,
The verification unit verifies the validity of the data group by comparing the stored verification value with the newly generated verification value , and reads out the data group when it is determined that the data group is not valid When data of the same size is arranged up to the target data, the verification of the correctness of the data to be read out is performed without verifying the correctness of the data of the same size. Characteristic IC chip.
請求項1に記載のICチップにおいて、
前記データ群の正当性があると判断された場合には、
読み出す対象となる前記データまでに配列される各データの正当性について検証せずに前記データを読み出すことを特徴とするICチップ。
The IC chip according to claim 1,
If it is determined that there is validity of the data group,
An IC chip , wherein the data is read without verifying validity of each data arranged up to the data to be read .
検証値を含むデータが複数集合するデータ群が記憶される記憶部を有するICチップにおけるデータ読出し方法において、
前記データ群についての検証値を生成する検証値生成工程と、
前記生成された検証値を記憶する記憶工程と、
前記データ群の正当性について検証する検証工程とを有し、
前記データ群のうち何れかの前記データが読み出される際に、
前記検証値生成工程は前記データ群についての検証値を新たに生成し、
前記検証工程は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、前記読み出す対象となるデータの正当性について検証を行うことを特徴とするICチップにおけるデータ読出し方法
In a data reading method in an IC chip having a storage unit in which a data group in which a plurality of data including verification values are collected is stored,
A verification value generation step of generating a verification value for the data group;
A storage step for storing the generated verification value;
A verification step for verifying the validity of the data group,
When any one of the data groups is read,
The verification value generation step newly generates a verification value for the data group,
The verification step verifies the validity of the data group by comparing the stored verification value and the newly generated verification value, and reads if it is determined that the data group is not valid When data of the same size is arranged up to the target data, the verification of the correctness of the data to be read out is performed without verifying the correctness of the data of the same size. A method for reading data in an IC chip .
検証値を含むデータが複数集合するデータ群が記憶される記憶部を有するICチップ含まれるコンピュータを、
前記データ群についての検証値を生成する検証値生成手段、
前記生成された検証値を記憶する記憶手段、
前記データ群の正当性について検証する検証手段とを備え、
前記コンピュータによって、前記データ群のうち何れかの前記データが読み出される際に、
前記検証値生成手段は前記データ群についての検証値を新たに生成し、
前記検証手段は、前記記憶された検証値と前記新たに生成された検証値を比較することにより、前記データ群の正当性について検証し、前記データ群の正当性がないと判断した場合、読み出す対象となるデータまでに同一の大きさのデータが配列される場合には、前記同一の大きさのデータの正当性について検証せず、前記読み出す対象となるデータの正当性について検証を行うことを特徴とするデータ読出しプログラム
A computer including an IC chip having a storage unit in which a data group in which a plurality of data including verification values are collected is stored,
Verification value generating means for generating a verification value for the data group;
Storage means for storing the generated verification value;
Verification means for verifying the validity of the data group,
When any one of the data groups is read by the computer,
The verification value generation means newly generates a verification value for the data group,
The verification unit verifies the validity of the data group by comparing the stored verification value with the newly generated verification value, and reads out the data group when it is determined that the data group is not valid When data of the same size is arranged up to the target data, the verification of the correctness of the data to be read out is performed without verifying the correctness of the data of the same size. Characteristic data reading program .
請求項4に記載のデータ読出しプログラムがコンピュータ読み取り可能に記録されていることを特徴とする記録媒体 5. A recording medium in which the data reading program according to claim 4 is recorded so as to be readable by a computer .
JP2008222495A 2008-08-29 2008-08-29 IC chip, data reading method, data reading program, recording medium, etc. Active JP5233521B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008222495A JP5233521B2 (en) 2008-08-29 2008-08-29 IC chip, data reading method, data reading program, recording medium, etc.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008222495A JP5233521B2 (en) 2008-08-29 2008-08-29 IC chip, data reading method, data reading program, recording medium, etc.

Publications (2)

Publication Number Publication Date
JP2010055549A JP2010055549A (en) 2010-03-11
JP5233521B2 true JP5233521B2 (en) 2013-07-10

Family

ID=42071357

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008222495A Active JP5233521B2 (en) 2008-08-29 2008-08-29 IC chip, data reading method, data reading program, recording medium, etc.

Country Status (1)

Country Link
JP (1) JP5233521B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6074987B2 (en) * 2012-09-28 2017-02-08 ブラザー工業株式会社 Image forming apparatus having refill detection function and refill detection method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4227096A1 (en) * 1992-08-17 1994-02-24 Philips Patentverwaltung X-ray image detector
JPH06180716A (en) * 1992-12-14 1994-06-28 Nec Corp Time sequential data managing device
JP4091139B2 (en) * 1997-04-10 2008-05-28 富士通株式会社 Data storage device and data storage method
JP4366845B2 (en) * 2000-07-24 2009-11-18 ソニー株式会社 Data processing apparatus, data processing method, and program providing medium
JP2005149416A (en) * 2003-11-19 2005-06-09 Fuji Xerox Co Ltd Image forming apparatus and its replacement part
JP2006072655A (en) * 2004-09-01 2006-03-16 Matsushita Electric Ind Co Ltd Ic card, data output method and data storage method
JP4767057B2 (en) * 2006-03-27 2011-09-07 富士通株式会社 Hash value generation program, storage management program, determination program, and data change verification device
JP2008146343A (en) * 2006-12-08 2008-06-26 Dainippon Printing Co Ltd Ic card, and method for calling update program

Also Published As

Publication number Publication date
JP2010055549A (en) 2010-03-11

Similar Documents

Publication Publication Date Title
US7302572B2 (en) Portable information storage medium and its authentication method
US10878404B2 (en) Method for operating an e-purse
EP3553722A1 (en) Systems and methods for point-to-point encryption compliance
JP2557838B2 (en) IC card
US20060219796A1 (en) Integrated circuit chip card capable of determining external attack
JPH0440587A (en) Portable electronic equipment
KR20140140552A (en) External log storage in an asset storage and transfer system
JP5233521B2 (en) IC chip, data reading method, data reading program, recording medium, etc.
EP1220148B1 (en) Ic card, ic card issuing device, ic card issuing system, and ic card issuing method
JP5259507B2 (en) Portable electronic device and data processing method in portable electronic device
US11151338B2 (en) Securing a transaction by means of a smart card and smart card
JPH10198776A (en) Portable information recording medium, and its information writing and reading method
US20090024887A1 (en) Semiconductor storage device, data write method and data read method
JP2011060136A (en) Portable electronic apparatus, and data management method in the same
JP4836707B2 (en) Portable electronic device and IC card
US7806319B2 (en) System and method for protection of data contained in an integrated circuit
JP3130588B2 (en) Storage media
JP5786702B2 (en) Security token, instruction execution method in security token, and computer program
CN106484477A (en) The software download of safety and startup method
ES2895493T3 (en) Backup of historical data on a device intended to process transactions
JP2007011591A (en) Portable electronic device and ic card
JP5293113B2 (en) SEMICONDUCTOR DEVICE, SEMICONDUCTOR DEVICE CONTROL METHOD, AND SEMICONDUCTOR DEVICE CONTROL PROGRAM
JP2008083880A (en) Ic card for securities trading, and online securities trading system
JP2013222348A (en) Ic card and computer program
JP5822123B2 (en) Security token, data update method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110614

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120705

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120710

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120907

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130311

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5233521

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160405

Year of fee payment: 3