JP2008067349A - Semiconductor integrated circuit - Google Patents

Semiconductor integrated circuit Download PDF

Info

Publication number
JP2008067349A
JP2008067349A JP2007127712A JP2007127712A JP2008067349A JP 2008067349 A JP2008067349 A JP 2008067349A JP 2007127712 A JP2007127712 A JP 2007127712A JP 2007127712 A JP2007127712 A JP 2007127712A JP 2008067349 A JP2008067349 A JP 2008067349A
Authority
JP
Japan
Prior art keywords
wire
phase
circuit
logic
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007127712A
Other languages
Japanese (ja)
Inventor
Tatsuya Kameyama
達也 亀山
Toshio Okochi
俊夫 大河内
Takashi Endo
隆 遠藤
Shunsuke Ota
俊介 大田
Takashi Watanabe
高志 渡邊
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2007127712A priority Critical patent/JP2008067349A/en
Publication of JP2008067349A publication Critical patent/JP2008067349A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide adjusting power consumption each time during calculation processing to be fixed, regardless of the input data value. <P>SOLUTION: An IC card chip (1) includes an encryption co-processor (7) performing an encryption algorithm using an encryption key and encrypting secret information. The encryption coprocessor includes a two-wire/two-phase coding circuit (20), and a two-wire/two-phase system combination logic circuit (22) having a plurality of two-wire/two-phase system logic circuits (70). The two-wire/two-phase coding circuit converts input data (SI) by using one-wire/one-phase as a unit of one bit to a two-wire/two-phase code defining a logic value 1 (1, 0) or logic value 0 (0, 1) that is assumed as valid data, only during the period of changing from a halt phase, in which a clear (1, 1) that is invalid data inputs to all input connectors to an active phase in which valid data inputs to the all connectors. The two-wire/two-phase system logic circuit inverts a logic value input to an input connector with constant times through a predetermined logic function and delivers valid data to an output connector. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、半導体集積回路に関し、消費電力や電磁波等の漏洩信号を利用した秘密情報の盗聴に対して、秘密情報の保護を可能にする2線2相式論理回路を用いた半導体集積回路に適用して有効な技術に関する。   The present invention relates to a semiconductor integrated circuit, and relates to a semiconductor integrated circuit using a two-wire two-phase logic circuit that enables protection of secret information against eavesdropping of secret information using leakage signals such as power consumption and electromagnetic waves. It is related to effective technology.

スマートカードや機密を保持する電子装置等に内蔵された秘密情報を暗号化又は復号化する暗号化回路から、これらの秘密情報を暗号化するのに必要な暗号鍵を物理的な破壊をせずに取り出す方法が知られている。この方法としては、例えば非特許文献1に開示された電力差分攻撃(DPA:Differential Power Analysis)がある。DPAは、入力データと暗号化処理に伴う消費電力に相関があることを利用して暗号鍵を推定する攻撃方法の一種である。   Without physically destroying the encryption key necessary to encrypt the secret information from the encryption circuit that encrypts or decrypts the secret information built in the smart card or the electronic device that holds the secret The method of taking out is known. As this method, for example, there is a differential power analysis (DPA) disclosed in Non-Patent Document 1. DPA is a kind of attack method for estimating an encryption key by utilizing the fact that there is a correlation between input data and power consumption associated with encryption processing.

暗号化の演算Fが既知であるDES(Data Encryption Standard)やAES(Advanced Encryption Standard)等の暗号方式において、暗号文Oは、入力する平文I、暗号鍵Kを用いて、O=F(I,K)で求められる。このため、暗号文Oと消費電力Wに相関があり、かつ、入力する平文Iが既知の場合には、求める暗号鍵Kの推定値は、暗号鍵の推定値K’が取り得る全ての値についてF(I,K’)と消費電力Wとの相関値を計算し、最も大きな相関値を与えるK’とすることができる。   In an encryption method such as DES (Data Encryption Standard) or AES (Advanced Encryption Standard) in which the encryption operation F is known, the ciphertext O is expressed as O = F (I , K). Therefore, when there is a correlation between the ciphertext O and the power consumption W and the input plaintext I is known, the estimated value of the encryption key K to be obtained is all the values that the encryption key estimate K ′ can take. A correlation value between F (I, K ′) and power consumption W is calculated for K ′, and K ′ giving the largest correlation value can be obtained.

電力解析攻撃は、DPAの一種であって、演算装置に入力する入力データの値と、入力データの値に対する演算処理で発生する消費電力とに相関があることで可能となる。電力解析攻撃によって暗号鍵が推定できる一つの要因は、上記暗号化回路が、pMOSトランジスタとnMOSトランジスタをペアとしたCMOS(Complementary Metal Oxide Semiconductor)により構成された論理素子を用いた論理回路で構成されることにある。   The power analysis attack is a kind of DPA, and is made possible by the correlation between the value of the input data input to the arithmetic device and the power consumption generated in the arithmetic processing for the value of the input data. One factor that allows the encryption key to be estimated by a power analysis attack is that the encryption circuit is composed of a logic circuit using a logic element composed of a CMOS (Complementary Metal Oxide Semiconductor) with a pMOS transistor and an nMOS transistor as a pair. There is to be.

CMOSで構成された論理素子の消費電力を、最も簡単な否定論理素子を用いて説明する。CMOSで構成された否定論理素子では、通常、電源線VDDはpMOSトランジスタのソース端子に接続され、グランド線GNDはnMOSトランジスタのソース端子に接続され、入力信号線VINはpMOSトランジスタとnMOSトランジスタのゲートに接続され、出力信号線VOUTはpMOSトランジスタとnMOSトランジスタのドレイン端子に接続される。出力信号線VOUTは、通常、次の論理素子の入力信号線VINに接続される。ここで、否定論理素子単体の動作の説明を簡素化するために、出力信号線VOUTにゲートと等価な容量Cを接続し、容量Cの片側の電極はグランド線GNDに接続した構成とする。   The power consumption of a logic element composed of CMOS will be described using the simplest negative logic element. In a negative logic element composed of CMOS, the power supply line VDD is normally connected to the source terminal of the pMOS transistor, the ground line GND is connected to the source terminal of the nMOS transistor, and the input signal line VIN is the gate of the pMOS transistor and the nMOS transistor. The output signal line VOUT is connected to the drain terminals of the pMOS transistor and the nMOS transistor. The output signal line VOUT is normally connected to the input signal line VIN of the next logic element. Here, in order to simplify the description of the operation of a single negative logic element, a capacitor C equivalent to the gate is connected to the output signal line VOUT, and an electrode on one side of the capacitor C is connected to the ground line GND.

入力信号線VINがHigh(又は1)からLow(又は0)に変位するとき、pMOSトランジスタはソース端子とドレイン端子間が導通状態になり、nMOSトランジスタは非導通状態になる。電源線VDDから出力信号線VOUTに電流が流れ容量Cに電荷が蓄積される。電荷が蓄積されることにより出力信号線VOUTの電位はHighになる。このまま入力信号線VINがHighの状態を保持すると、容量Cの電荷蓄積が許容量を超え、電荷の蓄積が止まり、電流が流れなくなり、出力信号線VOUTの電位はHighの状態を保持する。   When the input signal line VIN is displaced from High (or 1) to Low (or 0), the pMOS transistor becomes conductive between the source terminal and the drain terminal, and the nMOS transistor becomes nonconductive. A current flows from the power supply line VDD to the output signal line VOUT, and charges are accumulated in the capacitor C. As the charge is accumulated, the potential of the output signal line VOUT becomes High. If the input signal line VIN is kept in a high state as it is, the charge accumulation in the capacitor C exceeds an allowable amount, the charge accumulation stops, no current flows, and the potential of the output signal line VOUT is kept in the high state.

入力信号線VINがLowからHighに変位するとき、nMOSトランジスタはソース端子とドレイン端子間が導通状態になり、pMOSトランジスタは非導通状態になる。容量Cに蓄積された電荷が、nMOSトランジスタのソース端子とドレイン端子を通りグラウンド線GNDに放出される。電荷が放出されることにより電流が流れる。電荷が放出されることにより出力信号線VOUTの電位はLowになる。このまま入力信号線VINがHighの状態を保持すると、電荷がなくなり電流が流れなくなり、出力信号線VOUTの電位はLowの状態を保持する。   When the input signal line VIN is displaced from Low to High, the nMOS transistor is in a conductive state between the source terminal and the drain terminal, and the pMOS transistor is in a non-conductive state. The electric charge accumulated in the capacitor C is discharged to the ground line GND through the source terminal and the drain terminal of the nMOS transistor. A current flows by releasing the electric charge. As the charge is discharged, the potential of the output signal line VOUT becomes Low. If the input signal line VIN is kept in a high state as it is, the electric charge disappears and no current flows, and the potential of the output signal line VOUT is kept low.

このように、CMOSで構成された論理素子は、容量Cの電荷の蓄積と放出が発生するとき、即ち出力信号線VOUTの電位が、HighからLow、LowからHighに変化するときのみ、電流が流れ電力が消費される。そして、出力信号線VOUTの電位が変化しない間は、容量Cの電荷の変動がないため電力は消費されない。さらに、論理素子では、通常1つの信号線を1ビットとして表し、信号線がHighのときの電位が論理値1、Lowのときの電位が論理値0と定義される。このため、全ての論理素子の出力信号線で発生する論理値の変化と、消費電力とは相関があることになる。即ち、上記論理素子を用いた演算回路には、電力解析攻撃等のDPAにより、暗号鍵が容易に推定されてしまう危険性がある。   As described above, in the logic element configured by CMOS, current is accumulated only when charge accumulation and discharge of the capacitor C occur, that is, when the potential of the output signal line VOUT changes from High to Low and from Low to High. Flow power is consumed. As long as the potential of the output signal line VOUT does not change, no electric power is consumed because there is no change in the charge of the capacitor C. Further, in the logic element, one signal line is usually represented as one bit, and the potential when the signal line is High is defined as a logical value 1, and the potential when the signal line is Low is defined as a logical value 0. For this reason, there is a correlation between the change in the logic value generated in the output signal lines of all the logic elements and the power consumption. That is, the arithmetic circuit using the logic element has a risk that the encryption key is easily estimated by DPA such as a power analysis attack.

特許文献1,2には、DPAに対して高い安全性を得るために、演算回路に入力されたデータに対する演算処理で発生する消費電力を一定にすることで知られる2線2相符号を用いて演算処理を行う技術が開示されている。   Patent Documents 1 and 2 use a two-wire two-phase code that is known to keep power consumption generated in arithmetic processing for data input to an arithmetic circuit constant in order to obtain high safety against DPA. A technique for performing arithmetic processing is disclosed.

特表2003−521201号公報Special table 2003-521201 gazette 特開2004−347975号公報JP 2004-347975 A P. Kocher, J. Jaffe, and B. Jun, Differential Power Analysis, CRYPTO '99, LNCS1666, pp. 388-397,1999P. Kocher, J. Jaffe, and B. Jun, Differential Power Analysis, CRYPTO '99, LNCS1666, pp. 388-397,1999

CMOSで構成された論理回路は、出力信号線に接続された配線の負荷容量等により入力値が確定してから入力に対する出力値が確定するまでに遅延が発生してしまう。このため、2線2相符号を用いた2線2相式論理回路をCMOSで構成した場合には、2線2相式論理回路は、2つの信号線を出力とし、さらに信号線毎に異なる負荷容量を有するので、2つの信号線の遅延時間に差が生じることになる。例えば2線2相式論理回路において、2線2相符号がクリア(1,1)、論理値0(0,1)、論理値1(1,0)の3つの状態を保持し、遅延差がある場合には、入力の論理値が確定してから出力がクリアから論理値0、論理値1いずれかの論理値に変化する時刻に差が生じる。つまり、2線2相式論理回路では、出力が論理値0と論理値1では2つの信号線の論理値が変化する時刻に差があり、その結果、電力が発生する時刻に差が生じて、入力値に対する消費電力パターンに差が生じてしまう。これでは、上記電力解析攻撃によって暗号鍵が容易に推定されてしまい、安全性が低くなってしまう。本発明者は、電力解析攻撃等のDPAに対して高い安全性を得るために、入力データの値と消費電力の相関を極めて小さくする必要性を見出した。   In a logic circuit composed of CMOS, a delay occurs between the time when the input value is determined by the load capacitance of the wiring connected to the output signal line and the time when the output value for the input is determined. For this reason, when a two-wire two-phase logic circuit using a two-wire two-phase code is configured with CMOS, the two-wire two-phase logic circuit outputs two signal lines and differs for each signal line. Since it has a load capacity, a difference occurs between the delay times of the two signal lines. For example, in a two-wire two-phase logic circuit, the two-wire two-phase code is cleared (1, 1), the logical value 0 (0, 1), and the logical value 1 (1, 0) are held, and the delay difference In the case where there is, there is a difference in the time when the output changes from the clear value to the logical value of either logical value 0 or logical value 1 after the logical value of the input is determined. That is, in the two-wire two-phase logic circuit, there is a difference in the time at which the logical values of the two signal lines change when the output is a logical value 0 and a logical value 1, and as a result, there is a difference in the time at which power is generated. Therefore, a difference occurs in the power consumption pattern with respect to the input value. In this case, the encryption key is easily estimated by the power analysis attack, and the security is lowered. The present inventor has found that it is necessary to make the correlation between the value of input data and power consumption extremely small in order to obtain high security against DPA such as a power analysis attack.

これに対して、特許文献1には、2線2相符号を用いた論理演算回路が開示されているものの、入力データの値と消費電力の相関を小さくするために必要な構成が記載されていない。また、特許文献2では、個々の論理演算回路の入出力に同期信号を用いたラッチ回路を設ける必要があり、回路規模が増大してしまい、消費電力が増加するという問題があった。   On the other hand, Patent Document 1 discloses a logical operation circuit using a two-wire two-phase code, but describes a configuration necessary for reducing the correlation between the value of input data and power consumption. Absent. Further, in Patent Document 2, it is necessary to provide a latch circuit using a synchronization signal for input / output of each logical operation circuit, which causes a problem that the circuit scale increases and power consumption increases.

さらに、本発明者は、2線2相符号に対応した論理演算を行う2線2相式論理回路の出力データが論理変化するタイミングは、配線遅延等によって差が生じる場合のあることを見出した。即ち、LSIの配置配線において配線の等長化並びに等容量化を実現できない場合があるからである。例えば、2線2相式論理回路の出力コネクタの2つの信号線の配線長が異なる場合には、配線による負荷容量に差が生じ、トランジスタでの充放電電流量が異なってしまう。2線2相式論理回路は、所望の論理動作を実現するために複数従属接続されているから、前段の2線2相式論理回路で生じた上記電流量の差によって、次段の2線2相式論理回路の入力コネクタの2つの信号線に与えられる電圧レベルの過渡変化に差が生じて、トランジスタがオンオフする時刻に差が生じてしまう。その結果、次段の2線2相式論理回路では、入力データが論理変化するタイミングが配線遅延によって異なることで、出力データが論理変化するタイミングに差が生じてしまう、という問題があった。このようにして、入力データが論理変化するタイミングが異なる場合であっても、入力データの値と消費電力の相関を極めて小さくする必要性が本発明者によって見出された。   Furthermore, the present inventor has found that the timing at which the output data of the two-wire two-phase logic circuit that performs the logical operation corresponding to the two-wire two-phase code changes in logic may cause a difference due to wiring delay or the like. . In other words, there is a case where it is not possible to realize equal length and equal capacity of the wiring in the LSI placement and wiring. For example, when the wiring lengths of the two signal lines of the output connector of the two-wire two-phase logic circuit are different, a difference occurs in the load capacity due to the wiring, and the charge / discharge current amount in the transistor is different. Since a plurality of 2-wire 2-phase logic circuits are cascade-connected in order to realize a desired logic operation, the next-stage 2-wire logic circuit is determined by the difference in the amount of current generated in the previous 2-wire 2-phase logic circuit. A difference occurs in the transient change of the voltage level applied to the two signal lines of the input connector of the two-phase logic circuit, and a difference occurs in the time when the transistor is turned on / off. As a result, the next-stage two-wire two-phase logic circuit has a problem in that the timing at which the input data logically changes varies depending on the wiring delay, resulting in a difference in the timing at which the output data logically changes. In this way, the present inventor has found that there is a need to make the correlation between the value of the input data and the power consumption extremely small even when the timing of the logical change of the input data is different.

本発明の目的は、入力データの値に係わらず、演算処理中の時刻毎の消費電力を一定にできる2線2相式論理回路を用いた半導体集積回路を提供することにある。   An object of the present invention is to provide a semiconductor integrated circuit using a two-wire two-phase logic circuit capable of keeping power consumption at each time during arithmetic processing regardless of the value of input data.

本発明の別の目的は、回路規模を増大させず、消費電力を低減できる2線2相式論理回路を用いた半導体集積回路を提供することにある。   Another object of the present invention is to provide a semiconductor integrated circuit using a two-wire two-phase logic circuit that can reduce power consumption without increasing the circuit scale.

本発明の更に別の目的は、入力データが論理変化するタイミングが異なる場合であっても、入力データの値に対する消費電力パターンを形成され難くする2線2相式論理回路を用いた半導体集積回路を提供することにある。   Still another object of the present invention is to provide a semiconductor integrated circuit using a two-wire two-phase logic circuit that makes it difficult to form a power consumption pattern for the value of the input data even when the timing at which the input data logically changes is different. Is to provide.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものについて簡単に説明すれば下記の通りである。   A typical one of the inventions disclosed in the present application will be briefly described as follows.

即ち、2線2相式組合せ論理回路に含まれる2線2相式論理回路は、全ての入力コネクタに無効データであるクリアが入力される休止相から、全ての入力コネクタに有効データが入力される稼動相に遷移するときのみ、入力コネクタに入力された論理値を、所定の論理関数により一定回数だけ反転させて、出力コネクタに有効データを確定する。これにより、全ての入力コネクタに有効データが揃うまでは、出力コネクタには有効データが確定せず、さらに入力コネクタに入力された論理値に係らず一定のトグル数を経て有効データを確定する。従って、入力データの値に係わらず、演算処理中の時刻毎の消費電力を一定にできる。   That is, in the 2-wire 2-phase logic circuit included in the 2-wire 2-phase combinational logic circuit, valid data is input to all input connectors from the idle phase in which clear, which is invalid data, is input to all input connectors. Only when the operation phase is changed, the logical value input to the input connector is inverted a predetermined number of times by a predetermined logical function to determine valid data in the output connector. As a result, until valid data is obtained for all input connectors, valid data is not confirmed for the output connector, and valid data is confirmed after a fixed number of toggles regardless of the logical value input to the input connector. Therefore, the power consumption at each time during the arithmetic processing can be made constant regardless of the value of the input data.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記の通りである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

入力データの値に係わらず、演算処理中の時刻毎の消費電力を一定にできる。また、回路規模を増大させず、消費電力を低減できる。   Regardless of the value of the input data, the power consumption at each time during the arithmetic processing can be made constant. Further, power consumption can be reduced without increasing the circuit scale.

1.代表的な実施の形態
先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. Representative Embodiment First, an outline of a typical embodiment of the invention disclosed in the present application will be described. The reference numerals in the drawings referred to with parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.

本発明の代表的な実施の形態に係る半導体集積回路は、暗号鍵を用いて暗号化アルゴリズムを実行し、所望の秘密情報を暗号化するプロセッサ(7)を有する。前記プロセッサは、2線2相符号化回路(20)と、2線2相式組合せ論理回路(22)とを備える。2線2相符号化回路は、前記秘密情報とされる1線1相符号を用いた入力データ(SI)を、ビット単位で、論理値1を示す第1信号(1,0)と、論理値0を示す第2信号(0,1)とを規定する2線2相符号を用いたデータ(DRI0,DRI1)に変換する。2線2相式組合せ論理回路は、前記2線2相符号に対応した論理演算を行う複数の2線2相式論理回路(70)を有し、前記入力データを暗号化する。前記2線2相式論理回路は、前記2線2相符号に対応する第1の信号線と第2の信号線からなる複数の入力コネクタ((a0,a1)、(b0,b1))と、出力コネクタ(q0,q1)を有する。2線2相式論理回路は、全ての前記入力コネクタに無効な情報であるクリア信号(1,1)が入力される初期状態から、全ての前記入力コネクタに前記第1信号又は前記第2信号が入力される有効状態に遷移するときのみ、前記入力コネクタに入力された論理値を、所定の論理関数により一定回数だけ反転させて、前記出力コネクタに前記第1信号又は前記第2信号を出力する。尚、本明細書中、入力コネクタとは入力端子を意味し、出力コネクタとは出力端子を意味する。   A semiconductor integrated circuit according to a representative embodiment of the present invention includes a processor (7) that executes an encryption algorithm using an encryption key and encrypts desired secret information. The processor includes a two-wire two-phase encoding circuit (20) and a two-wire two-phase combinational logic circuit (22). The two-wire two-phase encoding circuit converts the input data (SI) using the one-wire one-phase code, which is the secret information, into a first signal (1,0) indicating a logical value 1 in bit units, The data is converted into data (DRI0, DRI1) using a two-wire two-phase code that defines the second signal (0, 1) indicating the value 0. The two-wire two-phase combinational logic circuit includes a plurality of two-wire two-phase logic circuits (70) that perform a logical operation corresponding to the two-wire two-phase code, and encrypts the input data. The two-wire two-phase logic circuit includes a plurality of input connectors ((a0, a1), (b0, b1)) including a first signal line and a second signal line corresponding to the two-wire two-phase code. And output connectors (q0, q1). The two-wire two-phase logic circuit is configured so that the first signal or the second signal is supplied to all the input connectors from the initial state where the clear signal (1, 1) that is invalid information is input to all the input connectors. Only when a transition is made to a valid state in which the input signal is input, the logic value input to the input connector is inverted a predetermined number of times by a predetermined logic function, and the first signal or the second signal is output to the output connector. To do. In this specification, an input connector means an input terminal, and an output connector means an output terminal.

上記より、2線2相式論理回路では、全ての入力コネクタに無効な情報であるクリア信号が入力された初期状態に対して、有効な情報である第1信号又は第2信号が入力されて、全ての入力コネクタに有効な情報が揃った時点で、出力コネクタに、論理関数による演算結果である有効な情報が確定される。言換えると、入力コネクタに有効な情報が入力されるときに、遅延差が生じた場合であっても、全ての入力コネクタに有効な情報が揃うまでは、出力コネクタには有効な情報が確定せず、クリア信号が入力された状態のまま変化しない。これは、有効な情報が遅延差を伴って入力コネクタに入力された場合であっても、出力コネクタの論理値が変化する時刻に差が生じないことを意味しており、論理関数による演算処理に伴う消費電力が発生する時刻に差が生じない。   As described above, in the two-wire two-phase logic circuit, the first signal or the second signal that is valid information is input to the initial state in which the clear signal that is invalid information is input to all the input connectors. When valid information is obtained for all the input connectors, valid information that is a calculation result of the logical function is determined in the output connector. In other words, when valid information is input to the input connector, even if there is a delay difference, valid information is determined for the output connector until valid information is available for all input connectors. Without changing, the clear signal is still input. This means that even when valid information is input to the input connector with a delay difference, there is no difference in the time at which the logical value of the output connector changes. There is no difference in the time when the power consumption associated with.

さらに、2線2相式論理回路では、出力コネクタで確定した有効な情報は、第1信号又は第2信号に係らず、論理関数により一定回数だけ反転させることで得られる。ここで、論理関数による演算処理に伴う消費電力は、複数の論理素子が入力値を反転した回数、即ちトグル数と相関がある。このため、2線2相式論理回路のように、入力値に係らず、トグル数を一定にすれば、入力値と、入力値に対する演算処理に伴う消費電力との相関を小さくできる。従って、上記プロセッサを有する半導体集積回路によれば、有効な情報とされる秘密情報を、2線2相式論理回路の論理関数で暗号鍵を用いて演算処理により暗号化を行う場合であっても、入力値に対する演算処理に伴う消費電力を、入力値によらず時刻毎に一定にできる。その結果、プロセッサによる秘密情報の暗号化の演算処理中に、電力解析攻撃等を受けても、暗号鍵が推定される危険性を回避できる。   Further, in the two-wire two-phase logic circuit, valid information determined by the output connector can be obtained by inverting a certain number of times by a logic function regardless of the first signal or the second signal. Here, the power consumption associated with the arithmetic processing by the logic function is correlated with the number of times that the plurality of logic elements invert the input value, that is, the number of toggles. For this reason, as in the case of a two-wire two-phase logic circuit, if the number of toggles is made constant regardless of the input value, the correlation between the input value and the power consumption accompanying the arithmetic processing for the input value can be reduced. Therefore, according to the semiconductor integrated circuit having the processor described above, the secret information, which is valid information, is encrypted by the arithmetic processing using the encryption key with the logic function of the two-wire two-phase logic circuit. However, the power consumption associated with the calculation process for the input value can be made constant for each time regardless of the input value. As a result, it is possible to avoid a risk that the encryption key is estimated even if a power analysis attack or the like is received during the calculation process of encryption of secret information by the processor.

別の形態として、前記出力コネクタから出力された2線2相符号を用いたデータ(DRO0,DRO1)を、1線1相符号を用いたデータ(SO)に変換する2線1線変換回路(23)を、さらに備える。上記より、2線2相式論理回路で暗号化され、出力コネクタに確定した有効な情報を、適宜の1線式の論理回路で演算可能とすることができるから、プロセッサを、1線式の論理回路を備えた適宜の半導体集積回路に適用できる。   As another form, a two-wire one-line converter circuit (DRO0, DRO1) using the two-wire two-phase code output from the output connector to data (SO) using the one-wire one-phase code ( 23) is further provided. As described above, since the valid information encrypted by the two-wire two-phase logic circuit and determined in the output connector can be operated by an appropriate one-wire logic circuit, the processor can be The present invention can be applied to an appropriate semiconductor integrated circuit including a logic circuit.

更に別の形態として、前記2線2相式論理回路は、前記初期状態から前記有効状態に遷移する途中で、少なくとも1つの前記入力コネクタに前記クリア信号が入力された状態であれば、前記出力コネクタに前記クリア信号を出力する。上記より、全ての入力コネクタに有効な情報が揃うまでは、出力コネクタの論理値は変化しない。これにより、2線2相式論理回路の信号線の状態変化を抑えることができ、消費電力を低減できる。さらに、例えば入力データを同期させる同期信号や、2線2相式論理回路の入力側に同期信号を用いたラッチ回路を設ける必要がない。これにより、回路規模が増大することがなく、小型化を図ることができる。   As yet another form, the two-wire two-phase logic circuit is configured to output the output if the clear signal is input to at least one of the input connectors during the transition from the initial state to the valid state. The clear signal is output to the connector. From the above, the logical value of the output connector does not change until valid information is obtained for all the input connectors. Thereby, the state change of the signal line of the two-wire two-phase logic circuit can be suppressed, and the power consumption can be reduced. Further, for example, there is no need to provide a synchronization signal for synchronizing input data or a latch circuit using the synchronization signal on the input side of the two-wire two-phase logic circuit. As a result, the circuit scale does not increase and the size can be reduced.

更に別の形態として、前記2線2相式論理回路は、前記初期状態から前記有効状態への遷移を繰返す。上記より、隣接する有効な情報の間に無効な情報が存在するから、有効な情報のみからなる消費電力パターンが生じない。   As yet another form, the two-wire two-phase logic circuit repeats the transition from the initial state to the valid state. As described above, since invalid information exists between adjacent valid information, a power consumption pattern including only valid information does not occur.

更に別の形態として、前記2線2相式論理回路は、前記クリア信号、前記第1信号及び前記第2信号と論理値との対応関係を切替えるモード信号(MODE)に応じて、前記初期状態から前記有効状態に遷移するときに、論理値が変化する前記第1の信号線と前記第2の信号線が切り替わる。上記より、モード信号によって、入力データの値と、入力データの値に対して論理値が変化する出力コネクタの信号線との対応関係を切替えられるから、入力データの特定の値に対応して、論理値が変化する出力コネクタの信号線が常に特定されるという事態を回避できる。これにより、入力データの値と、消費電力パターンとの相関を小さくできる。   As yet another form, the two-wire two-phase logic circuit is configured to change the initial state according to a mode signal (MODE) for switching a correspondence relationship between the clear signal, the first signal, and the second signal and a logic value. The first signal line and the second signal line whose logic value changes are switched when transitioning from the active state to the valid state. From the above, since the correspondence between the value of the input data and the signal line of the output connector whose logical value changes with respect to the value of the input data can be switched by the mode signal, corresponding to the specific value of the input data, It is possible to avoid a situation in which the signal line of the output connector whose logical value changes is always specified. Thereby, the correlation between the value of input data and the power consumption pattern can be reduced.

更に別の形態として、前記2線2相式組合せ論理回路の前段及び後段に、論理値を反転する否定論理回路(201)をさらに備え、前記否定論理回路は、前記モード信号により有効又は無効とされる。上記より、否定論理回路が共に有効である場合には、クリア信号、第1信号及び第2信号を示す2線2相符号が反転された上で、2線2相式組合せ論理回路で演算され、その演算結果が更に反転される。これにより、2線2相符号の定義付けが変更された場合であっても、2線2相符号に対応した論理演算を行うことができる。また、否定論理回路が共に無効である場合には、2線2相符号の定義付けは変更されず、2線2相符号に対応した論理演算を行うことができる。   As yet another form, the two-wire two-phase combinational logic circuit further includes a negative logic circuit (201) that inverts a logical value at a front stage and a rear stage, and the negative logic circuit is enabled or disabled by the mode signal. Is done. From the above, when both of the negative logic circuits are valid, the two-wire two-phase code indicating the clear signal, the first signal, and the second signal is inverted, and then calculated by the two-wire two-phase combinational logic circuit. The operation result is further inverted. Thereby, even when the definition of the two-wire two-phase code is changed, a logical operation corresponding to the two-wire two-phase code can be performed. When both negative logic circuits are invalid, the definition of the two-wire two-phase code is not changed, and a logical operation corresponding to the two-wire two-phase code can be performed.

更に別の形態として、前記モード信号は、前記2線2相式論理回路が前記初期状態になった後に、前記否定論理回路を有効にする。上記より、2線2相式論理回路は、2線2相符号の定義付けを変更した上で初期状態から有効状態への遷移を行うことができる。   As yet another form, the mode signal enables the negative logic circuit after the two-wire two-phase logic circuit is in the initial state. As described above, the two-wire two-phase logic circuit can change from the initial state to the valid state after changing the definition of the two-wire two-phase code.

更に別の形態として、前記モード信号は、前記2線2相式論理回路での演算期間中において、前記第1の信号線と前記第2の信号線の論理値が変化する確率を略同一とするように、ランダムに切り替わる。上記より、2線2相式論理回路での演算期間中に、出力コネクタでの論理値の変化がランダムに切り替わるので、演算期間の一部において消費電力パターンが形成され難い。さらに、出力コネクタで演算期間中に論理値が変化する確率を第1の信号線と第2の信号線で略同一とするので、第1の信号線と第2の信号線の負荷容量に伴う遅延差を考慮する必要がなく、演算期間の全体においても、入力値に対する消費電力パターンが形成され難い。従って、演算期間中に電力解析攻撃等を受けたとしても、消費電力パターンを解析して暗号鍵を推定することが困難となる。   As yet another form, the mode signal has substantially the same probability that the logic values of the first signal line and the second signal line change during the operation period in the two-wire two-phase logic circuit. To switch randomly. As described above, since the change in the logic value at the output connector is randomly switched during the calculation period in the two-wire two-phase logic circuit, it is difficult to form a power consumption pattern in a part of the calculation period. Furthermore, since the probability that the logical value changes during the calculation period at the output connector is substantially the same between the first signal line and the second signal line, it accompanies the load capacity of the first signal line and the second signal line. There is no need to consider the delay difference, and it is difficult to form a power consumption pattern for the input value even in the entire calculation period. Therefore, even if a power analysis attack or the like is received during the calculation period, it is difficult to analyze the power consumption pattern and estimate the encryption key.

更に別の形態として、前記2線2相符号化回路を制御する制御信号(CTRL)を生成する制御回路(15)をさらに備える。前記2線2相符号化回路は、前記制御信号に応じて、前記2線2相符号による前記クリア信号、前記第1信号及び前記第2信号を出力するタイミングを変更する。上記より、2線2相式論理回路が演算処理を開始するタイミングを可変にできるから、入力値に応じた演算処理に伴う消費電力パターンを生じ難くできる。   As yet another form, a control circuit (15) for generating a control signal (CTRL) for controlling the two-wire two-phase encoding circuit is further provided. The two-wire two-phase encoding circuit changes a timing of outputting the clear signal, the first signal, and the second signal by the two-wire two-phase code according to the control signal. As described above, since the timing at which the 2-wire 2-phase logic circuit starts the arithmetic processing can be made variable, it is difficult to generate a power consumption pattern accompanying the arithmetic processing according to the input value.

更に別の形態として、前記2線2相式論理回路は、複合ゲートからなる。上記より、2線2相方式論理回路を構成するトランジスタ数の低減でき、小型化を図ることができる。   As yet another form, the two-wire two-phase logic circuit comprises a composite gate. As described above, the number of transistors constituting the two-wire two-phase logic circuit can be reduced, and downsizing can be achieved.

更に別の形態として、前記2線2相式論理回路は、前記第1の信号線と前記第2の信号線にそれぞれ入力されたデータが論理変化するタイミングのうち、遅い方のタイミングを規定するタイミング信号に同期して、前記2線2相符号に対応した論理演算を開始する。上記より、第1の信号線と第2の信号線にそれぞれ入力されたデータが論理変化した後に、2線2相式論理回路の論理演算が開始されることになる。このため、入力データが論理変化するタイミングが第1の信号線と第2の信号線で異なる場合であっても、2線2相式論理回路の論理演算の結果である出力データが論理変化するタイミングに差が生じ難いので、入力データの値に対する消費電力パターンを形成され難くできる。   As yet another form, the two-wire two-phase logic circuit defines a later timing among timings at which data input to the first signal line and the second signal line change logically. In synchronization with the timing signal, a logical operation corresponding to the two-wire two-phase code is started. As described above, the logical operation of the two-wire two-phase logic circuit is started after the data input to the first signal line and the second signal line change logic. For this reason, even when the timing at which the input data undergoes a logical change differs between the first signal line and the second signal line, the output data resulting from the logical operation of the two-wire two-phase logic circuit undergoes a logical change. Since it is difficult for a difference in timing to occur, it is difficult to form a power consumption pattern for the value of input data.

更に別の形態として、前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有する。前記2線2相式論理回路は、入力ゲート回路(141〜144)と、ロジック回路(146〜155)と、遅延回路(157)とを有する。入力ゲート回路は、前記入力コネクタに与えられたデータ((a0,a1)、(b0,b1))を、タイミング入力端子に与えられた複数のタイミング信号(a2,b2)のうち最も変化の遅いタイミング信号(A)に同期して取り込む。ロジック回路は、前記入力ゲート回路によって取り込まれたデータを受けて論理動作を行う。遅延回路は、前記最も変化の遅いタイミング信号を前記ロジック回路の論理動作が確定するタイミングよりも更に所定時間遅延させたタイミング信号(B)を生成する。前記遅延回路で生成されたタイミング信号は、タイミング出力端子から出力されて後段の前記2線2相式論理回路の前記タイミング入力端子に与えられる。前記所定時間は、前記2線2相式論理回路間の配線遅延よりも長くされる。上記より、入力コネクタに与えられたデータが論理変化するタイミングが異なっていても、ロジック回路は、論理変化するタイミングが揃ったデータを入力ゲート回路から受けることになる。これにより、2線2相式論理回路の出力データが論理変化するタイミングに差が生じ難い。さらに、遅延回路によって遅延させられたタイミング信号が、後段の入力ゲート回路で最も変化の遅いタイミング信号を得るために用いられる。このため、後段の2線2相式論理回路においても、出力データが論理変化するタイミングに差が生じ難い。従って、複数の従属接続された2線2相式論理回路において、入力データが論理変化するタイミングが配線遅延と論理遅延により異なる場合であっても、出力データが論理変化するタイミングに差が生じ難い。   As still another form, the two-wire two-phase combinational logic circuit includes a plurality of the two-wire two-phase logic circuits connected in cascade. The two-wire two-phase logic circuit includes an input gate circuit (141 to 144), a logic circuit (146 to 155), and a delay circuit (157). The input gate circuit changes the data ((a0, a1), (b0, b1)) given to the input connector most slowly among the plurality of timing signals (a2, b2) given to the timing input terminals. Capture in synchronization with the timing signal (A). The logic circuit receives the data taken in by the input gate circuit and performs a logic operation. The delay circuit generates a timing signal (B) obtained by delaying the slowest timing signal by a predetermined time from the timing at which the logic operation of the logic circuit is determined. The timing signal generated by the delay circuit is output from a timing output terminal and applied to the timing input terminal of the two-wire two-phase logic circuit in the subsequent stage. The predetermined time is longer than the wiring delay between the two-wire two-phase logic circuits. From the above, even if the timing at which the data applied to the input connector changes in logic is different, the logic circuit receives data from the input gate circuit at the timing at which the logic changes. Thereby, it is difficult for a difference to occur in the timing at which the output data of the two-wire two-phase logic circuit logically changes. Further, the timing signal delayed by the delay circuit is used to obtain the timing signal having the slowest change in the input gate circuit at the subsequent stage. For this reason, even in the subsequent two-wire two-phase logic circuit, it is difficult for a difference to occur in the timing at which the output data logically changes. Accordingly, in a plurality of cascade-connected two-wire two-phase logic circuits, even when the timing at which input data logically changes depends on the wiring delay and the logic delay, it is difficult to cause a difference in the timing at which output data logically changes. .

更に別の形態として、前記2線2相符号化回路から出力される2線2相符号を用いたデータのビット毎に、前記初期状態から前記有効状態に遷移するタイミングを示す第1タイミング信号を生成する第1タイミング生成回路(206)をさらに有する。初段の前記2線2相式論理回路(140)は、前記入力コネクタに与えられたデータのビット毎に前記第1タイミング信号を入力し、入力された前記第1タイミング信号のうち最も変化の遅い第1タイミング信号に同期して変化する第2タイミング信号(A)を生成する第2タイミング生成回路(145)を有する。次段の前記2線2相式論理回路の前記入力ゲート回路は、前記第2タイミング信号に同期して前記2線2相符号を用いたデータを、前記ロジック回路に与える。上記より、入力ゲート回路は、データのビット毎に状態が遷移するタイミングのうち最も変化の遅いタイミングに同期して変化する第2タイミング信号を生成するから、タイミングを揃えたデータがロジック回路に与えられる。このため、初段の2線2相式論理回路においても、出力データが論理変化するタイミングに差が生じ難い。   As yet another form, for each bit of data using the two-wire two-phase code output from the two-wire two-phase encoding circuit, a first timing signal indicating the timing of transition from the initial state to the valid state is provided. A first timing generation circuit (206) for generating is further included. The two-wire two-phase logic circuit (140) in the first stage inputs the first timing signal for each bit of data given to the input connector, and the slowest change among the inputted first timing signals. A second timing generation circuit (145) that generates a second timing signal (A) that changes in synchronization with the first timing signal is provided. The input gate circuit of the two-wire two-phase logic circuit in the next stage supplies the logic circuit with data using the two-wire two-phase code in synchronization with the second timing signal. As described above, since the input gate circuit generates the second timing signal that changes in synchronization with the slowest change timing among the timings at which the state transitions for each bit of data, the data having the same timing is given to the logic circuit. It is done. For this reason, even in the first-stage two-wire two-phase logic circuit, a difference hardly occurs in the timing at which the output data undergoes logic change.

更に別の形態として、前記クリア信号は“1,1”、前記第1信号は“1,0”、前記第2信号は“0,1”である。前記第1タイミング生成回路は、前記2線2相符号を用いたデータのビット毎に2入力の論理値が相違することを判定するゲート回路(210−1〜210−n)を有する。上記より、第1タイミング生成回路は、クリア信号から第1信号又は第2信号に遷移するときだけ、例えば“1”を出力することにより、データのビット毎に状態が遷移するタイミングを示す第1タイミング信号を生成できる。   As still another form, the clear signal is “1, 1”, the first signal is “1, 0”, and the second signal is “0, 1”. The first timing generation circuit includes gate circuits (210-1 to 210-n) that determine that two input logical values are different for each bit of data using the two-wire two-phase code. From the above, the first timing generation circuit outputs the first timing indicating the timing at which the state transitions for each bit of data by outputting, for example, “1” only when transitioning from the clear signal to the first signal or the second signal. A timing signal can be generated.

更に別の形態として、前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有する。前記2線2相式論理回路は、前記入力コネクタに与えられたデータを、タイミング入力端子に与えられたクロック信号(NCLK)に同期してラッチするラッチ回路(221〜224)と、前記ラッチ回路にラッチされたデータを受けて論理動作を行うロジック回路(225)と、を有する。前記クロック信号は、全ての前記ラッチ回路に共通に入力される。前記クロック信号の周期は、前記ロジック回路の論理動作が確定するまでの論理遅延と、前記2線2相式論理回路間の配線遅延とを含む遅延量よりも大きい。上記より、入力コネクタに入力されたデータの論理変化するタイミングが論理遅延や配線遅延により異なっていても、ロジック回路に与えられるデータの論理変化するタイミングは、ラッチ回路により揃えられる。これにより、2線2相式論理回路では、出力データが論理変化するタイミングに差が生じ難い。   As still another form, the two-wire two-phase combinational logic circuit includes a plurality of the two-wire two-phase logic circuits connected in cascade. The two-wire two-phase logic circuit latches data applied to the input connector in synchronization with a clock signal (NCLK) applied to a timing input terminal, and the latch circuit And a logic circuit (225) that receives the latched data and performs a logic operation. The clock signal is input in common to all the latch circuits. The period of the clock signal is larger than a delay amount including a logic delay until the logic operation of the logic circuit is determined and a wiring delay between the two-wire two-phase logic circuits. From the above, even if the logic change timing of the data input to the input connector varies depending on the logic delay or wiring delay, the logic change timing of the data applied to the logic circuit is made uniform by the latch circuit. As a result, in the two-wire two-phase logic circuit, it is difficult for a difference to occur in the timing at which the output data logically changes.

更に別の形態として、前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有する。前記2線2相式論理回路は、前記入力コネクタに与えられたデータを、タイミング入力端子に与えられたクロック信号(PCLK)に同期して出力するゲート回路(141〜144)と、前記ゲート回路から出力されたデータを受けて論理動作を行うロジック回路(146〜155)と、を有する。前記クロック信号は、初段の前記2線2相式論理回路を起点とした論理遅延が略同一とされる同一段に配置された前記2線2相式論理回路の前記ゲート回路に共通に入力され、段毎に位相が異なる。前記クロック信号の周期は、前記ロジック回路の論理動作が確定するまでの論理遅延と、前記2線2相式論理回路間の配線遅延とを含む遅延量よりも大きい。上記より、ロジック回路に与えられるデータの論理変化するタイミングは、同一段で共通に入力されるクロック信号に同期するゲート回路により揃えられる。これにより、出力データが論理変化するタイミングに差が生じ難い。   As still another form, the two-wire two-phase combinational logic circuit includes a plurality of the two-wire two-phase logic circuits connected in cascade. The two-wire two-phase logic circuit includes a gate circuit (141 to 144) for outputting data given to the input connector in synchronization with a clock signal (PCLK) given to a timing input terminal, and the gate circuit. And logic circuits (146 to 155) that receive data output from and perform logic operations. The clock signal is input in common to the gate circuit of the two-wire two-phase logic circuit arranged in the same stage where the logic delay starting from the first two-wire two-phase logic circuit is substantially the same. The phase differs from stage to stage. The period of the clock signal is larger than a delay amount including a logic delay until the logic operation of the logic circuit is determined and a wiring delay between the two-wire two-phase logic circuits. As described above, the timing at which the logic of the data supplied to the logic circuit changes is aligned by the gate circuit synchronized with the clock signal input in common at the same stage. As a result, it is difficult for a difference to occur in the timing at which the output data undergoes a logical change.

2.実施の形態の説明
次に、実施の形態について更に詳述する。
《実施形態1》
図1には、本発明の実施形態1に係る半導体集積回路の一例であるICカードチップの構成が例示される。ICカードチップ1は、例えば入出力回路2、中央処理装置(CPU)3、制御回路4、データメモリ5、プログラムメモリ6、暗号コプロセッサ7及びデータバス8を備える。制御回路4は、入出力回路2、CPU3、データメモリ5、プログラムメモリ6、暗号コプロセッサ7、データバス8が協調して動作するように制御する。CPU3は、プログラムメモリ6に記憶されたプログラムに応じて、入出力回路2、データメモリ5、暗号コプロセッサ7間のデータを、データバス8を介して入出力すると共に、上記プログラムに応じて上記データの演算処理を行う。
2. Next, the embodiment will be described in more detail.
Embodiment 1
FIG. 1 illustrates the configuration of an IC card chip which is an example of a semiconductor integrated circuit according to Embodiment 1 of the present invention. The IC card chip 1 includes, for example, an input / output circuit 2, a central processing unit (CPU) 3, a control circuit 4, a data memory 5, a program memory 6, a cryptographic coprocessor 7, and a data bus 8. The control circuit 4 controls the input / output circuit 2, the CPU 3, the data memory 5, the program memory 6, the cryptographic coprocessor 7, and the data bus 8 to operate in cooperation. The CPU 3 inputs / outputs data between the input / output circuit 2, the data memory 5, and the cryptographic coprocessor 7 via the data bus 8 according to the program stored in the program memory 6, and the above-mentioned according to the program. Performs data processing.

図2には、暗号コプロセッサ7の構成が例示される。暗号コプロセッサ7は、CPU3の演算を補助して高速処理を行う暗号・認証専用の演算回路であって、例えば適宜のメモリに格納されていた暗号鍵を読出し、この暗号鍵を用いて暗号化アルゴリズムを実行して、秘密情報を暗号化する。暗号コプロセッサ7は、バス変換回路10、データレジスタ11、2線2相式演算回路14、制御回路15を備える。制御回路15は、以下の処理を制御する。即ち、暗号コプロセッサ7でデータ処理を行うデータである秘密情報は、データバス8からバス変換回路10を介して、一時的にデータを記憶するデータレジスタ11に一時記憶される。データレジスタ11に記憶されたデータは、2線2相式演算回路14に入力され、暗号化される。2線2相式演算回路14の出力である暗号化された秘密情報は、データレジスタ11に一時記憶される。データレジスタ11に記憶された暗号化された秘密情報は、バス変換回路10を介してデータバス8に出力される。   FIG. 2 illustrates the configuration of the cryptographic coprocessor 7. The cryptographic coprocessor 7 is an arithmetic circuit dedicated to encryption / authentication that performs high-speed processing by assisting the operation of the CPU 3. For example, the cryptographic coprocessor 7 reads an encryption key stored in an appropriate memory and encrypts it using this encryption key. Run the algorithm to encrypt the secret information. The cryptographic coprocessor 7 includes a bus conversion circuit 10, a data register 11, a two-wire two-phase arithmetic circuit 14, and a control circuit 15. The control circuit 15 controls the following processing. That is, secret information that is data to be processed by the cryptographic coprocessor 7 is temporarily stored in the data register 11 that temporarily stores data from the data bus 8 through the bus conversion circuit 10. The data stored in the data register 11 is input to the 2-wire 2-phase arithmetic circuit 14 and encrypted. The encrypted secret information that is the output of the two-wire two-phase arithmetic circuit 14 is temporarily stored in the data register 11. The encrypted secret information stored in the data register 11 is output to the data bus 8 via the bus conversion circuit 10.

図3には、2線2相式演算回路14の構成が例示される。図26には、2線2相式演算回路14における論理値と2線2相符号の対応関係が例示されている。ここでは、論理値1を(1,0)、論理値0を(0,1)、クリアを(1,1)とそれぞれ規定する2線2相符号が用いられる。但し、これは、2線2相符号に割り当てる2つの信号線の値を限定するものではない。以下では、この論理値1、論理値0を2線2相符号の有効データといい、クリアを無効データという。2線2相式演算回路14は、2線2相符号化回路20、2線2相式組合せ論理回路22、2線1線変換回路23を備える。2線2相符号化回路20は、論理値を1ビットで表した1線1相符号を用いた入力データSIを、ビット単位で、2線2相符号に変換して出力する回路であって、その出力タイミングは制御回路15で生成される制御信号CTRLにより制御される。また、入力データSIは、秘密情報とされる。2線2相式組合せ論理回路22は、2線2相符号に対応した論理演算を行う複数の2線2相式論理回路(図7〜図10参照)を有しており、2線2相符号で表されたデータが入力されると、この2線2相式論理回路を用いて論理演算処理を行い、論理演算処理の結果を2線2相符号で表されたデータで出力する。これは、暗号コプロセッサ7での暗号鍵を用いた秘密情報の暗号化が、2線2相符号による論理演算で行われることを意味している。2線1線変換回路23は、2線2相式組合せ論理回路22から出力された2線2相符号で表されたデータを入力し、2線2相符号の有効データを、1ビットの論理値で表される1線1相符号を用いたデータSOに変換して出力する。   FIG. 3 illustrates the configuration of the two-wire two-phase arithmetic circuit 14. FIG. 26 exemplifies the correspondence relationship between the logical value and the two-wire two-phase code in the two-wire two-phase arithmetic circuit 14. Here, a two-wire two-phase code that defines a logical value 1 as (1, 0), a logical value 0 as (0, 1), and clear as (1, 1) is used. However, this does not limit the values of the two signal lines assigned to the two-wire two-phase code. Hereinafter, the logical value 1 and the logical value 0 are referred to as valid data of the two-wire two-phase code, and the clear is referred to as invalid data. The two-wire two-phase arithmetic circuit 14 includes a two-wire two-phase encoding circuit 20, a two-wire two-phase combinational logic circuit 22, and a two-wire one-line conversion circuit 23. The two-wire two-phase encoding circuit 20 is a circuit that converts input data SI using a one-wire one-phase code representing a logical value in one bit into a two-wire two-phase code and outputs it in a bit unit. The output timing is controlled by a control signal CTRL generated by the control circuit 15. The input data SI is confidential information. The two-wire two-phase combinational logic circuit 22 has a plurality of two-wire two-phase logic circuits (see FIGS. 7 to 10) that perform a logical operation corresponding to the two-wire two-phase code. When data represented by a signal is input, a logical operation process is performed using the two-wire two-phase logic circuit, and the result of the logical operation process is output as data represented by a two-wire two-phase code. This means that encryption of the secret information using the encryption key in the encryption coprocessor 7 is performed by a logical operation using a two-wire two-phase code. The 2-wire 1-wire conversion circuit 23 inputs the data represented by the 2-wire 2-phase code output from the 2-wire 2-phase combinational logic circuit 22, and converts the 2-wire 2-phase code valid data into a 1-bit logic. The data is converted into data SO using the 1-line 1-phase code represented by the value and output.

図4には、2線2相符号化回路20の構成が例示される。2線2相符号化回路20は、Dフリップフロップ50−1〜50−n、2入力OR論理素子52−1〜52−n、53−1〜53−nを備える。ここで、図6のタイミングチャートを用いて2線2相符号化回路20の動作を説明する。2線2相符号化回路20は、n個の1と0の値を有する1ビットからなる秘密情報とされる入力データSIを入力し、同期信号CLKの立ち上がりに同期して入力データSIを、ビット毎にDフリップフロップ50−1〜50−nにより保持し、Dフリップフロップ50−1〜50−nの出力Qと出力QNにより、2線2相符号の有効データとされる論理値0(0,1)又は論理値1(1,0)が出力される。   FIG. 4 illustrates the configuration of the two-wire two-phase encoding circuit 20. The two-wire two-phase encoding circuit 20 includes D flip-flops 50-1 to 50-n, two-input OR logic elements 52-1 to 52-n, and 53-1 to 53-n. Here, the operation of the two-wire two-phase encoding circuit 20 will be described with reference to the timing chart of FIG. The two-wire two-phase encoding circuit 20 inputs n pieces of input data SI that is 1-bit secret information having 1 and 0 values, and inputs the input data SI in synchronization with the rising edge of the synchronization signal CLK. Each bit is held by the D flip-flops 50-1 to 50-n, and the logical value 0 (2-bit 2-phase code valid data is obtained by the outputs Q and QN of the D flip-flops 50-1 to 50-n. 0,1) or logical value 1 (1,0) is output.

また、2入力OR論理素子52−1〜52−nの一方の入力には、Dフリップフロップ50−1〜50−nの出力Qが接続される。2入力OR論理素子53−1〜53−nの一方の入力には、Dフリップフロップ150−1〜50−nの出力QNが接続される。さらに、2入力OR論理素子52−1〜52−n、53−1〜53−nの他方の入力には、それぞれ制御信号CTRLが入力される。これにより、2線2相符号化回路20は、制御信号CTRLが0であれば、2線2相式符号による出力データ(DRI0,DRI1)としてDフリップフロップ50−1〜50−nの出力Q、QNの値である論理値0(0,1)又は論理値1(1,0)を出力する。このとき、2線2相式組合せ論理回路22に有効データが入力される。以下では、この状態を稼動相という。また、2線2相符号化回路20は、制御信号CTRLが1であれば、2線2相式符号による出力データ(DRI0,DRI1)としてクリア(1,1)を出力する。このとき、2線2相式組合せ論理回路22に無効データが入力される。以下では、この状態を休止相という。このように、制御信号CTRLの周期により、休止相から稼動相への遷移が繰返されるから、隣接する稼動相の間には休止相があり、有効データの間に無効データが存在することになって、有効データが連続しない。これにより、有効データのみからなる消費電力パターンが生じない。また、制御信号CTRLの周期は、固定でなく変化させてもよい。これにより、2線2相符号化回路20が2線2相符号による出力データ(DRI0,DRI1)を出力するタイミングを可変とし、休止相と稼動相が切り替わるタイミングを変更できる。また、2線2相符号化回路20の入力データSIの各ビット毎独立に、異なる周期の制御信号CTRLを与えるようにしてもよい。   The outputs Q of the D flip-flops 50-1 to 50-n are connected to one input of the 2-input OR logic elements 52-1 to 52-n. The outputs QN of the D flip-flops 150-1 to 50-n are connected to one input of the two-input OR logic elements 53-1 to 53-n. Further, the control signal CTRL is input to the other inputs of the 2-input OR logic elements 52-1 to 52-n and 53-1 to 53-n, respectively. Thus, if the control signal CTRL is 0, the 2-wire 2-phase encoding circuit 20 outputs the output Q of the D flip-flops 50-1 to 50-n as output data (DRI0, DRI1) by the 2-wire 2-phase code. , The logical value 0 (0, 1) or the logical value 1 (1, 0), which is the value of QN, is output. At this time, valid data is input to the two-wire two-phase combinational logic circuit 22. Hereinafter, this state is referred to as an operating phase. Further, if the control signal CTRL is 1, the 2-wire 2-phase encoding circuit 20 outputs clear (1, 1) as output data (DRI0, DRI1) based on the 2-wire 2-phase code. At this time, invalid data is input to the two-wire two-phase combinational logic circuit 22. Hereinafter, this state is referred to as a resting phase. Thus, since the transition from the dormant phase to the active phase is repeated according to the cycle of the control signal CTRL, there is a dormant phase between adjacent active phases, and invalid data exists between valid data. The valid data is not continuous. Thereby, the power consumption pattern which consists only of effective data does not arise. Further, the cycle of the control signal CTRL may be changed instead of being fixed. Thereby, the timing at which the 2-wire 2-phase encoding circuit 20 outputs the output data (DRI0, DRI1) by the 2-wire 2-phase code can be made variable, and the timing at which the idle phase and the active phase are switched can be changed. Alternatively, the control signal CTRL having a different period may be provided independently for each bit of the input data SI of the two-wire two-phase encoding circuit 20.

図5には、2線1線変換回路23の構成が例示されている。2線1線変換回路23は、Dフリップフロップ51−1〜51−nを備えている。ここで、図6のタイミングチャートを用いて、2線1線変換回路23の動作を説明する。2線2相符号を有する2つの信号線において、一方の信号線をDフリップフロップ51−1〜51−nに入力し、同期信号CLKの立ち上がりで、Dフリップフロップ51−1〜51−nに入力した値を保持して出力する。即ち、2線1線変換回路23は、一方の信号線から入力された値、即ち2線2相式組合せ論理回路22の出力データ(DRO0,DRO1)を2線2相符号の有効データの値で保持することにより、1ビットの信号線に変換し、例えばデータレジスタ11にデータSOとして出力する。また、2線1線変換回路23は、Dフリップフロップ50−1〜50−nに入力データの有効データを保持するタイミングにおいて、入力データの2線2相符号がクリア(1,1)又は未使用(0,0)であれば、2線2相式組合せ論理回路22の動作が異常であると判断することもできる。   FIG. 5 illustrates the configuration of the two-wire / one-wire conversion circuit 23. The two-wire / one-wire conversion circuit 23 includes D flip-flops 51-1 to 51-n. Here, the operation of the 2-line 1-line conversion circuit 23 will be described with reference to the timing chart of FIG. Of the two signal lines having the two-wire two-phase code, one signal line is input to the D flip-flops 51-1 to 51-n, and the D flip-flops 51-1 to 51-n are input at the rising edge of the synchronization signal CLK. Holds the input value and outputs it. That is, the 2-wire 1-wire conversion circuit 23 converts the value input from one signal line, that is, the output data (DRO0, DRO1) of the 2-wire 2-phase combinational logic circuit 22 into the value of effective data of the 2-wire 2-phase code. Is converted into a 1-bit signal line and output to the data register 11 as data SO, for example. In addition, the 2-wire 1-line conversion circuit 23 clears (1, 1) or not yet clears the 2-wire 2-phase code of the input data at the timing when the valid data of the input data is held in the D flip-flops 50-1 to 50-n. If it is in use (0, 0), it can be determined that the operation of the two-wire two-phase combinational logic circuit 22 is abnormal.

次に、2線2相式組合せ論理回路22に含まれる2線2相式論理回路の一例として、2線2相符号を用いてAND論理演算を行う2線2相式AND論理回路と、2線2相符号を用いてXOR論理演算を行う2線2相式XOR論理回路の詳細を説明する。図7には、2線2相式組合せ論理回路22に含まれる2線2相式AND論理回路の構成が例示されている。2線2相式AND論理回路70は、2入力NOR論理素子71〜74と、3入力NOR論理素子75、76とを備える。これらの論理素子71〜76は、CMOSを用いて構成されている。2線2相式AND論理回路70は、2線2相符号で表される入力データ(a0,a1)、(b0,b1)がそれぞれ入力される第1の信号線と第2の信号線からなる2つの入力コネクタと、出力データ(q0,q1)が出力される第1の信号線と第2の信号線からなる1つの出力コネクタとを有する。図27には、2線2相式AND論理回路70についての入力と出力の関係が2線2相符号で例示されている。この対応関係について図11を用いて詳述する。   Next, as an example of a two-wire two-phase logic circuit included in the two-wire two-phase combinational logic circuit 22, a two-wire two-phase AND logic circuit that performs an AND logic operation using a two-wire two-phase code, and 2 Details of a two-wire two-phase XOR logic circuit that performs an XOR logic operation using a two-phase code will be described. FIG. 7 illustrates a configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit 22. The 2-wire 2-phase AND logic circuit 70 includes 2-input NOR logic elements 71 to 74 and 3-input NOR logic elements 75 and 76. These logic elements 71 to 76 are configured using CMOS. The two-wire two-phase AND logic circuit 70 includes a first signal line and a second signal line to which input data (a0, a1) and (b0, b1) represented by a two-wire two-phase code are input, respectively. And two output connectors, and a first signal line for outputting output data (q0, q1) and a single output connector composed of a second signal line. In FIG. 27, the relationship between input and output for the 2-wire 2-phase AND logic circuit 70 is illustrated by 2-wire 2-phase codes. This correspondence will be described in detail with reference to FIG.

図11には、2線2相式AND論理回路70の出力を示すカルノー図が例示されている。図中、〔1〕〜〔9〕は、出力コネクタからの出力データ(q0,q1)を示しており、〔1〕は休止相、〔2〕〔4〕〔7〕〔9〕は稼動相、〔3〕〔5〕〔6〕〔8〕は、休止相から稼動相への遷移の途中を示す中間状態を、それぞれ示している。以下、入力データ(a0,a1)かつ入力データ(b0,b1)がクリア(1,1)である休止相から、論理値0又は論理値1である稼動相に遷移したときの動作を説明する。ここで、入力データ(a0,a1)又は入力データ(b0,b1)がクリアから論理値0又は論理値1に遷移する時刻が同時でないとする。例えば入力データ(a0,a1)が入力データ(b0,b1)よりも先にクリアから論理値0又は論理値1に遷移したとき、出力データ(q0,q1)は、中間状態である〔3〕、〔8〕に遷移する。次に、入力データ(b0,b1)が入力データ(a0,a1)に遅れて、クリアから論理値0又は論理値1に遷移したとき、出力データ(q0,q1)は〔2〕、〔4〕、〔7〕、〔9〕のいずれかの状態に遷移する。   FIG. 11 illustrates a Carnot diagram showing the output of the two-wire two-phase AND logic circuit 70. In the figure, [1] to [9] indicate output data (q0, q1) from the output connector, [1] is a pause phase, [2] [4] [7] [9] are operating phases. , [3], [5], [6], and [8] respectively show intermediate states indicating the transition from the rest phase to the active phase. Hereinafter, the operation when the input data (a0, a1) and the input data (b0, b1) are cleared (1, 1) to the active phase having the logical value 0 or the logical value 1 will be described. . Here, it is assumed that the time at which the input data (a0, a1) or the input data (b0, b1) changes from clear to logical value 0 or logical value 1 is not simultaneous. For example, when the input data (a0, a1) transitions from clear to logical value 0 or logical value 1 before the input data (b0, b1), the output data (q0, q1) is in an intermediate state [3] , [8]. Next, when the input data (b0, b1) shifts from the clear to the logical value 0 or the logical value 1 after the input data (a0, a1), the output data (q0, q1) becomes [2], [4 ], [7], and [9].

一方、入力データ(b0,b1)が入力データ(a0,a1)よりも先にクリアから論理値0又は論理値1に遷移したとき、出力データ(q0,q1)は中間状態である〔5〕、〔6〕に遷移する。次に、入力データ(a0,a1)が入力データ(b0,b1)に遅れて、クリアから論理値0又は論理値1に遷移したとき、出力データ(q0,q1)は〔2〕、〔4〕、〔7〕、〔9〕のいずれかの状態に遷移する。   On the other hand, when the input data (b0, b1) transitions from clear to logical value 0 or logical value 1 before the input data (a0, a1), the output data (q0, q1) is in an intermediate state [5]. , [6]. Next, when the input data (a0, a1) is delayed from the input data (b0, b1) and transitions from clear to logical value 0 or logical value 1, the output data (q0, q1) is [2], [4 ], [7], and [9].

以下、2線2相式AND論理回路70において、出力データ(q0,q1)が変化する時刻が一定であり、かつ、この出力データ(q0,q1)が確定されるときの消費電力が一定になることを説明する。図11において、入力がクリア(1,1)から論理値0(0,1)又は論理値1(1,0)に変化するとき、休止相〔1〕において2入力NOR論理素子71〜74の出力は0であり、中間状態〔3〕、〔5〕、〔6〕、〔8〕において、2入力NOR論理素子71〜74の出力は0であり、稼動相〔2〕、〔4〕、〔7〕、〔9〕において2入力NOR論理素子71〜74のいずれかの出力が1になり、3入力NOR論理素子75、76のいずれかが1になる。即ち、2線2相式AND論理回路70では、休止相から稼動相に遷移するとき、同一段に配置された2入力NOR論理素子71〜74のいずれかの出力と、同一段に配置された3入力NOR論理素子75、76のいずれかの出力との2つの出力のみが必ず反転する。これにより、トグル数が固定となり、入力値に係らず常に消費電力が一定となる。トグル数とは、所定の論理関数により論理値が反転される回数をいう。また、2線2相式AND論理回路70では、上記のように、同一段に配置された論理素子のいずれかの出力だけが反転するように複数の論理素子を配置しているから、トグルする論理素子の数を少なくして、消費電力を削減できる。   Hereinafter, in the 2-wire 2-phase AND logic circuit 70, the time at which the output data (q0, q1) changes is constant, and the power consumption when the output data (q0, q1) is determined is constant. Explain that. In FIG. 11, when the input changes from clear (1, 1) to logic value 0 (0, 1) or logic value 1 (1, 0), the two-input NOR logic elements 71 to 74 in the rest phase [1]. The output is 0, and in the intermediate states [3], [5], [6], [8], the outputs of the 2-input NOR logic elements 71 to 74 are 0, and the operating phases [2], [4], In [7] and [9], the output of any of the 2-input NOR logic elements 71 to 74 is 1, and any of the 3-input NOR logic elements 75 and 76 is 1. That is, in the two-wire two-phase AND logic circuit 70, when the transition is made from the idle phase to the active phase, any one of the outputs of the two-input NOR logic elements 71 to 74 arranged in the same stage is arranged in the same stage. Only the two outputs of the three-input NOR logic elements 75 and 76 are always inverted. As a result, the number of toggles is fixed, and the power consumption is always constant regardless of the input value. The number of toggles refers to the number of times that a logical value is inverted by a predetermined logical function. In the two-wire two-phase AND logic circuit 70, as described above, a plurality of logic elements are arranged so that only one of the outputs of the logic elements arranged in the same stage is inverted. Power consumption can be reduced by reducing the number of logic elements.

要するに、2線2相式AND論理回路70は、休止相〔1〕から稼動相〔2〕、〔4〕、〔7〕、〔9〕に遷移するときのみ、言換えると全ての入力コネクタに有効データが揃った時点で、入力コネクタの入力データの論理値を、上記複数の論理素子71〜76からなる論理関数により一定回数、ここでは2回だけ反転させて、出力コネクタに有効データを確定する。また、全ての入力コネクタに有効な情報が揃う前は、出力コネクタは上記休止相〔1〕、中間状態〔3〕、〔5〕、〔6〕、〔8〕に示されるように無効データを出力する。これにより、2線2相式AND論理回路70における信号線の状態変化を抑えることができるから、消費電力を低減できる。さらに、有効データが遅延して入力コネクタに入力された場合であっても、出力コネクタの論理値が変化する時刻に差が生じず、その結果、論理関数による演算処理に伴う消費電力が発生する時刻に差が生じない。これは、2線2相式AND論理回路70では、全ての入力コネクタの遅延差を考慮する必要がないことを意味している。このため、例えば入力データ(a0,a1)、(b0,b1)を同期させる同期信号や、2線2相式AND論理回路70の入力側に同期信号を用いたラッチ回路を設ける必要がないから、回路規模が増大することがなく、小型化を図ることができる。   In short, the two-wire two-phase AND logic circuit 70 is connected to all input connectors only when transitioning from the idle phase [1] to the active phase [2], [4], [7], [9]. When valid data is available, the logical value of the input data of the input connector is inverted a predetermined number of times, here twice by the logic function composed of the plurality of logic elements 71 to 76, and the valid data is determined in the output connector. To do. Before valid information is available for all input connectors, the output connector outputs invalid data as shown in the pause phase [1], intermediate state [3], [5], [6], [8]. Output. As a result, the state change of the signal lines in the two-wire two-phase AND logic circuit 70 can be suppressed, so that power consumption can be reduced. Furthermore, even when valid data is delayed and input to the input connector, there is no difference in the time at which the logical value of the output connector changes, and as a result, power consumption associated with arithmetic processing by the logical function occurs. There is no difference in time. This means that in the 2-wire 2-phase AND logic circuit 70, it is not necessary to consider the delay difference of all input connectors. Therefore, for example, there is no need to provide a synchronization signal for synchronizing the input data (a0, a1) and (b0, b1) or a latch circuit using the synchronization signal on the input side of the two-wire two-phase AND logic circuit 70. Therefore, the circuit scale does not increase and the size can be reduced.

さらに、2線2相式AND論理回路70では、入力データの値に係らず、一定のトグル数を経て出力コネクタに有効データが確定される。これは、消費電力が、CMOSで構成された複数の論理素子71〜76でのトグル数と相関があることを考慮すれば、入力データの値と、入力データの値に対する演算処理に伴う消費電力との相関を小さくできることを意味する。従って、暗号コプロセッサ7によれば、2線2相式AND論理回路70を用いて秘密情報の暗号化に伴う論理演算を行うことにより、入力データの値に係らずトグル数を固定とするから、入力データに対する演算処理に伴う消費電力を、入力データの値に係らず、時刻毎に一定にできる。これにより、暗号コプロセッサ7での暗号化に伴う論理演算中に、入力値と論理演算中に発生する消費電力を利用して解析を行う電力解析攻撃によって、暗号鍵が推定されることがなく、高い安全性を得ることができる。   Further, in the two-wire two-phase AND logic circuit 70, valid data is determined in the output connector through a certain number of toggles regardless of the value of the input data. In consideration of the fact that the power consumption correlates with the number of toggles in the plurality of logic elements 71 to 76 composed of CMOS, the power consumption associated with the processing of the input data value and the input data value. This means that the correlation with can be reduced. Therefore, according to the cryptographic coprocessor 7, the number of toggles is fixed regardless of the value of the input data by performing the logical operation accompanying the encryption of the secret information using the two-wire two-phase AND logic circuit 70. The power consumption associated with the arithmetic processing on the input data can be made constant for each time regardless of the value of the input data. Thus, the encryption key is not estimated by a power analysis attack in which analysis is performed using the input value and the power consumption generated during the logical operation during the logical operation accompanying encryption in the cryptographic coprocessor 7. High safety can be obtained.

これに対して、1本の信号線で1ビットを表し、信号線の状態がそのまま1ビットのデータ値に対応する1線1相符号を用いた適宜の1線式の演算回路を用いて、秘密情報の暗号化を行った場合には、1線式の演算回路の入力データと、入力データに対する演算処理で発生する消費電力とに相関が生じてしまい、電力解析攻撃等により暗号鍵を容易に推定されてしまう。   On the other hand, an appropriate one-line arithmetic circuit using a one-line one-phase code that represents one bit with one signal line and the state of the signal line corresponds to the data value of one bit as it is, When the secret information is encrypted, there is a correlation between the input data of the one-wire arithmetic circuit and the power consumption generated by the arithmetic processing on the input data, and the encryption key can be easily obtained by a power analysis attack or the like. Will be estimated.

以上、2線2相式AND論理回路70において、2線2相符号のクリアを(1,1)とした例を示したが、2線2相符号のクリアを(0,0)とした場合について図9を用いて説明する。図9には、2線2相式組合せ論理回路22に含まれる別の2線2相式AND論理回路の構成が例示されている。2線2相式AND論理回路80は、2入力NAND論理素子81〜84と、3入力NAND論理素子85、86とを備える。図13には、2線2相式AND論理回路80の出力を示すカルノー図が例示されている。2線2相式AND論理回路80は、図13のカルノー図に従って構成されており、図中、〔1〕〜〔9〕は、上記図11と同様に、出力コネクタからの出力データ(q0,q1)を示しており、〔1〕は休止相、〔2〕〔4〕〔7〕〔9〕は稼動相、〔3〕〔5〕〔6〕〔8〕は中間状態を、それぞれ示している。そして、2線2相式AND論理回路80は、2線2相式AND論理回路70と同様に、休止相から稼動相に遷移するときのみ、入力データの値に係らず、一定のトグル数を経て出力コネクタに有効データを確定する。従って、2線2相式AND論理回路80によれば、入力データの値とそれに伴う消費電力との相関を小さくでき、電力解析攻撃により暗号鍵が推定されることを回避できる。   In the above example, in the 2-wire 2-phase AND logic circuit 70, the clear of the 2-wire 2-phase code is (1, 1), but the clear of the 2-wire 2-phase code is (0, 0). Will be described with reference to FIG. FIG. 9 illustrates the configuration of another two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit 22. The 2-wire 2-phase AND logic circuit 80 includes 2-input NAND logic elements 81 to 84 and 3-input NAND logic elements 85 and 86. FIG. 13 illustrates a Carnot diagram showing the output of the two-wire two-phase AND logic circuit 80. The two-wire two-phase AND logic circuit 80 is configured according to the Carnot diagram of FIG. 13. In the figure, [1] to [9] are the output data (q0, q1), [1] indicates the idle phase, [2] [4] [7] [9] indicates the active phase, and [3] [5] [6] [8] indicate the intermediate state, respectively. Yes. Similarly to the two-wire two-phase AND logic circuit 70, the two-wire two-phase AND logic circuit 80 sets a fixed number of toggles regardless of the value of the input data only when transitioning from the idle phase to the active phase. After that, valid data is determined in the output connector. Therefore, according to the two-wire two-phase AND logic circuit 80, the correlation between the value of the input data and the accompanying power consumption can be reduced, and the estimation of the encryption key due to the power analysis attack can be avoided.

図8には、2線2相式組合せ論理回路22に含まれる2線2相式XOR論理回路の構成が例示されている。2線2相式XOR論理回路90は、2入力NOR論理素子91〜96を備える。図12には、2線2相式XOR論理回路90の出力を示すカルノー図が例示されている。2線2相式XOR論理回路90は、図12のカルノー図に従って構成される。2線2相式XOR論理回路90は、2線2相式AND論理回路70と同様に、休止相から稼動相に遷移するときのみ、入力データの値に係らず、一定のトグル数を経て出力コネクタに有効データを確定する。   FIG. 8 illustrates a configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit 22. The 2-wire 2-phase XOR logic circuit 90 includes 2-input NOR logic elements 91-96. FIG. 12 illustrates a Carnot diagram illustrating the output of the two-wire two-phase XOR logic circuit 90. The two-wire two-phase XOR logic circuit 90 is configured according to the Carnot diagram of FIG. The two-wire two-phase XOR logic circuit 90, like the two-wire two-phase AND logic circuit 70, outputs only through a fixed number of toggles regardless of the value of the input data only when transitioning from the idle phase to the active phase. Confirm valid data in the connector.

ここで、上記2線2相式XOR論理回路90において、2線2相符号のクリアを(1,1)とした例を示したが、(0,0)とした場合について図10を用いて説明する。図10には、2線2相式組合せ論理回路22に含まれる更に別の2線2相式XOR論理回路の構成が例示されている。2線2相式XOR論理回路100は、2入力NAND論理素子101〜106を備える。図14には、2線2相式XOR論理回路100の出力を示すカルノー図が例示されている。2線2相式XOR論理回路100は、図14のカルノー図に従って構成される。2線2相式XOR論理回路100は、2線2相式AND論理回路70と同様に、休止相から稼動相に遷移するときのみ、入力データの値に係らず、一定のトグル数を経て出力コネクタに有効データを確定する。   Here, in the above-described two-wire two-phase XOR logic circuit 90, an example in which the clear of the two-wire two-phase code is (1, 1) is shown, but the case where it is (0, 0) will be described with reference to FIG. explain. FIG. 10 illustrates a configuration of still another two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit 22. The 2-wire 2-phase XOR logic circuit 100 includes 2-input NAND logic elements 101 to 106. FIG. 14 illustrates a Carnot diagram illustrating the output of the two-wire two-phase XOR logic circuit 100. The two-wire two-phase XOR logic circuit 100 is configured according to the Carnot diagram of FIG. The two-wire two-phase XOR logic circuit 100, like the two-wire two-phase AND logic circuit 70, outputs only through a fixed number of toggles regardless of the value of the input data only when transitioning from the idle phase to the active phase. Confirm valid data in the connector.

《実施形態2》
図15には、本発明の実施形態2に係る論理演算回路の一例である2線2相式演算回路の構成が例示されている。以下、図2で例示した2線2相式演算回路14と重複する機能等については同一符号を付し、適宜説明を省略する。2線2相式演算回路200は、例えば2つの否定論理回路201、2線2相符号化回路21、2線2相式組合せ論理回路202、2線1線変換回路23を備えている。図28には、2線2相式演算回路200についての論理値と2線2相符号の対応関係が例示されている。2線2相式演算回路200では、2線2相符号を切替え信号MODEの値により、MODE=0ならば(0,1)を論理値0、(1,0)を論理値1とし、MODE=1ならば(0,1)を論理値1、(1,0)を論理値0として論理演算を行う。要するに、否定論理回路201は、入力される全ての信号線の論理値を、切替え信号MODEが1のとき否定論理して出力する。切替え信号MODEは、例えば制御回路15により生成され、図17のタイミングチャートのように与えられる。
<< Embodiment 2 >>
FIG. 15 illustrates the configuration of a two-wire two-phase arithmetic circuit that is an example of the logical arithmetic circuit according to the second embodiment of the present invention. In the following, functions and the like that are the same as those of the two-wire two-phase arithmetic circuit 14 illustrated in FIG. The two-wire two-phase arithmetic circuit 200 includes, for example, two negative logic circuits 201, a two-wire two-phase encoding circuit 21, a two-wire two-phase combinational logic circuit 202, and a two-wire one-line conversion circuit 23. FIG. 28 illustrates the correspondence between the logical value and the 2-wire 2-phase code for the 2-wire 2-phase arithmetic circuit 200. In the two-wire two-phase arithmetic circuit 200, if the two-wire two-phase code is changed according to the value of the switching signal MODE, and MODE = 0, (0, 1) is set to the logical value 0, and (1, 0) is set to the logical value 1. If = 1, the logical operation is performed with (0, 1) as the logical value 1 and (1, 0) as the logical value 0. In short, the negation logic circuit 201 negates and outputs the logic values of all input signal lines when the switching signal MODE is 1. The switching signal MODE is generated by, for example, the control circuit 15 and is given as shown in the timing chart of FIG.

図16には、否定論理回路201の構成が例示されている。否定論理回路201は、XOR論理素子54−1〜54−mを備える。入力されるm個の入力信号線INは、XOR論理素子54−1〜54−mに接続され、切替え信号MODEが1のとき、XOR論理素子54−1〜54−mは、入力信号線INの論理値を否定して出力するように動作する。   FIG. 16 illustrates the configuration of the negative logic circuit 201. The negation logic circuit 201 includes XOR logic elements 54-1 to 54-m. The input m input signal lines IN are connected to the XOR logic elements 54-1 to 54-m. When the switching signal MODE is 1, the XOR logic elements 54-1 to 54-m are connected to the input signal line IN. It operates to negate the logical value of.

2線2相式組合せ論理回路202は、2線2相符号による論理演算を行う2線2相式論理回路(図18、図19参照)を有しており、2線2相符号で表されたデータが入力されると、この2線2相式論理回路を用いて論理演算処理を行い、論理演算処理の結果を2線2相符号で表されたデータで出力する。   The two-wire two-phase combinational logic circuit 202 has a two-wire two-phase logic circuit (see FIGS. 18 and 19) that performs a logical operation using a two-wire two-phase code, and is represented by a two-wire two-phase code. When this data is input, logical operation processing is performed using this 2-wire 2-phase logic circuit, and the result of the logical operation processing is output as data represented by 2-wire 2-phase code.

これにより、2線2相式演算回路200では、否定論理回路201が共に有効である場合には、論理値と2線2相符号との対応関係が反転された上で、入力データSIが2線2相符号化回路21で2線2相符号に変換された後、2線2相式組合せ論理回路202で演算され、その演算結果である2線2相符号で表されたデータが更に反転される。従って、2線2相式演算回路200によれば、2線2相符号の定義付けが変更された場合であっても、2線2相符号に対応した論理演算を行うことができる。また、否定論理回路201は、2線2相式組合せ論理回路202に含まれる2線2相式論理回路が休止相になった後に有効とされる。このようにすれば、2線2相式演算回路200は、2線2相符号の定義付けを変更した上で、2線2相式論理回路における休止相から稼動相への遷移を行うことができる。一方、2線2相式演算回路200は、否定論理回路201が共に無効である場合には、2線2相符号の定義付けは変更されず、上記2線2相式演算回路14と同様な論理演算を行うことができる。   Thus, in the two-wire two-phase arithmetic circuit 200, when both the negative logic circuits 201 are valid, the input data SI is 2 after the correspondence between the logical value and the two-wire two-phase code is inverted. After being converted into a two-wire two-phase code by the two-wire two-phase encoding circuit 21, the two-wire two-phase combinational logic circuit 202 is operated, and the data represented by the two-wire two-phase code that is the result of the operation is further inverted. Is done. Therefore, the two-wire two-phase arithmetic circuit 200 can perform a logical operation corresponding to the two-wire two-phase code even when the definition of the two-wire two-phase code is changed. Further, the negative logic circuit 201 is enabled after the two-wire two-phase logic circuit included in the two-wire two-phase combinational logic circuit 202 enters a pause phase. In this way, the two-wire two-phase arithmetic circuit 200 can change the definition of the two-wire two-phase code and perform the transition from the sleep phase to the active phase in the two-wire two-phase logic circuit. it can. On the other hand, in the case of the two-wire two-phase arithmetic circuit 200, when both of the negative logic circuits 201 are invalid, the definition of the two-wire two-phase code is not changed and is the same as the two-wire two-phase arithmetic circuit 14 described above. Logical operations can be performed.

次に、2線2相式組合せ論理回路202に含まれる切替え信号MODEを入力する2線2相式論理回路の一例として、2線2相符号を用いてAND論理演算を行う2線2相式AND論理回路と、2線2相符号を用いてXOR論理演算を行う2線2相式XOR論理回路を説明する。図18には、2線2相式組合せ論理回路202に含まれる2線2相式AND論理回路の構成が例示されている。2線2相式AND論理回路130は、2入力NOR論理素子131〜132と、3入力NOR論理素子133〜138とを備える。cは切替え信号MODEと同じ値であり、cnは切替え信号MODEの論理値を否定した値である。   Next, as an example of a two-wire two-phase logic circuit that inputs a switching signal MODE included in the two-wire two-phase combinational logic circuit 202, a two-wire two-phase equation that performs an AND logic operation using a two-wire two-phase code. A two-wire two-phase XOR logic circuit that performs an XOR logic operation using an AND logic circuit and a two-wire two-phase code will be described. FIG. 18 illustrates a configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit 202. The 2-wire 2-phase AND logic circuit 130 includes 2-input NOR logic elements 131 to 132 and 3-input NOR logic elements 133 to 138. c is the same value as the switching signal MODE, and cn is a value obtained by negating the logical value of the switching signal MODE.

図20には、2線2相式AND論理回路130の動作を示すカルノー図が例示されている。2線2相式AND論理回路130は、図20のカルノー図に従って構成される。2線2相式AND論理回路130は、図示のように、休止相から稼動相に遷移するときに、切替え信号MODEに応じて、論理値が変化する第1の信号線と第2の信号線を切替える。これにより、入力データの特定の値に対応して、論理値が変化する出力コネクタの信号線が常に特定されるという事態を回避できる。例えば2線2相式AND論理回路130は、図18においてcが0ならば、2線2相式AND論理回路として動作し、cが1ならば2線2相式OR論理回路として動作する。これは、論理回路の論理関数がAND(論理積)であるとき、「&」をAND(論理積)として、論理関数を「Z=X&Y」とすると、入出力の論理値を否定した場合、「Z=X&Y」と等価な論理関数は、「−」を入出力の論理値の否定とし、「V」をOR(論理和)とすれば、「−Z=−XV−Y」となることから明らかである。言換えると、否定論理回路201で入出力の論理値を否定すると共に、2線2相式論理回路の論理関数をAND(論理積)に対してOR(論理和)に切替えることで、否定論理回路201が共に有効である場合での2線2相式AND論理回路130と等価な論理関数を得ることができる。   FIG. 20 illustrates a Carnot diagram illustrating the operation of the two-wire two-phase AND logic circuit 130. The two-wire two-phase AND logic circuit 130 is configured according to the Carnot diagram of FIG. As shown in the drawing, the two-wire two-phase AND logic circuit 130 includes a first signal line and a second signal line whose logic values change in accordance with the switching signal MODE when transitioning from the idle phase to the active phase. Is switched. As a result, it is possible to avoid a situation in which the signal line of the output connector whose logical value changes is always specified corresponding to the specific value of the input data. For example, the two-wire two-phase AND logic circuit 130 operates as a two-wire two-phase AND logic circuit in FIG. 18 if c is 0, and operates as a two-wire two-phase OR logic circuit if c is 1. This is because when the logical function of the logic circuit is AND (logical product), when “&” is AND (logical product) and the logical function is “Z = X & Y”, the logical value of input / output is negated, A logical function equivalent to “Z = X & Y” is “−Z = −XV−Y”, where “−” is the negation of the input / output logical value and “V” is OR (logical sum). It is clear from In other words, negation logic circuit 201 negates the input / output logic value and switches the logic function of the two-wire two-phase logic circuit from OR (logical product) to OR (logical sum). A logic function equivalent to the two-wire two-phase AND logic circuit 130 in the case where both circuits 201 are effective can be obtained.

また、切替え信号MODEは、2線2相式AND論理回路130での演算期間中において、第1の信号線と第2の信号線の論理値が変化する確率を略同一とするように、ランダムに切替えられる。これにより、2線2相式AND論理回路130による演算期間の一部に注目した場合に、切替え信号MODEがランダムに切替えられることで、入力値に対する消費電力パターンが形成され難い。さらに、2線2相式AND論理回路130による演算期間の全体に注目した場合であっても、第1の信号線と第2の信号線で論理値が変化する確率が略同一となるので、入力値に対する消費電力パターンが形成され難い。従って、2線2相式演算回路200によれば、演算期間中に電力解析攻撃等を受けたとしても、消費電力パターンを解析して暗号鍵を推定することが困難となる。   Further, the switching signal MODE is random so that the probability that the logical values of the first signal line and the second signal line change during the calculation period in the two-wire two-phase AND logic circuit 130 is substantially the same. It is switched to. Thereby, when paying attention to a part of the calculation period by the two-wire two-phase AND logic circuit 130, it is difficult to form a power consumption pattern for the input value by switching the switching signal MODE at random. Further, even when attention is paid to the entire calculation period by the two-wire two-phase AND logic circuit 130, the probability that the logical value changes between the first signal line and the second signal line is substantially the same. It is difficult to form a power consumption pattern for the input value. Therefore, according to the two-wire two-phase arithmetic circuit 200, it is difficult to estimate the encryption key by analyzing the power consumption pattern even if a power analysis attack or the like is received during the calculation period.

図19には、2線2相式組合せ論理回路202に含まれる2線2相式XOR論理回路の構成が例示されている。2線2相式XOR論理回路110は、2入力NOR論理素子111〜116と、2入力NAND論理素子117〜122とを備える。図21には、2線2相式XOR論理回路110の動作を示すカルノー図が例示されている。2線2相式XOR論理回路110は、図21のカルノー図に従って構成される。要するに、2線2相式XOR論理回路110は、図19においてcが0ならば、2線2相式XOR論理回路として動作し、cが1ならば2線2相式XNOR論理回路として動作する。従って、2線2相式XOR論理回路110を用いた2線2相式演算回路200によれば、上記同様に、電力解析攻撃等に対する高い安全性を確保できる。   FIG. 19 illustrates a configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit 202. Two-wire two-phase XOR logic circuit 110 includes 2-input NOR logic elements 111 to 116 and 2-input NAND logic elements 117 to 122. FIG. 21 illustrates a Carnot diagram illustrating the operation of the two-wire two-phase XOR logic circuit 110. The two-wire two-phase XOR logic circuit 110 is configured according to the Carnot diagram of FIG. In short, the 2-wire 2-phase XOR logic circuit 110 operates as a 2-wire 2-phase XOR logic circuit if c is 0 in FIG. 19, and operates as a 2-wire 2-phase XNOR logic circuit if c is 1. . Therefore, according to the two-wire two-phase arithmetic circuit 200 using the two-wire two-phase XOR logic circuit 110, high safety against a power analysis attack or the like can be ensured as described above.

配線遅延等により2線2相式論理回路の1ビット毎の入力データで論理値が変化するタイミングに差を生ずると、そのために出力データが論理変化するタイミングに無視し得ない差が生じてしまう場合がある。具体的には、複数の2線2相式論理回路は、所定の論理動作を実現するために従属接続されており、配線遅延等がある場合には図29に示すように、例えば1ビットの入力データ(a0,a1)でのa0とa1で、論理値が変化する時刻に差D1が生じる。さらに、この2線2相式論理回路では、差D1に応じて1ビットの出力データ(q0,q1)でのq0とq1で論理値が変化するタイミングに差D2が生じてしまう。この差D2が大きくなり過ぎてしまうと、入力値に対する消費電力パターンが形成される可能性がある。このため、実施形態1,2では、ICレイアウト時における2線2相式論理回路の出力コネクタの第1の信号線と第2の信号線の配線長を等しくして、負荷容量や配線抵抗等の遅延に影響する素子のばらつきを制御すればよい。しかし、これではICレイアウトにおいて配線長を等しくするための余計な工程が必要となってしまう。   If a difference occurs in the timing at which the logical value changes in the input data for each bit of the 2-wire 2-phase logic circuit due to wiring delay or the like, a difference that cannot be ignored occurs in the timing at which the output data changes in logic. There is a case. Specifically, a plurality of two-wire two-phase logic circuits are cascade-connected to realize a predetermined logic operation. When there is a wiring delay or the like, for example, as shown in FIG. A difference D1 occurs at the time when the logical value changes between a0 and a1 in the input data (a0, a1). Further, in this two-wire two-phase logic circuit, a difference D2 occurs at the timing when the logic value changes between q0 and q1 in the 1-bit output data (q0, q1) according to the difference D1. If this difference D2 becomes too large, a power consumption pattern for the input value may be formed. For this reason, in the first and second embodiments, the wiring lengths of the first signal line and the second signal line of the output connector of the two-wire two-phase logic circuit in the IC layout are made equal to each other so that the load capacitance, the wiring resistance, etc. It is sufficient to control the variation of the elements that affect the delay. However, this requires an extra step for equalizing the wiring length in the IC layout.

以下に示す各実施形態は、入力データが論理変化するタイミングが配線遅延等によって異なってしまうことを想定し、このような場合であっても、入力データの値に対する消費電力パターンを形成され難くするための構成を有する。   Each embodiment shown below assumes that the timing at which input data undergoes a logical change varies depending on wiring delays, etc., and even in such a case, it is difficult to form a power consumption pattern for the value of the input data. For having a configuration.

《実施形態3》
図30には、本発明の実施形態3に係る論理演算回路の一例である2線2相式演算回路の構成が例示されている。以下、図15で例示した2線2相式演算回路200と重複する機能等については同一符号を付し、適宜説明を省略する。2線2相式演算回路205は、例えば2つの否定論理回路201、2線2相符号化回路21、同期生成回路206、2線2相式組合せ論理回路207、2線1線変換回路23等を備えている。否定論理回路201は、入力される全ての信号線の論理値を、切替え信号MODEが1のとき否定論理して出力する。切替え信号MODEは、例えば制御回路15により生成され、図17のタイミングチャートのように与えられる。そして、2線2相式演算回路205では、実施形態2と同様に2線2相符号を切替え信号MODEの値により、MODE=0ならば(0,1)を論理値0、(1,0)を論理値1とし、MODE=1ならば(0,1)を論理値1、(1,0)を論理値0として論理演算を行う。
<< Embodiment 3 >>
FIG. 30 illustrates the configuration of a two-wire two-phase arithmetic circuit that is an example of a logical arithmetic circuit according to the third embodiment of the present invention. In the following, functions and the like that are the same as those of the two-wire two-phase arithmetic circuit 200 illustrated in FIG. The two-wire two-phase arithmetic circuit 205 includes, for example, two negative logic circuits 201, a two-wire two-phase encoding circuit 21, a synchronization generation circuit 206, a two-wire two-phase combinational logic circuit 207, a two-wire one-line conversion circuit 23, and the like. It has. The negation logic circuit 201 negates and outputs the logic values of all the input signal lines when the switching signal MODE is 1. The switching signal MODE is generated by, for example, the control circuit 15 and is given as shown in the timing chart of FIG. In the two-wire two-phase arithmetic circuit 205, as in the second embodiment, the two-wire two-phase code is converted into the logical value 0 and (1, 0) when MODE = 0 by changing the value of the switching signal MODE. ) Is a logical value 1, and if MODE = 1, a logical operation is performed with a logical value 1 (0, 1) and a logical value 0 (1,0).

図31には、同期生成回路206の構成が例示されている。同期生成回路206は、XOR論理素子210−1〜210−n等を有する。XOR論理素子210−1〜210−nには、2線2相符号化回路21の出力データ(DRI0,DRI1)が1ビット毎にそれぞれ入力され、図32に示す真理値表に従い、第1タイミング信号TSを生成する。第1タイミング信号TSは、出力データ(DRI0,DRI1)として例えばクリア(1,1)が入力された後に、論理値0(0,1)又は論理値1(1,0)が入力されることで“1”とされるので、データのビット毎に状態が遷移するタイミングに同期した信号とされる。また、同期生成回路206は、nビットの出力データ(DRI0,DRI1)をそのまま2線2相式組合せ論理回路207に出力する。   FIG. 31 illustrates the configuration of the synchronization generation circuit 206. The synchronization generation circuit 206 includes XOR logic elements 210-1 to 210-n and the like. Output data (DRI0, DRI1) of the two-wire two-phase encoding circuit 21 is input to the XOR logic elements 210-1 to 210-n for each bit, and the first timing is determined according to the truth table shown in FIG. A signal TS is generated. The first timing signal TS is input with a logical value 0 (0, 1) or a logical value 1 (1, 0) after, for example, clear (1, 1) is input as output data (DRI0, DRI1). Therefore, the signal is synchronized with the timing at which the state transitions for each bit of data. Further, the synchronization generation circuit 206 outputs the n-bit output data (DRI0, DRI1) as it is to the two-wire two-phase combinational logic circuit 207.

2線2相式組合せ論理回路207は、所望の論理動作を実現するために、従属接続された複数の2線2相式論理回路を有している。図33には、2線2相符号を用いてAND論理演算を行う2線2相式AND論理回路の構成が例示される。同期生成回路206は、nビットの出力データ(DRI0,DRI1)を2線2相式組合せ論理回路207に出力するが、ここでは代表的に2ビットの出力データ((DRI0[1],DRI1[1])、(DRI0[2],DRI1[2]))を入力データ((a0,a1)、(b0,b1))として例示する。またこれに対応して、図33には第1タイミング信号TS[1],TS[2]が代表的に例示される。2線2相式AND論理回路140は、入力データ((a0,a1)、(b0,b1))が入力される入力コネクタと、第1タイミング信号TS[1],TS[2]が入力されるタイミング入力端子等を有し、さらに上記切替え信号MODEと同じ値を示すcと、切替え信号MODEの論理値を否定した値を示すcnとが入力される。第1タイミング信号TS[1]は、図34に示すように、入力データ(a0,a1)の状態が遷移するタイミングのうち遅い方、即ちa0に同期して“1”とされる。また、第2タイミング信号TS[2]は、入力データ(b0,b1)の状態が遷移するタイミングのうち遅い方、即ちb0に同期して“1”とされる。   The two-wire two-phase combinational logic circuit 207 has a plurality of two-wire two-phase logic circuits that are cascade-connected in order to realize a desired logic operation. FIG. 33 illustrates the configuration of a two-wire two-phase AND logic circuit that performs an AND logic operation using a two-wire two-phase code. The synchronization generation circuit 206 outputs n-bit output data (DRI0, DRI1) to the 2-wire two-phase combinational logic circuit 207, but here, typically, 2-bit output data ((DRI0 [1], DRI1 [ 1]) and (DRI0 [2], DRI1 [2])) are exemplified as input data ((a0, a1), (b0, b1)). Corresponding to this, FIG. 33 representatively illustrates the first timing signals TS [1], TS [2]. The two-wire two-phase AND logic circuit 140 receives an input connector to which input data ((a0, a1), (b0, b1)) is input and first timing signals TS [1], TS [2]. In addition, c indicating the same value as the switching signal MODE and cn indicating a value obtained by negating the logical value of the switching signal MODE are input. As shown in FIG. 34, the first timing signal TS [1] is set to “1” in synchronization with the later of the timing of transition of the state of the input data (a0, a1), that is, a0. The second timing signal TS [2] is set to “1” in synchronization with the later of the timings at which the state of the input data (b0, b1) transitions, that is, b0.

2線2相式AND論理回路140は、2入力NAND論理素子145と、入力ゲート回路158と、ロジック回路159と、遅延回路157等を有する。さらに2線2相式AND論理回路140は、出力データ(q0,q1)を出力する出力コネクタと、後述する遅延信号Bを出力するタイミング出力端子等を有する。2入力NAND論理素子145には、第1タイミング信号TS[1],TS[2]が入力され、図34に示すように、入力された第1タイミング信号TS[1],TS[2]のうち最も変化の遅いタイミング、ここでは第1タイミング信号TS[1]に同期して変化し、“1”とされる第2タイミング信号Aを生成する。第2タイミング信号Aは、入力ゲート回路158に入力される。   The two-wire two-phase AND logic circuit 140 includes a two-input NAND logic element 145, an input gate circuit 158, a logic circuit 159, a delay circuit 157, and the like. Further, the two-wire two-phase AND logic circuit 140 includes an output connector that outputs output data (q0, q1), a timing output terminal that outputs a delay signal B described later, and the like. The first timing signals TS [1] and TS [2] are input to the 2-input NAND logic element 145, and as shown in FIG. 34, the input first timing signals TS [1] and TS [2] Of these, the second timing signal A that changes in synchronization with the latest timing, in this case, in synchronization with the first timing signal TS [1] and is set to “1” is generated. The second timing signal A is input to the input gate circuit 158.

入力ゲート回路158は、2入力NOR論理素子141〜144を有する。2入力NOR論理素子141〜144には、上記入力データとされるa0,a1,b0,b1がそれぞれ入力され、第2タイミング信号Aが制御信号として共通に入力される。このようにすれば、2入力NOR論理素子141〜144は、第2タイミング信号Aに同期してa0,a1,b0,b1を取込み、図34に示すように、論理変化するタイミングが揃ったデータa0´,a1´,b0´,b1´をロジック回路159に出力する。ロジック回路159は、2入力NAND論理素子146,147、3入力NAND論理素子148〜153、否定論理素子154,155等からなり、データa0´,a1´,b0´,b1´を受けて論理動作を行い、その論理動作の結果を出力コネクタから出力データ(q0,q1)として、次段の2線2相式論理回路(不図示)の入力コネクタに出力する。出力データ(q0,q1)は、入力ゲート回路158からタイミングが揃ったデータa0´,a1´,b0´,b1´を受けたロジック回路159による論理演算の結果であるから、図34に示すように論理変化するタイミングに差が生じ難い。これにより、従属接続された複数の2線2相式AND論理回路のうち、初段の2線2相式AND論理回路140では、入力データが論理変化するタイミングが異なっていても、入力データの値に対する消費電力パターンが形成され難い。   The input gate circuit 158 includes 2-input NOR logic elements 141 to 144. The input data a0, a1, b0, b1 are input to the 2-input NOR logic elements 141 to 144, respectively, and the second timing signal A is input in common as a control signal. In this way, the two-input NOR logic elements 141 to 144 take in a0, a1, b0, b1 in synchronization with the second timing signal A, and as shown in FIG. a0 ′, a1 ′, b0 ′, and b1 ′ are output to the logic circuit 159. The logic circuit 159 includes two-input NAND logic elements 146 and 147, three-input NAND logic elements 148 to 153, negative logic elements 154 and 155, and receives the data a0 ′, a1 ′, b0 ′, and b1 ′ to perform a logic operation. The result of the logic operation is output from the output connector as output data (q0, q1) to the input connector of the next-stage 2-wire 2-phase logic circuit (not shown). Since the output data (q0, q1) is the result of the logical operation by the logic circuit 159 that has received the data a0 ′, a1 ′, b0 ′, b1 ′ having the same timing from the input gate circuit 158, as shown in FIG. It is hard to make a difference in the logic change timing. Thus, among the plurality of two-wire two-phase AND logic circuits connected in cascade, in the first-stage two-wire two-phase AND logic circuit 140, the value of the input data is different even if the timing at which the input data logically changes is different. It is difficult to form a power consumption pattern.

そして、2線2相式AND論理回路140は、第1タイミング信号TS[1],TS[2]がいずれかが論理1であれば、出力q0及び出力q1は論理1とされ、第1タイミング信号TS[1],TS[2]がいずれも論理0であれば、2線2相式AND論理回路130と同様に図20に示すカルノー図に従い出力q0及び出力q1を得るように動作する。即ち、2線2相式AND論理回路140は、2線2相式AND論理回路130と同様にcが0であれば、2線2相式AND論理回路として動作し、cが1であれば2線2相式OR論理回路として動作する。   The two-wire two-phase AND logic circuit 140 sets the output q0 and the output q1 to logic 1 if either of the first timing signals TS [1], TS [2] is logic 1, and the first timing If the signals TS [1] and TS [2] are both logic 0, the operation is performed so as to obtain the output q0 and the output q1 according to the Carnot diagram shown in FIG. That is, the two-wire two-phase AND logic circuit 140 operates as a two-wire two-phase AND logic circuit if c is 0, as in the case of the two-wire two-phase AND logic circuit 130. Operates as a 2-wire 2-phase OR logic circuit.

一方、次段の2線2相式AND論理回路は、初段の2線2相式AND論理回路140と同一構成であるが、2入力NAND論理素子145で受ける信号が遅延回路157で生成された遅延信号Bとされる。遅延回路157は、第2タイミング信号Aを否定論理素子156を介して受け、ロジック回路159の論理動作が確定するタイミング、即ち論理遅延と、初段と次段の2線2相式AND論理回路間における配線遅延とからなる遅延量よりも更に所定時間遅延させることで、遅延信号Bを生成する。つまり、遅延信号Bは、図34に示すように、上記遅延量よりも長く遅延されることで差D3を経て論理変化し、“1”とされる。この遅延信号Bは、上記したように次段の2線2相式AND論理回路の2入力NAND論理素子145に、第1タイミング信号TS[1],TS[2]の代わりに入力され、上記第2タイミング信号Aを生成するために用いられる。要するに、次段の2線2相式AND論理回路においても、初段の2線2相式AND論理回路140と同様に、入力ゲート回路158によって論理変化するタイミングが揃ったデータがロジック回路159に入力されることになり、出力データ(q0,q1)が論理変化するタイミングに差が生じ難い。   On the other hand, the 2-stage 2-phase AND logic circuit of the next stage has the same configuration as the 2-stage 2-phase AND logic circuit 140 of the first stage, but the signal received by the 2-input NAND logic element 145 is generated by the delay circuit 157. Delay signal B is used. The delay circuit 157 receives the second timing signal A via the negative logic element 156, and the timing at which the logic operation of the logic circuit 159 is determined, that is, the logic delay, and between the first and next two-wire two-phase AND logic circuits. The delay signal B is generated by delaying for a predetermined time further than the delay amount consisting of the wiring delay in FIG. That is, as shown in FIG. 34, the delay signal B is logically changed through the difference D3 by being delayed longer than the delay amount, and is set to “1”. The delay signal B is input to the two-input NAND logic element 145 of the next-stage two-wire two-phase AND logic circuit as described above instead of the first timing signals TS [1] and TS [2]. Used to generate the second timing signal A. In short, also in the next-stage 2-wire 2-phase AND logic circuit, as in the first-stage 2-wire 2-phase AND logic circuit 140, data having the same timing for logical change by the input gate circuit 158 is input to the logic circuit 159. Thus, it is difficult for a difference to occur in the timing at which the output data (q0, q1) logically changes.

図35には、2線2相符号を用いてXOR論理演算を行う2線2相式XOR論理回路の構成が例示される。2線2相式XOR論理回路160は、第1タイミング信号TS[1],TS[2]を2入力NAND論理素子165で受けて第2タイミング信号A1を生成し、3入力NOR論理素子161〜164からなる入力ゲート回路158Aにより論理変化するタイミングの揃ったデータa0´,a1´,b0´,b1´をロジック回路159Aに出力する。ロジック回路159Aは、2入力NOR論理素子166,167と、2入力NAND論理素子168〜173からなり、データa0´,a1´,b0´,b1´を受けて論理動作を行い、出力データ(q0,q1)を次段の2線2相式XOR論理回路に出力する。そして、2線2相式XOR論理回路160は、第1タイミング信号TS[1],TS[2]のいずれかが論理1であれば、出力q0及び出力q1は論理1とされ、第1タイミング信号TS[1],TS[2]がいずれも論理0であれば、2線2相式XOR論理回路110と同様に図21に示すカルノー図に従い出力q0及び出力q1を得るように動作する。要するに、2線2相式XOR論理回路160は、2線2相式XOR論理回路110と同様にcが0であれば、2線2相式XOR論理回路として動作し、cが1であれば2線2相式XNOR論理回路として動作する。   FIG. 35 illustrates the configuration of a two-wire two-phase XOR logic circuit that performs an XOR logic operation using a two-wire two-phase code. The two-wire two-phase XOR logic circuit 160 receives the first timing signals TS [1], TS [2] by the two-input NAND logic element 165, generates the second timing signal A1, and generates the three-input NOR logic elements 161- The data a0 ′, a1 ′, b0 ′, b1 ′ having the same logic change timing are output to the logic circuit 159A by the input gate circuit 158A composed of 164. The logic circuit 159A includes 2-input NOR logic elements 166 and 167 and 2-input NAND logic elements 168 to 173, receives the data a0 ′, a1 ′, b0 ′, and b1 ′, performs a logic operation, and outputs data (q0 , Q1) are output to the next two-wire two-phase XOR logic circuit. The two-wire two-phase XOR logic circuit 160 sets the output q0 and the output q1 to logic 1 if any of the first timing signals TS [1], TS [2] is logic 1, and the first timing If the signals TS [1] and TS [2] are both logic 0, the operation is performed so as to obtain the output q0 and the output q1 according to the Carnot diagram shown in FIG. In short, the two-wire two-phase XOR logic circuit 160 operates as a two-wire two-phase XOR logic circuit if c is 0, similarly to the two-wire two-phase XOR logic circuit 110, and if c is 1, Operates as a 2-wire 2-phase XNOR logic circuit.

また、遅延回路175は、第2タイミング信号A1を否定論理素子174を介して受け、ロジック回路159Aによる論理遅延と、初段と次段の2線2相式XOR論理回路間における配線遅延とからなる遅延量よりも更に所定時間遅延させることで、遅延信号B1を生成する。この遅延信号B1は、次段の2線2相式XOR論理回路の2入力NAND論理素子165に入力され、第2タイミング信号A1を生成するために用いられる。これにより、従属接続された複数の2線2相式XOR論理回路では、入力データが論理変化するタイミングが異なっていても、出力データ(q0,q1)が論理変化するタイミングに差が生じ難い。   The delay circuit 175 receives the second timing signal A1 via the negative logic element 174, and includes a logic delay by the logic circuit 159A and a wiring delay between the first and next two-wire two-phase XOR logic circuits. The delay signal B1 is generated by delaying for a predetermined time further than the delay amount. The delay signal B1 is input to the 2-input NAND logic element 165 of the next-stage 2-wire 2-phase XOR logic circuit and used to generate the second timing signal A1. As a result, in a plurality of two-wire two-phase XOR logic circuits connected in cascade, even if the timing at which input data logically changes is different, the timing at which output data (q0, q1) logically changes is unlikely to vary.

従って、2線2相式AND論理回路140や2線2相式XOR論理回路160を用いた2線2相式組合せ論理回路207を含む2線2相式演算回路205によれば、複数の2線2相式論理回路で入力データが論理変化するタイミングが配線遅延や論理遅延により異なった場合であっても、入力データの値に対する消費電力パターンが形成され難いから、電力解析攻撃等に対する高い安全性を確保できる。   Therefore, according to the two-wire two-phase arithmetic circuit 205 including the two-wire two-phase combinational logic circuit 207 using the two-wire two-phase AND logic circuit 140 and the two-wire two-phase XOR logic circuit 160, a plurality of 2 Even when the timing at which the input data changes logically in a two-phase logic circuit varies depending on the wiring delay and logic delay, it is difficult to form a power consumption pattern for the input data value. Can be secured.

《実施形態4》
図36には、図15で示した2線2相式演算回路200に含まれる2線2相式組合せ論理回路202の別の構成が例示されている。以下、2線2相式演算回路200と重複する機能等については同一符号を付し、適宜説明を省略する。2線2相式組合せ論理回路230は、所望の論理動作を実現するために、従属接続された2線2相式論理回路220−1〜220−Mを有する。2線2相式論理回路220−1〜220−Mは、2線2相式組合せ論理回路230でN段に接続されており、それぞれの出力データqの遅延量が段毎に略均等に分割されるように配置されている。2線2相式組合せ論理回路230は、2線2相符号化回路21からの2線2相符号を用いた出力データ(DRI[1]〜DRI[K])と、後述する同期クロック信号NCLK等が入力され、2線2相符号を用いたデータ(q[1]〜q[K])を出力する。この同期クロック信号NCLKは、図2に例示した制御回路15により生成され、2線2相式論理回路220−1〜220−Mに共通に入力される。
<< Embodiment 4 >>
36 illustrates another configuration of the two-wire two-phase combinational logic circuit 202 included in the two-wire two-phase arithmetic circuit 200 illustrated in FIG. In the following, functions and the like that are the same as those of the two-wire two-phase arithmetic circuit 200 are denoted by the same reference numerals, and description thereof will be omitted as appropriate. The two-wire two-phase combinational logic circuit 230 includes two-wire two-phase logic circuits 220-1 to 220-M that are cascade-connected in order to realize a desired logic operation. The two-wire two-phase logic circuits 220-1 to 220-M are connected in N stages by a two-wire two-phase combinational logic circuit 230, and the delay amount of each output data q is divided approximately equally for each stage. Are arranged to be. The two-wire two-phase combinational logic circuit 230 outputs data (DRI [1] to DRI [K]) using the two-wire two-phase code from the two-wire two-phase encoding circuit 21, and a synchronous clock signal NCLK described later. Etc. are input, and data (q [1] to q [K]) using a two-wire two-phase code is output. The synchronous clock signal NCLK is generated by the control circuit 15 illustrated in FIG. 2 and is commonly input to the two-wire two-phase logic circuits 220-1 to 220-M.

図38には、代表的に2線2相式論理回路220−1の構成が例示されている。2線2相式論理回路220−1は、出力データ(DRI[1],DRI[2])に対応するデータ((a0,a1)、(b0,b1))が入力される入力コネクタと、同期クロック信号NCLKが入力されるタイミング入力端子と、出力データ(q0,q1)が出力される出力コネクタを有し、上記c,cnも入力される。また、2線2相式論理回路220−1は、ラッチ回路226と、2線2相式論理回路225とを有する。ラッチ回路226は、D型フリップフロップ回路221〜224を有し、同期クロック信号NCLKの立ち上がりでデータ((a0,a1)、(b0,b1))をそれぞれ保持して、2線2相式論理回路225に出力する。2線2相式論理回路225は、図18、図19に例示した2線2相式AND論理回路130又は2線2相式XOR論理回路110で構成されている。さらに、同期クロック信号NCLKの周期は、2線2相式論理回路220−1〜220−Mのロジック回路とされる2線2相式論理回路225の論理動作が確定するまでの論理遅延と、2線2相式組合せ論理回路230全体の配線遅延をN段で略均等に分割することで得られる配線遅延と、を含む遅延量よりも大きい。そして、同期クロック信号NCLKは、図37に示すように、休止相と稼動相が切り替わるタイミングを制御する制御信号CTRLに比べて、N段の2線2相式論理回路220−1〜220−Mを動作させるために休止相、稼動相それそれの期間でN周期を有する。このようにすれば、2線2相式組合せ論理回路230は、同期クロックNCLKに同期して、初段の2線2相式論理回路220−1からN段目の2線2相式論理回路220−Mまで順次入力データが保持されてから出力データが確定するように動作できる。そして、2線2相式論理回路220−1〜220−Mでは、入力データの論理変化するタイミングが論理遅延や配線遅延によって異なっても、2線2相式論理回路225に与えられるデータの論理変化するタイミングがラッチ回路226によって揃えられており、出力データの論理変化するタイミングに差が生じ難い。   FIG. 38 typically illustrates the configuration of a two-wire two-phase logic circuit 220-1. The two-wire two-phase logic circuit 220-1 includes an input connector to which data ((a0, a1), (b0, b1)) corresponding to the output data (DRI [1], DRI [2]) is input; It has a timing input terminal to which the synchronous clock signal NCLK is input and an output connector to which output data (q0, q1) is output. The above-mentioned c and cn are also input. The 2-wire 2-phase logic circuit 220-1 includes a latch circuit 226 and a 2-wire 2-phase logic circuit 225. The latch circuit 226 has D-type flip-flop circuits 221 to 224, holds data ((a0, a1), (b0, b1)) at the rising edge of the synchronous clock signal NCLK, respectively, and is a two-wire two-phase logic. Output to the circuit 225. The two-wire two-phase logic circuit 225 includes the two-wire two-phase AND logic circuit 130 or the two-wire two-phase XOR logic circuit 110 illustrated in FIGS. Further, the period of the synchronous clock signal NCLK is a logic delay until the logic operation of the two-wire two-phase logic circuit 225, which is a logic circuit of the two-wire two-phase logic circuits 220-1 to 220-M, is determined. It is larger than the delay amount including the wiring delay obtained by dividing the wiring delay of the entire two-wire two-phase combinational logic circuit 230 substantially equally in N stages. As shown in FIG. 37, the synchronous clock signal NCLK has N stages of two-wire two-phase logic circuits 220-1 to 220-M as compared with the control signal CTRL that controls the timing at which the idle phase and the active phase are switched. In order to operate, there are N periods in the idle phase and the active phase. In this way, the two-wire two-phase combinational logic circuit 230 is synchronized with the synchronous clock NCLK and the first-stage two-wire two-phase logic circuit 220-1 to the N-stage two-wire two-phase logic circuit 220. The operation can be performed so that the output data is determined after the input data is sequentially held until -M. In the two-wire two-phase logic circuits 220-1 to 220-M, the logic of the data supplied to the two-wire two-phase logic circuit 225 is different even if the timing at which the input data logic changes varies depending on the logic delay or wiring delay. The changing timings are made uniform by the latch circuit 226, and it is difficult for a difference to occur in the timing at which the logic of the output data changes.

従って、2線2相式組合せ論理回路230を用いた2線2相式演算回路200によれば、2線2相式論理回路220−1〜220−Mで入力データが論理変化するタイミングが配線遅延や論理遅延により異なった場合であっても、入力データの値に対する消費電力パターンが形成され難く、電力解析攻撃等に対する高い安全性を確保できる。   Therefore, according to the two-wire two-phase arithmetic circuit 200 using the two-wire two-phase combinational logic circuit 230, the timing at which the input data logically changes in the two-wire two-phase logic circuits 220-1 to 220-M is wired. Even if it differs depending on the delay or logic delay, it is difficult to form a power consumption pattern for the input data value, and high security against power analysis attacks can be ensured.

《実施形態5》
図39には、図15で示した2線2相式演算回路200に含まれる2線2相式組合せ論理回路202の更に別の構成が例示されている。以下、図36で例示した2線2相式組合せ論理回路230と重複する機能等については説明を適宜省略する。2線2相式組合せ論理回路240は、所望の論理動作を実現するために、従属された2線2相式論理回路250−1〜250−Mを有する。2線2相式論理回路250−1〜250−Mは、2線2相式組合せ論理回路240でN段に接続されており、それぞれの出力データqの遅延量が同一段で略同一となるように配置されている。2線2相式組合せ論理回路240は、2線2相符号化回路21からの2線2相符号を用いた出力データ(DRI[1]〜DRI[K])と、後述する同期クロック信号(PCLK[1]〜PCLK[N])等が入力され、2線2相符号を用いたデータ(q[1]〜q[K])を出力する。この同期クロック信号PCLK[1]〜PCLK[N]は、図2に例示した制御回路15により生成され、2線2相式論理回路250−1〜250−Mの同一段毎にそれぞれ共通に入力されている。ここで、同一段とは、2線2相式組合せ論理回路240において、初段の2線2相式論理回路250−1,250−2を起点とした論理遅延が略同一とされるように2線2相式論理回路が配置されている状態をいう。
<< Embodiment 5 >>
FIG. 39 illustrates still another configuration of the two-wire two-phase combinational logic circuit 202 included in the two-wire two-phase arithmetic circuit 200 shown in FIG. In the following, description of functions and the like overlapping with the two-wire two-phase combinational logic circuit 230 illustrated in FIG. 36 will be omitted as appropriate. The two-wire two-phase combinational logic circuit 240 includes subordinate two-wire two-phase logic circuits 250-1 to 250-M in order to realize a desired logic operation. The two-wire two-phase logic circuits 250-1 to 250-M are connected in N stages by a two-wire two-phase combinational logic circuit 240, and the delay amount of each output data q is substantially the same in the same stage. Are arranged as follows. The two-wire two-phase combinational logic circuit 240 outputs data (DRI [1] to DRI [K]) using the two-wire two-phase code from the two-wire two-phase encoding circuit 21 and a synchronous clock signal (described later). PCLK [1] to PCLK [N]) and the like are input and data (q [1] to q [K]) using a two-wire two-phase code is output. The synchronous clock signals PCLK [1] to PCLK [N] are generated by the control circuit 15 illustrated in FIG. 2 and input in common to the same stages of the two-wire two-phase logic circuits 250-1 to 250-M. Has been. Here, the same stage is a 2-line 2-phase combinational logic circuit 240 in which the logic delays starting from the 2-stage 2-phase logic circuits 250-1 and 250-2 in the first stage are substantially the same. A state in which a two-phase logic circuit is arranged.

図41には、代表的に2線2相式論理回路250−1の構成が例示されている。2線2相式論理回路250−1は、出力データ(DRI[1],DRI[2])に対応するデータ((a0,a1)、(b0,b1))が入力される入力コネクタと、同期クロック信号PCLK[1]が入力されるタイミング入力端子と、出力データ(q0,q1)が出力される出力コネクタを有し、上記c,cnも入力される。この2線2相式論理回路250−1は、2線2相式AND論理回路であって、図33に示した2線2相式AND論理回路140と比べて、入力ゲート回路とされる2入力NOR論理素子141〜144の1入力が同期クロック信号PCLK[1]とされていること、遅延回路157がないこと等が異なる。2線2相式論理回路250−1では、遅延回路157がないために、次段(例えば2段目)のタイミング入力端子に入力される遅延信号が生成されないことになる。しかし、次段のタイミング入力端子には、遅延信号の代わりに同期クロック信号PCLK[2]が入力されることになる。   FIG. 41 typically illustrates the configuration of a two-wire two-phase logic circuit 250-1. The two-wire two-phase logic circuit 250-1 includes an input connector to which data ((a0, a1), (b0, b1)) corresponding to the output data (DRI [1], DRI [2]) is input; It has a timing input terminal to which the synchronous clock signal PCLK [1] is input and an output connector to which output data (q0, q1) is output. The above-mentioned c and cn are also input. The two-wire two-phase logic circuit 250-1 is a two-wire two-phase AND logic circuit and is an input gate circuit as compared with the two-wire two-phase AND logic circuit 140 shown in FIG. The difference is that one input of the input NOR logic elements 141 to 144 is a synchronous clock signal PCLK [1], the absence of the delay circuit 157, and the like. In the 2-wire 2-phase logic circuit 250-1, since there is no delay circuit 157, a delay signal input to the timing input terminal of the next stage (for example, the second stage) is not generated. However, the synchronous clock signal PCLK [2] is input to the timing input terminal at the next stage instead of the delay signal.

同期クロック信号PCLK[1]の周期は、2線2相式論理回路250−1の2入力NAND論理素子146,147、3入力NAND論理素子148〜153、否定論理素子154,155等からなるロジック回路の論理動作が確定するまでの論理遅延と、例えば2線2相式論理回路250−1,250−3間の配線遅延とを含む遅延量よりも大きい。そして、同期クロック信号PCLK[1]〜PCLK[N]は、図40に示すように、2線2相式論理回路250−1〜250−Mのうち同一段に配置された2線2相式論理回路に対応した上記周期を有し、それぞれ位相が異なっている。このようにすれば、2線2相式組合せ論理回路240では、N個の異なる位相で変化する同期クロックPCLK[1]〜PCLK[N]がそれぞれ対応するN段の2線2相式論理回路250−1〜250−Mに入力される。そして、2線2相式組合せ論理回路240は、同期クロックPCLK[1]が入力される初段の2線2相式論理回路250−1から、同期クロックPCLK[N]が入力されるN段目の2線2相式論理回路250−Mまで順次入力が保持されてから出力が確定するように動作する。   The period of the synchronous clock signal PCLK [1] is a logic composed of 2-input NAND logic elements 146 and 147, 3-input NAND logic elements 148 to 153, negation logic elements 154 and 155, etc. of the 2-wire 2-phase logic circuit 250-1. The delay amount is larger than the delay amount including the logic delay until the logic operation of the circuit is determined and the wiring delay between the two-wire two-phase logic circuits 250-1 and 250-3, for example. As shown in FIG. 40, the synchronous clock signals PCLK [1] to PCLK [N] are two-wire two-phase systems arranged in the same stage in the two-wire two-phase logic circuits 250-1 to 250-M. Each of the periods corresponding to the logic circuit has a different phase. In this way, in the two-wire two-phase combinational logic circuit 240, N stages of two-wire two-phase logic circuits to which the synchronous clocks PCLK [1] to PCLK [N] changing at N different phases correspond respectively. 250-1 to 250-M. The two-wire two-phase combinational logic circuit 240 is the N-th stage to which the synchronous clock PCLK [N] is input from the initial two-wire two-phase logic circuit 250-1 to which the synchronous clock PCLK [1] is input. The two-wire two-phase logic circuit 250-M operates in such a manner that the output is determined after the input is sequentially held.

また、2線2相式論理回路250−1〜250−Mは、同期クロック信号PCLK[1]〜PCLK[N]が1であれば、出力データ(q0,q1)は1となり、同期クロック信号PCLK[1]〜PCLK[N]が0であれば、入力データ((a0,a1)、(b0,b1))に応じて図20に例示するカルノー図に従って出力データ(q0,q1)を得るように動作する。要するに、2線2相式論理回路250−1〜250−Mでは、入力データの論理変化するタイミングが論理遅延や配線遅延によって異なっても、同期クロック信号PCLK[1]〜PCLK[N]に同期して動作する入力ゲート回路によって、論理変化するタイミングが揃ったデータa0´,a1´,b0´,b1´が上記ロジック回路に与えられることになる。従って、2線2相式論理回路250−1〜250−Mでは、出力データの論理変化するタイミングに差が生じ難い。   Further, when the synchronous clock signals PCLK [1] to PCLK [N] are 1, the 2-wire 2-phase logic circuits 250-1 to 250-M have the output data (q0, q1) of 1, and the synchronous clock signal If PCLK [1] to PCLK [N] are 0, output data (q0, q1) is obtained according to the Carnot diagram illustrated in FIG. 20 according to the input data ((a0, a1), (b0, b1)). To work. In short, in the two-wire two-phase logic circuits 250-1 to 250-M, even if the timing at which the logical change of the input data varies depending on the logic delay or wiring delay, it is synchronized with the synchronous clock signals PCLK [1] to PCLK [N]. Thus, the data a0 ′, a1 ′, b0 ′, b1 ′ having the same logic change timing are given to the logic circuit by the input gate circuit operating as described above. Therefore, in the two-wire two-phase logic circuits 250-1 to 250-M, it is difficult for a difference to occur in the timing at which the logic of the output data changes.

図42には、2線2相式論理回路250−1と別の構成が例示される。2線2相式論理回路250−1Aは、2線2相式XOR論理回路であって、図41に示した2線2相式AND論理回路と比べて、2入力NAND論理素子168〜173からなるロジック回路が異なり、その他の機能等は略同一とされる。即ち、2線2相式論理回路250−1Aは、入力データの論理変化するタイミングが異なっても、同期クロック信号PCLK[1]に同期して動作する入力ゲート回路によって、論理変化するタイミングが揃ったデータa0´,a1´,b0´,b1´が上記ロジック回路に与えられ、出力データの論理変化するタイミングに差が生じ難い。また、2線2相式論理回路250−1Aは、同期クロック信号PCLK[1]〜PCLK[N]が1であれば、出力データ(q0,q1)は1となり、同期クロック信号PCLK[1]〜PCLK[N]が0であれば、入力データ((a0,a1)、(b0,b1))に応じて図21に例示するカルノー図に従って出力データ(q0,q1)を得るように動作する。   FIG. 42 illustrates another configuration different from the two-wire two-phase logic circuit 250-1. The two-wire two-phase logic circuit 250-1A is a two-wire two-phase XOR logic circuit, and includes two-input NAND logic elements 168 to 173 as compared with the two-wire two-phase AND logic circuit shown in FIG. The other logic circuits are substantially the same. In other words, the two-wire two-phase logic circuit 250-1A has the same timing for changing the logic by the input gate circuit that operates in synchronization with the synchronous clock signal PCLK [1] even if the timing of the logic change of the input data is different. The data a0 ', a1', b0 ', b1' are given to the logic circuit, and it is difficult for a difference to occur in the timing at which the logic of the output data changes. Further, when the synchronous clock signals PCLK [1] to PCLK [N] are 1, the 2-wire 2-phase logic circuit 250-1A has the output data (q0, q1) of 1, and the synchronous clock signal PCLK [1]. When PCLK [N] is 0, the operation is performed so as to obtain the output data (q0, q1) according to the Carnot diagram illustrated in FIG. 21 according to the input data ((a0, a1), (b0, b1)). .

従って、2線2相式組合せ論理回路240を用いた2線2相式演算回路200によれば、2線2相式論理回路250−1〜250−Mで入力データが論理変化するタイミングが配線遅延や論理遅延により異なった場合であっても、入力データの値に対する消費電力パターンが形成され難く、電力解析攻撃等に対する高い安全性を確保できる。   Therefore, according to the two-wire two-phase arithmetic circuit 200 using the two-wire two-phase combinational logic circuit 240, the timing at which the input data logically changes in the two-wire two-phase logic circuits 250-1 to 250-M is wired. Even if it differs depending on the delay or logic delay, it is difficult to form a power consumption pattern for the input data value, and high security against power analysis attacks can be ensured.

以上、本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   As mentioned above, although the invention made by this inventor was concretely demonstrated based on embodiment, it cannot be overemphasized that this invention is not limited to it and can be variously changed in the range which does not deviate from the summary.

例えば図4に例示された2線2相符号化回路20では、2線2相式符号のクリアを(1,1)としたが、これに限定されない。例えば2線2相式符号のクリアを(0,0)とする場合には、2線2相符号化回路20に対して、2入力OR論理素子52−1〜52−n、53−1〜53−nを2入力AND論理素子に変更し、さらに制御信号CTRLの論理値を否定論理とすればよい。   For example, in the two-wire two-phase encoding circuit 20 illustrated in FIG. 4, the clear of the two-wire two-phase code is (1, 1), but the present invention is not limited to this. For example, when the clearing of the two-wire two-phase code is (0, 0), the two-input OR logic elements 52-1 to 52-n and 53-1 to the two-wire two-phase coding circuit 20 are used. 53-n may be changed to a 2-input AND logic element, and the logic value of the control signal CTRL may be negated.

また、2線2相式組合せ論理回路22に含まれる2線2相式論理回路として、図7,9に2線2相式AND論理回路70,80を例示し、図8,10に2線2相式XOR論理回路90,100を例示したが、これに限定されない。即ち、2線2相式OR論理回路は、2線2相式AND論理回路70に対して、入力データ(a0,a1)、入力データ(b0,b1)、出力データ(q0,q1)にそれぞれ対応する2つの配線を逆にする、例えばa0をa1、a1をa0のように置き換えることで構成できる。同様に、2線2相式NOR論理回路は、2線2相式OR論理回路に対して、出力データ(q0,q1)にそれぞれ対応する2つの配線を逆にすることで構成できる。また、2線2相式NAND論理回路は、2線2相式AND論理回路70に対して、出力データ(q0,q1)にそれぞれ対応する2つの配線を逆にすることで構成できる。同様に、2線2相式XNOR論理回路は、2線2相式XOR論理回路90に対して、入力データ(a0,a1)、入力データ(b0,b1)、出力データ(q0,q1)にそれぞれ対応する2つの配線を逆にすることで構成できる。   Further, as the two-wire two-phase logic circuit included in the two-wire two-phase combinational logic circuit 22, two-wire two-phase AND logic circuits 70 and 80 are illustrated in FIGS. Although the two-phase XOR logic circuits 90 and 100 are illustrated, the present invention is not limited to this. That is, the two-wire two-phase OR logic circuit is compared with the two-wire two-phase AND logic circuit 70 for input data (a0, a1), input data (b0, b1), and output data (q0, q1). Two corresponding wirings can be reversed, for example, by replacing a0 with a1 and a1 with a0. Similarly, the two-wire two-phase NOR logic circuit can be configured by reversing two wirings respectively corresponding to the output data (q0, q1) with respect to the two-wire two-phase OR logic circuit. The 2-wire 2-phase NAND logic circuit can be configured by reversing two wires corresponding to the output data (q0, q1) with respect to the 2-wire 2-phase AND logic circuit 70, respectively. Similarly, the 2-wire 2-phase XNOR logic circuit converts the input data (a0, a1), input data (b0, b1), and output data (q0, q1) to the 2-wire 2-phase XOR logic circuit 90. It can be configured by reversing two corresponding wires.

さらに、2線2相式論理回路としては、プリミティブゲートを利用した構成を例示した。これによれば、既存のセルライブラリを利用してレイアウト設計でき、LSI設計期間の短縮、さらに、回路規模を小さくすることも可能である。しかしながら、これに限定されず、2線2相式論理回路を複合ゲートとして構成することも可能である。例えば実施形態1で例示した2線2相式AND論理回路70、2線2相式XOR論理回路90は、図22及び図23のように複合ゲートで構成することができる。また、実施形態2で例示した2線2相式AND論理回路130は、図24又は図43に例示するように複合ゲートで構成することも可能である。さらに実施形態2で例示した2線2相式XOR論理回路110は、図25又は図44に例示するように複合ゲートで構成することも可能である。このようにすれば、2線2相方式論理回路を構成するトランジスタ数の低減できるから、回路規模を小さくできると共に、低消費電力化を図ることができる。   Further, as the 2-wire 2-phase logic circuit, a configuration using a primitive gate is illustrated. According to this, a layout design can be performed using an existing cell library, the LSI design period can be shortened, and the circuit scale can be reduced. However, the present invention is not limited to this, and a two-wire two-phase logic circuit can be configured as a composite gate. For example, the two-wire two-phase AND logic circuit 70 and the two-wire two-phase XOR logic circuit 90 exemplified in the first embodiment can be composed of composite gates as shown in FIGS. Further, the two-wire two-phase AND logic circuit 130 illustrated in the second embodiment can be configured by a composite gate as illustrated in FIG. 24 or FIG. Furthermore, the two-wire two-phase XOR logic circuit 110 illustrated in the second embodiment can be configured by a composite gate as illustrated in FIG. 25 or FIG. In this way, since the number of transistors constituting the two-wire two-phase logic circuit can be reduced, the circuit scale can be reduced and the power consumption can be reduced.

さらに、実施形態3で例示した2線2相式AND論理回路140を複合ゲートで構成することも可能である。図45には、複合ゲートで構成された2線2相式AND論理回路140が例示される。以下、図33で例示した2線2相式AND論理回路140と重複する機能等については同一符号を付し、適宜説明を省略する。2線2相式AND論理回路140は、図33においてNAND論理素子、NOR論理素子等のプリミティブゲートを使用した構成を例示したが、ここではCMOSで構成した複合ゲートが例示される。ここで2線2相式AND論理回路140での2線2相符号のクリアの値は(0,0)とされる。2線2相式AND論理回路140は、pMOSトランジスタ(p1〜p4)、nMOSトランジスタ(n1〜n17)、否定論理素子301、302等を備える。   Furthermore, the two-wire two-phase AND logic circuit 140 illustrated in the third embodiment can be configured with a composite gate. FIG. 45 illustrates a two-wire two-phase AND logic circuit 140 composed of composite gates. In the following, functions and the like that are the same as those of the 2-wire 2-phase AND logic circuit 140 illustrated in FIG. The two-wire two-phase AND logic circuit 140 has a configuration using primitive gates such as NAND logic elements and NOR logic elements in FIG. 33, but here, a composite gate composed of CMOS is exemplified. Here, the clear value of the two-wire two-phase code in the two-wire two-phase AND logic circuit 140 is (0, 0). The two-wire two-phase AND logic circuit 140 includes pMOS transistors (p1 to p4), nMOS transistors (n1 to n17), negative logic elements 301 and 302, and the like.

図46には、nMOSトランジスタ(n1〜n3)以外のnMOSトランジスタ(n4〜n17)での入力値とオンするnMOSトランジスタの関係が例示されている。また、入力aは入力データ(a0,a1)、入力bは入力データ(b0,b1)にそれぞれ対応しており、さらにqは出力データ(q0,q1)に対応している。2線2相式AND論理回路140では、入力値によらずオンするnMOSトランジスタの個数が3個であるから、nMOSトランジスタのオン抵抗が一定となる。これは、出力が論理1又は論理0であっても、各々の出力の負荷容量からの放電電流パターンが同一となることを意味している。従って、2線2相式AND論理回路140をこのような複合ゲートで構成した場合であっても、入力値に対する消費電力パターンが形成され難く、電力解析攻撃に対する高い安全性を確保できる。さらに、2線2相式AND論理回路140をこのような複合ゲートで構成すれば、トランジスタ数が低減できるから、回路規模を小さくできると共に、低消費電力化を図ることができる。   FIG. 46 illustrates the relationship between the input values of nMOS transistors (n4 to n17) other than the nMOS transistors (n1 to n3) and the nMOS transistors that are turned on. Input a corresponds to input data (a0, a1), input b corresponds to input data (b0, b1), and q corresponds to output data (q0, q1). In the two-wire two-phase AND logic circuit 140, the number of nMOS transistors that are turned on is three regardless of the input value, so the on-resistance of the nMOS transistor is constant. This means that even if the output is logic 1 or logic 0, the discharge current pattern from the load capacity of each output is the same. Therefore, even when the two-wire two-phase AND logic circuit 140 is configured with such a composite gate, it is difficult to form a power consumption pattern for an input value, and high safety against a power analysis attack can be ensured. Further, if the two-wire two-phase AND logic circuit 140 is formed of such a composite gate, the number of transistors can be reduced, so that the circuit scale can be reduced and the power consumption can be reduced.

また、実施形態1による切替え信号MODEを伴わない2線2相式AND論理回路70,80及び2線2相式XOR論理回路90,100では、出力が論理1又は論理0のときいずれでも、出力の負荷容量からの放電電流パターンを略同一とするために、nMOSトランジスタのオン抵抗が同一になるように配置するようにしてもよい。また、実施形態3での2線2相式AND論理回路140及び2線2相式XOR論理回路160では、切替え信号MODEを用いた構成を例示したが、これに限定されず、切替え信号MODEを用いない構成としてもよい。   Further, in the two-wire two-phase AND logic circuits 70 and 80 and the two-wire two-phase XOR logic circuits 90 and 100 without the switching signal MODE according to the first embodiment, the output is performed regardless of whether the output is logic 1 or logic 0. In order to make the discharge current patterns from the load capacitors substantially the same, the on-resistances of the nMOS transistors may be arranged to be the same. Further, in the two-wire two-phase AND logic circuit 140 and the two-wire two-phase XOR logic circuit 160 in the third embodiment, the configuration using the switching signal MODE is illustrated, but the configuration is not limited thereto, and the switching signal MODE is not limited to this. It is good also as a structure which is not used.

さらに、上記2線2相式AND論理回路140及び2線2相式XOR論理回路160では、2ビットのデータが入力され、1ビットのデータが出力される例を示したが、これに限られず、適宜のビットに対応させてもよい。一例として、32ビットのデータが入力され、16ビットのデータ出力されるような2線2相式AND論理回路や2線2相式XOR論理回路を形成してもよい。この場合には、2入力NAND論理素子145、2入力NOR論理素子165の代わりに、32入力NAND論理素子、32入力NOR論理素子を用いればよく、さらに遅延信号B,B1を1ビット毎、即ち16出力するようにすればよい。さらに、本発明は、入力データの値に係らず、演算処理中に発生する消費電力を一定とすることができ、さらに演算時刻においても、消費電力を一定にできるので、入力データの値と消費電力の相関を用いた電力解析攻撃に対して高い安全性を得ることが不可欠な適宜の演算装置に適用できる。   Furthermore, in the above-described 2-wire 2-phase AND logic circuit 140 and 2-wire 2-phase XOR logic circuit 160, an example in which 2-bit data is input and 1-bit data is output is shown, but the present invention is not limited thereto. The bit may correspond to an appropriate bit. As an example, a two-wire two-phase AND logic circuit or a two-wire two-phase XOR logic circuit in which 32-bit data is input and 16-bit data is output may be formed. In this case, instead of the 2-input NAND logic element 145 and the 2-input NOR logic element 165, a 32-input NAND logic element and a 32-input NOR logic element may be used, and the delay signals B and B1 may be used for each bit, that is, It is sufficient to output 16 outputs. Further, according to the present invention, the power consumption generated during the arithmetic processing can be made constant regardless of the value of the input data, and further, the power consumption can be made constant even at the time of computation. The present invention can be applied to an appropriate arithmetic device that is indispensable to obtain high security against power analysis attacks using the correlation of power.

本発明の実施形態1に係る半導体集積回路の一例であるICカードチップの構成を例示する図である。It is a figure which illustrates the structure of the IC card chip which is an example of the semiconductor integrated circuit which concerns on Embodiment 1 of this invention. 図1に示す暗号コプロセッサの構成を例示する説明図である。It is explanatory drawing which illustrates the structure of the encryption coprocessor shown in FIG. 本発明の実施形態1に係る論理演算回路の一例である2線2相式演算回路の構成を例示する説明図である。FIG. 3 is an explanatory diagram illustrating the configuration of a two-wire two-phase arithmetic circuit that is an example of the logical arithmetic circuit according to the first embodiment of the invention. 図3に示す2線2相符号化回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating a configuration of a two-wire two-phase encoding circuit illustrated in FIG. 3. 図3に示す2線1線変換回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating the configuration of the two-wire / one-wire conversion circuit shown in FIG. 3. 図3に示す2線2相式演算回路の動作を示すタイミングチャートである。FIG. 4 is a timing chart showing an operation of the two-wire two-phase arithmetic circuit shown in FIG. 3. 図3に示す2線2相式組合せ論理回路に含まれる2線2相式AND論理回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating a configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 3. 図3に示す2線2相式組合せ論理回路に含まれる2線2相式XOR論理回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating a configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 3. 図3に示す2線2相式組合せ論理回路に含まれる別の2線2相式AND論理回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating the configuration of another 2-wire 2-phase AND logic circuit included in the 2-wire 2-phase combinational logic circuit shown in FIG. 3. 図3に示す2線2相式組合せ論理回路に含まれる更に別の2線2相式XOR論理回路の構成を例示する説明図である。FIG. 4 is an explanatory diagram illustrating the configuration of still another two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit shown in FIG. 3. 図7に示す2線2相式AND論理回路の動作を示すカルノー図である。FIG. 8 is a Carnot diagram illustrating the operation of the two-wire two-phase AND logic circuit shown in FIG. 7. 図8に示す2線2相式XOR論理回路の動作を示すカルノー図である。FIG. 9 is a Carnot diagram illustrating the operation of the two-wire two-phase XOR logic circuit illustrated in FIG. 8. 図9に示す別の2線2相式AND論理回路の動作を示すカルノー図である。FIG. 10 is a Carnot diagram illustrating the operation of another two-wire two-phase AND logic circuit shown in FIG. 9. 図10に示す更に別の2線2相式XOR論理回路の動作を示すカルノー図である。FIG. 11 is a Carnot diagram illustrating the operation of still another two-wire two-phase XOR logic circuit illustrated in FIG. 10. 本発明の実施形態2に係る論理演算回路の一例である2線2相式演算回路の構成を例示する説明図である。It is explanatory drawing which illustrates the structure of the 2 line | wire 2 phase type arithmetic circuit which is an example of the logic arithmetic circuit which concerns on Embodiment 2 of this invention. 図15に示す否定論理回路の構成を例示する説明図である。FIG. 16 is an explanatory diagram illustrating the configuration of a negative logic circuit illustrated in FIG. 15. 図15に示す2線2相式演算回路の動作を示すタイミングチャートである。16 is a timing chart showing the operation of the two-wire two-phase arithmetic circuit shown in FIG. 図15に示す2線2相式組合せ論理回路に含まれる2線2相式AND論理回路の構成を例示する説明図である。FIG. 16 is an explanatory diagram illustrating a configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 15. 図15に示す2線2相式組合せ論理回路に含まれる2線2相式XOR論理回路の構成を例示する説明図である。FIG. 16 is an explanatory diagram illustrating a configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 15. 図18に示す2線2相式AND論理回路の動作を示すカルノー図である。FIG. 19 is a Carnot diagram illustrating the operation of the two-wire two-phase AND logic circuit shown in FIG. 18. 図19に示す2線2相式XOR論理回路の動作を示すカルノー図である。FIG. 20 is a Carnot diagram illustrating the operation of the two-wire two-phase XOR logic circuit illustrated in FIG. 19. 図7に示す2線2相式AND論理回路を複合ゲートで構成した場合の構成を例示する説明図である。FIG. 8 is an explanatory diagram illustrating a configuration when the two-wire two-phase AND logic circuit illustrated in FIG. 7 is configured with a composite gate. 図8に示す2線2相式XOR論理回路を複合ゲートで構成した場合の構成を例示する説明図である。FIG. 9 is an explanatory diagram illustrating a configuration when the two-wire two-phase XOR logic circuit illustrated in FIG. 8 is configured with a composite gate. 図18に示す2線2相式AND論理回路を複合ゲートで構成した場合の構成を例示する説明図である。It is explanatory drawing which illustrates the structure at the time of comprising the 2 line | wire 2 phase type AND logic circuit shown in FIG. 18 with a composite gate. 図19に示す2線2相式XOR論理回路を複合ゲートで構成した場合の構成を例示する説明図である。FIG. 20 is an explanatory diagram illustrating a configuration when the two-wire two-phase XOR logic circuit illustrated in FIG. 19 is configured with a composite gate. 図3に示す2線2相式演算回路についての論理値と2線2相符号の対応関係を例示する説明図である。FIG. 4 is an explanatory diagram illustrating a correspondence relationship between a logical value and a two-wire two-phase code for the two-wire two-phase arithmetic circuit illustrated in FIG. 3. 図7に示す2線2相式AND論理回路についての入力と出力の関係を2線2相符号で例示する説明図である。It is explanatory drawing which illustrates the relationship of the input and output about a 2 wire 2 phase type | mold AND logic circuit shown in FIG. 7 with a 2 wire 2 phase code | symbol. 図15に示す2線2相式演算回路についての論理値と2線2相符号の対応関係を例示する説明図である。FIG. 16 is an explanatory diagram illustrating a correspondence relationship between a logical value and a two-wire two-phase code for the two-wire two-phase arithmetic circuit illustrated in FIG. 15. 配線遅延差により出力データの論理変化するタイミングに差が生じる例を示す説明図である。It is explanatory drawing which shows the example which a difference produces in the timing to which the logic of output data changes by wiring delay difference. 本発明の実施形態3に係る論理演算回路の一例である2線2相式演算回路の構成を例示する説明図である。It is explanatory drawing which illustrates the structure of the 2 line | wire 2 phase type arithmetic circuit which is an example of the logic arithmetic circuit which concerns on Embodiment 3 of this invention. 図30に示す同期生成回路の構成を例示する説明図である。FIG. 31 is an explanatory diagram illustrating the configuration of a synchronization generation circuit shown in FIG. 30. 同期生成回路についての入出力の対応関係を例示する説明図である。It is explanatory drawing which illustrates the input-output correspondence regarding a synchronous production | generation circuit. 図30に示す2線2相式組合せ論理回路に含まれる2線2相式AND論理回路の構成を例示する説明図である。FIG. 31 is an explanatory diagram illustrating the configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit shown in FIG. 30; 図33に示す2線2相式AND論理回路の動作を示すタイミングチャートである。FIG. 34 is a timing chart showing an operation of the two-wire two-phase AND logic circuit shown in FIG. 33. 図30に示す2線2相式組合せ論理回路に含まれる2線2相式XOR論理回路の構成を例示する説明図である。FIG. 31 is an explanatory diagram illustrating the configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit shown in FIG. 30; 図15に示す2線2相式組合せ論理回路の別の構成を例示する説明図である。FIG. 16 is an explanatory diagram illustrating another configuration of the two-wire two-phase combinational logic circuit illustrated in FIG. 15. 図36に示す2線2相式組合せ論理回路の動作を示すタイミングチャートである。37 is a timing chart showing an operation of the two-wire two-phase combinational logic circuit shown in FIG. 36. 図36に示す2線2相式組合せ論理回路に含まれる2線2相式論理回路の構成を例示する説明図である。FIG. 37 is an explanatory diagram illustrating the configuration of a two-wire two-phase logic circuit included in the two-wire two-phase combinational logic circuit shown in FIG. 36. 図15に示す2線2相式組合せ論理回路の更に別の構成を例示する説明図である。FIG. 16 is an explanatory diagram illustrating still another configuration of the two-wire two-phase combinational logic circuit illustrated in FIG. 15. 図39に示す2線2相式組合せ論理回路の動作を示すタイミングチャートである。40 is a timing chart showing an operation of the two-wire two-phase combinational logic circuit shown in FIG. 39. 図39に示す2線2相式組合せ論理回路に含まれる2線2相式AND論理回路の構成を例示する説明図である。FIG. 40 is an explanatory diagram illustrating the configuration of a two-wire two-phase AND logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 39. 図39に示す2線2相式組合せ論理回路に含まれる2線2相式XOR論理回路の構成を例示する説明図である。FIG. 40 is an explanatory diagram illustrating a configuration of a two-wire two-phase XOR logic circuit included in the two-wire two-phase combinational logic circuit illustrated in FIG. 39. 図18に示す2線2相式AND論理回路を複合ゲートで構成した場合の別の構成を例示する説明図である。FIG. 19 is an explanatory diagram illustrating another configuration when the two-wire two-phase AND logic circuit illustrated in FIG. 18 is configured with a composite gate. 図19に示す2線2相式XOR論理回路を複合ゲートで構成した場合の別の構成を例示する説明図である。FIG. 20 is an explanatory diagram illustrating another configuration when the two-wire two-phase XOR logic circuit illustrated in FIG. 19 is configured with a composite gate. 図33に示す2線2相式AND論理回路を複合ゲートで構成した場合の構成を例示する説明図である。FIG. 34 is an explanatory diagram exemplifying a configuration when the two-wire two-phase AND logic circuit shown in FIG. 33 is configured by a composite gate. 図45に示す2線2相式AND論理回路の入力値とオンするnMOSトランジスタの関係を例示する説明図である。FIG. 46 is an explanatory diagram illustrating the relationship between the input value of the 2-wire 2-phase AND logic circuit shown in FIG. 45 and the nMOS transistor that is turned on;

符号の説明Explanation of symbols

1 ICカードチップ
2 入出力回路
3 CPU
4 制御回路
5 データメモリ
6 プログラムメモリ
7 暗号コプロセッサ
8 データバス
10 バス変換回路
11 データレジスタ
14,200 2線2相式演算回路
20 2線2相符号化回路
22,202,207,230,240 2線2相式組合せ論理回路
23 2線1線変換回路
70,80,130,140,180 2線2相式AND論理回路
90,100,110,160,190 2線2相式XOR論理回路
201 否定論理回路
206 同期生成回路
1 IC card chip 2 I / O circuit 3 CPU
DESCRIPTION OF SYMBOLS 4 Control circuit 5 Data memory 6 Program memory 7 Cryptographic coprocessor 8 Data bus 10 Bus conversion circuit 11 Data register 14,200 Two-wire two-phase arithmetic circuit 20 Two-wire two-phase encoding circuit 22,202,207,230,240 Two-wire two-phase combinational logic circuit 23 Two-wire one-wire conversion circuit 70, 80, 130, 140, 180 Two-wire two-phase AND logic circuit 90, 100, 110, 160, 190 Two-wire two-phase XOR logic circuit 201 Negative logic circuit 206 Synchronization generation circuit

Claims (16)

暗号鍵を用いて暗号化アルゴリズムを実行し、所望の秘密情報を暗号化するプロセッサを有する半導体集積回路であって、
前記プロセッサは、前記秘密情報とされる1線1相符号を用いた入力データを、ビット単位で、論理値1を示す第1信号と、論理値0を示す第2信号とを規定する2線2相符号を用いたデータに変換する2線2相符号化回路と、
前記2線2相符号に対応した論理演算を行う複数の2線2相式論理回路を有し、前記入力データを暗号化する2線2相式組合せ論理回路と、を備え、
前記2線2相式論理回路は、前記2線2相符号に対応する第1の信号線と第2の信号線からなる複数の入力コネクタと、出力コネクタとを有し、全ての前記入力コネクタに無効な情報であるクリア信号が入力される初期状態から、全ての前記入力コネクタに前記第1信号又は前記第2信号が入力される有効状態に遷移するときのみ、前記入力コネクタに入力された論理値を、所定の論理関数により一定回数だけ反転させて、前記出力コネクタに前記第1信号又は前記第2信号を出力する半導体集積回路。
A semiconductor integrated circuit having a processor that executes an encryption algorithm using an encryption key and encrypts desired secret information,
The processor has two lines for defining input data using a one-line one-phase code, which is the secret information, in a bit unit, a first signal indicating a logical value 1 and a second signal indicating a logical value 0 A two-wire two-phase encoding circuit for converting data using two-phase code;
A plurality of two-wire two-phase logic circuits that perform a logical operation corresponding to the two-wire two-phase code, and a two-wire two-phase combinational logic circuit that encrypts the input data,
The two-wire two-phase logic circuit has a plurality of input connectors composed of a first signal line and a second signal line corresponding to the two-wire two-phase code, and an output connector, and all the input connectors Is input to the input connector only when transitioning from the initial state in which a clear signal, which is invalid information, is input to the valid state in which the first signal or the second signal is input to all the input connectors A semiconductor integrated circuit that inverts a logical value a predetermined number of times by a predetermined logical function and outputs the first signal or the second signal to the output connector.
前記出力コネクタから出力された2線2相符号を用いたデータを、1線1相符号を用いたデータに変換する2線1線変換回路を、さらに備える請求項1記載の半導体集積回路。   2. The semiconductor integrated circuit according to claim 1, further comprising: a two-wire one-line conversion circuit that converts data using the two-wire two-phase code output from the output connector into data using the one-wire one-phase code. 前記2線2相式論理回路は、前記初期状態から前記有効状態に遷移する途中で、少なくとも1つの前記入力コネクタに前記クリア信号が入力された状態であれば、前記出力コネクタに前記クリア信号を出力する請求項1又は請求項2記載の半導体集積回路。   If the clear signal is input to at least one of the input connectors during the transition from the initial state to the valid state, the two-wire two-phase logic circuit outputs the clear signal to the output connector. 3. The semiconductor integrated circuit according to claim 1, wherein the semiconductor integrated circuit outputs the data. 前記2線2相式論理回路は、前記初期状態から前記有効状態への遷移を繰返す請求項1乃至3の何れか1項記載の半導体集積回路。   4. The semiconductor integrated circuit according to claim 1, wherein the two-wire two-phase logic circuit repeats a transition from the initial state to the valid state. 前記2線2相式論理回路は、前記クリア信号、前記第1信号及び前記第2信号と論理値との対応関係を切替えるモード信号に応じて、前記初期状態から前記有効状態に遷移するときに、論理値が変化する前記第1の信号線と前記第2の信号線が切り替わる請求項1乃至4の何れか1項記載の半導体集積回路。   When the two-wire two-phase logic circuit transitions from the initial state to the valid state in response to a mode signal that switches the correspondence relationship between the clear signal, the first signal, and the second signal and a logical value. 5. The semiconductor integrated circuit according to claim 1, wherein the first signal line and the second signal line whose logic values change are switched. 前記2線2相式組合せ論理回路の前段及び後段に、論理値を反転する否定論理回路をさらに備え、前記否定論理回路は、前記モード信号により有効又は無効とされる請求項5記載の半導体集積回路。   6. The semiconductor integrated circuit according to claim 5, further comprising a negative logic circuit that inverts a logical value at a front stage and a rear stage of the two-wire two-phase combinational logic circuit, wherein the negative logic circuit is enabled or disabled by the mode signal. circuit. 前記モード信号は、前記2線2相式論理回路が前記初期状態になった後に、前記否定論理回路を有効にする請求項6記載の半導体集積回路。   7. The semiconductor integrated circuit according to claim 6, wherein the mode signal enables the negative logic circuit after the two-wire two-phase logic circuit is in the initial state. 前記モード信号は、前記2線2相式論理回路での演算期間中において、前記第1の信号線と前記第2の信号線の論理値が変化する確率を略同一とするように、ランダムに切り替わる請求項5乃至7の何れか1項記載の半導体集積回路。   The mode signal is randomly selected so that the probability that the logical values of the first signal line and the second signal line change is substantially the same during the calculation period in the two-wire two-phase logic circuit. 8. The semiconductor integrated circuit according to claim 5, wherein the semiconductor integrated circuit is switched. 前記2線2相符号化回路を制御する制御信号を生成する制御回路をさらに備え、
前記2線2相符号化回路は、前記制御信号に応じて、前記2線2相符号による前記クリア信号、前記第1信号及び前記第2信号を出力するタイミングを変更する請求項1記載の半導体集積回路。
A control circuit for generating a control signal for controlling the two-wire two-phase encoding circuit;
2. The semiconductor according to claim 1, wherein the two-wire two-phase encoding circuit changes a timing of outputting the clear signal, the first signal, and the second signal by the two-wire two-phase code in accordance with the control signal. Integrated circuit.
前記2線2相式論理回路は、複合ゲートからなる請求項1記載の半導体集積回路。   2. The semiconductor integrated circuit according to claim 1, wherein the two-wire two-phase logic circuit is composed of a composite gate. 前記2線2相式論理回路は、前記第1の信号線と前記第2の信号線にそれぞれ入力されたデータが論理変化するタイミングのうち、遅い方のタイミングを規定するタイミング信号に同期して、前記2線2相符号に対応した論理演算を開始する請求項1記載の半導体集積回路。   The two-wire two-phase logic circuit is synchronized with a timing signal that defines a later timing among timings at which data input to the first signal line and the second signal line change in logic. 2. The semiconductor integrated circuit according to claim 1, wherein a logical operation corresponding to the two-wire two-phase code is started. 前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有し、
前記2線2相式論理回路は、前記入力コネクタに与えられたデータを、タイミング入力端子に与えられた複数のタイミング信号のうち最も変化の遅いタイミング信号に同期して取り込む入力ゲート回路と、
前記入力ゲート回路によって取り込まれたデータを受けて論理動作を行うロジック回路と、
前記最も変化の遅いタイミング信号を前記ロジック回路の論理動作が確定するタイミングよりも更に所定時間遅延させたタイミング信号を生成する遅延回路と、を有し、
前記遅延回路で生成されたタイミング信号は、タイミング出力端子から出力されて後段の前記2線2相式論理回路の前記タイミング入力端子に与えられ、
前記所定時間は、前記2線2相式論理回路間の配線遅延よりも長くされた請求項1記載の半導体集積回路。
The two-wire two-phase combinational logic circuit has a plurality of the two-wire two-phase logic circuits connected in cascade,
The two-wire two-phase logic circuit includes an input gate circuit that captures data given to the input connector in synchronization with a timing signal that changes most slowly among a plurality of timing signals given to a timing input terminal;
A logic circuit that receives data taken in by the input gate circuit and performs a logic operation;
A delay circuit that generates a timing signal obtained by delaying the slowest change timing signal by a predetermined time from the timing at which the logic operation of the logic circuit is determined;
The timing signal generated by the delay circuit is output from a timing output terminal and is provided to the timing input terminal of the two-wire two-phase logic circuit in the subsequent stage,
2. The semiconductor integrated circuit according to claim 1, wherein the predetermined time is longer than a wiring delay between the two-wire two-phase logic circuits.
前記2線2相符号化回路から出力される2線2相符号を用いたデータのビット毎に、前記初期状態から前記有効状態に遷移するタイミングを示す第1タイミング信号を生成する第1タイミング生成回路をさらに有し、
初段の前記2線2相式論理回路は、前記入力コネクタに与えられたデータのビット毎に前記第1タイミング信号を入力し、入力された前記第1タイミング信号のうち最も変化の遅い第1タイミング信号に同期して変化する第2タイミング信号を生成する第2タイミング生成回路を有し、
次段の前記2線2相式論理回路の前記入力ゲート回路は、前記第2タイミング信号に同期して前記2線2相符号を用いたデータを、前記ロジック回路に与える請求項12記載の半導体集積回路。
First timing generation for generating a first timing signal indicating a timing of transition from the initial state to the valid state for each bit of data using the two-wire two-phase code output from the two-wire two-phase encoding circuit Further comprising a circuit;
The two-wire two-phase logic circuit in the first stage inputs the first timing signal for each bit of data applied to the input connector, and the first timing that is the slowest change among the input first timing signals. A second timing generation circuit that generates a second timing signal that changes in synchronization with the signal;
13. The semiconductor device according to claim 12, wherein the input gate circuit of the two-wire two-phase logic circuit in the next stage supplies data using the two-wire two-phase code to the logic circuit in synchronization with the second timing signal. Integrated circuit.
前記クリア信号は“1,1”、前記第1信号は“1,0”、前記第2信号は“0,1”であり、
前記第1タイミング生成回路は、前記2線2相符号を用いたデータのビット毎に2入力の論理値が相違することを判定するゲート回路を有する請求項13記載の半導体集積回路。
The clear signal is “1, 1”, the first signal is “1, 0”, the second signal is “0, 1”,
The semiconductor integrated circuit according to claim 13, wherein the first timing generation circuit includes a gate circuit that determines that a logical value of two inputs is different for each bit of data using the two-wire two-phase code.
前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有し、
前記2線2相式論理回路は、前記入力コネクタに与えられたデータを、タイミング入力端子に与えられたクロック信号に同期してラッチするラッチ回路と、
前記ラッチ回路にラッチされたデータを受けて論理動作を行うロジック回路と、を有し、
前記クロック信号は、全ての前記ラッチ回路に共通に入力され、
前記クロック信号の周期は、前記ロジック回路の論理動作が確定するまでの論理遅延と、前記2線2相式論理回路間の配線遅延とを含む遅延量よりも大きい請求項1記載の半導体集積回路。
The two-wire two-phase combinational logic circuit has a plurality of the two-wire two-phase logic circuits connected in cascade,
The two-wire two-phase logic circuit latches data applied to the input connector in synchronization with a clock signal applied to a timing input terminal;
A logic circuit that receives the data latched in the latch circuit and performs a logic operation;
The clock signal is input in common to all the latch circuits,
2. The semiconductor integrated circuit according to claim 1, wherein the period of the clock signal is larger than a delay amount including a logic delay until a logic operation of the logic circuit is determined and a wiring delay between the two-wire two-phase logic circuits. .
前記2線2相式組合せ論理回路は、従属接続された複数の前記2線2相式論理回路を有し、
前記2線2相式論理回路は、前記入力コネクタに与えられたデータを、タイミング入力端子に与えられたクロック信号に同期して出力するゲート回路と、
前記ゲート回路が出力するデータを受けて論理動作を行うロジック回路と、を有し、
前記クロック信号は、初段の前記2線2相式論理回路を起点とした論理遅延が略同一とされる同一段に配置された前記2線2相式論理回路の前記ゲート回路に共通に入力され、段毎に位相が異なり、
前記クロック信号の周期は、前記ロジック回路の論理動作が確定するまでの論理遅延と、前記2線2相式論理回路間の配線遅延とを含む遅延量よりも大きい請求項1記載の半導体集積回路。
The two-wire two-phase combinational logic circuit has a plurality of the two-wire two-phase logic circuits connected in cascade,
The two-wire two-phase logic circuit includes a gate circuit that outputs data given to the input connector in synchronization with a clock signal given to a timing input terminal;
A logic circuit that receives data output from the gate circuit and performs a logic operation;
The clock signal is input in common to the gate circuit of the two-wire two-phase logic circuit arranged in the same stage where the logic delay starting from the first two-wire two-phase logic circuit is substantially the same. The phase is different for each stage,
2. The semiconductor integrated circuit according to claim 1, wherein the period of the clock signal is larger than a delay amount including a logic delay until a logic operation of the logic circuit is determined and a wiring delay between the two-wire two-phase logic circuits. .
JP2007127712A 2006-08-07 2007-05-14 Semiconductor integrated circuit Withdrawn JP2008067349A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007127712A JP2008067349A (en) 2006-08-07 2007-05-14 Semiconductor integrated circuit

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2006214705 2006-08-07
JP2007127712A JP2008067349A (en) 2006-08-07 2007-05-14 Semiconductor integrated circuit

Publications (1)

Publication Number Publication Date
JP2008067349A true JP2008067349A (en) 2008-03-21

Family

ID=39289591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007127712A Withdrawn JP2008067349A (en) 2006-08-07 2007-05-14 Semiconductor integrated circuit

Country Status (1)

Country Link
JP (1) JP2008067349A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009151327A (en) * 2009-02-20 2009-07-09 Sony Corp Data converter, arithmetic operation processor, arithmetic operation processing control method, and computer program
US9622313B2 (en) 2015-09-08 2017-04-11 Kabushiki Kaisha Toshiba Driver circuit device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009151327A (en) * 2009-02-20 2009-07-09 Sony Corp Data converter, arithmetic operation processor, arithmetic operation processing control method, and computer program
US9622313B2 (en) 2015-09-08 2017-04-11 Kabushiki Kaisha Toshiba Driver circuit device

Similar Documents

Publication Publication Date Title
Sokolov et al. Design and analysis of dual-rail circuits for security applications
US6320418B1 (en) Self-timed pipelined datapath system and asynchronous signal control circuit
JP4353435B2 (en) Random number generation method, semiconductor integrated circuit device, and electronic device
JP2009288056A (en) Scan flip-flop having scan output signal cutoff function
TWI287187B (en) Opposite-phase scheme for peak current reduction
CN107545292B (en) Method and circuit for dynamic power control
JP2006121197A (en) Register circuit and synchronous integrated circuit including register circuit
Bayrak et al. An EDA-friendly protection scheme against side-channel attacks
TW201537332A (en) Clock phase control circuit
JP2004347975A (en) Data processor and logical arithmetic unit
JP2008067349A (en) Semiconductor integrated circuit
US11200348B2 (en) Low overhead random pre-charge countermeasure for side-channel attacks
TWI275097B (en) Memory device and method for testing the same
Moradi et al. Dual-rail transition logic: A logic style for counteracting power analysis attacks
US6970016B2 (en) Data processing circuit and method for transmitting data
Emmert et al. EMC: Efficient Muller C-Element Implementation for High Bit-width Asynchronous Applications
Emmert et al. An asynchronous MPGA THx2 cell and architecture for mitigating side-channel attacks
JP3877663B2 (en) Logic circuit and encryption device
JP4666462B2 (en) Counter circuit and semiconductor device including the same
JP3851906B2 (en) Pulse generation circuit
US7443222B1 (en) Dynamic clock control
JP2006005576A (en) Clock filter circuit and clock filter test circuit
JP2000261310A (en) Synchronization circuit for asynchronous signal and semiconductor integrated circuit
US11556674B2 (en) Synchronization circuit for threshold implementation of S-box
Howard et al. Investigation and comparison of bus alternatives for asynchronous circuits

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: 20100803