JP3708910B2 - Register circuit and cryptographic operation circuit using the same - Google Patents
Register circuit and cryptographic operation circuit using the same Download PDFInfo
- Publication number
- JP3708910B2 JP3708910B2 JP2002191196A JP2002191196A JP3708910B2 JP 3708910 B2 JP3708910 B2 JP 3708910B2 JP 2002191196 A JP2002191196 A JP 2002191196A JP 2002191196 A JP2002191196 A JP 2002191196A JP 3708910 B2 JP3708910 B2 JP 3708910B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- line
- circuit
- register
- control signal
- 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.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、レジスタ回路及び該レジスタ回路を用いて電力解析攻撃に対して耐性を持たせた暗号演算回路に関する。
【0002】
【従来の技術】
暗号演算回路に納められている秘密情報を取り出す攻撃の一つとして、電力解析攻撃(DPA: Differential Power Analysis)が知られている。DPAとは、暗号演算回路の演算処理中における消費電力の変動を観測し、その消費電力パターンから演算処理の内容を推測することにより、暗号演算回路に納められている秘密情報を取り出すことをいう。より具体的には、DPAでは複数の入力データを暗号演算回路に入力して、それぞれの場合の消費電力の変動を示すグラフ(消費電力グラフ)を作成する。入力データに対する消費電力グラフの特徴から、暗号演算回路内部にある秘密情報の推測を行う。推測した秘密情報と消費電力グラフには相関があり、推定した値が正しい場合には大きな相関値が表れ、推定が間違っている場合には相関値は小さなものとなる。この原理より、DPAを用いて暗号演算回路内部の秘密情報を取り出すことができる。
【0003】
消費電力グラフと秘密情報とが相関を持つ理由の一つは、CMOS(Complementary Metal-Oxide Semiconductor)の特徴に依存するところが大きい。CMOSデバイスを用いて演算回路を製作した場合、CMOSデバイスの特性から、信号線の電位が遷移するときに演算回路は大きな電力を消費する。このようなCMOSデバイスの特性のため、演算回路の内部において電位が遷移する信号線の数が入力データに依存して変動することにより、演算回路の消費電力が変動する。
【0004】
より具体的には、例えば暗号演算回路内部においてある入力データm1を処理するときに電位が遷移する信号線の数と、他の入力データm2を処理するときに電位が遷移する信号線の数が異なる場合、入力データm1及び入力データm2をそれぞれ処理しているときの消費電力グラフPG1及びPG2に差が出る。この消費電力グラフPG1,PG2の差が暗号演算回路内部に格納されている秘密情報と関係しているような場合、この暗号演算回路に対してDPAを行うことにより、内部にある秘密情報を特定できてしまう。
【0005】
特開2001−268071には、DPAに対する耐性(耐タンパー性)を持たせるため、暗号演算回路に再コンフィグレーション可能な演算回路を用い、この演算回路を機能的に同一で内部動作が異なる回路に構成させるための複数のコンフィグレーションデータを保持し、これらのコンフィグレーションデータを選択的に演算回路に書き込んで回路構成の更新を行うことにより、消費電力パターンから内部の秘密情報を特定しにくくする技術が開示されている。
【0006】
しかし、再コンフィグレーションが可能なFPGA/PLDのような演算回路は、一般的にハードウェア規模が大きく、暗号演算回路のコストが高くなってしまう。また、コンフィグレーションデータによって暗号演算回路の回路構成を更新しても、演算回路内部の秘密情報に依存して消費電力パターンが変化することに変わりはない。従って、この暗号演算回路は、消費電力パターンの詳細な解析を重ねることで内部の秘密情報を特定することは不可能ではなく、耐タンパー性という面で必ずしも十分でない。
【0007】
【発明が解決しようとする課題】
上述したように、入力データによる消費電力の変動が暗号演算回路内部の秘密情報及び入力データに相関があると、消費電力グラフを用いたDPAによって暗号演算回路内部の秘密情報を取り出すことができてしまう。外部から物理的に破壊するなどの攻撃方法の場合、攻撃された痕跡が残るために攻撃を受けたということがすぐに分かるが、DPAのように消費電力から内部の秘密情報を特定されるような攻撃方法の場合、外見から攻撃を受けたかどうか判断は難しいため、セキュリティ面で大いに問題となる。
【0008】
暗号演算回路は通常、演算を司る複数の論理素子による組み合わせ回路と、演算結果や状態を保持するレジスタ回路を用いて構成される。ここで、レジスタ回路は組み合わせ回路の演算結果や状態を入力データとして保持するために用いられる。レジスタ回路は、入力データや秘密情報により保持しているデータがローレベルとハイレベルとの間で遷移するときに、より多くの電力が消費される。
【0009】
従って、暗号演算回路において入力データに関係して内部のレジスタの保持するデータの遷移数に偏りがある場合、演算回路の消費電力グラフにデータの遷移数による影響が表れるため、入力データ毎に消費電力グラフに特徴が現れるような場合には、入力データと秘密情報の依存関係を見つけることができ、DPAによって秘密情報を外部から求めることができてしまう。
【0010】
本発明の目的は、内部状態の変化によらず消費電力が一定のレジスタ回路及び該レジスタ回路を用いた暗号演算回路を提供することにある。
【0011】
【課題を解決するための手段】
上記の課題を解決するため、本発明に係るレジスタ回路は、入力データを保持するための本来のレジスタ、すなわち第1のデータ入力線から入力されるデータをクロック信号に同期して取り込み、該取り込んだデータを保持して第1のデータ出力線へ出力する第1のレジスタとは別に、入力データの保持には寄与しないダミーレジスタとしての第2のレジスタが設けられる。第2のレジスタは、第2のデータ入力線から入力されるデータをクロック信号に同期して取り込み、該取り込んだデータを保持して第2のデータ出力線へ出力する。さらに、クロック信号に同期して第1のデータ入力線及びデータ出力線上のデータ値を監視し、両データ値が一致したとき制御信号を発生する監視回路が設けられ、この制御信号によって第2のレジスタに保持されるデータの値が反転される。
【0012】
より具体的には、例えば第2のデータ出力線から出力されるデータを反転して第2のデータ入力線へ出力する反転素子が設けられ、第1のデータ入力線及びデータ出力線上のデータ値が一致したとき監視回路から発生される制御信号により第2のレジスタがライトイネーブル状態とされることによって、第2のレジスタに保持されるデータの値が反転素子の出力に基づき反転される。
【0013】
このように本発明に係るレジスタ回路は、クロック信号に同期して第1及び第2のレジスタの保持しているデータ値のいずれか一方が必ず反転することになるため、内部状態すなわち保持しているデータ値の遷移によらず消費電力が一定となる。従って、このレジスタ回路を暗号演算回路に用いて、組み合わせ回路の演算結果や状態を入力データとして保持する構成とした場合、消費電力の変化が外部で観測されにくくなり、DPAに対する耐性が向上する。
【0014】
本発明に係る暗号演算回路は、上述のレジスタ回路と組み合わせ回路を含んで構成される。
【0015】
他の観点によると、本発明に係る暗号演算回路は、暗号演算に関わる少なくとも一つの第1の論理素子と、暗号演算に関わらない少なくとも一つの第2の論理素子と、第2の論理素子を第1の論理素子に対して相補的に動作させる(例えば第2の論理素子の内部状態を第1の論理素子の内部状態に対して相補的に遷移させる)手段とを具備する。第1及び第2の論理素子は、それぞれの内部状態が遷移するときの消費電力がほぼ同一であることが望ましい。
【0016】
【発明の実施形態】
以下、図面を参照して本発明の一実施形態を説明する。
図1は、暗号演算回路の一部の構成を示している。データ入力線1から入力されたデータはレジスタ回路2によって保持され、データ出力線3を介して組み合わせ回路4に入力される。組み合わせ回路4の演算結果は、データ出力線5を介してもう一つのレジスタ回路6へ入力される。
【0017】
データ入力線1上のデータ値が遷移すると、クロック信号に同期して、レジスタ回路2に保持されるデータ値が遷移する。次のクロック信号においてデータ出力線3上のデータ値が遷移し、組み合せ回路4のデータ出力線5を経てレジスタ回路6に保持されるデータの値が遷移する。
【0018】
このとき、レジスタ回路2及びレジスタ回路6の保持するデータ値の遷移において、入力データと秘密情報に関係して遷移数に偏りがある場合、その偏りの影響を外部から消費電力の変動という形で観測することが可能となる。入力データの値に依存して消費電力に変動がある場合、その消費電力グラフを基に秘密情報を取り出すことが可能となってしまう。
【0019】
図2には、保持するデータ値の遷移数に秘密情報と入力データの影響がなくなるようにして、消費電力を一定とした本発明の一実施形態に係るレジスタ回路の構成を示す。このレジスタ回路においては、1ビットのデータを保持する主レジスタ(第1のレジスタ)11に対応して、監視回路12と1ビットのデータを保持するダミーレジスタ13(第2のレジスタ)及びNOT素子14が設けられている。
【0020】
主レジスタ11とダミーレジスタ13は、例えば同一構成、すなわち内部状態(保持しているデータ値)が遷移するときの消費電力が同一であることが望ましい。本実施形態では、以下のように主レジスタ11とダミーレジスタ13を例えばクロック信号CLKに同期して相補的に動作させることによって、レジスタ回路の消費電力を一定に保持する。
【0021】
データ入力線21に入力されたデータは、クロック信号CLKに同期して主レジスタ11に取り込まれ、主レジスタ11によって保持される。主レジスタ11に保持されているデータは、データ出力線22へ出力される。
監視回路12は、主レジスタ11の入力端子と出力端子にそれぞれ接続されたデータ入力線21と主レジスタデータ出力線22上のデータ値を監視することよって、主レジスタ11が保持しているデータ値の遷移の有無を判定する。すなわち、監視回路12はデータ入力線21とデータ出力線22上のデータ値が一致していれば、主レジスタ11が保持しているデータ値の遷移はなく、データ入力線21とデータ出力線22上のデータ値が不一致であれば、主レジスタ11が保持しているデータ値が遷移したと判定する。
【0022】
図3に、監視回路12の一例を示す。この監視回路12は、XOR(排他的論理和)演算素子30によって実現される。データ入力線21上のデータ値I1とデータ出力線22上のデータ値I2が不一致の場合には、XOR演算素子30の出力データ値Oは“1”となる。一方、データ値I1とデータ値I2が一致している場合には、XOR演算素子30の出力データ値Oは“0”となる。このようにしてデータ入力線21及びデータ出力線22上のデータ値I1,I2の不一致を検出することができる。
【0023】
監視回路12の出力端子は、ダミーレジスタ13のライトイネーブル線23に接続される。ダミーレジスタ12のデータ出力線24はNOT素子14の入力端子に接続され、NOT素子14の出力端子はダミーレジスタ12のデータ入力線25に接続される。ダミーレジスタ13では、主レジスタ11に供給されるのと同一のクロック信号CLKに同期して、データ入力線25上のデータ値、すなわちNOT素子14の出力データ値を取り込んで保持する。
【0024】
次に、図2に示したレジスタ回路の動作を説明する。
まず、主レジスタ11の入力端子に接続されたデータ入力線21と出力端子に接続されたデータ出力線22上のデータ値が同じ場合、監視回路12の出力信号が“0”となる。すなわち、ライトイネーブル線23上のライトイネーブル信号が活性化される。ライトイネーブル信号が活性化されることによって、ダミーレジスタ13はクロック信号CLKの立ち上がりタイミングでデータ入力線25上のデータ値を取り込む。データ入力線25上のデータ値は、ダミーレジスタ13の出力端子に接続されたデータ出力線24上のデータ値をNOT素子14で反転した値であるため、ダミーレジスタ13が保持するデータ値は反転する。このとき、主レジスタ11のデータ入力線21とデータ出力線22上のデータ値が同じであるため、主レジスタ11が保持しているデータは変化しない。
【0025】
次に、主レジスタ11のデータ入力線21とデータ出力線22上のデータ値が異なる場合には、監視回路12の出力は“1”となる。すなわち、この場合はライトイネーブル線23上のライトイネーブル信号が活性化されないため、ダミーレジスタ13は元のデータ値を保持し続ける。一方、主レジスタ11はクロック信号CLKの立ち上がりタイミングでデータ入力線21上のデータ値を取り込むことにより、保持しているデータ値が反転し、データ出力線22上のデータ値は遷移することとなる。
【0026】
このように本実施形態のレジスタ回路では、主レジスタ11に接続されている入力データ線21とデータ出力線22上のデータ値を監視回路12によって監視し、これらのデータ値が一致したとき、クロック信号CLKに同期してNOT素子14の出力データ値をダミーレジスタ13に取り込むことにより、ダミーレジスタ13に保持されているデータ値を反転させる。一方、入力データ線21とデータ出力線22上のデータ値が不一致のときは、主レジスタ11が保持しているデータ値がクロック信号CLKに同期して反転するが、ダミーレジスタ13の保持しているデータ値は反転せずに元の値を保つ。
【0027】
このようにクロック信号CLKの立ち上がり毎に、主レジスタ11とダミーレジスタ12の保持しているデータ値のいずれか一方が必ず反転する。従って、本実施形態のレジスタ回路を図1に示したように暗号演算回路に適用した場合、演算中には組合せ回路の演算結果に関わらず、常に演算回路中のレジスタ回路のデータ値の遷移数を一定に保つことが可能となる。
【0028】
すなわち、図1に示すような暗号演算回路内にある全てのレジスタ回路を図2のように構成することにより、入力データや秘密情報に依存することなく、保持しているデータ値の遷移が起こるレジスタ回路の総数(暗号演算回路内のレジスタ回路群のデータ値の遷移数)を常に一定に保つことが可能となる。この結果、入力データや秘密情報に依存せずに暗号演算回路の消費電力を一定にすることが可能となり、DPAに対して有効な耐性を有する暗号演算回路を実現することができる。
【0029】
本実施形態においては、監視回路12自体の消費電力も一定に保たれることがより望ましい。監視回路12の消費電力の影響で、暗号演算回路内の内部状態と演算中の消費電力との間に相関が生じる可能性があるためである。以下、監視回路12を定消費電力化する手法の一例について説明する。
【0030】
図4は、監視回路12として有効な図3に示すXOR演算素子30の回路例を示している。高電位側の第1の電源線40と、低電位側の第2の電源線であるグランド50との間に、第1のMOSスイッチであるnMOSトランジスタ41と第2のMOSスイッチであるpMOSトランジスタ42を直列に介して論理演算部45が接続される。
【0031】
論理演算部45は、2つのnMOSトランジスタ46,48の直列回路と2つのpMOSトランジスタ47,49の直列回路との並列回路により構成される。トランジスタ46,47のドレイン端子は、トランジスタ42のソース端子に共通に接続される。トランジスタ46,47のソース端子は、トランジスタ48,49のドレイン端子にそれぞれ接続される。トランジスタ48,49のソース端子は、グランド50に接続される。トランジスタ46,47のゲート端子は第1の入力信号線53に共通に接続され、トランジスタ48,49のゲート端子は第2の入力信号線54に共通に接続される。
【0032】
論理演算部45の論理演算結果は出力信号線55に出力され、出力信号線55とグランド50との間に接続されたキャパシタ44に論理演算結果が電荷として保持される。キャパシタ44は、素子として形成されるか、出力信号線55の寄生容量によって実現されるか、あるいは素子としてのキャパシタと寄生容量の合成容量が用いられる。
【0033】
一方、トランジスタ41及び42のゲート端子は、第1の制御信号線である充電制御信号線51に接続される。出力信号線55は、トランジスタ41とトランジスタ42との接続点に接続される。出力信号線55とグランド50との間に、すなわちキャパシタ44に対して並列に第3のMOSスイッチであるnMOSトランジスタ43が接続される。トランジスタ43のゲート端子は、第2の制御信号線である放電制御信号線52に接続される。トランジスタ41,42,43、充電制御信号線51及び放電制御信号線52は充放電回路を形成し、この充放電回路によってキャパシタ44の充放電を行う。
【0034】
タイミング制御回路26は、暗号演算回路全体を同期させるための同期信号であるクロック信号CLKに従って、以下に説明するような条件を満たすように充電制御信号線11及び放電制御信号線12の電位を制御する。
【0035】
充電制御信号線51は、キャパシタ44を充電するのに必要な時間“H”レベルであり、かつ論理素子の出力信号線55をライトイネーブル信号23として入力とするダミーレジスタ13のセットアップ時間と、入力信号線53,54の演算結果により出力信号線55の電位が安定する期間を考慮し、クロック信号CLKの立ち上がりよりも前に“L”レベルに遷移するように、タイミング制御回路56により制御される。
【0036】
放電制御信号線52は、キャパシタ44の電荷を放電するのに必要な期間“H”レベルであり、かつ論理素子の出力信号55を入力とする図示していないフリップフロップなどの記憶素子のホールド時間を満たした後、“H”レベルに遷移するように、タイミング制御回路56により制御される。
【0037】
さらにタイミング制御回路56は、上記の充電制御信号線51の“H”レベルの期間や“L”レベルへ遷移のタイミングと放電制御信号線52の“H”レベルの期間や“H”レベルへの遷移のタイミングに加えて、充電制御信号線51と放電制御信号線52の“H”レベルの期間が重ならないように充電制御信号線51と放電制御信号線52の制御を行う。
【0038】
ここで、図4と図2及び図3との対応関係を説明すると、入力信号線51はデータ入力線21に、入力信号線52はデータ出力線22にそれぞれ相当し、また出力信号線55はライトイネーブル線23に相当する。
【0039】
次に、図5に示すタイムチャートを用いて本実施形態によるXOR演算素子の動作を説明する。図5は、クロック信号CLK、充電制御信号線51及び放電制御信号線52の電位φ1,φ2、入力信号線53,54の電位I1,I2及び出力信号線55の電位Voの遷移を表している。入力信号線51,52の電位I1,I2は、クロック信号CLKと同期して遷移するものとする。図5において、T1,T2,T3,T4,…はクロック信号CLKに従ってXOR演算素子が周期的に充放電動作を行う単位動作期間を示している。
【0040】
[期間T1]まず、図5の期間T1に示されるように、最初に出力信号線55に接続されているキャパシタ44に充電するために、クロック信号CLKの立ち上がり時刻t0において充電制御信号線51の電位φ1をハイレベル(“H”レベル)とする。これによりトランジスタ41は導通状態となり、電源線40からトランジスタ41を介してキャパシタ44に電流が流れ、キャパシタ44の充電が行われるため、出力信号線55の電位Voは一旦“H”レベルとなる。
【0041】
このキャパシタ44への充電中に、もし充放電回路がキャパシタ44から論理演算部45へ電荷が通過させることが可能な状態になっているとすると、入力信号線53,54の電位によっては電源線40とグランド50との間が短絡する可能性がある。このような電源線40とグランド50間の短絡を防ぐため、本実施形態では充放電回路部においてトランジスタ42を論理演算部45側に挿入し、キャパシタ44の充電中には、このトランジスタ42を非導通状態とすることより、論理演算部45へキャパシタ44の電荷が流れないようにしている。
【0042】
次に、時刻t1においてキャパシタ44に電荷が充電された後、充電制御信号線51の電位φ1をローレベル(“L”レベル)とする。これによってトランジスタ41は非導通状態となり、電源線40から電流が流れ込まなくなる。一方、充電制御信号線51の電位φ1が“L”レベルとなることによって、トランジスタ42は導通状態となるから、このトランジスタ42を介してキャパシタ44の電荷を論理演算部45に流すことができる。
【0043】
論理演算部45においては、入力信号線53の電位I1に応じてnMOSトランジスタ46及びpMOSトランジスタ47のうち一方が導通状態、他方が非導通状態となる。同様に、入力信号線54の電位I2に応じてnMOSトランジスタ48及びpMOSトランジスタ49のうち一方が導通状態、他方が非導通状態となる。二つのnMOSトランジスタ46,48の両方が導通状態、あるいは二つのpMOSトランジスタ47,49の両方が導通状態のとき、キャパシタ44の電荷は論理演算部45を通過してグランド50に流れることが可能である。それ以外のとき、つまり二つのnMOSトランジスタ46,48のうちの一方が導通状態、他方が非導通状態で、かつ二つのpMOSトランジスタ47,49のうちの一方が導通状態、他方が非導通状態のときは、キャパシタ44の電荷はグランド20に流れ込むことはできない。
【0044】
論理演算部45が入力信号線53,54の電位I1,I2に従ってキャパシタ44の電荷をグランド50へ流すことが不可能な状態では、キャパシタ44の電荷は保持されるために、出力信号線55の電位Voが“H”レベルとなる。一方、論理演算部45がキャパシタ44の電荷をグランド50へ流すことが可能な状態では、キャパシタ44の電荷が論理演算部45を通過してグランド50に流れ込むことにより、出力信号線55の電位Voは“L”レベルとなる。この後、クロック信号CLKが立ち上がった時刻t2における出力信号線55の電位VoはXOR演算素子の出力値となる。
【0045】
具体的に、図5の例では時刻t1における入力信号線53の電位I1は“H”レベル、入力信号線54の電位I2は“L”レベルである。このとき、論理演算部45においてはnMOSトランジスタ46とpMOSトランジスタ49が導通状態となり、nMOSトランジスタ48とpMOSトランジスタ47は非導通状態である。従って、キャパシタ44の電荷は論理演算部45を通過することができないため、キャパシタ44の電荷は保持され、時刻t2でクロック信号CLKが立ち上がったときの出力信号線55の電位Voは“H”レベルとなる。すなわち、I1=“H”,I2=“L”のときの論理演算結果はVo=“H”ということになり、XOR演算素子の動作を満たす。
【0046】
次に、上述のように時刻t2でクロック信号CLKが立ち上がった後、時刻t3において放電制御信号線52の電位φ2が“H”レベルとされる。これによりnMOSトランジスタ43が導通状態となり、キャパシタ44の電荷はnMOSトランジスタ43を通ってグランド50に放電され、出力信号線55の電位Voは“L”レベルとなる。
【0047】
[期間T2]一方、図5の期間T2に示すように、クロック信号CLKの立ち下がり時刻でキャパシタ44に充電が行われた後における入力信号線53,54の電位I1,I2がI1=“H”,I2=“H”のときは、nMOSトランジスタ46,48が共に導通状態(pMOSトランジスタ47,49は共に非導通状態)であるため、キャパシタ44の電荷はnMOSトランジスタ46,48を通じてグランド50に放電され、次にクロック信号CLKが立ち上がったときの出力信号線55の電位Voは“L”レベルとなる。すなわち、I1=“H”,I2=“H”のときの論理演算結果はVo=“L”であり、XOR演算素子の動作を満たす。
【0048】
[期間T3]同様に、図5の期間T3に示すようにクロック信号CLKの立ち下がり時刻でキャパシタ44に充電が行われた後における入力信号線53,54の電位I1,I2がI1=“L”,I2=“L”のときは、pMOSトランジスタ47,49が共に導通状態(nMOSトランジスタ46,48は共に非導通状態)であるため、キャパシタ44の電荷はpMOSトランジスタ47,49を通じてグランド50に放電され、次にクロック信号CLKが立ち上がったときの出力信号線55の電位Voは、“L”レベルとなる。すなわち、I1=“H”,I2=“H”のときと同様に、I1=“L”,I2=“L”のときの論理演算結果はVo=“L”となり、XOR演算素子の動作を満たす。
【0049】
これらの場合も、次に放電制御信号線52の電位φ2が“H”レベルとされ、nMOSトランジスタ43が導通状態となるが、キャパシタ44の電荷は既に放電されているため、nMOSトランジスタ43が導通状態となっても、グランド50に新たに放電されることはない。
【0050】
[期間T4]次に、図5の期間T4に示すように、クロック信号CLKの立ち下がり時刻でキャパシタ14に充電が行われた後における入力信号線53,54の電位I1,I2がI1=“L”,I2=“H”のときは、期間T1の場合とは逆に、nMOSトランジスタ46とpMOSトランジスタ49が非導通状態、nMOSトランジスタ48とpMOSトランジスタ47が導通状態となるが、この場合もキャパシタ44の電荷は論理演算部45を通過できず、キャパシタ44の電荷は保持される。従って、次にクロック信号CLKが立ち上がったときの出力信号線55の電位Voは“H”レベルとなる。すなわち、I1=“L”,I2=“H”のときの論理演算結果はVo=“H”となり、XOR演算素子の動作を満たす。
【0051】
次に、放電制御信号線52の電位φ2が“H”レベルとされることによって、nMOSトランジスタ43が導通状態となり、キャパシタ44の電荷はnMOSトランジスタ43を通ってグランド50に放電されるため、出力信号線55の電位Voは“L”レベルとなる。
【0052】
このようにI1=“H”,I2=“L”のとき(期間T1)及びI1=“L”,I2=“H”のとき(期間T4)の論理演算結果は、いずれもVo=“H”であり、I1=“H”、I2=“H”のとき(期間T2)及びI1=“L”、I2=“L”のとき(期間T3)の論理演算結果はいずれもVo=“L”となって、XOR演算が可能となる。
【0053】
以上説明したように、充電制御信号線51及び放電制御信号線52によるキャパシタ44の充放電動作は、クロック信号CLKに同期して繰り返し行われる。すなわち、本実施形態のXOR演算素子では、充電制御信号線51の電位φ1の立ち上がり時刻から放電制御信号線52の電位φ2の立ち上がり時刻までの各期間(T1,T2,T3,T4,…)において、入力信号線53,54の電位I1,I2の遷移状態によらず、すなわちI1,I2によるキャパシタ44の充放電を含めてキャパシタ44が常に1回の充電と1回の放電を行うため、常に一定の電力を消費する。
このように図4に示したXOR演算素子は常に消費電力が一定であるため、図2に示した監視回路12として有用である。すなわち、この監視回路12を用いたレジスタ回路を暗号演算回路内の全てのレジスタ回路に適用した場合、暗号演算回路内の全てのレジスタ回路の消費電力が常に一定となり、レジスタ回路による暗号演算回路の消費電力の変動はなくなる。従って、暗号演算回路のDPAに対する耐性向上に大きく寄与できる。
【0054】
【発明の効果】
以上説明したように、本発明によれば消費電力が一定のレジスタ回路及び演算中に入力データと秘密情報に依存することなく、常にレジスタの保持しているデータ値の遷移による電力消費の偏りを持たず、消費電力一定のレジスタ回路及びDPAに対して耐性を有する暗号演算回路を実現することができる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る暗号演算回路の構成を示すブロック図
【図2】本発明の一実施形態に係るレジスタ回路の構成を示すブロック図
【図3】図2における監視回路の一例を示すブロック図
【図4】図2における監視回路を低消費電力化した場合の具体的な構成を示す回路図
【図5】図4に示した監視回路の動作を示すタイミングチャート
【符号の説明】
1…データ入力線
2,6…レジスタ回路
4…組み合わせ回路
3,5…データ出力線
11…主レジスタ(第1のレジスタ)
12…監視回路
13…ダミーレジスタ(第2のレジスタ)
14…NOT素子(反転素子)
21…第1のデータ入力線
22…第1のデータ出力線
23…ライトイネーブル線
24…第2のデータ出力線
25…第1のデータ入力線
30…XOR(排他的論理和)演算素子
40…電源線(第1の電源線)
41…nMOSトランジスタ(第1のMOSスイッチ)
42…pMOSトランジスタ(第2のMOSスイッチ)
43…nMOSトランジスタ(第3のMOSスイッチ)
44…キャパシタ
45…論理演算部
46,48…nMOSトランジスタ
47,49…pMOSトランジスタ
50…グランド(第2の電源線)
51…充電制御信号線(第1の制御信号線)
52…放電制御信号線(第2の制御信号線)
53…第1の入力信号線
54…第2の入力信号線
55…出力信号線
56…タイミング制御回路[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a register circuit and a cryptographic operation circuit that is resistant to power analysis attacks using the register circuit.
[0002]
[Prior art]
A power analysis attack (DPA: Differential Power Analysis) is known as one of attacks for extracting secret information stored in a cryptographic operation circuit. DPA refers to extracting secret information stored in the cryptographic operation circuit by observing fluctuations in power consumption during the arithmetic processing of the cryptographic operation circuit and estimating the contents of the arithmetic processing from the power consumption pattern. . More specifically, in the DPA, a plurality of input data is input to the cryptographic operation circuit, and a graph (power consumption graph) showing fluctuations in power consumption in each case is created. The secret information in the cryptographic operation circuit is estimated from the characteristics of the power consumption graph for the input data. There is a correlation between the estimated secret information and the power consumption graph. When the estimated value is correct, a large correlation value appears, and when the estimation is incorrect, the correlation value is small. Based on this principle, secret information inside the cryptographic operation circuit can be extracted using DPA.
[0003]
One of the reasons for the correlation between the power consumption graph and the secret information largely depends on the characteristics of CMOS (Complementary Metal-Oxide Semiconductor). When an arithmetic circuit is manufactured using a CMOS device, the arithmetic circuit consumes a large amount of power when the potential of the signal line transitions due to the characteristics of the CMOS device. Due to such characteristics of the CMOS device, the power consumption of the arithmetic circuit fluctuates because the number of signal lines whose potential changes in the arithmetic circuit varies depending on the input data.
[0004]
More specifically, for example, the number of signal lines whose potential changes when processing certain input data m1 in the cryptographic operation circuit and the number of signal lines whose potential changes when processing other input data m2 are as follows. If they are different, there is a difference between the power consumption graphs PG1 and PG2 when the input data m1 and the input data m2 are processed. When the difference between the power consumption graphs PG1 and PG2 is related to secret information stored in the cryptographic operation circuit, DPA is performed on the cryptographic operation circuit to identify the secret information inside. I can do it.
[0005]
In Japanese Patent Laid-Open No. 2001-268071, a reconfigurable arithmetic circuit is used as a cryptographic arithmetic circuit in order to provide resistance (tamper resistance) to DPA, and this arithmetic circuit is functionally the same and has different internal operations. Technology that makes it difficult to identify internal secret information from the power consumption pattern by holding multiple configuration data for configuration and selectively writing these configuration data to the arithmetic circuit to update the circuit configuration Is disclosed.
[0006]
However, an arithmetic circuit such as an FPGA / PLD that can be reconfigured generally has a large hardware scale, which increases the cost of the cryptographic arithmetic circuit. Further, even if the circuit configuration of the cryptographic operation circuit is updated with the configuration data, the power consumption pattern does not change depending on the secret information inside the operation circuit. Therefore, it is not impossible for this cryptographic operation circuit to specify the internal secret information by repeating detailed analysis of the power consumption pattern, and is not necessarily sufficient in terms of tamper resistance.
[0007]
[Problems to be solved by the invention]
As described above, when the fluctuation in power consumption due to input data correlates with the secret information inside the cryptographic operation circuit and the input data, the secret information inside the cryptographic operation circuit can be extracted by DPA using the power consumption graph. End up. In the case of an attack method such as physically destroying from the outside, it is immediately known that the attack was made because the trace of the attack remains, but the internal secret information can be identified from the power consumption like DPA. In the case of a simple attack method, since it is difficult to determine whether or not an attack has been received from the appearance, it is a serious problem in terms of security.
[0008]
The cryptographic operation circuit is usually configured by using a combinational circuit composed of a plurality of logic elements for performing operations and a register circuit for holding the operation results and states. Here, the register circuit is used to hold the operation result and state of the combinational circuit as input data. The register circuit consumes more power when the data held by the input data or the secret information transits between the low level and the high level.
[0009]
Therefore, if there is a bias in the number of data transitions held in the internal registers in relation to the input data in the cryptographic operation circuit, the influence of the number of data transitions appears in the power consumption graph of the operation circuit. When a characteristic appears in the power graph, the dependency relationship between the input data and the secret information can be found, and the secret information can be obtained from the outside by the DPA.
[0010]
An object of the present invention is to provide a register circuit with constant power consumption regardless of a change in an internal state and a cryptographic operation circuit using the register circuit.
[0011]
[Means for Solving the Problems]
In order to solve the above-described problems, a register circuit according to the present invention captures an original register for holding input data, that is, captures data input from a first data input line in synchronization with a clock signal. Apart from the first register that holds the data and outputs it to the first data output line, a second register is provided as a dummy register that does not contribute to holding the input data. The second register captures data input from the second data input line in synchronization with the clock signal, holds the captured data, and outputs it to the second data output line. Further, a monitoring circuit is provided for monitoring the data values on the first data input line and the data output line in synchronization with the clock signal, and generating a control signal when the two data values coincide with each other. The value of the data held in the register is inverted.
[0012]
More specifically, for example, an inverting element that inverts data output from the second data output line and outputs the inverted data to the second data input line is provided, and data values on the first data input line and the data output line are provided. When the two coincide with each other, the second register is set in the write enable state by the control signal generated from the monitoring circuit, so that the value of the data held in the second register is inverted based on the output of the inverting element.
[0013]
As described above, the register circuit according to the present invention always inverts one of the data values held in the first and second registers in synchronization with the clock signal. The power consumption is constant regardless of the transition of the data value. Therefore, when this register circuit is used as a cryptographic operation circuit and the operation result and state of the combinational circuit are held as input data, a change in power consumption is less likely to be observed externally and resistance to DPA is improved.
[0014]
A cryptographic operation circuit according to the present invention includes the register circuit and the combinational circuit described above.
[0015]
According to another aspect, a cryptographic operation circuit according to the present invention includes at least one first logic element related to cryptographic operation, at least one second logic element not related to cryptographic operation, and a second logic element. Means for operating in a complementary manner with respect to the first logic element (for example, causing the internal state of the second logic element to make a complementary transition with respect to the internal state of the first logic element). It is desirable that the first and second logic elements have substantially the same power consumption when their internal states transition.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 shows a partial configuration of the cryptographic operation circuit. Data input from the
[0017]
When the data value on the
[0018]
At this time, in the transition of the data value held by the
[0019]
FIG. 2 shows a configuration of a register circuit according to an embodiment of the present invention in which power consumption is constant so that the influence of secret information and input data is eliminated on the number of transitions of data values to be held. In this register circuit, corresponding to a main register (first register) 11 that holds 1-bit data, a
[0020]
It is desirable that the
[0021]
Data input to the
The
[0022]
FIG. 3 shows an example of the
[0023]
The output terminal of the
[0024]
Next, the operation of the register circuit shown in FIG. 2 will be described.
First, when the data values on the
[0025]
Next, when the data values on the
[0026]
As described above, in the register circuit of the present embodiment, the data values on the
[0027]
As described above, every time the clock signal CLK rises, one of the data values held in the
[0028]
That is, by configuring all the register circuits in the cryptographic operation circuit as shown in FIG. 1 as shown in FIG. 2, transition of the stored data value occurs without depending on input data or secret information. It is possible to always keep the total number of register circuits (the number of data value transitions of the register circuit group in the cryptographic operation circuit) constant. As a result, it is possible to make the power consumption of the cryptographic operation circuit constant without depending on the input data and secret information, and it is possible to realize a cryptographic operation circuit having effective resistance against DPA.
[0029]
In the present embodiment, it is more desirable that the power consumption of the
[0030]
FIG. 4 shows a circuit example of the
[0031]
The
[0032]
The logical operation result of the
[0033]
On the other hand, the gate terminals of the
[0034]
The timing control circuit 26 controls the potentials of the charge
[0035]
The charge
[0036]
The discharge
[0037]
Further, the
[0038]
Here, the correspondence between FIG. 4 and FIGS. 2 and 3 will be described. The
[0039]
Next, the operation of the XOR operation element according to the present embodiment will be described using the time chart shown in FIG. FIG. 5 shows transitions of the clock signal CLK, the potentials φ1 and φ2 of the charge
[0040]
[Period T1] First, as shown in the period T1 in FIG. 5, in order to charge the
[0041]
If the charging / discharging circuit is allowed to pass charges from the
[0042]
Next, after the
[0043]
In the
[0044]
When the
[0045]
Specifically, in the example of FIG. 5, the potential I1 of the
[0046]
Next, as described above, after the clock signal CLK rises at time t2, the potential φ2 of the discharge
[0047]
[Period T2] On the other hand, as shown in period T2 in FIG. 5, the potentials I1 and I2 of the
[0048]
[Period T3] Similarly, as shown in period T3 in FIG. 5, the potentials I1 and I2 of the
[0049]
Also in these cases, the potential φ2 of the discharge
[0050]
[Period T4] Next, as shown in period T4 in FIG. 5, the potentials I1 and I2 of the
[0051]
Next, when the potential φ2 of the discharge
[0052]
As described above, when I1 = "H" and I2 = "L" (period T1) and when I1 = "L" and I2 = "H" (period T4), the logical operation results are all Vo = "H" When I1 = "H" and I2 = "H" (period T2) and when I1 = "L" and I2 = "L" (period T3), the logical operation results are Vo = "L"", And the XOR operation becomes possible.
[0053]
As described above, the charging / discharging operation of the
4 is useful as the
[0054]
【The invention's effect】
As described above, according to the present invention, the power consumption is biased by the transition of the data value always held in the register without depending on the input data and the secret information during the calculation and the register circuit with constant power consumption. It is possible to realize a register circuit having constant power consumption and a cryptographic operation circuit having resistance against DPA.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a cryptographic operation circuit according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a register circuit according to an embodiment of the present invention.
3 is a block diagram showing an example of a monitoring circuit in FIG.
4 is a circuit diagram showing a specific configuration when the power consumption of the monitoring circuit in FIG. 2 is reduced;
FIG. 5 is a timing chart showing the operation of the monitoring circuit shown in FIG.
[Explanation of symbols]
1 ... Data input line
2, 6 ... register circuit
4 ... Combination circuit
3, 5 ... Data output line
11: Main register (first register)
12 ... Monitoring circuit
13: Dummy register (second register)
14 ... NOT element (inversion element)
21: First data input line
22: First data output line
23: Write enable line
24: Second data output line
25: First data input line
30 ... XOR (exclusive OR) arithmetic element
40 ... power line (first power line)
41 ... nMOS transistor (first MOS switch)
42 ... pMOS transistor (second MOS switch)
43 ... nMOS transistor (third MOS switch)
44 ... Capacitor
45. Logic operation section
46, 48 ... nMOS transistors
47, 49 ... pMOS transistors
50 ... Ground (second power line)
51 ... Charging control signal line (first control signal line)
52 ... Discharge control signal line (second control signal line)
53. First input signal line
54 ... Second input signal line
55 ... Output signal line
56 ... Timing control circuit
Claims (5)
前記第1のデータ入力線から入力されるデータをクロック信号に同期して取り込み、該取り込んだデータを保持して前記第1のデータ出力線へ出力する第1のレジスタと、
第2のデータ入力線及びデータ出力線と、
前記第2のデータ入力線から入力されるデータを前記クロック信号に同期して取り込み、該取り込んだデータを保持して前記第2のデータ出力線へ出力する第2のレジスタと、
前記クロック信号に同期して前記第1のデータ入力線及びデータ出力線上のデータ値を監視し、両データ値が一致したとき所定の制御信号を発生して前記第2のレジスタに保持されるデータの値を反転させる監視回路と
を具備するレジスタ回路。A first data input line and a data output line;
A first register that captures data input from the first data input line in synchronization with a clock signal, holds the captured data, and outputs the data to the first data output line;
A second data input line and a data output line;
A second register that captures data input from the second data input line in synchronization with the clock signal, holds the captured data, and outputs the data to the second data output line;
The data value on the first data input line and the data output line is monitored in synchronization with the clock signal, and a predetermined control signal is generated when the two data values coincide with each other, and the data held in the second register And a monitoring circuit for inverting the value of.
異なる電源電位を有する第1及び第2の電源線と、
前記第1の電源線と前記第2の電源線との間に挿入され、前記第1のデータ入力線及びデータ出力線上のデータを入力として排他的論理和演算を行い、演算結果を前記制御信号として出力信号線へ出力する複数のMOSトランジスタを含む演算部と、
前記出力信号線と前記第2の電源線との間に挿入され、前記演算部の演算結果を電荷として保持するキャパシタと、
第1レベル及び第2レベルのいずれかの電位が選択的に与えられる第1及び第2の制御信号線と、
前記第1の電源線と前記出力信号線との間に接続され、前記第1の制御信号線の第1レベルの電位により導通状態、前記第1の制御信号線の第2レベルの電位により非導通状態とされる第1のMOSスイッチと、
前記出力信号線と前記演算部との間に接続され、前記第1の制御信号線の第1レベルの電位により非導通状態、前記第1の制御信号線の第2レベルの電位により導通状態とされる第2のMOSスイッチと、
前記キャパシタに対して並列に接続され、前記第2の制御信号線の第1レベルの電位により導通状態、前記第2の制御信号線の第2レベルの電位により非導通状態とされる第3のMOSスイッチと、
前記キャパシタを前記第1のデータ入力線及びデータ出力線上のデータ遷移に伴う充放電によらず一定周期で充放電させるために、前記第1及び第2の制御信号線のそれぞれの電位の前記第1レベルの期間が互いに重複しないように前記第1及び第2の制御信号線の電位を周期的に前記第1レベルと第2レベルとの間で遷移させる制御回路とを具備する請求項1記載のレジスタ回路。The monitoring circuit is
First and second power supply lines having different power supply potentials;
Inserted between the first power supply line and the second power supply line, performs an exclusive OR operation with the data on the first data input line and the data output line as input, and outputs the operation result to the control signal An arithmetic unit including a plurality of MOS transistors that output to the output signal line as
A capacitor that is inserted between the output signal line and the second power supply line and holds a calculation result of the calculation unit as a charge;
First and second control signal lines to which a potential of either the first level or the second level is selectively applied;
The first control signal line is connected between the first power supply line and the output signal line, is turned on by the first level potential of the first control signal line, and is not turned on by the second level potential of the first control signal line. A first MOS switch that is rendered conductive;
It is connected between the output signal line and the arithmetic unit, and is turned off by a first level potential of the first control signal line, and turned on by a second level potential of the first control signal line. A second MOS switch to be
A third circuit connected in parallel to the capacitor and made conductive by the first level potential of the second control signal line and made non-conductive by the second level potential of the second control signal line. MOS switch,
In order to charge and discharge the capacitor at a constant period regardless of charging and discharging accompanying data transition on the first data input line and the data output line, the first potential of each of the first and second control signal lines is set. 2. The control circuit according to claim 1, further comprising: a control circuit that periodically transitions the potentials of the first and second control signal lines between the first level and the second level so that periods of one level do not overlap each other. Register circuit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002191196A JP3708910B2 (en) | 2002-06-28 | 2002-06-28 | Register circuit and cryptographic operation circuit using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002191196A JP3708910B2 (en) | 2002-06-28 | 2002-06-28 | Register circuit and cryptographic operation circuit using the same |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004038318A JP2004038318A (en) | 2004-02-05 |
JP3708910B2 true JP3708910B2 (en) | 2005-10-19 |
Family
ID=31700887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002191196A Expired - Fee Related JP3708910B2 (en) | 2002-06-28 | 2002-06-28 | Register circuit and cryptographic operation circuit using the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3708910B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005031471A (en) * | 2003-07-07 | 2005-02-03 | Sony Corp | Encryption processing device and encryption processing method |
JP4565314B2 (en) * | 2004-03-12 | 2010-10-20 | ソニー株式会社 | Signal processing circuit and method |
JP3933647B2 (en) * | 2004-05-10 | 2007-06-20 | シャープ株式会社 | Semiconductor device with power consumption analysis prevention function |
JP2010237772A (en) * | 2009-03-30 | 2010-10-21 | Quo Card Co Ltd | Memory device, memory authentication system, and memory authentication program |
JP5589083B2 (en) * | 2009-10-14 | 2014-09-10 | ケイオロジクス インク | A logistic mapping circuit that implements a general-purpose logic array with a highly variable circuit topology and various logic gates with constant output. |
-
2002
- 2002-06-28 JP JP2002191196A patent/JP3708910B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2004038318A (en) | 2004-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102870162A (en) | Circuit for verifying the write enable of a one time programmable memory | |
CN105891651B (en) | Low power open circuit detection system | |
CN101996125B (en) | The activity monitoring of electronic circuit | |
KR20030027724A (en) | Random number generating circuit | |
JP3819872B2 (en) | Logic unit | |
US7881465B2 (en) | Circuit and method for calculating a logic combination of two encrypted input operands | |
JP3708910B2 (en) | Register circuit and cryptographic operation circuit using the same | |
JP3737783B2 (en) | Logic element and cryptographic operation circuit using the same | |
KR19990022763A (en) | Circuit for making a logic element that can be represented by the threshold value equation | |
EP3324286B1 (en) | Generating true random numbers for an integrated circuit | |
CN108270427B (en) | Apparatus and method for managing current consumption of integrated module | |
US20200167505A1 (en) | Low overhead random pre-charge countermeasure for side-channel attacks | |
RU2286011C2 (en) | Circuit device and method for generation of binary bus signal | |
JP3877663B2 (en) | Logic circuit and encryption device | |
US7583129B2 (en) | Integrated circuit and method for operating the integrated circuit | |
US6873558B2 (en) | Integrated circuit and method for operating the integrated circuit | |
JP4335561B2 (en) | Semiconductor integrated circuit device | |
JPH11506554A (en) | Clock generator for CMOS circuit having dynamic register | |
JP2010062635A (en) | Encryption processing apparatus and integrated circuit | |
JP2008067349A (en) | Semiconductor integrated circuit | |
Cutitaru et al. | New single-phase adiabatic logic family | |
US11879938B2 (en) | Method for detecting perturbations in a logic circuit and logic circuit for implementing this method | |
JP2009104694A (en) | Input circuit of semiconductor memory | |
US6498817B1 (en) | Circuit for processing data signals | |
US20120179931A1 (en) | Data processing module providing uniform power consumption for digital logic |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050128 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050201 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050401 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050802 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050804 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090812 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090812 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100812 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100812 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110812 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110812 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120812 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120812 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130812 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |