JP2005260652A - Signal processing circuit and method - Google Patents

Signal processing circuit and method Download PDF

Info

Publication number
JP2005260652A
JP2005260652A JP2004070481A JP2004070481A JP2005260652A JP 2005260652 A JP2005260652 A JP 2005260652A JP 2004070481 A JP2004070481 A JP 2004070481A JP 2004070481 A JP2004070481 A JP 2004070481A JP 2005260652 A JP2005260652 A JP 2005260652A
Authority
JP
Japan
Prior art keywords
bit
signal
processing
data
bits
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.)
Granted
Application number
JP2004070481A
Other languages
Japanese (ja)
Other versions
JP4565314B2 (en
Inventor
Shigeru Arisawa
繁 有沢
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2004070481A priority Critical patent/JP4565314B2/en
Publication of JP2005260652A publication Critical patent/JP2005260652A/en
Application granted granted Critical
Publication of JP4565314B2 publication Critical patent/JP4565314B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a difference in power consumption from occurring between when a logical level is 0 and when the logical level is 1. <P>SOLUTION: A signal conversion circuit 21 converts an Lo or Hi signal bit corresponding to a logical bit 0 or 1 into an LoHi or HiLo two-bit signal bit, respectively and outputs the two-bit signal bit to an encryption processing circuit 22. Then, in the encryption processing circuit 22 of a stage following the signal conversion circuit 21, a one-bit logic is represented by a two-bit signal bit. The encryption processing circuit 22 performs DES (data encryption standard) encryption processing with the inputted LoHi or HiLo two-bit signal bit as one logical bit. This invention is applicable, for example, to an IC chip that performs encryption processing by a bit operation such as DES. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、信号処理回路および方法に関し、特に、例えば、回路において、論理レベルの違いにより消費電力の差が発生しないようにする信号処理回路および方法に関する。   The present invention relates to a signal processing circuit and method, and more particularly to a signal processing circuit and method for preventing a difference in power consumption from occurring due to a difference in logic level in a circuit, for example.

DES(Data Encryption Standard),AES(Advanced Encryption Standard)、またはRSA(Rivest Shamir Adleman)などのアルゴリズム(暗号方式)を用いて、暗号処理を行う暗号処理回路がある。このような暗号処理回路では、一般的には、1ビットの論理ビットが表す2つの論理レベルである、例えば、0と1のうちの一方である0に対して信号レベルがLo(Lowレベル)の信号ビットを、他方の1に対して信号レベルがHi(Highレベル)の信号ビットを、それぞれ割り当てて、信号処理(暗号処理)が行われる。   There is a cryptographic processing circuit that performs cryptographic processing using an algorithm (encryption method) such as DES (Data Encryption Standard), AES (Advanced Encryption Standard), or RSA (Rivest Shamir Adleman). In such a cryptographic processing circuit, in general, the signal level is Lo (Low level) with respect to 0 which is one of 0 and 1 which is two logic levels represented by one logic bit. The signal bit is assigned to the other 1 with a signal level of Hi (High level), and signal processing (encryption processing) is performed.

暗号処理回路を構成するMOS -IC (Metal Oxide Semiconductor -Integrated Circuit)などでは、本来、HiまたはLoの信号ビットによる暗号処理回路の消費電力には、差がないはずであるが、実際には、リーク電流などにより、HiとLoの信号ビットによって暗号処理回路の消費電力に僅かな差が生じる。また、信号ビットが、HiからLoに、またはLoからHiに遷移する時に、回路において、消費電流が大きく流れる。   In the MOS -IC (Metal Oxide Semiconductor -Integrated Circuit) that constitutes the cryptographic processing circuit, the power consumption of the cryptographic processing circuit by Hi or Lo signal bits should be essentially the same, but in reality, A slight difference in the power consumption of the cryptographic processing circuit is caused by the Hi and Lo signal bits due to leakage current and the like. Further, when the signal bit transitions from Hi to Lo or from Lo to Hi, a large amount of current consumption flows in the circuit.

このHiとLoの信号ビットによる暗号処理回路の消費電力の差を利用して、暗号処理回路の消費電流を分析することにより鍵を解読する手法(DPA: Differential Power Analysis)が考案されている(例えば、非特許文献1)。   A method (DPA: Differential Power Analysis) that deciphers the key by analyzing the current consumption of the cryptographic processing circuit using the difference in power consumption of the cryptographic processing circuit by the Hi and Lo signal bits has been devised ( For example, Non-Patent Document 1).

P. Kocher, J. Jaffe, B. Jun, "Differential Power Analysis," Advances in Cryptology - Crypto 99 Proceedings, Lecture Notes In Computer Science Vol. 1666, M. Wiener ed., Springer-Verlag, 1999.P. Kocher, J. Jaffe, B. Jun, "Differential Power Analysis," Advances in Cryptology-Crypto 99 Proceedings, Lecture Notes In Computer Science Vol. 1666, M. Wiener ed., Springer-Verlag, 1999.

しかしながら、これまでの暗号処理回路では、上述したような、暗号処理回路の消費電流を分析することにより鍵を解読する手法に対する対策が考えられていなかった。   However, the conventional encryption processing circuit has not considered a countermeasure against the above-described method of decrypting the key by analyzing the current consumption of the encryption processing circuit.

この対策としては、暗号処理回路において、論理ビットに対応する信号ビット(信号レベル)によらず、消費電力の差が発生しないようにすることが考えられる。   As a countermeasure against this, it is conceivable that the difference in power consumption does not occur in the cryptographic processing circuit regardless of the signal bit (signal level) corresponding to the logical bit.

本発明は、このような状況に鑑みてなされたものであり、回路において、論理レベルの違いにより消費電力の差が発生しないようにするものである。   The present invention has been made in view of such a situation, and prevents a difference in power consumption from occurring due to a difference in logic level in a circuit.

本発明の信号処理装置は、1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理手段を備えることを特徴とする。   In the signal processing apparatus of the present invention, the same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the other logic level is assigned to the other logic level. Further, the present invention is characterized by comprising encryption-related processing means for performing encryption-related processing using a signal to which a signal bit having a different permutation of Lo and Hi from a signal bit assigned to one logic level is assigned.

暗号関連処理手段には、一方の論理レベルに対して、HiLoの信号ビットが割り当てられ、他方の論理レベルに対して、LoHiの信号ビットが割り当てられた信号を用いて暗号関連処理を行うようにさせることができる。   In the encryption-related processing means, the HiLo signal bit is assigned to one logic level, and the encryption-related processing is performed using a signal to which the LoHi signal bit is assigned to the other logic level. Can be made.

暗号関連処理手段には、DES(Data Encryption Standard)を用いて暗号関連処理を行う
ようにさせることができる。
The encryption related processing means can perform encryption related processing using DES (Data Encryption Standard).

ICチップで構成することができる。   An IC chip can be used.

一方の論理レベルに対して、HiLoの信号ビットを割り当て、他方の論理レベルに対して、LoHiの信号ビットを割り当てる割り当て手段をさらに設けることができる。   It is possible to further provide an assigning means for assigning a HiLo signal bit to one logic level and assigning a LoHi signal bit to the other logic level.

本発明の信号処理方法は、1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理ステップを含むことを特徴とする。   In the signal processing method of the present invention, the same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the other logic level is assigned to the other logic level. Further, the present invention is characterized by comprising a cryptographic-related processing step of performing cryptographic-related processing using a signal to which a signal bit having a different permutation of Lo and Hi from a signal bit assigned to one logic level is assigned.

本発明においては、1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理が行われる。   In the present invention, the same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and one of the two logic levels is assigned to the other logic level. Encryption-related processing is performed using a signal to which a signal bit having a different permutation of Lo and Hi from the signal bit assigned to the logic level is assigned.

本発明によれば、回路において、論理レベルの違いにより消費電力の差が発生しないようにすることができる。   According to the present invention, it is possible to prevent a difference in power consumption from occurring due to a difference in logic level in a circuit.

以下に本発明の実施の形態を説明するが、請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between constituent elements described in the claims and specific examples in the embodiments of the present invention are exemplified as follows. This description is to confirm that specific examples supporting the invention described in the claims are described in the embodiments of the invention. Therefore, even if there are specific examples that are described in the embodiment of the invention but are not described here as corresponding to the configuration requirements, the specific examples are not included in the configuration. It does not mean that it does not correspond to a requirement. On the contrary, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.

さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定するものではない。   Further, this description does not mean that all the inventions corresponding to the specific examples described in the embodiments of the invention are described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of an invention not described in the claims of this application, that is, in the future, a divisional application will be made. Nor does it deny the existence of an invention added by amendment.

請求項1に記載の信号処理回路は、
暗号化に関連する暗号関連処理を行う信号処理回路(例えば、図1の暗号処理回路22)において、
1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、前記一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理手段(例えば、図1の暗号処理回路22)を備える
ことを特徴とする。
The signal processing circuit according to claim 1 comprises:
In a signal processing circuit (for example, the cryptographic processing circuit 22 in FIG. 1) that performs cryptographic-related processing related to encryption,
The same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the one logic level is assigned to the other logic level. It is provided with cryptographic related processing means (for example, cryptographic processing circuit 22 in FIG. 1) for performing cryptographic related processing using a signal to which a signal bit having a different permutation of Lo and Hi is assigned. .

請求項4に記載の信号処理回路は、IC(Integrated Circuit)チップ(例えば、図1のICチップ11)で構成されることを特徴とする。   According to a fourth aspect of the present invention, there is provided a signal processing circuit comprising an IC (Integrated Circuit) chip (for example, the IC chip 11 of FIG. 1).

請求項5に記載の信号処理回路は、一方の論理レベルに対して、HiLoの信号ビットを割り当て、他方の論理レベルに対して、LoHiの信号ビットを割り当てる割り当て手段(例えば、図1の信号変換回路21)をさらに備えることを特徴とする。   6. The signal processing circuit according to claim 5, wherein an assigning means for assigning a HiLo signal bit to one logic level and assigning a LoHi signal bit to the other logic level (for example, the signal conversion of FIG. 1). Circuit 21).

請求項6に記載の信号処理方法は、
暗号化に関連する暗号関連処理を行う信号処理回路の信号処理方法において、
1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、前記一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理ステップ(例えば、図15のステップS1乃至S3の処理)を含む
ことを特徴とする。
The signal processing method according to claim 6 comprises:
In a signal processing method of a signal processing circuit that performs encryption-related processing related to encryption,
The same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the one logic level is assigned to the other logic level. A cryptographic-related processing step (for example, processing in steps S1 to S3 in FIG. 15) that performs cryptographic-related processing using a signal to which a signal bit having a different permutation of Lo and Hi is assigned. And

以下、図を参照して、本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明を適用した暗号処理を行うICチップ11の一実施の形態の構成例を示している。   FIG. 1 shows a configuration example of an embodiment of an IC chip 11 that performs cryptographic processing to which the present invention is applied.

図1のICチップ11は、所定のアルゴリズムによる暗号処理を行う信号処理回路である。ここで、ICチップ11は、例えば、DESによる暗号処理を行うものとする。   The IC chip 11 in FIG. 1 is a signal processing circuit that performs encryption processing using a predetermined algorithm. Here, it is assumed that the IC chip 11 performs encryption processing by DES, for example.

ICチップ11は、信号変換回路21と暗号処理回路22により構成される。信号変換回路21と暗号処理回路22は、論理ビットに対応する信号ビットが割り当てられた信号(論理レベルに対応する信号レベルが割り当てられた信号)を処理する信号処理回路である。   The IC chip 11 includes a signal conversion circuit 21 and an encryption processing circuit 22. The signal conversion circuit 21 and the encryption processing circuit 22 are signal processing circuits that process a signal to which a signal bit corresponding to a logical bit is assigned (a signal to which a signal level corresponding to a logical level is assigned).

信号変換回路21には、暗号処理される所定のデータの論理ビットに対応するLoまたはHiの(信号レベルの)信号ビットが入力される。信号変換回路21には、例えば、論理ビットの0に対応する信号ビットとして、信号レベルがLoの信号ビットが入力され、論理ビットの1に対応する信号ビットとして、信号レベルがHiの信号ビットが入力される。   The signal conversion circuit 21 receives Lo or Hi (signal level) signal bits corresponding to logical bits of predetermined data to be encrypted. For example, a signal bit with a signal level of Lo is input to the signal conversion circuit 21 as a signal bit corresponding to logical bit 0, and a signal bit with a signal level of Hi is input as a signal bit corresponding to logical bit 1 Entered.

信号変換回路21は、入力されたLoまたはHiの信号ビットを、それぞれ、LoHiまたはHiLoの2ビットの信号ビットに変換し、暗号処理回路22に出力する。従って、信号変換回路21より後段の暗号処理回路22では、1ビットの論理ビットが、2ビットの信号ビットで表される。即ち、論理レベルが0の論理ビットには、LoHiの2ビットの信号ビットが割り当てられる。また、論理レベルが1の論理ビットには、HiLoの2ビットの信号ビットが割り当てられる。   The signal conversion circuit 21 converts the input Lo or Hi signal bits into 2-bit signal bits of LoHi or HiLo, respectively, and outputs them to the encryption processing circuit 22. Therefore, in the encryption processing circuit 22 subsequent to the signal conversion circuit 21, one logical bit is represented by two signal bits. In other words, two signal bits of LoHi are assigned to a logic bit having a logic level of 0. In addition, a HiLo 2-bit signal bit is assigned to a logic bit having a logic level of 1.

暗号処理回路22は、入力されたLoHiまたはHiLoの2ビットの信号ビットを1つの論理ビットとして、DESの暗号処理を行い、その暗号処理結果としての暗号文(のデータ)を出力する。   The cryptographic processing circuit 22 performs DES cryptographic processing using the input two LoHi or HiLo signal bits as one logical bit, and outputs a ciphertext (data) as a result of the cryptographic processing.

図2は、2ビットで表すことができるデータXに対する、図1の信号変換回路21の入力と出力の信号(入力信号と出力信号)を示している。なお、図2において、X(Y)は、データXをY進数で表したものであることを意味する。 FIG. 2 shows input and output signals (input signal and output signal) of the signal conversion circuit 21 of FIG. 1 for data X that can be represented by 2 bits. In FIG. 2, X (Y) means that the data X is represented in Y-base.

データ0(10)(00(2))の論理ビットに対応する入力信号の信号ビットは、2ビットのLoLoである。このLoLoの2ビットの信号ビットが、入力信号として信号変換回路21に入力されると、信号変換回路21において信号変換され、LoHiLoHiの4ビットの信号ビットが、出力信号として信号変換回路21から出力される。 The signal bit of the input signal corresponding to the logical bit of data 0 (10) (00 (2) ) is 2-bit LoLo. When the two LoLo signal bits are input to the signal conversion circuit 21 as an input signal, the signal conversion circuit 21 converts the signal. The LoHiLoHi 4-bit signal bit is output from the signal conversion circuit 21 as an output signal. Is done.

また、データ1(10)(01(2))の論理ビットに対応する入力信号の信号ビットは、2ビットのLoHiである。このLoHiの2ビットの信号ビットが、入力信号として信号変換回路21に入力されると、信号変換回路21において信号変換され、LoHiHiLoの4ビットの信号ビットが、出力信号として信号変換回路21から出力される。 The signal bit of the input signal corresponding to the logical bit of data 1 (10) (01 (2) ) is 2-bit LoHi. When the 2-bit signal bit of LoHi is input to the signal conversion circuit 21 as an input signal, the signal conversion circuit 21 converts the signal, and the 4-bit signal bit of LoHiHiLo is output from the signal conversion circuit 21 as an output signal. Is done.

同様に、データ2(10)(10(2))の2ビットの信号ビットHiLoの入力信号に対しては、HiLoLoHiの4ビットの出力信号が、信号変換回路21から出力される。データ3(10)(11(2))の2ビットの信号ビットHiHiの入力信号に対しては、HiLoHiLoの4ビットの出力信号が、信号変換回路21から出力される。 Similarly, a 4-bit output signal HiLoLoHi is output from the signal conversion circuit 21 for an input signal of the 2-bit signal bit HiLo of data 2 (10) (10 (2) ). For the input signal of the 2-bit signal bit HiHi of the data 3 (10) (11 (2) ), a 4-bit output signal of HiLoHiLo is output from the signal conversion circuit 21.

図3は、4ビットで表すことができるデータX’に対する、図1の信号変換回路21の入力と出力の信号(入力信号と出力信号)を示している。なお、図3においても、X’(Y)は、データX’をY進数で表したものであることを意味する。 FIG. 3 shows input and output signals (input signal and output signal) of the signal conversion circuit 21 of FIG. 1 for data X ′ that can be represented by 4 bits. In FIG. 3 as well, X ′ (Y) means that data X ′ is expressed in Y-base.

データ0(10)(0000(2))の論理ビットに対応する入力信号の信号ビットは、4ビットのLoLoLoLoである。このLoLo LoLoの4ビットの信号ビットが、入力信号として信号変換回路21に入力されると、信号変換回路21において信号変換され、LoHiLoHiLoHiLoHiの8ビットの信号ビットが、出力信号として信号変換回路21から出力される。 The signal bit of the input signal corresponding to the logical bit of data 0 (10) (0000 (2) ) is 4-bit LoLoLoLo. When the four signal bits of LoLo LoLo are input to the signal conversion circuit 21 as an input signal, the signal conversion circuit 21 converts the signal, and the 8-bit signal bit of LoHiLoHiLoHiLoHi is output from the signal conversion circuit 21 as an output signal. Is output.

また、データ1(10)(0001(2))の論理ビットに対応する入力信号の信号ビットは、4ビットのLoLoLoHiである。このLoLoLoHiの4ビットの信号ビットが、入力信号として信号変換回路21に入力されると、信号変換回路21において信号変換され、LoHiLoHiLoHiHiLoの8ビットの信号ビットが、出力信号として信号変換回路21から出力される。 The signal bit of the input signal corresponding to the logic bit of data 1 (10) (0001 (2) ) is 4-bit LoLoLoHi. When the four signal bits of LoLoLoHi are input to the signal conversion circuit 21 as an input signal, the signal conversion circuit 21 converts the signal, and the 8-bit signal bit of LoHiLoHiLoHiHiLo is output from the signal conversion circuit 21 as an output signal. Is done.

同様に、データ2(10)(0010(2))の4ビットの信号ビットLoLoHiLoの入力信号に対しては、LoHiLoHiHiLoLoHiの8ビットの出力信号が、信号変換回路21から出力される。データ3(10)(0011(2))の4ビットの信号ビットLoLoHiHiの入力信号に対しては、LoHiLoHiHiLoHiLoの8ビットの出力信号が、信号変換回路21から出力される。 Similarly, an 8-bit output signal of LoHiLoHiHiLoLoHi is output from the signal conversion circuit 21 for an input signal of the 4-bit signal bit LoLoHiLo of data 2 (10) (0010 (2) ). An 8-bit output signal of LoHiLoHiHiLoHiLo is output from the signal conversion circuit 21 for the input signal of the 4-bit signal bit LoLoHiHi of data 3 (10) (0011 (2) ).

さらに、データ4(10)乃至15(10)に対しても、図3に示すように、同様の信号変換が、信号変換回路21において行われる。 Further, the signal conversion circuit 21 performs the same signal conversion on the data 4 (10) to 15 (10) as shown in FIG.

以上のように、信号変換回路21により、論理レベルが0の論理ビットには、LoHiの2ビットの信号ビットが割り当てられ、論理レベルが1の論理ビットには、HiLoの2ビットの信号ビットが割り当てられたことにより、信号変換回路21の後段の暗号処理回路22では、論理レベルの違いによる消費電流の差をなくすことができる。   As described above, the signal conversion circuit 21 assigns a 2-bit signal bit of LoHi to a logic bit having a logic level of 0, and a 2-bit signal bit of HiLo to a logic bit having a logic level of 1. As a result of the assignment, the encryption processing circuit 22 subsequent to the signal conversion circuit 21 can eliminate the difference in current consumption due to the difference in logic level.

次に、図4乃至図6を参照して、図1の暗号処理回路22において行われる、後述するEXOR処理(EXclusive OR;排他的論理和を演算する処理)を、信号変換回路21の出力信号を用いて行う場合について説明する。   Next, referring to FIG. 4 to FIG. 6, an EXOR process (exclusive OR; processing for calculating exclusive OR), which will be described later, performed in the cryptographic processing circuit 22 of FIG. The case where it carries out using is demonstrated.

図4は、入力データxとyのEXOR処理の真理値表を示している。なお、データx(y)の(y)が省略されている場合、データxは、10進数で表されているものとする。 FIG. 4 shows a truth table for EXOR processing of input data x and y. When (y) of data x (y) is omitted, data x is represented by a decimal number.

図4に示すように、EXOR処理では、入力データxまたはyのいずれか一方が1である場合に、処理結果が1となり、他の場合は、処理結果は0となる。   As shown in FIG. 4, in the EXOR process, when either one of the input data x or y is 1, the process result is 1, and in the other case, the process result is 0.

図5は、信号変換回路21の入力信号のように、1ビットの論理ビットの0(2)または1(2)に1ビットの信号ビットのLoまたはHiがそれぞれ割り当てられている信号を対象にEXOR処理を行った場合の処理結果を示している。 FIG. 5 illustrates a signal in which the 1-bit signal bit Lo or Hi is assigned to the 1-bit logic bit 0 (2) or 1 (2) , respectively, like the input signal of the signal conversion circuit 21. The processing result when EXOR processing is performed is shown.

図5に示すように、1ビットの論理ビットに1ビットの信号ビットが割り当てられているEXOR処理では、入力信号の信号ビットのいずれか一方がHiである場合に、EXOR処理によって得られる信号ビットはHiとなり、他の場合は、EXOR処理によって得られる信号ビットはLoとなる。   As shown in FIG. 5, in the EXOR process in which one signal bit is assigned to one logical bit, the signal bit obtained by the EXOR process when one of the signal bits of the input signal is Hi. Becomes Hi, and in other cases, the signal bit obtained by the EXOR processing becomes Lo.

図6は、信号変換回路21の出力信号のように、1ビットの論理ビットの0(2)または1(2)に2ビットの信号ビットのLoHiまたはHiLoがそれぞれ割り当てられている信号を対象にEXOR処理を行った場合の処理結果を示している。 FIG. 6 is intended for a signal in which the 2-bit signal bit LoHi or HiLo is assigned to the 1-bit logic bit 0 (2) or 1 (2) , respectively, like the output signal of the signal conversion circuit 21. The processing result when EXOR processing is performed is shown.

図6に示すように、1ビットの論理ビットに2ビットの信号ビットが割り当てられているEXOR処理では、入力信号の信号ビットのいずれか一方がHiLoである場合に、EXOR処理によって得られる信号ビットはHiLoとなり、他の場合は、EXOR処理によって得られる信号ビットはLoHiとなる。   As shown in FIG. 6, in the EXOR processing in which 2 signal bits are assigned to 1 logical bit, the signal bit obtained by the EXOR processing when one of the signal bits of the input signal is HiLo. Becomes HiLo, and in other cases, the signal bit obtained by the EXOR processing becomes LoHi.

図7は、図1の暗号処理回路22の詳細な構成例を示している。   FIG. 7 shows a detailed configuration example of the cryptographic processing circuit 22 of FIG.

なお、上述したように、暗号処理回路22には、1ビットの論理ビットに対応する2ビットの信号ビットが、信号変換回路21から入力される。従って、例えば、64ビットの論理ビットで表されるデータについては、暗号処理回路22に入力される入力信号は、64ビットの2倍の128ビットの信号ビットとなっている。換言すれば、暗号処理回路22が、例えば、64ビットの論理ビットの単位(ブロック)で暗号処理を行う場合、暗号処理回路22内の信号線は、128ビット分だけ設けられている。以下の説明においては、特に言及していない場合においても、1ビットの論理ビットが、2ビットの信号ビットで処理されているものとする。なお、以下において、1ビットの論理ビットに対応する2ビットの信号ビットが表す値を、1ビットのビットデータという。   As described above, the signal processing circuit 21 receives two signal bits corresponding to one logical bit from the signal conversion circuit 21. Therefore, for example, for data represented by 64 logical bits, the input signal input to the cryptographic processing circuit 22 is a 128-bit signal bit that is twice 64 bits. In other words, for example, when the cryptographic processing circuit 22 performs cryptographic processing in units (blocks) of 64 logical bits, the signal lines in the cryptographic processing circuit 22 are provided for 128 bits. In the following description, it is assumed that one logical bit is processed with two signal bits even if not specifically mentioned. In the following, a value represented by 2 signal bits corresponding to 1 logic bit is referred to as 1-bit bit data.

DESでは、平文(データ)が64ビットの論理ビットの単位で処理される。このため、暗号処理回路22には、64ビット単位でビットデータが入力される。即ち、暗号処理回路22には、暗号化されるデータ(平文)の信号ビットが、128ビット単位で入力される。   In DES, plain text (data) is processed in units of 64 logical bits. Therefore, bit data is input to the cryptographic processing circuit 22 in 64-bit units. That is, the encryption processing circuit 22 receives signal bits of data to be encrypted (plain text) in units of 128 bits.

暗号処理回路22に入力された64ビットのビットデータ(128ビットの信号ビット)は、IP(Initial Permutation)変換部41に入力される。   The 64-bit bit data (128-bit signal bits) input to the cryptographic processing circuit 22 is input to an IP (Initial Permutation) conversion unit 41.

IP変換部41は、入力された64ビットのビットデータの配置(ビット位置)を変換する(入れ換える) IP変換テーブルを有している。即ち、IP変換テーブルは、例えば、入力された64ビットのビットデータそれぞれについて、58ビット目の位置にある値を1ビット目の位置に移動させる、50ビット目の位置にある値を2ビット目の位置に移動させる等の指示情報をもつテーブルである。このIP変換テーブルについては、図8を参照して後述する。   The IP conversion unit 41 has an IP conversion table that converts (replaces) the arrangement (bit position) of input 64-bit bit data. That is, the IP conversion table, for example, moves the value at the 58th bit position to the first bit position for each input 64-bit bit data, and changes the value at the 50th bit position to the second bit. It is a table having instruction information such as moving to the position. The IP conversion table will be described later with reference to FIG.

IP変換部41は、そのIP変換テーブルに従って、入力信号の64ビットのビットデータのビット位置を入れ換えるIP変換処理を行う。そして、IP変換部41は、IP変換処理によって得られる64ビットのビットデータのうち、上位32ビットのビットデータをレジスタ51−1に、下位32ビットのビットデータをレジスタ52−1に、それぞれ出力する。   The IP conversion unit 41 performs an IP conversion process for exchanging the bit positions of 64-bit bit data of the input signal according to the IP conversion table. Then, the IP conversion unit 41 outputs the upper 32-bit bit data to the register 51-1, and the lower 32-bit bit data to the register 52-1, among the 64-bit bit data obtained by the IP conversion process. To do.

ここで、IP変換部41に入力される1ビットのビットデータは、上述したように、2ビットの信号ビットで表されているものであるので、1ビットのビットデータのビット位置を移動させるということは、そのビットデータに対応する2ビットの信号ビットをセットで移動させることを意味する。   Here, since the 1-bit bit data input to the IP conversion unit 41 is represented by 2-bit signal bits as described above, the bit position of the 1-bit bit data is moved. This means that two signal bits corresponding to the bit data are moved as a set.

レジスタ51−1は、IP変換部41からの32ビットのビットデータを記憶し、所定のタイミングで、記憶している32ビットのビットデータを、加算回路55−1に出力する。なお、レジスタ51−1に記憶される32ビットのビットデータをL0とする。 The register 51-1 stores the 32-bit bit data from the IP conversion unit 41, and outputs the stored 32-bit bit data to the adder circuit 55-1 at a predetermined timing. Note that the 32-bit bit data stored in the register 51-1 to L 0.

レジスタ52−1は、IP変換部41からの32ビットのビットデータを記憶し、所定のタイミングで、記憶している32ビットのビットデータを、関数処理部54−1およびレジスタ51−2に出力する。なお、レジスタ52−1に記憶される32ビットのビットデータをR0とする。 The register 52-1 stores the 32-bit bit data from the IP conversion unit 41, and outputs the stored 32-bit bit data to the function processing unit 54-1 and the register 51-2 at a predetermined timing. To do. Note that 32-bit bit data stored in the register 52-1 is R 0 .

中間鍵生成部53−1は、そこに入力される64ビットの共通鍵に基づいて、48ビットの中間鍵K1を生成し、関数処理部54−1に出力する。 Intermediate key generating unit 53-1, based on the 64-bit common key that is input thereto, to generate a 48-bit intermediate key K 1, and outputs to the function processing section 54-1.

関数処理部54−1は、レジスタ52−1からの32ビットのビットデータR0と、中間鍵生成部53−1からの48ビットの中間鍵K1とに基づいて、f関数処理を行う。f関数処理の詳細については、図10を参照して後述するが、このf関数処理により、新たな32ビットのビットデータが生成される。なお、32ビットのビットデータαと48ビットの中間鍵(ビットデータ)βとに基づいてf関数処理を行うこと、およびf関数処理により生成される32ビットのビットデータをf(α,β)と表すこととすると、関数処理部54−1では、32ビットのビットデータf(R0,K1)が生成される。 Function processing section 54-1 includes a 32-bit bit data R 0 from the register 52-1, based on the intermediate key K 1 of 48 bits from the intermediate-key generating unit 53-1 performs the f function process. Details of the f function processing will be described later with reference to FIG. 10, but new 32-bit bit data is generated by the f function processing. The f function processing is performed based on the 32-bit bit data α and the 48-bit intermediate key (bit data) β, and the 32-bit bit data generated by the f function processing is expressed as f (α, β). In the function processing unit 54-1, 32-bit bit data f (R 0 , K 1 ) is generated.

そして、関数処理部54−1は、f関数処理によって得られる新たな32ビットのビットデータf(R0,K1)を加算回路55−1に出力する。 Then, the function processing unit 54-1 outputs new 32-bit bit data f (R 0 , K 1 ) obtained by the f function processing to the adding circuit 55-1.

加算回路55−1は、レジスタ51−1からの32ビットのビットデータL0と、関数処理部54−1からの32ビットのビットデータf(R0,K1)との、対応するビット(1つの論理ビットを表す2ビットの信号ビットのセット)それぞれについて、図6で説明したEXOR処理を行う。そして、加算回路55−1は、EXOR処理によって得られる32ビットのビットデータを、レジスタ52−2に出力する。 The adding circuit 55-1 corresponds to the bit (L 0 , K 1 ) corresponding to the 32-bit bit data L 0 from the register 51-1 and the 32-bit bit data f (R 0 , K 1 ) from the function processing unit 54-1. The EXOR processing described with reference to FIG. 6 is performed for each of the two signal bits representing one logical bit). Then, the adder circuit 55-1 outputs the 32-bit bit data obtained by the EXOR process to the register 52-2.

ここで、レジスタ51−2に記憶される32ビットのビットデータL1、およびレジスタ52−2に記憶される32ビットのビットデータR1は、次のように表すことができる。 Here, the 32-bit bit data L 1 stored in the register 51-2 and the 32-bit bit data R 1 stored in the register 52-2 can be expressed as follows.

L1=R0
R1=L0+f(R0,K1
・・・・・・・・・・・・・・・・・・・・・・・(1)
L 1 = R 0
R 1 = L 0 + f (R 0 , K 1 )
... (1)

ここで、“+”は、EXOR処理(EXOR演算)を表す。   Here, “+” represents EXOR processing (EXOR operation).

以上の、レジスタ51−1および52−1のそれぞれが、32ビットのビットデータL0およびR0を出力してから、レジスタ51−1および52−1の後段のレジスタ51−2および52−2に、(1)式で表される32ビットのビットデータL1およびR1がそれぞれ記憶されるまでの処理を1つのラウンドの処理と称するものとすると、図7の暗号処理回路22では、1つのラウンドの処理を行うために構成される、レジスタ51−1、レジスタ52−1、中間鍵生成部53−1、関数処理部54−1、および加算回路55−1の構成(以下、適宜、1ラウンド処理のセットと称する)と同様の構成が、15ラウンド分だけ、1ラウンド処理のセットの後段に設けられている。 Above, the register 51-1 and each of 52-1, since the output bit data L 0 and R 0 of 32 bits, the subsequent registers 51-2 and 52-2 of the registers 51-1 and 52-1 If the processing until the 32-bit bit data L 1 and R 1 represented by the equation (1) is stored is called one round processing, the encryption processing circuit 22 in FIG. Configuration of register 51-1, register 52-1, intermediate key generation unit 53-1, function processing unit 54-1, and adder circuit 55-1 configured to perform two round processes (hereinafter, A configuration similar to that of the one-round processing set is provided in the subsequent stage of the one-round processing set for 15 rounds.

換言すれば、暗号処理回路22には、16ラウンド分のレジスタ51−i、レジスタ52−i、中間鍵生成部53−i、関数処理部54−i、加算回路55−iが設けられている。なお、レジスタ51−i、およびレジスタ52−iに記憶される32ビットのビットデータそれぞれを、Li-1およびRi-1と表す。ここで、ラウンドの番号を表す変数iは、特に断りがない場合には、i=1,2,・・,16を表すものとする。 In other words, the encryption processing circuit 22 includes a register 51-i, a register 52-i, an intermediate key generation unit 53-i, a function processing unit 54-i, and an addition circuit 55-i for 16 rounds. . The 32-bit bit data stored in the register 51-i and the register 52-i are represented as L i-1 and R i-1 , respectively. Here, the variable i representing the round number represents i = 1, 2,... 16 unless otherwise noted.

なお、16番目の16ラウンドの処理では、他の1乃至15ラウンドの処理と異なり、図7に示すように、レジスタ52−16は、記憶している32ビットのビットデータR15を、レジスタ51−17ではなく、レジスタ52−17に出力し、また、16ラウンド目の加算回路55−16は、EXOR処理によって得られる32ビットのビットデータを、レジスタ52−17ではなく、レジスタ51−17に出力する。 In the process of the 16 th 16 rounds, unlike the processing of other 1 to 15 rounds, as shown in FIG. 7, the register 52-16 is stored in 32-bit bit data R 15, register 51 The adder 55-16 in the 16th round outputs the 32-bit bit data obtained by the EXOR process to the register 51-17 instead of the register 52-17. Output.

2乃至16ラウンドのレジスタ51−iおよび52−i(i=2,・・,16)にそれぞれ記憶されるビットデータLi-1およびRi-1については、レジスタ51−2および52−2に記憶されるL1およびL2の(1)式と同様の関係が成り立つことから、レジスタ51−iおよび52−iにそれぞれ記憶されるビットデータLi-1およびRi-1(i=1,2,・・,16)は、次の(2)式のように表すことができる。 For the bit data L i-1 and R i-1 stored in the 2 to 16 round registers 51-i and 52-i (i = 2,..., 16), respectively, the registers 51-2 and 52-2 Since the same relation as the expression (1) of L 1 and L 2 stored in the above holds, the bit data L i-1 and R i-1 (i = 1, 2,..., 16) can be expressed as the following equation (2).

Li=Ri-1
Ri=Li-1+f(Ri-1,Ki) (i=1,2,・・,16)
・・・・・・・・・・・・・・・・・・・・・・・(2)
L i = R i-1
R i = L i−1 + f (R i−1 , K i ) (i = 1, 2,..., 16)
... (2)

レジスタ51−17は、加算回路55−16からのEXOR処理によって得られる32ビットのビットデータを、ビットデータL16として記憶し、所定のタイミングで、そのビットデータL16をIP逆変換部61に出力する。 Register 51-17 is a 32-bit bit data obtained by EXOR process from the adding circuit 55-16 is stored as bit data L 16, at a predetermined timing, the bit data L 16 to IP inverse transform unit 61 Output.

レジスタ52−17は、レジスタ52−16からの32ビットのビットデータを、ビットデータR16として記憶し、所定のタイミングで、そのビットデータR16をIP逆変換部61に出力する。 Register 52-17 is a 32-bit bit data from the register 52-16 is stored as bit data R 16, at a predetermined timing, and outputs the bit data R 16 in IP inverse transform unit 61.

従って、ビットデータL16およびビットデータR16は、(3)式のように表すことができる。 Therefore, the bit data L 16 and the bit data R 16 can be expressed as shown in Equation (3).

L16=L15+f(R15,K16
L16=R15
・・・・・・・・・・・・・・・・・・・・・・・(3)
L 16 = L 15 + f (R 15 , K 16 )
L 16 = R 15
(3)

IP逆変換部61には、レジスタ51−17からの32ビットのビットデータL16と、レジスタ52−17からの32ビットのビットデータR16とが入力される。そして、IP逆変換部61は、32ビットのビットデータL16を上位32ビットとするとともに、32ビットのビットデータR16を下位32ビットとする64ビットのビットデータを対象に、IP逆変換を行う。 The IP reverse conversion unit 61 receives the 32-bit bit data L 16 from the register 51-17 and the 32-bit bit data R 16 from the register 52-17. Then, the IP reverse conversion unit 61 converts the 32-bit bit data L 16 into the upper 32 bits and performs the IP reverse conversion on the 64-bit bit data having the 32-bit bit data R 16 as the lower 32 bits. Do.

即ち、IP逆変換部61は、IP変換部41が行う64ビットのビットデータのIP変換の逆変換であるIP逆変換を行う。具体的には、IP逆変換部61は、IP変換部41のIP変換テーブルに対応するIP逆変換テーブルを有し、そのIP逆変換テーブルに従って、64ビットのビットデータのビット位置を入れ換えるIP逆変換処理を行う。そして、IP変換部61は、IP逆変換処理によって得られる64ビットのビットデータを、暗号文として外部に出力する。   That is, the IP reverse conversion unit 61 performs IP reverse conversion that is reverse conversion of IP conversion of 64-bit bit data performed by the IP conversion unit 41. Specifically, the IP reverse conversion unit 61 has an IP reverse conversion table corresponding to the IP conversion table of the IP conversion unit 41, and replaces the bit position of 64-bit bit data according to the IP reverse conversion table. Perform the conversion process. Then, the IP conversion unit 61 outputs 64-bit bit data obtained by the IP reverse conversion process to the outside as ciphertext.

図8は、図7のIP変換部41が有するIP変換テーブルの例を示している。   FIG. 8 shows an example of an IP conversion table included in the IP conversion unit 41 of FIG.

図8のIP変換テーブルでは、IP変換処理の対象となる64ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を入力ビット位置とするとともに、IP変換処理後の64ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を出力ビット位置として、入力ビット位置と出力ビット位置とが対応付けられている。   In the IP conversion table of FIG. 8, the position of each bit (a set of 2 bit signal bits representing one logic bit) of 64-bit bit data to be subjected to IP conversion processing is set as an input bit position, and IP conversion is performed. The input bit position and the output bit position are associated with each other (the set of 2-bit signal bits representing one logical bit) of the processed 64-bit bit data as the output bit position.

図7のIP変換部41は、図8のIP変換テーブルを参照して、信号変換回路21から入力された64ビットのビットデータの各ビットについて、そのビットの出力ビット位置を決定し、その出力ビット位置に配置(移動)して、レジスタ51−1または52−1に出力する。   The IP conversion unit 41 in FIG. 7 determines the output bit position of each bit of the 64-bit bit data input from the signal conversion circuit 21 with reference to the IP conversion table in FIG. Arrange (move) to the bit position and output to the register 51-1 or 52-1.

図8に示すIP変換テーブルでは、IP変換処理の対象の64ビットのビットデータのうちの、例えば、図中点線の丸で囲んである、入力ビット位置が58ビット目のビットデータは、1ビット目の出力ビット位置に配置(移動)させることが指定されている。従って、IP変換処理の対象の64ビットのビットデータの58ビット目は、IP変換部41のIP変換処理によって、1ビット目に入れ替えられる。   In the IP conversion table shown in FIG. 8, of the 64-bit bit data to be subjected to IP conversion processing, for example, the bit data at the input bit position of the 58th bit surrounded by a dotted circle in the figure is 1 bit. It is specified to be arranged (moved) at the output bit position of the eye. Accordingly, the 58th bit of the 64-bit bit data to be subjected to the IP conversion process is replaced with the first bit by the IP conversion process of the IP conversion unit 41.

また、図8のIP変換テーブルによれば、例えば、IP変換処理の対象の64ビットのビットデータの50ビット目は、2ビット目に入れ替えられる。同様にして、図8のIP変換テーブルでは、入力ビット位置が、上述した58ビット目と50ビット目以外の1ビット目乃至64ビット目のビットデータについても、出力ビット位置として何ビット目に配置させるかが指定されている。   Further, according to the IP conversion table of FIG. 8, for example, the 50th bit of the 64-bit bit data to be subjected to the IP conversion process is replaced with the second bit. Similarly, in the IP conversion table of FIG. 8, the bit positions of the first to 64th bit data other than the 58th and 50th bits described above are arranged as the output bit positions in the IP conversion table of FIG. Whether to do it is specified.

このように、IP変換部41は、IP変換テーブルを使用して、入力された64ビットのビットデータのビット位置を入れ換えるIP変換処理を行う。   As described above, the IP conversion unit 41 performs an IP conversion process of replacing the bit positions of the input 64-bit bit data using the IP conversion table.

図9は、図7のIP逆変換部61が有するIP逆変換テーブルの例を示している。   FIG. 9 shows an example of an IP reverse conversion table included in the IP reverse conversion unit 61 of FIG.

図9のIP逆変換テーブルでは、IP逆変換処理の対象となる64ビットのビットデータの各ビットの位置を入力ビット位置とするとともに、IP逆変換処理後の64ビットのビットデータの各ビットの位置を出力ビット位置として、入力ビット位置と出力ビット位置とが対応付けられている。   In the IP reverse conversion table of FIG. 9, the position of each bit of the 64-bit bit data to be subjected to the IP reverse conversion process is set as the input bit position, and each bit of the 64-bit bit data after the IP reverse conversion process is set. With the position as the output bit position, the input bit position and the output bit position are associated with each other.

図9のIP逆変換テーブルは、上述したようにIP変換部41で行った64ビットのビットデータのIP変換の逆変換であるIP逆変換を行うテーブルである。   The IP reverse conversion table in FIG. 9 is a table for performing IP reverse conversion, which is reverse conversion of IP conversion of 64-bit bit data performed by the IP conversion unit 41 as described above.

図9のIP逆変換テーブルによれば、IP逆変換処理の対象の64ビットのビットデータのうちの、例えば、図中点線の丸で囲んである、入力ビット位置が1ビット目のビットデータは、58ビット目の出力ビット位置に配置(移動)させることが指定されている。従って、IP逆変換処理の対象の64ビットのビットデータの1ビット目は、IP逆変換部61のIP逆変換処理によって、58ビット目に入れ替えられる。   According to the IP reverse conversion table of FIG. 9, among the 64-bit bit data to be subjected to the IP reverse conversion process, for example, the bit data whose input bit position is the first bit surrounded by a dotted circle in the figure is , It is designated to be arranged (moved) at the output bit position of the 58th bit. Therefore, the first bit of the 64-bit bit data to be subjected to the IP reverse conversion process is replaced with the 58th bit by the IP reverse conversion process of the IP reverse conversion unit 61.

同様にして、図9のIP逆変換テーブルでは、入力ビット位置が2ビット目乃至64ビット目のビットデータについても、出力ビット位置として何ビット目に配置させるかが指定されている。   Similarly, in the IP reverse conversion table of FIG. 9, it is specified what bit the bit data of the second bit to the 64th bit is to be arranged as the output bit position.

このように、IP逆変換部61は、IP逆変換テーブルを使用して、入力された64ビットのビットデータのビット位置を入れ換えるIP逆変換処理を行う。   As described above, the IP reverse conversion unit 61 performs the IP reverse conversion process of replacing the bit positions of the input 64-bit bit data using the IP reverse conversion table.

図10は、図7の関数処理部54−1の詳細な構成例を示している。   FIG. 10 shows a detailed configuration example of the function processing unit 54-1 of FIG.

関数処理部54−1は、上述したように、レジスタ52−1から出力された32ビットのビットデータR0(信号ビットとしては、64ビットで表されるもの)と、中間鍵生成部53−1から出力された48ビットの中間鍵K1(信号ビットとしては、96ビットで表されるもの)とに基づいて、f関数処理を行う。 As described above, the function processing unit 54-1 includes the 32-bit bit data R 0 (represented by 64 bits as signal bits) output from the register 52-1, and the intermediate key generation unit 53-. F function processing is performed based on the 48-bit intermediate key K 1 output from 1 (the signal bits are represented by 96 bits).

レジスタ52−1から出力された32ビットのビットデータR0は、ビット拡張部101に入力される。 The 32-bit bit data R 0 output from the register 52-1 is input to the bit extension unit 101.

ビット拡張部101は、内部に有するE(Expand)テーブル(図11で後述)に従って、レジスタ52−1からの32ビットのビットデータR0を、48ビットのビットデータに拡張する48ビット拡張処理を行う。そして、ビット拡張部101は、48ビット拡張処理によって得られる48ビットのビットデータを、加算回路102に出力する。 The bit expansion unit 101 performs 48-bit expansion processing for expanding 32-bit bit data R 0 from the register 52-1 to 48-bit bit data in accordance with an E (Expand) table (described later in FIG. 11). Do. Then, the bit extension unit 101 outputs 48-bit bit data obtained by the 48-bit extension process to the adder circuit 102.

加算回路102には、ビット拡張部101からの48ビットのビットデータと、中間鍵生成部53−1からの48ビットの中間鍵K1とが入力される。 The adder circuit 102 receives the 48-bit bit data from the bit extension unit 101 and the 48-bit intermediate key K 1 from the intermediate key generation unit 53-1.

加算回路102は、ビット拡張部101からの48ビットのビットデータと、中間鍵生成部53−1からの48ビットの中間鍵K1との、対応するビット(1つの論理ビットを表す2ビットの信号ビットのセット)それぞれについて、EXOR処理を行う。 The adder circuit 102 corresponds to the 48-bit bit data from the bit extension unit 101 and the 48-bit intermediate key K 1 from the intermediate key generation unit 53-1 (two bits representing one logical bit). EXOR processing is performed for each signal bit set).

そして、加算回路102は、EXOR処理によって得られる48ビットのビットデータを、Sボックス処理部S1乃至S8に出力する。なお、加算回路102は、図10に示すように、EXOR処理によって得られる48ビットのビットデータのうち、下位1乃至6ビット目の6ビットをSボックス処理部S8に、下位7乃至12ビット目の6ビットをSボックス処理部S7に、下位13乃至18ビット目の6ビットをSボックス処理部S6に、下位19乃至24ビット目の6ビットをSボックス処理部S5に、下位25乃至30ビット目の6ビットをSボックス処理部S6に、下位31乃至36ビット目の6ビットをSボックス処理部S3に、下位37乃至42ビット目の6ビットをSボックス処理部S2に、下位43乃至48ビット目の6ビット(上位6ビット)をSボックス処理部S1に、それぞれ出力する。 Then, the adder circuit 102 outputs 48-bit bit data obtained by the EXOR process to the S box processing units S 1 to S 8 . Incidentally, the addition circuit 102, as shown in FIG. 10, among the 48 bits of the bit data obtained by EXOR process, the 6 bits of the lower 1 to 6 th bit S-box processing section S 8, the lower 7 to 12-bit the 6-bit eyes S box process unit S 7, the 6 least significant bits 13 to 18 th bit S-box processing section S 6, the 6 least significant bits 19 to 24-th bit to the S-box processing section S 5, the lower the 6-bit 25 to bit 30 in S-box processing section S 6, the 6 least significant bits 31 to 36 th bit S-box processing section S 3, the 6 least significant bits 37 to 42 bit S-box processing section S 2 , 6 bits (upper 6 bits) of the lower 43 to 48 bits are output to the S box processing unit S 1 , respectively.

Sボックス処理部Sj(j=1乃至8)は、Sボックス関数を用いて、加算回路102からの6ビットのビットデータを4ビットのビットデータに変換し、P変換部103に出力する。なお、Sボックス関数によるビットデータの変換を行うSボックス関数処理については、図12および図13を参照して後述する。 The S box processing unit S j (j = 1 to 8) converts the 6-bit bit data from the addition circuit 102 into 4-bit bit data using the S box function, and outputs the 4-bit bit data to the P conversion unit 103. Note that S box function processing for converting bit data by the S box function will be described later with reference to FIGS. 12 and 13.

P変換部103には、Sボックス処理部S1乃至S8のそれぞれから、4ビットのビットデータが入力される。そして、P変換部103は、Sボックス処理部S1乃至S8それぞれからの4ビットのビットデータを最上位ビットから順番に並べた、32ビットのビットデータを対象に、P変換処理を行う。 4-bit bit data is input to the P conversion unit 103 from each of the S box processing units S 1 to S 8 . Then, the P conversion unit 103 performs P conversion processing on 32-bit bit data obtained by arranging the 4-bit bit data from the S box processing units S 1 to S 8 in order from the most significant bit.

即ち、P変換部103は、IP変換テーブル(図8)と同様の、ビット位置を入れ換えるためのP変換テーブルを内部に有している。P変換部103は、P変換テーブルに従って、Sボックス処理部Sjから入力された32ビットのビットデータのビット位置を入れ換えるP変換処理を行う。そして、P変換部103は、P変換処理によって得られる32ビットのビットデータを、加算回路55−1(図7)に出力する。 That is, the P conversion unit 103 has a P conversion table for exchanging bit positions, similar to the IP conversion table (FIG. 8). The P conversion unit 103 performs P conversion processing for replacing the bit positions of the 32-bit bit data input from the S box processing unit S j according to the P conversion table. Then, the P conversion unit 103 outputs 32-bit bit data obtained by the P conversion process to the adder circuit 55-1 (FIG. 7).

ここで、Sボックス処理部SjからP変換部103に入力される1ビットのビットデータは、IP変換部41に入力されるビットデータの各ビットと同様に、2ビットの信号ビットのセットで表されているものであるので、ビットデータの各ビットのビット位置を移動させるということは、そのビットに対応する2ビットの信号ビットをセットで移動させることを意味する。 Here, the 1-bit bit data input from the S box processing unit S j to the P conversion unit 103 is a set of 2-bit signal bits, similar to each bit of the bit data input to the IP conversion unit 41. Since it is represented, moving the bit position of each bit of the bit data means moving two signal bits corresponding to the bit as a set.

図11は、図10のビット拡張部101が有するEテーブルの例を示している。   FIG. 11 shows an example of the E table included in the bit extension unit 101 of FIG.

図11のEテーブルでは、48ビット拡張処理の対象となる32ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を入力ビット位置とするとともに、48ビット拡張処理後の48ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を出力ビット位置として、入力ビット位置と出力ビット位置とが対応付けられている。   In the E table of FIG. 11, the position of each bit (a set of 2 signal bits representing one logical bit) of 32-bit bit data to be subjected to 48-bit extension processing is set as an input bit position, and 48 bits. The input bit position and the output bit position are associated with each other (the set of 2-bit signal bits representing one logical bit) of the 48-bit bit data after the extension processing as the output bit position.

図10のビット拡張部101は、図11のEテーブルを参照して、加算回路102に出力する48ビットのビットデータの各ビットについて、そのビットの入力ビット位置を決定し、その入力ビット位置のビットデータを出力ビット位置に配置して、加算回路102に出力する。   The bit extension unit 101 in FIG. 10 determines the input bit position of each bit of the 48-bit bit data output to the adder circuit 102 with reference to the E table in FIG. Bit data is arranged at the output bit position and output to the adder circuit 102.

図11に示すEテーブルでは、ビット拡張処理によって得られる48ビットのビットデータのうちの、例えば、出力ビット位置が1ビット目のビットデータとしては、入力ビット位置が32ビット目のビットデータとすることが指定されている。また、図11のEテーブルによれば、ビット拡張処理によって得られる48ビットのビットデータのうちの、例えば、出力ビット位置が2ビット目のビットデータとしては、入力ビット位置が1ビット目のビットデータとすることが指定されている。   In the E table shown in FIG. 11, of the 48-bit bit data obtained by the bit expansion process, for example, the output bit position is the first bit data, and the input bit position is the 32-bit bit data. Is specified. Further, according to the E table of FIG. 11, of the 48-bit bit data obtained by the bit expansion process, for example, as the bit data whose output bit position is the second bit, the input bit position is the bit of the first bit. It is specified to be data.

同様にして、図11のEテーブルでは、出力ビット位置が3乃至48ビット目の位置となるビットデータについても、入力ビット位置が何ビット目のビットデータとするかが指定されている。   Similarly, in the E table of FIG. 11, the bit data whose output bit position is the 3rd to 48th bit positions is designated as the bit data of the input bit position.

なお、ビット拡張部101は、レジスタ52−1から入力される32ビットのビットデータを48ビットのビットデータに拡張するので、16ビット分のビットデータについては、レジスタ52−1から入力される32ビットのビットデータのいずれかが、複数指定されている。   Since the bit extension unit 101 extends the 32-bit bit data input from the register 52-1 to 48-bit bit data, the 16-bit bit data is input from the register 52-1. Any one of bit data of bits is specified.

例えば、図11のEテーブルでは、入力ビット位置が32ビット目のビットデータは、上述した、1ビット目の出力ビット位置の他に、47ビット目の出力ビット位置としても指定されている。   For example, in the E table of FIG. 11, the bit data whose input bit position is the 32nd bit is also designated as the output bit position of the 47th bit in addition to the output bit position of the 1st bit described above.

このように、ビット拡張部101は、Eテーブルを使用して、32ビットのビットデータR0を48ビットのビットデータに拡張する48ビット拡張処理を行う。 In this way, the bit extension unit 101 performs 48-bit extension processing for extending the 32-bit bit data R 0 to 48-bit bit data using the E table.

次に、図12と図13を参照して、図10のSボックス処理部Sjが行うSボックス関数処理について説明する。なお、図12および図13は、j=1の場合のSボックス関数処理の例を示している。 Next, with reference to FIG. 12 and FIG. 13, the S box function processing performed by the S box processing unit S j in FIG. 10 will be described. FIGS. 12 and 13 show examples of S box function processing when j = 1.

Sボックス関数処理では、Sボックス関数によって、行(Row Number)と列(Column Number)を引数として、関数値としての所定の値が算出(決定)される。即ち、Sボックス関数によれば、行(Row Number)と列(Column Number)を入力として、所定の値が決定される。   In the S box function process, a predetermined value as a function value is calculated (determined) by using an S box function with a row (Row Number) and a column (Column Number) as arguments. That is, according to the S box function, a predetermined value is determined by inputting a row (Row Number) and a column (Column Number).

Sボックス関数の引数である行と列には、それぞれ2ビットと4ビットが割り当てられている。従って、行は、2ビットで表すことができる0乃至3のうちのいずれかの値をとり、また、列は、4ビットで表すことができる0乃至15のうちのいずれかの値をとる。   2 bits and 4 bits are assigned to the row and the column which are arguments of the S box function, respectively. Thus, the row takes any value from 0 to 3 that can be represented by 2 bits, and the column takes any value from 0 to 15 that can be represented by 4 bits.

図12では、加算回路102からSボックス処理部S1に入力された6ビットのビットデータの例を示している。図12では、6ビットのビットデータは、点線で囲まれている「011011(2)」となっている。 FIG. 12 shows an example of 6-bit bit data input from the adder circuit 102 to the S box processing unit S 1 . In FIG. 12, the 6-bit bit data is “011011 (2) ” surrounded by a dotted line.

Sボックス処理部S1は、加算回路102から入力された6ビットのビットデータ「011011(2)」のうちの、下位1ビット目と下位6ビット目(上位1ビット目)を、それぞれ、下位ビットと上位ビットとする2ビットの「01(2)=1(10)」を行(Row Number)の値とする。 The S box processing unit S 1 converts the lower 1st bit and the lower 6th bit (upper 1st bit) of the 6-bit bit data “011011 (2) ” input from the adder circuit 102 to the lower order, respectively. Two bits “01 (2) = 1 (10) ”, which are bits and higher bits, are set as the value of the row (Row Number).

また、Sボックス処理部S1は、加算回路102から入力された6ビットのビットデータ「011011(2)」のうちの、下位2乃至5ビット目を、それぞれ、下位1乃至4ビット目とする4ビットの「1101(2)=13(10)」を列(Column Number)の値とする。 Further, the S box processing unit S 1 sets the lower 2nd to 5th bits of the 6-bit bit data “011011 (2) ” input from the adder circuit 102 as the lower 1st to 4th bits, respectively. 4-bit “1101 (2) = 13 (10) ” is set as the value of the column (Column Number).

そして、Sボックス処理部S1は、行と列の値を引数として、図13に示すSボックス関数から関数値を求める。 Then, the S box processing unit S 1 obtains a function value from the S box function shown in FIG. 13 using the row and column values as arguments.

即ち、図13は、横方向と縦方向にそれぞれ列と行の値を取ったSボックス関数を示している。   That is, FIG. 13 shows an S-box function that takes column and row values in the horizontal and vertical directions, respectively.

図13のSボックス関数によれば、例えば、図12に示したように、行(Row Number)が「1(10)」で、列(Column Number)が「13(10)」である場合、その行と列で特定される位置に記述されている所定の値「5(10)」(点線で示されている)が、関数値として算出される。 According to the S box function of FIG. 13, for example, as shown in FIG. 12, when the row (Row Number) is “1 (10) ” and the column (Column Number) is “13 (10) ”, A predetermined value “5 (10) ” (indicated by a dotted line ) described at a position specified by the row and column is calculated as a function value.

図13のSボックス関数により算出された「5(10)」を2進数で表記すれば、4ビットの「0101(2)」となるので、加算回路102から入力された6ビットのビットデータ「011011(2)」に対して、4ビットのビットデータ「0101(2)」が、Sボックス処理部S1からP変換部103に出力される。なお、上述しているように、4ビットのビットデータ「0101(2)」は、ハードウエア的には、2ビットの信号ビットのセットが4セットの、計8ビットの信号ビットで表されるものである。 If “5 (10) ” calculated by the S box function of FIG. 13 is expressed in binary, it becomes 4 bits “0101 (2) ”. Therefore, 6-bit bit data “6101” input from the adder circuit 102 “ 4 bits of bit data “0101 (2) ” is output from the S box processing unit S 1 to the P conversion unit 103 with respect to “011011 (2) ”. As described above, the 4-bit bit data “0101 (2) ” is represented by a total of 8 signal bits, that is, 4 sets of 2 bit signal bits in terms of hardware. Is.

以上のようにして、Sボックス処理部S1乃至S8それぞれが、4ビットのビットデータをP変換部103に出力し、P変換部103には、合わせて32ビットのビットデータが入力される。 As described above, each of the S box processing units S 1 to S 8 outputs 4-bit bit data to the P conversion unit 103, and 32-bit bit data is input to the P conversion unit 103 in total. .

図14は、P変換部103が有するP変換テーブルの例を示している。   FIG. 14 illustrates an example of a P conversion table included in the P conversion unit 103.

図14のP変換テーブルでは、P変換処理の対象となる32ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を入力ビット位置とするとともに、P変換処理によって得られる32ビットのビットデータの各ビット(1つの論理ビットを表す2ビットの信号ビットのセット)の位置を出力ビット位置として、入力ビット位置と出力ビット位置とが対応付けられている。   In the P conversion table of FIG. 14, the position of each bit (a set of 2 bit signal bits representing one logical bit) of 32-bit bit data to be subjected to P conversion processing is set as an input bit position, and P conversion is performed. An input bit position and an output bit position are associated with each other (a set of 2-bit signal bits representing one logical bit) of 32-bit bit data obtained by the processing as an output bit position.

図10のP変換部103は、図14のP変換テーブルを参照して、Sボックス処理部S1乃至S8から入力された32ビットのビットデータの各ビットについて、そのビットの出力ビット位置を決定し、その出力ビット位置に配置(移動)して、加算回路55−1(図7)に出力する。 The P conversion unit 103 in FIG. 10 refers to the P conversion table in FIG. 14 and sets the output bit position of each bit of the 32-bit bit data input from the S box processing units S 1 to S 8. It is determined, arranged (moved) at the output bit position, and output to the adder circuit 55-1 (FIG. 7).

図14に示すP変換テーブルでは、P変換処理の対象の32ビットのビットデータのうちの、例えば、入力ビット位置が16ビット目のビットデータは、1ビット目の出力ビット位置に配置(移動)させることが指定されている。従って、P変換処理の対象の32ビットのビットデータの16ビット目は、P変換部103のP変換処理によって、1ビット目に入れ替えられる。   In the P conversion table shown in FIG. 14, for example, bit data whose input bit position is 16 bits out of 32-bit bit data to be subjected to P conversion processing is arranged (moved) at the output bit position of the first bit. Is specified. Accordingly, the 16th bit of the 32-bit bit data to be subjected to the P conversion process is replaced with the first bit by the P conversion process of the P conversion unit 103.

同様にして、図14のP変換テーブルでは、入力ビット位置が1乃至15ビット目と17乃至32ビット目のビットデータについても、何ビット目の出力ビット位置に配置させるかが指定されている。   Similarly, in the P conversion table of FIG. 14, it is specified what bit the output bit position of the bit data whose input bit positions are the 1st to 15th bits and the 17th to 32nd bits.

このように、P変換部103は、P変換テーブルを使用して、Sボックス処理部S1乃至S8からの32ビットのビットデータのビット位置を入れ換えるP変換処理を行う。 In this manner, the P conversion unit 103 performs P conversion processing for replacing the bit positions of the 32-bit bit data from the S box processing units S 1 to S 8 using the P conversion table.

次に、図15のフローチャートを参照して、図7の暗号化処理が行われる場合の暗号処理回路22の動作について説明する。   Next, the operation of the encryption processing circuit 22 when the encryption processing of FIG. 7 is performed will be described with reference to the flowchart of FIG.

初めに、ステップS1において、IP変換部41は、IP変換テーブル(図8)に従って、信号変換回路21(図1)からの入力信号の64ビットのビットデータのビット位置を入れ換えるIP変換処理を行って、ステップS2に進む。   First, in step S1, the IP conversion unit 41 performs an IP conversion process for replacing the bit positions of the 64-bit bit data of the input signal from the signal conversion circuit 21 (FIG. 1) according to the IP conversion table (FIG. 8). Then, the process proceeds to step S2.

ステップS2において、レジスタ51−i、レジスタ52−i、中間鍵生成部53−i、関数処理部54−i、加算回路55−i、レジスタ51−17、およびレジスタ52−17は、ラウンド処理を行い、ステップS3に進む。即ち、ステップS2では、レジスタ51−i、およびレジスタ52−iに記憶されるビットデータRi-1およびLi-1(i=1,2,・・・,16,17)について、上述した(2)または(3)式の処理が行われる。 In step S2, the register 51-i, the register 52-i, the intermediate key generation unit 53-i, the function processing unit 54-i, the adder circuit 55-i, the register 51-17, and the register 52-17 perform round processing. Go to step S3. That is, in step S2, the bit data R i-1 and L i-1 (i = 1, 2,..., 16, 17) stored in the register 51-i and the register 52-i are described above. The process of (2) or (3) is performed.

ステップS3において、IP逆変換部61は、IP逆変換テーブルに従って、64ビットのビットデータのビット位置を入れ換えるIP逆変換処理を行う。そして、IP変換部61は、IP逆変換処理によって得られる64ビットのビットデータを外部に出力して、処理を終了する。   In step S3, the IP reverse conversion unit 61 performs an IP reverse conversion process for replacing the bit positions of 64-bit bit data according to the IP reverse conversion table. Then, the IP conversion unit 61 outputs 64-bit bit data obtained by the IP reverse conversion process to the outside, and ends the process.

次に、図16のフローチャートを参照して、図15のステップS2におけるラウンド処理について説明する。   Next, the round process in step S2 of FIG. 15 will be described with reference to the flowchart of FIG.

初めに、ステップS21において、レジスタ51−1、レジスタ52−1、中間鍵生成部53−1、関数処理部54−1、および加算回路55−1は、1ラウンド目のラウンド処理(1ラウンド処理)を行って、ステップS22に進む。   First, in step S21, the register 51-1, the register 52-1, the intermediate key generation unit 53-1, the function processing unit 54-1, and the addition circuit 55-1 perform the first round processing (one round processing). ) And the process proceeds to step S22.

ステップS22において、レジスタ51−2、レジスタ52−2、中間鍵生成部53−2、関数処理部54−2、および加算回路55−2は、2ラウンド目のラウンド処理(2ラウンド処理)を行って、ステップS23に進む。   In step S22, the register 51-2, the register 52-2, the intermediate key generation unit 53-2, the function processing unit 54-2, and the addition circuit 55-2 perform the second round processing (two round processing). Then, the process proceeds to step S23.

以下、同様にして、ステップS23乃至S36において、それぞれ、レジスタ51−i、レジスタ52−i、中間鍵生成部53−i、関数処理部54−i、および加算回路55−iは、iラウンド目のラウンド処理(iラウンド処理)を行う(i=3,・・,16)。但し、ステップS36の16ラウンド処理では、図7で説明したように、レジスタ52−16が、記憶している32ビットのビットデータR15を、レジスタ51−17ではなく、レジスタ52−17に出力すること、および、加算回路55−16が、EXOR処理によって得られる32ビットのビットデータを、レジスタ52−17ではなく、レジスタ51−17に出力することが、他の1乃至15ラウンド処理と異なる。 Similarly, in steps S23 to S36, the register 51-i, the register 52-i, the intermediate key generation unit 53-i, the function processing unit 54-i, and the addition circuit 55-i are respectively connected to the i-th round. Round processing (i round processing) is performed (i = 3,..., 16). However, in the 16 round processing of step S36, as described with reference to FIG. 7, the register 52-16 is a memory to have 32-bit bit data R 15, rather than the register 51-17, output to the register 52-17 And the addition circuit 55-16 outputs 32-bit bit data obtained by the EXOR process to the register 51-17 instead of the register 52-17, which is different from the other 1 to 15 round processes. .

そして、ステップS36の後、ステップS37に進み、レジスタ51−17は、記憶しているビットデータL16をIP逆変換部61に出力し、レジスタ52−17は、記憶しているビットデータR16をIP逆変換部61に出力する。 After the step S36, the process proceeds to step S37, the register 51-17 outputs a bit data L 16 stored in the IP inverse transform unit 61, the register 52-17 is bit data R 16 for storing Is output to the IP reverse conversion unit 61.

次に、図17のフローチャートを参照して、図16のステップS21の1ラウンド処理で行われる、レジスタ51−1、レジスタ52−1、中間鍵生成部53−1、関数処理部54−1、および加算回路55−1の動作について説明する。   Next, referring to the flowchart of FIG. 17, a register 51-1, a register 52-1, an intermediate key generation unit 53-1, a function processing unit 54-1, The operation of the adder circuit 55-1 will be described.

初めに、ステップS51において、レジスタ52−1は、記憶している32ビットのビットデータR0を、関数処理部54−1に出力して、ステップS52に進む。 First, in step S51, the register 52-1 outputs the stored 32-bit bit data R0 to the function processing unit 54-1, and proceeds to step S52.

ステップS52において、レジスタ52−1は、記憶している32ビットのビットデータR0を、レジスタ51−2(上位レジスタ)に出力して、ステップS53に進む。 In step S52, the register 52-1 outputs the stored 32-bit bit data R0 to the register 51-2 (upper register), and proceeds to step S53.

ステップS53において、中間鍵生成部53−1は、そこに入力される64ビットの共通鍵に基づいて、48ビットの中間鍵K1を生成し、関数処理部54−1に出力して、ステップS54に進む。 In step S53, the intermediate key generating unit 53-1, based on the 64-bit common key that is input thereto, to generate a 48-bit intermediate key K 1, and outputs the function processing section 54-1, step Proceed to S54.

ステップS54において、関数処理部54−1は、レジスタ52−1からの32ビットのビットデータR0と、中間鍵生成部53−1からの48ビットの中間鍵K1とに基づいて、f関数処理を行って、ステップS55に進む。このf関数処理によって32ビットのビットデータが得られ、関数処理部54−1から加算回路55−1に出力される。 In step S54, the function processing unit 54-1, the bit data R 0 of 32-bit from the register 52-1, based on the intermediate key K 1 of 48 bits from the intermediate-key generating part 53-1, f function Processing is performed, and the process proceeds to step S55. 32-bit bit data is obtained by this f-function processing, and is output from the function processing unit 54-1 to the adding circuit 55-1.

ステップS55において、加算回路55−1は、レジスタ51−1からの32ビットのビットデータL0と、関数処理部54−1からの32ビットのビットデータとの、対応するビット(1つの論理ビットを表す2ビットの信号ビットのセット)それぞれについて、EXOR処理を行う。また、ステップS55では、加算回路55−1は、EXOR処理によって得られる32ビットのビットデータを、レジスタ52−2(下位レジスタ)に出力して、1ラウンド処理を終了する。 In step S55, the adder circuit 55-1 includes a bit data L 0 of 32 bits from the register 51-1, the 32-bit bit data from the function processing unit 54-1, the corresponding bit (one logic bit EXOR processing is performed on each of the signal bits (a set of 2 bits representing). In step S55, the addition circuit 55-1 outputs the 32-bit bit data obtained by the EXOR process to the register 52-2 (lower register), and ends the one round process.

以上の1ラウンド処理と同様の処理が、図16のステップS22乃至S35の2ラウンド処理乃至15ラウンド処理それぞれでも行われる。   The same processing as the above-described one-round processing is also performed in each of the 2-round processing to 15-round processing in steps S22 to S35 in FIG.

また、図16のステップS36の16ラウンド処理では、上述のステップS52において、32ビットのビットデータを上位レジスタ(レジスタ51−17)に出力することに代えて、下位レジスタ(レジスタ52−17)に出力し、上述のステップS55において、EXOR処理によって得られる32ビットのビットデータを下位レジスタ(レジスタ52−17)に出力することに代えて、上位レジスタ(レジスタ51−17)に出力することを除いて、図17の1ラウンド処理と同様の処理が行われる。   In the 16-round process of step S36 in FIG. 16, instead of outputting 32-bit bit data to the upper register (register 51-17) in step S52 described above, the lower register (register 52-17) is used. Except that the 32-bit bit data obtained by the EXOR process is output to the upper register (register 51-17) instead of being output to the lower register (register 52-17) in step S55 described above. Thus, the same processing as the one-round processing in FIG. 17 is performed.

次に、図18のフローチャートを参照して、図17のステップS54におけるf関数処理について説明する。   Next, the f function processing in step S54 in FIG. 17 will be described with reference to the flowchart in FIG.

初めに、ステップS81において、関数処理部54−1(図10)のビット拡張部101は、内部に有するEテーブルに従って、レジスタ52−1からの32ビットのビットデータR0を、48ビットのビットデータに拡張する48ビット拡張処理を行い、ステップS82に進む。 First, in step S81, the bit extension unit 101 of the function processing unit 54-1 (FIG. 10) converts the 32-bit bit data R0 from the register 52-1 into a 48-bit bit according to the E table included therein. 48-bit extension processing for extending data is performed, and the process proceeds to step S82.

ステップS82において、加算回路102は、ビット拡張部101での48ビット拡張処理によって得られる48ビットのビットデータと、中間鍵生成部53−1からの48ビットのビットデータとの、対応するビットそれぞれについて、EXOR処理を行う。また、ステップS82では、加算回路102は、EXOR処理によって得られる48ビットのビットデータを、6ビットずつに分け、その6ビットずつのビットデータを、上位側から順にSボックス処理部S1乃至S8に出力して、ステップS83に進む。 In step S82, the adder circuit 102 corresponds to each of the corresponding bits of the 48-bit bit data obtained by the 48-bit extension process in the bit extension unit 101 and the 48-bit bit data from the intermediate key generation unit 53-1. Perform EXOR processing for. In step S82, the adder circuit 102 divides the 48-bit bit data obtained by the EXOR process into 6-bit data, and sequentially converts the 6-bit bit data into the S box processing units S 1 to S 1 from the upper side. 8 and proceeds to step S83.

ステップS83において、Sボックス処理部S1乃至S8それぞれは、Sボックス関数を用いて、加算回路102からの6ビットのビットデータを4ビットのビットデータに変換するSボックス関数処理を行い、その4ビットのビットデータを、P変換部103に出力して、ステップS84に進む。 In step S83, each of the S box processing units S 1 to S 8 performs S box function processing for converting 6-bit bit data from the adder circuit 102 into 4-bit bit data using the S box function, The 4-bit bit data is output to the P conversion unit 103, and the process proceeds to step S84.

ステップS84において、P変換部103は、P変換テーブルに従って、Sボックス処理部S1乃至S8それぞれから4ビットずつの、合計で32ビットのビットデータのビット位置を入れ換えるP変換処理を行う。そして、P変換部103は、P変換処理によって得られる32ビットのビットデータを、加算回路55−1に出力する。 In step S84, P converter 103, according to P conversion table, the four bits from each S-box processing section S 1 to S 8, performs P conversion interchanging the bit position of the 32-bit bit data in total. Then, the P conversion unit 103 outputs 32-bit bit data obtained by the P conversion process to the adder circuit 55-1.

以上のように、暗号処理回路22(図1)では、1ビットの論理ビットに対応する2ビットの信号ビットをセットとして、図15乃至図18を参照して説明したそれぞれの処理が行われる。   As described above, in the cryptographic processing circuit 22 (FIG. 1), each processing described with reference to FIGS. 15 to 18 is performed by setting 2 signal bits corresponding to 1 logical bit as a set.

これにより、論理レベルが0であることを表すLoHiの2ビットの信号ビットと、論理レベルが1であることを表すHiLoの2ビットの信号ビットとの間で、消費電力の差をなくすことができる。従って、図1のICチップ11の外部から、その消費電流を分析することによる鍵の解読を防止し、セキュリティを確保することができる。このことから、ICチップ11は、極めてセキュアな、いわばセキュリティチップということができる。   This eliminates the difference in power consumption between the two LoHi signal bits indicating that the logic level is 0 and the two HiLo signal bits indicating that the logic level is 1. it can. Accordingly, it is possible to prevent the decryption of the key by analyzing the current consumption from the outside of the IC chip 11 of FIG. 1 and to secure the security. For this reason, the IC chip 11 can be said to be a very secure security chip.

次に、図19は、本発明を適用した暗号処理を行うICチップ11の他の実施の形態の構成例を示している。   Next, FIG. 19 shows a configuration example of another embodiment of the IC chip 11 that performs encryption processing to which the present invention is applied.

図19のICチップ11は、信号変換回路21を有していない点が、図1のICチップ11と異なる。   The IC chip 11 in FIG. 19 is different from the IC chip 11 in FIG. 1 in that the signal conversion circuit 21 is not provided.

図19の暗号処理回路22には、他の装置(ICチップ、制御基板など)から、図1の信号変換回路21が出力するものと同一の、1ビットの論理ビットに、2ビットの信号ビットが割り当てられた信号が入力される。即ち、暗号処理回路22には、論理ビットが表す論理レベルが0の場合には、LoHiの2ビットの信号ビットが他の装置から入力され、論理ビットが表す論理レベルが1の場合には、HiLoの2ビットの信号ビットが、他の装置から入力される。   In the cryptographic processing circuit 22 of FIG. 19, the same 1-bit logical bits as those output from the signal conversion circuit 21 of FIG. Is assigned to the signal. That is, when the logic level represented by the logic bit is 0, the LoHi 2-bit signal bit is input to the encryption processing circuit 22 from another device, and when the logic level represented by the logic bit is 1, Two HiLo signal bits are input from another device.

暗号処理回路22は、図1で説明した場合と同様に、入力されたLoHiまたはHiLoの2ビットの信号ビットを1つの論理ビットとして、DESの暗号処理を行い、その暗号処理結果としての暗号文(のデータ)を出力する。   As in the case described with reference to FIG. 1, the cryptographic processing circuit 22 performs DES cryptographic processing using the input two LoHi or HiLo signal bits as one logical bit, and the ciphertext as a result of the cryptographic processing. (Data) is output.

なお、図1および図19の暗号処理回路22は、1ビットの論理ビットを、上述したような、LoHiまたはHiLoの2ビットの信号ビットで表す以外にも、例えば、LoHi LoHiまたはHiLo HiLoの4ビットの信号ビットで表すようにしても良い。即ち、暗号処理回路22は、1ビットの論理ビットが表す論理レベルの0に対して、LoとHiが同数の信号ビットが割り当てられ、1ビットの論理ビットが表す論理レベルの1に対して、論理レベルの0に割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号処理を行うことができる。   Note that the cryptographic processing circuit 22 of FIGS. 1 and 19 can express, for example, 4 logical bits of LoHi LoHi or HiLo HiLo, in addition to representing the logical bit of 1 bit by the two signal bits of LoHi or HiLo as described above. It may be represented by a bit signal bit. That is, the cryptographic processing circuit 22 assigns the same number of signal bits Lo and Hi to the logical level 0 represented by one logical bit, and for the logical level 1 represented by the one logical bit, Encryption processing can be performed using a signal to which a signal bit having a different permutation of Lo and Hi from a signal bit assigned to logic level 0 is assigned.

この場合、1ビットの論理ビットが表す論理レベルのそれぞれにおいて、同数のLoとHiが割り当てられているので、暗号処理回路22では、論理レベルの違いによる消費電力の差がない。また、回路において消費電力の差がないことにより、DPAなどの、消費電流を分析することによる鍵の解読を防止し、セキュアな暗号処理を行うことができる。   In this case, since the same number of Lo and Hi is assigned to each of the logical levels represented by one logical bit, the cryptographic processing circuit 22 has no difference in power consumption due to the difference in logical level. In addition, since there is no difference in power consumption in the circuit, it is possible to prevent the decryption of the key by analyzing the current consumption, such as DPA, and to perform secure cryptographic processing.

さらに、上述した例では、図1および図19の暗号処理回路22は、DESの暗号処理を行うものとして説明したが、暗号処理回路22が行う暗号処理のアルゴリズムは、DESに限らず、AESやRSAなどでもよい。さらに、例えば、ビット操作によって暗号処理する任意のアルゴリズムでもよい。   Furthermore, in the above-described example, the cryptographic processing circuit 22 in FIGS. 1 and 19 has been described as performing DES cryptographic processing. However, the cryptographic processing algorithm performed by the cryptographic processing circuit 22 is not limited to DES, and AES or RSA may be used. Furthermore, for example, any algorithm that performs cryptographic processing by bit operation may be used.

また、上述した例では、暗号化処理を行うICチップ11に適用した場合について説明したが、本発明は、その他、暗号化に関連する処理としての、例えば、暗号文を復号する復号処理を行うICチップにも適用可能である。   Moreover, although the case where it applied to the IC chip 11 which performs encryption processing was demonstrated in the example mentioned above, this invention performs the decoding process which decodes a ciphertext as a process relevant to encryption, for example. It can also be applied to IC chips.

図1や図19の暗号処理回路22を備えるICチップ11は、ICカード、リーダ/ライタ、携帯電話機その他のPDA (Personal Digital Assistant)など、セキュアに通信することが求められる各種の装置に採用することができる。   The IC chip 11 having the cryptographic processing circuit 22 of FIGS. 1 and 19 is employed in various devices that require secure communication, such as an IC card, a reader / writer, a mobile phone, and other PDAs (Personal Digital Assistants). be able to.

なお、本明細書において、フローチャートに記述されたステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the steps described in the flowcharts are executed in parallel or individually even if they are not necessarily processed in time series, as well as processes performed in time series in the described order. It also includes processing.

本発明を適用したICチップの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the IC chip to which this invention is applied. 2ビットを有するデータXに対する信号変換回路21の入力と出力の信号を示す図である。It is a figure which shows the signal of the input of the signal conversion circuit 21 with respect to the data X which has 2 bits, and an output. 4ビットを有するデータXに対する信号変換回路21の入力と出力の信号を示す図である。It is a figure which shows the signal of the input of the signal conversion circuit 21 with respect to the data X which has 4 bits, and an output. 入力データXとYのEXOR処理の真理値表を示す図である。It is a figure which shows the truth table of the EXOR process of input data X and Y. 1ビットの論理ビットに1ビットの信号ビットを割り当てたときのEXOR処理の処理結果を示す図である。It is a figure which shows the process result of an EXOR process when 1 signal bit is allocated to 1 logic bit. 1ビットの論理ビットに2ビットの信号ビットを割り当てたときのEXOR処理の処理結果を示す図である。It is a figure which shows the processing result of an EXOR process when assigning 2 signal bits to 1 logic bit. 暗号処理回路22の詳細な構成例を示す図である。3 is a diagram illustrating a detailed configuration example of an encryption processing circuit 22. FIG. IP変換部41が有するIP変換テーブルの例を示す図である。It is a figure which shows the example of the IP conversion table which the IP conversion part 41 has. IP逆変換部61が有するIP逆変換テーブルの例を示す図である。It is a figure which shows the example of the IP reverse conversion table which the IP reverse conversion part 61 has. 関数処理部54−1の詳細な構成例を示す図である。It is a figure which shows the detailed structural example of the function process part 54-1. ビット拡張部101が有するEテーブルの例を示す図である。It is a figure which shows the example of E table which the bit expansion part 101 has. Sボックス処理部Sjが行うSボックス関数処理について説明する図である。It is a figure explaining the S box function process which S box process part Sj performs. Sボックス処理部Sjが行うSボックス関数処理について説明する図である。It is a figure explaining the S box function process which S box process part Sj performs. P変換部103が有するP変換テーブルの例を示す図である。It is a figure which shows the example of the P conversion table which the P conversion part 103 has. 暗号処理回路22の動作を説明するフローチャートである。3 is a flowchart for explaining the operation of the cryptographic processing circuit 22. ラウンド処理を説明するフローチャートである。It is a flowchart explaining a round process. 1ラウンド処理を説明するフローチャートである。It is a flowchart explaining 1 round process. f関数処理を説明するフローチャートである。It is a flowchart explaining f function processing. 本発明を適用したICチップの他の実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of other embodiment of the IC chip to which this invention is applied.

符号の説明Explanation of symbols

11 ICチップ, 21 信号変換回路, 22 暗号処理回路   11 IC chip, 21 signal conversion circuit, 22 cryptographic processing circuit

Claims (6)

暗号化に関連する暗号関連処理を行う信号処理回路において、
1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、前記一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理手段を備える
ことを特徴とする信号処理回路。
In a signal processing circuit that performs encryption-related processing related to encryption,
The same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the one logic level is assigned to the other logic level. A signal processing circuit comprising encryption-related processing means for performing encryption-related processing using a signal to which a signal bit having a different permutation of Lo and Hi from the assigned signal bit is assigned.
前記暗号関連処理手段は、一方の論理レベルに対して、HiLoの信号ビットが割り当てられ、他方の論理レベルに対して、LoHiの信号ビットが割り当てられた信号を用いて暗号関連処理を行う
ことを特徴とする請求項1に記載の信号処理回路。
The encryption-related processing means performs encryption-related processing using a signal in which a HiLo signal bit is assigned to one logical level and a LoHi signal bit is assigned to the other logical level. The signal processing circuit according to claim 1.
前記暗号関連処理手段は、DES(Data Encryption Standard)を用いて暗号関連処理を行う
ことを特徴とする請求項1に記載の信号処理回路。
The signal processing circuit according to claim 1, wherein the encryption-related processing unit performs encryption-related processing using DES (Data Encryption Standard).
IC(Integrated Circuit)チップで構成される
ことを特徴とする請求項1に記載の信号処理回路。
The signal processing circuit according to claim 1, comprising an IC (Integrated Circuit) chip.
一方の論理レベルに対して、HiLoの信号ビットを割り当て、他方の論理レベルに対して、LoHiの信号ビットを割り当てる割り当て手段をさらに備える
ことを特徴とする請求項1に記載の信号処理回路。
The signal processing circuit according to claim 1, further comprising an assigning unit that assigns a HiLo signal bit to one logic level and assigns a LoHi signal bit to the other logic level.
暗号化に関連する暗号関連処理を行う信号処理回路の信号処理方法において、
1ビットの論理ビットが表す2つの論理レベルのうちの一方の論理レベルに対して、LoとHiとが同数の信号ビットが割り当てられ、他方の論理レベルに対して、前記一方の論理レベルに割り当てられた信号ビットとはLoとHiの順列が異なる信号ビットが割り当てられた信号を用いて暗号関連処理を行う暗号関連処理ステップを含む
ことを特徴とする信号処理方法。
In a signal processing method of a signal processing circuit that performs encryption-related processing related to encryption,
The same number of signal bits Lo and Hi are assigned to one of the two logic levels represented by one logic bit, and the one logic level is assigned to the other logic level. A signal processing method comprising: a cryptographic related processing step for performing cryptographic related processing using a signal to which a signal bit having a different permutation of Lo and Hi is assigned.
JP2004070481A 2004-03-12 2004-03-12 Signal processing circuit and method Expired - Fee Related JP4565314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004070481A JP4565314B2 (en) 2004-03-12 2004-03-12 Signal processing circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004070481A JP4565314B2 (en) 2004-03-12 2004-03-12 Signal processing circuit and method

Publications (2)

Publication Number Publication Date
JP2005260652A true JP2005260652A (en) 2005-09-22
JP4565314B2 JP4565314B2 (en) 2010-10-20

Family

ID=35085944

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004070481A Expired - Fee Related JP4565314B2 (en) 2004-03-12 2004-03-12 Signal processing circuit and method

Country Status (1)

Country Link
JP (1) JP4565314B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006229485A (en) * 2005-02-16 2006-08-31 Sony Corp Circuit and method for signal processing
JP2014153552A (en) * 2013-02-08 2014-08-25 Nec Corp Cipher processing unit, cipher processing method and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165375A (en) * 1998-11-30 2000-06-16 Hitachi Ltd Information processor and ic card
JP2001222571A (en) * 2000-02-14 2001-08-17 Matsushita Electric Ind Co Ltd Method for designing and verifying lsi
JP2002311826A (en) * 2001-04-16 2002-10-25 Hitachi Ltd Encoding and decoding device, method for encoding and decoding, data enciphering method and ic card
JP2003018143A (en) * 2001-06-28 2003-01-17 Mitsubishi Electric Corp Information processor
JP2004038318A (en) * 2002-06-28 2004-02-05 Toshiba Corp Register circuit and encryption arithmetic circuit using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165375A (en) * 1998-11-30 2000-06-16 Hitachi Ltd Information processor and ic card
JP2001222571A (en) * 2000-02-14 2001-08-17 Matsushita Electric Ind Co Ltd Method for designing and verifying lsi
JP2002311826A (en) * 2001-04-16 2002-10-25 Hitachi Ltd Encoding and decoding device, method for encoding and decoding, data enciphering method and ic card
JP2003018143A (en) * 2001-06-28 2003-01-17 Mitsubishi Electric Corp Information processor
JP2004038318A (en) * 2002-06-28 2004-02-05 Toshiba Corp Register circuit and encryption arithmetic circuit using the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006229485A (en) * 2005-02-16 2006-08-31 Sony Corp Circuit and method for signal processing
JP4529719B2 (en) * 2005-02-16 2010-08-25 ソニー株式会社 Signal processing circuit
JP2014153552A (en) * 2013-02-08 2014-08-25 Nec Corp Cipher processing unit, cipher processing method and program

Also Published As

Publication number Publication date
JP4565314B2 (en) 2010-10-20

Similar Documents

Publication Publication Date Title
US8855298B2 (en) Table lookup operation on masked data
JP3029381B2 (en) Data converter
US7659837B2 (en) Operation processing apparatus, operation processing control method, and computer program
US8428251B2 (en) System and method for stream/block cipher with internal random states
JP4936996B2 (en) Nonlinear data converter, encryption device, and decryption device
US9503256B2 (en) SMS4 acceleration hardware
KR20090094086A (en) Encryption device, encryption method, and computer program
RU2449482C2 (en) Encryption processing device, encryption processing method and computer programme
EP2190143A1 (en) Cryptographic processing apparatus with improved resistance to power analysis
WO2009087972A1 (en) Data transmission device, data reception device, methods therefor, recording medium, and data communication system therefor
KR101566408B1 (en) Conversion circuit and method between boolean and arithmetic masks
JP5682526B2 (en) Data processing apparatus, data processing method, and program
MX2011001228A (en) Method for generating a cipher-based message authentication code.
JP5164154B2 (en) Circuit configuration for encoding or decoding processing with error detection function
JP4529719B2 (en) Signal processing circuit
JP4565314B2 (en) Signal processing circuit and method
US20050002523A1 (en) Method and apparatus for mapping an input value to be mapped to an encrypted mapped output value
JP5541277B2 (en) Data processing apparatus and data processing method
US8335313B2 (en) Encryption device, encryption method and storage medium storing its program
KR100456599B1 (en) Cryptographic apparatus with parallel des structure
US8204219B2 (en) Cryptographic method and apparatus for enhancing computation performance of a central processing unit
JP2006025366A (en) Encryption apparatus and semiconductor integrated circuit
Manojkumar et al. AES Algorithm for the Next Generation of 5G Network Encryption Standards
JP2008046151A (en) Encryption processing method
JP2007333854A (en) Random number generation circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100513

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100621

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100708

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100721

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130813

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees