Abstract
Maximum distance separable (MDS) codes have the maximum branch number in cryptography, and they are generally used in diffusion layers of symmetric ciphers. The diffusion layer of the Advanced Encryption Standard (AES) uses the circulant MDS matrix with the row element of in . It is the simplest MDS matrix in , recorded as . In this paper, we study the more extensive MDS constructions of in . By transforming the element multiplication operation in the finite field into the bit-level operation, we propose a multivariable operation definition based on simple operations, such as cyclic shift, shift, and XOR. We apply this multivariable operation to more lightweight MDS constructions of and discuss the classification of the MDS clusters. We also give an example of the MDS cluster of . Without changing the structure, elements, and the implementation cost of the known MDS matrix, the number of existing MDS transformations is expanded to times that of its original. The constructions in this paper provide rich component materials for the design of lightweight cryptographic algorithms.
1. Introduction
The design of modern cryptographic algorithms generally follows the principles of confusion and diffusion [1]. Diffusion layers are critical components of symmetric ciphers. It is an important means to achieve complex relationships between plaintexts and ciphertexts. By using the diffusion layer, each bit of the plaintext will affect multiple bits of the ciphertext, thus ensuring the security of the cryptographic algorithm. Maximum distance separable (MDS) codes have the maximum number of branches, so they are often used in cryptography to construct optimal diffusion layers of block ciphers, stream ciphers, and hash algorithms. For instance, the diffusion layer of the Advanced Encryption Standard (AES [2]) uses the simplest MDS matrix over , which is a circulant MDS matrix with a row element of in , recorded as . The diffusion layer of SM4 [3] uses the MDS transformation based on a 32-bit rotational-XOR operation. In cryptographic literature, numerous papers [4,5,6,7,8,9,10,11,12,13,14,15,16,17] have studied various aspects of MDS diffusion layers, including their structure, from mathematical viewpoints on rings and fields, as well as minimizing their implementation costs in software and/or hardware applications. For example, Mirzaee et al. [12] placed lightweight multiplication on MDS matrices in fields; Xiang et al. [14,15] proposed MDS matrices as the best implementations produced by various algorithms up to now and [16,17] provided some nonlinear MDS diffusion layers.
Currently, for known MDS matrices on , the operations and quantities are limited by irreducible polynomials in the finite field. In order to obtain more MDS diffusion layers from MDS matrices on fields, it is necessary to change the matrix form or component element, such by as replacing specific elements of the matrix with different primitive elements in the finite field so as to construct different MDS transformations [18]. For these simple MDS matrices, the manner by which to construct many more, and more extensive, MDS transformations, without changing their forms, component elements, and implementation costs, is of particular significance for the enrichment of the cognition of MDS and the improving of the adaptability of MDS diffusion layers.
This paper studies the more extensive MDS construction that is based on the circulant MDS matrix (abbreviated as ). With the aid of introducing a parametric map, defined by transforming the multiplication operation of elements in into bitwise multivariable operation with cyclic shift and XOR, we extend the operation of matrix to obtain more MDS diffusion layers. We use the definition of the multivariable parametric map to obtain more MDS constructions based on , and we propose the connection between MDS clusters and the equivalence classification. Then, examples of the MDS cluster based on over are given. All such MDS constructions proposed in this paper have equally low-cost implementations, and the number of MDS is expanded to times that of the original construction. These constructions we proposed can be widely applied to the design of lightweight cryptographic algorithms which is for the purpose of constraining resources, such as IoTs and wireless communication environments.
2. Notations and Definitions
The binary digit 0 or 1 is called “1 bit” or “bit”. Without losing generality, we specify that the most significant bit of data is always on the far left of its binary digits, and the lowest significant bit of data is always on the rightmost of its binary digits.
Let be the finite field with elements and be the -dimensional linear space over . We denote the multiplication in by and the addition in by . The operation “” represents the left cyclic shift for bits, and “&” denotes bitwise and operation. denotes the -th bit of . “” is the ordinary multiplication function.
For any , the weight (denoted by ) of over is defined as
Let be a map on . The branch number (denoted by , or ) of over is defined as
Definition 1.
Let be a map on . is called MDS (over ) if .
In this paper, we investigate the circulant MDS matrix used in the diffusion layer of AES, which is an MDS transformation with the simplest matrix form on . Its implementation cost is less than 92 XOR logic gates [14]. The circulant MDS matrix on is denoted as .
Let be the input, and be the output; then, the operation of is expressed as follows:
that is,
where both and are -bit, and , .
According to the general understanding, the operations of matrix are multiplication and addition in . For a map on up to the choice of the monic irreducible polynomial of degree , the double multiplication on recorded as has a representation as follows:
Lemma 1.
Suppose that is a monic irreducible polynomial of degree , where . Let , and the corresponding coeffcient is denoted as in . Then,
According to Equation (1), the operation of matrix can be written in the following Equation (2), with a left cyclic shift and XOR operations based on a parameter .
Let , , , ; then, the operation of A is also expressed as follows:
Whether the operation in Equation (2) is an MDS transformation depends on .
Definition 2.
The data is called the MDS-generating element of on , or for short, the MDS-generating element of , if makes Equation (2) into an MDS transformation.
Obviously, the -bit data corresponding to every monic irreducible polynomial in is the MDS-generating element of . It can be predicted that the number of MDS-generating elements of is not less than the number of monic irreducible polynomials of degree , which is indeed the case, as shown in Example 1.
Since the MDS-generating elements of can be obtained according to the operations form of Equation (2), which is no longer limited to irreducible polynomials of degree in , it is necessary to redefine , that is, to define the operation for parameter in as follows:
Next, we show how to generate more MDS transformations using each MDS-generating element of .
Let be a parametric function with two parameter variables about the input . We parametrically extend the operation rule of the of Equation (3) and introduce .
Definition 3.
Let and = , . is defined as
where .
Now we use the operation defined in Equation (4) to replace the operation in . Then, we obtain Equation (5), which is parametric with 3 parameter variables, for , denoted by .
Let the input be , and the output be ; let
Then, is defined as follows:
According to the definition of , set , , then is the operation of in Equation (2). Note that the MDS diffusion layer of AES is the operation of in with the irreducible polynomial , that is, in Equation (5).
In this paper, let be an identity transformation of .
3. Extended Constructions and Theoretical Aspects of the Known MDS
In order to determine whether generates an MDS transformation of on , we have Theorem 1.
Theorem 1.
Let, where. Ifis an even number, thencannot generate an MDS.
Proof of Theorem 1.
According to the definition of , let , , and , . Suppose that ; then, we have
For , while is an even number, if we can find some satisfying , then . According to Definition 1, we know that cannot generate an MDS.
Let , , we have
Now, we define the following permutation (denoted by ) constructed by the corresponding bits’ positions of the binary sequence of the rightmost operand in the operation shown above.
Because is an even number, for there exist two or more permutable subgroups with element , in which the subscripts σ and mean that and belong to different subgroups, respectively.
Suppose . For , we choose the permutable subgroup which contains element and another permutable subgroup with element . Let us investigate the following two cases:
(1) If and , , ,
(2) If and , , .
Since , if , or , and let the other bits be 0, then , and we have . □
According to the proof of Theorem 1, if is an odd number, then the permutable subgroups of degenerate into a full permutation which contains all elements . In this case, if , then we can derive that , or , where . Then, we have Corollary 1.
Corollary 1.
Let be an odd number. If and , then .
Lemma 1.
Let , , in . If makes an MDS, for the input , let
then and .
Proof of Lemma 1.
Let , where is an odd number; then, we have Equation (6), .
According to Corollary 1, we know if . Then, we just need to prove Equation (7) if .
Note that is an MDS; if , then and . So, we have Equation (8).
Let , based on Equation (8), we can obtain Equation (9) if (that is ).
In Equation (9), we can replace the input x with w.
Now, we have and . □
According to Lemma 1, we have Theorem 2.
Theorem 2.
Let,,in. Ifmakesan MDS, for any, assign, thenis an MDS.
Next, we give the construction of composite permutation based on the constructed permutation and inverse permutation , and the transformational relations between and .
Theorem 3.
Let, , inwith . If each ofmakesan MDS, respectively, then there exists a map:→ satisfying.
Proof of Theorem 3.
Now, we construct a map on : for every α and , let parameters be related to Equation (5), which makes hold, and conversely, for every α and , let parameters be related to Equation (5) which makes hold.
Suppose with ; next, we construct a kind of map : → ; this means
Then, we use to define the following permutation ( → ) and its inverse permutation ( → ) about data elements in :
(a) Let the binary digits of be the n-bit input element of , the positions of the data in the sequence , which is the same with all non-zero data mapped from to marked as 1; the other positions are marked as 0, then we can obtain an n-bit position identification value about , denoted by , and define ;
(b) Let the binary digits of be the -bit input element of , the positions of the data in the sequence which is the same with all non-zero data mapped from to marked as 1; the other positions are marked as 0; then we can obtain an -bit position identification value for , denoted by , and define .
For all the , by combining the permutation constructed above with the left cyclic shift operation of Theorem 2, the composite transformation from and “” is obtained, and we have Theorem 3. □
Theorem 3 is the crucial theorem of the current paper. In the latter part, we provide some concrete instances based upon Theorem 3. By combining Theorem 2 and Theorem 3, we obtain Theorem 4.
Theorem 4.
For every parameter of each group, , , , there exists a mapping, which maps each generating elementone by one to, such thatis an MDS.
According to the previous conclusions, for every given parameter group , traverses all MDS-generating elements to make the MDS cluster partition of , and we can obtain the MDS cluster {} of . For every given parameter group . traverses all values to make the MDS cluster partition of , and we can obtain the MDS cluster {} of . Regarding the qualities, we have Proposition 1.
Proposition 1.
Let , , , and be an MDS-generating element of in . For all , the parameter variable generates an MDS equivalence class division of .
We know that the number of -order monic irreducible polynomials is , , and is an Mertens function. On the basis of Theorem 4, we have Corollary 2.
Corollary 2.
According to the number of all possible values of and , the number of the MDS (denoted by ) constructed by of in satisfies , where . Then, the number of existing MDSs is expanded to times that of the original.
Note that the number of the monic irreducible polynomials of degree 8 defined in is equal to 30 by the formula . According to computer searching, there are 36 generating elements of in , which shows that Equations (2) and (5), defined by the bit-level operation, expand the operational connotation of in .
According to the MDS-generating elements of in , by Theorem 4, we obtain that the total number of MDSs constructed by the operation of in is 1152 (= 4 × 8 × 36).
Example 1.
All 36 MDS-generating elements {} of in are listed below.
0x04, 0x16, 0x1a, 0x1c, 0x2a, 0x2c, 0x38, 0x3e, 0x40, 0x4c, 0x54, 0x5e,
0x62, 0x64, 0x68, 0x70, 0x76, 0x7a, 0x86, 0x8a, 0x8c, 0x9e, 0xa2, 0xa8,
0xb0, 0xba, 0xbc, 0xc2, 0xce, 0xd0, 0xd6, 0xdc, 0xe6, 0xf2, 0xf4, 0xf8.
Once we determine the generating elements of in , for all operation of in , by Theorem 2 and Theorem 3, we can obtain the transformational relations between clusters of , and derive the total number of MDSs from .
Example 2.
Based on the 36 data points {} in Example 1, respectively, we can obtain the derived 36 data points {} in , as shown below:
0x40, 0x58, 0x1a, 0x52, 0x8a, 0xc2, 0x92, 0xda, 0x04, 0x46, 0x54, 0x5e,
0x8c, 0xc4, 0x86, 0x94, 0xdc, 0x9e, 0x68, 0x2a, 0x62, 0x7a, 0xa8, 0xa2,
0xb0, 0xba, 0xf2, 0x2c, 0x6e, 0x34, 0x7c, 0x76, 0xec, 0xbc, 0xf4, 0xb6.
Regarding the map definition of Theorem 3, one could verify the correctness of the derived data set shown in Example 2. Then, we show the verification process for the first 2 elements in Example 1, and the other cases are similar.
- For the first element in Example 1, let its binary bits be the input of map ; then, the output is . For , the same with all non-zero data (only “6”) mapped from to are marked as 1, the other positions are marked as 0; then, we can obtain the n-bit position identification value as .
- For the second element in Example 1, let its binary bits be the input of map ; then, the output is . For , the same with all non-zero data “4, 6, 7” mapped from to are marked as 1; the other positions are marked as 0. Then, we can obtain the n-bit position identification value as .
4. Conclusions
The circulant MDS matrix used in the diffusion layer of the AES algorithm is simple and efficient. Based on the known lightweight MDS matrix on , by constructing permutation-based parameters, we can obtain a large number of lightweight parametrical MDS transformations, which expands the design idea of MDS from static to dynamic and increases the number of MDSs from a single one to a large batch at one time. The constructions in this paper provide rich component materials for the design of lightweight cryptographic algorithms, which have low-cost implementations for the purpose of constraining resources, such as IoT and wireless communication environments.
Author Contributions
Methodology, J.-B.W.; Writing—review & editing, Y.W. and Y.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the National Key R&D Program of China (Program number: No. 2020YFC1522900) and the Sichuan Science and Technology Program (Program numbers: Nos. 2020JDJQ0076 and 2021ZYD0011).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Informed consent was obtained from all subjects involved in the study.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare that there are no conflict of interest.
References
- Shannon, C.E. Communication theory of secrecy systems. Bell Syst. Tech. J. 1949, 28, 656–715. [Google Scholar] [CrossRef]
- Daemen, J.; Rijmen, V. The Design of Rijndael: AES. The Advanced Encryption Standard. Information Security and Cryptography; Springer: Berlin/Heidelberg, Germany, 2002. [Google Scholar]
- Specification of SMS4, Block Cipher for WLAN Products-SMS4 (In Chinese) [EB/OL]. Available online: https://sca.gov.cn/sca/c100061/201611/1002423/files/330480f731f64e1ea75138211ea0dc27.pdf, (accessed on 18 November 2016).
- Cui, T.; Jin, C.; Kong, Z. On compact cauchy matrices for substitution-permutation networks. IEEE Trans. Comput. 2015, 64, 2098–2102. [Google Scholar] [CrossRef]
- Gupta, K.C.; Pandey, S.K.; Venkateswarlu, A. Almost involutory recursive MDS diffusion layers. Des. Codes Cryptogr. 2019, 87, 609–626. [Google Scholar] [CrossRef]
- Güzel, G.G.; Sakallı, M.T.; Akleylek, S.; Rijmen, V.; Çengellenmi, Ş. A new matrix form to generate all 3 × 3 involutory MDS matrices over. Inf. Processing Lett. 2019, 147, 61–68. [Google Scholar] [CrossRef]
- Li, Y.; Wang, M. On the Constructions of Lightweight Circulant Involutory MDS Matrices. In Proceedings of the Fast Software Encryption—23rd International Conference, FSE 2016, LNCS 9783, Bochum, Germany, 20–23 March 2016; Springer: Berlin/Heidelberg, Germany, 2016; Volume 5, pp. 121–139. [Google Scholar]
- Liu, M.; Sim, S.M. Lightweight MDS generalized circulant matrices. In Proceedings of the Fast Software Encryption 23rd International Conference. FSE 2016, Bochum, Germany, 20–23 March 2016; pp. 101–120, Revised Selected Papers. [Google Scholar]
- Dong, X.; Hu, J. Design and Analysis of Lightweight Linear MDS Transformation. Commun. Technol. 2018, 51, 653–658. [Google Scholar]
- Wang, J. The optimal permutation in cryptography based on cyclic-shift linear transform. China Crypt. 2007, c2007, 306–307. [Google Scholar]
- Sébastien, D.; Gaëtan, L. MDS Matrices with Lightweight Circuits. IACR Trans. Symmetric Cryptol. 2018, 2018, 48–78. [Google Scholar]
- Christof, B.; Thorsten, K.; Gregor, L. Lightweight Multiplication in GF(2n) with Applications to MDS Matrices; CRYPTO 2016. LNCS 9814; Springer: Berlin/Heidelberg, Germany, 2016; pp. 625–653. [Google Scholar]
- Shirai, T.; Shibutani, K. Improving Immunity of Feistel Ciphers against Differential Cryptanalysis by Using Multiple MDS Matrices; Roy, B., Meier, W., Eds.; FSE 2014, LNCS 3017; Springer: Berlin/Heidelberg, Germany, 2014; pp. 260–278. [Google Scholar]
- Xiang, Z.; Zeng, X.; Lin, D.; Bao, Z.; Zhang, S. Optimizing Implementations of Linear Layers. IACR Trans. Symmetric Cryptol. 2020, 2, 120–145. [Google Scholar] [CrossRef]
- Lin, D.; Xiang, Z.; Zeng, X.; Zhang, S. A Framework to Optimize Implementations of Matrices. In Proceedings of the CT-RSA 2021: Cryptographers’ Track at the RSA Conference 2021, San Francisco, CA, USA, 17–20 May 2021; pp. 609–632. [Google Scholar]
- Shamsabad, M.R.M.; Dehnavi, S.M.; Rishakani, A.M. Randomized Nonlinear Software oriented MDS Diffusion Layers. Groups Complex. Cryptol. 2019, 11, 123–131. [Google Scholar] [CrossRef]
- Shanmsabad, M.R.M.; Dehnavi, S.M. A Family of Nonlinear MDS Diffusion Layers. Groups Complex. Cryptol. 2019, 11, 123–131. [Google Scholar] [CrossRef]
- Wu, Y.; Dong, X.-F.; Wang, J.-B.; Zhang, W.-Z. Construction of MDS Matrices Based on the Primitive Elements of the Finite Field. In Proceedings of the 2021 International Conference on Networking and Network Applications (NaNA), Lijiang, China, 29 October 2021—1 November 2021; IEEE: Piscataway Township, NJ, USA, 2021; pp. 485–488. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).