1. Introduction
Reed–Solomon and Hermitian codes are algebraic geometry codes based on the projective line and the Hermitian curve, respectively. To define an algebraic geometry code, let
X be a smooth, projective, absolutely irreducible curve over a finite field
. Let
G and
be divisors on
X such that
are distinct
-rational points and the support of
G does not contain any of the
. An algebraic geometric code is of the form
where
and
denotes the divisior of the rational function
f on
X. In this paper, we will modify this construction for Hermitian codes to yield a new family of codes, called twisted Hermitian codes, with the goal of producing codes which have large Schur squares. Given a finite field
and a positive integer
n, the Schur product of vectors
is
The Schur product of two linear codes
is
meaning
is the set of all linear combinations of vectors of the form
with coefficients in
and
. The Schur square of a linear code
is
. Schur products were originally used to define error-locating pairs [
1] and now arise in several applications, such as secret sharing [
2] and code-based cryptography [
3]. A challenge in coding theory is to specify explicit codes with high-dimensional Schur squares.
When either a Reed–Solomon code or a Hermitian code is squared, the result is typically a code of the same type which limits its dimension. To obtain a code of the same dimension whose square is much larger, twisted Reed–Solomon codes were defined by Beelen, Puchinger, and Nielsen [
4], drawing upon ideas from the twisted Gabidulin codes of Sheekey [
5]. These same ideas serve as inspiration for the recent work [
6]. In this paper, we introduce twisted Hermitian codes which have an advantage over twisted Reed–Solomon codes in that codes of similar lengths can be obtained over smaller alphabets. Utilizing smaller alphabets can reduce the computational complexity of the finite field arithmetic. For instance, to obtain a (twisted) Reed–Solomon code of length 4096, one must use an alphabet of size 4096 whereas a (twisted) Hermitian code of the same length only requires an alphabet size of 256; hence, one can work over the field with 256 elements rather than the field of cardinality 4096. Twisted Hermitian codes can have a large Schur square, as demonstrated herein, by making use of field extensions.
The motivation is to explicitly construct codes whose behavior, loosely speaking, mimics that of random codes. While this is interesting in its own right, it is also prompted by the McEliece cryptosystem, which is a code-based cryptosystem introduced by McEliece in 1978 [
7]. The public key in the McEliece cryptosystem is an obfuscation of the underlying linear code (chosen by McEliece to be a binary Goppa code), disguised to appear as a random code, meaning one lacking any recognizable structure. The security of the McEliece cryptosystem is derived from the NP-hardness of decoding a random linear code, proven by Berlekamp, McEliece, and Tilborg in 1978 [
8]. Though the McEliece cryptosystem remains unbroken to this day (even with quantum algorithms), its reliance on binary Goppa codes results in large key sizes that hinder practical implementation. As a result, many variants of the McEliece cryptosystem have been introduced, with other linear codes (including the algebraic geometry codes [
9]) substituted within. Additional structure can lead to a reduction in key size but often at the cost of introducing vulnerabilities that allow an attacker to extract identifying characteristics of the underlying code from the public-key matrix; see, for instance, the recent work by Couvreur, Márquez-Corbella, and Pellikaan on algebraic geometry codes [
10] as well as that of Márquez-Corbella, Martínez-Moro and Pellikaan [
3]. Once the attacker can identify the underlying code, the fundamental assumption that secures the McEliece cryptosystem is no longer valid. The twisted construction presents a challenge to the attacker in that its square is not readily identifiable due to its large dimension. However, Lavauzelle and Renner recently demonstrated that for many parameter choices, twisted Reed–Solomon codes have a subfield subcode which is vulnerable to attack [
11]. We discuss the possibility of such an attack for twisted Hermitian codes, pointing out a few key differences.
This paper is organized as follows. This section concludes with a brief guide to notation. Necessary background is covered in
Section 2. In
Section 3, we define the twisted Hermitian codes and explore their properties. In
Section 4, we consider the McEliece cryptosytem employing certain families of twisted Hermitian codes.
Section 4 considers a potential attack by casting the ideas of Lavauzelle and Renner in the Hermitian setting. A conclusion may be found in
Section 5.
Notation. Given a vector space V over a field and , we write to denote the span of the set B; at times, we write and when it is clear from the context, we omit the subscript and simply write . The set of all matrices with entries from a field is written as , and denotes the identity matrix over .
The finite field with q elements is denoted by , where q is a power of a prime; denotes the set of nonnegative integers; and denotes the set of positive integers. An code over is an -subspace of with and minimum distance . Here, denotes the Hamming weight of a word . Elements of are called codewords. An code is MDS, or maximum distance separable, if and only if . We say that a code is an code if its length is n and its dimension is k. A generator matrix for an code over a field is any matrix whose rows form a basis for . A generator matrix is said to be in systematic form.
2. Preliminaries
We begin this section with a review of algebraic geometry codes and the necessary details on Hermitian codes followed by a discussion of the Schur product. There are a number of excellent references such as [
12,
13,
14,
15] which provide more comprehensive surveys.
Recall that an algebraic geometry code is of the form
as described in
Section 1. If
, then
is a
code. At times, it will be useful to consider nested codes. If
, where
is another divisor on
X whose support does not contain any of the
, then
. See [
16] for more on nested Hermitian codes. In this paper, we restrict our attention to the case where
with
,
P is an
-rational point on
X, and
D is the sum of the remaining
-rational points; such codes are referred to as one-point codes in the literature and will be denoted here by
.
Reed–Solomon codes are obtained from the construction above by taking , the projective line; ; where P denotes the unique point at infinity on X; and D to be the sum of all other rational points on X. It is well known that is an code; that is, is MDS. Notice that the alphabet size, meaning the cardinality of the field , is at least the length of the Reed–Solomon code; thus, to define a Reed–Solomon code of length n requires that .
Beyond Reed–Solomon codes, the best understood algebraic geometry codes are Hermitian codes. For a prime power
q, let
denote the smooth, projective curve given by
over the finite field
;
is known as the Hermitian curve. The genus of
is
, and there are
affine
-rational points of
in the projective plane, meaning points the form
with
, and a unique point at infinity
. Let
and
denote the affine rational points of
. Given a vector space
V of functions on
which do not have poles at any of the
,
, a code can be defined by taking the image of the evaluation map
For
with
, we consider the space of functions
where
is the pole order of
at
. The one-point Hermitian code determined by
is the algebraic geometry code
. Henceforth, we use the term Hermitian code to mean one-point Hermitian curve. Notice that
is a code of length
, dimension at least
, with equality achieved when
, and minimum distance as given in [
17].
Schur squares of algebraic geometry codes have been studied in [
10,
18]. Given a Hermitian code
,
and equality is achieved when
. In this case,
has dimension
and
see also [
19] for details. These ideas may be applied to more general algebraic geometry codes, meaning those constructed via evaluation maps analagous to
using curves other than
([
20] (Prop. 2)).
We seek a family of codes whose behavior under the Schur operation is indistinguishable from that of random codes. A guiding principle is the following result obtained by Cascudo, Cramer, Mirandola, and Zémor.
Proposition 1 ([
2] (Theorem 2.3)).
Let be such that . Then for some positive real number δ and k large enough,where is chosen uniformly at random from the family of all codes over whose generator matrices are in systematic form. In keeping with Proposition 1, given a code
of dimension
k, it is desirable for
to have dimension close to
or quadratic in
k. This is in contrast to that seen in (
1) where the dimension is linear in
k. This serves as motivation to consider twisted Hermitian codes which are defined in the next section.
3. Twisted Hermitian Codes
In [
4], Beelen, Puchinger, and Rosenkilde introduce a new code construction based on generalized Reed–Solomon codes; the resulting codes can have Schur squares with larger dimensions than the Schur squares of the generalized Reed–Solomon codes themselves. The study of these new codes is carried on in [
21] by Beelen, Bossert, Puchinger, and Rosenkilde. In this section, we adapt the construction to Hermitian codes, determine their basic properties, and apply new tools to address subtleties that arise in considering their squares. Decoding is also discussed.
3.1. Properties of Twisted Hermitian Codes
We begin by defining the twisted Hermitian codes. To do so, let
which is a basis of
on the Hermitian curve
.
Definition 1. Consider where . Let ,be a vector whose coordinates are ℓ pairwise distinct ordered pairs of nonzero integers, andbe a vector whose coordinates are ℓ pairwise distinct ordered pairs of integers satisfyingfor . Let . The set of -twisted bivariate polynomials is Let . The twisted Hermitian code is Remark 1. It is immediate from the construction that has the same length as the code . Furthermore, In addition, a generator matrix for the twisted Hermitian code iswhere We sometimes write to emphasize the length and dimension of a twisted Hermitian code.
Example 1. Let and . The Hermitian curve is given by , and we consider over a finite field of order , which may be described as . Note that The rational points on other than are enumerated below: Choose and the following vectors: The resulting space of functions isand the twisted Hermitian code is A generator matrix for the twisted Hermitian code may be obtained by evaluating each element of at each of the , , to obtain Because twisted Hermitian codes share some similarities with one-point Hermitian codes (such as length and dimension per Remark 1), it is reasonable to ask how the codes themselves compare and more pointedly if they are essentially the same codes. With this in mind, we next demonstrate that the twisted Hermitian codes are not one-point Hermitian codes.
To reveal the distinction between twisted Hermitian codes and one-point Hermitian codes, we determine the largest subcode of
which is a one-point Hermitian code as well as its smallest supercode which is a one-point Hermitian code. Recall that
and
Let
and
Then
follows from the definition of the twisted code by considering basis elements of the space of functions that are used to define the codewords. Therefore,
Notice that
for all
, and the
are distinct. In addition,
Hence, we conclude that twisted Hermitian codes are not one-point Hermitian codes. These observations are recorded in the next result, followed by their impact on bounding the minimum distance of the twisted Hermitian code.
Proposition 2. Consider a twisted Hermitian code constructed as in Definition 1 with and . Thenwhereand According to Proposition 2, the minimum distance
d of
satisfies
Both
and
are known [
17], being minimum distances of Hermitian codes. In the case that
and
, we have that
Thus, the twisted code
is capable of correcting at least
errors. We can use such a value of
t for implementation within the McEliece cryptosystem (as detailed in
Section 4), even though the code may be capable of correcting more errors.
Determining tighter bounds on the minimum distance of twisted Hermitian codes is an interesting but nontrivial problem. For instance, in the (perhaps simpler) Reed–Solomon situation, determining weights of codewords of twisted codes can amount to considering roots of sparse polynomials, which is a problem of current interest; see, for instance [
22,
23]. Another interesting question to consider is if the minimum distance of a twisted Hermitian code can attain that of a Hermitian code, especially given that there exist twisted Reed–Solomon codes which are MDS [
4,
24].
Example 2. Consider the twisted Hermitian code with , ,and , where satisfy the conditions of Definition 1. By Proposition 2,andfrom which it follows that According to ([13] (Theorem 5)), and so that 3.2. Squares of Twisted Hermitian Codes
Recall from (
1) that a Hermitian code
has a Schur square with relatively small dimension:
. In this section, we show that the twisted Hermitian code
may have a Schur square with much larger dimension in comparison to the square of the code itself.
Because the codes of interest are obtained by evaluating sets of functions, it is useful to consider the Schur product of sets. Given
, let
and
Lemma 1. Let denote the set of bivariate monomials Then the evaluation map is an injective mapping.
Proof. Let the domain of
be restricted to
as described above. It suffices to show that
. Assume to the contrary that
such that
. Then every rational affine point
of the Hermitian curve
also satisfies
. Fix
. Then there are then
q distinct
such that
is a rational point on the Hermitian curve
. Then the univariate polynomial
has
q distinct zeros in
, despite the fact that
. Hence
for all
. On the other hand,
where
and
for all
. This implies the univariate polynomial
has
zeros in
, despite the fact that
. As a result,
, which is a contradiction. □
We can use properties of the finite field to define a reduction scheme for bivariate polynomials.
Definition 2. Suppose are such that and . We define For , we define It follows immediately that for
,
Given
,
If
, then
We can now establish a lower bound on .
Lemma 2. Let be a twisted Hermitian code. Thenwhere . Lemma 2 suggests that can be made large by choosing to maximize the size of . Before applying it, we first establish a few relevant tools.
Given
as in Lemma 1, set
Observe that for any prime power
q,
We make use of this observation in the following lemma.
Lemma 3. Let be a set of elements with distinct pole orders such that . Then .
Proof. Since
,
. Observe that
Since , it follows that . □
Next, we employ a few basic results from additive number theory; specifically, we make use of the notion of a Sidon set.
Definition 3. A set is a finite Sidon set provided it is finite and , if and only if or .
Erdös and Turan show in [
25] that every subset of a Sidon set is itself a Sidon set and that every nonempty subset of
contains a Sidon set. For finite and nonempty
, let
denote the largest subset of
A that is a Sidon set. Gowers shows in [
26] that
.
We now introduce a family of twisted Hermitian codes with a large Schur square dimension. It will be useful to consider the map
Theorem 1. For a given prime power , let be such that andsatisfying . Let be prime powers such thatand be such that for . Thenwhere Proof. Let
and
. Then
and
. Note that
is a set of functions with distinct pole orders. We claim that
is a linearly independent set. Consider
and
. Then
can be written as
where
,
, and
. Notice that if
for
, then
(in which case
) or
(in which case
) follows from the properties of the Sidon set. In the first case, this implies that
and
. In the second,
and
. As a result, all elements of
A have distinct pole orders. Furthermore, no pole order of an element of
A is that of an element of
C or
D as
for all
and
. Continuing in this way, we see that
and applying Lemma 3 gives
which implies that at most
g elements of
are not in
. Then at least
elements of
lie in
; i.e.,
. Thus,
. □
This particular subfamily achieves a large Schur square dimension by first maximizing the size of
as seen in Theorem 2 and then forcing linear independence by choosing coefficients according to the nested field structure shown in (
6).
3.3. Decoding Twisted Hermitian Codes
Tailored decoding algorithms for twisted Hermitian codes can be designed by borrowing ideas from those for twisted Reed–Solomon codes given in [
4]. For a twisted Hermitian code
with
and received message
,
ℓ coefficients
may be guessed (or selected at random). A decoding algorithm for a Hermitian code may then be applied to
as if it was a received word. This allows application of any Hermitian decoder. These rounds of guessing will only be successful if
, for
. Because the alphabet size is
, this may require up to
rounds of Hermitian decoding. As with twisted Reed–Solomon codes, these rounds might produce twisted Hermitian polynomials where
. The polynomials that are produced with these characteristics will be discarded as they do not yield valid codewords.
The efficiency of decoding twisted Hermitian codes may be considered by taking the cost of the Hermitian decoder used and multiplying it by the number of guessing rounds. Two methods of decoding Hermitian codes that might be utilized are those that have sub-quadratic efficiency, which is the best complexity known for decoding Hermitian codes. The Guruswami-Sudan Algorithm [
27] has a Hermitian decoding efficiency of
, where
m and
s are the multiplicity and list size parameters respectively and
is the exponent of matrix multiplication. This means that decoding twisted Hermitian codes using the Guruswami-Sudan Algorithm would have efficiency
. Power decoding also has a similar decoding efficiency for Hermitian codes, which is
, where
p is the powering parameter and
is as defined before [
28]. This means that the efficiency of decoding twisted Hermitian codes using power decoding is
. Determining more efficient and specialized decoding methods for twisted algebraic geometry codes remains a topic of study.
4. Applications of Twisted Hermitian Codes to the McEliece Cryptosystem
In this section, we consider the potential use of twisted Hermitian codes in a code-based cryptosystem. First, we abstract the key elements of the McEliece cryptosystem for use with an arbitrary linear code (in place of the Goppa code in [
7]). Then we consider the role of squares in attacking the resulting system, noting how the twisted codes avoid direct distinguisher attack. This section concludes with considerations prompted by the recent attack of Lavauzelle and Renner [
11] on a twisted Reed–Solomon code-based cryptosystem.
Let G be a generator matrix for an linear code over a finite field capable of correcting at least t errors. The public key is , where is nonsingular and is a permutation matrix. The private key is , where is an efficient decoding algorithm of . To transmit a message to a receiver Alice, Bob encodes the message as , where has weight . Alice receives a transmission in the form and initiates deciphering by left-multiplying x by to yield . Alice then applies the decoding algorithm to retrieve and left-multiplies by to recover m. To maintain security, the underlying code must not be revealed.
Role of Squares in the McEliece Cryptosystem
The Schur square distinguisher is an attack applied to the McEliece cryptosystem implemented with Reed–Solomon codes in [
18]. Though the attacker does not know the linear code
underlying
, the distinguisher may allow the attacker to know
. The low-dimensional squares of Reed–Solomon and Hermitian codes imply that
can be used to distinguish
from a random linear code. This is demonstrated in [
18] where generalized Reed–Solomon codes are considered; Schur products are used to identify
within the family from which it is drawn; and the Sidelnikov and Shestakov algorithm may then be used to identify
. See also [
29] for other approaches involving generalized Reed–Solomon codes. Since
can be an identifying characteristic of the family of codes from which
is drawn, the attacker may then use a family-specific structural attack on intercepted messages. Both twisted Reed–Solomon and twisted Hermitian codes may avoid a direct application of this attack if constructed to have large dimensional squares.
Based on the attacks described above, it is desirable to implement this code-based cryptosystem with a family of codes whose Schur squares are indistinguishable from those of random codes. With this in mind twisted Reed–Solomon codes were introduced in [
4] and can be defined as follows.
Definition 4. Let be pairwise distinct field elements, and fix , . Let such that . A twisted Reed–Solomon code of length n and dimension k is given by: Consider the evaluation map
Let
be a prime, and
. Lavazuelle and Renner showed in [
11] that the subfield subcode
of
is given by
Given that is not a Reed–Solomon code, the Sidelnikov-Shestakov attack cannot be directly applied. However, for the Schur square is a Reed–Solomon code of length n and dimension . This idea forms the basis for an efficient key-recovery attack on the code-based cryptosystem employing twisted Reed Solomon codes.
The similarity in construction of twisted Hermitian codes and twisted Reed–Solomon codes suggests a possible attack on the cryptosystem based on the twisted Hermitian codes. In the remaining part of this section, we consider the possible components of such an attack. Recall the code
over
constructed in Theorem 1 where
and consider the subfield subcode
where
.
Lemma 4. Let and . Then if and only if where
Proof. Suppose
and
. Then it is clear that
. Conversely, consider
where
. According to ([
28] (Lemma 6)), there exists
such that
Notice that
. Since
is an injective map (as shown in Lemma 1) and
, it follows that
. □
Proposition 3. Given a twisted Hermitian code and , Proof. Consider where . Then as each . On the other hand, suppose that . Then Lemma 4 applies so that . □
This result prompts the conjecture that the Schur square of the subfield subcode of a twisted Hermitian code in Proposition 3 is a Hermitian code. This is related to ([
10] (Conjecture 19)). Positive resolution of these conjectures would lay the groundwork for an attack on a twisted Hermitian code-based cryptosystem.