Irreducible Trinomials Over Finite Fields
Total Page:16
File Type:pdf, Size:1020Kb
MATHEMATICS OF COMPUTATION Volume 72, Number 244, Pages 1987{2000 S 0025-5718(03)01515-1 Article electronically published on February 3, 2003 IRREDUCIBLE TRINOMIALS OVER FINITE FIELDS JOACHIM VON ZUR GATHEN Abstract. A necessary condition for irreducibility of a trinomial over a finite field, based on classical results of Stickelberger and Swan, is established. It is applied in the special case F3, and some experimental discoveries are reported. 1. Introduction Trinomials are polynomials with three nonzero terms. Their computational ad- vantages have frequently been pointed out. Ben-Or (1981) [2] writes, \In order to make residue computation mod g(x) easier one looks for special types of irre- n ducible polynomials such as g(x)=x + x+ a, a 2 Zp." In cryptography, Canteaut and Filiol (2001) [4] attack some stream ciphers via the factorization of trinomials, and trinomials have been used as a highly efficient data structure for represent- ing nonprime finite fields in exponentiation and discrete logarithm computations (Schroeppel et al. (1995) [30], von zur Gathen & N¨ocker (2002) [17]). Schroeppel et al. (1995) [30] write, \The irreducible trinomial T (u) has a structure that makes it a pleasant choice for representing the field", and De Win et al. (1996) [11], \The reduction operation can be speeded up even further if an irreducible trinomial is used." Menezes et al. (1997) [25], x5.4.2, say that \choosing an irreducible trino- mial[...] canleadtoa fasterimplementationofthefieldarithmetic." Theynow form part of the IEEE Standard Specifications for Public-Key Cryptography: \The reduction of polynomials modulo p(t) is particularly efficient if p(t)hasasmall numberofterms. [...] Thus,itisa commonpracticetochoosea trinomialforthe field polynomial, provided that one exists. If an irreducible trinomial of degree m does not exist, then the next best polynomials are the pentanomials" (IEEE (2000) [22], A.3.4, p. 80). Trinomials over finite fields also occur in other application areas. They are used for characterization and construction of almost perfect nonlinear mappings (Carlet et al. (1998) [5], Helleseth et al. (1999) [21]) and of orthogonal arrays (Munemasa (1998) [26]). They are related to words of weight 3 and the minimal distance of certain cyclic codes (Charpin et al. (1997) [8], Charpin et al. (1999) [9]) and yield linearly recurrent sequences with special properties (Goldstein & Zierler (1968) [18], Golomb & Gong (1999) [20]). The bulk of this literature deals with F2 as the ground field, but Albert (1957) [1] deals with general finite fields, and F3 occurs in Charpin et al. (1999) [9] and Helleseth et al. (1999) [21]. Special trinomials arise in connection with the additive q version of Hilbert's Theorem 90. As an example, x −x−a 2 Fq[x] is irreducible for Received by the editor March 29, 2001 and, in revised form, April 17, 2002. 2000 Mathematics Subject Classification. Primary 11T06, Secondary 12Y05, 68W30. c 2003 American Mathematical Society 1987 License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1988 JOACHIM VON ZUR GATHEN 2 F× q − − q−1 F any a q ,andifα is a root of it, then x x aα is irreducible in q(α)[x]; see Ore (1934) [27] and Kaplansky (1972) [23], Theorems 32 and 52. The degrees 2qm+1 qm−1 (qm+1)=2 of the irreducible factors of x + x +1andofx + ax + b in Fq[x] are studied in Carlitz (1970) [6] and Estes & Kojima (1996) [13], respectively. The main results here give a necessary (but not sufficient) condition for irre- ducibility of trinomials over a finite field Fq, and its application to q =3(Theorems 4 and 8). Somewhat to our surprise, the experiments in F3[x] (see section 5) did not find any irreducible trinomial in some classes where the theory allows them. A classical result of Stickelberger (1897) [33] determines the parity of the number of irreducible factors of a squarefree polynomial in terms of the quadratic character of its discriminant. This was taken up by Dalen (1955) [10], and Swan (1962) [34] provides a simple formula for the discriminant of a trinomial. See also Golomb (1967) [19], Chapter 5, and Berlekamp (1968) [3], Section 6.6. Loidreau (2000) [24] n k has applied this to trinomials x x 1 2 F3[x] and found congruences for n and k which, together with the number of times that 2 divides n and k, characterize the property of being squarefree and having an odd number of irreducible factors. Any irreducible polynomial enjoys this property, but not vice versa. Based on Swan's results, we show by a different approach that indeed the prop- erty depends only on the residues of n; k; n1,andk1 modulo certain numbers which are determined by the field size, where n1 and k1 are n and k, respectively, divided by gcd(n; k). Although these congruences characterize the stated property exactly, they give, of course, only a necessary condition for irreducibility. In fact, some of the congruence classes contain only reducible polynomials. Applying this to F3,we find a short list of small trinomials whose factorization is sufficient to completely characterize the property. These factorizations take a few seconds on a workstation, once programmed. They even can, in principle, be checked by hand. However, the advantage of dele- gating the tedious checking of case by case to a machine is underlined by the fact that we found three corrections to Loidreau's handcrafted table. The table plus three easy simplifications, namely reversal, the substitution of −x for x, and the recognition of \systematic" linear factors, reduce the work for listing all irreducible trinomials of a given degree to about 8:2% of the number of test polynomials if we checked each trinomial. For 2 ≤ n ≤ 1500, we found irreducible trinomials for all but 220 values. For these exceptions, irreducible quadrinomials were found. It is conjectured that irre- ducible polynomials with at most four terms exist in Fq[x] for all degrees and all q ≥ 3. Some of our experimental findings defy explanation (by this author, at least). The probability p of being irreducible for uniformly random monic polynomials in F3[x] of degree at most 1500 is about 1=1500 (see below). But for a random trinomial, it is larger than 4p,andover6p in F2[x]. On the other hand, there are some congruence classes in which our theory allows irreducible polynomials, but where there are none (in the range of our experiments). In characteristic 2, the property is nicely described by the results of Vishne (1997) [35]. It is interesting to note that a similar result holds over Q in a special case: Selmer (1956) [32] shows that xn + x + 1 is irreducible in Q[x] if and only if n 6≡ 2mod3. An extended abstract of this work has appeared in the Proceedings of ACM ISSAC 2001, editor Bernard Mourrain, pp. 332{336. License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use IRREDUCIBLE TRINOMIALS OVER FINITE FIELDS 1989 2. Swan's condition We fix the following notation: ≥ 2 F× n>k 1 are integers, q is a power of the odd prime p, a; b q , f = xn + axk + b 2 F [x], r is the number of irreducible factors of (1) q f in Fq[x], D 2 Fq its discriminant, d =gcd(n; k), n1 = n=d,and k1 = k=d. The following two results from Swan (1962) [34] are fundamental for our question. Fact 2 (Swan (1962) [34]). In the above notation, we have the following for odd q. (i) If f is squarefree, then r ≡ n mod 2 if and only if D is a square in Fq, − − − − (ii) D =(−1)n(n 1)=2 · bk 1 · (nn1 bn1 k1 − (−1)n1 (n − k)n1 k1 kk1 an1 )d. As Swan mentions, (i) goes back to Stickelberger (1897) [33]. It provides a necessary condition for irreducibility, and is, in fact, originally due to Pellet (1878) [28]. Dickson (1906) [12] proves this fact, apparently without being aware of the previous work. On our way to studying irreducibility, the following more general \Stickelberger" property of f 2 Fq[x] is of central interest: (S) f is squarefree and has an odd number of irreducible factors. Corollary 3. In the above notation, for odd q, f has property (S) () D(q−1)=2 =(−1)n+1: Proof. It is well-known that f is squarefree if and only if D =6 0. Now we assume that D =0.Then6 D is a square if and only if D(q−1)=2 =1,and r odd () (n is odd and D(q−1)=2 =1)or(n is even and D(q−1)=2 = −1): We denote by ν`(m) the multiplicity of a prime ` in any nonzero integer m.The following is the main result of this paper. Theorem 4. Let q be a power of the odd prime p, f = xn + axk + b with a; b 2 F× ≥ · − q , n>k 1, d =gcd(n; k), n1 = n=d, k1 = k=d, m2 = p (q 1),and m1 =lcm(4;m2). Then the discriminant of f and property (S) depend only on the following residues: n mod m1;kmod m2;n1 and k1 mod q − 1: ∗ ∗ Proof. We let D =disc(f) 2 Fq. Also, we let n ;k be two further integers with ∗ ∗ ∗ n∗ k∗ ∗ n >k ≥ 1;r the number of irreducible factors of x + ax + b in Fq[x], D ∗ ∗ ∗ its discriminant and d ;n1,andk1 analogous to the quantities defined above. We ≡ ∗ ≡ ∗ ≡ ∗ − suppose furthermore that n n mod m1, k k mod m2;n1 n1 mod (q 1), ≡ ∗ − ∗ 6 and k1 k1 mod (q 1).