A Cryptographic Application of Weil Descent
Nigel Smart, Steve Galbraith† Extended Enterprise Laboratory HP Laboratories Bristol HPL-1999-70 26 May, 1999*
function fields, This paper gives some details about how Weil descent divisor class group, can be used to solve the discrete logarithm problem on cryptography, elliptic curves which are defined over finite fields of elliptic curves small characteristic. The original ideas were first introduced into cryptography by Frey. We discuss whether these ideas are a threat to existing public key systems based on elliptic curves.
† Royal Holloway College, University of London, Egham, UK *Internal Accession Date Only Ó Copyright Hewlett-Packard Company 1999
A CRYPTOGRAPHIC APPLICATION OF WEIL DESCENT
S.D. GALBRAITH AND N.P. SMART
Abstract. This pap er gives some details ab out howWeil descent can b e used
to solve the discrete logarithm problem on elliptic curves which are de ned over
nite elds of small characteristic. The original ideas were rst intro duced into
cryptographybyFrey.We discuss whether these ideas are a threat to existing
public key systems based on elliptic curves.
1. Introduction
Frey [4] intro duced the cryptographic community to the notion of \Weil descent",
n
which applies to elliptic curves de ned over nite elds of the form F with n>1.
q
This pap er gives further details on how these ideas might be applied to give an
attack on the elliptic curve discrete logarithm problem. We also discuss which
curves are most likely to b e vulnerable to such an attack.
The basic strategy consists of the following four stages which will b e explained
in detail in the remainder of the pap er.
n
1. Construct the Weil restriction of scalars, A,ofEF .
q
2. Find a curve, C , de ned over F which lies on A.
q
n
3. Pull the discrete logarithm problem back from E F toJacCF .
q q
4. Solve the discrete logarithm problem on JacCF using an index calculus
q
metho d, based on the Hafner-McCurley algorithm.
Wemust emphasize that this pap er do es not represent a fully develop ed attack
on the elliptic curve discrete logarithm problem. In fact the metho d describ ed here
is rather akin to the Xedni calculus explained by Silverman, see [18] and [10], for
curves over large prime elds of odd characteristic, since although the metho d is
available in theory in practice it is unlikely to ever b e made to work, in the authors
opinion, for curves of cryptographic interest.
In the rst sections we give some details ab out ab elian varieties, curves and the
\Weil restriction" which is an ab elian variety. We also provide more details ab out
the rst 3 stages ab ove. The ideas in these sections are well-known in algebraic
geometry, but they are not well understo o d among the cryptographic community.
In Sections 4 we describ e solutions to some of the underlying problems that
the metho d presents. In Section 5 we give a down to earth explanation of the
whole approach with a very simple example. In this example we construct the Weil
n
4n
restriction over F of an elliptic curve E over F .
1
1
2
2
In Section 6 we describ e how the discrete logarithm problem in the divisor class
group of a curve can be solved in heuristic sub-exp onential time relative to the
genus of the curve.
1991 Mathematics Subject Classi cation. Primary: 94A60, 11T71, Secondary: 11Y99, 14H52,
14Q15.
Key words and phrases. function elds, divisor class group, cryptography, elliptic curves. 1
In the nal section we discuss some op en problems and give an argumentofwhy
we do not exp ect most elliptic curves to be vulnerable to a Weil descent attack.
In particular we will explain whywe b elieve comp osite values of n maybeweaker
than prime values, thus p ossibly explaining the choice of some standards b o dies in
precluding comp osite values of n.
2. Curves, Divisor Class Groups and Jacobians
We gather a few relevant facts from algebraic geometry. The main references we
use are Hartshorne [7], Mumford [15] and Milne [12].
A curve C over a eld k is a complete, non-singular variety of dimension 1 over
k . We often deal with curves which are given as a sp eci c ane mo del, which can
cause problems. For instance in this setting the curves are often singular, but we will
nevertheless still call them curves. The usual approach for handling singularities
on a curve, C=k,istotake a sequence of blow-ups, to pro duce a non-singular curve.
This pro cess mayinvolve enlarging the ground eld k . Nevertheless, for any C there
0
is a non-singular curve, C , called the normalisation see [7], Ex. I I.3.8, whichis
0
de ned over the same eld k , and a degree one rational map C ! C .
The genus g of a non-singular curve is an imp ortantinvariant of the curve. For
a singular curve one may de ne the geometric genus see [7], Section I I.8, whichis
a birational invariant, as the genus of the normalisation of the curve.
The Jacobian variety JacC of a non-singular curve C of genus g ,over a eld
k , is an ab elian varietyover k of dimension g . One construction of the Jacobian is
g
as a subset of the g th symmetric p ower, C , of the curve see [12]. We gather
two imp ortant facts ab out the Jacobian of a curve.
Prop osition 1. Suppose C is a non-singular curve over a eld k with a point P
de ned over k . The fol lowing properties hold.
P
1. Canonical map from C into JacC There is a canonical map f : C !
JacC which takes the point P to the identity element of JacC.
2. Universal property Suppose A is an abelian variety over k and suppose there
is some mapping of varieties : C ! A such that P =0 , then thereisa
A
P
unique homomorphism : JacC ! A such that = f .
0
The divisor class group Pic C of a curve is the group of degree zero divisors
k
on C , which are de ned over k , mo dulo principal divisors. If C is a non-singular
0
C are isomorphic as ab elian curveover k with a k -p oint, P , then JacC and Pic
k
varieties see [12], Theorem 7.6. It is convenient to view prime divisors on the
normalisation as places of the function eld. Since the function eld of a singular
curve is isomorphic to the function eld of its normalisation it follows that we can
de ne the divisor class group of a singular curve C and that it will b e isomorphic
to the divisor class group of its normalisation.
An ab elian variety A over k is simple if it has no prop er ab elian sub-varieties
de ned over k . An ab elian varietyisabsolutely simple if, even when considered over
the algebraic closure k , it is simple. An isogeny is a mapping of ab elian varieties
and so is, in particular, a group homomorphism with nite kernel.
We require the following result.
Prop osition 2 see [15], page 173, Theorem 1. Let A be an abelian variety over
a eld k and let B beanabelian subvariety of A. Then thereisanabelian subvariety
C of A such that A is isogenous to the product B C . 2
A corollary of this statement is the fact that every ab elian variety is isogenous
to a pro duct of simple ab elian varieties in a unique way up to ordering.
Wenow give an application of this prop erty also see [12], p. 199. Supp ose that
A is a simple ab elian variety of dimension d and that we are given a curve C and a
map : C ! A in this pap er the maps maps we will consider will usually have
degree one and we will use the phrase \C lies on A" to represent this situation.
Since the image of the map : JacC ! A is an ab elian subvarietyof A it follows
from the fact that A is simple that the map is surjective and that A is an ab elian
subvarietyof JacC. In other words, one has the following result.
Corollary 3. Let A be a simple abelian variety of dimension d over eld k . Sup-
pose we have a map : C ! A from a non-singular curve C to A. Then the genus
of C is at least d. Furthermore, g C = d if and only if A is isogenous to the
Jacobian of C .
3. Weil Descent
Let k denote a nite eld and K denote a Galois extension of degree n. For
n
m n
and K = F with example, we could have k = F and K = F or k = F
1
2 2 2 2
m = n n, which are the two most imp ortant cases for the applications. Let E K
1
denote some elliptic curveover K ,we assume we wish to solve a discrete logarithm
problem in E K given by
P =[]P ; with P ;P 2 EK:
2 1 1 2
We include the case where E is de ned over k in our discussion, this is the case of
Koblitz curves. Koblitz curves are used in real life situations since they pro duce
ecient cryptographic systems.
The \Weil restriction of scalars" of E over K is an ab elian variety W E of
K=k
dimension n over the smaller eld k .
The pro of that such an ob ject exists is fairly deep. Nevertheless, we can easily
show how W E can be constructed in our case a sp eci c example will be
K=k
given later. First take a basis of K over k and expand the co ordinate functions
on the ane curve E K in terms of the new basis, thus using 2n variables over k .
Expanding out the formulae for the elliptic curve E K and equating co ecients of
the basis of K over k ,we obtain n equations linking our 2n variables. This ane
variety de nes W E and the group law is induced from the group law on the
K=k
elliptic curve.
The following result is stated in [4];
Lemma 4. If E is de ned over k then
W E E k V
=
K=k
where V is an abelian variety of dimension n 1. If n is coprime to E k then
we have,
V = fP 2 W E :Tr P =Og
K=k K=k
where the traceiscomputed using the mapping from W E to E K .
K=k
Proof. If E is de ned over k then it is clearly an ab elian subvarietyof W E .
K=k
By Prop osition 2 it follows that there is an ab elian subvariety B over k such that
W E is isogenous to E B .
K=k 3
The construction of the Weil restriction implies that a generic p ointofW E
K=k
n 1
is ; ;::: ; where is a generic p oint of E=K . It follows that the
subvariety V of W E has co dimension 1.
K=k
Finally, one sees that V is an ab elian subvarietyof W E and, since n is co-
K=k
prime to E k , the subvariety V k has trivial intersection with E k . Therefore,
V is isogenous to B .
We let A denote the `interesting' ab elian variety, de ned over k , on which the
discrete logarithm problem on E K actually lies. In other words
De nition 1. De ne A by
If E is not de ned over k , then set A = W E . Hence dim A = n.
K=k
If E is de ned over k , then set A = V ,from Lemma 4. Hence dim A = n 1.
In general we exp ect the ab elian variety A to b e simple. Indeed, since the original
elliptic curve will have order divisible by a large prime, it is clear by considering
the numberofpoints on A that there must b e a large simple ab elian subvarietyof
A.
We may now give a sketch of the \Weil descent" attack on the elliptic curve
discrete logarithm problem: Given an elliptic curve E over K construct the ab elian
variety A over k as ab ove. Next nd a p ossibly singular curve C de ned over
k lying on A such that C has a k -p oint P at the p oint at in nity of A. By
0
the universal prop erty of Jacobians there is a mapping of ab elian varieties :
0 0
JacC ! A, where C is the normalisation of C .
The p oints P and P of the discrete logarithm problem in E K corresp ond to
1 2
p oints on Ak inanobvious way, and these p oints may b e pulled-back under to
0
obtain divisors D and D in Pic Ck whose supp ort is only on the non-singular
1 2
k
p oints of C such that D =P . Finally, the discrete logarithm problem of D
i i 2
0
with resp ect to D on Pic C can b e solved using an index calculus metho d.
1
k
There are three main problems whichmust b e overcome in order to apply this
metho d.
1. It is necessary to nd curves of small genus on A.
2. It is necessary to pull back p oints on A to divisors on C .
3. It is necessary to have an index calculus metho d for general divisor class
groups.
The main contribution of this pap er is to provide solutions to the latter two of these
problems. The rst problem is the very signi cant and we discuss it further at the
end of the pap er.
4. Pulling Back Along
We shall need to describ e the mapping more explicitly. Let C b e a curveof
genus g over k and let : C ! A be the mapping of C into the ab elian variety
A. Supp ose P is the k -p ointonC whichwe shall assume lies at in nity which
0
P 0
0
maps under f = f to the identity elementofA. Recall that elements of Pic C
k
P
d
may b e represented in the form D = E dP where E = Q is an e ective
0 i
i=1
divisor of degree d and where the Q are p oints on C k such that, as a divisor, E
i
is de ned over k . Note that one usually restricts to d g but the pro cess describ ed
b elowworks for arbitrary values of d. 4
0
Prop osition 5. The map : Pic C ! Ak is given by
k
d
X
E dP = Q
0 i
i=1
where the addition on the right hand side is addition on the abelian variety A which
can be eciently computed via the addition law on E K .
0
Proof. The divisor E dP is equal to the sum on Pic C of the divisors
0
k
0
C has the prop erty that f Q = Q P . The canonical map f : C k ! Pic
i i 0
k
0
Q P . The mapping : Pic C ! A has the universal prop erty that = f
i 0
k
and so Q P = Q 2 Ak . Since is a group homomorphism which
i 0 i
preserves the action of the Galois group Gal k=k the result follows.
In practice we will b e using a singular equation for the curve C . The mapping
0
ab ove still gives a complete description of the map from Pic C to A for the
k
divisors whose supp ort lies on the non-singular p oints of C .
Toinvert the map wehave to nd a divisor which maps under to a given
p oint, P ,ofA. Wenow describ e how to nd such a divisor.
We will nd p non-singular p oints on C k , where p is to b e determined later.
Call these fP ;::: ;P g and map them to the variety A via the map , to obtain
1 p
Q = P ; i =1;::: ;p:
i i
Thinking of the co ordinates of the p oints as variables, we see that we obtain p
equations in 2p unknowns. Formally using the group law on A applied to these
p oints Q we determine the equations for the co ordinates of the sum
i
p
X
Q
i
i=1
and then equate this to the given element P . Since A has dimension n this gives
us, roughly, another n equations.
Hence in total wehavep+nequations in 2p unknowns, which de nes a variety
V . So as so on as p > n we exp ect that this de nes a variety of dimension at
least p n. For example, a curve when p = n + 1 and a surface when p = n +2.
Finding a p oint on this variety will pro duce the p oints P and in general these will
i
b e non-singular p oints on C .
Finding p oints on varieties in high-dimensional spaces is not a computationally
trivial matter. There may also be computational issues which arise when con-
structing this variety. Nevertheless, we do not think that these would b e the main
obstacle to the success of our metho d, since nding a suitable curve, C , on A is
more likely to provide an obstacle to the practicality of our metho d.
0
We construct the divisors D =Q P , in Pic C, and then
i i 0
k
p
X
D =P;
i
i=1
as required. A di erent p oint on the variety V will give rise to di erent divisors
D .
i
0
0 0
Supp ose now that wehave found two divisors, D and D ,inPic C such that
k
1 2
0 0
D =P and D =P Let g denote the genus of C and let q denote the size
1 2
1 2 5
0
of the eld k . We let h = Pic C then by the Weil conjectures we know that
k
2g
Y
p p
2g 2g
1 q h = 1 ! 1 + q :
i
i=1
For the moment supp ose wehave determined h. This numb er can b e computed in
p olynomial time using the algorithm due to Pila [17] also see [2] and [9]. The fact
that we know that h is divisible byEK gives us some extra information ab out
h. In any case the value of h will come out in the wash of the metho d describ ed
2
in Section 6. We shall make the reasonable assumption that E K do es not
divide h.
0
0
We compute D =[h=E K ]D in Pic C , and attempt to solve the discrete
i
k
i
logarithm problem
D =[]D
2 1
0
for the unknown discrete logarithm , in the group Pic C . This is then the
k
solution to the original discrete logarithm problem on E K .
5. An Example
n
We give an example to illustrate some of the ideas describ ed ab ove. Let k = F
1
2
and let K b e such that K has a Typ e-1 Optimal Normal Basis over k . This means
n
1
should b e primitive in the nite eld that n + 1 should b e a prime and that 2
F . Then the n ro ots of
n+1
n+1 n n 1
x 1=x 1 = x + x + + x +1
form an Optimal Normal Basis of K over k .
2 4 8
As an example we take a eld with n = 4, for simplicity. Let f ; ; ; g denote
4 3 2
the Optimal Normal Basis of K over k ,sowehave + + + + 1 = 0 and the
2 4 8
element12K is given, in terms of the basis, by1= + + + . Consider the
following elliptic curve de ned over K ,
2 3
Y + XY = X + b 1
where b 6= 0 and b is given by
2 4 8
b = b + b + b + b :
0 1 2 3
By setting
2 4 8
X = x + x + x + x ;
0 1 2 3
2 4 8
Y = y + y + y + y ;
0 1 2 3
where x ;y 2 k, substituting into 1 and equating powers of we obtain four
i i
equations in the eight unknowns, fx ;::: ;x ;y ;::: ;y g. This de nes the ab elian
0 3 0 3
variety A as a 4-dimensional variety in 8-dimensional ane space. Note that if one
tries to construct a pro jective equation for A in the obvious manner then there are
to o many p oints at in nity. For the application wemust rememb er that there is
some pro jective equation for A which only has one p oint which do es not lie on our
ane equation.
The group lawon Acan b e evaluated by translating a p oint
x ;x ;x ;x ;y ;y ;y ;y 2 Ak
0 1 2 3 0 1 2 3
back to the p oint
2 4 8 2 4 8
x + x + x + x ;y + y + y + y 2 EK
0 1 2 3 0 1 2 3 6
and then using the addition formulae on the elliptic curve.
If weintersect A with dim A 1hyp erplanes, in general p osition, which all pass
through the zero elementof A, then we should end up with a variety of dimension
one. By using elimination theory we can then write down the equation of this
variety.
In our example wehave dim A = 4, and the obvious hyp erplanes to cho ose, given
that wewant the degree of the resulting curve to b e small, are
x = x = x = x :
0 1 2 3
Intersecting these with our variety A,we obtain the variety
8
2 3
y + y x + x + b =0;
0 0 0
3 0
>
>
>
>
2 3
>
y +y x +x +b =0;
<
1 0 1
0 0
V :
2 3
y +y x +x +b =0;
>
2 0 2
1 0
>
>
>
>
2 3
:
y +y x +x +b =0:
3 0 3
2 0
If we then eliminate y by taking the resultant of the rst and fourth of these
3
equations, and eliminate y by taking the resultant of the second and third, then
1
we obtain the variety:
4 6 2 3 5 2
y + x + b + y x + x + b x =0;
0 0
2 0 3 0 0 0
0
V :
4 6 2 3 5 2
y +x +b +y x +x +b x =0:
2 2
0 0 1 0 0 0
Finally by eliminating y from these two equations and setting x = x and y = y
2 0 0
we obtain the ane curve
16 15 24 20 18 17 14 2 12 4 8 8
C : y + x y +x + x + x + x + b x + b x + b x + b :
0
3 2 1
The only singular p oint on this ane mo del is the p ointatx; y =0;0. There is
also a singularity at the p oint at in nity,above which there will b e several p oints
and one of these will corresp ond to the unique p oint at in nity on the variety A.
The other p oints will corresp ond to p oints on the ane part of A.
To get a feel for this curve, take k = F , this is far to o small for real examples
2
but it allows us to compute some invariants. We computed the genus, g , for this
curve for all the p ossible values of the b , using the KANT package [3]. For the
i
following values of the b , which represent exactly half of all p ossible values, we
i
found that the genus was equal to 8
0; 0; 0; 1; 0; 0; 1; 0; 0; 1; 0; 0; 0; 1; 1; 1;
b ;b ;b ;b =
0 1 2 3
1; 0; 0; 0; 1; 0; 1; 1; 1; 1; 0; 1; 1; 1; 1; 0:
In addition the unit rank was always 3 and the rami cation at in nity was wild.
The value of 0; 0; 0; 0 is precluded since the original elliptic curvemust b e non-
singular. The other values of b ;b ;b ;b pro duce curves which are reducible. As
0 1 2 3
an example, consider b ;b ;b ;b =0;0;1;1, in this case we obtain an irreducible
0 1 2 3
factor given by the curve
8 4 4 6 2 7 12 9 4
C : y + x y + x y + x y + x + x + x =0:
1
This curve has genus 4, unit rank two and again the place at in nity is wildly
rami ed. Notice that since C has genus four and the dimension of A is four, the
1
Jacobian of the normalisation of C must b e isogenous to A.
1 7
6. Solving The Discrete Logarithm Problem in the Divisor Class
Group of Certain Curves
Let k b e a nite eld of q elements and let C x; y 2 k [x; y ] denote some irre-
ducible multinomial such that
deg C = N .
y
C is monic and separable in y .
There is a k -rational p oint, P ,onC at in nity.
0
2
We think of C x; y as determining a curvein P , which is p ossibly singular.
k
We let F = k x[y ]=C denote the function eld of C x; y . The place at in nity,
1,of kx decomp oses in F in the form
s
Y
e
i
1 = 1 ;
i
i=1
with 1 having inertia degree f . For later use we set e = lcme ;::: ;e and, by
i i 1 s
our third assumption ab ove, wehavef = gcdf ;::: ;f =1.
1 s
Let O denote the integral closure of k [x]inF and let Cl denote the ideal class
F
0
group of O and Ker denote the subgroup of Pic C generated by the divisor
F
k
classes of all the degree zero divisors with supp ort only at in nity. Since f =1 we
obtain the isomorphism
0
Pic C Cl Ker;
=
k
where an ideal a 2 Cl corresp onds to the degree zero divisor class
D deg aP ;
a 0
where D is the e ective divisor asso ciated to a in the obvious manner.
a
In this section we shall prove
0
Theorem 6. If D and D are elements of Pic C such that D =[m]D then
1 2 2 1
k
0
we can nd m, i.e. solve the discrete logarithm problem in Pic C , in heuristic
k
expected running time
p
g
O N L 1=2; 3:54 log q ;
e
as g !1.
Crucial to our algorithm is the following theorem which guarantees that the
0
factor base weeventually cho ose will generate the whole of Pic C .
k
0
Theorem 7. The group Pic C is generated, under the isomorphism above, by
k
the group Ker and the prime ideals B lying above primes p 2 k [x] with
2 log4g 2
f deg p d e
B
log q
where f is the inertia degreeof Band g is the genus of K .
B
Proof. The pro of of the analogous result in [14] extends to our more general situa-
tion.
We set
1=2
g log g
= d e
2 log q 8
and let S denote the set of places i.e. prime ideals, B, lying ab ove a prime
f
p 2 k [x] such that
deg p :
Since for all B wehavef 1, we can, for suciently large values of g , assume that
B
0
the set of such ideals, S , along with the group Ker, generate the group Pic C
f
k
under the ab ove isomorphism.
For each irreducible p olynomial p 2 k [x] there are at most N nite places lying
ab ove p. Letting N i denoting the number of monic irreducible p olynomials in
q
k [x] of degree less than or equal to ,we obtain
i
X X
q q N
: S N N i N = O q
f q
i
i=0 i=0
Let S denote the set of places ab ove 1 and set S = S [ S . The set of S -units
1 f 1
of F , i.e. the functions whose supp ort lies solely on S , is denoted by O . Setting
S
t =S and letting S = S nfB g, for some xed place B 2 S e.g., B = P ,
1 1 1 1 0
we consider the map
t 1
O ! Z
S
:
f 7 ! f v f deg p ;
B B
B2S
where v denotes the valuation function at the place B. It is easy to see that the
B
0
t 1
image of is a lattice 2 Z isomorphic to Pic C and with determinant
k
0
Pic C
k
Q
det = :
f deg p
B
B2S
6.1. Smo othing a divisor. For our purp oses a divisor will b e called smooth if its
supp ort lies wholly on the set S . In this section let D denote some given divisor of
0
degree zero which represents some class in Pic C . We wish to construct a divisor
k
0 0 0
D and a function such that SuppD S and D = D + div .
The basic idea is to add to D a random sum, R , of divisors of degree zero with
supp ort in S ,soD =D+R. We then `reduce' the resulting divisor to obtain a
1
divisor, D , and a function, , such that D = D + R + div . If we are `lucky'
2 2
then the supp ort of D will lie in S and we will have obtained the required smo oth
2
divisor D R D . If we are not lucky then we need to take another random sum,
2
R .
To detect whether D has supp ort on S we can ignore the in nite comp onent and
2
concentrate on the nite part. Determining the supp ort is then simply a matter of
p olynomial factorization over nite elds which can b e p erformed in probabilistic
p olynomial time.
All that we need now do is explain the metho d of reduction, and how this e ects
the degree of the resulting ideal which corresp onds to D .
2
Under our assumption on the existence of a p oint P at in nity, the Riemann-
0
0
Ro ch theorem then tells us that every element of Pic C is represented by a divisor
k
of the form
E g P ;
0
where E is an e ective divisor of degree g . Hence, by using an ecient e ective
Riemann-Ro ch algorithm see for instance, [8] or [19] the divisor D can b e made
2
to have the form D = E g P where deg E = g . The divisor D is therefore
2 0 2
smo oth if the p olynomial in k [x] of degree at most g , corresp onding to the nite 9
part of E factors into a pro duct of irreducibles all with degree less than or equal to
.
2
1=
If q g log g and over the factor base in one iteration of our smo othing algorithm is given by see [11] 1+o1g= Pr = ;g g as !1 and g= !1. Since this is the probability that a p olynomial of degree g , de ned over k , has all its factors of degree less than or equal to . 6.2. Generating the lattice of relations. We shall describ e a metho d of solving the discrete logarithm problem which isavariant of the Hafner-McCurley metho d used in quadratic number and function elds, see [6] and [16]. The analogous metho d based on the NFS/FFS can b e deduced in an analogous wayby extending the work of [1] and [5]. In practice the NFS/FFS style metho d may b e more ecient since one can p erform sieving with this metho d whilst it is hard to see howtodo this with the Hafner-McCurley based variant. However it is simpler to analyze the Hafner-McCurley based variant whichwe shall now describ e. We rep eat the following steps until we obtain a lattice of full rank whose deter- minant do es not decrease up on running the following algorithm a few more times. Indeed at this p ointwe can use any partial information wehave from our discus- 0 sion in Section 3 on the group order of Pic C . This will giveusaneven stricter k 0 stopping criteria and will determine the size of Pic C asaby pro duct. k 1. We apply our smo othing algorithm to the trivial divisor D = 0 to obtain a function and a divisor D such that = div D and SuppD S . 2. Note 2 O so we can compute the image of under and so obtain S an element of the lattice . The valuations of at in nity can be easily computed in the case of tame rami cation at in nity, i.e when e is coprime to the characteristic of k , via Puiseux expansions. For the non-tame case Hamburger-No ether expansions need to b e used. We exp ect to require just over S elements of the lattice until we obtain a lattice of full rank, hence we exp ect to need to take in total around T random power pro ducts in the smo othing algorithm b efore we are nished, where 1+o1g= N q N g T = = q : P r ;g We notice that 1=2 g g ; 2 log q log g and so we deduce that g g log T = log N log + log q +1+o1 log 1=2 1=2 g log g 2g log q 1 +1+o1 log g log N + 2 log q log g 2 p 1=2 : 2 log q + o1 log N +glog g 10 Hence the time needed to compute a full lattice of relations is p g O N L 1=2; 2 log q + o1 : e We store each computed lattice vector as a column in a matrix A. Hence, at the end of the algorithm, we hop e that wehave c =fAx: x2Z g where c is the column dimension of A. We need to then compute the Hermite Normal Form of A, to obtain a matrix H which spans the same lattice as A but which is in upp er triangular form. This can essentially b e done in time, [13],