JP2005077517A - Encryption/decryption device and encryption/decryption method - Google Patents
Encryption/decryption device and encryption/decryption method Download PDFInfo
- Publication number
- JP2005077517A JP2005077517A JP2003305140A JP2003305140A JP2005077517A JP 2005077517 A JP2005077517 A JP 2005077517A JP 2003305140 A JP2003305140 A JP 2003305140A JP 2003305140 A JP2003305140 A JP 2003305140A JP 2005077517 A JP2005077517 A JP 2005077517A
- Authority
- JP
- Japan
- Prior art keywords
- data
- key
- data conversion
- round
- encryption
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は暗号化/復号化装置及び暗号化/復号化方法に係り、特に、繰り返し演算及びそれに用いられるキー展開を行う暗号化/復号化装置及び暗号化/復号化方法に関する。 The present invention relates to an encryption / decryption device and an encryption / decryption method, and more particularly, to an encryption / decryption device and an encryption / decryption method that perform repetitive calculation and key expansion used therefor.
次世代標準暗号化方式(AES)として、ラインデールブロック暗号化(Rijndael block cipher)方式が採用された。 The Rijndael block cipher method was adopted as the next generation standard encryption method (AES).
図6はラインデールブロック暗号化方式の概略説明図を示す。 FIG. 6 is a schematic explanatory diagram of the Linedale block encryption method.
ラインデールブロック暗号化方式は、サブバイト(byte substitution)処理S1、シフトロー処理S2、ミックスカラム処理S3、ラウンドキー加算処理S4から構成される。 The Linedale block encryption method includes a sub-byte (byte substitution) process S1, a shift row process S2, a mix column process S3, and a round key addition process S4.
図7はサブバイト処理S1の動作説明図を示す。 FIG. 7 is a diagram for explaining the operation of the sub-byte process S1.
サブバイト処理S1は、非線形のバイト置換処理であり、各配列要素のバイトを異なる値に変換する処理である。ラインデールブロック暗号化方式においては、バイトサブ処理での変換はガロア規定多項式の逆元をアフィン変換するものである。 The sub-byte process S1 is a non-linear byte replacement process and is a process for converting the bytes of each array element into different values. In the Linedale block encryption method, the conversion in the byte sub-process is an affine transformation of the inverse element of the Galois prescription polynomial.
ガロア規定多項式は、1バイト、8ビットb0〜b7からなる入力データでは、
b7*X^7+b6*X^6+b5*X^5+b4*X^4+b3*X^3+b2*X^2+b1*X+b0
で規定される。
Galois prescription polynomial is 1 byte, 8 bits b0-b7 input data,
b7 * X ^ 7 + b6 * X ^ 6 + b5 * X ^ 5 + b4 * X ^ 4 + b3 * X ^ 3 + b2 * X ^ 2 + b1 * X + b0
It is prescribed by.
サブバイト処理S1は、例えば、 The sub-byte processing S1 is, for example,
サブバイト処理S1では、例えば、図6に示すように変換テーブルs−boxにより6列4行の配列の各要素a0,0〜ai,j〜a3,5は、それに対応する6列4行の配列の要素b0,0〜bi,j〜b3,5に変換される。6列4行の配列の要素b0,0〜bi,j〜b3,5がサブバイト処理S1の処理結果として出力される。 In the subbyte processing S1, for example, as shown in FIG. 6, each element a0,0 to ai, j to a3,5 of the array of 6 columns and 4 rows is converted into 6 columns and 4 rows corresponding to the conversion table s-box. Converted to array elements b0,0 to bi, j to b3,5. The elements b0,0 to bi, j to b3,5 of the array of 6 columns and 4 rows are output as the processing result of the subbyte processing S1.
サブバイト処理S1の出力は、次にシフトロー処理S2で列のシフトが行われる。 The output of the sub-byte processing S1 is next subjected to column shifting in shift row processing S2.
図8はシフトロー処理S2の動作説明図を示す。 FIG. 8 is a diagram for explaining the operation of the shift row process S2.
シフトロー処理S2は、例えば、図7に示すように第1列C0はシフトさせず、第2列C1を矢印A方向に「1」ビットシフトさせ、第3列C2を矢印A方向に「2」ビットシフトさせ、第4列C3を矢印A方向に「3」ビットシフトさせる。 In the shift row processing S2, for example, as shown in FIG. 7, the first column C0 is not shifted, the second column C1 is shifted by "1" bits in the direction of arrow A, and the third column C2 is shifted by "2" in the direction of arrow A. The fourth column C3 is shifted in the direction of arrow A by “3” bits.
なお、図8では、1行が6ビット構成の場合について説明したが、1行が4ビット構成の場合には、図8と同様に第1列C0はシフトさせず、第2列C1を矢印A方向に「1」ビットシフト、第3列C2を矢印A方向に「2」ビットシフト、第4列C3を矢印A方向に「3」ビットシフトさせる。また、1行が8ビット構成の場合には、第1列C0はシフトさせず、第2列C1を矢印A方向に「1」ビットシフト、第3列C2を矢印A方向に「2」ビットシフト、第4列C3を矢印A方向に「4」ビットシフトさせる。 In FIG. 8, the case where one row has a 6-bit configuration has been described. However, when one row has a 4-bit configuration, the first column C0 is not shifted as in FIG. “1” bit shift in the A direction, the third column C2 is shifted by “2” bit in the arrow A direction, and the fourth column C3 is shifted by “3” bit in the arrow A direction. If one row has an 8-bit configuration, the first column C0 is not shifted, the second column C1 is shifted by "1" bits in the direction of arrow A, and the third column C2 is "2" bits in the direction of arrow A. Shift the fourth column C3 by “4” bits in the direction of arrow A.
シフトロー処理S2の出力は、次にミックスカラム処理S3により配列要素が行方向にミックスされる。 As for the output of the shift row process S2, the array elements are then mixed in the row direction by the mix column process S3.
図9はミックスカラム処理S3の動作説明図を示す。 FIG. 9 is an operation explanatory diagram of the mix column process S3.
ミックスカラム処理S3は、入力多項式a(x)、出力多項式b(x)、固定多項式c(x)としたとき、 When the mix column processing S3 is an input polynomial a (x), an output polynomial b (x), and a fixed polynomial c (x),
このとき、多項式c(x)は、 At this time, the polynomial c (x) is
式(3)から式(2)を4行のマトリクスで表示すると、 When Expression (3) to Expression (2) are displayed in a matrix of 4 rows,
式(4)により図9に示すように第j行の配列要素a0,j、a1,j、a2,j、a3,jは、第j行の配列要素a0,j、a1,j、a2,j、a3,jがミックスされた配列要素b0,j、b1,j、b2,j、b3,jに変換される。なお、配列要素b0,j、b1,j、b2,j、b3,jは、第j行の配列要素として配列される。 As shown in FIG. 9 according to equation (4), the array elements a0, j, a1, j, a2, j, a3, j in the j-th row are the array elements a0, j, a1, j, a2, in the j-th row. j, a3, and j are converted into array elements b0, j, b1, j, b2, j, and b3, j mixed. The array elements b0, j, b1, j, b2, j, b3, j are arranged as array elements on the jth row.
ミックスロー処理S3の出力は、次にラウンドキー加算処理S4でラウンドキーと加算される。 The output of the mix low process S3 is then added to the round key in a round key addition process S4.
図10はラウンドキー加算処理S4の動作説明図を示す。 FIG. 10 is a diagram for explaining the operation of the round key addition process S4.
ラウンドキー加算処理S4は、ミックスロー処理S3の出力a0,0〜a3,5と、予め決められたキースケジュールに従って生成されたラウンドキーk0,0〜k3,5との排他的論理和EXORを取る処理である。ラウンドキー加算処理S4により得られるミックスロー処理S3の出力a0,0〜a3,5とラウンドキーk0,0〜k3,5との排他的論理和の結果b0,0〜b3,5がラウンドキー加算処理S4の処理結果として出力される。 The round key addition process S4 takes an exclusive OR EXOR of the outputs a0,0 to a3,5 of the mix law process S3 and the round keys k0,0 to k3,5 generated according to a predetermined key schedule. It is processing. The result b0,0 to b3,5 of the exclusive OR of the outputs a0,0 to a3,5 of the mixrow processing S3 obtained by the round key addition processing S4 and the round keys k0,0 to k3,5 is the round key addition. It is output as the processing result of processing S4.
上記のサブバイト処理S1、シフトロー処理S2、ミックスカラム処理S3、ラウンドキー加算処理S4が所定ラウンド行われ、入力データが暗号化される。 The sub-byte processing S1, shift row processing S2, mix column processing S3, and round key addition processing S4 are performed for a predetermined round, and the input data is encrypted.
このとき、ラウンドキーは、キースケジュールにより暗号化キーに基づいて生成される。キースケジュールは、キー展開処理及びラウンドキー選択処理を含む構成とされている。 At this time, the round key is generated based on the encryption key according to the key schedule. The key schedule includes a key expansion process and a round key selection process.
キー展開処理により展開されるキーは、例えば、4バイトのワードを線形配列したものである。
起動時には、暗号化キーであり、s−boxを通すことによって、ラウンドキーが生成される。また、次回のラウンドキーは、前回のラウンドキーをs−boxに通すことにより生成される。
The key expanded by the key expansion process is, for example, a linear array of 4-byte words.
At startup, it is an encryption key, and a round key is generated by passing through an s-box. The next round key is generated by passing the previous round key through the s-box.
ラウンドキー選択処理では、キー展開処理により生成されたラウンドキーをラウンドキー加算処理S4のラウンドキーとして選択する。(非特許文献1参照)
本発明は、高速で、効率よく実装できる暗号化/復号化装置及び暗号化/復号化方法を提供することを目的とする。 An object of the present invention is to provide an encryption / decryption device and an encryption / decryption method that can be implemented efficiently at high speed.
本発明は、データ変換テーブルによりデータを変換するデータ変換手段(13−1〜13−4)と、変換されたデータとキーとを演算する処理手段(11、14)と、キーを記憶するキーレジスタ(15)とを有し、データ変換手段(13−1〜13−4)によるデータ変換及び処理手段(11、14)による演算処理を複数ラウンド繰り返すことにより、データの暗号化/復号化を行う暗号化/復号化装置(1)であって、処理手段(11、14)によるデータ処理時、データ変換手段(13−1〜13−4)に発生する空時間に、データ変換手段(13−1〜13−4)を利用して、キーレジスタ(15)に記憶されたキーを更新させる制御手段(16)を有することを特徴とする。 The present invention provides data conversion means (13-1 to 13-4) for converting data using a data conversion table, processing means (11, 14) for calculating converted data and keys, and keys for storing the keys. A register (15), and the data conversion by the data conversion means (13-1 to 13-4) and the arithmetic processing by the processing means (11, 14) are repeated a plurality of rounds to encrypt / decrypt the data. An encryption / decryption device (1) for performing data conversion means (13) in the free time generated in the data conversion means (13-1 to 13-4) during data processing by the processing means (11, 14). The control means (16) for updating the key stored in the key register (15) using -1 to 13-4) is provided.
また、本発明は、データ変換手段(13−1〜13−4)により、所定期間毎にデータを構成するブロックデータを行毎に変換し、制御手段(16)により、ラウンド毎の最終クロックでデータ変換手段(13−1〜13−4)にキーを構成するキーデータを入力し、ラウンド毎の最初のクロックでデータ変換手段(13−1〜13−4)からキーデータを変換したキーレジスタ(15)の取り込むことを特徴とする。 Further, according to the present invention, the data conversion means (13-1 to 13-4) converts the block data constituting the data for each predetermined period for each row, and the control means (16) uses the final clock for each round. A key register in which key data constituting a key is input to the data conversion means (13-1 to 13-4), and the key data is converted from the data conversion means (13-1 to 13-4) by the first clock for each round. (15) is taken in.
さらに、本発明は、データ変換手段(13−1〜13−4)により、データ変換テーブルが記憶された不揮発性メモリから構成されたことを特徴とする。 Further, the present invention is characterized in that the data conversion means (13-1 to 13-4) is constituted by a nonvolatile memory in which a data conversion table is stored.
また、本発明は、同一データ構成のデータ変換テーブル(13−1〜13−4)を列毎に設けたことを特徴とする。 Further, the present invention is characterized in that data conversion tables (13-1 to 13-4) having the same data configuration are provided for each column.
本発明によれば、各ラウンドの境界に生じる繰り返し演算の空時間を利用して、鍵展開処理を行うことにより、各ラウンドに鍵展開処理のためのタイミングを設ける必要がないので、鍵展開処理の期間を短縮でき、高速、かつ、効率的に暗号化を行える。 According to the present invention, it is not necessary to provide a timing for the key expansion process in each round by performing the key expansion process using the empty time of the repetitive calculation occurring at the boundary of each round. Encryption period can be shortened, and encryption can be performed efficiently at high speed.
図1は本発明の一実施例のブロック構成図を示す。 FIG. 1 shows a block diagram of an embodiment of the present invention.
本実施例の暗号化/復号化装置1は、ラウンドキー加算部11、入力選択部12、s−box13−1〜13−4、シフトロー/ミックスカラム処理部14、ラウンドキーレジスタ15、コントローラ16、ラウンドカウンタ17から構成されている。
The encryption /
ラウンドキー加算部11には、入力ポートPin1から入力データが供給され、シフトロー/ミックスカラム処理部14からシフトロー処理及びミックスカラム処理されたデータが供給されるとともに、ラウンドキーレジスタ15からラウンドキーが供給される。ラウンドキー加算部11は、コントローラ16からの指令に基づいて入力ポートPin1からのデータ又は、シフトロー/ミックスカラム処理部14からのデータとラウンドキーレジスタ15からのラウンドキーとの排他的論理和を算出し、出力ポートPoutから出力する。
The
入力選択部12には、ラウンドキー加算部11から出力データが供給されるとともに、ラウンドキーレジスタ15からラウンドキーが供給される。入力選択部12は、コントローラ16からの指令に基づいてラウンドキー加算部11からの出力データ又は、ラウンドキーレジスタ15からのラウンドキーを選択的に出力する。入力選択部12で選択されたデータは、s−box13−1〜13−4に供給される。
The
s−box13−1は、例えば、ROM(read only memory)から構成されている。s−box13−1を構成するROMには、データ変換テーブルが格納されており、コントローラ16からの指令に基づいて入力選択部12により選択されたデータに応じた出力データを出力する。s−box13−1に格納されたデータ変換テーブルには、予め決められたパターンの数字列が格納されている。入力データはs−box13−1を通ることにより入力データとは関連しないデータに変換される。
The s-box 13-1 is composed of, for example, a ROM (read only memory). The ROM constituting the s-box 13-1 stores a data conversion table, and outputs output data corresponding to the data selected by the
なお、s−box13−2〜13−4は、s−box13−1と同じ構成であり、同じデータ変換が行われる。s−box13−1〜13−4により4列のデータを同時に変換できる。s−box13−1〜13−4で4列のデータを4行分変換することにより4行×4列のマトリクス状のデータをデータ変換することが可能となる。 The s-boxes 13-2 to 13-4 have the same configuration as the s-box 13-1, and the same data conversion is performed. Four columns of data can be converted simultaneously by s-boxes 13-1 to 13-4. By converting four columns of data into four rows by the s-boxes 13-1 to 13-4, it is possible to convert the data in a matrix of 4 rows × 4 columns.
s−box13−1〜s−box13−4を構成するROMは、1クロックでデータを入力し、次の1クロックで変換データを出力するので、データを入力して、変換データを得るために2クロック必要となる。s−box13−1〜13−4で変換されたデータはコントローラ16からの指令に基づいてシフトロー/ミックスカラム処理部14及びラウンドキーレジスタ15に供給される。
Since the ROM constituting the s-box 13-1 to s-box 13-4 inputs data at one clock and outputs conversion data at the next one clock, 2 is used to input the data and obtain conversion data. A clock is required. The data converted by the s-boxes 13-1 to 13-4 is supplied to the shift row / mix
シフトロー/ミックスカラム処理部14は、コントローラ14からの指令に基づいてs−box13−1〜13−4により変換されたデータを取り込み、コントローラ14からの指令に基づいてシフトロー処理及び、ミックスカラム処理を行う。シフトロー/ミックスカラム処理部14の出力データは、ラウンドキー加算部11に供給される。
The shift row / mix
ラウンドキーレジスタ15は、コントローラ14からの指令に基づいてs−box13−1〜13−4からのデータを格納する。ラウンドキーレジスタ15に記憶されたラウンドキーは、コントローラ16からの指令に基づいてラウンドキー加算部11及び入力選択部12に供給される。
The round
コントローラ16には、コントロールポートPcから暗号化の指示を行うためのコントロールデータが供給される。また、コントローラ16には、ラウンドカウンタ17が接続されている。
The
ここで、コントローラ16の動作を図面とともに説明する。
Here, the operation of the
図2は本発明の一実施例のコントローラ16による演算処理の処理フローチャートを示す。
FIG. 2 shows a processing flowchart of arithmetic processing by the
コントローラ16は、暗号化が指示されると、まず、ステップS1−1でラウンドカウンタ17を「0」にリセットする。コントローラ16は、次に、ステップS1−2で入力ポートPin1から入力データをラウンドキー加算部11に取り込み、ラウンドキー加算部11でマトリクス状に配列する。
When encryption is instructed, the
次にコントローラ16は、ステップS1−3で、ラウンドキー加算部11でラウンドキーレジスタ15からラウンドキーを取り込み、入力データとの排他的論理和を算出し、出力ポートPoutに出力する。
Next, in step S1-3, the
次に、コントローラ16は、ステップS1−4で、ラウンドカウンタ17をインクリメントする。次に、コントローラ16は、ステップS1−5で、入力選択部12を制御して、ラウンドキー加算部11からのデータを選択し、s−box13−1〜13−4に供給する。入力選択部12で選択されたデータは、s−box13−1〜13−4を通して、サブバイト処理される。サブバイト処理は、図5、図6に示すサブバイト処理S1に相当する処理である。s−box13−1〜13−4で、サブバイト処理されたデータは、シフトロー/ミックスカラム処理部14に供給される。
Next, the
コントローラ16は、ステップS1−6でシフトロー/ミックスカラム処理部14を制御して、シフトロー処理を行う。ここでのシフトロー処理は、図6、図8に示すシフトロー処理S2に相当する処理である。
In step S1-6, the
次に、コントローラ16は、ステップS1−7で、ラウンドカウンタ12のカウント値Rnを参照して、ラウンドカウンタ17のカウント値Rnが所定ラウンドの回数Rcになったか否かを判定する。
Next, in step S1-7, the
なお、ラウンド数Rcは、データのブロックサイズ及び暗号化キー及びラウンドキーのキーサイズによって予め決められている。例えば、ブロックサイズが128ビット、キーサイズ128ビットでラウンド数Rcは「10」、ブロックサイズが128ビット、キーサイズ192ビットでラウンド数Rcは「12」、ブロックサイズが128ビット、キーサイズ256ビットでラウンド数Rcは「14」、また、ブロックサイズが192ビット、キーサイズ128ビットでラウンド数Rcは「12」、ブロックサイズが192ビット、キーサイズ192ビットでラウンド数Rcは「12」、ブロックサイズが192ビット、キーサイズ256ビットでラウンド数Rcは「14」、さらに、ブロックサイズが256ビット、キーサイズ128ビットでラウンド数Rcは「14」、ブロックサイズが256ビット、キーサイズ192ビットでラウンド数Rcは「14」、ブロックサイズが256ビット、キーサイズ256ビットでラウンド数Rcは「14」に決められている。 The round number Rc is determined in advance by the data block size, the encryption key, and the key size of the round key. For example, the block size is 128 bits, the key size is 128 bits, the round number Rc is “10”, the block size is 128 bits, the key size is 192 bits, the round number Rc is “12”, the block size is 128 bits, and the key size is 256 bits. The round number Rc is “14”, the block size is 192 bits, the key size is 128 bits, the round number Rc is “12”, the block size is 192 bits, the key size is 192 bits, and the round number Rc is “12”. The size is 192 bits, the key size is 256 bits, the round number Rc is “14”, the block size is 256 bits, the key size is 128 bits, the round number Rc is “14”, the block size is 256 bits, and the key size is 192 bits. Round number Rc is "14", block size 256 bit, round number Rc in the key size of 256 bits are determined to "14".
コントローラ16は、ステップS1−7で、ラウンドカウンタ17のカウント値Rnが所定ラウンドの回数Rcに達していなければ、ステップS1−8でシフトロー/ミックスカラム処理部14を制御して、ミックスカラム処理を行う。なお、ここでの、ミックスカラム処理は、図6、図9に示すミックスカラム処理S3に相当する処理である。
If the count value Rn of the
コントローラ16は、ステップS1−3〜S1−8をラウンドカウンタ12のカウント値Rnが所定のラウンド数Rc繰り返す。コントローラ16は、ステップS1−7でラウンドカウンタ17のカウント値Rnが所定のラウンド数Rcになると、ステップS1−9で、ラウンドキーレジスタ15に記憶されたラウンドキーとシフトロー/ミックスカラム処理部14からのデータとの排他的論理和を算出し、出力ポートPoutから出力する。ステップS1−9で出力ポートPoutから出力されたデータが暗号化/復号化されたデータとして用いられる。
The
次に、コントローラ16によるキースケジュール処理について図面とともに説明を行う。
Next, key schedule processing by the
図3は本発明の一実施例のコントローラ16によるキースケジュール処理の処理フローチャートを示す。
FIG. 3 shows a process flowchart of the key schedule process by the
コントローラ16は、キースケジュール処理においては、暗号化が指示されると、ステップS2−1で入力ポートPin2から暗号化キーをラウンドキーレジスタ15に取り込む。次に、コントローラ16は、ステップS2−2で、各ラウンドの第4クロック、すなわち、ラウンドの最終クロックになったか否かを監視しており、ステップS2−2で第4クロックになると、ステップS2−3で入力選択部12を制御して、s−box13−1〜13−4への入力として、ラウンドキーレジスタ15に格納されたラウンドキーデータを選択し、s−box13−1〜13−4を通して、再びラウンドキーレジスタ15に戻すことにより、ラウンドキーの展開処理を行う。
In the key schedule process, when encryption is instructed, the
次に、コントローラ16は、ステップS1−11で、入力選択部12を制御して、ラウンドキーレジスタ15の出力を選択し、s−box13−1〜13−4を通して、再びラウンドキーレジスタ15に戻すことにより、ラウンドキーの展開処理を行う。次にコントローラ16は、ステップS1−5に戻り、ステップS1−11で再度展開されたラウンドキーとデータとの排他的論理和を算出し、出力ポートPoutから出力する。
入力選択部12を制御して、ラウンドキーレジスタ15の出力を選択し、s−box13−1〜13−4を通して、再びラウンドキーレジスタ15に戻すことにより、ラウンドキーの展開処理を行う。
Next, in step S1-11, the
The
コントローラ16は、ステップS2−4でラウンドの最初のクロックである第1クロックを検出すると、ステップS2−5で入力選択部12を制御して、s−box13−1〜13−4への入力として、ラウンドキー加算部11の出力データを選択するとともに、ステップS2−6でs−box13−1〜13−4の出力データをキーデータとしてラウンドキーレジスタ15に取り込む。
When the
コントローラ16は、ステップS2−7でラウンドカウンタ17のカウント値Rnが所定のカウント値Rcかにより、最終ラウンドか否かを判定する。コントローラ16は、ステップS2−7での判定結果が最終ラウンドでない場合には、ステップS2−2に戻ってキー展開処理を続行し、ステップS2−7で判定結果が最終ラウンドの場合には、キースケジュール処理を終了する。
In step S2-7, the
以上により、s−box13−1〜13−4へのデータ入力がなくなる、ラウンドの最終クロックでs−box13−1〜13−4にラウンドキーレジスタ15からラウンドキーデータを入力し、s−box13−1〜13−4からのデータ出力がなくなる、ラウンドの最初のクロックでs−box13−1〜13−4からラウンドキーデータを変換した変換データをラウンドキーレジスタ15に供給できる。
As described above, there is no data input to the s-boxes 13-1 to 13-4. The round key data is input from the round
次に、暗号化装置1の動作を、タイミングチャートを用いて説明する。
Next, operation | movement of the
図4は本発明の一実施例のラウンド開始時のタイミングチャート、図5は本発明の一実施例のラウンド終了時のタイミングチャートを示す。図4、図5において、第1列はs−box13−1〜13−4へのデータ入力のタイミング、第2列はs−box13−1〜13−4からのデータ入力のタイミング、第3列はラウンドカウンタ17のカウント値Rn、第4列、第7列〜第9列はラウンドキーの状態、第5列はキーレジスタ15の状態、第10列〜第12列は次のキーの状態、第13列〜第16列はs−box13−1〜13−4への入力データ、第17列〜第20列はs−box13−1〜13−4からの出力データの状態を示す。また、第1列、第2列の1行が1クロックの期間を示す。
FIG. 4 is a timing chart at the start of a round according to an embodiment of the present invention, and FIG. 5 is a timing chart at the end of a round according to an embodiment of the present invention. 4 and 5, the first column is the data input timing to the s-boxes 13-1 to 13-4, the second column is the data input timing from the s-boxes 13-1 to 13-4, and the third column Is the count value Rn of the
まず、ラウンド「0」、「1」にかけては、第13列〜第16列に示すようにs−box13−1〜13−4には入力データDinが供給されている。このとき、期間T1では第1列に示すようにs−box13−1〜13−4には、入力データDinの1行目のデータS0が入力される。期間T2では、第2列に示すように1行目のデータS0の変換データがs−box13−1〜13−4から出力されるとともに、第1列に示すように2行目のデータS1がs−box13−1〜13−4に入力される。 First, during rounds “0” and “1”, as shown in the 13th to 16th columns, the input data Din is supplied to the s-boxes 13-1 to 13-4. At this time, as shown in the first column in the period T1, the data S0 of the first row of the input data Din is input to the s-boxes 13-1 to 13-4. In the period T2, the conversion data of the data S0 of the first row is output from the s-boxes 13-1 to 13-4 as shown in the second column, and the data S1 of the second row is output as shown in the first column. It is input to s-box 13-1 to 13-4.
期間T3では、第2列に示すように2行目のデータS1の変換データがs−box13−1〜13−4から出力されるとともに、第1列に示すように3行目のデータS2がs−box13−1〜13−4に入力される。期間T4では、第2列に示すように3行目のデータS2の変換データがs−box13−1〜13−4から出力されるとともに、第1列に示すように4行目のデータS3がs−box13−1〜13−4に入力される。 In the period T3, the conversion data of the data S1 in the second row is output from the s-boxes 13-1 to 13-4 as shown in the second column, and the data S2 in the third row is output as shown in the first column. It is input to s-box 13-1 to 13-4. In the period T4, the conversion data of the data S2 in the third row is output from the s-boxes 13-1 to 13-4 as shown in the second column, and the data S3 in the fourth row is output as shown in the first column. It is input to s-box 13-1 to 13-4.
期間T5では、第2列に示すように4行目のデータS3の変換データがs−box13−1〜13−4から出力される。 In the period T5, as shown in the second column, the converted data of the data S3 in the fourth row is output from the s-boxes 13-1 to 13-4.
以上により入力データDinのサブバイト処理は終了する。サブバイト処理されたデータはシフトロー/ミックスカラム処理部14でシフトロー処理及びミックスカラム処理が行われ、ラウンドキー加算部11でラウンドキー加算処理が行われる。次のラウンド「1」では、地祇のここで、ラウンドキー加算部11の出力データが再びサブバイト処理される。このため、期間T5では、s−box13−1〜13−4に供給すべきデータは存在しない。よって、次の期間T11では、s−box13−1〜13−4からの変換データの出力も存在しないことになる。
This completes the sub-byte processing of the input data Din. The sub-byte processed data is subjected to shift row processing and mix column processing by the shift row / mix
そこで、本実施例では、期間T5、T11を用いてキースケジュールに組み込まれたキー展開処理を実行する。まず、期間T5で、第1列に示すようにs−box13−1〜13−4にラウンドキーレジスタ15に記憶された暗号化キーkを入力し、期間T11で、第2列に示すようにs−box13−1〜13−4から暗号化キーに含まれるデータkを変換した変換キーデータを出力する。s−box13−1〜13−4により変換された変換キーデータは、第6列に示すように期間T11でラウンドキーレジスタ15に供給される。
Therefore, in this embodiment, the key expansion process incorporated in the key schedule is executed using the periods T5 and T11. First, in the period T5, the encryption key k stored in the round
次のラウンドキーレジスタ15に供給されたキーデータは、第5列に示すように期間T12でラウンドキーレジスタ15に含まれ、ラウンドキーレジスタ15からラウンドキーとして出力される。
The key data supplied to the next round
上記動作がラウンド「1」、「2」に跨る期間T15、T21、T22、ラウンド「2」、「3」に跨る期間T25、T31、T32、ラウンド「3」、「4」に跨る期間T35、T41、T42、ラウンド「9」、「10」に跨る期間T95、T101、T102などのラウンドに跨る期間で行われる。 Periods T15, T21, T22 in which the above operation extends over rounds “1” and “2”, periods T25, T31, T32 over rounds “2” and “3”, periods T35 over rounds “3” and “4”, It is performed in periods spanning rounds such as periods T95, T101, and T102 spanning T41, T42, and rounds “9” and “10”.
このようにs−box13−1〜13−4に、ラウンドの跨る期間に発生する空時間を利用してキーの展開処理を行うことにより、ラウンド毎に、キーの展開処理を実行する期間を専用に設定する必要がないので、高速に処理を行うことができる。また、高速化するためにキーの展開処理専用にs−boxを設ける必要がないので、簡単な構成で安価に構成できる。 As described above, the key expansion process is performed for each round by performing the key expansion process on the s-boxes 13-1 to 13-4 by using the empty time that occurs in the period spanning the rounds. Therefore, it is possible to perform processing at high speed. In addition, since it is not necessary to provide an s-box dedicated to the key expansion process for speeding up, it can be configured with a simple configuration at low cost.
1 暗号化/復号化装置
11 ラウンドキー加算部、12 入力選択部、13−1〜13−4 s−box
14 シフトロー/ミックスカラム処理部、15 ラウンドキーレジスタ
16 コントローラ、17 ラウンドカウンタ
DESCRIPTION OF
14 shift row / mix column processing unit, 15 round
Claims (5)
前記処理手段によるデータ処理時、前記データ変換手段に発生する空時間に、前記データ変換手段を利用して、前記キーレジスタに記憶されたキーを更新させる制御手段を有することを特徴とする暗号化/復号化装置装置。 Data conversion means for converting data by a data conversion table, processing means for calculating the converted data and key, and a key register for storing the key, data conversion by the data conversion means and the processing means An encryption / decryption device that encrypts / decrypts the data by repeating the arithmetic processing by a plurality of rounds,
Encryption means comprising: a control means for updating a key stored in the key register by using the data conversion means during an empty time generated in the data conversion means during data processing by the processing means / Decoding device device.
前記制御手段は、前記ラウンド毎の最終クロックで前記データ変換手段に前記キーを構成するキーデータを入力し、前記ラウンド毎の最初のクロックで前記データ変換手段から前記キーデータを変換した前記キーレジスタの取り込むことを特徴とする請求項1記載の暗号化/復号化装置装置。 The data conversion means converts the block data constituting the data for each row for each predetermined period,
The control means inputs the key data constituting the key to the data conversion means at the final clock for each round, and the key register converts the key data from the data conversion means at the first clock for each round The encryption / decryption device according to claim 1, wherein:
前記データ変換手段は、前記データ変換テーブルを前記列毎に有することを特徴とする請求項1乃至3のいずれか一項記載の暗号化/復号化装置装置。 The data is composed of block data in a predetermined column,
4. The encryption / decryption device according to claim 1, wherein the data conversion unit has the data conversion table for each column.
前記処理手順によるデータ処理時、前記データ変換手順に発生する空時間に、前記データ変換手順により前記キーレジスタに記憶されたキーを更新させる制御手順を有することを特徴とする暗号化/復号化方法。 A data conversion procedure for converting data by the data conversion table; and a processing procedure for calculating the converted data and a key stored in the key register. Data conversion by the data conversion procedure and arithmetic processing by the processing procedure Is a method of encrypting the data by repeating a plurality of rounds,
An encryption / decryption method comprising: a control procedure for updating a key stored in the key register by the data conversion procedure in an empty time generated in the data conversion procedure during data processing by the processing procedure .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003305140A JP2005077517A (en) | 2003-08-28 | 2003-08-28 | Encryption/decryption device and encryption/decryption method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003305140A JP2005077517A (en) | 2003-08-28 | 2003-08-28 | Encryption/decryption device and encryption/decryption method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005077517A true JP2005077517A (en) | 2005-03-24 |
Family
ID=34408636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003305140A Pending JP2005077517A (en) | 2003-08-28 | 2003-08-28 | Encryption/decryption device and encryption/decryption method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005077517A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005242366A (en) * | 2004-02-26 | 2005-09-08 | Samsung Electronics Co Ltd | Key scheduler for selectively generating encryption round key and decryption round key corresponding to initial round key having variable key length |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02126322A (en) * | 1988-11-07 | 1990-05-15 | Nec Corp | Information processor |
JPH05110558A (en) * | 1991-10-18 | 1993-04-30 | Toshiba Corp | Cipher processor |
WO2003053001A1 (en) * | 2001-12-18 | 2003-06-26 | Analog Devices, Inc. | Programmable data encryption engine for advanced encryption standard algorithm |
-
2003
- 2003-08-28 JP JP2003305140A patent/JP2005077517A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02126322A (en) * | 1988-11-07 | 1990-05-15 | Nec Corp | Information processor |
JPH05110558A (en) * | 1991-10-18 | 1993-04-30 | Toshiba Corp | Cipher processor |
WO2003053001A1 (en) * | 2001-12-18 | 2003-06-26 | Analog Devices, Inc. | Programmable data encryption engine for advanced encryption standard algorithm |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005242366A (en) * | 2004-02-26 | 2005-09-08 | Samsung Electronics Co Ltd | Key scheduler for selectively generating encryption round key and decryption round key corresponding to initial round key having variable key length |
JP4740611B2 (en) * | 2004-02-26 | 2011-08-03 | 三星電子株式会社 | A key scheduler that selectively generates an encryption round key and a decryption round key corresponding to an initial round key having a variable key length |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4905000B2 (en) | Cryptographic processing apparatus, cryptographic processing method, and computer program | |
US6298136B1 (en) | Cryptographic method and apparatus for non-linearly merging a data block and a key | |
DK1686722T3 (en) | Block encryption device and block encryption method comprising rotation key programming | |
TWI394418B (en) | A cryptographic processing device, a cryptographic processing method, and a non-temporary computer readable recording medium | |
WO2003100751A1 (en) | Data conversion device and data conversion method | |
CN101350714A (en) | Efficient advanced encryption standard (AES) datapath using hybrid RIJNDAEL S-BOX | |
TWI554072B (en) | Methods for customizing a rijndael block cipher | |
Singh et al. | An efficient hardware design and implementation of advanced encryption standard (AES) algorithm | |
JP5296217B2 (en) | Key scheduling apparatus and method | |
JPH10240500A (en) | Random number generator and method, enciphering device and method, decoder and method and stream cipher system | |
JP4098719B2 (en) | Programmable data encryption engine for AES algorithm | |
EP2717511A1 (en) | Method and device for digital data blocks encryption and decryption | |
JP2005513541A6 (en) | Programmable data encryption engine for AES algorithm | |
JP2950485B2 (en) | Stream cipher processor | |
JP2014240921A (en) | Encryption device, encryption processing method and encryption processing program | |
JP6292195B2 (en) | Information processing apparatus and information processing method | |
JP4466641B2 (en) | Cryptographic processing device | |
JP2005077517A (en) | Encryption/decryption device and encryption/decryption method | |
KR100362170B1 (en) | Apparatus of encryption for round key generating and encryption processing | |
JPH0736672A (en) | Random-number generator, communication system using the same and method therefor | |
JP4287397B2 (en) | Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program | |
JP2002139999A (en) | Cryptographic key generating circuit | |
JP5672037B2 (en) | Encryption method, decryption method, encryption device, decryption device, and encryption / decryption system | |
JP5014678B2 (en) | Random number generator | |
JP5020115B2 (en) | Encryption device and decryption device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051216 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080617 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080701 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080901 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20081021 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081215 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20081226 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20090403 |