JP2016066860A - Storage device, method, and program - Google Patents

Storage device, method, and program Download PDF

Info

Publication number
JP2016066860A
JP2016066860A JP2014193697A JP2014193697A JP2016066860A JP 2016066860 A JP2016066860 A JP 2016066860A JP 2014193697 A JP2014193697 A JP 2014193697A JP 2014193697 A JP2014193697 A JP 2014193697A JP 2016066860 A JP2016066860 A JP 2016066860A
Authority
JP
Japan
Prior art keywords
data
secret data
mask
mask value
storage 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
JP2014193697A
Other languages
Japanese (ja)
Other versions
JP6249915B2 (en
Inventor
有登 仲野
Aritaka Nakano
有登 仲野
清本 晋作
Shinsaku Kiyomoto
晋作 清本
三宅 優
Masaru Miyake
優 三宅
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.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2014193697A priority Critical patent/JP6249915B2/en
Publication of JP2016066860A publication Critical patent/JP2016066860A/en
Application granted granted Critical
Publication of JP6249915B2 publication Critical patent/JP6249915B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a storage device, method, and program for keeping data secret suitably for access pattern protection.SOLUTION: A storage device 10 associates secret data with a mask value used for generating the secret data to store the data and the mask value in a main memory 30 that is an ORAM. The storage device 10, when a request to read out secret data is detected, removes a mask from the secret data by using a mask value storing in association with the secret data to extract original data. The storage device 10, when a writing request is detected, performs masking based on a new random number on the original data of a target to generate new secret data; associates the new secret data with a mask value used for generating the new secret data to store the new secret data and the mask value in the main memory 30 while storing the association in an association table 21.SELECTED DRAWING: Figure 1

Description

本発明は、記憶装置、方法及びプログラムに関する。   The present invention relates to a storage device, a method, and a program.

近年、暗号に対するサイドチャネル攻撃と呼ばれる攻撃が大きな問題となっている。ソフトウェアに対するサイドチャネル攻撃として、メモリアクセスを解析し秘密情報を復元する攻撃がある。そこで、メモリアクセスのパターンを攻撃者から保護するために、Oblivious RAM(ORAM)の技術や、非特許文献1及び特許文献1に開示されている技術が提案されている。   In recent years, attacks called side channel attacks against cryptography have become a major problem. As a side channel attack against software, there is an attack that analyzes memory access and restores secret information. Therefore, in order to protect the memory access pattern from an attacker, the technique of Obvious RAM (ORAM) and the techniques disclosed in Non-Patent Document 1 and Patent Document 1 have been proposed.

非特許文献1などで検討されている方式やORAMによるメモリの保護は、安全な暗号方式によってデータが保護されているとの前提のもとに、アクセスのパターンを保護することでメモリ上のデータを秘匿している。   The protection of the memory by the method examined in Non-Patent Document 1 or the like or the ORAM is based on the assumption that the data is protected by a secure encryption method, and the data on the memory is protected by protecting the access pattern. Is concealed.

特開2013−246698号公報JP 2013-246698 A

Oded Goldreich and Rafail Ostrovsky,“Software protection and simulation on oblivious rams,”J. ACM, 43(3):431−473,1996Odded Goldrich and Rafir Ostrovsky, “Software protection and simulation on oblivious rams”, “J. ACM, 43 (3): 431-473, 1996

しかしながら、アクセスパターン保護に伴うデータの秘匿において、従来の暗号アルゴリズムをそのまま使用する方法は、鍵管理の煩雑性などから現実的ではない。
そこで、アクセスパターン保護に適したデータの秘匿をする装置が求められている。
However, a method of using a conventional encryption algorithm as it is in concealing data accompanying access pattern protection is not practical because of the complexity of key management.
Therefore, there is a demand for an apparatus for concealing data suitable for access pattern protection.

本発明は、アクセスパターン保護に適したデータの秘匿をする記憶装置、方法及びプログラムを提供することを目的とする。   An object of the present invention is to provide a storage device, method, and program for concealing data suitable for access pattern protection.

具体的には、以下のような解決手段を提供する。
(1) データに対するアクセスのパターンを保護するアクセスパターン保護手段を有するメモリに、データを秘匿して記憶する記憶装置であって、乱数を生成する乱数生成手段と、データに、前記乱数に基づくマスク値を用いてマスクをして秘匿データを作成し、又はマスクをしたときのマスク値を用いて、前記秘匿データからマスクを外すマスク処理手段と、前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる記憶制御手段と、を備え、前記記憶制御手段は、前記メモリ上の前記秘匿データに対するアクセスが検出された場合に、前記秘匿データから、前記秘匿データに対応付けて記憶されたマスク値を用いて前記マスク処理手段によりマスクを外し、元のデータを取り出す、記憶装置。
Specifically, the following solutions are provided.
(1) A storage device that conceals and stores data in a memory having an access pattern protection unit that protects an access pattern to the data, the random number generation unit that generates a random number, and a mask based on the random number in the data Masked using a value to create secret data, or mask processing means for removing the mask from the secret data using the mask value when masked, and used to create the secret data and the secret data Storage control means for associating the mask value with each other and storing it in the memory by the access pattern protection means, and the storage control means, when access to the confidential data on the memory is detected, The mask processing means removes the mask from the secret data using the mask value stored in association with the secret data. Storage device that retrieves the original data.

(1)に係る記憶装置は、秘匿データ及び秘匿データの作成に用いられたマスク値を対応付けて、アクセスパターン保護によりメモリに記憶させる。さらに、(1)に係る記憶装置は、秘匿データに対するアクセスが検出された場合に、メモリに記憶された秘匿データから、秘匿データに対応付けて記憶されたマスク値を用いてマスク処理によりマスクを外し、元のデータを取り出す。   The storage device according to (1) associates the secret data and the mask value used to create the secret data, and stores them in the memory by access pattern protection. Furthermore, when access to the confidential data is detected, the storage device according to (1) masks the mask by mask processing using the mask value stored in association with the confidential data from the confidential data stored in the memory. Remove the original data.

アクセスパターン保護手段を有するメモリ(例えば、ORAM)では、データへのアクセスのパターンが秘匿されているため、攻撃者がメモリを監視している状況においても、どのデータがどの乱数によってマスクされているかは、攻撃者には不明である。
よって、(1)に係る記憶装置は、マスク値とデータとを同じメモリに安全に記憶させることができ、データそのものの秘匿化を高速に行うことができる。
したがって、(1)に係る記憶装置は、アクセスパターン保護に適したデータの秘匿をすることができる。
In a memory having an access pattern protection means (for example, ORAM), the access pattern to the data is kept secret, so which data is masked by which random number even when the attacker is monitoring the memory. Is unknown to the attacker.
Therefore, the storage device according to (1) can safely store the mask value and the data in the same memory, and can conceal the data itself at high speed.
Therefore, the storage device according to (1) can conceal data suitable for access pattern protection.

(2) 前記記憶制御手段は、前記秘匿データに対するアクセスが完了したことが検出されると、前記元のデータに、前記マスク処理手段によって新たな前記乱数に基づくマスクをさせて新たな前記秘匿データとし、新たな前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる、(1)に記載の記憶装置。   (2) When it is detected that the access to the confidential data is completed, the storage control means causes the original data to be masked based on the new random number by the mask processing means, and the new confidential data. The storage device according to (1), wherein the new secret data and the mask value used to create the secret data are associated with each other and stored in the memory by the access pattern protection unit.

(2)に係る記憶装置は、データをメインメモリに戻す場合、過去と異なる乱数でマスクをすることによってデータの値を変化させる。このことにより、(2)に係る記憶装置は、メインメモリを監視している攻撃者が、データに対するアクセスが読み出しであったのか、書き出しであったのかを、判別できないようにすることができる。
したがって、(2)に係る記憶装置は、攻撃者が読み出しと書き出しとのアクセスのパターンを判別できないようにすることによって、アクセスパターン保護に適したデータの秘匿をすることができる。
When returning the data to the main memory, the storage device according to (2) changes the value of the data by masking with a random number different from the past. As a result, the storage device according to (2) can prevent the attacker monitoring the main memory from determining whether the access to the data is a read or a write.
Therefore, the storage device according to (2) can conceal data suitable for access pattern protection by preventing an attacker from distinguishing between read and write access patterns.

(3) 前記マスク処理手段は、データとマスク値との排他的論理和の演算をする(1)又は(2)に記載の記憶装置。   (3) The storage device according to (1) or (2), wherein the mask processing unit performs an exclusive OR operation between data and a mask value.

(3)に係る記憶装置は、アクセスパターン保護に適したデータの秘匿を排他的論理和の演算で高速に処理することができる。   The storage device according to (3) can process data concealment suitable for access pattern protection at high speed by exclusive OR operation.

(4) 前記秘匿データを記憶する前記メモリのアドレスと、前記秘匿データの作成に用いられたマスク値を記憶する前記メモリのアドレスとを対応付ける対応テーブルをさらに備え、前記記憶制御手段は、前記対応テーブルに基づいて、前記秘匿データに対応するマスク値を取得する、(1)から(3)のいずれか一に記載の記憶装置。   (4) a correspondence table that associates the address of the memory that stores the secret data with the address of the memory that stores the mask value used to create the secret data; and the storage control unit includes the correspondence The storage device according to any one of (1) to (3), wherein a mask value corresponding to the confidential data is acquired based on a table.

(4)に係る記憶装置は、アクセスパターン保護に適したデータの秘匿を対応テーブルによって容易にすることができる。   The storage device according to (4) can facilitate concealment of data suitable for access pattern protection using the correspondence table.

(5) 前記メモリは、ORAM(Oblivious RAM)である(1)から(4)のいずれか一に記載の記憶装置。   (5) The storage device according to any one of (1) to (4), wherein the memory is an ORAM (Obvious RAM).

(5)に係る記憶装置は、ORAMのアクセスパターン保護に適したデータの秘匿をすることができる。   The storage device according to (5) can conceal data suitable for ORAM access pattern protection.

(6) (1)に記載された記憶装置が実行する方法であって、前記乱数生成手段が、乱数を生成する乱数生成ステップと、前記マスク処理手段が、データに、前記乱数に基づくマスク値を用いてマスクをして秘匿データを作成し、又はマスクをしたときのマスク値を用いて、前記秘匿データからマスクを外すマスク処理ステップと、前記記憶制御手段が、前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる記憶制御ステップと、前記記憶制御手段が、前記メモリ上の前記秘匿データに対するアクセスが検出された場合に、前記秘匿データから、前記秘匿データに対応付けて記憶されたマスク値を用いて前記マスク処理ステップによりマスクを外し、元のデータを取り出すステップと、を備える方法。   (6) A method executed by the storage device according to (1), wherein the random number generation means generates a random number, and the mask processing means uses a mask value based on the random number as data. A mask processing step of creating secret data by masking using the mask, or removing a mask from the secret data using a mask value when masked, and the storage control means includes the secret data and the secret data A storage control step of associating the mask value used for generating the data and storing it in the memory by the access pattern protection means, and when the storage control means detects access to the confidential data on the memory The mask processing step removes the mask from the secret data using the mask value stored in association with the secret data, How comprising, retrieving the data.

(6)に係る方法は、アクセスパターン保護に適したデータの秘匿をすることができる。   The method according to (6) can conceal data suitable for access pattern protection.

(7) コンピュータに、(6)に記載の方法の各ステップを実行させるためのプログラム。   (7) A program for causing a computer to execute each step of the method according to (6).

(7)に係るプログラムは、コンピュータに、アクセスパターン保護に適したデータの秘匿をさせることができる。   The program according to (7) can cause a computer to conceal data suitable for access pattern protection.

本発明によれば、アクセスパターン保護に適したデータの秘匿をすることができる。   According to the present invention, data suitable for access pattern protection can be concealed.

本発明の一実施形態に係る記憶装置の構成を示すブロック図である。It is a block diagram which shows the structure of the memory | storage device which concerns on one Embodiment of this invention. 本発明の一実施形態に係る対応テーブルと、秘匿データ及び秘匿データの作成に用いられたマスク値との例を示す図である。It is a figure which shows the example of the correspondence table which concerns on one Embodiment of this invention, and the mask value used for creation of secret data and secret data. 本発明の一実施形態に係る記憶装置の書き出し処理の例を示すフローチャートである。It is a flowchart which shows the example of the write-out process of the memory | storage device which concerns on one Embodiment of this invention. 本発明の一実施形態に係る記憶装置の読み出し処理の例を示すフローチャートである。It is a flowchart which shows the example of the read-out process of the memory | storage device which concerns on one Embodiment of this invention.

以下、本発明の実施形態について、図を参照しながら説明する。
図1は、本発明の一実施形態に係る記憶装置10の構成を示すブロック図である。
記憶装置10は、乱数生成手段11と、マスク処理手段12と、記憶制御手段13と、対応テーブル21とを備え、データを秘匿してメインメモリ30に記憶する。各手段ごとに詳述する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a storage device 10 according to an embodiment of the present invention.
The storage device 10 includes a random number generation unit 11, a mask processing unit 12, a storage control unit 13, and a correspondence table 21, and stores data in the main memory 30 in a secret manner. Each means will be described in detail.

記憶装置10は、データに対するアクセスのパターンを保護するアクセスパターン保護手段31を有するメインメモリ30に、データを秘匿して記憶する。
アクセスパターン保護手段31は、例えば、書き出し処理(例えば、データをキャッシュメモリ40からメインメモリ30に戻すとき)において、メインメモリ30へデータを書き出すときのアドレスを、メインメモリ30からデータを読み出したときのアドレスとは異なるアドレスに変更する。その結果、アクセスパターン保護手段31は、データを読み出すメインメモリ30のアドレスを都度変化させる。このように、アクセスパターン保護手段31は、読み出し処理及び書き出し処理におけるアドレスが同一のアドレスとなって、同じパターンのアクセスが発生することを防止する。アクセスパターン保護手段31は、例えば、ORAMにおいて実現されている。
The storage device 10 stores the data in a secret manner in the main memory 30 having an access pattern protection unit 31 that protects an access pattern for the data.
For example, the access pattern protection unit 31 reads an address for writing data to the main memory 30 and reads data from the main memory 30 in a writing process (for example, when returning data from the cache memory 40 to the main memory 30). Change the address to a different address. As a result, the access pattern protection means 31 changes the address of the main memory 30 from which data is read each time. In this way, the access pattern protection unit 31 prevents the addresses in the read process and the write process from having the same address and the same pattern access. The access pattern protection unit 31 is realized by, for example, an ORAM.

乱数生成手段11は、乱数生成装置により乱数を生成する。生成される乱数は、暗号学的に安全な乱数であることが望ましい。乱数生成手段11は、ストリーム暗号(初期鍵及び初期ベクトルに基づいて乱数を生成する)などを用いて乱数を生成してもよい。   The random number generation means 11 generates a random number by a random number generation device. The generated random number is preferably a cryptographically secure random number. The random number generation means 11 may generate a random number using a stream cipher (which generates a random number based on an initial key and an initial vector).

マスク処理手段12は、データに、乱数に基づくマスク値を用いてマスクをして秘匿データを作成する。又は、マスク処理手段12は、マスクをしたときのマスク値を用いて、秘匿データからマスクを外す。具体的には、マスク処理手段12は、データとマスク値との排他的論理和の演算をする。すなわち、マスク処理手段12は、データに、乱数に基づくマスク値を用いて排他的論理和の演算をして秘匿データを作成する。又は、マスク処理手段12は、秘匿データの作成に用いたマスク値と秘匿データとの排他的論理和の演算をし、秘匿データからマスクを外す。   The mask processing means 12 masks the data using a mask value based on a random number to create secret data. Alternatively, the mask processing means 12 removes the mask from the confidential data by using the mask value when masking. Specifically, the mask processing means 12 performs an exclusive OR operation between the data and the mask value. That is, the mask processing unit 12 creates secret data by performing an exclusive OR operation on the data using a mask value based on a random number. Alternatively, the mask processing means 12 performs an exclusive OR operation between the mask value used to create the secret data and the secret data, and removes the mask from the secret data.

マスク値は、データと同じ長さの乱数であってよい。また、マスク値は、乱数に基づいて生成されてもよい。例えば、マスク値は、データ長が64ビットの場合、乱数生成装置により生成したデータ長が32ビットの乱数に基づいて、生成した乱数と加工した乱数とを結合するなどして、データ長が64ビットのマスク値にされたものであってもよい。この場合、乱数を生成する時間が、データと同じ長さの乱数を生成する時間よりも、短縮される。
マスク値のデータ長は、データに対するマスク処理の種類に応じて必要な長さ(例えば、排他的論理和の場合、データの長さとマスク値の長さとは同一)が確保されるとしてよい。
The mask value may be a random number having the same length as the data. The mask value may be generated based on a random number. For example, when the data length is 64 bits, the mask value has a data length of 64 by combining the generated random number and the processed random number based on a random number having a data length of 32 bits generated by the random number generator. It may be a bit mask value. In this case, the time for generating a random number is shorter than the time for generating a random number having the same length as the data.
As the data length of the mask value, a required length (for example, in the case of exclusive OR, the data length and the mask value length are the same) may be ensured according to the type of mask processing for the data.

記憶制御手段13は、秘匿データ及び秘匿データの作成に用いられたマスク値を対応付けて、アクセスパターン保護手段31によりメインメモリ30に記憶させる。記憶制御手段13は、秘匿データと、秘匿データの作成に用いられたマスク値との対応付けを、対応テーブル21に記憶させる。対応テーブル21は、秘匿データを記憶するメインメモリ30のアドレスと、秘匿データの作成に用いられたマスク値を記憶するメインメモリ30のアドレスとを対応付ける(後述する図2参照)。
記憶制御手段13は、対応テーブル21に基づいて、秘匿データに対応するマスク値を取得する。
The storage control means 13 associates the secret data and the mask value used for creating the secret data, and causes the access pattern protection means 31 to store the data in the main memory 30. The storage control unit 13 stores the correspondence between the secret data and the mask value used for creating the secret data in the correspondence table 21. The correspondence table 21 associates the address of the main memory 30 that stores the secret data with the address of the main memory 30 that stores the mask value used to create the secret data (see FIG. 2 described later).
The storage control unit 13 acquires a mask value corresponding to the confidential data based on the correspondence table 21.

記憶制御手段13は、メインメモリ30上の秘匿データに対するアクセスが検出された場合に、秘匿データから、秘匿データに対応付けて記憶されたマスク値を用いてマスク処理手段12によりマスクを外し、元のデータを取り出す。
具体的には、記憶制御手段13は、秘匿データに対する読み出し要求が検出された場合であって読み出すべきデータがキャッシュメモリ40に存在しない場合に、メインメモリ30に記憶された秘匿データ及び秘匿データに対応付けて記憶されたマスク値を読み出し、読み出した秘匿データとマスク値との排他的論理和の演算によって秘匿データからマスクを外し、元のデータを取り出し、取り出した元のデータをキャッシュメモリ40に移動させる。
When access to the confidential data on the main memory 30 is detected, the storage control means 13 removes the mask from the confidential data by using the mask value stored in association with the confidential data. Retrieve the data.
Specifically, the storage control unit 13 adds the secret data and the secret data stored in the main memory 30 when the read request for the secret data is detected and the data to be read does not exist in the cache memory 40. The mask value stored in association is read out, the mask is removed from the secret data by the exclusive OR operation of the read secret data and the mask value, the original data is extracted, and the extracted original data is stored in the cache memory 40. Move.

秘匿データに対するアクセスが完了したことが検出されると、記憶制御手段13は、元のデータに、マスク処理手段12によって新たな乱数に基づくマスクをさせて新たな秘匿データとし、新たな秘匿データ及び新たな秘匿データの作成に用いられたマスク値を対応付けて、アクセスパターン保護手段31によりメインメモリ30に記憶させる。
具体的には、キャッシュメモリ40からメインメモリ30への書き出し要求が検出されると、記憶制御手段13は、メインメモリ30へ書き出すべきデータに、新たな乱数に基づくマスク値を用いて、マスク処理手段12によって排他的論理和の演算をさせて、新たな秘匿データを作成させる。次に、記憶制御手段13は、新たな秘匿データと、新たな秘匿データの作成に用いられたマスク値とを対応付けて、メインメモリ30に記憶させ、対応関係を対応テーブル21に記憶させる。メインメモリ30では、秘匿データ及びマスク値は、アクセスパターン保護手段31により、例えば、メインメモリ30から読み出したときのアドレスとは異なるアドレスに記憶される。
When it is detected that the access to the confidential data is completed, the storage control means 13 masks the original data based on a new random number by the mask processing means 12 to make new confidential data, and the new confidential data and The access pattern protection means 31 stores the mask value used for creating new secret data in the main memory 30 in association with each other.
Specifically, when a write request from the cache memory 40 to the main memory 30 is detected, the storage control unit 13 uses a mask value based on a new random number as the data to be written to the main memory 30 to perform mask processing. The means 12 performs an exclusive OR operation to create new secret data. Next, the storage control means 13 associates the new secret data with the mask value used for creating the new secret data, stores them in the main memory 30, and stores the correspondence in the correspondence table 21. In the main memory 30, the secret data and the mask value are stored by the access pattern protection unit 31 at an address different from the address when read from the main memory 30, for example.

図2は、本発明の一実施形態に係る対応テーブル21と、秘匿データ及び秘匿データの作成に用いられたマスク値との例を示す図である。
図2(1)が示すように、対応テーブル21は、データアドレスと、マスク値格納アドレスとを対応付ける。データアドレスは、秘匿データを記憶するメインメモリ30のアドレスである。マスク値格納アドレスは、秘匿データの作成に用いられたマスク値を記憶するメインメモリ30のアドレスである。
図2(2)は、秘匿データから、対応テーブル21によって秘匿データに対応付けられたマスク値を用いてマスクを外し、元データを取り出したことを示す図である。
図2(2)が示すように、記憶装置10は、メインメモリ30から読み出した秘匿データとマスク値との排他的論理和の演算によりマスク値を外した元のデータをキャッシュメモリ40に移動させる。
図2(3)は、秘匿データと秘匿データの作成に用いられたマスク値とを対応付けてメインメモリ30に記憶させたことを示す図である。
図2(3)が示すように、記憶装置10は、キャッシュメモリ40の元のデータから排他的論理和の演算により秘匿データを作成し、秘匿データ及び秘匿データの作成に用いられたマスク値を対応付けてメインメモリ30に記憶させる。
FIG. 2 is a diagram illustrating an example of the correspondence table 21 according to an embodiment of the present invention, and secret data and mask values used to create the secret data.
As shown in FIG. 2A, the correspondence table 21 associates a data address with a mask value storage address. The data address is an address of the main memory 30 that stores secret data. The mask value storage address is an address of the main memory 30 that stores a mask value used for creating secret data.
FIG. 2B is a diagram showing that the original data is extracted from the secret data by using the mask value associated with the secret data by the correspondence table 21 to remove the mask.
As shown in FIG. 2 (2), the storage device 10 moves the original data from which the mask value is removed to the cache memory 40 by calculating the exclusive OR of the confidential data read from the main memory 30 and the mask value. .
FIG. 2 (3) is a diagram showing that the secret data and the mask value used for creating the secret data are associated with each other and stored in the main memory 30.
As shown in FIG. 2 (3), the storage device 10 creates secret data from the original data in the cache memory 40 by an exclusive OR operation, and uses the mask data used to create the secret data and the secret data. The data are stored in the main memory 30 in association with each other.

図3は、本発明の一実施形態に係る記憶装置10の書き出し処理の例を示すフローチャートである。記憶装置10は、コンピュータ及びその周辺装置が備えるハードウェア並びに該ハードウェアを制御するソフトウェアによって構成される。以下の処理は、制御部(例えば、CPU)が、所定のソフトウェアに従い実行する処理であり、所定のプログラムからの書き出し要求(例えば、秘匿データをキャッシュメモリ40からメインメモリ30へ書き出す要求など)を検出することによって起動される。   FIG. 3 is a flowchart showing an example of the writing process of the storage device 10 according to an embodiment of the present invention. The storage device 10 includes hardware included in a computer and its peripheral devices, and software that controls the hardware. The following processing is processing executed by a control unit (for example, CPU) according to predetermined software, and a write request from a predetermined program (for example, a request to write confidential data from the cache memory 40 to the main memory 30). It is activated by detecting.

ステップS101において、CPU(乱数生成手段11)は、キャッシュメモリ40からメインメモリ30への書き出し要求がされたデータについて、マスク値を作成するために、乱数を生成する。   In step S101, the CPU (random number generation means 11) generates a random number to create a mask value for the data requested to be written from the cache memory 40 to the main memory 30.

ステップS102において、CPU(マスク処理手段12)は、生成した乱数に基づくマスク値を用いて、データとマスク値との排他的論理和の演算をし、秘匿データを作成する。   In step S102, the CPU (mask processing means 12) uses the mask value based on the generated random number to perform an exclusive OR operation between the data and the mask value to create secret data.

ステップS103において、CPU(記憶制御手段13)は、秘匿データ及び秘匿データの作成に用いられたマスク値を対応付けて、ORAMであるメインメモリ30に記憶させる。   In step S <b> 103, the CPU (storage control unit 13) associates the secret data and the mask value used to create the secret data with each other and stores them in the main memory 30 that is an ORAM.

ステップS104において、CPU(記憶制御手段13)は、秘匿データ及び秘匿データの作成に用いられたマスク値の対応付けを対応テーブル21に記憶させる。その後、CPUは、処理を終了する。   In step S <b> 104, the CPU (storage control unit 13) causes the correspondence table 21 to store the secret data and the mask value association used to create the secret data. Thereafter, the CPU ends the process.

図4は、本発明の一実施形態に係る記憶装置10の読み出し処理の例を示すフローチャートである。以下の処理は、制御部(例えば、CPU)が、所定のソフトウェアに従い実行する処理であり、所定のプログラムからの読み出し要求(例えば、メインメモリ30からの読み出し要求など)を検出することによって起動される。   FIG. 4 is a flowchart showing an example of a read process of the storage device 10 according to an embodiment of the present invention. The following processing is processing executed by a control unit (for example, CPU) in accordance with predetermined software, and is activated by detecting a read request from a predetermined program (for example, a read request from the main memory 30). The

ステップS201において、CPU(記憶制御手段13)は、秘匿データをメインメモリ30から読み出すと共に、秘匿データに対応付けられたマスク値を対応テーブル21に基づいて読み出す。   In step S <b> 201, the CPU (storage control unit 13) reads the secret data from the main memory 30 and reads the mask value associated with the secret data based on the correspondence table 21.

ステップS202において、CPU(マスク処理手段12、記憶制御手段13)は、秘匿データとマスク値との排他的論理和の演算をして、秘匿データからマスクを外し、元のデータを取り出し、元のデータをキャッシュメモリ40に記憶させる。その後、CPUは、処理を終了する。   In step S202, the CPU (mask processing means 12, storage control means 13) performs an exclusive OR operation between the confidential data and the mask value, removes the mask from the confidential data, extracts the original data, and extracts the original data. Data is stored in the cache memory 40. Thereafter, the CPU ends the process.

本実施形態によれば、記憶装置10は、排他的論理和の演算がされた秘匿データ及び秘匿データの作成に用いられたマスク値を対応付けて、ORAMであるメインメモリ30に記憶させる。さらに、記憶装置10は、メインメモリ30のデータに対する読み出し要求が検出された場合に、メインメモリ30に記憶された秘匿データから、秘匿データに対応付けて記憶されたマスク値を用いて排他的論理和の演算をしてマスクを外し、元のデータを取り出し、キャッシュメモリ40に記憶させる。
さらに、記憶装置10は、キャッシュメモリ40からメインメモリ30への書き出し要求が検出されると、対象の元のデータに、新たな乱数に基づいて生成されたマスク値を用いて排他的論理和の演算をして新たな秘匿データを作成する。次に、記憶装置10は、新たな秘匿データ及び新たな秘匿データの作成に用いられたマスク値を対応付けて、ORAMであるメインメモリ30に記憶させると共に、対応付けを対応テーブル21に記憶させる。
よって、記憶装置10は、メインメモリ30に書き出すごとにデータの秘匿化を高速に行い、秘匿データと秘匿化に用いたマスク値とを対応付けてメインメモリ30に記憶させ、対応付けてメインメモリ30に記憶させた秘匿データとマスク値とによりメインメモリ30から元のデータを高速に取り出すことができる。
メインメモリ30は、アクセスのパターンが保護されているので、記憶装置10は、どのデータがどの乱数によってマスクされているかが攻撃者には不明なように、メインメモリ30に記憶させることができる。
したがって、記憶装置10は、アクセスパターン保護に適したデータの秘匿をすることができる。
According to the present embodiment, the storage device 10 associates the secret data subjected to the exclusive OR operation and the mask value used for creating the secret data, and stores them in the main memory 30 that is an ORAM. Further, when a read request for data in the main memory 30 is detected, the storage device 10 uses the mask value stored in association with the secret data from the secret data stored in the main memory 30 to perform exclusive logic. The sum operation is performed to remove the mask, and the original data is extracted and stored in the cache memory 40.
Further, when a write request from the cache memory 40 to the main memory 30 is detected, the storage device 10 uses the mask value generated based on the new random number as the target original data and performs exclusive OR operation. Perform computation to create new confidential data. Next, the storage device 10 associates the new secret data and the mask value used to create the new secret data with each other and stores them in the main memory 30 that is the ORAM, and stores the correspondence in the correspondence table 21. .
Therefore, the storage device 10 performs data concealment at high speed each time data is written to the main memory 30, and associates the concealed data with the mask value used for concealment and stores them in the main memory 30, and correlates them with the main memory. The original data can be retrieved from the main memory 30 at high speed by using the secret data and the mask value stored in the memory 30.
Since the access pattern of the main memory 30 is protected, the storage device 10 can store the data in the main memory 30 so that the attacker does not know which data is masked by which random number.
Therefore, the storage device 10 can conceal data suitable for access pattern protection.

以上、本発明の実施形態について説明したが、本発明は上述した実施形態に限るものではない。
本実施形態では、記憶装置10と、メインメモリ30及びアクセスパターン保護手段31とを別にしたが、記憶装置10とアクセスパターン保護手段31とが組み合わされてもよい。組み合わされた装置は、アクセスパターン保護を行って秘匿データをメインメモリ30に記憶させることができる。さらに、記憶装置10と、メインメモリ30及びアクセスパターン保護手段31とを一体化させてもよい。一体化させた装置は、アクセスパターン保護を行って秘匿データを記憶することができる。
また、本発明の実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、本発明の実施形態に記載されたものに限定されるものではない。
As mentioned above, although embodiment of this invention was described, this invention is not restricted to embodiment mentioned above.
In the present embodiment, the storage device 10 is separated from the main memory 30 and the access pattern protection means 31, but the storage device 10 and the access pattern protection means 31 may be combined. The combined device can protect the access pattern and store the secret data in the main memory 30. Furthermore, the storage device 10 may be integrated with the main memory 30 and the access pattern protection unit 31. The integrated device can store confidential data by protecting the access pattern.
The effects described in the embodiments of the present invention are only the most preferable effects resulting from the present invention, and the effects of the present invention are limited to those described in the embodiments of the present invention. is not.

記憶装置10による一連の処理は、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータなどにインストールされる。また、当該プログラムは、コンピュータ読み取り可能な記録媒体(例えば、CD−ROMのようなリムーバブルメディアなど)に記録されてユーザに配布されてもよいし、ネットワークを介してユーザのコンピュータにダウンロードされることにより配布されてもよい。   A series of processing by the storage device 10 can also be performed by software. When a series of processing is performed by software, a program constituting the software is installed in a general-purpose computer or the like. The program may be recorded on a computer-readable recording medium (for example, a removable medium such as a CD-ROM) and distributed to the user, or may be downloaded to the user's computer via a network. May be distributed.

10 記憶装置
11 乱数生成手段
12 マスク処理手段
13 記憶制御手段
21 対応テーブル
30 メインメモリ
31 アクセスパターン保護手段
40 キャッシュメモリ
DESCRIPTION OF SYMBOLS 10 Memory | storage device 11 Random number generation means 12 Mask processing means 13 Storage control means 21 Correspondence table 30 Main memory 31 Access pattern protection means 40 Cache memory

Claims (7)

データに対するアクセスのパターンを保護するアクセスパターン保護手段を有するメモリに、データを秘匿して記憶する記憶装置であって、
乱数を生成する乱数生成手段と、
データに、前記乱数に基づくマスク値を用いてマスクをして秘匿データを作成し、又はマスクをしたときのマスク値を用いて、前記秘匿データからマスクを外すマスク処理手段と、
前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる記憶制御手段と、を備え、
前記記憶制御手段は、前記メモリ上の前記秘匿データに対するアクセスが検出された場合に、前記秘匿データから、前記秘匿データに対応付けて記憶されたマスク値を用いて前記マスク処理手段によりマスクを外し、元のデータを取り出す、
記憶装置。
A storage device that stores data concealed in a memory having access pattern protection means for protecting an access pattern to the data,
Random number generating means for generating a random number;
A mask processing unit that masks data using a mask value based on the random number to create secret data, or uses a mask value when masked, and removes the mask from the secret data; and
Storage control means for associating the secret data and the mask value used for creation of the secret data, and storing it in the memory by the access pattern protection means,
The storage control unit removes a mask from the secret data by the mask processing unit using a mask value stored in association with the secret data when access to the secret data on the memory is detected. , Retrieve the original data,
Storage device.
前記記憶制御手段は、前記秘匿データに対するアクセスが完了したことが検出されると、前記元のデータに、前記マスク処理手段によって新たな前記乱数に基づくマスクをさせて新たな前記秘匿データとし、新たな前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる、請求項1に記載の記憶装置。   When it is detected that the access to the confidential data has been completed, the storage control means causes the original data to be masked based on the new random number by the mask processing means to obtain the new confidential data, The storage device according to claim 1, wherein the secret data and a mask value used to create the secret data are associated with each other and stored in the memory by the access pattern protection unit. 前記マスク処理手段は、データとマスク値との排他的論理和の演算をする請求項1又は2に記載の記憶装置。   The storage device according to claim 1, wherein the mask processing unit performs an exclusive OR operation between data and a mask value. 前記秘匿データを記憶する前記メモリのアドレスと、前記秘匿データの作成に用いられたマスク値を記憶する前記メモリのアドレスとを対応付ける対応テーブルをさらに備え、
前記記憶制御手段は、前記対応テーブルに基づいて、前記秘匿データに対応するマスク値を取得する、請求項1から3のいずれか一項に記載の記憶装置。
A correspondence table that associates the address of the memory that stores the secret data with the address of the memory that stores the mask value used to create the secret data;
The storage device according to any one of claims 1 to 3, wherein the storage control unit acquires a mask value corresponding to the confidential data based on the correspondence table.
前記メモリは、ORAM(Oblivious RAM)である請求項1から4のいずれか一項に記載の記憶装置。   The storage device according to any one of claims 1 to 4, wherein the memory is an ORAM (Obvious RAM). 請求項1に記載された記憶装置が実行する方法であって、
前記乱数生成手段が、乱数を生成する乱数生成ステップと、
前記マスク処理手段が、データに、前記乱数に基づくマスク値を用いてマスクをして秘匿データを作成し、又はマスクをしたときのマスク値を用いて、前記秘匿データからマスクを外すマスク処理ステップと、
前記記憶制御手段が、前記秘匿データ及び前記秘匿データの作成に用いられたマスク値を対応付けて、前記アクセスパターン保護手段により前記メモリに記憶させる記憶制御ステップと、
前記記憶制御手段が、前記メモリ上の前記秘匿データに対するアクセスが検出された場合に、前記秘匿データから、前記秘匿データに対応付けて記憶されたマスク値を用いて前記マスク処理ステップによりマスクを外し、元のデータを取り出すステップと、
を備える方法。
A method performed by a storage device according to claim 1, comprising:
The random number generation means generates a random number; and
A mask processing step in which the mask processing means masks data using the mask value based on the random number to create secret data, or uses the mask value when masked to remove the mask from the secret data When,
A storage control step in which the storage control means associates the secret data and the mask value used to create the secret data, and stores it in the memory by the access pattern protection means;
When the storage control unit detects access to the secret data on the memory, the mask control step removes the mask from the secret data using the mask value stored in association with the secret data. Retrieving the original data,
A method comprising:
コンピュータに、請求項6に記載の方法の各ステップを実行させるためのプログラム。   The program for making a computer perform each step of the method of Claim 6.
JP2014193697A 2014-09-24 2014-09-24 Storage device, method and program Active JP6249915B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014193697A JP6249915B2 (en) 2014-09-24 2014-09-24 Storage device, method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014193697A JP6249915B2 (en) 2014-09-24 2014-09-24 Storage device, method and program

Publications (2)

Publication Number Publication Date
JP2016066860A true JP2016066860A (en) 2016-04-28
JP6249915B2 JP6249915B2 (en) 2017-12-20

Family

ID=55805856

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014193697A Active JP6249915B2 (en) 2014-09-24 2014-09-24 Storage device, method and program

Country Status (1)

Country Link
JP (1) JP6249915B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019003442A (en) * 2017-06-15 2019-01-10 Kddi株式会社 Safety evaluation device, safety evaluation method, and safety evaluation program
WO2024057507A1 (en) * 2022-09-15 2024-03-21 三菱電機株式会社 Program processing apparatus, program processing method, and program processing program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5123045A (en) * 1989-08-18 1992-06-16 Massachusetts Institute Of Technology Comprehensive software protection system
JP2003271459A (en) * 2002-03-19 2003-09-26 Konami Co Ltd Data processor, data processing method and data processing program
US20090113217A1 (en) * 2007-10-30 2009-04-30 Sandisk Il Ltd. Memory randomization for protection against side channel attacks
JP2013152382A (en) * 2012-01-26 2013-08-08 Kddi Corp Storage device, preservation method of data, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5123045A (en) * 1989-08-18 1992-06-16 Massachusetts Institute Of Technology Comprehensive software protection system
JP2003271459A (en) * 2002-03-19 2003-09-26 Konami Co Ltd Data processor, data processing method and data processing program
US20090113217A1 (en) * 2007-10-30 2009-04-30 Sandisk Il Ltd. Memory randomization for protection against side channel attacks
JP2013152382A (en) * 2012-01-26 2013-08-08 Kddi Corp Storage device, preservation method of data, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
仲野 有登 ほか: "メモリに対するアクセスパターン秘匿手法の実装評価", 2014年 暗号と情報セキュリティシンポジウム SCIS2014 [CD−ROM], vol. 3C1−2, JPN6017041878, 21 January 2014 (2014-01-21), JP, pages 1 - 7, ISSN: 0003673409 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019003442A (en) * 2017-06-15 2019-01-10 Kddi株式会社 Safety evaluation device, safety evaluation method, and safety evaluation program
WO2024057507A1 (en) * 2022-09-15 2024-03-21 三菱電機株式会社 Program processing apparatus, program processing method, and program processing program

Also Published As

Publication number Publication date
JP6249915B2 (en) 2017-12-20

Similar Documents

Publication Publication Date Title
US8516271B2 (en) Securing non-volatile memory regions
JP5700481B2 (en) Method and apparatus for encrypting memory with integrity check and protection against replay attacks
US20170046281A1 (en) Address dependent data encryption
US9798677B2 (en) Hybrid cryptographic key derivation
US11658808B2 (en) Re-encryption following an OTP update event
US20080285747A1 (en) Encryption-based security protection method for processor and apparatus thereof
KR102117838B1 (en) Methods for protecting security-related data in cache memory
JP2003249927A (en) Super secure migratable key in tcpa
US10572635B2 (en) Automatic correction of cryptographic application program interfaces
CN106209346B (en) White-box cryptography interleaving lookup table
JP6249915B2 (en) Storage device, method and program
US11121867B2 (en) Encryption methods based on plaintext length
US20230259660A1 (en) Integrity tree for memory security
US9218296B2 (en) Low-latency, low-overhead hybrid encryption scheme
JP2012059258A (en) System and method for protecting electronic key
JP2020064461A (en) Conversion device, conversion method, conversion program, and obfuscation program
CN104866740A (en) Static analysis preventing method and device for files
JP6360440B2 (en) Decoding device, method and program
US10992453B2 (en) System architecture for encrypting external memory
US20240080193A1 (en) Counter integrity tree
KR101022511B1 (en) Smartcard, and method of random number management in smartcard
JP6957292B2 (en) File management system and file management program
JP2005266887A (en) Program encryption apparatus, program distribution system and computer program
CN110659509B (en) Memory snapshot file generation method and device, electronic equipment and medium
US20240078323A1 (en) Counter tree

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171012

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171121

R150 Certificate of patent or registration of utility model

Ref document number: 6249915

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150