JP2010232709A - Encryption arithmetic circuit device - Google Patents
Encryption arithmetic circuit device Download PDFInfo
- Publication number
- JP2010232709A JP2010232709A JP2009074812A JP2009074812A JP2010232709A JP 2010232709 A JP2010232709 A JP 2010232709A JP 2009074812 A JP2009074812 A JP 2009074812A JP 2009074812 A JP2009074812 A JP 2009074812A JP 2010232709 A JP2010232709 A JP 2010232709A
- Authority
- JP
- Japan
- Prior art keywords
- random number
- data
- unit
- circuit device
- processing
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、暗号アルゴリズムの処理を行う暗号演算回路装置に関する。特に暗号演算回路での演算中間値の物理的変化量を解析して暗号を解読する暗号解析攻撃を回避する技術に関する。 The present invention relates to a cryptographic operation circuit device that performs cryptographic algorithm processing. In particular, the present invention relates to a technique for avoiding a cryptographic analysis attack that decrypts a cipher by analyzing a physical change amount of a calculation intermediate value in a cryptographic operation circuit.
近年、セキュリティ機能を備えたICカードや携帯端末が広く利用されている。このようなセキュリティを要する装置は何らかの暗号アルゴリズムが用いられており、第三者に情報が漏洩しないような仕組みになっている。ところが最近では、このようなICカードや携帯端末などに実装された暗号アルゴリズムに対するサイドチャネル攻撃が大きな脅威となっている。サイドチャネル攻撃とは、本来、第三者が取得することを想定しない暗号演算回路が動作する際の消費電力や漏洩電磁波或いは演算時間などの漏洩情報を手掛りにして、秘密情報を不正に入手しようとする攻撃のことである。このようなサイドチャネル攻撃の中でも、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読する手法は、差分電力解析(DPA:Differential Power Analysis)攻撃と呼ばれ大きな脅威となっている。 In recent years, IC cards and portable terminals having a security function have been widely used. Such a device requiring security uses some kind of cryptographic algorithm, and has a mechanism that prevents information from leaking to a third party. Recently, however, side-channel attacks against cryptographic algorithms implemented in such IC cards and portable terminals have become a major threat. A side channel attack is an attempt to obtain fraudulent information by using leakage information such as power consumption, leakage electromagnetic waves, or calculation time when a cryptographic operation circuit that is not supposed to be acquired by a third party is operating. Is an attack. Among such side channel attacks, a technique for statistically processing the amount of change in power consumption obtained during cryptographic operations and decrypting secret information is called a differential power analysis (DPA) attack and is a major threat. It has become.
このようなセキュリティ装置への暗号アルゴリズムの実装方法には、CPU(中央演算ユニット)によるソフトウェア実装とワイヤードロジックなどによるハードウェア実装の2つの方法がある。ICカードや簡易な携帯端末などへの暗号アルゴリズムの実装は、処理速度の問題や低消費電力の要求などからハードウェア実装が採用される場合が多い。 There are two methods for implementing cryptographic algorithms in such a security device: software implementation by a CPU (central processing unit) and hardware implementation by wired logic. In many cases, hardware implementation is adopted for implementation of cryptographic algorithms on an IC card or a simple portable terminal due to a problem of processing speed or a demand for low power consumption.
ここで、AES(Advanced Encryption Standard)に代表されるブロック暗号アルゴリズムをハードウェア実装する場合の例について説明する。図6はラウンド関数を演算する暗号演算回路装置900の構成を示した図で、攪拌部901と鍵スケジューリング部902とに分けて描いてある。
Here, an example in which a block cipher algorithm represented by AES (Advanced Encryption Standard) is implemented in hardware will be described. FIG. 6 is a diagram showing a configuration of a cryptographic
図6において、攪拌部901は、外部から入力する平文(または暗号文)とラウンド処理後のデータとを選択するセレクタ903と、所定の処理関数でラウンド処理を行う組合せ回路904と、組合せ回路904の出力データを一時的に保持するレジスタ905と、レジスタ905の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ906とで構成される。攪拌部901は、平文(または暗号文)を処理対象データとして入力し、鍵スケジューリング部902が秘密鍵から作成する副鍵(ラウンド鍵)を用いて所定回数のラウンド処理を行って暗号化し、暗号文(または平文)を処理済データとして出力する。
In FIG. 6, the
攪拌部901において、1ラウンド処理は1クロックで行われ、セレクタ903,組合せ回路904およびレジスタ905の一巡するラウンド処理をクロックに同期して所定回数繰り返す。つまり、組合せ回路904のラウンド処理を基本とする攪拌部901では、鍵スケジューリング部902が出力する副鍵の値と1クロック前のラウンド処理の中間値とを用いて新たなラウンド処理を行い、その演算結果を新たな中間値としてレジスタに格納する処理を繰り返す。そして、クロック毎にラウンド処理関数の演算結果が中間値としてレジスタ905に保持され、必要なラウンド回数分だけクロックが進んだ後、レジスタ905に現れた値が最終演算結果となり、この値を暗号文(暗号化の場合)または平文(復号化の場合)として暗号演算回路装置900の外部に出力する。このように、途中のラウンド処理の演算中間値など不必要な情報を外部に出力することを回避するため、全ラウンド処理を終了した最終結果のみが出力されるようになっている。
In the
一方、鍵スケジューリング部902は、外部から入力する秘密鍵と鍵スケジューリング処理後のデータとを選択するセレクタ907と、セレクタ907の出力データを一時的に保持するレジスタ908と、所定の処理関数で鍵スケジューリング処理を行う組合せ回路909とで構成される。鍵スケジューリング部902は、暗号演算回路装置900の外部から与えられる秘密鍵から各ラウンド処理に必要な副鍵を生成する。
On the other hand, the
また、制御部950は、セレクタ903,レジスタ905,セレクタ906,セレクタ907およびレジスタ908にクロック,制御信号a,制御信号bおよび制御信号cを出力して各部の処理タイミングを制御する。
The
ここで、秘密鍵の値は第三者に知られないように安全に管理する必要があるが、何らかの方法により各ラウンド処理で使用する副鍵の値が暴かれると、鍵スケジューリング部902の処理を逆算することにより秘密鍵の値が第三者に知られてしまうという問題がある。従って、暗号演算回路の設計においては、差分電力解析攻撃などにより副鍵を推定されないように考慮する必要がある。
Here, it is necessary to securely manage the secret key value so that it is not known to a third party. However, if the value of the subkey used in each round process is revealed by some method, the process of the
差分電力解析攻撃の中でも、非特許文献1に示すCPA(Correlation Power Analysis)攻撃は、演算中間値を保持するレジスタ値の変化に着目した攻撃法であり、特にハードウェア実装されたブロック暗号アルゴリズムに対して非常に有効な攻撃法として知られている。以下、AESアルゴリズムに対するCPA攻撃の概要について述べる(非特許文献1参照)。
Among the differential power analysis attacks, the CPA (Correlation Power Analysis) attack shown in Non-Patent
先に説明した図6のブロック暗号アルゴリズムのハードウェア構成を示す暗号演算回路装置900の攪拌部901において、1クロック後のレジスタ905の値の変化量(ハミング距離)が大きければ、その時点での消費電力量も大きい筈であると考えることができる。また、レジスタ905の値が変化すれば、それに応じてラウンド処理を行う組合せ回路904を構成する論理ゲートの入力値も変化するので論理ゲートの状態遷移が行われる。この結果、レジスタ905のハミング距離とその時点での消費電力量には相関が見られる筈である。ここで、ラウンド処理の途中でレジスタ905の中間値が外部に出力されないように制御されている場合、レジスタ905のハミング距離を計算できる可能性があるのは、外部からの入力を伴う初期ラウンドと外部への出力を伴う最終ラウンドの2箇所である。ここでは、最終ラウンドが攻撃ポイントとなるケースについて説明する(非特許文献1参照)。
In the
最終ラウンドの1クロック前のレジスタ値は最終ラウンドへの副鍵値を仮定すれば、AESの最終ラウンド処理を逆に辿って計算することが可能である。例えば図7に示すように、最終ラウンド処理はSubBytes−>ShiftRow−>AddKeyの処理で、1byte単位の処理に閉じているので、副鍵の推定対象としてbyte値を0x00から0xffの256通りの値のいずれか1つに決めれば、1クロック前の処理byte値を計算できる。図7において、1クロック前のレジスタ値をsi,j、暗号文出力をci,j、副鍵をki,jとした場合(尚、i,jは整数で4×4の16byteの座標位置を示す)、例えば図7に示すように、1クロック前の処理byte値s2,0は、s2,0=c2,2(+)k2,2のように計算できる(ここで(+)はEXOR演算を示す)。従って、座標(2,0)位置の1byteの成分に関する最終ラウンドの1クロック前後のハミング距離はs2,0(+)c2,0となり、逆算するとc2,0(+)c2,2(+)k2,2のように計算できる。ここで、先に説明したように、k2,2は0x00から0xffのいずれかの値を取り得るが、256通りの値のいずれか1つに決めるだけで、1クロック前の処理byte値を計算できる。尚、残りの座標位置の15byteの成分についても同様である。 The register value one clock before the last round can be calculated by tracing the last round process of AES in reverse, assuming a subkey value for the last round. For example, as shown in FIG. 7, the final round process is a process of SubBytes->ShiftRow-> AddKey, and is closed to a process of 1 byte unit. Therefore, 256 values of byte values from 0x00 to 0xff are set as subkey estimation targets. If any one of them is determined, the processing byte value one clock before can be calculated. In FIG. 7, the register value one clock before is s i, j , the ciphertext output is c i, j , and the subkey is k i, j (where i and j are integers of 4 × 4 16 bytes) For example, as shown in FIG. 7, the processing byte value s 2,0 one clock before can be calculated as s 2,0 = c 2,2 (+) k 2,2 (here (+) Indicates an EXOR operation). Therefore, the hamming distance before and after one clock of the last round for the 1-byte component at the coordinate (2,0) position is s 2,0 (+) c 2,0 , and when calculated backward, c 2,0 (+) c 2,2 (+) K 2 and 2 can be calculated. Here, as described above, k 2,2 can take any value from 0x00 to 0xff, but the processing byte value one clock before can be obtained by only determining one of 256 values. Can be calculated. The same applies to the remaining 15-byte component of the coordinate position.
ここで、1≦i≦N(Nは自然数)なる異なるN個の平文(ci)について演算を行い、副鍵kの値から定まるハミング距離をhi(k)とし、消費電力との相関をピアソンの相関係数として求める。また、ciに対する消費電力をpi(t)とすると、
hi(k)とpi(t)のピアソン相関係数Corr(hi(k),pi(t))は、
Here, an operation is performed on N plaintexts (c i ) of 1 ≦ i ≦ N (N is a natural number), and the Hamming distance determined from the value of the subkey k is set to h i (k), and the correlation with the power consumption. As the Pearson correlation coefficient. Also, if the power consumption for c i is p i (t),
Pearson correlation coefficient Corr of h i (k) and p i (t) (h i (k), p i (t)) is,
このような相関係数を副鍵が取り得る0x00から0xffの全ての値について計算する。 Such a correlation coefficient is calculated for all values from 0x00 to 0xff that the subkey can take.
上記で説明したように、ハミング距離と消費電力は正の相関を持つので、相関係数が最大となる副鍵の値が真の副鍵となる。このようにして16byte全ての副鍵の値を推定すれば、鍵スケジューリング処理部902の処理を逆算することにより秘密鍵の値を不正に取得することができる。
As described above, since the Hamming distance and the power consumption have a positive correlation, the value of the sub key that maximizes the correlation coefficient is the true sub key. If the values of all the 16-byte subkeys are estimated in this way, the secret key value can be obtained illegally by calculating back the key
このようなCPA攻撃に代表される差分電力解析攻撃に対する従来の対策は、乱数を用いて演算の中間値をマスク化する方法が知られている(例えば非特許文献2参照)。同文献では、AESアルゴリズムのキー関数であるSubBytes関数のマスク化について述べられているが、MixColumn関数などの他関数についてもマスク化を施し、ラウンド処理途中のレジスタに格納される中間値を含めて、演算最終結果である暗号文を除く全ての中間値が乱数によってマスク化できるので、本来のラウンド処理結果をマスク化した値がレジスタに格納される。 As a conventional countermeasure against the differential power analysis attack represented by such a CPA attack, a method of masking an intermediate value of an operation using a random number is known (for example, see Non-Patent Document 2). In this document, masking of the SubBytes function, which is a key function of the AES algorithm, is described, but other functions such as the MixColumn function are also masked and include intermediate values stored in a register in the middle of round processing. Since all intermediate values except the ciphertext that is the final operation result can be masked with random numbers, the value obtained by masking the original round processing result is stored in the register.
図8は、AESのラウンド処理関数(SubBytes−>ShiftRows−>MixColumns−>AddRoundKey)を乱数によりマスク処理する場合の構成を示す(例えば非特許文献2参照)。図8において、fは同型写像、gは同型写像の逆写像とAESアフィン変換の線形変換部との合成写像をそれぞれ示す。SubBytesの中のガロア体逆元算x−1は、非特許文献2のFig.8に記載の回路を示し、ra,rtmp1,rtmp2,rbはそれぞれM,Z,W,Fに対応するマスク用乱数である。ここで、ShiftRowsは単なるByteシフト演算であり、またAddRoundKeyはEXOR演算であるため、一般的な関数をそのまま用いることができる。また、MixColumnは線形関数であり、MixColumn(1)で処理結果に対してMixColumn関数処理した値とMixColumn(2)で乱数に対して同様のMixColumn関数処理した値とのEXOR演算を行うことによってMixColumn(1)の入力の乱数成分をキャンセルできる。ここで、図6で説明したようなマスク処理を行わない通常のラウンド処理関数と比較すると、乱数とのEXOR演算の他に乱数値の変換のためのf,gの関数やMixColumn関数などが追加されている。この結果、通常のラウンド処理の演算結果の値と乱数値とがEXOR演算された値がレジスタに格納されるので、乱数のマスク効果によってラウンド処理前後の値の差分量からハミング距離を計算することができない。このため、差分量と正しい副鍵値との相関が小さくなって相関係数のピークが出現しなくなり、CPA攻撃に代表される差分電力解析攻撃を防御することができる。 FIG. 8 shows a configuration when a round processing function of AES (SubBytes->ShiftRows->MixColumns-> AddRoundKey) is masked with random numbers (for example, see Non-Patent Document 2). In FIG. 8, f is the isomorphism map, and g is the composite map of the inverse map of the isomorphism map and the linear transformation part of the AES affine transformation. The Galois field inverse element x −1 in SubBytes is shown in FIG. 8 shows a circuit according a r a, r tmp1, r tmp2 , r b , respectively M, Z, W, random number mask corresponding to the F. Here, since ShiftRows is a simple Byte shift operation and AddRoundKey is an EXOR operation, a general function can be used as it is. Further, MixColumn is a linear function, and by performing an EXOR operation on a value obtained by processing the MixColumn function on the processing result by MixColumn (1) and a value obtained by processing the same MixColumn function on a random number by MixColumn (2), MixColumn is performed. The random component of the input of (1) can be canceled. Here, in comparison with the normal round processing function that does not perform the mask processing as described in FIG. 6, in addition to the EXOR operation with the random number, functions of f and g, a MixColumn function, and the like for converting the random number value are added. Has been. As a result, the value obtained by EXORing the value of the normal round processing result and the random number value is stored in the register, so that the Hamming distance is calculated from the difference between the values before and after the round processing by the mask effect of the random number. I can't. For this reason, the correlation between the difference amount and the correct subkey value becomes small, and the peak of the correlation coefficient does not appear, so that the differential power analysis attack represented by the CPA attack can be protected.
このようにして、従来技術では、図8に示すような複雑な暗号演算回路によって差分電力解析攻撃を防御することが行われていた。 In this way, in the prior art, the differential power analysis attack is protected by a complicated cryptographic operation circuit as shown in FIG.
先に説明したように、従来技術によるCPA攻撃の防御対策は、暗号演算回路の構成が複雑で処理量が多く、回路規模やコスト的な問題があった。例えば、非特許文献2に示された防御対策は、SubBytes部のガロア体逆元演算途中の中間値をすべてマスク化するCPA攻撃対策を行っている。このため、SubBytes部だけでなく、MixColumn部,AddKey部などラウンド処理全体の組合せ回路をマスク化する必要があるので、マスク化に必要な乱数をラウンド処理関数を構成する論理ゲート毎に用意しなければならない。この結果、マスク化に伴うEXOR回路や予備回路の追加などが必要となり、ラウンド処理関数の回路が複雑化してゲート規模が増大し、さらに演算量も増加するため回路の消費電力が増大するという問題が生じる。
As described above, the CPA attack protection measures according to the prior art have a complicated configuration of the cryptographic operation circuit, a large amount of processing, and problems with circuit scale and cost. For example, the defense countermeasure shown in
上記課題に鑑み、本発明の目的は、マスク化を施さない暗号化処理関数のブロックをそのまま流用して、EXORゲートや予備回路の新規実装を行わずにゲート回路規模の増大や消費電力の増加を抑えながらCPA攻撃を回避することが可能な暗号演算回路装置を提供することである。 In view of the above problems, an object of the present invention is to divert an encryption processing function block that is not masked as it is, and to increase the gate circuit scale and power consumption without newly installing an EXOR gate or a spare circuit. It is an object of the present invention to provide a cryptographic operation circuit device capable of avoiding a CPA attack while suppressing the above.
本発明の請求項1に係る暗号演算回路装置は、入力データに所定の関数処理を施して出力データを生成する関数処理部を有し、初回の処理では外部からの入力データに前記関数処理を実行し、以降の処理では生成された出力データを次回の入力データとして前記関数処理行う一連の処理を所定回数繰り返して得られた出力データを暗号データとして外部に出力する暗号演算回路装置において、前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、前記関数処理部の出力データまたは前記乱数データを一時的に格納する2つのデータ保持部と、前記乱数生成部と前記関数処理部と前記データ保持部の処理タイミングを制御する制御部とを設けたことを特徴とする。
A cryptographic operation circuit device according to
請求項1では、例えば処理タイミング(制御部)の1クロック毎に暗号演算の処理を繰り返し実行する組合せ回路からなる処理関数(関数処理部)の演算結果を演算中間値として2つのレジスタ(2つのデータ保持部)のいずれか一方に格納してクロック信号の進行により所定回数分の処理演算を繰り返し実行する暗号演算回路装置で、処理単位であるデータサイズに等しいビット幅の乱数データを処理対象データ毎に新規に生成する(乱数生成部)。乱数データを生成することにより、消費電力量と演算結果との相関がなくなり、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読するCPA攻撃から防御することができる。 In the first aspect, for example, two registers (two of the processing results (function processing unit) including the combination function that repeatedly executes the cryptographic calculation processing every clock of the processing timing (control unit) are used as the calculation intermediate value. A cryptographic operation circuit device that repeatedly stores a predetermined number of processing operations by the progress of a clock signal and stores random number data having a bit width equal to the data size as a processing unit. Newly generated every time (random number generator). By generating random number data, there is no correlation between the amount of power consumption and the calculation result, and the amount of change in power consumption obtained during cryptographic calculation can be statistically processed to protect against CPA attacks that decrypt secret information.
また、本発明の請求項2に係る暗号演算回路装置は、請求項1に記載の暗号演算回路装置において、前記制御部は、前記関数処理部が初回の処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が初回の処理で生成した出力データを格納するように制御することを特徴とする。
The cryptographic operation circuit device according to
請求項2では、例えば一番最初のタイミングで関数処理部が生成する出力データを演算中間値としてレジスタ1またはレジスタ2の2つのレジスタ(2つのデータ保持部)のいずれかに格納するクロックタイミングの1クロック前のタイミングにおいて、レジスタ1またはレジスタ2のいずれかに乱数生成部により生成した乱数を格納するので、CPA攻撃を受けやすい初期ラウンドでの防御が可能になる。
In the second aspect, for example, the output timing generated by the function processing unit at the first timing is stored as an operation intermediate value in one of the two registers (two data holding units) of the
また、本発明の請求項3に係る暗号演算回路装置は、請求項1に記載の暗号演算回路装置において、前記制御部は、前記関数処理部が最終回の処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が最終回の処理で生成した出力データを格納するように制御することを特徴とする。
The cryptographic operation circuit device according to claim 3 of the present invention is the cryptographic operation circuit device according to
請求項3では、例えば一番最後のタイミングで関数処理部が生成する出力データを演算中間値としてレジスタ1またはレジスタ2の2つのレジスタ(2つのデータ保持部)のいずれかに格納するクロックタイミングの1クロック前のタイミングにおいて、レジスタ1またはレジスタ2のいずれかに乱数生成部により生成した乱数を格納するので、CPA攻撃を受けやすい最終ラウンドでの防御が可能になる。
In the third aspect of the invention, for example, the output timing generated by the function processing unit at the last timing is stored as an operation intermediate value in one of the two registers (two data holding units) of the
また、本発明の請求項4に係る暗号演算回路装置は、請求項1に記載の暗号演算回路装置において、前記制御部は、前記関数処理部が初回および最終回のそれぞれの処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が初回および最終回の処理で生成した出力データを格納するように制御することを特徴とする。
The cryptographic operation circuit device according to claim 4 of the present invention is the cryptographic operation circuit device according to
請求項4では、一番最初と一番最後のタイミングで処理が行われる関数の結果を演算中間値としてレジスタ1またはレジスタ2の2つのレジスタ(2つのデータ保持部)のいずれかに格納するクロックタイミングの1クロック前のタイミングにおいて、レジスタ1またはレジスタ2のいずれかに乱数生成部により生成した乱数を格納するので、CPA攻撃を受けやすい初期ラウンドと最終ラウンドでの防御が可能になる。
According to a fourth aspect of the present invention, there is provided a clock for storing a result of a function processed at the very first timing and the last timing as an operation intermediate value in either one of the two registers (two data holding units) of the
また、本発明の請求項5に係る暗号演算回路装置は、請求項1から4のいずれか一項に記載の暗号演算回路装置において、前記制御部は、前記関数処理部の関数処理毎に前記2つのデータ保持部の少なくとも一方に前記乱数データを格納するように制御することを特徴とする。
Moreover, the cryptographic operation circuit device according to claim 5 of the present invention is the cryptographic operation circuit device according to any one of
請求項5では、クロック毎に処理される関数の結果を演算中間値としてレジスタ1またはレジスタ2にクロックに同期して格納する際に、演算中間値を格納するレジスタとは異なる他方のレジスタに乱数生成部により生成した乱数を格納する。この結果、初期ラウンドと最終ラウンドだけでなく、全てのラウンドで消費電力量と演算結果との相関がなくなり、CPA攻撃から防御することができる。
In claim 5, when the result of the function processed for each clock is stored as an operation intermediate value in
また、本発明の請求項6に係る暗号演算回路装置は、請求項1から4のいずれか一項に記載の暗号演算回路装置において、前記制御部は、前記関数処理部の関数処理毎に、前記関数処理部の出力データまたは前記乱数データを前記2つのデータ保持部に交互に格納するように制御することを特徴とする。
Moreover, the cryptographic operation circuit device according to claim 6 of the present invention is the cryptographic operation circuit device according to any one of
請求項6では、クロック毎に処理される関数の結果を演算中間値としてレジスタ1またはレジスタ2にクロックに同期して交互に格納する。そして、当該クロックタイミングにおいて演算中間値を格納するレジスタとは異なる他方のレジスタに乱数生成部により生成した乱数を格納する。この結果、初期ラウンドと最終ラウンドだけでなく、全てのラウンドで消費電力量と演算結果との相関がなくなり、CPA攻撃から防御することができる。
According to the sixth aspect, the result of the function processed for each clock is alternately stored in the
また、本発明の請求項7に係る暗号演算回路装置は、請求項1から6のいずれか一項に記載の暗号演算回路装置において、前記関数処理部が行う関数処理はブロック暗号アルゴリズムにおける暗号化または復号化のラウンド演算の基本処理であることを特徴とする。この結果、AESなどブロック暗号アルゴリズムを用いる暗号演算回路装置にも適用することができる。
A cryptographic operation circuit device according to claim 7 of the present invention is the cryptographic operation circuit device according to any one of
また、本発明の請求項8に係る暗号演算回路装置は、請求項1から6のいずれか一項に記載の暗号演算回路装置において、前記関数処理部が行う関数処理は公開鍵暗号アルゴリズムで利用されるべき乗剰余演算または楕円スカラー倍演算を実行するための繰り返し演算の基本処理であることを特徴とする。この結果、冪乗剰余演算や楕円スカラー倍演算などの公開鍵暗号アルゴリズムを用いる暗号演算回路装置にも適用することができる。
The cryptographic operation circuit device according to claim 8 of the present invention is the cryptographic operation circuit device according to any one of
本発明に係る暗号演算回路装置は、関数処理部の出力データに等しいビット幅の乱数データを生成して、関数処理部の出力データまたは乱数データを2つのデータ保持部に格納することにより、消費電力量と演算結果との相関がなくなり、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読するCPA攻撃から防御することができる。特に、マスク化を施さない暗号化処理関数(関数処理部)のブロックをそのまま流用して、EXORゲートや予備回路の新規実装を行わずにゲート回路規模の増大や消費電力の増加を抑えながらCPA攻撃を回避することができる。 The cryptographic operation circuit device according to the present invention generates random number data having a bit width equal to the output data of the function processing unit, and stores the output data or random number data of the function processing unit in the two data holding units. There is no correlation between the amount of power and the calculation result, and the amount of change in power consumption obtained during the cryptographic calculation can be statistically processed to protect against a CPA attack that decrypts secret information. In particular, a block of an encryption processing function (function processing unit) that is not masked is used as it is, and CPA while suppressing an increase in gate circuit scale and an increase in power consumption without newly installing an EXOR gate or a spare circuit. Attacks can be avoided.
以下、図面を参照して本発明に係る暗号演算回路装置の各実施形態について詳しく説明する。 Hereinafter, embodiments of a cryptographic operation circuit device according to the present invention will be described in detail with reference to the drawings.
(第1の実施形態)
図1は本実施形態に係る暗号演算回路装置100の構成例を示している。図1に示した暗号演算回路装置100は、従来技術で説明した図6の暗号演算回路装置900に対応し、AESに代表されるブロック暗号アルゴリズムについて、1クロックで1ラウンド処理を行う構成になっている。尚、図1の暗号演算回路装置100は、図6の鍵スケジューリング部902に相当する部分を含めずに攪拌部101と制御部150とで構成され、副鍵は外部から入力する構成になっているが、鍵スケジューリング部902と同じブロックを含めて暗号演算回路装置100としても構わない。
(First embodiment)
FIG. 1 shows a configuration example of a cryptographic
図1において、攪拌部101は、外部から入力する平文(または暗号文)またはラウンド処理後のデータとを選択するセレクタ103と、所定の処理関数でラウンド処理を行う組合せ回路104と、乱数生成部105と、組合せ回路104の出力データまたは乱数生成部105が生成する乱数データとを選択するセレクタ106と、セレクタ106の出力データを一時的に保持するレジスタ107と、組合せ回路104の出力データまたは乱数生成部105が生成する乱数データとを選択するセレクタ108と、セレクタ108の出力データを一時的に保持するレジスタ109と、レジスタ109の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ110とで構成される。
In FIG. 1, a stirring
また、制御部150は、乱数生成部105,レジスタ107およびレジスタ109にクロックを供給し、セレクタ103に制御信号1,セレクタ106に制御信号2,セレクタ108に制御信号3,セレクタ110に制御信号4をそれぞれ出力して攪拌部101の処理タイミングを制御する。尚、制御部150は、暗号演算回路装置100全体の動作を制御し、図6の鍵スケジューリング部902を含む場合は、図6の制御部905と同様に鍵スケジューリング部902に対してもクロックや制御信号を出力する。この場合、制御部150は鍵スケジューリング部902のセレクタ907に制御信号cを出力し、レジスタ908にクロックを供給する。
Further, the
図1の攪拌部101は、従来技術の図6の攪拌部901と同様に、平文(または暗号文)を処理対象データとして入力し、鍵スケジューリング部902などで秘密鍵から作成する副鍵(ラウンド鍵)を用いて所定回数のラウンド処理を行って暗号化し、暗号文(または平文)を処理済データとして出力する。
Similar to the
攪拌部101において、1ラウンド処理は1クロックで行われ、セレクタ103,組合せ回路104,セレクタ106およびレジスタ107を一巡する一連のラウンド処理をクロックに同期して所定回数だけ繰り返す。つまり、組合せ回路104のラウンド処理を基本とする攪拌部101では、鍵スケジューリング部102が出力する副鍵の値と1クロック前のラウンド処理の中間値とを用いて新たなラウンド処理を行い、その演算結果を新たな中間値としてレジスタ107に格納する処理を繰り返す。そして、クロック毎にラウンド処理関数の演算結果が中間値としてレジスタ107に保持され、必要なラウンド回数分だけクロックが進んだ後、最終ラウンドで組合せ回路104が出力するデータが最終演算結果となり、この値を暗号文(暗号化の場合)または平文(復号化の場合)としてセレクタ108を介してレジスタ109に保持され、セレクタ110を介して暗号演算回路装置100の外部に出力する。
In the
このように、途中のラウンド処理の演算中間値などはレジスタ107に格納され、最終ラウンドの最終結果のみレジスタ109に格納されて外部に出力される。
In this way, the intermediate value of the intermediate round process is stored in the
ここで、図1において、外部からの入力データ(平文or暗号文)またはラウンド処理関数の中間値を保持したレジスタ107の出力データを選択するセレクタ103の制御信号1と、レジスタ109に保持された出力データまたは固定値(本実施例ではall=0)をセレクタ110の制御信号4とは、図6の攪拌部901のセレクタ903の制御信号aおよびセレクタ906の制御信号bにそれぞれ対応する。
Here, in FIG. 1, the
尚、本実施形態では、ラウンド処理の演算結果(出力データ)または乱数生成部105が生成する乱数値(乱数データ)を保持するためのレジスタとして、ラウンド処理の中間値を保持するレジスタ107および演算最終結果の最終値を保持するレジスタ109の2系統のレジスタを備えている。ここで、制御信号2はラウンド処理関数の演算結果と乱数生成部105で生成された乱数値のどちらをレジスタ107に格納するかを選択する制御信号であり、制御信号3はラウンド処理関数の演算結果と乱数生成部105で生成された乱数値のどちらをレジスタ109に格納するか選択する制御信号である。
In the present embodiment, the
次に、図1の暗号演算回路装置100の動作について図2のタイミングチャートを用いて詳しく説明する。図2は、制御部150が出力するクロックと、制御信号1と、制御信号2と、制御信号3と、制御信号4と、レジスタ107と、レジスタ109との処理タイミングの関係を描いたタイミングチャートである。尚、図2において、初期ラウンドから最終ラウンドまでの(n+1)回の全ラウンドを1ブロック演算とし、1ブロック演算毎に処理結果の暗号文(or平文)が外部に出力される。また、図1の組合せ回路104によるラウンド処理関数は1クロック周期毎に実行され、レジスタ107およびレジスタ109は1クロック周期で各レジスタへの入力データを保持する。
Next, the operation of the cryptographic
図2において、タイミングt0からtn+2はクロック周期毎のタイミングを示し、d0からdnは組合せ回路104によるラウンド処理関数の各ラウンド毎の出力データを示している。例えばd0は初期ラウンド処理関数の結果の値、d1は第1ラウンド処理関数の結果の値、dnは最終ラウンド処理関数の結果の値をそれぞれ示している。また、rおよびr’は乱数生成部105が1ブロック演算周期毎の更新頻度で生成する乱数を示しており、乱数rと乱数r’は異なる乱数値である。尚、図1において、乱数発生部105にも制御部150からクロックが入力されているが、図2のフローチャートでは、乱数発生部105は最終ラウンド毎に新たな乱数を発生するものとして説明する。この場合は、乱数発生部105の内部に1ブロック分のクロックをカウントするカウンタを設けることで実現できる。或いは、乱数発生部105の消費電力は少し大きくなるが、単純にクロック周期毎に乱数を発生するようにしても構わない。この場合は、各ラウンド毎に乱数発生部105が発生する乱数rの値が異なるだけで、本実施形態の効果は変わらない。
In FIG. 2,
図2において、先ずタイミングt0で1ブロック周期の暗号演算に先立って制御信号2がHighに制御され、乱数生成部105で生成された例えば128ビットの乱数rがレジスタ107に格納される。この間、制御信号1はLowに制御され、タイミングt1で制御信号2がLowに制御され、外部から入力された平文(or暗号文)が初期ラウンド処理されてレジスタ107に格納される。タイミングt2から最終ラウンドを処理するタイミングtn+1まで制御信号1はHighに制御され、各ラウンド処理毎に組合せ回路104の出力データが更新されてレジスタ107に保持される。この間、第(n−1)ラウンドを処理するタイミングtnまでの間、制御信号3はHighに制御されて128ビットの乱数がレジスタ109に格納される。最終ラウンドを処理するタイミングtn+1では、制御信号2がHighに制御されて128ビットの乱数がレジスタ107に格納される。これと同時に、制御信号3がLowに制御されて最終ラウンドの処理結果がレジスタ109に格納される。制御信号4は最終ラウンド処理の確定時のみLowに制御されて演算結果がセレクタ110を介して外部に出力される。制御信号4は、最終ラウンド処理の確定時以外のタイミングではHighに制御されて固定値(例えばall=0)がセレクタ110を介して外部に出力される。タイミングtn+2では制御信号1が再びLowに制御され、先のタイミングt1と同様に、次に外部から入力されるブロックの平文(or暗号文)に対して初期ラウンドの処理から最終ラウンドの処理までの1ブロックの暗号化演算が繰り返される。
In FIG. 2, first, at timing t 0 , the
ここで、本実施形態に係る暗号演算回路装置100において、CPA攻撃のターゲットとなる初期ラウンドおよび最終ラウンドの処理に着目する。先ず、タイミングt1の初期ラウンド処理においては、レジスタ107の値が乱数rからラウンド処理関数の出力データd0に変化する。この時、乱数rの値はブロック演算毎に異なるので、レジスタ107の値の変化量(ハミング距離)を推定することはできない。次に、タイミングtn+1の最終ラウンドにおいては、レジスタ107の値が出力データdn−1から乱数r’に変化し、同時にレジスタ109の値が乱数rから出力データdnに変化する。ここで、r’は更新された乱数値である。最終ラウンドにおいても、乱数rの影響によりレジスタ109の値の変化量(ハミング距離)を推定することができない。
Here, in the cryptographic
このように、本実施形態に係る暗号演算回路装置100は、副鍵を仮定して各レジスタにおけるハミング距離を逆算することができなくなり、副鍵と消費電力との相関を無くすことができる。この結果、マスク化処理などを施していない従来のラウンド処理関数をそのまま利用することができ、従来技術のようにラウンド処理関数全体を乱数によってマスク化するためのEXOR回路や予備回路の追加が不要となる。特に図1に示した本実施形態に係る暗号演算回路装置100の場合は、乱数生成部(従来のマスク化にも必要)に加え、1つのレジスタおよび2つのセレクタを追加するだけでハミング距離の計算を困難にすることができ、ゲート規模の増大と消費電力の増大を回避しつつCPA攻撃を防御することが可能となる。
As described above, the cryptographic
(第2の実施形態)
次に、第2の実施形態に係る暗号演算回路装置200について説明する。図3は暗号演算回路装置200の構成例を示している。図3に示した暗号演算回路装置200は、従来技術で説明した暗号演算回路装置900および第1の実施形態に係る暗号演算回路装置100と同様にAESに代表されるブロック暗号アルゴリズムに対応し、1クロックで1ラウンド処理を行う構成になっている。尚、図3の暗号演算回路装置200は、図6の鍵スケジューリング部902に相当する部分を含めずに攪拌部201と制御部250とで構成され、副鍵は外部から入力する構成になっているが、鍵スケジューリング部902と同じブロックを含めて暗号演算回路装置200としても構わない。
(Second Embodiment)
Next, a cryptographic
第1の実施形態では乱数によるレジスタ値の変化量(ハミング距離)の算出を回避する対策を初期ラウンドと最終ラウンドに限定して行うようにしたが、第2の実施形態では初期ラウンドと最終ラウンドだけでなく中間ラウンドを含む全てのラウンドにおいてレジスタ値の変化量(ハミング距離)の算出を回避することを目的としている。 In the first embodiment, the countermeasure for avoiding the calculation of the change amount (hamming distance) of the register value due to the random number is limited to the initial round and the final round. In the second embodiment, the initial round and the final round are performed. It is intended to avoid calculation of register value change amount (Humming distance) in all rounds including not only the intermediate round.
以下、図3を用いて第2の実施形態に係る暗号演算回路装置200について詳しく説明する。図3において、攪拌部201は、外部から入力する平文(または暗号文)またはラウンド処理後のデータとを選択するセレクタ203と、所定の処理関数でラウンド処理を行う組合せ回路204と、乱数生成部205と、組合せ回路204の出力データまたは乱数生成部205が生成する乱数データとを選択するセレクタ206と、セレクタ206の出力データを一時的に保持するレジスタ207と、組合せ回路204の出力データまたは乱数生成部205が生成する乱数データとを選択するセレクタ208と、セレクタ208の出力データを一時的に保持するレジスタ209と、レジスタ207の出力データまたはレジスタ209の出力データを選択するセレクタ211と、セレクタ211の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ210とで構成される。ここで、第1の実施形態の図1の攪拌部101は組合せ回路104および乱数生成部105以外に2つのレジスタと4つのセレクタで構成されていたのに対して、第2の実施形態の図3の攪拌部201は組合せ回路204および乱数生成部205以外に2つのレジスタと5つのセレクタで構成される点が異なる。特にレジスタ207とレジスタ209の出力データを交互に選択するセレクタ211を設けた点に特徴がある。
Hereinafter, the cryptographic
また、制御部250は、第1の実施形態の制御部150と同様に、乱数生成部205,レジスタ207およびレジスタ209にクロックを供給し、セレクタ203に制御信号21,セレクタ206に制御信号22,セレクタ208に制御信号23,セレクタ210に制御信号24,セレクタ210に制御信号25をそれぞれ出力して攪拌部201の処理タイミングを制御する。ここで、図1の制御信号1と図2の制御信号21および図1の制御信号4と図2の制御信号24はそれぞれ同じ処理タイミングで動作するが、その他の制御信号の処理タイミングは異なる。尚、各処理タイミングについては後で詳しく説明する。さらに、制御部250は、暗号演算回路装置200全体の動作を制御し、図6の鍵スケジューリング部902を含む場合は、図6の制御部905と同様に鍵スケジューリング部902に対してもクロックや制御信号を出力する。この場合、制御部250は鍵スケジューリング部902のセレクタ907に制御信号cを出力し、レジスタ908にクロックを供給する。
Further, the
図3の攪拌部201は、従来技術の図6の攪拌部901と同様に、平文(または暗号文)を処理対象データとして入力し、鍵スケジューリング部902などで秘密鍵から作成する副鍵(ラウンド鍵)を用いて所定回数のラウンド処理を行って暗号化し、暗号文(または平文)を処理済データとして出力する。
Similar to the
攪拌部201において、1ラウンド処理は1クロックで行われ、セレクタ203から組合せ回路204,セレクタ206またはセレクタ208,レジスタ207またはレジスタ209,セレクタ211までを一巡する一連のラウンド処理をクロックに同期して所定回数だけ繰り返す。つまり、組合せ回路204のラウンド処理を基本とする攪拌部201では、鍵スケジューリング部902などから入力する副鍵の値と1クロック前のラウンド処理の中間値とを用いて新たなラウンド処理を行い、その演算結果を新たな中間値としてレジスタ207またはレジスタ209に格納する処理を繰り返す。そして、必要なラウンド回数分だけクロックが進んだ後、最終ラウンドで組合せ回路204が出力するデータを格納するレジスタ207またはレジスタ209の値がセレクタ211で最終演算結果として選択され、この値を暗号文(暗号化の場合)または平文(復号化の場合)としてセレクタ210を介して暗号演算回路装置200の外部に出力される。
In the
ここで、本実施形態では、ラウンド処理の演算結果(出力データ)または乱数生成部205が生成する乱数値(乱数データ)を保持するためのレジスタとして、ラウンド処理の中間値を保持するレジスタ207およびレジスタ209の2系統のレジスタを備えている。制御信号22および制御信号23はラウンド処理関数の演算結果と乱数生成部205で生成された乱数値のいずれかを交互にレジスタ207またはレジスタ209に格納するための制御信号であり、制御信号25はレジスタ207またはレジスタ209のいずれかに格納されたラウンド処理関数の演算結果を選択する制御信号である。
Here, in the present embodiment, as a register for holding a calculation result (output data) of the round process or a random value (random number data) generated by the random
次に、図3の暗号演算回路装置200の動作について図4のタイミングチャートを用いて詳しく説明する。図3は、制御部250が出力するクロックと、制御信号21と、制御信号22と、制御信号23と、制御信号24と、制御信号25と、レジスタ207と、レジスタ209との処理タイミングの関係を描いたタイミングチャートである。尚、図4において、初期ラウンドから最終ラウンドまでの(n+1)回の全ラウンドを1ブロック演算とし、1ブロック演算毎に処理結果の暗号文(or平文)が外部に出力される。また、図3の組合せ回路204によるラウンド処理関数は1クロック周期毎に実行され、レジスタ207およびレジスタ209は1クロック周期で各レジスタへの入力データを保持する。
Next, the operation of the cryptographic
図4において、第1の実施形態の図2と同様に、タイミングt0からtn+2はクロック周期毎のタイミングを示し、d0からdnは組合せ回路204によるラウンド処理関数の各ラウンド毎の出力データを示している。例えばd0は初期ラウンド処理関数の結果の値、d1は第1ラウンド処理関数の結果の値、dnは最終ラウンド処理関数の結果の値をそれぞれ示している。また、rおよびr’は乱数生成部105が1ブロック演算周期毎の更新頻度で生成する乱数を示しており、乱数rと乱数r’は異なる乱数値である。尚、図3の乱数発生部205は、第1の実施形態の図1の乱数発生部105と同様に、制御部250からクロックが入力されているが、図4のフローチャートでは乱数発生部205は最終ラウンドの処理タイミング毎に新たな乱数を発生するものとして説明する。但し、乱数発生部105で説明したように、乱数発生部205は単純にクロック周期毎に乱数を発生するようにしても構わない。この場合は、各ラウンド毎にレジスタ207またはレジスタ209に格納される乱数rの値が異なるだけで、本実施形態の効果は変わらない。
4, similarly to FIG. 2 of the first embodiment, t n + 2 from the timing t 0 represents the timing of each clock period, d 0 from d n is the output of each round of the round processing function by the
図4において、先ずタイミングt0で1ブロック周期の暗号演算に先立って制御信号22がHighに制御され、乱数生成部205で生成された例えば128ビットの乱数rがレジスタ207に格納される。この間、制御信号21はLowに制御され、タイミングt1で制御信号2がLowに制御され、外部から入力された平文(or暗号文)が初期ラウンド処理されてレジスタ207に格納される。
In FIG. 4, at timing t 0 , the control signal 22 is controlled to be High prior to the cryptographic operation for one block period, and a 128-bit random number r generated by the random
一方、タイミングt1で制御信号23はHighに制御され128ビットの乱数rがレジスタ209に格納される。制御信号25は、タイミングt2までLowに制御され、レジスタ207に格納された初期ラウンドの演算結果d0が第1ラウンドの入力データとしてラウンド処理関数(組合せ回路204)に入力される。
On the other hand, at timing t 1 , the control signal 23 is controlled to be High, and a 128-bit random number r is stored in the
次のタイミングt2では制御信号22がHigh,制御信号23がLowにそれぞれ制御され、レジスタ207には128ビット乱数rが、またレジスタ209には第1ラウンドの演算結果d1が格納され、タイミングt3では制御信号25がHighに制御され、レジスタ209に格納されたラウンド処理関数の演算結果d1が第2ラウンドの入力データとしてラウンド処理関数に入力される。
Next timing t 2 the control signal 22 is High, the control signal 23 is controlled to Low, 128-bit random number r in the
タイミングt4では、制御信号22および制御信号23が1つ前のクロック周期(3クロック目)とはそれぞれ逆相に制御され、レジスタ207には第1ラウンドの演算結果d2が、またレジスタ209には128ビット乱数rが格納される。タイミングt4では、制御信号25がLowに制御されレジスタ207に格納されたラウンド処理関数の演算結果d2が第3ラウンドの入力データとしてラウンド処理関数に入力される。同様の動作を最終ラウンドまで繰り返す。
At timing t 4 , the control signal 22 and the control signal 23 are controlled to have opposite phases to the previous clock cycle (third clock), the first round operation result d 2 is stored in the
最終ラウンドでは、ラウンド処理の総数に応じてレジスタ207またはレジスタ209のいずれかにラウンド処理関数の最終演算結果(暗号文または平文)が格納されており、制御信号24をLowに制御することにより最終演算結果の値が暗号演算回路装置200の外部に出力される。
In the final round, the final calculation result (ciphertext or plaintext) of the round processing function is stored in either the
そして、次のブロック演算では、前のブロックの最終演算結果が格納されたレジスタ207またはレジスタ209のいずれかのレジスタとは異なる他方のレジスタへ初期ラウンドの演算結果が格納される。図4の場合はレジスタ209に次のブロック演算の初期ラウンドの演算結果d0’が格納され、レジスタ207には乱数発生部205が制御信号24のタイミングで新たに発生した乱数r’が格納される。
In the next block operation, the operation result of the initial round is stored in the other register different from the
このように1クロック毎に制御信号22および制御信号23を交互に反転することにより、またレジスタ207またはレジスタ209に交互に格納されるラウンド処理関数の演算結果を制御信号25によって交互に選択することにより、レジスタ207またはレジスタ209にはラウンド処理関数の演算結果di(iは整数)と乱数発生部205が発生する乱数rとが交互に格納される。
In this way, the control signal 22 and the control signal 23 are alternately inverted every clock, and the operation result of the round processing function alternately stored in the
ここで、レジスタ207またはレジスタ209において、各々のレジスタに格納される値が乱数−>ラウンド処理関数の演算結果−>乱数−>ラウンド処理関数の演算結果−>乱数−>・・・というように、乱数が必ず隔クロック毎に格納されるので、どのクロックタイミングにおいても各レジスタの値の変化量(ハミング距離)をランダム化することができる。この結果、全てのクロック(全てのラウンド処理)において、クロック前後のレジスタ207およびレジスタ209に格納される値のハミング距離がr(+)diとなる(ここで(+)はEXOR演算を示す)ので、副鍵を仮定して各レジスタに格納される値のハミング距離を逆算することができなくなる。さらに、乱数は暗号化対象であるデータ単位を処理するブロック演算周期で新しい値に更新されるため、副鍵と消費電力との相関を無くすことができる。尚、先に説明したように、乱数をクロック周期または複数のクロック単位で発生させても構わないが、少なくともブロック演算周期毎に乱数を更新する必要がある。
Here, in the
このように、本実施形態に係る暗号演算回路装置200は、マスク化処理などを施していない従来のラウンド処理関数をそのまま利用することができ、従来技術のようにラウンド処理関数全体を乱数によってマスク化するためのEXOR回路や予備回路の追加が不要となる。特に図3に示した本実施形態に係る暗号演算回路装置200の場合は、乱数生成部(従来のマスク化にも必要)に加え、1つのレジスタおよび3つのセレクタを追加するだけでハミング距離の計算を困難にすることができ、ゲート規模の増大と消費電力の増大を回避しつつCPA攻撃を防御することが可能となる。
As described above, the cryptographic
(第3の実施形態)
次に、第3の実施形態に係る暗号演算回路装置300について説明する。第1の実施形態に係る暗号演算回路装置100および第2の実施形態に係る暗号演算回路装置200では、AESに代表されるブロック暗号アルゴリズムに適用した場合の例を示したが、公開鍵暗号アルゴリズムにおいて冪乗剰余演算や楕円スカラー倍演算を実行する暗号モジュールに対しても、レジスタがパイプライン構成を取るハードウェア実装を行う場合には、先に示したブロック暗号アルゴリズムの場合と同様に本発明を適用することができる。以下、本実施形態では、このような公開鍵暗号アルゴリズムの演算で利用される冪乗剰余演算や楕円スカラー倍演算に本発明を適用した場合の例を示す。
(Third embodiment)
Next, a cryptographic
図5は、第3の実施形態に係る暗号演算回路装置300の構成図である。図5において、暗号演算回路装置300は、攪拌部301と、制御部350とで構成される。尚、図5の暗号演算回路装置300の攪拌部301の基本構成は、組合せ回路304を除いて、第2の実施形態で示した図3の攪拌部201と同じである。図3の攪拌部201では、組合せ回路204は鍵スケジューリング部902が生成する副鍵に基づいてブロック暗号アルゴリズムのラウンド処理関数を実行する回路であったが、本実施形態の図5の組合せ回路304は指数展開部302の出力値に基づいて冪乗剰余演算または楕円スカラー倍演算を行う回路で構成される。尚、冪乗剰余演算または楕円スカラー倍演算については周知の演算であるので詳細な説明は省略する。また、攪拌部301の処理タイミングについても第2の実施形態で説明した図4のタイミングチャートと全く同じなので重複する説明は省略する。
FIG. 5 is a configuration diagram of the cryptographic
図5において、指数展開部302では、秘密鍵である指数の値を例えばバイナリ値に展開し、展開したバイナリ値の上位ビットまたは下位ビットから順に、冪乗剰余演算の場合は乗算または自乗算を、楕円スカラー倍演算の場合は楕円加算または楕円2倍算を実行する。そして、図3の攪拌部201と同様に、組合せ回路304での処理関数の演算結果は中間値としてレジスタ207またはレジスタ209に交互に格納される。この時、演算結果が格納されない他方のレジスタには乱数発生部205が生成する乱数が格納される。
In FIG. 5, the exponent expansion unit 302 expands the value of the exponent that is a secret key into, for example, a binary value, and performs multiplication or self-multiplication in the case of a power-residue operation in order from the upper or lower bits of the expanded binary value. In the case of elliptic scalar multiplication, ellipse addition or elliptic doubling is executed. Similar to the stirring
図5の第3の実施形態に係る暗号演算回路装置300のタイミングチャートは図4で説明した第2の実施形態の場合と同様であるが、例えば左バイナリ法の場合、図4において第1ラウンド,第2ラウンド,・・・,初期ラウンドの各処理は、バイナリ展開した指数の最上位ビット,(最上位−1)ビット,・・・,最下位ビットの各処理にそれぞれ対応する。また、乱数生成部205が生成する乱数は、冪乗剰余演算または楕円スカラ一倍演算のトリガーがかかる度に新しい値に更新される。
The timing chart of the cryptographic
ここで、冪乗剰余演算や楕円スカラー倍演算に対するCPA攻撃は、最上位ビットから最下位ビットに至る各処理において、順番にビット単位で解析を行う攻撃法が用いられるため、本実施形態のようにビット単位で交互にレジスタ207またはレジスタ209に乱数を格納する方法は、ハミング距離の計算を回避する上で非常に有効である。
Here, the CPA attack for the power-residue operation and the elliptic scalar multiplication operation uses an attack method in which analysis is performed in units of bits in order in each process from the most significant bit to the least significant bit. The method of storing random numbers in the
このように、本実施形態に係る暗号演算回路装置300は、公開鍵暗号アルゴリズムにおいて冪乗剰余演算や楕円スカラー倍演算を実行する暗号モジュールに対しても適用することができ、ビット単位で解析を行うCPA攻撃を防御することが可能となる。
As described above, the cryptographic
以上、第1の実施形態に係る暗号演算回路装置100および第2の実施形態に係る暗号演算回路装置200ではAESに代表されるブロック暗号アルゴリズムに適用した場合の例を示し、第3の実施形態に係る暗号演算回路装置300では公開鍵暗号アルゴリズムに適用した場合の例を示した。これらの実施形態以外にも、例えばストリーム暗号を用いる場合においても同様のパイプライン方式のレジスタ構成を取るハードウェア実装で暗号演算回路を実現する場合には本発明を適用することが可能である。
As described above, in the cryptographic
このように、暗号化処理関数の演算結果を格納するレジスタを2系統設けることにより、レジスタ値の変化量からハミング距離を計算するCPA攻撃を防御することができる。特に、マスク化を施していない従来の暗号化処理関数をそのまま流用できるので、EXORゲートや予備回路を新規に実装する必要がなく、ゲート回路規模の増大と消費電力の増加を抑えながら、効果的にCPA攻撃を回避することができる。 In this way, by providing two systems for storing the calculation result of the encryption processing function, it is possible to prevent a CPA attack that calculates the Hamming distance from the amount of change in the register value. In particular, since the conventional encryption processing function without masking can be used as it is, there is no need to newly install an EXOR gate or a spare circuit, and it is effective while suppressing an increase in the gate circuit scale and an increase in power consumption. CPA attacks can be avoided.
以上、本発明に係る暗号演算回路装置の各実施形態について説明してきたが、その精神またはその主要な特徴から逸脱することなく他の多様な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明は、特許請求の範囲によって示されるものであって、本発明は明細書本文にはなんら拘束されない。さらに、特許請求の範囲の均など範囲に属する変形や変更は、全て本発明の範囲内である。 Although the embodiments of the cryptographic operation circuit device according to the present invention have been described above, the present invention can be implemented in various other forms without departing from the spirit or main features thereof. Therefore, the above-described embodiment is merely an example in all respects and should not be interpreted in a limited manner. The present invention is shown by the scope of claims, and the present invention is not limited to the text of the specification. Furthermore, all modifications and changes belonging to the scope of the claims are within the scope of the present invention.
1,2,3,4,21,22,23,24,25,a,b,c・・・制御信号
100,200,300,900・・・暗号演算回路装置
101,201,301,901・・・攪拌部
103,106,108,110,203,206,208,210,211,903,906,907・・・セレクタ
104,204,304,904,909・・・組合せ回路
105,205・・・乱数生成部
107,109,207,209,905,908・・・レジスタ
150,250,350,950・・・制御部
201・・・攪拌部
250・・・制御部
302・・・指数展開部
902・・・鍵スケジューリング部
1, 2, 3, 4, 21, 22, 23, 24, 25, a, b, c... Control signals 100, 200, 300, 900... Cryptographic
Claims (8)
前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、
前記関数処理部の出力データまたは前記乱数データを一時的に格納する2つのデータ保持部と、
前記乱数生成部と前記関数処理部と前記データ保持部の処理タイミングを制御する制御部と
を設けたことを特徴とする暗号演算回路装置。 It has a function processing unit that performs predetermined function processing on input data to generate output data. In the first processing, the function processing is performed on input data from the outside, and in the subsequent processing, the generated output data is In the cryptographic operation circuit device for outputting the output data obtained by repeating a series of processing for performing the function processing as input data to the outside as encryption data,
A random number generator for generating random data having a bit width equal to the output data of the function processor;
Two data holding units for temporarily storing the output data of the function processing unit or the random number data;
A cryptographic operation circuit device comprising: the random number generation unit, the function processing unit, and a control unit that controls processing timing of the data holding unit.
前記制御部は、前記関数処理部が初回の処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が初回の処理で生成した出力データを格納するように制御することを特徴とする暗号演算回路装置。 The cryptographic operation circuit device according to claim 1,
The control unit stores the random number data generated by the random number generation unit in one of the previous processes in which the function processing unit performs an initial process in one of the two data holding units, and the random number data is stored. A cryptographic operation circuit device that controls to store the output data generated by the function processing unit in the first process in the same data holding unit.
前記制御部は、前記関数処理部が最終回の処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が最終回の処理で生成した出力データを格納するように制御することを特徴とする暗号演算回路装置。 The cryptographic operation circuit device according to claim 1,
The control unit stores the random number data generated by the random number generation unit in one of the previous processes in which the function processing unit performs the final process, and stores the random number data. The cryptographic operation circuit device is controlled to store the output data generated by the function processing unit in the last processing in the same data holding unit.
前記制御部は、前記関数処理部が初回および最終回のそれぞれの処理を行う1回前の処理で前記乱数生成部が生成した乱数データを前記2つのデータ保持部のいずれかに格納し、前記乱数データが格納された同一の前記データ保持部に前記関数処理部が初回および最終回の処理で生成した出力データを格納するように制御することを特徴とする暗号演算回路装置。 The cryptographic operation circuit device according to claim 1,
The control unit stores the random number data generated by the random number generation unit in one of the previous processes in which the function processing unit performs each of the initial and final processes in one of the two data holding units, A cryptographic operation circuit device, wherein the function processing unit is controlled to store output data generated by the first and last processing in the same data holding unit in which random number data is stored.
前記制御部は、前記関数処理部の関数処理毎に前記2つのデータ保持部の少なくとも一方に前記乱数データを格納するように制御することを特徴とする暗号演算回路装置。 In the cryptographic operation circuit device according to any one of claims 1 to 4,
The control unit controls to store the random number data in at least one of the two data holding units for each function processing of the function processing unit.
前記制御部は、前記関数処理部の関数処理毎に、前記関数処理部の出力データまたは前記乱数データを前記2つのデータ保持部に交互に格納するように制御することを特徴とする暗号演算回路装置。 In the cryptographic operation circuit device according to any one of claims 1 to 4,
The control unit controls the output data of the function processing unit or the random number data to be alternately stored in the two data holding units for each function processing of the function processing unit. apparatus.
前記関数処理部が行う関数処理はブロック暗号アルゴリズムにおける暗号化または復号化のラウンド演算の基本処理であることを特徴とする暗号演算回路装置。 In the cryptographic operation circuit device according to any one of claims 1 to 6,
The function processing performed by the function processing unit is basic processing of encryption or decryption round operation in a block cipher algorithm.
前記関数処理部が行う関数処理は公開鍵暗号アルゴリズムで利用されるべき乗剰余演算または楕円スカラー倍演算を実行するための繰り返し演算の基本処理であることを特徴とする暗号演算回路装置。 In the cryptographic operation circuit device according to any one of claims 1 to 6,
The cryptographic processing circuit apparatus, wherein the functional processing performed by the function processing unit is a basic processing of repetitive calculation for executing a modular multiplication or elliptic scalar multiplication operation to be used in a public key cryptographic algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009074812A JP2010232709A (en) | 2009-03-25 | 2009-03-25 | Encryption arithmetic circuit device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009074812A JP2010232709A (en) | 2009-03-25 | 2009-03-25 | Encryption arithmetic circuit device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010232709A true JP2010232709A (en) | 2010-10-14 |
Family
ID=43048163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009074812A Withdrawn JP2010232709A (en) | 2009-03-25 | 2009-03-25 | Encryption arithmetic circuit device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010232709A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013080976A1 (en) * | 2011-11-28 | 2013-06-06 | 日本電気株式会社 | Encryption process circuit, decryption process circuit, methods thereof, and programs thereof |
JP5364840B2 (en) * | 2010-02-22 | 2013-12-11 | 株式会社東芝 | Encryption device |
-
2009
- 2009-03-25 JP JP2009074812A patent/JP2010232709A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5364840B2 (en) * | 2010-02-22 | 2013-12-11 | 株式会社東芝 | Encryption device |
US9288040B2 (en) | 2010-02-22 | 2016-03-15 | Kabushiki Kaisha Toshiba | Encryption device |
WO2013080976A1 (en) * | 2011-11-28 | 2013-06-06 | 日本電気株式会社 | Encryption process circuit, decryption process circuit, methods thereof, and programs thereof |
JP5327493B1 (en) * | 2011-11-28 | 2013-10-30 | 日本電気株式会社 | Encryption processing circuit and decryption processing circuit, method and program thereof |
US8842824B2 (en) | 2011-11-28 | 2014-09-23 | Nec Corporation | Encryption processing circuit and decryption processing circuit, methods thereof, and programs thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bilgin et al. | Trade-offs for threshold implementations illustrated on AES | |
US8724804B2 (en) | Encryption processing apparatus | |
US8817975B2 (en) | Cryptographic processing apparatus and operation method | |
SG173111A1 (en) | Cryptography circuit protected against observation attacks, in particular of a high order | |
JPWO2008146482A1 (en) | ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, AND INTEGRATED CIRCUIT | |
WO2013069392A1 (en) | Nonlinear processor, encryption device for stream cipher, decryption device for stream cipher, mask processing method, encryption method for stream cipher, decryption method for stream cipher, and program | |
GB2453367A (en) | Cryptographic processing using isomorphic mappings of Galois fields | |
JPWO2009122464A1 (en) | Encryption device and built-in device equipped with a common key encryption function | |
Hemme et al. | Differential fault analysis on the SHA1 compression function | |
JP2005215688A (en) | Hardware encryption/decryption apparatus using s-box operation, and method for the same | |
EP3143720A1 (en) | Differential power analysis countermeasures | |
Nara et al. | A scan-based attack based on discriminators for AES cryptosystems | |
KR100834096B1 (en) | Aria encryption method for countermeasuring higher order dpa | |
Wang et al. | Higher-order masking in practice: A vector implementation of masked AES for ARM NEON | |
JP7155173B2 (en) | Protecting Modular Inversion Operations from External Observation Attacks | |
KR101506499B1 (en) | Method for encrypting with SEED applying mask | |
JP5327493B1 (en) | Encryption processing circuit and decryption processing circuit, method and program thereof | |
Arora et al. | A double-width algorithmic balancing to prevent power analysis side channel attacks in aes | |
JP2010245753A (en) | Encryption operation circuit device | |
JP2010232709A (en) | Encryption arithmetic circuit device | |
Vadnala et al. | Algorithms for switching between boolean and arithmetic masking of second order | |
Yli-Mäyry et al. | Chosen-input side-channel analysis on unrolled light-weight cryptographic hardware | |
KR20100059571A (en) | Apparatus and method for operating inversion of aes with masking method, and aes cipher system and method using thereof | |
JP2006054568A (en) | Encryption apparatus, decryption apparatus and method, and computer program | |
Bucci et al. | Testing power-analysis attack susceptibility in register-transfer level designs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20120605 |