JP2007251483A - Encryption apparatus - Google Patents

Encryption apparatus Download PDF

Info

Publication number
JP2007251483A
JP2007251483A JP2006070670A JP2006070670A JP2007251483A JP 2007251483 A JP2007251483 A JP 2007251483A JP 2006070670 A JP2006070670 A JP 2006070670A JP 2006070670 A JP2006070670 A JP 2006070670A JP 2007251483 A JP2007251483 A JP 2007251483A
Authority
JP
Japan
Prior art keywords
data
input data
input
encryption
cache mechanism
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
JP2006070670A
Other languages
Japanese (ja)
Other versions
JP4327169B2 (en
Inventor
Tomohiro Watabe
智宏 渡部
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.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
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 Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP2006070670A priority Critical patent/JP4327169B2/en
Publication of JP2007251483A publication Critical patent/JP2007251483A/en
Application granted granted Critical
Publication of JP4327169B2 publication Critical patent/JP4327169B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encryption apparatus with immunity to the differential power analysis (DPA) that is one of attack methods applied to encryption algorithms such as the DES and the AES. <P>SOLUTION: The encryption apparatus reads input data from a first memory and inputs the input data to a cache mechanism on the basis of addresses generated by address generating apparatuses (apparatuses A and B) for replacing addresses accessing first and second memories (memories A and B) at random, the cache mechanism inputs the input data to an encryption processing unit, the encryption processing unit encrypts the input data, output data outputted from the encryption processing unit are given to the cache mechanism, and the output data are read from the cache mechanism and written in the second memory. The processing above is applied repetitively to all addresses. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、DES(Data Encryption Standard)やAES(Advanced Encryption Standard)などの標準的な暗号アルゴリズムの攻撃法の1つである差分電力解析(DPA:Differential Power Analysis)に対して耐性を有する暗号化装置に関するものである。   The present invention is an encryption having resistance to differential power analysis (DPA), which is one of attack methods of standard encryption algorithms such as DES (Data Encryption Standard) and AES (Advanced Encryption Standard). It relates to the device.

従来、上記のDESやAESなどの標準的な暗号アルゴリズムに対する攻撃法の1つとして、例えば非特許文献1に開示されているように、DPAと呼ばれる暗号解析法が知られている。   Conventionally, as one of attack methods for the above-described standard encryption algorithms such as DES and AES, a cryptographic analysis method called DPA is known as disclosed in Non-Patent Document 1, for example.

DPAは、暗号処理装置により生成される暗号文と、この暗号文を生成する際の暗号処理装置における消費電力とを組にしたデータを数千組サンプルし、そのデータに基づいた統計処理を行うことによって暗号鍵を解析するものであり、対策が非常に困難な攻撃である。DPAでは、上記の統計処理を行う際に、暗号処理装置の出力である暗号文から、暗号処理装置内に現れる内部データを推定する。   The DPA samples several thousand sets of data including a ciphertext generated by the cryptographic processing device and power consumption in the cryptographic processing device when generating the ciphertext, and performs statistical processing based on the data Therefore, it is an attack that is extremely difficult to counter. In DPA, when performing the above statistical processing, internal data appearing in the cryptographic processing device is estimated from the ciphertext that is the output of the cryptographic processing device.

これを回避するための従来技術としては、特許文献1に開示されている"Masking Method"(固定マスク値法)や、非特許文献2に開示されている“Duplication Method”などが有名である。また、DPAを回避するための従来技術として、特許文献2に開示されているように、暗号化を行う度に内部回路を変更し、消費電力の統計的解析を困難にする方策などが知られている。   As a conventional technique for avoiding this, the “Masking Method” (fixed mask value method) disclosed in Patent Document 1 and “Duplication Method” disclosed in Non-Patent Document 2 are well known. Further, as a conventional technique for avoiding DPA, as disclosed in Patent Document 2, a method for changing the internal circuit each time encryption is performed and making statistical analysis of power consumption difficult is known. ing.

特開2002−366029号公報JP 2002-366029 A 特開平13−268071号公報Japanese Patent Laid-Open No. 13-268071 Paul Kocher, Joshua Jaffe, Benjamin Jun、“Differential Power Analysis”、[online]、Cryptography Research, Inc.、[平成18年2月27日検索]、インターネット<URL : http://www.cryptography.com/resources/whitepapers/DPA.pdf>Paul Kocher, Joshua Jaffe, Benjamin Jun, “Differential Power Analysis”, [online], Cryptography Research, Inc., [Search February 27, 2006], Internet <URL: http://www.cryptography.com/ resources / whitepapers / DPA.pdf> “耐タンパー性に関する標準化調査研究開発 実証実験 報告書 第二部”、p54〜78、“第3章 3.3 GoubinらによるDPA対策のソフトウェア実装”、[online]、平成16年3月、財団法人 日本規格協会、情報技術標準化研究センター、株式会社 東芝、[平成18年2月27日検索]、インターネット<URL : http://www.jsa.or.jp/domestic/instac/committe/H15report/report-contents/01_06_02.PDF>“Standardization Research and Development on Tamper Resistance, Demonstration Experiment Report Part 2”, p. 54-78, “Chapter 3 3.3 Software Implementation of DPA Countermeasures by Goubin et al.” [Online], March 2004, Foundation Japan Standards Association, Information Technology Standardization Research Center, Toshiba Corporation [Search February 27, 2006], Internet <URL: http://www.jsa.or.jp/domestic/instac/committe/H15report/ report-contents / 01_06_02.PDF>

しかしながら、特許文献1の"Masking Method"や、非特許文献2の“Duplication Method”は、暗号処理装置が実装している暗号アルゴリズムを熟知していなければ実装できない。特に、“Duplication Method”については、暗号アルゴリズムによっては実装手段があるかどうかも保証できない。また、両技術ともに既存の暗号処理装置の内部を変更しないと該技術を実装できず、既存の資産を有効に利用できない。   However, “Masking Method” in Patent Document 1 and “Duplication Method” in Non-Patent Document 2 cannot be implemented unless the cryptographic algorithm implemented by the cryptographic processing apparatus is well known. In particular, regarding the “Duplication Method”, it cannot be guaranteed whether there is an implementation method depending on the encryption algorithm. In addition, both technologies cannot be implemented unless the inside of the existing cryptographic processing apparatus is changed, and existing assets cannot be used effectively.

また、特許文献2に関しては、回路の書き替えに時間がかかるため、結果として暗号化処理に要する時間が非常に長くなり、実用的であるとは言えない。   Further, with respect to Patent Document 2, since it takes time to rewrite the circuit, the time required for the encryption process becomes very long as a result, which is not practical.

本発明の目的は、前記従来技術に基づく問題点を解消し、DESやAESなどの暗号アルゴリズムの攻撃法の1つであるDPAに対して耐性を有する暗号化装置を提供することにある。   An object of the present invention is to solve the problems based on the prior art and to provide an encryption apparatus having resistance against DPA which is one of attack methods of encryption algorithms such as DES and AES.

上記目的を達成するために、本発明は、入力データを暗号化し、暗号化後の出力データを出力する暗号処理装置と、
前記暗号処理装置によって暗号化されていない入力データが入力された場合、該入力データを前記暗号処理装置に入力して、前記入力データと前記暗号処理装置から入力される出力データとを対応付けて保持し、前記暗号処理装置によって既に暗号化されている入力データが入力された場合、該入力データを前記暗号処理装置に入力せず、既に保持されている出力データを出力するキャッシュ機構と、
乱数データを発生する乱数発生器と、
前記キャッシュ機構に入力される入力データを格納し、該入力データが所定ワード数よりも少ない場合、不足分の前記入力データのダミーデータとして、前記乱数発生器によって発生された乱数データを格納する第1のメモリと、
前記キャッシュ機構から出力される出力データを格納する第2のメモリと、
前記乱数発生器から入力された乱数データに基づいて、前記第1および第2のメモリの全アドレスにわたって、該第1および第2のメモリをアクセスするアドレスをランダムに入れ替える処理を行うアドレス生成装置とを備え、
前記アドレス生成装置によって生成されるアドレスに基づいて、前記第1のメモリから入力データを読み出して前記キャッシュ機構に入力し、該キャッシュ機構から入力データを前記暗号処理装置に入力し、該暗号処理装置によって入力データを暗号化し、前記暗号処理装置から出力される出力データを前記キャッシュ機構に入力し、該キャッシュ機構から出力データを読み出して前記第2のメモリに書き込む暗号化処理を、前記全アドレスについて繰り返し行うことを特徴とする暗号化装置を提供するものである。
To achieve the above object, the present invention encrypts input data and outputs encrypted output data, and
When input data that has not been encrypted by the cryptographic processing device is input, the input data is input to the cryptographic processing device, and the input data is associated with output data input from the cryptographic processing device. A cache mechanism for holding the input data that is already encrypted by the cryptographic processing device and outputting the output data that is already retained without inputting the input data to the cryptographic processing device;
A random number generator for generating random data;
Storing input data to be input to the cache mechanism, and storing the random number data generated by the random number generator as dummy data of the insufficient input data when the input data is less than a predetermined number of words 1 memory,
A second memory for storing output data output from the cache mechanism;
An address generation device for performing a process of randomly replacing addresses for accessing the first and second memories over all addresses of the first and second memories based on random number data input from the random number generator; With
Based on an address generated by the address generation device, input data is read from the first memory and input to the cache mechanism, and input data is input from the cache mechanism to the encryption processing device, and the encryption processing device And encrypting the input data, inputting the output data output from the cryptographic processing device to the cache mechanism, reading the output data from the cache mechanism, and writing the data to the second memory for all addresses The present invention provides an encryption device that is repeatedly performed.

ここで、前記キャッシュ機構は、前記アドレス生成装置から入力されるアドレスと前記入力データの個数とを比較して、前記入力データがダミーデータであると判断した場合、当該入力データと、これに対応する出力データを保持しないことが好ましい。   Here, when the cache mechanism determines that the input data is dummy data by comparing the address input from the address generation device and the number of the input data, the input data corresponds to the input data. It is preferable not to hold the output data.

また、前記入力データが所定ワード数よりも多い場合、全ての前記入力データを、所定ワード数の前記入力データからなる複数のブロックに分け、各々の前記ブロックを単位として、上記暗号化処理を繰り返し行うことが好ましい。   Further, when the input data is larger than the predetermined number of words, all the input data is divided into a plurality of blocks composed of the input data having a predetermined number of words, and the above encryption process is repeated for each block. Preferably it is done.

本発明によれば、暗号処理装置の暗号アルゴリズムを知らなくても、DPAの対策が可能である。また、既存の暗号処理装置の内部を変更する必要がないため、これまでの設計資産を有効に活用することができる。また、回路の書き替えが不要なため、ある一定以上の数のまとまった入力データを暗号化処理する場合は、処理時間を増加させることなくDPA対策が可能である。   According to the present invention, it is possible to take measures against DPA without knowing the cryptographic algorithm of the cryptographic processing device. Moreover, since it is not necessary to change the inside of the existing cryptographic processing apparatus, the existing design assets can be used effectively. In addition, since it is not necessary to rewrite the circuit, it is possible to take DPA countermeasures without increasing the processing time when encrypting a certain number of pieces of input data.

以下に、添付の図面に示す好適実施形態に基づいて、本発明の暗号化装置を詳細に説明する。   Hereinafter, an encryption apparatus according to the present invention will be described in detail based on a preferred embodiment shown in the accompanying drawings.

図1は、本発明の暗号化装置の構成を表す一実施形態のブロック概略図である。同図に示す暗号化装置10は、第1のメモリ(メモリA)12と、第2のメモリ(メモリB)14と、暗号処理装置16と、キャッシュ機構18と、乱数発生器20と、第1の装置(装置A)22と、第2の装置(装置B)24と、制御装置(CPU:中央処理装置)26とによって構成されている。   FIG. 1 is a block schematic diagram showing an embodiment of a configuration of an encryption apparatus according to the present invention. The encryption device 10 shown in the figure includes a first memory (memory A) 12, a second memory (memory B) 14, a cryptographic processing device 16, a cache mechanism 18, a random number generator 20, 1 device (device A) 22, a second device (device B) 24, and a control device (CPU: central processing unit) 26.

第1のメモリ12は、キャッシュ機構18に入力される暗号化前の入力データを格納する半導体記憶装置である。また、第2のメモリ14は、キャッシュ機構18から出力される暗号化後の出力データを格納する半導体記憶装置である。本実施形態では、第1のメモリ12に格納される暗号化処理対象の入力データ数(入力データのワード数)をNとし、第1および第2のメモリ12,14に格納可能な最大データ数(格納可能な最大ワード数)をN’=1024とする(N≦N’)。   The first memory 12 is a semiconductor storage device that stores input data before encryption input to the cache mechanism 18. The second memory 14 is a semiconductor memory device that stores output data after encryption output from the cache mechanism 18. In the present embodiment, the maximum number of data that can be stored in the first and second memories 12 and 14, where N is the number of input data to be encrypted (number of words of input data) stored in the first memory 12. Assume that (the maximum number of words that can be stored) is N ′ = 1024 (N ≦ N ′).

続いて、暗号処理装置16は、DESやAESなどの標準的な暗号アルゴリズムに基づいて、キャッシュ機構18から入力される入力データを暗号化し、暗号化後の出力データをキャッシュ機構18に出力する。   Subsequently, the cryptographic processing device 16 encrypts input data input from the cache mechanism 18 based on a standard cryptographic algorithm such as DES and AES, and outputs the encrypted output data to the cache mechanism 18.

キャッシュ機構(キャッシュメモリおよびキャッシュコントローラを含む)18は、暗号処理装置16が何度も繰り返して同一値の入力データを暗号化しないように、暗号処理装置16によって入力データを暗号化した時に、第1のメモリ12から入力される入力データと、暗号処理装置16から入力される出力データ(入力データに対応する出力データ)とを対応付けて保持する。   The cache mechanism (including the cache memory and the cache controller) 18 is configured so that the encryption processing device 16 encrypts the input data so that the encryption processing device 16 does not encrypt the input data having the same value repeatedly. The input data input from the first memory 12 and the output data input from the cryptographic processor 16 (output data corresponding to the input data) are stored in association with each other.

ここで、キャッシュ機構18を設けていないと、入力データに同一値が含まれる場合に、攻撃者に後述する順序の入れ替え方に関する手掛かりを与える可能性がある。すなわち、暗号文(本暗号化装置10の出力)に同一値が含まれていた場合、電力消費パターンが似ているN箇所のタイミングを見つければ、そのタイミングで、そのデータが処理されていたことを知られてしまう。   Here, if the cache mechanism 18 is not provided, when the same value is included in the input data, there is a possibility that a clue regarding how to change the order described later may be given to the attacker. That is, when the same value is included in the ciphertext (the output of the encryption apparatus 10), if N timings with similar power consumption patterns are found, the data was processed at that timing. Will be known.

言い換えると、キャッシュ機構18を設けることによって、攻撃者に、順序の入れ替え方に関する手掛かりを与えることを防止することができる。また、キャッシュ機構18を設けることによって、暗号処理装置16が何度も繰り返して同一値の入力データを暗号化するのを防止することができる。また、キャッシュ機構18を設けることによって、処理時間を短縮する効果も得られる。   In other words, by providing the cache mechanism 18, it is possible to prevent the attacker from giving a clue about how to change the order. Further, by providing the cache mechanism 18, it is possible to prevent the encryption processing device 16 from repeatedly encrypting input data having the same value. Further, by providing the cache mechanism 18, an effect of shortening the processing time can be obtained.

乱数発生器20は、乱数データRを発生する。第1のメモリ12に格納される入力データ数Nが、最大データ数N’(=1024)よりも少ない場合、その不足分の(N’−N)個(ワード)の入力データのダミーデータとして、乱数データRが第1のメモリ12に格納される。また、乱数データRは、後述するように、第2の装置24が、第1の装置22によって生成されたアドレスを変換する時にも使用される。   The random number generator 20 generates random number data R. When the number N of input data stored in the first memory 12 is smaller than the maximum number of data N ′ (= 1024), the shortage of (N′−N) (word) input data as dummy data The random number data R is stored in the first memory 12. The random number data R is also used when the second device 24 converts the address generated by the first device 22, as will be described later.

第1の装置22は、第1のメモリ12から入力データを読み出し、第2のメモリ14に出力データを書き込む時に使用するアドレスADR1を生成する、キャッシュ機構18に入力データを書き込む、キャッシュ機構18に暗号化開始コマンドを発行する、キャッシュ機構18から出力データを読み出す、などの処理を行う。第1の装置22は、第1のメモリ12をアドレスの昇順、すなわち、0番地〜1023番地の順にアクセスする。   The first device 22 reads input data from the first memory 12, generates an address ADR 1 used when writing output data to the second memory 14, writes input data to the cache mechanism 18, and writes data to the cache mechanism 18 Processing such as issuing an encryption start command and reading output data from the cache mechanism 18 is performed. The first device 22 accesses the first memory 12 in ascending order of addresses, that is, in the order of addresses 0 to 1023.

なお、第1の装置22が、第1のメモリ12をアドレスの降順、すなわち、1023番地〜0番地の順にアクセスするように構成しても良い。   Note that the first device 22 may be configured to access the first memory 12 in descending order of addresses, that is, in the order of addresses 1023 to 0.

第2の装置24は、乱数発生器20から入力される乱数データRに基づいて、第1の装置22から入力されるアドレスADR1をアドレスADR2に変換する。言い換えると、第2の装置24は、アドレスADR1が0〜1023まで変化する時に、その順序を入れ替える処理を行う。すなわち、アドレスADR2は、アドレスADR1が0〜1023まで変化した時に、その順序は異なるが、全アドレス0〜1023を1つずつ含む。   The second device 24 converts the address ADR1 input from the first device 22 into the address ADR2 based on the random number data R input from the random number generator 20. In other words, when the address ADR1 changes from 0 to 1023, the second device 24 performs processing to change the order. That is, the address ADR2 includes all the addresses 0 to 1023 one by one when the address ADR1 changes from 0 to 1023, although the order is different.

これら第1および第2の装置22,24は、本発明のアドレス生成装置を構成する。本発明に関わるアドレス生成装置は、乱数発生器から入力された乱数データに基づいて、第1および第2のメモリの全アドレスにわたって、第1および第2のメモリをアクセス(読み出しおよび書き込み)するアドレスをランダムに入れ替える処理を行うものであれば、その具体的な構成は何ら限定されない。   These first and second devices 22 and 24 constitute an address generation device of the present invention. An address generation apparatus according to the present invention accesses (reads and writes) addresses in the first and second memories over all addresses in the first and second memories based on random number data input from a random number generator. The specific configuration is not limited as long as the process of randomly replacing the is performed.

制御装置26は、第1のメモリ12にN個の入力データを書き込む、乱数発生器20から(N’−N)個の乱数データRを読み出して、第1のメモリ12に入力データのダミーデータとして書き込む、乱数発生器20から1個の乱数データRを読み出して、第2の装置24に入力する、第1の装置22に暗号化処理の開始を指示する、などの暗号化装置10全体の動作制御を行う。   The control device 26 writes N pieces of input data to the first memory 12, reads (N′−N) pieces of random number data R from the random number generator 20, and inputs dummy data of the input data to the first memory 12. Read out one random number data R from the random number generator 20, input it to the second device 24, instruct the first device 22 to start the encryption process, etc. Perform motion control.

第1および第2のメモリ12,14、キャッシュ機構18、乱数発生器20、第2の装置24、制御装置26は、システムバス28を介して相互に接続されている。また、第1の装置22は第2の装置24に接続され、第2の装置24を介してシステムバス28と接続されている。同様に、暗号処理装置16はキャッシュ機構18に接続され、キャッシュ機構18を介してシステムバス28と接続されている。   The first and second memories 12 and 14, the cache mechanism 18, the random number generator 20, the second device 24, and the control device 26 are connected to each other via a system bus 28. The first device 22 is connected to the second device 24, and is connected to the system bus 28 via the second device 24. Similarly, the cryptographic processing device 16 is connected to the cache mechanism 18 and is connected to the system bus 28 via the cache mechanism 18.

次に、暗号化装置10の動作を説明する。   Next, the operation of the encryption device 10 will be described.

暗号化処理を行う場合、制御装置26が、暗号化処理対象となるN個の入力データを、アドレス0から昇順に第1のメモリ12に書き込む。すなわち、第1のメモリ12には、そのアドレス0〜(N−1)番地まで入力データが書き込まれる。   When performing encryption processing, the control device 26 writes N pieces of input data to be encrypted to the first memory 12 in ascending order from address 0. That is, input data is written in the first memory 12 up to addresses 0 to (N-1).

ここで、N<N’(N’=1024)である場合、制御装置26が、乱数発生器20から(N’−N)個の乱数データRを読み出し、読み出した乱数データRを、入力データのダミーデータとして、アドレスN番地から昇順にアドレス(N’−1)番地まで第1のメモリ12に書き込む。すなわち、第1のメモリ12には、その最大データ数N’個の入力データ(ダミーデータを含む)が書き込まれる。   Here, when N <N ′ (N ′ = 1024), the control device 26 reads (N′−N) random number data R from the random number generator 20 and uses the read random number data R as input data. Are written in the first memory 12 from address N to address (N'-1) in ascending order. That is, the maximum data number N ′ input data (including dummy data) is written in the first memory 12.

続いて、制御装置26が、乱数発生器20から1個の乱数データRを読み出し、これを第2の装置24に書き込む。また、制御装置26は、最大データ数N’を、第1および第2の装置22,24に書き込み、入力データ数Nを、キャッシュ機構18に書き込む。   Subsequently, the control device 26 reads one random number data R from the random number generator 20 and writes it into the second device 24. Further, the control device 26 writes the maximum data number N ′ to the first and second devices 22 and 24 and writes the input data number N to the cache mechanism 18.

なお、第2の装置24に書き込む乱数データRの個数は1個に限らず、2個以上の乱数データRを書き込んでも良い。この場合、複数の乱数データRを順次入れ替えて使用したり、複数の乱数データRを組み合わせて使用するなど、どのように使用しても良い。   Note that the number of random number data R written to the second device 24 is not limited to one, and two or more random number data R may be written. In this case, the plurality of random number data R may be used by sequentially exchanging them, or the plurality of random number data R may be used in combination.

その後、制御装置26は、第1の装置22に処理開始コマンドを発行する。これに応じて、第1の装置22は、内部変数であるアドレスADR1を0に初期化し、このアドレスADR1を第2の装置24に出力する。   Thereafter, the control device 26 issues a process start command to the first device 22. In response to this, the first device 22 initializes an address ADR1 that is an internal variable to 0, and outputs this address ADR1 to the second device 24.

第2の装置24は、第1の装置22からアドレスADR1を受け取ると、制御装置26から書き込まれた乱数データRに基づいて、アドレスADR1をアドレスADR2に変換する。前述の通り、アドレスADR2は、アドレスADR1が0〜1023まで変化した時に、0〜1023の値を1つずつ含む(アドレスADR1の順序を入れ替える)。第2の装置24から出力されるアドレスADR2は、第1および第2のメモリ12,14、ならびに、キャッシュ機構18に入力される。   When the second device 24 receives the address ADR1 from the first device 22, the second device 24 converts the address ADR1 into the address ADR2 based on the random number data R written from the control device 26. As described above, the address ADR2 includes the values 0 to 1023 one by one when the address ADR1 changes from 0 to 1023 (the order of the addresses ADR1 is changed). The address ADR2 output from the second device 24 is input to the first and second memories 12 and 14 and the cache mechanism 18.

続いて、第1の装置22から第1のメモリ12に入力データの読み出しコマンドが発行され、第1のメモリ12から、そのアドレスADR2に格納されている入力データが読み出される。その後、第1の装置22によって、第1のメモリ12から読み出された入力データがキャッシュ機構18に入力され、さらに、第1の装置22からキャッシュ機構18に暗号化開始コマンドが発行される。   Subsequently, an input data read command is issued from the first device 22 to the first memory 12, and the input data stored in the address ADR2 is read from the first memory 12. Thereafter, input data read from the first memory 12 is input to the cache mechanism 18 by the first device 22, and an encryption start command is issued from the first device 22 to the cache mechanism 18.

キャッシュ機構18は、暗号処理装置16によって暗号化されていない入力データが入力された場合、入力データを暗号処理装置16に入力して、この入力データと暗号処理装置16から入力される出力データ(入力データに対応する出力データ)とを対応付けて保持する。一方、暗号処理装置16によって既に暗号化されている入力データが入力された場合、その入力データを暗号処理装置16に入力せず、既に保持されている出力データ(入力データに対応する出力データ)を出力する。   When input data that has not been encrypted by the cryptographic processing device 16 is input, the cache mechanism 18 inputs the input data to the cryptographic processing device 16 and outputs the input data and the output data ( And output data corresponding to the input data). On the other hand, when input data that has already been encrypted by the cryptographic processing device 16 is input, the input data is not input to the cryptographic processing device 16 and output data that is already held (output data corresponding to the input data) Is output.

なお、キャッシュ機構18は、アドレスADR2と暗号化処理対象の入力データの個数Nとを比較して、入力データがダミーデータであると判断した場合(すなわち、アドレスADR2≧Nの場合)、この入力データと、これに対応する出力データを保持しない。その理由は、ダミーデータを暗号化した出力データは、暗号化装置10から出力される暗号文として使用されないからであるが、処理時間を短縮する目的から、ダミーデータとその出力データを保持する構成としても良い。   When the cache mechanism 18 compares the address ADR2 with the number N of input data to be encrypted and determines that the input data is dummy data (that is, when the address ADR2 ≧ N), this input Does not hold data and corresponding output data. The reason is that the output data obtained by encrypting the dummy data is not used as the ciphertext output from the encryption device 10, but for the purpose of shortening the processing time, the dummy data and the output data are held. It is also good.

続いて、第1の装置22からキャッシュ機構18に出力データの読み出しコマンドが発行され、キャッシュ機構18から、入力データに対応する出力データが読み出される。その後、第1の装置22によって、キャッシュ機構18から読み出された出力データが第2のメモリ14に入力され、さらに、第1の装置22から第2のメモリ14に出力データの書き込みコマンドが発行される。   Subsequently, an output data read command is issued from the first device 22 to the cache mechanism 18, and output data corresponding to the input data is read from the cache mechanism 18. Thereafter, the output data read from the cache mechanism 18 is input to the second memory 14 by the first device 22, and a write command for output data is issued from the first device 22 to the second memory 14. Is done.

第2のメモリ14には、前述の通り、第2の装置24から出力されるアドレスADR2が入力されている。従って、第2のメモリ14のアドレスADR2に出力データが書き込まれる。すなわち、第1のメモリ12の各々のアドレスに格納されている入力データが、暗号処理装置16によって暗号化されて得られる出力データは、第2のメモリ14の同一アドレスに格納される。   As described above, the address ADR2 output from the second device 24 is input to the second memory 14. Accordingly, the output data is written to the address ADR2 of the second memory 14. That is, the output data obtained by encrypting the input data stored in each address of the first memory 12 by the cryptographic processing device 16 is stored in the same address of the second memory 14.

続いて、第1の装置22において、アドレスADR1が1つ増加される(ADR1=ADR1+1)。これ以降は、アドレスADR1が、第1および第2の最大データ数N’−1である1023になるまで、上記暗号化処理が繰り返し行われる。   Subsequently, in the first device 22, the address ADR1 is incremented by one (ADR1 = ADR1 + 1). Thereafter, the encryption process is repeated until the address ADR1 reaches 1023 which is the first and second maximum data numbers N′−1.

なお、入力データ数Nが1024よりも多い場合、全入力データ数Nを1024の入力データからなる複数のブロックに分け、各々のブロックを単位として、上記暗号化処理が繰り返し行われる。   When the number N of input data is larger than 1024, the total number N of input data is divided into a plurality of blocks composed of 1024 input data, and the above encryption process is repeated for each block.

暗号化装置10では、第1および第2の装置22,24(アドレス生成装置)によって、暗号化処理対象の入力データ群が、その処理順序を入れ替えられ、暗号処理装置16によって順次暗号化される。なお、同一値を持つ入力データの暗号処理に関しては、その処理順序を入れ替えても効果がないため、暗号化装置10は、2回以上同じ入力データが暗号処理されないようにキャッシュ機構18を備えている。   In the encryption device 10, the input data group to be encrypted is changed in order by the first and second devices 22 and 24 (address generation device), and sequentially encrypted by the encryption processing device 16. . Regarding encryption processing of input data having the same value, there is no effect even if the processing order is changed. Therefore, the encryption apparatus 10 includes a cache mechanism 18 so that the same input data is not subjected to encryption processing more than once. Yes.

また、暗号処理対象のデータ数が少ない場合でも安全性を確保できるように、ある一定数(所定ワード数)未満の入力データを暗号化する際には、処理対象の入力データ群にダミーデータを挿入し、充分な数の入力データに対して入れ替え処理を行うことができる。なお、入力データのワード数を多くするに従って安全性は高くなるが、処理時間が増大するので、安全性のレベルを考慮して適宜決定するのが好ましい。   When encrypting input data less than a certain number (predetermined number of words) to ensure safety even when the number of data to be encrypted is small, dummy data is added to the input data group to be processed. Insertion can be performed on a sufficient number of input data. As the number of words of the input data increases, the safety increases. However, since the processing time increases, it is preferable to appropriately determine in consideration of the safety level.

以上説明したように、暗号化装置10では、暗号処理装置の暗号アルゴリズムを知らなくても、DPAの対策が可能である。また、既存の暗号処理装置の内部を変更する必要がないため、これまでの設計資産を有効に活用することができる。また、回路の書き替えが不要なため、ある一定以上の数のまとまった入力データを暗号化処理する場合は、処理時間を増加させることなくDPA対策が可能である。   As described above, the encryption apparatus 10 can take measures against DPA without knowing the encryption algorithm of the encryption processing apparatus. Moreover, since it is not necessary to change the inside of the existing cryptographic processing apparatus, the existing design assets can be used effectively. In addition, since it is not necessary to rewrite the circuit, it is possible to take DPA countermeasures without increasing the processing time when encrypting a certain number of pieces of input data.

なお、第1および第2のメモリ12,14、暗号処理装置16、キャッシュ機構18、乱数発生器20、第1および第2の装置(アドレス生成装置)22,24、制御装置26の具体的な構成は何ら限定されず、同様の機能を果たす各種構成のものがいずれも利用可能である。また、第1および第2のメモリ12,14は、1つの半導体記憶装置で構成することも可能である。   The first and second memories 12 and 14, the cryptographic processing device 16, the cache mechanism 18, the random number generator 20, the first and second devices (address generation devices) 22 and 24, and the specifics of the control device 26 The configuration is not limited at all, and any of various configurations that perform the same function can be used. Further, the first and second memories 12 and 14 can be constituted by one semiconductor memory device.

本発明は、基本的に以上のようなものである。
以上、本発明の暗号化装置について詳細に説明したが、本発明は上記実施形態に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
The present invention is basically as described above.
Although the encryption apparatus of the present invention has been described in detail above, the present invention is not limited to the above-described embodiment, and various modifications and changes may be made without departing from the spirit of the present invention. is there.

本発明の暗号化装置の構成を表す一実施形態のブロック概略図である。It is the block schematic diagram of one Embodiment showing the structure of the encryption apparatus of this invention.

符号の説明Explanation of symbols

10 暗号化装置
12 第1のメモリ(メモリA)
14 第2のメモリ(メモリB)
16 暗号処理装置
18 キャッシュ機構
20 乱数発生器
22 第1の装置(装置A)
24 第2の装置(装置B)
26 制御装置(CPU:中央処理装置)
28 システムバス
10 Encryption Device 12 First Memory (Memory A)
14 Second memory (memory B)
16 Cryptographic processing device 18 Cache mechanism 20 Random number generator 22 First device (device A)
24 Second device (device B)
26 Control device (CPU: central processing unit)
28 System bus

Claims (3)

入力データを暗号化し、暗号化後の出力データを出力する暗号処理装置と、
前記暗号処理装置によって暗号化されていない入力データが入力された場合、該入力データを前記暗号処理装置に入力して、前記入力データと前記暗号処理装置から入力される出力データとを対応付けて保持し、前記暗号処理装置によって既に暗号化されている入力データが入力された場合、該入力データを前記暗号処理装置に入力せず、既に保持されている出力データを出力するキャッシュ機構と、
乱数データを発生する乱数発生器と、
前記キャッシュ機構に入力される入力データを格納し、該入力データが所定ワード数よりも少ない場合、不足分の前記入力データのダミーデータとして、前記乱数発生器によって発生された乱数データを格納する第1のメモリと、
前記キャッシュ機構から出力される出力データを格納する第2のメモリと、
前記乱数発生器から入力された乱数データに基づいて、前記第1および第2のメモリの全アドレスにわたって、該第1および第2のメモリをアクセスするアドレスをランダムに入れ替える処理を行うアドレス生成装置とを備え、
前記アドレス生成装置によって生成されるアドレスに基づいて、前記第1のメモリから入力データを読み出して前記キャッシュ機構に入力し、該キャッシュ機構から入力データを前記暗号処理装置に入力し、該暗号処理装置によって入力データを暗号化し、前記暗号処理装置から出力される出力データを前記キャッシュ機構に入力し、該キャッシュ機構から出力データを読み出して前記第2のメモリに書き込む暗号化処理を、前記全アドレスについて繰り返し行うことを特徴とする暗号化装置。
An encryption processor that encrypts input data and outputs the output data after encryption;
When input data that has not been encrypted by the cryptographic processing device is input, the input data is input to the cryptographic processing device, and the input data is associated with output data input from the cryptographic processing device. A cache mechanism for holding the input data that is already encrypted by the cryptographic processing device and outputting the output data that is already retained without inputting the input data to the cryptographic processing device;
A random number generator for generating random data;
Storing input data to be input to the cache mechanism, and storing the random number data generated by the random number generator as dummy data of the insufficient input data when the input data is less than a predetermined number of words 1 memory,
A second memory for storing output data output from the cache mechanism;
An address generation device for performing a process of randomly replacing addresses for accessing the first and second memories over all addresses of the first and second memories based on random number data input from the random number generator; With
Based on an address generated by the address generation device, input data is read from the first memory and input to the cache mechanism, and input data is input from the cache mechanism to the encryption processing device, and the encryption processing device And encrypting the input data, inputting the output data output from the cryptographic processing device to the cache mechanism, reading the output data from the cache mechanism, and writing the data to the second memory for all addresses An encryption device that is repeatedly performed.
前記キャッシュ機構は、前記アドレス生成装置から入力されるアドレスと前記入力データの個数とを比較して、前記入力データがダミーデータであると判断した場合、当該入力データと、これに対応する出力データを保持しないことを特徴とする請求項1に記載の暗号化装置。   When the cache mechanism determines that the input data is dummy data by comparing the address input from the address generator and the number of the input data, the input data and the output data corresponding thereto The encryption device according to claim 1, wherein the encryption device does not hold the password. 前記入力データが所定ワード数よりも多い場合、全ての前記入力データを、所定ワード数の前記入力データからなる複数のブロックに分け、各々の前記ブロックを単位として、上記暗号化処理を繰り返し行うことを特徴とする請求項1または2に記載の暗号化装置。   When the input data is larger than a predetermined number of words, all the input data is divided into a plurality of blocks composed of the input data of a predetermined number of words, and the encryption process is repeatedly performed for each of the blocks. The encryption device according to claim 1, wherein:
JP2006070670A 2006-03-15 2006-03-15 Encryption device Active JP4327169B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006070670A JP4327169B2 (en) 2006-03-15 2006-03-15 Encryption device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006070670A JP4327169B2 (en) 2006-03-15 2006-03-15 Encryption device

Publications (2)

Publication Number Publication Date
JP2007251483A true JP2007251483A (en) 2007-09-27
JP4327169B2 JP4327169B2 (en) 2009-09-09

Family

ID=38595333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006070670A Active JP4327169B2 (en) 2006-03-15 2006-03-15 Encryption device

Country Status (1)

Country Link
JP (1) JP4327169B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009267839A (en) * 2008-04-25 2009-11-12 Ntt Data Corp Encryption processing apparatus, encryption processing method and computer program
JP2013156798A (en) * 2012-01-30 2013-08-15 Kddi Corp Storage device, method for concealing access pattern, and program
JP2014067331A (en) * 2012-09-27 2014-04-17 Kddi Corp Storage device, and method and program for concealing access pattern
JP2014068289A (en) * 2012-09-27 2014-04-17 Kddi Corp Storage device, concealing method for access pattern, and program thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009267839A (en) * 2008-04-25 2009-11-12 Ntt Data Corp Encryption processing apparatus, encryption processing method and computer program
JP2013156798A (en) * 2012-01-30 2013-08-15 Kddi Corp Storage device, method for concealing access pattern, and program
JP2014067331A (en) * 2012-09-27 2014-04-17 Kddi Corp Storage device, and method and program for concealing access pattern
JP2014068289A (en) * 2012-09-27 2014-04-17 Kddi Corp Storage device, concealing method for access pattern, and program thereof

Also Published As

Publication number Publication date
JP4327169B2 (en) 2009-09-09

Similar Documents

Publication Publication Date Title
US9483664B2 (en) Address dependent data encryption
Tehranipoor et al. Robust hardware true random number generators using DRAM remanence effects
US10313128B2 (en) Address-dependent key generator by XOR tree
US10146701B2 (en) Address-dependent key generation with a substitution-permutation network
US20190384938A1 (en) Storage apparatus and method for address scrambling
US20180365451A1 (en) Input/output data encryption
KR20140022869A (en) Random number generating system based on memory start-up noise
EP2434682A1 (en) Cryptographic apparatus and memory system
EP2990953B1 (en) Periodic memory refresh in a secure computing system
JP4327169B2 (en) Encryption device
CN111008407A (en) Encryption circuit for performing virtual encryption operations
CN112887077B (en) SSD main control chip random cache confidentiality method and circuit
JP2005122745A (en) Data encryption in electronic apparatus with symmetric multiprocessor
US9946662B2 (en) Double-mix Feistel network for key generation or encryption
US11914870B2 (en) Side-channel-attack-resistant memory access on embedded central processing units
JP2020064461A (en) Conversion device, conversion method, conversion program, and obfuscation program
JP2008042328A (en) Arithmetic processing unit, arithmetic processing control method, and computer program
JP2015026892A (en) Information processing system
JP6632773B1 (en) Learning identification device, learning identification method, and learning identification program
JP4611643B2 (en) Individual key generator
JP5356583B2 (en) Semiconductor memory device
JP6516610B2 (en) Memory device, host device, and memory system
US20150215129A1 (en) Data encryption of a storage area
Liu et al. Dynamic encryption key design and its security evaluation for memory data protection in embedded systems
JP6473874B2 (en) Memory device, host device, and memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090527

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090610

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4327169

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140619

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250