[go: up one dir, main page]

JP2004056363A - Cryptographic processing device and power leveling control method - Google Patents

Cryptographic processing device and power leveling control method Download PDF

Info

Publication number
JP2004056363A
JP2004056363A JP2002209572A JP2002209572A JP2004056363A JP 2004056363 A JP2004056363 A JP 2004056363A JP 2002209572 A JP2002209572 A JP 2002209572A JP 2002209572 A JP2002209572 A JP 2002209572A JP 2004056363 A JP2004056363 A JP 2004056363A
Authority
JP
Japan
Prior art keywords
power
hardware
cryptographic processing
clock
predetermined
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
Application number
JP2002209572A
Other languages
Japanese (ja)
Inventor
Yuichi Tokunaga
徳永 雄一
Minoru Shiga
志賀 稔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2002209572A priority Critical patent/JP2004056363A/en
Publication of JP2004056363A publication Critical patent/JP2004056363A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

【課題】低電力化を図るとともに、電力変動を測定することによる暗号解読を防止する電力平準化制御方法及び暗号処理装置を提供するようにする。
【解決手段】複数のハードウェアを備えた暗号処理装置において、前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知する電力検知手段と、前記電力検知手段により検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整する電力調整手段とを備える。
【選択図】    図1
An object of the present invention is to provide a power leveling control method and a cryptographic processing device for reducing power consumption and preventing decryption by measuring power fluctuation.
In a cryptographic processing device including a plurality of hardware, a cryptographic processing device is divided into a plurality of predetermined operation periods based on the operation of the plurality of hardware, and the power required by each hardware in each operation period is reduced. Power detection means for detecting, and the respective hardware based on the power of each hardware detected by the power detection means, and such that the total power of each hardware is the same in the plurality of predetermined operation periods. Power adjusting means for adjusting the power of the wear.
[Selection diagram] Fig. 1

Description

【0001】
【発明の属する技術分野】
この発明は、暗号処理装置において問題となる外部からの処理解読を防止する技術に関するものである。
【0002】
【従来の技術】
暗号処理を含む処理装置に電力変動が存在すると、装置電源線の電流変動を測定することにより、内部動作状況が判断できる。これにより、暗号処理アルゴリズムを解読でき、重要な情報を盗み取られることになる。従来、これを防止するためには、例えば、特開2001−5731号公報に記載されているように、電力消費回路を備え、ノイズを発生することによって処理パターンを解読できないようにしていた。
【0003】
【発明が解決しようとする課題】
従来の方法では、ノイズのために電力を発生させることから、全体の消費電力は増大する方向にあり、低電力装置への適用が困難であるという問題があった。また、ノイズの発生方法にパターンがあると、ノイズパターンをフィルタリングすることにより、暗号処理の電力パターンを取り出すことができるといった問題があった。
【0004】
この発明は上記のような問題点を解決するためになされたものであり、常時消費電力の変動を抑えることで余計な電力発生手段を排除し、低電力化を図るとともに、電力変動を測定することによる暗号解読を防止する電力平準化制御方法及び暗号処理装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
この発明に係る暗号装置は、複数のハードウェアを備えた暗号処理装置において、前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知する電力検知手段と、前記電力検知手段により検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整する電力調整手段とを備えるものである。
【0006】
また、前記複数のハードウェアとして、プロセッサ、キャッシュ、主記憶、周辺回路を備えると共に、前記電力検知手段は、前記所定の複数の動作期間として、キャッシュミスの期間、キャッシュヒットの期間、周辺回路動作の期間に分けるものである。
【0007】
また、前記複数のハードウェアとして、プロセッサ、暗号回路を備えると共に、前記電力検知手段は、前記所定の複数の動作期間として、暗号回路の動作期間、暗号回路の非動作期間に分けるものである。
【0008】
また、前記電力調整手段は、クロック周波数を増減することにより前記ハードウェアの電力を調整するものである。
【0009】
また、前記電力調整手段は、クロックのパルスを間引くことによりクロック周波数を増減するものである。
【0010】
また、前記電力調整手段は、クロックのパルスを間引く際、高電位と低電位とを均衡して間引くものである。
【0011】
また、前記電力調整手段は、電源電圧を増減することにより前記ハードウェアの電力を調整するものである。
【0012】
また、前記電力調整手段は、閾値電圧を増減することにより前記ハードウェアの電力を調整するものである。
【0013】
また、前記電力調整手段は、クロック周波数を増減することにより前記ハードウェアの電力を調整する際に用いる所定のクロック周波数値を、前記プロセッサにより調整する調整用レジスタを備えるものである。
【0014】
また、前記電力調整手段は、電源電圧を増減することにより前記ハードウェアの電力を調整する際に用いる所定の電圧値を、前記プロセッサにより調整する調整用レジスタを備えるものである。
【0015】
また、前記電力検知手段は、電流値に基づいて、前記それぞれの動作期間において前記それぞれのハードウェアが必要とする電力を検知するものである。
【0016】
また、前記電力検知手段は、電圧値に基づいて、前記それぞれの動作期間において前記それぞれのハードウェアが必要とする電力を検知するものである。
【0017】
本発明に係る電力平準化制御方法は、複数のハードウェアを備えた暗号処理装置における電力平準化制御方法であって、前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知し、前記検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整するものである。
【0018】
【発明の実施の形態】
実施の形態1.
図1は、本発明の実施の形態1における暗号処理装置の構成を示す説明図である。図1において、1はCPUコア、2は主記憶、3は周辺回路、4は電力変動検知手段、5は制御手段、6はバスである。また、CPUコア1はプロセッサ11、キャッシュコントローラ12、キャッシュメモリ13を備え、制御手段5は電圧変換手段51、クロック変換手段52を備える。本実施の形態1では、プログラムとして暗号処理を行う場合について説明する。
なお、電力変動検知手段4が電力検知手段に相当し、電力変動検知手段4と制御手段5が電力調整手段に相当する。
【0019】
プロセッサ11は主記憶2に格納されている命令およびデータに従い、演算および周辺回路3の起動制御を行う。プロセッサ11が必要とするコードは、一旦キャッシュコントローラ12で受け、キャッシュメモリ13に含まれているか否かを確認する。キャッシュメモリ13に含まれていればキャッシュヒットと判断し、キャッシュメモリ13からデータを取り出し、プロセッサ11へ返す。そうでなければ主記憶2から取り出し、プロセッサ11へ返すとともに次のアクセスに備えてキャッシュメモリ13にも格納する。一般に、キャッシュメモリ13のアクセス性能は高く、キャッシュメモリ13にプロセッサ11が要求するコードが入っていれば、プロセッサ11は高速に処理できる。
【0020】
一方、プロセッサ11は周辺回路3の動作を管理している。プロセッサ11は周辺回路3の動作に必要な前設定を行い、起動する。周辺回路3は設定に従って動作し、動作完了時は、レジスタに動作状態を残してプロセッサ11が処理終了を認識できるようにするか、もしくは割込み信号を発生しプロセッサ11へ通知する。
【0021】
図2は、一般的な暗号処理装置の電力推移を示す説明図であり、上記のような装置動作において、電力的には図2のように推移する。すなわち、プロセッサ11が新しいプログラムを実行するとき、最初はキャッシュメモリ13には該当するコードは入っていないため、キャッシュコントローラ12はキャッシュミスと判断し、主記憶2へデータを取りに行く。この間プロセッサ11は処理を中断しているため、内部演算回路は動作せず、またキャッシュメモリ13のアクセスも停止している。クロックと一部のステートマシンが動作しているだけなのでプロセッサ11、キャッシュコントローラ12、キャッシュメモリ13を含めたCPUコア1の消費電力は低い。一方、主記憶2は頻繁にアクセスされるため、消費電力は高い状態にある。(図2におけるキャッシュミスの期間)
【0022】
しばらくすると、プロセッサ11は前に読み出したコードを再実行することになる。この時、キャッシュメモリ13にコードが残っていれば、キャッシュヒットとして高速動作する。プロセッサ11およびキャッシュメモリ13は高速動作となるため、CPUコアの消費電力は高くなる。一方、主記憶2はアクセス頻度が減少するため、電力は減少する。(図2におけるキャッシュヒットの期間)
【0023】
次に、プロセッサ11は周辺回路の起動処理に入る。ここまで動作していなかった周辺回路3の消費電力は低い状態であったが、プロセッサ11からのアクセスにより、処理開始され、消費電力が高くなる。プロセッサ11は、他に処理がなければ周辺回路3のレジスタを周期的にアクセスして動作状況をモニタする、あるいは周辺回路3自身の完了割込み発生を受けるまでは動作停止する。この時のCPUコア1および主記憶2の消費電力は低い。(図2における周辺回路動作の期間)
【0024】
一般に、CPUコア1の電力、主記憶2の電力、周辺回路3の消費電力はそれぞれ独立しているため、前述動作の各フェーズでチップの消費電力合計は変化する。すなわち、キャッシュミスの電力変動により、コードのサイズやループの回数がわかり、周辺回路動作中の電力変動により、例えばプログラムとして暗号処理を行う場合、暗号回路の動作頻度がわかるといった危険があり、セキュリティ面が弱くなる。
【0025】
そこで、本実施の形態1では、キャッシュコントローラ12のキャッシュヒット/ミス判定情報およびバス情報を電力変動検知手段4に取り入れる。
図3は、電力変動検知手段4の内部回路の構成を示す説明図である。上記各情報は、周辺回路電力レジスタ42、CPU電力レジスタ43、主記憶電力レジスタ44に格納される。また、41はアドレスデコーダである。
図4は、本実施の形態1における暗号処理装置の電力推移を示す説明図であり、キャッシュミス、キャッシュヒット、周辺回路動作の全ての状態において、電力値が図2におけるキャッシュヒットのCPUコア電力値と主記憶電力値とを加えた値となるように調整する場合を示している。
【0026】
図3及び図4を用いて、動作について説明する。
上記初期のキャッシュミスの際には、CPU電力レジスタ43は1にセットされたままで、主記憶電力レジスタ44は1にセット、周辺回路電力レジスタ42は0にセットされる。これは、CPU電力は中間、主記憶電力は大、周辺回路の電力は小の状態を示す。各レジスタの内容は、制御手段5に通知される。主記憶電力レジスタ44のセット情報は、主記憶電力大を示す電圧変更通知として電圧変換手段51に通知される。電圧変換手段51は、主記憶電力大を示す電圧変更通知を受けると、主記憶電力大に対応する電圧値を主記憶2に通知し、主記憶2の電源電圧を上昇させる。また、周辺回路電力レジスタ42のセット情報は、周辺回路電力小を示す周辺クロック変更通知としてクロック変換手段52に通知される。クロック変換手段52は、周辺回路電力小を示す周辺クロック変更通知を受けると、周辺回路電力小に対応する周辺クロック周波数を周辺回路3に通知し、周辺回路3の周辺クロックを停止あるいは周波数を下げる。以上により、チップ電力は、主記憶2の消費電力が増大し、周辺回路3の消費電力が減少する。電圧変換手段51より通知する電圧値およびクロック変換手段52より通知する周辺クロック周波数は予め、チップ総電力が所定の電力値になるように調整し、電圧変換手段51、クロック変換手段52に設定しておく。(図4におけるキャッシュミスの期間)
【0027】
次に、キャッシュヒットの際には、CPU電力レジスタ43は2にセット、主記憶電力レジスタ44は0にセットされ、周辺回路電力レジスタ42は0にセットされたままである。これは、CPU電力は大、主記憶電力は小、周辺回路電力は小の状態を示す。各レジスタの内容は、同様に制御手段5に通知される。CPU電力レジスタ43のセット情報は、CPU電力大を示すCPUクロック変更通知としてクロック変換手段52に通知される。クロック変換手段52は、CPU電力大を示すCPUクロック変更通知を受けると、CPU電力大に対応するCPUクロック周波数をCPUコア1に通知し、CPUコア1のCPUクロックの周波数を上げる。また、主記憶電力レジスタ44のセット情報は上記の場合と同様に電圧変換手段51に通知され、電力変換手段51は主記憶電力小に対応する電圧値を主記憶2に通知し、クロック変換主記憶2の電圧を減少させる。以上により、チップ電力は、CPUコア1の消費電力が増大し、主記憶2の消費電力が減少する。電圧変換手段51の電圧値およびクロック変換手段52のCPUクロック周波数は予め、チップ総電力が所定の電力値になるように、すなわち上記キャッシュミスの期間と同一の電力値になるように調整し、電圧変換手段51、クロック変換手段52に設定しておく。(図4におけるキャッシュヒットの期間)
【0028】
そして、周辺回路動作の際には、CPU電力レジスタ43は0にセット、周辺回路電力レジスタ42は1にセットされ、主記憶電力レジスタ44は0にセットされたままである。これは、CPU電力は小、主記憶電力は小、周辺回路電力は大の状態を示す。各レジスタの内容は、同様に制御手段5に通知される。CPU電力レジスタ43のセット情報は上記の場合と同様にクロック変換手段52に通知され、クロック変換手段52はCPU電力小に対応するCPUクロック周波数をCPUコア1に通知し、CPUコア1のCPUクロックを停止あるいは周波数を下げる。また、周辺回路電力レジスタ42のセット情報は上記の場合と同様にクロック変換手段52に通知され、クロック変換手段52は周辺回路電力大に対応する周辺クロック周波数を周辺回路3に通知し、周辺回路3の周辺クロックの周波数を上げる。以上により、チップ電力は、CPUコア1の消費電力が減少し、周辺回路3の消費電力が増大する。クロック変換手段52のCPUクロック周波数および周辺クロック周波数は予め、チップ総電力が所定の電力値になるように、すなわち上記キャッシュミスの期間と同一の電力値になるように調整し、クロック変換手段52に設定しておく。(図4における周辺回路動作の期間)
【0029】
以上説明したように、キャッシュミスの期間、キャッシュヒットの期間、周辺回路動作期間、それぞれの期間において、CPUコア1、主記憶2、周辺回路3、それぞれが必要とする電力を検知し、チップ総電力が所定の電力値になるようにすることにより、低電力で、かつ電力変動を測定することによる暗号解読を防止することができる。
【0030】
なお、本実施の形態1では、CPUクロック変更通知として3値、周辺クロック変更通知として2値、電圧変更通知として2値を用いているが、これに限られず、他の値を用いても同様の効果を得ることができる。
【0031】
実施の形態2.
上記実施の形態1では、電圧変換手段51あるいはクロック変換手段52が、周辺回路電力レジスタ42等のレジスタからの通知を受け、その通知に対応するクロック周波数あるいは電圧値を、CPUコア1や主記憶2や周辺回路3に通知する場合について説明したが、本実施の形態2では、CPUコア1等に通知するクロック周波数あるいは電圧値を微調整する場合について説明する。
【0032】
図3で説明したように、例えば周辺回路3の場合では、チップ総電力が所定の電力値になるように、予め周辺回路電力大、小それぞれに対応する周辺クロック周波数をクロック変換手段52に調整、設定しておき、クロック変換手段52が周辺回路電力レジスタ42からの通知に基づいて適切な周辺クロック周波数を周辺回路3に通知する。しかし、この場合周辺回路電力大、小それぞれに対応する周辺クロック周波数は、クロック変換手段52にある値で設定済みのため、動作環境の変動等により、チップ総電力が所定の電力値からずれた場合には再調整が困難という問題があった。
【0033】
そこで、本実施の形態2では、調整用レジスタを設けることにより、チップ製造後でもクロック周波数や電圧値の微調整を可能とする場合について説明する。図5は、本実施の形態2における電力変動検知手段4の内部回路の構成を示す説明図である。図5において、45は周辺回路変更周波数レジスタ45a、CPU変更周波数レジスタ45b、主記憶変更電力45cからなる調整用レジスタ、46は46a〜46cからなるセレクタである。各セレクタ46a〜46cに入力される標準周波数や標準電圧値は、実施の形態1の図1における電圧変換手段51やクロック変換手段52に予め設定しておく値と同一である。その他同じ符号を付したものは図3と同様のため、説明は省略する。
【0034】
図5を用いて動作について説明する。例えば、周辺回路動作の期間においてチップ総電力が所定の電力値より高くなったため、周辺回路電力大のときの周辺クロックを低くして微調整を行なう場合について説明する。なお、チップ総電力が所定の電力値よりずれたか否かはCPUコア1が監視しているものとする。
チップ総電力が所定の電力値より高くなったため、周辺回路電力大のときの周辺クロックを低くするという情報は、CPUコア1より周辺回路変更周波数レジスタ45aに通知される。周辺回路変更周波数レジスタ45aは、このCPUコア1からの通知に基づいて変更周波数をセレクタ46aに出力する。例えば、周辺回路変更周波数レジスタ45aは、αHzの周波数幅でプラスとマイナス2段階ずつの周波数を保持、つまり、−2αHz、−αHz、+αHz、+2αHzの周波数を保持し、CPUコア1からの通知に基づいて、変更周波数を選択し、セレクタ46aに出力する。
【0035】
一方、周辺回路電力レジスタ42のセット情報は、周辺回路電力大を示す周辺クロック変更通知としてセレクタ46aに通知される。セレクタ46aには、変更前の標準周波数も入力され、さらに上記周辺回路変更周波数レジスタ45aからの変更周波数も入力される。セレクタ46aは、周辺回路電力レジスタ42、周辺回路変更周波数レジスタ45aからの入力と標準周波数とから、周辺回路電力大に対応する標準周波数に対して変更周波数の変更を含めた変更後の周波数を、周辺クロック変更通知としてクロック変換手段52に通知する。クロック変換手段52は、通知された変更後の周波数を周辺回路3に通知し、周辺回路3の周辺クロックを変更後の周波数に上げる。その他の動作については、上記実施の形態1と同様のため、説明は省略する。
【0036】
以上説明したように、微調整用の電圧値を複数保持したレジスタを備え、チップ総電力が所定の電力値よりずれた場合、前記レジスタのうち適切なレジスタを選択することにより、チップ総電力が所定の電力値からずれた場合にも容易に再調整を行なうことができる。
【0037】
なお、本実施の形態2では、周辺回路動作の期間においてチップ総電力が所定の電力値より高くなったため、周辺回路電力大のときの周辺クロックを低くして微調整を行なう場合について説明したが、高く微調整する場合や周辺回路電力小の場合も同様であり、また、CPUコア1や主記憶2のクロックや電圧値を微調整する場合も、同様の効果を得ることができる。
【0038】
また、主記憶の電力制御には、電源電圧のほかに閾値電圧を変更することで制御することもできる。この場合、電力変動検知手段4における主記憶電力レジスタ44が1にセットされた場合、閾値電圧を下降させることによって活性化および電力増大し、閾値電圧を上昇させることによって非活性化および電力低減することができる。
【0039】
また、本実施の形態2では、電力変動検知手段4内に調整用レジスタ45を備える場合について説明したが、図6に示すように電力変動検知手段4と別に設けてもよく、これに限られない。
【0040】
実施の形態3.
上記実施の形態1では、プログラムとして暗号処理を行なう暗号処理装置の場合について説明したが、本実施の形態3では、暗号回路を備えた暗号処理装置の場合について説明する。
【0041】
図7は、本実施の形態3における暗号処理装置の構成を示す説明図である。図7において、11はバス、7はCPUコア、8はクロック発振器、9は制御手段、10は暗号回路である。また、制御手段9は、シーケンス制御回路91、間引き制御回路92、間引きパターンレジスタ93、遅延レジスタ94を備える。
なお、制御手段9が電力検知手段及び電力調整手段に相当する。
【0042】
クロック発振器8は基本クロックを制御手段9へ供給し、制御手段9はCPUコア7へクロックを供給する。CPUコア7はバス6経由で制御手段9および暗号回路10の制御を行う。
上記実施の形態1と同様に、チップ総電力が常に所定の電力値になるように動作する。
【0043】
CPUコア7によりバス6を介して暗号回路10の動作開始が指示されると、暗号回路10はシーケンス制御回路91に対する暗号処理動作起動の要求信号を有効にする。暗号処理動作起動の要求を受けたシーケンス制御回路91は、暗号回路10に許可信号を出力すると同時に、CPUコア7の電力を低減させるため、間引き制御回路92にクロックの低下を指示、例えばクロックの間引き処理を指示する。間引き指示を受けた間引き制御回路92は、所定の値に間引きしたクロックをCPUコア7に出力する。これによりCPUコア7の電力が所定の値に低減される。暗号回路10は、暗号処理動作を終了する場合、要求信号を無効にする。シーケンス制御回路91は、この暗号回路10の動作に基づいて間引き制御回路92に対して間引き終了の指示を行ない、間引き制御回路92は間引きのないクロックへ復帰する。
なお、間引き指示を受けた間引き制御回路92は所定の値に間引きしたクロックをCPUコア7に出力するが、所定の値の間引きクロックは予め、チップ総電力が所定の電力値になるように調整し、間引き制御回路92に設定しておく。
【0044】
以上説明したように、暗号回路からの暗号処理動作起動の要求に基づいてCPUコアのクロックを間引きすることにより、低電力で、かつ電力変動を測定することによる暗号解読を防止することができる。
【0045】
なお、本実施の形態3では、所定の値の間引きクロックは予め、チップ総電力が所定の電力値になるように調整し、間引き制御回路92に設定しておく場合について説明したが、実施の形態2の場合と同様に、間引きパターンレジスタ93を設けて、間引きクロックの値を微調整するようにしてもよい。
例えば、図8のような複数の間引きクロックの値を間引きパターンレジスタ93に保持しておき、間引きクロックの値を微調整する。これにより、精度のよい電力制御を実現することができる。
【0046】
また、本実施の形態3では、シーケンス制御回路91が暗号回路10からの暗号処理動作の起動要求に基づいて、暗号回路10に許可信号を出力すると同時に、間引き制御回路92にクロックの間引き処理を指示する場合について説明したが、CPUコア7の立ち下がり(立ち上がり)と暗号回路10の立ち上がり(立ち下がり)とを考慮して、遅延レジスタ94を設けてもよい。上記間引きクロックの値の微調整と同様に、暗号回路10に許可信号を出力するタイミングと間引き制御回路92にクロックの間引き処理を指示するタイミングとの組み合わせを複数遅延レジスタ94に保持しておき、CPUコア7の立ち下がり(立ち上がり)と暗号回路10の立ち上がり(立ち下がり)のときのチップ総電力が所定の電圧値に近付くよう、処理の指示タイミングを微調整する。これにより、精度のよい電力制御を実現することができる。
なお、チップ総電力を所定の電力値に近付けるためにどのタイミングを選択すべきかは、CPUコア1が監視しているものとする。
【0047】
また、図8のW−5はW−4と同じ比率でクロックパルスを抜いた例であるが、クロックパルスを抜いた期間は高電位側を維持している。W−4はクロックパルスを抜いた期間は低電位側を維持しているが、W−4形式とW−5形式を交互に使用して高電位の期間と低電位の期間とを均一にすることにより、クロックの直流成分をなくすことができる効果がある。
【0048】
また、本実施の形態3では、CPUコア7の電力を所定の値に低減するのに、CPUコア7に出力するクロックを所定の値に間引きする場合について説明したが、CPUコア7の電力を所定の値に低減できればこれに限られず、周波数を下げたり、クロックを停止する等の処理を行なっても同様の効果を得ることができる。
【0049】
実施の形態4.
上記実施の形態3では、暗号回路10からの暗号処理動作起動の要求に基づいてCPUコア7のクロックを間引きする場合について説明したが、本実施の形態4では、電流値に基づいてCPUコア7のクロックを間引きする場合について説明する。
図9は、本実施の形態4における暗号処理装置の構成を示す説明図である。図9において、21は電源端子、22は電流監視回路である。その他同じ符号を付したものは図7と同様のため、説明は省略する。
なお、電流監視回路22が電力検知手段に相当し、制御手段9が電力調整手段に相当する。
【0050】
上記実施の形態3と同様に、チップ総電力が常に所定の電力値になるように動作する。
暗号回路10により暗号処理が開始されると、暗号回路10が動作する前と比較して、電流値が高くなる。このため、電流監視回路22により電流値を監視し、超過電流を検知すると、電流監視回路22は、間引き制御回路92にクロックの間引き処理を指示する。間引き指示を受けた間引き制御回路92は、所定の値に間引きしたクロックをCPUコア7に出力する。これによりCPUコア7の電力が所定の値に低減される。
また、暗号回路10による暗号処理が終了すると、暗号回路10の動作中と比較して、電流値が低くなる。このため、電流監視回路22により電流値を監視し、所定電流値を下回る電流値を検知すると、電流監視回路22は、間引き制御回路92に間引きのないクロックへの復帰を指示する。これにより、CPUコア7の電力値は、暗号回路10による暗号処理開始前に戻り、チップ総電力が常に所定の電力値に保たれる。
【0051】
また、上記電流監視回路22の代わりに電圧監視回路を設け、電流が大きくなると電源回路の遅れにより一時的に電圧が低下することを検出し、CPUクロックパルスの間引きを実施することによって、チップ総電力を常に所定の電力値に保つことができる。
【0052】
以上説明したように、電流値あるいは電圧値の変化に基づいてCPUコアのクロックを間引きすることにより、低電力で、かつ電力変動を測定することによる暗号解読を防止することができる。
【0053】
なお、上記実施の形態3の場合と同様に、間引きパターンレジスタ93を設け、間引きクロックの値を微調整することにより、精度のよい電力制御を実現することができる。
【0054】
また、本実施の形態4では、CPUコア7の電力を所定の値に低減するのに、CPUコア7に出力するクロックを所定の値に間引きする場合について説明したが、CPUコア7の電力を所定の値に低減できればこれに限られず、周波数を下げたり、クロックを停止する等の処理を行なっても同様の効果を得ることができる。
【0055】
なお、上記実施の形態1〜4では、電力変動を測定することによる暗号解読を防止することのできる暗号処理装置について説明したが、電力変動を測定することによる解読を防止する場合であれば暗号処理装置に限られず、他の装置であっても同様の効果を得ることができる。
【0056】
【発明の効果】
以上のように、複数のハードウェアを備えた暗号処理装置において、前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知する電力検知手段と、前記電力検知手段により検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整する電力調整手段とを備えることにより、低電力で、かつ電力変動を測定することによる暗号解読を防止することができるという効果がある。
【図面の簡単な説明】
【図1】実施の形態1における暗号処理装置の構成を示す説明図
【図2】一般的な暗号処理装置の電力推移を示す説明図
【図3】電力変動検知手段4の内部回路の構成を示す説明図
【図4】実施の形態1における暗号処理装置の電力推移を示す説明図
【図5】実施の形態2における電力変動検知手段4の内部回路の構成を示す説明図
【図6】実施の形態2における暗号処理装置の構成を示す説明図
【図7】実施の形態3における暗号処理装置の構成を示す説明図
【図8】CPUクロックの間引きパターンの例を示す説明図
【図9】実施の形態4における暗号処理装置の構成を示す説明図
【符号の説明】
1 CPUコア
2 主記憶
3 周辺回路
4 電力変動検知手段
5 制御手段
6 バス
7 CPUコア
8 クロック発振器
9 制御手段
10 暗号回路
11 プロセッサ
12 キャッシュコントローラ
13 キャッシュメモリ
21 電源端子
22 電流監視回路
41 アドレスデコーダ
42 周辺回路電力レジスタ
43 CPU電力レジスタ
44 主記憶電力レジスタ
45 調整用レジスタ
46 セレクタ
51 電圧変換手段
52 クロック変換手段
91 シーケンス制御回路
92 間引き制御回路
93 間引きパターンレジスタ
94 遅延レジスタ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for preventing an external process from being decrypted, which is a problem in a cryptographic processing device.
[0002]
[Prior art]
If there is power fluctuation in the processing device including the encryption process, the internal operation status can be determined by measuring the current fluctuation of the device power line. As a result, the encryption algorithm can be decrypted and important information can be stolen. Conventionally, in order to prevent this, for example, as described in Japanese Patent Application Laid-Open No. 2001-5731, a power consuming circuit is provided to prevent the processing pattern from being decoded by generating noise.
[0003]
[Problems to be solved by the invention]
In the conventional method, since power is generated due to noise, the overall power consumption tends to increase, and there is a problem that application to a low-power device is difficult. In addition, when there is a pattern in the noise generation method, there is a problem that the power pattern of the encryption process can be extracted by filtering the noise pattern.
[0004]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and eliminates unnecessary power generation means by suppressing fluctuations in power consumption at all times to reduce power consumption and measure power fluctuations. It is an object of the present invention to provide a power leveling control method and a cryptographic processing device that prevent decryption due to the above.
[0005]
[Means for Solving the Problems]
An encryption device according to the present invention is a cryptographic processing device having a plurality of hardware, wherein the cryptographic device is divided into a plurality of predetermined operation periods based on the operation of the plurality of hardware, and each hardware is required in each operation period. Power detection means for detecting the power to be, based on the power of each hardware detected by the power detection means, and so that the total power of each hardware is the same in the predetermined plurality of operation periods, Power adjusting means for adjusting the power of the respective hardware.
[0006]
In addition, a processor, a cache, a main memory, and a peripheral circuit are provided as the plurality of hardware, and the power detection unit includes a cache miss period, a cache hit period, a peripheral circuit operation as the predetermined plurality of operation periods. Are divided into periods.
[0007]
In addition, a processor and an encryption circuit are provided as the plurality of hardware, and the power detection unit divides the predetermined plurality of operation periods into an operation period of the encryption circuit and a non-operation period of the encryption circuit.
[0008]
The power adjusting means adjusts the power of the hardware by increasing or decreasing a clock frequency.
[0009]
Further, the power adjusting means increases or decreases the clock frequency by thinning out clock pulses.
[0010]
Further, when thinning out the clock pulses, the power adjusting means thins out the high potential and the low potential in a balanced manner.
[0011]
The power adjusting means adjusts the power of the hardware by increasing or decreasing a power supply voltage.
[0012]
The power adjusting means adjusts the power of the hardware by increasing or decreasing a threshold voltage.
[0013]
Further, the power adjusting means includes an adjusting register for adjusting, by the processor, a predetermined clock frequency value used when adjusting the power of the hardware by increasing or decreasing a clock frequency.
[0014]
Further, the power adjusting means includes an adjusting register for adjusting, by the processor, a predetermined voltage value used when adjusting the power of the hardware by increasing or decreasing a power supply voltage.
[0015]
Further, the power detection means detects power required by the respective hardware during the respective operation periods, based on a current value.
[0016]
Further, the power detection means detects power required by the respective hardware during the respective operation periods, based on a voltage value.
[0017]
The power leveling control method according to the present invention is a power leveling control method in a cryptographic processing device including a plurality of hardware, and is divided into a plurality of predetermined operation periods based on the operation of the plurality of hardware, In each operation period, the power required by each hardware is detected, and based on the detected power of each hardware, the total power of each hardware is the same in the predetermined plurality of operation periods. Thus, the power of each of the hardware is adjusted.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
FIG. 1 is an explanatory diagram illustrating a configuration of the cryptographic processing device according to Embodiment 1 of the present invention. In FIG. 1, 1 is a CPU core, 2 is a main memory, 3 is a peripheral circuit, 4 is a power fluctuation detecting means, 5 is a control means, and 6 is a bus. The CPU core 1 includes a processor 11, a cache controller 12, and a cache memory 13, and the control unit 5 includes a voltage conversion unit 51 and a clock conversion unit 52. In the first embodiment, a case will be described in which encryption processing is performed as a program.
The power fluctuation detecting means 4 corresponds to a power detecting means, and the power fluctuation detecting means 4 and the control means 5 correspond to a power adjusting means.
[0019]
The processor 11 controls the operation and the activation of the peripheral circuit 3 in accordance with the instructions and data stored in the main memory 2. The code required by the processor 11 is temporarily received by the cache controller 12 and checks whether or not the code is included in the cache memory 13. If it is included in the cache memory 13, it is determined to be a cache hit, and the data is extracted from the cache memory 13 and returned to the processor 11. Otherwise, it is retrieved from the main memory 2, returned to the processor 11, and stored in the cache memory 13 in preparation for the next access. Generally, the access performance of the cache memory 13 is high, and if the code required by the processor 11 is stored in the cache memory 13, the processor 11 can process at high speed.
[0020]
On the other hand, the processor 11 manages the operation of the peripheral circuit 3. The processor 11 performs pre-setting necessary for the operation of the peripheral circuit 3 and starts up. The peripheral circuit 3 operates in accordance with the setting, and when the operation is completed, the operation state is left in the register so that the processor 11 can recognize the end of the processing, or an interrupt signal is generated to notify the processor 11.
[0021]
FIG. 2 is an explanatory diagram showing a power transition of a general cryptographic processing apparatus. In the operation of the apparatus described above, the power transitions as shown in FIG. That is, when the processor 11 executes a new program, the cache memory 13 does not initially contain the corresponding code, so that the cache controller 12 determines that a cache miss has occurred and goes to the main memory 2 to retrieve data. During this time, the processor 11 suspends the processing, so that the internal arithmetic circuit does not operate and the access to the cache memory 13 is stopped. Since only the clock and a part of the state machine are operating, the power consumption of the CPU core 1 including the processor 11, the cache controller 12, and the cache memory 13 is low. On the other hand, since the main memory 2 is frequently accessed, the power consumption is high. (Period of cache miss in FIG. 2)
[0022]
After some time, processor 11 will re-execute the previously read code. At this time, if a code remains in the cache memory 13, a high-speed operation is performed as a cache hit. Since the processor 11 and the cache memory 13 operate at high speed, the power consumption of the CPU core increases. On the other hand, since the access frequency of the main memory 2 decreases, the power decreases. (Period of cache hit in Fig. 2)
[0023]
Next, the processor 11 starts a peripheral circuit start-up process. Although the power consumption of the peripheral circuit 3 that has not been operating so far is low, the processing is started by the access from the processor 11, and the power consumption increases. If there is no other processing, the processor 11 periodically accesses the register of the peripheral circuit 3 to monitor the operation status, or stops operating until a completion interrupt of the peripheral circuit 3 itself is generated. At this time, the power consumption of the CPU core 1 and the main memory 2 is low. (Period of peripheral circuit operation in FIG. 2)
[0024]
Generally, since the power of the CPU core 1, the power of the main memory 2, and the power consumption of the peripheral circuit 3 are independent of each other, the total power consumption of the chip changes in each phase of the above operation. That is, there is a danger that the size of the code and the number of loops can be known from the power fluctuation due to the cache miss, and the operation frequency of the cryptographic circuit can be known when performing cryptographic processing as a program due to the power fluctuation during the operation of the peripheral circuit. The surface becomes weak.
[0025]
Therefore, in the first embodiment, the cache hit / miss determination information and the bus information of the cache controller 12 are incorporated into the power fluctuation detecting means 4.
FIG. 3 is an explanatory diagram showing the configuration of the internal circuit of the power fluctuation detecting means 4. The above information is stored in the peripheral circuit power register 42, the CPU power register 43, and the main memory power register 44. Reference numeral 41 denotes an address decoder.
FIG. 4 is an explanatory diagram showing a power transition of the cryptographic processing apparatus according to the first embodiment. In all states of cache miss, cache hit, and peripheral circuit operation, the power value is the CPU core power of the cache hit in FIG. The figure shows a case where the value is adjusted to be a value obtained by adding the value and the main memory power value.
[0026]
The operation will be described with reference to FIGS.
In the case of the above-mentioned initial cache miss, the CPU power register 43 remains set to 1, the main memory power register 44 is set to 1, and the peripheral circuit power register 42 is set to 0. This indicates that the CPU power is intermediate, the main memory power is high, and the power of peripheral circuits is low. The contents of each register are notified to the control means 5. The set information of the main storage power register 44 is notified to the voltage conversion unit 51 as a voltage change notification indicating the large main storage power. Upon receiving the voltage change notification indicating that the main memory power is high, the voltage conversion unit 51 notifies the main memory 2 of a voltage value corresponding to the high main memory power, and increases the power supply voltage of the main memory 2. The set information of the peripheral circuit power register 42 is notified to the clock conversion unit 52 as a peripheral clock change notification indicating that the peripheral circuit power is low. When receiving the peripheral clock change notification indicating that the peripheral circuit power is low, the clock conversion unit 52 notifies the peripheral circuit 3 of the peripheral clock frequency corresponding to the peripheral circuit power low, and stops or reduces the peripheral clock of the peripheral circuit 3. . As described above, as for the chip power, the power consumption of the main memory 2 increases, and the power consumption of the peripheral circuit 3 decreases. The voltage value notified from the voltage conversion means 51 and the peripheral clock frequency notified from the clock conversion means 52 are adjusted in advance so that the total power of the chip becomes a predetermined power value, and set in the voltage conversion means 51 and the clock conversion means 52. Keep it. (Period of cache miss in FIG. 4)
[0027]
Next, at the time of a cache hit, the CPU power register 43 is set to 2, the main memory power register 44 is set to 0, and the peripheral circuit power register 42 remains set to 0. This indicates that the CPU power is high, the main memory power is low, and the peripheral circuit power is low. The contents of each register are similarly notified to the control means 5. The set information of the CPU power register 43 is notified to the clock conversion unit 52 as a CPU clock change notification indicating that the CPU power is high. When receiving the CPU clock change notification indicating that the CPU power is high, the clock conversion unit 52 notifies the CPU core 1 of the CPU clock frequency corresponding to the high CPU power, and increases the frequency of the CPU clock of the CPU core 1. The set information of the main memory power register 44 is notified to the voltage conversion means 51 in the same manner as in the above case, and the power conversion means 51 notifies the main memory 2 of the voltage value corresponding to the low main memory power, and The voltage of the memory 2 is decreased. As described above, as for the chip power, the power consumption of the CPU core 1 increases and the power consumption of the main memory 2 decreases. The voltage value of the voltage converting means 51 and the CPU clock frequency of the clock converting means 52 are adjusted in advance so that the total power of the chip becomes a predetermined power value, that is, the same power value as that of the cache miss period. The voltage conversion means 51 and the clock conversion means 52 are set in advance. (Period of cache hit in FIG. 4)
[0028]
When the peripheral circuit operates, the CPU power register 43 is set to 0, the peripheral circuit power register 42 is set to 1, and the main memory power register 44 remains set to 0. This indicates that the CPU power is low, the main memory power is low, and the peripheral circuit power is high. The contents of each register are similarly notified to the control means 5. The set information of the CPU power register 43 is notified to the clock conversion means 52 in the same manner as described above, and the clock conversion means 52 notifies the CPU core 1 of the CPU clock frequency corresponding to the low CPU power. Stop or reduce the frequency. Further, the set information of the peripheral circuit power register 42 is notified to the clock conversion means 52 as in the above case, and the clock conversion means 52 notifies the peripheral circuit 3 of the peripheral clock frequency corresponding to the large peripheral circuit power, and 3. Increase the frequency of the peripheral clock. As described above, in the chip power, the power consumption of the CPU core 1 decreases, and the power consumption of the peripheral circuit 3 increases. The CPU clock frequency and the peripheral clock frequency of the clock conversion means 52 are adjusted in advance so that the total power of the chip becomes a predetermined power value, that is, the same power value as that during the cache miss period. Set to. (Period of peripheral circuit operation in FIG. 4)
[0029]
As described above, in each of the cache miss period, the cache hit period, and the peripheral circuit operation period, the power required by each of the CPU core 1, the main memory 2, and the peripheral circuit 3 is detected, and the total chip amount is detected. By setting the power to a predetermined power value, it is possible to prevent the decryption by measuring the power fluctuation with low power.
[0030]
In the first embodiment, three values are used as the CPU clock change notification, two values are used as the peripheral clock change notification, and two values are used as the voltage change notification. However, the present invention is not limited to this. The effect of can be obtained.
[0031]
Embodiment 2 FIG.
In the first embodiment, the voltage conversion unit 51 or the clock conversion unit 52 receives a notification from a register such as the peripheral circuit power register 42, and stores the clock frequency or voltage value corresponding to the notification in the CPU core 1 or the main memory. In the second embodiment, the case where the clock frequency or the voltage value to be notified to the CPU core 1 or the like is finely adjusted will be described.
[0032]
As described with reference to FIG. 3, for example, in the case of the peripheral circuit 3, the peripheral clock frequencies corresponding to the large and small peripheral circuit powers are adjusted by the clock conversion means 52 in advance so that the total power of the chip becomes a predetermined power value. The clock conversion means 52 notifies the peripheral circuit 3 of an appropriate peripheral clock frequency based on the notification from the peripheral circuit power register 42. However, in this case, since the peripheral clock frequencies corresponding to the large and small peripheral circuit powers have already been set to certain values in the clock conversion means 52, the total power of the chip has deviated from the predetermined power value due to a change in the operating environment or the like. In such cases, there was a problem that readjustment was difficult.
[0033]
Thus, in the second embodiment, a case will be described in which a clock frequency and a voltage value can be finely adjusted even after a chip is manufactured by providing an adjustment register. FIG. 5 is an explanatory diagram showing a configuration of an internal circuit of the power fluctuation detecting means 4 according to the second embodiment. In FIG. 5, reference numeral 45 denotes an adjustment register including a peripheral circuit change frequency register 45a, a CPU change frequency register 45b, and a main memory change power 45c, and 46 denotes a selector including 46a to 46c. The standard frequencies and standard voltage values input to the selectors 46a to 46c are the same as the values set in advance in the voltage conversion means 51 and the clock conversion means 52 in FIG. 1 of the first embodiment. The other components denoted by the same reference numerals are the same as those in FIG.
[0034]
The operation will be described with reference to FIG. For example, a case where fine adjustment is performed by lowering the peripheral clock when the power of the peripheral circuit is high because the total power of the chip becomes higher than a predetermined power value during the operation of the peripheral circuit will be described. It is assumed that the CPU core 1 monitors whether or not the total power of the chip has deviated from a predetermined power value.
Since the chip total power has become higher than the predetermined power value, the CPU core 1 notifies the peripheral circuit change frequency register 45a of the information that the peripheral clock is reduced when the peripheral circuit power is high. The peripheral circuit change frequency register 45a outputs the change frequency to the selector 46a based on the notification from the CPU core 1. For example, the peripheral circuit change frequency register 45a holds the frequency of plus and minus two steps at a frequency width of αHz, that is, holds the frequencies of −2αHz, −αHz, + αHz, and + 2αHz. Based on this, the change frequency is selected and output to the selector 46a.
[0035]
On the other hand, the set information of the peripheral circuit power register 42 is notified to the selector 46a as a peripheral clock change notification indicating that the peripheral circuit power is high. The selector 46a also receives the standard frequency before the change, and also receives the change frequency from the peripheral circuit change frequency register 45a. The selector 46a uses the input from the peripheral circuit power register 42 and the input from the peripheral circuit change frequency register 45a and the standard frequency to determine the changed frequency including the change of the change frequency with respect to the standard frequency corresponding to the large peripheral circuit power, The clock converter 52 is notified as a peripheral clock change notification. The clock conversion unit 52 notifies the peripheral circuit 3 of the notified frequency after the change, and increases the peripheral clock of the peripheral circuit 3 to the frequency after the change. Other operations are the same as those in the first embodiment, and a description thereof will not be repeated.
[0036]
As described above, a register that holds a plurality of voltage values for fine adjustment is provided, and when the total power of the chip deviates from a predetermined power value, by selecting an appropriate register from among the registers, the total power of the chip is reduced. Even when the power value deviates from the predetermined value, readjustment can be easily performed.
[0037]
In the second embodiment, a case has been described in which the total power of the chip is higher than a predetermined power value during the period of the peripheral circuit operation, so that the peripheral clock when the peripheral circuit power is high and the peripheral clock is reduced to perform the fine adjustment. The same applies to the case where the fine adjustment is made high or the peripheral circuit power is low, and the same effect can be obtained when the clock or voltage value of the CPU core 1 or the main memory 2 is finely adjusted.
[0038]
The power control of the main memory can be performed by changing the threshold voltage in addition to the power supply voltage. In this case, when the main memory power register 44 in the power fluctuation detecting means 4 is set to 1, activation and power increase are performed by lowering the threshold voltage, and deactivation and power reduction are performed by increasing the threshold voltage. be able to.
[0039]
In the second embodiment, the case where the adjustment register 45 is provided in the power fluctuation detecting means 4 has been described. However, the power fluctuation detecting means 4 may be provided separately from the power fluctuation detecting means 4 as shown in FIG. Absent.
[0040]
Embodiment 3 FIG.
In the first embodiment, the case of a cryptographic processing device that performs cryptographic processing as a program has been described. In the third embodiment, a case of a cryptographic processing device including a cryptographic circuit will be described.
[0041]
FIG. 7 is an explanatory diagram illustrating the configuration of the cryptographic processing device according to the third embodiment. In FIG. 7, 11 is a bus, 7 is a CPU core, 8 is a clock oscillator, 9 is control means, and 10 is an encryption circuit. The control means 9 includes a sequence control circuit 91, a thinning control circuit 92, a thinning pattern register 93, and a delay register 94.
Note that the control unit 9 corresponds to a power detection unit and a power adjustment unit.
[0042]
The clock oscillator 8 supplies a basic clock to the control means 9, and the control means 9 supplies a clock to the CPU core 7. The CPU core 7 controls the control means 9 and the encryption circuit 10 via the bus 6.
As in the first embodiment, the operation is performed so that the total chip power is always a predetermined power value.
[0043]
When an operation start of the encryption circuit 10 is instructed by the CPU core 7 via the bus 6, the encryption circuit 10 validates a request signal for starting the encryption processing operation to the sequence control circuit 91. The sequence control circuit 91 that has received the request to start the cryptographic processing operation outputs a permission signal to the cryptographic circuit 10 and, at the same time, instructs the thinning control circuit 92 to lower the clock in order to reduce the power of the CPU core 7, for example, Instruct thinning processing. The thinning control circuit 92 having received the thinning instruction outputs a clock thinned to a predetermined value to the CPU core 7. As a result, the power of the CPU core 7 is reduced to a predetermined value. When ending the encryption processing operation, the encryption circuit 10 invalidates the request signal. The sequence control circuit 91 instructs the thinning control circuit 92 to end the thinning based on the operation of the encryption circuit 10, and the thinning control circuit 92 returns to the clock without thinning.
Note that the thinning control circuit 92 which has received the thinning instruction outputs a clock thinned to a predetermined value to the CPU core 7, and the thinning clock having the predetermined value is adjusted in advance so that the total power of the chip becomes a predetermined power value. Then, it is set in the thinning control circuit 92.
[0044]
As described above, by thinning out the clock of the CPU core based on the request for starting the cryptographic processing operation from the cryptographic circuit, it is possible to prevent decryption at low power and by measuring power fluctuation.
[0045]
In the third embodiment, the case has been described where the thinning-out clock of the predetermined value is adjusted in advance so that the total power of the chip becomes the predetermined power value and set in the thinning-out control circuit 92. As in the case of the second embodiment, a thinning pattern register 93 may be provided to finely adjust the value of the thinning clock.
For example, the values of a plurality of thinning clocks as shown in FIG. 8 are held in the thinning pattern register 93, and the values of the thinning clocks are finely adjusted. Thus, accurate power control can be realized.
[0046]
In the third embodiment, the sequence control circuit 91 outputs a permission signal to the encryption circuit 10 based on the activation request of the encryption processing operation from the encryption circuit 10, and simultaneously performs the clock thinning process to the thinning control circuit 92. Although the case where the instruction is given has been described, the delay register 94 may be provided in consideration of the fall (rise) of the CPU core 7 and the rise (fall) of the encryption circuit 10. Similarly to the above-described fine adjustment of the value of the thinning clock, a combination of the timing of outputting the permission signal to the encryption circuit 10 and the timing of instructing the thinning control circuit 92 to perform the thinning processing of the clock is held in the multiple delay register 94. The instruction timing of the process is finely adjusted so that the total chip power at the time of the falling (rising) of the CPU core 7 and the rising (falling) of the encryption circuit 10 approaches a predetermined voltage value. Thus, accurate power control can be realized.
It is assumed that the CPU core 1 monitors which timing should be selected in order to bring the total power of the chip closer to the predetermined power value.
[0047]
8 is an example in which the clock pulse is extracted at the same ratio as W-4, but the high potential side is maintained during the period in which the clock pulse is extracted. W-4 maintains the low potential side while the clock pulse is removed, but uses the W-4 format and the W-5 format alternately to make the high potential period and low potential period uniform. This has the effect of eliminating the DC component of the clock.
[0048]
Further, in the third embodiment, a case has been described where the clock output to the CPU core 7 is thinned out to a predetermined value in order to reduce the power of the CPU core 7 to a predetermined value. The present invention is not limited to this as long as it can be reduced to a predetermined value, and the same effect can be obtained by performing processing such as lowering the frequency or stopping the clock.
[0049]
Embodiment 4 FIG.
In the third embodiment, the case where the clock of the CPU core 7 is thinned out based on the request for starting the encryption processing operation from the encryption circuit 10 has been described. However, in the fourth embodiment, the CPU core 7 is thinned based on the current value. Will be described.
FIG. 9 is an explanatory diagram illustrating the configuration of the cryptographic processing device according to the fourth embodiment. In FIG. 9, 21 is a power supply terminal, and 22 is a current monitoring circuit. The other components denoted by the same reference numerals are the same as those in FIG.
Note that the current monitoring circuit 22 corresponds to power detection means, and the control means 9 corresponds to power adjustment means.
[0050]
As in the third embodiment, the operation is performed so that the total chip power is always a predetermined power value.
When the encryption processing is started by the encryption circuit 10, the current value becomes higher than before the encryption circuit 10 operates. Therefore, when the current value is monitored by the current monitoring circuit 22 and an excess current is detected, the current monitoring circuit 22 instructs the thinning control circuit 92 to perform a clock thinning process. The thinning control circuit 92 having received the thinning instruction outputs a clock thinned to a predetermined value to the CPU core 7. As a result, the power of the CPU core 7 is reduced to a predetermined value.
Further, when the encryption processing by the encryption circuit 10 is completed, the current value becomes lower than during the operation of the encryption circuit 10. Therefore, when the current value is monitored by the current monitoring circuit 22 and a current value lower than the predetermined current value is detected, the current monitoring circuit 22 instructs the thinning control circuit 92 to return to a clock without thinning. As a result, the power value of the CPU core 7 returns to before the encryption processing by the encryption circuit 10 starts, and the total power of the chip is always kept at the predetermined power value.
[0051]
In addition, a voltage monitoring circuit is provided instead of the current monitoring circuit 22. When the current increases, it is detected that the voltage temporarily drops due to the delay of the power supply circuit, and the CPU clock pulse is thinned out to reduce the total chip amount. The power can always be kept at a predetermined power value.
[0052]
As described above, by thinning out the clock of the CPU core based on the change in the current value or the voltage value, it is possible to prevent decryption at low power and by measuring power fluctuation.
[0053]
As in the third embodiment, by providing the thinning pattern register 93 and finely adjusting the value of the thinning clock, accurate power control can be realized.
[0054]
In the fourth embodiment, a case has been described in which the clock output to the CPU core 7 is thinned out to a predetermined value in order to reduce the power of the CPU core 7 to a predetermined value. The present invention is not limited to this as long as it can be reduced to a predetermined value, and the same effect can be obtained by performing processing such as lowering the frequency or stopping the clock.
[0055]
In the first to fourth embodiments, the cryptographic processing apparatus capable of preventing decryption by measuring power fluctuation has been described. The same effect can be obtained not only in the processing apparatus but also in other apparatuses.
[0056]
【The invention's effect】
As described above, in a cryptographic processing device including a plurality of hardware, the power required by each hardware is divided into a plurality of predetermined operation periods based on the operation of the plurality of hardware. Power detection means for detecting the power of each hardware detected by the power detection means, and so that the total power of each hardware is the same in the predetermined plurality of operation periods, The provision of the power adjusting means for adjusting the power of the hardware has an effect that the decryption can be prevented with low power and by measuring the power fluctuation.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing a configuration of a cryptographic processing device according to a first embodiment.
FIG. 2 is an explanatory diagram showing a power transition of a general cryptographic processing device.
FIG. 3 is an explanatory diagram showing a configuration of an internal circuit of the power fluctuation detecting means 4;
FIG. 4 is an explanatory diagram showing a power transition of the cryptographic processing device according to the first embodiment.
FIG. 5 is an explanatory diagram showing a configuration of an internal circuit of a power fluctuation detecting unit 4 according to the second embodiment.
FIG. 6 is an explanatory diagram showing a configuration of a cryptographic processing device according to a second embodiment.
FIG. 7 is an explanatory diagram showing a configuration of a cryptographic processing device according to a third embodiment.
FIG. 8 is an explanatory diagram showing an example of a thinning pattern of a CPU clock.
FIG. 9 is an explanatory diagram showing a configuration of a cryptographic processing device according to a fourth embodiment.
[Explanation of symbols]
1 CPU core
2 Main memory
3 Peripheral circuit
4 Power fluctuation detection means
5 control means
6 bus
7 CPU core
8 Clock oscillator
9 Control means
10 Cryptographic circuit
11 processor
12 Cache controller
13 Cache memory
21 Power supply terminal
22 Current monitoring circuit
41 address decoder
42 Peripheral circuit power register
43 CPU power register
44 Main Memory Power Register
45 Adjustment register
46 Selector
51 Voltage conversion means
52 Clock conversion means
91 Sequence control circuit
92 Thinning-out control circuit
93 Thinning-out pattern register
94 Delay Register

Claims (13)

複数のハードウェアを備えた暗号処理装置において、
前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知する電力検知手段と、
前記電力検知手段により検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整する電力調整手段
とを備えること特徴とする暗号処理装置。
In a cryptographic processing device having a plurality of hardware,
Power detection means for dividing into a plurality of predetermined operation periods based on the operation of the plurality of hardware, and detecting power required by each hardware in each operation period,
Power for adjusting the power of each hardware based on the power of each hardware detected by the power detection means and so that the total power of each hardware is the same during the predetermined plurality of operation periods An encryption processing device comprising an adjustment unit.
前記複数のハードウェアとして、プロセッサ、キャッシュ、主記憶、周辺回路を備えると共に、
前記電力検知手段は、前記所定の複数の動作期間として、キャッシュミスの期間、キャッシュヒットの期間、周辺回路動作の期間に分ける
ことを特徴とする請求項1記載の暗号処理装置。
As the plurality of hardware, a processor, a cache, a main memory, a peripheral circuit,
2. The cryptographic processing apparatus according to claim 1, wherein the power detection unit divides the predetermined plurality of operation periods into a cache miss period, a cache hit period, and a peripheral circuit operation period.
前記複数のハードウェアとして、プロセッサ、暗号回路を備えると共に、
前記電力検知手段は、前記所定の複数の動作期間として、暗号回路の動作期間、暗号回路の非動作期間に分ける
ことを特徴そする請求項1記載の暗号処理装置。
A processor and a cryptographic circuit are provided as the plurality of hardware,
2. The encryption processing device according to claim 1, wherein the power detection unit divides the predetermined plurality of operation periods into an operation period of an encryption circuit and a non-operation period of the encryption circuit.
前記電力調整手段は、クロック周波数を増減することにより前記ハードウェアの電力を調整する
ことを特徴とする請求項1記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein the power adjusting unit adjusts the power of the hardware by increasing or decreasing a clock frequency.
前記電力調整手段は、クロックのパルスを間引くことによりクロック周波数を増減する
ことを特徴とする請求項4記載の暗号処理装置。
5. The cryptographic processing apparatus according to claim 4, wherein the power adjusting unit increases or decreases the clock frequency by thinning out clock pulses.
前記電力調整手段は、クロックのパルスを間引く際、高電位と低電位とを均衡して間引く
ことを特徴とする請求項5記載の暗号処理装置。
6. The cryptographic processing apparatus according to claim 5, wherein the power adjusting unit balances the high potential and the low potential when thinning out the clock pulse.
前記電力調整手段は、電源電圧を増減することにより前記ハードウェアの電力を調整する
ことを特徴とする請求項1記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein the power adjusting unit adjusts the power of the hardware by increasing or decreasing a power supply voltage.
前記電力調整手段は、閾値電圧を増減することにより前記ハードウェアの電力を調整する
ことを特徴とする請求項1記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein the power adjustment unit adjusts the power of the hardware by increasing or decreasing a threshold voltage.
前記電力調整手段は、クロック周波数を増減することにより前記ハードウェアの電力を調整する際に用いる所定のクロック周波数値を、前記プロセッサにより調整する調整用レジスタを備える
ことを特徴とする請求項2または3のいずれかに記載の暗号処理装置。
3. The power adjustment unit according to claim 2, further comprising an adjustment register that adjusts, by the processor, a predetermined clock frequency value used when adjusting the power of the hardware by increasing or decreasing a clock frequency. 3. The encryption processing device according to any one of 3.
前記電力調整手段は、電源電圧を増減することにより前記ハードウェアの電力を調整する際に用いる所定の電圧値を、前記プロセッサにより調整する調整用レジスタを備える
ことを特徴とする請求項2または3のいずれかに記載の暗号処理装置。
4. The power adjustment unit according to claim 2, further comprising an adjustment register that adjusts a predetermined voltage value used when adjusting power of the hardware by increasing or decreasing a power supply voltage by the processor. The cryptographic processing device according to any one of the above.
前記電力検知手段は、電流値に基づいて、前記それぞれの動作期間において前記それぞれのハードウェアが必要とする電力を検知する
ことを特徴とする請求項1記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein the power detection unit detects power required by the respective hardware during the respective operation periods based on a current value.
前記電力検知手段は、電圧値に基づいて、前記それぞれの動作期間において前記それぞれのハードウェアが必要とする電力を検知する
ことを特徴とする請求項1記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein the power detection unit detects power required by the respective hardware during the respective operation periods based on a voltage value.
複数のハードウェアを備えた暗号処理装置における電力平準化制御方法であって、
前記複数のハードウェアの動作に基づいて所定の複数の動作期間に分け、それぞれの動作期間においてそれぞれのハードウェアが必要とする電力を検知し、
前記検知したそれぞれのハードウェアの電力に基づき、かつそれぞれのハードウェアの総電力が前記所定の複数の動作期間において同一となるように、前記それぞれのハードウェアの電力を調整する
ことを特徴とする電力平準化制御方法。
A power leveling control method in a cryptographic processing device having a plurality of hardware,
Dividing into a plurality of predetermined operation periods based on the operation of the plurality of hardware, detecting power required by each hardware in each operation period,
The power of each of the hardware is adjusted based on the detected power of each of the hardware and such that the total power of each of the hardware is the same in the plurality of predetermined operation periods. Power leveling control method.
JP2002209572A 2002-07-18 2002-07-18 Cryptographic processing device and power leveling control method Pending JP2004056363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002209572A JP2004056363A (en) 2002-07-18 2002-07-18 Cryptographic processing device and power leveling control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002209572A JP2004056363A (en) 2002-07-18 2002-07-18 Cryptographic processing device and power leveling control method

Publications (1)

Publication Number Publication Date
JP2004056363A true JP2004056363A (en) 2004-02-19

Family

ID=31933380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002209572A Pending JP2004056363A (en) 2002-07-18 2002-07-18 Cryptographic processing device and power leveling control method

Country Status (1)

Country Link
JP (1) JP2004056363A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8407452B2 (en) 2008-06-30 2013-03-26 Fujitsu Limited Processor for performing encryption mask processing using randomly generated instructions and data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8407452B2 (en) 2008-06-30 2013-03-26 Fujitsu Limited Processor for performing encryption mask processing using randomly generated instructions and data

Similar Documents

Publication Publication Date Title
JP4249701B2 (en) Integrated graphics device power management
US7290156B2 (en) Frequency-voltage mechanism for microprocessor power management
US6192479B1 (en) Data processing with progressive, adaptive, CPU-driven power management
EP0706108A2 (en) Clock control circuits for microprocessors
US7346791B2 (en) Method for controlling a clock frequency of an information processor in accordance with the detection of a start and a end of a specific processing section
US11644884B2 (en) Controlling a processor clock
JP2005346301A (en) Task management method, task management device, semiconductor integrated circuit, electronic device, and task management system
JPH11184554A (en) Clock control type information processor
US7228445B2 (en) Clock frequency control method and electronic apparatus
US6269043B1 (en) Power conservation system employing a snooze mode
US5963068A (en) Fast start-up processor clock generation method and system
EP1688820A2 (en) Clock supplying method and information processing apparatus
US6255882B1 (en) Method and system of switching clock signal
CN118534990A (en) A dynamic voltage frequency adjustment system, related method and storage medium
JP2024525390A (en) SYSTEM AND METHOD FOR ENABLED CLOCK STRETCHING DURING OVERCLOCKING IN RESPONSE TO VOLTAGE DROOP - Patent application
US5918058A (en) Routing of clock signals in a data processing circuit with a power saving mode of operation
JP2003202935A (en) Power management method and power management method
JP2004512614A (en) Hardware architecture of a multi-mode power management system using a fixed time reference for operating system support
US7167996B2 (en) Micro controller unit
JP2004056363A (en) Cryptographic processing device and power leveling control method
US8402288B2 (en) Apparatus and method for controlling voltage and frequency using multiple reference circuits
EP0602422A1 (en) Dynamic frequency shifting with divide by one clock generators
JPH11296251A (en) Information processing device
JP2002278643A (en) Data processor and power saving method therefor
JPH10301658A (en) Computer

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040707