ON THE LINEAR COMPLEXITIES OF TWO CLASSES OF QUATERNARY SEQUENCES OF EVEN WITH OPTIMAL AUTOCORRELATION

. Let q be a prime greater than 4. In this paper, we determine the coeﬃcients of the discrete Fourier transform over the ﬁnite ﬁeld F q of two classes of quaternary sequences of even length with optimal autocorrelation. They are quaternary sequence with period 2 p derived from binary Legendre sequences and quaternary sequence with period 2 p ( p + 2) derived from twin-prime sequences pair. As applications, the linear complexities over the ﬁnite ﬁeld F q of both of the quaternary sequences are determined.


Introduction
Due to their constant envelope properties, binary and quaternary sequences can be used as spreading sequences in the code division multiple access (CDMA) communication systems [18,17]. There are three common ways to define a quaternary sequence. The first one is to use trace function over Galois ring [11,24,26]. The second one is to use the inverse Gray mapping along two binary sequences [13,14,16]. The third one is to define the support sets of a quaternary sequence directly, see [23,28,29] for instance.
Most references concentrated on the correlation of the quaternary sequences. Since the linear complexity corresponds to the difficulty of reproducing the sequence from its samples, it is an important criterion for cryptographic application. By the Berlekamp-Massey algorithm, for a sequence with period N , if its linear complexity is large than N 2 , then it is considered good with respect to the linear complexity [17]. Since a quaternary sequence can also be regarded as a sequence over a general finite field F q with q > 4, it is needed for us to consider the linear complexity of a quaternary sequence over a general finite field from the view point of cryptography.
In [7], Du et al. defined a class of quaternary sequence of length 2p over F 4 and showed it possesses high linear complexity. Then, Ke et al. defined a class of quaternary sequence of length 2p m over F 4 and showed it has good linear complexity in [12]. Note that for quaternary sequence over F 4 , Su et al. introduce the welldistribution measure and correlation measure of order k in [20] recently. Kim et al. also proposed a quaternary sequences of period 2p using the Legendre sequences of period p [13]. A sequence with high linear complexity may have low linear complexity when it is considered as sequence over a larger finite field [15]. Since a quaternary sequence can also be treated as a sequence over a general finite field F q with q > 4, it is necessary for us to consider the linear complexity of a quaternary sequence over a general finite field from the view point of cryptography.
In this work, we aim to revisit two classes of quaternary sequences in the literature. The first one is defined by Kim et al. via two Legendre sequences in [13], where the autocorrelation and the linear complexity of the sequence were studied. The second one is defined via twin-prime sequences pair of period p(p + 2) using the interleaved technique in [21], where the autocorrelation of the sequence was also studied. We will view these sequences over F q and determine the linear complexity. The mail tool we used is the discrete Fourier transform.
This paper is organized as follows. In Section 2, we introduce the quaternary sequences proposed by Kim et al. in [13] and the quaternary sequences proposed by Su et al. in [21]. In Sections 3 and 4, we determine the coefficients of the discrete Fourier transform of above mentioned quaternary sequences over F q , where q is a prime and q > 4. Then, the linear complexities of the corresponding quaternary sequences over F q can be easily derived. In the last section, we draw some conclusions.

Preliminaries
Let q ∞ = (q(t)) be a d-ary sequence with period N . Then the sequence q ∞ is said to be balanced if the difference among numbers of occurrences of each element in a period is less than or equal to one. And the autocorrelation function of q ∞ at the shift phase τ is defined as where 0 ≤ τ < N and w d is a complex primitive d-th root of unity.
The maximum out-of-phase autocorrelation magnitude of q ∞ is defined as In many applications of the communication systems, it is desirable for the spreading sequences to have the maximum out-of-phase autocorrelation magnitude as low as possible. For the case of even period, a quaternary sequence q ∞ is called optimal if R max (q ∞ ) = 2 [22]. Two d-ary sequences a ∞ = (a(t)) and b ∞ = (b(t)) with the same period N are called equivalent if there exists integers k, l and h such that a(t) = l · b(i + k) + h, for any i ≥ 0, where gcd (l, d) = 1 and the operation in the bracket is performed modulo N . Denote it by a ∼ b for abbreviation. It is obvious that if two periodic sequences a ∞ and b ∞ are equivalent, they have the similar autocorrelation distribution. Otherwise, two periodic sequences are distinct.
Let a(t) and b(t) be two binary sequences of period N . Then a quaternary sequence q ∞ = (q(t)) N −1 t=0 could be defined by In what follows, we denote it by q ∞ = φ[a ∞ , b ∞ ] for short.
2.1. The quaternary sequences proposed by Kim et al. For an odd prime p, let QR p and NQR p be the sets of quadratic residues and quadratic non-residues in the ring of integers modulo p, Z p , respectively. And let b 0 (t) and b 1 (t) be the binary sequences defined by

respectively.
By using the inverse Gray mapping, Kim et al. constructed two classes of quaternary sequences q ∞ 1 and q ∞ 2 as follows [13]. For an odd prime p with p ≡ 1 (mod 4), let s 0 (t) and s 1 (t) be two binary sequences of period 2p defined by where ⊕ denotes modulo 2 addition. Then . For an odd prime p with p ≡ 3(mod 4), let s 2 (t) and s 3 (t) be two binary sequences of period 2p defined by In [13], Kim et al. proved that the quaternary sequences q ∞ 1 and q ∞ 2 are both balanced and the autocorrelation values of the proposed quaternary sequences are optimal.
2.2. Interleaved sequence. Let N and P be two positive integers. Assume that a (i) = (a is a sequence of period N , 0 ≤ i ≤ P − 1, and e = (e 0 , e 1 , . . . , e P −1 ) is a sequence defined over Z N . Define an N × P matrix U = (U i,j ) as follows An interleaved sequence u ∞ of period N P is then obtained by concatenating the successive rows of the matrix above. That is, For convenience, denote it as u ∞ = I(L e0 (a (0) ), L e1 (a (1) ), . . . , L e P −1 (a (P −1) )), where I is the interleaving operator. The sequence e is called the shift sequence and the sequences a (i) , 0 ≤ i ≤ p − 1 are called column sequences [9].
2.3. The quaternary sequences proposed by Su et al. In [21], a generic construction of quaternary sequence with optimal autocorrelation was given by Su et al. The construction consists of following three steps.
(i) Let n be an odd integer, N = 2n, and λ = n+1 2 . Generate four sequences a ∞ i of length n, 0 ≤ i ≤ 3, and a binary sequence e ∞ = (e 1 , e 2 , e 3 ), where e i ∈ {0, 1}, and e 1 + e 2 + e 3 ≡ 1(mod 2). (ii) Define two binary sequences of length N , ). (iii) Applying inverse Gray mapping to c ∞ and d ∞ , we obtain a quaternary sequence u ∞ of length N It is proved in [21] that twin-prime sequences pairs, GMW sequences pairs and two, three or four binary sequences defined by cyclotomic classes of order 4 can be chosen as the component sequences a ∞ i in above generic construction. 2.4. The linear complexity. Let q ∞ = (q(t)) be a sequence of period N over F q . The linear complexity of q ∞ is defined to be the smallest positive integer l such that there are constants A characteristic polynomial with the smallest degree is called a minimal polynomial of the periodic sequence q(t). The degree of a minimal polynomial of q(t) is referred to as the linear complexity of this sequence.
Suppose that gcd(N, q) = 1, let m be the order of q modulo N , that is, m is the least positive integer such that q m ≡ 1 (mod N ). By Blahut's Theorem [19], the linear complexity of a periodic sequence can be determined by counting the number of nonzero coefficients of its discrete Fourier transform. For an N -periodic quaternary sequence q(t), then the discrete Fourier transform of q(t) is defined as where 0 ≤ i < N and α is a primitive N -th root of unity in F q m . Hence, if we count the number L 0 of indices i's satisfying A i = 0, the linear complexity of q(t) becomes N − L 0 .
In this section, we will determine the linear complexity of the quaternary sequences (2) and (4) over F q (q > 4). Before doing this, let us introduce some useful auxiliary lemmas.
Lemma 3.1. [25,5] We have the following basic facts: 1) uQR p = QR p for any quadratic residue u in Z p ; 2) uQR p = NQR p for any quadratic non-residue u in Z p .
Let q be a prime number with (p, q) = 1 and m be the order of q modulo p. Assume that δ is a primitive p-th root of unity in F q m , denote It is obvious that η 0 + η 1 = −1.
Lemma 3.2. [6,27] Let the notations be the same as before, then we have For a quaternary sequence q ∞ = φ[a ∞ , b ∞ ], it can be easily verified that Note that this representation holds only for q ≥ 5. Then we can compute the discrete Fourier coefficients of the quaternary sequence q 1 (t) as follows.
Theorem 3.3. Let p and q be two different primes with q > 4. If p ≡ 1 (mod 4), the discrete Fourier transform coefficients over F q of the quaternary sequence q 1 (t) defined in (2) are given as Proof. By definition, we have q 1 (t) = φ[s 0 (t), s 1 (t)]. So the coefficient of the discrete Fourier transform of q 1 (t) at −i can be calculated by where α is a 2p-th root of unity in F q m . Denote β = α 2 , then β is a p-th root of unity in F q m . By Chinese Remainder Theorem, Z 2p is isomorphism to Z 2 × Z p . Thus, for any t ∈ Z 2p , we could represent it as pt 1 + 22 −1 p t 2 , where t 1 = t (mod 2), t 2 = t (mod p) and 2 −1 p denotes the inverse element of 2 modulo p. Now let us turn to the calculation of (6). Firstly, the first summation in (6) can be rewritten as Then, by the definition of the sequence s ∞ 0 , we have Secondly, the second summation in (6) can be calculated as where t 2 = 2 −1 p t 2 . By Lemma 2, we have Finally, the last summation in (6) can be calculated as where t 2 = 2 −1 p t 2 . In conclusion, we have Note that if i = 0, we have So, A 0 = 1. For any odd i ∈ Z 2p \{0} , we have A −i = 1 2p · (−2) = − 1 p ·. For any even i ∈ Z 2p \{0}, we have By Lemma 4, we have Thus we complete the proof. Corollary 1. Let p and q be two different primes with q > 4. For p ≡ 1 (mod 4), the linear complexity over F q of the quaternary sequence q 1 (t) is 2p.
Similar to Theorem 3.3, we compute the discrete Fourier coefficients of the quaternary sequence q 2 (t) as follows.
Theorem 3.4. Let p and q be two different primes with q > 4. If p ≡ 3 (mod 4), the discrete Fourier transform coefficients of the quaternary sequence q 2 (t) defined in (4) are given as Proof. Since the proof is similar to that of Theorem 3.3, we omit it.
Corollary 2. Let p and q be two different primes with q > 4. If p ≡ 3 (mod 4), the linear complexity over F q of the quaternary sequence q 2 (t) is 2p.

Linear complexity of quaternary sequence from twin-prime sequence pair
As we have mentioned in Section 2.3, the construction proposed by Su et al. in [21] is generic since different sequences including twin-prime sequences pairs, GMW sequences pairs and two, three or four binary sequences defined by cyclotomic classes of order 4 can be chosen as the component sequences. In this section, we will focus on the case of using twin-prime sequences pairs as the component sequences and investigate the linear complexity of the corresponding quaternary sequence.
Let us begin with the definition of the twin-prime sequences pairs. Let p and p + 2 be two primes. For i = 1, 2, · · · , p + 1, define e i = (p + 2) −1 i (mod p), b i =1 if i ∈ QR p+2 and b i =0 if i ∈ NQR p+2 . Furthermore, for i = 1, 2, · · · , p + 1, define a set of sequences a ∞ i with period p as follows where l and l are the sequences defined by and respectively. Then the sequence a ∞ and its modified sequence b ∞ , called the twinprime sequences pair are given by , where 0 ∞ p and 1 ∞ p denote the all-zeros and all-ones sequences of length p, respectively. In [21], Su et al. showed that the quaternary sequence u ∞ defined in (5) In this paper, let us assume that ( and (e 1 , e 2 , e 2 ) = (0, 0, 1). The remainder cases can be calculated similarly. Denote n = p(p + 2) and N = 2n and let q be a prime with gcd(N, q) = 1. Define m to be the order of q modulo N , then there exists a primitive N -th root α of unity in F q m . Let β = α 2 , then β is an n-th root of unity.
In [2], it has been demonstrated that twin-prime (TP, for short) sequence is just a special case of modified Jacobi sequence or related-prime(RP, for short) sequence where the difference of the primes is 2. In [10], Green et al. presented the distribution of roots of the generating polynomial of polyphase RP sequence over F 2 . For our purpose, we need to investigate the distributions of roots of the generating polynomial of TP sequence a ∞ and its modification sequence b ∞ over F q , instead of F 2 .
Lemma 4.1. Let β be an n-th root of unity in F q m . For the generating polynomials of the sequences a ∞ and b ∞ , we have where σ i = t∈Pi β t for i = 0, 1.
Proof. Since the proofs are similar, we only prove (10). According to (8), we have where the last equation holds by the fact that t∈H β t = −1, which can be easily seen from Similarly, we can prove that t∈V β t = −1. Now, for any v ∈ V , we have If p 0 ∈ P 0 , Similarly, if p 1 ∈ P 1 , we have Thus we complete the proof.
Theorem 4.2. Let notations be the same as before. The discrete Fourier transform coefficients of the quaternary sequence u(t) defined in (5) are given as where n = 2p(p + 2) and N = 2n is the length of the quaternary sequence u ∞ .
Proof. The discrete Fourier transform of quaternary sequence u(t) can be calculated as By Chinese Remainder Theorem, Z 2n is isomorphism to Z n × Z 2 . Thus, for any t ∈ Z 2n , we could represent it as 22 −1 n t 1 + nt 2 , where t 1 = t (mod n) and t 2 = t (mod 2). According to the definitions of c(t) and d(t), we have , if t 2 = 1, and (11) can be divided into following three parts. Firstly, the first summation in (11) can be rewritten as Secondly, the second summation in (11) can be rewritten as Finally, the last summation in (11) can be rewritten as Putting everything together, we have According to our notation, β = α 2 is a primitive n-th root of unity in F q m . By Lemma (4.1), we have (i) If i = 0, then (ii) If i = n, then (iii) If i ∈ Z 2n \{0, n} , we divide them into following four cases. Case 1: If i ≡ 0(mod p + 2), then Case 2: If i ≡ 0(mod p), then Case 3: If i mod n ∈ P 0 , then Case 4: If i mod n ∈ P 1 , then Thus we complete the proof.

Conclusion
In this paper, we analyze the linear complexities over finite field F q of two classes of quaternary sequences, where q is a prime greater than 4. These two classes of quaternary sequences we concerned, which were proposed by Kim et al. and Su et al., respectively, are both even length and have optimal autocorrelation properties. Our main method is counting the non-zero coefficients of the discrete Fourier transform of the corresponding quaternary sequences over F q .
We mention that it is also interesting to consider the linear complexity of quaternary sequences over Z 4 . For example, in [8], Edemskiy derived the linear complexity of quaternary sequences with optimal autocorrelation value over the finite ring Z 4 and in [3], Chen et al. determined the exact values of the linear complexity of quaternary sequence over Z 4 defined from the generalized cyclotomic classes modulo 2p. In [4], Chen et al. defined a family of quaternary sequences over Z 4 of length pq, a product of two distinct odd primes, using the generalized cyclotomic classes modulo pq and calculate the discrete Fourier transform of the sequences. Readers may refer to above mentioned references for the details. As a future work, we will study the linear complexities over Z 4 of the quaternary sequences we concerned in this paper. In this case, the analysis will be proceeded in a Galois ring, which will be more challenging than the situation in a finite field.