On LCD codes over Z 4

Linear complementary dual(LCD) codes are being utilized to protect cryptographic implementations from side-channel and fault attacks. In this work, LCD codes over the ring Z 4 are examined. It is observed that an LCD cyclic code over Z 4 of odd length is always reversible. However, the converse of this result does not hold. A suitable example to validate this statement is presented. Further, a necessary and sufficient condition for a reversible cyclic code of odd length to be an LCD code is obtained. Finally, it is found that among cyclic codes of length 2 k , no non-trivial LCD code exists.


Introduction
Cryptographic algorithms in sensitive devices are prone to side-channel and fault attacks. These attacks try to extract the information being processed when a cryptographic algorithm runs over a device. To overcome this problem, LCD codes were proposed by Massey in 1992 [8] and it was observed that LCD codes are an optimal solution for the two-user binary additive channel. The fact that LCD codes can be utilized as an offset to side-channel attacks was shown by Carlet and Guilley [1] and various structures of LCD codes over a Galois field, GF(q), were presented. Since then it has become a topic of keen interest amongst researchers which has led to various constructions and characterizations of LCD codes over a field. It was proved by Yang and Massey [3] that a cyclic code of length m over a field of characteristic p, where (m, p) = 1, is an LCD code if and only if it is reversible.
The analysis of LCD codes over a ring is a recent phenomenon in comparison to its study over a field. It was established by Gannon and Kulosman [2] that over the ring Z 4 , a cyclic code of odd length is an LCD code if and only if it is generated by a self reciprocal monic polynomial which divides x m −1 in Z 4 [x]. It was shown by Kaur [6] that a cyclic code over a ring is reversible if and only if the set of reciprocal polynomials of its generators also generates the code. It was observed by the same author that a cyclic code of length 4 over Z 4 is reversible.
Throughout this paper, LCD cyclic codes are studied over the ring Z 4 . It is noticed that an LCD cyclic code of odd length is always reversible. But the converse of this result is not true. A suitable example is provided to validate this statement. A necessary and sufficient condition for a reversible cyclic code of odd length to be an LCD code is obtained. Morover, it is observed that no cyclic code of length 4 is an LCD code. Further, it is proved that for a non-trivial cyclic code of length 2 k , the intersection of the code with its dual is non-trivial. This establishes that among cyclic codes of length 2 k , there does not exist any non-trivial LCD code.

Preliminaries
To begin with, we introduce some notations and definitions required to proceed further.
A code of length m over a ring R is linear if it forms a sub-module of R m over R. A linear code C of length m is cyclic if for every (s 0 , s 1 , . . . , s m−1 ) in C, (s m−1 , s 0 , . . . , s m−2 ) also belongs to C. The dual of a linear code C over R is the set C ⊥ = {s ∈ R m : s.t = 0 for every t ∈ C}. A linear code whose intersection with its dual is trivial is said to be an LCD code. A code is said to be reversible if it is invariant under reversing the order of the coordinates of each of its codewords.
Vectors of R m can be expressed as polynomials in Under the mapping φ, a cyclic code C ⊆ R m is associated with an ideal I of R m . In rest of the paper, we shall refer to a cyclic code over a ring R and its associated ideal in R m interchangeably.
The reciprocal polynomial of a polynomial v(x) of degree k is given by

LCD codes over Z 4
The structure of a cyclic code of odd length over Z 4 has been given by Abualrub and Siap [7]. They have also given a necessary and sufficient condition for a cyclic code of odd length to be reversible. We reproduce their results as Lemma 3.1 and Lemma 3.2 below for ready reference. Further, we reproduce below the results of Gannon and Kulosman [2] and Kaur [6] as Lemma 3.3 and Lemma 3.4 respectively.    The converse of Theorem 3.1 is not true as is clear from the example given below.
Example 3.1: Consider the cyclic code C = < f 1 , 2f 2 > = < x 6 + x 5 + x 4 + x 3 + x 2 + x + 1, 2 > of length 7 over Z 4 . It can be easily seen that f 1 (x) and f 2 (x) are both self reciprocal polynomials. It follows from Lemma 3.2 that C is reversible. By Lemma 3.1, C can also be written as Clearly h(x) = h * (x). It follows from Lemma 3.3 that C is not an LCD code. Theorem 3.2 given below provides a necessary and sufficient condition for a reversible cyclic code of odd length over Z 4 to be an LCD code.
for any two polynomials f 1 and f 2 over a commutative ring R. Suppose C is an LCD code. Lemma 3.3 implies that f 1 + 2f 2 is a self reciprocal polynomial. Therefore, we have It follows that deg . It follows from Lemma 3.2 that the polynomial f (x) is self reciprocal which together with Lemma 3.3 further gives that C is an LCD code.
The following examples 3.2 and 3.3 illustrate Theorem 3.2.
Example 3.2: Consider the cyclic code C = < f (x) > = < x 4 + x 3 + x 2 + x + 1 > of length 5 over Z 4 . It can be easily seen that f (x) is a self reciprocal polynomial. Therefore, by Lemma 3.2, C is reversible. Also, C is an LCD code by Lemma 3.3. The generator f (x) of C is clearly a binary monic polynomial which divides x 5 − 1 in Z 4 [x]. This is an example showing that the condition in Theorem 3.2 is sufficient. Example 3.3: Consider the cyclic code D = < f 1 , 2f 2 > = < x 4 + x 3 + x 2 + x + 1, 2 > of length 5 over Z 4 . It is easy to see that f 1 (x) and f 2 (x) are both self reciprocal polynomials. It follows from Lemma 3.2 that D is reversible. By Lemma 3.1, D can also be written as is not a self reciprocal polynomial. Therefore, by Lemma 3.3, D is not an LCD code. Also the generator f (x) of D is clearly a monic, non-binary polynomial which does not divide . This is an example showing that the condition in Theorem 3.2 is necessary.
We recall below the structure of a cyclic code of length 2 k over Z 4 in terms of its distinguished set of generators given by Abualrub and Oehmke as follows.
Lemma 3.5 [5]: Let C be a cyclic code of length m = 2 k over Z 4 . Then C has one of the following forms: where a < m, h(x) is a unit in R 2 of degree atmost i − b − 1 and i is the smallest integer such that 2(x + 1) i belongs to C. Further, the following lemmas 3.6-3.9 give the structure of the dual of a cyclic code of length 2 k over Z 4 . Lemma 3.6 [5, Theorem 23]: Let C = < (x + 1) a > be a cyclic code of length m = 2 k over Z 4 , where a < m. Then C ⊥ is as given below: Lemma 3.7 [5, Theorem 24]: Let C = < (x + 1) a + 2(x + 1) b h(x) > be a cyclic code of length m = 2 k over Z 4 , where a < m and h(x) is a unit in R 2 of degree atmost i − b − 1. Then C ⊥ is as given below: Following table lists all non-trivial cyclic codes of length 4 over Z 4 along with their dual codes which are computed using lemmas 3.5-3.9. A non-zero element has been identified in the third column of the table which belongs to the code as well as its dual. Therefore, it is concluded that none of the non-trivial cyclic codes of length 4 over Z 4 is an LCD code. Table 1. Non-trivial intersection of the code and its dual  5 We now prove the main result of the paper. Theorem 3.3: Let C be a non-trivial cyclic code of length m = 2 k over Z 4 with dual code C ⊥ . Then C is not an LCD code.
Proof : Let C be a non-trivial cyclic code of length m = 2 k over Z 4 . Then by Lemma 3.5, C has one of the following forms: where a < m, h(x) is a unit in R 2 of degree atmost i − b − 1 and i is the smallest integer such that 2(x + 1) i belongs to C.
Combining cases 1 to 4 above, we obtain that for any non-trivial cyclic code of length 2 k over Z 4 , the intersection of C and C ⊥ always contains a non-zero element. It follows that C is not an LCD code.

Conclusion
In this paper it is shown that an LCD cyclic code over Z 4 of odd length is reversible but the converse of this result does not hold. A counter example has been given to support this statement. Further, it is proved that a reversible cyclic code of odd length m is an LCD code if and only if it is generated by a binary monic polynomial which divides x m − 1 in Z 4 [x] . Next, it is demonstrated that none of the non-trivial cyclic codes of length 4 over Z 4 is an LCD code. Finally, it is proved that no non-trivial cyclic code of length 2 k over Z 4 is an LCD code.