








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









Juliana Belding^1 , Reinier Br¨oker^2 , Andreas Enge^3 , Kristin Lauter^2 (^1) Dept. of Mathematics, University of Maryland, College Park, MD 20742, USA (^2) Microsoft Research, One Microsoft Way, Redmond, WA 98052, USA (^3) INRIA Futurs & Laboratoire d’Informatique (CNRS/UMR 7161), Ecole´ polytechnique, 91128 Palaiseau cedex, France [email protected] [email protected] [email protected] [email protected]
Abstract. We present and analyze two algorithms for computing the Hilbert class polynomial HD. The first is a p-adic lifting algorithm for inert primes p in the order of discriminant D < 0. The second is an im- proved Chinese remainder algorithm which uses the class group action on CM-curves over finite fields. Our run time analysis gives tighter bounds for the complexity of all known algorithms for computing HD , and we show that all methods have comparable run times.
For an imaginary quadratic order O = OD of discriminant D < 0, the j-invariant of the complex elliptic curve C/O is an algebraic integer. Its minimal polynomial HD ∈ Z[X] is called the Hilbert class polynomial. It defines the ring class field KO corresponding to O, and within the context of explicit class field theory, it is natural to ask for an algorithm to explicitly compute HD. Algorithms to compute HD are also interesting for elliptic curve primality proving [2] and for cryptographic purposes [6]; for instance, pairing-based cryp- tosystems using ordinary curves rely on complex multiplication techniques to generate the curves. The classical approach to compute HD is to approximate the values j(τa) ∈ C of the complex analytic j-function at points τa in the upper half plane corresponding to the ideal classes a for the order O. The polynomial HD may be recovered by rounding the coefficients of
a∈Cl(O) (X^ −^ j(τa))^ ∈^ C[X] to the nearest integer. It is shown in [9] that an optimized version of that algorithm has a complexity that is essentially linear in the output size. Alternatively one can compute HD using a p-adic lifting algorithm [7, 3]. Here, the prime p splits completely in KO and is therefore relatively large: it satisfies the lower bound p ≥ |D|/ 4. In this paper we give a p-adic algorithm for inert primes p. Such primes are typically much smaller than totally split primes, and under GRH there exists an inert prime of size only O((log |D|)^2 ). The complex multiplication theory underlying all methods is more intricate for inert primes p, as the roots of HD ∈ Fp 2 [X] are now j-invariants of supersingular elliptic curves. In Section 2 we explain how to define the canonical lift of a
supersingular elliptic curve, and in Section 4 we describe a method to explicitly compute this lift. In another direction, it was suggested in [1] to compute HD modulo several totally split primes p and then combine the information modulo p using the Chinese remainder theorem to compute HD ∈ Z[X]. The first version of this algorithm was quite impractical, and in Section 3 we improve this ‘multi-prime approach’ in two different ways. We show how to incorporate inert primes, and we improve the original approach for totally split primes using the class group action on CM-curves. We analyze the run time of the new algorithm in Section 5 in terms of the logarithmic height of HD, its degree, the largest prime needed to generate the class group of O and the discriminant D. Our tight bounds on the first two quantities from Lemmata 1 and 2 apply to all methods to compute HD. For the multi-prime approach, we derive the following result.
Theorem 1. The algorithm presented in Section 3 computes, for a discriminant D < 0 , the Hilbert class polynomial HD. If GRH holds true, the algorithm has an expected run time O
|D|(log |D|)7+o(1)
. Under heuristic assumptions, the complexity becomes O
|D|(log |D|)3+o(1)
We conclude by giving examples of the presented algorithms in Section 6.
Throughout this section, D < −4 is any discriminant, and we write O for the imaginary quadratic order of discriminant D. Let E/KO be an elliptic curve with endomorphism ring isomorphic to O. As O has rank 2 as a Z-algebra, there are two isomorphisms ϕ : End(E) ∼ −→ O. We always assume we have chosen the normalized isomorphism, i.e., for all y ∈ O we have ϕ(y)∗ω = yω for all invariant differentials ω. For ease of notation, we write E for such a ‘normalized elliptic curve,’ the isomorphism ϕ being understood. For a field F , let EllD(F ) be the set of isomorphism classes of elliptic curves over F with endomorphism ring O. The ideal group of O acts on EllD(KO ) via
j(E) 7 → j(E)a^ = j(E/E[a]),
where E[a] is the group of a-torsion points, i.e., the points that are annihilated by all α ∈ a ⊂ O = End(E). As principal ideals act trivially, this action factors through the class group Cl(O). The Cl(O)-action is transitive and free, and EllD(KO) is a principal homogeneous Cl(O)-space. Let p be a prime that splits completely in the ring class field KO. We can embed KO in the p-adic field Qp, and the reduction map Zp → Fp induces a bijection EllD(Qp) → EllD(Fp). The Cl(O)-action respects reduction modulo p, and the set EllD(Fp) is a Cl(O)-torsor, just like in characteristic zero. This ob- servation is of key importance for the improved ‘multi-prime’ approach explained in Section 3. We now consider a prime p that is inert in O, fixed for the remainder of this section. As the principal prime (p) ⊂ O splits completely in KO, all primes of
To explicitly compute this action, we fix one supersingular curve Ep/Fp 2 and an isomorphism iEp : Ap,∞ ∼ −→ End(Ep) ⊗ Q and view the embedding f as an injective map f : O ֒→ Ap,∞. Let R = i− E^1 p (End(Ep)) be the maximal order of Ap,∞ corresponding to Ep. For a an ideal of O, we compute the curve E pa = ϕa(Ep) and choose an auxiliary isogeny ϕb : Ep → Ea p. This induces an isomorphism gb : Ap,∞ ∼ −→ End(E pa ) ⊗ Q given by
α 7 → ϕbiEp (α)ϕ̂b ⊗ (deg ϕb)−^1.
The left R-ideals Rf (a) and b are left-isomorphic by [22, Th. 3.11] and thus we can find x ∈ Ap,∞ with Rf (a) = bx. As y = f (τ ) is an element of Rf (a), we get the embedding τ 7 → xyx−^1 into the right order Rb of b. By construction, the induced embedding f a^ : O ֒→ End(E pa ) is precisely
f a(τ ) = gb(xyx−^1 ) ∈ End(E pa ),
and this is independent of the choice of b. For example, if E pa = Ep, then choosing ϕb as the identity, we find x with Rf (a) = Rx to get the embedding f a^ : τ 7 → iEp (xyx−^1 ) ∈ End(Ep).
This section is devoted to a precise description of the new algorithm for comput- ing the Hilbert class polynomial HD ∈ Z[X] via the Chinese remainder theorem.
Algorithm 1 Input: an imaginary quadratic discriminant D Output: the Hilbert class polynomial HD ∈ Z[X]
n =
log 2
2. 48 h(D) + π
h ∑(D)
i=
Ai
which by [9] is an upper bound on the number of bits in the largest coefficient of HD.
p∈P p^ ≥^2 n (^) and each p is either inert in O or totally split in KO.
The choice of P in Step 1 leaves some room for different flavors of the al- gorithm. Since Step 2 is exponential in log p, the primes should be chosen as small as possible. The simplest case is to only use split primes, to be analyzed in Section 5. As the run time of Step 2 is worse for inert primes than for split primes, we view the use of inert primes as a practical improvement.
3.1 Split primes
A prime p splits completely in KO if and only if the equation 4p = u^2 − v^2 D has a solution in integers u, v. For any prime p, we can efficiently test if such a solution exists using an algorithm due to Cornacchia. In practice, we generate primes satisfying this relation by varying u and v and testing if (u^2 − v^2 D)/4 is prime.
Algorithm 2 Input: an imaginary quadratic discriminant D and a prime p that splits com- pletely in KO Output: HD mod p
a∈Cl(O)(X^ −^ j
a).
Note: The main difference between this algorithm and the one proposed in [1] is that the latter determines all curves with endomorphism ring O via exhaustive search, while we search for one and obtain the others via the action of Cl(O) on the set EllD(Fp). Step 1 can be implemented by picking j-invariants at random until one with the desired endomorphism ring is found. With 4p = u^2 − v^2 D, a necessary condition is that the curve E or its quadratic twist E′^ has p + 1 − u points. In the case that D is fundamental and v = 1, this condition is also sufficient. To test if one of our curves E has the right cardinality, we pick a random point P ∈ E(Fp) and check if (p + 1 − u)P = 0 or (p + 1 + u)P = 0 holds. If neither of them does, E does not have endomorphism ring O. If E survives this test, we select a few random points on both E and E′^ and compute the orders of these points assuming they divide p + 1 ± u. If the curve E indeed has p + 1 ± u points, we quickly find points P ∈ E(Fp), P ′^ ∈ E′(Fp) of maximal order, since we have E(Fp) ∼= Z/n 1 Z × Z/n 2 Z with n 1 | n 2 and a fraction ϕ(n 2 )/n 2 of the points have maximal order. For P and P ′^ of maximal order and p > 457, either the order of P or the order of P ′^ is at least 4
p, by [18, Theorem 3.1], due to J.-F. Mestre. As the Hasse interval has length 4
p, this then proves that E has p + 1 ± u points. Let ∆ = (^) fD 2 be the fundamental discriminant associated to D. For f 6 = 1 or v 6 = 1 (which happens necessarily for D ≡ 1 mod 8), the curves with p + 1 ± u points admit any order Og (^2) ∆ such that g|f v as their endomorphism rings. In this case, one possible strategy is to use Kohel’s algorithm described in [12, Th. 24] to compute g, until a curve with g = f is found. This variant is easiest to analyze and enough to prove Theorem 1. In practice, one would rather keep a curve that satisifes f |g, since by the class number formula g = vf with overwhelming probability. As v and thus f v g is small, it is then possible to use another algorithm due to Kohel and analyzed in detail by Fouquet–Morain [12, 11] to quickly apply an isogeny of degree f v g leading to a curve with endomorphism ring O.
In this section we explain how to compute the Hilbert class polynomial HD of a discriminant D < −4 using a p-adic lifting technique for an inert prime p ≡ 1 mod 12. Our approach is based on the outline described in [7]. The condition p ≡ 1 mod 12 ensures that the j-values 0, 1728 ∈ Fp are not roots of HD ∈ Fp[X]. The case where one of these two values is a root of HD ∈ Fp[X] is more technical due to the extra automorphisms of the curve, and will be explained in detail in the first author’s PhD thesis. Under GRH, we can take p to be small. Indeed, our condition amounts to prescribing a Frobenius symbol in the degree 8 extension Q(ζ 12 ,
D)/Q, and by effective Chebotarev [13] we may take p to be of size O((log |D|)^2 ). The first step of the algorithm is the same as for Algorithm 3 in Section 3: we compute a pair (j(Ep), f 0 ) ∈ EmbD (Fp 2 ). The main step of the algorithm is to compute to sufficient p-adic precision the canonical lift E˜p of this pair, defined in Section 2 as the inverse under the bijection π of Theorem 2. For an arbitrary element η ∈ EmbD (Fp 2 ), let
XD(η) = {(j(E), f ) | j(E) ∈ Cp, (j(E) mod p, f ) = η}
be a ‘disc’ of pairs lying over η. Here, Cp is the completion of an algebraic closure of Qp. The disc XD(η) contains the points of EllD(L) that reduce modulo p to the j-invariant corresponding to η. These discs are similar to the discs used for the split case in [7, 3]. The main difference is that now we need to keep track of the embedding as well. We can adapt the key idea of [7] to construct a p-adic analytic map from the set of discs to itself that has the CM-points as fixed points in the following way. Let a be an O-ideal of norm N that is coprime to p. We define a map
ρa :
η
XD(η) →
η
XD(η)
as follows. For (j(E), f ) ∈ XD(η), the ideal f (a) ⊂ End(Ep) defines a subgroup Ep[f (a)] ⊂ Ep[N ] which lifts canonically to a subgroup E[a] ⊂ E[N ]. We define ρa((j(E), f )) = (j(E/E[a]), f a), where f a^ is as in Section 2. If the map f is clear, we also denote by ρa the induced map on the j-invariants. For principal ideals a = (α), the map ρa = ρα stabilizes every disc. Fur- thermore, as E˜p[(α)] determines an endomorphism of E˜p, the map ρα fixes the canonical lift j( E˜p). As j(Ep) does not equal 0, 1728 ∈ Fp, the map ρα is p-adic analytic by [3, Theorem 4.2].
Writing α = a+bτ , the derivative of ρα in a CM-point j(E ˜) equals α/α ∈ ZL by [3, Lemma 4.3]. For p ∤ a, b this is a p-adic unit and we can use a modified
version of Newton’s method to converge to j( E˜) starting from a random lift (j 1 , f 0 ) ∈ XD(η) of the chosen point η = (j(Ep), f 0 ) ∈ Fp^2. Indeed, the sequence
jk+1 = jk −
ρα((jk, f 0 )) − jk α/α − 1
converges quadratically to j( E˜). The run time of the resulting algorithm to com- pute j( E˜) ∈ L up to the necessary precision depends heavily on the choice of α. We find a suitable α by sieving in the set {a + bτ | a, b ∈ Z, gcd(a, b) = 1, a, b 6 = 0 mod p}. We refer to the example in Section 6.3 for the explicit computation of the map ρα. Once the canonical lift has been computed, the computation of the Ga- lois conjugates is easier. To compute the Galois conjugate j( E˜p)l^ of an ideal l of prime norm ℓ 6 = p, we first compute the value j(Ep)l^ ∈ Fp^2 as in Algo- rithm 3 in Section 3. We then compute all roots of the ℓ-th modular polynomial Φℓ(j( E˜p), X) ∈ L[X] that reduce to j(Ep)l. If there is only one such root, we are done: this is the Galois conjugate we are after. In general, if m ≥ 1 is the p-adic precision required to distinguish the roots, we compute the value ρl((j( E˜p), f 0 )) to m + 1 p-adic digits precision to decide which root of the modular polynomial is the Galois conjugate. After computing all conjugates, we expand the product ∏ a∈Cl(O)
X − j( E˜p)a
∈ ZL[X] and recognize the coefficients as integers.
This section is devoted to the run time analysis of Algorithm 1 and the proof of Theorem 1. To allow for an easier comparison with other methods to com- pute HD, the analysis is carried out with respect to all relevant variables: the discriminant D, the class number h(D), the logarithmic height n of the class polynomial and the largest prime generator ℓ(D) of the class group, before de- riving a coarser bound depending only on D.
5.1 Some number theoretic bounds
For the sake of brevity, we write llog for log log and lllog for log log log. The bound given in Algorithm 1 on n, the bit size of the largest coefficient of the class polynomial, depends essentially on two quantities: the class number h(D) of O and the sum
[A,B,C]
1 A , taken over a system of primitive reduced quadratic forms representing the class group Cl(O).
Lemma 1. We have h(D) = O(|D|^1 /^2 log |D|). If GRH holds true, we have h(D) = O(|D|^1 /^2 llog |D|).
Proof. By the analytic class number formula, we have to bound the value of the Dirichlet L-series L(s, χD) associated to D at s = 1. The unconditional bound follows directly from [19], the conditional bound follows from [15].
Lemma 2. We have
[A,B,C] 1 A =^ O((log^ |D|)
(^2) ). If GRH holds true, we have ∑ [A,B,C]
1 A =^ O(log^ |D|^ llog^ |D|).
Proof. The bound
[A,B,C]
1 A =^ O((log^ |D|)
(^2) ) is proved in [17] with precise
constants in [9]; the argument below will give a different proof of this fact.
desired endomorphism ring. So we expect to apply Kohel’s algorithm with run
time O(p^1 /3+o(1)) an expected H(v
(^2) D) h(D) ∈^ O(v^ llog^ v) times. As^ p
1 / (^3) is dominated
by p/h(D) of order about p^1 /^2 , Step 2 takes time altogether
O
p h(D)
(log p)^2 M (log p) llog p
Heuristically, we only check if some random points are annihilated by p + 1 ± u and do not compute their actual orders. The (log p)^2 in (4) then becomes log p. In Step 3, the decomposition of the class group into a product of cyclic groups takes subexponential time. Furthermore, since all involved primes ℓi are of size O((log |D|)^2 ) under GRH, the time needed to compute the modular polynomi- als is negligible. Step 3 is thus dominated by O(h(D)) evaluations of reduced modular polynomials and by the computation of their roots. Once Φℓ mod p is computed, it can be evaluated in time O(ℓ^2 M (log p)). Find- ing its roots is dominated by the computation of Xp^ modulo the specialized polynomial of degree ℓ + 1, which takes time O(log p MX (ℓ, log p)). Letting ℓ(D) denote the largest prime needed to generate the class group, Step 3 takes time
O (h(D)ℓ(D) M (log p)(ℓ(D) + llog |D| log p)). (5)
Under GRH, ℓ(D) ∈ O((log |D|)^2 ), and heuristically, ℓ(D) ∈ O
(log |D|)1+ε
By organizing the multiplications of polynomials in a tree of height O(log h), Step 4 takes O(log h(D) MX (h(D), log p)), which is dominated by Step 3. We conclude that the total complexity of Algorithm 2 is dominated by Steps 2 and 3 and given by the sum of (4) and (5).
5.3 Proof of Theorem 1
We assume that P = {p 1 , p 2 ,.. .} is chosen as the set of the smallest primes p that split into principal ideals of O. Notice that log p, log h(D) ∈ O(log |D|), so that we may express all logarithmic quantities with respect to D. The dominant part of the algorithm are the O(n/ log |D|) invocations of Algorithm 2 in Step 2. Specializing (4) and (5), using the bound on the largest prime of Lemma 3 and assuming that ℓ(D) ∈ Ω(log |D|llog |D|), this takes time
O
n M (log |D|)
h(D)
log |D|
h(D)(log |D|)^4 , n
Finally, the fast Chinese remainder algorithm takes O(M (log N )llog N ) by [21, Th. 10.25], so that Step 3 can be carried out in O(h(D) M (n) log |D|), which is also dominated by Step 2. Plugging the bounds of Lemmata 1 and 2 into (6) proves the rigorous part of Theorem 1. For the heuristic result, we note that Lemma 3 overestimates the size of the primes, since it gives a very high bound already for the first split prime. Heuris- tically, one would rather expect that all primes are of size O(nh). Combined with the heuristic improvements to (4) and (5), we find the run time
O
n M (log |D|)
n + h(D)
log |D|
5.4 Comparison
The bounds under GRH of Lemmata 1 and 2 also yield a tighter analysis for other algorithms computing HD. By [9, Th. 1], the run time of the complex analytic algorithm turns out to be O(|D|(log |D|)^3 (llog |D|)^3 ), which is essentially the same as the heuristic bound of Theorem 1. The run time of the p-adic algorithm becomes O(|D|(log |D|)6+o(1)). A heuris- tic run time analysis of this algorithm has not been undertaken, but it seems likely that again O(|D|(log |D|)3+o(1)) would be reached.
6.1 Inert primes
For very small primes there is a unique supersingular j-invariant in character- istic p. For example, for D ≡ 5 mod 8, the prime p = 2 is inert in OD and we immediately have HD mod 2 = Xh(D). More work needs to be done if there is more than one supersingular j- invariant in Fp 2 , as illustrated by computing H− 71 mod 53. The ideal a = (2, 3 + τ ) generates the order 7 class group of O = Z[τ ]. The quaternion algebra Ap,∞ has a basis { 1 , i, j, k} with i^2 = − 2 , j^2 = − 35 , ij = k, and the maximal order R with basis { 1 , i, 1 /4(2 − i − k), − 1 /2(1 + i + j)} is isomorphic to the en- domorphism ring of the curve with j-invariant 50. We compute the embedding f : τ 7 → y = 1/ 2 − 3 / 2 i + 1/ 2 j ∈ R, where y satisfies y^2 − y + 18 = 0. Calculating the right orders of the left R-ideals Rf (ai) for i = 1,... , 7, we get a sequence of orders corresponding to the j-invariants 28 ± 9
2 , 50 , 50 and compute H− 71 mod 53 = X(X − 46)^2 (X − 50)^2 (X^2 + 50X + 39).
6.2 Totally split primes
For D = −71, the smallest totally split prime is p = 107 = 12
(^2) +4· 71
H− 71 mod 107 = X^7 + 72X^6 + 93X^5 + 73X^4 + 46X^3 + 29X^2 + 30X + 19.
from [9] and [7, 3]. To see if the CRT-approach is comparable in practice as well, we computed an example with a reasonably sized discriminant D = −108708, the first discriminant with class number 100. The a posteriori height of HD is 5874 bits, and we fix a target precision of n = 5943. The smallest totally split prime is 27241. If only such primes are used, the largest one is 956929 for a total of 324 primes. Note that these primes are indeed of size roughly |D|, in agreement with Lemma 3. We have partially implemented the search for a suitable curve: for each 4p = u^2 − v^2 D we look for the first j-invariant such that for a random point P on an associated curve, (p + 1)P and uP have the same X-coordinate. This allows us to treat the curve and its quadratic twist simultaneously. The largest occurring value of v is 5. Altogether, 487237 curves need to be checked for the target cardinality. On an Athlon-64 2.2 GHz computer, this step takes roughly 18.5 seconds. As comparison, the third authors’ complex analytic implementation takes 0. 3 seconds on the same machine. To speed up the multi-prime approach, we incor- porated some inert primes. Out of the 168 primes less than 1000, there are 85 primes that are inert in O. For many of them, the computation of HD mod p is trivial. Together, these primes contribute 707 bits and we only need 288 totally split primes, the largest one being 802597. The required 381073 curve cardinal- ities are tested in 14.2 seconds. One needs to be careful when drawing conclusions from only few examples, but the difference between 14.2 and 0.3 seconds suggests that the implicit con- stants in the O-symbol are worse for the CRT-approach.
6.5 Class invariants
For many applications, we are mostly interested in a generating polynomial for the ring class field KO. As the Hilbert class polynomial has very large coefficients, it is then better to use ‘smaller functions’ than the j-function to save a constant factor in the size of the polynomials. We refer to [16, 20] for the theory of such class invariants. There are theoretical obstructions to incorporating class invariants into Al- gorithm 1. Indeed, if a modular function f has the property that there are class invariants f (τ 1 ) and f (τ 2 ) with different minimal polynomials, we cannot use the CRT-approach. This phenomenon occurs for instance for the double eta quotients described in [10]. For the discriminant D in Section 6.4, we can use the double eta quotient of level 3 · 109 to improve the 0.3 seconds of the complex analytic approach. For CRT, we need to consider less favourable class invariants.
Acknowledgement. We thank Dan Bernstein, Fran¸cois Morain and Larry Washington for helpful discussions.
editors, High Primes and Misdemeanours: Lectures in Honour of the 60th Birthday of H C Williams, volume 41 of Fields Inst. Commun., pages 1–17, 2004.
√ −k). Proc. London Math. Soc., 27:358–372, 1928.