JP2011234312A - Operation device and central processing unit - Google Patents
Operation device and central processing unit Download PDFInfo
- Publication number
- JP2011234312A JP2011234312A JP2010105648A JP2010105648A JP2011234312A JP 2011234312 A JP2011234312 A JP 2011234312A JP 2010105648 A JP2010105648 A JP 2010105648A JP 2010105648 A JP2010105648 A JP 2010105648A JP 2011234312 A JP2011234312 A JP 2011234312A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- data
- switching control
- control signal
- register
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Abstract
Description
この発明は、演算装置および中央処理装置に関し、特に暗号処理に対する電力解析攻撃への耐性を高めた演算装置および中央処理装置に関する。 The present invention relates to an arithmetic unit and a central processing unit, and more particularly to an arithmetic unit and a central processing unit that have improved resistance to power analysis attacks against cryptographic processing.
電力解析攻撃は、暗号処理中の回路の消費電力を解析することによって、処理されている秘密情報を取得するものである。代表的な手法として、DPA(Differential Power Analysis:差分電力解析)やCPA(Correlation Power Analysis:相関電力解析)がある(非特許文献1〜3を参照)。電力解析攻撃に対する耐性を高める方法として、たとえば以下の文献に記載の技術が知られている。
In the power analysis attack, the secret information being processed is obtained by analyzing the power consumption of the circuit during the cryptographic process. Typical techniques include DPA (Differential Power Analysis) and CPA (Correlation Power Analysis) (see Non-Patent
特開2008−269060号公報(特許文献1)に記載の半導体集積回路は、メモリと、主制御手段と、データバスと、使用状態判定手段と、無効データ生成手段と、バス制御手段とを含む。メモリには、セキュリティデータまたはそのデータ処理手順が記憶される。主制御手段は、データ処理手順の実行を制御する。データバスは、データ処理手順の実行で用いられる伝送データを伝送する。使用状態判定手段は、データバスに接続された周辺装置の全てについてデータバスに対する伝送データの入出力を制御する伝送制御信号に基づいて、データバスが使用されているか否かを検出する。無効データ生成手段は、無効データを生成する。バス制御手段は、データバスが使用されていないと判定された場合に、データバスに対して無効データを出力する。 A semiconductor integrated circuit described in Japanese Patent Laying-Open No. 2008-269060 (Patent Document 1) includes a memory, a main control unit, a data bus, a usage state determination unit, an invalid data generation unit, and a bus control unit. . The memory stores security data or a data processing procedure thereof. The main control means controls execution of the data processing procedure. The data bus transmits transmission data used in executing the data processing procedure. The use state determination means detects whether or not the data bus is used based on a transmission control signal for controlling input / output of transmission data to / from the data bus for all peripheral devices connected to the data bus. The invalid data generation means generates invalid data. The bus control means outputs invalid data to the data bus when it is determined that the data bus is not used.
特表2002−526849号公報(特許文献2)に記載された暗号化方法では、暗号処理に関するデータビット語をメモリセルまたはレジスタに書込む前に、乱数に基づいて生成されたデータビット語をメモリセルまたはレジスタに格納する。 In the encryption method described in Japanese Patent Publication No. 2002-526849 (Patent Document 2), the data bit word generated based on the random number is stored in the memory before the data bit word related to the encryption process is written in the memory cell or the register. Store in cell or register.
特開2006−19872号公報(特許文献3)は、DES(Data Encryption Standard)など複数段のラウンド関数の繰り返し処理を含む暗号アルゴリズムを実行する暗号処理装置について開示する。この暗号処理装置では、ラウンドごとのデータ処理を実行する関数演算部に対してラウンド遷移時に乱数が入力され、その後、レジスタに格納された中間データが入力され、演算処理が実行される。 Japanese Patent Laying-Open No. 2006-19872 (Patent Document 3) discloses a cryptographic processing apparatus that executes a cryptographic algorithm including a repetition process of a multi-stage round function such as DES (Data Encryption Standard). In this cryptographic processing apparatus, a random number is input at the time of a round transition to a function calculation unit that executes data processing for each round, and thereafter intermediate data stored in a register is input to perform calculation processing.
上記の特開2008−269060号公報(特許文献1)は、CPU(Central Processing Unit:中央処理装置)とメモリとの間でデータバスを介したデータ転送時に発生する消費電力に着目した電力解析攻撃を防御する技術を開示するものである。しかしながら、この技術では、CPU内部で実行される演算時の消費電力に着目した攻撃を防御することができない。 The above-mentioned Japanese Patent Application Laid-Open No. 2008-269060 (Patent Document 1) discloses a power analysis attack that focuses on power consumption generated during data transfer between a CPU (Central Processing Unit) and a memory via a data bus. The technique which defends is disclosed. However, with this technology, it is not possible to defend against attacks that focus on power consumption during computations executed inside the CPU.
上記の特表2002−526849号公報(特許文献2)は、メモリまたはレジスタはデータを書込む際の消費電力に対する攻撃を防御する技術を開示するものである。しかしながら、この技術では、CPUがメモリまたはレジスタに記憶されたデータを使用して演算処理を行なう際の消費電力に基づく電力解析攻撃を防御することはできない。 The above Japanese translation of PCT publication No. 2002-526849 (Patent Document 2) discloses a technique for protecting an attack against power consumption when a memory or register writes data. However, this technique cannot prevent a power analysis attack based on power consumption when the CPU performs arithmetic processing using data stored in a memory or a register.
上記の特開2006−19872号公報(特許文献3)に開示される技術は、DESなどの特定の暗号についての暗号処理を実行する暗号回路に対する電力解析攻撃に対する耐性を向上させるものであり、CPU内部で実行される演算時の消費電力に着目した攻撃を防御することができない。 The technique disclosed in the above Japanese Patent Application Laid-Open No. 2006-19872 (Patent Document 3) improves the resistance to a power analysis attack against a cryptographic circuit that executes cryptographic processing for a specific cipher such as DES, and the CPU It is not possible to defend against attacks that focus on power consumption during computations executed internally.
さらに、上記の特開2008−269060号公報(特許文献1)に記載された一部の実施形態、および特表2002−526849号公報(特許文献2)および特開2006−19872号公報(特許文献3)に開示された各実施形態を実現するためには乱数が必要であり、必要なビット数の乱数を高速に発生することが困難であるという問題もある。 Furthermore, some embodiments described in the above Japanese Patent Application Laid-Open No. 2008-269060 (Patent Document 1), Japanese Patent Application Publication No. 2002-526849 (Patent Document 2), and Japanese Patent Application Laid-Open No. 2006-19872 (Patent Document). In order to realize each embodiment disclosed in 3), a random number is necessary, and it is difficult to generate a random number having a necessary number of bits at high speed.
この発明の目的は、従来の設計を大きく変えることなく、電力解析攻撃への耐性を高めることが可能な演算装置およびCPUを提供することである。 An object of the present invention is to provide an arithmetic device and a CPU that can increase resistance to power analysis attacks without greatly changing the conventional design.
この発明の実施の一形態による演算装置は、記憶部と、演算部とを備える。演算部は、記憶部から受けた1または複数のソースデータを用いて算術演算または論理演算を行なう。記憶部および演算部の各々は、活性状態または非活性状態になる切替制御信号と、時間的に変化するとともに1または複数のソースデータとは無関係なデータ信号とを受ける。記憶部は、切替制御信号が非活性化されたことに応答して1または複数のソースデータを演算部に出力し、切替制御信号が活性化されたことに応答して上記の無関係なデータ信号に基づく1または複数のデータを演算部に出力する。演算部は、切替制御信号が非活性化されたことに応答して1または複数のソースデータに対して算術演算または論理演算を行なった演算結果を出力し、切替制御信号が活性化されたことに応答して上記の無関係なデータ信号に基づくデータを出力する。 An arithmetic device according to an embodiment of the present invention includes a storage unit and a calculation unit. The arithmetic unit performs an arithmetic operation or a logical operation using one or a plurality of source data received from the storage unit. Each of the storage unit and the calculation unit receives a switching control signal that is in an active state or an inactive state, and a data signal that changes over time and is irrelevant to one or more source data. The storage unit outputs one or a plurality of source data to the arithmetic unit in response to the switching control signal being inactivated, and the irrelevant data signal in response to the switching control signal being activated. One or a plurality of data based on the above is output to the arithmetic unit. The arithmetic unit outputs an operation result obtained by performing an arithmetic operation or a logical operation on one or a plurality of source data in response to the switching control signal being deactivated, and the switching control signal is activated. In response to the above, data based on the irrelevant data signal is output.
上記の実施の形態によれば、演算装置を構成する記憶部および演算部は、切替制御信号が活性化されたことに応答して演算に用いるソースデータと無関係なデータを出力するので、演算装置に対する電力解析攻撃への耐性を高めることができる。 According to the above embodiment, since the storage unit and the calculation unit constituting the calculation device output data unrelated to the source data used for calculation in response to the activation of the switching control signal, the calculation device Can be more resistant to power analysis attacks.
一般に、CPUは、ALU(Arithmetic Logic Unit:算術論理演算ユニット)を使用する命令(たとえば、算術演算命令、論理演算命令)の実行時には複数のデータソースから2つのデータソースを選択し、それらをALUの入力データとして、ALUが入力データを用いて命令で指定された演算を実行する。一方、ALUを使用しない命令の実行時には、ALUへの入力データは、特に意味のあるデータである必要はない。典型的には、(i)ある決まった状態(たとえば、全て0のデータなどの固定値)となる場合と、(ii)最後にALUが使用された際に選択されたデータソースが入力され続ける場合とがある。ALUの出力データ(演算結果)についても、ALUを使用しない命令の実行時には、上記の(i)と同様となる場合がある。これらはCPUの設計に依存して決まる。 In general, a CPU selects two data sources from a plurality of data sources when executing an instruction (for example, an arithmetic operation instruction or a logical operation instruction) using an ALU (Arithmetic Logic Unit), As the input data, the ALU executes the operation specified by the instruction using the input data. On the other hand, when an instruction that does not use an ALU is executed, the input data to the ALU does not have to be particularly meaningful data. Typically, (i) in a certain state (for example, a fixed value such as all zero data), and (ii) the data source selected when the ALU was last used is continuously input. There are cases. The output data (calculation result) of the ALU may be the same as (i) above when executing an instruction that does not use the ALU. These are determined depending on the design of the CPU.
従来のCPUで、秘密情報(たとえば、暗号処理における鍵情報など)を扱うと、上記の(i)の場合、ALUを使用する命令の実行時には演算装置(ALUおよびレジスタ群)の内部に出現するデータ(たとえば、ALUの入力データや出力データ)のハミング重みを選択関数とした電力解析によって秘密情報が漏洩する可能性がある。なぜなら、演算装置を構成するCMOS(Complementary Metal-Oxide Semiconductor)回路では、「0」から「1」、または「1」から「0」に変化する信号の数(すなわちハミング距離)と消費電力とに高い相関があるからである。上記の(ii)の場合、データソースとして選択されていたレジスタの内容が変化する際の変化の前後のハミング距離を選択関数とした電力解析によって、秘密情報が漏洩する可能性がある。 When secret information (for example, key information in cryptographic processing) is handled by a conventional CPU, in the case of (i) above, it appears inside the arithmetic unit (ALU and register group) when an instruction using the ALU is executed. There is a possibility that secret information may be leaked by power analysis using a Hamming weight of data (for example, input data and output data of ALU) as a selection function. This is because in a CMOS (Complementary Metal-Oxide Semiconductor) circuit constituting an arithmetic device, the number of signals changing from “0” to “1” or “1” to “0” (ie, Hamming distance) and power consumption This is because there is a high correlation. In the case of (ii) above, there is a possibility that secret information may be leaked by power analysis using the Hamming distance before and after the change when the contents of the register selected as the data source change as a selection function.
これらの電力解析による秘密情報の抽出は、DPA(Differential Power Analysis)やCPA(Correlation Power Analysis)などとして知られている。DPAの場合、多数の入力データに対して消費電力波形を取得し、暗号鍵に相関のある内部変数の値(選択関数と称する)を用いて、取得した消費電力波形が分類される。そして、各グループの電力波形の平均値に差があれば、鍵の予測値が正しいことが分かる。CPAでは、予測した暗号鍵に対して消費電力値を推定し、実際の消費電力波形との相関が調べられる。全ての暗号鍵の候補について相関値を計算した後、最も高い相関値を有する鍵候補が、真と判定される。 Such extraction of secret information by power analysis is known as DPA (Differential Power Analysis), CPA (Correlation Power Analysis), or the like. In the case of DPA, a power consumption waveform is acquired for a large number of input data, and the acquired power consumption waveform is classified using a value of an internal variable correlated with an encryption key (referred to as a selection function). If there is a difference in the average value of the power waveform of each group, it can be seen that the predicted value of the key is correct. In CPA, a power consumption value is estimated for a predicted encryption key, and a correlation with an actual power consumption waveform is examined. After calculating correlation values for all encryption key candidates, the key candidate having the highest correlation value is determined to be true.
この発明では、従来の演算装置やCPUの設計を大きく変えることなく、上記の電力解析攻撃への耐性を高めることが可能な技術が提供される。以下、この発明の実施の形態について図面を参照して詳しく説明する。なお、同一または相当する部分には同一の参照符号を付して、その説明を繰返さない。 The present invention provides a technique capable of enhancing the resistance to the power analysis attack described above without greatly changing the design of a conventional arithmetic device or CPU. Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts are denoted by the same reference numerals, and description thereof will not be repeated.
<実施の形態1>
[演算装置3の構成の概略]
図1は、この発明の実施の形態1に従う演算装置3の構成を示すブロック図である。演算装置3は、CPUのうち演算命令の実行に直接関係する部分である、演算部としてのALU1と、記憶部としてのレジスタ群2とを含む。ALU1は、2個の入力データ(データ1(109)およびデータ2(110))を演算ソースとして内部に含まれる(M+1)個の演算ブロック1_0〜1_M(加算ブロック、論理和ブロック、論理積ブロック、排他的論理和ブロックなど)が演算を実行する。ALU1は、演算種類選択信号100で指定される種類の演算結果111を出力する。レジスタ群2は、ALU1の入力データとして選択され得る複数のソースデータを格納するレジスタファイルであり、(N+1)個のレジスタ2_0〜2_Nを含む。
<
[Outline of Configuration of Arithmetic Unit 3]
FIG. 1 is a block diagram showing a configuration of an
図1の演算装置3が従来の演算装置と異なる点は、ALU1およびレジスタ群2に対して切替制御信号101および切替データ信号102が入力されている点である。図1の場合、切替制御信号101は、活性状態(アクティブ)と非活性状態(インアクティブ)とを有する1ビットの信号である。切替データ信号102は、演算装置3による演算に用いられるソースデータとは無関係な複数ビットの信号である。図2〜図8で説明するように、切替制御信号101が活性化(アサート)された状態では、演算装置3を構成する論理ゲートやフリップフロップなどの複数の回路素子のうち、少なくとも一部の回路素子から出力される信号が切替データ信号102に変更される。これによって、演算装置3内の全ての信号の組合せ(以下、「回路状態」と称する)および演算回路3の出力信号が演算とは無関係な状態に設定できる。一方、切替制御信号101が非活性化(ネゲート)された状態では、演算装置3の動作は従来の演算装置と同じであり、具体的には次のとおりである。
The
まず、演算装置3では演算実行に先立って、レジスタ群2が、データソース選択信号1,2(104,105)に従って、(N+1)個のレジスタ2_0〜2_Nの中から1または複数(通常2個)を選択し、選択したレジスタに格納されたソースデータを入力データ(データ1(109)およびデータ2(110))としてALU1へ出力する。ALU1はレジスタ群2から供給された2個の入力データ109,110に対して複数の演算を並行して実行し、演算種類選択信号100で指定された演算種類に該当する演算結果111を出力する。ALUの設計によっては、ALU1の内部の(M+1)個の演算ブロック1_0〜1_Mのうち、演算種類選択信号100で指定された演算種類に該当する演算ブロックのみに有効なデータを入力し、それ以外の演算ブロックには有効なデータを入力しない(たとえば、全て0の固定値を入力する)ものもある。これによって、ALU1は、必要な演算ブロックのみを動作させる。ALU1が出力した演算結果111は、演算装置3以外で用いられることもあるし、演算装置3内のレジスタ群2に書き込まれることもある。レジスタ群2への書き込みは、書込レジスタ選択信号106および書込イネーブル信号107によって制御される。レジスタ群2には、演算装置3の外部のメモリまたはレジスタなどからデータ(書込データ信号108)が書き込まれる場合もある。レジスタ群2には、さらに、クロック信号112およびリセット信号113が外部から入力される。
First, in the
[従来の演算装置の問題点]
上記のように切替制御信号101がネゲートされている場合の動作、すなわち、従来の演算装置の動作には、電力解析攻撃に対する耐性の観点から次のような問題がある。
[Problems of conventional arithmetic units]
The operation when the switching
第1の問題は、演算装置3を使用しない命令の実行時に、ALU内部の少なくとも1つの演算ブロックへの入力データ信号がある決まった値(たとえば、全て「0」)となる場合に発生する。たとえば、演算装置3を使用しない命令の実行時には、データ1(109)およびデータ2(110)としてある決まった値を出力するようにレジスタ群2を設計したり、ALU1の内部の演算ブロック1_0〜1_Mのうち、演算種類選択信号100で指定された演算種類に該当しない演算ブロックにはある決まった値を入力するようにALU1を設計した場合に、ALU1にある決まった値が入力される。以下、上記の決まった値が全て「0」の場合を想定して説明するが、それ以外の値であっても個々の入力データ信号のビットデータを選択関数とした電力解析によって、秘密情報が漏洩する可能性がある。
The first problem occurs when an input data signal to at least one operation block in the ALU becomes a certain value (for example, all “0”) when an instruction that does not use the
演算装置3を使用しない命令の実行時に、ALU1の内部の演算ブロック1_0〜1_Mの入力データ信号(データ1(109)およびデータ2(110))が全て「0」であり、演算装置3を使用する命令の実行時に入力データ信号が実際に演算に使用される値に変化したとする。そうすると、各演算ブロックの内部では、演算に使用される値のハミング重み(ビット列中の「1」の個数)に依存した消費電力が発生する。なぜなら、入力データ信号の変化するビット数が多い(すなわち、ハミング距離が大きい)ほど、演算ブロックの内部信号はより多く変化し、より多くの電力を消費するからである。上記の場合、ALU1への入力データ信号のハミング重みとハミング距離は等しくなり、入力データのハミング重みを選択関数とした電力解析によって秘密情報が漏洩する可能性がある。演算命令の実行後にALU1への入力データ信号が再び全て「0」に戻る際も同様である。
When an instruction not using the
演算装置3を使用しない命令の実行時に、演算装置3の出力信号の値(すなわち、演算結果111)として、ある決まった値(たとえば、全て「0」)となるように演算装置3が設計された場合も上記と同様の問題が発生する。この場合、演算結果111のハミング重みを選択関数とした電力解析によって秘密情報が漏洩する可能性がある。
The
第2の問題は、演算装置3を使用しない命令の実行時に、最後に演算装置3が使用された際に選択されたデータソースがALU1に入力され続ける場合に発生する。具体的には、ある演算命令を実行する際、演算のデータソースを格納するレジスタと演算結果を格納するレジスタとが同一のレジスタに指定される場合に問題が生じる。この場合、ALU1では演算前後の当該レジスタの内容のハミング距離に応じた消費電力が発生する。したがって、当該ハミング距離を選択関数とした電力解析によって秘密情報が漏洩する可能性がある。
The second problem occurs when an instruction not using the
たとえば、変数「a」と変数「b」との加算結果を変数「c」に代入するプログラム(c=a+b)で、変数「c」と変数「a]とが同じレジスタに割り付けられた場合を考える。この場合、演算実行中のALU1の入力データ109,110は「a」と「b」であるが、演算結果111をレジスタに格納するタイミングでは、「c」と「b」に変化する。前述のように、入力データ信号の変化するビット数が多い(すなわち、ハミング距離が大きい)ほど、演算ブロックの内部信号はより多く変化し、より多くの電力を消費する。入力データ信号の変化するビット数は、「a」と「c」のハミング距離となり、当該ハミング距離を選択関数とした電力解析によって秘密情報が漏洩する可能性がある。
For example, in a program (c = a + b) in which the addition result of the variable “a” and the variable “b” is assigned to the variable “c”, the variable “c” and the variable “a” are allocated to the same register. In this case, the
[演算装置3の詳細な構成]
これらの問題を解決するために、演算装置3を構成する論理ゲートやフリップフロップなどの回路素子のうち少なくとも一部の回路素子にそれぞれ対応して複数の選択回路(セレクタ)が設けられる。この明細書で回路素子とは、論理演算機能または記憶機能を有し、機能的に1まとまりと考えられる単位を意味するものとする。したがって、AND素子やOR素子などの論理ゲート、セレクタ(マルチプレクサ)や加算器などの組合せ回路、フリップフロップなどの順序回路のいずれを回路素子と考えてもよい。
[Detailed Configuration of Arithmetic Unit 3]
In order to solve these problems, a plurality of selection circuits (selectors) are provided corresponding to at least some of the circuit elements such as logic gates and flip-flops constituting the
各選択回路は、対応の回路素子の出力、切替制御信号101、および切替データ信号102を受ける。選択回路は、切替制御信号101がアサートされたことに応答して切替データ信号102を出力し、切替制御信号101がネゲートされたことに応答して対応の回路素子から出力された信号を出力する。
Each selection circuit receives an output of a corresponding circuit element, a switching
演算装置3(ALU1およびレジスタ群2)の設計は、従来の演算装置の設計を大きく変更する必要はなく、典型的には以下のステップで設計される。 The design of the arithmetic device 3 (ALU1 and register group 2) does not require a significant change from the design of the conventional arithmetic device, and is typically designed in the following steps.
(1) 従来技術によるALUとレジスタ群の回路を設計する。
(2) (1)で得られたALUおよびレジスタ群の回路をベースとして、ALUおよびレジスタ群の入出力信号を含む内部信号を生成しているフリップフロップまたは論理ゲートなどの回路素子のうち、全てあるいは一部の回路素子の出力ノードに対してそれぞれセレクタを直列に接続する。
(1) A conventional ALU and register group circuit is designed.
(2) All of the circuit elements such as flip-flops or logic gates that generate internal signals including input / output signals of the ALU and register group based on the ALU and register group circuit obtained in (1) Alternatively, selectors are connected in series to the output nodes of some circuit elements.
(3) (2)で接続したセレクタに、切替制御信号101と切替データ信号102を接続する。各セレクタには、切替データ信号102のうち対応のビットの信号が入力される。
(3) The switching
切替制御信号101をアサートおよびネゲートするタイミングは、変換する全ての回路素子について同じでよい。切替データ信号102の値は、変換する全ての回路素子について同じであっても電力解析攻撃に対する耐性を高める効果がなくはないが、変換する回路素子ごとに別々にビットデータが供給されるほうが望ましい。1つの回路素子に供給される切替データ信号102の値は任意のタイミングで(たとえば、所定の時間が経過する都度、または所定回数の演算を実行する都度)変更される必要がある。もし、切替データ信号102の値が時間的に変化しない固定値であるとすると、個々のビットを選択関数とした電力解析によって秘密情報が漏洩する危険があるので、従来と耐性が変わらなくなるからである。以下、具体的な回路素子に対する設計方法について説明する。
The timing for asserting and negating the switching
図2は、ANDゲートの設計方法について説明するための図である。図2(A)は入力信号IN1,IN2の論理和を出力する従来のANDゲート30を示し、図2(B)は設計変更後のANDゲート32を示す。ANDゲート32は、従来のANDゲート30の出力ノードと直列にセレクタ31を接続したものである。セレクタ31は、ANDゲート30の出力、切替データ信号102、および切替制御信号101を受ける。セレクタ31は、切替制御信号101がアサートされたことに応答して切替データ信号102を出力信号OUTとして出力し、切替制御信号101がネゲートされたことに応答してANDゲート30の出力を出力信号OUTとして出力する。
FIG. 2 is a diagram for explaining a method of designing an AND gate. FIG. 2A shows a conventional AND
図3は、セレクタの設計方法について説明するための図である。図3(A)は選択信号SELに応じて入力信号IN1,IN2のいずれかを出力する従来のセレクタ34を示し、図3(B)は設計変更後のセレクタ36を示す。セレクタ36は、従来のセレクタ34の出力ノードと直列にセレクタ35を接続したものである。セレクタ35は、セレクタ34の出力、切替データ信号102、および切替制御信号101を受ける。セレクタ35は、切替制御信号101がアサートされたことに応答して切替データ信号102を出力信号OUTとして出力し、切替制御信号101がネゲートされたことに応答してセレクタ34の出力を出力信号OUTとして出力する。
FIG. 3 is a diagram for explaining a selector design method. 3A shows a
図4は、D−フリップフロップの設計方法について説明するための図である。図4(A)は従来のD−フリップフロップ37を示し、図4(B)は設計変更後のD−フリップフロップ39を示す。従来のD−フリップフロップ37は、クロック端子CKに入力される入力信号IN2の立上がりエッジで、データ端子Dに入力されている入力信号IN1の論理レベルを保持し、保持した論理レベル(内部論理状態)を出力端子Qから出力信号OUTとして出力する。設計変更後のD−フリップフロップ39は、従来のD−フリップフロップ37の出力端子Qにセレクタ38を接続したものである。セレクタ38は、D−フリップフロップ37の出力、切替データ信号102、および切替制御信号101を受ける。セレクタ38は、切替制御信号101がアサートされたことに応答して切替データ信号を出力信号OUTとして出力し、切替制御信号101がネゲートされたことに応答してD−フリップフロップ37の出力(D−フリップフロップ37の内部論理状態)を出力信号OUTとして出力する。
FIG. 4 is a diagram for explaining a D-flip-flop design method. 4A shows a conventional D-
図2(B)においてANDゲート30とセレクタ31とを接続する配線W1の長さはできるだけ短いほうが望ましい。同様に、図3(B)におけるセレクタ34,35間の配線W2の長さ、および図4(B)におけるD−フリップフロップ37とセレクタ38とを接続する配線W3の長さはできるだけ短いほうが望ましい。セレクタと回路素子との間の配線長が長いと、この配線の容量が大きくなり、その結果、この配線を流れる信号の消費電力ひいてはその偏りの絶対量も大きくなる。消費電力の偏りをできるだけ小さくするためには、セレクタと回路素子との間を近接して配置して配線長を抑え、消費電力の絶対量をできるだけ小さくすることが望ましい。
In FIG. 2B, the length of the wiring W1 connecting the AND
図2〜図4では、ANDゲート、セレクタ、フリップフロップの変換のみを示したが、他の回路素子についても同様であり、変換すべき回路素子の出力ノードと直列にセレクタを接続すればよい。 2 to 4 show only the conversion of the AND gate, the selector, and the flip-flop, the same applies to other circuit elements, and the selector may be connected in series with the output node of the circuit element to be converted.
もしくは、変換後の回路素子と等価な機能(すなわち、論理ゲートまたはフリップフロップとセレクタとを合わせた機能)を単一セルで実現してもよい。この場合、変換後の回路素子は、1または複数の第1の入力ノードと、切替データ信号102が入力される第2の入力ノードと、切替制御信号101が入力される第3の入力ノードと、出力ノードとを含む。変換後の回路素子は、切替制御信号101が非活性化されたことに応答して、1または複数の第1の入力ノードから入力された信号の論理演算結果、または、内部に記憶したデータに基づく信号を出力する。変換後の回路素子は、切替制御信号101が活性化されたことに応答して切替データ信号102に応じた信号を出力する。
Alternatively, a function equivalent to the circuit element after conversion (that is, a function combining a logic gate or flip-flop and a selector) may be realized by a single cell. In this case, the converted circuit element includes one or more first input nodes, a second input node to which the switching data signal 102 is input, and a third input node to which the
図2〜図4では、切替制御信号101がアサートされたことに応答して、設計変更後の回路素子32,36,39から切替データ信号102がそのまま出力される場合を示したが、かならずしもそのまま出力する必要はない。切替データ信号102の論理レベルを反転させて出力するなど、切替データ信号102を変形させた信号を出力するようにしてもよい。
2 to 4 show a case where the switching data signal 102 is output as it is from the
図5は、演算装置1において回路素子の変換を行なう箇所について説明するための図である。
FIG. 5 is a diagram for explaining a place where circuit elements are converted in the
図2〜図4で説明した変換は、図5に示したALU1およびレジスタ群2に含まれる全ての論理ゲートや記憶素子について行なう必要はない。しかしながら、図5に示すように、少なくともデータ信号1,2(109,110)を出力する回路部分11_1,11_2、データ信号1,2(109,110)が入力される回路部分12_0〜12_M、演算結果111を出力する回路部分13、および演算結果111が書込まれるレジスタについては図2〜図4で説明した変換を行なうことが望ましい。上記のうち、回路部分11_1,11_2の変換については図6で説明し、回路部分12_0〜12_Mの変換については図7で説明し、回路部分13の変換については図8で説明する。レジスタ2_0〜2_Nについては各フリップフロップについて図4に示した変換を行なう。
The conversion described with reference to FIGS. 2 to 4 need not be performed for all the logic gates and storage elements included in the
さらに、ALU1内部の非線形論理ゲートについても変換を行なうと、非線形論理ゲートにおける消費電力の偏りを低減することができ、電力解析攻撃に対する耐性がより向上する。ここで、線形論理ゲートとは、XOR(exclusive OR)素子のように、ランダムデータが入力されたときに出力される「1」、「0」の個数が均等な論理ゲートをいう。非線形論理ゲートとは、AND素子やOR素子のように、ランダムデータが入力されたときに出力される「1」、「0」の個数に偏りがある論理ゲートをいう。
Furthermore, if conversion is also performed for the nonlinear logic gate in the
図6は、図5に示したデータ信号1(109)を出力する回路部分11_1の構成の一例を示す回路図である。図6において(A)は従来の回路構成の例を示し、(B)は変換後の回路構成の例を示す。データ信号2(110)を出力する回路部分11_2の構成も同様であるので、データ信号1(109)回路部分11_1の構成の一例が代表として示される。 FIG. 6 is a circuit diagram showing an example of the configuration of the circuit portion 11_1 that outputs the data signal 1 (109) shown in FIG. 6A shows an example of a conventional circuit configuration, and FIG. 6B shows an example of a circuit configuration after conversion. Since the circuit portion 11_2 that outputs the data signal 2 (110) has the same configuration, an example of the configuration of the data signal 1 (109) circuit portion 11_1 is shown as a representative.
図6(A)に示すように、データ信号1(109)を出力する回路部分11_1には、レジスタ0〜N(2_0〜2_N)の出力データDR_0〜DR_Nがそれぞれ入力されるANDゲート40_0〜40_Nと、各ANDゲート40の出力が入力されるORゲート41とが設けられる。各ANDゲート40のもう一方の入力ノードには対応のデータソース選択信号104(104_0〜104_Nのいずれか)が入力される。
As shown in FIG. 6A, AND gates 40_0 to 40_N into which output data DR_0 to DR_N of
図6(B)に示すように変換後の回路部分11_1において、ORゲート41の出力ノードにセレクタ42がさらに接続される。ここで、セレクタ42は、ORゲート41の出力と、切替制御信号101と、切替データ信号102とを受け、切替制御信号101がアサートされたことに応答して切替データ信号102をデータ信号1(109)として出力し、切替制御信号101がネゲートされたことに応答してORゲート41の出力をデータ信号1(109)として出力する。
As shown in FIG. 6B, the
図7は、図5に示したデータ信号1,2(109,110)が入力される回路部分12_0〜12_Mの構成の一例を示す回路図である。図7において(A)は従来の回路構成の例を示し、(B)は変換後の回路構成の例を示す。回路部分12_0〜12_Mは、論理ブロック1_0〜1_Mにそれぞれ対応して設けられる。なお、図7では、一例として、論理ブロック1_0を論理積ブロックとし、論理ブロック1_1を論理和ブロックとしている。 FIG. 7 is a circuit diagram illustrating an example of the configuration of the circuit portions 12_0 to 12_M to which the data signals 1 and 2 (109, 110) illustrated in FIG. 5 are input. 7A shows an example of a conventional circuit configuration, and FIG. 7B shows an example of a circuit configuration after conversion. The circuit portions 12_0 to 12_M are provided corresponding to the logic blocks 1_0 to 1_M, respectively. In FIG. 7, as an example, the logical block 1_0 is a logical product block, and the logical block 1_1 is a logical sum block.
図7(A)に示すように、回路部分12_0は、データ信号1(109)を受けるANDゲート43_0と、データ信号2(110)を受けるANDゲート44_0とを含む。ANDゲート43_0,44_0には、さらに、演算種類選択信号100のうち論理積を表わす選択信号100_0が入力される。ANDゲート43_0,44_0の各出力ノードは、対応の論理積ブロック1_0に接続される。同様に、回路部分12_1は、データ信号1(109)を受けるANDゲート43_1と、データ信号2(110)を受けるANDゲート44_1とを含む。ANDゲート43_1,44_1には、さらに、演算種類選択信号100のうち論理和を表わす選択信号100_1が入力される。ANDゲート43_1,44_1の各出力ノードは、対応の論理和ブロック1_1に接続される。図7では図示を省略しているが、回路部分12_2〜12_Mについても同様である。 As shown in FIG. 7A, the circuit portion 12_0 includes an AND gate 43_0 that receives the data signal 1 (109) and an AND gate 44_0 that receives the data signal 2 (110). Further, a selection signal 100_0 representing a logical product among the operation type selection signals 100 is input to the AND gates 43_0 and 44_0. Each output node of the AND gates 43_0 and 44_0 is connected to the corresponding AND block 1_0. Similarly, the circuit portion 12_1 includes an AND gate 43_1 that receives the data signal 1 (109) and an AND gate 44_1 that receives the data signal 2 (110). The AND gates 43_1 and 44_1 are further supplied with a selection signal 100_1 representing a logical sum among the operation type selection signals 100. Each output node of the AND gates 43_1 and 44_1 is connected to the corresponding OR block 1_1. Although not shown in FIG. 7, the same applies to the circuit portions 12_2 to 12_M.
図7(B)に示すように、変換後の回路部分12_i(iは0以上M以下の整数)は、ANDゲート43_iと対応の論理ブロック1_iとの間に挿入されるセレクタ45_iと、ANDゲート44_iと対応の論理ブロック1_iとの間に挿入されるセレクタ46_iとをさらに含む。セレクタ45_iは、データ1(109)、切替データ信号102のうち対応のビット信号、および切替制御信号101を受ける。セレクタ46_iは、データ2(110)、切替データ信号102のうち対応のビット信号、および切替制御信号101を受ける。セレクタ45_iは、切替制御信号101がアサートされたことに応答して切替データ信号102のうちの対応のビット信号を対応の論理ブロック1_iに出力し、切替制御信号101がネゲートされたことに応答して対応のANDゲート43_iの出力を対応の論理ブロック1_iに出力する。セレクタ46_iは、切替制御信号101がアサートされたことに応答して切替データ信号102のうちの対応のビット信号を対応の論理ブロック1_iに出力し、切替制御信号101がネゲートされたことに応答して対応のANDゲート44_iの出力を対応の論理ブロック1_iに出力する。
As shown in FIG. 7B, the converted circuit portion 12_i (i is an integer of 0 to M) includes a selector 45_i inserted between the AND gate 43_i and the corresponding logic block 1_i, and an AND gate. It further includes a selector 46_i inserted between 44_i and the corresponding logical block 1_i. The selector 45_i receives data 1 (109), the corresponding bit signal among the switching
図8は、図5に示した演算結果111を出力する回路部分13の構成の一例を示す回路図である。図8において(A)は従来の回路構成の例を示し、(B)は変換後の回路構成の例を示す。なお、図8では、一例として、図5の論理ブロック1_0をAND演算ブロックとし、論理ブロック1_1をOR演算ブロックとし、論理ブロック1_Mを加算ブロックとしている。
FIG. 8 is a circuit diagram showing an example of the configuration of the
図8(A)に示すように、演算結果111を出力する回路部分には、ALU1の論理ブロック1_0〜1_Mにそれぞれ対応するANDゲート50_0〜50_Mと、ANDゲート50_0〜50_Mの出力を受けるORゲート51とが設けられる。ANDゲート50_0〜50_Mには、さらに、演算種類選択信号100のうち対応の演算種類選択信号がそれぞれ入力される。
As shown in FIG. 8A, the circuit portion that outputs the
図8(B)に示すように、変換後の回路部分13には、ORゲート51の出力ノードにセレクタ52がさらに接続される。セレクタ52は、ORゲート51の出力と、切替制御信号101と、切替データ信号102とを受ける。セレクタ52は、切替制御信号101がアサートされたことに応答して切替データ信号102を演算結果111として出力し、切替制御信号101がネゲートされたことに応答してORゲート51の出力を演算結果111として出力する。ただし、セレクタ52は、切替データ信号102を出力するタイミングを、切替制御信号101がアサートされたタイミングよりも、演算ブロックの演算時間に対応する時間(遅延時間Td)だけ遅らせる。セレクタ52は、さらに、ORゲート51の出力信号を出力するタイミングを、切替制御信号101がネゲートされたタイミングよりも上記の遅延時間Tdだけ遅らせる。
As shown in FIG. 8B, a
[演算装置3の動作および効果]
図9は、図5の演算装置3の動作の一例を示すタイミング図である。図9は、上から順に、クロック信号112、演算種類選択信号100、データソース選択信号1(104)、データソース選択信号2(105)、書込レジスタ選択信号106、書込イネーブル信号107、切替データ信号102、切替制御信号101、データ信号1(109)、データ信号2(110)、演算結果111、レジスタ4(2_4)に格納されているデータを示す。以下、図5、図9を参照して、レジスタ4(2_4)に格納されたデータ「a」とレジスタ5(2_5)に格納されたデータ「b」の加算結果「c」(=a+b)がレジスタ4(2_4)に書込まれる場合の動作について説明する。
[Operation and Effect of Arithmetic Unit 3]
FIG. 9 is a timing chart showing an example of the operation of the
図9に示すように演算装置3は、クロック信号112の立上がりエッジ(時刻t1,t2,t3,t4)に応答して動作する。時刻t2より前の時間帯では、切替制御信号101がアサートされているので、レジスタ群2からデータ信号1(109)として無効データ「X0」が出力され、データ信号2(110)として無効データ「X1」が出力される。ALU1から無効データ「X2」が出力される。
As shown in FIG. 9, the
次の時刻t2において、切替制御信号101がネゲートされ、切替データ信号102が「X0,X1,X2,…」から「Y0,Y1,Y2,…」に切替わる。なお、切替データ信号102の切替わりのタイミングは、切替制御信号101がネゲートされている間、すなわち、時刻t2から時刻t3の間のいずれのタイミングであってもよい。
At the next time t2, the switching
さらに、時刻t2において、演算種類選択信号100として加算演算(ADD)を表わす信号がALU1に入力される。レジスタ群2には、データソース選択信号1(104)としてレジスタ4(2_4)を表わす信号が入力され、データソース選択信号2(105)としてレジスタ5(2_5)を表わす信号が入力され、書込レジスタ選択信号106としてレジスタ4(2_4)を表わす信号が入力される。さらに、レジスタ群2に入力される書込イネーブル信号107がアサートされる。この結果、レジスタ群2からデータ信号1(109)としてデータ「a」が出力され、データ信号2(110)としてデータ「b」が出力される。ALU1から出力される信号111は、時刻t2よりも遅延時間Tdだけ遅れて無効データ「X2」から加算結果「c」(ただし、c=a+b)に切替わる。加算結果「c」は、次のクロック信号の立上がりに応答して時刻t3でレジスタ4に書込まれる。
Further, at time t2, a signal representing an addition operation (ADD) is input to ALU1 as operation
次の時刻t3において、書込イネーブル信号107がネゲートされ、切替制御信号101がアサートされる。この結果、レジスタ群2の回路部分11_1からデータ信号1(109)として無効データ「Y0」が出力され、回路部分11_2からデータ信号2(110)として無効データ「Y1」が出力される。ALU1の回路部分13から出力される信号111は、時刻t3よりも遅延時間Tdだけ遅れて無効データ「Y2」に切替わる。
At the next time t3, the write enable
このように、演算実行に先立って、まず切替制御信号101がアサートされる。切替制御信号101がアサートされている期間は、演算装置3を構成するフリップフロップや論理ゲートなどの出力信号値(すなわち、回路状態)が、切替データ信号102で決まる値となる。次に切替制御信号101をネゲートすることで、実際の演算が実行される。演算種類選択信号100およびデータソース選択信号104、105は、切替制御信号101がネゲートされるタイミングまたはそれ以前の切替制御信号(101)がアサートされている状態で、演算装置3に供給される。演算完了後、再び切替制御信号101がアサートされて、演算装置3を構成するフリップフロップや論理ゲートなどの出力信号値(すなわち、回路状態)は実行した演算とは無関係の値となる。切替制御信号101がネゲートされるタイミングでは、演算結果がレジスタ群2のうち書込レジスタ選択信号106で指定されたレジスタに書込まれる。
As described above, the switching
演算実行前および演算実行後の演算装置3の内部信号の値、すなわち回路状態は、特にALU1の入出力データ信号109,110,111は、「0」などのある決まった値ではなく、切替データ信号102で決まる値になる。このため、ALU1の入出力データのハミング重みは、ALU1の入出力データのハミング距離とは無関係となる。したがって、ALU1の入出力データのハミング重みを選択関数とした電力解析攻撃に対する耐性が向上する。
The value of the internal signal of the
演算のソースレジスタと同一のレジスタが演算結果を格納するレジスタとして指定された場合も、レジスタに格納されるデータが更新されるタイミングで、ALU1に入力されるデータは更新後のレジスタの内容ではなく、切替データ信号102で決まる値となる。この結果、レジスタの値の更新前後のハミング距離を選択関数とした電力解析攻撃に対する耐性が向上する。
Even when the same register as the calculation source register is designated as the register for storing the calculation result, the data input to the
以下、演算データのデータ幅を4ビットとした場合について、図6(A),(B)を参照して具体的に説明する。図6(A)に示す変換前の回路では、データソースとしていずれのレジスタも選択されないとき(たとえば、演算を必要としない命令実行時など)は、レジスタ群2から出力されるデータ1(109)には4ビットが全て「0」のデータ(「0000」と記す)が現れる。演算実行のためにレジスタj(2_j)(jは0以上N以下の整数)が選択されるとデータ1(109)はレジスタj(2_j)の内容に変化する。このとき、レジスタj(2_j)の記憶内容が「0101」であれば、データ1(109)の2ビットの変化に対応する電力が演算装置内で消費され、レジスタj(2_j)の内容が「1111」であればデータ1(109)の4ビットの変化に対応する電力が消費される。上記演算完了時にデータ1(109)が「0000」に戻る場合も同様である。この結果は同じデータで同じ演算を何度実行しても変わらない。このため、レジスタj(2_j)の値のハミング重みを選択関数とした電力解析により、秘密情報が漏洩する可能性がある。
Hereinafter, a case where the data width of the operation data is 4 bits will be specifically described with reference to FIGS. 6 (A) and 6 (B). In the circuit before conversion shown in FIG. 6A, when any register is not selected as a data source (for example, when an instruction that does not require an operation is executed), data 1 (109) output from the
一方、図6(B)に示す変換後の回路では、演算実行前の状態および演算実行後の状態では切替制御信号101がアサートされているので、データ1(109)の値が切替データ信号102の値に設定される。具体的に、切替データ信号102が演算前は「1010」に設定され、演算後は「0101」に設定されていたとする。この場合、レジスタj(2_j)の記憶内容が「0101」であれば、演算開始時にはデータ1(109)の変化は4ビット、演算完了時にはデータ1(109)の変化は0ビットとなる。したがって、レジスタj(2_j)の値のハミング重みとデータ1(109)との間に相関が無くなる。同じデータで同じ演算を何度実行しても、その時点での切替データ信号102の内容によって消費電力が変わる。この結果、レジスタj(2_j)の値のハミング重みを選択関数とした電力解析攻撃に対する耐性が向上する。
On the other hand, in the circuit after conversion shown in FIG. 6B, since the switching
図7で説明した演算ブロック1_0〜1_Mへの入力信号を生成している回路素子の場合も、変換前の図7(A)に示す回路では、演算ブロック1_0〜1_Mが使用されない期間には、ある決まった値(たとえば、全て「0」のデータ)がこれらの演算ブロックに入力される。これに対して、変更後の図7(B)に示す回路では、演算ブロック1_0〜1_Mが使用されない期間には、切替データ信号102で設定された値がこれらの演算ブロック1_0〜1_Mに入力される。この結果、選択されたレジスタj(2_j)(jは0以上N以下の整数)の値のハミング重みを選択関数とした電力解析攻撃に対する耐性が向上する。 In the case of the circuit elements that generate the input signals to the arithmetic blocks 1_0 to 1_M described with reference to FIG. 7, in the circuit illustrated in FIG. 7A before conversion, in the period when the arithmetic blocks 1_0 to 1_M are not used, A certain value (for example, data of all “0”) is input to these operation blocks. On the other hand, in the circuit shown in FIG. 7B after the change, the value set by the switching data signal 102 is input to these arithmetic blocks 1_0 to 1_M during a period when the arithmetic blocks 1_0 to 1_M are not used. The As a result, the resistance to a power analysis attack using the Hamming weight of the value of the selected register j (2_j) (j is an integer not less than 0 and not more than N) as a selection function is improved.
演算結果111を出力する回路素子に図8(B)に示すような変換を施した場合も上記と同様であり、演算結果111のハミング重みを選択関数とした電力解析に対する耐性が向上する。さらに、レジスタ群2内の各レジスタに図4に示すような変換を施すことで、レジスタ内容を更新した前後でのレジスタの値のハミング距離を選択関数とした電力解析攻撃に対する耐性が向上する。
The case where the conversion as shown in FIG. 8B is performed on the circuit element that outputs the
このように実施の形態1の演算装置3によれば、演算装置3に含まれる論理ゲートおよびフリップフロップなどの回路素子のうち少なくとも一部の回路素子について、切替制御信号101が活性化されたことに応答して、演算に用いられるソースデータや演算結果と無関係な切替データ信号102を出力するように設計が変更される。これによって、演算装置3の回路素子の単位で電力解析攻撃への木目細かい対策が可能となる。
As described above, according to the
<実施の形態2>
図10は、この発明の実施の形態2に従うCPU10の構成を示すブロック図である。図10には主記憶装置20(命令メモリ21、データメモリ22)や信号の流れも併せて示される。図1で説明した演算装置3に入力される各信号のうちクロック信号112、リセット信号113の図示は省略されている。クロック信号112、リセット信号113は、通常、CPU10の外部から与えられる。なお、実施の形態2および後続する各実施の形態で説明するCPUの構成は一例として示すものであって、実施の形態1で示した演算装置3は公知のいずれの構成のCPUに対しも適用できる。
<
FIG. 10 is a block diagram showing a configuration of
図10において、CPU10は、実施の形態1で説明した演算装置3と、命令レジスタ4と、命令デコーダ5と、プログラムカウンタ6と、切替データ信号生成部7とを含む。命令レジスタ4は、プログラムカウンタ6の値に従って命令メモリ21から命令を読み出す。命令デコーダ5は、命令レジスタ4によって読み出された命令をデコードし、命令の種類に応じた制御信号を演算装置3またはデータメモリ22に出力する。命令デコーダ5は、たとえば、算術論理演算命令を読み出した場合には、命令内容に応じた演算種類選択信号100をALU1に出力し、命令内容に応じたデータソース選択信号1(104)、データソース選択信号2(105)、および書込レジスタ選択信号106をレジスタ群2に出力し、書込イネーブル信号107をアサートする。この結果、ALU1で演算が実行され、演算結果が指定されたレジスタに書込まれる。メモリ操作命令を読み出した場合には、命令デコーダ5は、命令内容に応じて書込レジスタ選択信号106をレジスタ群2に出力し、メモリ制御信号をデータメモリ22に出力し、書込イネーブル信号107をアサートする。この結果、メモリ操作命令によって指令されたメモリアドレスに格納されたデータが書込データ108としてレジスタ群2の指定されたレジスタに書込まれる。
In FIG. 10, the
実施の形態2の場合、命令の種類には、切替制御信号101をアサートするための専用命令である切替命令がさらに含まれる。命令デコーダ5は、通常、ネゲートされた切替制御信号101をALU1およびレジスタ群2に出力する。命令デコーダ5は、切替命令が実行されるサイクルで切替制御信号101をアサートし、切替命令の実行が完了すると切替制御信号101をネゲートする。切替命令は、切替制御信号101を変化させる以外の副作用を持たない。CPU10を動作させるソフトウェアでは、電力解析攻撃によって秘密情報が漏洩する可能性がある演算命令の前後に、当該切替命令が挿入される。切替命令と秘密情報が漏洩する可能性がある演算命令とは連続して実行される必要があるため、これらは割り込み禁止の状態で実行されなければならない。これは、CPUが一般に備えている割り込みマスクの機能を用いて実現できる。ただし、通常、暗号処理のプログラムは割り込み禁止で実行されるので、切替命令を実行するために追加の割り込みマスクは不要である。なお、上記の切替命令を新たな命令として追加せず、副作用を持たない他の命令(たとえば、何も実行しないNOP命令(No OPeration Instruction))に上記の切替命令の機能を持たせてもよい。
In the case of the second embodiment, the type of instruction further includes a switching instruction that is a dedicated instruction for asserting the switching
図10において、切替データ信号生成部7は切替データ信号102を生成する。切替データ信号生成部7として、たとえば、乱数発生源や擬似乱数生成器を用いることができる。その他、演算実行時のシステムクロックやタイマの値を利用して切替データ信号102を生成してもよい。
In FIG. 10, the switching data signal generation unit 7 generates a switching
このように、実施の形態2に従うCPU10では、切替制御信号101をアサートするための命令を追加することによって、ソフトウェアを用いて切替制御信号101をアサートまたはネゲートするタイミングを柔軟に制御することができる。
As described above, the
<実施の形態3>
図11は、この発明の実施の形態3に従うCPU10Aの構成を示すブロック図である。図11のCPU10Aは、図10の切替データ信号生成部7に代えて、ソフトウェアによって任意の値を書込むことができる専用のレジスタ14を含み、レジスタ14の記憶内容を切替データ信号102として使用する点で、図10のCPU10と異なる。図11のCPU10Aにおいて、専用のレジスタ14は、レジスタ群2Aの内部に設けられているが、レジスタ群2Aの外部に設けてもよい。レジスタ14のビット長は、切替データ信号(102)の生成に必要なだけ設けられる。複数の専用レジスタによって切替データ信号102を生成してもよい。
<
FIG. 11 is a block diagram showing a configuration of
CPU10Aは、専用のレジスタ14に任意の値を書き込むための専用命令を備えてもよいし、専用レジスタ14にアドレスを割り付けて、通常のストア命令によって任意の値を専用レジスタ14に書込むようにしてもよい。専用レジスタ14の記憶内容は、ソフトウェアによって、任意のタイミングで(たとえば、所定の時間が経過する都度、または所定回数の演算を実行する都度)任意のデータに更新することができる。この場合、専用レジスタ14に書込むデータは、「0」と「1」のビットをほぼ等しい割合で含み、かつ偏りの小さいようにするのが好ましい。
The
図11のその他の点は図10と共通するので、同一または相当する部分には同一の参照符号を付して説明を繰返さない。 Other points in FIG. 11 are the same as those in FIG. 10, and therefore, the same or corresponding parts are denoted by the same reference numerals and description thereof will not be repeated.
<実施の形態4>
図12は、この発明の実施の形態4に従うCPU10Bの構成を示すブロック図である。図12のCPU10Bは、図11の専用のレジスタ14に代えて、切替データ信号102として用いるにに必要なビット長を有するシフトレジスタ15を含み、シフトレジスタ15の記憶内容を切替データ信号102として使用する点で、図11のCPU10Aと異なる。図12に示す1個のシフトレジスタ15に代えて、複数のシフトレジスタで切替データ信号102を生成するようにしてもよい。CPU10Bでは、シフトレジスタ15がシフトすることによって切替データ信号102の値が変化する。
シフトレジスタ15に記憶されるデータは、シフト動作に伴って各ビットに0と1がほぼ等しい割合で現れ、かつ隣り合ったビット同士の偏りが小さい任意のビットパターンである。一例として、32ビットのシフトレジスタで1ビットずつ巡回シフトする場合には、たとえば、「01010011101011001010110001010011」を初期値とすればよい。
<
FIG. 12 is a block diagram showing a configuration of
The data stored in the
シフトレジスタ15のシフト方法は、たとえば以下のような例が考えられ、特に限定されるものではない。
Examples of the shift method of the
(1) 所定のクロックサイクルごとに任意のビット数分ずつ(たとえば1ビットずつ)巡回シフトする。 (1) A cyclic shift is performed by an arbitrary number of bits (for example, one bit) every predetermined clock cycle.
(2) 切替制御信号101が所定の回数アサートされるごとに任意のビット数分ずつ(たとえば1ビットずつ)巡回シフトする。
(2) Each time the switching
(3) 「クロックサイクルごとに1ビット右巡回シフト、3ビット左巡回シフト」を繰り返す。 (3) Repeat “1-bit right cyclic shift, 3-bit left cyclic shift every clock cycle”.
(4) 「2ビット左巡回シフトを50回行ない、1ビット右巡回シフトを100回行なう」というシフト動作を繰り返す。 (4) The shift operation of “2-bit left cyclic shift is performed 50 times and 1-bit right cyclic shift is performed 100 times” is repeated.
(5) 「100クロックサイクルの間、連続して巡回シフトした後、50クロックサイクルの間は巡回シフトしない」というシフト動作を繰り返す。 (5) The shift operation of “cyclic shift continuously for 100 clock cycles and no cyclic shift for 50 clock cycles” is repeated.
さらに、巡回シフト以外のシフト方法として、以下の方法も考えられる。
(6) シフトアウトしたビットの反転値を新たなビットとして追加する。
Furthermore, the following method is also conceivable as a shift method other than the cyclic shift.
(6) The inverted value of the shifted out bit is added as a new bit.
(7) シフトアウトしたビットの代わりに、シフトレジスタのX番目のビットを新たなビットとして追加する。 (7) Instead of the shifted out bit, the Xth bit of the shift register is added as a new bit.
さらに、実施の形態3で説明した専用レジスタ14と同様に、ソフトウェアによって任意の値をシフトレジスタ15に書き込むことができるようにしてもよいし、ソフトウェアによってシフト方法を変更できるようにしてもよい。
Further, similarly to the dedicated register 14 described in the third embodiment, any value may be written to the
<実施の形態5>
図13は、この発明の実施の形態5に従うCPU10Cの構成を示すブロック図である。図13のCPU10Cは、命令デコーダ5Aが切替制御信号101を生成せず、切替制御信号101を生成するための新たな構成として、モード設定用レジスタ16と、クロックバッファ17と、ANDゲート18(切替制御信号生成部)とをさらに含む点で、図12のCPU10Bと異なる。
<
FIG. 13 is a block diagram showing a configuration of CPU 10C according to the fifth embodiment of the present invention. The CPU 10C of FIG. 13 has a
CPU10Cは、セキュアモードと非セキュアモードの2つの動作モードを有する。いずれの動作モードであるかはモード設定用レジスタ16の値によって決まる。図13の場合には、モード設定用レジスタ16の値が「1」のときセキュアモードとし、「0」のとき非セキュアモードであるとする。セキュアモードでは、切替制御信号101および切替データ信号102による演算装置3Cの制御が有効になる。非セキュアモードでは、切替制御信号101および切替データ信号102による制御が無効になる。モード設定用レジスタ16の値はソフトウェアによって設定可能である。典型的には、モード設定用レジスタ16として既存の制御レジスタの特定のビットが割当てられるが、CPU10Cがモード設定用の専用レジスタや当該レジスタにアクセスための専用命令を備えていてもよい。図13では、モード設定用レジスタ16がレジスタ群2Cの内部に設けられているが、レジスタ群2Cの外部にモード設定用レジスタ16を設けてもよい。
The CPU 10C has two operation modes, a secure mode and a non-secure mode. Which operation mode is selected depends on the value of the
クロックバッファ17は、CPU10Cの外部から与えられたクロック信号112に基づいてクロック信号112に同期する新たな信号114を生成する。設計ルールとしてクロック信号112を組合せ回路の入力信号として使用することが許されていない場合などにクロックバッファ17が用いられる。
The
図14は、クロックバッファ17の構成および動作を説明するための図である。図14(A)を参照して、クロックバッファ17は、D−フリップフロップ61,62と、インバータ63,64と、排他的論理和ゲート65とを含む。D−フリップフロップ61,62のクロック端子CKにはクロック信号112が入力される。D−フリップフロップ61の出力端子Qはインバータ63を介してD−フリップフロップ61のデータ端子Dに接続される。D−フリップフロップ62の出力端子Qはインバータ64を介してD−フリップフロップ62のデータ端子Dに接続される。D−フリップフロップ61,62の出力端子Qはさらに排他的論理和ゲート65の入力ノードに接続される。D−フリップフロップ61は、クロック信号112の立上がりエッジに応答してD端子の入力値がQ端子の出力として保持され、D−フリップフロップ62は、クロック信号112の立下がりエッジに応答してD端子の入力値がQ端子の出力として保持される。
FIG. 14 is a diagram for explaining the configuration and operation of the
図14(B)には、クロック信号112、D−フリップフロップ61,62の出力信号S1,S2、および排他的論理和ゲート65の出力信号SOUTの電圧波形が示される。D−フリップフロップ61の出力信号S1はクロック信号112の立上がりエッジ(時刻t1,t3など)に応答してハイ(H)レベルまたはロー(L)レベルに切替わり、D−フリップフロップ62に出力信号S2はクロック信号112の立下がりエッジ(時刻t2,t4など)に応答してHレベルまたはLレベルに切替わる。この結果、排他的論理和ゲート65の出力信号SOUTはクロック信号112に応答して信号レベルが変化する。
FIG. 14B shows voltage waveforms of the
再び図13を参照して、ANDゲート18は、クロックバッファ17の出力信号114とモード設定用レジスタ16の設定値に対応するモード設定信号115とを受け、これらの論理積を切替制御信号101として、ALU1およびレジスタ群2Cに出力する。したがって、モード設定用レジスタ16の値が「1」であるセキュアモードでは、1クロックサイクルのうちクロック信号が「1」(Hレベル)の期間で切替制御信号101がアサートされ、クロック信号が「0」(Lレベル)の期間で切替制御信号101がネゲートされる。したがって、セキュアモードでは、クロック信号「0」の期間が演算装置3Cによる演算処理に使用できる時間となる。一方、モード設定用レジスタ16の値が「0」である非セキュアモードでは、クロックバッファ17の出力信号114の論理レベルによらず、切替制御信号101がネゲートされる。したがって、非セキュアモードでは、1クロックサイクルの全てが演算装置3Cによる演算処理に使用できる時間になる。
Referring again to FIG. 13, the AND
図13のその他の点は、図12で説明したCPU10Bと同じであるので、同一または相当する部分には同一の参照符号を付して説明を繰返さない。
The other points in FIG. 13 are the same as those of
図15は、図13のCPU10Cの動作の一例を示すタイミング図である。図15は、上から順に、クロック信号112、演算種類選択信号100、データソース選択信号1(104)、データソース選択信号2(105)、書込レジスタ選択信号106、書込イネーブル信号107、切替データ信号102、切替制御信号101、データ信号1(109)、データ信号2(110)、演算結果を表わす信号111、レジスタ4(2_4)に格納されているデータを示す。以下、図13、図15を参照して、レジスタ4(2_4)に格納されたデータ「a」とレジスタ5(2_5)に格納されたデータ「b」の加算結果「c」(=a+b)がレジスタ4(2_4)に書込まれる場合の動作について説明する。
FIG. 15 is a timing chart showing an example of the operation of the CPU 10C of FIG. In FIG. 15, in order from the top, the
図15に示すようにCPU10Cは、切替制御信号101を除いて、クロック信号112の立上がりエッジ(時刻t11,t13,t15,t17)に応答して動作する。切替制御信号101は、クロック信号112の立上がりエッジに応答してアサートされ、クロック信号112の立下がりエッジ(時刻t12,t14,t16,t18)に応答してネゲートされる。これによって、レジスタ群2CからALU1出力されるデータ信号1,2(109,110)およびALU1から出力される演算結果を表わす信号111もクロック信号112の立上がりエッジおよび立下がりエッジの両方に応答して変化する。ただし、ALU1から出力される演算結果を表わす信号111の信号レベルは、ALU1における演算時間に相当する時間(遅延時間Td)だけクロックエッジよりも遅延して変化する。
As shown in FIG. 15, the CPU 10C operates in response to the rising edges (time t11, t13, t15, t17) of the
切替データ信号102は、たとえば、シフトレジスタ15が巡回シフトすることによって、クロック信号112の立上がりエッジに応答してその値が変化する。図15の場合には、切替データ信号102は、時刻t11に「X0,X1,X2,…」に切替わり、時刻t13に「Y0,Y1,Y2,…」に切替わり、時刻t15に「Z0,Z1,Z2,…」に切替わる。
The value of the switching data signal 102 changes in response to the rising edge of the
時刻t13において、演算種類選択信号100として加算演算(ADD)を表わす信号がALU1に入力される。レジスタ群2Cには、データソース選択信号1(104)としてレジスタ4を表わす信号が入力され、データソース選択信号2(105)としてレジスタ5を表わす信号が入力され、書込レジスタ選択信号106としてレジスタ4を表わす信号が入力される。さらに、レジスタ群2Cに入力される書込イネーブル信号107がアサートされる。
At time t13, a signal representing an addition operation (ADD) is input to ALU1 as operation
時刻t13と次の時刻t14との間の時間帯では、切替制御信号101がアサートされているので、ALU1に入力されるデータ信号1,2(109,110)はそれぞれ切替データ信号「Y0」、「Y1」であり、レジスタ4,5(2_4,2_5)の記憶内容「a」、「b」はALU1に入力されない。
Since the switching
時刻t14に切替制御信号101がネゲートされると、データ信号1,2(109,110)として「a」、「b」がALU1に入力される。この結果、時刻t14よりも遅延時間Tdだけ遅れて、ALU1から出力される信号111が、切替データ信号「Y2」から加算結果「c」(c=a+b)に切替わる。加算結果「c」は、次のクロック信号112の立上がりエッジに応答して時刻t15でレジスタ4に書込まれる。
When the switching
次の時刻t15において、書込イネーブル信号107がネゲートされ、切替制御信号101がアサートされる。この結果、レジスタ群2Cからデータ信号1(109)として無効データ「Z0」がALU1出力され、データ信号2(110)として無効データ「Z1」がALU1に出力される。ALU1から出力される信号111は、時刻t3よりも遅延時間Tdだけ遅れて無効データ「Z2」に切替わる。
At the next time t15, the write enable
このように、1クロックサイクルの前半の半周期で切替制御信号101をアサートすることによって、ALU1に入出力される信号109,110,111の値、さらには演算装置3C内の回路状態が切替データ信号102で決まる値となる。1クロックサイクルの後半の半周期で切替制御信号101をネゲートすることによって、実際の演算が実行される。演算完了後、切替制御信号101を再度アサートすることによって、ALU1に入出力される信号109,110,111の値が切替データ信号102で決まる値となり、実行した演算とは無関係の値となる。この結果、ALU1の入出力データのハミング重みは、ALU1の入出力データのハミング距離とは無関係となる。このため、ALU1の入出力データのハミング重みを選択関数とした電力解析攻撃に対する耐性が向上するとともに、更新前後のレジスタの値のハミング距離を選択関数とした電力解析攻撃に対する耐性も向上する。さらに、1クロックサイクルの間に、切替データ信号の出力と演算処理とが行なわれるので、切替データ信号を出力するための余計なクロックサイクルを設ける必要がない。
As described above, by asserting the switching
ただし、実施の形態5の場合には、クロック周波数に対する制限が図9の場合よりも厳しくなる。すなわち、セキュアモードでは、クロック信号112が「0」(Lレベル)になって初めて実際の演算処理が始まるが、次のクロック信号112の立上がりまでに演算処理を完了する必要がある。このため、クロック信号112が「0」である期間T2は、演算処理時間に対応する遅延時間Tdよりも長くする必要がある(すなわち、Td<T2)。一方、非セキュアモードでは、Td<T2を満たす必要はなく、Td<T1+T2=Tcでよい(ただし、クロック信号112が「1」である期間をT1とし、クロック周期をTcとする)。この結果、非セキュアモードの場合は、セキュアモードの場合よりもT2を小さくすることができる。したがって、秘密情報が漏洩する可能性がないプログラムを実行する際は、非セキュアモードに設定することで、CPUのクロック周波数を向上させることができる。なお、ソフトウェア制御によってクロック周波数を制御する機能は、既存の多くのCPUが備えている機能である。
However, in the case of the fifth embodiment, the restriction on the clock frequency is stricter than in the case of FIG. That is, in the secure mode, the actual arithmetic processing starts only after the
図16は、図14(A)に示すクロックバッファ17の変形例を示すブロック図である。図16に示すクロックバッファ17Aは、D−フリップフロップ61と、インバータ63とを含む。D−フリップフロップ61のクロック端子CKには、図13の演算装置3Cが使用するクロック信号の2倍の周波数を有するクロック信号120が供給される。D−フリップフロップ61の出力端子Qはインバータ63を介してD−フリップフロップ61のデータ端子Dに接続される。D−フリップフロップ61のデータ端子Dから出力される信号が切替制御信号101である。
FIG. 16 is a block diagram showing a modification of the
図17は、図13に示すCPU10Cの変形例としてのCPU10Dの構成を示すブロック図である。図17のCPU10Dは、モード設定用レジスタ16に代えて、命令デコーダ5Bが動作モードを指定するモード設定信号116をANDゲート18に出力する点で、図13のCU10Cと異なる。図17の演算装置3Bにはモード設定用レジスタ16が設けられておらず、演算装置3Bの構成は図12の場合と同じである。
FIG. 17 is a block diagram showing a configuration of a CPU 10D as a modification of the CPU 10C shown in FIG. The CPU 10D of FIG. 17 differs from the CU 10C of FIG. 13 in that the
図17において、命令デコーダ5Bは、命令レジスタ4から読み込んだ命令が演算装置3Bを使用して演算を行なう演算命令である場合には、この演算命令を実行している間、セキュアモードを指定するモード設定信号116(「1」:Hレベル)をANDゲート18に出力する。命令デコーダ5Bは、演算命令の実行が完了した後に、非セキュアモードを指定するモード設定信号116(「0」:Lレベル)をANDゲート18に出力する。
In FIG. 17, when the instruction read from the
図17に示すCPU10Dのその他の点は、図13に示すCPU10Cと同じであるので、同一または相当する部分には同一の参照符号を付して説明を繰返さない。 The other points of CPU 10D shown in FIG. 17 are the same as those of CPU 10C shown in FIG. 13. Therefore, the same or corresponding parts are denoted by the same reference numerals, and description thereof will not be repeated.
今回開示された各実施の形態はすべての点で例示であって制限的なものでないと考えられるべきである。たとえば、上記の実施の形態2〜5において、切替制御信号101および切替データ信号102の種々の生成方法を示したが、これらの信号の生成方法は、実施の形態2〜5に示した生成方法に限定されるものでない。この発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
Each embodiment disclosed this time should be considered as illustrative in all points and not restrictive. For example, in the above second to fifth embodiments, various generation methods of the switching
1 算術論理演算ユニット(ALU)、2,2A,2B,2C レジスタ群、3,3A,3B,3C 演算装置、5,5A,5B 命令デコーダ、7 切替データ信号生成部、14 専用レジスタ、15 シフトレジスタ、16 モード設定用レジスタ、31,35,38,42,45,46,52 セレクタ、101 切替制御信号、102 切替データ信号、109,110 入力データ、111 演算結果、112 クロック信号、115,116 モード設定信号。 1 arithmetic logic unit (ALU), 2, 2A, 2B, 2C register group, 3, 3A, 3B, 3C arithmetic unit, 5, 5A, 5B instruction decoder, 7 switching data signal generator, 14 dedicated register, 15 shift Register, 16 mode setting register, 31, 35, 38, 42, 45, 46, 52 selector, 101 switching control signal, 102 switching data signal, 109, 110 input data, 111 operation result, 112 clock signal, 115, 116 Mode setting signal.
Claims (10)
前記記憶部から受けた1または複数のソースデータを用いて算術演算または論理演算を行なう演算部とを備え、
前記記憶部および前記演算部の各々は、活性状態または非活性状態になる切替制御信号と、時間的に変化するとともに前記1または複数のソースデータとは無関係なデータ信号とを受け、
前記記憶部は、前記切替制御信号が非活性化されたことに応答して前記1または複数のソースデータを前記演算部に出力し、前記切替制御信号が活性化されたことに応答して前記無関係なデータ信号に基づく1または複数のデータを前記演算部に出力し、
前記演算部は、前記切替制御信号が非活性化されたことに応答して前記1または複数のソースデータに対して算術演算または論理演算を行なった演算結果を出力し、前記切替制御信号が活性化されたことに応答して前記無関係なデータ信号に基づくデータを出力する、演算装置。 A storage unit;
An arithmetic unit that performs an arithmetic operation or a logical operation using one or more source data received from the storage unit,
Each of the storage unit and the calculation unit receives a switching control signal that is in an active state or an inactive state, and a data signal that changes over time and is unrelated to the one or more source data,
The storage unit outputs the one or more source data to the arithmetic unit in response to the switching control signal being deactivated, and the storage unit is in response to the switching control signal being activated. Outputting one or more data based on an irrelevant data signal to the computing unit;
The operation unit outputs an operation result obtained by performing an arithmetic operation or a logical operation on the one or more source data in response to the switching control signal being deactivated, and the switching control signal is activated. A computing device that outputs data based on the irrelevant data signal in response to being converted.
前記記憶部および前記演算部の各々は、
各々が論理演算機能または記憶機能を有する複数の回路素子と、
前記複数の回路素子の少なくとも一部にそれぞれ対応する複数の選択回路とを含み、
前記複数の選択回路の各々は、対応する回路素子の出力信号、前記無関係なデータ信号のうち対応するビットの信号、および前記切替制御信号を受け、
前記複数の選択回路の各々は、前記切替制御信号が非活性化されたことに応答して前記対応する回路素子の出力信号を出力し、前記切替制御信号が活性化されたことに応答して前記対応するビットの信号を出力する、請求項1に記載の演算装置。 The unrelated data signal is a multi-bit signal,
Each of the storage unit and the calculation unit is
A plurality of circuit elements each having a logical operation function or a storage function;
A plurality of selection circuits respectively corresponding to at least a part of the plurality of circuit elements,
Each of the plurality of selection circuits receives an output signal of a corresponding circuit element, a signal of a corresponding bit among the irrelevant data signal, and the switching control signal,
Each of the plurality of selection circuits outputs an output signal of the corresponding circuit element in response to the switching control signal being deactivated, and in response to the switching control signal being activated. The arithmetic unit according to claim 1, wherein a signal of the corresponding bit is output.
複数の前記回路素子のうち少なくとも一部の回路素子の各々は、
1または複数の第1の入力ノードと、
前記1または複数の第1の入力ノードから入力される1または複数の信号と異なる信号を受ける第2の入力ノードと、
出力ノードと、
前記出力ノードから出力する信号を切替えるための切替制御信号を受ける第3の入力ノードとを含み、
前記一部の回路素子の各々は、前記切替制御信号が非活性化されたことに応答して、前記1または複数の第1の入力ノードから入力された1または複数の信号を論理演算することによって得られる信号、または内部に記憶したデータに応じた信号を前記出力ノードから出力し、
前記一部の回路素子の各々は、前記切替制御信号が活性化されたことに応答して、前記第2の入力ノードから入力された信号に応じた信号を前記出力ノードから出力する、演算装置。 A plurality of circuit elements having a logical operation function or a storage function are provided,
Each of at least some of the plurality of circuit elements is
One or more first input nodes;
A second input node receiving a signal different from the one or more signals input from the one or more first input nodes;
An output node;
A third input node that receives a switching control signal for switching a signal output from the output node;
Each of the circuit elements performs a logical operation on one or more signals input from the one or more first input nodes in response to the switching control signal being deactivated. Or a signal corresponding to the data stored inside is output from the output node,
Each of the partial circuit elements outputs a signal corresponding to a signal input from the second input node from the output node in response to activation of the switching control signal. .
予め設定された複数の命令のいずれかを受け、受けた命令に応じた信号を前記演算装置に出力する命令デコーダとを備え、
前記複数の命令は、前記演算部に算術演算または論理演算を行なわせる演算命令を含む、中央処理装置(CPU)。 The arithmetic device according to claim 1 or 2,
An instruction decoder that receives any of a plurality of preset instructions and outputs a signal corresponding to the received instruction to the arithmetic unit;
The plurality of instructions includes a central processing unit (CPU) including an operation instruction for causing the operation unit to perform an arithmetic operation or a logical operation.
前記第1のレジスタに格納されるデータは、プログラムで設定可能である、請求項4に記載の中央処理装置。 The central processing unit further includes a first register that is provided inside or outside the storage unit and stores data corresponding to the irrelevant data signal,
The central processing unit according to claim 4, wherein the data stored in the first register can be set by a program.
前記無関係なデータ信号は、前記シフトレジスタがシフトすることによって変化する、請求項4に記載の中央処理装置。 The central processing unit further includes a shift register that is provided inside or outside the storage unit and stores data corresponding to the irrelevant data signal,
The central processing unit according to claim 4, wherein the irrelevant data signal changes as the shift register shifts.
前記命令デコーダは、前記切替制御信号を前記演算装置に出力し、前記切替命令を受けた場合に前記切替制御信号を活性化する、請求項4に記載の中央処理装置。 The plurality of instructions include a switching instruction for activating the switching control signal,
The central processing unit according to claim 4, wherein the instruction decoder outputs the switching control signal to the arithmetic unit and activates the switching control signal when the switching instruction is received.
前記中央処理装置は、クロック信号と前記第1および第2の動作モードのいずれかに設定するためのモード設定信号とを受け、前記クロック信号および前記モード設定信号に基づいて前記切替制御信号を生成する切替制御信号生成部をさらに備え、
前記記憶部は、前記クロック信号の第1のエッジに応答して、前記演算部の演算結果を格納し、
前記切替制御信号生成部は、前記第1の動作モードの場合に、前記クロック信号の前記第1のエッジに応答して前記切替制御信号を活性化し、前記クロック信号の第2のエッジに応答して前記切替制御信号を非活性化し、
前記切替制御信号生成部は、前記第2の動作モードの場合に、前記クロック信号によらず前記切替制御信号を非活性化する、請求項4に記載の中央処理装置。 The central processing unit has first and second operation modes;
The central processing unit receives a clock signal and a mode setting signal for setting one of the first and second operation modes, and generates the switching control signal based on the clock signal and the mode setting signal A switching control signal generation unit
The storage unit stores a calculation result of the calculation unit in response to a first edge of the clock signal,
The switching control signal generation unit activates the switching control signal in response to the first edge of the clock signal and responds to the second edge of the clock signal in the first operation mode. Deactivating the switching control signal,
The central processing unit according to claim 4, wherein the switching control signal generation unit deactivates the switching control signal regardless of the clock signal in the second operation mode.
前記第2のレジスタに格納されたデータは、プログラムで設定可能である、請求項8に記載の中央処理装置。 The central processing unit further includes a second register that is provided inside or outside the storage unit and stores data corresponding to the mode setting signal,
9. The central processing unit according to claim 8, wherein the data stored in the second register can be set by a program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010105648A JP2011234312A (en) | 2010-04-30 | 2010-04-30 | Operation device and central processing unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010105648A JP2011234312A (en) | 2010-04-30 | 2010-04-30 | Operation device and central processing unit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011234312A true JP2011234312A (en) | 2011-11-17 |
Family
ID=45323126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010105648A Withdrawn JP2011234312A (en) | 2010-04-30 | 2010-04-30 | Operation device and central processing unit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011234312A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014049891A (en) * | 2012-08-30 | 2014-03-17 | Renesas Electronics Corp | Central processing unit and arithmetic unit |
-
2010
- 2010-04-30 JP JP2010105648A patent/JP2011234312A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014049891A (en) * | 2012-08-30 | 2014-03-17 | Renesas Electronics Corp | Central processing unit and arithmetic unit |
US10223110B2 (en) | 2012-08-30 | 2019-03-05 | Renesas Electronics Corporation | Central processing unit and arithmetic unit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sokolov et al. | Design and analysis of dual-rail circuits for security applications | |
US8861720B2 (en) | Tamper-resistant memory integrated circuit and encryption circuit using same | |
Saputra et al. | Masking the energy behavior of DES encryption [smart cards] | |
Cilio et al. | Mitigating power-and timing-based side-channel attacks using dual-spacer dual-rail delay-insensitive asynchronous logic | |
JP5926655B2 (en) | Central processing unit and arithmetic unit | |
JP2015527642A (en) | Computer processor and system without arithmetic and logic units | |
Bayrak et al. | An EDA-friendly protection scheme against side-channel attacks | |
Järvinen et al. | A generalization of addition chains and fast inversions in binary fields | |
Antognazza et al. | Metis: An integrated morphing engine CPU to protect against side channel attacks | |
JP2015095786A (en) | Logic circuit, logic circuit layout support device, logic circuit layout support method and program | |
JP2011234312A (en) | Operation device and central processing unit | |
Dhanuskodi et al. | Energy optimization of unrolled block ciphers using combinational checkpointing | |
Plana et al. | SPA—A secure amulet core for smartcard applications | |
Teegarden et al. | Side-channel attack resistant ROM-based AES S-Box | |
Tillich et al. | Implementation and evaluation of an SCA-resistant embedded processor | |
Ghavami et al. | An EDA tool for implementation of low power and secure crypto-chips | |
IT202000013390A1 (en) | An IT platform to prevent side channel attacks | |
KR20020079144A (en) | Apparatus and Method of Polynomial-Basis Multiplication based on Finite-Field | |
Casu | Improving synchronous elastic circuits: Token cages and half-buffer retiming | |
Zarrinchian et al. | Combinational counters: A low overhead approach to address DPA attacks | |
Thoonen | Hardening FPGA-based AES implementations against side channel attacks based on power analysis | |
Dhanuskodi et al. | Techniques to reduce switching and leakage energy in unrolled block ciphers | |
Saputra et al. | Masking the energy behaviour of encryption algorithms | |
RU2644505C1 (en) | Special processor for boolean satisfiability task | |
Susithra et al. | FPGA-based Realization of Processor Unit with Key-Based Logical Obfuscation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20130702 |