NEW BINARY AND TERNARY LCD CODES

arXiv:1710.00196v2 [cs.IT] 23 Oct 2017

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO
Abstract. LCD codes are linear codes with important cryptographic applications. Recently, a method has been presented to transform any linear code into an LCD code with
the same parameters when it is supported on a finite field with cardinality larger than 3.
Hence, the study of LCD codes is mainly open for binary and ternary fields. Subfieldsubcodes of J-affine variety codes are a generalization of BCH codes which have been
successfully used for constructing good quantum codes. We describe binary and ternary
LCD codes constructed as subfield-subcodes of J-affine variety codes and provide some
new and good LCD codes coming from this construction.

Introduction
It is well-known that the hull C ∩ C ⊥ of a linear code C, with (Euclidean) dual C ⊥ , does
not vanish in general; but when this holds, the code C is called a linear code with complementary dual (LCD). LCD codes were introduced by Massey [23] to provide an optimum
linear coding solution for the two-user binary adder channel and prove the existence of
asymptotically good LCD codes; previously he studied LCD cyclic codes (reversible codes)
in [22]. The literature contains considerable information about the characterization and
construction of this family of codes, being [30, 32, 29] some of the oldest references. Apart
from applications in data storage, LCD codes are also useful for obtaining lattices [15]
and in network coding [2, 31]. Interesting applications of LCD codes in cryptography
have been recently discovered. They play a role in counter-measures to passive and active
side-channel analyses on embedded cryptosystems. We remark that the implementation of
cryptographic algorithms could suffer attacks (SCA or FIA) for extracting the secret key.
SCA (side-channel attacks) consist of passively recording some leakage to retrieve the key
and FIA (fault injection attacks) consist of actively perturbing the computation to alter
the output. One of the main sources of interest in LCD codes comes from the fact that
they provide linear complementary pairs of codes. A linear complementary pair of codes
(C1 , C2 ) consists of two codes in Fnq with dimensions k and n − k such that C1 + C2 = Fnq .
These pairs have been used in [3, 4] for protecting implementations of symmetric cryptosystems against SCA, with level of protection depending on the minimum distance of
C2 , and FIA, with level of protection depending on the minimum distance of C1 .
The above mentioned applications have produced a huge interest in LCD codes and
many papers on this topic appeared very recently. Important contributions are [6] and
[24], where the authors prove that, for q > 3, q-ary LCD codes are as good as q-ary linear
codes. That is, for every linear code over a field Fq with more than 3 elements, one can
construct an LCD code with the same parameters from that code.
Key words and phrases. LCD codes; complementary dual; subfield subcodes; J-affine variety codes;
toric codes.
Supported by the Spanish Ministry of Economy/FEDER-UE (grants MTM2015-65764-C2-2-P and
MTM2015-69138-REDT), the University Jaume I (grant PB1-1B2015-02) and the Danish Council for
Independent Research (grant DFF-4002-00367).
1

2

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

With respect to binary and ternary LCD codes, the best known LCD codes are reversible
and are derived from BCH codes [16, 17, 25, 18]. As it is well-known, subfield-subcodes
from codes over large fields can give rise to good codes over small fields. BCH codes are
subfield-subcodes of Reed-Solomon codes and families of BCH LCD and cyclic LCD codes
have been constructed in [17] and [18] for few lengths. Some good binary reversible codes
of odd length n, for 5 ≤ n ≤ 257, are given in [25], where the authors determine all the
parameters for 5 ≤ n ≤ 99.
In this paper we consider LCD codes coming from subfield-subcodes of the so-called
J-affine variety codes. These codes are images of evaluation maps from vector spaces of
polynomials in several variables generated by suitable monomials. Our LCD codes may
be regarded as a generalization of BCH codes, including extensions to the case of more
variables, and allow us to reach a wider variety of lengths. Their metric structure and
duality properties have been studied and successfully used to construct quantum stabilizer
codes in previous works of the authors [10, 11, 12, 9, 8].
Binary J-affine variety codes for one variable with odd length provide reversible codes
which essentially coincide with those in [25]; however, our codes are derived from generic
results (Theorems 16 and 18) which can simplify some computations. Nevertheless, with
one variable, we obtain unknown ternary reversible and binary and ternary nonreversible
LCD codes as shown in Section 3. The nonreversible codes obtained with only one variable
have the same dimension and minimum distance as the reversible ones, but their length
is one unit more.
Considering more than one variable, we get a much broader spectrum of lengths. Theorems 19 and 20, and Remark 21 provide a wide variety of new LCD codes with previously
unknown lengths, having some of them good parameters. As a sample, in Section 3 we
give several families of LCD codes which, according to [14], contain many optimal or best
known linear codes.
Decoding procedures may be useful for the cryptographic applications of LCD codes.
Decoding algorithms have been described for some families of codes considered in this
paper [7, 21]. We believe that these algorithms may be adapted to all of them.
1. LCD J-affine variety codes
In this section we consider J-affine variety codes. These linear codes were introduced
in [12] and used for constructing quantum codes. We review some results concerning selforthogonality that will allow us to characterize LCD codes in this family. Finally, we give
parameters for some families of LCD J-affine variety codes.
Along this paper, q = pr will be a positive power of a prime number p. Let m ≥ 1 be an
integer and fix m integers Nj > 1 such that Nj −1 divides q−1 for j = 1, 2, . . . , m. Let R :=
Fq [X1 , X2 , . . . , Xm ] be the ring of polynomials in m variables and with coefficients in the
finite field Fq . Consider a subset J ⊆ {1, 2, . . . , m} and the ideal IJ in R generated by the
N
N −1
binomials Xj j − Xj when j 6∈ J and by Xj j − 1 otherwise. Set ZJ = {P1 , P2 , . . . , PnJ }
the zero-set of IJ over Fq . Note
Q that the
Q jth coordinate, for j ∈ J, of the points in ZJ is
different from zero and nJ = j ∈J
/ Nj
j∈J (Nj − 1). Furthermore, denote Tj = Nj − 2
when j ∈ J and Tj = Nj − 1 otherwise; then define
HJ = {0, 1, . . . , T1 } × {0, 1, . . . , T2 } × · · · × {0, 1, . . . , Tm }
am .
and, for any a = (a1 , a2 , . . . , am ) ∈ HJ , set X a = X1a1 X2a2 · · · Xm
Consider the quotient ring RJ := R/IJ and the evaluation map evJ : RJ → Fnq J given
by evJ (f ) = (f (P1 ), f (P2 ), . . . , f (PnJ )), where f denotes both the equivalence class and

NEW BINARY AND TERNARY LCD CODES

3

any polynomial representing it. As is well-known, evJ is a bijection, and in particular
{ev J (X a ) | a ∈ HJ } constitutes a basis for the image.
Definition 1. Let ∆ be a non-empty subset of HJ . The J-affine variety code given by ∆
J of FnJ generated by ev (X a ), a ∈ ∆. We denote by C J the
is the Fq -vector subspace E∆
J
q
∆
J
(Euclidean) dual code of E∆ .
J equals the cardinality of ∆, and consequently the
Observe that the dimension of E∆
J
dimension of C∆ is nJ −card(∆). Note that the univariate case contains the family of ReedSolomon codes and for J = {1, 2, . . . , m} and Nj = q for every j, one has a generalized
J is LCD if and only if its
toric code [27]. It is also clear that the J-affine variety code E∆
J
dual code C∆ is LCD.
The following result, which can be found in [12, Proposition 1], gives the metric structure
of J-affine variety codes.

Proposition 2. Let J ⊆ {1, 2, . . . , m}. Consider a, b ∈ HJ and let X a and X b be two
monomials representing elements in RJ . Then, the inner product evJ (X a ) · evJ (X b ) is
different from 0 if, and only if, the following two conditions are satisfied.
• For every j ∈ J, it holds that aj + bj ≡ 0 mod (Nj − 1), (i.e., aj = Nj − 1 − bj
when aj + bj > 0 or aj = bj = 0).
• For every j ∈
/ J, it holds that
– either aj + bj > 0 and aj + bj ≡ 0 mod (Nj − 1), (i.e., aj = Nj − 1 − bj
if 0 < aj , bj < Nj − 1 or (aj , bj ) ∈ {(0, Nj − 1), (Nj − 1, 0), (Nj − 1, Nj − 1)}
otherwise),
– or aj = bj = 0 and p 6 | Nj .
The following remark illustrates how to construct LCD J-affine variety codes.
Remark 3. Fix q = 33 , m = 2, J = {1, 2}, N = N1 = N2 = 33 , and look for a set
J is an LCD code. From Proposition 2, we deduce that the points
∆ ⊂ HJ such that E∆
in HJ can be divided into two sets. The first set consists of what we will call symmetric
points, and they are ((N − 1)/2, (N − 1)/2) = (13, 13), (0, 0), ((N − 1)/2, 0) = (13, 0) and
(0, (N − 1)/2) = (0, 13). For a symmetric point a, we have that evJ (X a ) is orthogonal to
evJ (X b ) for all b ∈ HJ \{a} and evJ (X a )·evJ (X a ) 6= 0. Thus, suitable sets ∆ can contain,
or not contain, symmetric points. The rest of the points in HJ are called asymmetric.
In order to have an LCD code and when one desires ∆ to contain an asymmetric point
(a1 , a2 ), a1 , a2 ≤ N − 1, the point (N − 1 − a1 , N − 1 − a2 ) (named reciprocal) must
also be added to ∆, and vice versa. Notice that, here, N − 1 should be identified with
zero. Indeed, evJ (X (a1 ,a2 ) ) is not orthogonal to evJ (X (N −1−a1 ,N −1−a2 ) ) and they are both
orthogonal to evJ (X b ) for every b different from (a1 , a2 ) and (N − 1 − a1 , N − 1 − a2 ). So
to get suitable sets ∆, we can consider any of the above given symmetric points and pairs
as described, for instance one may have (7, 16), (19, 10) ∈ ∆.
The procedure is a bit different when J = {2} instead of J = {1, 2}. First we notice
that in the case treated above the obtained dual code is also generated by the evaluation of
monomials and, therefore, it is a J-affine variety code. In this second case, assuming that
we desire that (0, 10) ∈ ∆, our code be LCD and the dual code be also J-affine variety
code, again by Proposition 2, we must add to ∆ the points (0, 16), (26, 16) and (26, 10).
The following result formalizes the ideas in the previous remark characterizing LCD
J-affine variety codes whose duals are again J-affine variety codes.

4

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

J is LCD with its dual
Theorem 4. Let ∆ be a subset of HJ . The J-affine variety code E∆
code also being J-affine variety if and only if ∆ is a union of sets Ra containing a and
those elements b ∈ HJ such that:
• For every j 6∈ J, bj = Nj − 1 − aj if 0 < aj < Nj − 1, and bj ∈ {0, Nj − 1}
otherwise.
• For every j ∈ J, bj = Nj − 1 − aj if 0 < aj < Nj − 1, and bj equals 0 otherwise.
Moreover bj may also be equal to aj in the case when either ai = 0 or ai = Ni − 1
for some i ∈
/ J.
Any two distinct exponents b and b′ in Ra are called reciprocal, and a will be named
symmetric whenever card(Ra ) = 1. Points that are not symmetric are called asymmetric.

Proof. Let a and b ∈ Ra and assume 0 < aj < Nj − 1 for j ∈
/ J. By Proposition 2,
a
b
J is
evJ (X ) is not orthogonal to evJ (X ), and therefore a, b ∈ ∆ to guarantee that E∆
J
LCD. It is also clear that if ∆ = Ra , the (Euclidean) dual code C∆ is generated by the
complement of ∆ in HJ .
Finally, when aj = Nj − 1 or aj = 0 for j 6∈ J, for constructing an LCD code whose dual
J , and not in C J , those vectors ev (X b )
is generated by monomials, one should have in E∆
J
∆
a
which are not orthogonal to evJ (X ). This proves the result.

Remark 5. The cardinality of the sets Ra described in Theorem 4 is a power of 2. It is
1 or 2 if no coordinate of a equals 0 or Nj − 1 for some j 6∈ J.
When J 6= {1, 2, . . . , m} and p does not divide Nj for j 6∈ J, one can also get LCD
J-affine variety codes by including in ∆ subsets R′ a of Ra with cardinality a power of 2
whose elements have the i-th coordinate equal to either 0 or Ni −1 for some indices i in the
set {1, 2, . . . , m} \ J and the corresponding evaluation vectors are not orthogonal. In this
case, reasoning for ∆ = R′ a , the dual code is generated by the evaluation of the monomials
in HJ \ Ra and polynomials which are linear combinations of monomials with exponents
in Ra and orthogonal to the evaluation of the monomials in R′ a . In generic cases, the
J
dual space, contains a vector space with dimension nJ − card(R′ a ) which proves that E∆
is an LCD code. When considering this type of codes, we only consider the elements in
R′ a as reciprocal.
As an easy example, setting p = 3, q = 33 , m = 2, N1 = N2 = 14, J = {2}, a = (0, 1)
J is a LCD code of dimension 2. Notice
and ∆ = R′ a = {(0, 1), (0, 12)}, it holds that E∆
that ∆ = Ra = {(0, 1), (0, 12), (13, 12), (13, 1)} gives another LCD code with dimension 4.
Some of the codes presented in [5, Corollary 3.6] can be recovered by considering the
univariate case of J-affine variety codes, with J = {1}. The following result states parameters for LCD codes coming from the univariate case of J-affine variety codes. LCD
codes obtained from subfield-subcodes of J-affine variety codes will be presented in the
next section.
Proposition 6. Let N be a positive integer such that N − 1 divides q − 1 and set another
positive integer 1 ≤ δ ≤ (N − 1)/2 if N − 1 is even and δ ≤ N/2 − 1 otherwise. For
J of
J = ∅ and ∆ = {0, 1, . . . , δ − 1, N − δ, . . . , N − 2, N − 1}, it holds that the dual code C∆
J
the J-affine variety code E∆ is LCD with parameters [N, N − 2δ, 2δ]q . Furthermore, for
J and C J are LCD and
J = {1} and ∆ = {0, 1, . . . , δ − 1, N − δ, . . . , N − 2}, the codes E∆
∆
MDS with parameters [N − 1, 2δ − 1, N − 2δ + 1]q and [N − 1, N − 2δ, 2δ]q , respectively.
Proof. We prove the statement for the case when J = ∅. The proof is analogous when
J is the J-affine variety E J code given by ∆′ = {δ, δ +1, . . . , δ +
J = {1}. It is clear that C∆
∆′
(N − 2δ − 1)}. Now setting ∆′′ = {1, 2, . . . , N − 2δ}, it holds that {evJ (X a )|a ∈ ∆′′ } =

NEW BINARY AND TERNARY LCD CODES

5

{ev J (X a ) ∗ evJ (X N −δ ) : a ∈ ∆′ }, where ∗ denotes the component-wise product. Since
wt(evJ (X N −δ )) = N − 1, both codes have the same parameters. So the dimension is clear
and the distance follows from the fact that a polynomial of degree N − 2δ has at most
N − 2δ zeroes.

Now, for the general case and using Theorem 4, we get a new family of LCD codes with
a designed minimum distance. To prove it, we will need the following lemma which was
stated in [9, Proposition 4.1].
Lemma 7. Consider the ring RJ and fix a monomial ordering. Let f (X1 , . . . , Xm ) be a
am
polynomial of minimum total degree representing a class in RJ and let X a = X1a1 · · · Xm
be the leading monomial of f . Then
card {P ∈ ZJ | f (P ) 6= 0} ≥ δa ,
where
δa :=

m
Y

(Nj − ǫj − aj ) ,

j=1

ǫj being equal to 1 if j ∈ J and ǫj = 0 otherwise.
Proposition 8. Keep the notation as at the beginning of this section setting Nj > 1,
j = 1, 2, . . . , m, such that Nj − 1 divides q − 1. Let J = {1, 2, . . . , m} and fix αj < Tj /2 if
Tj is even and αj ≤ (Tj −1)/2 otherwise. Consider the subset of HJ , ∆ = L1 ×L2 ×· · ·×Lm
where Lj = {Tj /2 − αj , . . . , Tj /2, . . . , Tj /2 + αj } if Tj is even and Lj = {(Tj − 1)/2 −
αj , . . . , (Tj − 1)/2 + αj } otherwise.
J is an LCD code with parameters
Then, writing Aj = 2αj + 1, the code C∆


m
Y
nJ , nJ −
Aj , ≥ min{Aj + 1} .
j=1

j∈J

q

J is LCD. Moreover, multiplying each generator of E J by
Proof. Theorem 4 proves that C∆
∆
Q
βj
evJ (1/ j∈J Xj ) for suitable powers βj , one obtains a monomially equivalent code (see
J where the bottom left corner of the box ∆′ is 0. The codes E J
[19, Definition 3.1]) E∆
′
∆
J
and E∆′ have the same dimension and distance and the same weight enumerators (see
J has the same minimum distance
again [19]). Proposition 2 shows that the dual code C∆
′
J
as the code E∆′′ , where
′′

∆ = {0, . . . , T1 } × {0, . . . , T2 } · · · × {0, . . . , Tm }\
{0, T1 , T1 − 1, . . . , T1 − A1 + 1} × · · · × {0, Tm , Tm − 1, . . . , Tm − A1 + 1}.
J
Then, the result follows after applying Lemma 7. Notice that when Nj − 1 = q − 1, E∆
′′
is a toric code and the result holds by [20, Theorem 3] or [26, Example 5.1].


Now, and up to the end of this section, for providing a unified treatment according to
the different sets J, we make a shift for the exponent of the monomials defining our code.
Such a set is
HJ = {ǫ1 , ǫ1 + 1, . . . , ǫ1 + T1 } × {ǫ2 , ǫ2 + 1, . . . , ǫ2 + T2 } × · · · × {ǫm , ǫm + 1, . . . , ǫm + Tm }.
Identifying Tj + ǫj with 0, for j ∈ J, we obtain a bijection from HJ to HJ . Note that HJ
and HJ are two different sets of exponents satisfying that the classes of the corresponding

6

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

monomials in RJ are the same. Then, we consider the following set of monomials in R


m


Y
(bj + 1 − ǫj ) < t ,
N (J, t) = X b | ǫj ≤ bj ≤ Nj − 1, 1 ≤ j ≤ m, and


j=1

where ǫj = 1 if j ∈ J and it equals zero otherwise. The hyperbolic code Hyp(J, t) [28, 13]
can be defined as the (Euclidean) dual of the code given by the vector subspace of Fnq J
generated by the evaluation by evJ of the classes in RJ of the monomials in N (J, t). By
[9, Proposition 4.3], the minimum distance of Hyp(J, t) is larger than t − 1. With the help
of that code, we state the following result which will be useful.
Proposition 9. With the notation as in the above paragraph and at the beginning of this
section, set Nj > 1, for j =Q1, 2, . . . Q
, m, such that Nj − 1 divides q − 1. Fix a positive
integer such that t ≤ nJ = j ∈J
N
j
/
j∈J (Nj − 1), assume that p|Nj for all j 6∈ J and
consider the set ∆(J, t) = N (J, t)∪N (J, t)r , where N (J, t)r is the set of reciprocal elements
(defined as in Theorem 4 or in Remark 5) of those in N (J, t), where we notice that for
J
j ∈ J, Nj − 1 must be identified with 0. Then, the (Euclidean) dual C∆(J,t)
of the J-affine
J
variety code E∆(J,t) is a J-affine LCD code with parameters [nJ , nJ − card (∆(J, t)) , ≥ t]q .
Proof. The construction of the code containing elements and reciprocal proves that we
obtain an LCD code. The bound on the distance is also clear because we consider a code
contained in the code Hyp(J, t) whose distance is larger than t − 1.

We are not directly interested in the LCD codes given by the above results because of
the recent papers [6, 24] that show the existence of LCD codes for q > 3 as good as linear
codes. We will use them for obtaining suitable subfield-subcodes which will give rise to
good binary and ternary LCD codes.
2. LCD subfield-subcodes of J-affine variety codes
Keep the notation as in Section 1. For j ∈ J, let ZTj = Z/hNj −1i where we represent its
classes by {0, 1, . . . , Tj }. For j 6∈ J, we represent the classes of Z/hNj − 1i by {1, 2, . . . , Tj }
and define ZTj = {0} ∪ Z/hNj − 1i, where we represent its classes by {0, 1, . . . , Tj }. A
subset I of the Cartesian product ZT1 × ZT2 × · · · × ZTm is called a cyclotomic set with
respect to p if p · x ∈ I for any x = (x1 , x2 , . . . , xm ) ∈ I, where p · x = (px1 , px2 , . . . , pxm ).
I is said to be minimal (with respect to p) whenever it contains all the elements that
can be expressed as pi · x for some fixed element x ∈ I and some nonnegative integer
i. Within each minimal cyclotomic set I, we pick a representative a = (a1 , a2 , . . . , am )
given by nonnegative integers such that a1 is the minimum of the first coordinates of
the nonnegative representatives of the elements in I, a2 is the minimum of the second
coordinates of those elements in I having a1 as a first coordinate and the remaining
coordinates, a3 , . . . , am are defined in the same way. We will denote by Ia the cyclotomic
set I with representative a and by A the set of representatives of the minimal cyclotomic
sets. Thus, the set of minimal cyclotomic sets will be {Ia }a∈A . In addition, we will
denote ia := card(Ia ). Note that one can consider the cyclotomic sets with respect to an
intermediate power ps , such that s divides r, however, since we only want to consider the
case when p equals 2 and 3, we set s = 1.
Consider a and let b be a reciprocal of a. Abusing the notation, let Ib be the cyclotomic
set that contains b. Taking into account the ring structure behind the two different sets
ZTj , one gets the following straightforward result.

NEW BINARY AND TERNARY LCD CODES

7

Lemma 10. Let a ∈ A and let b be a reciprocal element. Then for every element in
Ia there is a unique reciprocal element in Ib and both cyclotomic sets have the same
cardinality. In addition, if a is asymmetric, then Ia ∩ Ib = ∅.
With the above notation, we say that a cyclotomic set Ia is symmetric if Ia = Ib for
all reciprocal element b. Otherwise we will say that it is asymmetric. In addition, we
define a partition of A as follows A = A1 ∪ A2 (A1 ∩ A2 = ∅), where A1 consists of the
representatives of the symmetric cyclotomic sets and, for the asymmetric sets Ia 6= Ia′ ,
where a and a′ are reciprocal elements, we consider a in A1 if a < a′ for the lexicographical
ordering.
J over F = F r is defined as E J,σ :=
The subfield-subcode of a J-affine variety code E∆
q
p
∆
r−1
E∆ ∩ Fnp J . Consider the following maps tr : Fq → Fp , tr(x) = x + xp + · · · + xp ;
tr : Fnq J → Fnp J given componentwise by tr(x), and T : RJ → RJ defined by T (f ) =
r−1
f + f p + · · · + f p . We say that a class f ∈ RJ evaluates to Fp whenever f (a) ∈ Fp for all
a ∈ ZJ . In [10, Proposition 5] it is proved that f evaluates to Fp if and only if f = T (g)
for some g ∈ RJ . Now, considering for each a ∈ A, the close to T map, Ta : RJ → RJ ,
(ia −1)
, we get the following result about the dimension of the
Ta (f ) = f + f p + · · · + f p
J,σ
code E∆
. The proof is analogous to that in [10, Theorem 4].
Theorem 11. Let ∆ be a subset of HJ and set ξa a primitive element of the field Fpia .
J,σ
is given by the images under the map evJ of the set
Then, a basis of the vector space E∆
of classes in RJ
[
{Ta (ξas X a )|0 ≤ s ≤ ia − 1} .
a∈A|Ia ⊆∆

2.1. Binary and ternary LCD subfield-subcodes coming from the univariate
case. We devote this section to provide binary and ternary LCD codes obtained as
subfield-subcodes of univariate J-affine variety codes. The reasoning in Proposition 6
and the above paragraphs in Section 2 support the proof. We assume that p equals 2 or
3.
Proposition 12. Let N be a positive integer such that N − 1 divides q − 1. Recall that
q = pr for a positive integer r. With the above notation, write A1 = {a0 = 0 < a1 <
a2 < · · · < az } the first set in the above given partition of A. Let t ∈ {1, 2, . . . , z}, and set
∆ = ∆1 ∪ ∆2 , where
∆1 = Ia0 ∪ Ia1 ∪ · · · ∪ Iat
and ∆2 is the union of the cyclotomic cosets with the reciprocal elements to those in ∆1 .
J,σ
over Fp is LCD and has parameters: [N − 1, N − 1− card(∆), ≥
Then the dual code of E∆
2at+1 ]p when J = {1} and [N, N − card(∆), ≥ 2at+1 ]p otherwise (J = ∅).
Proof. Theorem 4 and Lemma 10 prove that our code is LCD. Theorem 11 determines the
dimension of our code since the set ∆ only contains complete cyclotomic sets. Finally, the
same reasoning as in Proposition 6 and the fact that we are considering subfields-subcodes
proves the bound for the minimum distance. Notice that we have 2at+1 − 1 consecutive
elements in the dual case and that if ai is symmetric, the equality Iai = IaN−1−ai holds. 
For the sake of generality, we provide formulae for the dimension under certain assumptions. First, we need some lemmas regarding cyclotomic sets, that are simply cyclotomic
cosets for the one-variable case. The first one is essentially [1, Lemma 8].

8

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

Lemma 13. Let N > 1 be an integer such that N − 1 divides q − 1 and assume that
p⌊r/2⌋ < N − 1 ≤ pr − 1. Then the cyclotomic sets Ia have cardinality r for all 1 ≤ a ≤
(N − 1)p⌈r/2⌉ /(pr − 1).
Next we characterize symmetric cyclotomic sets. Recall that q = pr and we are interested only in the cases p = 2 and p = 3.
Lemma 14. Let N > 1 be an integer such that N − 1 divides q − 1, where p ∈ {2, 3}.
Then, the cyclotomic set Ia , with a > 0, is symmetric if and only if
N −1
a= j
,
p +1
for some j ∈ {0, 1, . . . , r − 1} such that pj + 1 is a divisor of N − 1.
Proof. It follows from the fact that Ia is symmetric whenever there exists j ∈ {0, 1, . . . , r −
1} such that a = N − 1 − apj , that is a = (N − 1)/(pj + 1).

The following result gives sufficient conditions for asymmetry of cyclotomic sets when
m = 1.
Proposition 15. Keep the above notations, that is N > 1 such that N − 1 divides q − 1
and p ∈ {2, 3}. Then:
• If r is odd, there are no symmetric cyclotomic set, unless when p = 3 and 2 divides
N − 1. In this case, the unique symmetric cyclotomic set is I(N −1)/2 .
r
• Otherwise (for r even), Ia is asymmetric if a < (N − 1)/(p 2 + 1).
Proof. For a start we consider the case when r is odd. First we assume that j = 0, then
pj + 1 = 2. When p = 2, q − 1 = 2r − 1 = 2(2r−1 − 1) + 1 and so N − 1 is odd, therefore
pj + 1 does not divide N − 1 and there is no symmetric cyclotomic set by Lemma 14. In
case p = 3, if N − 1 is even, then pj + 1 divides N − 1 and we have a cyclotomic symmetric
set by Lemma 14.
Suppose now that j > 0, write r = kj + l, 0 ≤ l < j, and consider the Euclidean division
between the polynomials X r − 1 and X j + 1:



X r − 1 = X r−j − X r−2j + X r−3j − · · · + (−1)k−1 X l X j + 1 + (−1)k X l − 1.

Specializing X to the value p, we get that if j does not divide r then pj + 1 does not divide
q − 1. The same holds on the contrary, when l = 0, since r odd implies k odd and the
remainder is not zero.
Finally assume that r is even. The symmetric cyclotomic set with smallest representative is given by the largest divisor of the form pj + 1 of N − 1, for j ∈ {0, 1, . . . , r − 1}.
The largest possible divisor is given by j = r/2, hence the representative of a symmetric
r

set is larger than or equal to (N − 1)/(p 2 + 1) and the result holds.
We are now ready to explicitly determine all the parameters of some of the codes
described in Proposition 12. We consider the first cyclotomic set I0 , pairs of asymmetric
cyclotomic sets and possibly, a symmetric cyclotomic and IN −1 . Actually, our next two
results hold for any prime p.

Theorem 16. Keep the above notation where N is a positive integer such that N −1 divides
q − 1. Assume that p⌊r/2⌋ < N − 1 ≤ pr − 1 and consider the first set of representatives
of cyclotomic sets A1 = {a0 = 0 < a1 < a2 < · · · < az } in the above given partition of A.
Let t ∈ {1, 2, . . . , z} be such that at ≤ (N − 1)p⌈r/2⌉ /(pr − 1) and set ∆ = ∆1 ∪ ∆2 , where
∆1 = Ia0 ∪ Ia1 ∪ · · · ∪ Iat

NEW BINARY AND TERNARY LCD CODES

9

and ∆2 the union of the cyclotomic cosets with reciprocal elements to those in ∆1 . Then,
J,σ
• If r is odd or if r is even and at 6= (N − 1)pr/2 /(pr − 1), the dual code of E∆
,
over Fp , is LCD and has parameters: [N − 1, N − 2tr, ≥ 2at+1 ]p when J = {1} and
[N, N − 2tr, ≥ 2at+1 ]p otherwise (J = ∅).
J,σ
• If r is even and at = (N − 1)pr/2 /(pr − 1), the dual code of E∆
, over Fp , is
LCD and has parameters: [N − 1, N − (2t − 1)r, ≥ 2at+1 ]p when J = {1} and
[N, N − (2t − 1)r, ≥ 2at+1 ]p otherwise (J = ∅).

Proof. The bound for the minimum distance follows from Proposition 12. Next we give a
proof for the dimension of the codes.
If r is odd or if r is even and at 6= (N − 1)pr/2 /(pr − 1), then, by Lemma 13, the
cardinality of all cyclotomic sets considered to define ∆ is r, excepting I0 (and occasionally
IN −1 if J = ∅); note that both sets have cardinality 1. Moreover, by Proposition 15, the
cyclotomic sets Iaj , j 6= 0, N − 1, considered to define ∆ are asymmetric, which concludes
the proof.
If r is even and at = (N − 1)pr/2 /(pr − 1), then the cardinality of all cyclotomic sets
considered to define ∆ (with the exception of I0 and possibly IN −1 ) is still r by Lemma
13. Furthermore, by Proposition 15, all the cyclotomic sets considered to define ∆ are
asymmetric but I0 and possibly IN −1 , and Iat which is symmetric. Therefore, the equality
2r(t − 1) + r = (2t − 1)r finishes the proof.

To conclude this subsection, we prove that using Lemma 9 in [1] one can avoid to
consider representatives of cyclotomic sets, however in some cases, one will obtain codes
with a smaller range of minimum distances. With our notation, Lemma 9 in [1] is the
following result.
Lemma 17. With the above notation, let N be a positive integer such that N − 1 | pr − 1
and suppose that p⌊r/2⌋ < N − 1 ≤ pr − 1. If x, y are distinct integers in the range
1 ≤ x, y ≤ min{⌊(N − 1)p⌈r/2⌉ /(pr − 1) − 1⌋, N − 2} which are not zero modulo p, then the
cyclotomic cosets defined by x and y are different.
The latter lemma determines an interval of integers where the corresponding cyclotomic
sets are all different and allows us to prove the following result.
Theorem 18. Let q = pr , where r is a positive integer and p ∈ {2, 3}. Let N be a positive
integer such that N − 1 divides q − 1 and p⌊r/2⌋ < N − 1 ≤ pr − 1. Then, for each integer
δ such that 2 ≤ δ ≤ min{⌊(N − 1)p⌈r/2⌉ /(pr − 1)⌋, N − 2}, there exists an LCD code with
length either N − 1 or N , designed minimum distance ≥ 2δ and dimension
k = N − 2(r⌈(δ − 1)(1 − 1/p)⌉).
Proof. We are considering sets ∆ as above where t is the largest integer such that at <
δ ≤ at+1 . Notice that the conditions in our statement also fulfil the conditions in Lemma
13, and therefore all the cyclotomic sets (with the exception of I0 and possibly IN −1 )
have cardinality r. Moreover, since 2 ≤ δ ≤ min{⌊(N − 1)p⌈r/2⌉ /(pr − 1)⌋, N − 2}, the
representatives of the cyclotomic sets we use satisfy 1 ≤ a ≤ min{⌊(N − 1)p⌈r/2⌉ /(pr −
1) − 1⌋, N − 2}. Under this condition, Proposition 15 states that we have no symmetric
cyclotomic set (excepting I0 ). Finally, Lemma 17 warranties that, in order to compute
the dimension of our codes, we only have to count how many integers, in the range of the
statement, are not congruent with zero module p. The result holds since there are exactly
r⌈(δ − 1)(1 − 1/p)⌉ such integers.


10

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

2.2. Binary and ternary LCD subfield-subcodes coming from the multivariate
case. In this section we state two results providing LCD codes which are not reversible
codes. They are obtained as dual codes of subfield-subcodes of J-affine variety codes
and reach lengths that are not achievable with BCH codes. Our first result considers
subfield-subcodes of J-affine variety codes given by the union of cyclotomic sets whose
representatives are in the box defined in Proposition 8 and the second one is similar but
taking representatives in the set ∆(J, t) defined in Proposition 9. Using Lemma 10, they
can be proved reasoning in a similar way as we did in Propositions 8 and 9. Our first
result is the following.
Theorem 19. Let Nj , 1 ≤ j ≤ m, be positive integers such that Nj − 1 divides q − 1.
Assume that J = {1, 2, . . . , m} and fix αj < Tj /2 if Tj is even and αj ≤ (Tj − 1)/2
otherwise. Consider the subset of HJ , ∆ = L1 × L2 × · · · × Lm where Lj = {Tj /2 −
αj , . . . , Tj /2, . . . , Tj /2 + αj } if Tj is even and Lj = {(Tj − 1)/2 − αj , . . . , (Tj − 1)/2 + αj }
otherwise. Consider the cyclotomic sets {Ia }a∈A and let A∆ be the set of representatives
in A such that Ia ∩ ∆ 6= ∅. Set ∆σ := ∪a∈A∆ Ia .
J,σ
Then, setting Aj = 2αj + 1, the (Euclidean) dual code of the subfield-subcode E∆
σ is an
LCD code with parameters


σ
nJ , nJ − card(∆ ), ≥ min{Aj + 1} .
j∈J

p

Finally we state the second result.
Theorem 20. Let Nj , j = 1, 2, . . . , m, be a positive integer
such
Q
Q that Nj − 1 divides q − 1.
Fix another positive integer t such that t ≤ nJ = j ∈J
/ Nj
j∈J (Nj − 1), assume that
p|Nj for all j 6∈ J and consider the set N (J, t) defined before Proposition 9. Consider
the cyclotomic sets {Ia }a∈A and let S
AN (J,t) be the set of representatives in A such that
σ
Ia ∩ N (J, t) 6= ∅. Set N (J, t) := a∈AN(J,t) (Ia ∪ Ira ), where Ira means the family of
reciprocal to Ia cyclotomic sets.
J,σ
Then, the (Euclidean) dual of the subfield-subcode EN
(J,t)σ is an LCD code with parameters
[nJ , nJ − card(N (J, t)σ ), ≥ t]p .
Remark 21. The construction in Theorem 20 can be improved from the point of view
of subfield-subcodes when J 6= ∅ by noticing that the code Hyp(J, t)⊥ is monomially
J
equivalent to EN
(see [19] for the definition and properties of monomially equivalent
0 (J,t)
codes), where
t) is given by the monomials X b /X ǫ , for b in N (J, t), where X ǫ is
Qm N0ǫ(J,
j
equal to j=1 Xj and ǫj as defined in Lemma 7. Then, with the same notation as in
Theorem 20, but replacing N (J, t) with N0 (J, t), we obtain LCD codes with parameters
[nJ , nJ − card(N0 (J, t)σ ), ≥ t]p . Cyclotomic sets where some coordinates are zero have
lower cardinality which improves the dimension of the dual codes. This approach will be
used in some of our examples in the next section.
3. Examples
The main references giving parameters of binary and ternary LCD codes are [17, 18, 25].
All of them use BCH codes, the two first papers obtain LCD codes for concrete lengths
and distances on arbitrary finite fields and the latter, from suitable representatives of
cyclotomic cosets, computes parameters for some binary LCD codes which, according to

NEW BINARY AND TERNARY LCD CODES

11

[14], are optimal or BKLC (best known linear codes). We will use this terminology along
this section.
In the following two subsections, we will give examples of good binary and ternary LCD
codes obtained with our results.
As regards binary LCD codes obtained from the univariate case, by using Theorems 16
and 18 we will be able to improve some codes in [17] which are also given in [25]; in this
particular case, the main advantages of our procedure are that we can avoid to compute
cyclotomic sets (cosets in this case) and that we can get LCD codes with even length. Still
on the univariate case but over F3 , we will provide new examples of ternary LCD codes
which are optimal or BKLC.
With respect to the multivariate case, Theorem 20 and especially its version in Remark
21 give rise to generic families of binary and ternary LCD codes. Some of them are shown
below and for some concrete values they provide new LCD codes which are optimal or
BKLC.
3.1. Binary LCD codes. We devote this subsection to provide some examples of new
binary LCD codes.
Example 1. As a first example, let p = 2 and r = 12. By computing the cyclotomic sets,
one can check that A1 = {0, 1, 3, 5, 7, 11, 13}. Then according to Proposition 12 we obtain
codes with parameters:
[65, 64, ≥ 2]2 , [65, 52, ≥ 6]2 , [65, 40, ≥ 10]2 , [65, 28, ≥ 14]2 , [65, 16, ≥ 22]2 , [65, 4, ≥ 26]2 ,
and
[66, 64, ≥ 2]2 , [66, 52, ≥ 6]2 , [66, 40, ≥ 10]2 , [66, 28, ≥ 14]2 , [66, 16, ≥ 22]2 , [66, 4, ≥ 26]2 .
Codes with odd length are obtained in [25]. Codes with even length are new and the codes
with minimum distance 2, 6 and 10 are BKLC.
Example 2. Theorem 18 allows us to get new binary LCD codes with large length and
minimum distance. For example, if we consider p = 2, r = 14 and N = pr , we get
LCD codes with minimum distances from 4 to 256. For instance, some parameters are
[16383, 14606, ≥ 256]2 , [16383, 14620, ≥ 254]2 , [16383, 14634, ≥ 252]2 .
Example 3. Now, we give an example of an optimal LCD code which can be obtained
applying Remark 21. With the notation as in Theorem 20, p = 2, r = 4, J = {1, 2, 3},
N1 = 16 and N2 = N3 = 4. Thus nJ = 135 and for t = 4, it holds that
N0 (J, t)σ = {(0, 0, 0), (0, 0, 2), (0, 0, 1), (0, 2, 0), (0, 1, 0), (2, 0, 0), (4, 0, 0),
(8, 0, 0), (1, 0, 0), (14, 0, 0), (13, 0, 0), (11, 0, 0), (7, 0, 0)},
and we obtain a code with parameters [135, 122, 4]2 which is optimal.
Example 4. With the previous notation, consider p = 2, r = 4, J = {1, 2, . . . , m},
N1 = N2 = · · · = Nm = 4 and t = 4. Again by Remark 21, it holds that
N0 (J, t) = {(0, 0, . . . , 0), (1, 0, . . . , 0), (2, 0, . . . , 0), . . . , (0, 0, . . . , 1), (0, 0, . . . , 2)} .
Then, we get LCD codes with parameters [3m , 3m − 2m − 1, ≥ 4]2 . According to [14], these
codes are optimal for 2 ≤ m ≤ 5.
Another example with the same values Ni , 1 ≤ i ≤ m, but larger minimum distance is
obtained by setting m = 3 and t = 12. Then N0 (J, t)σ consists of the exponents of the
monomials X a /X ǫ as defined in Remark 21, a in HJ , excepting
{(2, 1, 2), (1, 2, 1), (2, 1, 1), (1, 2, 2), (2, 2, 1), (1, 1, 2)}.

12

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

Therefore, we get an LCD code with parameters [27, 6, 12]2 which according to [14] is
optimal.
Finally, writing N1 = N2 = · · · = Nm = 2 and J = ∅, Theorem 20 for t = 4 shows that
we are considering as N (J, 4)σ the elements in the axes and their reciprocal. So we obtain
LCD codes with parameters [2m , 2m − 2(m + 1), ≥ 4]2 . For m = 7, 8, the parameters are
[128, 112, ≥ 4]2 and [256, 238, ≥ 4]2 . These codes are not optimal, however according to
[14], the obtained dimensions are only three units less than those of the corresponding
optimal codes.
Example 5. The same technique in Example 4, with p = 2 and r = 4, but decomposing
m = m1 + m2 and considering N1 = N2 = · · · = Nm1 = 4 and Nm1 +1 = Nm1 +2 = · · · =
Nm = 6 gives LCD codes with parameters
[3m1 5m2 , 3m1 5m2 − 2m1 − 4m2 − 1, ≥ 4]2 .
Some optimal LCD codes in this family have parameters [45, 36, 4]2 , [75, 64, 4]2 , [81, 72, 4]2 ,
[125, 112, 4]2 and [200, 187, 4]2 .
Analogously, one can consider r = 6 and N1 = N2 = · · · = Nm1 = 4 and Nm1 +1 =
Nm1 +2 = · · · = Nm = 8, obtaining LCD codes with parameters [3m1 7m2 , 3m1 7m2 − 2m1 −
6m2 −1, ≥ 4]2 . Within this family, there are optimal LCD codes with parameters [63, 5, 4]2
and [189, 176, 4]2 .
To finish, we give two other families of binary LCD codes. Consider N1 = 2k/2 + 2, k
even, and N2 = N3 = · · · = Nm = 4. For suitable values of r, we get LCD codes with
parameters [3m−1 (2k/2 + 1), 3m−1 (2k/2 + 1) − 2(m − 1) − k − 1, ≥ 4]2 and [3m−1 (2k/2 +
1), 3m−1 (2k/2 + 1) − 2(m − 1) − 2k − 1, ≥ 6]2 . Some good LCD codes in these families have
the following parameters: [15, 8, 4]2 , [153, 140, 4]2 , [45, 32, 6]2 , [135, 118, 6]2 , [51, 40, ≥ 4]2
and [153, 132, ≥ 6]2 . All of them are optimal with the exception of the last two which are
BKLC.
3.2. Ternary LCD codes. In this section we show some examples of good ternary LCD
codes derived from our results.
Example 6. In this example, we use again Proposition 12 for giving new and good ternary
LCD codes. Set p = 3, r = 4 and N = 81. Then
A1 = {0, 1, 2, 4, 5, 7, 8, 11, 13, 14, 16, 20, 40}
and computing the corresponding sets ∆, we get LCD codes with parameters [80, 63, ≥ 8]3
and [80, 47, ≥ 14]3 which are BKLC. Considering r = 5 and N = 122 one obtains an LCD
code with parameters [121, 100, ≥ 8]3 which is also BKLC. Finally for N = 243, LCD
codes which are BKLC with parameters [242, 221 ≥ 8]3 , [242, 201 ≥ 14]3 , [242, 181 ≥ 20]3 ,
[242, 161 ≥ 26]3 are obtained.
Consider now p = 3 and r = 8. After computing the corresponding cyclotomic sets, one
can check that all of them (with the exception of I0 in case J = ∅) are symmetric. Then
A1 = {0, 1, 2, 4, 5, 7, 8, 11, 13, 14, 16, 41}. Thus, we obtain codes with parameters:
[82, 81, 2]3 , [82, 73, 4]3 , [82, 65, 8]3 , [82, 57, 10]3 , [82, 49, 14]3 , [82, 41, 16]3 ,
[82, 33, 22]3 , [82, 25, 26]3 , [82, 17, 28]3 , [82, 9, 32]3 , [82, 1, 82]3 .
Moreover the codes with parameters
[82, 81, 2]3 , [82, 65, 8]3 , [82, 57, 10]3 , [82, 49, 14]3 , [82, 1, 82]3 ,

NEW BINARY AND TERNARY LCD CODES

13

are BKLC. Notice that in this last case we provide true minimum distance; the three first
codes were also obtained in [17].
As mentioned, taking J = ∅, one obtains LCD codes with the same parameters except
the length is one unit more.
Example 7. With the same notation as in the above example, let p = 3 and r = 6.
Setting N = 42, it holds that A1 = {0, 1, 2, 4, 7, 8} and we obtain ternary LCD codes with
length 41 and 42 and the same dimension and minimum distance. The parameters in the
first case are:
[41, 40, 2]3 , [41, 32, 5]3 , [41, 24, 8]3 , [41, 16, 14]3 , [41, 8, 22]3 ,
where those with minimum distance 2, 5 and 22 are BKLC; as before, we are providing
the true minimum distance.
Example 8. Here we apply the same procedure we used for constructing the first family of
LCD codes in Example 5. Set p = 3, r = 8, m = m1 +m2 +m3 , N1 = N2 = · · · = Nm1 = 3,
Nm1 +1 = Nm1 =+2 = · · · = Nm2 = 5 and Nm1 +m2 +1 = Nm1 +m2 +2 = · · · = Nm = 6. Then
we get LCD codes with parameters
[2m1 4m2 5m3 , 2m1 4m2 5m3 − m1 − 3m2 − 4m3 − 1, ≥ 4]3 .
Some optimal codes in this family have the following parameters: [16, 11, 4]3 , [32, 26, 4]3 ,
[128, 120, 4]3 and [64, 57, 4]3 . A BKLC with parameters [160, 150, ≥ 4]3 belongs also to the
previous family.
An analogous reasoning as was given for the last family of codes in Example 5 gives rise
to a new family of LCD codes with parameters
[2m−1 (3k/2 + 1), 2m−1 (3k/2 + 1) − (m − 1) − k − 1, ≥ 3]3 .
Some codes in this family have true minimum distance equal to 4 with parameters [20, 14, 4]3 ,
[40, 33, 4]3 , [56, 48, 4]3 and [164, 154, 4]3 . The first two codes are optimal and the last two
are BKLC.
Finally, again for p = 3, any r, N1 = N2 = · · · = Nm = 3 and J = {2, 3, . . . , m} we
have that Remark 21, for t = 4, gives a set N0 (J, 4) containing the elements of the axes
and their reciprocal. When the non-vanishing coordinate is not the first coordinate, there
is only one new reciprocal element and therefore we consider two elements in N0 (J, 4)σ ;
otherwise we must consider three elements instead, since one of them is symmetric. This
procedure gives rise to LCD codes with parameters [3 · 2m−1 , 3 · 2m−1 − 2m − 1, ≥ 4]3 . For
instance, for m = 7, the parameters are [192, 177, ≥ 4]3 ; codes with the same parameters
and distance one unit more are optimal.
References
[1] S.A. Aly, A. Klappenecker, and P. K. Sarvepalli. On quantum and classical BCH codes. IEEE Trans.
Inform. Theory, 53(3):1183–1188, 2007.
[2] M. Braun, T. Etzion, and A. Vardy. Linearity and complements in projective space. Linear Algebra
Appl., 430:57–70, 2013.
[3] J. Bringer et al. Orthogonal direct sum masking, a smartcard friendly computation paradigm in a
code, with builtin protection against side-channel and fault attacks. Lect. Notes Comp. Sc., 8501:40–
56, 2014.
[4] C. Carlet and S. Guilley. Complementary dual codes for counter-measures to side-channel attacks.
Adv. Math. Commun., 10(1):131–150, 2016.
[5] C. Carlet, S. Mesnager, C. Tang, and Y. Qi. Euclidean and Hermitian LCD MDS codes. Arxiv,
Preprint, 1702.08033, 2017.

14

CARLOS GALINDO, OLAV GEIL, FERNANDO HERNANDO AND DIEGO RUANO

[6] C. Carlet, S. Mesnager, C. Tang, and Y. Qi. Linear codes over Fq which are equivalent to LCD codes.
Arxiv, Preprint, 1703.04346, 2017.
[7] J. Fitzgerald and R.F. Lax. Decoding affine variery codes using Gröbner basis. Des. Codes Crytogr.,
13:147–158, 1998.
[8] C. Galindo, O. Geil, F. Hernando, and D. Ruano. Improved constructions of nested code pairs. IEEE
Trans. Inform. Theory, IEEE Early Access Articles. DOI: 10.1109/TIT.2017.2755682, 2017.
[9] C. Galindo, O. Geil, F. Hernando, and D. Ruano. On the distance of stabilizer quantum codes from
J-affine variety codes. Quantum Inf. Process., 16(4):Art. 111, 32 pp, 2017.
[10] C. Galindo and F. Hernando. Quantum codes from affine variety codes and their subfield subcodes.
Des. Codes Crytogr., 76:89–100, 2015.
[11] C. Galindo, F. Hernando, and D. Ruano. New quantum codes from evaluation and matrix-product
codes. Finite Fields Appl., 36:98–120, 2015.
[12] C. Galindo, F. Hernando, and D. Ruano. Stabilizer quantum codes from J-affine variety codes and a
new Steane-like enlargement. Quantum Inf. Process., 14(9):3211–3231, 2015.
[13] O. Geil and T. Høholdt. On hyperbolic codes. Lect. Notes Comp. Sc., 2227:159–171, 2001.
[14] M. Grassl. Bounds on the minimum distance of linear codes. www.codetables.de, accessed on 30-092017.
[15] X. Hou and F. Oggier. On LCD codes and lattices. Proc. IEEE Int. Symp. on Inform. Theory, pages
1501–1505, 2016.
[16] L. Jin. Construction of MDS codes with complementary duals. IEEE Trans. Inform. Theory,
63(5):2843–2847, 2017.
[17] C. Li, C. Ding, and S. Li. LCD cyclic codes over finite fields. IEEE Trans. Inform. Theory, 63(7):4344–
4356, 2017.
[18] S. Li, C. Li, C. Ding, and H. Liu. Two families of LCD BCH codes. IEEE Trans. Inform. Theory,
63(9):5699–5717, 2017.
[19] J. Little and R. Schwarz. On m-dimensional toric codes. Arxiv, Preprint, 0506102, 2005.
[20] J. Little and R. Schwarz. On toric codes and multivariate Vandermonde matrices. Appl. Algebra Engrg.
Comm. Comput., 18(4):349–367, 2007.
[21] C. Marcolla, E. Orsino, and M. Sala. Improved decoding of affine variety codes. J. Pure Appl. Algebra,
216:147–158, 2012.
[22] J.L. Massey. Reversible codes. Inf. Control, 7:369–380, 1964.
[23] J.L. Massey. Linear codes with complementary duals. Discrete Math., 106/107:337–342, 1992. A collection of contributions in honour of Jack van Lint.
[24] R. Pellikaan. LCD codes over Fq are as good as linear codes for q at least four. Arxiv, Preprint,
1707.08856, 2017.
[25] Y. Rao et al. On binary LCD cyclic codes. Procedia Comp. Sc., 107:778–783, 2017.
[26] D. Ruano. On the parameters of r-dimensional toric codes. Finite Fields Appl., 13(4):962–976, 2007.
[27] D. Ruano. On the structure of generalized toric codes. J. Symbolic Comput., 44(5):499–506, 2009.
[28] K. Saints and C. Heegard. On hyperbolic cascaded Reed-Solomon codes. In Applied algebra, algebraic
algorithms and error-correcting codes (San Juan, PR, 1993), volume 673 of Lecture Notes in Comput.
Sci., pages 291–303. Springer, Berlin, 1993.
[29] N. Sendrier. Linear codes with complementary duals meet the Gilbert-Varshamov bound. Discrete
Math., 285:345–347, 2004.
[30] K.K. Tzeng and C.R.P. Hartmann. On the minimum distance of certain reversible cyclic codes. IEEE
Trans. Inform. Theory, 16(5):644–646, 1970.
[31] W.B. Vasantha et al. Erasure techniques in MRD codes. Zip publishing, Ohio, 2012.
[32] X. Yang and J.L. Massey. The necessary and sufficient condition for a cyclic code to have a complementary dual. Discrete Math., 126:391–393, 1994.
Current address: Carlos Galindo and Fernando Hernando: Instituto Universitario de Matemáticas y
Aplicaciones de Castellón and Departamento de Matemáticas, Universitat Jaume I, Campus de Riu Sec.
12071 Castelló (Spain), Olav Geil and Diego Ruano: Department of Mathematical Sciences, Aalborg
University, Skjernvej 4A, 9220 Aalborg East (Denmark).
E-mail address: Galindo: galindo@uji.es; Geil: olav@math.aau.dk; Hernando: carrillf@uji.es;
Ruano: diego@math.aau.dk

