Some new constructions of isodual and LCD codes over finite fields

This paper presents some new constructions of LCD, isodual, self-dual and LCD-isodual codes based on the structure of repeated-root constacyclic codes. We first characterize repeated-root constacyclic codes in terms of their generator polynomials and lengths. Then we provide simple conditions on the existence of repeated-root codes which are either self-dual negacyclic or LCD cyclic and negacyclic. This leads to the construction of LCD, self-dual, isodual, and LCD-isodual cyclic and negacyclic codes.

Repeated-root constacyclic codes were first studied by Berman [6] and Falkner et al. [14]. Since then several authors have studied these codes. Dinh determined the generator polynomials of constacyclic codes over F q of lengths 3p r and 6p r in [12] and [13], respectively. These results have been extended to more general lengths by Bakshi [2] and Chen et al. [10] who gave the generator polynomials of all constacyclic codes of lengths 2 t p r and lp r with l prime, respectively. Linear code with complementary dual (LCD) were introduced by Massey [26,23]. They provide an optimum linear coding solution for the two-user binary adder channel. Further, it has been shown that asymptotically good LCD codes exist [23]. Li et al. and Guenda [21,16] investigated LCD BCH codes. Carlet et al. [9] gave a general construction of LCD codes from arbitrary linear codes. Isodual codes are codes which are equivalent to their dual. These codes are related to isodual lattices construction [1]. Recently, Batoul et al. [4], [5] constructed classes of isodual codes from an important class of linear codes, namely the class of constacyclic codes.
In this paper, we construct new LCD, isodual and self-dual codes. Some of these codes are both isodual and LCD, and so are called LCD-isodual codes. These constructions are based on the structure of repeated-root constacyclic codes. We first characterize these codes in terms of their generator polynomials and lengths.
Then we provide simple conditions on the existence of repeated-root codes which are either self-dual negacyclic, or LCD, isodual cyclic and negacyclic. This leads to constructions of LCD, self-dual, isodual and LCD-isodual cyclic and negacyclic codes.
The remainder of this paper is organized as follows. Some preliminary results are given in Section 2. In Section 3, the structure of the generator polynomials of constacyclic codes of length 2 a mp r with 0 ≤ a is given using the generator polynomials of constacyclic codes of length m. Further, we provide conditions on the existence of LCD repeated-root cyclic and negacyclic codes. In Section 4, we present the structure of constacyclic codes of lengths mp r and 2 a mp r over F p s , and constructions are given for self-dual, LCD and LCD-isodual codes from duadic codes where p is prime (odd or even). The minimum distance of these codes is also examined. In Section 5, the structure of the generator polynomials of constacyclic codes of length 2 a mp r for a ≥ 1 is presented using primitive 2 a th roots of unity. The case when constacyclic codes are equivalent to cyclic codes is considered. Further, conditions on the existence of self-dual negacyclic codes of length 2 a mp r over F p s are given and LCD-isodual cyclic and negacyclic codes are constructed. Finally, Section 6 provides some conclusions and a suggestion for future work.

Preliminaries
Let p be a prime number and F q the finite field with q = p s elements. An [n, k] linear code C over F p s is a k-dimensional subspace of F n p s . For λ in F * q , a linear code C of length n over F q is said to be λ-constacyclic if it satisfies (λc n−1 , c 0 , . . . , c n−2 ) ∈ C, whenever (c 0 , c 1 , . . . , c n−1 ) ∈ C.
If C = C ⊥ , then C is self-dual. Note that the dual of a λ-constacyclic code is a λ −1 -constacyclic code. A monomial linear transformation of F n q is an F q -linear transformation τ such that there exist scalars λ 1 , . . . , λ n in F * q and a permutation σ ∈ S n (the group of permutations of the set {1, 2, . . . , n}) such that for all (x 1 , x 2 , . . . , x n ) ∈ F n q , we have When all the λ i in (1) are equal to 1, the monomial permutation is simply called a permutation. Two linear codes C and C of length n are equivalent if there exists a monomial transformation of F n q such that τ (C) = C . If C is equivalent to C ⊥ , then C is called an isodual code. A linear code with a complementary dual (LCD) code is defined to be a linear code C whose dual C ⊥ satisfies C ∩ C ⊥ = {0}. When a code is both isodual and LCD, it is called an LCD-isodual code.
For a monic polynomial f (x) = a 0 + a 1 x + . . . + a r x r in F q [x] with a 0 = 0 and degree r, the reciprocal polynomial of f (x) is If a polynomial f (x) = af * (x) for some a ∈ F q * , then f (x) is called self-reciprocal. We can easily verify the following equalities for polynomials.
Usually we do not care about the constant a in the equality f (x) = af * (x), and we write f (x) = f * (x) 2. Repeated-root LCD constacyclic codes of length mp r over Fp s It is well known that every λ-constacyclic code is generated by a unique polynomial of least degree which divides x n − λ. Such a polynomial is called the generator of the code. This section presents the structure of constacyclic codes of lengths mp r over F q where (m, p) = 1. Further, we give conditions on the existence of LCD constacyclic codes. We begin with an important lemma which will be used later. Since F p s has characteristic p, by Lemma 2.1 the polynomial x mp r − λ can be factored as where the polynomial x m − λ 0 is a monic square-free polynomial. Hence from [11,Proposition 2.7], it factors uniquely as a product of pairwise coprime monic irreducible polynomials f 1 (x), . . . , f l (x). Thus from (4), we obtain the following factorization Denote the factors f i in the factorization of x m − λ 0 which are self-reciprocal by g 1 , . . . , g s and the remaining f i grouped in pairs by h 1 , h * 1 , . . . , h t , h * t . Then we have (6) x . From (6), a λ-constacyclic code C of length n = mp r over F p s is generated by a polynomial of the form and h j (x) are the polynomials in (6) and 0 ≤ a i , b j , c k ≤ p r . Denote by C the linear code with generator g( , where g i and h j are the simple factors of G given in (7). Then C is called the simple root code of C. From (4), if C is a λ−constacyclic then C is a λ 0 −constacyclic simple root code.
From [13], we have that if λ = ±1 then a λ-constacyclic code is an LCD code over F q . Hence in this section, we study λ-constacyclic LCD codes for λ ∈ {±1} and provide conditions on the existence of LCD cyclic and negacyclic codes of length mp r over F p s . The following lemma is required to characterize LCD cyclic and negacyclic repeated-root codes. It was proven for cyclic codes in [26] and the proof for negacyclic codes is similar and so is omitted.
is the generator polynomial of a q-ary cyclic, respectively negacyclic, code C of length n, then C is an LCD code if and only if g(x) is selfreciprocal and all the monic irreducible factors of g(x) have the same multiplicity in g(x) and in x n − λ for λ ∈ {−1, 1}.
Pang et al. [24,Theorem 3.1] gave the following result for cyclic codes. Using Lemma 2.2, it can be extended to negacyclic codes. Theorem 2.3. Let p s be a prime power and n = mp r with gcd(m, p) = 1. Then a cyclic LCD or negacyclic LCD code C of length n over F p s is generated by  Next we provide a characterization of LCD cyclic and negacylic codes using their parameters. For this we need some facts concerning the defining sets of cyclic and negacyclic codes. Recall that the order of an element a in the multiplicative group F * q is the smallest integer t such that a t = 1 in F * q and denote t = ord q (a). Let n and i be integers such that 0 ≤ i < n. The q-cyclotomic coset of i modulo n is the set where l is the smallest positive integer such that iq l ≡ i mod n.
The minimal polynomial of β i over F q is where β is a primitive n-th root of unity in a suitable extension field of F q . A cyclic code C of length n over F q and generator polynomial f is uniquely determined by its defining set T = {0 ≤ i < m | f (β i ) = 0}. Hence the defining set of a cyclic code over F p s is the union of some p s -cyclotomic cosets. A similar definition holds for negacyclic codes. The roots of x n + 1 are δ 2i+1 , 0 ≤ i ≤ n − 1, where δ is a primitive 2n-th root of unity in some extension field of F q . Let θ = β 2 which is a primitive n-th root of unity, and O 2n be the set of odd integers from 1 to 2n − 1.
The defining set of a negacyclic code C of length n and generator polynomial g is Theorem 2.5. Let q be a power of an odd prime p and n = mp r a positive integer such that m is an odd integer. Assume that for . Then if ord m (q) is even then there exist cyclic LCD, respectively negacyclic LCD, codes of length n over F p s generated by Proof. Cyclic and negacyclic codes of length n are generated by polynomials of the form From [18], ord m (p s ) is even if and only if there exists 0 Then if the i which satisfy this property are in I, respectively in O 2n , the result follows.
For the construction of isodual codes we need the following result which was proven for cyclic codes but is also true for negacyclic codes if gcd(n, p) = 1 or gcd(n, p) = 1.
Proposition 2.6. [5, Proposition 3.1] Let C be a cyclic, respectively negacyclic, code of length n over F q generated by g(x), and γ ∈ F * q such that γ n = 1. Then the following results hold.
(i) C is equivalent to the cyclic, respectively negacyclic, code generated by g * (x).
(ii) C is equivalent to the cyclic, respectively negacyclic, code generated by g(γx).

Repeated-root LCD and self-dual codes from duadic codes over F p s
In this section we present the structure of constacyclic codes and give constructions of self-dual, LCD and LCD-isodual codes of lengths mp r and 2 a mp r over F p s from duadic codes where p is prime and m is a positive odd integer such that (m, p) = 1.
3.1. Repeated-root LCD cyclic codes of length mp r from duadic cyclic codes. Let C be a cyclic code over F p s of length m generated by f (x) and b be an integer such that (b, m) = 1. The function µ b defined on Z m = {0, 1, . . . , m − 1} by µ b (i) ≡ ib mod m is a permutation of the coordinate positions {0, 1, 2, . . . , m − 1} and is called a multiplier. Multipliers also act on polynomials and this gives the following ring automorphism Let S 1 and S 2 be unions of cyclotomic cosets modulo m such that S 1 ∩ S 2 = ∅, Then the triple µ b , S 1 , S 2 is called a splitting modulo m. The odd-like duadic codes D 1 and D 2 are the cyclic codes over F p s with defining sets S 1 and S 2 and generator polynomials where β is a primitive m-th root of unity. The even-like duadic codes C 1 and C 2 are the cyclic codes over F p s with defining sets {0} ∪ S 1 and {0} ∪ S 2 , respectively. The codes D i and C i have the property From (9) and the fact that the multiplier µ b is a permutation acting on the coordinate of the codes, we obtain that the odd-like duadic codes, respectively the even-like duadic codes, are equivalent. In this paper, the notation p s = mod m means that p s is a quadratic residue modulo m where p is a prime number and m an integer such that gcd(p, m) = 1. The following result gives some properties of duadic codes.
Next, we recall some results concerning the splitting.
. We now give constructions of LCD cyclic codes using the generator polynomials of odd-like duadic codes over F p s of length m. (i) If the splitting modulo m is not given by µ −1 , then the cyclic codes of length mp r over F p s generated by (ii) If p is odd and the splitting is given by µ −1 , then the cyclic code generated by Proof. For part (i), if the splitting modulo m is not given by µ −1 , then from Then by Lemma 2.2, the cyclic codes generated by , are LCD codes of length mp r over F p s . Further, the dimensions of these codes are obtained from the degree of the generator polynomial and the minimum distance in the first case is obtained from Theorem 2.3. The upper bound on the minimum distance in the second case comes from the fact that these codes contain the odd-like duadic codes D i which have minimum distance d.
For part (ii), assume that there is a splitting modulo m. From [18, Proposition 4.1] we obtain the decomposition Since the splitting is given by µ −1 , from Proposition 3.2 we have f * , and from Lemma 2.2 the cyclic code C of length 2mp r generated by this polynomial is LCD. We also obtain that the dual of C is generated by (x + 1) p r f p r 1 (−x)f p r 2 (−x). From Proposition 2.6, the dual code is equivalent to the code generated by (x − 1) p r f p r 1 (x)f p r 2 (x), so the code is LCD-isodual. The degree of the generator is mp r , and hence the dimension is 2mp r − mp r . Since the weight of the generator is 2, the minimum distance is 2.
3.2. Self-dual and LCD-isodual codes from duadic cyclic codes over Theorem 3.4. Let n = 2 a m with m an odd integer, a ≥ 1, s an integer such that 2 s = mod m, and D i = f i (x) , 1 ≤ i ≤ 2, be odd-like duadic codes over F 2 s with minimum distance d. Then for 1 ≤ i ≤ 2, the cyclic codes generated by Proof. Let f i , i ∈ {1, 2}, be the generator polynomials of the duadic codes over F 2 s of length m. If n = 2 a m, then we have the following decomposition which is an equivalent to C i from (9). Hence C i is an isodual code. The bound on the minimum distance for both cases is a consequence of the fact that these codes contain the odd-like duadic codes.
The following result presents a case where the cyclic isodual codes constructed from duadic codes have the same minimum distance. Theorem 3.6. Let n = 2m where m is an odd integer such that 2 = mod m and D i = f i (x) , 1 ≤ i ≤ 2, are the odd-like duadic codes over F 2 . Then the cyclic codes generated by Proof. The result regarding cyclic codes follows from Theorem 3.4 so we need only prove that the minimum distances are equal. From [25], we have that the binary code generated by g i (x) is equivalent to the Plotkin sum of D i and C i = (x − 1)f i . From the McEliece bound [20,Theorem 4.513], we obtain that d = min{2d Di , d Ci } = d Ci .
3.3. Repeated-root LCD-isodual negacyclic codes of length 2mp r from duadic negacyclic codes. Negacyclic codes of odd length are equivalent to cyclic codes [11], so in this subsection we consider negacyclic codes of even length. Assume that p is an odd prime number, and let S 1 and S 2 be unions of p scyclotomic cosets modulo 4m such that S 1 ∩ S 2 = X, S 1 ∪ S 2 ∪ X = O 4m and µ b S i mod 4m = S (i+1) mod 2 . A p s -splitting is of type I if X = ∅ and of type II if X = {m, 3m}. A negacyclic code C of length 2m over F p s is duadic if such a splitting exists and the defining set is one of the subsets S 1 , S 2 , S 1 ∪ X or S 2 ∪ X. Similar to the cyclic code case we have two pairs of duadic codes, two odd-like duadic codes D i and two even-like duadic codes C i , i ∈ {1, 2}. Further, (9) holds for the codes D i and C i , i ∈ {1, 2}. For more details on negacyclic duadic codes, see [7].
Remark 3.7. If q ≡ 3 mod 4, then every multiplier leaves the set {m, 3m} and in this case the polynomial x 2 + 1 is irreducible over F p s .
Proof. The proof for parts (i) and (ii) is similar to that of Proposition 3.2. The proof of part (iii) is (8) in [7,Theorem 11]. Now, Proposition 3.8 and a proof similar to that for part i of Theorem 3.3 gives the following. Theorem 3.9. Assume there exist duadic negacyclic codes of type I D i = g i (x) , 1 ≤ i ≤ 2, of length 2m and minimum distance d 1 such that x 2m +1 = g 1 (x)g 2 (x), or there exist duadic negacyclic codes of type II, D i = g i (x) , with minimum distance d 2 and C i = (x 2 + 1)g i (x) 1 ≤ i ≤ 2, of length 2m, such that x 2m + 1 = (x 2 + 1)g 1 (x)g 2 (x). If the splitting modulo 4m is not given by µ −1 , then for i ∈ {1, 2} the negacyclic codes over F p s of type I generated by , are [2mp r , mp r , d 1 ] LCD-isodual codes over F p s . Further, the corresponding negacyclic codes of length 2mp r over F p s of type II generated by The following result from [7] gives a necessary and sufficient condition for the existence of a splitting of 4m given by µ 2m+1 . Lemma 3.10. If m is an odd prime power such that (m, p) = 1 and p ≡ 3 mod 4, then µ 2m+1 gives a splitting of 4m of type II if and only if ord 4m (p) is even, in which case This result is used to prove the following proposition.
Proposition 3.11. If m is an odd prime power such that (m, p) = 1, p ≡ 3 mod 4 and ord 4m (p) is even, then there exist LCD negacyclic codes of length 2mp s over F p s .
Proof. If m is an odd prime power such that (m, p) = 1, p ≡ 3 mod 4, and ord 4m (p) is even, then by Lemma 3.10, there exists a polynomial g(x) ∈ F p s such that x 2m + 1 = (x 2 + 1)g(x)g(−x). Since the splitting is not given by µ −1 , by Proposition 3.8 the polynomials g(x) and g(−x) are self-reciprocal. Then from Lemma 2.2, the negacyclic codes generated by g(x) p r , g(−x) p r , (x 2 + 1) p r g(x) p r and (x 2 + 1) p r g(−x) p r are LCD codes of length 2mp r over F p s .

4.
Repeated-root constacyclic codes of length 2 a mp r over F p s In this section, we give the structure of repeated-root constacyclic codes over F q , q = p s , of length 2 a mp r , a ≥ 1, and provide conditions on when constacyclic codes are equivalent to cyclic codes. For this, we require the following lemma. Further, all cyclic codes of length n = 2 a mp r are generated by Proof. The proof of (10) is omitted since it is the same as for [4,Proposition 3.3] with (x − 1) replaced by f 0 (x). The proof of the second statement follows from the fact that a cyclic code of length n = 2 a mp r is generated by a factor of the polynomial (x 2 a mp r − 1) = (x 2 a m − 1) p r , and the result follows from (10). We now give the main result of this section.
Theorem 4.3. Let q be a power of an odd prime p and m an odd integer such that (m, p) = 1. Let λ and δ be elements of the multiplicative group F * q such that δ m = λ. If δ = β 2 a in F * q , then the following hold. (i) The λ-constacyclic codes of length 2 a mp r over F q are equivalent to cyclic codes of length 2 a mp r over F q . (ii) If q ≡ 1 mod 2 a+1 , then −λ-constacyclic codes of length 2 a mp r over F q are equivalent to cyclic codes of length 2 a mp r over F q .
Proof. For part (i), let λ ∈ F * q such that there exists δ ∈ F * q with δ m = λ and δ = β 2 a in F q . Then λ = β 2 a m and by Lemma 2.1 there exist β 0 ∈ F * q such that β = β p r 0 . Then λ = β 2 a mp r 0 , and then by [3,Proposition 3.2], λ-constacyclic codes of length 2 a mp r over F q are equivalent to cyclic codes over F q . For part (ii), since q ≡ 1 mod 2 a+1 , from Lemma 4.1 there exists a primitive 2 a+1 -root of unity α ∈ F * q . Thus α 2 a = −1, and −λ = (−1) mp r λ = (α 2 a ) mp r β 2 a mp r 0 = (αβ 0 ) 2 a mp r . Then by [3,Proposition 3.2], −λ-constacyclic codes of length 2 a mp r over F q are equivalent to cyclic codes over F q . , α a primitive 2 a th root of unity in F * q , and C a λ-constacyclic code of length 2 a mp r . We then have that where 0 ≤ j i ≤ p r .
Proof. By Lemma 4.1, if q ≡ 1 mod 2 a , then there exists a primitive 2 a th root of unity α in F * q . Thus by Proposition 4.2 so then and Since a λ-constacyclic code of length 2 a mp r is generated by a divisor of (x 2 a mp r −λ), the result follows.

4.1.
Repeated-root self-dual negacyclic codes of length 2 a mp r over F p s . In this subsection, some results of [18] concerning conditions on the existence of self-dual codes are generalized. For this, we first need to give the structure of negacyclic codes over F p s of length 2 a mp r , a ≥ 1. We begin with the following result.
Lemma 4.5. Let q = p s be an odd prime power such that q ≡ 1 mod 2 a+1 . Then there is a ring isomorphism between the ring x 2 a mp r −1 and the ring x 2 a mp r +1 .
Proof. If q ≡ 1 mod 2 a+1 , then by Lemma 4.1 there exists a primitive 2 a+1 th root of unity α in F * q . Therefore, −1 = (−1) mp r = (α 2 a ) mp r and so by [3, Proposition 3.2] negacyclic codes of length 2 a mp r over F q are equivalent to cyclic codes of length 2 a mp r over F q . Proposition 4.6. Let q = p s be an odd prime power such that q ≡ 1 mod 2 a+1 and n = 2 a mp r with m an odd integer such that (m, p) = 1. Then a negacyclic code of length n over F p s is a principal ideal of F p s [x]/ x n + 1 generated by a polynomial of the form Proof. It suffices to find the factors of x 2mp r + 1. Since q ≡ 1 mod 2 a+1 , from Lemma 4.1 there exists an α ∈ F q * which is a primitive 2 a+1 th root of unity. Thus, . The result then follows from the isomorphisms given in Lemma 4.5.
Theorem 4.7. Let q = p s be an odd prime power such that q ≡ 1 mod 2 a+1 , n = 2 a mp r an integer with (m, p) = 1, and a ≥ 1. Then there exists a negacyclic self-dual code of length 2 a mp r over F p s if and only if ord m (q) is odd.
Proof. Under the hypothesis on q and m, we have from Proposition 4.6 that x 2 a mp r + 1 = 2 a k=1 l i=0 f ji i (α −2k+1 x)) where the f i (x) are the monic irreducible factors of x m − 1 in F p s . By [18,Lemma 3.6], ord m (p s ) is odd if and only if there is no cyclotomic class such that C m (i) = C m (−i). From [18,Lemma 3.6], this is equivalent to saying that there are no nontrivial irreducible factors of x m − 1 such that f i (x) = f * i (x). Then from Proposition 4.6, we have that f i (x) = f * i (x) for all i = 0 (f 0 (x) = (x − 1)) is true if and only if f i (α k x) = (f i (α k x)) * is true for all 1 ≤ k ≤ 2 a+1 . Then by [19,Theorem 2.2], self-dual negacyclic codes exist.

4.2.
Repeated-root isodual cyclic and negacyclic codes of length 2 a mp r over F p s . In this section we give constructions of isodual cyclic and negacyclic codes of length 2 a mp r over F p s . Theorem 4.8. Let q be a power of an odd prime p, m an odd integer with (m, q) = 1, and f 1 (x), f 2 (x) polynomials in F q [x] such that (11) x m − 1 = f 1 (x)f 2 (x).
Then we have the following results.
(i) If q ≡ 1 mod 2 a with a ≥ 1 an integer, then the cyclic codes of length 2 a mp r generated by are isodual codes of length 2 a mp r over F q where α ∈ F * q is a primitive 2 a th root of unity. (ii) If q ≡ 1 mod 2 a+1 with a ≥ 1 an integer, then the negacyclic codes of length 2 a mp r generated by are isodual codes over F q where β ∈ F * q is a primitive 2 a+1 th root of unity.
Proof. The proof follows from Proposition 2.6 and an argument similar to that for [4, Theorem 4.2] with x − 1 replaced by f 1 (x).
The following is a straightforward consequence of Theorem 4.8 and Lemma 2.2.
so the cyclic code generated by g(x) is isodual. The same result is obtained for the code generated by

Conclusion
This paper considered the structure of repeated-root constacyclic codes over finite fields. Necessary and sufficient conditions were given for the existence of LCD constacyclic and self-dual negacyclic codes. Further, new constructions of isodual, LCD and LCD-isodual constacyclic codes over finite fields were presented. It is well known [8] that LCD codes can be used to counter passive and active side-channel analysis attacks on embedded cryptosystems. Therefore, it would be interesting to investigate the use of LCD-isodual codes against these and other attacks.