JP2010245753A - Encryption operation circuit device - Google Patents

Encryption operation circuit device Download PDF

Info

Publication number
JP2010245753A
JP2010245753A JP2009091120A JP2009091120A JP2010245753A JP 2010245753 A JP2010245753 A JP 2010245753A JP 2009091120 A JP2009091120 A JP 2009091120A JP 2009091120 A JP2009091120 A JP 2009091120A JP 2010245753 A JP2010245753 A JP 2010245753A
Authority
JP
Japan
Prior art keywords
unit
data
processing
random number
exclusive
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
Application number
JP2009091120A
Other languages
Japanese (ja)
Inventor
Koyo Yamakoshi
公洋 山越
Toshinori Fukunaga
利徳 福永
Junko Takahashi
順子 高橋
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2009091120A priority Critical patent/JP2010245753A/en
Publication of JP2010245753A publication Critical patent/JP2010245753A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that the power consumption of a circuit increases because a complicated circuit needs to be added in accordance with masking, increasing a gate scale and the amount of operations in the conventional manner. <P>SOLUTION: This encryption operation circuit device includes: an input selecting section for selecting external input data at the first time of a processing unit composed of the prescribed number of times of performing repetition processing and selecting internal input data in the subsequent processing; a function processing section; a random number generating section; a first exclusive OR operation section for obtaining an exclusive OR between output data of the function processing section and random number data generated by the random number generating section; a data holding section for holding an operation result of the first exclusive OR operation section; a second exclusive OR operation section for obtaining an exclusive OR between output data of the data holding section and the random number data generated by the random number generating section to define the exclusive OR as internal input data; and a control section for controlling processing timing of each section for each processing unit, and controlling processing timing for outputting to the outside an operation result of the second exclusive OR operation section as encryption data after executing the prescribed number of times of a series of processing from the input selecting section to the second exclusive OR operation section. <P>COPYRIGHT: (C)2011,JPO&INPIT

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)に代表されるブロック暗号アルゴリズムをハードウェア実装する場合の例について説明する。図10はラウンド関数を演算する暗号演算回路装置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. 10 is a diagram showing a configuration of a cryptographic operation circuit device 900 for calculating a round function, which is divided into a stirring unit 901 and a key scheduling unit 902.

図10において、攪拌部901は、外部から入力する平文(または暗号文)とラウンド処理後のデータとを選択するセレクタ903と、所定の処理関数でラウンド処理を行う組合せ回路904と、組合せ回路904の出力データを一時的に保持するレジスタ905と、レジスタ905の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ906とで構成される。攪拌部901は、平文(または暗号文)を処理対象データとして入力し、鍵スケジューリング部902が秘密鍵から作成する副鍵(ラウンド鍵)を用いて所定回数のラウンド処理を行って暗号化し、暗号文(または平文)を処理済データとして出力する。   In FIG. 10, the agitation unit 901 includes a selector 903 that selects plaintext (or ciphertext) input from the outside and data after round processing, a combinational circuit 904 that performs round processing with a predetermined processing function, and a combinational circuit 904. The register 905 temporarily holds the output data of the register 905 and the selector 906 that selects the output data of the register 905 or All = 0 (all 0 data) and outputs the selected data to the outside. The agitation unit 901 inputs plaintext (or ciphertext) as processing target data, performs encryption a predetermined number of times using a subkey (round key) created from the secret key by the key scheduling unit 902, Output the sentence (or plaintext) as processed data.

攪拌部901において、1ラウンド処理は1クロックで行われ、セレクタ903,組合せ回路904およびレジスタ905の一巡するラウンド処理をクロックに同期して所定回数繰り返す。つまり、組合せ回路904のラウンド処理を基本とする攪拌部901では、鍵スケジューリング部902が出力する副鍵の値と1クロック前のラウンド処理の中間値とを用いて新たなラウンド処理を行い、その演算結果を新たな中間値としてレジスタに格納する処理を繰り返す。そして、クロック毎にラウンド処理関数の演算結果が中間値としてレジスタ905に保持され、必要なラウンド回数分だけクロックが進んだ後、レジスタ905に現れた値が最終演算結果となり、この値を暗号文(暗号化の場合)または平文(復号化の場合)として暗号演算回路装置900の外部に出力する。このように、途中のラウンド処理の演算中間値など不必要な情報を外部に出力することを回避するため、全ラウンド処理を終了した最終結果のみが出力されるようになっている。   In the agitation unit 901, one round process is performed in one clock, and the round process of one cycle of the selector 903, the combinational circuit 904, and the register 905 is repeated a predetermined number of times in synchronization with the clock. That is, the agitation unit 901 based on the round process of the combinational circuit 904 performs a new round process using the value of the sub key output from the key scheduling unit 902 and the intermediate value of the round process one clock before, The process of storing the operation result in the register as a new intermediate value is repeated. Then, the operation result of the round processing function is held in the register 905 as an intermediate value for each clock, and after the clock has advanced by the required number of rounds, the value appearing in the register 905 becomes the final operation result. The data is output to the outside of the cryptographic operation circuit device 900 as (in the case of encryption) or plain text (in the case of decryption). As described above, in order to avoid outputting unnecessary information such as an intermediate value of an intermediate round process to the outside, only the final result after all round processes are output.

一方、鍵スケジューリング部902は、外部から入力する秘密鍵と鍵スケジューリング処理後のデータとを選択するセレクタ907と、セレクタ907の出力データを一時的に保持するレジスタ908と、所定の処理関数で鍵スケジューリング処理を行う組合せ回路909とで構成される。鍵スケジューリング部902は、暗号演算回路装置900の外部から与えられる秘密鍵から各ラウンド処理に必要な副鍵を生成する。   On the other hand, the key scheduling unit 902 includes a selector 907 that selects a secret key input from the outside and data after key scheduling processing, a register 908 that temporarily stores output data of the selector 907, and a key with a predetermined processing function. And a combinational circuit 909 that performs scheduling processing. The key scheduling unit 902 generates a subkey necessary for each round process from a secret key given from the outside of the cryptographic operation circuit device 900.

また、制御部950は、セレクタ903,レジスタ905,セレクタ906,セレクタ907およびレジスタ908にクロック,制御信号a,制御信号bおよび制御信号cを出力して各部の処理タイミングを制御する。   The control unit 950 outputs a clock, a control signal a, a control signal b, and a control signal c to the selector 903, the register 905, the selector 906, the selector 907, and the register 908 to control the processing timing of each unit.

ここで、秘密鍵の値は第三者に知られないように安全に管理する必要があるが、何らかの方法により各ラウンド処理で使用する副鍵の値が暴かれると、鍵スケジューリング部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 key scheduling unit 902 is performed. There is a problem that the value of the secret key is known to a third party by calculating back. Therefore, in the design of the cryptographic operation circuit, it is necessary to consider so that the subkey is not estimated by a differential power analysis attack or the like.

差分電力解析攻撃の中でも、非特許文献1に示すCPA(Correlation Power Analysis)攻撃は、演算中間値を保持するレジスタ値の変化に着目した攻撃法であり、特にハードウェア実装されたブロック暗号アルゴリズムに対して非常に有効な攻撃法として知られている。以下、AESアルゴリズムに対するCPA攻撃の概要について述べる(非特許文献1参照)。   Among the differential power analysis attacks, the CPA (Correlation Power Analysis) attack shown in Non-Patent Document 1 is an attack method that focuses on the change of the register value that holds the operation intermediate value. It is known as a very effective attack method. The outline of the CPA attack against the AES algorithm will be described below (see Non-Patent Document 1).

先に説明した図10のブロック暗号アルゴリズムのハードウェア構成を示す暗号演算回路装置900の攪拌部901において、1クロック後のレジスタ905の値の変化量(ハミング距離)が大きければ、その時点での消費電力量も大きい筈であると考えることができる。また、レジスタ905の値が変化すれば、それに応じてラウンド処理を行う組合せ回路904を構成する論理ゲートの入力値も変化するので論理ゲートの状態遷移が行われる。この結果、レジスタ905のハミング距離とその時点での消費電力量には相関が見られる筈である。ここで、ラウンド処理の途中でレジスタ905の中間値が外部に出力されないように制御されている場合、レジスタ905のハミング距離を計算できる可能性があるのは、外部からの入力を伴う初期ラウンドと外部への出力を伴う最終ラウンドの2箇所である。ここでは、最終ラウンドが攻撃ポイントとなるケースについて説明する(非特許文献1参照)。   In the agitation unit 901 of the cryptographic operation circuit device 900 showing the hardware configuration of the block cipher algorithm in FIG. 10 described above, if the amount of change (Hamming distance) in the register 905 after one clock is large, the current value at that time It can be considered that power consumption should be large. Further, when the value of the register 905 changes, the input value of the logic gate constituting the combinational circuit 904 that performs the round process also changes accordingly, so that the state transition of the logic gate is performed. As a result, there should be a correlation between the Hamming distance of the register 905 and the power consumption at that time. Here, when the intermediate value of the register 905 is controlled so as not to be output to the outside during the round process, the possibility of calculating the Hamming distance of the register 905 is the initial round with input from the outside. Two places in the final round with output to the outside. Here, a case where the last round becomes an attack point will be described (see Non-Patent Document 1).

最終ラウンドの1クロック前のレジスタ値は最終ラウンドへの副鍵値を仮定すれば、AESの最終ラウンド処理を逆に辿って計算することが可能である。例えば図11に示すように、最終ラウンド処理はSubBytes−>ShiftRow−>AddKeyの処理で、1byte単位の処理に閉じているので、副鍵の推定対象としてbyte値を0x00から0xffの256通りの値のいずれか1つに決めれば、1クロック前の処理byte値を計算できる。図11において、1クロック前のレジスタ値をsi,j、暗号文出力をci,j、副鍵をki,jとした場合(尚、i,jは整数で4×4の16byteの座標位置を示す)、例えば図11に示すように、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. 11, 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. 11, when 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. 11, 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個の平文(c)について演算を行い、副鍵kの値から定まるハミング距離をh(k)とし、消費電力との相関をピアソンの相関係数として求める。また、cに対する消費電力をp(t)とすると、
(k)とp(t)のピアソン相関係数Corr(h(k),p(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,

Figure 2010245753
で定義される。
Figure 2010245753
Defined by

Figure 2010245753
このような相関係数を副鍵が取り得る0x00から0xffの全ての値について計算する。
Figure 2010245753
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 scheduling processing unit 902.

このような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.

図12は、AESのラウンド処理関数(SubBytes−>ShiftRows−>MixColumns−>AddRoundKey)を乱数によりマスク処理する場合の構成を示す(例えば非特許文献2参照)。図12において、ShiftはShiftRowsの略記、MixはMixColumnsの略記、AddはAddRoundKeyの略記をそれぞれ示す。また、fは同型写像、gは同型写像の逆写像とAESアフィン変換の線形変換部との合成写像をそれぞれ示す。SubBytesの中のガロア体逆元算x−1は、非特許文献2のFig.8に記載の回路を示し、r,rtmp1,rtmp2,rはそれぞれM,Z,W,Fに対応するマスク用乱数である。ここで、ShiftRowsは単なるByteシフト演算であり、またAddRoundKeyはEXOR演算であるため、一般的な関数をそのまま用いることができる。また、MixColumnは線形関数であり、MixColumn(1)で処理結果に対してMixColumn関数処理した値とMixColumn(2)で乱数に対して同様のMixColumn関数処理した値とのEXOR演算を行うことによってMixColumn(1)の入力の乱数成分をキャンセルできる。ここで、図10で説明したようなマスク処理を行わない通常のラウンド処理関数と比較すると、乱数とのEXOR演算の他に乱数値の変換のためのf,gの関数やMixColumn関数などが追加されている。この結果、通常のラウンド処理の演算結果の値と乱数値とがEXOR演算された値がレジスタに格納されるので、乱数のマスク効果によってラウンド処理前後の値の差分量からハミング距離を計算することができない。このため、差分量と正しい副鍵値との相関が小さくなって相関係数のピークが出現しなくなり、CPA攻撃に代表される差分電力解析攻撃を防御することができる。 FIG. 12 shows a configuration in the case where the AES round processing function (SubBytes->ShiftRows->MixColumns-> AddRoundKey) is masked with random numbers (see, for example, Non-Patent Document 2). In FIG. 12, Shift is an abbreviation for ShiftRows, Mix is an abbreviation for MixColumns, and Add is an abbreviation for AddRoundKey. Further, f represents the isomorphism map, and g represents a composite mapping of the inverse mapping of the isomorphism mapping and the linear transformation unit 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, when compared with a normal round processing function that does not perform the mask processing as described in FIG. 10, functions of f and g, a MixColumn function, and the like for conversion of random values are added in addition to an EXOR operation with a random number. 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.

このようにして、従来技術では、図12に示すような複雑な暗号演算回路によって差分電力解析攻撃を防御することが行われていた。尚、上記の暗号演算回路装置900は、ブロック暗号アルゴリズムを用いる従来例であったが、図13に示すような従来の公開鍵暗号アルゴリズムを用いる暗号演算回路装置960に対しても同様に考えることができる。図13の暗号演算回路装置960は、公開鍵暗号の演算で利用される冪乗剰余演算や楕円スカラー倍演算を利用する暗号演算回路で構成され、攪拌部961と、秘密鍵(冪乗指数またはスカラー倍指数)による指数展開部962と、制御部970とで構成される。   In this way, in the prior art, the differential power analysis attack is protected by a complicated cryptographic operation circuit as shown in FIG. The above-described cryptographic operation circuit device 900 is a conventional example using a block encryption algorithm. However, the same applies to a cryptographic operation circuit device 960 using a conventional public key encryption algorithm as shown in FIG. Can do. The cryptographic operation circuit device 960 in FIG. 13 includes a cryptographic operation circuit that uses a power-residue operation and an elliptic scalar multiplication operation that are used in public-key encryption operations, and includes a stirring unit 961 and a secret key (power exponent or An exponent expansion unit 962 based on a scalar multiple index) and a control unit 970.

図13において、攪拌部961は、所定の冪乗剰余演算や楕円スカラー倍演算を行う組合せ回路963と、組合せ回路963の出力データを一時的に保持するレジスタ964と、レジスタ964の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ965とで構成される。指数展開部962は、秘密鍵である指数の値を例えばバイナリ値に展開し、展開したバイナリ値の上位ビットまたは下位ビットから順に組合せ回路963に出力する。組合せ回路963は、外部から入力する平文(または暗号文)に対して指数展開部962が展開したバイナリ値を用いて、冪乗剰余演算の場合は乗算または自乗算を行い、或いは楕円スカラー倍算の場合は楕円加算または楕円2倍算を行う。演算結果はレジスタ964に1クロック期間保持されて、次のラウンドで組合せ回路963にフィードバックされる。そして、クロック毎に同様のラウンド処理を行い、指数展開部962が出力する指数の展開ビット長分だけ繰り返し実行後、レジスタ964に現れた値が最終演算結果となり、この値を暗号文(暗号化の場合)または平文(復号化の場合)として暗号演算回路装置960の外部に出力する。尚、制御部970は、セレクタ965にクロックおよび制御信号dを出力して各部の処理タイミングを制御する。ここで、図13では、指数展開部962でバイナリ展開した指数1ビット分の演算を1クロックで処理する場合を示している。   In FIG. 13, the agitation unit 961 includes a combinational circuit 963 that performs a predetermined power-residue calculation and an elliptic scalar multiplication operation, a register 964 that temporarily holds output data of the combinational circuit 963, and output data of the register 964 or All = 0 (all 0 data) is selected and output to the outside. The exponent expansion unit 962 expands the exponent value, which is a secret key, into a binary value, for example, and outputs the result to the combinational circuit 963 in order from the upper bit or the lower bit of the expanded binary value. The combinational circuit 963 uses a binary value expanded by the exponent expansion unit 962 for plaintext (or ciphertext) input from the outside, performs multiplication or self-multiplication in the case of a power-residue operation, or elliptic scalar multiplication In the case of, ellipse addition or ellipse doubling is performed. The calculation result is held in the register 964 for one clock period and fed back to the combinational circuit 963 in the next round. Then, the same round processing is performed for each clock, and after repeated execution for the expansion bit length of the exponent output from the exponent expansion unit 962, the value appearing in the register 964 becomes the final operation result, and this value is converted to the ciphertext (encryption ) Or plaintext (in the case of decryption) is output to the outside of the cryptographic operation circuit device 960. The control unit 970 outputs a clock and a control signal d to the selector 965 to control processing timing of each unit. Here, FIG. 13 shows a case where an arithmetic operation for one bit of the exponent developed by the exponent developing unit 962 is processed in one clock.

ところが、図10に示した暗号演算回路装置900と同様に、図13に示した暗号演算回路装置960においても、冪乗剰余演算や楕円スカラー倍に対する展開した指数のビット毎の処理でのレジスタ中間値のハミング距離が攻撃の手掛かりとして利用されるCPA攻撃を防御することができない。   However, similarly to the cryptographic operation circuit device 900 shown in FIG. 10, the cryptographic operation circuit device 960 shown in FIG. 13 also uses a register intermediate in the bit-by-bit processing of the developed exponent for exponentiation remainder calculation and elliptic scalar multiplication. The value Hamming distance cannot prevent a CPA attack that is used as a clue to the attack.

菅原,本間,青木,佐藤,“サイドチャネル攻撃標準評価FPGAボードを用いた暗号ハードウェアに対する電力解析実験,”マルチメディア,分散,協調とモバイル(DICOMO2007)シンポジウム,7D−5,2007.Sugawara, Honma, Aoki, Sato, “Power channel analysis experiment on cryptographic hardware using side channel attack standard evaluation FPGA board,” Multimedia, Distributed, Collaboration and Mobile (DICOMO2007) Symposium, 7D-5, 2007. E.Trichina,“Small Size,Low Power Side Channel−Immune AES Co−processor Design and Synthesis Results”,AES2004.E. Trichina, “Small Size, Low Power Side Channel-Immune AES Co-processor Design and Synthesis Results”, AES 2004.

先に説明したように、従来技術による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 Non-Patent Document 2 is a countermeasure against CPA attack that masks all intermediate values in the middle of Galois field inverse element calculation of the SubBytes part. For this reason, since it is necessary to mask not only the SubBytes part but also the combination circuit of the whole round process such as the MixColumn part and the AddKey part, random numbers necessary for masking must be prepared for each logic gate constituting the round processing function. I must. As a result, it is necessary to add a large number of EXOR circuits and spare circuits accompanying masking, which complicates the circuit of the round processing function, increases the gate scale, and further increases the amount of calculation, thereby increasing the power consumption of the circuit. The problem arises.

上記課題に鑑み、本発明の目的は、従来のマスク化を施さない暗号化処理関数のブロックをそのまま流用しながら乱数によるマスク化を実現可能とし、新たなEXORゲートや予備回路の新規実装をできるだけ少なくしてゲート回路規模の増大や消費電力の増加を抑えながらCPA攻撃を回避することが可能な暗号演算回路装置を提供することである。   In view of the above problems, the object of the present invention is to enable the masking by random numbers while diverting the conventional block of the encryption processing function without masking as much as possible, and to implement a new EXOR gate and a spare circuit as much as possible. An object of the present invention is to provide a cryptographic operation circuit device capable of avoiding a CPA attack while suppressing an increase in gate circuit scale and power consumption by reducing the number of gate circuits.

本発明の請求項1に係る暗号演算回路装置は、所定回数の繰り返し処理で構成される処理単位の初回は外部入力データを選択し以降の回の処理は内部入力データを選択する入力選択部と、前記入力選択部が選択したデータに所定の関数処理を施して出力データを生成する関数処理部と、前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、前記関数処理部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第1の排他的論理和演算部と、前記第1の排他的論理和演算部の演算結果を保持するデータ保持部と、前記データ保持部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求めて前記内部入力データとする第2の排他的論理和演算部と、前記処理単位毎の各部の処理タイミングを制御し、前記入力選択部から前記第2の排他的論理和演算部までの一連の処理を所定回数実行後の前記第2の排他的論理和演算部の演算結果を暗号データとして外部に出力する処理タイミングを制御する制御部とを備えたことを特徴とする。   According to a first aspect of the present invention, there is provided a cryptographic operation circuit device comprising: an input selection unit that selects external input data for the first time of a processing unit configured by a predetermined number of repetition processes, and selects internal input data for subsequent processes. A function processing unit that performs predetermined function processing on the data selected by the input selection unit to generate output data; a random number generation unit that generates random data having a bit width equal to the output data of the function processing unit; A first exclusive OR operation unit that obtains an exclusive OR of the output data of the function processing unit and the random number data generated by the random number generation unit, and holds the operation result of the first exclusive OR operation unit A data holding unit, a second exclusive OR operation unit that obtains an exclusive OR of the output data of the data holding unit and the random number data generated by the random number generation unit and sets the internal input data, For each processing unit The processing timing of each unit is controlled, and the operation result of the second exclusive OR operation unit after executing a series of processing from the input selection unit to the second exclusive OR operation unit a predetermined number of times is encrypted data. And a control unit for controlling processing timing to be output to the outside.

請求項1では、例えば処理タイミング(制御部)の1クロック毎に暗号演算の処理を繰り返し実行する組合せ回路からなる処理関数(関数処理部)の演算結果を乱数(乱数生成部)でマスク化するExOR(第1の排他的論理和演算部)と、マスク化された演算中間値を保持するレジスタ(データ保持部)と、マスク化された値を同じ乱数でアンマスク化するExOR(第2の排他的論理和演算部)を介して再び関数処理部に入力してクロック信号(処理単位)の進行により所定回数分の処理を繰り返し実行する暗号演算回路装置である。レジスタに保持する際に乱数によるマスク化を行うので、消費電力量と演算中間値との相関がなくなり、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読するCPA攻撃から防御することができる。しかも、関数処理部に入力する時は、アンマスク化した本来の関数処理データを入力するので、従来の回路構成を流用することができる。   In claim 1, for example, the calculation result of a processing function (function processing unit) composed of a combinational circuit that repeatedly executes cryptographic calculation processing at every clock of processing timing (control unit) is masked with a random number (random number generation unit). ExOR (first exclusive OR operation unit), a register (data holding unit) that holds a masked operation intermediate value, and ExOR (second exclusion) that unmasks the masked value with the same random number This is a cryptographic operation circuit device that is input again to the function processing unit via a logical OR operation unit) and repeatedly executes a predetermined number of processes as the clock signal (processing unit) advances. Since it is masked with a random number when it is stored in the register, there is no correlation between the power consumption and the operation intermediate value, and the CPA attack that decrypts the secret information by statistically processing the amount of change in power consumption obtained during the cryptographic operation Can defend against. In addition, since the unmasked original function processing data is input when inputting to the function processing unit, the conventional circuit configuration can be used.

また、本発明の請求項2に係る暗号演算回路装置は、請求項1に記載の暗号演算回路装置において、前記制御部は、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行することを特徴とする。   The cryptographic operation circuit device according to claim 2 of the present invention is the cryptographic operation circuit device according to claim 1, wherein the control unit holds the operation result of the first exclusive OR operation unit as the data The processing of the second exclusive OR operation unit is executed at a processing timing next to the processing timing held in the unit.

請求項2では、例えば処理関数(関数処理部)の演算結果をExOR(第1の排他的論理和演算部)でマスク化してレジスタ(データ保持部)に保持する処理タイミングの次の処理タイミングでExOR(第2の排他的論理和演算部)はマスク化された値を同じ乱数でアンマスク化する処理を行うことにより、従来の回路構成を流用しながら確実に関数処理部の演算中間値をマスク化することができる。   In the second aspect, for example, the calculation result of the processing function (function processing unit) is masked by ExOR (first exclusive OR calculation unit) and stored in the register (data holding unit) at the next processing timing. ExOR (second exclusive OR operation unit) unmasks the masked value with the same random number, thereby reliably masking the operation intermediate value of the function processing unit while diverting the conventional circuit configuration. Can be

また、本発明の請求項3に係る暗号演算回路装置は、請求項2に記載の暗号演算回路装置において、前記制御部は、前記一連の処理の初期化ステップにおいて、前記乱数生成部が生成する乱数データを前記データ保持部に保持する処理を実行することを特徴とする。これにより、初期化時の処理が簡略化できる。   According to a third aspect of the present invention, in the cryptographic operation circuit device according to the second aspect, the control unit generates the random number generation unit in the initialization step of the series of processes. A process of holding random number data in the data holding unit is executed. Thereby, the process at the time of initialization can be simplified.

また、本発明の請求項4に係る暗号演算回路装置は、請求項2に記載の暗号演算回路装置において、前記制御部は、前記一連の処理の初回処理ステップにおいて、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行することを特徴とする。   According to a fourth aspect of the present invention, in the cryptographic operation circuit device according to the second aspect, in the first processing step of the series of processes, the control unit performs the first exclusive logic operation. The processing of the second exclusive OR operation unit is executed at a processing timing next to the processing timing of holding the operation result of the sum operation unit in the data holding unit.

請求項4では、例えば一番最初のタイミングで関数処理部が生成する出力データを乱数でマスク化してレジスタ(データ保持部)に格納するので、CPA攻撃を受けやすい初期ラウンドでの防御が可能になる。   In claim 4, for example, since the output data generated by the function processing unit at the very first timing is masked with a random number and stored in a register (data holding unit), it is possible to protect in the initial round that is susceptible to a CPA attack. Become.

また、本発明の請求項5に係る暗号演算回路装置は、請求項2に記載の暗号演算回路装置において、前記制御部は、前記一連の処理の最終処理ステップにおいて、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行することを特徴とする。   The cryptographic operation circuit device according to a fifth aspect of the present invention is the cryptographic operation circuit device according to the second aspect, wherein the control unit includes the first exclusive logic in the final processing step of the series of processes. The processing of the second exclusive OR operation unit is executed at a processing timing next to the processing timing of holding the operation result of the sum operation unit in the data holding unit.

請求項5では、例えば一番最後のタイミングで関数処理部が生成する出力データを乱数でマスク化してレジスタ(データ保持部)に格納するので、CPA攻撃を受けやすい最終ラウンドでの防御が可能になる。   In the fifth aspect, for example, the output data generated by the function processing unit at the last timing is masked with a random number and stored in a register (data holding unit). Become.

また、本発明の請求項6に係る暗号演算回路装置は、請求項1から5のいずれか一項に記載の暗号演算回路装置において、前記乱数生成部が生成する乱数は、少なくとも処理単位毎に更新する擬似乱数または真性乱数であることを特徴とする。   A cryptographic operation circuit device according to claim 6 of the present invention is the cryptographic operation circuit device according to any one of claims 1 to 5, wherein the random number generated by the random number generation unit is at least for each processing unit. It is a pseudo random number or a true random number to be updated.

請求項6では、擬似乱数または真性乱数によってレジスタに保持する演算中間値と消費電力量との相関をなくすことができ、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読するCPA攻撃から防御することができる。   According to the sixth aspect of the present invention, the correlation between the calculation intermediate value held in the register by the pseudo random number or the true random number and the power consumption can be eliminated, and the amount of change in the power consumption obtained during the cryptographic calculation is statistically processed to obtain the secret information. You can defend against CPA attacks that decipher.

また、本発明の請求項7に係る暗号演算回路装置は、所定回数の繰り返し処理で構成される処理単位の初回は外部入力データを選択し以降の回の処理は内部入力データを選択する入力選択部と、前記入力選択部が選択したデータに所定の関数処理を施して出力データを生成する関数処理部と、前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、前記関数処理部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第1の排他的論理和演算部と、前記第1の排他的論理和演算部の演算結果または前記関数処理部の出力データを保持するデータ保持部と、前記データ保持部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第2の排他的論理和演算部と、前記処理単位毎の各部の処理タイミングを制御し、初回の処理単位では前記第1の排他的論理和演算部および前記第2の排他的論理和演算部の演算を実行し、2回目以降の処理単位では前記第1の排他的論理和演算部および前記第2の排他的論理和演算部の演算を処理毎に交互に実行し、前記入力選択部から前記第2の排他的論理和演算部までの一連の処理を前記処理単位として所定回数実行後の前記第2の排他的論理和演算部の演算結果または前記データ保持部の出力データを暗号データとして外部に出力する処理タイミングを制御する制御部とを備えたことを特徴とする。   In the cryptographic operation circuit device according to claim 7 of the present invention, the input unit selects the external input data for the first time of the processing unit configured by the predetermined number of repetition processes, and selects the internal input data for the subsequent processes. A function processing unit that performs predetermined function processing on the data selected by the input selection unit to generate output data, and a random number generation unit that generates random data having a bit width equal to the output data of the function processing unit , A first exclusive OR operation unit for obtaining an exclusive OR of the output data of the function processing unit and the random number data generated by the random number generation unit, and an operation result of the first exclusive OR operation unit Alternatively, a data holding unit that holds output data of the function processing unit, and a second exclusive OR operation unit that obtains an exclusive OR of the output data of the data holding unit and the random number data generated by the random number generation unit When, The processing timing of each unit for each processing unit is controlled, and in the first processing unit, the operations of the first exclusive OR operation unit and the second exclusive OR operation unit are executed, and the second and subsequent processing In units, the operations of the first exclusive OR operation unit and the second exclusive OR operation unit are alternately executed for each process, and from the input selection unit to the second exclusive OR operation unit. A control unit for controlling the processing timing of outputting the operation result of the second exclusive OR operation unit or the output data of the data holding unit as encrypted data to the outside after a predetermined number of executions of the series of processes as the processing unit It is characterized by comprising.

請求項7では、例えば処理タイミング(制御部)の1クロック毎に暗号演算の処理を繰り返し実行する組合せ回路からなる処理関数(関数処理部)の演算結果を乱数(乱数生成部)でマスク化するExOR(第1の排他的論理和演算部)と、マスク化された演算中間値を保持するレジスタ(データ保持部)と、マスク化された値を同じ乱数でアンマスク化するExOR(第2の排他的論理和演算部)を介して再び関数処理部に入力してクロック信号(処理単位)の進行により所定回数分の処理を繰り返し実行する暗号演算回路装置で、初回はマスク化とアンマスク化の処理を実行し、2回目以降はマスク化とアンマスク化の処理を行う処理単位とマスク化とアンマスク化の処理を行わない処理単位とを交互に実行するようになっている。このように、交互に実行することによりレジスタ中間値のハミング距離を計算することが困難になり、CPA攻撃から防御することができる。   According to a seventh aspect of the present invention, for example, an operation result of a processing function (function processing unit) composed of a combinational circuit that repeatedly executes cryptographic operation processing every clock of processing timing (control unit) is masked with a random number (random number generation unit). ExOR (first exclusive OR operation unit), a register (data holding unit) that holds a masked operation intermediate value, and ExOR (second exclusion) that unmasks the masked value with the same random number Is a cryptographic operation circuit device that inputs again to the function processing unit via the logical OR operation unit) and repeatedly executes the processing for a predetermined number of times according to the progress of the clock signal (processing unit). In the second and subsequent times, a processing unit that performs masking and unmasking processing and a processing unit that does not perform masking and unmasking processing are alternately executed. In this way, it is difficult to calculate the hamming distance of the register intermediate value by executing alternately, and it is possible to protect against the CPA attack.

また、本発明の請求項8に係る暗号演算回路装置は、請求項7に記載の暗号演算回路装置において、前記乱数生成部が生成する乱数は、少なくとも2回の処理単位に1度の頻度で更新する擬似乱数または真性乱数であることを特徴とする。   The cryptographic operation circuit device according to claim 8 of the present invention is the cryptographic operation circuit device according to claim 7, wherein the random number generated by the random number generation unit is at a frequency of at least once every two processing units. It is a pseudo random number or a true random number to be updated.

請求項8では、擬似乱数または真性乱数によってレジスタに保持する演算中間値と消費電力量との相関をなくすことができ、暗号演算中に得られる消費電力の変化量を統計処理して秘密情報を解読するCPA攻撃から防御することができる。   In claim 8, the correlation between the operation intermediate value held in the register by the pseudo random number or the true random number and the power consumption can be eliminated, and the amount of change in the power consumption obtained during the cryptographic operation is statistically processed to obtain the secret information. You can defend against CPA attacks that decipher.

本発明に係る暗号演算回路装置は、出力データに等しいビット幅の乱数データを生成して、関数処理部の出力データまたは乱数データを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, and stores the output data or random number data of the function processing unit in the two data holding units, thereby calculating the power consumption amount. Correlation with the Hamming distance of the result is lost, and it is possible to protect against a CPA attack that decrypts secret information by statistically processing the amount of change in power consumption obtained during cryptographic computation. In particular, it is possible to realize masking by random numbers while diverting the block of the conventional encryption processing function without masking, and increase the scale of the gate circuit by minimizing new implementations of new EXOR gates and spare circuits. A CPA attack can be avoided while suppressing an increase in power consumption.

第1の実施形態に係るブロック暗号演算回路装置100の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the block encryption arithmetic circuit apparatus 100 which concerns on 1st Embodiment. 第1の実施形態に係るブロック暗号演算回路装置100のタイミングチャートである。3 is a timing chart of the block cipher operation circuit device 100 according to the first embodiment. 第1の実施形態に係るブロック暗号演算回路装置100の動作を時系列的に示す説明図である。It is explanatory drawing which shows operation | movement of the block encryption arithmetic circuit apparatus 100 which concerns on 1st Embodiment in time series. 第1の実施形態の変形例のタイミングチャートである。It is a timing chart of the modification of 1st Embodiment. 第1の実施形態の変形例の動作を時系列的に示す説明図である。It is explanatory drawing which shows the operation | movement of the modification of 1st Embodiment in time series. 第2の実施形態に係る2段パイプライン型ブロック暗号演算回路装置200の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the 2 stage | paragraph pipeline type block encryption arithmetic circuit apparatus 200 which concerns on 2nd Embodiment. 第2の実施形態に係る2段パイプライン型ブロック暗号演算回路装置200のタイミングチャートである。6 is a timing chart of the two-stage pipeline block encryption arithmetic circuit device 200 according to the second embodiment. 第3の実施形態に係る公開鍵暗号演算回路装置300の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the public key encryption arithmetic circuit apparatus 300 which concerns on 3rd Embodiment. 第3の実施形態に係る公開鍵暗号演算回路装置300のタイミングチャートである。It is a timing chart of the public key encryption arithmetic circuit device 300 which concerns on 3rd Embodiment. 従来のブロック暗号アルゴリズムを処理する暗号演算回路装置900の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the cryptographic operation circuit apparatus 900 which processes the conventional block cipher algorithm. 一般的なAESラウンド処理関数の最終ラウンド処理の説明図である。It is explanatory drawing of the last round process of a general AES round process function. 従来のマスク化対策を行ったAESラウンド処理の例を示す説明図である。It is explanatory drawing which shows the example of the AES round process which performed the conventional masking countermeasure. 従来の公開鍵暗号演算アルゴリズムを処理する暗号演算回路装置960の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the encryption arithmetic circuit apparatus 960 which processes the conventional public key encryption arithmetic algorithm.

以下、図面を参照して本発明に係る暗号演算回路装置の各実施形態について詳しく説明する。   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は、従来技術で説明した図10の暗号演算回路装置900に対応し、AESに代表されるブロック暗号アルゴリズムについて、1クロックで1ラウンド処理を行う構成になっている。尚、図1の暗号演算回路装置100は、図10の鍵スケジューリング部902に相当する部分を含めずに攪拌部101と制御部150とで構成され、副鍵は外部から入力する構成になっているが、鍵スケジューリング部902と同じブロックを含めて暗号演算回路装置100としても構わない。
(First embodiment)
FIG. 1 shows a configuration example of a cryptographic operation circuit device 100 according to the present embodiment. The cryptographic operation circuit device 100 shown in FIG. 1 corresponds to the cryptographic operation circuit device 900 of FIG. 10 described in the prior art, and is configured to perform one round processing with one clock for a block encryption algorithm typified by AES. ing. 1 includes the agitation unit 101 and the control unit 150 without including the portion corresponding to the key scheduling unit 902 in FIG. 10, and the sub key is input from the outside. However, the same block as the key scheduling unit 902 may be included as the cryptographic operation circuit device 100.

図1において、攪拌部101は、外部から入力する平文(または暗号文)またはラウンド処理後のデータとを選択するセレクタ103と、所定の処理関数でラウンド処理を行う組合せ回路104と、乱数生成部105と、乱数生成部105が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ106と、セレクタ106の出力データと組合せ回路104の出力データとの排他的論理和を求めるEXOR回路107(第1の排他的論理和演算部)と、EXOR回路107の出力データを一時的に保持するレジスタ108と、乱数生成部105が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ109と、レジスタ108の出力データとセレクタ109の出力データとの排他的論理和を求めるEXOR回路110(第2の排他的論理和演算部)と、EXOR回路110の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ111とで構成される。   In FIG. 1, a stirring unit 101 includes a selector 103 that selects plaintext (or ciphertext) input from the outside or data after round processing, a combinational circuit 104 that performs round processing with a predetermined processing function, and a random number generation unit. 105, the selector 106 that selects the random number data output from the random number generation unit 105 or All = 0 (all 0 data), and EXOR for obtaining an exclusive OR of the output data of the selector 106 and the output data of the combinational circuit 104 A circuit 107 (first exclusive OR operation unit), a register 108 that temporarily holds output data of the EXOR circuit 107, and random number data output from the random number generation unit 105 or All = 0 (all 0 data). The selector 109 for selecting the data, and the exclusive OR of the output data of the register 108 and the output data of the selector 109 is obtained. It constituted an EXOR circuit 110 (second exclusive-OR operation unit), and the output data or All = 0 selector 111 to be output to the outside by selecting (all zero data) of the EXOR circuit 110.

また、制御部150は、レジスタ108にリセット信号を与え、乱数生成部105およびレジスタ108にクロックを供給し、セレクタ103に制御信号1,セレクタ106に制御信号2,セレクタ109に制御信号3,セレクタ111に制御信号4をそれぞれ出力して攪拌部101の処理タイミングを制御する。ここで、制御信号1は、処理関数の入力として外部から入力する平文(または暗号文)またはレジスタ108に保持された前ラウンドの処理関数の結果を選択する制御信号である。また制御信号2は、レジスタ108に処理関数の結果を格納する際に乱数でマスク化を行うかまたはマスク化を行わずにレジスタ108に格納するかを選択する制御信号である。制御信号3は、レジスタ108に格納した値を読み出す際にマスク化に用いた乱数によりアンマスク化を行うかまたはアンマスク化を行わずに読み出すかを選択する制御信号である。制御信号4は、最終的な演算結果を外部に出力するか否かを選択する制御信号である。   The control unit 150 provides a reset signal to the register 108, supplies a clock to the random number generation unit 105 and the register 108, a control signal 1 to the selector 103, a control signal 2 to the selector 106, a control signal 3 to the selector 109, a selector The control signal 4 is output to 111 to control the processing timing of the stirring unit 101. Here, the control signal 1 is a control signal for selecting a plaintext (or ciphertext) input from the outside as an input of the processing function or a result of the processing function of the previous round held in the register 108. The control signal 2 is a control signal for selecting whether to perform masking with a random number when storing the result of the processing function in the register 108 or to store in the register 108 without masking. The control signal 3 is a control signal for selecting whether to perform unmasking with the random number used for masking when reading the value stored in the register 108 or to read without performing unmasking. The control signal 4 is a control signal for selecting whether or not to output the final calculation result to the outside.

尚、制御部150は、暗号演算回路装置100全体の動作を制御し、図10の鍵スケジューリング部902を含む場合は、図10の制御部905と同様に鍵スケジューリング部902に対してもクロックや制御信号を出力する。この場合、制御部150は鍵スケジューリング部902のセレクタ907に制御信号cを出力し、レジスタ908にクロックを供給する。また、図1の各セレクタに記載されているH,Lは2値の制御信号のレベル表し、HはHighレベル,LはLowレベルをそれぞれ示す。   Note that the control unit 150 controls the overall operation of the cryptographic operation circuit device 100. When the key scheduling unit 902 in FIG. 10 is included, the control unit 150 also provides a clock and clock to the key scheduling unit 902 as in the control unit 905 in FIG. Output a control signal. In this case, the control unit 150 outputs a control signal c to the selector 907 of the key scheduling unit 902 and supplies a clock to the register 908. Further, H and L described in each selector in FIG. 1 represent the levels of binary control signals, H represents a high level, and L represents a low level.

図1の攪拌部101は、従来技術の図10の攪拌部901と同様に、平文(または暗号文)を処理対象データとして入力し、鍵スケジューリング部902などで秘密鍵から作成する副鍵(ラウンド鍵)を用いて所定回数のラウンド処理を行って暗号化し、暗号文(または平文)を処理済データとして出力する。   Similar to the agitation unit 901 of FIG. 10 of the prior art, the agitation unit 101 in FIG. 1 inputs plaintext (or ciphertext) as processing target data, and creates a subkey (round) created from the secret key by the key scheduling unit 902 or the like. The key is used for encryption by performing a predetermined number of round processes, and ciphertext (or plaintext) is output as processed data.

攪拌部101において、1ラウンド処理は1クロック期間で行われ、セレクタ103,組合せ回路104,EXOR回路107,レジスタ108およびEXOR回路110を一巡する一連のラウンド処理を制御部150から供給されるクロックに同期して所定回数だけ繰り返す。つまり、組合せ回路104のラウンド処理を基本とする攪拌部101では、鍵スケジューリング部902などから入力される副鍵の値と1クロック前のラウンド処理の中間値とを用いて新たなラウンド処理を行い、その演算結果を新たな中間値としてレジスタ108に格納する処理を繰り返す。そして、必要なラウンド回数分だけクロックが進んだ後、最終ラウンドで組合せ回路104が出力するデータが最終演算結果となり、この値を暗号文(暗号化の場合)または平文(復号化の場合)としてセレクタ108を介してレジスタ109に保持され、セレクタ110を介して暗号演算回路装置100の外部に出力する。   In the agitation unit 101, one round process is performed in one clock period, and a series of round processes that go around the selector 103, the combinational circuit 104, the EXOR circuit 107, the register 108, and the EXOR circuit 110 are performed on the clock supplied from the control unit 150 Repeated a predetermined number of times in synchronization. That is, the agitation unit 101 based on the round process of the combinational circuit 104 performs a new round process using the value of the sub key input from the key scheduling unit 902 and the intermediate value of the round process one clock before. The process of storing the calculation result as a new intermediate value in the register 108 is repeated. Then, after the clock has advanced by the required number of rounds, the data output from the combinational circuit 104 in the final round becomes the final operation result, and this value is used as ciphertext (for encryption) or plaintext (for decryption). The data is held in the register 109 via the selector 108 and output to the outside of the cryptographic operation circuit device 100 via the selector 110.

本実施形態に係る暗号演算回路装置100が図10に示した従来の暗号演算回路装置900と異なる部分は、組合せ回路104の演算結果をレジスタ108に格納する前にEXOR回路107において乱数生成部105が生成した乱数データと演算結果との排他的論理和演算を行うことと、レジスタ108に格納されたデータを読み出す際に、EXOR回路110において乱数生成部105が生成した乱数データ(直前にレジスタ108に演算結果を格納する際にEXOR回路107で用いた乱数データと同じ乱数データ)とレジスタ108に格納されたデータとの排他的論理和演算を行うことである。   The cryptographic operation circuit device 100 according to the present embodiment is different from the conventional cryptographic operation circuit device 900 shown in FIG. 10 in that the random number generation unit 105 in the EXOR circuit 107 before storing the operation result of the combinational circuit 104 in the register 108. The random number data generated by the random number generation unit 105 in the EXOR circuit 110 when the exclusive OR operation of the random number data generated by the calculation result and the calculation result is read and the data stored in the register 108 is read (the register 108 immediately before The exclusive OR operation of the data stored in the register 108 and the data stored in the register 108 is performed.

尚、乱数生成部105が生成する乱数は、真性乱数または擬似乱数が用いられる。そして、乱数生成部105は、暗号化の処理単位である1ブロック単位の演算毎に新しい乱数値に更新する。また、セレクタ106およびセレクタ109は、制御信号2および制御信号3によってそれぞれ制御され、制御信号2および制御信号3がHighの場合は全て0のデータが出力されるので、EXOR回路107およびEXOR回路110の入力データはそのまま出力される。従って、EXOR回路107およびEXOR回路110を制御信号2および制御信号3がHighの時にバイパスするような回路構成にしても同じ効果が得られる。   Note that the random number generated by the random number generation unit 105 is a true random number or a pseudo-random number. Then, the random number generation unit 105 updates to a new random number value for each calculation of one block unit that is an encryption processing unit. Further, the selector 106 and the selector 109 are controlled by the control signal 2 and the control signal 3, respectively, and when the control signal 2 and the control signal 3 are High, all 0 data is output. Therefore, the EXOR circuit 107 and the EXOR circuit 110 are output. The input data is output as it is. Therefore, the same effect can be obtained even if the circuit configuration is such that the EXOR circuit 107 and the EXOR circuit 110 are bypassed when the control signal 2 and the control signal 3 are High.

ここで、図1において、外部からの入力データ(平文or暗号文)またはフィードバックされた前のラウンド処理の演算結果を選択するセレクタ103の制御信号1と、ラウンド処理の演算結果または固定値(本実施例ではall=0)を選択するセレクタ111の制御信号4とは、図10の従来の暗号演算回路装置900のセレクタ903の制御信号aおよびセレクタ906の制御信号bにそれぞれ対応する。   Here, in FIG. 1, the control signal 1 of the selector 103 for selecting the input data (plaintext or ciphertext) from the outside or the operation result of the previous round process fed back, the operation result of the round process or a fixed value (this In the embodiment, the control signal 4 of the selector 111 for selecting all = 0) corresponds to the control signal a of the selector 903 and the control signal b of the selector 906 of the conventional cryptographic operation circuit device 900 of FIG.

次に、図1の暗号演算回路装置100の動作について図2のタイミングチャートを用いて詳しく説明する。図2は、制御部150が出力するリセット信号と、クロックと、制御信号1と、制御信号2と、制御信号3と、制御信号4と、レジスタ108との処理タイミングの関係を描いたタイミングチャートである。尚、図2において、初期ラウンドから最終ラウンドまでの(n+1)回の全ラウンドを1ブロック演算とし、1ブロック演算毎に処理結果の暗号文(or平文)が外部に出力される。また、図1の組合せ回路104によるラウンド処理関数は1クロック周期毎に実行され、レジスタ108は1クロック周期で入力データを保持する。尚、レジスタ108の初期値はリセット信号がLowになった時に所定値(例えば全て0)に初期化されるものとする。   Next, the operation of the cryptographic operation circuit device 100 of FIG. 1 will be described in detail with reference to the timing chart of FIG. FIG. 2 is a timing chart illustrating the relationship between the reset signal output from the control unit 150, the clock, the control signal 1, the control signal 2, the control signal 3, the control signal 4, and the register 108. It is. In FIG. 2, all (n + 1) rounds from the initial round to the final round are defined as one block calculation, and a ciphertext (or plaintext) as a processing result is output to the outside for each block calculation. Further, the round processing function by the combinational circuit 104 in FIG. 1 is executed every clock cycle, and the register 108 holds input data in one clock cycle. It is assumed that the initial value of the register 108 is initialized to a predetermined value (for example, all 0) when the reset signal becomes Low.

図2において、タイミングtからt2n+3の表記はクロック周期毎のタイミング位置を示し、dからdは組合せ回路104によるラウンド処理関数の各ラウンド毎の出力データを示している。例えばdは初期ラウンド処理関数の結果の値、dは第1ラウンド処理関数の結果の値、dは最終ラウンド処理関数の結果の値をそれぞれ示している。また、r,r’およびr’’は乱数生成部105が1ブロック演算周期毎の更新頻度で生成する乱数を示しており、乱数r,乱数r’および乱数r’’は異なる乱数値を示している。さらに、(+)は排他的論理和演算子を示し、例えばd(+)rはdとrの排他的論理和演算値となる。 2, notation t 2n + 3 from the timing t 0 indicates the timing position for each clock cycle, d n from d 0 represents the output data for each round of the round processing function by the combination circuit 104. For example d 0 indicates the results of the values of the initial round processing function, d 1 the value of the result of the first round processing function, d n is the resulting value of the final round processing functions, respectively. R, r ′, and r ″ indicate random numbers generated by the random number generation unit 105 at an update frequency for each block calculation cycle, and the random numbers r, r ′, and r ″ indicate different random values. ing. Further, (+) represents an exclusive OR operator, for example, d 0 (+) r is an exclusive OR operation value of d 0 and r.

尚、図1において、乱数発生部105に制御部150からクロックが入力されているが、図2のフローチャートでは、乱数発生部105は最終ラウンド毎に新たな乱数を発生するものとして説明する。この場合は、乱数発生部105の内部に1ブロック分のクロックをカウントするカウンタを設けることで実現できる。   In FIG. 1, the clock is input from the control unit 150 to the random number generation unit 105. However, in the flowchart of FIG. 2, the random number generation unit 105 will be described as generating a new random number every final round. This case can be realized by providing a counter that counts one block of clocks inside the random number generator 105.

図2において、先ずタイミングt以前においてリセットはLowに制御されているのでレジスタ108はAll=0に初期化されている。タイミングtの後、リセットはHighに制御されて解除される。 In FIG. 2, first, the reset is controlled to Low before timing t 0 , so that the register 108 is initialized to All = 0. After timing t 0, the reset is canceled under the control of the High.

次のタイミングtでは、制御信号2がLowに制御され、外部から入力された平文(or暗号文)が組合せ回路104で初期ラウンド処理された演算結果と乱数生成部105が生成した例えば128ビットの乱数データrとの排他的論理和演算をEXOR回路107で行ってマスク化し、レジスタ108に格納する。この間、制御信号1はLowに制御され、タイミングtから最終ラウンドを処理するタイミングtn+1まで制御信号1はHighに制御され、セレクタ103,組合せ回路104,EXOR回路107,レジスタ108およびEXOR回路110までを巡回するn回のラウンド処理が行われる。 At the next timing t 1 , the control signal 2 is controlled to be Low, and the plaintext (or ciphertext) input from the outside is subjected to the initial round processing by the combinational circuit 104 and the random number generation unit 105 generates, for example, 128 bits The exclusive OR operation with the random number data r is masked by the EXOR circuit 107 and stored in the register 108. During this time, the control signal 1 is controlled to Low, and the control signal 1 is controlled to High from timing t 2 to timing t n + 1 for processing the final round, and the selector 103, combinational circuit 104, EXOR circuit 107, register 108 and EXOR circuit 110 are controlled. N rounds of processing are performed.

次のタイミングtでは、制御信号3がLowに制御され、レジスタ108に保持されたデータと乱数生成部105が生成した乱数データr(先のタイミングtでEXOR回路107が用いた乱数データと同じ乱数データ)との排他的論理和演算をEXOR回路110で行ってアンマスク化(マスク化を解除)し、次のラウンド処理のためにセレクタ103にフィードバックする。ここで、アンマスク化したデータは先の組合せ回路104で初期ラウンド処理された演算結果dである。さらにタイミングtでは、制御信号2はHighに制御されているので、EXOR回路107は先に説明したようにバイパスされるのと等価となり、セレクタ103にフィードバックされたdが組合せ回路104で第1ラウンド処理された演算結果dはEXOR回路107をバイパスしてレジスタ108に格納される。 At the next timing t 2 , the control signal 3 is controlled to Low, the data held in the register 108, the random number data r generated by the random number generation unit 105 (the random number data used by the EXOR circuit 107 at the previous timing t 1 , and An exclusive OR operation with the same random number data) is performed by the EXOR circuit 110 to unmask (unmask) and feed back to the selector 103 for the next round processing. Here, the unmasked data is the calculation result d 0 that has been subjected to the initial round processing in the combinational circuit 104. Further, at timing t 2 , since the control signal 2 is controlled to be high, the EXOR circuit 107 is equivalent to being bypassed as described above, and d 0 fed back to the selector 103 is output by the combinational circuit 104. The operation result d 1 processed by one round is stored in the register 108 bypassing the EXOR circuit 107.

次のタイミングtでは、制御信号3がHighに制御されているので、EXOR回路110は先に説明したようにバイパスされるのと等価となり、レジスタ108に格納されたdがEXOR回路110をバイパスしてセレクタ103にフィードバックされ、組合せ回路104で第2ラウンド処理された演算結果dは、制御信号2はHighのままなのでEXOR回路107をバイパスしてレジスタ108に格納される。 At the next timing t 3 , since the control signal 3 is controlled to be High, the EXOR circuit 110 is equivalent to being bypassed as described above, and d 1 stored in the register 108 is connected to the EXOR circuit 110. The operation result d 2 that is bypassed and fed back to the selector 103 and processed in the second round by the combinational circuit 104 is stored in the register 108 by bypassing the EXOR circuit 107 because the control signal 2 remains High.

以降、第(n−1)ラウンドを処理するタイミングtまでの間、制御信号2および制御信号3はHighに制御されたままなので、EXOR回路107およびEXOR回路110はバイパスされ、図10の従来の暗号演算回路装置900と同様に動作する。 Thereafter, since the control signal 2 and the control signal 3 remain controlled to High until the timing t n at which the (n−1) -th round is processed, the EXOR circuit 107 and the EXOR circuit 110 are bypassed. The cryptographic operation circuit device 900 operates in the same manner.

最終ラウンドを処理するタイミングtn+1では、制御信号2がLowに制御されるので、組合せ回路104で第(n−1)ラウンド処理された演算結果dと乱数生成部105が新たに生成した例えば128ビットの乱数データr’との排他的論理和演算をEXOR回路107で行ってマスク化し、レジスタ108に格納する。 At timing t n + 1 to process the last round, the control signal 2 is controlled to Low, a combination circuit 104 (n-1) th round processing is calculation result d n and random number generation unit 105 is newly generated e.g. An exclusive OR operation with the 128-bit random number data r ′ is performed by the EXOR circuit 107 to be masked and stored in the register 108.

次のタイミングtn+2では、制御信号3がLowに制御され、レジスタ108に保持されたデータと乱数生成部105が生成した乱数データr’(先のタイミングtn+1でEXOR回路107が用いた乱数データと同じ乱数データ)との排他的論理和演算をEXOR回路110で行ってアンマスク化し、セレクタ103およびセレクタ111に出力する。この時、制御信号1はLowに制御されているので、セレクタ103では次の平文(or暗号文)を入力し、また制御信号4もLowに制御されているので、セレクタ111ではEXOR回路110でアンマスク化したデータdが外部に暗号文(or平文)として出力される。 At the next timing t n + 2 , the control signal 3 is controlled to be low, the data held in the register 108 and the random number data r ′ generated by the random number generation unit 105 (the random number data used by the EXOR circuit 107 at the previous timing t n + 1). And the exclusive OR operation with the random number data) is performed by the EXOR circuit 110 to be unmasked and output to the selector 103 and the selector 111. At this time, since the control signal 1 is controlled to Low, the selector 103 inputs the next plaintext (or ciphertext), and the control signal 4 is also controlled to Low, so that the selector 111 uses the EXOR circuit 110. unmasked of data d n is outputted as a ciphertext to the outside (or plaintext).

一方、次のブロック演算の周期の初期ラウンドのタイミングtn+2では、制御信号2はHighに制御されているので、セレクタ103を介して外部から入力された平文(or暗号文)は組合せ回路104で初期ラウンド処理された演算結果dは、EXOR回路107をバイパスしてレジスタ108に格納される。尚、演算結果dは先のブロック演算での演算結果dと同じ値を意味するものではなく、各ブロック演算の初期ラウンドの演算結果を表しているだけである。 On the other hand, at the timing t n + 2 of the initial round of the period of the next block operation, the control signal 2 is controlled to High, so that the plaintext (or ciphertext) input from the outside via the selector 103 is received by the combinational circuit 104. initial rounds treated calculation result d 0 is stored in the register 108 by bypassing the EXOR circuit 107. The calculation result d 0 does not mean the same value as the operation result d 0 in the previous block operation, only represent the calculation result of the initial round of each block operation.

以降、タイミングtn+3からタイミングt2n+3までの動作は、先に説明したタイミングtからタイミングtn+2までの動作と同じである。さらに、次のブロック演算処理を行う場合はタイミングtn+2からタイミングt2n+3までの動作を同様に繰り返せばよい。尚、上記で説明した処理タイミングは制御部150によって全て制御される。 Thereafter, the operation from the timing t n + 3 to the timing t 2n + 3 is the same as the operation from the timing t 3 to the timing t n + 2 described above. Furthermore, when the next block calculation process is performed, the operation from the timing t n + 2 to the timing t 2n + 3 may be repeated in the same manner. Note that the processing timings described above are all controlled by the control unit 150.

ここで、本実施形態に係る暗号演算回路装置100において、CPA攻撃のターゲットとなる初期ラウンドおよび最終ラウンドの処理に着目する。先ず、タイミングtの初期ラウンド処理においては、レジスタ108の値が乱数rと初期ラウンド処理の演算結果dとの排他的論理和演算値としてマスク化されている。この時、乱数rの値はブロック演算毎に異なるので、レジスタ108の値の変化量(ハミング距離)を推定することはできない。ところが、マスク化を行わない従来回路で、タイミングt以前にレジスタ108の初期値がリセット信号により全て0に初期化されていた場合、例えば外部から入力された平文(or暗号文)(+)副鍵の演算結果がレジスタ108に格納されるので、タイミングt,tの間のレジスタハミング距離を計算することが可能であるが、本実施形態では乱数によってマスク化してレジスタ108に格納することにより、レジスタ108には平文(or暗号文)(+)副鍵(+)乱数の演算結果が格納されるので、レジスタハミング距離を計算することができない。 Here, in the cryptographic operation circuit device 100 according to the present embodiment, attention is paid to the processing of the initial round and the final round that are targets of the CPA attack. First, in the initial round processing timing t 1, the value of the register 108 is masked as an exclusive OR operation value of the operation result d 0 of the random number r and the initial round processing. At this time, since the value of the random number r is different for each block operation, the amount of change (Hamming distance) in the register 108 cannot be estimated. However, the conventional circuit is not performed masked, the timing t 1 previously input the initial value of the register 108 if it has been initialized to all the reset signal 0, for example, from outside the plaintext (or the ciphertext) (+) Since the operation result of the subkey is stored in the register 108, it is possible to calculate the register Hamming distance between the timings t 0 and t 1 , but in this embodiment, it is masked with a random number and stored in the register 108. As a result, the operation result of the plaintext (or ciphertext) (+) subkey (+) random number is stored in the register 108, and the register Hamming distance cannot be calculated.

尚、タイミングtからタイミングtまでは制御信号2がHighに制御され、またタイミングtからタイミングtn+1までは制御信号3がHighに制御されるので、この間、処理関数の結果にマスク化処理を行わない正規の演算結果がレジスタ108に格納されることになるが、第1ラウンドから第(n−1)ラウンドまでの処理はCPA攻撃の対象とならないためマスク化処理は必要ない。 Since the control signal 2 from the timing t 2 to time t n is controlled to High, also from the timing t 3 to time t n + 1 is the control signal 3 is controlled to High, during which masking on the result of the processing functions A normal operation result that is not processed is stored in the register 108, but the process from the first round to the (n-1) th round is not a target of the CPA attack, so that the masking process is not necessary.

また、タイミングtn+1の最終ラウンド処理においても、レジスタ108の値が乱数r’と最終ラウンド処理の演算結果dとの排他的論理和演算値としてマスク化されているので、レジスタ108の値の変化量(ハミング距離)を推定することはできない。ところが、マスク化を行わない従来回路で、タイミングtn+1でレジスタ108にdが格納されるので、タイミングt,tn+1の間のレジスタハミング距離を計算することが可能であるが、本実施形態では乱数によってマスク化してレジスタ108に格納することにより、レジスタ108にはd(+)乱数の演算結果が格納されるので、レジスタハミング距離を計算することができない。 Further, even in the final round processing timing t n + 1, the value of the register 108 is masked as an exclusive OR operation value of the operation result d n of the random number r 'and the final round processing, the value of the register 108 The amount of change (Hamming distance) cannot be estimated. However, in a conventional circuit that does not perform masking, d n is stored in the register 108 at timing t n + 1 , so that it is possible to calculate the register Hamming distance between timings t n and t n + 1. In the embodiment, the calculation result of d n (+) random number is stored in the register 108 by masking with a random number and storing it in the register 108, so that the register Hamming distance cannot be calculated.

ここで、本実施形態に係る暗号演算回路装置100の動作の流れと特徴および効果が分かり易いように図3の模式図を用いて説明する。尚、図3において、図1と同符号のものは同じものを示す。また、同じ符号のブロック(レジスタ108および組合せ回路104)が重複して記載されているが、これらは処理の流れが分かり易いように、各ラウンド毎にレジスタ108および組合せ回路104を描いてあるだけで、複数のレジスタ108および組合せ回路104があるわけではない。   Here, the operation flow, characteristics, and effects of the cryptographic operation circuit device 100 according to the present embodiment will be described with reference to the schematic diagram of FIG. In FIG. 3, the same reference numerals as those in FIG. In addition, although the blocks with the same reference numerals (register 108 and combinational circuit 104) are described in duplicate, these only depict the register 108 and combinational circuit 104 for each round so that the processing flow is easy to understand. Thus, the plurality of registers 108 and the combinational circuit 104 are not necessarily provided.

図3の初期ラウンド処理の組合せ回路104の直前の点線で示したレジスタ108には初期化された値または前のラウンドのレジスタ値が格納されているが、外部から入力する平文(or暗号文)の初期ラウンド処理を行う組合せ回路104の演算結果はEXOR回路107で乱数生成部105が生成する乱数でマスク化して次のレジスタ108に格納し、第1ラウンド処理を行う組合せ回路104に出力する際に、レジスタ108に格納されているマスク化された演算結果を読み出してEXOR回路110で乱数生成部105が生成する同じ乱数でアンマスク化するので、初期ラウンド処理の組合せ回路104の直後の演算結果を格納するレジスタ108と初期ラウンド処理の直前のレジスタ108との間のレジスタハミング距離を計算することはできない。   The initialized value or the register value of the previous round is stored in the register 108 indicated by the dotted line immediately before the combination circuit 104 of the initial round processing in FIG. 3, but the plaintext (or ciphertext) input from the outside The calculation result of the combinational circuit 104 that performs the initial round processing is masked with the random number generated by the random number generation unit 105 in the EXOR circuit 107, stored in the next register 108, and output to the combinational circuit 104 that performs the first round processing. In addition, since the masked calculation result stored in the register 108 is read out and unmasked with the same random number generated by the random number generation unit 105 in the EXOR circuit 110, the calculation result immediately after the combination circuit 104 in the initial round processing is obtained. Calculate the register Hamming distance between the register 108 to be stored and the register 108 immediately before the initial round processing It is not possible.

同様に、図3の最終ラウンド処理の組合せ回路104の直前のレジスタ108にはマスク化されていない演算結果が格納されているが、最終ラウンド処理の組合せ回路104の演算結果はEXOR回路107で乱数生成部105が生成する乱数でマスク化して次のレジスタ108に格納し、外部に暗号文(or平文)を出力する際に、レジスタ108に格納されているマスク化された演算結果を読み出してEXOR回路110で乱数生成部105が生成する同じ乱数でアンマスク化するので、最終ラウンド処理の組合せ回路104の直前のレジスタ108と直後のレジスタ108との間のレジスタハミング距離を計算することができない。   Similarly, an unmasked calculation result is stored in the register 108 immediately before the combination circuit 104 of the final round process in FIG. 3, but the calculation result of the combination circuit 104 of the final round process is a random number by the EXOR circuit 107. Masked with a random number generated by the generation unit 105 and stored in the next register 108, and when outputting the ciphertext (or plaintext) to the outside, the masked operation result stored in the register 108 is read and EXOR Since the circuit 110 performs unmasking with the same random number generated by the random number generation unit 105, the register Hamming distance between the register 108 immediately before and the register 108 immediately after the combination circuit 104 in the final round process cannot be calculated.

このように、本実施形態に係る暗号演算回路装置100は、副鍵を仮定して各レジスタにおけるハミング距離を逆算することができなくなり、副鍵と消費電力との相関を無くすことができる。この結果、マスク化処理などを施していない従来のラウンド処理関数部分をそのまま利用することができ、従来技術のようにラウンド処理関数全体を乱数によってマスク化するために必要な多数のEXOR回路や予備回路などの追加が不要となる。特にCPA攻撃の対象である初期ラウンド処理と最終ラウンド処理との演算結果に限定してレジスタ108の値をマスク化することにより、最小限の演算量と回路オーバヘッドでCPA攻撃を回避することができる。   As described above, the cryptographic operation circuit device 100 according to the present embodiment cannot calculate the Hamming distance in each register by assuming the subkey, and can eliminate the correlation between the subkey and the power consumption. As a result, the conventional round processing function portion not subjected to masking processing or the like can be used as it is, and a number of EXOR circuits and spares necessary for masking the entire round processing function with random numbers as in the prior art. No additional circuit is required. In particular, by masking the value of the register 108 only for the calculation results of the initial round process and the final round process, which are targets of the CPA attack, the CPA attack can be avoided with a minimum calculation amount and circuit overhead. .

(第1の実施形態の変形例)
第1の実施形態では、図2に示したように、タイミングtからtの初期化時にレジスタ108を0にリセットするようにし、次のタイミングtからtの初期ラウンド時に乱数rと組合せ回路104の演算結果とを排他的論理和演算したd(+)rがレジスタ108に格納されるようになっていた。これに対して、第1の実施形態の変形例では、図4に示したように、タイミングtからtの初期化時にレジスタ108に乱数rが格納されるようにし、次のタイミングtからtの初期ラウンド時は組合せ回路104の演算結果dをそのままレジスタ108に格納するようになっている。尚、この場合は、図1において、乱数生成部105が出力する乱数値を初期化時に直接レジスタ108に入力できるようなセレクタをEXOR回路107とレジスタ108との間に設けても構わないが、図4のタイミングチャートに示したように、初期化時にレジスタ108のリセット信号をLowにせずにHighにしておき、制御信号2を初期化時のタイミングtでLowにすることによって、乱数生成部105が生成する乱数はセレクタ106を介してEXOR回路107に入力されるので、その時点の組合せ回路104の出力値に依存するが、タイミングtでEXOR回路107から出力される何らかの乱数がレジスタ108に保持されることになる。尚、本変形例の場合は、図4のタイミングチャートに示すように、タイミングtでレジスタ108から読み出す際にアンマスク化の必要がないので、第1の実施形態の図2の場合とは異なり、タイミングtで制御信号3はHighにしておく。
(Modification of the first embodiment)
In the first embodiment, as shown in FIG. 2, the register 108 is reset to 0 at the time of initialization from the timing t 0 to t 1 , and the random number r is set at the next initial round from the timing t 1 to t 2. D 0 (+) r obtained by performing an exclusive OR operation on the operation result of the combinational circuit 104 is stored in the register 108. In contrast, in the modification of the first embodiment, as shown in FIG. 4, as at initialization the random number r in a register 108 of t 1 from the timing t 0 is stored, the next timing t 1 From t to t 2 , the operation result d 0 of the combinational circuit 104 is stored in the register 108 as it is. In this case, in FIG. 1, a selector that can directly input the random value output from the random number generation unit 105 to the register 108 at the time of initialization may be provided between the EXOR circuit 107 and the register 108. As shown in the timing chart of FIG. 4, the reset signal of the register 108 is set to High instead of Low at the time of initialization, and the control signal 2 is set to Low at the timing t 0 at the time of initialization. since random number 105 generated is input to the EXOR circuit 107 via the selector 106, depending on the output value of the combinational circuit 104 at that time, any random numbers output from the EXOR circuit 107 at timing t 0 is the register 108 Will be held. In the case of this modification, as shown in the timing chart of FIG. 4, there is no need for unmasking when reading from the register 108 at the timing t 2 , which is different from the case of FIG. 2 of the first embodiment. , the control signal 3 at the timing t 2 is left in the High.

本変形例の場合でも、図5に示すように、レジスタ108の値は初期ラウンド前は乱数値が保持されているので、ハミング距離を計算することはできない。   Even in the case of this modification, as shown in FIG. 5, the value of the register 108 holds a random value before the initial round, so the Hamming distance cannot be calculated.

以後、各ブロックデータの暗号化演算の最終ラウンドに関する処理は第1の実施形態と同じである。   Thereafter, the processing related to the final round of the encryption operation of each block data is the same as that of the first embodiment.

(第2の実施形態)
次に、第2の実施形態に係る暗号演算回路装置200について説明する。図6は暗号演算回路装置200の構成例を示している。図6に示した暗号演算回路装置200は、従来技術で説明した暗号演算回路装置900および第1の実施形態に係る暗号演算回路装置100と同様にAESに代表されるブロック暗号アルゴリズムに対応し、1クロックで1ラウンド処理を行う構成になっている。尚、図6の暗号演算回路装置200は、図10の鍵スケジューリング部902に相当する部分を含めずに攪拌部201と制御部250とで構成され、副鍵は外部から入力する構成になっているが、鍵スケジューリング部902と同じブロックを含めて暗号演算回路装置200としても構わない。
(Second Embodiment)
Next, a cryptographic operation circuit device 200 according to the second embodiment will be described. FIG. 6 shows a configuration example of the cryptographic operation circuit device 200. The cryptographic operation circuit device 200 shown in FIG. 6 corresponds to a block cryptographic algorithm typified by AES, similar to the cryptographic operation circuit device 900 described in the prior art and the cryptographic operation circuit device 100 according to the first embodiment. It is configured to perform one round process with one clock. 6 includes the agitation unit 201 and the control unit 250 without including the portion corresponding to the key scheduling unit 902 in FIG. 10, and the sub key is input from the outside. However, the same block as the key scheduling unit 902 may be included in the cryptographic operation circuit device 200.

以下、図6を用いて第2の実施形態に係る暗号演算回路装置200について詳しく説明する。図6において、攪拌部201は、外部から入力する平文(または暗号文)またはラウンド処理後のデータとを選択するセレクタ203と、所定の処理関数でラウンド処理を行う組合せ回路204と、乱数生成部205と、乱数生成部205が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ206と、セレクタ206の出力データと組合せ回路204の出力データとの排他的論理和を求めるEXOR回路207(第1の排他的論理和演算部)と、EXOR回路207の出力データを一時的に保持するレジスタ208と、乱数生成部205が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ209と、レジスタ208の出力データとセレクタ209の出力データとの排他的論理和を求めるEXOR回路210(第2の排他的論理和演算部)と、EXOR回路210の出力データまたは外部から入力する平文(または暗号文)を選択するセレクタ211と、所定の処理関数でラウンド処理を行う組合せ回路212と、乱数生成部205が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ213と、セレクタ213の出力データと組合せ回路212の出力データとの排他的論理和を求めるEXOR回路214(第1の排他的論理和演算部)と、EXOR回路214の出力データを一時的に保持するレジスタ215と、乱数生成部205が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ216と、レジスタ215の出力データとセレクタ216の出力データとの排他的論理和を求めるEXOR回路217(第2の排他的論理和演算部)と、EXOR回路217の出力データまたはEXOR回路210の出力データを選択するセレクタ218と、セレクタ218の出力データまたはAll=0(全て0のデータ)を選択して外部に暗号文(or平文)を出力するセレクタ219とで構成される。   Hereinafter, the cryptographic operation circuit device 200 according to the second embodiment will be described in detail with reference to FIG. In FIG. 6, the agitation unit 201 includes a selector 203 that selects plain text (or cipher text) input from the outside or data after round processing, a combinational circuit 204 that performs round processing with a predetermined processing function, and a random number generation unit. 205, EXOR for obtaining exclusive OR of selector 206 for selecting random number data output from random number generation unit 205 or All = 0 (all 0 data), output data of selector 206 and output data of combinational circuit 204 A circuit 207 (first exclusive OR operation unit), a register 208 that temporarily holds output data of the EXOR circuit 207, and random number data output from the random number generation unit 205 or All = 0 (all 0 data). The selector 209 for selecting, and the exclusive OR of the output data of the register 208 and the output data of the selector 209 is obtained. EXOR circuit 210 (second exclusive OR operation unit), selector 211 that selects output data of EXOR circuit 210 or plaintext (or ciphertext) input from the outside, and a combination that performs round processing with a predetermined processing function The circuit 212, the selector 213 for selecting the random number data output by the random number generation unit 205 or All = 0 (all 0 data), and the exclusive OR of the output data of the selector 213 and the output data of the combinational circuit 212 are obtained. EXOR circuit 214 (first exclusive OR operation unit), register 215 that temporarily holds output data of EXOR circuit 214, random number data output by random number generation unit 205 or All = 0 (all zero data) ) To select the exclusive logic of the output data of the register 215 and the output data of the selector 216 EXOR circuit 217 (second exclusive OR operation unit) for obtaining the value, selector 218 for selecting the output data of EXOR circuit 217 or the output data of EXOR circuit 210, the output data of selector 218 or All = 0 (all 0) And a selector 219 that outputs ciphertext (or plaintext) to the outside.

また、制御部250は、レジスタ208およびレジスタ215にリセット信号を与え、乱数生成部205,レジスタ208およびレジスタ215にクロックを供給し、セレクタ203に制御信号1,セレクタ211に制御信号2,セレクタ206に制御信号3,セレクタ209に制御信号4,セレクタ213に制御信号5,セレクタ216に制御信号6,セレクタ218に制御信号7,セレクタ219に制御信号8をそれぞれ出力して攪拌部201の処理タイミングを制御する。   In addition, the control unit 250 supplies a reset signal to the register 208 and the register 215, supplies a clock to the random number generation unit 205, the register 208, and the register 215, the control signal 1 to the selector 203, the control signal 2 to the selector 211, and the selector 206. The control signal 3, the control signal 4 to the selector 209, the control signal 5 to the selector 213, the control signal 6 to the selector 216, the control signal 7 to the selector 218, and the control signal 8 to the selector 219, respectively. To control.

ここで、制御信号1は、処理関数の入力として外部から入力する平文(または暗号文)またはレジスタ215に保持された基本処理関数2の結果を選択する制御信号である。また制御信号2は、外部から入力する平文(または暗号文)またはレジスタ208に保持された基本処理関数1の結果を選択する制御信号である。つまり、制御信号1および制御信号2は組合せ回路204(基本処理関数1)または組合せ回路212(基本処理関数2)への入力切り替えを行うための制御信号である。   Here, the control signal 1 is a control signal for selecting a plaintext (or ciphertext) input from the outside as an input of the processing function or a result of the basic processing function 2 held in the register 215. The control signal 2 is a control signal for selecting a plaintext (or ciphertext) input from the outside or a result of the basic processing function 1 held in the register 208. That is, the control signal 1 and the control signal 2 are control signals for switching the input to the combinational circuit 204 (basic processing function 1) or the combinational circuit 212 (basic processing function 2).

制御信号3は、レジスタ208に処理関数の結果を格納する際に乱数でマスク化を行うかまたはマスク化を行わずにレジスタ208に格納するかを選択する制御信号である。制御信号4は、レジスタ208に格納した値を読み出す際にマスク化に用いた乱数によりアンマスク化を行うかまたはアンマスク化を行わずに読み出すかを選択する制御信号である。つまり、制御信号3および制御信号4は、レジスタ208への組合せ回路204(基本処理関数1)の演算結果の書き込みおよび読み出し動作におけるマスク化およびアンマスク化の有無を制御するための制御信号である。   The control signal 3 is a control signal for selecting whether to perform masking with a random number when storing the result of the processing function in the register 208 or to store in the register 208 without masking. The control signal 4 is a control signal for selecting whether to perform unmasking with the random number used for masking when reading the value stored in the register 208 or to read without performing unmasking. That is, the control signal 3 and the control signal 4 are control signals for controlling the presence / absence of masking and unmasking in the operation of writing and reading the operation result of the combination circuit 204 (basic processing function 1) to the register 208.

制御信号5は、レジスタ215に処理関数の結果を格納する際に乱数でマスク化を行うかまたはマスク化を行わずにレジスタ215に格納するかを選択する制御信号である。制御信号6は、レジスタ215に格納した値を読み出す際にマスク化に用いた乱数によりアンマスク化を行うかまたはアンマスク化を行わずに読み出すかを選択する制御信号である。つまり、制御信号5および制御信号6は、レジスタ215への組合せ回路212(基本処理関数2)の演算結果の書き込みおよび読み出し動作におけるマスク化およびアンマスク化の有無を制御するための制御信号である。   The control signal 5 is a control signal for selecting whether to perform masking with a random number when storing the result of the processing function in the register 215 or to store in the register 215 without masking. The control signal 6 is a control signal for selecting whether to perform unmasking with a random number used for masking when reading a value stored in the register 215 or to read without performing unmasking. That is, the control signal 5 and the control signal 6 are control signals for controlling the presence / absence of masking and unmasking in the write and read operations of the operation result of the combinational circuit 212 (basic processing function 2) to the register 215.

制御信号7は、レジスタ215に保持された組合せ回路212(基本処理関数2)の演算結果またはレジスタ208に保持された組合せ回路204(基本処理関数1)の演算結果を選択する制御信号である。制御信号8は、最終的な演算結果を外部に出力するか否かを選択する制御信号である。   The control signal 7 is a control signal for selecting the operation result of the combinational circuit 212 (basic processing function 2) held in the register 215 or the operation result of the combinational circuit 204 (basic processing function 1) held in the register 208. The control signal 8 is a control signal for selecting whether or not to output the final calculation result to the outside.

本実施形態に係る暗号演算回路装置200は、図1で説明した第1の実施形態の応用例で、ブロック暗号アルゴリズムにおいてスループットを向上させるために前半のデータと後半のデータとに分けた並列データを同時に処理する2段のパイプライン構成になっている。特に、前半のデータのみ初期ラウンドと最終ラウンドでマスク化する処理を行うだけでCPA攻撃を防御することができる。   The cryptographic operation circuit device 200 according to the present embodiment is an application example of the first embodiment described with reference to FIG. 1, and parallel data divided into first-half data and second-half data in order to improve throughput in the block cipher algorithm. It is a two-stage pipeline configuration that processes the above simultaneously. In particular, the CPA attack can be prevented only by performing the process of masking only the first half data in the initial round and the final round.

図6において、2段のパイプライン構成の1段目の回路は、セレクタ203,組合せ回路204,乱数生成部205,セレクタ206,EXOR回路207,レジスタ208,セレクタ209およびEXOR回路210で構成され、図1のセレクタ103,組合せ回路104,乱数生成部105,セレクタ106,EXOR回路107,レジスタ108,セレクタ109およびEXOR回路110までの回路に相当する。同様に、2段のパイプライン構成の2段目の回路は、セレクタ211,組合せ回路212,乱数生成部205,セレクタ213,EXOR回路214,レジスタ215,セレクタ216およびEXOR回路217で構成され、図1のセレクタ103,組合せ回路104,乱数生成部105,セレクタ106,EXOR回路107,レジスタ108,セレクタ109およびEXOR回路110までの回路に相当する。但し、本実施形態では、1段目の回路のセレクタ203にフィードバックされる演算結果は2段目の回路の組合せ回路212で処理された演算結果であり、逆に2段目の回路のセレクタ211にフィードバックされる演算結果は1段目の回路の組合せ回路204で処理された演算結果である。そして、最終的にセレクタ219から外部に出力される前にセレクタ218によって、1段目の回路の組合せ回路204で処理された演算結果または2段目の回路の組合せ回路212で処理された演算結果を選択するようになっている。   In FIG. 6, the first stage circuit of the two-stage pipeline configuration includes a selector 203, a combination circuit 204, a random number generation unit 205, a selector 206, an EXOR circuit 207, a register 208, a selector 209, and an EXOR circuit 210. This corresponds to the circuit from the selector 103, the combinational circuit 104, the random number generation unit 105, the selector 106, the EXOR circuit 107, the register 108, the selector 109, and the EXOR circuit 110 in FIG. Similarly, a second-stage circuit having a two-stage pipeline configuration includes a selector 211, a combinational circuit 212, a random number generation unit 205, a selector 213, an EXOR circuit 214, a register 215, a selector 216, and an EXOR circuit 217. This corresponds to a circuit including one selector 103, combination circuit 104, random number generation unit 105, selector 106, EXOR circuit 107, register 108, selector 109, and EXOR circuit 110. However, in this embodiment, the calculation result fed back to the selector 203 of the first-stage circuit is the calculation result processed by the combinational circuit 212 of the second-stage circuit, and conversely, the selector 211 of the second-stage circuit. The calculation result fed back to is the calculation result processed by the combinational circuit 204 of the first-stage circuit. Then, an operation result processed by the combination circuit 204 of the first-stage circuit or an operation result processed by the combination circuit 212 of the second-stage circuit by the selector 218 before being finally output from the selector 219 to the outside. Is supposed to be selected.

次に、図6の暗号演算回路装置200の動作について図7のタイミングチャートを用いて詳しく説明する。図7は、制御部250が出力するリセット信号と、クロックと、制御信号1と、制御信号2と、制御信号3と、制御信号4と、制御信号5と、制御信号6と、制御信号7と、制御信号8と、レジスタ208と、レジスタ215との処理タイミングの関係を描いたタイミングチャートである。尚、図7において、初期ラウンドから最終ラウンドまでの(n+1)回の全ラウンドを1ブロック演算とし、1ブロック演算毎に処理結果の暗号文(or平文)が外部に出力される。また、図6の組合せ回路204および組合せ回路212による基本処理関数は1クロック周期毎に実行され、レジスタ208およびレジスタ215は1クロック周期で入力データを保持する。尚、レジスタ208およびレジスタ215の初期値はリセット信号がLowになった時に所定値(例えば全て0)に初期化されるものとする。   Next, the operation of the cryptographic operation circuit device 200 of FIG. 6 will be described in detail with reference to the timing chart of FIG. 7 shows a reset signal, a clock, a control signal 1, a control signal 2, a control signal 3, a control signal 4, a control signal 5, a control signal 6, and a control signal 7 output from the control unit 250. 5 is a timing chart depicting the relationship among the processing timings of the control signal 8, the register 208, and the register 215. In FIG. 7, (n + 1) rounds from the initial round to the final round are regarded as one block operation, and the ciphertext (or plaintext) of the processing result is output to the outside for each block operation. Further, the basic processing functions by the combinational circuit 204 and the combinational circuit 212 in FIG. 6 are executed every one clock cycle, and the register 208 and the register 215 hold input data in one clock cycle. Note that the initial values of the register 208 and the register 215 are initialized to a predetermined value (for example, all 0) when the reset signal becomes Low.

図7において、タイミングtからt2n+3の表記はクロック周期毎のタイミング位置を示し、dからdは前半のデータを組合せ回路204または組合せ回路212で関数処理した出力データを示し、d’からd’は後半のデータを組合せ回路204または組合せ回路212で関数処理した出力データを示している。また、r,r’およびr’’は乱数生成部105が1ブロック演算周期毎の更新頻度で生成する乱数を示しており、乱数r,乱数r’および乱数r’’は異なる乱数値を示している。さらに、(+)は排他的論理和演算子を示し、例えばd(+)rはdとrの排他的論理和演算値となる。 7, notation t 2n + 3 from the timing t 0 indicates the timing position for each clock cycle, d n from d 0 indicates the output data function processes the first half of the data in the combination circuit 204, or a combination circuit 212, d ' 0 to d ′ n indicate output data obtained by performing function processing on the latter half data in the combinational circuit 204 or the combinational circuit 212. R, r ′, and r ″ indicate random numbers generated by the random number generation unit 105 at an update frequency for each block calculation cycle, and the random numbers r, r ′, and r ″ indicate different random values. ing. Further, (+) represents an exclusive OR operator, for example, d 0 (+) r is an exclusive OR operation value of d 0 and r.

尚、第1の実施形態と同様に、図6において、乱数発生部205に制御部250からクロックが入力されているが、図7のフローチャートでは、乱数発生部205は最終ラウンド毎に新たな乱数を発生するものとして説明する。   As in the first embodiment, in FIG. 6, the clock is input from the control unit 250 to the random number generation unit 205, but in the flowchart of FIG. 7, the random number generation unit 205 generates a new random number every final round. Will be described as being generated.

図7において、先ずタイミングt以前においてリセットはLowに制御されているのでレジスタ208およびレジスタ215はAll=0に初期化されている。タイミングtの後、リセットはHighに制御されて解除される。 In FIG. 7, first, the reset is controlled to Low before timing t 0 , so that the register 208 and the register 215 are initialized to All = 0. After timing t 0, the reset is canceled under the control of the High.

次のタイミングtでは、制御信号1および制御信号3がLowに制御されるので、外部から入力される前半データの平文(or暗号文)が組合せ回路204で初期ラウンド処理された演算結果dと乱数生成部205が生成した例えば128ビットの乱数データrとの排他的論理和演算をEXOR回路207で行ってマスク化し、その演算結果(d(+)r)がレジスタ208に格納される(前半ブロックの初期ラウンド処理)。 At the next timing t 1 , since the control signal 1 and the control signal 3 are controlled to be Low, the operation result d 0 in which the plaintext (or ciphertext) of the first half data input from the outside is subjected to the initial round processing by the combinational circuit 204. And the 128-bit random number data r generated by the random number generation unit 205 is masked by the EXOR circuit 207, and the calculation result (d 0 (+) r) is stored in the register 208. (Initial round processing of the first half block).

次のタイミングtでは、制御信号3がHigh,制御信号4がLowにそれぞれ制御され、レジスタ208に保持されたデータ(d(+)r)と乱数生成部205が生成した乱数データr(先のタイミングtでEXOR回路207が用いた乱数データと同じ乱数データ)との排他的論理和演算をEXOR回路210で行ってアンマスク化(マスク化を解除)した演算結果dをセレクタ211に出力する。ここで、制御信号2はHighに保持されているので、演算結果dはセレクタ211を介して組合せ回路212に入り基本処理関数2で演算処理される。さらに、セレクタ213の制御信号5はHighなので、演算結果dはそのままEXOR回路214をバイパスしてレジスタ215に格納される。一方、セレクタ203の制御信号1はLowのままなので、外部から入力される後半データの平文(or暗号文)が組合せ回路204で初期ラウンド処理された演算結果d’は、セレクタ206の制御信号3がHighなのでEXOR回路207をバイパスしてレジスタ208に格納される(後半ブロックの初期ラウンド処理)。 At the next timing t 2 , the control signal 3 is controlled to be high and the control signal 4 is controlled to be low, and the data (d 0 (+) r) held in the register 208 and the random number data r ( The exclusive OR operation with the random number data used by the EXOR circuit 207 at the previous timing t 1 is performed by the EXOR circuit 210 to unmask (unmask) the operation result d 0 to the selector 211. Output. Here, since the control signal 2 is held high, the calculation result d 0 enters the combinational circuit 212 via the selector 211 and is processed by the basic processing function 2. Further, since the control signal 5 of the selector 213 is High, the calculation result d 1 is stored in the register 215 bypassing the EXOR circuit 214 as it is. On the other hand, since the control signal 1 of the selector 203 remains Low, the operation result d ′ 0 obtained by performing the initial round processing on the plaintext (or ciphertext) of the second half data input from the outside is the control signal of the selector 206. Since 3 is High, the EXOR circuit 207 is bypassed and stored in the register 208 (initial round processing of the second half block).

この結果、タイミングtでは、レジスタ208には後半データの初期ラウンドの演算結果d’が格納され、レジスタ215には前半データの第1ラウンドの演算結果dが格納される。 As a result, at timing t 2 , the calculation result d ′ 0 of the initial round of the second half data is stored in the register 208, and the calculation result d 1 of the first round of the first half data is stored in the register 215.

次のタイミングtでは、制御信号4がHighに制御されるので、EXOR回路210は先に説明したようにバイパスされるのと等価となり、レジスタ208に格納された演算結果d’がEXOR回路210をバイパスしてセレクタ211に出力される。さらにセレクタ211の制御信号2はHighのままなので、演算結果d’は組合せ回路212に入力されて演算処理され、その後半データの第1ラウンドの演算結果d’をEXOR回路214に出力する。この時、セレクタ213の制御信号5はHighのままなので、演算結果d’はそのままEXOR回路214をバイパスしてレジスタ215に後半データの第1ラウンドの演算結果d’が格納される。一方、セレクタ216の制御信号6はHighのままなので、レジスタ215に保持されていた前の演算結果dはそのままEXOR回路217をバイパスして制御信号1がHighのセレクタ203を介して組合せ回路204にフィードバックされ、組合せ回路204で演算処理される。この前半データの第2ラウンドの演算結果dは、セレクタ206の制御信号3はHighのままなので、そのままEXOR回路207をバイパスしてレジスタ208に格納される。 At the next timing t 3 , since the control signal 4 is controlled to be High, the EXOR circuit 210 is equivalent to being bypassed as described above, and the operation result d ′ 0 stored in the register 208 is converted into the EXOR circuit. The signal 210 is bypassed and output to the selector 211. Further, since the control signal 2 of the selector 211 remains High, the calculation result d ′ 0 is input to the combinational circuit 212 and is processed, and the first round calculation result d ′ 1 of the latter half data is output to the EXOR circuit 214. . At this time, the control signal 5 of the selector 213 is so remains High, the operation result d '1 is as calculation result d of the first round of the second half data in the register 215 by bypassing the EXOR circuit 214' 1 are stored. On the other hand, since the control signal 6 of the selector 216 remains High, the previous calculation result d 1 held in the register 215 bypasses the EXOR circuit 217 as it is, and the control circuit 1 passes through the selector 203 whose High is the combination circuit 204. And the combinational circuit 204 performs arithmetic processing. Calculation result d 2 of the second round of the first half data, control signals 3 of the selector 206 because remains High, is directly stored in bypassing the EXOR circuit 207 register 208.

この結果、タイミングtでは、レジスタ208には前半データの第2ラウンドの演算結果dが格納され、レジスタ215には後半データの第1ラウンドの演算結果d’が格納される。 As a result, at the timing t 3 , the calculation result d 2 of the first round of the first half data is stored in the register 208, and the calculation result d ′ 1 of the first round of the second half data is stored in the register 215.

次のタイミングtからタイミングtまでについても、制御信号1から制御信号8は全てHighの同じ状態に制御されるので、組合せ回路204と組合せ回路212の演算結果が交互にレジスタ208とレジスタ215に格納される動作が繰り返し行われる。つまり、前半データのラウンド処理に1クロック周期遅れて後半データのラウンド処理が並列に行われる。尚、繰り返し回数が奇数か偶数かによって、最終ラウンド処理の演算結果がレジスタ208とレジスタ215のどちらかに格納されることになるが、基本的な動作については同様に行われる。 About From the next timing t 4 to time t n, since the control signal 8 is controlled in the same state all High from the control signal 1, the combination circuit 204 and the register 208 the operation result is alternating combination circuit 212 register 215 The operation stored in is repeatedly performed. That is, the round processing of the second half data is performed in parallel with a delay of one clock cycle from the round processing of the first half data. Depending on whether the number of repetitions is an odd number or an even number, the operation result of the final round process is stored in either the register 208 or the register 215, but the basic operation is similarly performed.

最初のブロックの前半データの最終ラウンドを処理するタイミングtn+1では、セレクタ206の制御信号3がLowに制御されるので、組合せ回路204で第(n−1)ラウンド処理された演算結果dと乱数生成部105が新たに生成した例えば128ビットの乱数データr’との排他的論理和演算をEXOR回路207で行ってマスク化し、マスク化された演算結果(d(+)r’)をレジスタ208に格納する。一方、セレクタ209の制御信号4はHighのままなので、レジスタ208に保持されていた前の演算結果d’n−2はそのままEXOR回路210をバイパスし、制御信号2がHighのセレクタ211を介して組合せ回路212に出力され、組合せ回路212で演算処理される。この後半データの第(n−1)ラウンドの演算結果d’n−1は、セレクタ213の制御信号5はHighのままなので、そのままEXOR回路214をバイパスしてレジスタ215に格納される。 At timing t n + 1 for processing the final round of the first half data of the first block, the control signal 3 of the selector 206 is controlled to Low, and a combination circuit 204 (n-1) th round treated calculation result d n The exclusive OR operation with, for example, 128-bit random number data r ′ newly generated by the random number generation unit 105 is performed by the EXOR circuit 207 and masked, and the masked operation result (d n (+) r ′) is obtained. Store in the register 208. On the other hand, since the control signal 4 of the selector 209 remains High, the previous calculation result d ′ n−2 held in the register 208 bypasses the EXOR circuit 210 as it is, and the control signal 2 passes through the High selector 211. The result is output to the combinational circuit 212 and processed by the combinational circuit 212. The operation result d ′ n−1 of the (n−1) -th round of the latter half data is stored in the register 215 by bypassing the EXOR circuit 214 as it is because the control signal 5 of the selector 213 remains High.

この結果、タイミングtn+1では、レジスタ208には前半データの第nラウンドの演算結果dがマスク化された(d(+)r’)が格納され、レジスタ215には後半データの第(n−1)ラウンドの演算結果d’n−1が格納される。 As a result, at timing t n + 1 , the register 208 stores (d n (+) r ′) obtained by masking the n-th round operation result d 2 of the first half data, and the register 215 stores the second (second) data (( n-1) Round operation result d' n-1 is stored.

次のタイミングtn+2では、セレクタ209の制御信号4がLowに制御されるので、乱数生成部205が生成した乱数データr’(先のタイミングtn+1でEXOR回路207が用いた乱数データと同じ乱数データ)がEXOR回路210に出力され、レジスタ208に保持されたマスク化された演算結果(d(+)r’)と乱数データr’との排他的論理和演算をEXOR回路210で行ってアンマスク化し、アンマスク化した演算結果dがセレクタ211およびセレクタ218に出力される。この時、制御信号7はHighに制御されているので、演算結果dはセレクタ218を介してセレクタ219に入力され、セレクタ219の制御信号8もLowに制御されているので、セレクタ219を介して前半データの最終ラウンドの演算結果dが外部に暗号文(or平文)として出力される。一方、セレクタ211の制御信号2がLowに制御されるので、次のブロックの前半データの平文(or暗号文)が組合せ回路212に入力されて演算処理され、その演算結果dがEXOR回路214に出力される。この時、セレクタ213の制御信号5はLowに制御されるので、乱数生成部205が生成した乱数データr’と演算結果dとの排他的論理和演算をEXOR回路214で行ってマスク化し、マスク化した演算結果(d(+)r’)がレジスタ215に格納される。尚、演算結果dは先のブロック演算での演算結果dと同じ値を意味するものではなく、各ブロック演算の前半データの初期ラウンドの演算結果を表しているだけである。 At the next timing t n + 2 , the control signal 4 of the selector 209 is controlled to low, so that the random number data r ′ generated by the random number generation unit 205 (the same random number data used by the EXOR circuit 207 at the previous timing t n + 1). Data) is output to the EXOR circuit 210, and the EXOR circuit 210 performs an exclusive OR operation between the masked operation result (d n (+) r ′) held in the register 208 and the random number data r ′. unmask reduction operation result d n were unmasked reduction is output to the selector 211 and the selector 218. At this time, since the control signal 7 is controlled to High, the operation result d n are input to the selector 219 via the selector 218, the control signal 8 of the selector 219 is also controlled to Low, via the selector 219 calculation result d n of the final round of the first half data Te is output as the ciphertext (or plaintext). On the other hand, since the control signal 2 of the selector 211 is controlled to Low, the plaintext (or ciphertext) of the first half data of the next block is input to the combinational circuit 212 and subjected to arithmetic processing, and the arithmetic result d 0 is obtained from the EXOR circuit 214. Is output. At this time, since the control signal 5 of the selector 213 is controlled to Low, the exclusive OR operation of the random number data r ′ generated by the random number generation unit 205 and the operation result d 0 is performed by the EXOR circuit 214 to be masked. The masked calculation result (d 0 (+) r ′) is stored in the register 215. The calculation result d 0 does not mean the same value as the operation result d 0 in the previous block operation, only represent the calculation result of the initial round of the first half data of each block operation.

一方、セレクタ216の制御信号6がHighに制御されるので、レジスタ215に保持されていた演算結果d’n−1はそのままEXOR回路217をバイパスしてセレクタ203に入り、制御信号1がHighのセレクタ203を介して組合せ回路204で演算処理された演算結果d’はEXOR回路207に出力される。この時、セレクタ206の制御信号3はHighに制御されているので、後半データの最終ラウンドの演算結果d’はそのままEXOR回路207をバイパスしてレジスタ208に格納される。 On the other hand, since the control signal 6 of the selector 216 is controlled to be high, the operation result d ′ n−1 held in the register 215 is directly bypassed the EXOR circuit 217 and enters the selector 203, and the control signal 1 is high. calculation result d 'n computed treated with a combination circuit 204 via the selector 203 is outputted to the EXOR circuit 207. At this time, since the control signal 3 of the selector 206 is controlled to High, the operation result d ′ n of the last round of the latter half data is directly stored in the register 208 bypassing the EXOR circuit 207.

この結果、タイミングtn+2では、レジスタ208には後半データの最終ラウンドの演算結果d’が格納され、レジスタ215にはマスク化された前半データの次のブロックの初期ラウンドの演算結果(d(+)r’)が格納され、平行して前のブロックの前半データの最終ラウンドの演算結果dが外部に暗号文(or平文)として出力される。 As a result, at timing t n + 2 , the operation result d ′ n of the last round of the latter half data is stored in the register 208, and the operation result (d 0 of the initial round of the next block of the masked first half data is stored in the register 215. (+) r ') is stored, the operation result d n of the final round of the first half data of the previous block in parallel are output as cipher text to the outside (or plaintext).

次のタイミングtn+3では、セレクタ209の制御信号4がHighに制御されるので、EXOR回路210はバイパスされ、レジスタ208に保持された演算結果d’がセレクタ211およびセレクタ218に出力される。この時、制御信号7はHighに制御されているので、演算結果d’はセレクタ218を介してセレクタ219に入力され、セレクタ219の制御信号8もLowに制御されているので、セレクタ219を介して後半データの最終ラウンドの演算結果d’が外部に暗号文(or平文)として出力される。 At the next timing t n + 3 , since the control signal 4 of the selector 209 is controlled to be high, the EXOR circuit 210 is bypassed, and the operation result d ′ n held in the register 208 is output to the selector 211 and the selector 218. At this time, since the control signal 7 is controlled to be high, the calculation result d ′ n is input to the selector 219 via the selector 218, and the control signal 8 of the selector 219 is also controlled to be low. As a result, the operation result d ′ n of the last round of the latter half data is output to the outside as ciphertext (or plaintext).

一方、セレクタ211の制御信号2がLowに制御されたままなので、次のブロックの後半データの平文(or暗号文)が組合せ回路212に入力されて演算処理され、その演算結果d’がEXOR回路214に出力される。この時、セレクタ213の制御信号5はHighに制御されるのでEXOR回路214をバイパスし、次のブロックの後半データの演算結果d’がレジスタ215に格納される。尚、演算結果d’は先のブロック演算での演算結果d’と同じ値を意味するものではなく、各ブロック演算の後半データの初期ラウンドの演算結果を表しているだけである。 On the other hand, since the control signal 2 of the selector 211 remains controlled low, the plaintext (or ciphertext) of the second half data of the next block is input to the combinational circuit 212 and processed, and the calculation result d ′ 0 is EXOR. It is output to the circuit 214. At this time, since the control signal 5 of the selector 213 is controlled to High, the EXOR circuit 214 is bypassed, and the operation result d ′ 0 of the second half data of the next block is stored in the register 215. The calculation result d '0 is the operation result d in the previous block operation' does not mean the same value as 0 and only represent the calculation result of the initial round of the second half data of each block operation.

また、セレクタ216の制御信号6がLowに制御されるので、レジスタ215に保持されていた演算結果(d(+)r’)と乱数生成部205が生成した乱数データr’との排他的論理和演算をEXOR回路217で行ってアンマスク化し、アンマスク化した演算結果dがセレクタ203に入り、制御信号1がHighのセレクタ203を介して組合せ回路204で演算処理された前半データの第1ラウンドの演算結果dがEXOR回路207に出力される。この時、セレクタ206の制御信号3はHighに制御されているので、前半データの第1ラウンドの演算結果dはそのままEXOR回路207をバイパスしてレジスタ208に格納される。 Further, since the control signal 6 of the selector 216 is controlled to be Low, the operation result (d 0 (+) r ′) held in the register 215 and the random number data r ′ generated by the random number generation unit 205 are exclusive. unmask of performing a logical OR operation in the EXOR circuit 217, enters the calculation result d 0 is the selector 203 unmasking of the first half data control signal 1 is processing a combination circuit 204 via the selector 203 of the High The round operation result d 1 is output to the EXOR circuit 207. At this time, the control signal 3 of the selector 206 because it is controlled to High, the operation result d 1 of the first round half data is directly stored in bypassing the EXOR circuit 207 register 208.

この結果、タイミングtn+3では、レジスタ208には次のブロックの前半データの第1ラウンドの演算結果dが格納され、レジスタ215には次のブロックの後半データの演算結果d’が格納され、平行して前のブロックの後半データの最終ラウンドの演算結果d’が外部に暗号文(or平文)として出力される。 As a result, at timing t n + 3 , the register 208 stores the first round operation result d 1 of the first block data of the next block, and the register 215 stores the operation result d ′ 0 of the second block data of the next block. In parallel, the operation result d ′ n of the final round of the latter half data of the previous block is output to the outside as ciphertext (or plaintext).

以降、同様の動作を繰り返して、並列処理が実行される。尚、上記で説明した処理タイミングは制御部250によって全て制御される。   Thereafter, the same operation is repeated to execute parallel processing. Note that the processing timings described above are all controlled by the control unit 250.

ここで、初期ラウンドの関数出力値d,d’が格納されるタイミングt,t、および最終ラウンドの関数出力値d,d’が格納されるタイミングtn+1,tn+2がCPA攻撃の対象となる。ここで、攻撃者が入手可能なのは平文d,d’と暗号文d,d’に限定されるものとする。タイミングt,tでは、レジスタ208が0−>(d(+)r)−>d’−>dの順に変化するが、乱数rの効果によって、仮にd,d’が既知であった場合でも、いずれのクロックタイミングにおいてもハミング距離を計算することはできない。また、タイミングtn+1,tn+2では、最終演算結果を保持するレジスタ208がd’n−2−>(d(+)r’)−>d’−>dの順に変化するが、やはり乱数r’の効果によって、仮に暗号文d,d’が既知であった場合でも、いずれのクロックタイミングにおいてもハミング距離を計算することはできない。 Here, timings t 1 and t 2 at which the function output values d 0 and d ′ 0 of the initial round are stored, and timings t n + 1 and t n + 2 at which the function output values d n and d ′ n of the final round are stored Subject to CPA attack. Here, it is assumed that the attacker can obtain only the plaintexts d 0 and d ′ 0 and the ciphertexts d n and d ′ n . At timings t 1 and t 2 , the register 208 changes in the order of 0- > (d 0 (+) r)-> d ′ 0- > d 2 , but temporarily d 0 , d ′ 0 due to the effect of the random number r. Even if is known, the Hamming distance cannot be calculated at any clock timing. At timings t n + 1 and t n + 2 , the register 208 that holds the final operation result changes in the order of d ′ n−2 −> (d n (+) r ′) −> d ′ n −> d 1 . Again, due to the effect of the random number r ′, even if the ciphertexts d n and d ′ n are known, the Hamming distance cannot be calculated at any clock timing.

レジスタ215で次ブロックの処理を行うタイミングtn+2,tn+3,tn+4においても乱数r’の効果によっていずれのクロックタイミングでもハミング距離を計算することはできない。以下同様に、パイプライン処理する並列データのうち前半のブロック演算処理(1クロック周期早い処理)の初期ラウンドと最終ラウンドのみをマスク化することにより、最小限の演算コストでCPA攻撃ポイントとなるクロックタイミングにおけるレジスタハミングの計算を回避することができる。尚、本実施形態では第1の実施形態と同様に、乱数生成部205が生成する乱数は真性乱数または擬似乱数が用いられ、暗号化の処理単位である1ブロック単位の演算毎に新しい値に更新される。 Even at timings t n + 2 , t n + 3 , and t n + 4 at which the register 215 performs processing on the next block, the Hamming distance cannot be calculated at any clock timing due to the effect of the random number r ′. Similarly, by masking only the initial round and the final round of the first half block operation processing (processing one clock cycle earlier) of the parallel data to be pipelined, the clock that becomes the CPA attack point at the minimum operation cost Calculation of register hamming at timing can be avoided. In this embodiment, as in the first embodiment, the random number generated by the random number generation unit 205 is a true random number or a pseudo-random number, and a new value is obtained for each operation of one block unit that is an encryption processing unit. Updated.

また、本実施形態では、各レジスタの初期状態(例えば0)からの変化量を計算不可能とするため1クロック周期遅れでパイプライン処理する並列データのうち前半のデータを対象にマスク化を行ったが、並列データの後半のデータについても前半とは異なる乱数でマスク化を行うようにしても構わない。   In this embodiment, in order to make it impossible to calculate the amount of change from the initial state (for example, 0) of each register, masking is performed on the first half of the parallel data that is pipelined with a delay of one clock cycle. However, the latter half of the parallel data may be masked with a random number different from the first half.

このように、本実施形態に係る暗号演算回路装置200は、2段のパイプライン構成になっているので、第1の実施形態に係る暗号演算回路装置100に比べてブロック暗号アルゴリズムにおけるスループットを向上させることができ、特に前半データのみ初期ラウンドと最終ラウンドでマスク化する処理を行うだけの最小限の演算コストでCPA攻撃を防御することができる。   As described above, since the cryptographic operation circuit device 200 according to the present embodiment has a two-stage pipeline configuration, the throughput of the block encryption algorithm is improved as compared with the cryptographic operation circuit device 100 according to the first embodiment. In particular, it is possible to protect against the CPA attack at a minimum calculation cost for performing the process of masking only the first half data in the initial round and the final round.

(第3の実施形態)
次に、第3の実施形態に係る暗号演算回路装置300について説明する。第1の実施形態に係る暗号演算回路装置100および第2の実施形態に係る暗号演算回路装置200では、AESに代表されるブロック暗号アルゴリズムに適用した場合の例を示したが、公開鍵暗号アルゴリズムにおいて冪乗剰余演算や楕円スカラー倍演算を実行する暗号モジュールに対しても、組合せ回路とレジスタが直列に接続されて巡回的に処理される構成のハードウェア実装を行う場合には、先に示したブロック暗号アルゴリズムの場合と同様に本発明を適用することができる。以下、本実施形態では、このような公開鍵暗号アルゴリズムの演算で利用される冪乗剰余演算や楕円スカラー倍演算に本発明を適用した場合の例を示す。
(Third embodiment)
Next, a cryptographic operation circuit device 300 according to the third embodiment will be described. In the cryptographic operation circuit device 100 according to the first embodiment and the cryptographic operation circuit device 200 according to the second embodiment, an example in the case of application to a block encryption algorithm typified by AES has been shown. In the case of hardware implementation with a configuration in which a combinational circuit and a register are connected in series and cyclically processed for a cryptographic module that performs a power-residue operation and an elliptic scalar multiplication operation in FIG. The present invention can be applied similarly to the case of the block encryption algorithm. Hereinafter, in the present embodiment, an example in which the present invention is applied to the power-residue calculation and the elliptic scalar multiplication used in the calculation of such a public key encryption algorithm will be described.

図8は、第3の実施形態に係る暗号演算回路装置300の構成図である。図8において、暗号演算回路装置300は、攪拌部301と、指数展開部302と、制御部350とで構成される。尚、図8の暗号演算回路装置300の攪拌部301の基本構成は、第1の実施形態で示した図1の攪拌部101と同じである。   FIG. 8 is a configuration diagram of the cryptographic operation circuit device 300 according to the third embodiment. In FIG. 8, the cryptographic operation circuit device 300 includes a stirring unit 301, an exponent expansion unit 302, and a control unit 350. The basic configuration of the stirring unit 301 of the cryptographic operation circuit device 300 in FIG. 8 is the same as that of the stirring unit 101 in FIG. 1 shown in the first embodiment.

図8において、攪拌部301は、外部から入力する平文(または暗号文)とラウンド処理後のデータと指数展開部302の出力とを用いて所定の関数処理を行う組合せ回路303と、乱数生成部304と、乱数生成部304が出力する乱数データまたはAll=0(全て0のデータ)を選択するセレクタ305と、セレクタ305の出力データと組合せ回路303の出力データとの排他的論理和を求めるEXOR回路306(第1の排他的論理和演算部)と、EXOR回路306の出力データを一時的に保持するレジスタ307と、セレクタ305の出力データを保持するレジスタ308と、レジスタ308の出力データとレジスタ307の出力データとの排他的論理和を求めるEXOR回路309(第2の排他的論理和演算部)と、EXOR回路309の出力データまたはAll=0(全て0のデータ)を選択して外部に出力するセレクタ310とで構成される。ここで、本実施形態の図8に示した組合せ回路303は、指数展開部302の出力値に基づいて冪乗剰余演算または楕円スカラー倍演算を行う回路で構成される。尚、冪乗剰余演算または楕円スカラー倍演算については周知の演算であり、従来技術の図13と同じである。   In FIG. 8, the agitation unit 301 includes a combinational circuit 303 that performs predetermined function processing using plaintext (or ciphertext) input from the outside, data after round processing, and the output of the exponent expansion unit 302, and a random number generation unit 304, a selector 305 for selecting random number data output from the random number generation unit 304 or All = 0 (all 0 data), and EXOR for obtaining an exclusive OR of the output data of the selector 305 and the output data of the combinational circuit 303 A circuit 306 (first exclusive OR operation unit), a register 307 that temporarily holds output data of the EXOR circuit 306, a register 308 that holds output data of the selector 305, and output data and registers of the register 308 EXOR circuit 309 (second exclusive OR operation unit) for obtaining an exclusive OR with the output data 307, EXO Composed of a selector 310 to be output to the outside by selecting the output data or All = 0 circuit 309 (all zero data). Here, the combinational circuit 303 shown in FIG. 8 of the present embodiment is configured by a circuit that performs a power-residue operation or an elliptic scalar multiplication operation based on the output value of the exponent expansion unit 302. The power-residue calculation or the elliptic scalar multiplication is a well-known calculation and is the same as that in FIG.

また、制御部350は、レジスタ307およびレジスタ308にリセット信号を与え、レジスタ307,レジスタ308および乱数生成部304にクロックを供給し、セレクタ305に制御信号1,セレクタ310に制御信号2をそれぞれ出力して攪拌部301の処理タイミングを制御する。ここで、セレクタ305の制御信号1は、レジスタ307に処理関数の結果を格納する際に乱数でマスク化を行うかまたはマスク化を行わずにレジスタ307に格納するかを選択する制御信号で、レジスタ308を介して出力されるので1クロック周期遅延されたタイミングでレジスタ308に格納されたデータを読み出す際にアンマスク化を行うかまたはアンマスク化を行わないかを選択する制御信号でもある。制御信号2は、最終的な演算結果を外部に出力するか否かを選択するための制御信号である。   The control unit 350 provides a reset signal to the register 307 and the register 308, supplies a clock to the register 307, the register 308, and the random number generation unit 304, and outputs a control signal 1 to the selector 305 and a control signal 2 to the selector 310, respectively. Then, the processing timing of the stirring unit 301 is controlled. Here, the control signal 1 of the selector 305 is a control signal for selecting whether to perform masking with a random number when storing the result of the processing function in the register 307 or to store in the register 307 without masking. Since it is output via the register 308, it is also a control signal for selecting whether or not unmasking is performed when data stored in the register 308 is read at a timing delayed by one clock cycle. The control signal 2 is a control signal for selecting whether or not to output the final calculation result to the outside.

尚、本実施形態では、指数をバイナリー展開して左バイナリ法により最上位ビットから冪乗剰余演算または楕円スカラー倍演算を実行する場合を示しており、バイナリ展開した指数1ビット分の演算を1クロックで処理する例を想定している。また、組合せ回路303で計算された指数1ビット分の演算結果は、演算中間値としてレジスタ307に格納され、展開ビット長の長さ分演算が繰り返された最終結果が外部に出力される。   In this embodiment, an exponent is binary-expanded and a power-residue operation or an elliptic scalar multiplication operation is executed from the most significant bit by the left binary method. An example of processing with a clock is assumed. In addition, the calculation result for the exponent 1 bit calculated by the combinational circuit 303 is stored in the register 307 as a calculation intermediate value, and the final result obtained by repeating the calculation for the length of the expanded bit length is output to the outside.

次に、図8の暗号演算回路装置300の動作について図9のタイミングチャートを用いて詳しく説明する。図9は、制御部350が出力するリセット信号と、クロックと、制御信号1と、制御信号2と、制御信号3と、レジスタ307と、レジスタ308との処理タイミングの関係を描いたタイミングチャートである。尚、図9において、初期ラウンドから最終ラウンドまでの(n+1)回の全ラウンドを1ブロック演算とし、1ブロック演算毎に処理結果の暗号文(or平文)が外部に出力される。また、図8の組合せ回路303による処理関数は1クロック周期毎に実行され、レジスタ307およびレジスタ308は1クロック周期で入力データを保持する。尚、レジスタ307およびレジスタ308の初期値はリセット信号がLowになった時に所定値(例えば全て0)に初期化されるものとする。尚、レジスタ308にはリセット信号を入れなくても動作に影響はないが、図8ではリセット時の初期値を明確にするためにレジスタ308リセット信号を入力してAll=0に初期化している。また、図9において、タイミングtからtn+1の表記はクロック周期毎のタイミング位置を示し、dn−1からdは組合せ回路303による処理関数の各ラウンド毎の出力データを示している。例えばdn−1は初期ラウンド処理関数の結果の値、dn−2は第1ラウンド処理関数の結果の値、dは最終ラウンド処理関数の結果の値をそれぞれ示している。また、rn−1からrは乱数生成部105が1クロック周期毎の更新頻度で生成する乱数を示している。さらに、(+)は排他的論理和演算子を示し、例えばdn−1(+)rn−1はdn−1とrn−1の排他的論理和演算値となる。 Next, the operation of the cryptographic operation circuit device 300 of FIG. 8 will be described in detail with reference to the timing chart of FIG. FIG. 9 is a timing chart illustrating the relationship between the reset signal output from the control unit 350, the clock, the control signal 1, the control signal 2, the control signal 3, the register 307, and the register 308. is there. In FIG. 9, (n + 1) rounds from the initial round to the final round are defined as one block operation, and the ciphertext (or plaintext) as a processing result is output to the outside for each block operation. Further, the processing function by the combinational circuit 303 in FIG. 8 is executed every clock cycle, and the register 307 and the register 308 hold input data in one clock cycle. Note that the initial values of the registers 307 and 308 are initialized to predetermined values (for example, all 0) when the reset signal becomes low. Note that the operation is not affected even if the reset signal is not input to the register 308, but in FIG. 8, the register 308 reset signal is input and initialized to All = 0 in order to clarify the initial value at the time of reset. . In FIG. 9, the notations from timing t 0 to t n + 1 indicate timing positions for each clock cycle, and dn −1 to d 0 indicate output data for each round of the processing function by the combinational circuit 303. For example d n-1 is a result of the value of the initial round processing function, d n-2 is the resulting value of the first round processing function, d 0 indicates the results of the value of the final round processing functions, respectively. R n−1 to r 0 indicate random numbers generated by the random number generation unit 105 at an update frequency for each clock cycle. Further, (+) represents an exclusive OR operator. For example, d n−1 (+) r n−1 is an exclusive OR operation value of d n−1 and r n−1 .

図9において、先ずタイミングtでは、リセットはLowに制御されているのでレジスタ307およびレジスタ308はAll=0に初期化されている。また、セレクタ310の制御信号2はHighなのでAll=0が外部に出力されている。尚、タイミングt0の後、リセットはHighに制御されて解除される。 In FIG. 9, first, at the timing t 0 , the reset is controlled to be Low, so that the registers 307 and 308 are initialized to All = 0. Since the control signal 2 of the selector 310 is High, All = 0 is output to the outside. Note that after the timing t0, the reset is released under the control of High.

次のタイミングtでは、制御信号1がLowに制御されるので、乱数生成部304が生成した乱数データrn−1がEXOR回路306に入力され、組合せ回路303で初期ラウンド処理された演算結果dn−1と排他的論理和演算を行ってマスク化し、マスク化した演算結果(dn−1(+)rn−1)がレジスタ307に格納される。一方、レジスタ308には、乱数生成部304が生成した乱数データrn−1が格納される。 At the next timing t 1 , since the control signal 1 is controlled to be Low, the random number data rn −1 generated by the random number generation unit 304 is input to the EXOR circuit 306, and the result of the initial round processing performed by the combinational circuit 303 Masking is performed by performing an exclusive OR operation with d n−1, and the masked operation result (d n−1 (+) r n−1 ) is stored in the register 307. On the other hand, the register 308 stores the random number data rn −1 generated by the random number generation unit 304.

この結果、タイミングtでは、レジスタ307にはマスク化した演算結果(dn−1(+)rn−1)が格納され、レジスタ308には乱数データrn−1が格納される。 As a result, at timing t 1 , the masked calculation result (d n−1 (+) r n−1 ) is stored in the register 307, and the random number data r n−1 is stored in the register 308.

次のタイミングtでは、レジスタ307に格納されたマスク化した演算結果(dn−1(+)rn−1)とレジスタ308に格納された乱数データrn−1との排他的論理和演算を行ってEXOR回路309で行ってアンマスク化し、アンマスク化した演算結果dn−1はセレクタ310および組合せ回路303にフィードバックされる。尚、セレクタ310の制御信号2はHighのままなので外部には出力されない。組合せ回路303にフィードバックされた演算結果dn−1は組合せ回路303で第1ラウンドの関数処理が行われ、その演算結果dn−2がレジスタ307に格納される。一方、この時のセレクタ305の制御信号1はHighに制御されるので、レジスタ308にはAll=0が格納される。 At the next timing t 2 , the exclusive OR of the masked operation result (d n−1 (+) r n−1 ) stored in the register 307 and the random number data r n−1 stored in the register 308 is obtained. unmask reduction performed by the EXOR circuit 309 performs an operation, the operation result d n-1 obtained by unmasking of is fed back to the selector 310 and the combination circuit 303. Since the control signal 2 of the selector 310 remains High, it is not output to the outside. The calculation result dn −1 fed back to the combinational circuit 303 is subjected to the first round of function processing in the combinational circuit 303, and the calculation result dn −2 is stored in the register 307. On the other hand, since the control signal 1 of the selector 305 at this time is controlled to High, All = 0 is stored in the register 308.

この結果、タイミングtでは、レジスタ307には第1ラウンドの演算結果dn−2が格納され、レジスタ308には0が格納される。 As a result, at the timing t 2 , the first round operation result dn −2 is stored in the register 307, and 0 is stored in the register 308.

次のタイミングtでは、レジスタ308には0が格納されているのでEXOR回路309はバイパスされ、レジスタ307に格納されていた第1ラウンドの演算結果dn−2はそのまま組合せ回路303にフィードバックされて第2ラウンドの関数処理が行われ、その演算結果dn−3がEXOR回路306に出力される。この時、セレクタ305の制御信号1がLowに制御されるので、乱数生成部304が生成した乱数データrn−3がEXOR回路306に入力され、組合せ回路303の第2ラウンドの演算結果dn−3と排他的論理和演算を行ってマスク化し、マスク化した演算結果(dn−3(+)rn−3)がレジスタ307に格納される。一方、レジスタ308には、乱数生成部304が生成した乱数データrn−3が格納される。 At the next timing t 3 , since 0 is stored in the register 308, the EXOR circuit 309 is bypassed, and the first round operation result dn −2 stored in the register 307 is fed back to the combinational circuit 303 as it is. Then, the second round of function processing is performed, and the calculation result dn -3 is output to the EXOR circuit 306. At this time, since the control signal 1 of the selector 305 is controlled to Low, the random number data r n-3 to the random number generating unit 304 has generated is input to the EXOR circuit 306, a second round of calculation results of the combinational circuit 303 d n -3 and an exclusive OR operation for masking, and the masked operation result (d n-3 (+) r n-3 ) is stored in the register 307. On the other hand, the register 308 stores the random number data rn -3 generated by the random number generation unit 304.

この結果、タイミングtでは、レジスタ307にはマスク化した演算結果(dn−3(+)rn−3)が格納され、レジスタ308には乱数データrn−3が格納される。 As a result, at timing t 3 , the masked calculation result (d n−3 (+) r n−3 ) is stored in the register 307, and random number data r n−3 is stored in the register 308.

この後、タイミングtからタイミングtまで同様の処理が繰り返し行われる。 Thereafter, the same processing from the timing t 1 to timing t n is repeated.

最終ラウンドのタイミングtn+1では、レジスタ307に格納されたマスク化した演算結果(d(+)r)とレジスタ308に格納された乱数データrとの排他的論理和演算を行ってEXOR回路309で行ってアンマスク化し、アンマスク化した演算結果dはセレクタ310および組合せ回路303にフィードバックされる。この時、セレクタ310の制御信号2はLowに制御されるので、セレクタ310を介して最終ラウンドの演算結果dが外部に暗号文(or平文)として出力される。 At timing t n + 1 of the final round, an exclusive OR operation is performed on the masked operation result (d 0 (+) r 0 ) stored in the register 307 and the random number data r 0 stored in the register 308 to perform EXOR. Unmasking is performed by the circuit 309, and the unmasked operation result d 0 is fed back to the selector 310 and the combinational circuit 303. At this time, since the control signal 2 of the selector 310 is controlled to Low, the final round operation result d 0 is output to the outside as ciphertext (or plaintext) via the selector 310.

ここで、図9に示したように、乱数でマスク化するのは2クロックに1回の頻度で行われる。つまり、レジスタ307に演算結果を格納する際に、組合せ回路303で展開した指数2ビット分の処理に対して1回の頻度で(すなわち2クロックの処理に対して1回の頻度で)乱数との排他的論理和演算を行った値がレジスタ307に格納される。そして、同じ動作を最下位ビットdに対する処理まで継続して一連の暗号化演算を完了し、tn+1のタイミングで演算結果を取得できるよう制御部350によって制御される。この一連の動作において、レジスタ307の値は(dn−1(+)rn−1)−>dn−2−>(dn−3(+)rn−3)−>dn−4−>・・・・・(d(+)r)−>d−>(d(+)r)となり、仮にdの値(iは0からnの整数)を取得することができたとしても、どのクロックタイミングにおいても乱数rの効果により、ハミング距離が(d(+)di−1(+)r)となるため、レジスタのハミング距離の計算を回避することができる。 Here, as shown in FIG. 9, masking with random numbers is performed once every two clocks. That is, when storing the operation result in the register 307, the random number and the random number are processed at a frequency of once for processing of the exponent 2 bits developed by the combinational circuit 303 (that is, at a frequency of once for processing of two clocks). A value obtained by performing the exclusive OR operation is stored in the register 307. Then, to continue the same operation until the processing for the least significant bit d 0 completes a series of cryptographic operations are controlled by the control unit 350 so that it can obtain an operation result at the timing of t n + 1. In this series of operations, the value of the register 307 is (dn -1 (+) rn -1 )-> dn -2- > (dn -3 (+) rn -3 )-> dn-. 4 -> ····· (d 2 ( +) r 2) -> d 1 -> (d 0 (+) r 0) , and the tentatively obtain the value (i is an integer from 0 to n) of d i Even if it is possible, the Hamming distance becomes (d i (+) d i−1 (+) r i ) due to the effect of the random number r i at any clock timing. It can be avoided.

尚、マスク化に用いる乱数は真性乱数または擬似乱数が用いられ、少なくとも展開指数2ビットのうち1ビットの演算毎に新しい値に更新される。本実施例ではnが奇数の場合を示したが、偶数の場合でも同様に動作する。また、展開指数1ビット毎に毎回新しい乱数に更新し、乱数値と1クロック毎の演算結果との排他的論理和演算を行った値を毎クロックごとにレジスタに格納しても構わない。   Note that the random number used for masking is a true random number or a pseudo-random number, and is updated to a new value every operation of 1 bit of at least 2 expansion indices. In the present embodiment, the case where n is an odd number is shown. Alternatively, a new random number may be updated every bit of the expansion index, and a value obtained by performing an exclusive OR operation between the random number value and the calculation result every clock may be stored in the register every clock.

このように、本実施形態に係る暗号演算回路装置300では、レジスタ307の格納値を毎回異なる乱数でマスク化するので、展開した指数ビット毎の処理におけるレジスタ中間値のハミング距離を計算することができない。この結果、冪乗剰余演算や楕円スカラー倍演算に対するCPA攻撃を防御することができる。   As described above, in the cryptographic operation circuit device 300 according to the present embodiment, the stored value of the register 307 is masked with a different random number each time, so that it is possible to calculate the Hamming distance of the register intermediate value in the processing for each expanded exponent bit. Can not. As a result, it is possible to prevent CPA attacks against the power-residue calculation and the elliptic scalar multiplication.

以上、第1の実施形態に係る暗号演算回路装置100および第2の実施形態に係る暗号演算回路装置200ではAESに代表されるブロック暗号アルゴリズムに適用した場合の例を示し、基本処理関数に変更を加えることなく、少ない処理量およびオーバヘッドで、初期ラウンド演算前後および最終ラウンド演算前後のレジスタ値に関わるハミング距離の逆算を防御することができる。また、第3の実施形態に係る暗号演算回路装置300では公開鍵暗号アルゴリズムに適用した場合の例を示し、この場合でも基本処理関数に変更を加えることなく、指数展開された冪乗剰余演算または楕円スカラー倍演算における処理関数の演算結果を保持したレジスタ値のクロック遷移に伴うハミング距離の逆算を少ない処理量およびオーバヘッドで防御することができる。   As described above, in the cryptographic operation circuit device 100 according to the first embodiment and the cryptographic operation circuit device 200 according to the second embodiment, the example is applied to the block encryption algorithm represented by AES, and the basic processing function is changed. Therefore, the back-calculation of the Hamming distance related to the register values before and after the initial round operation and before and after the final round operation can be prevented with a small processing amount and overhead. In addition, the cryptographic operation circuit device 300 according to the third embodiment shows an example of application to a public key encryption algorithm, and even in this case, without changing the basic processing function, exponentiation-expanded residue calculation or The back-calculation of the Hamming distance accompanying the clock transition of the register value holding the calculation result of the processing function in the elliptic scalar multiplication can be prevented with a small processing amount and overhead.

以上、本発明に係る暗号演算回路装置の各実施形態について説明してきたが、その精神またはその主要な特徴から逸脱することなく他の多様な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。本発明は、特許請求の範囲によって示されるものであって、本発明は明細書本文にはなんら拘束されない。さらに、特許請求の範囲の均など範囲に属する変形や変更は、全て本発明の範囲内である。   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,11,12,13,14,15,16,17,18,21,22,a,b,c,d・・・制御信号
100,200,300,900,960・・・暗号演算回路装置
101,201,301,901,961・・・攪拌部
103,106,109,111,203,206,209,211,213,216,218,219,903,906,907,965・・・セレクタ
104,204,212,303,904,909,963・・・組合せ回路
105,205,304・・・乱数生成部
108,208,215,307,308,905,908,964・・・レジスタ
150,250,350,950,970・・・制御部
107,110,207,210,214,217,306,309・・・EXOR回路
302,962・・・指数展開部
902・・・鍵スケジューリング部
1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22, a, b, c, d... Control signals 100, 200, 300, 900, 960,. ..Cryptographic operation circuit devices 101, 201, 301, 901, 961... Stirring units 103, 106, 109, 111, 203, 206, 209, 211, 213, 216, 218, 219, 903, 906, 907, 965... Selectors 104, 204, 212, 303, 904, 909, 963... Combinational circuits 105, 205, 304 ... random number generators 108, 208, 215, 307, 308, 905, 908, 964. ..Registers 150, 250, 350, 950, 970 ... Control units 107, 110, 207, 210, 214, 217, 306, 309 ... EXOR times 302,962 ... exponential expansion section 902 ... key scheduling unit

Claims (8)

所定回数の繰り返し処理で構成される処理単位の初回は外部入力データを選択し以降の回の処理は内部入力データを選択する入力選択部と、
前記入力選択部が選択したデータに所定の関数処理を施して出力データを生成する関数処理部と、
前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、
前記関数処理部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第1の排他的論理和演算部と、
前記第1の排他的論理和演算部の演算結果を保持するデータ保持部と、
前記データ保持部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求めて前記内部入力データとする第2の排他的論理和演算部と、
前記処理単位毎の各部の処理タイミングを制御し、前記入力選択部から前記第2の排他的論理和演算部までの一連の処理を所定回数実行後の前記第2の排他的論理和演算部の演算結果を暗号データとして外部に出力する処理タイミングを制御する制御部と
を備えたことを特徴とする暗号演算回路装置。
An input selection unit that selects external input data for the first time of a processing unit configured by a predetermined number of repetition processes, and selects internal input data for subsequent processing;
A function processing unit that performs predetermined function processing on the data selected by the input selection unit to generate output data;
A random number generator for generating random data having a bit width equal to the output data of the function processor;
A first exclusive OR operation unit for obtaining an exclusive OR of the output data of the function processing unit and the random number data generated by the random number generation unit;
A data holding unit for holding a calculation result of the first exclusive OR calculation unit;
A second exclusive OR operation unit that obtains an exclusive OR of the output data of the data holding unit and the random number data generated by the random number generation unit and sets the internal input data;
The processing timing of each unit for each processing unit is controlled, and the second exclusive OR operation unit after executing a series of processes from the input selection unit to the second exclusive OR operation unit a predetermined number of times. A cryptographic operation circuit device comprising: a control unit that controls processing timing for outputting a calculation result to the outside as cryptographic data.
請求項1に記載の暗号演算回路装置において、
前記制御部は、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行する
ことを特徴とする暗号演算回路装置。
The cryptographic operation circuit device according to claim 1,
The control unit executes the process of the second exclusive OR operation unit at a processing timing subsequent to the processing timing of holding the operation result of the first exclusive OR operation unit in the data holding unit. A cryptographic operation circuit device.
請求項2に記載の暗号演算回路装置において、
前記制御部は、前記一連の処理の初期化ステップにおいて、前記乱数生成部が生成する乱数データを前記データ保持部に保持する処理を実行する
ことを特徴とする暗号演算回路装置。
The cryptographic operation circuit device according to claim 2,
The cryptographic operation circuit device, wherein the control unit executes a process of holding the random number data generated by the random number generation unit in the data holding unit in the initialization step of the series of processes.
請求項2に記載の暗号演算回路装置において、
前記制御部は、前記一連の処理の初回処理ステップにおいて、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行する
ことを特徴とする暗号演算回路装置。
The cryptographic operation circuit device according to claim 2,
In the initial processing step of the series of processes, the control unit performs the second exclusive timing at a processing timing subsequent to a processing timing for holding the calculation result of the first exclusive OR calculation unit in the data holding unit. A cryptographic operation circuit device that executes processing of an OR operation unit.
請求項2に記載の暗号演算回路装置において、
前記制御部は、前記一連の処理の最終処理ステップにおいて、前記第1の排他的論理和演算部の演算結果を前記データ保持部に保持する処理タイミングの次の処理タイミングで前記第2の排他的論理和演算部の処理を実行する
ことを特徴とする暗号演算回路装置。
The cryptographic operation circuit device according to claim 2,
In the final processing step of the series of processes, the control unit performs the second exclusive timing at a processing timing subsequent to a processing timing for holding the calculation result of the first exclusive OR calculation unit in the data holding unit. A cryptographic operation circuit device that executes processing of an OR operation unit.
請求項1から5のいずれか一項に記載の暗号演算回路装置において、
前記乱数生成部が生成する乱数は、少なくとも処理単位毎に更新する擬似乱数または真性乱数であることを特徴とする暗号演算回路装置。
In the cryptographic operation circuit device according to any one of claims 1 to 5,
The cryptographic operation circuit device, wherein the random number generated by the random number generation unit is a pseudo-random number or a true random number that is updated at least for each processing unit.
所定回数の繰り返し処理で構成される処理単位の初回は外部入力データを選択し以降の回の処理は内部入力データを選択する入力選択部と、
前記入力選択部が選択したデータに所定の関数処理を施して出力データを生成する関数処理部と、
前記関数処理部の出力データに等しいビット幅の乱数データを生成する乱数生成部と、
前記関数処理部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第1の排他的論理和演算部と、
前記第1の排他的論理和演算部の演算結果または前記関数処理部の出力データを保持するデータ保持部と、
前記データ保持部の出力データと前記乱数生成部が生成する乱数データとの排他的論理和を求める第2の排他的論理和演算部と、
前記処理単位毎の各部の処理タイミングを制御し、初回の処理単位では前記第1の排他的論理和演算部および前記第2の排他的論理和演算部の演算を実行し、2回目以降の処理単位では前記第1の排他的論理和演算部および前記第2の排他的論理和演算部の演算を処理毎に交互に実行し、前記入力選択部から前記第2の排他的論理和演算部までの一連の処理を前記処理単位として所定回数実行後の前記第2の排他的論理和演算部の演算結果または前記データ保持部の出力データを暗号データとして外部に出力する処理タイミングを制御する制御部と
を備えたことを特徴とする暗号演算回路装置。
An input selection unit that selects external input data for the first time of a processing unit configured by a predetermined number of repetition processes, and selects internal input data for subsequent processing;
A function processing unit that performs predetermined function processing on the data selected by the input selection unit to generate output data;
A random number generator for generating random data having a bit width equal to the output data of the function processor;
A first exclusive OR operation unit for obtaining an exclusive OR of the output data of the function processing unit and the random number data generated by the random number generation unit;
A data holding unit for holding a calculation result of the first exclusive OR calculation unit or output data of the function processing unit;
A second exclusive OR operation unit for obtaining an exclusive OR of the output data of the data holding unit and the random number data generated by the random number generation unit;
The processing timing of each unit for each processing unit is controlled, and in the first processing unit, the operations of the first exclusive OR operation unit and the second exclusive OR operation unit are executed, and the second and subsequent processing In units, the operations of the first exclusive OR operation unit and the second exclusive OR operation unit are alternately executed for each process, and from the input selection unit to the second exclusive OR operation unit. A control unit for controlling the processing timing of outputting the operation result of the second exclusive OR operation unit or the output data of the data holding unit as encrypted data to the outside after a predetermined number of executions of the series of processes as the processing unit A cryptographic operation circuit device comprising:
請求項7に記載の暗号演算回路装置において、
前記乱数生成部が生成する乱数は、少なくとも2回の処理単位に1度の頻度で更新する擬似乱数または真性乱数であることを特徴とする暗号演算回路装置。
The cryptographic operation circuit device according to claim 7,
The cryptographic operation circuit device, wherein the random number generated by the random number generation unit is a pseudo random number or a true random number that is updated at a frequency of at least once every two processing units.
JP2009091120A 2009-04-03 2009-04-03 Encryption operation circuit device Withdrawn JP2010245753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009091120A JP2010245753A (en) 2009-04-03 2009-04-03 Encryption operation circuit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009091120A JP2010245753A (en) 2009-04-03 2009-04-03 Encryption operation circuit device

Publications (1)

Publication Number Publication Date
JP2010245753A true JP2010245753A (en) 2010-10-28

Family

ID=43098306

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009091120A Withdrawn JP2010245753A (en) 2009-04-03 2009-04-03 Encryption operation circuit device

Country Status (1)

Country Link
JP (1) JP2010245753A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013190747A (en) * 2012-03-15 2013-09-26 Toshiba Corp Encryption key generation device
CN109313863A (en) * 2016-06-17 2019-02-05 阿姆有限公司 Device and method for covering the power consumption of processor
JP2021111410A (en) * 2020-01-14 2021-08-02 新唐科技股▲ふん▼有限公司 Secure integrated circuit and method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013190747A (en) * 2012-03-15 2013-09-26 Toshiba Corp Encryption key generation device
CN109313863A (en) * 2016-06-17 2019-02-05 阿姆有限公司 Device and method for covering the power consumption of processor
CN109313863B (en) * 2016-06-17 2022-12-06 阿姆有限公司 Apparatus and method for cloaking power consumption of processor
JP2021111410A (en) * 2020-01-14 2021-08-02 新唐科技股▲ふん▼有限公司 Secure integrated circuit and method thereof
JP7061207B2 (en) 2020-01-14 2022-04-27 新唐科技股▲ふん▼有限公司 Secure integrated circuit and its method

Similar Documents

Publication Publication Date Title
US10567162B2 (en) Mask S-box, block ciphers algorithm device and corresponding construction process
JP4596686B2 (en) Secure encryption against DPA
JP4909018B2 (en) Encryption device for common key encryption
JP5229315B2 (en) Encryption device and built-in device equipped with a common key encryption function
Arnault et al. F-FCSR: design of a new class of stream ciphers
US8724804B2 (en) Encryption processing apparatus
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
JP2000066585A (en) Encryption and decryption apparatus, encryption and decryption method and their program memory medium
SG173111A1 (en) Cryptography circuit protected against observation attacks, in particular of a high order
US20050097153A1 (en) Pseudorandom number generator
GB2453367A (en) Cryptographic processing using isomorphic mappings of Galois fields
WO2010067827A1 (en) Encryption processing apparatus and calculation method
KR100834096B1 (en) Aria encryption method for countermeasuring higher order dpa
Gierlichs et al. Susceptibility of eSTREAM candidates towards side channel analysis
KR20050078271A (en) Hardware cryptographic engine and method improving power consumption and operation speed
JP2002229445A (en) Modulator exponent device
JP2010245753A (en) Encryption operation circuit device
JP5327493B1 (en) Encryption processing circuit and decryption processing circuit, method and program thereof
Pramstaller et al. A Masked AES ASIC Implementation
Abdulgadir et al. Side-channel resistant implementations of three finalists of the nist lightweight cryptography standardization process: Elephant, tinyjambu, and xoodyak
Arora et al. A double-width algorithmic balancing to prevent power analysis side channel attacks in aes
Vadnala et al. Algorithms for switching between boolean and arithmetic masking of second order
JP2010232709A (en) Encryption arithmetic circuit device
Ha et al. Differential power analysis on block cipher ARIA
Yli-Mäyry et al. Chosen-input side-channel analysis on unrolled light-weight cryptographic hardware

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