JP2014052955A - Security token, data falsification detection method, and computer program - Google Patents

Security token, data falsification detection method, and computer program Download PDF

Info

Publication number
JP2014052955A
JP2014052955A JP2012198438A JP2012198438A JP2014052955A JP 2014052955 A JP2014052955 A JP 2014052955A JP 2012198438 A JP2012198438 A JP 2012198438A JP 2012198438 A JP2012198438 A JP 2012198438A JP 2014052955 A JP2014052955 A JP 2014052955A
Authority
JP
Japan
Prior art keywords
data
data file
ram
read
stored
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012198438A
Other languages
Japanese (ja)
Other versions
JP5949357B2 (en
Inventor
Masaki Yoshikawa
雅起 吉川
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 JP2012198438A priority Critical patent/JP5949357B2/en
Publication of JP2014052955A publication Critical patent/JP2014052955A/en
Application granted granted Critical
Publication of JP5949357B2 publication Critical patent/JP5949357B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a security device capable of detecting that data is falsified when a laser attack is made to falsify data stored in a memory.SOLUTION: When reading data from a data file with an error detection code is attached thereto to perform processing, control means 10 of a security token 1 reads prescribed data from the data file in a case that the data file is stored in a readable and writable memory, verifies the error detection code from the data file subjected to writing back data after writing back the read data to an original place, and executes data falsification detection processing for determining that the read data is falsified in a case that an error exists in the data file.

Description

本発明は、半導体集積回路を実装したセキュリティトークンに関し、更に詳しくは、レーザーを用いてメモリに格納されたデータを変化させるレーザー攻撃に対する耐タンパ性を高める技術に関する。   The present invention relates to a security token mounted with a semiconductor integrated circuit, and more particularly to a technique for improving tamper resistance against a laser attack that changes data stored in a memory using a laser.

半導体集積回路が実装されたセキュリティトークンは高いセキュリティを要する用途に利用され、例えば、セキュリティトークンの一つであるICカードは、既に、金融用途においてキャッシュカードやクレジットカードに実用化されている。また、セキュリティトークンの一つであるチェーン付きのUSBキーは、ユーザ認証に利用するワンタイムパスワードを生成する装置としての利用が検討されている。   Security tokens mounted with semiconductor integrated circuits are used for applications requiring high security. For example, an IC card, which is one of the security tokens, has already been put into practical use for cash cards and credit cards in financial applications. In addition, the use of a USB key with a chain, which is one of security tokens, as a device for generating a one-time password used for user authentication is under consideration.

高いセキュリティを要する用途に利用されるセキュリティトークン内には、セキュリティトークンの用途に合わせて、外部への漏洩が許されないセキュリティデータが記憶されるが、セキュリティデータの取得を目的とした様々なセキュリティ攻撃法が考案され、セキュリティトークンには該セキュリティ攻撃法に対する耐タンパ性が求められている。   Security data used for applications requiring high security contains security data that cannot be leaked to the outside in accordance with the application of the security token, but various security attacks aimed at obtaining security data Laws have been devised, and security tokens are required to be tamper resistant to the security attack method.

新しく考案されたセキュリティ攻撃法の一つにレーザー攻撃がある。レーザー攻撃は、セキュリティトークンに実装された半導体集積回路の読み書き可能なメモリに対してレーザーを照射し、読み書き可能なメモリの状態を一時的に高エネルギー状態にすることにより、読み書き可能なメモリに記録されているデータを意図的に変化させ、レーザーを照射した時のセキュリティトークンから得られる出力とレーザーを照射しない時のセキュリティトークンから得られる出力を比較するなどして、セキュリティデータを得ようとするセキュリティ攻撃方法である。   One of the newly devised security attack methods is laser attack. Laser attacks are recorded in a readable / writable memory by irradiating a laser to the readable / writable memory of a semiconductor integrated circuit mounted on a security token, and temporarily changing the state of the readable / writable memory to a high energy state. By deliberately changing the stored data, the security data is obtained by comparing the output obtained from the security token when the laser is irradiated with the output obtained from the security token when the laser is not irradiated. It is a security attack method.

図6は、レーザー攻撃を説明する図である。図6(a)に図示しているように、読み書き可能なメモリから一時的に利用するデータ(ここでは、1バイト目)を読み出す場合、通常であれば、正常値(ここでは、11h)が読み出される。   FIG. 6 is a diagram for explaining a laser attack. As shown in FIG. 6A, when reading temporarily used data (here, the first byte) from a readable / writable memory, a normal value (here, 11h) is normally used. Read out.

しかし、読み書き可能なメモリからデータを読み出すときに、読み出し対象となるデータが格納されている箇所にレーザーが照射されると、レーザーが照射された箇所のデータが別の値に変化し、正常値でない値が読み出されてしまう。   However, when reading data from a readable / writable memory, if the location where the data to be read is stored is irradiated with a laser, the data at the location where the laser was irradiated changes to a different value, and the normal value The value which is not is read.

このようなレーザー攻撃の危険性は以前から指摘されていたが、読み書き可能なメモリの極小範囲のみにレーザーを照射することは技術的に難しく、レーザー攻撃の実効性は低く対策は不要と考えられていた。   The danger of such a laser attack has been pointed out for some time, but it is technically difficult to irradiate the laser only to the smallest area of readable and writable memory, the effectiveness of the laser attack is low, and no countermeasures are considered necessary. It was.

しかし、近年、レーザーの照射技術が飛躍的に向上したことで、読み書き可能なメモリの極小範囲のみにレーザーを照射することが可能となり、レーザー攻撃も現実味が出てきたため、レーザー攻撃への対策も要求されるようになった。   However, in recent years, the laser irradiation technology has improved dramatically, making it possible to irradiate the laser only to the minimum range of readable and writable memory, and the laser attack has become a reality, so countermeasures against the laser attack can also be taken. It came to be required.

本出願人は、特許文献1においてレーザー攻撃法対策の一つとして、セキュリティトークンの電気的に書き換え可能な不揮発性メモリに記憶するセキュリティデータを暗号化するケースであっても、セキュリティデータを暗号化するときに利用したスクランブル鍵の漏洩を防止できる発明を開示している。   As a countermeasure against the laser attack method in Patent Document 1, the present applicant encrypts the security data even in the case of encrypting the security data stored in the electrically rewritable nonvolatile memory of the security token. An invention that can prevent leakage of a scramble key used when performing the process is disclosed.

特開2010-258630号公報JP 2010-258630 A

しかしながら、上述した発明は、セキュリティデータを暗号化するときに利用したスクランブル鍵の漏洩を防止する発明で、レーザー攻撃によりセキュリティデータが改竄されたことを検知するための発明ではない。   However, the above-described invention is an invention for preventing leakage of the scramble key used when encrypting the security data, and is not an invention for detecting that the security data has been tampered with by a laser attack.

そこで、本発明は、レーザー攻撃が行われメモリに格納されたデータが改竄された際、データが改竄されたことを検知できるセキュリティデバイス、データ改竄検知方法およびコンピュータプログラムを提供することを目的とする。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a security device, a data falsification detection method, and a computer program that can detect that data has been falsified when a laser attack is performed and data stored in a memory is falsified. .

上述した課題を解決する第1の発明は、誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行する制御手段を備えていることを特徴とするセキュリティトークンである。   In a first invention for solving the above-described problem, when data is read from a data file to which an error detection code is added and processed, the data file is stored in a readable / writable memory. After reading the predetermined data and writing the read data back to the original location, verify the error detection code of the data file after the data is written back, and if the data file has an error, the read data is It is a security token characterized by comprising control means for executing data falsification detection processing for determining that falsification has occurred.

更に、第2の発明は、第1の発明に記載のセキュリティトークンにおいて、前記制御手段は、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄検知処理を実行することを特徴とする。   Further, according to a second invention, in the security token according to the first invention, when the control means reads the data from the data file, the data file is stored in a predetermined memory. After the data file stored in the memory is copied to the RAM, the error detection code of the data file copied to the RAM is verified, and the data file copied to the RAM is copied to the RAM only when there is no error. Processing is performed using a data file, and the data alteration detection processing is executed when data is read from the data file copied to the RAM.

更に、第3の発明は、セキュリティトークンのCPUが、誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行することを特徴とするデータ改竄検知方法である。   Furthermore, when the CPU of the security token reads the data from the data file to which the error detection code is added and performs processing when the data file is stored in a readable / writable memory, the third invention After reading the predetermined data from the file and writing the read data back to the original location, the error detection code of the data file after the data is written back is verified, and the data file is read if there is an error A data falsification detection method that performs data falsification detection processing for determining that data has been falsified.

更に、第4の発明は、第3の発明に記載のデータ改竄検知方法において、前記セキュリティトークンのCPUは、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄判定処理を実行することを特徴とする。   Furthermore, a fourth invention is the data falsification detection method according to the third invention, wherein when the CPU of the security token reads the data from the data file, the data file is stored in a predetermined memory. After the data file stored in the predetermined memory is copied to the RAM, the error detection code of the data file copied to the RAM is verified, and only when the data file copied to the RAM has no error The data falsification determination processing is executed when data is read from the data file copied to the RAM.

更に、第5の発明は、誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行する制御手段として、セキュリティトークンのCPUを機能させるためのコンピュータプログラムである。   Furthermore, in the fifth aspect of the present invention, when data is read from a data file to which an error detection code is added and processing is performed, if the data file is stored in a readable / writable memory, predetermined data is read from the data file. After reading and writing back the read data to the original location, the error detection code of the data file after the data is written back is verified, and if there is an error in the data file, it is determined that the read data has been tampered with This is a computer program for causing the security token CPU to function as a control means for executing the data falsification detection process.

更に、第6の発明は、前記セキュリティトークンのCPUを、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄判定処理を実行する前記制御手段として機能させるためのコンピュータプログラムである。   Further, in a sixth aspect of the present invention, when the CPU of the security token reads data from the data file, if the data file is stored in a predetermined memory, the data file stored in the predetermined memory Is copied to the RAM, the error detection code of the data file copied to the RAM is verified, and only when there is no error in the data file copied to the RAM, processing is performed using the data file copied to the RAM, It is a computer program for functioning as the control means for executing the data falsification determination process when data is read from the data file copied to a RAM.

上述した本発明によれば、誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、レーザー攻撃を受けてデータが改竄されると、正常値でないデータがデータファイルに書き戻され、データを書き戻した後のデータファイルの誤り検出符号の検証に失敗するため、データファイルから読み取ったデータが改竄されたことを検知できる。   According to the present invention described above, when data is read from a data file to which an error detection code is added and processed, if the data is tampered with by a laser attack, data that is not a normal value is written back to the data file. Since the verification of the error detection code of the data file after the data is written back fails, it can be detected that the data read from the data file has been tampered with.

セキュリティトークンを説明する図。The figure explaining a security token. データファイルを説明する図。The figure explaining a data file. データ改竄検知処理を説明する図。The figure explaining data falsification detection processing. 発明の効果の説明に用いる図。The figure used for description of the effect of invention. データ改竄検知処理の前に実行する動作を説明する図。The figure explaining the operation | movement performed before a data alteration detection process. レーザー攻撃を説明する図。The figure explaining a laser attack.

ここから、本発明に係るセキュリティトークンについて説明する。   From here, the security token according to the present invention will be described.

[第1実施形態]
図1は、本実施形態のセキュリティトークン1を説明する図である。本実施形態のセキュリティトークン1は、高いセキュリティが要求されるコンピュータシステムに利用されるデバイスで、図1に図示したように、本実施形態のセキュリティトークン1には半導体集積回路2が実装される。
[First Embodiment]
FIG. 1 is a diagram illustrating a security token 1 according to this embodiment. The security token 1 according to the present embodiment is a device used in a computer system that requires high security. As illustrated in FIG. 1, a semiconductor integrated circuit 2 is mounted on the security token 1 according to the present embodiment.

このようなセキュリティトークン1としては、ICカードやUSBキーに加え、本出願人がすでに販売しているTinySmartのように、ICカード用のオペレーティングシステムを搭載したSDカードも利用できる。   As such a security token 1, in addition to an IC card and a USB key, an SD card equipped with an operating system for an IC card such as TinySmart already sold by the present applicant can be used.

図1に図示したように、セキュリティトークン1に実装される半導体集積回路2は、マイクロプロセッサであるCPU20(Central Processing Unit)に加え、読み書き可能なメモリとして、揮発性メモリであるRAM21(Random Access Memory)と、電気的に書換え可能な不揮発性メモリであるEEPROM23(Electrically Erasable and Programmable Read Only Memory)を備え、更に、書き込み不可能なメモリとして、ROM22(Read Only Memory)を備え、CPU20とそれぞれのメモリは、アドレスバス24およびデータバス25を介して接続している。   As shown in FIG. 1, a semiconductor integrated circuit 2 mounted on a security token 1 includes a RAM 21 (Random Access Memory) that is a volatile memory as a readable / writable memory in addition to a CPU 20 (Central Processing Unit) that is a microprocessor. ) And an electrically rewritable nonvolatile memory EEPROM 23 (Electrically Erasable and Programmable Read Only Memory), and a ROM 22 (Read Only Memory) as a non-writable memory. Are connected via an address bus 24 and a data bus 25.

なお、図1では、電気的に書換え可能な不揮発性メモリをEEPROM23として記載しているが、電気的に書換え可能な不揮発性メモリはFeRAMであってもよい。また、セキュリティトークン1には、乱数を生成する乱数生成器(Random Number Generator)、所定の暗号アルゴリズム(例えば、DES)の演算機能に特化した暗号演算コプロセッサ(Cryptographic Co-processer)、外部装置とのデータの送受信に利用するインターフェースなどを備えるが、これらの周辺回路は本発明とは係わりないため、図1では図示していない。   In FIG. 1, the electrically rewritable nonvolatile memory is described as the EEPROM 23, but the electrically rewritable nonvolatile memory may be FeRAM. Further, the security token 1 includes a random number generator (Random Number Generator) for generating a random number, a cryptographic coprocessor (Cryptographic Co-processer) specialized for a calculation function of a predetermined cryptographic algorithm (for example, DES), an external device However, these peripheral circuits are not shown in FIG. 1 because they are not related to the present invention.

図2は、読み書き可能なメモリに格納されているデータファイルを説明する図である。第1実施形態において、セキュリティトークン1に実装された半導体集積回路2の読み書き可能なメモリ(ここでは、RAM21、EEPROM23)には、外部装置から受信したコマンドを処理する時に用いられるデータを含むデータファイルが格納され、このデータファイルの最後には、データファイルに含まれる全てのデータから演算した誤り検出符号(CC: CheckCode)が付加されている   FIG. 2 is a diagram for explaining a data file stored in a readable / writable memory. In the first embodiment, a readable / writable memory (here, RAM 21 and EEPROM 23) of the semiconductor integrated circuit 2 mounted on the security token 1 has a data file containing data used when processing a command received from an external device. Is stored, and an error detection code (CC: CheckCode) calculated from all data contained in the data file is added to the end of this data file.

図6を用いて説明したように、半導体集積回路2のCPU20が利用するデータをデータファイルから読み出す時にレーザー攻撃を受けると、半導体集積回路2のCPU20が読み出したデータが正常値ではなくなるため、第1実施形態のセキュリティトークン1には、データファイルに付加された誤り検出符号を利用してデータの改竄を検知するデータ改竄検知処理を実行する制御手段10が備えられ、データ改竄検知処理を実行するためのコンピュータプログラムがCPU20で実行されることで、CPU20は制御手段10として機能する。   As described with reference to FIG. 6, if the data used by the CPU 20 of the semiconductor integrated circuit 2 is read from the data file and subjected to a laser attack, the data read by the CPU 20 of the semiconductor integrated circuit 2 is not a normal value. The security token 1 according to the embodiment includes a control unit 10 that executes data falsification detection processing that detects falsification of data using an error detection code added to a data file, and executes the data falsification detection processing. The CPU 20 functions as the control unit 10 when the computer program for executing the program is executed by the CPU 20.

図3は、第1実施形態における制御手段10が実行するデータ改竄検知処理を説明する図である。セキュリティトークン1の制御手段10が、読み書き可能なメモリに格納されているデータファイルから、処理に利用するデータを読み出すと(S1)、制御手段10は、読み出したデータを読み書き可能なメモリの元の場所に書き戻す処理を実行する(S2)。   FIG. 3 is a diagram for explaining data alteration detection processing executed by the control means 10 in the first embodiment. When the control means 10 of the security token 1 reads data used for processing from the data file stored in the readable / writable memory (S1), the control means 10 reads the read data in the original readable / writable memory. A process of writing back to the place is executed (S2).

次に、制御手段10は、データを書き戻した後のデータファイルの誤り検出符号を再度算出し、データを書き戻したデータファイルに付加されている誤り検出符号と照合することで、データを書き戻した後のデータファイルの誤り検出符号を検証する(S3)。   Next, the control means 10 recalculates the error detection code of the data file after the data is written back, and compares the error detection code added to the data file to which the data is written back, thereby writing the data. The error detection code of the returned data file is verified (S3).

次に、制御手段10は、データファイルの誤り検出符号の検証結果に応じて処理を分岐させ(S4)、誤り検出符号の検証に成功すると、データの改竄がなかったと判定し、それ以降の処理を続行して(S5)、この手順は終了し、誤り検出符号の検証に失敗すると、データの改竄があったと判定し、それ以降の処理を中断して(S6)、この手順は終了する。   Next, the control means 10 branches the process according to the verification result of the error detection code of the data file (S4). If the verification of the error detection code is successful, it is determined that the data has not been falsified, and the subsequent processes (S5), this procedure ends, and if the verification of the error detection code fails, it is determined that the data has been falsified, the subsequent processing is interrupted (S6), and this procedure ends.

ここから、発明の効果について説明する。図4は、発明の効果の説明に用いる図である。   From here, the effect of invention is demonstrated. FIG. 4 is a diagram used for explaining the effects of the invention.

図6では、レーザーが照射される場所を読み書き可能なメモリとしているが、半導体集積回路2のアドレスバス24、データバス25またはCPU20にレーザーが照射されても、読み書き可能なメモリからCPU20(制御手段10)が読み出したデータが正常値でなくなる可能性がある。   In FIG. 6, the place where the laser is irradiated is a readable / writable memory. However, even if the address bus 24, the data bus 25 or the CPU 20 of the semiconductor integrated circuit 2 is irradiated with the laser, the CPU 20 (control means) There is a possibility that the data read in 10) is not a normal value.

図4(a)は、CPU20がデータを読み出し可能なメモリから読み出すタイミングで、読み出すデータにレーザーが照射された場合を説明する図である。このケースでは、読み出し可能なメモリに格納されたデータは正常値ではなくなり、読み書き可能なメモリからCPU20が読み出したデータも正常値ではなくなる。   FIG. 4A is a diagram for explaining a case where the read data is irradiated with laser at the timing when the CPU 20 reads the data from the readable memory. In this case, the data stored in the readable memory is not a normal value, and the data read by the CPU 20 from the readable / writable memory is not a normal value.

図4(b)は、CPU20がデータを読み出し可能なメモリから読み出すタイミングで、アドレスバス24、データバス25またはCPU20にレーザーが照射された場合を説明する図である。このケースでは、読み書き可能なメモリに格納されているデータは正常値のままであるが、読み書き可能なメモリからCPU20が読み出したデータが正常値ではなくなる。   FIG. 4B is a diagram illustrating a case where the laser is irradiated to the address bus 24, the data bus 25, or the CPU 20 at a timing when the CPU 20 reads data from a readable memory. In this case, the data stored in the readable / writable memory remains at a normal value, but the data read by the CPU 20 from the readable / writable memory is not a normal value.

CPU20がデータを読み出し可能なメモリから読み出すタイミングでアドレスバス24にレーザーが照射されると、正常値でないアドレスからデータが読み出されるため、CPU20が読み書き可能なメモリから読み出したデータは正常値ではなくなる。   When the CPU 20 irradiates the address bus 24 with a laser at a timing of reading data from a memory from which data can be read, data is read from an address that is not a normal value, so the data read from the memory that the CPU 20 can read and write is not a normal value.

また、CPU20がデータを読み出し可能なメモリから読み出すタイミングでデータバス25にレーザーが照射されると、データバス25上にてデータが変化し、データバス25を介してCPU20に引き渡されるデータが正常値ではなくなるため、CPU20が読み書き可能なメモリから読み出したデータは正常値ではなくなる。   Further, when the laser is irradiated onto the data bus 25 at a timing when the CPU 20 reads data from a readable memory, the data changes on the data bus 25 and the data delivered to the CPU 20 via the data bus 25 is a normal value. Therefore, the data read from the memory that the CPU 20 can read and write is not a normal value.

また、CPU20がデータを読み出し可能なメモリから読み出すタイミングでCPU20にレーザーが照射された場合、CPU20の内部に格納されたデータが変化するため、CPU20が読み書き可能なメモリから読み出したデータは正常値ではなくなる。   In addition, when the CPU 20 is irradiated with laser at the timing when the CPU 20 reads data from the readable memory, the data stored in the CPU 20 changes, so the data read from the memory that the CPU 20 can read and write is a normal value. Disappear.

図4(a)、(b)のいずれの場合であっても、CPU20が読み書き可能なメモリから読み出したデータは正常値でなくなり、正常値でないデータが読み書き可能なメモリのデータファイルに書き戻されるため、データを書き戻した後にデータファイルの誤り検出符号を検証すると、誤り検出符号の検証に失敗しCPU20はデータの改竄があったことを検知できる。   In either case of FIGS. 4A and 4B, the data read from the readable / writable memory by the CPU 20 no longer has a normal value, and the non-normal data is written back to the data file in the readable / writable memory. Therefore, when the error detection code of the data file is verified after the data is written back, the verification of the error detection code fails and the CPU 20 can detect that the data has been falsified.

[第2実施形態]
第2実施形態は、第1実施形態において、読み出すデータが書き込み不可能なメモリ(ここでは、ROM22)に格納されている場合についても対応が取れるようにした形態である。レーザー攻撃によって、ROM22に格納されているデータは変化しにくいが、アドレスバス24、データバス25またはCPU20にレーザーが照射されると、読み出すデータがROM22に格納されている場合であっても、CPU20が読み出したデータは正常値ではなくなる。
[Second Embodiment]
The second embodiment is a mode in which it is possible to cope with the case where data to be read is stored in a non-writable memory (in this case, ROM 22) in the first embodiment. Although the data stored in the ROM 22 is unlikely to change due to the laser attack, when the address bus 24, the data bus 25, or the CPU 20 is irradiated with the laser, even if the read data is stored in the ROM 22, the CPU 20 The data read out is not a normal value.

図5は、第2実施形態における制御手段10がデータ改竄検知処理の前に実行する動作を説明する図である。図5の処理において、セキュリティトークン1の制御手段10は、データファイルからデータを読み出す際、まず、データファイルが格納されているメモリの種別を確認する(S10)。   FIG. 5 is a diagram for explaining an operation performed by the control unit 10 in the second embodiment before the data alteration detection process. In the process of FIG. 5, when reading the data from the data file, the control unit 10 of the security token 1 first checks the type of memory in which the data file is stored (S10).

制御手段10は、データファイルが格納されているメモリの種別によって処理を分岐させ(S11)、データを読み出すデータファイルが格納されているメモリの種別が、所定の種別(ここでは、ROM22)でない場合、図3を用いて説明したデータ改竄検知処理を実行する(S15)。   The control means 10 branches the process depending on the type of memory in which the data file is stored (S11), and the type of memory in which the data file from which data is read is stored is not a predetermined type (here, ROM 22). Then, the data alteration detection process described with reference to FIG. 3 is executed (S15).

また、制御手段10は、データを読み出すデータファイルが格納されているメモリの種別が、所定の種別(ここでは、ROM22)の場合、所定の種別のメモリ(ここでは、ROM22)に格納されているデータファイルを読み書き可能なメモリの一つであるRAM21へコピーする(S12)。   Further, when the type of the memory in which the data file from which data is read is stored is a predetermined type (here, ROM 22), the control means 10 is stored in a predetermined type of memory (here, ROM 22). The data file is copied to the RAM 21 which is one of the readable and writable memories (S12).

次に、制御手段10は、この時点で、レーザー攻撃がないことを判定するために、RAM21にコピーしたデータファイルの誤り検出符号を検証する(S13)。   Next, the control means 10 verifies the error detection code of the data file copied to the RAM 21 to determine that there is no laser attack at this point (S13).

次に、制御手段10は、誤り検出符号の検証結果に応じて処理を分岐させ(S14)、誤り検出符号の検証に失敗した場合、制御手段10は、これ以降の処理を中断して(S16)、この手順を終了する。   Next, the control means 10 branches the process according to the verification result of the error detection code (S14), and when the verification of the error detection code fails, the control means 10 interrupts the subsequent processes (S16). ) To finish this procedure.

また、誤り検出符号の検証に成功した場合、制御手段10は、RAM21のデータファイルを利用して処理を続行し、RAM21のデータファイルからデータを読み出す際、図3を用いて説明したデータ改竄検知処理を実行する(S15)。   If the verification of the error detection code is successful, the control means 10 continues the processing using the data file in the RAM 21, and when data is read from the data file in the RAM 21, the data falsification detection described with reference to FIG. Processing is executed (S15).

なお、第2実施形態の内容は、書き込み不可能なROM22ばかりではなく、所定の種別にEEPROM23を含ませることで、書き込み時間に時間のかかるEEPROM23にも適用することもできる。   Note that the contents of the second embodiment can be applied not only to the ROM 22 that cannot be written but also to the EEPROM 23 that takes a long time to write by including the EEPROM 23 in a predetermined type.

1 セキュリティトークン
10 制御手段
2 半導体集積回路
20 CPU
21 RAM
22 ROM
23 EEPROM
24 アドレスバス
25 データバス
DESCRIPTION OF SYMBOLS 1 Security token 10 Control means 2 Semiconductor integrated circuit 20 CPU
21 RAM
22 ROM
23 EEPROM
24 address bus 25 data bus

Claims (6)

誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行する制御手段を備えていることを特徴とするセキュリティトークン。   When processing is performed by reading data from a data file to which an error detection code is added, if the data file is stored in a readable / writable memory, predetermined data is read from the data file and the read data is restored to the original data. After writing back to the location, the error detection code of the data file after writing back the data is verified, and if there is an error in the data file, a data falsification detection process is performed to determine that the read data has been falsified A security token comprising a control means. 前記制御手段は、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄検知処理を実行することを特徴とする、請求項1に記載したセキュリティトークン。   When the data is stored in a predetermined memory when reading data from the data file, the control means copies the data file stored in the predetermined memory to the RAM and then copies the data file to the RAM. The error detection code of the data file is verified, and only when there is no error in the data file copied to the RAM, processing is performed using the data file copied to the RAM, and the data is copied from the data file copied to the RAM. The security token according to claim 1, wherein the data alteration detection process is executed when reading. セキュリティトークンのCPUが、誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行することを特徴とするデータ改竄検知方法。   When the CPU of the security token reads data from the data file to which the error detection code is added and performs processing, when the data file is stored in a readable / writable memory, the predetermined data is read from the data file, Data that verifies the error detection code of the data file after the data is written back after the read data is written back to the original location, and determines that the read data has been tampered with if there is an error in the data file A data falsification detection method characterized by executing falsification detection processing. 前記セキュリティトークンのCPUは、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄検知処理を実行することを特徴とする、請求項3に記載したデータ改竄検知方法。   When the CPU of the security token reads data from the data file, if the data file is stored in a predetermined memory, the CPU copies the data file stored in the predetermined memory to the RAM, The error detection code of the data file copied to the RAM is verified, and only when there is no error in the data file copied to the RAM, processing is performed using the data file copied to the RAM, and from the data file copied to the RAM, 4. The data falsification detection method according to claim 3, wherein the data falsification detection process is executed when reading data. 誤り検出符号が付加されたデータファイルからデータを読み出して処理を行う際、前記データファイルが読み書き可能なメモリに格納されている場合、前記データファイルから所定のデータを読み出し、読み出したデータを元の場所に書き戻した後、データを書き戻した後の前記データファイルの誤り検出符号を検証し、前記データファイルに誤りがある場合、読み出したデータが改竄されたと判定するデータ改竄検知処理を実行する制御手段として、セキュリティトークンのCPUを機能させるためのコンピュータプログラム。   When processing is performed by reading data from a data file to which an error detection code is added, if the data file is stored in a readable / writable memory, predetermined data is read from the data file and the read data is restored to the original data. After writing back to the location, the error detection code of the data file after writing back the data is verified, and if there is an error in the data file, a data falsification detection process is performed to determine that the read data has been falsified A computer program for causing a security token CPU to function as control means. 前記制御手段は、前記データファイルからデータを読み出す際、前記データファイルが所定のメモリに格納されている場合、前記所定のメモリに格納されている前記データファイルをRAMにコピーした後、RAMにコピーした前記データファイルの誤り検出符号を検証し、RAMにコピーした前記データファイルに誤りがない場合のみ、RAMにコピーした前記データファイルを用いて処理を行い、RAMにコピーした前記データファイルからデータを読み出す際、前記データ改竄判定処理を実行することを特徴とする、請求項5に記載したコンピュータプログラム。
When the data is stored in a predetermined memory when reading data from the data file, the control means copies the data file stored in the predetermined memory to the RAM and then copies the data file to the RAM. The error detection code of the data file is verified, and only when there is no error in the data file copied to the RAM, processing is performed using the data file copied to the RAM, and the data is copied from the data file copied to the RAM. 6. The computer program according to claim 5, wherein the data alteration determination process is executed when reading.
JP2012198438A 2012-09-10 2012-09-10 Security token, data falsification detection method, and computer program Active JP5949357B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012198438A JP5949357B2 (en) 2012-09-10 2012-09-10 Security token, data falsification detection method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012198438A JP5949357B2 (en) 2012-09-10 2012-09-10 Security token, data falsification detection method, and computer program

Publications (2)

Publication Number Publication Date
JP2014052955A true JP2014052955A (en) 2014-03-20
JP5949357B2 JP5949357B2 (en) 2016-07-06

Family

ID=50611356

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012198438A Active JP5949357B2 (en) 2012-09-10 2012-09-10 Security token, data falsification detection method, and computer program

Country Status (1)

Country Link
JP (1) JP5949357B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016126696A (en) * 2015-01-08 2016-07-11 大日本印刷株式会社 Electronic information storage medium, abnormality detection method, and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1097427A (en) * 1996-09-20 1998-04-14 Fujitsu Ltd Program transfer system
JP2005045760A (en) * 2003-07-24 2005-02-17 Hitachi Ltd Cipher processing method and device thereof
US20070277241A1 (en) * 2006-05-26 2007-11-29 Rolf Repasi Method and system to scan firmware for malware
JP2009187411A (en) * 2008-02-08 2009-08-20 Nidec Sankyo Corp Unauthorized act prevention method
US20100301896A1 (en) * 2009-05-29 2010-12-02 Infineon Technologies Ag Phase-change memory security device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1097427A (en) * 1996-09-20 1998-04-14 Fujitsu Ltd Program transfer system
JP2005045760A (en) * 2003-07-24 2005-02-17 Hitachi Ltd Cipher processing method and device thereof
US20070277241A1 (en) * 2006-05-26 2007-11-29 Rolf Repasi Method and system to scan firmware for malware
JP2009187411A (en) * 2008-02-08 2009-08-20 Nidec Sankyo Corp Unauthorized act prevention method
US20100301896A1 (en) * 2009-05-29 2010-12-02 Infineon Technologies Ag Phase-change memory security device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016126696A (en) * 2015-01-08 2016-07-11 大日本印刷株式会社 Electronic information storage medium, abnormality detection method, and program

Also Published As

Publication number Publication date
JP5949357B2 (en) 2016-07-06

Similar Documents

Publication Publication Date Title
CN111095213B (en) Secure boot method, device, equipment and storage medium for embedded program
US8555390B2 (en) Method and device for protection of a microcircuit against attacks
JP5200664B2 (en) Fault attack detection method, security device, and computer program for falsifying memory contents
JP5254372B2 (en) Data processing method and apparatus
WO2017097042A1 (en) Secure chip, and nonvolatile storage control device and method for same
JP4822231B2 (en) Fault detection due to long perturbations
JP5718373B2 (en) Method for inspecting a memory block of a non-volatile memory
JP6922329B2 (en) Security device with tamper resistance against failure use attacks
KR102324328B1 (en) security element
EP1739587A1 (en) Portable electronic apparatus and secured data output method therefor
US10725935B2 (en) Method for writing in a non-volatile memory of an electronic entity, and related electronic entity
JP5949357B2 (en) Security token, data falsification detection method, and computer program
JP2009259126A (en) Method for detecting fault attack and security device
JP2020009305A (en) IC chip, IC card and program
JP6396119B2 (en) IC module, IC card, and IC card manufacturing method
JP5724387B2 (en) Portable device and dynamic data storage position changing method
JP2008204085A (en) Semiconductor memory
JP5082782B2 (en) Data processing method, IC card, and IC card program
EP3460702A1 (en) Method to detect an attack by fault injection on a sensitive operation
JP6424633B2 (en) Electronic information storage medium, abnormality detection method, and program
JP2018163446A (en) Electronic information storage medium, ic card, tampering check method, and tampering check program
JP5200686B2 (en) Information processing apparatus, normal processing determination method, and information processing program
JP6387767B2 (en) Electronic information recording medium, IC card, check method, and processing program
JP2014175758A (en) Ic card and processing method thereof
JP2015082233A (en) Security token and handler routine execution method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160420

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160523

R150 Certificate of patent or registration of utility model

Ref document number: 5949357

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150