Abstract
The optimal security parameters for binary linear complementary pair (LCP) codes are open. Inspired by this, we study LCPs of codes. In this paper, we construct two families of optimal binary LCPs of codes.
MSC:
94B05
1. Introduction
Let q be a prime power and let denote the finite field with q elements. A pair of linear codes of length n over is called a linear complementary pair (LCP) [1] if their direct sum produces a full space . is an LCP of codes, which means that the two codes have complementary dimensions and a trivial intersection. If the dimension of is k, then is called an LCP of codes. In special cases, when is an LCP of codes, is called a linear complementary dual (LCD) code. In recent years, there has been a lot of research on LCD codes (see [2,3,4,5,6,7,8,9,10,11]), but there is relatively little research specifically focused on the LCPs of codes. The LCD and LCPs of codes have been used in the framework of direct sum masking and haves been proposed as countermeasures against side channel attacks (SCAs) and fault injection attacks (FIAs) ([12,13,14]). In this application, the minimum distance is used to measure protection against FIA, whereas the minimum distance of the dual of the second code is used to measure protection against SCA. The joint security against the two attacks is provided by , which is known as the security parameter of the LCP of codes. Note that in the case of an LCD code , the security parameter is only .
Carlet et al. [15] proved that there is a monomial transformation (equivalence) on such that is LCP, where is a nonbinary linear code on . In this case, the security parameter is only d, where . Therefore, the best security parameter problem for the nonbinary LCP of codes is settled. In addition, the same article showed that an binary code can produce a binary LCP of codes with . Therefore, the best security parameter for binary LCPs of codes is open for further study. We set
Let represent the highest minimum distance among binary LCD codes, and represent the highest minimum distance among binary linear codes; then,
If the minimum distance of an linear code is , then we say the linear code is optimal. If the security parameter of an LCP of codes is , then we say the LCP of codes is optimal.
The results in [15] yielded that . For or , the best security parameters of binary LCPs of codes were determined in [16]. Moreover, the authors described a sufficient condition for and gave a conjecture of a necessary condition. An infinite family of optimal binary LCPs of codes were constructed from Solomon–Stiffler codes by Gneri [17]. Li et al. [18] solved an open problem proposed by Carlet et al. [15] and showed a conjecture proposed by Choi et al. [16]. Moreover, the authors also studied linear complementary pairs of codes in [19,20].
2. Preliminaries
Definition 1
(Walsh spectrum). If , the Walsh transform of is defined as
Lemma 1
([21]). Let , then and if and only if , where , and .
Lemma 2.
For any k-dimensional subspace E of ,
where .
Lemma 3
([22]). For any positive integer k and arbitrary , the Walsh spectrum of defined on can take any value divisible by 4 in the range .
The following is the well-known Griesmer bound on the length of a linear code.
Lemma 4
(Griesmer bound). For any linear code over
, we have
where denotes the smallest integer greater than or equal to x.
For any binary linear code, if , then we say that this code meets the Griesmer bound. In general, a binary linear code is called optimal if there is no binary linear code with parameters [23]. We can easily verify that any linear code meeting the Griesmer bound is optimal. In this paper, we focus on optimizing the largest d for the binary linear code with a given length n and dimension .
For an binary linear code, we say that this code is distance-optimal if there is no linear code over . When the lengths and dimensions of linear codes are fixed, there are many references on finding the largest d—see [23,24,25,26], for instance—and in these references, the same notation “distance-optimal” has been mentioned. Any binary linear code is distance-optimal provided that
3. Two Families of Optimal Binary LCPs of Codes
Let be any integer and denote the trace function from onto , denote the trace function from onto , and denote the trace function from onto . Following the approach in [27], for any set , we define a linear code of length n over by
and call D the defining set of .
In fact, , where and in , and the Euclidean inner product of and is defined by
Hence , where G is an matrix over constructed by the column vectors , i.e., .
In this paper, G is called a generalized generator matrix of a linear code of length n over .
Construction 1.
Let α be a primitive element of , i.e., . Let be a one-to-one map from to , and . Let , , and be a t-subset of . For , . Define
Using and as defining sets, we obtain binary linear codes and as
Remark 1.
Let and be the generator matrices of and . It is clear that and in construction 1 can be transformed into each other through column transformation (rearranging column vectors). Hence and are always equivalent in Construction 1.
Theorem 1.
In Construction 1, the linear codes and are binary linear codes with parameters . Moreover, the weight distribution of and are given in Table 1.
Table 1.
The weight distribution of and in Theorem 1.
Proof.
It is clear that the binary linear codes and have length . The Hamming weight of a nonzero codeword of can be calculated as follows:
where can be viewed as a k-dimensional vector space over .
By Lemmas 1 and 2, we have
Since the Hamming weight of any nonzero codeword is not equal to 0, then we get that the dimension of is .
By similar arguments as , we can obtain the weight distribution of is same to . This completes the proof of this theorem. □
Theorem 2.
If , then the linear codes and defined in Theorem 1 are distance-optimal with respect to the Griesmer bound.
Proof.
By Lemma 4, we only need to prove that
Note that
Then we get that
for . This completes the proof. □
Lemma 5.
The linear codes and defined in Theorem 1. Then is LCP if and only if , where and , .
Proof.
is an LCP of codes means that the two codes have complementary dimensions, and they have a trivial intersection. By Theorem 1, it is clear that the dimension of is equal to and the dimension of is equal to . Next, we just need to prove .
if and only if , s.t. , where .
Define where
Hence if and only if s.t. is odd, so if is odd, then is LCP.
where and .
When , is odd, hence is LCP. This completes the proof. □
Theorem 3.
The linear codes and are defined in Theorem 1. If and , where and , , then is an optimal binary LCP of codes.
Proof.
By Theorem 6, . Combining Lemma 5, it is clear that is an optimal binary LCP of codes. □
3.1. A Family of Optimal Binary LCPs of Codes from
Theorem 4.
The linear codes and defined in Theorem 1. Let be the inverse function of . When , is an optimal binary LCP of codes.
Proof.
By Lemmas 3, 5 and Theorem 6, it is clear that is an optimal binary LCP of codes. □
Example 1.
The linear codes and are defined in Theorem 4. Let be the inverse function of . Let . With the help of Magma, we obtain that and are linear codes with weight enumerator and is distance-optimal with respect to the Griesmer bound. Note that and are equivalent. Moreover, , and is an optimal binary LCP of codes.
Construction 2.
Let α be a primitive element of , i.e., . Let be a one-to-one map from to , and . Let , , and be a -subset of . For , . Define
Using and as defining sets, we obtain binary linear codes and as
Remark 2.
Let and be the generator matrices of and . It is clear that and in Construction 2 can be transformed into each other through column transformation (rearranging column vectors). Hence and are always equivalent in Construction 2.
Theorem 5.
In Construction 2, the linear codes and are binary linear codes with parameters . Moreover, the weight distributions of and are given in Table 2.
Table 2.
The weight distribution of and in Theorem 5.
Proof.
It is clear that the binary linear codes and have lengths . The Hamming weight of a nonzero codeword of can be calculated as follows:
where can be viewed as a k-dimensional vector space over .
By Lemma 2, we have
Since the Hamming weight of any nonzero codeword is not equal to 0, then we get that the dimension of is .
By similar arguments as for , we can obtain that the minimum distance of is same to . This completes the proof of this theorem. □
Theorem 6.
The linear codes and defined in Theorem 5 are distance-optimal with respect to the Griesmer bound.
Proof.
By Lemma 4, we only need to prove that
Note that
Then we get that
This completes the proof. □
Lemma 6.
The linear codes and are defined in Theorem 5. Then is LCP if and only if the following conditions holds:
- if ,
- if ,
where and , .
Proof.
By Theorem 5, it is clear that the dimension of is equal to and the dimension of is equal to . Next, we just need to prove .
Define where
Since if and only if s.t. is odd, so if is odd, then is LCP.
where and , .
Hence is LCP if and only if the following conditions holds:
- if ,
- if ,
where and , .
This completes the proof. □
Theorem 7.
The linear codes and are defined in Theorem 5. If satisfies the conditions of Lemma 6, then is an optimal binary LCP of codes.
Proof.
By Theorem 6, . Combining Lemma 6, it is clear that is an optimal binary LCP of codes. □
3.2. A Family of Optimal Binary LCPs of Codes from
Theorem 8.
The linear codes and are defined in Theorem 5. If is the function of , then is an optimal binary LCP of codes.
Proof.
By Lemmas 3, 6 and Theorem 7, it is clear that is an optimal binary LCP of codes. □
Example 2.
The linear codes and defined in Theorem 8. Let be the function of . Let . With the help of Magma, we obtain that and are linear codes with weight enumerator and are distance-optimal with respect to the Griesmer bound. Note that and are equivalent. Moreover, , and is an optimal binary LCP of codes.
4. Conclusions
The best security parameter for binary LCPs of codes is open for further study. This is the motivation of our work. In this paper, we studied binary LCPs of codes and constructed two families of optimal binary LCPs of codes.
Author Contributions
Funding acquisition, X.L.; Methodology, X.L.; Supervision, X.L.; Writing—original draft, Z.L. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by National Trusted Embedded Software Engineering Technology Research Center (East China Normal University), funded by Open Foundation of Hubei Key Laboratory of Applied Mathematics (Hubei University) and National Natural Science Foundation of China (No. 12301668).
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
The authors would like to thank the referees and editors for their very useful suggestions, which significantly improved this paper.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Carlet, C.; Güneri, C.; Özbudak, F.; Özkaya, B.; Solé, P. On linear complementary pairs of codes. IEEE Trans. Inf. Theory 2018, 64, 6583–6589. [Google Scholar] [CrossRef]
- Araya, M.; Harada, M. On the minimum weights of binary linear complementary dual codes. Cryptogr. Commun. 2020, 12, 285–300. [Google Scholar] [CrossRef]
- Araya, M.; Harada, M.; Saito, K. Characterization and classification of optimal LCD codes. Des. Codes Cryptogr. 2021, 89, 617–640. [Google Scholar] [CrossRef]
- Araya, M.; Harada, M.; Saito, K. On the minimum weights of binary LCD codes and ternary LCD codes. Finite Fields Appl. 2021, 76, 101925. [Google Scholar] [CrossRef]
- Bouyuklieva, S. Optimal binary LCD codes. Des. Codes Cryptogr. 2021, 89, 2445–2461. [Google Scholar] [CrossRef]
- Carlet, C.; Mesnager, S.; Tang, C.; Qi, Y.; Pellikaan, R. Linear codes over are equivalent to LCD codes for q > 3. IEEE Trans. Inf. Theory 2018, 64, 3010–3017. [Google Scholar] [CrossRef]
- Fu, Q.; Li, R.; Fu, F.; Rao, Y. On the construction of binary optimal LCD codes with short length. Int. J. Found. Comput. Sci. 2019, 30, 1237–1245. [Google Scholar] [CrossRef]
- Galvez, L.; Kim, J.L.; Lee, N.; Roe, Y.G.; Won, B.S. Some bounds on binary LCD codes. Cryptogr. Commun. 2018, 10, 719–728. [Google Scholar] [CrossRef]
- Harada, M. Construction of binary LCD codes, ternary LCD codes and quaternary Hermitian LCD codes. Des. Codes Cryptogr. 2021, 89, 2295–2312. [Google Scholar] [CrossRef]
- Harada, M.; Saito, K. Binary linear complemetary dual codes. Cryptogr. Commun. 2019, 11, 677–696. [Google Scholar] [CrossRef]
- Li, S.; Shi, M.; Liu, H. Several constructions of optimal LCD codes over small finite fields. Cryptogr. Commun. 2024, 16, 779–800. [Google Scholar] [CrossRef]
- Bringer, J.; Carlet, C.; Chabanne, H.; Guilley, S.; Maghrebi, H. Orthogonal direct sum masking: A smartcard friendly computation paradigm in a code, with Builtin protection against side-channel and fault attacks. Proc. WISTP Lect. Notes Comput. Sci. 2014, 8501, 40–56. [Google Scholar]
- Carlet, C.; Guilley, S. Complementary dual codes for counter-measures to side-channel attacks. Adv. Math. Commun. 2016, 10, 131–150. [Google Scholar] [CrossRef]
- Ngo, X.T.; Bhasin, S.; Danger, J.; Guilley, S.; Najm, Z. Linear complementary dual code improvement to strengthen encoded circuit against hardware Trojan horses. In Proceedings of the IEEE International Symposium on Hardware Oriented Security Trust (HOST), Washington, DC, USA, 5–8 May 2015; pp. 82–87. [Google Scholar]
- Carlet, C.; Mesnager, S.; Tang, C.; Qi, Y. On σ-LCD codes. IEEE Trans. Inf. Theory 2019, 65, 1694–1704. [Google Scholar] [CrossRef]
- Choi, W.H.; Güneri, C.; Kim, J.L.; Özbudak, F. Optimal binary linear complementary pairs of codes. Cryptogr. Commun. 2023, 15, 469–486. [Google Scholar] [CrossRef]
- Güneri, C. Optimal binary linear complementary pairs from Solomon Stiffler codes. IEEE Trans. Inf. Theory 2023, 69, 6512–6517. [Google Scholar] [CrossRef]
- Li, S.; Shi, M.; Ling, S. An open problem and a conjecture on binary linear complementary pairs of codes. IEEE Trans. Inf. Theory 2025, 71, 219–226. [Google Scholar] [CrossRef]
- Anderson, S.E.; Camps-Moreno, E.; López, H.H.; Matthews, G.L.; Ruano, D.; Soprunov, I. Relative Hulls and Quantum Codes. IEEE Trans. Inf. Theory 2024, 70, 3190–3201. [Google Scholar] [CrossRef]
- Bhowmick, S.; Dalai, D.K.; Mesnager, S. On Linear Complementary Pairs of Algebraic Geometry Codes over Finite Fields. Discret. Math. 2024, 347, 114193. [Google Scholar] [CrossRef]
- Li, X.; Yue, Q.; Tang, D. A family of linear codes from constant dimension subspace codes. Des. Codes Cryptogr. 2022, 90, 1–15. [Google Scholar] [CrossRef]
- Lachaud, G.; Wolfmann, J. The weights of the orthogonals of the extended quadratic binary Goppa codes. IEEE Trans. Inf. Theory 1990, 36, 686–692. [Google Scholar] [CrossRef]
- Huffman, W.C.; Pless, V. Fundamentals of Error-Correcting Codes; Cambridge University Press: Cambridge, UK, 2003. [Google Scholar]
- Li, X.; Fan, C.; Du, X. A family of distance-optimal minimal linear codes with flexible parameters. Cryptogr. Commun. 2020, 12, 559–567. [Google Scholar] [CrossRef]
- Tang, D.; Fan, C. A class of distance-optimal binary linear codes with flexible parameters. IEEE Commun. Lett. 2017, 21, 1893–1896. [Google Scholar] [CrossRef]
- Wu, Y.; Zhu, X.; Yue, Q. Optimal few-weight codes from simplicial complexes. IEEE Commun. Lett. 2020, 66, 3657–3663. [Google Scholar] [CrossRef]
- Ding, C. Linear codes from some 2-designs. IEEE Trans. Inf. Theory 2015, 61, 3265–3275. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 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/).