Direct construction of quasi-involutory recursive-like MDS matrices - - PowerPoint PPT Presentation

direct construction of quasi involutory recursive like
SMART_READER_LITE
LIVE PREVIEW

Direct construction of quasi-involutory recursive-like MDS matrices - - PowerPoint PPT Presentation

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations Direct construction of quasi-involutory recursive-like MDS matrices from 2 -cyclic codes Cauchois Victor 1 Loidreau Pierre 1 Merkiche Nabil 23 1 DGA-MI


slide-1
SLIDE 1

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Direct construction of quasi-involutory recursive-like MDS matrices from 2-cyclic codes

Cauchois Victor 1 Loidreau Pierre 1 Merkiche Nabil 23

1DGA-MI / IRMAR 2DGA-IP 3Sorbonnes Universit´

e, UPMC, LIP6

FSE 2017 March 6, 2017

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 1 / 22

slide-2
SLIDE 2

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Motivations

Definition MDS matrices are matrices such that any minor is non singular. MDS matrices are widely used in Blockciphers and Hash functions. Lightweight designs ⇒ circulant or recursive matrices. Involutory matrices ⇒ Both encryption and decryption with the same structure. No circulant involutory MDS matrix [GR14].

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 2 / 22

slide-3
SLIDE 3

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Agenda

Recursive involutory MDS matrix ? We propose a new direct construction of MDS matrices that are recursive-like and quasi-involutory. Implementations and results

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 3 / 22

slide-4
SLIDE 4

Plan

1

Involutory recursive MDS matrices

2

Quasi-involutory recursive-like MDS matrices

3

Implementations

slide-5
SLIDE 5

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Recursive matrices

From g(X) = Xm +

m−1

  • i=0

giXi ∈ F2n[X], we build the matrix : Cg =      1 . . . . . . ... ... ... . . . . . . . . . 1 g0 g1 . . . gm−2 gm−1      Definition M is a recursive matrix ⇔ ∃ g ∈ F2n[X] monic of degree m such that M = Cm

g

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 4 / 22

slide-6
SLIDE 6

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Companion matrices

Cg =      X mod g(X) X2 mod g(X) . . . Xm mod g(X)      Successive powers of companion matrices have a similar description : Ci

g =

     Xi mod g(X) Xi+1 mod g(X) . . . Xi+m−1 mod g(X)      , ∀i ∈ N

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 5 / 22

slide-7
SLIDE 7

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Redundancy matrices of cyclic codes

Let C be a [2m, m]2n cyclic code. It has a circulant generator matrix : G =      g0 g1 . . . gm . . . g0 g1 . . . gm . . . . . . ... ... ... ... ... . . . . . . g0 g1 . . . gm      Assume gm = 1, this code has a systematic generator matrix shaped as : ˜ G =       Xm mod g(X) 1 . . . Xm+1 mod g(X) 1 ... . . . . . . ... ... . . . X2m−1 mod g(X) . . . 1      

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 6 / 22

slide-8
SLIDE 8

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Involutory recursive MDS matrices ?

A recursive matrix Cm

g is an involutory matrix if

C2m

g

= Im Construct MDS cyclic codes ⇒ BCH codes. No element of even order in F2n ⇒ No BCH code yielding involutory recursive MDS matrix.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 7 / 22

slide-9
SLIDE 9

Plan

1

Involutory recursive MDS matrices

2

Quasi-involutory recursive-like MDS matrices

3

Implementations

slide-10
SLIDE 10

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Skewing polynomial rings

Let θ : x → x[1] the squaring in F22m. Definition The ring of 2-polynomials, F22m[X, θ], is defined as the set {

i aiXi, ai ∈ F22m} together with :

Addition : usual polynomial addition. Multiplication: X ∗ a = θ(a) ∗ X = a[1] ∗ X.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 8 / 22

slide-11
SLIDE 11

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Skewing powers of companion matrices

Let gX = Xm + m−1

i=0 giXi ∈ F22m[X, θ].

Theorem C[i−1]

g

C[i−2]

g

. . . C[1]

g Cg =

     Xi mod∗ gX Xi+1 mod∗ gX . . . Xi+m−1 mod∗ gX      Definition M is a recursive-like matrix ⇔ ∃ g ∈ F22m[X, θ] monic of degree m such that M = C[m−1]

g

C[m−2]

g

. . . C[1]

g Cg

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 9 / 22

slide-12
SLIDE 12

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Redundancy matrices of 2-cyclic codes

Let C be a [2m, m]22m 2-cyclic code. It has a circulant generator matrix : G =      g0 g1 . . . gm . . . g[1] g[1]

1

. . . g[1]

m

. . . . . . ... ... ... ... ... . . . . . . g[m−1] g[m−1]

1

. . . g[m−1]

m

     Assume gm = 1, this code has a systematic generator matrix shaped as : ˜ G =       Xm mod∗ gX 1 . . . Xm+1 mod∗ gX 1 ... . . . . . . ... ... . . . X2m−1 mod∗ gX . . . 1      

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 10 / 22

slide-13
SLIDE 13

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Quasi-involutory Recursive-like MDS matrices

A recursive-like matrix is a quasi-involutory matrix if C[2m−1]

g

C[2m−2]

g

. . . C[1]

g Cg = Im

  • C[m−1]

g

C[m−2]

g

. . . C[1]

g Cg

[m] (C[m−1]

g

C[m−2]

g

. . . C[1]

g Cg) = Im

g yields a quasi-involutory recursive-like matrix if X2m − 1 mod ∗gX = 0 There exist [2m, m]22m 2-cyclic MDS matrix whose a redundancy matrix

  • f a systematic generator matrix is quasi-involutory.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 11 / 22

slide-14
SLIDE 14

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

2-cyclic Gabidulin codes

Let λ be a normal element in F22m. The following matrix is the parity-check matrix of a Maximum Rank Distance (thus MDS) 2-cyclic code, C : Hλ =      λ[0] λ[1] . . . λ[2m−1] λ[1] λ[2] . . . λ[0] . . . ... ... . . . λ[m−1] λ[m] . . . λ[m−2]      All roots of g unique monic polynomial generating C are roots of X2m − 1 ⇒ X2m − 1 mod ∗gX = 0. Thus g yields a quasi-involutory recursive-like matrix.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 12 / 22

slide-15
SLIDE 15

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Direct Construction

1

Choose a normal element λ ∈ F22m.

2

Define Hλ,1 =    λ[0] . . . λ[m−1] . . . ... . . . λ[m−1] . . . λ[2m−2]    and Hλ,2 =    λ[m] . . . λ[2m−1] . . . ... . . . λ[2m−1] . . . λ[m−2]   

3

Compute Hλ = (Hλ,1 | Hλ,2)

4

Compute M = Hλ,2H−1

λ,1. The inverse matrix is N = M [m].

5

Compute Cg from the first line of M. M is then a quasi-involutory recursive-like MDS matrix, recursively generated by Cg.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 13 / 22

slide-16
SLIDE 16

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

An example with small parameters m = 4

Let β be a a root of the irreducible polynomial x8 + x4 + x3 + x2 + 1 (0x11c). β is a generator of the multiplication group of F28. We chose to consider the normal element λ = β21. We compute Hβ21 :     β21 β42 β84 β168 β81 β162 β69 β138 β42 β84 β168 β81 β162 β69 β138 β21 β84 β168 β81 β162 β69 β138 β21 β42 β168 β81 β162 β69 β138 β21 β42 β84     Hence the MDS matrix M is written : M =     β199 β96 β52 β123 β190 β218 β231 β125 β194 β227 β224 β66 β76 β54 β217 β28    

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 14 / 22

slide-17
SLIDE 17

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

An example with small parameters m = 4

Its inverse matrix is N = M [4] and is written : N =     β124 β6 β67 β183 β235 β173 β126 β215 β44 β62 β14 β36 β196 β99 β157 β193     The companion matrix which recursively generates M is associated with gX = β199 + β96X + β52X2 + β123X3 + X4 and is written : Cg =     1 1 1 β199 β96 β52 β123    

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 15 / 22

slide-18
SLIDE 18

Plan

1

Involutory recursive MDS matrices

2

Quasi-involutory recursive-like MDS matrices

3

Implementations

slide-19
SLIDE 19

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Normal Basis and Squaring

Let α be a normal element in F22m. B = {α, α[1], ..., α[2m−1]} is a basis

  • f F22m as F2-space.

In such a basis, squaring consists in a cycling shift of the components of the vector representation : X =

1m−1

  • i=0

xiα[i] = ⇒ X[1] =

2m−1

  • i=0

xiα[i+1] Thus, it admits an efficient hardware implementation : fixed bits permutation.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 16 / 22

slide-20
SLIDE 20

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Implementing recursive-like matrices

Implementing matrix-vector product with a recursive-like matrix is quite similar as classical case. The following algorithm computes it : Algorithm 1 Matrix vector product Require: x ∈ Fm

22m an input vector and Cg

Ensure: y = Mx, with M = C[m−1]

g

C[m−2]

g

. . . C[1]

g Cg

1: y ← x[1]

⊲ Initialization

2: for i = 0 to m − 1 do 3:

y ← Cgy[−1] ⊲ Matrix-vector product with companion matrix

4: end for 5: y ← y[m−1]

⊲ Final step

6: return y

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 17 / 22

slide-21
SLIDE 21

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

And the inverse ?

Algorithm 2 Matrix-vector product for the inverse matrix Require: x ∈ Fm

22m an input vector and Cg

Ensure: y = M −1x, with M = C[m−1]

g

C[m−2]

g

. . . C[1]

g Cg

1: y ← x[−m+1]

⊲ Initialization

2: for i = 0 to m − 1 do 3:

y ← Cgy[−1] ⊲ Matrix-vector product with companion matrix

4: end for 5: y ← y[−1]

⊲ Final step

6: return y

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 18 / 22

slide-22
SLIDE 22

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Skewed-LFSR

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 19 / 22

slide-23
SLIDE 23

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Exhaustive search of MDS matrices

matrix type Matrix Size Ground Field XOR Count Reference Circulant 3 × 3 F24 1 + 2 × 4 [LS16] Skewed Recursive 3 × 3 F24 3 + 2 × 4 this work Circulant 4 × 4 GL(4, F2) 3 + 3 × 4 [LW16] Circulant 4 × 4 F24 3 + 3 × 4 [LW16] Skewed Recursive 4 × 4 F24 6 + 3 × 4 this work Circulant 6 × 6 F24 12 + 5 × 4 [LS16]

Table: Best known MDS matrices with F24 elements

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 20 / 22

slide-24
SLIDE 24

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Exhaustive search of Involutory MDS matrices

matrix type Matrix Size Ground Field XOR Count Reference Circulant 3 × 3 F24 12 + 2 × 4 [LS16] Skewed Recursive 3 × 3 F24 12 + 2 × 4 this work Circulant 4 × 4 GL(4, F2) 5 + 3 × 4 [LW16] Skewed Recursive 4 × 4 F24 13 + 3 × 4 this work Skewed Recursive 6 × 6 F24 17 + 5 × 4 this work

Table: Best known Involutory MDS matrices with F24 elements

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 21 / 22

slide-25
SLIDE 25

Involutory recursive MDS matrices Quasi-involutory recursive-like MDS matrices Implementations

Conclusion

An algebraic framework to understand recursive and recursive-like matrices. A new direct construction of MDS matrices with interesting implementation properties. A new promising architecture : the SLFSR.

Cauchois, Loidreau, Merkiche Involutory recursive diffusion layers 22 / 22