Construction of all MDS and involutory MDS matrices
Yogesh Kumar, P. R. Mishra, Susanta Samanta, Kishan Chand Gupta, Atul Gaur
TL;DR
This work tackles the problem of enumerating all $n\times n$ MDS and involutory MDS matrices over $\mathbb{F}_{p^m}$ by introducing a hybrid construction that relies on a representative matrix $M_1$ and diagonal scaling $D_1,D_2$, reducing the search from $n\times n$ matrices to $(n-1)\times(n-1)$ submatrices. It establishes a unique factorization $M=D_1M_1D_2$ and provides necessary and sufficient conditions for $\Phi(D_1,D_2,M_1)$ to be involutory, including explicit forms for $D_1,D_2$ in terms of $M_1$. The paper delivers exact counting formulas for $3\times3$ MDS matrices over $\mathbb{F}_{2^m}$, and provides concrete counts for $4\times4$ MDS and involutory MDS matrices over $\mathbb{F}_{2^m}$ for $m=3,4$, illustrating the practical scalability of the approach. These results enable efficient diffusion-layer design in cryptographic primitives and lay groundwork for extensions to larger orders and broader fields in future work.
Abstract
In this paper, we propose two algorithms for a hybrid construction of all $n\times n$ MDS and involutory MDS matrices over a finite field $\mathbb{F}_{p^m}$, respectively. The proposed algorithms effectively narrow down the search space to identify $(n-1) \times (n-1)$ MDS matrices, facilitating the generation of all $n \times n$ MDS and involutory MDS matrices over $\mathbb{F}_{p^m}$. To the best of our knowledge, existing literature lacks methods for generating all $n\times n$ MDS and involutory MDS matrices over $\mathbb{F}_{p^m}$. In our approach, we introduce a representative matrix form for generating all $n\times n$ MDS and involutory MDS matrices over $\mathbb{F}_{p^m}$. The determination of these representative MDS matrices involves searching through all $(n-1)\times (n-1)$ MDS matrices over $\mathbb{F}_{p^m}$. Our contributions extend to proving that the count of all $3\times 3$ MDS matrices over $\mathbb{F}_{2^m}$ is precisely $(2^m-1)^5(2^m-2)(2^m-3)(2^{2m}-9\cdot 2^m+21)$. Furthermore, we explicitly provide the count of all $4\times 4$ MDS and involutory MDS matrices over $\mathbb{F}_{2^m}$ for $m=2, 3, 4$.
