JP2018169694A - Security device having tamper resistance against failure utilization attack - Google Patents

Security device having tamper resistance against failure utilization attack Download PDF

Info

Publication number
JP2018169694A
JP2018169694A JP2017065047A JP2017065047A JP2018169694A JP 2018169694 A JP2018169694 A JP 2018169694A JP 2017065047 A JP2017065047 A JP 2017065047A JP 2017065047 A JP2017065047 A JP 2017065047A JP 2018169694 A JP2018169694 A JP 2018169694A
Authority
JP
Japan
Prior art keywords
secret
executable code
memory
operation module
security device
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
JP2017065047A
Other languages
Japanese (ja)
Other versions
JP6922329B2 (en
Inventor
豊 山石
Yutaka Yamaishi
豊 山石
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 JP2017065047A priority Critical patent/JP6922329B2/en
Publication of JP2018169694A publication Critical patent/JP2018169694A/en
Application granted granted Critical
Publication of JP6922329B2 publication Critical patent/JP6922329B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a security device which is configured such that a memory position where a computer program for conducting a secret operation is mounted is changed every time the secret operation is conducted.SOLUTION: A security device 1 includes: a nonvolatile memory (ROM122) which stores a secret operation module executable code 100 for conducting a secret operation; and a secret operation control unit 101 which determines at random a memory position for arranging the secret operation module executable code 100 among the memory allowing read and write of data, when call of the secret operation module executable code 100 is received from superordinate software 11, loads the secret operation module executable code 100 stored in the nonvolatile memory to the memory position, then executes the secret operation module executable code 100 loaded to the memory position, and transfers the execution result of the secret operation module executable code 100 loaded to the memory position to the superordinate software 11.SELECTED DRAWING: Figure 1

Description

本発明は,暗号鍵を用いた暗号演算など,秘密データを用いた秘匿演算処理を行う秘匿演算モジュールを実装したセキュリティデバイスに関し,更に詳しくは,故障利用攻撃に対する秘匿演算モジュールの耐タンパー性を高める技術に関する。   The present invention relates to a security device in which a secret operation module that performs a secret operation processing using secret data, such as cryptographic operation using an encryption key, and more particularly, to improve the tamper resistance of the secret operation module against a failure use attack. Regarding technology.

秘密鍵を用いた暗号演算など,外部に秘匿にする秘密データを用いる演算処理である秘匿演算処理を行うセキュリティデバイスは,暗号演算で用いる暗号鍵など,秘匿演算処理で用いる秘密データを秘匿に記憶する。通常,セキュリティデバイスに記憶された秘密データは外部から読み出せないが,セキュリティデバイスに記憶された秘密データを不正に読み出す様々な攻撃方法が提案されている。   A security device that performs a secret calculation process, which is a calculation process that uses secret data that is kept secret outside, such as a cryptographic operation using a secret key, stores secret data used in the secret calculation process, such as a cryptographic key used in the cryptographic calculation, in a secret manner. To do. Normally, the secret data stored in the security device cannot be read from the outside, but various attack methods have been proposed for illegally reading the secret data stored in the security device.

非特許文献1に記載があるように,セキュリティデバイスに記憶された秘密データを不正に読み出す攻撃方法は,セキュリティデバイスに実装されたICチップ(Integrated Circuit)の破壊を必要とする破壊攻撃と,セキュリティデバイスに実装されたICチップの破壊を必要としない非破壊攻撃に分類でき,更に,非破壊攻撃は,外部から観測可能なセキュリティデバイスのサイドチャネルを観測するサイドチャネル攻撃と,意図的なエラーを暗号演算中に発生させる故障利用攻撃に分類できる。サイドチャネル攻撃は,セキュリティデバイスに対する重要な脅威の一つになるが,本発明では,非破壊攻撃の一つである故障利用攻撃を対象とする。   As described in Non-Patent Document 1, an attack method for illegally reading out secret data stored in a security device includes a destructive attack that requires destruction of an IC chip (Integrated Circuit) mounted on the security device, and security. It can be classified as a non-destructive attack that does not require the destruction of the IC chip mounted on the device. Furthermore, the non-destructive attack includes a side channel attack that observes the side channel of the security device that can be observed from the outside, and an intentional error. It can be classified as a failure-use attack that occurs during cryptographic operations. The side channel attack is one of the important threats to the security device, but the present invention targets a failure use attack that is one of non-destructive attacks.

非破壊攻撃に一つである故障利用攻撃とは,通常はありえない外部刺激を加える操作を秘匿演算処理中のセキュリティデバイスに行うことで,意図的な演算エラーをセキュリティデバイスに発生させ,セキュリティデバイスに記憶された秘密データを不正に読み取ろうとする攻撃方法である。通常はありえない外部刺激としては,パルス状の電源ノイズ,周波数が定格外のクロック信号,電磁波およびレーザー照射などがある。   A failure-use attack, which is one of the non-destructive attacks, is an operation that applies an external stimulus, which is not possible, to the security device that is performing the confidential calculation process, causing an intentional calculation error in the security device. This is an attack method that attempts to read stored secret data illegally. External stimuli that are not usually possible include pulsed power supply noise, clock signals whose frequency is not rated, electromagnetic waves, and laser irradiation.

非破壊攻撃の一つである故障利用攻撃に対する対策として,特許文献1には,同一処理の二度以上の計算の実施や逆算による処理の検算が推奨されるとの記載があり,特許文献1に係る発明では,代表的な秘匿演算の一つである暗号演算の逆算を行って検算を行う場合,暗号演算の逆算において最終的に用いた暗号鍵が当初の演算で最初に用いた暗号鍵に一致するかを検証する。   As a countermeasure against a failure-use attack that is one of non-destructive attacks, Patent Document 1 describes that it is recommended to perform two or more calculations of the same process or to verify the process by back calculation. In the invention according to the present invention, when the verification is performed by performing the reverse operation of the cryptographic operation, which is one of the typical secret operations, the encryption key finally used in the reverse operation of the cryptographic operation is the encryption key used first in the initial operation. Verify whether it matches.

特許第5483838号公報Japanese Patent No. 5483838

“平成15年度セキュリティ評価技術等に関する調査研究 「システムLSIのセキュリティ評価」に関する調査研究報告書",平成16年3月31日,電子商取引安全技術研究組合“Survey and Research on“ Security Evaluation of System LSI ”for FY2003 Security Evaluation Technology”, March 31, 2004, Electronic Commerce Safety Technology Research Association

しかしながら,上記の対策を実施したとしても,暗号演算などの秘匿演算を行うコンピュータプログラムが実装されているメモリ位置を特定し,特定したメモリ位置にレーザー光などを照射して,同一の誤動作を複数回誘発すれば,秘匿演算に用いる秘密データ(例えば,暗号鍵)を推定することは可能である。   However, even if the above measures are implemented, a memory location where a computer program that performs a secret operation such as a cryptographic operation is identified and a laser beam or the like is irradiated to the identified memory location. If triggered once, it is possible to estimate secret data (for example, encryption key) used for the secret calculation.

そこで,本発明は,暗号演算などの秘匿演算を行うモジュールの実行可能コードを配置するメモリ位置が秘匿演算ごとに変わるように構成されたセキュリティデバイスを提供することを目的とする。   Therefore, an object of the present invention is to provide a security device configured such that a memory location where an executable code of a module that performs a secret operation such as a cryptographic operation is arranged is changed for each secret operation.

上述した課題を解決する本発明は,秘密データを用いた秘匿演算処理を行う秘匿演算モジュールの実行可能コードを記憶した不揮発性メモリと,セキュリティ機能をユーザに提供する上位ソフトウェアから前記秘匿演算モジュールの実行可能コードの呼出しを受けると,データの読み書き可能なメモリの中から,前記秘匿演算モジュールの実行可能コードを配置するメモリ位置をランダムに決定し,不揮発性メモリに記憶された前記秘匿演算モジュールの実行可能コードを前記メモリ位置にロードした後,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードを実行し,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードの実行結果を前記上位ソフトウェアに引き渡す秘匿演算制御部を備えたことを特徴とするセキュリティデバイスである。   The present invention that solves the above-described problems includes a non-volatile memory that stores an executable code of a secret calculation module that performs a secret calculation process using secret data, and a high-level software that provides a user with a security function. When a call to the executable code is received, a memory location in which the executable code of the secret calculation module is arranged is randomly determined from the data readable / writable memory, and the secret calculation module stored in the nonvolatile memory is stored. After the executable code is loaded into the memory location, the executable code of the secret computation module loaded into the memory location is executed, and the execution result of the executable code of the secret computation module loaded into the memory location is It is equipped with a secret calculation control unit that is handed over to software. It is a security device that.

更に,第2の発明は,第1の発明に記載したセキュリティデバイスにおいて,前記秘匿演算モジュールが行う秘匿演算処理を,暗号鍵を前記秘密データとする暗号演算処理としたことを特徴とする。   Furthermore, the second invention is characterized in that, in the security device described in the first invention, the secret operation processing performed by the secret operation module is an encryption operation processing using an encryption key as the secret data.

更に,第3の発明は,第1の発明または第2の発明に記載したセキュリティデバイスにおいて,不揮発性メモリに記憶する前記秘匿演算モジュールの実行可能コードにチェックコードを付加し,前記秘匿演算制御部は,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードから算出したチェックコードと,不揮発性メモリに記憶された前記秘匿演算モジュールの実行可能コードに付加されたチェックコードを照合し,チェックコードの照合に失敗すると,エラーコードを前記上位ソフトウェアに引き渡すことを特徴とする。   Furthermore, a third invention is the security device according to the first or second invention, wherein a check code is added to an executable code of the secret operation module stored in a nonvolatile memory, and the secret operation control unit Check the check code calculated from the executable code of the secret operation module loaded in the memory location and the check code added to the executable code of the secret operation module stored in the non-volatile memory, If the verification fails, an error code is delivered to the upper software.

本発明に係るセキュリティデバイスによれば,セキュリティデバイスの秘匿演算制御部は秘匿演算モジュールの実行可能コードをロードするメモリ位置をランダムに決定するため,秘密データを用いた秘匿演算処理を行う秘匿演算モジュールの実行可能コードのメモリ位置は秘匿演算処理を行うごとに異なることになる。秘匿演算モジュールの実行可能コードのメモリ位置が秘匿演算ごとに異なれば,攻撃者は,秘匿演算モジュールのメモリ位置を特定して行う故障利用攻撃を実施できないため,暗号鍵などの秘密データがセキュリティデバイスの外部へ漏洩してしまうことを防止できる。   According to the security device of the present invention, the secret operation control unit of the security device performs the secret operation processing using the secret data in order to randomly determine the memory location where the executable code of the secret operation module is loaded. The memory location of the executable code is different every time the secret calculation process is performed. If the memory location of the executable code of the cipher operation module is different for each cipher operation, the attacker cannot perform a failure use attack that specifies the memory location of the cipher operation module. Can be prevented from leaking outside.

セキュリティデバイスの構成を説明する図。The figure explaining the structure of a security device. セキュリティデバイスが備えるハードウェアを説明する図。The figure explaining the hardware with which a security device is provided. 秘匿演算制御部の動作を説明する図。The figure explaining operation | movement of a secrecy calculation control part. セキュリティデバイスのメモリ状態を説明する図。The figure explaining the memory state of a security device. セキュリティデバイスの形態を説明する図。The figure explaining the form of a security device.

ここから,本発明の好適な実施形態を記載する。なお,以下の記載は本発明の技術的範囲を束縛するものでなく,理解を助けるために記述するものである。   From here, preferred embodiments of the present invention will be described. The following description is not intended to limit the technical scope of the present invention, but is provided to aid understanding.

図1は,本実施形態に係るセキュリティデバイス1の構成を説明する図である。本実施形態に係るセキュリティデバイス1は,下位層から順に,ハードウェア12,オペレーティングシステム10(OS: Operating System)および上位ソフトウェア11を備える。   FIG. 1 is a diagram illustrating the configuration of the security device 1 according to the present embodiment. The security device 1 according to the present embodiment includes hardware 12, an operating system 10 (OS: Operating System), and upper software 11 in order from the lower layer.

図2は,本実施形態に係るセキュリティデバイス1が備えるハードウェア12を説明する図である。図2で図示したように,本実施形態に係るセキュリティデバイス1は,ハードウェア12として,データの入出力を行うI/O125,各種演算を行うCPU120(Central Processing Unit),電気的に書き換え可能な揮発性メモリであるRAM121(Random Access Memory),電気的に書き換えできない不揮発性メモリであるROM122(Read-Only Memory),電気的に書き換え可能な不揮発性メモリであるNVM123(Non-volatile memory)に加え,コプロセッサとして,暗号演算機能に特化した暗号演算回路124を備える。   FIG. 2 is a diagram illustrating the hardware 12 included in the security device 1 according to the present embodiment. As illustrated in FIG. 2, the security device 1 according to this embodiment includes, as hardware 12, an I / O 125 that inputs and outputs data, a CPU 120 (Central Processing Unit) that performs various operations, and an electrically rewritable device. In addition to RAM 121 (Random Access Memory), which is a volatile memory, ROM 122 (Read-Only Memory), which is an electrically rewritable nonvolatile memory, and NVM 123 (Non-volatile memory), which is an electrically rewritable nonvolatile memory As a coprocessor, a cryptographic operation circuit 124 specialized for the cryptographic operation function is provided.

本実施形態に係るセキュリティデバイス1が備える上位ソフトウェア11は,秘密データを用いた秘匿演算処理を利用したセキュリティ機能をユーザに提供するためのコンピュータプログラムで,具体的には,アプリケーションやミドルウェアである。上位ソフトウェア11によってユーザに提供されるセキュリティ機能は任意でよい。例えば,暗号演算を利用したセキュリティ機能として,メッセージの暗号化・復号,デジタル署名の生成・認証およびユーザ認証などが考えられる。なお,本実施形態において,上位ソフトウェア11は,セキュリティデバイス1が有する不揮発性メモリ(ここでは,ROM122またはNVM123)に実装されている。   The host software 11 provided in the security device 1 according to the present embodiment is a computer program for providing a user with a security function using a secret calculation process using secret data, and specifically, is an application or middleware. The security function provided to the user by the upper software 11 may be arbitrary. For example, message encryption / decryption, digital signature generation / authentication, and user authentication can be considered as security functions using cryptographic operations. In the present embodiment, the upper software 11 is mounted on a nonvolatile memory (here, ROM 122 or NVM 123) included in the security device 1.

本実施形態に係るセキュリティデバイス1が備えるOS10は,セキュリティデバイス1の内部におけるコンピュータプログラムの実行を制御するソフトウェアである。本実施形態において,OS10は,秘密データを用いた秘匿演算処理を行う秘匿演算モジュールの実行可能コード100と,上位ソフトウェア11が秘匿演算モジュールの実行可能コード100を利用するための機能を提供する秘匿演算制御部101を有し,本実施形態において,OS10は,セキュリティデバイス1が有する不揮発性メモリの一つであるROM122に実装されている。   The OS 10 included in the security device 1 according to the present embodiment is software that controls execution of a computer program inside the security device 1. In this embodiment, the OS 10 provides a secret calculation module executable code 100 that performs a secret calculation process using secret data, and a secret that provides a function for the upper software 11 to use the secret calculation module executable code 100. In this embodiment, the OS 10 is mounted on a ROM 122 that is one of nonvolatile memories included in the security device 1.

秘匿演算モジュールの実行可能コード100とは,CPU120が解釈実行可能なコードを意味し,本実施形態ではROM122にOS10を実装しているため,OS10が有する秘匿演算モジュールの実行可能コード100も,セキュリティデバイス1が有する不揮発性メモリの一つであるROM122に実装され,秘匿演算モジュールの実行可能コード100にはチェックコードを付加している。なお,秘匿演算モジュールの実行可能コード100は,ROM122ではなくNVM123に実装させることもできる。   The executable code 100 of the secret operation module means a code that can be interpreted and executed by the CPU 120. In this embodiment, the OS 10 is mounted on the ROM 122, and therefore the executable code 100 of the secret operation module included in the OS 10 is also a security. The check code is added to the executable code 100 of the secret operation module, which is mounted on the ROM 122 which is one of the nonvolatile memories of the device 1. Note that the executable code 100 of the secret operation module can be mounted not on the ROM 122 but on the NVM 123.

秘匿演算モジュールの実行可能コード100が行う秘匿演算処理の内容は任意でよいが,本実施形態において,秘匿演算モジュールの実行可能コード100は,暗号演算回路124を利用して所定のアルゴリズムに従う暗号演算処理を実行する。なお,暗号アルゴリズムとしては,DES(Data Encryption Standard),AES(Advanced Encryption Standard)および公開鍵暗号などが挙げられる。   The contents of the secret calculation process performed by the executable code 100 of the secret calculation module may be arbitrary, but in this embodiment, the executable code 100 of the secret calculation module uses the cryptographic calculation circuit 124 to perform a cryptographic operation according to a predetermined algorithm. Execute the process. Examples of encryption algorithms include DES (Data Encryption Standard), AES (Advanced Encryption Standard), and public key encryption.

OS10が有する秘匿演算制御部101は,CPU120を動作させるコンピュータプログラムにより実現される機能で,秘匿演算モジュールの実行可能コード100を利用するためのAPI(Application Programming Interface)を上位ソフトウェア11に提供し,上位ソフトウェア11から秘匿演算モジュールの実行可能コード100の呼出しを受けると,故障利用攻撃に対する耐タンパー性が高まるように秘匿演算モジュールの実行可能コード100を実行する。   The secret calculation control unit 101 included in the OS 10 is a function realized by a computer program that operates the CPU 120, and provides an API (Application Programming Interface) for using the executable code 100 of the secret calculation module to the upper software 11. When the call of the executable code 100 of the secret operation module is received from the upper software 11, the executable code 100 of the secret operation module is executed so that the tamper resistance against the failure use attack is enhanced.

図3は,本実施形態に係る秘匿演算制御部101の動作を説明する図である。本実施形態に係る秘匿演算制御部101が提供しているAPIを利用して,上位ソフトウェア11から秘匿演算モジュールの実行可能コード100の呼出しを受けると(S1),秘匿演算制御部101は,セキュリティデバイス1が有するデータの読み書き可能なメモリの中から,秘匿演算モジュールの実行可能コード100をロードするメモリ位置をランダムに決定する処理を行う(S2)。図2で説明したように,本実施形態に係るセキュリティデバイス1は,データの読み書き可能なメモリとしてRAM121とNVM123を有しているため,本実施形態に係る秘匿演算制御部101は,秘匿演算モジュールの実行可能コード100をロードするメモリとしてRAM121またはNVM123のいずれか一つをランダムに決定し,更に,ランダム決定したメモリの空き領域の中から,秘匿演算モジュールの実行可能コード100に対応したサイズの領域をランダムに決定することで,秘匿演算モジュールの実行可能コード100をロードするメモリ位置をランダムに決定する。なお,メモリなどをランダムに決定する際,乱数を用いることが一般的である。   FIG. 3 is a diagram for explaining the operation of the confidential calculation control unit 101 according to the present embodiment. When the API provided by the secret operation control unit 101 according to the present embodiment is used to receive a call to the executable code 100 of the secret operation module 100 from the upper software 11 (S1), the secret operation control unit 101 A process of randomly determining a memory position for loading the executable code 100 of the secret operation module from the data readable / writable memory of the device 1 is performed (S2). As described with reference to FIG. 2, the security device 1 according to the present embodiment includes the RAM 121 and the NVM 123 as data readable / writable memories. Therefore, the secret calculation control unit 101 according to the present embodiment includes a secret calculation module. One of the RAM 121 and the NVM 123 is randomly determined as a memory for loading the executable code 100, and a size corresponding to the executable code 100 of the secret operation module is selected from the randomly determined memory free area. By determining the region at random, the memory location for loading the executable code 100 of the secret operation module is determined at random. Note that random numbers are generally used when determining memory randomly.

次に,本実施形態に係る秘匿演算制御部101は,S2において決定したメモリ位置に,秘匿演算モジュールの実行可能コード100(チェックコードは含まない)をロードする処理を実行する(S3)。本実施形態において,秘匿演算モジュールの実行可能コード100はROM122に記憶されているので,ROM122に記憶されている秘匿演算モジュールの実行可能コード100が,S2において決定したメモリ位置にロードされることになる。   Next, the secret calculation control unit 101 according to the present embodiment executes a process of loading the secret calculation module executable code 100 (not including the check code) into the memory location determined in S2 (S3). In this embodiment, since the executable code 100 of the secret operation module is stored in the ROM 122, the executable code 100 of the secret operation module stored in the ROM 122 is loaded into the memory location determined in S2. Become.

次に,本実施形態に係る秘匿演算制御部101は,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100を実行する処理を実行する(S4)。例えば,秘匿演算制御部101は,S2において決定したメモリ位置の先頭アドレスを呼び出すことで,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100を実行する。   Next, the secret calculation control unit 101 according to the present embodiment executes a process of executing the executable code 100 of the secret calculation module loaded in the memory location determined in S2 (S4). For example, the cipher operation control unit 101 executes the executable code 100 of the cipher operation module loaded in the memory location determined in S2 by calling the head address of the memory location determined in S2.

S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100の実行が終了すると,本実施形態に係る秘匿演算制御部101は,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100から算出したチェックコードと,不揮発性メモリ(ここでは,ROM122)に記憶されている秘匿演算モジュールの実行可能コード100に付加されたチェックコードを照合することで,実際に暗号演算を行った秘匿演算モジュールの実行可能コード100の正当性,すなわち,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100の正当性を検証する処理を実行する(S5)。S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100の正当性を検証することで,故障利用攻撃により,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100の内容に変更があったか否かを判定できる。正当性検証に失敗すると,エラーコードを上位ソフトウェア11に引き渡すことで,故障利用攻撃が行われても暗号演算結果が攻撃者に渡ることはない。なお,チェックコードは任意でよいが,例えば,チェックコードをチェックサムの場合,秘匿演算モジュールの実行可能コード100をデータ列とみなして各列の総和をから,秘匿演算モジュールの実行可能コード100のチェックサムを算出できる。   When the execution of the executable code 100 of the secret operation module loaded in the memory location determined in S2 is completed, the secret operation control unit 101 according to the present embodiment can execute the secret operation module loaded in the memory location determined in S2. The check code calculated from the code 100 and the check code added to the executable code 100 of the secret calculation module stored in the non-volatile memory (in this case, the ROM 122) are collated to actually perform the cryptographic calculation. A process of verifying the validity of the executable code 100 of the secret operation module, that is, the validity of the executable code 100 of the secret operation module loaded in the memory location determined in S2 is executed (S5). By verifying the validity of the executable code 100 of the secret operation module loaded in the memory location determined in S2, the contents of the executable code 100 of the secret operation module loaded in the memory location determined in S2 due to the failure use attack It can be determined whether or not there has been a change. If the validity verification fails, the error code is delivered to the upper software 11 so that the cryptographic operation result is not delivered to the attacker even if a failure use attack is performed. Although the check code may be arbitrary, for example, when the check code is a checksum, the executable code 100 of the secret calculation module is regarded as a data string, and the sum of each column is used to determine the executable code 100 of the secret calculation module. A checksum can be calculated.

本実施形態に係る秘匿演算制御部101は,秘匿演算モジュールの実行可能コード100の正当性検証結果に基づいて処理を分岐する(S6)。秘匿演算モジュールの実行可能コード100の正当性検証に成功した場合,秘匿演算制御部101は,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100はROM122に記憶されたものと一致する,すなわち,故障利用攻撃は実行されていないと判断し,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100を実行することで得られた暗号演算結果を秘匿演算モジュールの実行可能コード100の実行結果にセットする(S7a)。また,秘匿演算モジュールの実行可能コード100に付加されているチェックコードの検証結果が失敗の場合,秘匿演算制御部101は,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100はROM122に記憶されたものと一致しない,すなわち,故障利用攻撃が実行された可能性があると判断し,秘匿演算モジュールの実行に失敗したことを示すエラーコードを秘匿演算モジュールの実行可能コード100の実行結果にセットする(S7b)。   The secret calculation control unit 101 according to the present embodiment branches the process based on the validity verification result of the executable code 100 of the secret calculation module (S6). When the validity verification of the executable code 100 of the secret calculation module is successful, the secret calculation control unit 101 matches the executable code 100 of the secret calculation module loaded in the memory location determined in S2 with that stored in the ROM 122. That is, it is determined that the failure use attack has not been executed, and the encryption operation result obtained by executing the executable code 100 of the encryption operation module loaded in the memory location determined in S2 is executed by the encryption operation module. The execution result of the possible code 100 is set (S7a). If the verification result of the check code added to the executable code 100 of the secret calculation module fails, the secret calculation control unit 101 reads the executable code 100 of the secret calculation module loaded in the memory location determined in S2. It is determined that there is a possibility that a failure use attack has been executed, that is, it does not match that stored in the ROM 122, and an error code indicating that the execution of the secret operation module has failed is executed. An execution result is set (S7b).

次に,本実施形態に係る秘匿演算制御部101は,S2において決定したメモリ位置にロードした秘匿演算モジュールの実行可能コード100を消去する処理を実行した後(S8),秘匿演算モジュールの実行可能コード100の実行結果を上位ソフトウェア11へ引き渡して(S9),図3で図示した手順は終了する。   Next, after executing the process of erasing the executable code 100 of the secret calculation module loaded in the memory location determined in S2 (S8), the secret calculation control unit 101 according to the present embodiment can execute the secret calculation module. The execution result of the code 100 is transferred to the upper software 11 (S9), and the procedure illustrated in FIG.

図4は,セキュリティデバイス1のメモリ状態を説明する図である。図4(a)では,秘匿演算モジュールの実行可能コード100の呼出しを受ける前におけるメモリの状態を示し,秘匿演算モジュールの実行可能コード100の呼出しを上位ソフトウェア11から受ける前,秘匿演算モジュールの実行可能コード100はROM122にのみ記憶された状態で,電気的に書き換え可能なメモリであるRAM121およびNVM123のいずれにも秘匿演算モジュールの実行可能コード100はロードされていない。図4(b)では,秘匿演算モジュールの実行可能コード100をロードするメモリにRAM121が決定されたときの状態を示し,秘匿演算制御部101が,秘匿演算モジュールの実行可能コード100をRAM121にロードすることで,秘匿演算モジュールの実行可能コード100は,ROM122に加え,RAM121にも記憶されている状態になる。なお,ROM122に記憶されている秘匿演算モジュールの実行可能コード100にはチェックコード(CC: Check Code)が付加されているが,RAM121に記憶された秘匿演算モジュールの実行可能コード100にはチェックコードが付加されていない。図4(c)では,秘匿演算モジュールの実行可能コード100をロードするメモリにNVM123が決定されたときの状態を示し,秘匿演算制御部101が,秘匿演算モジュールの実行可能コード100をNVM123に配置することで,秘匿演算モジュールの実行可能コード100は,ROM122に加え,NVM123にも記憶されている状態になる。なお,ROM122に記憶されている秘匿演算モジュールの実行可能コード100にはチェックコードが付加されているが,NVM123に記憶された秘匿演算モジュールの実行可能コード100にはチェックコードは付加されていない。図4(b)または図4(c)の状態で,秘匿演算モジュールが終了すると,RAM121またはNVM123にロードされた秘匿演算モジュールの実行可能コード100は,秘匿演算モジュールの実行可能コード100がロードされたメモリから削除され,図4(a)の状態に戻る。   FIG. 4 is a diagram for explaining the memory state of the security device 1. FIG. 4A shows the state of the memory before receiving the call of the executable code 100 of the secret operation module, and the execution of the secret operation module before receiving the call of the executable code 100 of the secret operation module from the upper software 11. The executable code 100 of the secret operation module is not loaded in either the RAM 121 or the NVM 123, which is an electrically rewritable memory, with the executable code 100 stored only in the ROM 122. FIG. 4B shows a state when the RAM 121 is determined in the memory for loading the executable code 100 of the secret calculation module, and the secret calculation control unit 101 loads the executable code 100 of the secret calculation module into the RAM 121. As a result, the executable code 100 of the secret operation module is stored in the RAM 121 in addition to the ROM 122. A check code (CC: Check Code) is added to the executable code 100 of the secret calculation module stored in the ROM 122, but the check code is added to the executable code 100 of the secret calculation module stored in the RAM 121. Is not added. FIG. 4C shows a state when the NVM 123 is determined in the memory for loading the executable code 100 of the secret calculation module, and the secret calculation control unit 101 places the executable code 100 of the secret calculation module in the NVM 123. As a result, the executable code 100 of the secret operation module is stored in the NVM 123 in addition to the ROM 122. Note that a check code is added to the executable code 100 of the secret calculation module stored in the ROM 122, but no check code is added to the executable code 100 of the secret calculation module stored in the NVM 123. When the secret operation module is terminated in the state of FIG. 4B or 4C, the executable code 100 of the secret operation module loaded into the RAM 121 or the NVM 123 is loaded with the executable code 100 of the secret operation module. The memory is deleted and the state returns to the state of FIG.

本実施形態に係る秘匿演算制御部101が,図3で示した手順を実行することで,秘匿演算モジュールの実行可能コード100を配置するメモリ位置は秘匿演算ごとに異なることになる。実際に暗号演算を行う秘匿演算モジュールの実行可能コード100のメモリ位置が秘匿演算ごとに異なれば,攻撃者が秘匿演算モジュールの実行可能コード100のメモリ位置を特定できないため,故障利用攻撃を用いて同一の誤動作を繰り返し誘発できず,暗号演算に用いる暗号鍵がセキュリティデバイス1の外部へ漏洩してしまうことを防止できる。   By executing the procedure shown in FIG. 3 by the secret calculation control unit 101 according to the present embodiment, the memory location where the executable code 100 of the secret calculation module is arranged differs for each secret calculation. If the memory location of the executable code 100 of the secret operation module that actually performs the cryptographic operation is different for each secret operation, the attacker cannot specify the memory location of the executable code 100 of the secret operation module. It is possible to prevent the same malfunction from being repeatedly induced and prevent the encryption key used for the cryptographic operation from leaking outside the security device 1.

最後に,本実施形態に係るセキュリティデバイス1の具体的な形態を説明する。図5は,セキュリティデバイス1の形態を説明する図である。本実施形態に係るセキュリティデバイス1の具体的な形態は任意で,例えば,本実施形態に係るセキュリティデバイス1は,図5(a)で図示したICカード1a,または,図5(b)で図示したインターネットバンク用のトークン1bにでき,更には,図5(c)で図示した大容量のメモリを有するUSBキー1cにも適用できる。   Finally, a specific form of the security device 1 according to the present embodiment will be described. FIG. 5 is a diagram for explaining the form of the security device 1. The specific form of the security device 1 according to the present embodiment is arbitrary. For example, the security device 1 according to the present embodiment is illustrated in the IC card 1a illustrated in FIG. 5A or illustrated in FIG. 5B. The token can be used for the Internet bank token 1b, and can also be applied to the USB key 1c having the large-capacity memory shown in FIG.

1 セキュリティデバイス
10 オペレーティングシステム
100 秘匿演算モジュールの実行可能コード
101 秘匿演算制御部
11 上位ソフトウェア
12 ハードウェア
121 RAM
122 ROM
123 NVM
DESCRIPTION OF SYMBOLS 1 Security device 10 Operating system 100 Executable code of secret calculation module 101 Secret calculation control part 11 Upper software 12 Hardware 121 RAM
122 ROM
123 NVM

Claims (3)

秘密データを用いた秘匿演算処理を行う秘匿演算モジュールの実行可能コードを記憶した不揮発性メモリと,
セキュリティ機能をユーザに提供する上位ソフトウェアから前記秘匿演算モジュールの実行可能コードの呼出しを受けると,データの読み書き可能なメモリの中から,前記秘匿演算モジュールの実行可能コードを配置するメモリ位置をランダムに決定し,不揮発性メモリに記憶された前記秘匿演算モジュールの実行可能コードを前記メモリ位置にロードした後,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードを実行し,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードの実行結果を前記上位ソフトウェアに引き渡す秘匿演算制御部を,
備えたことを特徴とするセキュリティデバイス。
A non-volatile memory storing executable code of a secret operation module that performs secret operation processing using secret data;
When the executable code of the secret operation module is called from the upper software that provides the security function to the user, the memory location where the executable code of the secret operation module is arranged is randomly selected from the data readable / writable memory. After the executable code of the cipher operation module stored in the non-volatile memory is loaded to the memory location, the executable code of the cipher operation module loaded to the memory location is executed and loaded to the memory location A secret computation control unit that delivers an execution result of the executable code of the secret computation module to the upper software;
A security device characterized by comprising.
前記秘匿演算モジュールが行う秘匿演算処理を,暗号鍵を前記秘密データとする暗号演算処理としたことを特徴とする,請求項1に記載したセキュリティデバイス。   2. The security device according to claim 1, wherein the secret calculation processing performed by the secret calculation module is cryptographic calculation processing using an encryption key as the secret data. 不揮発性メモリに記憶する前記秘匿演算モジュールの実行可能コードにチェックコードを付加し,前記秘匿演算制御部は,前記メモリ位置にロードした前記秘匿演算モジュールの実行可能コードから算出したチェックコードと,不揮発性メモリに記憶された前記秘匿演算モジュールの実行可能コードに付加されたチェックコードを照合し,チェックコードの照合に失敗すると,エラーコードを前記上位ソフトウェアに引き渡すことを特徴とする,請求項1または請求項2に記載したセキュリティデバイス。
A check code is added to the executable code of the secret calculation module stored in the nonvolatile memory, and the secret calculation control unit includes a check code calculated from the executable code of the secret calculation module loaded in the memory location, and a nonvolatile code The check code added to the executable code of the secret operation module stored in the memory is verified, and if the check code verification fails, the error code is delivered to the upper software. The security device according to claim 2.
JP2017065047A 2017-03-29 2017-03-29 Security device with tamper resistance against failure use attacks Active JP6922329B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017065047A JP6922329B2 (en) 2017-03-29 2017-03-29 Security device with tamper resistance against failure use attacks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017065047A JP6922329B2 (en) 2017-03-29 2017-03-29 Security device with tamper resistance against failure use attacks

Publications (2)

Publication Number Publication Date
JP2018169694A true JP2018169694A (en) 2018-11-01
JP6922329B2 JP6922329B2 (en) 2021-08-18

Family

ID=64020329

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017065047A Active JP6922329B2 (en) 2017-03-29 2017-03-29 Security device with tamper resistance against failure use attacks

Country Status (1)

Country Link
JP (1) JP6922329B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020039611A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039614A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039615A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039612A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003223234A (en) * 1994-08-10 2003-08-08 Fujitsu Ltd Information storing method and software player
JP2005157502A (en) * 2003-11-20 2005-06-16 Sony Corp Information processor and information processing method and computer program
WO2014049830A1 (en) * 2012-09-28 2014-04-03 富士通株式会社 Information processing device and semiconductor device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003223234A (en) * 1994-08-10 2003-08-08 Fujitsu Ltd Information storing method and software player
JP2005157502A (en) * 2003-11-20 2005-06-16 Sony Corp Information processor and information processing method and computer program
WO2014049830A1 (en) * 2012-09-28 2014-04-03 富士通株式会社 Information processing device and semiconductor device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020039611A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039614A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039615A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine
JP2020039612A (en) * 2018-09-11 2020-03-19 株式会社三洋物産 Game machine

Also Published As

Publication number Publication date
JP6922329B2 (en) 2021-08-18

Similar Documents

Publication Publication Date Title
CN111095213B (en) Secure boot method, device, equipment and storage medium for embedded program
US11018847B2 (en) Device keys protection
EP2854066B1 (en) System and method for firmware integrity verification using multiple keys and OTP memory
EP2728509B1 (en) Semiconductor Device and Encryption Key Writing Method
JP5200664B2 (en) Fault attack detection method, security device, and computer program for falsifying memory contents
JP6922329B2 (en) Security device with tamper resistance against failure use attacks
TW200832427A (en) Virtual secure on-chip one time programming
KR20180013854A (en) System and method for verifying the integrity of electronic devices
EP2876593B1 (en) Method of generating a structure and corresponding structure
CN109445705A (en) Firmware authentication method and solid state hard disk
KR102324328B1 (en) security element
Zhou et al. Smile: Secure memory introspection for live enclave
JP2007004456A (en) Portable electronic device and data output device of portable electronic device
CN108270767B (en) Data verification method
Urien Innovative countermeasures to defeat cyber attacks against blockchain wallets
JP2020009305A (en) IC chip, IC card and program
JP5724387B2 (en) Portable device and dynamic data storage position changing method
US10552602B2 (en) System and method for protecting a device against attacks on processing flow using a code pointer complement
JP2009015434A (en) Portable information processor and information processing program
Rosa The Decline and Dawn of Two-Factor Authentication on Smart Phones
EP4195579A1 (en) Asynchronous code execution for enhanced performance and security measures protecting digital security devices
JP2014175758A (en) Ic card and processing method thereof
JP6610002B2 (en) Arithmetic apparatus, arithmetic method, and arithmetic processing program
JP2014052955A (en) Security token, data falsification detection method, and computer program
JP2022124424A (en) Efficient data item authentication

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20201222

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210215

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210712

R150 Certificate of patent or registration of utility model

Ref document number: 6922329

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150