JP2013062691A - Information processing device and computer program - Google Patents

Information processing device and computer program Download PDF

Info

Publication number
JP2013062691A
JP2013062691A JP2011199998A JP2011199998A JP2013062691A JP 2013062691 A JP2013062691 A JP 2013062691A JP 2011199998 A JP2011199998 A JP 2011199998A JP 2011199998 A JP2011199998 A JP 2011199998A JP 2013062691 A JP2013062691 A JP 2013062691A
Authority
JP
Japan
Prior art keywords
data
error detection
detection code
calculation
calculated
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.)
Pending
Application number
JP2011199998A
Other languages
Japanese (ja)
Inventor
Takashi Kudo
隆史 工藤
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 JP2011199998A priority Critical patent/JP2013062691A/en
Publication of JP2013062691A publication Critical patent/JP2013062691A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an information processing device capable of automatically selecting an arithmetic algorithm to calculate an error detection code to verify integrity of data, depending on a data length of the data as a target of integrity verification.SOLUTION: An information processing device 1 comprises: data holding means 13 for holding data 130 having an error detection code added thereto; error detection code calculating means 12 having a plurality of calculating sections 120 corresponding to arithmetic algorithms of different error detection codes, respectively, and a reference table 121 for associating ranges of data lengths with the calculating sections 120, for, when data to be calculated is specified, referring the reference table 121 to select the calculating section 120 corresponding to the data length of the data to be calculated to calculate an error detection code; and data matching verifying means 10 for using the error detection code calculated by the error detection code calculating means 12 to verify integrity of the data 130 held in the data holding means 13.

Description

本発明は、データの誤り検出符号を演算しデータの完全性を検証するための技術に関する。   The present invention relates to a technique for calculating data error detection codes and verifying data integrity.

ICカードやパーソナルコンピュータなどの情報処理装置が、情報処理装置のメモリに記憶されているデータまたは外部から受信したデータの完全性を検証する際、特許文献1に記載のように、所定の演算アルゴリムにより演算した誤り検出符号を用いることが一般的である。   When an information processing device such as an IC card or a personal computer verifies the integrity of data stored in the memory of the information processing device or data received from the outside, as described in Patent Document 1, a predetermined arithmetic algorithm is used. It is common to use an error detection code calculated by the above.

情報処理装置が外部から受信したデータの完全性を検証する場合、特許文献1に記載のように、情報処理装置が演算した誤り検出符号を検証する装置は、情報処理装置自体でもよく、また、外部の装置であってもよいが、情報処理装置が、情報処理装置のメモリに記憶されているデータの完全性を検証する場合、誤り検出符号を検証する装置は情報処理装置自体になり、情報処理装置は、情報処理装置のメモリに記憶されているデータの完全性を検証するために、所定の演算アルゴリムにより演算した誤り検出符号を付加した形態でデータをメモリに記憶しておき、データの完全性を検証する際、所定の演算アルゴリムにより演算したデータの誤り検出符号と、メモリに記憶されているデータの誤り検出符号を照合する。   When the information processing apparatus verifies the integrity of data received from the outside, as described in Patent Document 1, the apparatus for verifying the error detection code calculated by the information processing apparatus may be the information processing apparatus itself, Although an external device may be used, when the information processing device verifies the integrity of the data stored in the memory of the information processing device, the device that verifies the error detection code is the information processing device itself, and the information In order to verify the integrity of the data stored in the memory of the information processing device, the processing device stores the data in the memory in a form to which an error detection code calculated by a predetermined calculation algorithm is added. When the integrity is verified, the error detection code of the data calculated by a predetermined calculation algorithm is collated with the error detection code of the data stored in the memory.

誤り検出符号の演算に用いられる演算アルゴリズムとしては、データに対して論理演算のNOTを施した値を誤り検出符号とする演算アルゴリズムや、チェックサム、CRC、SHA1、DESなどの演算アルゴリズムが複数存在し、情報処理装置が、外部から受信したデータの完全性を検証する場合、誤り検出符号の演算に利用する演算アルゴリズムについて、データを送信する側の装置と予め取り決めがなされていることが一般的である。   There are multiple calculation algorithms used for calculation of error detection codes, such as a calculation algorithm using a value obtained by performing NOT of logical operation on data as an error detection code, and a checksum, CRC, SHA1, DES, etc. However, when the information processing apparatus verifies the integrity of data received from the outside, it is common for the calculation algorithm used for calculation of the error detection code to be determined in advance with the apparatus on the data transmission side. It is.

これに対し、情報処理装置が、情報処理装置のメモリに記憶されているデータの完全性を検証する場合、メモリに記憶するデータに付加する誤り検出符号の演算に用いる演算アルゴリムは、情報処理装置側で任意に決定することができる。   On the other hand, when the information processing apparatus verifies the integrity of the data stored in the memory of the information processing apparatus, the arithmetic algorithm used for the calculation of the error detection code added to the data stored in the memory is the information processing apparatus. Can be arbitrarily determined on the side.

情報処理装置のメモリに記憶されているデータの完全性の検証に誤り検出符号を用いる際の課題としては、誤り検出符号の演算時間の短縮がある。   A problem in using an error detection code for verifying the integrity of data stored in the memory of the information processing apparatus is a reduction in the calculation time of the error detection code.

図5は、データ長と誤り検出符号の演算時間の関係を説明する図である。当然のことながら、図5に図示しているように、同一の演算アルゴリズムならばデータ長が長くなるに従い演算時間も長くなるが、演算アルゴリズム同士を比較した場合、演算時間が短くなる演算アルゴリズムはデータ長に依存する。   FIG. 5 is a diagram for explaining the relationship between the data length and the calculation time of the error detection code. Naturally, as shown in FIG. 5, if the same calculation algorithm is used, the calculation time becomes longer as the data length becomes longer. Depends on data length.

例えば、演算対象となるデータのデータ長が長さLよりも短ければ、演算アルゴリズムBを用いるときよりも演算アルゴリズムAを用いる方が誤り検出符号の演算時間は短いが、データ長が長さLよりも長ければ、演算アルゴリズムBを用いるときよりも演算アルゴリズムAを用いる方が誤り検出符号の演算時間は長くなってしまう。   For example, if the data length of the data to be calculated is shorter than the length L, the calculation time of the error detection code is shorter when the calculation algorithm A is used than when the calculation algorithm B is used, but the data length is L If it is longer, the calculation time of the error detection code is longer when the calculation algorithm A is used than when the calculation algorithm B is used.

特に、Java(登録商標)などのバーチャルマシン(VM)を搭載したプラットフォーム型オペレーティングシステムにおいて、プラットフォーム型オペレーティングシステム上のアプリケーションが誤り検出符号を演算する場合、誤り検出符号の演算対象となるデータへのアクセスや中間コードの解釈・実行が、演算対象となるデータのデータ長に応じて繰り返し実行されるため、上述した性質は顕著に現れる。   In particular, in a platform type operating system equipped with a virtual machine (VM) such as Java (registered trademark), when an application on the platform type operating system calculates an error detection code, the data to be calculated by the error detection code Since the access and the interpretation / execution of the intermediate code are repeatedly executed according to the data length of the data to be calculated, the above-described property appears remarkably.

特開2006―350738号公報JP 2006-350738 A

情報処理装置のメモリに記憶されているデータの完全性の検証に係る時間を短縮することを考えた場合、情報処理装置のメモリに記憶されているデータが固定長ならば、例えば、図5のようなグラフを参照して、誤り検出符号の演算に用いる演算アルゴリズムを一意に決定することができるが、データが可変長の場合は、図5に図示したように、誤り検出符号の演算時間の短い演算アルゴリムはデータ長に応じて変更になるため、データ長に応じて誤り検出符号の演算に用いる演算アルゴリズムを決定できることが望ましい。   When considering reducing the time required for verifying the integrity of data stored in the memory of the information processing apparatus, if the data stored in the memory of the information processing apparatus is of a fixed length, for example, FIG. With reference to such a graph, it is possible to uniquely determine the calculation algorithm used for the calculation of the error detection code. However, when the data has a variable length, as shown in FIG. Since the short calculation algorithm is changed according to the data length, it is desirable that the calculation algorithm used for calculating the error detection code can be determined according to the data length.

そこで、本発明は、完全性検証の対象となるデータのデータ長に応じ、演算アルゴリズムを自動的に選択して誤り検出符号を演算しデータの完全性を検証できる情報処理装置及びコンピュータプログラムを提供することを目的とする。   Accordingly, the present invention provides an information processing apparatus and a computer program that can automatically select an arithmetic algorithm according to the data length of data to be verified for integrity, calculate an error detection code, and verify data integrity. The purpose is to do.

上述した課題を解決する第1の発明は、誤り検出符号が付加されたデータを保持するデータ保持手段と、演算対象となるデータのデータ長に応じて演算アルゴリズムを変更できるように、それぞれ異なる誤り検出符号の演算アルゴリズムに対応した複数の演算部と、データ長の範囲と前記演算部を対応付けた参照テーブルを有し、演算対象となるデータが指定されると、前記参照テーブルを参照し、演算対象となるデータのデータ長に対応した前記演算部を選択して誤り検出符号を演算する誤り検出符号演算手段と、前記データ保持手段に保持されているデータの完全性を検証する指示を受けると、指示されたデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、指示されたデータに付加されている誤り検出符号と前記誤り検出符号演算手段が演算した誤り検出符号を照合するデータ整合性検証手段を備えたことを特徴とする情報処理装置である。   The first invention for solving the above-described problem is that the data holding means for holding the data to which the error detection code is added, and different errors so that the calculation algorithm can be changed according to the data length of the data to be calculated. A plurality of calculation units corresponding to the calculation algorithm of the detection code, a reference table that associates the data length range and the calculation unit, and when the data to be calculated is specified, the reference table is referred to, An error detection code calculation means for selecting the calculation section corresponding to the data length of the data to be calculated and calculating an error detection code, and an instruction for verifying the integrity of the data held in the data holding means The error detection code of the indicated data is calculated by the error detection code calculation means, and the error detection code added to the indicated data and the error detection code Calculating means is an information processing apparatus characterized by comprising a data integrity verification means for checking the error detection code computed is.

更に、第2の発明は、前記データ保持手段に保持されているデータに付加された誤り検出符号の更新が指示されると、指示されたデータを更新した後、更新後のデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、更新後のデータに付加されている誤り検出符号を前記誤り検出符号演算手段が演算した誤り検出符号に更新する誤り検出符号更新手段を備えたことを特徴とする、第1の発明に記載した情報処理装置である。   Further, in the second invention, when an update of the error detection code added to the data held in the data holding means is instructed, the error detection code of the updated data is updated after the indicated data is updated. Error detection code update means for updating the error detection code added to the updated data to the error detection code calculated by the error detection code calculation means. This is the information processing apparatus described in the first invention.

更に、第3の発明は、それぞれ異なる誤り検出符号の演算アルゴリズムに対応した複数の演算部と、データ長の範囲と前記演算部を対応付けた参照テーブルを有し、演算対象となるデータが指定されると、前記参照テーブルを参照し、演算対象となるデータのデータ長に対応した前記演算部を選択して誤り検出符号を演算する誤り検出符号演算手段と、前記データ保持手段に保持されているデータの完全性を検証する指示を受けると、指示されたデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、指示されたデータに付加されている誤り検出符号と前記誤り検出符号演算手段が演算した誤り検出符号を照合するデータ整合性検証手段としてコンピュータを機能させるためのコンピュータプログラムである。   Furthermore, the third invention has a plurality of calculation units corresponding to different calculation algorithms for error detection codes, a reference table in which the range of data length is associated with the calculation unit, and data to be calculated is designated. Then, referring to the reference table, the error detection code calculation means for calculating the error detection code by selecting the calculation unit corresponding to the data length of the data to be calculated, and held in the data holding means When the instruction for verifying the integrity of the received data is received, the error detection code calculating means calculates the error detection code of the specified data, and the error detection code added to the specified data and the error detection code calculation A computer program for causing a computer to function as data integrity verification means for collating error detection codes calculated by the means.

このように、本発明によれば、完全性検証の対象となるデータのデータ長に応じ、演算アルゴリズムを自動的に選択して誤り検出符号を演算しデータの完全性を検証できる情報処理装置及びコンピュータプログラムを提供できる。   Thus, according to the present invention, an information processing apparatus capable of automatically selecting an arithmetic algorithm and calculating an error detection code to verify data integrity according to the data length of data to be integrity verified, and A computer program can be provided.

情報処理装置が有する機能を説明する図。3A and 3B illustrate functions included in an information processing device. 情報処理装置の動作を説明する図。6A and 6B illustrate an operation of an information processing device. 実施例のICカードに実装されたICチップのハードウェア構成を説明する図。The figure explaining the hardware constitutions of the IC chip mounted in the IC card of an Example. 実施例における参照テーブルを説明する図。The figure explaining the reference table in an Example. データ長と誤り検出符号の演算時間の関係を説明する図。The figure explaining the relationship between data length and the calculation time of an error detection code.

ここから、本発明にかかる情報処理装置の好適な実施形態について、図面を参照しながら詳細に説明する。なお、本発明は,これから説明する実施形態に限定されることなく、種々の変形や変更が可能である。   Now, a preferred embodiment of an information processing apparatus according to the present invention will be described in detail with reference to the drawings. The present invention is not limited to the embodiments described below, and various modifications and changes can be made.

図1は、本実施形態の情報処理装置1が有する機能を説明する図である。本実施形態の情報処理装置1は、コンピュータを用いて実現される装置で、好ましくは、本実施形態の情報処理装置1は、プラットフォーム型オペレーティングシステムが実装されたICカードであるが、汎用的なパーソナルコンピュータやスマートフォンであっても構わない。   FIG. 1 is a diagram illustrating functions of the information processing apparatus 1 according to the present embodiment. The information processing apparatus 1 of the present embodiment is an apparatus realized using a computer. Preferably, the information processing apparatus 1 of the present embodiment is an IC card on which a platform type operating system is mounted. It may be a personal computer or a smartphone.

図1に図示したように、本実施形態の情報処理装置1は、誤り検出符号が付加されたデータ130を保持するデータ保持手段13と、演算対象となるデータ130の誤り検出符号を演算する誤り検出符号演算手段12を備え、誤り検出符号演算手段12は、それぞれ異なる誤り検出符号の演算アルゴリズムに対応した複数の演算部120と、データ長の範囲と演算部120を対応付けた参照テーブル121を有し、演算対象となるデータ130が指定されると、参照テーブル121を参照し、演算対象となるデータ130のデータ長に対応した演算部120を選択して誤り検出符号を演算する。   As illustrated in FIG. 1, the information processing apparatus 1 according to the present embodiment includes a data holding unit 13 that holds data 130 to which an error detection code is added, and an error that calculates an error detection code of data 130 to be calculated. The detection code calculation means 12 includes a plurality of calculation units 120 corresponding to different calculation algorithms for error detection codes, and a reference table 121 that associates the data length range with the calculation unit 120. If the data 130 to be calculated is designated, the reference table 121 is referred to, and the calculation unit 120 corresponding to the data length of the data 130 to be calculated is selected to calculate the error detection code.

更に、本実施形態の情報処理装置1は、データ保持手段13に保持されているデータ130の完全性を検証できるように、データ保持手段13に保持されているデータ130の完全性を検証する指示を受けると、指示されたデータ130の誤り検出符号を誤り検出符号演算手段12に演算させ、指示されたデータ130に付加されている誤り検出符号と誤り検出符号演算手段12が演算した誤り検出符号を照合するデータ完全検証手段10を備える。   Further, the information processing apparatus 1 according to the present embodiment instructs to verify the integrity of the data 130 held in the data holding unit 13 so that the integrity of the data 130 held in the data holding unit 13 can be verified. The error detecting code of the indicated data 130 is calculated by the error detecting code calculating means 12, and the error detecting code added to the indicated data 130 and the error detecting code calculated by the error detecting code calculating means 12 are received. The data complete verification means 10 is provided.

更に、本実施形態の情報処理装置1は、データ保持手段13に保持されているデータ130を更新した際に誤り検出符号も更新できるように、データ130に付加された誤り検出符号の更新が指示されると、更新されたデータ130の誤り検出符号を誤り検出符号演算手段12に演算させ、更新されたデータ130に付加されている誤り検出符号を誤り検出符号演算手段12が演算した誤り検出符号に更新する誤り検出符号更新手段11を備えている。   Furthermore, the information processing apparatus 1 according to the present embodiment instructs to update the error detection code added to the data 130 so that the error detection code can be updated when the data 130 held in the data holding unit 13 is updated. Then, the error detection code of the updated data 130 is calculated by the error detection code calculation means 12, and the error detection code calculated by the error detection code calculation means 12 is added to the updated data 130. An error detection code updating means 11 for updating to is provided.

なお、本実施形態において、情報処理装置1に備えられた参照テーブル121はテーブル形式のデータで、データ保持手段13は、情報処理装置1に実装されたメモリ、または、情報処理装置1に接続されたハードディスクなどで実現され、情報処理装置1の各手段は、情報処理装置1に実装されたコンピュータプログラムで実現される。   In the present embodiment, the reference table 121 provided in the information processing apparatus 1 is table format data, and the data holding unit 13 is connected to the memory mounted in the information processing apparatus 1 or the information processing apparatus 1. Each means of the information processing apparatus 1 is realized by a computer program installed in the information processing apparatus 1.

図2は、情報処理装置1の動作を説明する図である。情報処理装置1が誤り検出符号を演算する際、まず、データ保持手段13に保持されているデータ130の中から、誤り検出符号演算手段12に対して誤り検出符号の演算対象となるデータ130が、情報処理装置1の他の手段から指定される(S1)。   FIG. 2 is a diagram for explaining the operation of the information processing apparatus 1. When the information processing apparatus 1 calculates an error detection code, first, the data 130 that is the target of the error detection code operation is calculated from the data 130 stored in the data storage unit 13 with respect to the error detection code calculation unit 12. It is designated by other means of the information processing apparatus 1 (S1).

本実施形態では、データ保持手段13に保持されているデータ130には、それぞれのデータ130を識別するための識別子が付加され、この識別子により演算対象となるデータ130が指定される。なお、データ130の完全性を検証する際は、情報処理装置1のデータ完全性検証手段10が、完全性検証の対象となるデータ130を指定することになり、また、データ保持手段13に保持されているデータ130が更新された際は、情報処理装置1の誤り検出符号更新手段11が更新されたデータ130を指定することになる。   In this embodiment, an identifier for identifying each data 130 is added to the data 130 held in the data holding means 13, and the data 130 to be calculated is designated by this identifier. When verifying the integrity of the data 130, the data integrity verifying unit 10 of the information processing apparatus 1 designates the data 130 to be subjected to the integrity verification, and the data retaining unit 13 holds the data 130. When the updated data 130 is updated, the error detection code update unit 11 of the information processing apparatus 1 designates the updated data 130.

情報処理装置1の誤り検出符号演算手段12は、演算対象となるデータ130が指定されると、データ130の識別子を利用して演算対象となるデータ130のデータ長をデータ保持手段13から取得した後(S2)、参照テーブル121を参照して、演算対象となるデータ130の誤り検出符号の演算に用いる演算部120として、演算対象となるデータ130のデータ長に対応する演算部120を選択する(S3)。   When the data 130 to be calculated is designated, the error detection code calculating unit 12 of the information processing apparatus 1 acquires the data length of the data 130 to be calculated from the data holding unit 13 using the identifier of the data 130. After (S2), referring to the reference table 121, the calculation unit 120 corresponding to the data length of the calculation target data 130 is selected as the calculation unit 120 used for calculation of the error detection code of the calculation target data 130. (S3).

本実施形態において、誤り検出符号演算手段12の参照テーブル121には、誤り検出符号演算手段12が有する演算部120毎にレコードが設けられ、該レコードには、それぞれの演算部120を識別する識別子に対応付けて演算部120を利用する際のデータ長の範囲が記述されている。   In the present embodiment, the reference table 121 of the error detection code calculation unit 12 is provided with a record for each calculation unit 120 included in the error detection code calculation unit 12, and an identifier for identifying each calculation unit 120 is included in the record. The range of the data length when using the calculation unit 120 in association with is described.

例えば、1バイトから31バイトまでのデータ長の範囲に対応付けられた演算部120の識別子が「01」、32バイトから63バイトまでのデータ長の範囲に対応付けられた演算部120の識別子が「02」、64バイト以上のデータ長の範囲に対応付けられた演算部120の識別子が「03」の場合、演算対象となるデータ130のデータ長が16バイトならば、識別子が「01」である演算部120が選択され、演算対象となるデータ130のデータ長が56バイトならば、識別子が「02」である演算部120が選択され、また、演算対象となるデータ130のデータ長が256バイトならば、識別子が「03」である演算部120が選択されることになる。   For example, the identifier of the calculation unit 120 associated with the data length range from 1 byte to 31 bytes is “01”, and the identifier of the calculation unit 120 associated with the data length range from 32 bytes to 63 bytes is When the identifier of the calculation unit 120 associated with “02” and a data length range of 64 bytes or more is “03”, if the data length of the data 130 to be calculated is 16 bytes, the identifier is “01”. If a certain calculation unit 120 is selected and the data length of the data 130 to be calculated is 56 bytes, the calculation unit 120 with the identifier “02” is selected, and the data length of the data 130 to be calculated is 256. If it is a byte, the computing unit 120 whose identifier is “03” is selected.

情報処理装置1の誤り検出符号演算手段12は、演算対象となるデータ130のデータ長に対応する演算部120を選択すると、演算対象となるデータ130をデータ保持手段13から取得して、演算対象となるデータ130の誤り検出符号を選択した演算部120に演算する(S4)。なお、選択した演算部120が演算した誤り検出符号はメモリの所定の場所に記憶されることで、演算対象となるデータ130を指定した手段に、選択した演算部120が演算した誤り検出符号が引き渡される。   When the error detection code calculation unit 12 of the information processing apparatus 1 selects the calculation unit 120 corresponding to the data length of the data 130 to be calculated, the error detection code calculation unit 12 acquires the data 130 to be calculated from the data holding unit 13 and calculates The error detecting code of the data 130 to be calculated is calculated by the selected calculation unit 120 (S4). The error detection code calculated by the selected calculation unit 120 is stored in a predetermined location in the memory, so that the error detection code calculated by the selected calculation unit 120 is stored in the means for designating the data 130 to be calculated. Delivered.

演算対象となるデータ130を指定した手段は、誤り検出符号演算手段12から引き渡された誤り検出符号を用いた処理が実行され(S5)、この手順は終了する。   The means specifying the data 130 to be calculated is processed using the error detection code delivered from the error detection code calculation means 12 (S5), and this procedure ends.

演算対象となるデータ130を指定した手段がデータ完全性検証手段10の場合、データ完全性検証手段10は、完全性検証の対象となるデータ130に付加されている誤り検出符号をデータ保持手段13から取得し、取得した誤り検出符号と誤り検出符号演算手段12から引き渡された誤り検出符号を照合することで、演算対象として指定したデータ130の完全性を検証する。   When the means for designating the data 130 to be calculated is the data integrity verification means 10, the data integrity verification means 10 uses the error detection code added to the data 130 for integrity verification as the data holding means 13. The integrity of the data 130 designated as the operation target is verified by collating the acquired error detection code with the error detection code delivered from the error detection code calculation means 12.

また、演算対象となるデータ130を指定した手段が誤り検出符号更新手段11の場合、誤り検出符号更新手段11は、更新されたデータ130に付加されている誤り検出符号を、誤り検出符号演算手段12から引き渡された誤り検出符号に更新する。   When the means for designating the data 130 to be calculated is the error detection code update means 11, the error detection code update means 11 uses the error detection code added to the updated data 130 as the error detection code calculation means. 12 is updated to the error detection code delivered from 12.

ここから、情報処理装置1をICカードとしたときの実施例について説明する。図3は、実施例のICカード2に実装されたICチップのハードウェア構成を説明する図である。図3に図示したように、ICカード2に実装されたICチップには、ICチップを制御するCPU21(Central Processing Unit)を有し、このCPU21には、外部装置とデータ通信するためのI/Oインターフェース20と、揮発性メモリとしてRAM(Random Access Memory)22と、電気的に書き換え可能な不揮発性メモリとしてEEPROM(Electrically Erasable Programmable Read-Only Memory)23と、プログラム等を記憶させる不揮発性メモリであるROM(Read-Only Memory)24が接続された構成となっている。なお、図4で図示したICチップのハードウェア構成は一例にしか過ぎず、暗号演算に特化したコプロセッサや、時間を計測するタイマなどの他のハードウェアが実装されていることが一般的である。   From here, an example when the information processing apparatus 1 is an IC card will be described. FIG. 3 is a diagram illustrating the hardware configuration of the IC chip mounted on the IC card 2 of the embodiment. As shown in FIG. 3, the IC chip mounted on the IC card 2 has a CPU 21 (Central Processing Unit) for controlling the IC chip, and this CPU 21 has an I / O for data communication with an external device. O interface 20, RAM (Random Access Memory) 22 as volatile memory, EEPROM (Electrically Erasable Programmable Read-Only Memory) 23 as electrically rewritable nonvolatile memory, and nonvolatile memory for storing programs and the like A certain ROM (Read-Only Memory) 24 is connected. Note that the hardware configuration of the IC chip shown in FIG. 4 is merely an example, and other hardware such as a coprocessor specialized for cryptographic operations and a timer for measuring time is generally mounted. It is.

実施例のICカード2において、EEPROM23は情報処理装置1のデータ保持手段13として利用され、情報処理装置1の誤り検出符号演算手段12、データ完全性検証手段10及び誤り検出符号更新手段11としてCPU20を動作させるモジュールはROM24に格納されている。   In the IC card 2 of the embodiment, the EEPROM 23 is used as the data holding means 13 of the information processing apparatus 1, and the CPU 20 as the error detection code calculation means 12, the data integrity verification means 10 and the error detection code update means 11 of the information processing apparatus 1. Modules for operating the are stored in the ROM 24.

データ完全性検証手段10として機能するモジュールは、例えば、EEPROM23に記憶されたデータを読み出すREADコマンドなど、EEPROM23に記憶されたデータを利用するコマンドによって呼び出されるモジュールで、また誤り検出符号更新手段11として機能するモジュールは、EEPROM23に記憶されたデータを更新するUPDATEコマンドなど、EEPROM23に記憶されたデータを書き換えるコマンドによって呼び出されるモジュールである。   The module functioning as the data integrity verification means 10 is a module called by a command that uses data stored in the EEPROM 23 such as a READ command for reading out data stored in the EEPROM 23, and as the error detection code update means 11. The functioning module is a module called by a command for rewriting data stored in the EEPROM 23, such as an UPDATE command for updating data stored in the EEPROM 23.

また、実施例のICカード2は、演算部120として機能する演算モジュールとして、チェックサムを演算する演算モジュールと、CRC(Cyclic Redundancy Check)を演算する演算モジュールを有し、いずれかの演算モジュールを利用するかは、実施例のICカード2が有する参照テーブル121によって決定される。   In addition, the IC card 2 of the embodiment includes a calculation module that calculates a checksum and a calculation module that calculates a CRC (Cyclic Redundancy Check) as a calculation module that functions as the calculation unit 120. Whether to use is determined by the reference table 121 of the IC card 2 of the embodiment.

図4は、実施例における参照テーブル121aを説明する図である。図4に図示したように、実施例では、データ長の範囲が1バイト以上31バイト以下の場合、誤り検出符号の演算にチェックサムを利用し、データ長の範囲が32バイト以上の場合、誤り検出符号の演算にCRC(Cyclic Redundancy Check)を利用するようになっている。   FIG. 4 is a diagram illustrating the reference table 121a in the embodiment. As shown in FIG. 4, in the embodiment, when the data length range is 1 byte or more and 31 bytes or less, a checksum is used for calculation of the error detection code, and when the data length range is 32 bytes or more, an error occurs. CRC (Cyclic Redundancy Check) is used for calculation of the detection code.

図4に従えば、READコマンドによりEEPROM23に記憶されているデータを読み出す際、読み出すデータの完全性がデータ完全性検証手段10として機能するモジュールによって検証され、読み出し対象となるデータのデータ長が32バイト以上であれば、誤り検出符号の演算にCRCが用いられてデータの完全性が検証され、それ以外であれば、誤り検出符号の演算にチェックサムが用いられてデータの完全性が検証される。   According to FIG. 4, when data stored in the EEPROM 23 is read by the READ command, the integrity of the read data is verified by the module functioning as the data integrity verification means 10 and the data length of the data to be read is 32. If it is greater than or equal to bytes, CRC is used to calculate the error detection code and the data integrity is verified. Otherwise, the checksum is used to calculate the error detection code and the data integrity is verified. The

また、UPDATEコマンドによりEEPROM23に記憶されているデータが更新されると、更新されたデータに付加された誤り検出符号も誤り検出符号更新手段11として機能するモジュールによって更新され、更新後のデータのデータ長が32バイト以上であれば、CRCが用いられて誤り検出符号が演算され、それ以外であれば、チェックサムが用いられて誤り検出符号が演算される。   When the data stored in the EEPROM 23 is updated by the UPDATE command, the error detection code added to the updated data is also updated by the module functioning as the error detection code update means 11, and the data data after the update is updated. If the length is 32 bytes or more, CRC is used to calculate the error detection code, and otherwise, the checksum is used to calculate the error detection code.

1 情報処理装置
10 データ完全性検証手段
11 誤り検出符号更新手段
12 誤り検出符号演算手段
120 演算部
121 参照テーブル
13 データ保持手段
130 データ
DESCRIPTION OF SYMBOLS 1 Information processing apparatus 10 Data integrity verification means 11 Error detection code update means 12 Error detection code calculation means 120 Operation part 121 Reference table 13 Data holding means 130 Data

Claims (3)

誤り検出符号が付加されたデータを保持するデータ保持手段と、それぞれ異なる誤り検出符号の演算アルゴリズムに対応した複数の演算部と、データ長の範囲と前記演算部を対応付けた参照テーブルを有し、演算対象となるデータが指定されると、前記参照テーブルを参照し、演算対象となるデータのデータ長に対応した前記演算部を選択して誤り検出符号を演算する誤り検出符号演算手段と、前記データ保持手段に保持されているデータの完全性を検証する指示を受けると、指示されたデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、指示されたデータに付加されている誤り検出符号と前記誤り検出符号演算手段が演算した誤り検出符号を照合するデータ整合性検証手段を備えたことを特徴とする情報処理装置。   A data holding means for holding data to which an error detection code is added; a plurality of calculation units corresponding to different calculation algorithms for error detection codes; and a reference table in which a range of data length is associated with the calculation unit When the data to be calculated is designated, the error detection code calculation means for calculating the error detection code by referring to the reference table and selecting the calculation unit corresponding to the data length of the data to be calculated; When receiving an instruction to verify the integrity of data held in the data holding means, the error detection code calculating means calculates the error detection code of the indicated data, and an error added to the indicated data An information processing apparatus comprising data integrity verification means for collating a detection code with an error detection code calculated by the error detection code calculation means. 前記データ保持手段に保持されているデータに付加された誤り検出符号の更新が指示されると、指示されたデータを更新した後、更新後のデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、更新後のデータに付加されている誤り検出符号を前記誤り検出符号演算手段が演算した誤り検出符号に更新する誤り検出符号更新手段を備えたことを特徴とする、請求項1に記載した情報処理装置。   When the update of the error detection code added to the data held in the data holding means is instructed, after updating the indicated data, the error detection code of the updated data is sent to the error detection code calculating means. 2. The error detection code update means for calculating and updating an error detection code added to the updated data to an error detection code calculated by the error detection code calculation means. Information processing device. それぞれ異なる誤り検出符号の演算アルゴリズムに対応した複数の演算部と、データ長の範囲と前記演算部を対応付けた参照テーブルを有し、演算対象となるデータが指定されると、前記参照テーブルを参照し、演算対象となるデータのデータ長に対応した前記演算部を選択して誤り検出符号を演算する誤り検出符号演算手段と、前記データ保持手段に保持されているデータの完全性を検証する指示を受けると、指示されたデータの誤り検出符号を前記誤り検出符号演算手段に演算させ、指示されたデータに付加されている誤り検出符号と前記誤り検出符号演算手段が演算した誤り検出符号を照合するデータ整合性検証手段としてコンピュータを機能させるためのコンピュータプログラム。
A plurality of calculation units corresponding to different calculation algorithms for error detection codes, and a reference table in which a range of data length and the calculation unit are associated with each other. The error detection code calculation means for calculating the error detection code by selecting the calculation section corresponding to the data length of the data to be calculated, and the integrity of the data held in the data holding means is verified. When the instruction is received, the error detecting code calculating means calculates the error detecting code of the indicated data, and the error detecting code added to the indicated data and the error detecting code calculated by the error detecting code calculating means are A computer program for causing a computer to function as data integrity verification means for collation.
JP2011199998A 2011-09-13 2011-09-13 Information processing device and computer program Pending JP2013062691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011199998A JP2013062691A (en) 2011-09-13 2011-09-13 Information processing device and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011199998A JP2013062691A (en) 2011-09-13 2011-09-13 Information processing device and computer program

Publications (1)

Publication Number Publication Date
JP2013062691A true JP2013062691A (en) 2013-04-04

Family

ID=48186991

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011199998A Pending JP2013062691A (en) 2011-09-13 2011-09-13 Information processing device and computer program

Country Status (1)

Country Link
JP (1) JP2013062691A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014225790A (en) * 2013-05-16 2014-12-04 パナソニック株式会社 Visible light communication apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03147086A (en) * 1989-11-01 1991-06-24 Hitachi Maxell Ltd Ic card
JP2004193664A (en) * 2002-12-06 2004-07-08 Fanuc Ltd Error detecting/correcting system and control apparatus employing the system
JP2010219869A (en) * 2009-03-17 2010-09-30 Sony Corp Communication apparatus and communication method, computer program, and communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03147086A (en) * 1989-11-01 1991-06-24 Hitachi Maxell Ltd Ic card
JP2004193664A (en) * 2002-12-06 2004-07-08 Fanuc Ltd Error detecting/correcting system and control apparatus employing the system
JP2010219869A (en) * 2009-03-17 2010-09-30 Sony Corp Communication apparatus and communication method, computer program, and communication system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014225790A (en) * 2013-05-16 2014-12-04 パナソニック株式会社 Visible light communication apparatus

Similar Documents

Publication Publication Date Title
CN105677409B (en) A kind of method for upgrading system and device
CN109471642A (en) Firmware generates storage method and device, firmware start method and device
CN114741231A (en) Data read-write method, device and equipment based on memory and storage medium
JP4766285B2 (en) Permanent data hardware integrity
JP2013062691A (en) Information processing device and computer program
US20140122785A1 (en) Data writing method and system
EP3067795A1 (en) A method for generating an embedded system derivable into a plurality of personalized embedded system
US7353348B2 (en) Nonvolatile memory and card reader provided with the same
CN103294569B (en) The COS edition correcting methods and calibration equipment of smart card
US10242183B2 (en) Method of executing a program by a processor and electronic entity comprising such a processor
JP2008108162A (en) Memory management method
JP4888862B2 (en) Memory management method
JP6552926B2 (en) IC card and portable electronic device
JP5786702B2 (en) Security token, instruction execution method in security token, and computer program
CN113821829B (en) Data verification method, device and storage medium
JP5545067B2 (en) Information processing apparatus and self-diagnosis method of information processing apparatus
KR101660180B1 (en) Ic card, portable electronic apparatus, and ic card processing apparatus
JP4601968B2 (en) IC card and IC card program that eliminates data integrity check
JP5793379B2 (en) Information processing system, data error detection method, program, and storage medium
JP2007148570A (en) Diagnostic device and diagnostic method for storage device
KR20220138639A (en) Apparatus and method for data validation using partial error detection
CN115993978A (en) Firmware upgrading method and device
JP2012226604A (en) Semiconductor device and data abnormality determination method thereof
JP2016062173A (en) Electronic control apparatus
JP2013190923A (en) Ic card and computer program

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20130823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140711

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150423

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150804