JP2006025366A - Encryption apparatus and semiconductor integrated circuit - Google Patents
Encryption apparatus and semiconductor integrated circuit Download PDFInfo
- Publication number
- JP2006025366A JP2006025366A JP2004203806A JP2004203806A JP2006025366A JP 2006025366 A JP2006025366 A JP 2006025366A JP 2004203806 A JP2004203806 A JP 2004203806A JP 2004203806 A JP2004203806 A JP 2004203806A JP 2006025366 A JP2006025366 A JP 2006025366A
- Authority
- JP
- Japan
- Prior art keywords
- cryptographic
- encryption
- data
- des
- calculation
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0625—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
- H04L9/003—Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/08—Randomization, e.g. dummy operations or using noise
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/12—Details relating to cryptographic hardware or logic circuitry
Abstract
Description
本発明は暗号化装置及び半導体集積回路に関し、例えば秘密鍵で暗号化又は復号化を行う暗号回路に適用して好適なものである。 The present invention relates to an encryption device and a semiconductor integrated circuit, and is suitable for application to, for example, an encryption circuit that performs encryption or decryption using a secret key.
近年、IC(Integrated Circuit)カードを利用した電子マネーシステムや、交通システム等が広く普及している。このようなシステムにおいては、ICカード内に記憶されている個人情報や電子マネーの残高情報等が漏洩したり改竄されたりしないよう安全性を確保することが重要である。 In recent years, electronic money systems using IC (Integrated Circuit) cards, transportation systems, and the like have become widespread. In such a system, it is important to ensure safety so that personal information and balance information of electronic money stored in the IC card are not leaked or tampered with.
そこでかかるシステムでは、ICカード及びリーダライタ間での相互認証やデータの送受時に、秘密鍵を用いた種々の暗号化を利用することにより安全性を確保するようになされている。 Therefore, in such a system, security is ensured by using various encryptions using a secret key at the time of mutual authentication and data transmission / reception between the IC card and the reader / writer.
ところが、このような暗号化を解読する方法として、暗号回路の動作時の消費電力(消費電流)変動を解析することにより、秘密鍵を取り出そうとする電力解析攻撃が存在する。 However, as a method of decrypting such encryption, there is a power analysis attack that attempts to extract a secret key by analyzing fluctuations in power consumption (current consumption) during operation of the encryption circuit.
この電力解析攻撃には、暗号演算時に暗号回路の消費電力が増加することに着目して暗号演算の実行タイミングを特定し、そのときの消費電力の変動を解析して秘密鍵を取り出そうとする単純電力解析(SPA:Simple Power Analysis)や、暗号回路内で生成されるデータを繰り返し測定して統計的に解析し、この解析結果をもとに暗号回路内の秘密鍵に依存する箇所の状態を特定することにより、秘密鍵を取り出そうとする差分電力解析(DPA:Differential Power Analysis)等がある。 In this power analysis attack, it is simple to identify the execution timing of cryptographic operations by focusing on the fact that the power consumption of the cryptographic circuit increases during cryptographic operations, analyze the power consumption fluctuations at that time, and extract the secret key Simple analysis of power (SPA) and data generated in the cryptographic circuit are repeatedly measured and statistically analyzed. Based on the results of this analysis, the state of the location that depends on the secret key in the cryptographic circuit is analyzed. By specifying, there is a differential power analysis (DPA) that tries to extract a secret key.
ここで、例えば暗号化方式の1つであるDES(Data Encryption Standard)の秘密鍵を電力解析攻撃で取り出す場合について説明する。DESのアルゴリズムは、図12に示すように、初期転置(Initial Permutation)、16ラウンドの変換処理、逆転置(Inverse Initial Permutation)の順で実行される。実際上DESでは、まず入力される64ビットのデータ(Input)を、初期転置により左32ビットのブロックデータL0と右32ビットのブロックデータR0とに分割する。 Here, for example, a case where a secret key of DES (Data Encryption Standard), which is one of encryption methods, is extracted by a power analysis attack will be described. As shown in FIG. 12, the DES algorithm is executed in the order of initial transposition (Initial Permutation), 16-round conversion processing, and inverse transposition (Inverse Initial Permutation). In practice, in DES, first, the input 64-bit data (Input) is divided into left 32-bit block data L0 and right 32-bit block data R0 by initial transposition.
次に第1ラウンドの変換処理として、ブロックデータR0と、64ビットの秘密鍵から生成される48ビットの副鍵K1とを用いてf関数と呼ばれる非線形の転置及び置換処理を実行し、このf関数の出力とブロックデータL0とのXOR(排他的論理和)をとる。 Next, as a first round of conversion processing, non-linear transposition and replacement processing called an f function is executed using block data R0 and a 48-bit subkey K1 generated from a 64-bit secret key. XOR (exclusive OR) of the output of the function and the block data L0 is taken.
そしてf関数の出力とブロックデータL0とのXORの結果がブロックデータR1として第2ラウンドの変換処理に与えられると共に、ブロックデータR0がブロックデータL1として第2ラウンドの変換処理に与えられる。 The result of the XOR between the output of the f function and the block data L0 is given to the second round conversion process as block data R1, and the block data R0 is given to the second round conversion process as block data L1.
第2ラウンドの変換処理では、第1ラウンドの場合と同様に、ブロックデータR1と、64ビットの秘密鍵から生成される48ビットの副鍵K2とを用いてf関数を実行し、このf関数の出力とブロックデータL1とのXORをとる。 In the conversion process of the second round, as in the case of the first round, the f function is executed using the block data R1 and the 48-bit subkey K2 generated from the 64-bit secret key. Is XORed with the block data L1.
そしてf関数の出力とブロックデータL1とのXORの結果がブロックデータR2として第3ラウンドの変換処理に与えられると共に、ブロックデータR1がブロックデータL2として第3ラウンドの変換処理に与えられる。 The result of the XOR between the output of the f function and the block data L1 is given to the third round conversion process as block data R2, and the block data R1 is given to the third round conversion process as block data L2.
以下、同様の変換処理が第16ラウンドまで実行され、この結果得られるブロックデータR16及びブロックデータL16が最後に逆転置されることで暗号文が出力される。 Thereafter, the same conversion process is executed until the 16th round, and the block data R16 and the block data L16 obtained as a result are finally inverted and the ciphertext is output.
このDESのアルゴリズムは公知であるので、例えば単純電力解析では、このアルゴリズムで暗号化を行う暗号回路の消費電力の変動を観測することにより容易にDESの16ラウンドの変換処理を実行しているタイミングを特定することができる。 Since this DES algorithm is known, for example, in simple power analysis, the timing at which 16-round conversion processing of DES is easily performed by observing fluctuations in power consumption of a cryptographic circuit that performs encryption using this algorithm. Can be specified.
すなわち図13に示すように、消費電力の増加する時間が16ラウンド分続く箇所が、DES演算を実行している箇所であると推定できる。特に第1ラウンド又は第16ラウンドが波形の立ち上がり又は立ち下がり部分であるので、発見し易い。 That is, as shown in FIG. 13, it can be estimated that the place where the time during which the power consumption increases continues for 16 rounds is the place where the DES calculation is executed. In particular, since the first round or the sixteenth round is the rising or falling part of the waveform, it is easy to find.
一方、差分電力解析では、初めに例えば第1ラウンド(又は第16ラウンド)に使われる副鍵K1(又はK16)のビットについて予想する。次に第1ラウンドの変換処理の結果として出力されるデータ(L1やR1等)の例えば1ビット目の値(「0」か「1」)について注目し、その値をもとに消費電力の測定データを分類(値が「0」のグループと「1」のグループとに分類)する。さらにそれぞれの分類において測定データの平均をとり、それらの差分をとる。そして予想した副鍵K1のビットが正しい場合には暗号演算時の消費電力の差分が大きくなること、そのビットが正しくない場合には差分が小さく目立たなくなることに注目して、副鍵K1を特定する。そしてこの副鍵K1をもとにDESの秘密鍵を特定する。 On the other hand, in the differential power analysis, first, for example, the bit of the subkey K1 (or K16) used in the first round (or the 16th round) is predicted. Next, pay attention to the value (“0” or “1”) of the first bit of the data (L1, R1, etc.) output as a result of the first round conversion process, and the power consumption based on that value The measurement data is classified (classified into a group having a value of “0” and a group having a value of “1”). Furthermore, the average of the measurement data is taken in each classification, and the difference between them is taken. If the predicted bit of the subkey K1 is correct, the difference in power consumption at the time of cryptographic operation will be large, and if the bit is not correct, the difference will be small and inconspicuous. To do. Then, the DES secret key is specified based on the subkey K1.
このようにDESの差分電力解析では、暗号回路の消費電力が暗号演算の結果として出力されるデータのハミング重みに比例することに着目して、その消費電力の差分を統計解析することにより、秘密鍵を特定するようになされている(例えば非特許文献1参照)。
上述のように従来の暗号回路では、電力解析攻撃により暗号の解読が困難ではなくなりつつあり、電力解析攻撃に対する耐性の向上が求められている。すなわち一段と解読が困難な暗号化処理を行う暗号回路の実現が求められている(以下、解読が困難である性質を解読困難性と呼ぶ)。 As described above, in the conventional encryption circuit, it is becoming difficult to decipher the cipher due to the power analysis attack, and improvement in resistance to the power analysis attack is demanded. That is, it is required to realize an encryption circuit that performs an encryption process that is more difficult to decipher (hereinafter, the property of being difficult to decipher is called difficulty of deciphering).
本発明は以上の点を考慮してなされたもので、暗号の解読困難性を一段と向上し得る暗号化装置及び半導体集積回路を提案しようとするものである。 The present invention has been made in consideration of the above points, and an object of the present invention is to propose an encryption device and a semiconductor integrated circuit that can further improve the difficulty of decryption of encryption.
かかる課題を解決するため本発明の暗号化装置及び半導体集積回路においては、入力データをもとに秘密鍵となる第1の鍵データを用いた暗号演算処理を繰り返し実行して暗号データを生成する暗号化手段と、第1の鍵データとは異なる第2の鍵データを用いた暗号演算処理を第1の鍵データを用いた暗号演算処理の繰り返し途中にランダムに挿入して暗号化手段に実行させる挿入手段とを設けるようにした。 In order to solve this problem, in the encryption device and the semiconductor integrated circuit according to the present invention, the cryptographic data is generated by repeatedly executing the cryptographic calculation process using the first key data serving as the secret key based on the input data. A cryptographic operation using encryption means and second key data different from the first key data is randomly inserted during the repetition of the cryptographic operation using the first key data and executed in the encryption means. Insertion means to be provided.
このように、秘密鍵となる第1の鍵データを用いた暗号演算処理の途中に当該第1の鍵データとは異なる第2の鍵データを用いた暗号演算処理をランダムに挿入して実行させることにより、第1の鍵データを用いた本来の暗号演算処理の実行タイミングを特定しにくくすることができるので、電力解析攻撃に対する耐性を向上することができる。 As described above, the cryptographic operation processing using the second key data different from the first key data is randomly inserted and executed during the cryptographic operation processing using the first key data serving as the secret key. As a result, it is possible to make it difficult to specify the execution timing of the original cryptographic operation processing using the first key data, and thus it is possible to improve resistance to power analysis attacks.
また本発明の暗号化装置及び半導体集積回路においては、入力データをもとに秘密鍵となる第1の鍵データを用いた第1の暗号演算を実行する第1の暗号演算手段と、第1の暗号演算手段による第1の暗号演算の結果として出力される出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、第1の暗号演算手段から出力される出力データをビット反転するビット反転手段と、ビット反転した出力データを用いて第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段とを設けるようにした。 In the encryption apparatus and the semiconductor integrated circuit according to the present invention, the first cryptographic operation means for executing the first cryptographic operation using the first key data serving as the secret key based on the input data, The second cryptographic operation means for executing the second cryptographic operation using the output data output as a result of the first cryptographic operation by the cryptographic operation means, and the output data output from the first cryptographic operation means Bit inversion means for bit inversion and third cipher operation means for executing a third cipher operation similar to the second cipher operation using the bit-inverted output data are provided.
このように、秘密鍵となる第1の鍵データに相関のある出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、この出力データをビット反転させたデータを用いて第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段とを設けたことにより、常に第2の暗号演算手段と第3の暗号演算手段とで互いにビットが反転したデータを用いて暗号演算を実行させることができるので、出力データの値に依らず暗号化装置内のハミング重みを一定にして暗号演算時の消費電力をほぼ一定にすることができる。 Thus, using the second cryptographic operation means for executing the second cryptographic operation using the output data correlated with the first key data serving as the secret key, and the data obtained by bit-inversion of the output data By providing the third cryptographic calculation means for executing the third cryptographic calculation similar to the second cryptographic calculation, the bits are always inverted between the second cryptographic calculation means and the third cryptographic calculation means. Since the cryptographic operation can be executed using the data, the Hamming weight in the encryption device can be made constant regardless of the value of the output data, and the power consumption during the cryptographic operation can be made almost constant.
本発明によれば、秘密鍵となる第1の鍵データを用いた暗号演算処理の途中に当該第1の鍵データとは異なる第2の鍵データを用いた暗号演算処理をランダムに挿入して実行させることにより、第1の鍵データを用いた本来の暗号演算処理の実行タイミングを特定しにくくすることができると共に、秘密鍵となる第1の鍵データに相関のある出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、この出力データをビット反転させたデータを用いて第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段とを設けたことにより、常に第2の暗号演算手段と第3の暗号演算手段とで互いにビットを反転させたデータを用いて暗号演算を実行させることができるので、出力データの値に依らず暗号化装置内のハミング重みを一定にして暗号演算時の消費電力をほぼ一定にすることができる。この結果、電力解析攻撃に対する耐性を向上することができ、かくして暗号の解読困難性を一段と向上し得る暗号化装置及び半導体集積回路を実現できる。 According to the present invention, a cryptographic operation process using second key data different from the first key data is randomly inserted during the cryptographic operation process using the first key data serving as a secret key. By executing this, it is possible to make it difficult to specify the execution timing of the original cryptographic operation processing using the first key data, and to use the output data correlated with the first key data serving as the secret key. A second cryptographic operation means for executing the second cryptographic operation, and a third cryptographic operation means for executing a third cryptographic operation similar to the second cryptographic operation using data obtained by bit-inversion of the output data. Since the encryption operation can always be executed by using the data whose bits are inverted by the second encryption operation means and the third encryption operation means, the encryption operation can be performed regardless of the value of the output data. Hamin in the composting device It can be made substantially constant power consumption during cryptographic operation by the weighting constant. As a result, it is possible to improve the resistance against the power analysis attack, and thus to realize an encryption device and a semiconductor integrated circuit that can further improve the difficulty of decrypting the code.
以下図面について、本発明の実施の形態を詳述する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(1)第1の実施の形態
(1−1)ICカードの回路構成
図1において、1は全体として本実施の形態における非接触型のICカードを示し、図示しないリーダライタと通信し得るようになされている。このICカード1は、全体を統括的に制御するCPU(Central Processing Unit)2、外部(リーダライタ)と非接触で通信するインタフェース部3、プログラムを格納するROM(Read Only Memory)4、一時作業領域となるRAM(Random Access Memory)5、各種データの暗号化を行う暗号回路6、各種データを記憶するEEPROM(Electrically Erasable and Programmable ROM)7が、バス8を介して接続されている。
(1) First Embodiment (1-1) Circuit Configuration of IC Card In FIG. 1,
このICカード1は、リーダライタから供給される電磁波をもとにインタフェース部3で電力を発生させて動作し、例えばリーダライタからEEPROM7に記憶しているデータを送信するよう要求されると、このデータを暗号回路6で暗号化して、リーダライタに送信するようになされている。
The
(1−2)暗号回路の構成
次に、ICカード1の内部に設けられた暗号回路6の構成について図2を用いて説明する。本実施の形態における暗号回路6は、DESのアルゴリズムを用いた暗号演算処理を実行する回路であり、DESのラウンドにおけるf関数及びXORの演算(以下、これをDES演算とも呼ぶ)を実行するDES演算部10と、各ラウンドのブロックデータLn及びRn(n=0、1、2、…、16)をそれぞれ保持するLレジスタ及びRレジスタ(図示せず)でなるデータレジスタ11と、DESの秘密鍵(副鍵)を保持する鍵レジスタ12と、DESの副鍵とは異なる鍵(以下、これをダミー鍵とも呼ぶ)を保持するダミー鍵レジスタ13と、第1及び第2セレクタ14及び15とで構成される。
(1-2) Configuration of Encryption Circuit Next, the configuration of the
なお、ここではDESの初期転置及び逆転置を実行する回路部分については省略している。つまり実際には、暗号化の対象となる入力データが図示しない初期転置部で初期転置されてブロックデータL0及びR0となり、このブロックデータL0及びR0がデータレジスタ11にラッチされる。そしてDESの16ラウンド終了後にラッチされるブロックデータL16及びR16がデータレジスタ11から図示しない逆転置部に送出されて逆転置され、最終的に暗号化データとなる。
Here, the circuit portion that performs the initial transposition and the reverse transposition of DES is omitted. That is, actually, input data to be encrypted is initially transposed by an initial transposition unit (not shown) to become block data L0 and R0, and the block data L0 and R0 are latched in the
本実施の形態の暗号回路6では、外部(例えばCPU2)から供給される1ビットの乱数の値(「0」か「1」)に応じて、DESの副鍵を用いたDES演算処理(以下、これを本DES演算と呼ぶ)、又はこの副鍵とは無関係のダミー鍵を用いたDES演算処理(以下、これをダミーDES演算と呼ぶ)のどちらか一方を選択して実行するようになされている。つまりこの暗号回路6では、暗号演算処理の途中にダミーDES演算を挿入するようになされており、以下この暗号回路6における暗号演算処理の流れについて説明する。
In the
暗号回路6は、CPU2からの命令に応じて暗号演算処理を開始すると、CPU2から供給される1ビットの乱数を第1セレクタ14及び第2セレクタ15に入力する。第1セレクタ14は、この乱数の値が「1」の場合、鍵レジスタ12に保持されているDESの副鍵を取得してこれをDES演算部10に送出し、乱数の値が「0」の場合、ダミー鍵レジスタ13に保持されているダミー鍵を取得してこれをDES演算部10に送出する。
When the
DES演算部10は、データレジスタ11から供給されるブロックデータL0及びR0をもとに、第1セレクタ14から供給される鍵(副鍵又はダミー鍵)を用いてDES演算(本DES演算又はダミーDES演算)を実行する。そしてDES演算部10は、DES演算の結果を第2セレクタ15及びダミー鍵レジスタ13に送出する。
The
第2セレクタ15は、入力される乱数の値が「1」の場合、DES演算部10から供給されるDES演算の結果を第1ラウンドのブロックデータL1及びR1としてデータレジスタ11にラッチさせ、この乱数の値が「0」の場合、データレジスタ11のブロックデータL0及びR0を再度このデータレジスタ11にラッチさせる。
When the input random number value is “1”, the
すなわちデータレジスタ11には、ダミーDES演算の演算結果はラッチされずに、本DES演算の演算結果のみがラッチされるようになされている。またダミー鍵レジスタ13に保持されるダミー鍵は、DES演算部10によるDES演算毎に、当該DES演算部10から供給される演算結果で更新するようになされている。
In other words, the operation result of the dummy DES operation is not latched in the data register 11, but only the operation result of the present DES operation is latched. The dummy key held in the dummy
このようにしてDES演算部10によるDES演算が終了すると、暗号回路6は再び乱数を取得して、この乱数の値に応じて本DES演算又はダミーDES演算を実行する。そしてこの暗号回路6は、データレジスタ11に出力データL16及びR16がラッチされるまで、すなわち本DES演算が16ラウンド実行されるまで上述の処理を繰り返す。
When the DES operation by the
ここで実際の例を用いて説明すると、例えば図3に示すように、暗号演算処理における1回目のDES演算では、入力される乱数の値が「0」であることによりダミーDES演算が実行され、2回目のDES演算では、乱数の値が「1」であることにより本DES演算の第1ラウンドが実行されてブロックデータL1及びR1がデータレジスタ11にラッチされ、3回目及び4回目のDES演算では、共に乱数の値が「0」であることによりダミーDES演算が実行され、5回目のDES演算では、乱数の値が「1」であることにより本DES演算の第2ラウンドが実行されてブロックデータL2及びR2がデータレジスタ11にラッチされるというように、本DES演算の16ラウンドの途中にランダムにダミーDES演算が挿入される。 Here, using an actual example, for example, as shown in FIG. 3, in the first DES operation in the cryptographic operation processing, the dummy DES operation is executed because the input random number value is “0”. In the second DES operation, since the random value is “1”, the first round of the DES operation is executed and the block data L1 and R1 are latched in the data register 11, and the third and fourth DES operations are performed. In the calculation, the dummy DES operation is executed when the random number value is “0”, and the second round of the DES operation is executed when the random number value is “1” in the fifth DES operation. Thus, dummy DES operations are randomly inserted in the middle of 16 rounds of this DES operation so that the block data L2 and R2 are latched in the data register 11.
また本DES演算及びダミーDES演算は、用いる鍵が異なるだけで実際の演算方法は同一であるので、図3に示すように、どちらのDES演算を実行しても暗号回路6の消費電力はほぼ等しくなる。
Since the actual calculation method is the same for the present DES calculation and the dummy DES calculation except for the key used, as shown in FIG. 3, the power consumption of the
このように、この暗号回路6では、本DES演算の16ラウンドの途中にランダムにダミーDES演算を挿入することにより、消費電力とDESの16ラウンドの実行タイミングとの関連性を従来と比して格段と小さくすることができる。
In this way, in this
(1−3)第1の実施の形態による動作及び効果
以上の構成において、暗号回路6は、DESの暗号演算処理時、外部から供給される1ビットの乱数の値が「0」である場合には、ダミー鍵を用いたダミーDES演算を実行し、この乱数の値が「1」である場合には、DESの副鍵を用いた本DES演算を実行する。
(1-3) Operation and Effect According to First Embodiment In the above configuration, the
そして、1回目のDES演算(ダミーDES演算又は本DES演算)終了後、再び乱数の値に応じてダミーDES演算又は本DES演算を実行し、以下、この処理を本DES演算が16ラウンド実行されるまで繰り返す。 Then, after the first DES operation (dummy DES operation or main DES operation) is completed, the dummy DES operation or main DES operation is executed again according to the value of the random number. Hereinafter, this process is performed for 16 rounds. Repeat until
このようにこの暗号回路6のDES暗号化処理では、16ラウンドの本DES演算の途中に当該本DES演算とは無関係のダミーDES演算をランダムに挿入するようにした。しかも本DES演算及びダミーDES演算の演算方法は同一であるので、暗号回路6における演算時の消費電力はどちらもほぼ同一であり、当該消費電力が観測されても、本DES演算を実行しているタイミングの特定が困難である。
As described above, in the DES encryption processing of the
かくして暗号回路6では、消費電力とDESの16ラウンドの実行タイミングとの関連性を従来よりも格段と小さくすることができるので、消費電力の観測からDESの16ラウンドの実行タイミングが特定されるのを防止することができる。
Thus, in the
以上の構成によれば、暗号回路6は、外部から供給される1ビットの乱数の値に応じて、16ラウンドの本DES演算の途中にダミーDES演算を実行することにより、消費電力とDESの16ラウンドの実行タイミングとの関連性を従来よりも格段と小さくして、消費電力の観測からDESの16ラウンドの実行タイミングが特定されるのを防止することができるので、電力解析攻撃(特に単純電力解析)への耐性を向上し得、暗号の解読困難性を一段と向上することができる。
According to the above configuration, the
(2)第2の実施の形態
次に、第2の実施の形態について説明する。この第2の実施の形態では、上述の第1の実施の形態と暗号回路6(本実施では6A)の構成以外は同様であり、同様部分の説明については省略する。
(2) Second Embodiment Next, a second embodiment will be described. The second embodiment is the same as the first embodiment except for the configuration of the encryption circuit 6 (6A in this embodiment), and the description of the same parts is omitted.
この第2の実施の形態における暗号回路6Aは、図1との対応部分に同一符号を付して示す図4のように、外部から供給される1ビットの乱数の値に応じてダミーDES演算の実行を制御するダミー制御部20が追加されている。
The encryption circuit 6A according to the second embodiment includes a dummy DES operation according to a 1-bit random number supplied from the outside, as shown in FIG. A
このダミー制御部20は、乱数が入力されると、その乱数の値が「1」である場合、この乱数と同じ値「1」の1ビットの出力データを後段の第1及び第2セレクタ14及び15に送出する。これに対して、入力される乱数の値が「0」である場合、前回第1及び第2セレクタ14及び15に送出した出力データの値が「1」であれば、この入力された乱数と同じ値「0」の出力データを第1及び第2セレクタ14及び15に送出し、前回第1及び第2セレクタ14及び15に送出した出力データの値が「0」であれば、この入力された乱数の値「0」と逆の値「1」の出力データを第1及び第2セレクタ14及び15に送出するようになされている。
When a random number is input, the
ここで実際の例を用いて説明すると、例えば図5に示すように、1回目のDES演算時に乱数「0」が入力されると、ダミー制御部20は、今回が初回のDES演算であり例えば前回第1及び第2セレクタ14及び15に送出した乱数が存在しないことから、入力された乱数と同じ値「0」の出力データを第1及び第2セレクタ14及び15に送出すると共に、この送出した出力データ「0」をラッチする。この結果DES演算部10では、第1の実施の形態と同様にダミーDES演算が実行される。
Here, using an actual example, for example, as shown in FIG. 5, when a random number “0” is input at the time of the first DES calculation, the
続く2回目のDES演算時に乱数「1」が入力されると、ダミー制御部20は、乱数の値が「1」であるので、この乱数と同じ値「1」の出力データを第1及び第2セレクタ14及び15に送出すると共に、この送出した出力データ「1」をラッチする。この結果DES演算部10では、第1の実施の形態と同様に本DES演算が実行される。
When the random number “1” is input during the subsequent second DES calculation, the
さらに続く3回目のDES演算時に乱数「0」が入力されると、ダミー制御部20は、ラッチしている出力データの値(すなわち前回第1及び第2セレクタ14及び15に送出した出力データの値)が「1」であるので、入力された乱数と同じ値「0」の出力データを第1及び第2セレクタ14及び15に送出すると共に、この送出した出力データ「0」をラッチする。この結果DES演算部10では、ダミーDES演算が実行される。
When a random number “0” is input during the subsequent third DES calculation, the
さらに続く4回目のDES演算時に乱数「0」が入力されると、ダミー制御部20は、ラッチしている出力データの値が「0」であるので、入力された乱数の値「0」と逆の値「1」の出力データを第1及び第2セレクタ14及び15に送出すると共に、この送出した出力データ「1」をラッチする。この結果DES演算部10では、ダミーDES演算が実行される。以下、同様にして5回目、6回目、…のDES演算が実行される。
When the random number “0” is input during the subsequent fourth DES calculation, the
このようにダミー制御部20では、入力される乱数の値に「0」が連続した場合に、ダミーDES演算が連続して実行されないように、入力される乱数の値「0」をビット反転した値「1」の出力データを第1及び第2セレクタ14及び15に送出するようになされている。
As described above, the
これによりこの暗号回路6Aにおいては、最長でもダミーDES演算と本DES演算とを交互に実行する32回のDES演算でDES演算処理を終了させることができる。かくしてこの暗号回路6Aによれば、本DES演算の実行タイミングが特定されるのを防止することができると共に、ダミーDES演算が連続して繰り返し実行されるのを防止することができ、DES演算の処理時間を最長でも16ラウンド×2の演算時間で終了することを保証できる。 Thereby, in the encryption circuit 6A, the DES operation process can be completed by 32 DES operations that alternately execute the dummy DES operation and the main DES operation at the longest. Thus, according to the encryption circuit 6A, it is possible to prevent the execution timing of the DES operation from being specified and to prevent the dummy DES operation from being repeatedly executed. It can be guaranteed that the processing time will end at the calculation time of 16 rounds × 2 at the longest.
このことは、処理時間に対して厳しい制約が求められる装置(例えば非接触型のICカード1やそのリーダライタ)に内蔵される暗号回路6Aにおいては特に重要である。
This is particularly important in the encryption circuit 6A incorporated in an apparatus (for example, the non-contact
(3)第3の実施の形態
次に、第3の実施の形態について説明する。この第3の実施の形態では、上述の第1の実施の形態と暗号回路6(本実施では6B)の構成以外は同様であり、同様部分の説明については省略する。
(3) Third Embodiment Next, a third embodiment will be described. The third embodiment is the same as the first embodiment except for the configuration of the encryption circuit 6 (6B in the present embodiment), and the description of the same parts is omitted.
この第3の実施の形態における暗号回路6Bは、図1との対応部分に同一符号を付して示す図6のように、DES演算回路10の演算結果が第2セレクタ15にだけ送出されるようになされており、ダミー鍵レジスタ13のダミー鍵がこの演算結果で更新されないようになされている。すなわちこの暗号回路6Bでは、ダミー鍵レジスタ13に固定値のダミー鍵が保持され、このダミー鍵でダミーDES演算を実行するようになされている。
In the
実際上、第1の実施の形態のようにダミー鍵をDES演算毎にランダムに変えると、暗号回路6の出力データを例えば何万件と集めて統計解析された場合、このダミー鍵が平均化されてノイズのようになりダミーの効果が薄くなることも考えられる。
Actually, if the dummy key is randomly changed for each DES operation as in the first embodiment, if the tens of thousands of output data of the
そこで、本実施の形態では、ダミー鍵にDESの副鍵とは無関係でかつ所定の偏りを持たせ続けるために、当該ダミー鍵を固定値にした。このほうが、出力データを例えば何万件と集めて統計解析された場合でも、ダミーの効果が持続し、電力差分攻撃の対策として効果的である場合も有り得る。 Therefore, in the present embodiment, the dummy key is set to a fixed value in order to keep the dummy key irrelevant to the DES subkey and keep a predetermined bias. For example, even when tens of thousands of output data are collected and statistically analyzed, the dummy effect is sustained, and it may be more effective as a countermeasure against a power differential attack.
なお、この固定値のダミー鍵は、外部から供給されるようにしてもよい。この場合ある一定の期間毎(例えば1ヶ月毎)にダミー鍵を更新するようにすれば、電力差分攻撃の対策としてより効果的である場合も有り得る。 The fixed value dummy key may be supplied from the outside. In this case, if the dummy key is updated every certain period (for example, every month), it may be more effective as a countermeasure against the power differential attack.
(4)第4の実施の形態
次に、第4の実施の形態について説明する。この第4の実施の形態では、上述の第2の実施の形態と暗号回路6A(本実施では6C)の構成以外は同様であり、同様部分の説明については省略する。
(4) Fourth Embodiment Next, a fourth embodiment will be described. The fourth embodiment is the same as the second embodiment except for the configuration of the encryption circuit 6A (6C in this embodiment), and the description of the same parts is omitted.
この第4の実施の形態における暗号回路6Cは、図4との対応部分に同一符号を付して示す図7のように、ダミー制御部20Aが設けられており、外部から供給されるnビットの乱数がダミー制御部20Aに入力され、このダミー制御部20Aが入力されるnビットの乱数の値に応じてダミーDES演算の実行を制御するようになされている。
The encryption circuit 6C according to the fourth embodiment is provided with a
ここでは、一例として「0」〜「15」までの値をランダムにとる4ビットの乱数が外部から供給されてダミー制御部20Aに入力される場合について説明する。
Here, as an example, a case will be described in which a 4-bit random number that randomly takes values from “0” to “15” is supplied from the outside and input to the
この暗号回路6Cでは、第1ラウンドの本DES演算の前、及び第16ラウンドの本DES演算の後に、入力される4ビットの乱数の値に応じてダミーDES演算を繰り返し実行するようになされている。 In the encryption circuit 6C, the dummy DES operation is repeatedly executed according to the value of a 4-bit random number inputted before the main DES operation of the first round and after the main DES operation of the 16th round. Yes.
つまり図8に示すように、暗号回路6Cのダミー制御部20Aは、1回目のDES演算時に、例えば値が「6」である乱数が入力されると、この乱数の値「6」に応じて、値が「0」である1ビットの出力データを6回連続で後段の第1及び第2セレクタ14及び15に送出する。この結果DES演算部10では、ダミーDES演算が6回連続で実行される。
That is, as shown in FIG. 8, when a random number having a value of “6”, for example, is input during the first DES calculation, the
このようにして乱数の値に応じて値「0」の出力データを送出した後、ダミー制御部20Aは、続いて値「1」の出力データを16回連続で第1及び第2セレクタ14及び15に送出する。この結果DES演算部10では、本DES演算が16ラウンドまで実行される。
After sending the output data of the value “0” according to the random number value in this way, the
次いで再度4ビットの乱数が入力されると、ダミー制御部20Aは、この入力された乱数の値(例えば「2」)に応じて、値が「0」である出力データを2回連続で第1及び第2セレクタ14及び15に送出する。この結果DES演算部10では、ダミーDES演算が2回連続で実行される。
Next, when a 4-bit random number is input again, the
このように、この暗号回路6Cでは、ダミーDES演算を6回実行した後、続けて16ラウンドの本DES演算を実行し、さらに続けてダミーDES演算を2回実行する。これにより暗号回路6Cでは、消費電力と本DES演算の16ラウンドの実行タイミングとの関連性を従来よりも格段と小さくすることができ、この結果消費電力の観測からDESの16ラウンドの実行タイミングが特定されるのを防止することができる。 As described above, in the cryptographic circuit 6C, after the dummy DES operation is performed six times, the 16-round main DES operation is subsequently performed, and then the dummy DES operation is performed twice. As a result, in the encryption circuit 6C, the relationship between the power consumption and the execution timing of the 16 rounds of the DES operation can be remarkably reduced as compared with the conventional case. It can be prevented from being specified.
因に、実際上攻撃者は本DES演算の第1ラウンド又は第16ラウンドのどちらかを攻撃対象とする場合が多い。その理由は、一般的に消費電力の立ち上がり部分又は立ち下がり部分と、第1ラウンド又は第16ラウンドの実行タイミングとが一致するからである。ゆえに攻撃者は、図9(A)に示すように、例えば消費電力の立ち上がりに注目し、このタイミングで第1ラウンドの本DES演算が実行されると予測して解析を行う。 Incidentally, in practice, an attacker often targets either the first round or the sixteenth round of the DES calculation as an attack target. This is because the rising or falling portion of power consumption generally matches the execution timing of the first round or the sixteenth round. Therefore, as shown in FIG. 9A, the attacker pays attention to the rise in power consumption, for example, and performs an analysis by predicting that the first DES operation of the first round will be executed at this timing.
そこで上述の第2の実施の形態の暗号回路6Aにおいては、図9(A)及び(B)に示すように、本DES演算の途中にランダムでダミーDES演算を挿入した。実際には、入力される1ビットの乱数の値が「0」である場合にだけダミーDES演算を実行し、さらにダミーDES演算が連続して実行されないように制御した。 Therefore, in the encryption circuit 6A of the second embodiment described above, a dummy DES operation is randomly inserted in the middle of the DES operation, as shown in FIGS. 9A and 9B. Actually, the dummy DES operation is executed only when the value of the input 1-bit random number is “0”, and the dummy DES operation is controlled not to be executed continuously.
この場合消費電力の立ち上がり部分で第1ラウンドの本DES演算が実行される確率は50%となり、必ずしも消費電力の立ち上がり部分で第1ラウンドの本DES演算が実行されるとは限らない。しかしながら、このようにしても例えば攻撃者により消費電力の立ち上がり部分のサンプル数をダミーDES演算が全く挿入されない場合の2倍にして統計解析されると、ダミーDES演算が挿入されない場合と同様の結果が得られ、比較的短時間で暗号が解読されてしまう恐れがある。 In this case, the probability that the first DES calculation of the first round is executed at the rising portion of the power consumption is 50%, and the first DES calculation of the first round is not necessarily executed at the rising portion of the power consumption. However, even if this is done, for example, if the statistical analysis is performed by doubling the number of samples at the rising portion of power consumption by the attacker when no dummy DES operation is inserted, the same result as when the dummy DES operation is not inserted is obtained. There is a risk that the code will be decrypted in a relatively short time.
そこで本実施の形態の暗号回路6Cのように、「0」〜「15」までの値をランダムにとる4ビットの乱数に応じてダミーDES演算を挿入するようにすれば、消費電力の立ち上がり部分で第1ラウンドの本DES演算が実行される確率は1/16となり、攻撃者は、消費電力の立ち上がり部分のサンプル数をダミーDES演算が挿入されない場合の16倍にして統計解析しなければならなくなり、ダミーDES演算挿入の効果が大きくなる。 Therefore, if a dummy DES operation is inserted according to a 4-bit random number that randomly takes a value from “0” to “15” as in the encryption circuit 6C of the present embodiment, the rising portion of the power consumption Therefore, the probability that the first DES operation in the first round is executed is 1/16, and the attacker must perform statistical analysis by multiplying the number of samples at the rising portion of power consumption by 16 times that when no dummy DES operation is inserted. This eliminates the effect of dummy DES operation insertion.
さらにこの暗号回路6Cでは、攻撃対象となる第1ラウンドの前及び第16ラウンドの後にだけダミーDES演算を挿入するようにしたことにより、第1ラウンド及び第16ラウンドの実行タイミングを特定させにくくすると共に、DES演算の処理時間が最長でも15ラウンド(ダミー)+16ラウンド(本)+15ラウンド(ダミー)の演算時間で終了することを保証できる。 Furthermore, in this cryptographic circuit 6C, the dummy DES operation is inserted only before the first round and the 16th round, which are attack targets, thereby making it difficult to specify the execution timing of the first round and the 16th round. At the same time, it can be guaranteed that the processing time of the DES calculation will end at the calculation time of 15 rounds (dummy) +16 rounds (main) +15 rounds (dummy).
かくしてこの暗号回路6Cによれば、攻撃対象となる第1ラウンド及び第16ラウンドの実行タイミングの特定を一段と困難にすることができるので暗号の解読困難性を一段と向上することができ、加えて暗号化処理が所定時間内で終了することを保証できる。 Thus, according to the encryption circuit 6C, it is possible to make it difficult to specify the execution timing of the first round and the 16th round, which are attack targets, so that it is possible to further improve the difficulty of decrypting the cipher. It can be assured that the process is completed within a predetermined time.
(5)第5の実施の形態
次に、第5の実施の形態について説明する。この第5の実施の形態では、上述の第1の実施の形態と暗号回路6(本実施では6D)の構成以外は同様であり、同様部分の説明については省略する。
(5) Fifth Embodiment Next, a fifth embodiment will be described. The fifth embodiment is the same as the first embodiment except for the configuration of the encryption circuit 6 (6D in this embodiment), and the description of the same parts is omitted.
本実施の形態の暗号回路6Dは、図2との対応部分に同一符号を付して示す図10のように、DPA対策が施されたDES演算部10Aを有している。このDES演算部10Aは、データレジスタ11のRレジスタ11Rから供給される32ビットのブロックデータRnと鍵レジスタ12から供給される48ビットの副鍵とを用いてDESのf関数に基づく演算を行うf関数部30と、このf関数部30から出力される32ビットの出力データfnとデータレジスタ11のLレジスタ11Lから供給される32ビットのブロックデータRnとのXOR演算を行う第1XOR部31と、後述するDPA対策回路32とで構成される。
The encryption circuit 6D according to the present embodiment includes a DES operation unit 10A in which DPA countermeasures are taken, as shown in FIG. The DES operation unit 10A performs an operation based on the f function of DES using the 32-bit block data Rn supplied from the R register 11R of the data register 11 and the 48-bit subkey supplied from the
そして、かかる構成のDES演算部10Aは、Rレジスタ11Rから供給されるブロックデータRnを、次ラウンドのブロックデータLn+1としてLレジスタ11Lに送出すると共に、第1XOR演算部31から出力される32ビットの出力データX1nを次ラウンドのブロックデータRn+1としてRレジスタ11Rに送出するようになされている。
Then, the DES operation unit 10A configured as described above sends the block data Rn supplied from the R register 11R to the L register 11L as block data Ln + 1 of the next round, and a 32-bit output from the first
なお、本実施の形態においては説明の便宜上、第1の実施の形態で述べたダミーDES演算の挿入に関する説明については省略するが、実際には、DES演算時にランダムでダミーDES演算を挿入するようにしてもよい。この場合、図10の暗号回路6Dに、第1及び第2セレクタ14及び15と、ダミー鍵レジスタ13とを追加すればよい。
In the present embodiment, for the sake of convenience of explanation, the description regarding the insertion of the dummy DES operation described in the first embodiment is omitted, but actually, the dummy DES operation is randomly inserted at the time of the DES operation. It may be. In this case, the first and
DPA対策回路32は、f関数部30の出力データfnをビット反転するインバータ33と、このビット反転された出力データfn(以下、これをビット反転データrfnとも呼ぶ)とLレジスタ11Lから供給されるブロックデータLnとのXOR演算を行う第2XOR部34と、当該第2XOR部34から出力される32ビットの出力データX2nを4ビットずつに分けて終端処理する8個のNAND回路(否定論理和回路)でなる終端処理部35とで構成される。
The
つまりf関数部30から出力される32ビットの出力データfnは、第1XOR部31とDPA対策回路32のインバータ33とに送出され、このうちインバータ33に供給された出力データfnは、当該インバータ33でビット反転されることによりビット反転データrfnとなり、第2XOR部34に送出される。
That is, the 32-bit output data fn output from the
そして第1XOR部31において、f関数部30の出力データfnとブロックデータLnとを用いたXOR演算が行れ、ほぼ同時にDPA対策回路32の第2XOR部34において、f関数部30の出力データfnをビット反転したビット反転データrfnとブロックデータLnとを用いたXOR演算が行れる。
Then, the
ところで、攻撃者は先に述べたように、回路の消費電力が、鍵を用いた暗号演算の結果として出力されるデータのハミング重みに比例することに着目して、そのデータのあるビット値が「0」のときと「1」のときとで消費電力の測定データを分類し、その差分を統計解析することによりDESの鍵を特定しようとする。 By the way, as described above, the attacker pays attention to the fact that the power consumption of the circuit is proportional to the Hamming weight of the data output as a result of the cryptographic operation using the key. The power consumption measurement data is classified according to “0” and “1”, and a DES key is specified by statistically analyzing the difference.
そこでかかる暗号回路6Dにおいては、例えばf関数部30の出力データfnのあるビット値が「0」である場合には、DPA対策回路32のインバータ33によりこのビット値を「1」に反転させ、f関数部30の出力データfnのあるビット値が「1」である場合には、当該インバータ33によりこのビット値を「0」に反転させ、後段の第1XOR部31と第2XOR部34とで、互いにビット値(「0」か「1」)が反転したデータに対して演算を行うようにした。
Therefore, in the encryption circuit 6D, for example, when a bit value of the output data fn of the
すなわちこのDES演算部10A内には、互いにビット値が反転したデータを処理する回路部分が対に設けられていることにより回路内のハミング重みを常に一定にすることができ、この結果、DES暗号演算時の消費電力をほぼ一定(すなわちf関数部30の出力データfnのあるビット値が「1」である場合も「0」である場合も暗号回路6Dにおける消費電力をほぼ一定)にすることができる。
That is, the DES operation unit 10A is provided with a pair of circuit portions for processing data with inverted bit values, so that the hamming weight in the circuit can always be kept constant. The power consumption at the time of calculation is made substantially constant (that is, the power consumption in the encryption circuit 6D is almost constant regardless of whether the bit value of the output data fn of the
これによりこの暗号回路6Dにおいては、DESの鍵に依存する出力データfnの値に依らずハミング重みを一定にすることができるので、鍵と消費電力との相関を従来と比して格段と小さくすることができる。 As a result, in this encryption circuit 6D, the Hamming weight can be made constant regardless of the value of the output data fn depending on the DES key, so that the correlation between the key and the power consumption is much smaller than in the conventional case. can do.
ゆえに攻撃者がいくら暗号回路6Dにおける消費電力の差分を統計解析しても、この差分が常にほぼ0であるために、秘密鍵を特定することができない。 Therefore, no matter how much the attacker performs the statistical analysis of the difference in power consumption in the cryptographic circuit 6D, the difference is always almost zero, so the secret key cannot be specified.
かくしてこの暗号回路6Dによれば、第1XOR部31でf関数部30の出力データfnを用いたXOR演算を実行すると共に、この出力データfnをインバータ33でビット反転してビット反転データrfnとし、第2XOR部34でこのビット反転データrfnを用いてXOR演算を実行するようにしたことにより、出力データfnの値に依らず暗号化装置内のハミング重みを一定にして暗号演算時の消費電力をほぼ一定にすることができる。この結果、この暗号回路6Dにおいては、電力解析攻撃(特に差分電力解析)に対する耐性を向上することができ、かくして暗号の解読困難性を一段と向上することができる。
Thus, according to the encryption circuit 6D, the XOR operation using the output data fn of the
(6)第6の実施の形態
次に、第6の実施の形態について説明する。この第6の実施の形態では、上述の第5の実施の形態と暗号回路6D(本実施では6E)の構成以外は同様であり、同様部分の説明については省略する。
(6) Sixth Embodiment Next, a sixth embodiment will be described. The sixth embodiment is the same as the fifth embodiment except for the configuration of the encryption circuit 6D (6E in this embodiment), and the description of the same parts is omitted.
この第6の実施の形態における暗号回路6Eは、図10との対応部分に同一符号を付して示す図11のように、DPA対策回路32Aを実装したDES演算部10Bを有している。このDPA対策回路32Aには、データレジスタ11(Rレジスタ11R及びLレジスタ11L)と対になるDPA対策用データレジスタ40(R’レジスタ40R及びL’レジスタ40L)とインバータ41とが新たに設けられ、このうちDPA対策用データレジスタ40のR’レジスタ40Rが、第5の実施の形態における終端処理部35の代わりとなる。
The encryption circuit 6E according to the sixth embodiment has a DES operation unit 10B on which a DPA countermeasure circuit 32A is mounted, as shown in FIG. The DPA countermeasure circuit 32A is newly provided with a DPA countermeasure data register 40 (R ′
そしてこの暗号回路6Eでは、Rレジスタ11Rから供給されるブロックデータRnをLレジスタ11Lに送出して次ラウンドのブロックデータLn+1としてラッチさせると共に、このブロックデータRnをDPA対策回路32Aのインバータ41にも送出してビット反転させてからL’レジスタ40Lにラッチさせる。
In the encryption circuit 6E, the block data Rn supplied from the R register 11R is sent to the L register 11L to be latched as block data Ln + 1 of the next round, and this block data Rn is also sent to the inverter 41 of the DPA countermeasure circuit 32A. The bit is inverted and the bit is inverted, and then latched in the L ′
またこの暗号回路6Eでは、第1XOR演算部31の出力データX1nを次ラウンドのブロックデータRn+1としてRレジスタ11Rにラッチさせると共に、第2XOR部34の出力データX2nをR’レジスタ40Rにラッチさせるようになされている。
In the encryption circuit 6E, the output data X1n of the first
すなわちDPA対策回路32A内にRレジスタ11R及びLレジスタ11Lと同様の役割をするR’レジスタ40R及びL’レジスタ40Lを設けて、このR’レジスタ40R及びL’レジスタ40LとRレジスタ11R及びLレジスタ11Lとに互いにビット値が反転したデータをラッチさせるようにした。
That is, an R ′
このようにこの暗号回路6Eでは、ビット値が反転したデータを処理する対の回路部分の構成を同一にすることで、暗号回路6Eにおけるビット値に関連する消費電力の差分を一段と小さくすることができ、この結果電力解析攻撃(特に差分電力解析)に対する耐性を向上することができるので、暗号の解読困難性を一段と向上することができる。 In this way, in this encryption circuit 6E, the difference in power consumption related to the bit value in the encryption circuit 6E can be further reduced by making the configuration of the pair of circuit portions that process data with inverted bit values the same. As a result, resistance against power analysis attacks (particularly, differential power analysis) can be improved, so that it is possible to further improve the difficulty of decrypting the code.
(7)他の実施の形態
なお上述の実施の形態においては、暗号回路6、6A、6B、6C、6D、及び6Eに用いる暗号化技術として、DESを用いるようにした場合について述べたが、本発明はこれに限らず、トリプルDESや、AES(Advanced Encryption Standard)、IDEA(International Data Encryption Algorithm)、RC(Ron's Code)2、RC4、RC5等、この他種々の暗号化技術を用いるようにしてもよい。
(7) Other Embodiments In the above-described embodiment, the case where DES is used as the encryption technique used in the
また上述の実施の形態においては、暗号回路6、6A、6B、6C、6D、及び6Eの構成として、図2、図4、図6、図7、図10、及び図11に示す構成を開示したが、本発明はこれに限らず、実際上これら暗号回路6、6A、6B、6C、6D、及び6Eと同様の機能を実現できる構成であれば、ソフトウェア、あるいはハードウェア(例えばIC(integrated circuit)チップ)、さらにこれらの組合せ等により実現してもよい。
In the above-described embodiments, the configurations shown in FIGS. 2, 4, 6, 7, 10, and 11 are disclosed as the configurations of the
さらに上述の実施の形態においては、ICカード1に搭載された暗号回路6に本発明を適用するようにした場合について述べたが、本発明はこれに限らず、暗号演算を行う種々の装置(例えばICカード1のリーダライタや、携帯電話機、ノートブック型パーソナルコンピュータ等)や回路、半導体集積回路としてのICチップ等に適用するようにしてもよい。
Furthermore, in the above-described embodiment, the case where the present invention is applied to the
さらに上述の第1乃至第4の実施の形態においては、外部から供給される乱数の値に応じて、DES演算(本DES演算又はダミーDES演算)を実行するようにした場合について述べたが、本発明はこれに限らず、例えば暗号回路内に乱数生成部を設け、この乱数生成部で生成した乱数の値に応じて、DES演算を実行するようにしてもよい。このように暗号回路内で乱数を生成するようにすれば、外部から供給される場合よりも乱数の改竄等の危険性を低減することもできる。 Further, in the first to fourth embodiments described above, the case where the DES operation (the present DES operation or the dummy DES operation) is executed according to the value of the random number supplied from the outside has been described. The present invention is not limited to this. For example, a random number generation unit may be provided in the encryption circuit, and the DES calculation may be executed according to the value of the random number generated by the random number generation unit. If the random number is generated in the encryption circuit in this way, the risk of falsification of the random number can be reduced as compared with the case where the random number is supplied from the outside.
さらに上述の第6の実施の形態においては、DPA対策回路32A内に第1の保持手段としてのデータレジスタ11と対になる第2の保持手段としてのDPA対策用データレジスタ40を設けた場合について述べたが、本発明はこれに限らず、例えばDPA対策用データレジスタ40のL’レジスタ40L及びインバータ41を省略する構成にしてもよい。
Further, in the above-described sixth embodiment, the DPA countermeasure data register 40 as the second holding means paired with the data register 11 as the first holding means is provided in the DPA countermeasure circuit 32A. As described above, the present invention is not limited to this. For example, the L ′
さらに上述の第1乃至第4の実施の形態においては、第1の鍵データとしてのDESの副鍵や第2の鍵データとしてのダミー鍵を用いてDESアルゴリズムに基づく暗号演算処理を実行する暗号演算手段としてのDES演算部10、10A及び10Bや、挿入手段としてのダミー鍵レジスタ13及び第1セレクタ14とにより暗号化装置及び半導体集積回路としての暗号回路6、6A、6B、6Cを構成するようにした場合について述べたが、本発明はこれに限らず、この他種々の構成を用いるようにしてもよい。
Further, in the first to fourth embodiments described above, a cipher that performs cryptographic operation processing based on the DES algorithm using a DES subkey as the first key data and a dummy key as the second key data. The
さらに上述の第5及び第6の実施の形態においては、第1の暗号演算としてのf関数に基づく演算を実行する第1の暗号演算手段としてのf関数部30や、このf関数部30の出力データfnを用いて第2の暗号演算としてのXOR演算を実行する第2の暗号演算手段としての第1XOR部31や、f関数部30の出力データfnをビット反転するインバータ33や、ビット反転データrfnを用いて第3の暗号演算としてのXOR演算を実行する第3の暗号演算手段としての第2XOR部34により暗号化装置及び半導体集積回路としての暗号回路6D及び6Eを構成するようにした場合について述べたが、本発明はこれに限らず、この他種々の構成を用いるようにしてもよい。
Further, in the fifth and sixth embodiments described above, the
本発明は、暗号演算を実行する装置、回路及びICチップ等において広く利用できる。 The present invention can be widely used in apparatuses, circuits, IC chips and the like that execute cryptographic operations.
1……ICカード、2……CPU、3……インタフェース部、4……ROM、6、6A、6B、6C、6D、6E……暗号回路、7……EEPROM、11……データレジスタ、11L、40L……Lレジスタ、11R、40R……Rレジスタ、12……鍵レジスタ、13……ダミー鍵レジスタ、14……第1セレクタ、15……第2セレクタ、20、20A……ダミー制御部、生成部、30……f関数部、31……第1XOR部、32、32A……DPA対策回路、33、41……インバータ、34……第2XOR部、40……DPA対策用データレジスタ。
DESCRIPTION OF
Claims (16)
上記第1の鍵データとは異なる第2の鍵データを用いた暗号演算処理を上記第1の鍵データを用いた暗号演算処理の繰り返し途中にランダムに挿入して上記暗号化手段に実行させる挿入手段と
を具えることを特徴とする暗号化装置。 Encryption means for repeatedly generating cryptographic data by repeatedly executing cryptographic calculation processing using first key data serving as a secret key based on input data;
Insertion in which encryption operation using second key data different from the first key data is randomly inserted during the repetition of encryption operation using the first key data and executed by the encryption means An encryption device comprising: means.
上記第2の鍵データを用いた暗号演算処理を繰り返し連続で挿入しないように当該第2の鍵データを用いた暗号演算処理の挿入を制御する
ことを特徴とする請求項1に記載の暗号化装置。 The insertion means is
2. The encryption according to claim 1, wherein insertion of the cryptographic operation processing using the second key data is controlled so as not to repeatedly and repeatedly insert the cryptographic operation processing using the second key data. apparatus.
上記暗号化手段が実行する暗号演算処理の結果で上記第2の鍵データを更新する
ことを特徴とする請求項1に記載の暗号化装置。 The insertion means is
The encryption apparatus according to claim 1, wherein the second key data is updated with a result of a cryptographic operation process executed by the encryption means.
ことを特徴とする請求項1に記載の暗号化装置。 The encryption apparatus according to claim 1, wherein the second key data is a fixed value.
上記第1の鍵を用いた暗号演算処理が上記暗号化手段により繰り返し実行される前、及び繰り返し実行された後に上記第2の鍵データを用いた暗号演算処理をランダムに挿入して実行させる
ことを特徴とする請求項1に記載の暗号化装置。 The insertion means is
Randomly inserting and executing a cryptographic calculation process using the second key data before and after the cryptographic calculation process using the first key is repeatedly executed by the encryption unit. The encryption device according to claim 1.
上記第1の鍵データを用いた第1の暗号演算を実行する第1の暗号演算手段と、
上記第1の暗号演算手段による第1の暗号演算の結果として出力される出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、
上記第1の暗号演算手段による第1の暗号演算の結果として出力される出力データをビット反転するビット反転手段と、
ビット反転した上記出力データを用いて上記第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段とを有する
ことを特徴とする請求項1に記載の暗号化装置。 The cryptographic operation means is
First cryptographic operation means for executing a first cryptographic operation using the first key data;
Second cryptographic operation means for executing a second cryptographic operation using output data output as a result of the first cryptographic operation by the first cryptographic operation means;
Bit inversion means for bit-inverting the output data output as a result of the first encryption operation by the first encryption operation means;
2. The encryption apparatus according to claim 1, further comprising a third cryptographic operation unit that performs a third cryptographic operation similar to the second cryptographic operation using the output data that has been bit-inverted.
上記第3の暗号演算手段による第3の暗号演算の結果を保持する第2の保持手段と
を具えることを特徴とする請求項1に記載の暗号化装置。 First holding means for holding a result of the second cryptographic calculation by the second cryptographic calculation means;
The encryption apparatus according to claim 1, further comprising: a second holding unit that holds a result of the third cryptographic calculation by the third cryptographic calculation unit.
上記第1の暗号演算手段による第1の暗号演算の結果として出力される出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、
上記第1の暗号演算手段から出力される上記出力データをビット反転するビット反転手段と、
ビット反転した上記出力データを用いて上記第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段と
を具えることを特徴とする暗号化装置。 First cryptographic operation means for executing a first cryptographic operation using first key data serving as a secret key based on input data;
Second cryptographic operation means for executing a second cryptographic operation using output data output as a result of the first cryptographic operation by the first cryptographic operation means;
Bit inversion means for bit-inverting the output data output from the first cryptographic operation means;
And a third cryptographic operation means for performing a third cryptographic operation similar to the second cryptographic operation using the output data bit-inverted.
上記第3の暗号演算手段による第3の暗号演算の結果を保持する第2の保持手段と
を具えることを特徴とする請求項8に記載の暗号化装置。 First holding means for holding a result of the second cryptographic calculation by the second cryptographic calculation means;
The encryption apparatus according to claim 8, further comprising: a second holding unit that holds a result of the third cryptographic calculation by the third cryptographic calculation unit.
ことを特徴とする請求項8に記載の暗号化装置。 The first encryption operation using the first key data, the second encryption operation, the third encryption operation means, the second encryption operation means, and the third encryption operation means. During the repeated execution of the cryptographic calculation process consisting of the first cryptographic calculation, the first cryptographic calculation using the second key data different from the first key data, the second cryptographic calculation, and the second An insertion means for randomly inserting a cryptographic calculation process comprising three cryptographic calculations and causing the first cryptographic calculation means, the second cryptographic calculation means, and the third cryptographic calculation means to execute. 9. The encryption device according to claim 8, wherein
上記第2の鍵データを用いた第1の暗号演算と上記第2の暗号演算と上記第3の暗号演算とからなる暗号演算処理を繰り返し連続で挿入しないように当該暗号演算処理の挿入を制御する
ことを特徴とする請求項8に記載の暗号化装置。 The insertion means is
Controls insertion of the cryptographic operation processing so that the cryptographic operation processing including the first cryptographic operation using the second key data, the second cryptographic operation, and the third cryptographic operation is not repeatedly repeated. The encryption device according to claim 8, wherein:
上記第1の暗号演算手段と上記第2の暗号演算手段と上記第3の暗号演算手段とが実行する暗号演算処理の結果で上記第2の鍵データを更新する
ことを特徴とする請求項8に記載の暗号化装置。 The insertion means is
9. The second key data is updated with a result of cryptographic calculation processing executed by the first cryptographic calculation means, the second cryptographic calculation means, and the third cryptographic calculation means. The encryption device described in 1.
ことを特徴とする請求項8に記載の暗号化装置。 The encryption apparatus according to claim 8, wherein the second key data is a fixed value.
上記第1の暗号演算手段と上記第2の暗号演算手段と上記第3の暗号演算手段とにより上記第1の鍵データを用いた第1の暗号演算と上記第2の暗号演算と上記第3の暗号演算とからなる暗号演算処理が繰り返し実行される前、及び繰り返し実行された後に上記第2の鍵データを用いた第1の暗号演算と上記第2の暗号演算と上記第3の暗号演算とからなる暗号演算処理をランダムに挿入して実行させる
ことを特徴とする請求項8に記載の暗号化装置。 The insertion means is
The first encryption operation using the first key data, the second encryption operation, the third encryption operation means, the second encryption operation means, and the third encryption operation means. The first cryptographic operation, the second cryptographic operation, and the third cryptographic operation using the second key data before and after the cryptographic operation processing including the cryptographic operation is repeatedly executed. The encryption apparatus according to claim 8, wherein the cryptographic operation processing comprising:
上記第1の鍵データとは異なる第2の鍵データを用いた暗号演算処理を上記第1の鍵データを用いた暗号演算処理の繰り返し途中にランダムに挿入して上記暗号化手段に実行させる挿入手段と
を具えることを特徴とする半導体集積回路。 Encryption means for repeatedly generating cryptographic data by repeatedly executing cryptographic calculation processing using first key data serving as a secret key based on input data;
Insertion in which encryption operation using second key data different from the first key data is randomly inserted during the repetition of encryption operation using the first key data and executed by the encryption means A semiconductor integrated circuit comprising: means.
上記第1の暗号演算手段による第1の暗号演算の結果として出力される出力データを用いて第2の暗号演算を実行する第2の暗号演算手段と、
上記第1の暗号演算手段から出力される上記出力データをビット反転するビット反転手段と、
ビット反転した上記出力データを用いて上記第2の暗号演算と同様の第3の暗号演算を実行する第3の暗号演算手段と
を具えることを特徴とする半導体集積回路。
First cryptographic operation means for executing a first cryptographic operation using first key data serving as a secret key based on input data;
Second cryptographic operation means for executing a second cryptographic operation using output data output as a result of the first cryptographic operation by the first cryptographic operation means;
Bit inversion means for bit-inverting the output data output from the first cryptographic operation means;
And a third cryptographic operation means for executing a third cryptographic operation similar to the second cryptographic operation using the output data bit-inverted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004203806A JP2006025366A (en) | 2004-07-09 | 2004-07-09 | Encryption apparatus and semiconductor integrated circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004203806A JP2006025366A (en) | 2004-07-09 | 2004-07-09 | Encryption apparatus and semiconductor integrated circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006025366A true JP2006025366A (en) | 2006-01-26 |
Family
ID=35798280
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004203806A Pending JP2006025366A (en) | 2004-07-09 | 2004-07-09 | Encryption apparatus and semiconductor integrated circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006025366A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006054568A (en) * | 2004-08-10 | 2006-02-23 | Sony Corp | Encryption apparatus, decryption apparatus and method, and computer program |
JP2008259163A (en) * | 2007-04-04 | 2008-10-23 | Cyberlink Corp | Systems and method for hardware driven program execution |
JP2010501895A (en) * | 2006-08-24 | 2010-01-21 | エルエスアイ コーポレーション | Dual mode AES implementation supporting single and multiple AES operations |
JP2010219666A (en) * | 2009-03-13 | 2010-09-30 | Sony Corp | Encryption processing apparatus |
WO2013190782A1 (en) * | 2012-06-22 | 2013-12-27 | 日本電気株式会社 | Encryption processing circuit and decryption processing circuit |
KR20190042423A (en) * | 2017-10-16 | 2019-04-24 | 삼성전자주식회사 | Encryption device and operation method thereof |
WO2019146198A1 (en) | 2018-01-23 | 2019-08-01 | パナソニック株式会社 | Nonvolatile memory device and method of writing thereto |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60142645A (en) * | 1983-12-28 | 1985-07-27 | Mitsubishi Electric Corp | Transmission line encoding circuit |
JP2000165375A (en) * | 1998-11-30 | 2000-06-16 | Hitachi Ltd | Information processor and ic card |
JP2002526797A (en) * | 1998-09-30 | 2002-08-20 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Data processing device for preventing differential current consumption analysis and method of operating this device |
JP2002311826A (en) * | 2001-04-16 | 2002-10-25 | Hitachi Ltd | Encoding and decoding device, method for encoding and decoding, data enciphering method and ic card |
JP2003018143A (en) * | 2001-06-28 | 2003-01-17 | Mitsubishi Electric Corp | Information processor |
JP2004125891A (en) * | 2002-09-30 | 2004-04-22 | Renesas Technology Corp | Power remainder computer |
JP2004153460A (en) * | 2002-10-29 | 2004-05-27 | Mitsubishi Electric Corp | Secure apparatus, secure method, and secure program |
-
2004
- 2004-07-09 JP JP2004203806A patent/JP2006025366A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60142645A (en) * | 1983-12-28 | 1985-07-27 | Mitsubishi Electric Corp | Transmission line encoding circuit |
JP2002526797A (en) * | 1998-09-30 | 2002-08-20 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Data processing device for preventing differential current consumption analysis and method of operating this device |
JP2000165375A (en) * | 1998-11-30 | 2000-06-16 | Hitachi Ltd | Information processor and ic card |
JP2002311826A (en) * | 2001-04-16 | 2002-10-25 | Hitachi Ltd | Encoding and decoding device, method for encoding and decoding, data enciphering method and ic card |
JP2003018143A (en) * | 2001-06-28 | 2003-01-17 | Mitsubishi Electric Corp | Information processor |
JP2004125891A (en) * | 2002-09-30 | 2004-04-22 | Renesas Technology Corp | Power remainder computer |
JP2004153460A (en) * | 2002-10-29 | 2004-05-27 | Mitsubishi Electric Corp | Secure apparatus, secure method, and secure program |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006054568A (en) * | 2004-08-10 | 2006-02-23 | Sony Corp | Encryption apparatus, decryption apparatus and method, and computer program |
JP2010501895A (en) * | 2006-08-24 | 2010-01-21 | エルエスアイ コーポレーション | Dual mode AES implementation supporting single and multiple AES operations |
JP2008259163A (en) * | 2007-04-04 | 2008-10-23 | Cyberlink Corp | Systems and method for hardware driven program execution |
JP2010219666A (en) * | 2009-03-13 | 2010-09-30 | Sony Corp | Encryption processing apparatus |
WO2013190782A1 (en) * | 2012-06-22 | 2013-12-27 | 日本電気株式会社 | Encryption processing circuit and decryption processing circuit |
KR20190042423A (en) * | 2017-10-16 | 2019-04-24 | 삼성전자주식회사 | Encryption device and operation method thereof |
KR102559583B1 (en) * | 2017-10-16 | 2023-07-26 | 삼성전자주식회사 | Encryption device and operation method thereof |
WO2019146198A1 (en) | 2018-01-23 | 2019-08-01 | パナソニック株式会社 | Nonvolatile memory device and method of writing thereto |
US11195582B2 (en) | 2018-01-23 | 2021-12-07 | Nuvoton Technology Corporation Japan | Non-volatile memory device and method of writing to non-volatile memory device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1873671B2 (en) | A method for protecting IC Cards against power analysis attacks | |
CN104468089B (en) | Data protecting device and its method | |
JP4596686B2 (en) | Secure encryption against DPA | |
KR100594265B1 (en) | A cipher processing unit, an advanced encryption standard cipher system and an advanced encryption standard cipher method with masking method | |
US7659837B2 (en) | Operation processing apparatus, operation processing control method, and computer program | |
CN101006677B (en) | Method and device for carrying out a cryptographic calculation | |
KR20180002069A (en) | A protection method and device against a side-channel analysis | |
US10210776B2 (en) | DPA protection of a rijndael algorithm | |
JP2005510095A (en) | Apparatus and method for reducing information leakage | |
US10243728B2 (en) | Verification of the resistance of an electronic circuit to side-channel attacks | |
US10187198B2 (en) | Protection of a rijndael algorithm | |
CN112906070B (en) | Integrated circuit and IoT devices with block cipher side channel attack mitigation and related methods | |
RU2579990C2 (en) | Protection from passive sniffing | |
KR20180110550A (en) | Method and apparatus for white-box cryptography for protecting against side channel analysis | |
Anwar et al. | Comparative study of cryptography algorithms and its’ applications | |
US20060153372A1 (en) | Smart card and method protecting secret key | |
EP1646174A1 (en) | Method and apparatus for generating cryptographic sets of instructions automatically and code generation | |
JP2017195595A (en) | Encryption/decoding device and method of protecting power analysis | |
Ratnadewi et al. | Implementation and performance analysis of AES-128 cryptography method in an NFC-based communication system | |
Wu et al. | Resynchronization Attacks on WG and LEX | |
KR20100079060A (en) | Method for encrypting with seed applying mask | |
JP2005134478A (en) | Encryption processing device, encryption processing method, and computer program | |
JP2006025366A (en) | Encryption apparatus and semiconductor integrated circuit | |
JP2005031471A (en) | Encryption processing device and encryption processing method | |
Oku et al. | A robust scan-based side-channel attack method against HMAC-SHA-256 circuits |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070606 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100722 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100909 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101111 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110303 |