JP2017207604A - Matrix generator, encryption device, method therefor, and program - Google Patents

Matrix generator, encryption device, method therefor, and program Download PDF

Info

Publication number
JP2017207604A
JP2017207604A JP2016099269A JP2016099269A JP2017207604A JP 2017207604 A JP2017207604 A JP 2017207604A JP 2016099269 A JP2016099269 A JP 2016099269A JP 2016099269 A JP2016099269 A JP 2016099269A JP 2017207604 A JP2017207604 A JP 2017207604A
Authority
JP
Japan
Prior art keywords
ass
determination unit
determined
calculation
branch number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016099269A
Other languages
Japanese (ja)
Inventor
洋介 藤堂
Yosuke Todo
洋介 藤堂
和麻呂 青木
Kazumaro Aoki
和麻呂 青木
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016099269A priority Critical patent/JP2017207604A/en
Publication of JP2017207604A publication Critical patent/JP2017207604A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technique with which it is possible to generate such an n-dimensional binary matrix M of a MixColumns function that the number of minimum Active S-boxes of a 4-stage AES type cryptogram equals a prescribed target value th or greater.SOLUTION: A matrix generator of the present invention comprises: a branch number calculation unit 1 for determining a branch number b of an n-dimensional binary matrix M; a first calculation unit 2 for calculating a value defined for (X, X, etc., X) that can be taken on by all of n entries of Xof which j entries are non-zero, where j=1, 2, and making its minimum value to be AS; a second calculation unit 3 for calculating the sum of Wand Zthat are non-zero for (X, X, etc., X) that can be taken on by all of n entries of Xof which j entries are non-zero, where j=2, 3, and making its minimum value to be ASS; a first determination unit 4 and a second determination unit 5 for making determination on the basis of b, ASand ASS, and determining the value of V; and a third determination unit 6 for outputting M when V equals a prescribed threshold th or greater.SELECTED DRAWING: Figure 1

Description

この発明は、主に情報セキュリティ分野で用いられる暗号に関する。特に、4段AES暗号で用いられるMixColumns行列を生成する技術に関する。   The present invention relates to cryptography mainly used in the information security field. In particular, the present invention relates to a technique for generating a MixColumns matrix used in 4-stage AES encryption.

データを秘匿するためには暗号化技術が有効である。暗号化の方法は共通鍵暗号と公開鍵暗号がある。共通鍵暗号では、暗号作成側と暗号復号側で同一の鍵を用い、この鍵は秘密に管理されている。一方、公開鍵暗号では暗号文作成の鍵と暗号文復号の鍵は異なっており、一方の鍵は公開しても、他の鍵は現実的な時間内に求まらないと広く信じられている。一般的に、暗号化の処理速度の観点からは、共通鍵暗号方式が有利であり、インターネット上の多くの環境で共通鍵暗号が利用されている。   An encryption technique is effective for concealing data. Encryption methods include common key encryption and public key encryption. In the common key encryption, the same key is used on the encryption creation side and the encryption / decryption side, and this key is secretly managed. On the other hand, in public key cryptography, the key for ciphertext creation and the key for ciphertext decryption are different, and it is widely believed that even if one key is made public, the other key is not found within a realistic time Yes. In general, from the viewpoint of the processing speed of encryption, a common key cryptosystem is advantageous, and common key cryptography is used in many environments on the Internet.

高速かつ安全な共通鍵暗号を構成するために、暗号化対象のデータを適当な長さのブロックに分割し、そのブロック毎に暗号化する方法をブロック暗号と呼ぶ。ブロック暗号では、始め、ラウンド関数と呼ばれる暗号装置としては不十分だが、非常に高速に処理できる暗号装置を用意する。次に、ラウンド関数を複数回繰り返し実行することで、ブロック暗号の暗号装置とする。このような暗号の代表例として、AES暗号がある(例えば、非特許文献1参照。)。AESは、8ビットを1セルとした4×4行列を1ブロックとした暗号装置である。そのラウンド関数は下記の4つの関数で構成される。   In order to construct a high-speed and secure common key cipher, a method of dividing data to be encrypted into blocks of an appropriate length and encrypting each block is called a block cipher. In the block cipher, an encryption device called a round function is initially insufficient, but an encryption device capable of processing at a very high speed is prepared. Next, the block function encryption device is obtained by repeatedly executing the round function a plurality of times. A typical example of such encryption is AES encryption (see, for example, Non-Patent Document 1). AES is an encryption device that uses a 4 × 4 matrix with 8 bits as one cell and one block. The round function consists of the following four functions.

SubBytes:各セルの値をS-boxと呼ばれる置換表を用いて別の値に置換する。   SubBytes: Replaces the value of each cell with another value using a replacement table called S-box.

ShiftRows:4×4行列の各行を行番号分ローテーションする。   ShiftRows: Rotate each row of 4x4 matrix by row number.

MixColumns:4×4行列の各列を撹拌装置により撹拌する。   MixColumns: Stir each column of 4x4 matrix with a stirrer.

AddRoundKey:4×4行列で表現された副鍵を排他的論理和する。   AddRoundKey: Exclusively ORs subkeys expressed in a 4x4 matrix.

AESは高い安全性を保有する暗号としてアメリカ国立標準技術研究所(NIST)により米国標準として定められている。   AES is established as a US standard by the National Institute of Standards and Technology (NIST) as a highly secure cipher.

多くの利用実績や解析評価が存在するAES構造は広く議論されており、AESのビット長や行列サイズを一般化した暗号を一般に、AES型暗号と呼ぶ(例えば、非特許文献2参照。)。   The AES structure in which there are many usage records and analysis evaluations is widely discussed, and ciphers that generalize the AES bit length and matrix size are generally called AES ciphers (see, for example, Non-Patent Document 2).

軽量実装に優れたAES 型暗号を構成する場合、MixColumns処理にて2進行列を利用することが優位であることは広く知られている。しかしながら、2進行列がもたらす撹拌性能は、AESがMixColumnsで用いたMDS行列がもたらす撹拌性能と比較して、著しく小さい。したがって、軽量実装に優れたAES型暗号は、安全性を確保するためにラウンド関数の繰り返す回数を多くする必要があり、結果的に、処理速度が低下する可能性があった。   It is widely known that when constructing an AES type cipher excellent in lightweight implementation, it is advantageous to use a two-progress column in MixColumns processing. However, the agitation performance provided by the two progression columns is significantly smaller compared to the agitation performance provided by the MDS matrix that AES used in MixColumns. Therefore, the AES type cipher excellent in lightweight implementation needs to increase the number of times the round function is repeated in order to ensure security, and as a result, the processing speed may be reduced.

AES型暗号の撹拌性能を評価する手段の1つに、4段AES型暗号におけるActive S-boxes数の保証がある。MixColumnsで利用される撹拌行列の撹拌性能を評価する指数としてBranch Number(以下、ブランチナンバーとも言う。)があるが、4段AES型暗号はBranch Numberがbのとき、最小Active S-boxes 数がb2になることが保証されている。2進行列はMDS行列と比較して、Branch Numberが小さくなるため、結果、2進行列を用いたAES 型暗号の撹拌性能は劣化する。例えばn次元MDS行列のBranch Numberはn=4,5,6,7,8に対して、それぞれ5,6,7,8,9となることが知られており、それらを4段AES 型暗号のMixColumnsに利用した場合、最小Active S-boxes数は25、36、49、64、81 となる。一方で、n次元2進行列のBranch Numberはn=4,5,6,7,8に対して、それぞれ最大4,4,4,4,5となることが知られており、それらを4段AES型暗号のMixColumnsに利用した場合、最小Active S-boxes数は16、16、16、16、25となる。以上より、2進行列の利用は、軽量実装の面で有益ではあるが、撹拌性能を著しく劣化させる可能性がある。 One way to evaluate the agitation performance of AES ciphers is to guarantee the number of Active S-boxes in 4-stage AES ciphers. There is a Branch Number (hereinafter also referred to as a branch number) as an index for evaluating the mixing performance of the mixing matrix used in MixColumns. When the Branch Number is b, the minimum number of active S-boxes is 4 b 2 is guaranteed. Since the 2-travel sequence has a smaller Branch Number than the MDS matrix, the agitation performance of the AES cipher using the 2-sequence sequence is degraded. For example, it is known that the Branch Number of an n-dimensional MDS matrix is 5, 6, 7, 8, 9 for n = 4, 5, 6, 7, 8, respectively. When used for MixColumns, the minimum number of active S-boxes is 25, 36, 49, 64, 81. On the other hand, it is known that the Branch Number of n-dimensional two-stage progression is 4,4,4,4,5 at maximum for n = 4,5,6,7,8, respectively. When used for MixColumns with multi-stage AES encryption, the minimum number of active S-boxes is 16, 16, 16, 16, 25. From the above, the use of the two-row sequence is beneficial in terms of lightweight mounting, but may significantly degrade the stirring performance.

Specification for the ADVANCED ENCRYPTION STANDARD (AES). U.S. DEPARTMENT OF COMMERCE/National Institute of Standards and Technology (2001), Federal Information Processing Standards Publication 197Specification for the ADVANCED ENCRYPTION STANDARD (AES) .U.S.DEPARTMENT OF COMMERCE / National Institute of Standards and Technology (2001), Federal Information Processing Standards Publication 197 Jean, J., Naya-Plasencia, M., Peyrin, T.: Improved cryptanalysis of AES-like permutations. J. Cryptology 27(4), pp.772-798, (2014)Jean, J., Naya-Plasencia, M., Peyrin, T .: Improved cryptanalysis of AES-like permutations. J. Cryptology 27 (4), pp.772-798, (2014)

しかしながら、これまで4段AES型暗号の最小Active S-boxes数が所定の目標値th以上になるようなMixColumns関数のn次元2進行列Mを生成する技術は知られていなかった。   However, until now, there has been no known technique for generating an n-dimensional two-way progression M of the MixColumns function such that the minimum number of active S-boxes of the four-stage AES cipher is equal to or greater than a predetermined target value th.

以上を鑑みて、この発明は、4段AES型暗号の最小Active S-boxes数が所定の目標値th以上になるようなMixColumns関数のn次元2進行列Mを生成する行列生成装置、生成された行列Mを用いた暗号装置、これらの方法及びプログラムを提供することを目的とする。   In view of the above, the present invention is a matrix generation device that generates an n-dimensional two-stage progression M of a MixColumns function such that the minimum number of active S-boxes of a 4-stage AES cipher is equal to or greater than a predetermined target value th. Another object of the present invention is to provide an encryption apparatus using the matrix M, and a method and a program thereof.

この発明の一態様による行列生成装置は、n次元2進行列Mを選択し、選択されたMのブランチナンバーbを決定するブランチナンバー計算部と、L,nを所定の1以上の整数とし、i=0,1,…,n-1とし、Xi∈(F2^L)nとし、Yi=MXiとし、(X0,X1,…,Xn-1)に4段AES型暗号における所定のShiftRows関数の逆変換を行った結果を(W0,W1,…,Wn-1)とし、(Y0,Y1,…,Yn-1)にShiftRows関数の変換を行った結果を(Z0,Z1,…,Zn-1)とし、Aを任意のベクトルとし、hw(A)をAの要素の中の非ゼロの要素の数とし、j=1,2として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して以下の式により定義される値を計算して、その最小値をASjとする第一計算部と、 The matrix generation apparatus according to an aspect of the present invention selects an n-dimensional two-way progression M, determines a branch number b of the selected M, and sets L and n as predetermined integers of 1 or more, i = 0,1, ..., n-1, X i ∈ (F 2 ^ L ) n , Y i = MX i, and (X 0 , X 1 , ..., X n-1 ) 4 stage AES (W 0 , W 1 , ..., W n-1 ) as the result of inverse transformation of the predetermined ShiftRows function in type cryptography, and the conversion of the ShiftRows function to (Y 0 , Y 1 , ..., Y n-1 ) (Z 0 , Z 1 , ..., Z n-1 ), A is an arbitrary vector, hw (A) is the number of nonzero elements in the elements of A, and j = 1 , 2, and for all possible non-zero (X 0 , X 1 , ..., X n-1 ) out of n X i , calculate the value defined by , A first calculation unit whose minimum value is AS j ,

Figure 2017207604
Figure 2017207604

j=2,3として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して非ゼロではないWi及びZiの数の和を計算して、その最小値をASSjとする第二計算部と、AS1≦min{b×ASS2,b(b+2)}であるか判定し、AS1≦min{b×ASS2,b(b+2)}であると判定された場合には、V=AS1とする第一判定部と、第一判定部においてAS1≦min{b×ASS2,b(b+2)}でないと判定された場合には、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であるか判定し、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であると判定された場合にはV=min{AS1,AS2}とし、min{AS1,AS2}≦min{b×ASS3,b(b+2)}でないと判定された場合にはV=min{b×ASS3,b(b+2)}とする第二判定部と、Vが所定の閾値th以上であるか判定し、Vが所定の閾値th以上であると判定された場合には、Mを出力する第三判定部と、第三判定部によりMが出力されるまで、ブランチナンバー計算部に選択されたMとは異なるMを選択させ、ブランチナンバー計算部、第一計算部、第二計算部、第一判定部、第二判定部及び第三判定部の処理を繰り返し行わせる制御部と、を備えている。 For j = 2,3, non-zero W i and Z i for all possible (X 0 , X 1 ,..., X n-1 ) where j out of n X i are non-zero sum calculated number of judges and a second calculator for the minimum value ASS j, whether the aS 1 ≦ min {b × ASS 2, b (b + 2)}, aS 1 ≦ min {b × ASS 2, b ( b + 2)} when it is determined that the, V = a first determination unit to aS 1, aS 1 ≦ min { b × ASS 2 in the first determination unit, b (b + 2)}, it is determined whether min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, and min {AS 1 , If it is determined that AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {AS 1 , AS 2 } and min {AS 1 , AS 2 } ≦ min { If it is determined that b × ASS 3 , b (b + 2)} is not satisfied, V = min {b × ASS 3 , b (b + 2)}, and V is a predetermined threshold th If it is determined that V is equal to or greater than the predetermined threshold th, a third determination unit that outputs M and a block until M is output by the third determination unit. Inch number calculation unit selects M different from the selected M, and repeats the processing of branch number calculation unit, first calculation unit, second calculation unit, first determination unit, second determination unit and third determination unit And a control unit to be performed.

4段AES型暗号の最小Active S-boxes数が所定の目標値th以上になるようなMixColumns関数のn次元2進行列Mを生成することができる。   It is possible to generate an n-dimensional two-way progression M of the MixColumns function such that the minimum number of active S-boxes of the 4-stage AES cipher is equal to or greater than a predetermined target value th.

行列生成装置の例を説明するためのブロック図。The block diagram for demonstrating the example of a matrix production | generation apparatus. 行列生成方法の例を説明するための流れ図。The flowchart for demonstrating the example of the matrix production | generation method. 4段AES型暗号の概要の例を示す図。The figure which shows the example of the outline | summary of a 4-step AES type encryption. ラウンド関数計算装置の例を説明するためのブロック図。The block diagram for demonstrating the example of a round function calculation apparatus. ラウンド関数計算方法の例を説明するための流れ図。The flowchart for demonstrating the example of a round function calculation method. 暗号装置の例を説明するためのブロック図。The block diagram for demonstrating the example of an encryption apparatus.

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

[行列生成装置及び方法]
行列生成装置は、ブランチナンバー計算部1、第一計算部2、第二計算部3、第一判定部4、第二判定部5、第三判定部6及び制御部7を例えば備えている。この行列生成装置の各部が、図2に例示するステップS1からステップS7の処理を行うことにより行列生成方法が実現される。
[Matrix generation apparatus and method]
The matrix generation device includes, for example, a branch number calculation unit 1, a first calculation unit 2, a second calculation unit 3, a first determination unit 4, a second determination unit 5, a third determination unit 6, and a control unit 7. Each part of the matrix generation device performs the process from step S1 to step S7 illustrated in FIG. 2 to realize a matrix generation method.

行列生成装置及び方法では、与えられたMに対してASj(j=1,2)及びASSj(j=2,3)を計算する。ASj及びASSjは例えば以下のように定義される。 In the matrix generation apparatus and method, AS j (j = 1, 2) and ASS j (j = 2, 3) are calculated for a given M. AS j and ASS j are defined as follows, for example.

定義1:(ASj)
4段AES型暗号の2段目にあるn個のMixColumnsのうちi番目のMixColumnsの入力をXiとする。4段AES型暗号の概要の例を図3に示す。図3では、nのことをmと表記している。i=0,1,…,n-1とし、Xi∈(F2^L)nとする。XiにMixColumnsを作用した結果をYi=MXiとする。また、(X0,X1,…,Xn-1)に4段AES型暗号における所定のShiftRows関数の逆変換を行った結果を(W0,W1,…,Wn-1)とする。(Y0,Y1,…,Yn-1)に上記ShiftRows関数の変換を行った結果を(Z0,Z1,…,Zn-1)とする。また、Aを任意のベクトルとし、hw(A)をAの要素の中の非ゼロの要素の数とする。
Definition 1: (AS j )
X i is the input of the i-th MixColumns among the n MixColumns in the second stage of the 4-stage AES encryption. An example of the outline of the 4-stage AES encryption is shown in FIG. In FIG. 3, n is expressed as m. Let i = 0,1, ..., n-1 and let X i ∈ (F 2 ^ L ) n . Let Y i = MX i be the result of applying MixColumns to X i . In addition, the result of inverse transformation of a predetermined ShiftRows function in the 4-stage AES type cipher to (X 0 , X 1 ,..., X n-1 ) is expressed as (W 0 , W 1 ,..., W n-1 ). To do. Let (Z 0 , Z 1 ,..., Z n-1 ) be the result of converting the above ShiftRows function to (Y 0 , Y 1 ,..., Y n-1 ). A is an arbitrary vector, and hw (A) is the number of non-zero elements in the elements of A.

n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して以下の式により定義される値を計算して、その最小値をASjとする。 Calculate the value defined by the following formula for all possible (X 0 , X 1 , ..., X n-1 ) where j of n x i are non-zero, and its minimum value Is AS j .

Figure 2017207604
Figure 2017207604

定義2(ASSj)
Wi,Xi,Yi,ZiをASjのときと同様に定義する。n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して非ゼロではないWi及びZiの数の和を計算して、その最小値をASSjとする。
Definition 2 (ASS j )
W i , X i , Y i , and Z i are defined in the same manner as AS j . Compute the sum of the numbers of non-zero W i and Z i for all possible (X 0 , X 1 , ..., X n-1 ) where j out of n X i are non-zero The minimum value is ASS j .

<ブランチナンバー計算部1>
ブランチナンバー計算部1は、n次元2進行列Mを選択し、選択されたMのブランチナンバーbを決定する(ステップS1)。決定されたブランチナンバーbは、第一判定部4及び第二判定部5に出力される。
<Branch number calculation unit 1>
The branch number calculation unit 1 selects the n-dimensional two-way progression M and determines the branch number b of the selected M (Step S1). The determined branch number b is output to the first determination unit 4 and the second determination unit 5.

n次元2進行列Mの選択は、任意に行えばよい。例えば、ブランチナンバー計算部1は、n次元2進行列Mをランダムに選択する。   The selection of the n-dimensional two-stage progression M may be performed arbitrarily. For example, the branch number calculation unit 1 randomly selects the n-dimensional 2-travel sequence M.

ブランチナンバーbは、例えば以下の式により計算することができる。このブランチナンバーbは、例えば、xの総当たりで計算することができる。   The branch number b can be calculated by the following formula, for example. This branch number b can be calculated by, for example, brute force of x.

b=minx≠0(hw(x)+hw(Mx))
ブランチナンバーbについては、参考文献1を参照のこと。
b = min x ≠ 0 (hw (x) + hw (Mx))
See reference 1 for branch number b.

〔参考文献1〕Joan Daemen, "Cipher and Hash Function Design Strategies based on linear and differential cryptanalysis", Katholieke Universiteit Leuven, March 1995   [Reference 1] Joan Daemen, "Cipher and Hash Function Design Strategies based on linear and differential cryptanalysis", Katholieke Universiteit Leuven, March 1995

<第一計算部2>
第一計算部2は、AS1,AS2を計算する(ステップS2)。計算されたAS1は、第一判定部4に出力される。計算されたAS2は、第二判定部5に出力される。
<First calculation unit 2>
The first calculator 2 calculates AS 1 and AS 2 (step S2). The calculated AS 1 is output to the first determination unit 4. The calculated AS 2 is output to the second determination unit 5.

なお、AS2の計算は、第一判定部4においてAS1≦min{b×ASS2,b(b+2)}でないと判定された後に行ってもよい。 The calculation of AS 2 may be performed after the first determination unit 4 determines that AS 1 ≦ min {b × ASS 2 , b (b + 2)} is not satisfied.

<第二計算部3>
第二計算部は、ASS2,ASS3を計算する(ステップS3)。計算されたASS2は、第一判定部4に出力される。計算されたASS3は、第二判定部5に出力される。
<Second calculation unit 3>
The second calculation unit calculates ASS 2 and ASS 3 (step S3). The calculated ASS 2 is output to the first determination unit 4. The calculated ASS 3 is output to the second determination unit 5.

なお、ASS3の計算は、第一判定部4においてAS1≦min{b×ASS2,b(b+2)}でないと判定された後に行ってもよい。 The calculation of ASS 3 may be performed after the first determination unit 4 determines that AS 1 ≦ min {b × ASS 2 , b (b + 2)} is not satisfied.

<第一判定部4>
第一判定部4は、AS1≦min{b×ASS2,b(b+2)}であるか判定し、AS1≦min{b×ASS2,b(b+2)}であると判定された場合には、V=AS1とする(ステップS4)。Vは、第三判定部6に出力される。また、判定結果は、第二判定部5に出力される。
<First determination unit 4>
First determination unit 4 determines whether the AS 1 ≦ min {b × ASS 2, b (b + 2)} , If it is AS 1 ≦ min {b × ASS 2, b (b + 2)} If determined, V = AS 1 (step S4). V is output to the third determination unit 6. The determination result is output to the second determination unit 5.

<第二判定部5>
第二判定部5は、第一判定部4においてAS1≦min{b×ASS2,b(b+2)}でないと判定された場合には、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であるか判定し、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であると判定された場合にはV=min{AS1,AS2}とし、min{AS1,AS2}≦min{b×ASS3,b(b+2)}でないと判定された場合にはV=min{b×ASS3,b(b+2)}とする(ステップS5)。V及び判定結果は、第三判定部6に出力される。
<Second determination unit 5>
When the first determination unit 4 determines that AS 1 ≦ min {b × ASS 2 , b (b + 2)} is not satisfied, the second determination unit 5 min {AS 1 , AS 2 } ≦ min { b × ASS 3 , b (b + 2)}, and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)} V = min {AS 1 , AS 2 } and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {b × ASS 3 , b (b + 2)} (step S5). V and the determination result are output to the third determination unit 6.

<第三判定部6>
第三判定部6は、Vが所定の閾値th以上であるか判定し、Vが所定の閾値th以上であると判定された場合には、上記Mを出力する(ステップS6)。
<Third determination unit 6>
The third determination unit 6 determines whether V is equal to or greater than a predetermined threshold th. If it is determined that V is equal to or greater than the predetermined threshold th, M is output (step S6).

所定の閾値thは、所定の正の整数である。   The predetermined threshold th is a predetermined positive integer.

<制御部7>
制御部7は、第三判定部6によりMが出力されるまで、ブランチナンバー計算部1に上記選択されたMとは異なるMを選択させ、ブランチナンバー計算部1、第一計算部2、第二計算部3、第一判定部4、第二判定部5及び第三判定部6の処理を繰り返し行わせる(ステップS7)。
<Control unit 7>
The control unit 7 causes the branch number calculation unit 1 to select a different M from the selected M until the third determination unit 6 outputs M, and the branch number calculation unit 1, the first calculation unit 2, The processes of the second calculation unit 3, the first determination unit 4, the second determination unit 5, and the third determination unit 6 are repeatedly performed (step S7).

第一判定部4及び第二判定部5により得られるVは、Mに対応する最小Active S-boxesとなる。ここでは、説明の簡略化のため、その証明を省略する。このため、第三判定部6によりVが所定の閾値th以上であると判定された場合には、その場合のMを用いた4段AES型暗号でV以上のActive S-boxes数が保証される。   V obtained by the first determination unit 4 and the second determination unit 5 is the minimum Active S-boxes corresponding to M. Here, the proof is abbreviate | omitted for simplification of description. For this reason, when the third determination unit 6 determines that V is equal to or greater than the predetermined threshold th, the number of Active S-boxes equal to or greater than V is guaranteed by the four-stage AES encryption using M in that case. The

上記の行列生成装置及び方法を用いることで、軽量性と撹拌性能の両方に優れた、2進行列M、言い換えればMixColumnsを構成できるようになる。   By using the matrix generation apparatus and method described above, it is possible to configure two-progress columns M, in other words, MixColumns, which are excellent in both light weight and stirring performance.

[ラウンド関数計算装置及び方法]
上記の行列生成装置及び方法で生成された行列Mにより定まるMixColumnsを用いてラウンド関数計算装置及び方法を構成することができる。
[Round function calculation device and method]
The round function calculation apparatus and method can be configured using MixColumns determined by the matrix M generated by the matrix generation apparatus and method described above.

ラウンド関数計算装置は、図4に示すように、第一計算部10、第二計算部20、第三計算部30及び第四計算部40を例えば備えている。このラウンド関数計算装置の各部が、図5に例示するステップS10からステップS40の処理を行うことによりラウンド関数計算方法が実現される。   As shown in FIG. 4, the round function calculation device includes, for example, a first calculation unit 10, a second calculation unit 20, a third calculation unit 30, and a fourth calculation unit 40. Each part of the round function calculation device performs the processing from step S10 to step S40 illustrated in FIG. 5 to realize the round function calculation method.

<第一計算部10>
第一計算部10は、入力された4行4列の行列に対して、所定の置換表を用いて置換するSubBytes関数の計算を行う(ステップS1)。計算結果は、第二計算部20に出力される。
<First calculation unit 10>
The first calculator 10 calculates a SubBytes function for replacing the input 4 × 4 matrix using a predetermined replacement table (step S1). The calculation result is output to the second calculation unit 20.

入力される4行4列の行列は、ラウンド関数計算装置が用いられるブロック暗号方式及び暗号方式に依存する。   The input 4 × 4 matrix depends on the block encryption method and encryption method used by the round function calculation device.

<第二計算部20>
第二計算部20は、第一計算部1の計算結果に対して、例えば次式で定義されるShiftRowsの変換をするShiftRows関数の計算を行う(ステップS2)。計算結果は、第三計算部30に出力される。
<Second calculation unit 20>
The second calculation unit 20 calculates a ShiftRows function for converting ShiftRows defined by the following equation, for example, on the calculation result of the first calculation unit 1 (step S2). The calculation result is output to the third calculation unit 30.

Figure 2017207604
Figure 2017207604

<第三計算部30>
第三計算部30は、第二計算部2の計算結果に対して、行列生成装置及び方法により生成されたMにより定まるMixColumns関数の計算を行う(ステップS3)。計算結果は、第四計算部4に出力される。
<Third calculation unit 30>
The third calculation unit 30 calculates a MixColumns function determined by M generated by the matrix generation device and method for the calculation result of the second calculation unit 2 (step S3). The calculation result is output to the fourth calculation unit 4.

<第四計算部40>
第四計算部40は、第三計算部30の計算結果に対して、4行4列の所定の副鍵行列との排他的論理を計算するAddRoundKey関数の計算を行う(ステップS4)。
<Fourth calculation unit 40>
The fourth calculation unit 40 calculates an AddRoundKey function for calculating exclusive logic with the predetermined subkey matrix of 4 rows and 4 columns with respect to the calculation result of the third calculation unit 30 (step S4).

4行4列の所定の副鍵行列は、ラウンド関数計算装置が用いられるブロック暗号方式及び暗号方式に依存する。   The predetermined subkey matrix of 4 rows and 4 columns depends on the block encryption method and encryption method in which the round function calculation device is used.

[暗号装置及び方法]
ラウンド関数計算装置及び方法を用いて、暗号装置及び方法を構成することができる。
[Encryption device and method]
The encryption apparatus and method can be configured using the round function calculation apparatus and method.

暗号装置及び方法は、例えば図6に示すように、それぞれラウンド関数計算装置及び方法を含む。暗号装置及び方法は、ラウンド関数計算装置及び方法によるラウンド関数の計算を複数回繰り返し実行することでデータの暗号化又は復号を実行する。   The encryption device and method include a round function calculation device and method, respectively, for example, as shown in FIG. The encryption apparatus and method execute encryption or decryption of data by repeatedly executing round function calculation by the round function calculation apparatus and method a plurality of times.

暗号装置及び方法の詳細は、実装しようとする暗号方式に依存する。例えば、4段AES型暗号方式を用いることができる。   Details of the encryption device and method depend on the encryption method to be implemented. For example, a four-stage AES encryption method can be used.

行列生成装置及び方法により、最小Active S-boxes数が所定の閾値th以上になることが保証される。最小Active S-boxes数が大きくなることで、効率よく安全性保証が可能になり、処理性能の向上が可能となる。   The matrix generation apparatus and method ensure that the minimum number of active S-boxes is equal to or greater than a predetermined threshold th. By increasing the minimum number of active S-boxes, it is possible to guarantee safety efficiently and improve processing performance.

[3] Todo, Y., Aoki, K.: Wide trail design strategy for binary mixcolumns.
In: ACNS (2016)
[3] Todo, Y., Aoki, K .: Wide trail design strategy for binary mixcolumns.
In: ACNS (2016)

[プログラム及び記録媒体]
行列生成装置、ラウンド関数計算装置、暗号装置及び復号装置における各処理をコンピュータによって実現する場合、各装置が有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、その各処理がコンピュータ上で実現される。
[Program and recording medium]
When each process in the matrix generation device, the round function calculation device, the encryption device, and the decryption device is realized by a computer, the processing contents of the functions that each device should have are described by a program. Then, by executing this program on a computer, each process is realized on the computer.

この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。   The program describing the processing contents can be recorded on a computer-readable recording medium. As the computer-readable recording medium, for example, any recording medium such as a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory may be used.

また、各処理手段は、コンピュータ上で所定のプログラムを実行させることにより構成することにしてもよいし、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。   Each processing means may be configured by executing a predetermined program on a computer, or at least a part of these processing contents may be realized by hardware.

[変形例]
また、上記の処理は、記載の順にしたがって時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。
[Modification]
In addition, the above processes are not only executed in time series according to the order of description, but may be executed in parallel or individually as required by the processing capability of the apparatus that executes the processes.

その他、この発明の趣旨を逸脱しない範囲で適宜変更が可能であることはいうまでもない。   Needless to say, other modifications are possible without departing from the spirit of the present invention.

Claims (5)

n次元2進行列Mを選択し、選択されたMのブランチナンバーbを決定するブランチナンバー計算部と、
L,nを所定の1以上の整数とし、i=0,1,…,n-1とし、Xi∈(F2^L)nとし、Yi=MXiとし、(X0,X1,…,Xn-1)に4段AES型暗号における所定のShiftRows関数の逆変換を行った結果を(W0,W1,…,Wn-1)とし、(Y0,Y1,…,Yn-1)に上記ShiftRows関数の変換を行った結果を(Z0,Z1,…,Zn-1)とし、Aを任意のベクトルとし、hw(A)をAの要素の中の非ゼロの要素の数とし、j=1,2として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して以下の式により定義される値を計算して、その最小値をASjとする第一計算部と、
Figure 2017207604

j=2,3として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して非ゼロではないWi及びZiの数の和を計算して、その最小値をASSjとする第二計算部と、
AS1≦min{b×ASS2,b(b+2)}であるか判定し、AS1≦min{b×ASS2,b(b+2)}であると判定された場合には、V=AS1とする第一判定部と、
上記第一判定部においてAS1≦min{b×ASS2,b(b+2)}でないと判定された場合には、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であるか判定し、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であると判定された場合にはV=min{AS1,AS2}とし、min{AS1,AS2}≦min{b×ASS3,b(b+2)}でないと判定された場合にはV=min{b×ASS3,b(b+2)}とする第二判定部と、
上記Vが所定の閾値th以上であるか判定し、上記Vが所定の閾値th以上であると判定された場合には、上記Mを出力する第三判定部と、
上記第三判定部によりMが出力されるまで、上記ブランチナンバー計算部に上記選択されたMとは異なるMを選択させ、上記ブランチナンバー計算部、上記第一計算部、上記第二計算部、上記第一判定部、上記第二判定部及び上記第三判定部の処理を繰り返し行わせる制御部と、
を含む行列生成装置。
a branch number calculator for selecting an n-dimensional two-way progression M and determining a branch number b of the selected M;
Let L, n be a predetermined integer greater than 1, i = 0,1, ..., n-1, X i ∈ (F 2 ^ L ) n , Y i = MX i , (X 0 , X 1 , ..., X n-1 ) is the result of performing the inverse transformation of the predetermined ShiftRows function in the 4-stage AES cipher (W 0 , W 1 , ..., W n-1 ), and (Y 0 , Y 1 , …, Y n-1 ), the result of the above ShiftRows function transformation is (Z 0 , Z 1 , ..., Z n-1 ), A is an arbitrary vector, and hw (A) is the element of A Where j = 1,2 and j out of n X i are all non-zero (X 0 , X 1 , ..., X n-1 ) Calculating a value defined by the following formula and setting the minimum value as AS j ,
Figure 2017207604

For j = 2,3, non-zero W i and Z i for all possible (X 0 , X 1 ,..., X n-1 ) where j out of n X i are non-zero sum calculated number of, and a second calculator for the minimum value ASS j,
If the AS 1 ≦ min {b × ASS 2, b (b + 2)} a either determined, it is determined that the AS 1 ≦ min {b × ASS 2, b (b + 2)} is A first determination unit with V = AS 1 ;
When it is determined that AS 1 ≦ min {b × ASS 2 , b (b + 2)} in the first determination unit, min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b ( b + 2)}, and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {AS 1 , AS 2 } and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {b × ASS 3 , b (b + 2 )} Second determination unit,
It is determined whether the V is equal to or greater than a predetermined threshold th, and if it is determined that the V is equal to or greater than the predetermined threshold th, a third determination unit that outputs the M,
Until the third determination unit outputs M, the branch number calculation unit selects M different from the selected M, the branch number calculation unit, the first calculation unit, the second calculation unit, A control unit that repeatedly performs the processes of the first determination unit, the second determination unit, and the third determination unit;
A matrix generation device including:
請求項1の行列生成装置で出力されたMをMixColumnsとして4段AES型暗号を行う暗号装置。   An encryption device that performs 4-stage AES encryption using M output from the matrix generation device according to claim 1 as MixColumns. ブランチナンバー計算部が、n次元2進行列Mを選択し、選択されたMのブランチナンバーbを決定するブランチナンバー計算ステップと、
第一計算部が、L,nを所定の1以上の整数とし、i=0,1,…,n-1とし、Xi∈(F2^L)nとし、Yi=MXiとし、(X0,X1,…,Xn-1)に4段AES型暗号における所定のShiftRows関数の逆変換を行った結果を(W0,W1,…,Wn-1)とし、(Y0,Y1,…,Yn-1)に上記ShiftRows関数の変換を行った結果を(Z0,Z1,…,Zn-1)とし、Aを任意のベクトルとし、hw(A)をAの要素の中の非ゼロの要素の数とし、j=1,2として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して以下の式により定義される値を計算して、その最小値をASjとする第一計算ステップと、
Figure 2017207604

第二計算部が、j=2,3として、n個のXiのうちj個が非ゼロな全ての取り得る(X0,X1,…,Xn-1)に対して非ゼロではないWi及びZiの数の和を計算して、その最小値をASSjとする第二計算ステップと、
第一判定部が、AS1≦min{b×ASS2,b(b+2)}であるか判定し、AS1≦min{b×ASS2,b(b+2)}であると判定された場合には、V=AS1とする第一判定ステップと、
第二判定部が、上記第一判定ステップにおいてAS1≦min{b×ASS2,b(b+2)}でないと判定された場合には、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であるか判定し、min{AS1,AS2}≦min{b×ASS3,b(b+2)}であると判定された場合にはV=min{AS1,AS2}とし、min{AS1,AS2}≦min{b×ASS3,b(b+2)}でないと判定された場合にはV=min{b×ASS3,b(b+2)}とする第二判定ステップと、
第三判定部が、上記Vが所定の閾値th以上であるか判定し、上記Vが所定の閾値th以上であると判定された場合には、上記Mを出力する第三判定ステップと、
制御部が、上記第三判定ステップによりMが出力されるまで、上記ブランチナンバー計算ステップに上記選択されたMとは異なるMを選択させ、上記ブランチナンバー計算ステップ、上記第一計算ステップ、上記第二計算ステップ、上記第一判定ステップ、上記第二判定ステップ及び上記第三判定ステップの処理を繰り返し行わせる制御ステップと、
を含む行列生成方法。
A branch number calculating unit that selects an n-dimensional two-way progression M and determines a branch number b of the selected M;
The first calculation unit sets L, n to a predetermined integer of 1 or more, i = 0,1, ..., n-1, X i ∈ (F 2 ^ L ) n , Y i = MX i , The result of inverse transformation of a predetermined ShiftRows function in (X 0 , X 1 ,..., X n-1 ) in a 4-stage AES cipher is defined as (W 0 , W 1 ,..., W n-1 ), Y 0 , Y 1 , ..., Y n-1 ), the result of the above ShiftRows function conversion is (Z 0 , Z 1 , ..., Z n-1 ), A is an arbitrary vector, and hw (A ) Is the number of non-zero elements in A, and j = 1,2 and all possible non-zero j out of n X i (X 0 , X 1 , ..., X n-1 ) calculates a value defined by the following formula and sets the minimum value as AS j ,
Figure 2017207604

If the second calculation unit is j = 2,3 and j is non-zero for all of the n X i (X 0 , X 1 , ..., X n-1 ) A second calculation step of calculating the sum of the numbers of W i and Z i not having the minimum value as ASS j ;
Determined that the first determination unit determines whether the AS 1 ≦ min {b × ASS 2, b (b + 2)} , an AS 1 ≦ min {b × ASS 2, b (b + 2)} If so, a first determination step of V = AS 1 ;
When the second determination unit determines that AS 1 ≦ min {b × ASS 2 , b (b + 2)} in the first determination step, min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)} is determined, and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {AS 1 , AS 2 }, and if it is determined that min {AS 1 , AS 2 } ≦ min {b × ASS 3 , b (b + 2)}, V = min {b × ASS 3 , b (b + 2)},
A third determination unit determines whether the V is equal to or greater than a predetermined threshold th, and if it is determined that the V is equal to or greater than the predetermined threshold th, a third determination step of outputting the M;
The control unit causes the branch number calculation step to select M different from the selected M until M is output in the third determination step, and the branch number calculation step, the first calculation step, the first A control step for repeatedly performing two calculation steps, the first determination step, the second determination step, and the third determination step;
A matrix generation method including:
請求項3の行列生成方法で出力されたMをMixColumnsとして4段AES型暗号を行う暗号方法。   An encryption method for performing four-stage AES encryption using M output by the matrix generation method according to claim 3 as MixColumns. 請求項1の行列生成装置又は請求項2の暗号装置の各部としてコンピュータを機能させるためのプログラム。   A program for causing a computer to function as each part of the matrix generation device according to claim 1 or the encryption device according to claim 2.
JP2016099269A 2016-05-18 2016-05-18 Matrix generator, encryption device, method therefor, and program Pending JP2017207604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016099269A JP2017207604A (en) 2016-05-18 2016-05-18 Matrix generator, encryption device, method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016099269A JP2017207604A (en) 2016-05-18 2016-05-18 Matrix generator, encryption device, method therefor, and program

Publications (1)

Publication Number Publication Date
JP2017207604A true JP2017207604A (en) 2017-11-24

Family

ID=60417286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016099269A Pending JP2017207604A (en) 2016-05-18 2016-05-18 Matrix generator, encryption device, method therefor, and program

Country Status (1)

Country Link
JP (1) JP2017207604A (en)

Similar Documents

Publication Publication Date Title
Asgari-Chenaghlu et al. A novel image encryption algorithm based on polynomial combination of chaotic maps and dynamic function generation
Derbez et al. Exhausting Demirci-Selçuk meet-in-the-middle attacks against reduced-round AES
Luo et al. A unified method for finding impossible differentials of block cipher structures
Lambić A novel method of S-box design based on chaotic map and composition method
EP2693684B1 (en) Encryption processing device, encryption processing method, and programme
US9083507B2 (en) Data processing device, data processing method, and program
US8000471B2 (en) Robust cipher design
JPWO2009075337A1 (en) ENCRYPTION METHOD, DECRYPTION METHOD, DEVICE, AND PROGRAM
Tunstall Improved``Partial Sums"-based Square Attack on AES
Jawad et al. Chaotic map-embedded Blowfish algorithm for security enhancement of colour image encryption
Sadeghi et al. Cryptanalysis of reduced QTL block cipher
Collard et al. Improved and multiple linear cryptanalysis of reduced round Serpent
Shorin et al. Linear and differential cryptanalysis of Russian GOST
Murtaza et al. Fortification of aes with dynamic mix-column transformation
Soleimany Probabilistic slide cryptanalysis and its applications to LED-64 and Zorro
Minier et al. Solving a symmetric key cryptographic problem with constraint programming
Mala et al. New impossible differential attacks on reduced-round Crypton
Luma et al. New dynamical key dependent S-Box based on chaotic maps
Hussain et al. A DNA-based cryptographic key generation algorithm
Lu The (related-key) impossible boomerang attack and its application to the AES block cipher
JP2017207604A (en) Matrix generator, encryption device, method therefor, and program
Abdulwahed Chaos-Based Advanced Encryption Standard
Sadak et al. LCAHASH-1. 1: a new design of the LCAHASH system for IoT
JP6089668B2 (en) ENCRYPTION PROCESSING CIRCUIT, DECRYPTION PROCESSING CIRCUIT, METHOD THEREOF, AND PROGRAM THEREOF
Freyre et al. From AES to Dynamic AES