Abstract
Linear complexity is an important pseudo-random measure of the key stream sequence in a stream cipher system. The 1-error linear complexity is used to measure the stability of the linear complexity, which means the minimal linear complexity of the new sequence by changing one bit of the original key stream sequence. This paper contributes to calculating the exact values of the linear complexity and 1-error linear complexity of the binary key stream sequence with two prime periods defined by Ding–Helleseth generalized cyclotomy. We provide a novel method to solve such problems by employing the discrete Fourier transform and the M–S polynomial of the sequence. Our results show that, by choosing appropriate parameters p and q, the linear complexity and 1-error linear complexity can be no less than half period, which shows that the linear complexity of this sequence not only meets the requirements of cryptography but also has good stability.
MSC:
94A55
1. Introduction
Stream cipher is an important encryption system, which has been widely used in the military, diplomacy, and other fields. The security of a stream cipher mainly depends on the pseudo-random property, including the linear complexity of the key stream sequences. If the binary sequence with the symbols in satisfying where L is a positive integer, , and denotes the finite field of order 2, then the least L is called the linear complexity of the sequence , denoted by , which is the length of the shortest linear feedback shift register (LFSR) that can generate this sequence [1,2]. The famous BM algorithm shows that the whole sequence with period N can be recovered by the successive terms, so is required to be not less than [3]. Ding and Helleseth introduced a new generalized cyclotomic class of order two and defined the new generalized cyclotomic sequences from them in 1998. Many modified versions of the sequence were considered after that [4]. In 2005, the linear complexity and the minimal polynomial of the new generalized cyclotomic sequences of order two of period were determined by Bai and He et al., where are distinct odd primes [5,6]. In 2008, Du et al. provided the linear complexity of Ding–Helleseth generalized cyclotomic sequences of arbitrary order by their trace representation [7]. In 2019, a modified version of Ding–Helleseth generalized cyclotomic sequences of order two were presented and the 2-adic linear complexity was demonstrated to be sufficient [8].
The k-error linear complexity was defined as the smallest value of linear complexity that can be obtained by changing at most k terms of the sequence in the first period and periodically continued [9], which is an important measure of the stability of linear complexity. Please refer to the literature for the research on k-error linear complexity [1,2,10,11,12]. Zhou and Liu studied the k-error linear complexity of binary sequences by using the cube theory [13]. Chang and Ke studied the properties of the error linear complexity spectrum of binary sequences with the period of a power of two [14]. Xiao et al. introduced a new family of binary generalized cyclotomic sequences of period for an odd prime p [15]. Then, Wu et al. calculated the k-error linear complexity of the sequences [16]. Alecu and Sălăgean transformed the calculation of the k-error linear complexity into the calculation of the Hamming weight of the discrete Fourier transform (DFT) spectrum of the sequence by Blahut’s theorem [17]. In 2019, Chen and Wu discussed the k-error linear complexity for Legendre, Ding–Helleseth–Lam, and Hall’s sextic residue sequences of odd prime period p by this method [18]. In 2022, Wu provided the k-error linear complexity of q-ary Euler quotient sequences [19] and Pazilaiti et al. determined the linear complexity and the 1-error linear complexity of some Whiteman generalized cyclotomic binary sequences [20].
This paper determines the linear complexity and the 1-error linear complexity of a class of Ding–Helleseth generalized cyclotomic sequences s of order two of period . First of all, we introduce some related algebraic preliminaries and the construction of the sequence in Section 2, and then present the M–S polynomial over an extension field of , from whose coefficient sequence we obtain its DFT spectrum, and then the linear complexity is calculated as the Hamming weight of the DFT spectrum in Section 3. In Section 4, by a similar approach, we calculate the minimal linear complexity of the sum sequence of the sequence s and the error sequence e of the Hamming weight not more than 1; actually, it is just the 1-error linear complexity of the sequence. Section 5 concludes the main results and presents a discussion about the implementation and application of this sequence finally.
2. Preliminary
The sequence with the period N is often defined as
where the subset D of the residue class ring is called the defining set of the sequence s. Thus, constructing a binary sequence of period N is actually equivalent to defining a binary partition of .
Now, we consider the case , where p and q are two odd primes larger than 3 with the greatest common divisor and . It is guaranteed by Chinese Remainder Theorem that there exists a common primitive root g of both p and q, such that , where denotes the multiplicative order of g modulo N. The set of all invertible elements of [21] can be provided by
where x satisfies and .
Some subsets of are defined as
where . Denote
where .
It is obvious that
Then, consists of all the quadratic residues of modulo q, where , and consist of all the quadratic residues of modulo p and consists of all the quadratic nonresidues of modulo p. Similarly, by the fact that
Then, consists of all the quadratic nonresidues of modulo q, where , and consist of all the quadratic nonresidues of modulo p and consists of all the quadratic residues of modulo p. Ding and Helleseth defined the generalized cyclotomic classes as , and the subsets , . Thus, the partition of can be denoted as
and . It is clear that , , and .
Define the Ding–Helleseth generalized cyclotomic sequence of order two with the defining set [5,22]. It is obvious that this sequence possesses the property of the balance of the symbols “0” and “1”. This paper first contributes to calculation of the linear complexity of s by its DFT spectrum and M–S polynomial.
3. Linear Complexity and Discrete Fourier Transform
The DFT spectrum of s is provided by
where is a primitive N-th root of unity and m is the order of 2 modulo, the odd number N. Blahut’s Theorem [23] shows that the linear complexity of s is equal to the Hamming weight of its DFT spectrum, namely
where # means the cardinality of the set, which is also equal to , which denotes the number of nonzero terms of the Mattson–Solomon polynomial (M–S polynomial) [24] of s obtained by
It is noted that, based on the inverse DFT [25], the sequence can be provided by
In the remainder of this paper, denote and , where .
Lemma 1
([26]). Let p and q be distinct odd primes.
- 1.
- If , then .
- 2.
- If , then .
- 3.
- If , then .
- 4.
- If , then .
Lemma 2.
Let p and q be distinct odd primes.
- 1.
- if and only if
- 2.
- if and only if
- 3.
- if and only if
Proof.
If , by the definition of g, we have
where and are positive integers. Hence, is a quadratic residue modulo p and a quadratic nonresidue modulo q. Thus, . The rest can be proved similarly. □
Lemma 3
([27]). Let p and q be distinct odd primes. If , then , for .
Lemma 4.
Let p and q be distinct odd primes.
- 1.
- If , then , .
- 2.
- If , then , .
Proof.
The proof is obvious since and are all quadratic residues and quadratic nonresidues of modulo p, respectively. □
Lemma 5
([27]). Let p and q be distinct odd primes.
Lemma 6
([5]). Let p and q be distinct odd primes.
- If , then
- If , then
Theorem 1.
Let and , where . Then, the results of computing by DFT are shown in Table 1.
Table 1.
The 1-error linear complexity of s.
Proof.
If , by Lemmas 3 and 4, we have
If , by Lemmas 3 and 4, we have
for . Note that
So, we first consider the case
and the remaining cases can be provided similarly.
Let ; then, by Lemmas 3–6,
where
In the following, the numbers of the nonzero terms of will be considered, respectively.
If , by Lemma 4, we have
As far as Lemma 5 is concerned, we have
If , by Lemmas 4 and 5, we have
And, by Lemma 5, we have
If , by Lemmas 3 and 5, we have
If , by Lemmas 3 and 5, we have
Thus, we have
So, we have
Since , by Lemma 3, we have
and
If
then,
If
it can be similarly proved that
Thus, in detail, we always have
By Equations (7) and (11)–(13), for the case , we have
From the above discussion, we can see that all s lie in or , and the latter case means that half the number of s are 0 and the other half are 1. So, even if each changes into , just as in Equation (7), the same can be obtained for the case . Thus, all the linear complexity can be provided as the list in Table 1. □
Now, the linear complexity of s is provided by its DFT spectrum and M–S polynomial. More interestingly, this approach can be extended to calculate the 1-error linear complexity of this sequence as in the following section, which is the main contribution of this paper.
4. The 1-Error Linear Complexity
Let be the new sequence obtained by changing at most 1 term of the original sequence s such that , where is the N periodic error sequence. The 1-error linear complexity of s
where is the Hamming weight of e.
Let and be the M–S polynomials of e and periodically and and be the DFTs of them. Then, from Equations (3) and (5), we have
Hence,
By Equation (6) and the definition of , the M–S polynomial
We assume that for some and for in the first period of e. Then, the DFT of the 1-error sequence is
Specifically, if , then for all ; otherwise, , , and the order of is a divisor of N for .
Theorem 2.
Let and , where . Then, the 1-error linear complexity of s is shown in Table 2.
Table 2.
The 1-error linear complexity of s.
Proof.
According to Lemmas 3 and 4 and the proof of Theorem 1, we can make the following assumption that
for ;
for , where ; we can also select that
for ;
for , where ; and we can also select that
We first consider the case .
For the subcase and , by Lemmas 2–6, Equation (15), and the proof of Theorem 1, we have
Thus, its coefficient for can be provided as
If , then for all . Thus, for all , and otherwise. So, . If , and the order of is a divisor of N for . So, possesses the order of or for . Note that possesses the order of . Thus, for all and . So, . Based on the above discussion, the 1-error linear complexity .
For the subcases and , and and , it is very similar to obtain , respectively.
Next, we consider the case .
For the subcase and , by Lemmas 2–6, Equation (15), and the proof of Theorem 1, we have
Thus, its coefficient for can be provided as
Based on a similar discussion following Equation (19), we have the 1-error linear complexity .
For the subcases and , and and , it is very similar to obtain , respectively.
Next, we consider the case .
For the subcase and , by Lemmas 2–6, Equation (15), and the proof of Theorem 1, we have
Thus, its coefficient for can be provided as
Based on a similar discussion following Equation (19), the 1-error linear complexity .
For the subcases and , and and , it is very similar to obtain , respectively.
Next, we consider the case .
For the subcase and , by Lemmas 2–6, Equation (15), and the proof of Theorem 1, we have
Thus, its coefficient for can be provided as
Based on a similar discussion following Equation (19), the 1-error linear complexity .
For the subcases and , and and , it is very similar to obtain , respectively. □
5. Conclusions
In this paper, the exact values of linear complexity and the 1-error linear complexity of a Ding–Helleseth generalized cyclotomic sequence of order two of period are calculated by using its DFTs and M–S polynomial. From the proof process of Theorems 1 and 2, we can include that this method, compared to the other existing methods, is suitable for the calculation of the linear complexity and 1-error linear complexity of binary sequences whose exact values regarding the DFT spectrum can be obtained, and this method can also be used to estimate the k-error linear complexity of these sequences for the other cases of small k.
In practical applications, in order to obtain a large-period key stream sequence, the values of p and q should be large enough. So, the results in Theorems 1 and 2 show that, no matter the choice regarding the parameters p and q, both the linear complexity and the 1-error linear complexity are not much less than , and the linear complexity can even reach the bounds for the cases , or . Moreover, by comparing the results of Theorems 1 and 2, we find that is only 1 lower than . Therefore, we can conclude that this sequence as a key stream satisfies the cryptographic requirements in terms of linear complexity and its stability index.
For the application, we are concerned with the implementation of a generator that can produce this sequence. A hardware implementation of a similar sequence was described in [28]. It possesses a performance estimated to be 30 kbytes/s when p and q are about 48 bits and was suggested for military and diplomatic applications. The sequences studied in this paper can be similarly efficient and hardware-generated, and can also have similar applications.
Author Contributions
C.Y. completed the overall part of the article, and C.T. provided data and experimental support. Conceptualization, C.T.; Writing original draft, C.T.; Formal analysis, C.Y. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The raw data supporting the conclusions of this article will be made available by the authors on request.
Acknowledgments
We would like to express our sincere gratitude to two kind reviewers and Yansheng Wu. Their constructive comments have been of great assistance in improving the writing of this article. Their insightful suggestions and meticulous feedback have significantly enhanced the quality and clarity of our work. We are truly indebted to their dedication and expertise and extremely grateful for their valuable help.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Cusick, T.W.; Ding, C.; Renvall, A. Stream Ciphers and Number Theory; Elsevier Science: Amsterdam, The Netherlands, 2004. [Google Scholar]
- Niu, Z.; Yuan, C.; Chen, Z.; Du, X.; Zhang, T. On the k-error linear complexity of 2p2-periodic binary sequences. Sci. China Inf. Sci. 2020, 63, 199101. [Google Scholar] [CrossRef]
- Massey, J. Shift-register synthesis and BCH decoding. IEEE Trans. Inform. Theory 1969, 15, 122–127. [Google Scholar] [CrossRef]
- Yan, M.; Yan, T.; Li, Y. Computing the 2-adic complexity of two classes of Ding-Helleseth generalized cyclotomic sequences of periods of twin prime products. Cryptogr. Commu. 2021, 13, 15–26. [Google Scholar] [CrossRef]
- Bai, E.; Liu, X.; Xiao, G. Linear complexity of new generalized cyclotomic sequences of order two of length pq. IEEE Trans. Inf. Theory 2005, 51, 1849–1853. [Google Scholar] [CrossRef]
- He, X.; Chen, Y.; Zhao, G. (p + 1)/2-error linear complexity of generalized cyclotomic sequences. In ChinaCrypt2008; Chinese Association for Cryptologic Research: Wuhan, China, 2008; pp. 172–177. (In Chinese) [Google Scholar]
- Du, X.; Yan, T.; Xiao, G. Trace representation of some generalized cyclotomic sequences of length pq. Inf. Sci. 2008, 178, 3307–3316. [Google Scholar] [CrossRef]
- Sun, S.; Yan, T.; Sun, Y.; Yan, M. Computing the 2-Adic complexity of two classes generalized cyclotomic sequences. IEEE Access 2020, 8, 140478–140485. [Google Scholar] [CrossRef]
- Stamp, M.; Martin, C.F. An algorithm for the k-error linear complexity of binary sequences with period 2n. IEEE Trans. Inf. Theory 1993, 39, 1398–1401. [Google Scholar] [CrossRef]
- Wu, C.; Edemskiy, V.; Xu, C. On k-error linear complexity of binary sequences derived from Euler quotients modulo 2p. IEEE Access 2020, 8, 51477–51481. [Google Scholar] [CrossRef]
- Su, M.; Chen, L. The properties of the 1-error linear complexity of pn-periodic sequences over Fp. In Proceedings of the ISIT 2006, Seattle, WA, USA, 9–14 July 2006; pp. 1998–2002. [Google Scholar]
- Zhou, Y.; Han, Y.; Ding, Y. On the k-error linear complexity of sequences from function fields. Bull. Aust. Math. Soc. 2020, 102, 342–352. [Google Scholar] [CrossRef]
- Zhou, J.; Liu, W. On the k-error linear complexity for 2n-periodic sequences via cube theory. arxiv 2013, arXiv:1309.1829. [Google Scholar]
- Chang, Z.; Ke, P. On the error linear complexity spectrum of binary sequences with period of power of two. Chin. J. Electron. 2015, 24, 366–372. [Google Scholar] [CrossRef]
- Xiao, Z.; Zeng, X.; Li, C.; Helleseth, T. New generalized cyclotomic binary sequences of period p2. Des. Codes Cryptog. 2018, 86, 1483–1497. [Google Scholar] [CrossRef]
- Wu, C.; Xu, C.; Chen, Z.; Ke, P. On error linear complexity of new generalized cyclotomic binary sequences of period p2. Inform. Process Lett. 2019, 144, 9–15. [Google Scholar] [CrossRef]
- Alecu, A.; Sălăgean, A. An approximation algorithm for computing the k-error linear complexity of sequences using the discrete fourier transform. In Proceedings of the ISIT 2008, Toronto, ON, Canada, 6–11 July 2008; pp. 2414–2418. [Google Scholar]
- Chen, Z.; Wu, C. k-error linear complexity of binary cyclotomic generators. J. Commun. 2019, 40, 197–206. (In Chinese) [Google Scholar]
- Edemskiy, V.; Wu, C.; Xu, C. Improvements on k-error linear complexity of q-ary sequences derived from Euler quotients. Cryptologia 2022, 46, 148–166. [Google Scholar] [CrossRef]
- Yan, T.; Pazilaiti, A.; Du, L. On the 1-error linear complexity of two-prime generator. AIMS Math. 2022, 7, 5821–5829. [Google Scholar] [CrossRef]
- Whiteman, A.L. A family of difference sets. Ill. J. Math. 1962, 6, 107–121. [Google Scholar] [CrossRef]
- Ding, C.; Helleseth, T. New generalized cyclotomy and its applications. Finite Fields Their Appl. 1998, 4, 140–166. [Google Scholar] [CrossRef]
- Blahut, R.E. Transform techniques for error control codes. IBM J. Res. Dev. 1979, 23, 299–315. [Google Scholar] [CrossRef]
- MacWilliams, F.J.; Sloane, N.J.A. The Theory of Error-Correcting Codes; North-Holland: Amsterdam, The Netherlands, 1977. [Google Scholar]
- Yang, M.; Zhu, S. The distribution functions for the linear complexity of periodic sequences. J. Electron. (China) 2012, 29, 211–214. [Google Scholar] [CrossRef]
- Ding, C.; Helleseth, T. On the linear complexity of legendre sequences. IEEE Trans. Inf. Theory 1999, 44, 1276–1278. [Google Scholar] [CrossRef]
- Yan, T. Linear complexity of ding-helleseth generalized cyclotomic binary sequences of any order. J. Conv. Infor. Tech. 2012, 7, 1849–1853. [Google Scholar]
- Ding, C. Linear complexity of the generalized cyclotomic sequence of order 2. Finite Fields Their Appl. 1997, 3, 159–174. [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. |
© 2024 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/).