Block circulant MDS matrices are used in the design of linear diffusion layers for lightweight cryptographic applications. Most of the work on construction of block circulant MDS matrices focused either on finite fields or GL(m,F2). The main objective of this paper is to extend the above study of block circulant MDS matrices to finite commutative rings. Additionally, we examine the behavior of the XOR count distribution under different reducible polynomials of equal degree over F2. We show that the determinant of a block circulant matrix over a ring can be expressed in a simple form. We construct 4×4 and 8×8 block circulant matrices over a ring. Furthermore, for non-negative integer l, we identify the conditions under which a ring Rl=F2[x]⟨(f(x))2l⟩, contains a finite field of order 2m, where f(x) is an irreducible polynomial of degree m. To facilitate efficient implementation, we analyze XOR distributions within specific rings, such as R1=F2[x]⟨(1+x2+x6)⟩ and R2=F2[x]⟨(1+x4+x6)⟩. Our calculations reveal distinct XOR distributions when utilizing two reducible polynomials of equal degree, with XOR count distributions 776 and 764, respectively. However, when using irreducible polynomials of the same degree, the XOR count distributions remain the same. This difference is advantageous for applications in lightweight cryptography.
Citation: Shakir Ali, Amal S. Alali, Atif Ahmad Khan, Indah Emilia Wijayanti, Kok Bin Wong. XOR count and block circulant MDS matrices over finite commutative rings[J]. AIMS Mathematics, 2024, 9(11): 30529-30547. doi: 10.3934/math.20241474
Related Papers:
[1]
Yousef Alkhamees, Badr Alhajouj .
Structure of a chain ring as a ring of matrices over a Galois ring. AIMS Mathematics, 2022, 7(9): 15824-15833.
doi: 10.3934/math.2022866
[2]
Ahmad Y. Al-Dweik, Ryad Ghanam, Gerard Thompson, M. T. Mustafa .
Algorithms for simultaneous block triangularization and block diagonalization of sets of matrices. AIMS Mathematics, 2023, 8(8): 19757-19772.
doi: 10.3934/math.20231007
[3]
Huawei Huang, Xin Jiang, Changwen Peng, Geyang Pan .
A new semiring and its cryptographic applications. AIMS Mathematics, 2024, 9(8): 20677-20691.
doi: 10.3934/math.20241005
[4]
Hengbin Zhang .
Automorphism group of the commuting graph of $ 2\times 2 $ matrix ring over $ \mathbb{Z}_{p^{s}} $. AIMS Mathematics, 2021, 6(11): 12650-12659.
doi: 10.3934/math.2021729
[5]
Yousef Alkhamees, Sami Alabiad .
Classification of chain rings. AIMS Mathematics, 2022, 7(4): 5106-5116.
doi: 10.3934/math.2022284
[6]
B. Amutha, R. Perumal .
Public key exchange protocols based on tropical lower circulant and anti circulant matrices. AIMS Mathematics, 2023, 8(7): 17307-17334.
doi: 10.3934/math.2023885
[7]
Wei Qi .
The polycyclic codes over the finite field $ \mathbb{F}_q $. AIMS Mathematics, 2024, 9(11): 29707-29717.
doi: 10.3934/math.20241439
[8]
Bilal A. Rather, M. Aijaz, Fawad Ali, Nabil Mlaiki, Asad Ullah .
On distance signless Laplacian eigenvalues of zero divisor graph of commutative rings. AIMS Mathematics, 2022, 7(7): 12635-12649.
doi: 10.3934/math.2022699
[9]
Fatih Yılmaz, Aybüke Ertaş, Samet Arpacı .
Some results on circulant matrices involving Fibonacci polynomials. AIMS Mathematics, 2025, 10(4): 9256-9273.
doi: 10.3934/math.2025425
Block circulant MDS matrices are used in the design of linear diffusion layers for lightweight cryptographic applications. Most of the work on construction of block circulant MDS matrices focused either on finite fields or GL(m,F2). The main objective of this paper is to extend the above study of block circulant MDS matrices to finite commutative rings. Additionally, we examine the behavior of the XOR count distribution under different reducible polynomials of equal degree over F2. We show that the determinant of a block circulant matrix over a ring can be expressed in a simple form. We construct 4×4 and 8×8 block circulant matrices over a ring. Furthermore, for non-negative integer l, we identify the conditions under which a ring Rl=F2[x]⟨(f(x))2l⟩, contains a finite field of order 2m, where f(x) is an irreducible polynomial of degree m. To facilitate efficient implementation, we analyze XOR distributions within specific rings, such as R1=F2[x]⟨(1+x2+x6)⟩ and R2=F2[x]⟨(1+x4+x6)⟩. Our calculations reveal distinct XOR distributions when utilizing two reducible polynomials of equal degree, with XOR count distributions 776 and 764, respectively. However, when using irreducible polynomials of the same degree, the XOR count distributions remain the same. This difference is advantageous for applications in lightweight cryptography.
1.
Introduction
The linear diffusion layer is widely used in the design of symmetric-key cryptography. It takes a crucial part in providing resistance against differential and linear cryptanalysis. If all square submatrices of a linear diffusion matrix are non-singular, then it is called a Maximum Distance Separable (MDS) matrix, and in other words, a perfect diffusion matrix with optimal diffusion property is called an MDS matrix. A typical application is in the MixColumns operation of AES [8]. Furthermore, except for block ciphers, MDS matrices are also broadly used in many other ciphers, such as Maelstrom-0 [11], PHOTON [12], SHARK [23], and Grϕstl [10]. There are several approaches to constructing MDS matrices, which can be applied as diffusion layers for block ciphers and hash functions. The first method is based on the algebraic structures such as Cauchy, Vandermonde, and Hadamard matrices (cf.; [13,18,20]). The next efficient method to be used in constructing MDS matrices is based on recursive construction (see [18,24,27], for more details). Also, a brief survey of various theories in the construction of MDS matrices is provided in [15].
Circulant matrices have attracted significant attention for the efficient construction of MDS matrices. A circulant matrix is a unique type of matrix in which each row vector is a cyclic shift of the previous row vector, rotated one element to the right. In the diffusion layer, circulant matrices are utilized by the Advanced Encryption Standard (AES) [8]. The advantage of circulant matrices is that they can be fully described by just n elements, instead of requiring storage of all n2 elements. In the study of circulant MDS matrices over finite fields, significant contributions have been made, as referenced in [1,14,15,21]. Han et al. [16] introduced a special generalization called block circulant matrices with circulant blocks. The authors demonstrated that block circulant matrices can perform better than circulant matrices in the implementation of the InvMixColumn operations. In 2021, Cui et al. [4] demonstrated that a Galois field is a subclass of a commutative ring, suggesting the possibility of finding more cost-effective MDS matrices within commutative rings rather than Galois fields. Taking this into account, Ali et al. [2] provided key insights into circulant MDS matrices over finite commutative rings of characteristic 2 and proved several important results regarding the non-existence of certain circulant MDS matrices over rings.
Inspired by the work of Han et al. [16] and Cui et al. [4], in the present article, we first derive the expression for the determinant of block circulant matrices over a finite commutative ring of characteristic 2. It is known that block circulant matrices can produce more efficient MDS matrices compared to circulant matrices. Using this expression, we construct block circulant MDS matrices of order 4×4 and 8×8 over rings. Furthermore, we examine the work of Khoo et al. [9], where they proposed analyzing the number of XOR operations required to compute the multiplication of a fixed element. For more studies related to implementation and d-XOR count, see the references [7,19,25]. In 2015, Sim et al. [26] proved the following result about the XOR-count:
Theorem A. [26,Theorem 1] The total XOR-count for a field GF(2n) is
nn∑i=22i−2(i−1), wheren≥2.
This theorem proved that the sum of XORs of the elements of the finite field is invariant under the change of an irreducible polynomial of the same degree. Further, Sarkar and Sim [25] studied the XOR-count distribution under different bases of a finite field and proved the following:
Theorem B. [25,Proposition 2] The total XOR-count of the elements in GF(2n) is
nn∑i=2(ni)(i−1),where n≥2,
and it is invariant under the choice of basis.
In 2021, Kesarwani et al. [18] extended the study of XOR count over a local rings. Using this result, we explore the XOR count distributions for two rings associated with two distinct reducible polynomials of the same degree and compare their corresponding XOR distributions. We obtain distinct XOR count distributions, which increase the probability of finding lightweight MDS matrices.
The organization of the paper is as follows: In Section 2, we start by explaining important terms like MDS matrices, circulant matrices, and block circulant matrices. Then, we show some interesting results about circulant matrices over finite commutative rings. We even figure out how to find the determinant of a circulant matrix over a ring of characteristic 2. In Section 3, we prove one of the main results about block circulant matrices in which we calculate their determinants. We even show how to make special 4×4 and 8×8 block circulant MDS matrices over ring. Further, we find out the condition when a ring Z2[x]⟨(f(x))2l⟩ contains a copy of finite field of order 2m, where m is the degree of irreducible polynomial f(x), and by using this result, we prove some results on MDS matrices over the ring F2[x]⟨(1+x+x3+x4+x8)2t⟩. We start Section 4, from the definition of XOR count of a finite field, and then we calculate the XOR count distribution of two rings, R1=F2[x]⟨(1+x2+x6)⟩ and R2=F2[x]⟨(1+x4+x6)⟩. In the last section, we wrap our study with some examples of MDS matrices and their XOR counts.
2.
Preliminaries
Some notations used throughout the paper are presented as follows:
R
Finite commutative ring of characteristic 2.
U(R)
Set of all unit elements of R.
N(R)
Set of all nilpotent elements of R.
B(s,t)(R)
Set of all block circulant matrices over a ring R.
In
Identity matrix of order n.
⊕
Addition modulo 2.
F2n
Finite field of cardinality 2n with characteristic 2.
GL(k,R)
Set of all non-singular matrices of order k over a ring R.
M(k,R)
Set of all matrices of order k over a ring R.
In this section, we discuss some useful definitions such as MDS code, MDS matrix, circulant matrix, block circulant matrix and some important results. Throughout our paper, m,n,l,k,d,s, and t are positive integers.
Definition 1.[6] A linear code C(n,k) of length n and dimension k over R with minimum Hamming distance d satisfying d=n−k+1 is said to be a maximal distance separable (MDS) code.
Definition 2.A matrix Mn×n is an MDS matrix if and only if all its square submatrices are non-singular.
In 1997, Dong et al. [5] gave a matrix characterization of MDS codes over modules, which we state as follows:
Lemma 1.[5,Theorem 2.1] Let C(n,k) be a linear code over R with a parity check matrix H of the form H=(B|In−k). Then, C(n,k) is an MDS code if and only if the determinants of every t×t submatrix, t∈{1,2,…,min{k,n−k}} of B is an element of U(R).
Note that MDS matrices are perfect diffusion matrices with maximum branch number. A permutation layer with a good diffusion matrix in block cipher can improve the avalanche characteristics of the block cipher, which increases the cipher's resistance to differential and linear cryptanalysis [17]. The MDS matrices are extensively used in designing block ciphers and hash functions that provide security against differential and linear cryptanalysis.
Definition 3.Let R be a ring and bi∈R for all i=0,1,…,d−1. Then, any d×d matrix of the form
[b0b1…bd−1bd−1b0…bd−2⋮⋮⋱⋮⋮⋮⋱⋮b1b2…b0],
is called a circulant matrix of order d, and it is denoted by circ(b0,b1,b2,…,bd−1).
Since a circulant matrix can also be written as a polynomial in some suitable permutation matrix, we have the following result:
Lemma 2.[22,page 290] Let d≥1 be a fixed integer. Then, any circulant matrix B=circ(b0,b1,…,bd−1) of order d can be written in the form
Lemma 3.[21,Theorem 3.1.1] Let A be a matrix of order d and T=circ(0,1,0,…,0) be a matrix of order d. Then, A is a circulant if and only if AT=TA, where it follows that all circulant matrices of the same order commute.
Lemma 4.[2,Lemma 7] Let B=circ(b0,b1,…,b2d−1) be a circulant matrix of order 2d where b0,b1,…,b2d−1∈R. Then,
B2=circ(b20+b2d,0,b21+b2d+1,0,…,b2d−1+b22d−1,0).
Definition 4.An (s,t)-block circulant matrix of order st is a matrix of the form
where A1,A2,A3,…,As are square matrices of order t and bCirc(A1,…,As) represent a block circulant matrix.
It is clear that if s=1 or t=1, an (s,t)-block circulant degenerates to an ordinary circulant matrix. But a block circulant is not necessarily a circulant. For example, the matrix
[abefcdghefabghcd],
is a block circulant matrix but fails to be a circulant if a≠d.
Definition 5.Let D=bCirc(A1,A2,…,As) be an (s,t)-block circulant, if each block Ai is a circulant, D is called an (s,t)-block circulant with circulant blocks. The class of such types of matrices is denoted by Bs,t(R).
Corollary 6.[2,Corollary 11] For any positive integer d, we have
det(circ(b0,b1,…,b2d−1))=2d−1∑j=0b2dj+x,wherebj∈R and for somex∈N(R).
3.
The main results
The significance of MDS matrices of order 2d is paramount in the development of block ciphers and primarily owing to their ease of implementation. Our particular emphasis is directed towards matrices within Bs,t(R), with the underlying assumption that s=2d1 and t=2d2 throughout the subsequent sections, where d,d1, and d2 are positive integers.
Now, we state and prove the first main result of this paper:
Theorem 7.Let D=bCirc(A1,A2,…,As)∈Bs,t(R), where Ai=Circ(ai,1,ai,2,…,ai,t), 1≤i≤s, s=2d1, t=2d2. Then,
As an application of Theorem 7, we derive the following results. Precisely, if we take finite field of characteristic 2 in Theorem 7, then we obtain
Corollary 8.[16,Theorem 4.4] Let D=bCirc(A1,A2,…,As)∈Bs,t(F2n), where Ai=Circ(ai,1,ai,2,…,ai,t), 1≤i≤s, s=2d1, t=2d2. Then
Dmax{s,t}=(s∑i=1det(Ai)s)1min{s,t}Ist,
and
det(D)=s∑i=1det(Ai)s.
In the following propositions, we construct 4×4 and 8×8 block circulant MDS matrices over the ring F28×F28, where h(x)=x8+x4+x3+x+1 is the generating polynomial of F28, α and β are the roots of this generating polynomial, and ¯γ=(α,β), ˉ1=(1,1)∈F28×F28.
Proposition 9.Let α and β be the roots of the polynomial h(x). Then, D=bCirc(circ(ˉ1,ˉγ),circ(ˉγ−1,ˉγ+ˉ1))∈B2,2(F28×F28) is an MDS matrix, and D−1=γ2D.
Proof. Application of [16,Proposition 5.3], makes it clear that D is an MDS matrix. By employing Theorem 7, we can write
Dmax{2,2}=D2=2∑i=1(det(Ai)−zi)2min{2,2},
where A1=circ(ˉ1,ˉγ),B=circ(ˉγ−1,ˉγ+ˉ1). By Corollary 2.6, we obtain det(A1)=ˉγ2+ˉ1 and det(A2)=ˉγ2+ˉ1+(ˉγ−1)2, and hence
Proposition 10.Let α and β be the roots of the polynomial h(x). Then, D=bCirc(circ(ˉ1,ˉ1,ˉγ−1+ˉγ,ˉγ),cir(ˉ1+ˉγ+ˉγ−1,ˉ1+ˉγ,ˉγ−1,ˉγ−1+ˉγ))∈B2,4(F28×F28) is an MDS matrix, and D−1=γ−4D×D2.
Proof. In view of [16,Proposition 5.4], we can easily see that D is an MDS matrix. With the help of Theorem 7, we can write
Dmax{4,2}=D4==2∑i=1(det(Ai))2I,
where A1=circ(ˉ1,ˉ1,ˉγ−1+ˉγ,ˉγ),A2=cir(ˉ1+ˉγ+ˉγ−1,ˉ1+ˉγ,ˉγ−1,ˉγ−1+ˉγ)). Application of Corollary 6 yields, det(A1)=(ˉγ−1)2 and detA2=(ˉγ−1)2+(ˉγ)2
Proposition 11.Let α and β be the roots of the polynomial h(x). Then, D=bCirc(circ(ˉ1,ˉγ−1),circ(ˉγ−1+ˉ1,ˉγ2),circ(ˉγ,ˉγ−1+ˉ1),circ(ˉγ2+ˉ1,ˉ1+ˉγ+ˉγ−1))∈B4,2(F28×F28) is an MDS matrix.
Proposition 12.Let D=bCirc(circ(a1,a2),circ(a3,a4)) be an MDS matrix over R. Then, ai≠aj+η(1≤i,j≤4), for any η∈N(R).
Proof. Since D=bCirc(circ(a1,a2),circ(a3,a4)). So, we have
D=[a1a2a3a4a2a1a4a3a3a4a1a2a4a3a2a1].
Let us suppose on the contrary, ai=aj+η, where 1≤i,j≤4. Since C=circ(ai,aj)=circ(ai,ai+η) is a submatrix of D, so det(C)=a2i+a2i+η2=η2. This implies that det(C)∈N(R). Hence, we obtained a contradiction as D is an MDS matrix. Therefore ai≠aj+η(1≤i,j≤4), for any η∈N(R).□
In the following lemma, we prove that the ring Rl=F2[x]⟨(f(x))2l⟩ contains a finite field of order 2m, where f(x) is any irreducible polynomial of degree m.
Lemma 13.Let f(x) be any irreducible polynomial of degree m over F2 and Rl=F2[x]⟨(f(x))2l⟩ be a ring. Then, Rl has a field of order 2m.
Proof. Let f(x) be an irreducible polynomial of degree m over F2. Now, we define a map ϕ:F2[x]⟨f(x)⟩⟶F2[x]⟨(f(x))2l⟩ as ϕ(h(x)+⟨f(x)⟩)=(h(x))2l+⟨(f(x))2l⟩for allh(x)∈F2[x]. First, we prove that ϕ is well defined. Let h1(x)+⟨f(x)⟩andh2(x)+⟨f(x)⟩∈F2[x]⟨f(x)⟩ such that h1(x)+⟨f(x)⟩=h2(x)+⟨f(x)⟩. This implies that h1(x)−h2(x)∈⟨f(x)⟩, that is, h1(x)−h2(x)=g(x)⋅f(x)for someg(x)∈F2[x]. Therefore, we write (h1(x)−h2(x))2l=(g(x)⋅f(x))2l, that is, (h1(x)−h2(x))2l=(g(x))2l(f(x))2l=0mod(f(x))2l. Hence, ϕ(h1(x)+⟨f(x)⟩)=ϕ(h2(x)+⟨f(x)⟩).
Next, we want to prove that ϕ is a ring homomorphism. For any h1(x)+⟨f(x)⟩,h2(x)+⟨f(x)⟩∈F2[x]⟨f(x)⟩, we have
Hence, ϕ is a ring homomorphism. To show that ϕ is an embedding, we prove that ϕ is injective. Let h(x)+⟨f(x)⟩∈Ker(ϕ). Therefore, we have ϕ(h(x)+⟨f(x)⟩)=⟨(f(x))2l⟩, which implies (h(x))2l+⟨(f(x))2l⟩=⟨(f(x))2l⟩. Thus, (h(x))2l∈⟨(f(x))2l⟩, f(x)∣h(x). That is, h(x)+⟨f(x)⟩=⟨f(x)⟩. Henceforth, we conclude that Ker(ϕ)={⟨f(x)⟩}.
Thus, ϕ is injective. Hence, F2[x]⟨(f(x))2l⟩ contains a field of order 2m which is isomorphic to F2[x]⟨f(x)⟩. □
Lemma 14.Let ψ:M(d,F2[x]⟨(f(x))2l⟩)⟶M(d,F2[x]⟨(f(x))2l⟩) be a map, for any A=(ai,j)∈M(d,F2[x]⟨((f(x))2l⟩) define ψ as ψ((aij))=(aij+ηij)=A′, where ηij∈N(F2[x]⟨(f(x))2l⟩) for 1≤i,j≤d. Then, A is invertible if and only if A′ is invertible.
Since A is invertible, det(A) is a unit in F2[x]⟨(f(x))2l⟩. Therefore, det(A′)=det(A)+t, where t∈N(F2[x]⟨(f(x))2l⟩), which implies that det(A′) is also a unit element in F2[x]⟨(f(x))2l⟩. Hence, A′ is invertible.
Similarly, we can prove the converse of this theorem. □
Theorem 15.Let A=(aij)∈GL(d,F2[x]⟨((f(x))2l⟩) be an MDS matrix, and ηij∈N(F2[x]⟨(f(x))2l⟩). Then, A′=(aij+ηij) is an MDS matrix.
Proof. The proof of this theorem directly follows from Lemma 14. □
Theorem 16.Let Rt=F2[x]⟨(1+x+x3+x4+x8)2t⟩ be a ring with a positive integer t and β be a root of the irreducible polynomial 1+x+x3+x4+x8, and α=β2t. Then, D=bCirc(circ(1+η1,α+η2),circ(α−1+η3,α+1+η4)) is an MDS matrix, where η1,η2,η3andη4∈N(Rt).
Proof. The proof of this theorem follows from Lemma 13 and Theorem 15. □
Corollary 17.In particular, if we take η1=η2=η3=η4=η in Theorem 16, then D2=1α2I4.
Proof. We have
D=[1+ηα+ηα−1+η1+α+ηα+η1+η1+α+ηα−1+ηα−1+η1+α+η1+ηα+η1+α+ηα−1α+η1+η].Then, we obtainD2=[1+ηα+ηα−1+η1+α+ηα+η1+η1+α+ηα−1+ηα−1+η1+α+η1+ηα+η1+α+ηα−1α+η1+η][1+ηα+ηα−1+η1+α+ηα+η1+η1+α+ηα−1+ηα−1+η1+α+η1+ηα+η1+α+ηα−1α+η1+η]=[(1+η)2+(α+η)2+000$α−1+η)2+(α+1+η)20(1+η)2+(α+η)2+00(α−1+η)2+(α+1+η)200(1+η)2+(α+η)2+0(α−1+η)2+(α+1+η)2000(1+η)2+(α+η)2+(α−1+η)2+(α+1+η)2]=[(α−1)20000(α−1)20000(α−1)20000(α−1)2]=(α−1)2I=1α2I.
□
Theorem 18.Let Rt=F2[x]⟨(1+x+x3+x4+x8)2t⟩ be a ring and β be a root of the irreducible polynomial 1+x+x3+x4+x8, and α=β2t. Then, D=bCirc(circ(1+η1,1+η2,α+α−1+η3,α+η4),circ(1+α+α−1+η′1,1+α+η′2,α−1+η′3,α+α−1+η′4)) is an MDS matrix, where η1,η2,η3,η4,η′1,η′2,η′3andη′4∈N(Rt).
Proof. The proof of this theorem is on similar lines as that of Lemma 13 and Theorem 15. □
Corollary 19.If we take η1=η2=η3=η4=η′1=η′2=η′3=η′4 in Theorem 72, then D4=(α4+z)I, for some z∈N(Rt).
4.
XOR count distribution of finite commutative rings of characteristic 2
In this section, we delve into the XOR count distribution for elements within two rings: R1=F2[x]⟨(1+x2+x6)⟩ and R2=F2[x]⟨(1+x4+x6)⟩. Employing a method delineated by Kesarwani et al. [18], which entails determining the XOR count of a local ring with characteristic 2. We apply the same method in finite fields to define the XOR count for elements within R1 and R2. For a more comprehensive understanding of XOR count, readers are encouraged to delve into the detailed discussions provided in [19]. Let us commence this section by outlining the definition of XOR count.
Definition 6.[25,Definition 1] The XOR count of an element θ in the field F2n is the number of XORs required to implement the multiplication of θ with an arbitrary element β. XOR counts of all elements of F2n referred to as the XOR count distribution.
We begin by outlining the procedure for computing the number of XOR operations needed to execute a multiplication by elements α3 within the finite rings R1 and R2.
For ring R1=F2[x]⟨(1+x2+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;whereα=x+⟨1+x2+x6⟩,ai∈F2}. Consider the multiplication of α3 with an arbitrary element β=b0+b1α+b2α2+b3α3+b4α4+b5α5, where bi∈F2, as
where there are three XOR operations. Consequently, the XOR count of the element α3 in R1 is 3.
For the ring R2=F2[x]⟨(1+x4+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;whereα=x+⟨1+x4+x6⟩,ai∈F2}. Consider the multiplication of α3 with an arbitrary element β=b0+b1α+b2α2+b3α3+b4α4+b5α5, where bi∈F2 as
which contains four XORs. Hence, the XOR count for the element α3 in R2 is 4.
Then, we can calculate the number of XORs required for the multiplication of each element in rings R1 and R2 by using the same approach. Table 1 shows the number of XOR gates for each elements of the finite rings of order 26 defined by two reducible polynomials (1+x2+x6) and (1+x4+x6). The Magma computation system [3] is used to complete all of the computations in Table 1.
Table 1.
XOR count distribution table for the rings R1 and R2. R1=F2[x]⟨(1+x2+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;α6=1+α2,ai∈F2},R2=F2[x]⟨(1+x4+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;α6=1+α4,ai∈F2}. Total XOR count of R1=776, Total XOR count of R2=764.
In Table 1, we observe that the sum of all XOR distributions of the elements in R1 and R2 amounts to 776 and 764, respectively. Our investigation aligns with the findings of Sarkar and Sim [25] in the realm of finite fields, where they demonstrate that there is no advantage in varying the choice of irreducible polynomials over F2. They proved that the total XOR count of elements in F2n remains constant, i.e., nn∑i=2(ni)(i−1). However, our exploration reveals a contrasting scenario: When employing two reducible polynomials of equal degree, distinct XOR distributions emerge. Specifically, in our investigation, we observe the XOR sums for the respective rings R1 and R2 to be 776 and 764.
5.
Examples
In this section, we present two examples of block circulant MDS matrices over the rings R1 and R2. Moreover, in connection with Theorem 15, we provide some additional MDS matrices.
Example 1.Let R1=F2[x](⟨1+x2+x6⟩) be a finite commutative ring of characteristic 2. By Lemma 13, we can say that R1 contains a finite field of order 8. Let α be the root of the irreducible polynomial 1+x+x3 over F2, and the matrix A=bCirc(circ(1,α),circ(1+α,1+α2)). That is,
A=[1α1+α1+α2α11+α21+α1+α1+α21α1+α21+αα1],
is an MDS matrix, and A2=(1+α4)I4. In Theorem 15, if we take ηij=α3+α+1 and η′ij=α5+α4+1, then we obtain two more MDS matrices A1 and A2, as follows:
Example 2.Let R2=F2[x](⟨1+x4+x6⟩) be a finite commutative ring of characteristic 2. In view of Lemma 13, we can say that R2 contains a finite field of order 8. Let α be a root of the irreducible polynomial 1+x+x3. Then, the matrix
B=[1α1+αα2α1α21+α1+αα21αα21+αα1],
is an MDS matrix, and A2=α4I4. Moreover, if we take ηij=α3+α2+1 and η′ij=α5+α+1, in Theorem 15, then we obtain two MDS matrices B1 and B2. That is, we obtain
5.1. XOR count of a matrix over finite commutative ring of characteristic 2
The XOR count of one row of a diffusion matrix can be computed using the following formula.
XORcount of one row=k∑i=1γi+(l−1)⋅n,
(5.1)
where γi is the XOR count of the i-th entry in the row of the matrix, k is the order of the diffusion matrix, l is the number of nonzero coefficients in the row, and n is the dimension of vector space (see, [25] for more details).
Remark 1.Using Eq (5.1) and Table 1, we calculate the XOR counts of matrices A, A1, and A2 in Example 1 to be 132, 212, and 264, respectively.
Remark 2.By employing Eq (5.1) and referring to Table 1, we compute the XOR counts for matrices B, B1, and B2 in Example 2 as 108, 256, and 256, respectively.
6.
Conclusions
In this paper, we studied the construction of block circulant MDS matrices over finite commutative rings with unity. Our investigation has delved into the determinant of such matrices, extending previous findings from finite fields to the ring R. Additionally, we explored conditions under which R contains a finite field of order 2m, taking advantage of this discovery, we constructed block circulant MDS matrices of orders 4 and 8. To enhance the practical implementation of MDS matrices, we analyzed the XOR distribution within specific rings, including R1=F2[x]⟨(1+x2+x6)⟩ and R2=F2[x]⟨(1+x4+x6)⟩, providing the XOR counts distribution of these two rings. Furthermore, we presented some examples of MDS matrices alongside their corresponding XOR counts within the framework of finite commutative rings.
However, unlike previous research, our investigation has found that different XOR patterns appear when we use two reducible polynomials of the same degree. We specifically noticed different XOR distributions of rings R1 and R2, which are 776 and 764, respectively. This finding emphasizes how the choice of polynomials influences the way XOR behaves in specific mathematical scenarios involving certain types of rings. Our investigation has aligned with previous findings in the realm of finite fields, where they (cf.; [25]) demonstrated that there is no advantage in varying the choice of irreducible polynomials within F2n, as they (cf.; [25]) proved that the total XOR count of elements in F2n remains constant.
The future work revolves around investigating the XOR count, particularly in relation to changes in the basis. We aim to determine whether altering the basis results in any modifications to the XOR distribution. Additionally, we seek to identify the conditions under which there is no variation in the XOR count distribution, particularly concerning reducible polynomials.
Author contributions
All authors have equally contributed. All authors have read and approved the final version of the manuscript for publication.
Acknowledgments
The authors thank to the anonymous reviewers for their valuable suggestions and comments which significantly improved both the quality and the presentation of this paper.
The authors extend their appreciation to Princess Nourah bint Abdulrahman University (PNU), Riyadh, Saudi Arabia, for funding this research under Researchers Supporting Project Number (PNURSP2024R231). A Substantial part of this work was done when the first and third authors were visiting Professor/Scientist at Department of Mathematics, Universitas Gadjah Mada (UGM), Indonesia (July, 2024) hosted by the Algebra Society of Indonesia and UGM. The first and third authors appreciate the gracious hospitality they received at UGM, Indonesia, during their visit. The research of the third author is financially supported by the University Grants Commission (UGC), Government of India (Ref. No.: 221610203798).
Conflicts of interest
The authors declare that they have no conflicts of interest.
References
[1]
I. Adhiguna, I. S. N. Arifin, F. Yuliawan, I. Muchtadi-Alamsyah, On orthogonal circulant MDS matrices, Int. J. Math. Comput. Sci., 17 (2022), 1619–1637.
[2]
S. Ali, A. A. Khan, B. Singh, On circulant involutory and orthogonal MDS matrices over finite commutative rings, Appl. Algebr. Eng. Comm., 2024. https://doi.org/10.1007/s00200-024-00656-4
[3]
W. Bosma, J. Cannon, Handbook of Magma functions, University of Sydney, 1995.
[4]
T. Cui, S. Chen, C. Jin, H. Zheng, Construction of higher-level MDS matrices in nested SPNs, Inform. Sciences, 554 (2021), 297–312. https://doi.org/10.1016/j.ins.2020.12.022 doi: 10.1016/j.ins.2020.12.022
[5]
X. D. Dong, C. B. Son, E. Gunawan, Matrix characterization of MDS linear codes over modules, Linear Algebr. Appl., 277 (1998), 57–61. https://doi.org/10.1016/S0024-3795(97)10073-8 doi: 10.1016/S0024-3795(97)10073-8
[6]
S. T. Dougherty, Algebraic coding theory over finite commutative rings, Springer, 2017.
[7]
J. Jean, T. Peyrin, S. M. Sim, J. Tourteaux, Optimizing implementations of lightweight building blocks, IACR T. Symmetric Cry., 4 (2017), 130–168. https://doi.org/10.46586/tosc.v2017.i4.130-168 doi: 10.46586/tosc.v2017.i4.130-168
[8]
D. Joan, V. Rijmen, The design of Rijndael: AES-the advanced encryption standard, Inform. Secur. Cryptogr., 2002.
[9]
K. Khoo, T. Peyrin, A. Y. Poschmann, H. Yap, FOAM: Searching for hardware optimal SPN structures and components with a fair comparison, Springer, Berlin, Heidelberg, 16 (2014), 433–450. https://doi.org/10.1007/978-3-662-44709-3_24
[10]
P. Gauravaram, L. R. Knudsen, K. Matusiewicz, F. Mendel, C. Rechberger, M. Schl¨affer, et al., Grϕstl-a SHA-3 candidate, In: Dagstuhl Seminar Proceedings, Schloss Dagstuhl-Leibniz-Zentrum f¨ur Informatik, 2009.
[11]
F. D. Gazzoni, P. Barreto, V. Rijmen, The Maelstrom-0 hash function, In VI Brazilian Symposium on Information and Computer Systems Security, 2006.
[12]
J. Guo, T. Peyrin, A. Poschmann, The PHOTON family of lightweight hash functions, Adv. Cry.-CRYPTO, 6841 (2011), 222–239. https://doi.org/10.1007/978-3-642-22792-9_13 doi: 10.1007/978-3-642-22792-9_13
[13]
K. C. Gupta, I. G. Ray, On constructions of involutory MDS matrices, In Progress in Cryptology AFRICACRYPT, LNCS, Springer, Berlin, Heidelberg, 7918 (2013), 43–60. https://doi.org/10.1007/978-3-642-38553-7_3
[14]
K. C. Gupta, I. G. Ray, Cryptographically significant MDS matrices based on circulant and circulant-like matrices for lightweight applications, Cryptogr. Commun., 7 (2014), 257–287. https://doi.org/10.1007/s12095-014-0116-3 doi: 10.1007/s12095-014-0116-3
[15]
K. C. Gupta, S. K. Pandey, I. G. Ray, S. Samanta, Cryptographically significant MDS matrices over finite fields: A brief survey and some generalized results, Adv. Math. Commun., 13 (2019), 779–843. https://doi.org/10.3934/amc.2019045 doi: 10.3934/amc.2019045
[16]
H. Han, C. Tang, Y. Lou, M. Xu, Construction of efficient MDS matrices based on block circulant matrices for lightweight application, Fund. Inform., 145 (2016), 111–124.
[17]
H. M. Heys, S. E. Tavares, The design of substitution-permutation networks resistant to differential and linear cryptanalysis, In Proceedings of the 2nd ACM Conference on Computer and Communications Security, 1994,148–155.
[18]
A. Kesarwani, S. Pandey, S. Sarkar, A. Venkateswarlu, Recursive MDS matrices over finite commutative rings, Discrete Appl. Math., 304 (2021), 384–396. https://doi.org/10.1016/j.dam.2021.08.016 doi: 10.1016/j.dam.2021.08.016
[19]
L. K¨olsch, XOR counts and lightweight multiplication with fixed elements in binary finite fields, Springer, Cham, 11476 (2019), 285–312. https://doi.org/10.1007/978-3-030-17653-2_10
[20]
J. Lacan, J. Fimes, Systematic MDS erasure codes based on Vandermonde matrices, IEEE Commun. Lett., 8 (2004), 570–572. https://doi.org/10.1109/LCOMM.2004.833807 doi: 10.1109/LCOMM.2004.833807
[21]
J. Philip, Circulant matrices, Wiley Press, New York, 1979.
[22]
A. R. Rao, P. Bhimasankaram, Linear algebra, 2 Eds., Hindustan Book Agency, 2000.
[23]
V. Rijmen, J. Daemen, B. Preneel, A. Bosselaers, E. De Win, The cipher SHARK, In: Fast Software Encryption, LNCS, 1039 (1996), 99–111. https://doi.org/10.1007/3-540-60865-6_47
[24]
M. Sajadieh, M. Dakhilalian, H. Mala, P. Sepehrdad, Recursive diffusion layers for block ciphers and Hash functions, In: Fast Software Encryption, LNCS, Springer, Berlin, Heidelberg, 7549 (2012), 385–401.
[25]
S. Sarkar, S. M. Sim, A deeper understanding of the XOR count distribution in the context of lightweight cryptography, In Progress in Cryptology-AFRICACRYPT: 8th International Conference on Cryptology in Africa, Fes, Morocco, Springer International Publishing, 8 (2016), 167–182. https://doi.org/10.1007/978-3-319-31517-1_9
[26]
S. M. Sim, K. Khoo, F. Oggier, T. Peyrin, Lightweight MDS involution matrices, In Fast Software Encryption: 22nd International Workshop, FSE 2015, Istanbul, 2015.
[27]
S. Wu, M. Wang, W. Wu, Recursive diffusion layers for (lightweight) block ciphers and hash functions, In Selected Areas in Cryptography: 19th International Conference, Springer, Berlin, Heidelberg, 2013,355–371. https://doi.org/10.1007/978-3-642-35999-6_23
Shakir Ali, Amal S. Alali, Atif Ahmad Khan, Indah Emilia Wijayanti, Kok Bin Wong. XOR count and block circulant MDS matrices over finite commutative rings[J]. AIMS Mathematics, 2024, 9(11): 30529-30547. doi: 10.3934/math.20241474
Shakir Ali, Amal S. Alali, Atif Ahmad Khan, Indah Emilia Wijayanti, Kok Bin Wong. XOR count and block circulant MDS matrices over finite commutative rings[J]. AIMS Mathematics, 2024, 9(11): 30529-30547. doi: 10.3934/math.20241474
Table 1.
XOR count distribution table for the rings R1 and R2. R1=F2[x]⟨(1+x2+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;α6=1+α2,ai∈F2},R2=F2[x]⟨(1+x4+x6)⟩={a0+a1α+a2α2+a3α3+a4α4+a5α5;α6=1+α4,ai∈F2}. Total XOR count of R1=776, Total XOR count of R2=764.