Abstract
Recently, linear codes constructed from defining sets have been investigated extensively and they have many applications. In this paper, for an odd prime p, we propose a class of p-ary linear codes by choosing a proper defining set. Their weight enumerators and complete weight enumerators are presented explicitly. Our results show that they are linear codes with three weights and suitable for the constructions of authentication codes and secret sharing schemes.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Throughout this paper, let p be an odd prime and r = p m for an integer \(m\geqslant 2\). Denote by \(\mathbb {F}_{r}\) a finite field with r elements. An [n, κ, δ] linear code C over \(\mathbb {F}_{p}\) is a κ-dimensional subspace of \(\mathbb {F}_{p}^{n}\) with minimum distance δ (see [8, 27]).
Let A i denote the number of codewords with Hamming weight i in a linear code C of length n. The weight enumerator of C is defined by A 0 + A 1 z + A 2 z 2+⋯ + A n z n, where A 0 = 1. The sequence (1, A 1, A 2,⋯ , A n ) is called the weight distribution of the code C.
The complete weight enumerator of a code C over \(\mathbb {F}_{p}\) enumerates the codewords according to the number of symbols of each kind contained in each codeword. Denote elements of the field by \(\mathbb {F}_{p}=\{w_{0},w_{1},\cdots ,w_{p-1}\}\), where w 0 = 0. For a vector \(\mathsf {v}=(v_{0},v_{1},\cdots ,v_{n-1})\in \mathbb {F}_{p}^{n}\), the composition of v, denoted by comp(v), is defined as
where k j is the number of components v i (0 ≤ i ≤ n−1) of v that equal to w j . It is easy to see that \({\sum }_{j=0}^{p-1}k_{j}=n\). Let A(k 0, k 1,⋯ , k p−1) be the number of codewords c∈C with comp(c)=(k 0, k 1,⋯ , k p−1). Then the complete weight enumerator of the code C is the polynomial
where \( B_{n}=\left \{(k_{0},k_{1},\cdots ,k_{p-1}): 0 \leqslant k_{j} \leqslant n, {\sum }_{j=0}^{p-1}k_{j}=n \right \} \).
The weight distributions of linear codes have been well studied in the literature (see [12, 16, 17, 26, 29, 31, 32, 35–38] and references therein). The information of the complete weight enumerators of linear codes is of vital use because they not only give the weight enumerators but also show the frequency of each symbol appearing in each codeword. Therefore, they have many applications. Blake and Kith investigated the complete weight enumerator of Reed-Solomon codes and showed that they could be helpful in soft decision decoding [4, 20]. In [18], the study of the monomial and quadratic bent functions was related to the complete weight enumerators of linear codes. It was illustrated by Ding et al. [10, 11] that complete weight enumerators can be applied to the calculation of the deception probabilities of certain authentication codes. In [6, 7, 13], the authors studied the complete weight enumerators of some constant composition codes and presented some families of optimal constant composition codes.
However, it is extremely difficult to evaluate the complete weight enumerators of linear codes in general and there is little information on this topic in the literature besides the above mentioned [4, 6, 7, 13, 20]. Kuzmin and Nechaev investigated the generalized Kerdock code and related linear codes over Galois rings and determined their complete weight enumerators in [21] and [22]. Further recent progress on the complete weight enumerators of linear codes can be found in [1, 2, 19, 23, 24, 33]. The results of [1] and [2] can be viewed as generalizations of [34] and [15], respectively. In [19, 23, 24, 33], the authors treated the complete weight enumerators of some linear or cyclic codes using exponential sums and Galois theory. Recently Tang et al. constructed linear codes with two or three weights from weakly regular bent functions in [30]. We shall extend this construction to non-bent functions.
The authors of [9, 14, 15] gave the generic construction of linear codes. Set \(\bar {D}=\{d_{1},d_{2},\cdots ,d_{n}\}\subseteq \mathbb {F}_{r}\). Denote by Tr the absolute trace function. A linear code associated with \(\bar {D}\) is defined by
Then \(\bar {D}\) is called the defining set of this code \(C_{\bar {D}}\).
Motivated by the above construction and the idea of [30], we define linear codes C D and \(C_{D_{1}}\) by
where
which are called defining sets. Here Sq and Nsq denote the set of all squares and non-squares in \(\mathbb {F}_{p}^{*}\), respectively. By definition, these codes have length n = (p−1)p m−1/2 and dimension at most m. Further, we will demonstrate that C D is equal to \(C_{D_{1}}\). Actually, for a fixed b∈Nsq, there exists a mapping ϕ b such that
which implies that Tr(a(ϕ b (x))2)=Tr(ab 2 x 2) for all x∈D and \(a\in \mathbb {F}_{r}\) . As a runs through \(\mathbb {F}_{r}\), so does ab 2. This means they have the same codewords. Hence, we only describe all the information of C D . In this paper, the complete weight enumerator of C D is investigated by employing exponential sums and Gauss periods. This gives its weight enumerator immediately. As it turns out, this code is a three-weight linear code which will be of special interest in authentication codes [11] and secret sharing schemes [5].
The remainder of this paper is organized as follows. In Section 2, we describe the main results of this paper and give some examples. Section 3 briefly recalls some definitions and results on Gauss periods and Gauss sums, then proves the main results. Finally, Section 4 is devoted to conclusions.
2 Main results
In this section, we only introduce the complete weight enumerator and weight enumerator of C D described in (1). The main results of this paper are presented below, whose proofs will be given in Section 3.
First of all, we establish the complete weight enumerator of C D in the following three theorems, then we give some examples to illustrate these results.
Theorem 1
Let p≡3 mod 4 and ρ,z be elements in \(\mathbb {F}_{p}\) . Then the code C D defined by ( 1 ) is a \(\left [\frac {p-1}{2}p^{m-1},m\right ]\) three-weight linear code and we have the following assertions.
-
(i)
If m is even, then the complete weight enumerator of C D is given by
$$\begin{array}{@{}rcl@{}} &&w_{0}^{\frac{p-1}{2}p^{m-1}}+(p^{m-1}-1)\prod\limits_{\rho\in \mathbb{F}_{p}}w_{\rho}^{\frac{p-1}{2}p^{m-2}}\\ &&+\frac{p-1}{4}\left( p^{m-1}\,+\,p^{\frac{m-2}{2}}\right)w_{0}^{\frac{p-1}{2}\left( p^{m-2}-p^{\frac{m-2}{2}}\right)} \sum\limits_{i\in \{1,-1\}}{\prod}_{\left( \frac{\rho}{p}\right)=i}w_{\rho}^{\frac{p-1}{2}p^{m-2}} {\prod}_{\left( \frac{z}{p}\right)=-i}w_{z}^{A_{1}}\\ &&+\frac{p-1}{4}\left( p^{m-1}\,-\,p^{\frac{m-2}{2}}\right)w_{0}^{\frac{p-1}{2}(p^{m-2}+p^{\frac{m-2}{2}})} \sum\limits_{i \in \{1,-1\}}\prod\limits_{\left( \frac{\rho}{p}\right)=i}w_{\rho}^{\frac{p-1}{2}p^{m-2}} \prod\limits_{\left( \frac{z}{p}\right)=-i}w_{z}^{A_{-1}}, \end{array} $$where, for ε∈{1,−1},
$$\begin{array}{@{}rcl@{}} A_{\varepsilon}=\frac{p-1}{2}p^{m-2}+\varepsilon p^{\frac{m-2}{2}}. \end{array} $$ -
(ii)
If m is odd, then the complete weight enumerator of C D is given by
$$\begin{array}{@{}rcl@{}} &&w_{0}^{\frac{p-1}{2}p^{m-1}}+(p^{m-1}-1)\prod\limits_{\rho\in \mathbb{F}_{p}}w_{\rho}^{\frac{p-1}{2}p^{m-2}}\\ &&+\frac{p-1}{4}\left( p^{m-1}\,+\,p^{\frac{m-1}{2}}\right)w_{0}^{\frac{p-1}{2}\left( p^{m-2}-p^{\frac{m-3}{2}}\right)} \sum\limits_{i\in\{1,-1\}}\prod\limits_{\left( \frac{\rho}{p}\right)=i}w_{\rho}^{A_{1}}\prod\limits_{\left( \frac{z}{p}\right)=-i}w_{z}^{B_{1}}\\ &&+\frac{p-1}{4}\left( p^{m-1}\,-\,p^{\frac{m-1}{2}}\right)w_{0}^{\frac{p-1}{2}\left( p^{m-2}+p^{\frac{m-3}{2}}\right)} \sum\limits_{i\in\{1,-1\}}{\prod}_{\left( \frac{\rho}{p}\right)=i}w_{\rho}^{A_{-1}} \prod\limits_{\left( \frac{z}{p}\right)=-i}w_{z}^{B_{-1}}, \end{array} $$where, for ε∈{1,−1},
$$\begin{array}{@{}rcl@{}} A_{\varepsilon} &=&\frac{p-1}{2}\left( p^{m-2}-\varepsilon p^{\frac{m-3}{2}}\right),\\ B_{\varepsilon} &=&\frac{p-1}{2}p^{m-2}+\varepsilon\frac{p+1}{2}p^{\frac{m-3}{2}}. \end{array} $$
Example 1
-
(i)
Let (p, m)=(3,5). Then by Theorem 1, the code C D has parameters [81,5,51] and complete weight enumerator
$$\begin{array}{@{}rcl@{}} w_{0}^{81}&+&36w_{0}^{30}w_{1}^{30}w_{2}^{21}+36w_{0}^{30}w_{1}^{21}w_{2}^{30}+80w_{0}^{27}w_{1}^{27}w_{2}^{27}\\ &+&45w_{0}^{24}w_{1}^{33}w_{2}^{24}+45w_{0}^{24}w_{1}^{24}w_{2}^{33}, \end{array} $$which is confirmed by Magma. This is a three-weight linear code.
-
(ii)
Let (p, m)=(7,2). Then by Theorem 1, the code C D is a [21,2,15] three-weight linear code with complete weight enumerator
$$\begin{array}{@{}rcl@{}} w_{0}^{21}&+&6(w_{0}w_{1}w_{2} w_{3}w_{4} w_{5}w_{6})^{3}+9{w_{0}^{6}}(w_{1}w_{2}w_{4})^{3}(w_{3}w_{5}w_{6})^{2}\\ &+&9{w_{0}^{6}}(w_{1}w_{2}w_{4})^{2}(w_{3}w_{5}w_{6})^{3}+12(w_{1}w_{2}w_{4})^{4}(w_{3}w_{5}w_{6})^{3}\\ &+&12(w_{1}w_{2}w_{4})^{3}(w_{3}w_{5}w_{6})^{4}, \end{array} $$which is confirmed by Magma.
Let p≡1 mod 4. For i = 0,1,2,3, we denote the cyclotomic classes of order 4 in \(\mathbb {F}_{p}\) by \(C_{i}^{(4,p)}\), which is simplified as C i in the sequel and defined in Section 3.1.
Theorem 2
Let p≡1 mod 4 and m be odd. Then the code C D of ( 1 ) is a \(\left [\frac {p-1}{2}p^{m-1},m\right ]\) three-weight linear code with complete weight enumerator
where, for ε∈{1,−1},
Example 2
Let (p, m)=(5,3). Then by Theorem 2, the code C D is a three-weight linear code with parameters [50,3,38] and complete weight enumerator
These results coincide with numerical computation by Magma.
Theorem 3
Let p≡1 mod 4 and m be even. Let s and t be defined by p=s 2 +t 2 , s≡1 mod 4. Then the code C D of ( 1 ) is a \(\left [\frac {p-1}{2}p^{m-1},m\right ]\) three-weight linear code with complete weight enumerator
where, for ε∈{1,−1},
Example 3
Let (p, m)=(5,4). Then by Theorem 3, the code C D has parameters [250,4,190] and complete weight enumerator
which is verified by Magma. This is a three-weight linear code.
The following corollary gives the weight enumerator of C D , which follows immediately from its complete weight enumerator.
Corollary 1
The code C D of ( 1 ) has the weight distribution given in Table 1 if m is even and Table 2 if m is odd.
From Tables 1 and 2, we observe that the weights of C D have a common divisor (p−1)/2. This implies that it can be punctured into a shorter code as follows.
Let a∈Sq. Note that Tr(ax) = aTr(x) for any \(x\in \mathbb {F}_{r} \). This indicates that Tr(ax) is a square (nonsquare) in \(\mathbb {F}_{p}^{*} \) if and only if Tr(x) is a square (nonsquare) in \(\mathbb {F}_{p}^{*} \). Then we can select a subset \( \tilde {D} \) of the set D such that \( \cup _{a\in Sq} a\tilde {D} \) is just a partition of D. Hence, the corresponding linear code \(C_{\tilde {D}}\) is the punctured version of C D . The following corollary states the parameters and weight distribution of \(C_{\tilde {D}}\), which directly follows from Corollary 1.
Corollary 2
The code \(C_{\tilde {D}}\) is a [p m−1 ,m] three-weight linear code with the weight distribution given in Table 3 if m is even and Table 4 if m is odd.
In the following, we give the punctured version \(C_{\tilde {D}}\) of C D from the previous examples.
Example 4
-
(i)
Let (p, m)=(5,3). Then the code \(C_{\tilde {D}}\) in Corollary 2 has parameters [25,3,19] and weight enumerator
$$\begin{array}{@{}rcl@{}} 1+40z^{19}+24z^{20}+60z^{21}. \end{array} $$This code is almost optimal in the sense that the best known code over \(\mathbb {F}_{5}\) of length 25 and dimension 3 has minimum distance 20 according to Markus Grassl’s table (see http://www.codetables.de/).
-
(ii)
Let (p, m)=(7,2). From Corollary 2, we know that \(C_{\tilde {D}}\) has parameters [7,2,5] and weight enumerator
$$\begin{array}{@{}rcl@{}} 1+18z^{5}+6 z^{6}+24z^{7}. \end{array} $$This code is almost optimal since the best known code over \(\mathbb {F}_{7}\) of length 7 and dimension 2 has minimum distance 6 according to Markus Grassl’s table.
3 The proofs of the main results
3.1 Auxiliary results
In order to prove Theorems 1, 2 and 3 proposed in Section 2, we will use several results which are depicted and proved in the sequel. We start with cyclotomic classes and group characters.
Recall that r = p m. Let α be a fixed primitive element of \(\mathbb {F}_{r}\) and r−1 = sN, where s, N are two integers with s>1 and N>1. Define \(C_{i}^{(N,r)}=\alpha ^{i}\langle \alpha ^{N}\rangle \) for i = 0,1,⋯ , N−1, where 〈α N〉 denotes the subgroup of \(\mathbb {F}_{r}^{*}\) generated by α N. The cosets \(C_{i}^{(N,r)}\) are called the cyclotomic classes of order N in \(\mathbb {F}_{r}\).
For each \(b\in \mathbb {F}_{r}\), let χ b be an additive character of \(\mathbb {F}_{r}\), which is defined by
where \(\zeta _{p}=\exp \left (\frac {2\pi \sqrt {-1}}{p}\right )\) and Tr is the absolute trace function. Especially when b = 1, χ 1 is called the canonical additive character of \(\mathbb {F}_{r}\). The orthogonal property of additive characters χ, which can be easily checked, is given by
The Gauss periods of order N are defined by
Let λ be a multiplicative and χ an additive character of \(\mathbb {F}_{r}\). Then the Gauss sum G(λ, χ) is defined by
Let η denote the quadratic character of \(\mathbb {F}_{r}\). The associated Gauss sum G(η, χ 1) over \(\mathbb {F}_{r}\) is denoted by G(η). And the Gauss sum \(G(\hat {\eta },\hat {\chi }_{1})\) over \(\mathbb {F}_{p}\) is denoted by \(G(\hat {\eta })\), where \(\hat {\eta }\) and \(\hat {\chi }_{1}\) are the quadratic character and canonical additive character of \(\mathbb {F}_{p}\), respectively.
For each \(y \in \mathbb {F}_{p}^{*}\), we have η(y)=1 if \(m\geqslant 2\) is even, and otherwise \(\eta (y) = \hat {\eta }(y)\) . Moreover, it is well known that \(G(\eta )=(-1)^{m-1}\sqrt {p^{*}}^{m}\) and \(G(\hat {\eta })=\sqrt {p^{*}}\), where \(p^{*}=\left (\frac {-1}{p}\right )p=(-1)^{\frac {p-1}{2}}p\). See [15, 25] for more information.
The following lemmas will be required in the sequel.
Lemma 1
(See Theorem 5.30 of [25]) Let χ be a nontrivial additive character of \(\mathbb {F}_{r}\) , \(k\in \mathbb {N}\) , and λ a multiplicative character of \(\mathbb {F}_{r}\) of order \(d={\gcd }(k,r-1)\) . Then
for any \(a,b\in \mathbb {F}_{r}\) with a≠0, where \(\bar {\lambda }\) denotes the conjugate character of λ.
For \(\rho \in \mathbb {F}_{p}^{*}\) and \(a\in \mathbb {F}_{r}\), in order to study the complete weight enumerator, we define
The values of N(ρ), N 0(ρ) and N 1(ρ), which depend mainly on the choice of a, are given in the following two lemmas.
Lemma 2
([34]) Let \(a\in \mathbb {F}_{r}^{*} \) and \(\rho \in \mathbb {F}_{p}^{*}\) . Then
Lemma 3
Let \(a\in \mathbb {F}_{r}^{*} \) and \(\rho \in \mathbb {F}_{p}^{*} \) . Then we have the following assertion.
Proof
Note that
where \(\rho \in \mathbb {F}_{p}^{*} \). This leads to
Applying Theorem 5.33 of [25], we can deduce that
The desired conclusion then follows from Lemma 2. □
The following two lemmas will help us to determine the frequency of each composition in C D .
Lemma 4
([34]) For any \(a\in \mathbb {F}_{r}^{*} \) , let
-
(i)
If m is even, then we have
$$\begin{array}{@{}rcl@{}} n_{1,1}= n_{1,-1}=\frac{p-1}{4}\left( p^{m-1}+(-1)^{\frac{p-1}{2}\frac{m}{2}}p^{\frac{m-2}{2}}\right). \end{array} $$ -
(ii)
If m is odd, then we have
$$\begin{array}{@{}rcl@{}} \left\{\begin{array}{lll} n_{1,1}&=&\frac{p-1}{4}\left( p^{m-1}+(-1)^{\frac{p-1}{2}\frac{m-1}{2}}p^{\frac{m-1}{2}}\right),\\ n_{1,-1}&=&\frac{p-1}{4}\left( p^{m-1}-(-1)^{\frac{p-1}{2}\frac{m-1}{2}}p^{\frac{m-1}{2}}\right).\\ \end{array} \right. \end{array} $$
Lemma 5
For any \(a\in \mathbb {F}_{r}^{*} \) , let n i,j be defined by (3).
-
(i)
If m is even, then we have
$$\begin{array}{@{}rcl@{}} n_{-1,1}= n_{-1,-1}=\frac{p-1}{4}\left( p^{m-1}-(-1)^{\frac{p-1}{2}\frac{m}{2}}p^{\frac{m-2}{2}}\right). \end{array} $$ -
(ii)
If m is odd, then we have
$$\begin{array}{@{}rcl@{}} \left\{\begin{array}{lll} n_{-1,1}&=&\frac{p-1}{4}\left( p^{m-1}-(-1)^{\frac{p-1}{2}\frac{m-1}{2}}p^{\frac{m-1}{2}}\right),\\ n_{-1,-1}&=&\frac{p-1}{4}\left( p^{m-1}+(-1)^{\frac{p-1}{2}\frac{m-1}{2}}p^{\frac{m-1}{2}}\right).\\ \end{array} \right. \end{array} $$
Proof
We point out that
with j∈{1,−1}.
The desired conclusion then follows from Lemma 4. □
Consider p≡1 mod 4. Recall that \(\eta _{i}^{(4,p)}={\sum }_{x\in C_{i}^{(4,p)}} {\zeta _{p}^{x}}\), where \(C_{i}^{(4,p)}=\beta ^{i}\langle \beta ^{4}\rangle \) for i = 0,1,2,3, and β is a primitive element of \(\mathbb {F}_{p}\). In the sequel, we write \(\eta _{i}^{(4,p)}\) and \(C_{i}^{(4,p)}\) as η i and C i , respectively. The following lemma plays an important role in determining the complete weight enumerator, in which the value of η 0 coincides with the result of Theorem 4.2.4 of [3].
Lemma 6
Let p≡1 mod 4. Let s and t be defined by p=s 2 +t 2 , s≡1 mod 4. The Gauss periods of order 4 over \(\mathbb {F}_{p}\) are given as follows.
-
(i)
If p≡5 mod 8, then
$$\begin{array}{@{}rcl@{}} \{\eta_{0},\eta_{2}\}&=&\left\{\frac{\sqrt{p}-1}{4}\pm\frac{\sqrt{2}}{4}\sqrt{-\sqrt{p}s-p}\right\},\\ \{\eta_{1},\eta_{3}\}&=&\left\{-\frac{\sqrt{p}+1}{4}\pm\frac{\sqrt{2}}{4}\sqrt{\sqrt{p}s-p}\right\}. \end{array} $$ -
(ii)
If p≡1 mod 8, then
$$\begin{array}{@{}rcl@{}} \{\eta_{0},\eta_{2}\}&=&\left\{\frac{\sqrt{p}-1}{4}\pm\frac{\sqrt{2}}{4}\sqrt{p-\sqrt{p}s}\right\},\\ \{\eta_{1},\eta_{3}\}&=&\left\{-\frac{\sqrt{p}+1}{4}\pm\frac{\sqrt{2}}{4}\sqrt{p+\sqrt{p}s}\right\}. \end{array} $$
Proof
Let β be a primitive element of 𝔽 p . According to [28], the Gauss sums G i are given by
and they are roots of a polynomial F 4(X), i.e.,
which is called reduced (or modified) period polynomial. By Theorem 14 of [28] (see also Theorem 10.10.6 of [3]), we have
where p = s 2 + t 2 with s≡1 mod 4.
In the following, we give the proof of the case p≡5 mod 8 since that of the case p≡1 mod 8 is similarly verified.
In the case of p≡5 mod 8, we have
Note that \(\eta _{0}+\eta _{2} = \eta _{0}^{(2,p)}=\frac {1}{2}(\sqrt {p}-1)\) yields that \(G_{0}+G_{2}=2\sqrt {p}\), since G i = 4η i +1. Hence, we see that G 0, G 2 are roots of
Therefore, G 1, G 3 are roots of
It is straightforward that
Moreover, we obtain that
Consequently, we have
The desired conclusions follow from the facts that \(\eta _{0}+\eta _{2} =\frac {1}{2}(\sqrt {p}-1)\) and η 0 + η 1 + η 2 + η 3 = −1. □
3.2 The proof of Theorem 1
Observe that a = 0 gives the zero codeword and the contribution to the complete weight enumerator is \({w_{0}^{n}}\), where \(n=\frac {p-1}{2}p^{m-1}\). This value occurs only once. Hence, we assume that \(a\in \mathbb {F}_{r}^{*}\) for the rest of the proof.
For \(\rho \in \mathbb {F}_{p}^{*}\), we consider
Then, it is easy to see that
since
and
On the other hand, from Theorem 5.33 of [25] and (2), we get
In the following, we calculate the value A of (5) by distinguishing the cases of Tr(a −1)=0 and Tr(a −1)≠0.
Case 1
Tr(a −1)=0.
In this case, from (5), we know that
which leads to N(ρ) = N 1(ρ) compared with (4) and Lemma 2. It follows from Lemma 3 that \(N(\rho )=\frac {p-1}{2}p^{m-2}\). This value occurs p m−1−1 times.
Case 2
Tr(a −1)≠0.
Recall that p≡3 mod 4. Thus, \({\gcd }(4,p-1)=2\). From (5) and Lemma 1, we have
which also leads to N(ρ) = N 1(ρ) from (4) and Lemma 2. It then follows from Lemma 3 that
for even m, and otherwise,
Note that \(N(0)=\frac {p-1}{2}p^{m-1}-{\sum }_{\rho \in \mathbb {F}_{p}^{*}} N(\rho )\). The desired conclusion then follows from Lemmas 4 and 5.
This completes the proof of Theorem 1.
3.3 The proof of Theorem 2
By the proof of Theorem 1, we only need to consider the case Tr(a −1)≠0 with \(a\in \mathbb {F}_{r}^{*}\), since the cases of a = 0 and Tr(a −1)=0 have already been determined. For this purpose, we write (5) as
where
Let notations be as aforementioned and p≡1 mod 4. When Tr(a −1)≠0, the value B of (7) can be determined by
since m is odd. By (4), (6), and Lemma 3, we have
Now, we assume that p≡5 mod 8.
Clearly, −1 and 4 are both in C 2. In the following, the value B of (8) will be computed according to the choices of Tr(a −1) and ρ.
Case 1
Tr(a −1)∈C 0, ρ∈C 0.
In this case, by Lemma 6 and (8), we obtain
It follows from (9) that
Case 2
Tr(a −1)∈C 0, ρ∈C 1.
In this case, we deduce that
which indicates that
Case 3
Tr(a −1)∈C 0, ρ∈C 2.
In this case, we have
which gives that
Case 4
Tr(a −1)∈C 0, ρ∈C 3.
In this case, we obtain
As a consequence, we get
Moreover, for Tr(a −1)∈C 0, the number of a satisfying η(a)=1 is
by Lemma 4. In a similar way, the number of a satisfying η(a)=−1 is
by Lemma 5.
There are sixteen cases all together to be considered. Other cases can be similarly calculated, which are omitted here.
Note that the case of p≡1 mod 8 can be analyzed in an analogous fashion. The proof of Theorem 2 is finished.
3.4 The proof of Theorem 3
This proof is similar to that of Theorem 2 by observing that
from (7), since m is even. Thus, we omit the details here.
4 Concluding remarks
Inspired by the original ideas of [15,30], we constructed a class of three-weight linear codes. By employing some mathematical tools, we presented explicitly their complete weight enumerators and weight enumerators. Their punctured codes contain some almost optimal codes. By Theorem 1, it is easy to check that
for \(m\geqslant 4\). Here w min and w max denote the minimum and maximum nonzero weights in C D , respectively. Therefore, the code C D can be used for secret sharing schemes with interesting access structures. We also mention that the complete weight enumerators, presented in Theorems 1, 2 and 3, can be applied to compute the deception probabilities of certain authentication codes constructed from linear codes. Furthermore, if r is large enough, these authentication codes are asymptotically optimal. See [11,15,23].
Note that \({\gcd }(4,p-1)=4\) if p≡1 mod 4. This implies that we can prove Theorems 2 and 3 with a similar method used in Section 3.2. One can see that it works well though it is indeed very complicated. However, we gave a simpler proof by employing Gauss periods to determine the complete weight enumerator of C D for the case of p≡1 mod 4.
To conclude this paper, we remark that the codes proposed in this paper can be extended to a more general case, that is, for an integer \(t\geqslant 2\), define
where
For this kind of linear codes, it will be interesting to settle their complete weight enumerators.
References
Ahn, J., Ka, D., Li, C.: Complete weight enumerators of a class of linear codes, preprint (2016)
Bae, S., Li, C., Yue, Q.: Some results on two-weight and three-weight linear codes, preprint (2015)
Berndt, B.C., Evans, R.J., Williams, K.S.: Gauss and Jacobi Sums. Wiley, New York (1998)
Blake, I.F., Kith, K.: On the complete weight enumerator of Reed-Solomon codes. SIAM J. Discret. Math. 4(2), 164–171 (1991)
Carlet, C., Ding, C., Yuan, J.: Linear codes from perfect nonlinear mappings and their secret sharing schemes. IEEE Trans. Inf. Theory 51(6), 2089–2102 (2005)
Chu, W., Colbourn, C.J., Dukes, P.: On constant composition codes. Discret. Appl. Math. 154(6), 912–929 (2006)
Ding, C.: Optimal constant composition codes from zero-difference balanced functions. IEEE Trans. Inf. Theory 54(12), 5766–5770 (2008)
Ding, C.: Codes from Difference Sets. World Scientific, Singapore (2015)
Ding, C.: Linear codes from some 2-designs. IEEE Trans. Inf. Theory 61(6), 3265–3275 (2015)
Ding, C., Helleseth, T., Klove, T., Wang, X.: A generic construction of Cartesian authentication codes. IEEE Trans. Inf. Theory 53(6), 2229–2235 (2007)
Ding, C., Wang, X.: A coding theory construction of new systematic authentication codes. Theor. Comput. Sci. 330(1), 81–99 (2005)
Ding, C., Yang, J.: Hamming weights in irreducible cyclic codes. Discret. Math. 313(4), 434–446 (2013)
Ding, C., Yin, J.: A construction of optimal constant composition codes. Des. Codes Crypt. 40(2), 157–165 (2006)
Ding, K., Ding, C.: Binary linear codes with three weights. IEEE Commun. Lett. 18(11), 1879–1882 (2014)
Ding, K., Ding, C.: A class of two-weight and three-weight codes and their applications in secret sharing. IEEE Trans. Inf. Theory 61(11), 5835–5842 (2015)
Dinh, H.Q., Li, C., Yue, Q.: Recent progress on weight distributions of cyclic codes over finite fields. J. Algebra Comb. Discret. Struct. Appl. 2(1), 39–63 (2015)
Feng, K., Luo, J.: Weight distribution of some reducible cyclic codes. Finite Fields Appl. 14(2), 390–409 (2008)
Helleseth, T., Kholosha, A.: Monomial and quadratic bent functions over the finite fields of odd characteristic. IEEE Trans. Inf. Theory 52(5), 2018–2032 (2006)
Heng, Z., Yue, Q.: Complete weight distributions of two classes of cyclic codes. Cryptogr. Commun. (2016). doi:10.1007/s12095-015-0177-y
Kith, K.: Complete weight enumeration of Reed-Solomon codes. Master’s thesis, Department of Electrical and Computing Engineering, University of Waterloo, Waterloo (1989)
Kuzmin, A., Nechaev, A.: Complete weight enumerators of generalized Kerdock code and linear recursive codes over Galois ring. In: Workshop on coding and cryptography, pp. 333–336 (1999)
Kuzmin, A., Nechaev, A.: Complete weight enumerators of generalized Kerdock code and related linear codes over Galois ring. Discret. Appl. Math. 111(1), 117–137 (2001)
Li, C., Bae, S., Ahn, J., Yang, S., Yao, Z.A.: Complete weight enumerators of some linear codes and their applications. Des. Codes Crypt. (2015). doi:10.1007/s10623-015-0136-9
Li, C., Yue, Q., Fu, F.W.: Complete weight enumerators of some cyclic codes. Des. Codes Crypt. (2015). doi:10.1007/s10623-015-0091-5
Lidl, R., Niederreiter, H.: Finite Fields. Encyclopedia of Mathematics and Its Applications, vol. 20. Addison-Wesley, Reading (1983)
Luo, J., Feng, K.: On the weight distributions of two classes of cyclic codes. IEEE Trans. Inf. Theory 54(12), 5332–5344 (2008)
MacWilliams, F.J., Sloane, N.J.A.: The Theory of Error-Correcting Codes, vol. 16. North-Holland Publishing, Amsterdam (1977)
Myerson, G.: Period polynomials and Gauss sums for finite fields. Acta Arith. 39(3), 251–264 (1981)
Sharma, A., Bakshi, G.K.: The weight distribution of some irreducible cyclic codes. Finite Fields Appl. 18(1), 144–159 (2012)
Tang, C., Li, N., Qi, Y., Zhou, Z., Helleseth, T.: Linear codes with two or three weights from weakly regular bent functions. IEEE Trans. Inf. Theory 62(3), 1166–1176 (2016)
Vega, G.: The weight distribution of an extended class of reducible cyclic codes. IEEE Trans. Inf. Theory 58(7), 4862–4869 (2012)
Wang, B., Tang, C., Qi, Y., Yang, Y., Xu, M.: The weight distributions of cyclic codes and elliptic curves. IEEE Trans. Inf. Theory 58(12), 7253–7259 (2012)
Wang, Q., Li, F., Ding, K., Lin, D.: Complete weight enumerators of two classes of linear codes. arXiv:1512.07341 (2015)
Yang, S., Yao, Z.A.: Complete weight enumerators of a family of three-weight linear codes. Des. Codes Crypt. (2016). doi:10.1007/s10623-016-0191-x
Yu, L., Liu, H.: The weight distribution of a family of p-ary cyclic codes. Des. Codes Crypt. (2014). doi:10.1007/s10623-014-0029-3
Yuan, J., Carlet, C., Ding, C.: The weight distribution of a class of linear codes from perfect nonlinear functions. IEEE Trans. Inf. Theory 52(2), 712–717 (2006)
Zheng, D., Wang, X., Yu, L., Liu, H.: The weight enumerators of several classes of p-ary cyclic codes. Discret. Math. 338(7), 1264–1276 (2015)
Zhou, Z., Ding, C., Luo, J., Zhang, A.: A family of five-weight cyclic codes and their weight enumerators. IEEE Trans. Inf. Theory 59(10), 6674–6682 (2013)
Acknowledgments
The authors are very grateful to the editor and the three anonymous referees for their useful comments and important suggestions, which have improved the presentation of this paper. The work of Zheng-An Yao is partially supported by the NSFC (Grant No.11271381), the NSFC (Grant No.11431015) and China 973 Program (Grant No. 2011CB808000). The work of Chang-An Zhao is partially supported by the NSFC (Grant No. 61472457). This work is also partially supported by Guangdong Natural Science Foundation (Grant No. 2014A030313161).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Yang, S., Yao, ZA. & Zhao, CA. A class of three-weight linear codes and their complete weight enumerators. Cryptogr. Commun. 9, 133–149 (2017). https://doi.org/10.1007/s12095-016-0187-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12095-016-0187-4