High dimensional affine codes whose square has a designed minimum distance
Abstract
Producción Científica
Full text
High dimensional affine codes whose square has a designed minimum distance∗ Ignacio García-Marco1, Irene Márquez-Corbella1, and Diego Ruano2 1Departamento de Matemáticas, Estadística e I.O., Universidad de La Laguna, 38200 La Laguna, Tenerife, Spain. Email: [email protected] and [email protected] 2IMUVA-Mathematics Research Institute, Universidad de Valladolid, 47011 Valladolid, Spain. Email: [email protected] Abstract Given a linear code C, its square code C(2) is the span of all component-wise products of two elements of C. Motivated by applications in multi-party computation, our purpose with this work is to answer the following question: which families of affine variety codes have simultaneously high dimension k(C)and high minimum distance of C(2),d(C(2))? More precisely, given a designed minimum distance dwe compute an affine variety code Csuch that d(C(2))≥dand that the dimension of Cis high. The best construction that we propose comes from hyperbolic codes when d≥qand from weighted Reed-Muller codes otherwise. Keywords. Affine variety codes Multi-party computation Square codes Schur product of codes Minkowski sum convex set Mathematics Subject Classification (2010). 94B05 94B75 1 Introduction Multi-party computation studies the case where a group of persons, each holding an input for a function, wants to compute the output of it, without having each individual reveal his or her input to the other parties. Multi-party computation is possible from secret sharing schemes [12], and hence from coding theory. From now on, given a linear code C, the dimension of Cwill be denoted by k(C)and its minimum distance by d(C). Moreover, if Cis a linear code over Fqof length n, dimension kand minimum distance d, we call [n, k, d]qthe parameters of C. One of the best known protocols is MiniMac [14], which evaluates boolean circuits, and its successor TinyTable [13]. These methods use a linear code C, which should prevent cheating. The probability that a cheating player is caught depends on the minimum distance of C ∗C =C(2), the square code of linear code [27], meaning that a high distance on the square will give a higher security. Simultaneously, it would be beneficial to have a code Cwith high rate to reduce the communications cost. Therefore, it is desirable to optimize both parameters: d(C(2))and k(C). Although, in this article we are more interested in the application of the schur product to the area of secure multiparty computation, this operation has other applications. For example, component-wise products of linear codes have been used to decode linear codes [24, 25] where it is shown that a linear code of length nwith a t-error correcting pair has a decoding algorithm which corrects up to terrors with complexity On3. Moreover, the schur product is also used for cryptanalytic applications against the McEliece cryptosystem [5–7, 23, 29], which rely on two assumptions: the generic decoding is hard ∗Published in Designs, Codes and Cryptography. Volume 88, pages 1653-1672 (2020). Partially supported by the Spanish Ministry of Economy/FEDER: grants MTM2015-65764-C3-1-P, MTM2015-65764-C3-2-P, MTM2015-69138- REDT, MTM2016-78881-P, MTM2016-80659-P, and RYC-2016-20208 (AEI/FSE/UE), and Junta de CyL (Spain): grant VA166G18. 1
on average and it is hard to distinguish the public key (a generator matrix of a code Cwith a certain structure) from a random matrix. For a summary of these applications and some others, see [27, §4]. These applications show the importance of finding linear codes, where both the code itself and the square have good parameters. Choosing a random linear code, with dimension linear in the length, will, with high probability, give a reasonable minimum distance, however, this does not hold for the square code [3]. Hence, constructing good square codes is a difficult problem. Nevertheless, good square codes exist, since there exists an asymptotic family of codes with the previous property [26]. The best binary construction available in the literature is the one in [2] obtained from cyclic codes, but their constellation is quite limited. A larger constellation can be found at [4]. Another family of codes that have been proposed for obtaining codes with a good square are Reed- Muller codes [27]. Reed-Muller codes can be understood as affine variety codes when one considers the ideal I= (0), i.e. when one evaluates multivariate polynomials (mvariables) at all the points of Fm q. We will restrict our attention to this case of affine variety codes in this article. One has the footprint bound [18] for estimating the minimum distance of this family of codes. The family of hyperbolic codes [19] was introduced to maximize the dimension of an affine variety code given a designed minimum distance from the footprint bound. In particular, a hyperbolic code has a dimension greater than or equal to a Reed-Muller code with the same minimum distance. Hence, it is natural to consider hyperbolic codes for obtaining codes where both the dimension of the code and the minimum distance of the square code are good. Given d∈Z+, in this work we propose a method to obtain an affine variety code Csatisfying that d(C(2))≥dand such that k(C)is considerably high. Our method receives as input a value d∈Z+and starts by considering an affine code CBassociated with a set B⊆Nmsuch that d(CB)≥d, say for example, a hyperbolic code with minimum distance at least d. Then, by means of convexity arguments, we build a set A⊂Nmsuch that the Minkowski sum A+Ais contained in B. The latter condition implies that d(C(2) A)≥d(CB)≥d. Remarkably, the best candidate for the set A⊆Nmis not always the one related with a hyperbolic code. Indeed, when the value of the designed minimum distance dis small enough, d<q, we prove that there exist certain weighted Reed-Muller codes that outperform hyperbolic codes. Additionally, if the minimum distance of the dual of Cand d(C(2))are greater than or equal to t+ 2, then Ccan be used to construct a t-strongly multiplicative secret sharing scheme (SSS). Such a SSS is enough to construct an information theoretic secure secret sharing scheme if at most tplayers are corrupted [1, 8, 11]. This application shows the importance of finding linear codes where d(C⊥)is also high relative to the length of the code, where C⊥is the dual code of C. Although in this work we have not focused in maximizing d(C⊥)(this is also the case of other articles in the literature as [2, 4]), we note that for the affine variety codes considered in this article, the dual of Cis again an affine variety code that can be easily constructed by [17, Proposition 1]. Moreover, its minimum distance can also be estimated using the footprint bound. Outline of the article Section §2 presents the notation used in the article and review some of the standard facts on affine variety codes, in particular, it provides a detailed exposition of the footprint bound, a lower bound for their minimum distance. We also describe some well known examples of affine variety codes which will be essential throughout the article, as Reed-Muller codes, weighted Reed-Muller codes and hyperbolic codes. We end this section with an original result that indicates, in the case of two variables, when the hyperbolic code has strictly higher dimension than a Reed-Muller code with the same minimum distance. Moreover, one can find in the appendix some results (some of them well known) that show when the footprint bound is sharp. We emphasize that Lemma 18 and Lemma 19 have been used in the proof of some results in the article. Next, in Section §3 we look more closely at the operation of Schur product of affine variety codes and its relation with the Minkowski sum. Moreover, we present the key result of the article that allows us to establish a strategy to construct affine variety codes whose square code has a designed minimum distance d, this strategy is outlined in Algorithm 1. That is, given d∈Nwe construct an affine variety code Csuch that d(C(2))≥d. In section §4 we will be more ambitious, this section contains the main results of the article. If our goal till this section was to obtain an affine code Cwhose square code has designed minimum distance 2
di.e. d(C(2))≥d, throughout Section §4 our additional goal is providing a code Cthat has also high minimum distance. It seems natural to expect that a code coming from a hyperbolic code will be the best candidate for our new goal. We have called this type of codes half hyperbolic codes and they have been studied in detail in Section §4.1. Surprisingly, half hyperbolic codes are not always the best option. Indeed, we prove in Section §4.2 that, when the value of the designed minimum distance dis small enough, there exist certain weighted Reed-Muller codes that outperform half hyperbolic codes. That is, when dis small enough, then there are weighted Reed-Muller codes Dwhose square has the same designed minimum distance dthan the corresponding half hyperbolic code C(i.e. d(C(2)),d(D(2))≥d) and such that k(D)> k(C). 2 Affine variety codes Let us start this section with a brief summary on affine varieties, polynomials and ideals to set up notation and terminology. For a fuller treatment we refer the reader to [9,10]. Let k[X1, . . . , Xm]be a ring of polynomials over a field kand consider a monomial ordering on k[X1, . . . , Xm]. For a polynomial f∈k[X1, . . . , Xm]we denote by in(f)its leading term with respect to , that is, the largest monomial that occurs in f. For any ideal I⊆k[X1, . . . , Xm]we denote by in(I)its initial ideal, which is in(I) = hin(f)|f∈Ii.The radical ideal of I, denoted √I, is the ideal √I={f|fm∈Ifor some integer m≥1}.We say that Iis a radical ideal if I=√I. Let us recall some basics on the correspondence between ideals and varieties. Given an affine variety V⊆kmwe can define the ideal of all polynomials vanishing on V, i.e. I(V) = {f∈k[X1, . . . , Xm]|f(x)=0for all x∈V}. Conversely, given an ideal I⊆k[X1, . . . , Xm]we can define the affine variety V(I) = {x∈km|f(x)=0for all f∈I}. Hilbert’s Nullstellensatz (see, e.g., [10, Theorem 6]) states that if kis algebraically closed and Iis an ideal in k[X1, . . . , Xm], then I(V(I)) = √I. In particular, this implies that if we restrict to radical ideals, then the above maps are inverses of each other and we have a one-to-one correspondence between affine varieties and radical ideals. Let Kbe the algebraic closure of kand let Ibe a zero-dimensional ideal, we define the quotient ring R=K[X1, . . . , Xm]/I. Then [9, Theorem 2.10] shows that the dimension of Ras a K-vector space gives a bound on the number of points in V(I). That is, dimK(R)≥#V(I), with equality if and only if Iis a radical ideal; where #Adenotes the cardinality of the set A. Notice that Iis a zero-dimensional ideal if and only if V(I)is a finite set, that is V(I) = {P1, . . . , Pn}. The key idea to prove this result is to show that the evaluation map ϕdefined as ϕ:K[X1, . . . , Xm]−→ Kn f7→ (f(P1), . . . , f(Pn)) (1) is an epimorphism of K-vector spaces and Ker(ϕ) = I(V(I)) = √I. Although we have introduced all the results for an arbitrary field, from now on we will work with the finite field with qelements, denoted as Fq. Let I⊆Fq[X1, . . . , Xn]be an ideal, we define the ideal Iqrelated to Ias Iq=I+hXq 1−X1, . . . , Xq m−Xmi ⊆ Fq[X1, . . . , Xm]. It is easy to check that Iqis radical as consequence of Seidenberg’s Lemma (because Iqcontains a univariate square free polynomial in each of the m-variables). Moreover, the points of the affine variety defined by Iq(over the algebraic closure of Fq) are the Fq-rational points of the affine variety defined by I. That is, VFq(Iq) = VFq(Iq) = VFq(I) = {P1, . . . , Pn}. 3
where Fqdenotes the algebraic closure of Fq. Now we consider the quotient ring RI=Fq[X1, . . . , Xm]/Iqand denote P=VFq(I) = {P1, . . . , Pn}. By (1), the following evaluation map at the points of Pis an isomorphism of Fq-vector spaces: evP:RI−→ Fn q f+Iq7−→ (f(P1), . . . , f(Pn)).(2) Definition 1.Let Iqand Rqbe defined as before and let Lbe an Fq-vector subspace of Rqwe define the affine variety code C(I, L)as the image of Lunder the evaluation map evP. That is: C(I, L) = evP(L) = {evP(f+Iq)|f+Iq∈L}. It is clear that C(I, L)has G= (fi(Pj)|i= 1, . . . , k ,j= 1, . . . , n)as generator matrix where {f1, . . . , fk}form a basis of L. Example 1.Let I=Xq−1−1⊆Fq[X]. Then, Iq=Iand VFq(I) = F∗ q. Consider L=1, X, . . . , Xk−1, then C(I, L)is the Reed-Solomon code of dimension kover Fq, denoted as RSq(k). Moreover, if we set I= (0), then VFq(I) = Fqand C(I, L)is the extended Reed-Solomon code of dimension k. Example 2.Let I= (0) ⊆Fq[X1, . . . , Xm]. Then Iq=hXq 1−X1, . . . , Xq m−Xmiand VFq(I) = Fm q. If we take L={f∈Fq[X1, . . . , Xm]|deg(f)< s}, then C(I, L)is the q-ary Reed-Muller code of degree s in mvariables, denoted as RMq(s, m). The reader may have already realized that some of the well-known classes of evaluation codes can be viewed as affine variety codes. Moreover in [16, Proposition 1.4] it is proved that every Fq-linear code Cmay be represented as an affine variety code over Fqswhere we have to choose sso that qsis greater than the length of C. Let C=C(I, L)be an affine variety code. Then, it is clear that the length of Cis the cardinality of VFq(I) = P={P1, . . . , Pn}and the dimension of Cis the dimension of the subspace L- since the evaluation map evPis an isomorphism. In the rest of the section we will study the minimum distance of affine variety codes C=C(I, L)in the particular case that I= (0). Let A⊆Nmbe a non-empty (finite) subset of Nm. We denote by Fq[A]⊆Fq[X1, . . . , Xm]the Fq-vector space with basis: Xi1 1···Xim m|(i1, . . . , im)∈A. We will denote by CAthe affine variety code C(I, L)with I= (0) and L=Fq[A], in other words CA consists of the evaluation of polynomials f∈Fq[A]in the qmpoints of Fm q. Remark 1.Let A⊆Nmand consider the code CAas the affine variety code C(I, L)with I= (0) and L=Fq[A]. Then the length of CAis qmand its dimension coincides with the cardinality of the set A. For a, b ∈Rand a≤b, we denote by [[a, b]] the integer interval [a, b]∩Z. Remark 2.Given A⊆Nmand using the identity zq=zfor every z∈Fq, one can find a unique set B⊆[[0, q −1]]msuch that Fq[B]+ Iq=Fq[A]+ Iqand, thus, Aand Bdefine the same code CA=CB(see Figure 1). This set will be denoted by B=Aq. Throughout the article we use both sets indistinctly. Let fbe a polynomial in Fq[X1, . . . , Xm], we define the ideal Iq,f =hXq 1−X1, . . . , Xq m−Xm, fi and the quotient ring Rf=Fq[X1, . . . , Xm]/Iq,f . Proposition 1. Let fbe a polynomial in Fq[X1, . . . , Xm], then the dimension of the Fq-vector space Rf is the number of roots of fin Fm q. That is, dimFq(Rf)=#VFq(f). Proof. Applying (2) with I= (f), then dimFq(Rf)=#V(Iq,f ) = #VFq(f). The following well-known result (see, e.g., [18]) gives a bound for the minimum distance of the particular case of affine variety codes of type CA. We include a short proof of this result for the sake of clarity. Theorem 2 (Footprint bound). Let A⊆[[0, q −1]]m. Then, the minimum distance of CAsatisfies that d(CA)≥min (i1,...,im)∈A{(q−i1)···(q−im)}. 4
0 5 10 10 5 A 0 5 10 10 5 A11 Figure 1: The sets A⊆N2and A11 ⊆[[0,10]]2define the same code over F11. Proof. Since the codewords of CAconsists of the evaluation of polynomials f∈Fq[A]at the n=qm points of Fm qand using the definition of minimum distance we have that d(CA) = n−max f∈Fq[A]#{Fq-roots of f}=n−max f∈Fq[A]#V(Iq,f ). Now using Proposition 1 and standard Gröbner basis arguments if we take any monomial order we have that d(CA) = n−max f∈Fq[A]dimFq(Rf)=n−max f∈Fq[A]dimFq(Fq[X1, . . . , Xm]/in(Iq,f )) ≥n−max f∈Fq[A]dimFq(Fq[X1, . . . , Xm]/hXq 1, . . . , Xq n,in(f)i) =n−max (i1,...,im)∈AdimFqFq[X1, . . . , Xm]/Xq 1, . . . , Xq n, Xi1 1···Xim m = min (i1,...,im)∈A{(q−i1)···(q−im)}. Definition 2.Let A⊆[[0, q −1]]m. We define the footprint-bound of the affine code CAas the integer FB(CA) = min (i1,...,im)∈A{(q−i1)···(q−im)}. By Theorem 2, we have that the minimum distance of the code CAsatisfies that d(CA)≥FB(CA). In the following lines we study some well-known families of affine codes, namely (weighted) Reed Muller and hyperbolic codes (see, e.g., [28], [15], [19]). All these codes are konwn to satisfy that their minimum distance coincides with the value of the footprint-bound. One could provide an alternative proof of this fact by a direct application of Lemma 18 in the Appendix. Definition 3.(Reed-Muller codes) Let s∈Nand A={(i1, . . . , im)∈[[0, q −1]]m|i1+. . . +im≤s}. Then, CAis the called the q-ary Reed-Muller code of degree sin mvariables and we denote it by RMq(s, m). The following result is known and the proof can be found in [21, Theorem 2]. 5
Proposition 3. Given s∈N, s ≤(q−1)m. If we write s=a(q−1) + bwith 0≤b≤q−1, then the minimum distance of the Reed-Muller code C= RMq(s, m)is d(C)=(q−b)qm−1−a. Definition 4.(Weighted Reed-Muller codes) Consider s, s1, . . . , sm>0and let A={(i1, . . . , im)∈[[0, q −1]]m|s1i1+. . . +smim≤s}. Then, CAis called the q-ary weighted Reed-Muller code of degree sin mvariables with S= (s1, . . . , sm) and we denote it by WRMq(s, m, S). If s1=. . . =sm= 1, then WRMq(s, m, S)is the corresponding q-ary Reed-Muller code RMq(bsc, m). Definition 5.(Hyperbolic codes) Let d∈Nand A={(i1, . . . , im)∈[[0, q −1]]m|(q−i1)···(q−im)≥d}. Then, CAis called the q-ary hyperbolic code of order dand we denote it by Hypq(d, m). 0 5 10 10 5 A (a) Example of a Reed-Muller code. 0 5 10 10 5 B (b) Example of a hyperbolic code. 0 5 10 10 5 D (c) Example of a weighted Reed-Muller code. Figure 2: Examples of Reed-Muller, hyperbolic and weighted Reed-Muller codes. Example 3.Consider the following codes over F11 (see Figure 2): •the set A=(i, j)∈[[0,10]]2|i+j≤6, corresponds to the Reed-Muller code CA= RM11(6,2) with parameters [112,28,55]11, •the set B=(i, j)∈[[0,10]]2|(11 −i)(11 −j)≤55, corresponds to the hyperbollic code CB= Hyp11(55,2) with parameters [112,30,55]11, •and the set D=(i, j)∈[[0,10]]2|5i+ 3j≤15, corresponds to the weighted Reed-Muller code CD= WRM11(15,2,{5,3})with parameters [112,13,66]11. 6
The hyperbolic code Hypq(d, m)has been designed to be the code with the largest possible dimension among those affine codes CAsuch that FB(CA)≥d. In the following result, we indicate in the case of two variables, when the hyperbolic code of order dhas greater dimension with respect to a Reed-Muller code with the same minimum distance d. Proposition 4. Consider D= RMq(t, 2) and E= Hypq(d, 2). If d(D) = d(E), then k(D)≤k(E). Moroever, k(D)< k(E)if and only if t+ 5 2≤q≤(t+ 1)2 4. Proof. Since d(D) = d(E), we have that FB(E) = d(E) = d(D) = FB(D). Set M= (mi,j)0≤i,j≤q−1the matrix with mi,j = (q−i)(q−j). We have that D=CAand E=CBwith A={(i, j)∈[[0, q−1]] |i+j≤t} and B={(i, j)∈[[0, q −1]] |mi,j ≥d}. Moreover, min{mi,j |(i, j)∈A}=d(D) = d(E) = min{mi,j |(i, j)∈B}. Hence, A⊆Band k(D)≤k(E); indeed, this proves that hyperbolic codes have the maximum dimension among all the codes with the same footprint-bound value. By Proposition 3 we also have that d(D) = m0,t if t≤q−1, and mq−1,t−q+1 if q≤t≤2q−2; and it is easy to verify that max{mi,j |(i, j)/∈A}=(mt+1 2,t+1 2if tis odd, and mt 2,t+2 2if tis even We separate the proof depending on the value and the parity of t. 1. t≤q−1and (a) tis odd. Then k(D)< k(E)if and only if (t+1 2,t+1 2)∈Bor, equivalently, if mt,0≤mt+1 2,t+1 2. Moreover, this happens if and only if q≤t+1 22. (b) tis even. Then k(D)< k(E)if and only if (t 2,t+2 2)∈Bor, equivalently, if mt,0≤mt 2,t+2 2. Moreover, this happens if and only if q≤t(t+2) 4.Since tis even, this is equivalent to q≤ t+1 22. 2. t≥qand (a) tis odd. Then k(D)< k(E)if and only if (t+1 2,t+1 2)∈Bor, equivalently, if mq−1,t−q+1 ≤ mt+1 2,t+1 2. Moreover, this happens if and only if 2q−t−1≤q−t+1 22.This defines a quadratic inequality p(q)>0involving in the variable q. Notice that p(q)≥0if and only if q≤(t+ 1)/2or q≥(t+ 5)/2. The first option is not viable since t≥2q−1. We conclude, thus, that q≥(t+ 5)/2. (b) tis even. Then k(D)< k(E)if and only if (t 2,t+2 2)∈Bor, equivalently, if mq−1,t−q+1 ≤ mt 2,t+2 2. Moreover, this happens if and only if 2q−t−1≤q−t 2q−t+2 2.Proceeding as in the previous case we get that this is equivalent to q≥t+3+√5 2and since tis even, this is the same as q≥t+5 2. 7
3 Schur product of codes The notion of Schur product of codes was first introduced in coding theory for decoding [24] [25]. But this operation turns out to have many other applications in cryptanalysis, multiparty computation, secret sharing or construction of lattices. Many of these applications are summarized in [27, §4]. Definition 6.The Schur product is the componentwise product on Fn q. That is, given two elements a,b∈Fn q: a∗bdef = (a1b1, . . . , anbn) For two codes C1,C2⊆Fn q, their Schur product is the code C1∗C2defined as C1∗C2 def = SpanFq{c1∗c2|c1∈ C1and c2∈ C2} For C1=C2=C, then C ∗C is denoted as C(2). 3.1 Product of codes and the Minkowski sum Given two sets A, B ⊆Nm, we denote by A+Bits Minkowski sum, that is, A+B={a+b|a∈A, b ∈B} . The following property is easy to check. Proposition 5.C(2) A=CA+A. Proof. Let c∈ C(2) A, then c=c1∗c2with c1,c2∈ CA. Or equivalently, c= evP(f)∗evP(g) = evP(fg)with f, g ∈Fq[A]. It is easy to check that if f, g ∈Fq[A], then fg ∈Fq[A+A]. Thus, c∈ CA+A. Conversely, take notice that Fq[A+A]is the Fq-vector space with basis nXidef =Xi1 1···Xim m|i= (i1, . . . , im)∈A+Ao=Xa·Xb|a,b∈A Therefore, for any c∈ CA+A, then c= evP(f)with f∈Fq[A+A], that is c= evP(f) = evP s X i=0 λiXaiXbi!= s X i=0 λievP(Xai)∗evP(Xbi)∈ C(2) A. It is important to highlight that even if A⊂[[0, q −1]]m, it might happen that A+A6⊂ [[0, q −1]]m; however A0:= (A+A)q⊂[[0, q −1]]msatisfies that CA0=CA+A(see Figure 3). Proposition 5 suggests the following way of constructing affine codes whose square has a designed minimum distance: we consider B⊂[[0, q −1]]msuch that d(CB)≥dand, then, we choose Asuch that (A+A)q⊂B. If Ais chosen in this way, then we will have that d(C(2) A) = d(CA+A) = d(C(A+A)q)≥ d(CB)≥d. The following lemma gives a necessary condition for such a set A. Lemma 6. Let A, B ⊂[[0, q −1]]mand for each = (1, . . . , m)∈ {0,1}mwe set B:= {b+ (q−1)|b= (b1, . . . , bn)∈B and bi>0whenever i= 1}. If (A+A)q⊆B, then 2A={2a|a∈A}is a subset of ∪∈{0,1}mB. Proof. Assume that (A+A)q⊆B. We observe that whenever a= (a1, . . . , am)∈A, then (2a)q∈(A+A)q, where (2a)q= (a0 1, . . . , a0 m)with a0 i=2ai,if 2ai< q, 2ai−(q−1) otherwise. Now, it suffices to take = (1, . . . , m)with i=0if 2ai< q 1otherwise to have that 2a∈B. 8
0 5 10 10 5 A 0 5 10 10 5 A+A 0 5 10 10 5 A0= (A+A)11 Figure 3: By Proposition 5 we have that C(2) A=CA+A=CA0. 0 5 10 10 5 B 0 5 10 10 5 B=B(0,0) 15 20 B(1,0) B(1,1) 20 15 B(0,1) Figure 4: Examples of sets Bfor B⊆[[0,10]]2. The following proposition and the subsequent theorem are the key results to understand our strategy to give a code CAwhose square has designed minimum distance. They are both based on (simple) convexity arguments. Given a set B⊆[[0, q −1]]m, suppose that we want to find a set A⊆[[0, q −1]]m such that (A+A)q⊆B. If such condition happens then we will have that (2A)q⊆(A+A)q⊆B. However the following lemma allows us to construct a set Awith the property that by just checking that (2A)q⊆B, it will imply that (A+A)q⊆B. Proposition 7. Let D⊂Rmbe a convex set and consider A:= {a∈Zm|2a∈D}. Then, A+A⊆D. Proof. It suffices to check that a+a0∈Dwhenever a,a0∈A. By definition of Awe have that 2a,2a0∈D and, since Dis convex, the midpoint of the segment joining 2aand 2a0, which is a+a0, also belongs to D. 9
Proof. It suffices to perturb slightly the line x+y=sto get that both CB1and CB2are weighted Reed-Muller codes. Indeed it is easy to check that k(CB1) = |B1|=(q−d 2+ 2)(q−d 2+ 1) 2+q−d 2 2−1 = k(CB2) See an illustration in Figure 10. 0 5 10 10 5 (a) Example of the code CB1of Lemma 14. 0 5 10 10 5 (b) Example of the code CB2of Lemma 14. Figure 10: Example illustrating Lemma 14 with q= 11 and d= 4. We can now consider the case when the minimum distance is even. Theorem 15. Let Fqbe a finite field and d∈Z+be an even integer with d < q. If Cis a weighted Reed- Muller code over Fqwith d(C(2))≥d, then k(C)≤k(CB),where CBis any of the weighted Reed-Muller codes described in Lemma 14. Proof. This proof will follow the same ideas in Theorem 13. Let Cbe a weighted Reed-Muller code over Fqwith d(C(2))≥d. We assume without loss of generality that C= WRMq(λ, 2, w1,1) for some λ, w1>0. Taking A:= {(i, j)∈[[0, q −1]] |w1i+j≤λ} we have that C=CA. In this proof we denote a:= (q−1)/2and b:= (q−d+ 1)/2; and observe that either (a, b)∈N2or both (a−1 2, b +1 2),(a+1 2, b −1 2)∈N2. We divide the proof in two cases depending on the value of λ. Case I: λ≤a+b. We take B=B1as in Lemma 14. To prove that |A|=k(C)≤k(CB) = |B|we are going to prove that either A⊆B, or ϕ:A−B−→ B−A (α, β)7→ (2a−α, 2b−β) is an injective map (see Figure 11 for a graphic representation of this idea). Since the injectivity of ϕis easy to check, we are showing that ϕis well defined in three steps: (a) if (α, β)∈A, then (2a−α, 2b−β)/∈A, (b) if (α, β)∈A−B, then (2a−α, 2b−β)∈N2, and (c) if (α, β)∈A−B, then (2a−α, 2b−β)∈B. If (a) does not hold, then both (α, β)and (2a−α, 2b−β)∈A. Hence, (2a, 2b)=(α, β)+(2a−α, 2b−β)∈ A+Aand C(2) A=CA+A. Since CAis a weighted Reed-Muller code, by Lemma 12 we have that d≤d(C(2)) = FB(C(2))≤(q−2a)(q−2b) = d−1, a contradiction. We observe that (2a−α, 2b−β)∈Z2and that α≤q−1=2a, so to prove (b) we just need to see that 2b−β≥0. Assume that 2b<βand let us prove that 16
0 5 10 10 5 (α, β) (a, b) ϕ(α, β) B−A A−B Figure 11: Figure illustrating the proof of Theorem 15 for d= 6,q= 11,(a, b) = (5,3),A= (i, j)∈N2|0.4i+j≤4and B=(i, j)∈N2|i+j < 8∪(i, j)∈N2|i+j= 8 and j < 3. (b.1) P= (a, b)∈Aif qis odd, or (b.2) Q1= (a−1 2, b +1 2), Q2= (a+1 2, b −1 2)∈Aif qis even. If α > a, then α≥a+1 2since β≥2b+ 1 > b +1 2we have that P∈Ain case (b.1) and Q1, Q2∈A in case (b.2). If α≤a, from one side we have that (α, β)/∈B, so α+β≥a+b(5) and, if we have equality, then β≥b. From the other side we have that (α, β)∈A, which implies that w1α+β≤λ. (6) From (5) and (6) we get that (w1−1)α+a+b≤(w1−1)α+α+β=w1α+β≤λ≤a+b and, thus, w1≤1. Hence, we separate three cases: Subcase I.I. If α+β > a +b. w1(a+1 2) + b−1 2≤w1a+b≤w1(a−1 2) + b+1 2 < w1a+b+1 2 =a+b+1 2+ (w1−1)a ≤a+b+1 2+ (w1−1)α < α +β+ (w1−1)α =w1α+β≤λ. So, P∈Aif qis odd, or both Q1, Q2∈Aif qis even. Subcase I.II. If α+β=a+band qis odd. Since β≥band w1<1, we have that w1(α−a)+β−b≥ w1(α−a+β−b)=0. As a consequence, w1a+b≤w1a+b+w1(α−a) + β−b=w1α+β≤λ. Therefore P∈A. Subcase I.III. If α+β=a+band qis even. Since β≥band b /∈N, then β≥b+1 2; moreover, w1<1, then we have that w1(α−a+1 2) + β−b−1 2≥w1(α−a+1 2+β−b−1 2)=0. As a consequence, w1(a+1 2) + b−1 2≤w1(a−1 2) + b+1 2 ≤w1(a−1 2) + b+1 2+w1(α−a+1 2) + β−b−1 2 =w1α+β≤λ 17
and we conclude that Q1, Q2∈A. Moreover, since P+P=Q1+Q2= (2a, 2b), in both cases we obtain that (2a, 2b)∈A+Aand C(2) A=CA+A. Since CAis a weighted Reed-Muller code, by Lemma 12 we have that d≤d(C(2))≤ (q−2a)(q−2b) = d−1, a contradiction. Let us prove now (c). Take (α, β)∈A−B, then either (c.1) α+β > a +b, or (c.2) α+β=a+band β≥b. In (c.1) we have that 2a−α+ 2b−β < a +b, so (2a−α, 2b−β)∈B. In (c.2) we observe that β6=b because (a, b)/∈A. Then, we have that 2a−α+ 2b−β=a+band 2b−β < b, so (2a−α, 2b−β)∈B. Case II: λ≥a+b. We claim that λ w1< a +b. Otherwise, we have that P∈Aif qis odd, or Q1, Q2∈Aif qis even. In both cases (2a, 2b)∈A+Aand C(2) A=CA+A. Since CAis a weighted Reed-Muller code, by Lemma 12 we have that d≤d(C(2))≤(q−2a)(q−2b) = d−1, a contradiction. Since λ w1< a +b, then A={(i, j)∈N2|0≤i, j ≤q−1and i +1 w1j≤λ w1}and a symmetric argument to Case I using B=B2with B2as in Lemma 14 applies here. Finally, we are proving that when dis small enough (more precisely, when d < (2−√2)q), then there are weighted Reed-Muller codes that have more dimension and whose square has the same designed minimum distance as the corresponding half hyperbolic code. Proposition 16. If d < (2 −√2)qand dodd, then k(RMq2, q −d−1 2)> k(HalfHypq(2, d)). Proof. Take notice that k(RMq2, q −d−1 2) = (q−d−1 2+ 2)(q−d−1 2+ 1) 2 =(2q−d+ 5)(2q−d+ 3) 8=A k(HalfHypq(2, d)) <q+ 1 22 −2d−1 2+ 1 = B Therefore if A−B > 0then our claim holds. Now A−B > 0if p(d) = d2−4qd+(2q2+12q+13) >0. This defines a quadratic function whose vertex represent its minimum value. That is, p(d)>0if d > 2q+p2q2−12q−13 or d < 2q−p2q2−12q−13. Take notice that if d < (2 −√2)q < 2q−p2q2−12q−13 then: k(RMq2, q −d−1 2)> k(HalfHypq(2, d)). Proposition 17. If d < (2 −√2)qand deven, then k(CB)> k(HalfHypq(2, d)) where CBis one of the weighted Reed-Muller codes defined in Lemma 14. Proof. Take notice that k(CB) = (q−d−1 2+ 2)(q−d−1 2+ 1) 2+q−d 2 2−1 =1 8d2−1 2dq +1 2q2−d+ 2q=A k(HalfHypq(2, d)) <q+ 1 22 −2d−1 2+ 1 = B 18
Therefore if A−B > 0then our claim is true. Now A−B > 0if p(d) = d2−4dq+(2q2+12q−18) >0. This defines a quadratic function whose vertex represent its minimum value. That is, p(d)>0if d > 2q+p2q2−12q+ 18 or d < 2q−p2q2−12q+ 18. Take notice that if d < (2 −√2)q < 2q−p2q2−12q+ 18, then: k(CB)> k(HalfHyp(2, d)). Example 7.We continue with Example 5. That is, consider CB= Hyp11(6,2) with B=(i, j)∈[[0,10]]2|(11 −i)(11 −j)≥6. We recall that the half hyperbolic code of order 6has parameters [112,25,49]11 and d(C(2) A)≥6. Taking A1as in Figure 12a, then CA1is a weighted Reed-Muller code with parameters [112,34,9]11 such that d(C(2) A1)≥6. Take notice that this example already gives an affine variety code with higher dimension than the half hyperbolic code. Moreover, by Theorem 15, we know that if we take the set A2defined in Figure 12b then the weighted Reed-Muller code CA2has higher dimension than any other weighted Reed-Muller code Csuch that d(C(2))≥6. In particular, we know by Theorem 15 that k(CA2)≥k(CA1). Note that CA2is defined as in Lemma 14 and has parameters [112,39,33]11. 0 5 10 10 5 B A1 A1+A1 (a) Set A1of Example 7. 0 5 10 10 5 B A2 A2+A2 (b) Set A2of Example 7. Figure 12: Figure illustrating Example 7. References [1] M. Ben-Or, S. Goldwasser, and A. Wigderson. Completeness theorems for non-cryptographic faulttolerant distributed computation. In Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, STOC ’88, pages 1–10, NY, USA, 1988. [2] I. Cascudo. On squares of cyclic codes. IEEE Trans. Inform. Theory, 65(2):1034–1047, 2019. [3] I. Cascudo, R. Cramer, D. Mirandola, and G. Zémor. Squares of random linear codes. IEEE Trans. Inform. Theory, 61(3):1159–1173, 2015. [4] I. Cascudo, J. S. Gundersen, and D. Ruano. Squares of matrix-product codes. arXiv, abs/1903.05494, 2019. [5] A. Couvreur, P. Gaborit, V. Gauthier-Umaña, A. Otmani and J.-P. Tillich. Distinguisher-based attacks on public-key cryptosystems using Reed-Solomon codes. Des. Codes Cryptogr., 73(2):641–666, 2014. [6] A. Couvreur, A. Otmani, and J.-P. Tillich. Polynomial time attack on wild McEliece over quadratic extensions. In Advances in cryptology, EUROCRYPT 2014, volume 8441 of Lecture Notes in Comput. Sci., pages 17–39. Springer, Heidelberg, 2014. 19
[7] A. Couvreur, I. Márquez-Corbella, R. Pellikaan. Cryptanalysis of McEliece Cryptosystem Based on Algebraic Geometry Codes and Their Subcodes. IEEE Trans. Inform. Theory, 63(8):5404 - 5418, 2017. [8] D. Chaum, C. Crépeau, and I. Damgård. Multiparty unconditionally secure protocols. In Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, STOC ’88, pages 11–19, NY, USA, 1988. [9] D.A. Cox, J. Little and D. O’Shea. Using Algebraic Geometry. Second Edition. Graduate Texts in Mathematics, Springer New York, 2005. [10] D.A. Cox, J. Little and D. O’Shea. Ideals, Varieties and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Third Edition. Graduate Texts in Mathematics, Springer New York, 2007. [11] R. Cramer, I. Damgå rd, and U. Maurer. General secure multi-party computation from any linear secret-sharing scheme. In Advances in cryptology EUROCRYPT 2000 (Bruges), volume 1807 of Lecture Notes in Comput. Sci., pages 316–334. Springer, Berlin, 2000. [12] R. Cramer, I. Damgård, and J. B. Nielsen. Secure Multiparty Computation and Secret Sharing. Cambridge University Press, New York, NY, USA, 1st edition, 2015. [13] I. Damgård, J. B. Nielsen, M. Nielsen, and S. Ranellucci. The TinyTable protocol for 2-party secure computation, or: Gate-scrambling revisited. In Advances in cryptology CRYPTO 2017. Part I, volume 10401 of Lecture Notes in Comput. Sci., pages 167–187. Springer, Cham, 2017. [14] I. Damgård and S. Zakarias. Constant-overhead secure computation of boolean circuits using preprocessing. In Proceedings of the 10th Theory of Cryptography Conference on Theory of Cryptography, TCC’13, pages 621–641, Berlin, Heidelberg, Springer-Verlag, 2013. [15] G.-L. Feng, T. R. N. Rao. Improved geometric Goppa codes. I. Basic theory. Special issue on algebraic geometry codes. IEEE Trans. Inform. Theory, 41(6):1678–1693, 1995. [16] J. Fitzgerald and R. F. Lax, Decoding affine variety codes using Gröbner bases. Des. Codes Cryptogr., vol. 13, 1998. [17] 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. [18] O. Geil, T. Hholdt. Footprints or generalized Bezout’s theorem. IEEE Trans. Inform. Theory, 46(2):635–641, 2000. [19] O. Geil, and T. Hholdt. On hyperbolic codes. Applied algebra, algebraic algorithms and errorcorrecting codes (Melbourne, 2001), 159–171, Lecture Notes in Comput. Sci., 2227, Springer, Berlin, 2001. [20] O. Geil. On codes from norm-trace curves. Finite Fields Appl. 9, 351-371, 2003. [21] O. Geil. On the second weight of generalized Reed-Muller codes. Des. Codes Cryptogr. 48, 323-330, 2008. [22] T. Hholdt, J. M. van Lint, R. Pellikaan. Algebraic geometry codes. Handbook of coding theory, Vol. I, II, 871–961, North-Holland, Amsterdam, 1998. [23] I. Márquez-Corbella, E. Martínez-Moro, R. Pellikaan, and D. Ruano. Computational aspects of retrieving a representation of an algebraic geometry code. J. Symbolic Comput., 64:67–87, 2014. [24] R. Pellikaan. On decoding by error location and dependent sets of error positions. Discrete Math., 106-107:369-381, 1992. [25] R. Pellikaan. On the existence of error-correcting pairs. Statistical Planning and Inference, 51: 229- 242, 1996. 20
[26] H. Randriambololona. Asymptotically good binary linear codes with asymptotically good selfintersection spans. IEEE Trans. Inform. Theory, 59(5):3038–3045, 2013. [27] H. Randriambololona. On products and powers of linear codes under component wise multiplication. In Algorithmic arithmetic, geometry and coding theory, volume 637 of Contemp. Math., pages 3-78, Amer. Math. Soc., Providence, RI, 2015. [28] A. B. Srensen. Weighted Reed-Muller codes and algebraic-geometric codes. IEEE Trans. Inform. Theory 38(6): 1821–1826, 1992. [29] C. Wieschebrink. Crytanalysis of the Niederreiter public key scheme based on GRS subcodes. In Post- Quatum Cryptography, volume 6061 of Lecture Notes in Comput. Sci. pages 61-72. Springer-Verlag Berlin Heidelberg, 2010. A For which affine codes CAis it verified that FB(CA) = d(CA)? Let A⊆[[0, q −1]]mand consider the code CAas the affine variety code C(I, L)with I= (0) and L=Fq[A]. Then, we know that the length of CAis qmand its dimension coincides with the cardinality of the set A. Moreover its minimum distance, denoted as d(CA), satisfies that d(CA)≥FB(CA). In this section we will study when these two values coincide. More concretely, we provide sufficient conditions to have the equality d(CA) = FB(CA). Lemma 18. Suppose that FB(CA)=(q−α1)···(q−αm). Then d(CA) = FB(CA)if all the elements β= (β1, . . . , βm)with 0≤βi≤αibelong to the set A. Proof. First, to simplify the proof let us suppose that m= 2. Let P={P1, . . . , Pn}be the ordered enumeration of the q2different points of F2 q. Suppose that FB(CA)=(q−α1)(q−α2). Now we can define the polynomial f(x)=(X1−P1)···(X1−Pα1)·(X2−P1)···(X2−Pα2). Take notice that by hypothesis f(X1, X2)∈Fq[A]since all the elements β= (β1, β2)with 0≤β1≤α1 and 0≤β2≤α2belongs to the set A. Moreover, the Fq-roots of fare all the points of form: (Pi, z2)and (z1, Pj)with i∈ {1, . . . , α1},j∈ {1, . . . , α2}and z1, z2∈Fq. That is, the number of Fq-roots of f(x)is (α1+α2)q−α1α2. Therefore, we have found a codeword c= evP(f)∈ CAof weight q2−(α1+α2)q−α1α2= FB(CA). Hence the minimum distance of CAis FB(CA). The generalization to mvariables is straightforward. Let P={P1, . . . , Pn}be the ordered enumeration of the qmdifferent points of Fm q. Then, using all the hypothesis we can define the following polynomial in Fq[A]: f(X1, . . . , Xm) = m Y i=1 (Xi−P1)···(Xi−Pαi)∈Fq[A]. Thus, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). The following result shows that if lis a divisor of q−1then, there exists a polynomial f(x) = Xl−α∈ Fq[X]with small support but a large number of Fq-roots. This result will be useful for computing the minimum distance of codes of type CAby just checking that a very small number of points belongs to the set A. Lemma 19. Let αbe a primitive element of F∗ q. Consider the polynomial f(X) = Xl−αj∈Fq[X]. Then Xl−αjhas at least one roots in Fqif and only if gcd(l, q −1) divides j. In such case, the exactly number of Fq-roots of f(X)is gcd(l, q −1). 21
Proof. Suppose that αiis an Fq-root of f(X), then f(αi)=0, that is αil =αjwhich implies that the order of α, which is q−1, divides il−1. In other words, there exists an integer xsuch that x(q−1)+il =j. Take notice that such xexists if and only if gcd(l, q −1) divides j. In such case, if (x, y)is a solution of the equation x(q−1) + yl =j. Then, all solutions of this equations has the form: x−λl gcd(l, q −1), y +λq−1 gcd(l, q −1)with λ∈Z Therefore, if f(X)has at least one root in Fq, then it will have exactly gcd(l, q −1) Fq-roots. Corollary 20. Suppose that FB(CA)=(q−l)qm−1with la divisor of q−1. Then, d(CA) = FB(CA)if {1, Xl i} ⊆ Fq[A]for some i∈ {1, . . . , m}. Proof. By hypothesis we can define the following polynomial in Fq[A]: f(X) = Xl i−βfor certain β∈Fq. Then, by Lemma 19, f(X)has lqm−1Fq-roots. That is, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). Lemma 21. Suppose that FB(CA) = (q−kl)qm−1with la divisor of q−1. Then, d(CA) = FB(CA)if {1, Xl i, X2l i, . . . , Xkl i} ⊆ Fq[A]for some i∈ {1, . . . , m}. Proof. By hypothesis we can define the following polynomial in Fq[A]: f(X) = (Xl i−β)(X2l i−β2)···(Xkl i−βk)for certain β∈Fq. Then, by Lemma 19, f(X)has klqm−1Fq-roots. That is, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). Lemma 22. Suppose that FB(CA)=(q−l1)···(q−lm)with lia divisor of q−1. Then, d(CA) = FB(CA) if {1, Xl1 1,··· , Xlm m} ⊆ Fq[A]. Proof. By hypothesis we can define the following polynomial in Fq[A]: f(X) = m Y i=1 (Xli i−βi)for certain β1, . . . , βm∈Fq. Then, by Lemma 19, f(X)has (l1+. . . lm)qm−1−X 1≤i<j≤m liljqm−2−X 1≤i<j<k≤m liljlkqm−3−. . . −l1···lm Fq-roots. That is, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). Lemma 23. Suppose that FB(CA)=(q−k1l1)···(q−kmlm)with lia divisor of q−1. Then, d(CA) = FB(CA)if {1, Xl1 1, . . . , Xml1 1,··· , Xlm m, . . . , Xkmlm m} ⊆ Fq[A]. Proof. By hypothesis we can define the following polynomial in Fq[A]: f(X) = m Y i=1 (Xli i−βi)(X2li i−β2 i)···(Xkili i−βki i)for certain β1, . . . , βm∈Fq. Then, by Lemma 19, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). Lemma 24. Suppose that FB(CA) = (q−l)qm−1with l−1a divisor of q−1. Then, d(CA) = FB(CA)if {Xi, Xl i} ⊆ Fq[A]for some i∈ {1, . . . , m}. 22
Proof. By hypothesis we can define the following polynomial in Fq[A]: f(X)=(Xl i−βXi) = Xi(Xl−1 i−β)for certain β∈Fq. Then, by Lemma 19, f(X)has lqm−1Fq-roots. That is, we have found a codeword of CAof weight FB(CA), hence d(CA) = FB(CA). Lemma 25. Let A⊆[[0, q −1]]mand s∈[[0, q −1]]. If for all f∈Fq[A]we have that Xs 1is a divisor of f(X), then d(CA) = d(CB)with B={(i1−s−1, i2, . . . , im)|(i1, . . . , im)∈A}. The result can be generalized to any other coordinate Xiwith i= 2, . . . , m. Proof. By hypothesis every polynomial f∈Fq[A]can be written as f=Xs 1gwith g∈Fq[B]. And both polynomials fand ghave exactly the same number of Fq-roots. 23