Professional Documents
Culture Documents
Preface Xl
Chapter I. Introduction 1
1.1. Cryptography Based on Groups 2
1.2. W hat Types of Group are Used 6
1.3. W hat it Means in Practice 8
vii
viii CONTENTS
Bibliography 191
Much attention has recently been focused on the use of elliptic curves in public
key cryptography, first proposed in the work of Koblitz [62] and Miller [103].
The motivation for this is the fact that there is no known sub-exponential
algorithm to solve the discrete logarithm problem on a general elliptic curve.
In addition, as will be discussed in Chapter I, the standard protocols in cryp
tography which make use of the discrete logarithm problem in finite fields,
such as Diffie-Hellman key exchange, ElGamal encryption and digital signa
ture, Massey-Omura encryption and the Digital Signature Algorithm ( DSA) ,
all have analogues in the elliptic curve case.
Cryptosystems based on elliptic curves are an exciting technology because
for the same level of security as systems such as RSA [134], using the current
knowledge of algorithms in the two cases, they offer the benefits of smaller key
sizes and hence of smaller memory and processor requirements. This makes
them ideal for use in smart cards and other environments where resources
such as storage, time, or power are at a premium.
Some researchers have expressed concern that the basic problem on which
elliptic curve systems are based has not been looked at in as much detail
as, say, the factoring problem, on which systems such as RSA are based.
However, all such systems based on the perceived difficulty of a mathematical
problem live in fear of a dramatic breakthrough to some extent, and this issue
is not addressed further in this work.
This book discusses various issues surrounding the use of elliptic curves
in cryptography, including:
• The basic arithmetic operations, not only on the curves but also over
finite fields.
• Ways of efficiently implementing the basic operation of adding a point
to itself a large number of times ( point multiplication) .
• Known attacks on systems based on elliptic curves.
• A large section devoted to computing the number of rational points on
elliptic curves over finite fields.
• A discussion on the generalization of elliptic curve systems to hyperel
liptic systems.
The book is written for a wide audience ranging from the mathematician
who knows about elliptic curves ( or has been acquainted with them) and who
wants a quick survey of the main results pertaining to cryptography, to an
xi
xii PREFACE
Abbreviations
The
book: following abbreviations of standard phrases are used throughout the
AES
BSGS Advanced
baby step/ Encryption
giant step Standard
method
CM
CRT Complex
Chinese multiplication
Remainder Theorem
DES
DHP Data Encryptionproblem
Diffie-Hellman Standard
DLP
DSA Discrete
Digital logarithm
Signature problem
Algorithm
ECDLP
ECM Elliptic curve
Elliptic curve discrete
factoring logarithm
method problem
ECPP
GCD Elliptic
Greatest curve primality
commonmultiple proving
divisor method
LCM
MOY Least common
Menezes-Okamoto-Vanstone attack
NAF
NFS Non-adjacent
Number field form
sievebasis
ONB
RNS Optimal
Residue normal
number system encryption scheme
RSA Rivest-Shamir-Adleman
SDSEA Signed digit
Schoof-Elkies-Atkin algorithm
xiii
xiv ABBREVIATIONS AND STANDARD NOTATION
Standard notation
PGL2(K)
over R with determinant a unit in R
projective general linearidentified
group over the field K,
S L2 ( Z )
with
special scalar multiples
linear grouponeof 2 2 matrices over Z
x
with determinant
(�) Legendre symbol
Re(z), Im(z) real
1l
and
Poincare g(n) imaginary
half-plane parts of z E C, respectively
Im (z)lg(n)0 clf(n) for some
>
O(f (n)) function such that I
� I
constant c 0 and all sufficiently large n
>
o(f(n)) function g(n) such that lim n -+oo(g(n)/ f(n)) 0 =
logb x logarithm to base b of x; natural log if b omitted
ABBREVIATIONS AND STANDARD NOTATION xv
We
many introduce the three
booksofoncommunication main
the subject, itwhilstcharacters
is assumed in
that public key cryptography.
Alice and Bobwhowishwishes As
to perform in
some form
on (oristamper with) thethatcommunications Eve is an eavesdropper
between Aliceactually
and Bob.human. to
Of coursespy
there
mayModern no assumption
(and probably Alice
will) beascomputersand Bob (or Eve) are
onthesomecommercial
network such as the They
Internet.
cryptography, applied in
with a number of problems. The most important of these are: world, is concerned
1. byConfidentiality:
anyone else. A message sent from Alice to Bob cannot be read
2. Authenticity: Bob knows that only Alice could have sent the message
3.
heIntegrity:
has just received.
Bobtransit.
knows that the message from Alice has not been tam
pered with in
4. Non-repudiation: It is impossible for Alice to turn around later and
say she did not send the message.
To Alice
nario. see whywishes
all four
to properties
buy some itemareover
important
the considerfromtheBob.following
Internet She sce
sends
her instruction
details. She to Bobthatwhich
requires this contains her credit
communication be card numbersinceandshepayment
confidential, wants
otherneeds
Bob peopletotoknow knowthatneither
the her creditis authentic
message card detailsin northat what
it came shefrom
is buying.
Alice
and not ssome
message' impostor.
integrity is Both Alice
preserved, for and Bobtheneedamount
example to becannot
certainbethataltered the
byrepudiation
some thirdproperty,
party whilst
meaning it isthatin Alice
transit.shouldFinally
not Bob
be requires
able to say theshenon
did
not Insendotherthewords,
instruction.
we require transactions to take place between two mutu
ally distrusting
tional private parties oversucha aspublic
networks, those network.
used in This is different
banking, where from conven
there are key
hierarchies
It is and tamper
common in the proof hardware
literature to which canpublic
introduce storekeysymmetric
techniques keys.in the
area
ally of confidentiality
infeasible to use protection.
directly in this Public
context, keybeingtechniques
orders ofare,magnitude
however,slowerusu
than symmetric techniques. Their use in confidentiality is often limited to
1
2 I. INTRODUCTION
the transmission of symmetric cipher keys. On the other hand digital signa
tures, which give the user the authentication, integrity and non-repudiation
properties
key required in electronic commerce, seem to require the use of public
cryptography.
need A tocomputer
verify or which
create is thousands
processing ofpaymentsdigital for a bankevery
signatures or a business
second. may
This
has led toWhilst
efficient. the demandmany forschemes
publicarekeybased digitalonsignature
the schemes
discrete which problem
logarithm are very
inuse.a finite
One abelianis group,
choice the groupthereof ispoints
someondebate an as to curve
elliptic what over
type aoffinite
groupsfield.to
This choice is becoming
considerations. In this increasingly
book, we attempt popular,
to precisely the
summarize because
latestofknowledge
efficiency
available on both theoretical and practical issues related to elliptic curve
cryptosystems.
1.1. Cryptography Based on Groups
Insurveyed.
this section, some
A more detailed of the standard
discussion protocols of
of alltheofbooks public
these protocols key cryptography
andvanotherOorschot are
related
areas
and of cryptography
Vanstone [99] curves can
and Schneier be found in
[139], although by Menezes,
neither ofdiscussed
these booksherecovers
the use of elliptic in cryptography. The protocols only
berequire
cyclic.
anassume
theTheusegroup
ellipticthecurve.
of a finite
of
However,
abelianingroup
interest this G, ofisorder
work the #G, which is assumed to
additive group of points on
it is convenient for the remainder of this chapter to
isof aGprime. group
Ifgroup, is multiplicative, with generator g, and that the order, #G,
this is with
not theno case, wesecurity.
can alwaysThetakeadditive a primevs. order subgroup
issue as our loss of multiplicative
laterTheon,is, group
ofwhencourse,
Gthe just
should
one offocuses
discussion
be
notation.on theWe elliptic
presented in such
will revert
a way as curve
to
togroups.
make
additive notation
multiplication
and exponentiation
reason for this will easy, whilst
become clearer computing
below. It discretealsologarithms
should be possible is tohard. The
generate
random By elements
the from the group with an almost uniform distribution.
discrete logarithm problem (DLP) we mean the problem of deter
mining the least positive integer, if it exists, which satisfies the equation
x,
h = gx
forof alltwo,of given,
the elementsschemes
following h and gisinthatthe ifgroup
there G.is aNotefastthat
way atocommon
solve feature
the DLP
inG isG,ofthenprimetheyorderare allsuchinsecure
a discretefor thelogarithm
group G.always Sinceexists.
we have assumed that
1.1.1. Diffie-Hellman key exchange. Alice and Bob wish to agree on a
secret random element in the group, which could be of use as a key for a
1. 1 . CRYPTOGRAPHY BASED ON GROUPS 3
higherwish
They speedtosymmetric
make this algorithm
agreement likeovertheanData Encryption Standard (DES).
insecure channel, without having
exchanged
shared any information
amongst a group of previously.
users, are the Thegroup
onlyGpublic
and items,
an whichg EcanG beof
element
large known order.
1. Alice
Bob thegenerates
elementa random integer xA E { 1, . . . , #G 1}. She sends to
-
g XA.
2. Bob generates a random integer XB E {1, . . . , #G 1}. He sends to
-
The only information that Eve knows is G, g, g xA and g xs. If Eve can recover
g s from this data then Eve is said to have solved a Diffie-Hellman problem
x Ax
(DHP).
can solveIt is easy
theandDHP.to see that if
It is believedEve can find discrete
for most[94],groups logarithms in G then
incomplexity-theoretic
use in cryptographysenseshe
that
the DHP the DLP are equivalent in a
(there is a polynomial time reduction of one problem to the other, and vice
versa).
1.1.2.
Her ElGamal encryption [ 3 9]. Alice wishes to send a message to Bob.
message, m, is assumed to be encoded as an element in the group. Bob
has a public key consisting of g and h = gx, where x is the private key.
1. Alice generates a random integer k E {1, . . . , #G 1} and computes
-
a = g k, b = h km.
2. Alice sends the cipher text (a, b) to Bob.
3. Bob can recover the message from the equation
ba-x = h kmg-kx = g xk-xkm = m.
1.1.3.(Z/(#G)Z).
mE
ElGamal digital signature [ 3 9]. Here, Bob wants to sign a message
He can use the same public and private key pair, h and x,
as he used for the encryption scheme. We will need a bij ection f from G to
Z/(#G)Z.
1. Bob generates a random integer k E {1, . . . , #G 1 }, and computes
-
a = g k.
2. Bob computes a solution, b E Z/(#G)Z, to the congruence
m xf(a) +bk (mod #G).
4 I. INTRODUCTION
4.
3. Alice
Bob sends thethesignature,
verifies signature(a, b), and the message, m, to Alice.
by checking that the following equation
holds:
1 . 1 .4. Digital Signature Algorithm. A version of ElGamal signatures,
called the
nature Standard Digital Signature Algorithm (DSA), is the basis of the Digital Sig
[FIPS186] . An elliptic curve version of DSA (ECDSA) is
described
dure in
is almost the IEEE P1363 standard
identical toasthewellElGamal draft [P1363] . The signature proce
scheme above. It isdifferent
describedsignature
here for
the sake
verification of completeness,
procedure with as to introduce
some computational a slightly
advantages.
Bob wants to sign a message m E Z/(#G)Z. He uses the same public
biandj ective
privatemapping,
key pairf,hfrom
xand Gastobefore,
Z/(#G)Z.and both he and Alice use a common
1. Bob generates a random integer k E {1, . . . , #G - 1 }, and computes
a = g k.
2. He computes the solution, b, to the congruence
m -xf(a) +kb (mod #G).
3.4. Alice
He sendscomputes
the signature, (a, b), and the message, m, to Alice.
u = mb-1 (mod #G) , = f (a ) b-1 (mod #G).
v
1 . 1 . 5 . Massey-Omura encryption.
tois encoded
Bob. They do not need to have a Here Aliceor public
private wishes key.
to sendThea message
message
the ' y as anme-to-you'
ou-to-me, element method.
E G. This protocol is sometimes described as
m
It requires Alice and Bob to carry out a
conversation rather than just a single transmission of encrypted text.
1. Alice computes
the element a random integer, X A , coprime to #G, and sends Bob
2. Bob computes a random integer, xB, coprime to #G, and sends back
to Alice the element
3. Alice can compute x::;:1 (mod #G) and so sends back to Bob the element
4. Finally Bob computes xB1 (mod #G) and can decrypt the message as
tion can verify that the message came from Alice by verifying the equa
6 I. INTRODUCTION
1.1. 7. Problem
schemes is equivalent reductions. It is not proven that breaking any of the above
to solving the DLP, but this is believed to be the case.
That no proof forof this
cryptography: examplefact has
there been
is nofound
proof isthatsimilar
breakingto otherthe situations
RSA system in
([1Boneh
33] [134])
ofThere and isVenkatesan
equivalent[1to9]factoring
gives the modulus,
evidence that they although
may nottheberecent
equivalent.work
breaking arethea fewsystempubliciskeyat cryptographic
least as hard schemes
as solving forsome
whichhard one canmathematical
prove that
problem,are such
these not as factoringhere.a number or taking discrete logarithms. However,
discussed
that Webreaking
do notethethatDiffie-Hellman
for some classeskey ofexchange
finite abelian
protocol groups
is one can prove
polynomial time
equivalent
result uses toauxiliary
solvinggroups a DLP.which
Whatareis interesting
themselves about
usually thistaken
worktoisbethatelliptic
this
curves.
The The interestedinreader
requirement the should consult
signature schemes [9for4],a[9bi5],j ective
[18] and Sectionf, IX.from4.
function,
G to Z/(#G)Z
function to use may
is seem aFor
obvious. littleother
restrictive.
groups For
the the groups,thatIF; , ftheis bibijj ective
condition ective
can be weakened. What is really required is a function
f : G -----+ Z/MZ
forwhichsomeis almost
numberinjective. M, of theIn other
orderwordsof magnitude of the
its degreeareaspresented size
a map should of the group G,
be ' s(x,mall'.y),
over Forsomeelliptic curve systems
finitefields,field.IF Such the group elements
a pair represents a point on an elliptic curve. Over as pairs,
large prime
modulopoints ,P field elements are naturally represented as integers
p, and one usually just uses the x-coordinate of the curve as the map
from (group
toandbewillcloseclearly elements)
to #G,sufficeandforis thus to integers
used for For modulo
M above). p (the latter prime turns out
Thisfieldsis a ofdegree two map
two, oneinteger
performsis needed. applications.
a similarAmethod, but large
a wayused finite
of converting characteristic
theisx-coordinate
into an
representation of x relative tosimple
a given method,
basis of in practice, to take the
IF2n over IF2 , and interpret the
sameusing
are coefficients
the same as internal
the binaryrepresentation
digits of an integer.
and order Asconventions,
long as Aliceorandat least Bob
Bob knows how toshould
implementations convertbe from his internal representation into Alice's, their
interoperable.
1.2. What Types of Group are Used
All of thevarious
consider above protocols
other worktoforusea general
groups in such abelian group,However,
protocols. G, so onesincecould
the
protocolsbearesimple
should to betoimplemented
realize. One inwayhardware
of or software,thisthecondition,
interpreting group operation
but not
the only way, is to insist that the group operation be given by simple algebraic
1.2. WHAT TYPES OF GROUP ARE USED 7
formulae.
This then Inrestricts
other words quite G must be a thecommutative
considerably types of finitegroups
such algebraicwhichgroup.are
available.
A commutative finite algebraic group is essentially equivalent to the prod
uct
finite offields
a finiteandnumber
a finite of copiesofofabelian
number the additive
varieties. andFormultiplicative
all practical groups
purposes, of
the
that, latter
owing cantobea general
taken topurposebe Jacobians
algorithmof curves.
of It willandbeHellman,
Pohlig seen in Chapter
the group V
G should
tofinite
onlyfields have a largesingle
considering subgroup
copies ofofprime order.andThusmultiplicative
additive we can restrict ourselvesof
subgroups
The DLP orinJacobians.
some additive groups is clearly easy, e. g . the additive group
ofgroup
a finiteof anfield.ellipticFortunately,
curve. thissurprisingly,
Not is not the case, all ofasthefarabove
as is known,
protocols forwere the
originally
However, described
if one uses insuchterms of thethe finite
groups choice (multiplicative)
ofq needs to be abelian
very groupindeed,
large IF; .
because
(see [ 1 ] there[8are8]). known
and These sub-exponential
methods are methods
usually based foronsolving
the the behind
ideas DLP in theIF;
wellThis knownsituation
numberledfieldMillersieve[103]factoring
and method[62](seeto[7propose
Koblitz 7]). the technique,
common in number theory, of replacing a group such as IF; with the group,
E(IFq), of rational points on an elliptic curve, E, defined over IFq (these con
ceptselliptic
the will becurveprecisely
factoring definedmethod
later).andThisthe technique
elliptic curvewillprimality
be seen againproving in
method.
plest case Elliptic
of a curves areItJacobians
Jacobian. turns out ofthat
dimension
the one and DLP
(additive) so areintheelliptic
sim
curve
ing groupsinis,theat multiplicative
problem present, ordersgroup of magnitude
of a finite harder
field ofthan
a the correspond
similar size, a fact
thatIfisonemorewantsprecisely to avoid quantified
algebraic in groups
the nextthensection. only one other type of group
is knownof which
orders number is fields.
secure and These almost
were practical.
originally These
proposed are bythe Buchmann
class groupsandof
Williams
used in [23]situation
this for classdiffergroupsslightly
of imaginary
from those quadratic
described orders. Thebutprotocols
earlier, the es
sential features
ofThesethe forms groupremain
class can can thebe same. In imaginary
represented by reducedquadratic
binary orders the elements
quadratic forms.
algorithms which bedatemultiplied
back to using
Gauss the(seestandard
[ 2 9] andcomposition
[ 5 0]). We and
shallreduction
see in a
later chapter curve
hyperelliptic that theis closely
arithmetic on anto elliptic
related this curve and inof thebinaryJacobian
composition quadratic of a
forms.Such schemes based on class groups are particularly interesting, as break
ing some of the proposed cryptosystems is provably as hard as factoring the
8 I. INTRODUCTION
discriminant
owing to the ofcomplexity
the order.ofHowever,
the group theoperations.
protocols areFor atotherpresent
work veryon class
slow
groupTherebasedaresystems, see [10],based
cryptosystems [20], on[22]elliptic
and [5curves
2]. which are provably as
hardelliptic
onthe as known curves mathematical
over Z/nZ, problems.
where For example there are systems based
n is the product of two primes, for which
work ability
of to break
Meyer and the system
Muller [101]). is asHowever,
hard asJoye factoring
and the modulus[57]n (see
Quisquater the
pointed
out
and that
Williamsthe system(see of Meyer
[129] and [and
1 Muller
63]). Hence,is reducible
since the toMeyer-Muller
the system ofsystem Rabin
is probably
former system slower than the Rabin-Williams system, we shall not discuss the
further.
Theresense
inKoyama
some are other
elliptic systems
curve based on elliptic
analogues of the curvesscheme
RSA over Z/nZ,
(see forwhich
exampleare
they appearet al.to[6offer
8]). noHowever,
advantage theseoverare RSA
not provably
in terms asofhard as factoring
security but do and
give
a decrease further
discussed in performance
in this when The
book. compared
reader withis referred
RSA. These schemes
instead to are[5not8],
[17],
[70], [90], [121] and [159].
1.3. What it Means in Practice
Inof athissuitably
sectionchosenwe discuss
ellipticthecurvepractical
over a implications
finite field toofimplement
using the agroup
DLF-basedE(IFq)
cryptosystem,
tive group as opposed to the more 'conventional' choice of the multiplica
IF; of a finite field. Notice that, in the comparison, IFq and IFP need
not be the same
a senseDLPtoonbeEmade field. The key observation is that, for a well-chosen
clear later in the book), the best known method for solving curve (in
the
field elements, (IFq) is of complexity exponential in the size n = f1og2 l of the
while algorithms that are sub-exponential in N = f1og2 pl are q
available
More for the
specifically,DLP in
the IF;.
best known general algorithms for the elliptic curve
DLP are of complexity proportional to 2
CEc (n) = 2 n/
(seeDefine
ChaptertheV).function
Lp(v, c) = exp (c(logp) v (loglogp) (l- v ) ) ,
where ' l og' without base specification denotes real
v = 1, the function LP is exponential in logp, while for v = 0 it is polynomial
natural logarithms. When
inexponential,
log p. Whenand0 is referred
< <v 1, the behaviour is strictly between polynomial and
to as sub-exponential.
Discrete logarithms in IFP can be found in time proportional to Lp(l/3, c0 ),
where c0 = (64/9)113 1. 92, using a general number field sieve method ([9 9,
�
1.3. WHAT IT MEANS IN PRACTICE 9
Elliptic Curve
400
300
200
100
Conventional
0
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
where
known the subscriptfor integerstands
algorithms CONY for ' conventional'. Notice that the best
factorization are of roughly the same asymptotic
complexity
what follows (seeapply[99] also
and to[77]).conventional
Therefore,public
the discussion
key and comparisons
cryptosystems based in
on
factorization,
Equating e.g., RSA.
CEc and CcoNv (and, again, neglecting constant factors in the
complexities), it follows that for similar levels of security, we must have
n (JN 1 l3 (log(Nlog2)) 2/3
=
terpreted as the
fore, with current ' key sizes',
algorithmic in bits, for
knowledge, the respective cryptosystems.
thecubekeyrootsizeofinthean correspondingThere
elliptic curve
cryptosystem
'conventional' grows slightly
keyis size, faster
for similar than the
cryptographic strength.
The
ventional' relation plotted
keywithsizestheofdotted in
1024 and Figure 1.1, where
4096Thebitsequivalent the correspondence
(commonkeyvalues for ' c on
forshownRSA)forhasan ellip
been
emphasized
ticapproximations
curve cryptosystem lines.
are used,
173 andand313various
bits, constants sizes
respectively.neglected,
Given that various
are, of course, have been
approximate andthegivecomplexity
only general such
trends. A fairthecomparison figures
should also take into account of implementing
tem. While the implementation of group exponentiation is of about the same cryptosys
10 I. INTRODUCTION
complexity
operations in both cases,areinmore
themselves termscomplex
of elementary
in the group
ellipticoperations,
curve theforgroup
case, the
same
the fieldhelps
plot size explain
( by a small constant factor - see Chapter IV) . Nevertheless,
the recent interest in elliptic curve cryptography as a
less lengths
key expensivecanalternative
translate tofaster
to the conventional systems.less power
implementations, In practice, shorter
consumption,
less silicon area, etc.
CHAPTER II
Finite Field Arithmetic
When implementing
how toin implement an elliptic
the underlying curve system an important
field arithmetic. consideration
The problems encoun is
tered
being such
focused implementations
onhardware
questionsissues are addressed
whicharearise mostlyin this chapter,
in software with attention
implementations,
although some
ticular importance arerestrict briefly
whetherimplementation mentioned. Two questions
to use even ortooddfieldscharacteristic of
fields par
andfor
secondly, whether to
efficiency, or support any type of finite field. of a special type,
11.1. Fields of Odd Characteristic
In thisbe section,
will implementation
considered. Field of arithmetic
elements will be in IFP , where
naturally p is a 'large'
represented as prime,
integers
intechniques
the rangefor0,handling
1, . . . , p-1,multi-precision
with the usualintegers
arithmetic
are notmodulo p. General
discussed, as they
are treated forveryperforming
techniques effectivelyfastelsewhere,
modular e.arithmetic.
g. [6 1]. However, we will focus on
namelyWe need to implement
addition, subtraction, themultiplication
four standardandarithmetic
division. operations
It is, however, in the
IFp,
are w
corresponding
= base. For example, typical values in present-day computers
32 and = 64. The integer b will be the base used in expressing
w
multi-precision
integers make integers.
use of However,
different bases.some
Two implementations
common for multi-precision
alternatives are:
A power of ten. These are very inefficient since powers of ten are not the
natural arithmetic
ofThis,ten however,
is usuallyischosenfor performing calculations
to make input practice within
and outputas very a computer.
of thelittle
largetime
integers A power
easier.
program poor
will be in thewhere programming
inputaandbaseoutput phase. spent by a
Mostofoftwothewilltimebewillmuchbe
spent in calculations,
moreA efficient. which is a power
base of half the word size. If we choose a base of b = 216, or
b = 2 32 , where b2 is now the base corresponding to the full word size, then
some advantages accrue. The basic multiplication step
the base b representation of the multi-precision integer can be performed veryof the coefficients in
11
12 II. FINITE FIELD ARITHMETIC
easily
b
in a will
integers language
still likein a word,
fit C. This iswith because
no the result
code to cope of with
multiplying
the twobeing
carry base
needed.
simple But now,such
operation twiceasasaddition,
many iterations
and the need to beiscarried
situation worse out operations
for for even a
where the algorithms used in practice are of non-linear complexity, such as
multiplication.
The problem
function, leadingintoa thesmalluseamount
implemented of half-words
of can becode,alleviated
machine which by having a
implements
the operation
would return theof upper,
multiplyingandtwolower,full l,word
u,
size inintegers. Such a function
portions
ub + l = W1 X W2 ,
INPUT : An integer x.
OUTPUT : r = x ( mod
p) .
1. q0 +-- lx/b J , r0 +-- x - q0 bt , r +-- r0 , i +-- 0 .
t
2. While qi > 0 do :
3. qi+l +-- lqi a/bt j, T'i+i +-- qi a - qi+l bt ,
4. i +-- i + 1, r +-- r + ri .
�
5 . While r p do r +-- r - p .
6 . Return r .
Firsteasynoteto compute
iswords. that the quotient
by on thedivision
shifting of an n-word
numerator to the numbera fixed
right by a number
power ofofb
aduction Also note
subtraction of a that subtraction
number shifted ofthea multiple
to left a of anumber
given power ofofbwords.
is nothing
The butre
and a procedure is therefore
multiplication by performed using only shift and add operations
a. It therefore removes the need for any divisions to
occur.
Il. 1 . FIELDS OF ODD CHARACTERISTIC 13
Modular generally
iscurvetherefore inversion slow is oftencompared
performedto ausing the Euclidean
multiply. Fortunately, algorithm
for and
elliptic
remove cryptosystems,
the need for one canall field
almost implement the underlying
inversions. We will curve arithmetic
elaborate on this to
issue
inlowChapter
weight, IV.by which
Furtherweimprovements
mean that the canbinary
be obtained if a is chosen
representation of to have
a has only a
few non-zeroinbits.
arithmetic, ThisII.case
Section 2 .1. isSimilar
discussed, in the contextapplyof tobinary
considerations polynomial
integers.
Anothertables
computed method, for akin to usingthe moduli
performing modular ofreduction.
a special Although
form, is totheuseprime pre
ofmodulus
and the need not
system.
for using The have
all. Thethe disadvantage
special form,ofitthewilltables
precomputation probably
fromtoausecryptographiccan be selected
then be
viewpoint
at startup
performed
is same once
that every
person
field. This system
raises problems will have curves
of interoperability. defined over
Forthenexample the finite
if onewillbankneedis
signing a document
tonotuseyetthegenerally
same field. for passing
This although to another
implies astandards bank
level of agreement both banks
and being
standardization
address these issues. available, are currently drafted to
In
security addition,
reasons. using fixed
If everyone moduli of special
is forcedBreaking form
to use such may
the same not be preferred
field itperhaps
becomesusingan for
attractive target
specialmoreproperties for cryptanalysts.
ofconsequences
the particularthanfieldotherwise.
which might a system,
be discovered, then hasan
even
attractive serious
target for prudent
cryptanalysts one shouldpractice Although
not overestimate this may give
theirchanging
capabil
ities.
the Nevertheless,
system parameters on somecryptographic
regular basis to would
discourage suggest
the attack of any
particular parameter set.
11.1.2. Residue number system arithmetic. Residue number system
( RNS ) arithmetic is a very old idea which relies on the Chinese Remain
der Theorem ( CRT ) . Suppose we wish to work with a modulus p. A set of
auxiliary primes, Pi (of word size) , are chosen such that
x( mod Pi ) ·
xi
we65519,Aswishanp to=example
work withconsider
16-bit p = 10727311963 and x = 1213212, and assume
words. We take the primes p 1 = 65521, p2 =
3 65497, p4 = 65479, and p5 = 65449. We then represent x in this
residue number system as
x (33834, 33870, 34266, 34590, 35130).
We can then compute x + x and x2 using simple word length arithmetic
operations and find that
x + x (2147, 2221, 3035, 3701, 4811),
and x2 (22165, 4729, 59534, 35812, 10556).
However, we still need to perform the reduction operation for both addition
itand is multiplication.
hard
Nevertheless, to compare
much
Thisthe issizeparticularly
recent work of elements
has been
difficult
and
done to
in
using
perform
this
RNSinteger
area in
arithmetic
the
as
division.
context of
ina(seesub-procedure
the[126]
context of forefficient
and [127]).
the number
hardware fieldimplementations
sieve (NFS) algorithm
for (see [3systems
RSA-based 2]) and
11.1.3.
multi-precision Barrett reduction. When using Barrett reduction, the standard
methodsisareperformed used for ininteger arithmetic operations. However,we
the
arex (modmodular reduction
givenp)a. positive integer a rather efficient way. We
x which is of size at most p2 . We wish to compute
assume
As a precomputation we compute
2
µ = lb t /pj
where bt p bt- l and b once again is the base size of the computer. We
> >
give the algorithm
to consult that bookforforcomputing x (mod p) from [ 9 9] and leave the reader
a justification.
ALG ORITHM 11.2: Barrett Reduction.
INPUT : x, p andµ such that x < b2t , bt- l < p < bt andµ = lb2t /pj .
OUTPUT : = x (mod p) .
z
1. k 1 .
qo +-- lx/b - J
2 q +-- l (µqo ) /bk + l J.
bk + l ) , r2 +-- qp .
·
3. (mod
r 1 +-- x
4 . z +-- T' 1 - T' 2
5 . If z < then z +-- z + bk + l .
•
0�
6 . While z p do z +-- z - p .
7 . Return z.
However, on aneed
multiplication secondnotglance we see that
be computed the least significant words of this
( see [ 9 9, Ch. 14] for more details ) .
11.1. 4 . Montgomery
plement arithmetic arithmetic. By far the most successful way to im
modulo a large prime p is to use a representation due to
Montgomery [105]. Again assume b is the word base. Define t and R by
R = bt > p.
Every
to-one andelement
relationshipx E IFP is represented by x R ( mod p) . There is clearly a one
between thisMontgomery
latter representation and thecanusual one. Ad
dition
in the follow subtraction
usual way; however,in this representation be performed
multiplication is much faster. Our treatment will
again that
Beforereduction
Montgomeryin the Handbook of Applied Cryptography [ 9 9, Ch. 14].
multiplication is aexplained, thewhichprocess ofas Mont
gomery is considered. This
an integer y with 0 y < pR and returns yR- 1 (mod p) .
�
is procedure takes input
LEMMA 11 .1 . In such a situation, if we set u -yp - 1 ( mod R) and x
=
(y + up)/R then x is an integer such that x < 2p and x yR - 1 ( modp) .
PROOF. Clearly the last modular equality holds since
= x (y + up)R - 1 yR - 1 (mod p) .
Toexecution
verify oftheStepcorrectness
3 we have of Algorithm 11. 5 , note that at the end of every
xy 1 ( mod 2i)
( with the initial condition corresponding to i = 1). The method is very
efficient,
holds in as only
our case. single
This precision
method arithmetic
of computing is xused, assuming 2w b which
�
- 1 ( mod 2w) is due to Dusse
and Kaliski [38].
Il. 1 . FIELDS OF ODD CHARACTERISTIC 17
Supposei.etwo. Xelements
sentation, =
x, y E IFP are given in their Montgomery repre
xR ( mod p) and Y = yR ( mod p) . To compute
xyR ( mod p) , first compute the standard multi-precision multiplication
ofZByXapplying
=
and Y toMontgomery = xyR2 which is a number of size at most p2 < pR .
obtain Z' reduction to the number Z' wewe need
obtainonlyZ. perform
Thus to
multiply two elements in Montgomery representation
Noa single multi-precision
divisions
Theandoperation are needed. multiplication followed by a Montgomery reduction.
cansteps.be made morethatefficient by 'interleaving' the multiplica
tion
i.Ze. (xXYR reduction Assume X and Y are given in the form above,
t_ 1 , . . 1. , x0 ) b and ( Yt- 1 , . . . , y0 ) b . To compute the Montgomery product
= - (modp) , perform the following:
6 . Return Z .
�
5 . If Z p then Z+-- Z p . -
Notice
and thatcomputation
the the computation of of u in Step can be performed in single precision
3
Z in Step 4 requires two multiplications of a multi
precision
right integer by a word, then two multi-precision additions followed by a
shift.
DivisionEuclidean
extended in Montgomeryalgorithmrepresentation can be performed using the binary
( see, e. g ., [ 6 1], [ 2 9]). For example, given X =
xR ( mod p) , we can compute, using the standard binary extended Euclidean
algorithm, the number Y x - 1 R- 1 ( mod p) . Then to compute x - 1 R ( mod p)
=
we need only perform a Montgomery multiplication of Y and R3 ( mod p) .
Kaliski noticed
begomery
modified to compute[58] that
the the binary extended
Montgomery inverse. Euclideandefinesalgorithm
Kaliski the can
Mont
inverse of a number x to be the integer x - 1 R ( mod p) , which is not
quite what we want, but it is useful in some contexts.
11.1.5. Solving quadratic equations in fields of odd characteristic.
Solving quadratic equations isobtain
an important operation inof thea point
contextgivenof elliptic
curves, where
coordinate. it is
In fields used to
of characteristic the y-coordinate
different fromto two, this its
is done through x
the usual school formula, so the problem reduces that
roots. The problem for the case of a prime finite field IF , p 2, is considered.of
>
extracting square
P
18 II. FINITE FIELD ARITHMETIC
9. Return x.
Angroupanalogue of
of even order. the above method can be used to take square roots in any
11.2. Fields of Characteristic Two
Finite
'tions fields
carry-free' of characteristic
arithmetic, 2 are attractive to implementers due to their
andcan thebe adapted
availabilityandofoptimized
different equivalent representa
of
environment the field, which for the computational
at inhand.this section we discuss arithmetic over the finite field IF n ,
Specifically,
n � 1. Field elements are represented as binary vectors of dimension n,
2
relative
Field to a given basis
additionwhileandthesubtraction ( a0 , a1 , . . . , an_1
are implemented) of IF2n as a linear space over IF2 .
as component-wise exclusive
OR (XOR),
on the basisin chosen. implementations
Commonsections. of multiplication
practicalPolynomial,
choices andnormal and inversion
their implementations dependare
discussed the following
plus some variants on these, are considered. and subfield bases,
11.2.1.
(1, a, a
Polynomial bases. A polynomial (or standard) basis is of the form
2,. . . , an
-1
) where is a root of an irreducible polynomial f( ) of
, a x
degree n over IF2 . The field is then realized as IF2 [ ] / (! ( )) , and the arithmetic
is thatModular
of polynomials x
of degree at most n - 1, modulo f ( ) x
x .
reduction. By choosing f ( ) as a low weight polynomial, i. e .
x
one
fW( is)with
x becomes the least
a very possible
simple number
operation ofthat
non-zero
is coefficients,
performed in reduction
time modulo
0 (W n) , where
assumed the weight
that f off. It turns out that for cases of practical interest, it can be
( ) is either a trinomial or a pentanomial (i. e . , W = or 5).
x 3
The existence, distribution and other properties of irreducible trinomials over
IF2 have been extensively studied in the literature. In particular, it follows
from a theorem of Swan [156] that irreducible trinomialsordo5 (mod
n 0 (mod 8), and that they are rather scarce when n 3
not exist
8) - for
see
also
studies [9 , forCh.values
6], [47],of n[86,intoCh.the ],thousands
3 and the many ([ 1 4] references
[ 1 44]) showtherein.
that Empirical
irreducible
trinomials
the table exist[144]forshows
in over halfthat,of attheleast
valuesupoftondegree
covered.n=lOOn 000the, other
in all hand,
cases
Inwhere
odd fact, anthere
irreducible
is no trinomial
known value is not
of available, an irreducible pentanomial is.
n for which an irreducible polynomial of
openTheweight � 5odddoesweight
anyWfixedalgorithm
forfollowing not exist.
W > 3.
The general question, however, remains
exemplifies reduction of a polynomial of degree
2n-2, such as is obtained from the product of two polynomials of degree n-1,
modulo a trinomial f ( ) The extension to pentanomials is straightforward.
x .
20 II. FINITE FIELD ARITHMETIC
3. · · ·
The
storageabove algorithm
foradapted
the result operates on a(x) ' in place', obviating the need for extra
r(x) . Also, in a software environment, the algorithm
isthe easily to operate on computer words.
word size, then the algorithm scans the words containing the coefficients If n-t � w, where w is
a2n _ 2 , a2n _ 1 , . . . , am from higher order to lower order, adding each word into
two positions offset n-t and n bits back, respectively. The condition on
n-t guarantees that a word does not add to any part of itself, and is thus
processed onlysinceonce.
operations, it might Eachnotoffbesetword-aligned.
location requiresThe uptotalto number
two wordof XOR word
XOR
reductionoperations in the trinomial case is therefore at most 4 fn/w l In general,
·
XORmodulo
wordAnother an irreducible of weight W requires at most 2(W -1) In/w l
operations.
favoured choice of irreducible polynomial is one of the form
f(x) = x n + g (x) where the degree of g (x) is ' s mall' relative to n. This
istionanalogous to athesmallchoicevalueof primes t
of the form = b - a for IFP in Sec
p
II.1.1,
reduction for of a. This case also leads to a fast modular
weightprocedure,
low Multiplication. although slightly less efficient than the one based on
irreducibles.When usingof polynomial bases, the first stage in comput
ing the
oftiondegree product
at n-bit of two
most integers, elements
n-1 in IF2and[x] . most IF2n is the multiplication of two polynomials
This methods
is a 'carry-free' version of themultiplication
multiplica
have of two
analogues in IF2 [x] .dueIn particular, for large
a fastis described integer
asymptoticinmethod of complex
iCh.ty O(nlognloglogn),
4
to Schonhage,
] ) . However, in practical implementations of elliptic curve cryptogra
[140] (see also [61 ,
phy, moderate
appropriately values
packed of
into n in
computer the low hundreds are
wordsand(typically, typical. When data
of 32oforthe fastbits),asymp
64 this is
translates
totic methods into a small number
is seldom justified. of words,
Instead, the overhead
simpler methods arecompact
often used,
which
efficient are asymptotically
implementations inferior but
for3 ) therecursive lend themselves
range subdivision
of values of method to very
interest. first
In particular, and
thefor
old and well tried O(n1 0g
integers by Karatsuba [59]2 is often appropriate. described
11.2. FIELDS OF CHARACTERISTIC TWO 21
IF2 [x]Assume
have degree n is even. n-1,Towecompute write the product a(x)b(x) , where a(x) , b(x) E
a(x)b(x) = (A 1 (x)X + A0 (x)) (B1 (x)X + B0 (x)) , (II. 1 )
where A0 , A 1 , B0 , B 1 are polynomials of degree n/2-1, and X = xn/2 . The
right-hand
polynomials sidein Xof, Equation
with (II. 1 ) canin IFbe[x]regarded
coefficients . This as the product
product can be of two linear
derived from
the threen/2-1; products 2
A0 B0 , A 1 B1 and (Ao + A 1 ) (B0 + B 1 ) of polynomials of
degree
size n/2. i. e ., one problem of size n is solved
Similarly, when n is odd, a problem of size n can be reduced to one ofby solving three problems of
size
leads ( n - 1) /2 and two of size ( n + 1) /2. In either case, proceeding recursively
to an overall number of operations O(n1 0g 3 ) (detailed analysis can be
found in [61 , Ch. 4] ) . In practice, the procedure is implemented on words,
2
and the multiplication
recursion, is optimized offortwotheword-sized
machine polynomials,
at hand. If ntaken
is as thethebasisrecursion
fixed, of the
can be ' unrolled',
algorithm. Also, it andis sometimes
the computation advantageous can betoexpressed
depart fromas aa straight-line
pure binary
subdivision
takes seven recursion.
word For example,usingmultiplying
multiplications a pure two three-word
Karatsuba procedure, polynomials
but canfor
bemultiplication
done in six ofwordbinary multiplications
quadratic using
polynomials a direct straight-line
-e.ing.,fact,[164]six, [76])algorithm
is the. minimum
number
Assquaringof multiplications
a final isremark for this
on multiplication problem (see,
inmultiplication
polynomial representation, recalla
that
polynomial, we much
just ' t easier
hin it than
out', general
inserting a zero between in IF [x]
every . To square
2 two original
binary
comparable coefficients. Thus, the complexity of the
to that of the modular reduction, assuming a low weight modulus squaring operation is O(n),
is used.
Inversion. The extended Euclidean algorithm is a natural choice for com
puting inverses
asymptoticforalgorithms in polynomial
aregreatest representations.
availablecommon for thisdivisors As
computation.with multiplication,
An O(M(n) fast
logn)
algorithm
M(n) denotes computing
the complexity of compute
multiplyingmodular is described
n-bit polynomials. in [5] , where
The algo
rithm
with can
the be
results easily
of adapted to
[140] , yields an overall complexity O(nlog2 nloglogn).
inverses and, combined
But
values again, asymptotically
ofTherefore,
n, usuallypractical fast methods
beyond implementations
those used in practicalstart being eff e ctive
ellipticvalues at fairly
curve cryptosys large
tems.
rely for moderate of n often
(see,Inone.any
gvariants
., [9,case,Ch.IFof2],theinversion
binary extended Euclidean algorithm for polynomials
[61 , Ch. 4] ) .
is often significantly slowerreplaced
than multiplication.
Inmultiplications.
fact, an inversion 2n can sometimes be favourably by a chain of
Such schemes derive from the field equation, which can be
22 II. FINITE FIELD ARITHMETIC
recast as
13 - 1 = 132n - 2 = (132n - l 1 r'
_
formultiplications
all /3 -=/=- 0 inin IFthis2n . computation
A technique (i.fore . , minimizing
not counting the number of
squarings, which are general
much cheaper)
on the identities is described by ltoh and Tsujii in [54] . The method is based
n
l 2 n -2 1 1 2 n -2 1 1
- -
( 2 n--2-1 1 ) 2 2l 2 n--2-l 1
n _ 13 ( - ) ( _ _ + ) = 13 - 13 - n odd,
132 - l 1 =
13132n - l _ 2 = 13 (132n - 2 _ 1 ) '
2
n even.
Denotingh =by2µ(n-
where 1) the number of multiplications required to compute 13h
n - l - 1 , we have µ(n- 1) = 1 + µ((n-1)/2) when n is odd,
and µ(n- 1) = 1 + µ(n-2) = 2 + µ((n-2)/2) when n is even. Now, setting
µ(1) = 0, µ(2) = 1 as the basis for the recursion, it is straightforward to prove
that µ(n - 1) = llog2 (n- l) J + W(n- 1) - 1 , where W(k ) denotes the weight
(numberthe ofnumber non-zeroof squarings
bits in theisbinary representation) of aapositive integer k.
Also,
towebehaven-µ(162) readily determined,
1 . As an example, consider n = 163. Then, since 162 = (10100010) 2 ,
using simple recursion,
= 7 + 3 - 1 = 9, i. e . an inverse in IF2 153 can be computed with
9 multiplications
Clearly, the and 162scheme
inversion squarings.just described is advantageous when squar
ing
bases is areverydiscussed
inexpensive, in the asnextin thesubsection.
case when) Thenormal scheme basesmightare still
used.be (These
appro
priate fordetails.
tation polynomial
An bases, butwaythistois trade
alternative more dependent
inversions onfor specific implemenin
multiplications
the contextsoofsignificantly,
squarings elliptic curveis tocomputations,
use without increasing the number of
projective coordinates for the elliptic curve
points.
such With thisis approach,
operation required fieldtheinversions
at end of a arelongdeferred,
sequence andof usually only one
multiplications.
We Anwillanalogue
get backoftoMontgomery
projective coordinates multiplication in Chapter
for fieldsIV.of characteristic two
isreduction
describedis innot[6a7]computational
. We shall notbottleneck consider thisin characteristic
technique here,twoaswhen modular
low
weight irreducible polynomials are used.
11.2.2. Normal bases. A normal basis of IF2n over IF2 has the form
(a, a2 , a2 2 , . . . , a2n - l ) for some a E IF2n . It is well known (see, e. g ., [86,
Ch.
innormal2]) that such bases exist for all n � 1. Normal bases are useful mostly
hardware implementations. First, the fieldto justsquaring operation isthetrivial in
vector basis representation, as it amounts a cyclic shift of binary
therepresenting
forMassey design of the inputbit-serial
efficient
and Omura in [115] .
operand.multipliers,
More importantly,
such as the normal
one bases allowby
described
11.2. FIELDS OF CHARACTERISTIC TWO 23
i =O j= l
where the bij ection { 1 , 2, . . . , n} --+ {0 , 1 , . . . , n- 1 } is defined so that
7f :
described(ii)byalbeit
isCondition Blake slightly
above, and over et al. more
in [ involved
1 6].
let IFbe ofa pththeroot
I
Write transformation for Type II ONBs
p = 2n + 1 , where n satisfies
ofa(unity. Let2=]� adenote
<I> the vector
space of all polynomials
for j = 1 , 2, .representation
ap-aj palindromic 2 form x)
. . , n. We call the elements of palindromic polynomials.
<I>
= 1 j x i , where aj =
i =O i =O i =O
(II.4)
where all
permutation, indices are
thea(relements taken modulo p. Equation (II. 4) implies that, up to
a 1 , a2 , . . . , an are the coefficients of the ONB rep
resentation
efficients of ) . It follows from this simple relationship between the co
of a(x)representation
and the ONBcanrepresentation ofpolynomial
a( r) that arithmetic opera
tions
P
in ONB be realized
x - 1 . In particular, inverses in ONB representation can be computed using
as operations modulo
the Euclidean algorithm.
As an example of the transformation for Type II ONBs, consider the case
n = 5. It is readily verified that this case satisfies Condition (ii), with 2 being
primitive modulo p = 1 1 . We have (2°, 2 1 , 22 , 23 , 24 ) ( 1 , 2, 4, -3, 5) (mod 1 1 ) .
11.2. FIELDS OF CHARACTERISTIC TWO 25
f3s- 1
/3 - 1 = Ts, (II.5)
where s = (2 n - l)/(2 n1 - l ) . The key observation is that {38 is in the subfield
IF2n1 (being the norm [86, Ch. 3] of f3 over IF2n1 ). Hence, to compute 13 - 1 , we
obtain first 1
13 s- with an optimized addition chain (discussed in Chapter IV),
andfinally
then {38obtained
isresulting with anwith additional
an multiplication.
inverse in The quotient in Equation (II.5)
IF2n 1 and a scalar multiplication by the
Besides subfield
their element. Ainscheme
advantages along these
implementing linesfieldisarithmetic,
finite analysed insubfields
[49] .
can
whose helpcoefficients
in two otherarecentral
in problems
subfields allow inforelliptic
easiercurve cryptosystems:
determination of the curves
group
order
tant (as discussed
point in Section
multiplication VI.4), (asanddiscussed
operation they offerin'sSection
hortcuts'IV.for3).theUnfortu
impor
nately, behind the same nice algebraic structure that leads to these advantages
26 II. FINITE FIELD ARITHMETIC
bycouldsomealsoresearchers.
lurk as yet undiscovered cryptographic weaknesses, as suspected
11.2.4.
xas2 +x f3 Solving
=
quadratic equations in IF2n . An equation of the form
0 is trivially solved in IF2n by writing its (double) root x0 explicitly
0= f3 2n- i. Other non-trivial quadratic equations can always be brought
to the canonical form
x2 + x + f3 0. = (II.6)
This
solution, equation
then hasissolutions
so x 0 + 1. in IF2n if and only if Trq12 (f3) 0. If x0 is such a
=
There is
many branches an extensive
of from literature
mathematics on elliptic
andderive curves.
are closely They
linked with arise naturally
therecent in
theorypastof
elliptic
they functions,
have,s Lastfor Theorem,
instance, beenwhich they
studied their
for theoretical name. In the
usesoninstudying
the solution to
Fermat'
curves [162]. One notices immediately elliptic
arisesJustisthatasappropriate
they are not at
thetan,arcalengths
ellipses,
this point.
onstudy
and hence a brief account of how the name
a circleforgiveellipses
rise toleads the trigonometric functions,
sin, cos and similar
integrals. These are integrals of the form
one to consider elliptic
f dx
·
J4x3 - g2 x - g3
Such
defined integrals are
modulointegral multi-valued
a periodto belattice. on the complex
One canThehence numbers
consider and are
the ofvalues only well
taken
byintegral
an elliptic
is a doubly periodic on a
function torus. called ' i nverse'
ancomplex function an
elliptic function. Indeed all
elliptic
meromorphic doubly periodic functions on the
way.It turns out that every doubly periodic function SJ with periods that are numbers arise in this
independent over satisfies an equation of the form
JR
(111.1)
forreferred
sometoconstants g 2 and g 3 . For future reference, such a function
( ' )
SJ will be
in asspace,
afrompointa torus a Weierstrass
then the SJ function. If we consider the pair SJ, SJ as being
solutions
( as SJ is doubly periodic) to the curve
to Equation (111.1) provide a mapping
Y2 4X3 - g2X - g3 .
=
This is
traditional an example of
in analyticwe circlesan elliptic curve ( the 4 in front of the X 3 term is
- theit canbasicclearly be scaled away ).
curves In this chapter
that are isrequired present concepts from the theory of elliptic
The treatment far fromforcomprehensive,
developing theofmaterial course. 1inThethe reader
rest ofisthereferred
book.
1 '1t is possible to write endlessly on elliptic curves. ' S. Lang, in the foreword to [72] .
29
30 III. ARITHMETIC ON AN ELLIPTIC CURVE
to [147] here.
missing and [148] for a more comprehensive treatment, including most proofs
111 . 1 . General Elliptic Curves
Let K be
ellipticIP'2curve a field, K its algebraic closure, and K * its multiplicative group. An
plane (K) ofovera homogeneous
K will be defined as the set of solutions in the projective
Weierstrass equation of the form
E : Y2Z + a1 XYZ + a3 YZ2 = X3 + a2X2 Z + a4XZ2 + a6 Z3 , (111.2)
with a 1 , a 2 , a 3 , a 4 , a 6 E K. This equation is also referred to as the long Weier
strass form. Such a curve should be non-singular in the sense that, if the
equation
oftaneously is written
the curveat equation in the
8F/8X,form F(X, Y, Z) = 0, then the partial derivatives
8F/8Y, and 8F/8Z should not vanish simul
any point on the curve.
Let k be a field satisfying K k K. A point (X, Y, Z) on the
� �
curve
3K \ { is(0,K-rational if (X, Y, Z) = (X Y, Z) for some E K, (X, Y, Z) E
a , a
0, O) } , i. e ., up to projective equivalence, the coordinates of the point
are
the in k.of The
field set ofofK-rational
definition the curve, points
K, is on Efrom
clear is denoted
the by E(K).
context, we When
will refer
torational
K-rationalpoint pointscoordinate
with simply asZrational
equal points. The curve has exactly one
to zero, namely (0, 1, 0) . This is the
point at infinity, which will be denoted by 0.
strassForequation,
convenience, givenwebywill most often use the affine version of the Weier
E : Y2 + aiXY + a3Y = X3 + a2X2 + a4X + a5 , (111.3)
where a i E K. The K-rational points in the affine case are the solutions
in Kbe2 , thought
topointE can and the ofpoint at infinity 0. Forup curves over Wethe will
reals,switch
this
freely betweeninthebothprojective as lying infinitely
andE. affine far
presentations the y-axis.
of the curve, denoting
the equation
satisfying Equation cases by For Z =J. 0, a projective point (X, Y, Z)
(111.2) corresponds to the affine point (X/Z, Y/Z) satis
fying Equation
representation (111.3) . In Chapter IV, we will consider a different projective
which curve is convenient from a computational point of view.
Given an elliptic defined
the following constants for use in later formulae: by Equation (111.3) , it is useful to define
� = (d - c�)/1728
(notice that 1728 = 2633) . A curve is then non-singular if and only if� # 0.
When � # 0, the j-invariant of the curve is defined as
j(E) = d /� - ( 111. 5)
The
Two j-invariant
elliptic is
curves closely
defined related to the notion of elliptic curve isomorphism.
by Weierstrass equations E (with variables X, Y)
and E' (with variables X', Y' ) are isomorphic over K if and only if there exist
constants r, s, t E K and 2u E K *, such that the change of variables
X = u X' + r , Y = u3 Y' + su 2 X' + t (
111 . 6)
transforms E intochange
asandanitsadmissible E'. Theof variables.
transformation
Clearly, inthisEquations (
111 . 6
transformation ) is referred to
is reversible,
intoinE.inverse
E'points Such alsoan isomorphism
defines an admissible
E and tothethesetfield
of rational defines a change
bi j ection ofbetween
pointsthatin E'.are not
variablesthethatset transforms
Noticeisomorphic of
that isomorphismrational
is
defined
become relative
soisomorphism
over an extension K; Curves
K K. relation. The following lemma estab
2
over K can
lishesCurve is an equivalence
the fact that,classesoverinthethisalgebraic closure K, the j-invariant characterizes
the equivalence
found in [147]. relation. Proofs for all characteristics can be
LEMMA 111. 1 . Two elliptic curves that are isomorphic over K have the same
j -invariant. Conversely, two curves with the same j -invariant are isomorphic
over K.
111.2. The Group Law
Assume, for the moment,
change of variables given by that char(K) # 2, and consider the admissible
3,
X = X'
b2 y
= Y'
ai
(X'
b2
) a3
12 ' 2 12 2'
_ _ _ _
withlongb2 defined
the as inform
Weierstrass Equations
in Equation ) This change of variables transforms
( 111.4 .
( ) to the equation of an isomorphic
111 . 3
curve given in the short Weierstrass form,
E Y2 = X3 + aX + b,
: (III. 7)
for some
Let P a, b E K.
and Q be two distinct rational points on E. The straight line joining
P and Q musta lineintersect
intersecting with a thecubiccurve at one
curve. The further
point Rpoint,
will saybeR,rational
also since wesince
are
the line, the curve and the points P and Q are themselves all defined over K.
32 III. ARITHMETIC ON AN ELLIPTIC CURVE
Ifshallwe call
thenPreflect R in the x-axis we obtain another rational point which we
+ Q (see Figure 111.1 for a visualization over the reals).
the TocurveaddatPP.to Such
itself, aorlineto must
double P in the jargon, we take the tangent to
intersect E(K) in exactly one other point,
say
obtain R, asa point
E is defined
which by acallcubic[2]Pequation.
we = P Again we reflect R in the x-axis to
+ P (see Figure 111. 2 ). If the tangent
toP +theP point i.ise .vertical,
= 0, , P is a it 'intersects'
point of order the curve at the point at infinity and
2.
The above process of determining P + Q given P and Q is often called the
chord-tangent process. The operation on points which we have just explained
can be shown to define an additive abelian group law on E(K), for any field
K summarized
�
bezero k K, with the point at infinity,
�
in the statement that 0,
three as the onzero.theThecurvewholewill lawsumcanto
points
if and only if they lie on a straight line.
III.2. THE GROUP LAW 33
orTheseUsing
3, canthisdetermine
weformulae geometric explicit
definition,algebraic
which isformulae
are valid in any characteristic.
readily forextended
the to chargroup
above ( K) = 2
law.
LEMMA 111. 2 . Let E denote an elliptic curve given by
E : Y2 + a1 XY + a3 Y = X3 + a2X2 + a4X + a5
and let P1 = (x 1 , Y1 ) and P2 = (x 2 , Y2 ) denote points on the curve. Then
-Pi = (x 1 , -y1 - a i x 1 - a3 )·
Set
is called
The qtheth_power
trace of Frobenius at q.
Frobenius map, on an elliptic curve, E, defined over IFq , is
defined by
{ E(Fq ) -----+ E(Fq )
rp : ( x, y) f----+ ( x q , y q ) ,
0 f----+ 0.
Itrespects
is readily verified
theIF ,group that rp
law.toInasother maps points Eon to points on
words the map is a group endomorphism
rp
E, and that it
of ETheovertrace q referred the Frobenius endomorphism.
fundamentalofroleFrobenius
aequation in our studyand oftheelliptic
t Frobenius
curves.endomorphism
They are linked rp will play
by the
rp2 - [t]rp + [q] [O J ,
=
whereA first
addition and subtraction
approximation denote curve operations.
known theorem
V. 1 . 1] .
of Hasse, toa the prooforder of E(IFcanq ) isbegiven
of which foundby inthe[147,
following well
Theorem
IIl.3. ELLIPTIC CURVES OVER FINITE FIELDS 35
weon aaddcurvethe over of the curve ) . To this expected number q of rational points
pointIF at. infinity making a total of q + 1 expected rational points
q
This observation
uniform distribution. tells us how to choose elements of E(IFq ) with an ( almost )
For curvespoints
rational over ofIFPany, where p is a prime, there is an elliptic curve with group of
given order in the interval (p + 1 2y'p, p + 1 + 2y'p).
-
Inuniform
the sub-interval
distribution. (p + 1 fa, p + 1 + y'p) each order occurs with an almost
-
cryptosystems
forof characteristicsare usually
large primes twoTherefore,
p.
based the on either
remainder IF2 n
of, i. e
this . , characteristic
book will two,
focus on or IF
fieldsP
case and p > 3, and will omit the separate treatment of the
three,char(K) = Most that
3.
with modifications arguments,
are well though,
documented carryineasily to characteristic
the literature.
111.3. 1 . Curves in fields of characteristic
q = pn for a prime p > 3 and an integer p > 3. Assume K = IFq , where
n � 1 . As mentioned, the curve
equation in this case can be simplified to the short Weierstrass form
Ea b : Y2 = X3 + aX + b.
'
The discriminant of the curve then reduces to � = - 1 6(4 a3 + 27b2 ), and its
j-invariant to j(E) = - 1 72 8(4 a) 3 / � - The isomorphism classes of curves over
K in this case are characterized by the relation
Ea,b ,...., Ea' ,b' if and only if a' = u 4 a, b' = u6 b,
for some u E K*.
The formulae for the group law in Lemma 111.2 simplify to
-Pi = (x i, -yi ).
When x i # x2 we set
A = XY22 -- YXii '
and when x i = x2 , Yi # 0 we set
A = x2iy+i a
3
If
P3 = (x3 ,y3 ) = Pi + P2 # 0,
then x3 and y3 are given by the formulae
X3 A 2 - X i - X 2 ,
y3 = (xi - x3 )A - Yi·
IIl.3. ELLIPTIC CURVES OVER FINITE FIELDS 37
Write g(X) = X 3 +aX +b, so that the curve equation is Y2 = g(X). The
rational
zero points of
ofAllg(X)otherin values order two
K. Theofpolynomial on the curve
g(X) are of the
canis ahave form
zero, one, (�, 0) , where � is a
or three such
zeros.
two X for which g(X) quadratic residue in K yield
haveAdistinct
#E(K)
twist
points
s (mod
ofv2aa,curve
on the2), where
given
curve. s Therefore,
= 1 if g is counting alsoovertheK, point
irreducible 0,
0 otherwise.
we
where a' = b' = v 3 b forin some
short quadratic
Weierstrassnon-residue form Ea,b isv given by Ea' ,b'
E K. By the
characterization
morphisms over ofK,isomorphism
and it is itselfclasses
isomorphicabove, tothethetwistoriginal is unique
curve, upoverto isoK
of(inthefact,groups
it is soof over
rational IFq2 ,points
where ofv becomes
the two curves a quadratic
satisfyresidue).
the relationThe orders
#Ea,b (K) + #Ea' ,b'(K) = 2q + 2.
ToForverify this, write g v (X) = v 3g(X/v), so that we have Ea' ,b' : Y2 = gv (X).
ofis athexnon-residue;
Ecurves.
K, if gIfv g(x)(x)= is0 athennon-zero
E
g(x/v)quadratic
= 0, contributing residue,
v a' ,b' gets two points, Ea,b gets none. Similarly, if gvv(x) is a
a single
then g(x/v) point= gto(x)/veach3
non-residue,
K contributes then E a ,
twoat infinity b gets
counts tocountedtwo points,
the sumtwice, E a' , b
#Eaa,b total ' gets
(K)+#E none. Hence,
a'+,b' (K), each element
giving, together of
with the point
This propertywhereof theit istwist is useful when searching of 2q 2 points.
for 'ofgood'the curves inof
cryptography,
rational points. This required
is a computationally to determine intensive the order
problem, whichordergroup
we deal
with extensively
been determined in Chapters VI, VII and VIII. Once the group has
Thus, we get the fororders a curve, of twoits groups
determination' for theforpricetheoftwistone'.is straightforward.
111.3.2. Curves in fields of characteristic two. We now specialize to
the case where q = 2 n2 , n � 1. In this case, the expression for the j-invariant
reduces
avery = 0,
tois j(E) = ai /to�the
equivalent - In curve
characteristic
being two, the condition
supersingular. As j(E) = 0, thisi.e.
mentioned,
1 special type of curve is avoided in cryptography (see details on the MOY
attackUnderin Chapter V).
theseoverassumptions, We assume, therefore, that j(E) =J. 0.
elliptic curves IFq is given abyrepresentative
[147]: for each isomorphism class of
(III.8)
where We arecall
1.function 6 E IF;fromandChaptera2 E {O,II/}thatwithTr/ 1a isfixedtheelement linear in IFqfrom
trace of trace
IF TrIFq12. (rThis
to )=
is not directly related to q 2 trace of Frobenius, and qno confusion
the 2
shouldThearise since they are used in quite
formulae for the group law in Lemma III. 2 then simplify to different contexts.
-Pi = (x 1 , Y1 +x 1 ).
38 III. ARITHMETIC ON AN ELLIPTIC CURVE
When x 1 # x2 we set
A = Y2 ++ Y1 '
µ=
Y1X2 + Y2X1
X2 X1 X2 + X 1
and when x 1 = x2 # 0 we set
,= x i + Y1
/\
X1
'
µ= X 21 .
If
P3 = (x3 , y3 ) = P1 + P2 # 0,
then x3 and y3 are given by the formulae
x3 A 2 + A + a2 + x 1 + x 2 ,
y3 = (A + l )x3 +µ
= (x 1 + x 3 )A + X 3 + Y i·
tionTheof thefollowing lemma class.
isomorphism restrictsRecall
the possible
that eachvalues
element of #aEaE2 ,a6IFq(IFhasq) asa aunique
func
square root, -JO, = aq/2 , in the field.
LEMMA
n
111.
q = 2 . Then,
4 . Consider an elliptic curve defined by Equation (III. 8) over IFq ,
of themorelemma.
points. Counting also the points (0, .Ja6) and 0 yields the result D
Incounted
addition,
twicethein points
the sum, (0, .Ja5) and 0 are common to both curves and are
bringing the total up to 2q + 2.
Similarly to over
non-isomorphic the case of odd characteristic, the curves Eo,a6 and Ey,a6 are
IFq, but are isomorphic over IFq2 , as Trq2 2 ( ) = 0 for all
1 r
/ E IFq.
The polynomial 1/Jm (x, y) is called the m th division polynomial of the curve
E. As will be shown below, the sequences Om and Wm can be expressed in
termsWeofnowthe present
sequenceexplicit 1/Jm ·
(recursive) formulae for the polynomials 1/Jm , ()m
and WmK ·given
over Consider
in the general
Equation Weierstrass equation E of the elliptic curve
(111.3) , and the constants derived from the curve
mparameters
�
ables:
given in Equations (III.4). The mth division polynomial 1/Jm (x, y),
0, is defined by the following recursion, in which we suppress the vari
1/Jo = 0, 1/J1 = 1 ,
1/J2 = 2y + aix + a3 ,
1/J 3 = 3x + b2x3 + 3b4x22 + 3b5x + bs,
4
1/J4 = (2x6 + b2 x 5 + 5b4x 4 + l 0b5x3 + 1 0bsx + (b2 bs - b4 b6 )x + b4 bs - bn 1/J2 ,
1/J2m+ i = 1/Jm+21/J!i - 1/Jm- 11/J!i+l , m � 2,
40 III. ARITHMETIC ON AN ELLIPTIC CURVE
and
( 1/Jm+21/J�- l - 1/Jm-21/J�+l ) 1/Jm , m 2.
1/J2m = 1/J2
>
Itiscandivisible
be shown, by by Therefore,
i.
induction, that, mthe�numerator 1, is a in the expression
polynomial divisible forby
1/J2 m 1/J 1/J2 m
'lj;2 . Since the division polynomials will always be evaluated at points on the
curve,
curve. the computation
In particular, of 1/Jm can be carried out modulo the equation of the
wewillcanbeassume thatassumed
the degreein the
of 1/Jsequel
m in y never exceeds
one. This reduction implicitly when dealing
with the polynomials 1/Jm · With the 1/Jm computed according to the above
recursion, the polynomials Om are given by
()m = x'lj;� - 1/Jm- 11/Jm+ i , m � 1,
and, when char(K) -=/=- 2, the polynomials Wm are defined by
21/JmWm = 1/J2m - (a 1 0m + a3 1/J� ) 1/J� , m � 1.
With
and the, Lemma
given recursion
111. 5 followsfor thedirectly
polynomials
from the1/Jm , and the formulae for Om
formulae for the group law,
Wm
and
the somerequire
symbolica manipulation
slightly different dexterity.
treatment. InThisthe case
case will
of characteristic
be addressed, two,for
Wm
non-supersingular
caseWhen can beKfound curves,
in [ 6 4]. in Section 111. 4 . 2 . Expressions for the supersingular
is the finite field IFq , E(K) is a torsion group, that is, every point
P on the curve E has finite order. For a non-negative integer m, the set of
m-torsion points of E, denoted by E[m], is defined by
E[m] = { P E E(K) I [m]P = O }.
Itin isK-rational
readily verifiedpoints thatin E[E[mm],] iswea subgroup
will use of E(K).
the notation When wemare] =interested
E(K)[ E(K) n
E[m]. Thus,
inclusion is E(K)[m] as= E[themsubgroup
interpreted ]. Clearly,relation.
E(K)[m] E[m] E(K), where
� �
By definition,
characterizes the 0
other E E[m-torsion
m] for allpoints m. Theon E,mthas division
stated inpolynomial
the 1/Jm
following
theorem.
T HEOREM 111. 6 . Let P be a point in E(K) \ { O}, and let m � 1. Then,
P E E[m] if and only if 1/Jm (P) = 0.
It turns out that the characterization
with univariate polynomials derived from the bivariate 1/Jm · Define of m-torsion points can be achieved
fm = { 1/Jm /, , m even.
m
m odd,
1/J 1/J2
Bypolynomial
observing'lj; ,that y enters into the recursion for the 1/Jm only through the
2 and that 1/Ji mod E does not depend on y, it is readily verified
IIl.4. THE DIVISION POLYNOMIALS 41
Corollary
the Let that 111.was4x73divided
partF(x) excludesout2-torsion
of points.
to obtain These
f
pointsmsatisfy
when is even.1fJ2 (P) 0,
=
1/J m m
= +b2x 2 +2b4 x+b6 . The polynomials fm satisfy the following
recursion,
before: where variables are again omitted, and 1/J2 , 'lj;3 and 'lj;4 are as defined
m odd, m � 3,
m even, m � 2,
m 2.
>
Our interest
char(K) = 2. Theinabove this book will involve
discussion the twoto cases
is specialized char(K)
these two and
cases, in3turn.
>
0
• If p > then
overAnother
a finite important
field, whichfactwillabout the m-torsion
be required in a laterstructure
chapter,ofisangiven
ellipticby curve
LEMMA
mnotisequal111. 9 ([8]). Let E denote an elliptic curve over IFq , and suppose that
a prime which divides #E(IFq ) but which does not divide q - 1 and is
to the characteristic of IFq . Then E(IFqk) contains the m2 points of
order m if and only if m divides qk - 1.
K ifWechar(K)
now let m0. ETheZ>-2Weildenote
>
an integer, coprime to the characteristic of
pairing [ 1 47] is a function
E[m] E[m] -----+ µm,
X
where
the µm is the group of mth roots of unity in K, which occurs throughout
theory of elliptic curves. We can define the Weil pairing as follows. Let
S, T E E[m] and choose a function g on E whose divisor satisfies
div(g) REE[Lm] (T' + R) - (R) ,
=
em: { (S, T)
g (X + S)
f----+
g (X)
forX +anyS . point
It canXthenE Ebe(Kshown
) for which g is both defined and non-zero at X and
that the following holds.
LEMMA 111. 1 0. The Weil pairing is a bilinear, alternating, non-degenerate
pairing which is Galois equivariant. In other words,
em(S1 + S2 , T) em (S1 , T)em(S2 , T) ,
em (S, Ti + T2 ) em (S, Ti )em (S, T2 ) ,
em (S, T) em (T, S) - 1 ,
em (S, T) 1 if T 0,
for all S if and only =
compute.There We
is another
let definition of the Weil pairing which makes it easier to
P and Q denote two elements of E[m] and let A, B denote
divisors of degree zero such that A and B have disjoint support and
A rv (P) - (0), B rv (Q) - (0).
InT =J.practice we choose points T, U E E such that P + T =J. U, P + T =J. Q + U,
U and T =J. Q + U. We then see that A (P + T) - (T) and B
= =
(Q + U) - (U) satisfy our requirements.
44 III. ARITHMETIC ON AN ELLIPTIC CURVE
mBWerespectively.
then let fATheandWeilfB denote pairingtwocan functions
then be defined whose bydivisors are mA and
em(P, Q) = fA (B) j fB (A),
which, owing to our choice of A and B, becomes
em (p Q) = ffA (U)
'
(Q + U) fB (T)
A JB (P + T) "
Soof Miller
all thatwhich remains is to
is explained compute
in [97] andfA and fB . This can be done by a method
[are98].non-zero
One hasattothebe careful thatpoints,
the
functions one produces are defined and
but by careful choice of T and U this can be accomplished with no problem. relevant
111.6. Isogenies, Endomorphisms and Torsion
Let E
tion fields1 and E 2 be elliptic curves
K(E1 )atandeveryK(Epoint defined over a field K, with respective func
which is regular 2 ). Aofmorphism
E . A from E1 to Emorphism,
non-constant 2 is a rational
1the identity element on E2 is called an ¢, map
which
maps
zsogeny,
the identity element on E 1 to
¢ : E1 -----+ E2 .
The map which
Itroleis thein thezerotheory sends
isogeny,of and every point
is thecurves. on E
only constant1 to 0 on E 2 is also
isogeny.weIsogenies called an isogeny.
playthea crucial
resultsSuppose that will elliptic
betherequired later. In this section summarize main
that isogeny ¢
induces an injection of function fields which fixes K, is non-constant, i. e . ¢(E 1 ) =J. { O}. Then, ¢
¢* . { K(Ef 2 ) f---
. -----+ K(E1 )
-+ f ¢.
0
We
the say that
corresponding the isogeny
extension is separable,
of function inseparable
fields, or purely
K(Ewe1 ) /define inseparable
¢* K(Eits2 ) degree
is separable, if
inseparable or purely
zero, otherwise we define its degree byinseparable. If ¢ is constant to be
deg¢ = [K (E1 ) : ¢* K(E2)].
isogeny Everyis non-constant
always a group isogeny ¢ is surjectiveandovertheK,kernel
homomorphism, that isof¢(Ea non-constant
1 ) = E2 . An
isogenyn¢ ofis always
degree a a finiteisogeny
separable subgroup¢ isofequal E1 (K),to usually
its degreedenoted
as a by E[¢map
finite ]. Theof
curvesTheandsimplest is henceexample
equal toof thea separable
size of Eisogeny
[¢] . is the multiplication-by-m
map, [mdefined
curve ], fromovera curve K, to itself.the Ifsimplest
then K is a finite example fieldofIFqa andpurelyE isinseparable
an elliptic
isogeny is the Frobenius endomorphism If E is an elliptic curve over IFq
rp.
IIl.6. ISOGENIES, ENDOMORPHISMS AND TORSION 45
with E(NIFqof)points
onclosure · However, then they
the isogenies
are all [1], [Nwhen
different + 1] and are identical as maps
rp
considered over the algebraic
IFq .
Some basic facts about isogenies are
T HEOREM 111.11 (Theorem 11. 66 of [60]). Let E denote an elliptic curve de
fined over a field K and let S denote a finite subgroup of E which is Galois
stable over K. Then there exist an elliptic curve E', also defined over K, and
a unique separable isogeny cf> : E -----+ E' with kernel equal to S.
When K IFq , the subgroup S in Theorem 111.11 is Galois stable if and
=
only if itEis/Sclosed
notation is oftenunder
used thefor theoperation
curve E'ofdescribed
the Frobenius map. Also,thattheis,
in the theorem,
cf> : E -----+ EIS.
This
conveys notation
the less isobvious
obviousfactfromthata the group-theoretic
quotient pointE/Sofcorresponds
group view, but ittoalso
the
groupTo ofeverypointsnon-constant
of an ellipticisogeny,
curve.¢, there is a unique dual isogeny
cf> : E2 -----+ E1
suchA that (/> cf> is equal to multiplication by n, where n deg(cf>) , on E1 and
o =
is multiplication
cf>thatcf>being
o by n on E2 . The existence of the dual isogeny implies
2. End(E)curvesis anareorder
such called in ordinary.
an imaginary quadratic field. Over finite fields
3. End(E) is the maximal order in a quarternion algebra. Over finite fields
such curves are
this case does not occur.called supersingular but over fields of characteristic zero
Recallonlythatif a curve, E, is supersingular over a field, IFq , of characteristic if
and p
•
p
p
=� 25 orand3 theandtrace
j (E) of= Frobenius
0. satisfies t = 0.
Inthealltracecharacteristics we have that E is supersingular if and only if
p divides
largerNowthanletof Frobenius. theIfcurve
Z,l bethena prime the curveis saidhastoanpossess
endomorphism ring which is strictly
complex multiplication (CM).
the l-power torsion, E[ l n],different
for some fromfixedthevalue
nz)-module
characteristic
of of K and consider
n. The group E[l n ] can
clearly
group, be considered as a (Z/l n of rank
G = Gal(K / K), acts on E[ l ] as a linear map. So we obtain a Galois
two. The absolute Galois
representation:
Pl,n : G -----+ Aut(E[l n ]) GL2 (Z/l n z).
c
We
(see can[147])also consider all l-power torsion at once by taking the Tate module
T1(E) = lim E[ln].
+-
This
limit isuseda rank
to two Z1-module,
produce T 1 is ' c where Z1 iswiththethel-adicinverse
ompatible' integers.
limit The
used inverse
to de
fine finitethe quotient
arepresentation: absolute group Galoisofgroup G, in the sense that Pl,n
G. Hence, we obtain a continuous l-adic Galois
will factor through
Pl : G -----+ Aut(T1(E)) GL2 (Z1).
c
called If K = Q then sitting inside G are special elements, for each prime
thegenerate
Frobeniusthe elements. These aredecomposition
defined up to conjugation andinertia
theirp,
images
group, DP/IP =(J Gal( quotient
IFp/IFcurve of their
p )· Weis non-singular
then look atover the IFimage group
under by the
p1 ofp1((}p)
a Frobe
nius element,
matrixtracewhose P , if the
characteristic P . The element is a
The
p.
of p((}p) we denotepolynomial by tp and isisthewelltracedefined and independent
of Frobenius at the primeof l.
If
pindependent K = IFq then
1 ((}p) is alsoofa l.matrix G is generated by the Frobenius element (}q · The element
a lattice inwhere
Zw 1 +Zw2 ,
C (andw , whenceE Caaretorus). The oflattice
the periods will be denoted
the associated, doubly byperiodic
A
1 2
Weierstrass SJ-function
SJ(z) = :2 + L ( (z � w) 2 - �2 )
w EA\ O
ThisThefunction
periods,satisfies the differential Equation (111.1).
w 1 and w2 , can be suitably chosen so that the quantity
T = W-W21
lies
map in the upper half of the complex plane, 1l = {z E C : Im(z)
> O}. The
by from C (modulo A) to points on the corresponding elliptic curve is given
C/A -----+ E
z + A f------+ { 0,( (SJ'(z) - ai xA - a3 )/2 ) , zz Eti. A.A,
XA ,
where
Weierstrass= form
XA SJ(z) -ofbthe
2 /1 2 . The codomain of this map corresponds to the long
curve. The special case
z + A H (SJ(z), SJ1/2) , z tj. A,
corresponds to the short form Y 3 = X 3 + aX + b. The coefficients of the
short form are obtained with the 1formulae 1
92 = 60 z= 4, g3 = 140 z= 6,
w EA\{O } W w EA\{O } W
and a = -gof2 fthe.if4_,curve
coefficients b = -g3 . The inverse correspondence, leading from the
to the periods w 1 and w2 , can also be computed (see,
for instance,
The [29]).number T E characterizes elliptic curves up to isomor
complex F
phism,
lattices i.Ae.=ifZwT =+ wZwi fwand
2 = wUw�, then the elliptic curves derived from the
1 2 A' = Zw� + Zw� are isomorphic. An elliptic curve
over C associatedof theto Tcurve
the j-invariant in thisas awayfunction
is denoted
on 1l byandE7.writeWe can also consider
which
What is well defined due to the invariance of j(E7) under curve isomorphisms.
examplesmakesof athis function
modular j (T) so[147].exciting is that it is one of the simplest
function
LEMMA 111. 1 4. For any matrix
A = ( � � ) E SL2 (Z)
48 III. ARITHMETIC ON AN ELLIPTIC CURVE
we have
j (�;:�) = j(T).
Also, j ( T) is periodic of period one, and has the Fourier series
j(T) = -q1 + 744 + nL>l Cnqn ,
where q = e 27riT , and the Cn are positive integers.
gers, Here, SL2 (Z) is the special linear group of 2 2 matrices over the inte
x
inTherefore,
F.
Weinnow
by Lemma 111.14, when considering En we can assume that T is
present various functions and series which are defined via expan
sions the variable q = e27riT and are related to the j-invariant above. We
shall them
have use these definedfunctions in various
in a single place. places in the book,
For example, we canso define
it is convenient to
00
�(T) = q nII=l (1 - qn) 24 '
where, again, q = e27riT . It can be shown that this series may be written as
24
�(T) = q ( l + nZ::>l (- l ) (q ( - ) / + q ( ) / ) ,
n n 3n 1 2 n 3n+l 2 )
(111.10)
Also,
is�(T)the isasdiscriminant
expected, theof thepowercurveseriesdefined
satisfies �(T)in =the�(E7),
earlier whereThethefunction
chapter. latter
also related to j(T) using the formulae
h ( T) =
�(27) (T) = (256h (T) + 1) 3
.
J
�(T) ' h (T )
The coefficients Tn of �(T) in Equation (111. 1 0) define a function, n H Tn ,
function which has theT-function.
called the Ramanujan This is a very interesting number-theoretic
following properties:
T HEOREM 111.15. The following all hold for the function Tn :
• It is multiplicative, in the sense that if m and n are coprime then
111.7. VARIOUS FUNCTIONS AND q-EXPANSIONS 49
• For all n � 1
I Tn l ::=; O"o(n)n 1112
where O"o(n) denotes the number of positive divisors of n.
proved All of these results were conjectured by Ramanujan, the first two were
�
itself bytheMordell
isTJ-function whileofthea function
24th power last wasofproved by Deligne. namely
great importance, The function
Dedekind'(T)s
TJ (T)
00
� (T) l/24 = q l/24 II ( l qn )
n=l
_
( )
e27riT/24 1 + 2:: (- l ) n (qn(3n- 1) /2 + qn(3n+ l) /2 ) .
n>l
The Dedekind TJ-function satisfies the following identities:
TJ (T + 1) = e27ri/24 TJ (T), TJ (-1/T) = v'=lTTJ (T)
where therealbranch
positive axis. inWethewillcomplex
also square root
require the function isEisenstein
following taken to series,
be on thefor
k = 0, 1, 2, ... :
k
E2k (T) = 1 - ; L 0"2k- 1 (n)qn ,
2k n>l
where Bi represents the ith Bernoulli number and O"i (n) = L:dl n di . For ex
ample we have
n oo
'"°' nq ,
1 - 24 L...J
n=l 1 - qn
'""' 1n-3qqnn '
1 + 240 L...J
00
n=l
5n
1 - 504 z= 1n-qqn .
00
n=l
These are related to � (T) by Jacobi's formula
3 2
� (T) = E4 (T) - E5 (T)
1728
and to the function j (T) by
50 III. ARITHMETIC ON AN ELLIPTIC CURVE
define . aT + b
J O O: ( T ) = J (
.
).
CT + d
This is the j-invariant of the elliptic curve C/(Z + ZT') with T1 (aT +
b) j (cT + d) .
For a positive integer n, define
D� = { ( � � ) : a, b, c, d E Z, ad - be = n, gcd ( a, b, c, d) = 1 } ,
and
S� = { ( � � ) E D� : d 0, 0 b d }
> :::; <
It<I> can
(x, be, itshown
is that <I>nandE Z[j]
symmetric of [x] and, as a polynomial in two variables,
degree in eachbyvariable. Notice that j
nin this equation is a formal function of#S�defined
y)
T, itsdegree
q-expansion. The
previous lemma then implies that there is an isogeny of n, from E1 to
E2 , Inif and
the case if <I>nn(j (E£,1 ),j(E
only that = a 2 )) there
=
prime, 0. are precisely £+ 1 subgroups of the
group of £-torsion
ofEquivalently,
an isogeny points,£,E[R]corresponding
ofeachdegree of a curve E.to Each
one suchthe subgroup
of £ + 1 is the kernel
matrices in s; .
plus terms of the form aij xi yi , i, j ::=; £, i + j 2£, aij E Z. By the Kronecker
<
congruence relation (see [142] , [148] and [60] ) , we have
Note that
either while(rather
variable the degree
than of the(£2 modular
the - 1) /2 ofpolynomials
the division <I>polynomials),
£ (x, j) is £ +their
1 in
integer coefficients
modular polynomialscanforbecome
£ 3 andvery£ large5 areas given
= =
£ increases.
by [51] : For example, the
4 - x3 y3 + y4 + 2232 (x3 y2 + y3 x2 ) - 1069956 (x3 y + y3 x)
<I>3 (x, y) x+36864000
=
(x 3 + y32) + 2587918086 x 2 y2
+8900222976000 (x y + y2 x)
+452984832000000 (x 2 + y2 ) - 770845966336000000 xy
+1855425871872000000000 (x + y) ,
52 III. ARITHMETIC ON AN ELLIPTIC CURVE
Inwillourbe applications
aofprime to point counting algorithms for elliptic curves
taking on values of the order of log with being a prime (or
q, q
over IFq , £
athepower two ) with binary expansion a few hundreds of bits long. Although
coefficientsofofthethe field,
modulartheypolynomials are eventually reduced modulo the
characteristic
for instance, that places
the binary are often computed
expansion ofof <!>is£ atabout
q
first over Z. Assuming,
two30hundred bitsbinary
long,
the bound
lengthTo overcomeabove
of a heavy
q,
the coefficients
computational burden indeed. about times the
given alternative difficulties
modular posed by
polynomials.the large
However, coefficients
evenOther some authors
these variants have
need to bearecom
puted with care. We give one
scribed, for example, in [108] and [40] . such variant below. de
IIl.8. MODULAR POLYNOMIALS AND VARIANTS 53
s=
Let12/sgcd(.£
be the least
- 1, 12).positive
Defineinteger such that v = s (.£ 1 ) /12 E Z >o · Hence,
-
where
which TJ(z) is Dedekind' s TJ-function. We then have the following theorem,
suited allows us to define variants of the modular polynomials which are more
to computations.
T HEOREM 111. 1 7 (see [110] ) . There exist coefficients ar,k E Z such that
£+ 1 v
In Theorem
of theIt turns
irreducible 111. 1 7,
factors ' s plitting type' refers
of the polynomials to the degrees
over isIFqrequired
.
and multiplicities
these out
polynomials that considerably less
since their coefficients precision
are much smaller for constructing
thaneasier
thosetoofcom
the
standard
pute and modular
storesavingspolynomials. This
than thein thepolynomials property means they
<P£(x,ofy)the, andalgorithms are
it also leads torequire
significant
(and
use. crucial) performance that their
alsideaareisDetailed
given explanations
in of the computation of these alternative polynomi
[110] and [74] . We shall just summarize the method. The
to compute the functions sr (T) , for r = 0, . . . , .e + 1, given by
v
We can compute
of their s r (T) in the following way, keeping all functions of T in terms
q-expansions. First compute the coefficients, bi , in
f (Tr = q - V (� bi q ) '
i T
and then £1 ( )
�- j T + � T
q -VT L Ri bi qi .
00
i =O
where
the sumRi of= the£ if rthi powers
vr ( mod £) and Ri = 0 otherwise. We can then compute
of the roots of h (X) using the formula
gs T
forTheni =using
1, . . .Newton'
, £ + 1, s formulae we can express the sr (T) using the iteration,
T
(
<l>13 x, y ) x 14 + x 13 y 13 + x 13 y5 + x 12 y2 + x 10 y4 + x 8 y6 + x 6 y8 + x 5 y 13
+x 4 y 10 + x 2 y 12 + y 14(mod 2),
<l>17 (x, y ) x is + x 17 y 17 + x 17 yg + x 16 y2 + x 16 y 10 + x 14 y 12 + x 12 y 14
+x 10 y 16 + x g y 17 + x 2 y 16 + y 1s(mod 2).
56 III. ARITHMETIC ON AN ELLIPTIC CURVE
CHAPTER IV
Efficient Implementation of Elliptic Curves
Q = [k]P = P + P + · · · + P, (IV.1)
k times
where
ord(P). P isFora curve
some point,
of the and k is an arbitrary
cryptographic protocols, integerP isin athedesignated
range 1 ::=;fixed
k
<
pointis anthatarbitrary
Plies generatespointa large,
in suchprime
a order subgroup
subgroup. The of E(IFofq )the, whilecryptosystem
strength for others
and in[k]P,theitfactis hard
thattogiven the k.curve,
recover This theis thepointelliptic
P (becurveit fixed
discrete or arbitrary)
logarithm
problem
We (ECDLP),
refer to the which is discussed
computation of at length(IV.1)in Chapter
Equation as V.
point multiplication.
Efficientby analysing
start algorithmstheforcomputational
this computation are the subject
complexity of thisoperation.
of the group chapter. We
IV. 1 . Point Addition
Asdifferent
notedforms
in Chapter III, the simplified
depending oncomplexity formulae
the characteristic for the group
of the underlying law take
field. on
We
analyse the computational
acteristic 3, and for characteristic two.
p >
of these formulae separately for char
IV. 1 . 1 . Fields of characteristic 3. Affine coordinates. We recall
p >
from Chapter III the formulae for2 point3 addition on a curve
E Y = X + aX + b
:
3x i +a
2-
2y1
>. 2 1 ,x
( - 3 ) >. - Yi ·
x1 x
When P1 # P2 , the
multiplications. We computation
will denote requires
this one field inversion
computational cost by and+ 3M,
11 threewhere
field
I and M denote, respectively, the cost of field inversion and multiplication.
Squarings
the cost are
pointofdoublingcounted as
is I + 4M. regular multiplications.
We neglect When
the(e.costg., of2 and P 1 = P2 , the cost of
field3additions, as well as
the
of >.Projective multiplication
when P1 = coordinates.
P2 ) . by small constants in the computation
more expensive than In cases itwhere
multiplications, is field inversions
efficient to are significantly
implement projective
coordinates.
introduced The conventional
in Chapter projective
III. A projective (or homogeneous) coordinates were
the homogeneous Weierstrass equation point (X, Y, Z) on the curve satisfies
Y2 Z = X 3 + aX Z2 + bZ3 ,
and, when
thattheother Z # 0, it corresponds to the affine point (X/Z, Y/Z) . It turns out
groupprojective
ofrepresentation operation representations
[ 2 7]. In lead weto will
particular, moreprefer efficienta weighted
(also referred to as Jacobian representation - [27] [30]), where
implementations
projective
aevertriplet (X, Y, Z) corresponds to the affine coordinates (X/Z2 , Y/Z3 ) when
of theZform# 0. This is equivalent to using a weighted projective curve equation
Y2 = X 3 + aXZ4 + bZ6 .
The point at infinity 0 is represented by any triplet (12 , 13 , 0), E IF; , al
I
though
never in a
actually practical implementation,
operatedareon,veryanynatural since the coordinates
tripletforwithelliptic of
Z = 0 would do. Weighted
this point are
projective
the division coordinates
polynomial curves.
sequences 1/J ( , y), O ( , y), ( y) defined in Sec
m x m x wm x ,
For example, for
tion III.
remainder 4 , we have
ofand
the use [
m
chapter, ]( X , Y, Z) = (Om (X, Y) , wm (X, Y) , 1/Jm (X, Y)) . For the
and for'projective'
the sake toof conciseness, we will slightly abuse
terminology
versiondirection the term
from affinecoststo 11projective mean ' w eighted projective'.
coordinates is trivial, while conversion in the Con
other The keyusingobservation + 4M.
is that pointonly, addition can be done inrequired.
projectiveThus,co
ordinates
inversions field
are deferred, multiplications
andifonly onerequired with no
need bethatperformed inversions
atresult
the endbeofgiven
a pointin
multiplication operation, it is the
affine coordinates. The cost of eliminating inversions is an increased number final
IV. 1 . POINT ADDITION 59
of multiplications,
strongly determined sobythetheappropriateness
ratio I M. :
of using projective coordinates is
The computation
description in the sequencestoin theFigures
appendices IEEEIV.1P1363
and IV.draft2 arestandard,
adapted [P1363]
from the.
A discussion ofcoordinates,
homogeneous these sequences,
and a together
comparisonwithbetween
similartheonestwofortypes
conventional
of coor
dinates (redundant)
various can be foundmixed in [27]representations,
. This reference, as well as [30] , also discusses
e. g . (X, Y, Z, Z2 , Z3 ) , which may
haveThesomesequence
computational
in Figure advantages.
IV.1 computes the sum P3 = (X3 , Y3 , Z3 ) of two
points Pi = (Xi , Yi , Zi ) and P2 = (X2 , Y2 , Z2 ) in projective coordinates. We
assume
checked that Pi , P2 #
at cost
an early and0, that Pi # ±P2 . The latter condition is easily
stagestepofofthethecomputation, asis discussed below.right-hand
In the
figure, the
side of the step. of each computation noted at the
FIGURE IV
acteristic 3. Point
p >
. 1addition
. in projective coordinates, char
Xi Zi
X2 Zf
2M
2M
A i - A2
Yi Z�
Y2 Zf
2M
2M
A -A 4 5
A i + A2
A4 + A5
Zi Z2 A3
A� - A 7 A�
2M
3M
A 7 A� - 2X3
(A g A5 - A s AD/2 3M
16M
The
terest total cost
arisesonewhen for general point addition is 16M. A special case
Zi = 1, i. e ., one point is given in affine coordinates, and
of in
the other
point in projective coordinates. This case, which will occur
multiplication algorithms, costs 1 lM, and will be referred to as a mixed in the
addition.
The condition Pi = ±P2 is equivalent to A 3 = 0 in Figure IV.1. Fur
thermore,
When this gi ven
conditionthat A 3 = 0, the condition Pi = P2 is equivalent to A 6 = 0.
is detected, acomputation
point doublingcostsroutine isThis
used,canshown in
Figure IV. 2 . The point doubling lOM.
duced to 8M when a = -3, as in this case the computation of A i can be be re
60 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
FIGURE IV
acteristic 3.. 2 . Point doubling in projective coordinates, char
p >
Ai 3Xi2 + aZi4 4M
Z3 2Yi Zi lM
A2 4Xi Yi2 2M
X3 A i - 2A 2 lM
A3
Y3
8Y,4i
A i (A 2 - X3 ) - A 3
lM
lM
lOM
rearranged
the as A i = 3( Xi - Z?) (Xi + Z?) , costing 2M instead of 4M. By
characterization of-isomorphic
isomorphismsoneinEaSection 111. 3 .1, a curve Ea,b can be
transformed
has into
a fourth1 (mod an IFq
root 4)in, and
IFq . one ' ,b'
Thishalfholdsof thefor valueswith
about when a' = -3
a quarter 3of(modif and only
the valuesif -3/a
of a
whenThe q
differentincostsTableforIV.1.
pointWeaddition andin doubling q 4) .
inthatcharacteristic p > 3
are summarized
doubling observe the table
in projective coordinates is about a half of that of a general addition the cost of point
(when a = -3), whereas in affine coordinates doubling is the more expensive
operation.
TABLE IV.l. Cost of point addition, characteristic 3. p >
If P1 =/. P2 ,
A Y1 + Y2
'
X 1 + X2
X3 A 2 + A + x 1 + x 2 + a2 ,
Y3 (x 1 + x 3 )A + X 3 + Yi ·
If P1 = P2 ,
A Y1 + x ,
-
X1 1
X3 A 2 + A + a2 ,
Y3 (x 1 + x 3 )A + X 3 + Yi ·
Inplications,
either case, the computation
andofonea squaring requires
squaring,operation,
or 11 + 2M one field inversion, two field multi
+ l S . In the case of characteristic
two, the cost
ofin afact,general multiplication. Therefore, denoted
squarings by S , is much lower than that
are counted separately, and
we will later on neglect their cost completely.
Projective coordinates. As in the case of characteristic p > 3, we
will use weighted projective coordinates, where a projective
Z =f. 0, maps to the affine point (X/Z2 , Y/Z3 ) . This corresponds to using a
point (X, Y, Z) ,
weighted projective curve equation of the form
Y2 + XYZ = X 3 + a2 X 2 Z2 + a6 Z6 .
Conversion from projective to affine coordinates costs, in this case, 11 +
3M + l S . The computation sequences for point addition in this representa
tion are[P 1363]
from presented
.
in Figures IV. 3 and IV.4. They are adapted, as before,
The total cost for general point addition is 15M + 5S . This is reduced
toclasses
14M + 4 S when a2 = 0, which accounts for one of the two isomorphism
where of non-supersingular elliptic curves over IF2n . The mixed-addition case
Z1 = 1 costs, in the case of characteristic two, llM + 4S (lOM + 3 S
whenAsain2 =the0).odd characteristic case, the condition P = ±P is equivalent to
1 2
A 3 = 0, then P1 = P2 is equivalent to A 6 = 0. The detection of the conditions
P1 = ±P2 is similar to the odd characteristic case. The point doubling routine
is shown
- 2
in Figure IV.4, where the field element d6 is defined as d6 = � =
ar • The point doubling computation costs 5M + 5 S . Notice that, since
squaring is
doublingaddition. much faster
in projective than general multiplication
coordinateswith
is close in characteristic
to threecase,times asboth two, point
fast operations
as general
point
are The of about This
the same is contrasted
arithmetic the affine where
complexity.and doubling in characteristic two
different costs
are summarized in Table IV. 2 . for point addition
62 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
FIGURE IV
acteristic 2. . 3 . Point addition in projective coordinates, char
X1 Zi lM + l S
X2 Zi lM + l S
A i + A2
Y1 Z� 2M
Y2 Zf 2M
A4 + A5
Z1 A 3 lM
A5X2 + A 7 Y2 2M
A 7 Z2 lM
A 6 + Z3
a2 Zi + A5A 9 + A� 3M + 2S
A 9 X3 + A s A¥ 2M + 1S
15M + 5S
Z3 X1 Zi lM + l S
X3 (X1 + d5Zf ) 4 1M + 2S
A Z3 + Xi + Y1 Z1 lM + l S
Y3 xtz3 + AX3 2M + 1S
5M + 5 S
tothereachsum k?of two previous results, what is the least number of steps required
Efficient algorithms for group exponentiation have received much atten
tion by
cryptography researchers in
(see Chapter recent years, owing
I).andThehistorical to their
interestaccount central
in the ofproblem, role in public
however,andis thekey
an
cient. An excellent
additionto 200chainBC.problem technical
is givenbybyGordon
Knuth[4[68]1,describes exponentiation
Ch. 4], whovarioustracesfastthemethods,
problem
back
including some The survey
specialized to elliptic curve groups. Various techniques and
algorithms
in fairly for
compact exponentiation
butmethods in the
detailed ofalgorithmic context of cryptography are described,
form,canin [be99].used to compute point
Although
multiplication, general
certain idiosyncrasiesexponentiation
of faster
the elliptic curve version of the prob
lem can
subtraction be taken into
has canvirtually account to obtain
the sametocost algorithms.
as addition, First, elliptic
so the search space for curve
fast algorithms be expanded include addition-subtraction chains and
signed representations, which are discussed in Sections IV. 2 . 4-IV. 2 . 5 . Second,
inand tuning-up
pointdepends algorithms,
doublingonhave the relative
to be considered. complexities of
Asused,we and general point
saw onin Section addition
IV.1,com
this
relation
plexitiescurves, of fieldspecific the coordinate
inversionshortcuts system
and multiplication. Third, the relative
forsignificantly
certain families of
elliptic
the computational cost are
of pointis discussed available
multiplication. that can
An example reduce
of such a family
andFor the theassociated shortcuts
sake ofofconcreteness, in Section
whenwillanalysing IV. 3 .
computational complexity
incharacteristic
the remainder two. the
Also, section,
for we
simplicity, wefocus
will on the
neglect case
the of
costfinite
of fields of
squarings
infieldsthesewithfields.onlyTheminormainadjustments.
ideas and the analysis, however, carry to other finite
IV.2.1. The binary method. The simplest (and oldest) efficient method
for point multiplication relies on the binary expansion of k.
ALG ORITHM IV Point Multiplication: Binary Method.
.1:
(we alsorepresentation,
assume a2 = so0) .Step 4 above involves a mixed addition costing lOM
IV.2.2. The m-ary method. This method uses the m-ary expansion of k,
where m = 2 r for some integer r � 1. The binary method is a special case
corresponding to r = 1.
ALG ORITHM IV.2: Point Multiplication: m-ary Method.
INPUT : A po int P, an integer k = �j:6 kj mi , kj E {O, 1, . . . , m - 1}.
OUTPUT : Q = [k] P .
Precomputation.
1 . P1 +-- P .
2 . For i = 2 to m - 1 do Pi +-- Pi-l + P . (We have Pi = [i ] P . )
3 . Q +-- 0 .
Main loop.
4 . For j = d-1 t o 0 by -1 do :
5.
6.
Q +-- [m]Q . (This requires r doublings . )
Q +-- Q + pkj .
7 . Return Q.
Itrulecan[6be1]: readily verified that the algorithm computes [k] P, following Homer's
[m]( . . . [m] ( [m] ( [k£-1 ]P) + [k£-2 ]P) + ) + [k0]P = [k]P.
· ··
hj +-- j(kjkj
- t +1 1. .::=;. kth'
r and kt = 1 ,
8.
9. Q +-- [ 2 j-t+l- ]Q + phj '
10.
11. Return Q.
j +-- t - 1 .
Using sliding windows
bit larger, butfor without has an effect
increasing equivalent to using
the 'precomputation fixed
cost. windows one
An intuitive
explanation
consecutive this
sliding effect
windows is that the w hite
hasby anindependent space'
expected length of zeros between
of aone,fairwhen two
weTherefore,
assume
that the bits of k are obtained tosses of
the total number of windows processed (and consequently, the number of coin.
IV. 2 . POINT MULTIPLICATION 67
general
to £/Ther forpointthe additions
m-ary in the This
method. mainfactloop)is formally
behaves likeproven £/(rin+[71),1].as opposed
computational cost of the sliding window method is estimated at
n
(n + -- + 2 r -l - 2)(2M + I)
r+l
for affine coordinates, and
2r- 1 (2M + I) + (5n + 10 � r + l - 15)M
for projective/mixed coordinates.
IV.2.4. the
virtually Signed Digit representations. As mentioned, subtraction has
same cost as addition in the elliptic curve group. For the canoni
calin characteristic
curve equationstwo,of and
interest,( the group negative of a point (x, y) is (x, x+y)
x , -y) in odd characteristic. This leads naturally
tomaypointreducemultiplication
the number methods
of curve based on addition-subtraction chains, which
operations.
Consider integer representations of the form k = L:j=0 Sj2i , where Sj E
{this-1,system
0, 1}. Weincludes
call thisthea binary
(binary)representation,
signed digit (SD) representation. Clearly,
£+1 -1, are included, along with their negatives. soButallthere
2combinations, integers
are 3k,£ 10 ::=; k ::=;
+ possible
integer 3 can so represented
be the representationas (011)is orclearly
(101)redundant.
, where I =
For-1.example,
As it the
turns
out, this redundancy can be traded 2 for a sparsity
off 2 constraint that results
insentation
more efficient point multiplication algorithms. We say that
is sparse if it has no adjacent non-zero digits, i.e. SjSj+i = 0 for all an SD repre
j � 0. A sparse SD representation is also called a non-adjacent form (NAF).
ing Several proofs of the[131];following
with Reitwiesner see alsoresult
[28],can[8 7,beCh.found10] inandthe[109].
literature, start
LEMMA IV.1. Every integer k has a unique NAF. The NAF has the lowest
weight among all SD representations of k, and it is at most one digit longer
than the shortest SD representation of k.
The following
inandbinary algorithm
representation. computes
Thein [131], the
description NAF
here of a non-negative
follows integer
[910]9]; other given
precursors
variants can be found
the algorithm accepts general SD inputs).[ 9 3], [ 6 ], [ 8 7, Ch. and [ 5 6] (where
ALGORITHM IV.5: Conversion to NAF.
68 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
1.
2.
Co f- 0. 0 £
For j = to do :
3.
4.
Cj +l +-- l (kj + kj +l +
Sj j
f- k + Cj - 2Cj +l .
cj)/2J (assume ki = 0 for i � £) ,
5. Return ( s£ S£- l · · · s o ) .
NAFsOlivos
and usuallyshowhaveinfewer non-zero digits than binary representations. Morain
[109] that the expected weight of an NAF of length £ is
£/3. The resultwhich
representations, is alsohaveproved
an in [6] , where
expected weight it(mis-extended
1)£/(m to m-ary SD
+ 1).
The adaptationa subtraction
straightforward: of the binaryis method
performed for inpointlieumultiplication
of an addition towhenever
NAFs is
a negative
the computation digit Sjcostis processed.
is Assuming an average NAF weight of n/3,
�n(2M + I) for affine coordinates, and 2;nM for
projective
Clearly, coordinates.
fixed window and sliding window methods can be implemented
forr isNAFs. The maximum possible absolute value of a NAF window of size
WT = � (2 T+l - 1) for r odd, and WT = � (2 T+l - 2) for r even, given
bythe theprecomputation
binary combinations step, we (1010
need . to. . 101)
computeand (1010
and . . . 010)points
store respectively.
of the In
form
[i]P, for i = 2 and all odd values of i, 3 ::=; i ::=; WT (it is easily verified
that
the WT has the same parity as r). Thus, the number of point operations in
precomputation step is � (2 T - ( - lY). To estimate the expected number
ofconsider
point additions
thethe binary in the main
sequence loop
obtained of an NAF
byresults sliding window
takingof the[109]absolute scheme,
values of the we
digits in NAF. It follows from the
sequence can be modelled by a Markov chain with transition probabilities and [6] that such a
P(O I O) = P(l l O) = � ' P(O l l) = 1, P(l l l) = 0 where P(alb) denotes the prob
ability
before,of observing
asementary that the a symbolinteger
original a immediately following a symbol b (we assume,
k is drawn with uniform probability). El
a run of zeros analysis [42] of this transition matrix yields the expected length of
between windows, which is given by a function
4 (-1y
v(r) = 3 - . T - 2 . (IV. 3)
32
Therefore, the
scheme is estimated at expected number of point operations in an NAF sliding window
n+ 1 2 T - (-lY
n+ + ( IV. 4)
r + v (r ) 3 - 2.
Ain similar scheme, which uses a non-sparse SD
[69] . The scheme produces SD representations of lower expected weights,
representation, is analysed
but requires
inferior trade off. more precomputation, yielding what appears to be a slightly
IV. 2 . POINT MULTIPLICATION 69
IV.2.5. Atradesigned
ymptotic off m-ary
can be sliding window method. A slightly better as
obtained by using a signed m-ary scheme that is a
wenatural
tion have extension
found no of the sliding
reference to window
this method
specific scheme ofinSection
the
to combine m-ary and signed methods appears in the closing remarks
IV. 2 . 3 . Although
literature, a sugges
of [109].
Indigitthissetmethod, we use a non-redundant signed m-ary representation, i. e . ,
our is B = {-2r - 1 +1, . . . , -1, 0, 1, . . . , 2r- l } with windows of size
up to r. We decompose dthe positive multiplier k as
-1
k = L bi 2ei , bi E B \ {O}, ei E Z2:o, (IV. 5)
i=O
where
(IV. 6)
Such a decomposition is
on the binary representation of k. obtained by the following algorithm, which operates
ALGORITHM IV.6: Signed m-ary Window Decomposition
.
INPUT : An integer k = l:j£ =O kj21, kj E {0, 1} , kl = 0 .
OUTPUT : A sequence of pairs {(bi , e i)} f==-t .
1. d +-- 0 , j +-- 0 .
2 . While j ::=; do :
3.
£
If kj = 0 then j +-- j + 1 .
4. Else do :
5. t +-- {R j + r - 1} , hd +-- (ktkt- 1 · · · kj h ·
min ,
6. If hd > 2r - l then do :
7· bd +-- hd - 2r ,
8. increment the number (k£ k£- l · · · kt+ i h by 1.
9. Else bd +-- hd .
10. ed +-- j , d +-- d + 1 , j +-- t + 1 .
11. Return the sequence (b0 , e 0 ), (b 1 , e l ), . . . , (bd- 1 , ed- 1 ) .
Noticeandthatas ittheprogresses,
left, algorithmitscans
may themodify
bits (ofinkStep
from8)right ( least significant ) to
portions of the sequence
{ kj} that have not been processed yet. The correctness of the algorithm is
verified inductively by assertingd the condition
-1 £
k = z= bi 2ei + z= kj,2j' (IV. 7)
i=O j' =j
each time the loop condition in Step 2 is checked. Since the loop terminates
with j £, the second term of the sum in Equation (IV. 7) vanishes, giving
>
70 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
the desiredbeing
servation decomposition
that when ofthek.condition
The proofinisStepstraightforward,
6 holds, Step the7 subtracts
only key2Hr
ob
from
must theholdsumin thisin Equation
case. Notice(IV.also
7) andthat,Stepby 8construction,
adds it back,allsince t = j+r-1
bi produced are
odd, and bdthe- l point
must multiplication k 0. Once the sequence { (bi , e i ) } f�t is
be positive whenalgorithm >
obtained, is a straightforward
of the sliding window method. We assume r 1, and d � 1 (i.e . , k 0) .
>
modification
>
Using
Section anIV.analysis
2 . 3 , we similar
can to thattheof expected
estimate the unsigned slidingof general
number windowpointschemeaddiof
tions in the main and
ofhere,independence loopuniform
of Algorithm IV. 7 at of(n+l)/(r+l)-1.
distribution the bits The assumption
kj is more questionable
introduce sinceathecertain modification
degree of dependency.
of the sequence inHowever, Step 8 oftheAlgorithm
deviation IV.is6mini
does
mal,much
not and the
worse assumption,
than the with respect
original assumption to actual
of values
the input usedsequence
in practice,
kj being
is
uniformly
inmethod. distributed. phase
the precomputation On theis other hand, the number of point operations
2r - 2 , i. e . , about a half that of the unsigned
Thus, the expected total number of point operations is estimated at
n+ --n+ l + 2r-2 - 2. ( IV. 8 )
r+l
Comparing
window this expression with the corresponding one
method in Equation (IV.4), we observe that the expression in Equa for the NAF sliding
tion ( IV. 8 ) offers a trade off with more operations in the main loop (since
v(r) 1), but fewer operations in the precomputation phase. To bring the
>
IV. 2 . POINT MULTIPLICATION 71
The underlined
sliding window segments
method indicate
of Section the ' w
IV. 2numberindows' processed
. 3 , with ofr =curve by the
4. Theoperations unsigned
number forof such
windows
method is is 21. Therefore, the total this
96 (doublings) + 20 (additions) + 8 (precomputation) = 124.
The NAF of k has length 100 and weight 42, and it is given by
101 o 1o1 oo 1o1 o 101 oo 1o1 oo l ooo 101 o 101 o 1o1 oo I oo 101 ooo 1o1 o 101 o 101 o 101 oo I oo 101 \
Here, themethod,
window underlined segments
applied to the indicate
NAF, ther windows
with = 3. The processed
number bywindows
of a slidingis
24. Hence, the total number of curve operations is
97 (doublings) + 23 (additions) + 3 (precomputation) = 123.
( Curiously, for this value of k, the same number of curve operations is obtained
with r = 3, 4, 5. )
list The
of pairssigned window m-ary decomposition of k, with r = 5, is given by the
{(bi , ei )}i!o = {(13, 0), (5, 5), (-1, 11), (9, 16), (-7, 21), (-13, 26), (7, 33),
(11, 38), (13, 44), (-3, 49), (-3, 54), (-9, 59), (11, 64),
(5, 70), (-7, 76), (7, 81), (11, 86), (11, 91), (9, 96)},
72 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
IV.2.7.
Diffie-Hellman Multiplying a fixed point. In some applications (e. g ., part of the
key exchange protocol), we are required to compute multiples
[k] P of a fixed point P, known in advance of the computation. In such
cases, a
by precomputing significant portion of the cost of point multiplication
and storing a table of multiples of P that is used for many can be saved
values of k. For example, for the binary method, the multiples [2 i ]P, 1 ::=;
i £, could be precomputed, eliminating all the doublings in the algorithm.
<
Similar ideas
for the[99]general can be used for m-ary and window methods. Various
problem of fixed-basis exponentiation are described in [48] techniques
and .
IV.3. Frobenius Expansions
We
interestsay we are using a subfield curve when the group of rational points of
(e.g., for implementing cryptographic protocols) is defined over a
field IFqn , n 1, but the coefficients of the curve are in IFq . In this case, the
multiplication >
procedure can be significantly accelerated by using a Frobenius
expansion. In characteristic two this is based on ideas to be found in [65] ,
[96] , [154] and [111]. The idea also works in odd characteristic [152] , where
the trick inrings.
Euclidean [154] for Euclidean endomorphism rings is also extended to non
rp : ( x, y) f----+ ( x q , y q ) ,
0 f----+ 0,
which satisfies the equation 2
rp - [t]rp + [q] = [O J .
Owing
not to the results in [98] and Chapter V, we shall assume that the curve is
nius,Wesupersingular,
can expand
so the characteristic does not divide the trace of Frobe
the multiplication
p
t = q + 1 - #E(IFq ) · By Hasse's Theorem we know that l t l ::=; 2yl(i_.
map as a polynomial in rp, with ' small'
coefficients and of bounded degree. As rp is easy to evaluate this greatly
isisspeeds up the multiplication
represented by a normal operation.
basis. In suchThisa situation
is particularly noticeable
evaluation
just a cyclic shift of the coefficients (over IFq ) of each point coordinate. For of if IFqn
rp in IFqn
74 IV. EFFICIENT IMPLEMENTATION OF ELLIPTIC CURVES
the
the Torest ofof such
this chapter
sizeeliminate we justiexpansion.
aaFrobenius fy this method and give explicit estimates on
and few problem cases assume that (q, t) =J. (5, ±4) or (7, ±5)
q � 4. Such a restriction can be eliminated if some of the statements
below
isWe are madeof End
awillsubring morelFq general. The method makes use of the fact that Z [<p]
(E) which is in turn isomorphic to a subring of C.
convenient, identify
as a <p with its image under this isomorphism, treating it, when
complex number satisfying the equation ip2 - t<p - q = 0. We
first showa relatively
obtain that an arbitrary element of Z [ip] can be trivially divided by <p to
small remainder.
1, . . . , lq/2IV.J}2 and
LEMMA . Let S E Z[ip] . Then there exist a unique integer R E {-fq/2 1 +
a unique element Q E Z [ip] such that
S = Qip + R.
P RO O F . Write S = a + b<p, with a, b E Z. Now write a = Q ' q + R, with
Q ' E Z and R in the desired range, and recall that q = t<p - ip 2 . Then,
Q = b + Q ' t - <p. D
i=O
micWelength.
can now show that the Frobenius expansions exist and are of logarith
THEOREM IV. 4 . Let S E Z[ip] . Then, we can write
k
s = L ri <pi
i=O
IV.3. FROBENIUS EXPANSIONS 75
U+ i 2 + � � q - i /2
l l lP l l yq -
q l / 2 i �l
< llSo l l
+
q U+ i ) / 2 y'q.
(ii) q odd,
< llSi l l + l h l l < llSi l l + (q - 1)/2 l l So l l + (q - 1) � - i /2
= q
l l lP l l -
y'q q i l /2
U+ 2 �
< llSo l l
+ y'q + 1
i
q U+ ) / 2 2
In both cases, if j � logq f2 then
2 l l So lll - 1
llSo l l
::::; 1/2.
q i ) /2
U+
Hence
Nz [r.p] /Z (Sj+l ) ::::; { ((yq + 1) 2 , q even,
yq + 2) 2 / 4, q od d,
and so by
at most 4.Lemma IV.3 we know that Sj + l has a Frobenius expansion oflength
D
'll (x - y) < A.
The main result on A-Euclidean rings that will be used is the following.
THEOREM IV. 7 . Suppose rp2 - trp + q = 0. Then, Z [rp] is A-Euclidean for
some A such that 0 < A ::::; (9 + 4q)/4.
The
tothereduce proof of the
them,length theorem is straightforward
of theto multiply
FrobeniusPexpansion ( see [152] ) . This result is used
by anaround 50%.of Z[rp]
Consider
integer,
mq2n . However,
�
n
we wish by 2as being element
q , the norm of m will be equal to m which is of order approximately
. As
the Inextension
a full representation,
degree if an affine
working in IF point
, or n (x,
= y) requires
f1og pl if 2n
workingbits, where
in IF . n
The is
number of bits is trivially reduced 2n n + 1 by observing
to 2 that given Pthe x
coordinate of a curve point, the elliptic curve equation becomes a quadratic in
ofsoy. specified
Therefore,
the quadratic oneequation,
involves
bit, used tois distinguish
sufficient
solvingin Chapter
the quadratic tobetween
specify they. Decompressing
(at most) two solutions
equation, which can be done using a point
the Intechniques described
thethecasex-coordinate,
of IF2n , Seroussi II.
[1the45] curve
observespointthathasanoddadditional bit canis thebe
saved
case in when order. This
a inlargethederive
tosavings applicationsof prime
subgroup mentionedorder,
from the following lemma.
above,
over where
which allthetheECDLP
points isinvolved
defined. belongThe
LEMMA IV. 8 Let P = (x, y) be a rational point of odd order on the curve
.
E : Y2 + XY = X3 + a2X2 + a5 ,
over IF2n . Then,
(IV.10)
(xhave1 , yx1 ) =EIfAE(IF
P RO O F . P E E(IF2n ) has odd order, then P = [2]Q for some point Q =
2 + 2An +). aFrom the point doubling formula in Section IV.1. 2 , we
2 , where A = x 1 + yifx 1 . Thus, Trq12 (x) = Trq12 (a2 ). D
ing Since
parties, the parameters
Equation of the curve
(IV.10) toposes are assumed
a fixedx, and known
linearn constraint by all communicat
on x. Ittofollows
that
specify n-1amight bits are sufficient
point askin theif itsubgroup specify
oftointerest. bits are sufficient fully
One
Fora some values is possible
of n,areandindeed
a system represent
designed a point
to willsupport with fewer than
allshow.possible n bits.
valuess
ofTheorem, and a , n bits necessary as we
2 the6 order of the group falls in the range 2n + 1-2.J2n° ::=; #E(IF2n ) ::=; now By Hasse'
2Trn +1 (a1+2.J2n°. The order also satisfies #E(IF 2 n ) 2b (mod 4), where b = 1 if
Thesuchquestion
which curvesofcanwhether
be an isinfinite
found open, sequence
and of tovalues
related the of n exists
(hard) for
question
of whether there is an infinite sequence of primes in the set
u { i 1 2i+1-2J2.i ::; 2i ::; 2i+1+2J2.i } ;
j
see When
[64] and Section VI. 5 .
Trq12n(a)/42) in= 0,thisn-1case.bitsHowever,
could suffice to represent a subgroup point,
asa representation
p ::; #E(F2 is known. no efficient method to obtain such
CHAPTER Y
The Elliptic Curve Discrete Logarithm Problem
Let
denoteE be an elliptic curve over some finite field, IFq . In what follows let n
the order ofdiscrete
the grouplogarithmE(IFq ) and let P denote an element of E(IFq ) ·
The elliptic curve
(P) , find the integer, m, such that
problem (ECDLP) on E is, given Q E
Q = [m]P.
There
The first aretwoa number
listed of waysdepend
below of approaching
on the fact thethatsolution
the to thisof interest
group problem.is
the group ofwillpoints
approaches of an elliptic
correspond to the curve,
MOY or aanomalous
and prime orderattackssubgroup. These
respectively,
referred
two to in Chapter
approaches do not IIImakeandanydiscussed
explicit inassumption
Sections Y.about2 and the Y. 3 .underlying
The final
group.
'groups
black box Methods
groups', likeandthe infinalsometwosense
are often
are referred
the best to as beingfor applicable
possible that class toof
[146] . Complexity will be measured in terms of the number of basic
group
the The operations,
bit complexity. comparisons etc. which need to be performed rather than
methods to be covered in this chapter are:
1. terms
Using ofa Weil the pairingofonoperations
number E[n] , there is a polynomial time reduction, in
in IFqz , of the ECDLP on E(IFq ) to the
DLP in IFqzis ,thefor smallest
required some integer such l (see [98] and [44] ) . The integer l that is
that q 1 1 (mod n) , when gcd(n, q) = 1.
2. This
Suppose
Frobenius
is thenowMOYthat attack.
q is a prime. For anomalous elliptic
t = 1, and n = q), by using the q-adic elliptic logarithm one
curves (trace of
can give a linear time method to solve the ECDLP (see [153] and [136] ) .
tobyThissolve
methodthe is relatedintotheanother
ECDLP linearparttimeofmethod
q-primary
P. Anomalous curves had been proposed for use by Miyaji [104] as
the of Semaev
subgroup [143]
generated
they
3. abelian are
The BSGSgroup. particularly
method able
ofmethod to resist the
Shanks iscana standard MOY attack.
be used totime/memory
solve the DLPtrade in anyofffinite
This
has space and time complexity given by 0 ( fa) . and
4. Using random walks one can reduce the space to a constant amount
and still maintain a time complexity of 0 (fa) . This is done using
79
80 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
one
methods. of twoThestrategies,
second boththesedueis often
of to Pollard,
referred called
to as thethe rho and oflambda
method tame
isandthatwildit kangaroos. Anotherparallelized
can be efficiently advantage[116]of the. random walks method
achoose It shouldchosen
carefully be noted thatcurve.
elliptic none ofTotheavoidattacks
the listed
MOY above
attack willit isbeimportant
effective forto
ofit isl (notthisanpossible
iselliptic curveingroup
quantified Section
to doappropriate
orderV. 7that
).
this for supersingular Itdoes
will not
be divide q1 in-1Section
observed
curves,applications.
for smallV.values
which is the reason 2 that
they
are
curves not considered
arementioned. for cryptographic
a very smallTheclasslastoftwocurves, and listed
are avoided because Anomalous
of thebutsecond
attack
complexities on thelarge. attacks are quite
order of fa. They become infeasible when the curve general have
orderBefore
is sufficiently
discussingThroughout
these methods we ofreduce the problem to elliptic
one of prime
order subgroups.
additiveto notation for theabelian the
groupgroups. rest the chapter, we use
G, although some of the methods described curve
apply general finite
V. 1 . The Simplification of Pohlig and Hellman
Pohlig
group and Hellman [124] noticed that to solve the DLP in a finite abelian
TheGoriginal
G.Theorem one needDLPonlyis solve
then the DLPbyinappealing
solved subgroupsto oftheprime power order in
Chinese Remainder
( CRT ) . In addition, the problem can be reduced to the case of prime
order
isshouldsubgroups,
that contain
to maintain as security
will now ofbeashown.
system Anbasedobvious
on consequence
the DLP, the oforderthisoffactG
to preclude a largea DLP
solving primein divisor.
the primeHere,
orderbysubgroup.
'large' we mean large enough
Let G DLP:
following have order divisible by a prime p and suppose we wish to solve the
Q = [m]P.
If byG has
p
order n, then the problem can be restricted to a subgroup of order
solving
Q' = [n']Q = [m0] ( [n']P) = [m0]P'
1
n' = n/pc- , pc
order Solving thisis problem
ofp.where p.
the largestwillpower pof dividing
determine the value, Thus of is modulo
n. P'
m0 , m
a point
The values of m modulo p2 , p3 , . . . , pc are then computed in the following
way. Suppose m mi ( mod pi ) is known and m = mi + A.pi for some integer
A. E Z. Then
V. 1 . THE SIMPLIFICATION OF POHLIG AND HELLMAN 81
where R and S are known and S has order s = n/pi . The value of A (modi p)
can be determined just as m (mod p) was found above. Let s ' = s/pc- - 1 .
Then, A (mod p) is obtained by solving the DLP
R' = [s']R = [A0] ( [s']S) = [A0]S',
whereContinuing
S' is a point of order
in this manner, p.
by solving DLPs in subgroups of order p,
weall prime
eventually determine
divisorsthepCRT. m modulo pc. After computing m modulo pc for
of n, the true solution, m, to the original DLP can be
obtained using
V. 1 . 1 . Example. As an example of this method consider the elliptic curve
: E Y2 = X3 + 71X + 602
over the finite field IF 100 9 . The group order of E(IF 1 009 ) is 1060 which is 2 2 ·5·53.
Suppose the two points
P = (1, 237) and Q = (190, 271)
are given and the solution to the ECDLP
Q = [m]P.
isHence
required.
by Firstabovenoticereduction
the that PofhasPohlig
orderand
530 Hellman,
= 2·5·53 thein thecomputation
group E(IF100of9m).
can be reduced to the computation of m modulo 2, 5 and 53.
The solution modulo 2. By the above method we need to multiply P and
Qof byorder530/22 can= 265thentobeobtain points of order 2. The ECDLP in
solved and hence m modulo 2 deduced. It is foundthe subgroup
that
P2 [265]P = (50, 0),
Q2 [265]Q = (50, 0).
The ECDLP becomes
Q2 = [m (mod 2)]P2 ,
and it is deduced that m 1 (mod 2).
The solution modulo 5. The points are multiplied by 530/5 = 106, to
obtain
P5 = [106]P = (639, 160),
Q5 = [106]Q = (639, 849).
Hence Q5 = -P5 and m 4 (mod 5).
82 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
Now Hsince
have E'[<P] E'(IFqz) theE'[¢]action
c
1 (G, E'[<P] ) = Hom(G,
of G on E'[<P] is trivial and so we
) , the group of homomorphisms from G to
E' [¢] . The first non-trivial arrow in the last exact sequence is given by
<5E . {
•
E(IFqz)/¢E'(IFqz) Hom(G, E'[¢])
p
-----+
Qu - Q
f------+ (} f------+
where b E IF;z , (J E Fqz is chosen so that (Jn = b, and IF;z /(IF;z r denotes the
quotient
above group ofitIFis;1 then
definitions modulo a the nthfactpowers
standard that ofthereelements
exists ina bilinear
IF;1• Given the
pairing,
K, , which is non-degenerate on the left,
fl, { E(IFqz) I<PE'(P,(IFT)qz) E[¢] H <SJ<1 (eq,IF;z(<5IE(IF(P;z r) , T)) ,
: x -----+
where eq, (R, S) is the pairing from Lemma 111. 1 3. It follows that
(P, T) fT (P) (mod (IF;z r)
K,
forJ7(some computable function on the curve, J7, defined over IFqz. The function
P ) is computed in much the same way as the Weil pairing is computed
(seeFor[147,laterTheorem
use note X. 1 . 1] , [138] and below).
that the groups IF /(IF r and µn (IFqz) are isomorphic
via the isomorphism ;z ;z
q1 - 1 forsincel ::=;n6.=Forp curves ofso trace two over prime fields the situation is even
worse,There - 1 and l = 1.
when lbyare
isobtained 1.twoIn cases
= adjoining to consider,
thethefollowing
x-
the firstweisletwhenIF (E[l n])1 denote
discussion >
q
and thethesecond
and y-coordinates of all the points of order n of field
E to the field IFq .
Case l 1. We have IFqz = IFq (E[n]), by Lemma 111. 9 and the definition of l.
>
Ifmap,in thethenabovethe discussion
pairing E = E' and cf> is taken to be the multiplication-by-n
.{
fl,
•
E(IFqz) /nE(IFqz) E[n] IF*q1 /IF*q1 n
X -----+
(P , 7) H T f (P )
is obtained.
order n and theChoosing map T E E[n] \ E(IFq ) we obtain that Y(f7(P)) has exact
is anover
lem injection.
to µ Hence
(IF z) and tosolve
solveitanthere
ECDLP
using inone(P)ofwetheneed onlysub-exponential
known map the prob
methods. Clearly n q this will only be of advantage if l is relatively small.
Case l = 1. Here it may not be true that IFqz = IFq (E[n]) and a little more
care is needed.
IFq and an isogeny By Theorem 111.11, there is an elliptic curve E' defined over
(/> E E'
: -----+
�¢.ithBykernel
Lemma
(P) . So in our descent discussion above take cf> to be the dual to
111. 1 3, since IFq contains the nth roots of unity, the points of
atthethekernel of cf> areofalsothe defined
beginning over IFq , andhold.henceTheallpairing
above discussion the conditions imposed
is(P)thus, if weobtained.
choose Now as E(IFq )/cf>E'(IFq ) contains a subgroup isomorphic to
T = P then Y(f7(P)) is an element of exact order n. This
last fact follows from the non-degeneracy of the ¢-Weil pairing. The injection
T a0qvalue
ifHence= thentoofthisobtain
value T.isWith highandprobability
rejected another werandom
obtainpoint
T =J. S0.isHowever
chosen.
prime,second
A
pointTofwillisinformation
such apiece easily obtainedorderwhich
have exact n. is not equal to 0. Since n is
to T is added which is initially set to one,
hence T= ( ( y) , 1). The point [n]T is computed using an addition chain
x,
(or binary) method using the following modified addition procedure:
ALG ORITHM V . 1 : Modified Addition Algorithm
athegooddivisor
divisorin Formula
can be found which is
(V.1) byandfinding equivalent
an atIFqthein
-rationalthe divisor class
point passes group
S (which does
to
not need to lie on the curve), looking
S and - P. This line should not pass through any point in (T) , other than
line which through
86 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
possibly
ofnot . Then let P1 and P2 denote the two other points of intersection
-Pwith
thisthelinex-coordinate
the curve. Let a denote an element in the field, IFq , which is
(itThen,doeswenothavematter of ab ispoint
that not in IF(T).as the
in Defineset Q{Q1 =, Q(a,} b)willandbe QIF2-rational).
= (a, -b)
the following representation q in the divisor 1 2 class group: q
where the divisor on the right is IFq -rational and has support distinct from
(T).Alternatively, we may be able to write
(P ) - (0) ( [a + l] P ) - ( [a] P ) ,
ifadequate
[a + l] P and [a] P do not arise in the definition of f7. This will then be
as a good divisor to apply the function fT· This alternative can be
usedBeforefor fields of characteristic
passing on it should two.noted that the papers of Menezes et al. [98]
be
toand Freyaboveandattack.
the
the above
Riick [44]
method In
cannot
contain there
addition, furtheris improvements
be applied one
no over class of
matterIF , how
and methods
elliptic curves forrelated
which
largeare aonesvaluesuchof lthatwe
take.
#E(IF These
) = are the 'anomalous' curves P which
p. To see that no integer l � 1 exists for these curves we notice
that P
p1 0 "=t 1 (mod p) .
This was noticed
tographysuchfor curves by Miyaji [104] , who proposed such curves for use in cryp
exactlyarethisveryreason. However, as will bedifferent
shownreason.in the next
section,
The MOY attackonwillellipticweak but
first becurves for
illustrated an entirely
withfields
threeofexamples of discrete
logarithm
Two problems over prime odd characteristic.
(and examples are for curves of trace two, and one is for a curve of trace zero
hence supersingular).
V.2.4. Example 1 . Consider first the following example. Let E denote the
elliptic curve, defined over IF173 ,
E : Y2 = X3 + 146X + 33,
which has trace 2 and hence order 172. An element of order 43 is given by
P = (168, 133). The solution of the ECDLP given by Q = [m] P, where
Q = (147, 74) is required.
Take T = ( 168, 133), which has order 43, and write (P) - (0) and (Q) -
( 0) as the 'good' divisors:
(P) - (0) ( [lO]P) - ( [9]P) ,
(Q) - (0) ( [lO]Q) - ( [9] Q) .
V.2. THE MOY ATTACK 87
Note thattonone
required of [lO]P,
multiply [9]P, [lO]Q and [9]Q appears in the binary algorithm
T by 43. Then evaluate 'll = Yo fT at these four points
and compute
'll (P) 'll'll(([l[9O]P) ]P) = 81,
'll (Q) 'll'll(([l[9O]Q) ]Q) = 139.
It is then seen that
81 19 139 (mod 173)
and it is easily checked that 19 is a solution to our DLP on the elliptic curve.
V.2.5. Example 2. We consider the supersingular elliptic curve over IF15 1
defined by
: E Y2 = X3 + 2X.
This curve has order 152. An
P = (97, 26) and the solution to the DLP given by element of order 19 in E(IF1 5 1 ) is given by
Q = (43,4) = [m]P
isE(IFsought.) . SetNotice that 151 2 1 (mod 19) and so computations are done in
151 2
K = IF151 2 = IF151 [0]/(02 + 310 + 70).
An element of order 19 in E(K) \ E(IF151 ) is given by
T = (1150 + 142, 1410 + 86).
to'llSince=beYthe(T)o fgood
has adivisors
trivial intersection
equivalent towith(P)-(P)(0)takeand([2](Q)-(0).
P)-(P) andThen([2]compute
Q)-(Q)
T as before, to obtain
( fT ([ 2 ] P00
) ) 12
'll (P) h (P) 12 = 440 + 102 = a '
'll (Q) ( fTf7(Q) ([2]Q) ) = 90 + 100 = (3 .
00
The DLP
(J = am
can then be solved in K
the ECDLP on our elliptic curve is also 10.to determine that m = 10. Hence the solution to
88 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
rationals
you couldmodulo
use the thepower
givenseries
powerbutof pthen(seeyou[151,needChapter
to II] ) . about
worry Alternatively
various
carryLetoperations, which is not an efficient way of proceeding.
E denote an elliptic curve defined over the field of p-adic numbers,
QP , which is assumed to have good reduction at p. The set of points of
E ( QP ) which reduce to zero modulo p is denoted by E1 (QP ) which is a group.
The set of bypoints
isE(Qpdenoted in E(Qp) which reduce modulo p to an element of E(IFp )
E0 (Qp ) · In our case of E having good reduction at p we have
Hence multiplying
elements an element
in E(IFpE1) (Qpwill) produce of E0 (Qp) by a multiple of the number of
a resulttowhich lies inofE1pZp-valued
(Qp ) ·
The group
the one-parameter is isomorphic the group points of
isomorphism is givenformalby group associated to E (see [147, p. 175]). The
if z = 0,
otherwise, i. e . z = -x/y,
where w (z) is the power series in z, which is the formal power series solution
to the equation
Such a solution
standard can be computed
Newton-Raphson to anyUsing
iteration. desiredthe number
power of termsfor using
series the
w (z) the
Laurent series for x (z) , y(z) and w (z) can be computed, where w (z) denotes
the invariant
have their firstdifferential
few termsongivenE(pZP)
by (again see [147] ) . These Laurent series
x(z) -- z
= 1 ai
-2 - - - a2 - a3 z - (a4 + a i a3 )z2 - ·· ·
w (z) z z
y(z) -- -1
-1 = -3 + -a2i + -a2 + a3 + (a4 + ai a3)z + ·· ·
w (z) z z z
dx(z)
w (z)
2y(z) + a 1 x(z) + a3
( 1 + a i z + (ai + a2 )z2 + (af + 2a 1 a2 + a3 )z3 + ) dz ···
(1 + di z + d2 z2 + d3 z3 + · )dz. ··
90 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
For points on E1 (Qp) define the p-adic elliptic logarithm to be the group
homomorphism
.
· Computing
mE1 is(Qp)deduced from thetheequation
p-adic elliptic logarithm is an easy matter. The value
m -= '!9'!9pp ([([pp]P)
]Q) (mod p) .
Clearly,
servation on the assumption
will solve therequired that one
ECDLPareinthelinear knows the group order, the
time. To ofsee[p]Pthisandnotice above ob
thatboththeof
only
which non-trivial steps
takewillO(logp) group operations computations
ondiscrete
E. Withlogarithm
probability [ p ]Q,
l/pwillthe obtain
above
method
'!9p ([p]P)to E(IF fai l to
0. However, find the required as we
reduces )P and theamethod differentrepeated. curve E(Qp) can then be chosen which
IFV.3.1.
,43 willExample. To explainthe thecurvemethod a curve over a small field, namely
be used. Consider
E : Y2 = X3 + 39X2 + X + 41.
The group E(IFgiven43 ) bycan be readily verified to have 43 elements. On this curve
the ECDLP Q = [m]P
istheseto bepoints
solved,to elements
where P of= E((0,Q16)p) using and QHensel'
= (42,s 32).
LemmaThearefollowing
found: 'lifts' of
p = (0, 16 + 20 . 43. + 0(433)),3
Q = (42, 32 + 20 43 + +0(43 )).
The computation of [43]P and 2[43]Q is required 1 and they are 2found to be
[43]P = (38 · 43 --2 + 0(43 -- 1 ),41 · 43 -3-3 + 0(43 --2)),
[43]Q = (25 . 43 + 0(43 ), 39 . 43 + 0(43 )).
A simple computation reveals that
'/943 ([43]P) 19 · 43 + 0(4322),
'/943 ([43]Q) = 17 . 43 + 0(43 ),
and so
m = '/9194433 ([([443JQ)
3]P) = 19 + 0(43).
It is concluded that m is equal to 19, which is easily verified to be correct.
V.4. Baby Step/Giant Step
We describe
abelian the baby step/giant step (BSGS) method for a general finite
can begroup,
itdescription G, with n elements. By the Pohlig-Hellman simplification
assumed that n is prime; however, this fact is not used in the
below. Let P, Q E G with
Q = [m]P.
92 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
The
can bevaluewrittenof masis sought. By simple Euclidean division it is known that m
m = lvnla + b
with 0:::; a, b
< f fo l. The only problem is that the values of a and b are not
known. The equation is rewritten to look for a solution in terms of a and b of
(Q - [b]P) = [a]([ Ivnl ]P).
This
standard may seem
space/time like an
trade added complication
off. Thisalgorithms but
idea is theandBSGS it allows
method us to perform
and is due to a
Shanks in the context of factoring class
A table of 'baby steps' is first computed. This is a table of all values of group computations.
Rb = Q - [b]P
where b ranges
Rbbinaryandsearch between
storedmethod. 0
in memoryThissoadds and f J71 l - 1. This table should be sorted on the
thattheit can be efficiently searched bytousing a
way complication that one needs have a
eachof element
ifelement comparinghaselements
a unique ofrepresentation
the group. Inthen practice
the thisrepresentation
bit is no problemofsince
the
Afterinhaving
the computer
computedwillthebe'bsufficient
aby steps'asthea key.' giant steps' are computed:
Sa = [a]([ Ivnl ]P).
Oniteach
Ifmethod computation
doesmust values ofofabefore
the terminate a and
giantb step
are it is seen whether
recovered. By an Searlier
a occurscomment,
in the table.
this
The complexity of the methoda reaches
is the value
roughly 0( of rVn l
·
m0 = a8 + b = 6 8 + 0 48 (mod 53).
·
The
unique solution to the original problem, posed in Section V.1, is given by the
5 andpositive
2,correct. integer lessSothan
53 respectively. 530 whichis is419,congruent
the solution which istoeasily
1, 4 andchecked
48 modulo
to be
Notice that in this example, the giant
been computed. We could have halted at a = 1 and noticed that steps up to a = 6 need not have
the single random walk can be thought of as tracing out the greek letter rho,
p.
In Pollard'twos lambda
kangaroos), random method
walks (often
are used, called
one bythea tame
methodkangaroo
of tamewhoandjumps wild
off intotwothepathswild,formdigsthea hole
The shape andofwaits
the for theletterwildlambda,
greek kangarooA. toThefall lambda
into it.
method
shortThere is suited to finding discrete logarithms which are known to lie in a
interval.
walks. is a parallel
However, despiteversion the of the rhos name,
method' method,the which
' p aths'usesdo many
not random
now look
like a rho, insincethisinstead
described section oneis what
looks foris usually
two pathsreferredthat intersect.
to as the The method
parallel rho
method.
The following intuitive explanation uses the analogy of jumping animals,
since
However, we have these found
are this
not tothebekangaroos
useful whenof explaining
Pollard' s the method
method, since in Pollard'
lectures.s
kangaroos
'snarks', perform
since they better
jump controlled
around in jumps.
a rather Weuncontrolled
shall call ourmanner.
jumping animals
largerTo number
simplify ofthesnarks.matterThewe take two two snarks.
snarks are Eventually
given a spade weandshalltoldusethata
they
depends shouldon thedig position
a hole every they tenareorcurrently
so jumps.at,Where hence each
when snark
one jumpsmeets
snark next
the
fallsIfpath
intobothofonesnarks
theof other
theareholes(orjumping
itself)
that have it willbeenfollow
dug. the original path along until it
the path of the one will intersectaround
the a fieldofofthefiniteother.size This
path then eventually
may seem
apurpose
doubtfulmethod strategyfor solving
but thediscrete philosophy can
logarithms. be easily turned into a general
We explain
Let P,Q E G with the method for a general finite abelian group, G, of order n.
Q = [m]P,
beandneeded:
again we wish to find m. For our method the following two functions will
f : G {1, . . . , s}
-----+
for some positive integer s to be determined, and
H:G -----+ Z,
af hash function from the group G to the integers. It will be assumed the map
provides an 'equidistribution' function in the sense that
� l l {g E G : f(g) = i} I - � I = O ( y'n ) .
ItH (g)willhasbe areassumed in this
between g and -g. application that the only collisions the function
V.5. METHODS BASED ON RANDOM WALKS 95
k # l.
Notice
Hencethatonlya solution
one snark iscould
also obtained
be used ififwegkwanted
= g1 for some k and l with
(this is usually called
the letter
rho
Greek methodrho,asp)the. path of the snark will eventually form a shape like the
As van Oorschot
parallelized, by having andn Wiener
rather [1 1 6]twopointsnarks.
than out thisHowever,
methodunlike can bethetrivially
stan
dard
and parallelization
Wiener provides ofa linear
the rhospeed method,
up. then snarks
So parallelization
will solveofthevanDLPOorschot
twice
as fastIn practice
as n/2 snarks.a set of client programs perform the random walks of the
snarks,
points withfindsayback
they one snark
to a per client.
server who They thethendistinguished
collects pass any distinguished
points in a
database
Some and searches for details
implementation matches.of this parallelization for elliptic curves are
discussed.as Each
parallel this client usprogram
allows to can perform
perform an a number
efficient ' p of random
arallel' inversion walks[1 06].in
Hencejusteachone.clientForprogram
not the hash is function
actually computing
the value a setthe ofx-coordinate
of random walkson and the
curve
number canofbeleastused,significant
whilst thebitsdistinguished
of the points willequalbe those
x-coordinate to with a certain
zero.
Whenfound,
already a report the is received
DLP can be which
solved. hasActually
an identical
two hash value
problems are with oneas
solved,
the function canH(g)bediscards
the answers checked information
as to which about solutiontheisy-coordinate.
the correct one.Once solved
V.5.1. Example. The elliptic curve
E Y2 = X3 + 71X + 602
:
Sincetwothesnarks
The groupareordercalledis veryg small
and h assume
and their that everyatpoint
positions time is distinguished.
twill be denoted
by'random'
gt and walk:
ht . Initially set g0 = P' and h0 = Q' and let the snarks pursue their
t gt ht
01 [[14]P']P' ++ [[4O]Q'
]Q' == (200,
(32, 737)
357) [[l]P'
O]P' ++ [l]Q'
[ 2 ]Q' = (592, 97)
= (817, 136)
23 [[97]P']P' ++ [[88]Q'
]Q' = (759, 545) [2]P' + [3]Q' = (304, 583)
= (241, 691) [3]P' + [4]Q' = (555, 82)
[lO]P' ++ [[99]Q'
45 [12]P' ]Q' == (759,
(711, 545)
716) -[5]P' + [4]Q' = (809, 516)
So the g-snark has crossed its own path, as g2 = g5 . Its path looks like a rho.
-----.-. 3
manner.beenAtexpressed
have least oneincantermsdo ofthistheasfactor soon asbase.the elements defining the DLP
odsThere
Thefor are twocurves.
elliptic ' philosophical'
firstgroupusesofthea functionBoth however
fact thatfield.
wayslead
the group
of designing
to indexproblems.
significant
oflikepoints
calculus type meth
on an elliptic curve[1]is can
in factbe
the
used class
to obtain ancurves indexofcalculus Ideas
method. the function
In Chapter field sieve
X it awillsub-exponential
be seen that
formethod.
hyperelliptic
However, large genus this does indeed give
factorThebasesecond toforconsist
needs'philosophy' ellipticof allcurves
is; that the the method
points
indexreduction on the
calculusmodulo
iselliptic
very ineffective
curve.
methodsp forof the groups
as the
IF;*
make
(apart fromuse of the fact
thesmallelements that IF
whose ' i s' the
support contains the group
p) . The factor base is then
Q
chosen
from smaller to be
as Q * hasgenerators prime
infinitelybeing elements
manyeasier in
generators Q *. There
and they are a lot of
havecomputer. these to choose
an obvious ordering,
with The obvious analogue to handle in the
for elliptic curves is to look at curves E(Q) whose
reduction
infiniteE(K) modulo
number p gives our curve E(IFp )· However, E( Q) does not have an
offinitely
generators. Indeedgroup the forMordell-Weil Theorem [147] states
that
that is a generated any number field K. Not only
canbutbepoints
Erational thecomparatively
generators ofsmall.
grow
E(Q) Even couldifbe'small'
veryis afastquadratic
huge,generators
as pointsformareonadded
even thoughexistthethecoefficients
size of
together.of theThisMordell-Weil
is because
of
the
the
group. Neron-Tate
Henceneeded height
addingto represent
a point totheitself the lattice
will usually double the size of the
coordinates
For a fuller discussion of possible point.
index calculuscalculus
methods(seesee[150][149]Xedni
. There
isindeX
another possible
backwards). approach
Thisthe method called the Xedni
usessucha asnumber ;
of deep ideas from the conjec theory is
ofture,elliptic curves over rationals the Birch-Swinnerton-Dyer
yield seea practical
[12] and [13] . However, this method appears, at present, unlikely to
solution for the ECDLP - see [55] for a detailed discussion.
V.7. Summary
To#E(IFsummarize,
)· For E let beE used
to be anin elliptic
a cryptosystem, q , withthegroup
curve overwe IFrequire orderprop
following n =
erties:q
1. meaning
The groupof should
' l arge' havedetermined
is a subgroup
by of large
the desired prime order where
cryptographic the
strength, r,
based on and
software the best implementations
hardware. This is of square
often taken root
to attacksa prime
mean usingofcurrent
more
than 160 bits, which compares to the security of about 1000 bits of key
V.7. SUMMARY 99
length
rithmic inknowledge
conventional public key systems as implied by current algo
( see Section 1.3) . From the point of view of efficient
cryptosystem
computational implementation,
cost is maximized thewhen
ratio logof cryptographic
r is close to strength
log to
n ( this is
discussed
2. are
The curve inshould
more detail
not beinanomalous,
Section VI.i.5e).. = n = p, a prime. These
q
the curves of trace one over IFP . 1 (mod n) should be large. This
3. The smallest value of l such that q
1
removes
the othercurves of trace curves.
supersingular zero and two over IFP immediately, as well as
Note that
andProperty all of
its group3order the above
have conditions
been are
computed. very easy to check as soon as a curve
at preventing ( sometimes
thefield
possibility referred
ofeasierto
embeddingas the MO V
theas done condition [P1363] ) aims
ECDLPin thein theMOYmultiplicative
group of a finite
quantify thefor meaning with an
of 'large DLP,
l' in this context, we recall the complexity
attack. To
estimates
to have the DLP and the general ECDLP from Section 1.3. The goal is
CEc (k) CcoNv (lk) ,
�
where k = f1og2 l, CEc ( k) denotes the complexity of the ECDLP for curves
q
over IFq , andforCcoNv (lk) denotes the complexity of the DLP on IFqz. Using the
estimates CEc and CcoNv from Section 1.3, it is readily verified that the
goal is achieved when
100 V. THE ELLIPTIC CURVE DISCRETE LOGARITHM PROBLEM
CHAPTER VI
Determining the Group Order
The problem
elliptic of
curveinover determining the
a finite field order of
-astheprimalitythe group of rational points
point counting problem - is of critical
on an
importance
seenrequire applications
in the thesummary such
section of Chapter V, for and proving and
cryptographiccryptography. As
applications,
wedivisible curve
bybitsa large to be non-supersingular,
prime factor,considered
which inapractice the group
mayrequirement). order
be several hundred to be
bits
long
the (160 is sometimes
problem is difficult, andandit computationallyminimal
requires innovativeeffective. Therefore,
solutions that are both
mathematically
The point challenging
counting problem isas introduced incases
this ofchapter, where general
methods
are for finite groups, as well some ' e asier' elliptic curve groups,
are discussed.
discussed inMore advanced
Chapters VII methods
and VIII.applicable to broader classes of curves
Vl. 1 . Main Approaches
Three main
for cryptography: techniques are presently used to determine elliptic curves suitable
• Generate
propriate random
one is curves
found. and compute their group orders, until an ap
• Generate curves(CM).
multiplication withSuchgivencurves
groupareorderusually
usingcalledthe theory of complex
CM-curves (which
isthesomewhat
Frobenius misleading,
map). as all curves over a finite field have CM through
• Use
IFwhichthe group of IFq n -rational points, E (IF q n ) , of a curve E defined over
q , forthe relatively
q
rational small.ofTaking
points interest aareviewdefined,
centeredthe curve
on theinfield
this over
case
is often referred to as a subfield curve, or a curve of Koblitz type.
Oneuse approach
isontorandom to computing
a generalization of thetheorder
either BSGS of method
a generalorfinite the abelian group
methods based
previous walks (the
chapter. To rho,end,lambda
this we and kangaroo
compute the ordermethods)
of a discussed chosen
randomly in the
element g E G, i.e. determine n so that
102 VI. DETERMINING THE GROUP ORDER
where
randomly e ischosen
the groupgroup identity.
elements Considering
will give a the orders
possible value obtained
for the for several
group order.
Toandobtain
[158]). more certain information, subtler methods are required, (see [21]
By Hasse'
elliptic curve soverTheorem it is known that the number of rational points on an
IFq satisfies
andAthenaivegroupwayofofpoints is the product of at most two cyclic subgroups.
of odd characteristiccounting rational points on curves over small finite fields
p, with curve equation given by
Y2 = X 3 + aX + b,
is to evaluate the sum
p+ 1 +
� ( x3 + ax + b )
x=O p
where (�) is the Legendre symbol. This is reasonably fast for small values
of p method
this but soonforbecomes unwieldy for large values. Cohen [29] suggests using
p 10000. He also notes that combining Shanks' s BSGS
<
method with Hasse' s Theorem will give an O (p 1 /4 +E) method, where is a E
positive
Shanks methodconstant
and Mestre, that can be made arbitrarily small. This
which is claimed to perform better than the Legendre is the method of
symbol for p 457 [ 2 9]. We discuss the Shanks-Mestre method in
>
forSection VI.curves
elliptic
The method
3 . Forforlargeusefinite
currently in fields, i.e., thea better
cryptography,
believed to yield
typicalmethod
situationis needed.
curvesselecting
least amenable
when looking
to attack
consists
thatgroup of choosing
field atorder
random a large finite field
until oneThisis found and then
whoseisgroup elliptic
of rational curves
points over
satisfies
the
the probability constraints.
of successthein number procedure
each trialof isrational outlined
estimated. in Section
Thefor procedure VI. 5 , where
requires
the
over ability
a large to determine
finite field. Thisinterest,
task isandcomputationally points an
challenging arbitrary curve
but feasible
for field
Anothersizes of practical
waytheoftheory
proceeding is towith is the main
decideCMontoa prime subject of
basecurves Chapter VII.
field ofwithlargea cyclic
order
and
subgroupthen use
of largeare prime of curves
order [73].e.g.,Again, produce
this is roots
feasibleof large
but some involved
computations
nomials still
over large finite required, computing
fields.thanNevertheless, thecounting.
CM method degree
is consideredpoly
less
subjectcomputationally
of general
Chapterpoint taxing general point
VIII. counting on random curves, or the CM method, is This method is the
When
deemed too complex, a reasonable compromise can be found in the use of
VI. 2 . CHECKING THE GROUP ORDER 103
subfield
larity duecurves.
to the This
ease method,
by which described
appropriate in Section
curves VI.
over4 very
below,largeenjoysfieldspopu
can
beto theproduced.
family ofHowever,
general the family
curves over ofIF such
n , curves
offering is
less rather
choice small
in the compared
design of
a cryptosystem, andin themaking q
the curvescommunity somewhat to' special'. This has thatlead
some
sucheasier,researchers cryptographic
curvesthanmightthosebe generated
weaker, ininthea random express
sense thatway.theirTheassociated concerns
DLP might
bethe curves beingAs 'ofspecial' has beenof thisexpressed about curves same concern
generated about
withthatthe
CM method.
actuallytheexposes any the writing
weaknessesmethod. book, however, no DLP algorithm
has been found for curves generated using
eitherAtheycommonCM or the
feature subfield
of some of' candidate'
the pointvalues countingm foralgorithms presented is
that
need this produce
to check one or more the group order, and
how is done.whether m is indeed the order. In the next section, we discuss
Vl.2. Checking the Group Order
Given an
givenfirstinteger elliptic curve
m produced E defined over IFq , we wish to determine whether a
The obvious test is tobyascertain
a point counting
that m isalgorithm
within theis theHasseorderinterval
of E(IFq ).
q + 1 2yq m
- :::; :::; + 1 + 2yq.
q
nois deemed
candidatesinappropriate
survive at forthe cryptographic
end of the pointapplications,
counting algorithm,
and another the onecurveis
tried.
the When mis
multiple [ s ]P ofchecked.
is the right Ifform, [s]P a=random
0 (this point
has Pis checked.low Ifprobability),
extremely [m]P = 0,
thenorder
the P is discarded
of P. If >
and a new random point is checked. Otherwise, r divides
r 4-Jq, this condition guarantees that m is the group
order, as ontherer iscanamplybe met
condition no other
in multipleapplications,
practical of r in thesinceHasses interval.
« r (the choice
The
of sSeveral
is discussed
related in results
more quantitative
exist in the terms in Section
literature. For VI. 5). a theorem of
example,
Mestre,defined
curve quotedoverin IF[142], , showsthe that
either curve fororpitsa twist
primewillgreater
always thanadmit461,a and
point a
offororder greater than P 4.JP. Schoof [142] extends this result by showing that
p 229 either the curve or its twist admits an IFP -rational point P with
>
the
[m]Pproperty that the only integer m E (p + 1 - 2.JP, p + 1 + 2.JP) for which
= is the group order.
0
for anEindeterminate
curve over T. This is referred to as the zeta function [66] of the
IFq . The following theorem, due to Hasse, shows that this func
tion hasfroma veryknowledge
tained simple formof Ni ,
thattheallows
numberall oftherational
values ofpoints nover 1,thetoground
Nm > be ob
field,
ally beIFq . Owing to results by Weil (see, e. g .,[ 1 47]), the theorem can actu
extended to curves of genus higher than one, and this will be briefly
discussed in Chapter X.
T HEOREM VI.1 (see, e. g ., [ 6 6]). Let E be an elliptic curve over IFq , and let
ci denote its trace of Frobenius at q, i. e., = q + 1 - c i . The zeta function
Ni
of E over IF has the form
q
Z(E; T) =
P(T)
(1 - T) ( l - qT) '
where
P(T) = ci T + qT2 = - aT) ( l - aT).
1- (1
The discriminant of P(T) is non-positive, and the magnitude of a is -Jii .
rem Notice
VI.1. that Theorem
Also, it follows 111.3 in Chapter III follows immediately from Theo
by straightforward series manipulations and partial
fraction expansions that, for n � 1,
(VI.1)
Clearly, this equation provides an efficient computational procedure for
#E(IFqn ), since is a quadratic imaginary integer, and can be computed
a an
using
erations a binary
on exponentiation
integers. An methodformulation,
alternative (see ChapteralsoIV),leading
involving
to an only op
efficient
computation,
from Equationis(VI.1).given in the following corollary, which follows immediately
C OROLLARY VI. 2 . Let IFq , E and ci be defined as in Theorem Write
#E(IFqn ) = q + 1 - for n � 1. Then,
n
VI. 1 .
Cn ,
Cn =
Ci Cn - i - qcn-2 ,
where c0 = 2.
For commonly
forn =a nlargen , enough used ranges
prime#E(IFdivisor of values
of of q and n , n has to be prime to allow
#E(IFqn ). For, if n factors non-trivially as
i 2 then
rangeIt ofis common both
the largesttoprime q n 1 ) and #E(IFqn 2 ) divide #E(IFqn ), limiting the
divisorsubfield
of #E(IF qn ).
advantage ofattention consider
the efficient curves
arithmetic intwosuchisfields.in characteristic
However, two,
the many to take
troublecurves
with
restricting
definedtheover to
small finite characteristic
fields with thewayrequiredthat there
subgroup are not
ofuselargesubfield
primecurves
order
over extension field. One possible
over fields of odd characteristic (see [152]). around this is to
106 VI. DETERMINING THE GROUP ORDER
overAstheanfinite
example
fieldinIF4characteristic
, with equation
two consider an elliptic curve, E, defined
E Y 2 + XY = X 3 + () + 1.
:
The main
that the step of this procedure,
factorization attempt inStepStep2, 4is isthenotsubject of Chapter
difficult. In fact, VII.for Notice
values
of s usedfactors
possible in practice,
up to thes, together
factorization
with can
primalitybe carried out Ifbythetrialfactorization
testing. division of
fails,Wethenoworderestimate
#E(IFq ) is not of the desired form, and the curve is discarded.
the probability of success in one iteration of Algo
rithm VI.1. First, the term 'large', used when referring to the prime r (or
VI. 5 . SEARCHING FOR GOOD CURVES 107
equivalently,IF 'sismall'
creteness, when toreferring
assumed be of to s) , is quantified.
characteristic two, i. For., qthe= sake
e 2 n . of con
Similar
considerations q apply to the case where q is odd. Assuming that the ECDLP
isof indeed of exponential
bits ofissecurity' in breakcomplexity,
the cryptosystem, log 2 r is a good measure of the 'number
inOnthat a searchhand,exponential in thisis
measure needed to the system.
n, the size of a field element, and the complexity of the operations required
the other the ' k ey size'
toobtain
implement the
the logstrongest cryptosystem
possible grows
system polynomially
for theRecall with
computational n. Therefore, to
investment, we
would like r to be as large as possible.
log2 r is roughly2 bounded above by n. Define the loss of the cryptosystem as that by Hasse' s Theorem,
E = 1 - logn2 r .
--
For
orderForexample,
subgroup anofelliptic
order curve2 1cryptosystem
near 90 has a loss ofoverfive Fpercent.
2200 using a cyclic prime
1 -an2 y'integer
[q +Following q + 1s,+ let2[64]y'q],Hs, toqdenote
q, Koblitz =estimate the setand ofletmultiples
2n , and theareprobability
of s in the interval
Hsi s = { i : i · s E Hs } .
ofthedrawing a random
curve
uniformly with given
distributedloss E, two assumptions made: (i)
in H2 , and (ii) for small s, the distribution of primes order #E(IF q ) is
among
trary integers
integers of in Hsi s is similar to the distribution of primes among arbi
the same order of magnitude as qi s. By the Prime Num
ber Theorem,Seethethedensity
lllog(qls). discussion of primes
on in Hsi
these s is thus inassumed
assumptions to be roughly
[64] and [89] .
Let S = l 2 nE-l J. Then, under the above assumptions, and using well
known properties
or less is estimated by of the harmonic series, the probability of a curve of loss E
s s
1 . -> -1 '"°' --:-1 = -(logS 1 + O(l)) = E+ o(l).
'"°'� J. log(ql2J) logq � J logq
For
expect example,
to have forto thedetermine
target theloss order of five#E(IF
percent) forin20therandom
examplecurves above,beforewe
athe' good' one is found. In fact, since each pointq counting computation yields
be run orders
only of a curve and
ten timesestimates its
on the average. twist, the point counting procedure will need to
borne The probability
out number
by experimental above
data gathered (and the underlying
at ofHewlett-Packard assumptions)
Laboratories are
forGroup
a large
orders of elliptic
were determined curvesusingover fields the sizes
someof ofthethecurves used
pointobtained in real systems.
countingistechniques
described
in Appendix A. in Chapter VII, and a sample presented
108 VI. DETERMINING THE GROUP ORDER
CHAPTER VII
Schoof's Algorithm and Extensions
Oofresults from the complexity of the BSGS algorithm applied to this case, to
( log8 q) [142] . Schoof's algorithm, described in this section, forms the basis
allBycurrent efficient schemes for point counting.
ofwhere Hasse'
Schoof' s Theorem, #E(IB'q ) = q + 1 t where l t l ::=; 2y'q. The heart
-
109
110 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
isPrime Number Theorem it readily follows that the number of primes needed
0 (log q / log log q) and that the size of the Rmax = 0 (log q).
A brief overview of the onbasictheSchoof algorithm is first given, followed by
a more Noticedetailed discussion
thatofonefieldcanconsidered.
easily determine actual computations.
t (modof odd£) forcharacteristic,
£ = 2, for either of
the two types
t and#E(Fonlyq ) if(mod For the case we have
ifequivalent X 3 +2),3aXand+web issawirreducible
in Sectionover 111. 3F. 1 .thatThe#E(Flatter
q - X) = 1. Forq characteristic two, since
q 1 (mod 2)is
) condition
to
the Wecurvenowis consider gcd(X +
non-supersingular, aX + b,we X have t 1 (mod 2).
endomorphism rp of theprimes£ curve>is2.theRecall map from givenChapterby III that the Frobenius
rp : { E(F ( x,0y)q) f----+ E(F
-----+
(0xq , yq)q),
f----+ '
and for any P E E(Fq) it satisfies the equation
rp2 (P) - [t]rp(P) + [q]P = 0. (VII. 1 )
We consider
and t£ class this equation
t (modis taken
£), where for points
theand least in E[ R ]*
non-negative= E[R]\ { O}. Let q£ q (mod £),
representative of theis found
con
gruence as q£
such that for a point P = (x, y) E E[R]* we have t£. If a value of T E {O, 1, . . . ,£-1}
(VII.2)
then
formula we must
denotes have T
point since = t£ , i. e ., t mod £ is obtained. The addition in the
addition onprime
the and
curve.P =J.The0.value of T satisfying Equa
tionTo(VII.determine
2) is unique £ is
TofEEquation , £ - such
{O, 1, . . . (VII. 1}2) arearea computed.
value
tried inof turn.
T, assume
First,
Theprime£
forthethex-coordinates
x-coordinates
time being that
of theofpoint on all values
both sides
multiples
[areq£](x,rational [T](xq , yqof), forx andthey,given
y) andfunctions involvingaretheused and the value T
divisionto symbolically being
polynomials compute tested,
(see Sec
tion
the III. 4 ).
x-coordinate The point
of (x addition formulae
q2 , yq2 ) + [q£](x, y). By clearing denominators and, if
necessary,
curve eliminating powers
2 3of y higher than 2 one by reducing
3 modulo the
the equation
ofsubstitutedform into a(x)(either
-theyb(x) y ==0xor+yax= +a(x)/b(x) b or y =results. xy + xThis,+ a6in), turn,
curve equation to eliminate y and give an equation of the
an equation
can be
form
procedure hx(x) = 0. A crucial observation in determining the complexity of the
E[R]*, isallthat,
issionin polynomial since thecomputations
polynomial postulated point can be Pcarried
satisfyingout Equation
!£, which is of degree 0(£2 ). In particular, the polynomials modulo (VII.divi2)
the
VII . 1 . SCHOOF'S ALGORITHM 111
q2 , yq2 , xq , yq are reduced, using f.e, and the curve equation, from degree expo
xnential
is therefore in log0q(£to2). degree polynomial in this parameter. The degree of hx (x)
E[one,R]*,Tothenthecheckthereif hx (x)common
greatest = 0 has a solution for the x-coordinate of a point in
is Tnoissolution divisor of
intheE[RGCD hx and f.e, is
]* whichis non-trivial, computed.
satisfies Equation If the GCD
(VII.exists
2), anda is
the next value
point in E[R]* such that of tried. If then there
(VII.3)
The
since sign
the of the point onarethetheright-hand
x-coordinates same for side ofsign.the Toequation
either determine is ambiguous
the sign,
assume
the it to beareplus
equation in Equation
computed and, as (VII.
with 3).theThex-coordinates,
y-coordinatestheofdenominators
both sides of
clearedwith hyandthereduced
0,satisfying the y variable
to degree eliminated
0(£ to giveifangcd(hy,
2 ). Again, equationf.e,) of=J. the
1, formishy(x)
there a =
point
Notice that equation
for a and T,thethecorrect
given procedure sign isactually
plus; ittestsis minus±T otherwise.
and it is only
necessary
require to havetreatment,
special T run through which 0 discussed
is ::=; T ::=; (£ - 1) / 2 (the case T = 0 will
below). Generally the points
oftheseE[Rpoints,
] have coordinates
which would ininangeneral
extension be fielddifficult,
very of IFq . Actual
is avoided computation
by the GCDof
computations.
To examine the complexity of the algorithm, we note that the bulk of the
computation is takenmodulo
up withf.e,finding q q q 2
x , y , x of, ydegreeq 2 (suitably 2).reduced modulo
theq curveqequation) 2 , a polynomial 0(£ In the case of
xrequiring
and x O(log , theseq) aremultiplications
exponentiationin theoperations ring. Thein themodulus
ring IFqis[xof]/(f.e,(x)),
degree
2
0(£ )such 2
= O(log q). Hence, assuming no fast multiplication routines are used,
4
each ring multiplication requires2 O(log
ofq IFqq,2 each requiring in turn O(log q) bit operations. The complexity of the q) multiplications of elements
yequation
, y computationsthat do not isaffect
similar,the involving
asymptotics. alsoNotice
reductions that modulo
x q , yq , xqthe2 andcurveyq2
are computed
that prime. once for each
Therefore, the prime £ofandbit used
number for all needed
operations the values for of T tried thefor
obtaining
trace modulo a single prime £ is O(log 7 q). Since the number of such primes is
O(logq)
the Ifgroup (in fact, O(logq/loglogq)),
order is O(log 8 q)fieldbitarithmetic the overall complexity
operations.(as briefly mentioned in Chapter II) for determining
istions, fast
used,while polynomial
thenfield and
multiplication in IF [ x ]/ (f.e, ( x)) takes O(log 2+E q) field multiplica
q l+
complexity, multiplications
therefore, reduces to take
O(log 5 +E) bitE operations.
O(log q) bit operations. These The
gains, overall
how
ever, are mostly theoretical, and hard to realize in practical implementations.
112 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
Inasymptotic
practice, improvements,
log q is usuallyyetnotit sufficiently
is large largetotomake
enough benefitthe naive
from the fastest
implemen
tationbe unacceptably
can used (e. g ., slow. Intermediate
Karatsuba solutions,
multiplication), but as discussed
they will in Chapter
generally not II,
suf
fice for theaimedparameter
sought, mainly ranges
at of practical
finding a interest.
substitute for Better solutions will be
f.e,, of degree linear rather
than
fastThequadratic ifinthe£. These
arithmetic betterofsolutions,
parameters the in turn,
problem so could also
justified it. benefit from
basic Schoof algorithm is summarized below.
ALG ORITHM VIl.1: Basic Schoof Algorithm
INPUT: An elliptic curve E over a finite field Fq .
OUTPUT: The order of E(Fq ).
1 . M +-- 2 , £ +-- 3 and S +-- { ( t (mod 2), 2)} .
2 . While M 4-y!q do:
<
3. For T = 0, . . . , (£ - 1)/2 do:
4. Using the formulae above check whether , for P E E [R] ,
rp2 (P) + [q]P = ±[T] rp(P) .
Exactly one such T will pass this test.
5.
6.7 . S +-- S U T,
M+-- M { (£. £)}
x or S +-- S U -T, { ( £)},
as appropriate.
£+--nextprime(R) .
8 . Recover t using the set S and the CRT.
9 . Return q + 1 - t .
Inprimethe number
above algorithm
larger thannextprime(R)
£. is a function which returns the smallest
detailThetocomputations
illustrate the discussed
technique above areForconsidered
further. the now in weslightly
discussion, focus greater
on the
case
point ofmultiples
characteristic
based two,
on as thecanformulae
them be used forwithout
divisionhaving
polynomials
to m f (x) and
consider various
forparityAssume
y
cases.similar.
being We show the computations for the x-coordinate only, the ones
We search forfirsta TthatE F.e,forsuchno that
point1 P E E [R] is it true that rp2 (P) = ±[q.e,]P.
*
formulae from Section III.4 for the characteristic two case. The x-coordinates
are, respectively,
and
(ip2 (P) + [q£J P) x = xq2 + x + fq£ -;tq£+ 1 + A2 + A '
Qi
where
A=
(yq2 + + x)xf! + fq£ -2 f� +l + (x2 + x + y)(fq£ - i fqJq£+1 ) '
Y
xf� (x + xq2 ) + xfq£ - i fqJq£+1
the
sumed subscript
argument X on the bracket indicates the x-coordinate, and x is the as
of the various division polynomials fm. Notice that since the
latter have coefficients in IFq , we have fm(xq) = fm(x) q . The case of q£ = 1
might has be handled separately, sinceq =the1. above expression involves offq£the_2 ,
fortheAaddition
which q2 , yq2 ) and (x, y) which£is straightforward.
not
pointsThe(xpowers been defined for The case involves
2y + xy + x3 + aof6 =y 0,in totheyield equation are reduced
polynomialsby ofthedegreemodulo the
atofmost curve equation
one in y. Bothin
sides
the of the
denominatorsexpressions are multiplied LCM the
to give a relationship of the form a(x) + yb(x) = 0, wherepolynomials
inh (x)forming a(x) and b(x), polynomial computations are carried out modulo
an. interleaved
indegree In fact, thefashion,
reductionsas wemodulodo noth wish
and theto manipulate
curve equationpolynomials
logq. The relation y = a(x)/b(x) is substituted into
must occurof
the curveexponential
equation toin give
hx (x) = a2 (x) + xa(x)b(x) + b2 (x)x3 + b2 (x)a6 = 0.
If gcd(hx, !£) =J. 1 then a point P E E*[.£] exists whose x-coordinate satisfies
Equation (VII.1). In this case the y-coordinates of the two sides are checked
in aWesimilar mannerbriefly
comment to determine
on the the where
case correctthere
sign. is a point P E E* [.£] such
that ip2 (P) = ±[q£]P. This case, which was excluded in the discussion above,
arises if gcd ( (xq2 + x)f� + fq£ - i fq£+1 , f£) =J. 1.
Clearly t 0 (mod .£) if and only if ip 2 (P) = -[q£ ]P. This condition can
beverified,
testedthenby checking
2ip (P) = the y-coordinate, as before. If the condition is not
Equation (VII. 2), we have+[q£]P for some point P, and, by the characteristic
or
114 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
Applyingsatisfied
equality the Frobenius
by P, mapfollows
it to boththatsides
T2
of4qthe(mod
equation,
.£ and again the
) and, thus, that q
has distinguished
are a square root asmodulo before. .£, sayAssume
w E IFrp(P)
£ . Thus rp(P) = ±[w ]P and the cases
= [w 0 ]P, with w 0 E { +w, -w }.
Then,
said weto special
isa rather set t£ an 2weigenvalue
have 0 (mod .£w) .0 Notice that in this case, the Frobenius map
E IF£ , which we encountered while handling
over thethevariables,
ofwhether ground field IFq , withwhether
determines the j-invariant
�t is a ofsquare
the curvein IF£substituted
or not, andforthus
one
lara given £ is an Elkies
polynomials is a or Atkin prime.
challenging task, Whileis atheconvenient
this computation test of decide,
to the modufor
following curve and primewe £,outline
subsections, whichtheof theElkiestwoandpossibilities
Atkin is in effect.andInhow
approaches, the
on,theyafter
determine
coveringinformationsome additionalon t modulo
mathematical£. We willbackground.
provide more detail later
VII.2 . 1 . Elkies primes. We assume £ is an odd prime and £ is not the p,
characteristic
issaya Asquare in ofIF£ the
, and field.
the When £ is
characteristic an Elkies
polynomial prime, F the
of discriminant
rp has two roots,
� t
and µ, in IF£, which are eigenvalues of the Frobenius map modulo £.
R
The
from determination
the splitting of whether
type of the �t ismodular
£th a squarepolynomial,
in IF£ or notin acanmanner be deduced
to be
oftoconsidered
At = µ±2.J<i in the next section. Assume for convenience that A # µ. The case
E IF£ was discussed briefly at the end of Section VII.1. It corresponds
(modE[R£),], hasandtwowe ofwillitsfurther elaborate on it later. The set of
£-torsion points, £ + 1 cyclic subgroups, say C1 and C2 ,
that are stable under the Frobenius endomorphism, i. e . , rp(P1 ) = AP1 for all
P1 E C1 and rp(P2 ) = µP2 for all P2 E C2 . The characteristic polynomial
factors over IFq as
FR (u) = u2 - tu + q = (u - A) (u - µ) .
The aim in this case is to determine one of the roots, say A, since then
(VII. 4)
ToA Efind{1, 2,such. . . ,an£ -eigenvalue
1 }, such that we could test for a point P = (x, y) and a value
(xq , yq) = [A](x, y).
Notice that in this case, computation
q of x q 2 and y q 2 is not required. How
anever
computing
the computation
onerous xtask of x isxqof2 (mod
(computing the sameh) is asymptotic
only about
q (mod !£)). In the case of an Elkies prime, it will be shown how
complexity,
twice as and stillas
complex
information
nationbe usedof a factorderived from the
ofreductions modular
degree (£needed polynomials will lead
- 1)/2 of the division polynomial f£ , which
to the determi
can
outline for the in testing
of the method is given here with the details to follow in succeeding a potential eigenvalue A. An
sections.
Tothatconstruct such aispolynomial, ai.curve isogenous totheE, isogeny
say E1 , isis sought
such the isogeny of degree £, e .,
dinality £. The kernel of the isogeny, say C (one of the subgroups C1 orthe kernel of of car
116 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
C2 above), is stable under the action of the Frobenius map and hence the
polynomial
±Pi EC\{O}
(VII.5)
isonlydefinedone ofovereachthepairfield±Pofi , definition
since both ofpoints
the curve,
have wheresamethex-coordinate.
the product includes The
degreeIf theof Foriginal
£ (x) is (£curve - 1)/2.has j-invariant j, then the isogenous curves have
j-invariants
case of an that areprime,
Elkies zerosoneof ofthethe£thtwomodular polynomial
j-invariants (zeros<I>£of(x,j).
the For the
modular
polynomial)curvethatandarethein thepolynomial
isogenous ground field F £ (x) IF£willis chosen.
be the Determining
major task of such anof
much
the Once remainderF £ (x) ofis thedetermined,
chapter. it can be used to efficiently compute for which
A it is true that (xq , yq) = [A](x, y), ( x, y) E C .
This
rithm, procedure is similar
but withof t polynomial to the main
operations computation in the original Schoof algo
A, the value (mod £) is then uniquelymodulo determinedF£ (x) instead
by Equationof f£ (x).(VII.Given
4).
VII.2.2. Atkin primes. As noted, £ is an Atkin prime when t2 - 4q is
not
will a square
be determined modulo the
from prime
information£, which, as for the
onthethenextsplitting case
typeof Elkies primes,
of theinformation
modular
polynomial <I> £ (x,j). It will be noted in section that this
isisalsoofandetermines
sizeinteger
Eu!
a subset of possible values of the trace modulo £. This subset
¢ (r ) , where ¢ denotes the Euler totient function and r ::=; £ + 1
Eu!
to £)be obtained
discussedinlater. Thisofsubset is contrasted toBSGS/CRT
the exact
value of t
procedureto determine (mod
is then applied to merge the case an Elkies prime. A
primes the exact valuetheof information
t, as discussedfoundin Section
from bothVII.types9 . of
VII.2.3. Outline of the SEA algorithm. The improvements of Elkies and
Atkin to the basic Schoof algorithm are generally referred to as the Schoof
inElkies-Atkin
greater detail(SEA) in thealgorithm.
followingThe algorithm is outlined here, and treated
sections.
ALG ORITHM VIl.2: Schoof-Elkies-Atkin (SEA) Algorithm
INPUT : An elliptic curve E over a f inite field IFq .
OUTPUT : The order of E(IFq ).
1 . M +-- 1 , £ +-- 2 , A +-- { } and E +-- { } .
2 . While M 4-y!q do : <
3. Decide whether £ is an Atkin or Elkies prime , by
finding the splitt ing type of the modular polynomial .
VII.2. BEYOND SCHOOF 117
4.
5.
If £
is an Elkies prime then do :
Determine the polynomial F£ (x) above .
6.
7 .. Find an e igenvalue , A , modulo
t +-- A + q /A (mod £) . £.
8
9.
E +-- E U { t,
Else do :
( £)} .
10 .
11 .
Determine a (small) set T such that t
A +-- A u { (T, £)} . (mod £) E T .
12 .
13 . +-- £M +-M
x
nextprime(R) £. .
14 . Recover t using the sets A and E , the CRT and BSGS .
15 . Return q + t. 1
-
Although
are actually we performed,
are yet to discuss we can howcomment
some ofonthethecrucial steps ofcomputational
asymptotic this algorithm
inofadvantage
the of someofofElkies
processing the outlined
primes. improvements.
Here, the
x q and yq modulo the polynomial F£ (x) and the curve equation. With
Most notable
bottleneck is the arecomputation
the gains
anputational
analysiscomplexity
similar to that of the Schoof
of suchor computations algorithm, 5 we can
atfast0(£arithmetic bound
) bit operations the com
if naive
arithmetic
7 is implemented,
4 + 0 ( £ 3+ E) using (com pare with
0(£ )ofandthis0(£speedE),up,respectively,
tage the complexity for theof obtaining
Schoof algorithm). To take advan
F£ (x) must not exceed the
complexity
not exceed of using
0(£ it. Thus,in the
3) operations complexity of constructing F£ (x) should
IFq when naive arithmetic is used, or 0(£2+E)
inattempting
the case ofto fast
factor arithmetic. In particular, the straightforward approach of
f£ (x) to obtain F£ (x) does not seem to work, as one of
the first steps in such a factorization would involve a computation of the type
x q (mod f£ (x)), precisely what we are trying to avoid.
Since the number
allarithmetic,
complexity of the ofElkiesElkiesportion
primesofprocessed
the will beis O(log
algorithm 0 (log6q)q), the
for over
naive
or O(log 4+E) for fast arithmetic.
portionTurning to the
is actually Atkin portion
of exponential of the
asymptotic algorithm,
complexity.it will transpire that
As will be discussed this
inmentSection VIl. 8
is to dealMonly, the complexity-theory
with Elkies way out
primes,of Frobenius of this
processingcanenough unpleasant predica
of them to Thus,build
uptheaasymptotic
modulus from which
analysishowever, the
for the Elkies trace portion above be determined.
woulddisadvantages,
apply to the whole
algorithm.
itforwillthe turn In practice,
outofthat this
asizessubsetof interest
of the Atkin approach has several
primes canapplications.
be used to advantage and
ranges
setAtkinis carefully field
chosen to balance in cryptographic
the asoverall complexity, meaning that some The sub
primes (eventually a majority,
Steps 10-11, and their contribution not counted in Step 12. q increases) will not be processed in
118 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
SEA Inalgorithm.
the next sections, In we provide
particular, we more details
elaborate on stepson 3,the5,main
6, 10 steps
and of theIn
14.
Section Vll.a 3method
providing modularto polynomials
implement and 3.theirTechniques
Step splitting types
for are discussed,
determining the
polynomials
tions Vll. 4 FR, which will occupy most of the effort, will be treated in Sec
(odd characteristic) and Vll. 5 (characteristic two), respectively.
The discussion
large prime orderon p,odda characteristic
departure from in theSection
more Vll.general
4 will case
focusq on= fields of
pn , but
one that is most
polynomial relevant in practice. After describing the computation of the
FR, we return to the Elkies procedure (how the polynomial is used
ininprimes
Step
Section6)andinVII.Atkin
Section VII.
8 . Inprimes 7, andVll.to9thewedetails
Sectionis combined show of thetheAtkin
how
(Step 14).
procedurefrom(StepElkies
information
Finally, in Section
10)
Vll.10
some examples
are briefly discussed. are presented, and in Section VII.11 other recent algorithms
VIl.3. More on the Modular Polynomials
The modular
introduced polynomials
inpointSection <1> £ (x,
111. 8 . algorithms. y), for elliptic curves defined over C, were
The propertiesTheofpolynomials
these polynomials play a central
role in the
have integersections, counting
coefficients, thusneedcantobeconsider
interpreted are symmetric and
over any field.<1>£ (x,Inj)thisandandits
succeeding we will the polynomial
factorizations over a ground field IFq , where j E IFq is the j-invariant of a given
curve.
The following proposition is of interest:
PROPOSITION VII.1 (see [ 1 42]).
over IFq , with j-invariant j =J. 0, 1728. Then
Let E be a non-supersingular elliptic curve
(i) ofthethepolynomial <1>£ (x, j) has a zero j E IFqr if and only if the kernel C
corresponding isogeny
¢: E ----+ E/C
r
is a one dimensional eigenspace of in E[.£] where is the Frobenius
rp rp
endomorphism of E (here, j(E/C) = j ),
r
(ii) theas apolynomial <1>£ (x, j) splits completely in IFqr [x] if and only if acts
scalar matrix on E[.£].
rp
The following
both the Atkinis attributed proposition, from
and Elkiesbyimprovements Schoof [ 1 42] and Lercier [ 8
of the[81]basicto unpublished1], is
Schoof algorithm. critical to
The
proposition both [ 1 42] and electronic
.communications
£ + 1 in x. by Atkin. Recall from Section 111. 8 that <1>£ (x, j) is of degree
VII.3. MORE ON THE MODULAR POLYNOMIALS 119
In all three cases r is the order of rp in PGL2 (IF£ ) and the trace t of rp satisfies
the equation
( VII. 6)
over IF£ , for some primitive rth root of unity ( E IF£ .
Elkies First,or Atkin
we noteprime,that through
the proposition
the provides ofa way
factorization to classify £ as an
<1>£ (x,j). Cases (i) and
( ii ) of this proposition correspond to the prime £ being an Elkies prime, with
Case
the The ( i ) corresponding to the case of having a double root. Case ( iii ) of
proposition corresponds FR
to an Atkin prime.
proof of Equation ( VII. 6 ) is straightforward. Since r is the order of
rp in PGL2 (IF£ ), r isr the smallest integer such that Ar = µr , i. e . the smallest
integer such that rp is represented
2 r r by a scalar
2 multiple of the identity matrix.
Since Aµin some = q, we have A = q and hence A2 = (q for a primitive rth root of
unity extension field of IF£ . Thus t = (A + q/A) 2 = q(( + 2 + ( - 1 ).
In Case ( i ) of the proposition, take ( = 1.
Equation
it will limit ( VII. 6 ) is of particular importance for the Atkin algorithm, since
thenumber
numberisof¢ possible values that the trace can have, for the given
prime. This Eu1 (r) , the number of primitive rth roots of unity.
Sincein the
are IF £ . proposition
Each pair (
states
, ( - 1 that r divides
determines one £ + 1ofint2this
value , or case,values
two all these
oft roots
when
t£ = t (mod 2 £) =J. 0, for a total of ¢ (r) possible values of t£ . For example,
Eu1
wecase,get¢ t£ (r)= =0 when ( = -1, which can occur only when r = 2. In this
with the single possible value t = 0. In another
4 we must have ( + ( - 1 = 0. Then, t£2 2q (mod £) ,
example, Eu1
when 1,r =consistent
allowing only two possible values for t . £
120 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
VII. Notice
2 . thatalsoProposition
Notice that Step VII.
3 does 2 gives
not both Steps
require the 3 and 10 ofofAlgorithm
factorization the mod
ular polynomial. It is sufficient to note that the degree of
gcd (xq - x, <1>£ (x,j))
isand0, degree
1, 2 or £+ 1, where degrees 1, 2 and £+ 1 correspond to an Elkies prime
0 to an Atkin prime.
It is further
irreducible shown
factors, by Schoof [142] that the parity of the number of
s, of <!>£ when q is a large prime p is easily obtained from
the Legendre symbol:
(-1)8 = (�) .
The modular polynomial <1> £ ( x , y) over C has integer coefficients, as noted
in Section 111.8. We recall that, over C, the roots of <1>£ (x,j(T)) are given by
j ( 7 ; b ) for 0 b < £, and j(RT).
:::=; (Vll.7)
These roots correspond to the £ + 1 matrices in the set
S£ = { ( � � ) : a, b, d E Z � o , ad = £, 0 b < d } . '.S
Sectionthe111.same 8 is splitting
the polynomials G.e,(x, y) , due to Muller. These polynomials
have type over IFq as <I>.e,(x, y) (see Theorem 111.17), and
can
squareThe be inusedIF.e, inor lieu
not. of the modular polynomials to determine whether �t is a
sition VII.splitting
2 are type oftoa modular
related the polynomialof and
factorization the thecharacteristic
informationpolynomial
in Propo
of theinformation
this Frobenius will mapalsoin IF.e,.bearWhen
on theit factorization
is determinedofthat the £ is an Elkies
division prime,
polynomials
inonf.e,, turn,
as willareberelated
subgroups
shown below
of They to the
the £-torsion
and in theof powers
action
points
next twoofsections.
the
ofofE.theA material
These endomorphism
Frobenius
few comments
factorizations,
ongiven,
these matters
are given
interpretation here. of the resultsduplicate some already
in the[81].different setting is a worthwhile diversion. but the
MuchSuppose of the thediscussion field is from
of ifdefinition of the curve has characteristic p. Recall
from Lemma 111. 8 that gcd (R, p) = 1 then the structure of the group of
£-torsion points is
E[R] ,...., (Z/RZ) (Z/RZ) .
x
The group E[R] is generated by two points, say P1 and P2 , and E[R] contains
the £ + 1 subgroups C1 = (P1 ), C2 = (P2 ) and Ci = (P1 + (i - 2)Pi ) for
i = 3, 4, . . . , £ + 1. The subgroups share the point at infinity and their 0
union is E[R]. Each such subgroup is the kernel of an isogeny of degree £,
and
discussed the j-invariants
previously, ofTheorem
the isogenous
Vll.3.
curves are given by the roots of <I>.e, as
Considerlet theA andactionµ beofthetheroots Frobenius map, rp, on the subgroups of E[R].
Asu2 -before of the characteristic polynomial :F.e,(u) =
t.e,u + q.e, in IF.e,. Let e 1 and e2 be the orders of A and µ, respectively.
Three cases are distinguished
on. The cases correspond to those of Proposition Vll.2: from the above discussion, which we elaborate
A = µ E IF.e, (Case (i) of Proposition
(i) nomial 2 Vll.2), i. e . , the characteristic poly
exist a is :F.e,(u)P1 and
point = (u - A) . In this case t = ±2y'q (mod £) and there
subgroup C1 such that rp(P1 ) = [A]P1 , rp(C1 ) = C1 .
Also, there exists a point P2 not in C1 such that rp(P2) = [A]P2 + [ k]P1 ,
for(a)someif k k=f.E0IF.e,.thenThere 1
are two
rpe (P2) = P2 and
subcases:
c Ci E(IFqei ) and rp.e, (Ci) = Ci
= 2, 3, . . . , £ + 1 this corresponds to the splitting type 1, £;
(b) forifthiski=corresponds
0 then Ci toE(IF
c
-
q ei ) and rp(Ci ) = Ci , i = 2, 3, . . . , £ + 1 -
and the coordinates of the points in C1 lie in IFqei and those of C2 lie in
IFqe2 (where e 1 and e2 divide .£-1). Any point Q E E[l] can be expressed
as [m1 ]P1 + of[mall2]Ppoints
coordinates 2 , for some
of E[m.£] 1lie, min2 EIFqIFe£. . Thus,
If e =forlcm(eany1 ,integer
e2 ), then the
s
the
pointsItcoefficients
in the of thewillpolynomial
kernel be the mayofbeFR determined.
roots ( x). The x-coordinates of
p a willprime.
large be assumed
It is throughout
further assumed this section
that £ isthatan Elkies
the ground
prime, fieldtheisonly
IFP , with
case
Tofor which
determine suchthefactors
factorof theF£ (x),division
of degreepolynomials are used in Algorithm VII. 2 .
d, the steps will be as follows:
(i) anGivenisogenous
a curvecurve,
over IFbyP with j-invarianta root
determining j, determine
of the a j-invariant
modular polynomialJ of
<1> £ (x, j), i.e. find J such that <1>£(J , j) 0 =
(ii) For the
nous curve, given j-invariant J, determine the coefficients a, b of an isoge-
Y2 X3 + ax + b,
=
(iii) with
From
compute
j-invariant
knowledge J.of the isogenous curves, and the kernel of the isogeny,
the sumthisoflastthequantity
x-coordinates of two
the points inderive
the kernel of the
isogeny. From
polynomial F£(x). and the curves, the desired
All
points the onadvanced
an techniques
elliptic curve currently
over IF availablethese
perform in thestepsliterature
or simplefor counting
variants
ofthesethem.steps,Thefollowing
rest ofclosely
this section P gives a glimpse intoIn the
whatlatter
is involved in
the the treatment in [142].
approach is again attributed to unpublished electronic correspondence by reference,
Atkin.Consider the curve Y2 X3 + ax + b =
The
b, j(E), nextandtaskJ.is to determine the coefficients a and b, from knowledge of a,
curve Forwillthisbedevelopment,
required. a detour
The theory through
behind thethiscomplex
detour model
is deep,of theandelliptic
a full
account of it is beyond the scope of the book. The basic facts that make it
124 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
n=l
n
5 n
and - E (q) 2
�(q) E4 (q) 31728
=
5
3In this section, we write �(·), j ( · ) , E4 (·), and E6 (·) as functions of q, rather than
functions of T, as done when these functions were defined in Chapter III. This is convenient,
since various formal derivatives, taken with respect to q, will be required. While this
notation is formally imperfect, the relation q exp(27ri T) makes the functional relations
=
unambiguous, and it helps reduce notation clutter. We will switch quite freely between the
two notations.
VII.4. FACTORS OF DIVISION POLYNOMIALS: ODD CHARACTERISTIC 125
X ( ( ; q) =
1 -2 oo
qn + (qn
12 ; ( 1 - q n ) � ( 1 - (q n ) 2
2
and
y(( ; q) = 21 LEZ (qn(1 (l- (q(qn)
+
n ) 3 .
These power series can be shown tonsatisfy the following equality:
y2 = x3 _ E484 (q) x E864
+ 5 (q) .
Projected to IFP (via reduction modulo �) , the above equation means that,
for the original elliptic curve equation Y2 = X3 aX b, we have + +
J
1
= - j'<I>x(j, J)
R<I>y (j, J) (VII.17)
These computations take place in IFP . For the original equation
Y2 = X3 + aX + b,
the relations incurve
the isogenous Equations
in Equations (VII.11)(VII.15)-(VII.16),
define values of theE4 (q),similar E IFP . For
E6 (q)relations
a = - E448(q£) ' b = E864 5 (q£) (VII.18)
define values of E4 (ql), E6 (q£) E IFP .
VII.4. FACTORS OF DIVISION POLYNOMIALS: ODD CHARACTERISTIC 127
The
tion (VII. first term of
1 4)by, where the right-hand
j'computation. side of this equation is given
is obtained from Equation (VII. 9) . The remaining by Equa
terms follow
Over C,under direct
if theconsideration
lattice corresponding
£-isogeny is given byto the curve is w1Z + w2Z, then the
C/(w 1 Z + w2 Z) -----+ C/(w 1 Z + £w2 Z)
z f------+ £z.
Reducing
curves overeverything
IF namely modulo
Y 2 the prime ideal � gives us the two £-isogenous
= X + aX + b and Y 2 = X 3 + aX + b. In addition,
3
the Instead P
finite fieldof theisogeny is the reduction modulo � of the complex isogeny.
isogeny above isogeny, Schoof [142] finds it easier to work with the
C/(w 1 Z + w2 Z) -----+ C/( � w 1 Z + w2 Z)
z f------+ z
for which the corresponding Weierstrass equation of the isogenous curve is
Notice that this curve is isomorphic to the one with coefficients
isogenies have the same kernel, and the preceding computation of p1 is stilla, b, the two
correct.
8J (z) denote the Weierstrass function associated with the lattice L for
the Letoriginal curve, so
1 '"' ( 1 2 - 21 ) = 1 + L...J� Ck Z2k (VII. 20)
8J ( z) = z + L...J
2 (z - )
wE L ,w o;i O W z k= l
W
2
and
Ck = (k 2)(2k 3 k�- 2 CjCk- 1-j , k � 3. (VII.22)
_
+ 3)
The
using function
the 83
curve for the
coefficients isogenous curve is computed in a similar
.£4 a and .£6b. The analogous coefficients ck are
manner,
then
(VII.The2defined,
2).crucialusing a recursion similar to that given in Equations (VII. 2 1)
observation, [142] , is that if F.e, ( x) is the polynomial with roots
corresponding to the x-coordinates of the kernel of the isogeny,
1
C/ (w 1 Z + w2 Z) -----+ C/( :e w 1 Z + w2 Z)
then F.e, satisfies the equation
z£- 1 F.e, ( SJ ( z)) - exp (- 2P1 z2 - �
_
1 � ck - £ck z2k+2) . (VII.23)
(2k + 1) ( 2k + 2)
Thus, from a, b, .£4 a, and .£6b, we obtain the sequences ck and ck using the re
cursion in
the coefficients Equations (VII.
of F.e,(VII. 2 1
(x) 2can3) and)-(VII. 2
be determined2). From these sequences
bylikeexpanding and
thez. functionsp 1 , in turn,
on both
sides of Equation comparing powers of Let w z2 , and
=
letexpanded
A(w) denote the function on the right-hand side of Equation (VII. 2 3),
as a power series in w. Also, let C(w) SJ (z ) - w - 1 2:: � 1 ck w k ,
= =
and, for an arbitrary power series B(w), denote by [B(w)L the coefficient of
wi in B(w). If F.e, ( x) x d + L: f�t F.e,,i x i , then the coefficients of F.e, are given
=
by the following recursion, where we set F.e,,d 1 and =
fordetermine
1 ::=; i ::=;thed. desired
Notice that at most dUsing
coefficients. termstheof above
each expansion
recursion, aretheneeded
first to
few
coefficients (from highest powers) of F.e, are given by
P1
2i ' c - .£c .£ - 1
P 1 1 - -c ,
8 pf c12- .£c -2 c 1- .£c .£ - 1 .£ - 3
- 48 - 2 30 2 + Pl 1 24 1 - -2-C2 + -4-C1P1 ,
The
inators calculation
in thelargeformulae of the coefficients of F.e,
above dothenotsizevanish. over IF
ThisP requires that
canof abedenominatorthe denom
guaranteed inif ptheis
sufficiently that it exceeds of any factor
formulae. Noting that the ck (or ck ) are required only for k ::=; d O(logp), =
VII.4. FACTORS OF DIVISION POLYNOMIALS: ODD CHARACTERISTIC 129
that
and the largest
that the other factordenominators
of a denominator involve above
only associated
small prime with ck is 2k + 3,
divisors of order
0(.£)condition
this (as they allis amply
arise from factorials
satisfied for theoflarge
numbersfieldsupIF toused.£) , wein practice
conclude(after
that
all, if P
p is small, no sophistication is needed to count points over IFP ). This
requirement
ilardescribe will
techniquesLercier'be
to largeproblematic, however,
finite tofieldsdealofwith if an
smallfieldsattempt
characteristic.is made to apply
In Section sim
VII. 5
wegeneral s method of characteristic two. More
andTheare techniques
briefly
contents
for smallin Section
discussed
of thehowsection
characteristic
VII.11. are described by Couveignes [33],
are nowF.e, (summarized indivision
algorithmpolynomial
form to
indicate more
f.e, (x) is computed.directly the factor x) of the .£th
ALG ORITHM V I l . 3 : Division Polynomial Factor F.e, (x)
INPUT : An elliptic curve E y 2 = x 3 +ax+b over IFP :
and an Elkies prime .£.
OUTPUT : A factor F.e, (x ) of degree d = £; 1 of f.e,(x ) .
1 . Compute j = j(E) from Equat ion (VI I . 8) .
2 . Compute E 4 (q) and E 6 (q) from Equat ions (VII . 1 1) .
3 . Determine j' from Equation (VII . 9) .
4 . Set J +-- a root of <I>.e, (x, j) in IFP .
5. Compute J' from Equat ion (VII . 17) .
6 . Compute a and b from Equat ions (VII . 16) .
7 . Compute E 4 (q.e, ) and E6 (q.e, ) from Equat ions (VII . 18) .
. ,, _ ,,
8. Compute �- J
.e _ 1 from Equation (VI I . 14) .
J J
9 . Compute p 1 from Equat ion (VII . 19) .
10 . Compute ck and ck for d from Equat ions (VII . 2 1 )
k�
and (VII . 22) .
1 1 . Obtain the coeff ic ients of
in Equation (VII . 24) .
( ) from the recursion F.e, x
12 . Return ( ) F.e, x .
Incurve.StepIn4,most a rootcases,
of <I><I>.e, (.e,x,(x,j)j)ishaschosen
two as J, theroots
distinct j-invariant
in IF , of theeitherisogenous
and choice
will 2
P
p 0 (mod .£) , which can only happen
ifIF p. produce a correct
isIn athesquare in IF.e, , F.e,there
. Whenmayt be- 4either just one root, or
.e + 1 roots in
the P procedurelattermightcase,faiagain, l to any roota factor
produce may beF.e,chosen.
, e. g ., in Oncasesrarewhere
occasions,
some
denominator
<I>cannot bein the
tried.computation
.e, (x, j)bemaydetermined Ifusingall roots vanishes.
fail in the Insamesuchfashion,
cases, thea different
trace root of
modulo .e
this procedure (see [142] for a discussion of some
130 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
of theseroot),singularities).
first with random However,
curves the likelihood
over very large offinitethisfields,
occurring
is (even forlow.the
extremely
Inpolynomial
any case, F.e,in(x)a practicalproduced implementation,
by the algorithm it isis indeed
a goodaidea to check
factor of the that the
division
polynomial f.e, (x).
Example. Consider the curve over IF13 1 defined by
Y2 X3 + x + 23,
=
and computations
All assume a factorin theof theexample divisionarepolynomial
modulo 131.f.e,, From
with £the computations
= 5, is sought.
indicated
and j' in Steps
66. The 1-3 above,polynomial
modular we obtain<1>j(x, y)78,fromE4 (q)Section83,111.E68(q), reduced91,
= = =
II
�
J
- £---::-;- 2,
J
=
and
110 then,thenfrom
is Equationderived.
immediately (VII.19),Forp1 this42.example,
= The coefficient
we only Frequire
5,1 -pthei /2first
= =
term from each of the sequences ck and ck , namely, c1 -a/5 26, and
c1 -a£4 /5 110. Finally, from the formula for the coefficient F.e,,d_2 , we
= =
= =
Analysis
ity is 0(£ [81] 3 of the
) operations computation in Algorithm VII. 3 reveals
in IFP (using naive arithmetic), or 0(£ ) (using fast that 2 its complex
methods)
steps of theof SEA . These estimates are within the complexity bounds of the
algorithm wherecomputational
F.e, is used. Thisinvestment makes thethatdescribed con
struction F.e, ( x) a worthwhile
intended complexity gains over Schoof's original algorithm. This satisfactory achieves the
VII.4. FACTORS OF DIVISION POLYNOMIALS: ODD CHARACTERISTIC 131
assessment
and their assumes, have
coefficients however,been that
reduced the modulo
modular polynomials are available,
p.
As mentioned
modulo primes p,
intheirSection 111.8, although the modular polynomials are used
computation is done over C, and the integers involved
can growsinceextremely
dition, presumably large,themakingpoint thecounting
computation
algorithm a daunting
will be task. In ad
implemented
toform.run Therefore,
with varyingalthough values theof complexity
p, the polynomials of are oftenVll.3storedis acceptable,
Algorithm in integer
for sufficiently
modular large values
polynomials may beofinfeasible.
p the 'precomputation' step of obtaining the
ular Thepolynomials,
situation canwhosebe significantly
coefficients improved
do not grow byasusing variants
rapidly. One ofexample
the modis
given
was by Miiller'insSection
described variant 111.8.
G.e, (x, The
y) ofderivation
the modularof F.e,polynomials
based on [110] , which
these polyno
mials slightly
differ is described from next.
those The
of this emphasis
section, istheon underlying
the computational
theory steps quite
being that
similar.
the Notice thatcomplexity
computational once the ofmodular both polynomials
methods is moduloOtherarealternatives
similar. p available,
for the modular polynomials are described, for instance, in [108] and [40] .
VIl.4.2. Using Miiller's modular polynomials. We only derive the coef
ficient
the Assamepbefore,
1 ofmanner
the previous
as above. section. The other coefficients are derived in exactly
defined over IF itareis assumed
given, that theis coefficients
where a large prime.a, b of an elliptic curve E
Also, all the following
calculationsdefined P
are performed p
modulo even though the quantities involved are
p,
originally
thesisWe[110] over C. We just give the formulae, closely following Miiller' s
, where full explanations and proofs can be found.
first compute a root, g, of the polynomial G.e, (x,j(E)) given in Sec
tion
prime.111.8.We Suchset a root must exist since we are assuming that £ is an Elkies
E4 = - 3a , -E6 = - 2b ,
-
We then compute, on setting j = j(E),
D9 g ( :x G.e, ( x, y)) (g, j),
_ f'D; .
RD": J
VII.5. FACTORS OF DIVISION POLYNOMIALS: CHARACTERISTIC TWO 133
tocase.theFrom
equation of the isogenous curvecurves,Ea� , as we have a� = 1/Jmustin thisbe
obtained the
about knowledge
therelating of the
pointsanofisogeny two
the kernelwithtotheobtain sufficient information
F.e, (ofx).its kernel is given by
A key
the application result ofrefinement
Velu's Theorem points
( [160] , [80] ) for fields of characteristic two.
The theorem
ofelliptic
the isogeny is a
in terms of Theorem
of theRkernel. 111.11,
Recall giving an explicit
that forlet aPxsubgroup construction
of the
Rdenote,
curve, we set R* = \ {O}.
respectively, the x- and y-coordinates of a point P. As before, and Py
T HEOREM VII. 4 . Let R be a subgroup 2 of odd order of an elliptic curve Ea6 •
Define a� a5 + = l: s ER * (Sy + (Sy ) ). Then, there exist isogenies between Ea6
and Ea� , of kernel R. One such isogeny is
cf> p ( x, y) H (x + L (p + S) y + L (p + s)y) .
: = x'
SER* SER*
isogenyIn ourcannot
application,
be of course,
derived directly theinsubgroup
the manner is notof the
knowntheorem.
and hence On the
the
other hand, a�in the
is exploited is known,
followingandtheorem,
Theoremwhich VII.4 follows
providestheuseful information
formulation in [82]that.
T HEOREM VII. 5 . Let Ea6 and Ea be two isogenous elliptic curves defined
over IF2n , such that the isogeny cf> �Ea6 Ea� is of degree £, an odd integer.
: ---+
"' .
xdQ(y'ci6/x) � =
ya� (Vei6) dP(x),
or, by applying the change of variable x ---+ yfa6/x,
xdP(y'ci6/x) _ij<i6 =yslaf_u,6 (Vei6) dQ(x).
To facilitate
Lercier. Hence reference
the to theQ(x),
polynomial sources,of degree
we haved inpreserved
Theorem theVII.notation
5 , will of
be
equated to the sought factor F.e,(x) of the division polynomial f.e,(x).
The details
applyingisVwritten of
elu's Theoremthe proof can be found
and the curvefor addition in [80] and [85] . It follows by
law.of The kernel C of the
isogeny as { O} U U 6 -6, a subset 6 size d, whose points
exhaust all distinct x-coordinate values of points in C. Notice that, since £
VII.5. FACTORS OF DIVISION POLYNOMIALS: CHARACTERISTIC TWO 135
isThus,
odd, using
the point
the of order two
addition law isfornotpoints
in C,onandthethuscurve, and
an 6 are with
isogeny disjoint.
-6
the
given kernel can be expressed as
(x, y) H x 1+ � (x -S;x)2 ) y + � ( (xy+x 2
+
x2 ) Sx ) .
- Sx)2 (x - Sx)3
(
<P ( '
The first part of the theorem follows, after considerable detail, by letting
Q(x) = TisE 6 (x - Sx) (compare with Equation (VII. 5 )). It follows that Q(x)
divides
The thesecond
.£th division
part of polynomial,
the theorem f.e,(x).
follows by observing also that cf> [ 2 ] =
¢, where
[2] a� they
o the subscripts on the pointalsomultiplication maps indicateo a 6
the
curve
which take place in. This observation leads to the following corollary,
of the provides
polynomials constraints that will eventually lead to an explicit construction
Q(x) and P(x).
C OROLLARY VII. 6 . With the notation of the preceding theorem, the polyno
mials P(x) and Q(x) must satisfy the conditions
xd Q(x + y'ci6/x) = Q(x)P(x), (VII.25)
and
(x + ffei6) P (x + y'ci6/x) = xP(x) 2 + �Q(x) 2 , (VII.26)
where P(x) = JP(x2) and Q(x) = jQ(x2), i.e. the polynomials whose
coefficients are the square roots of those of P(x) and Q(x) respectively.
The following corollary
(see [80] for a proof). follows from Theorem VII. 5 and Corollary VII. 6
C OROLLARY Vll. 7 . Let P(x) = l:,f=o Plxi , Q(x) = l:,f=0 qrxi , a = � and
(J = �- Then
qd = 1 qi = VcY ( vt::a.) d- 2iPd- i i E
, , {O , 1 , . . . , d} ,
. (VII. 27)
W
and
Pd = 1, Pd- 1 = a + Po = \Ja2d- 1 (J ,
(3 ,
PL1 + apd- 1 + a2 if d is odd,
{ (VII. 28)
Pd-2 =
PL1 + apd- 1 if d is even. )
Recall that the
are in IF2Comparing coefficients of the polynomial P(x) (or, equivalently,
Q(x))
n and that, by the preceding corollary, p0, Pd-2 , Pd- l and Pd are
known. the coefficients that arise from an expansion of Equa
tion (VII. 26), and eliminating the qi coefficients using Equation (VII.27),
136 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
Pi- + bKPK + CK = 0,
with
efficients bK EPi·IF2Thus, n , andCKCKisa Jr-determined.
polynomial function The of previously
quadratic equationJr-determined
has solutions co
expressed as
PK = 'TrK-l bK + /K,
where /K can beThiswritten
Jr-determined. solution explicitly
introduces as aafunction
new of bK variable,
Boolean and CK and 7rK is· thus
It is
noted in [80] , however, thathasthesolutions,
conditionveryTrq1often
2 (cK /ballows�) = 0, which must hold
-l
if'older'
the quadratic
variableslowly equation
'Tri , i withK-1.
< Thus, for
the number of 'active' Boolean variables eliminating an
grows
logarithmic rather in(VII.
K. After K. In [80] , this growth is heuristically estimated as
PK is Jr-determined, Equation (VII.29) with k = K
and Equation 3 0 ) with k = K +1 are used in turn to 7r-determinepd- 2 K -l
and Pd-2K_2 , respectively. This part is similar to the iteration in Method 2.
138 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
2
generator g for IF£2 , and then computing Ir = g i (£ - 1 l /r , where i E {1, . . . - , r
1} is coprime to r.
VII.8. THE ATKIN PROCEDURE 141
Enumerating
t (mod obtained fromfor theIr weequations
.£) . These allarepossibilities obtain a set of possible values for
t = A + µ (mod .£) , q = Aµ (mod .£) , and Ir = A/µ.
ToWriteshowIF the= simplicity of the technique, the steps will be explained
A = X 1 + Vdx and I = 91 + Vd9 , for a quadratic
in detail.
non-residue £2 dIFE£ [Vd],
IF£ . The values of x 1 2and x2 rare not known,2 but the possible
values for 9 1 and 9 2 are. Since µ is the conjugate of A we have µ = x 1 - Vdx2 ,
from which the following equation is derived:
+ Vd
91 92 Ir -µ - = = A = A 2
Aµ
q (xi + dx� + 2x 1x2 Jd) .
�
Hence
qgl xi + dx� (mod .£) ,
qg2 2x 1 x2 (mod .£) ,
q xi - dx� (mod .£) .
Hence, xi = q(91 + 1) /2 , from which at most two possible values for x 1
can be derived. The required value of t (mod .£) is then obtained from t
2x 1 (mod .£) . An expansion of the Atkin section of Algorithm VII. 2 (Steps 10-
11) is given below, for a fixed Atkin prime .£. as follows:
ALG ORITHM VII.4: Atkin Procedure.
INPUT : A curve E over a finite f ield IFq and a prime .£.
OUTPUT : A pair (T, .£) , T the set of the possible traces t (mod .£) .
1 . T +-- {} .
2 . Determine the splitt ing behaviour of �£ (x , j ) in IFq .
3 . Determine r using Proposition VII . 2 .
4 . Determine a generator 9 of IF£2 = IF£ [ Jd] * .
5 . S+-- { 9 i (£2 - l ) /r : (i, r) = 1 } .
6 . For each Ir E S do :
7. Write Ir = 91 + Vd 92
8. z +-- q(91 + 1)/2 (mod .£) . ·
For each Atkin prime .£, a set T = {t1 , . . . , t (r) } of possible traces mod
q, ui
E
ulo .e is obtained. In many cases r is a relatively small integer making the
142 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
search described
conscious reader later
will for theundoubtedly
have exact valuenoticed simpler.that,However,
even ifthethecomplexity
sets T are
relatively
grows small, the number
exponentially with the ofnumber
possibleofvalues
Atkin ofprimes.
the traceThisonenumber,
needs toin check
turn,
could
means bethatabout
if the onealgorithm
half the processes
number ofallprimes the considered,
Atkin primes orencounters,
it O(logq). This the
complexity
A way is, inof effect,
out this exponential
problem, from ina logcomplexity-theoretic
q. point of view, is
topolynomials
just use Elkies
of primes.degree,
higher However,
which thisis inimplies
itself ahaving
problem. to dealSo thewithbestmodular
prac
tical the
only compromise
' b est' Atkinis obtained
primes bye. judicious
(i. those use small
giving of thesetsAtkinT) procedure,
are retained, where
and
the overall
search for sizeexact
the of thevalueset ofof thepotential
trace traces the
among is bounded.
candidates Indefined
addition,by thethe
Atkin
cedure algorithm
described can
in be next
the significantly
section. accelerated
Thus, for by meansvalues
practical of aofBSGSlog q, pro
the
Atkin procedure
increases, the still playsof Elkies
proportion a usefulprimes
role inusedtheneeds algorithm,
to although
increase, to as log q
maintain
athecomputational
end of Section complexity
VIl. 1 0, forbalance.
a fairly Anlargeexample
value oflogthisq.trade off is given at
of
valuesNext,obtained
we showfromhowthetoElkies combine thetoAtkin
primes, information
determine the exactwithvalue
the ofexact
the
trace of Frobenius, and hence the group order of the curve.
VIl.9. Combining the Information from Elkies and Atkin Primes
Atingthis
a point we have
sufficiently largecompleted
number ofdown
primes to has
Stepbeen13 ofconsidered
AlgorithmtoVII.satisfy
2 , assum
Step
2. Itinformation
the remains to gathered.
complete theOuralgorithm
exposition bywillfinding thethatexactgiven
follow valueinoftMiiller'
froms
thesisThe[110]
data .
from the Elkies primes is combined via the CRT, to determine
two numbers t3 and m3 such that
t t3 (mod m3 ) .
Here, m3 is the product of all the Elkies primes used. The set of Atkin primes
ispossible
dividedtraces
into two sets thesuchrespective
that eachmoduli.
set givesAgain
roughly thethesameCRTnumber of
two modulo using
sets in turn, we determine two moduli mi and m2 and two sets Si and on these
S2 such that
t t i (mod mi ) with t i E Si ,
t t2 (mod m2 ) with t2 E S2 .
VII.9. COMBINING THE INFORMATION FROM ELKIES AND ATKIN PRIMES 143
Clearlyandmi,Elkies
Atkin m2 and m3 are pairwise coprime. It will be assumed that enough
primes have been taken so that
m i m2 m3 4-Jq.
>
Since
exactlyl t l ::=; 2-jq, if t (mod mim2 m3 ) is determined then we will have found t
and hence theofgroup order.determined by the type of space/time trade
The exact value t is now
off seen in the BSGS. Note that we can write
=t t3 + m3 (m i r2 + m2 ri )
for some integers ri and r2 with
ri t i - t3 (mod mi),
m2 m 3
t2 - t3 (mod m ),
T'2 mim3 2
where t t i (mod mi) and t t2 (mod m2 ). But the exact values of t i and
t2 are not known; all that is known is that they come from the finite sets Si
andAlthough
S2 .
the aboveaboutformulae give ri sizes
and ofr2 rmodulo m i and m2 , they
say nothing whatever
following lemma is available: the required i and r2 . Fortunately the
LEMMA VIl.10. If we choose
then l r2 I ::=; m2 .
PROOF. Using the above equation it is seen that
r2 =
1 (t - t3 - m2m3 ri) .
mim3
--
Hence,
<
1 ( l t l + l t 3 I + m2 m3 l r i l )
mim3
--
2-jq + 2._ + m2
<
m i m3 m i 2
m2 + -
- <
1 +- m2
2 mi 2 '
since mi m2m3 4-Jq. > D
The group
we must have order of our curve is + 1 - t, and so for any point P E E(IFq )
q
144 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
ItA random
should now be
point, clear how to proceed to determine r1 and r2 , and hence t.
P, is chosen on the curve, which does not have an obviously
small order. For
ofthatr1 l r1 I (t1 -lmi/2 every possible value of t 1 (mod m 1 ) the corresponding value
t3 )/m2 m3 (mod m 1 ) is computed. Taking the value of r 1 such
::::; J, compute
= Qr 1 [q + 1 - t3 ]P - [r 1 m2 m3 ]P
and store the value ( Qri , r1 ) in a table which is sorted on the Qri . This table
beis sorted
thought so ofas asto the
Weofnowt isproceed
allowtablefor easy
with
tablephase
creation lookupof the
theandanalogue
in thebabyfollowing
steps
of the giant steps.
phase.
in BSGS. This can
Eachr possible
value 2 taken in turn the corresponding
t3 )/m 1 m3 (mod m2 ) is computed. We will need to take all such values of
value of 2 (t2 -
r2 in the set { -m2 , . . . , m2 }. The points
= Rt2 [r2 m 1 m3 ]P
are computedearlier.
computed and itIf isso,checked
then wewhether
have Rt2 is one of the elements in the table
determined a pair of ' m atching' r1 and
r2 . This pair allows the determination of a possible value for t , which in turn
gives a possible value for the group order, m.
curveThispoints, groupasorder discussedcan then be checked
in Section VI. 2 . to be correct by means of random
VII. 10. Examples
Example 1 . The number of points on the elliptic curve
E : Y2 + XY X 3 + 1
=
over
only the
is it finite
quite field
small IF26 is computed. This is a contrived example, since not
but in addition the number of points could be computed
from a recurrence
trivially, relation, once the number of points in E(IF2 ) (which is,
4) has been determined. It is nonetheless instructive.
needFirst, notice that Hence
be determined. only thethetrace
tracemodulo
moduloathenumber
primeslarger
2, 3, than 7 is found.32
5 and4.J64 =
£number.
= 2. SinceHencethetcurve1 (mod
is not2)supersingular
. we know that the trace is an odd
£factors3. The
=
over prime 3 is an Atkin prime, since the modular polynomial <I>3 (s, t)
IF26 as a product of two quadratic polynomials. The method for
Atkin primes with r 2 is then applied. Hence there is only one possibility
=
VII.10. EXAMPLES 145
The
Elkiesfourandoddtwoprimes
Atkin lessprimes.
than The 13 aredatausedforandthe itElkies
is found
primesthatis there are two
Prime Eigenvalue Trace
117 41 57
The data for the Atkin primes is summarized in the table
Prime
35 32 r-Value Possible Traces
1 or0 4 £
Usingmodulo
trace the method 8 is for determining
given by 1. the trace modulo 2 , it is found that the
Putting
various randomall thispoints
information
on E(IF together,
0 ), it is and that
seen testingthethetracepossible
is tracesto 1041.
equal with
Hence the group order is equal 22 1047536. Such an example as this takes well
to
under a second to determine
of the group order takes over ten seconds. the group order, whilst a brute force enumeration
146 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
Example 3.
use in cryptography. This is We a more takechallenging
the curve example, which is still too small for
E : Y2 X3 + 1150871587567420791922262222331X
=
+ 541310902418759379329983067119
over the field of
p = 1267650600228229401496703205653 = 2 100 + 277 el
ements.
primes and Using
ten all theprimes.
Atkin primesTheup data to 41wewesummarize
find that below;
there arefirstfourthe Elkies
Elkies
primes,
1319 Eigenvalue
Prime -6- 2 Trace 83
2943 -13 18 36 24
and now the Atkin primes,
Prime Possible
23 11 or 2 Traces
57 01,3,4 or 6
1117 53, or6, 8,6 9, 11 or 14
2331 3,2, 5,10,7,138, or9, 10,21 12, 15, 16, 19, 21, 22, 23, 24, 26 or 28
3741 9,1, 2,10,8,15,9, 10,26, 12,31 or14,3215, 18, 19, 22, 23, 25, 27, 28, 29, 35 or 36
Putting all this data together we find that the group order is equal to
1267650600228229462216521077879
which is
13 · 97511584632940727862809313683.
Example 4. Here, we consider a 'real life' curve over a very large field of
characteristic
tion 1. 3 , this fieldtwo, JF2 43 1 . In
size probably fact, recalling the key
exceedsparameters length
the security comparisons
requirements of Sec
ofinmost
cryptographic
amplerun23onin the applications.
the Appendix. The curve and order are listed
Thecurve.SEA algorithm, using Lercier's improvements, Ex
was First,of theSection twist of the
valueVII.of6the. Then,
trace primemodulovalues
64 wasof £determined using the techOf
niques
them, the following 22 numbers were found to be Elkies primes, and the trace � 3 were considered.
VII . 1 1 . FURTHER DISCUSSION 147
byforbeingaasignificant
of the sameconstant
asymptotic
factor. complexity
The second as Couveignes
Lercier's, butalgorithm
field of characteristic p, the pkth division polynomial is a pkth power
in practice
notesslower
that
148 VII. SCHOOF'S ALGORITHM AND EXTENSIONS
_ -
cf>(X) FGR2£ (X)
= =
(X ) A(X) (mod fpk (X)) .
Knowing the
this equationsought,polynomial A( X) and the division polynomial factor ]pk (X),
can bebysolved fortheG£Berlekamp
(X) and F£ (X) , the factor of the division
polynomial
algorithms. either
k
[9] or extended Euclidean [61]
Of course, E[p ] may not be rational and the interpolation to
find A(X) must be done over an extension field. In addition it is required to
offindtheprimitive
algorithmpk-torsion points.in Further
can be found details on these and other aspects
[84] and [33].
CHAPTER VIII
Generating Curves using Complex Multiplication
The CM
offorcomplexmethod of
multiplicationcomputing elliptic
ofoverelliptic curves
curves over a finite
overprime field
the rationals. uses the theory
The method
finding
described elliptic
in this chapter.curves Thedetailsa field of large
case ofcancharacteristic twocharacteristic will
follows with some be
minor modification,
outlineoriginally
will be arose and
giveninbelow. the The main ideasbe found
for curvein [73] , although a brief
the largebasedprime characteristic
case the context of the elliptic primality proving
bealgorithm
found in(see[107][7] . and Chapter IX). An accessible account of the method can
VIIl. 1 . The Theory of Complex Multiplication
Only a consult
should brief outline
a of thesuchtheory
book, as will be given here. The interested reader
[148] or [29] , for the details. As remarked
earlier two elliptic
j-invariants are curvesIn discussing
equal. are isomorphic over thetwoalgebraic
j-invariants special closuregiven
cases, if theirby
j Given
= 0 and aj complex
=1728, j-invariant
need to be ansingled out.curve over C, with this j-invariant,
elliptic
can be written down using the following rule:
•If j 0 then use
=
E : y2 X3 - 1.
=
E : Y2 X3 - X.
=
E : Y2 X3 - 3cX + 2c.
=
Compare thisthewithringLemma
Consider of VIII. 3 below. End(E), of a curve, E, defined over
endomorphisms,
anEnd(E)
arbitrary fieldis equal
either K. As mentioned in Chapter III, if E is not supersingular,
to Z or is equal to an order in an imaginary quadratic
number field
number field.thenIf End(E)
the curveisisequal
said totohave
an order
CM. Inin such
an imaginary
a situationquadratic
149
150 VIII. GENERATING CURVES USING COMPLEX MULTIPLICATION
1lwhere
is T isso-called
the
part)Theoftheory
a complexPoincare
the complex
algebraichalf-plane,
number ofthedegreeuppertwo,halfsuch(positive
that T Eimaginary
plane.multiplication and j-invariants are linked, at least
1l, where
of complex
for the moment in the case of characteristic zero, via the result
T HEOREM VIIl.l. Suppose T E 1l, with T a complex algebraic number of
degree two. Then when we set ET = C/(Z + 'LT) we have
(T) = Tj)(EisT)anisorder
(1)(2) jEnd(E in Q(T), hence ET has complex multiplication,
an algebraic integer.
how Itsurprising
is the latterit seems
of theseat first
properties
sight; which
j(T) isshall
defined be exploited
by the below.series
Fourier Noticein
Chapter
algebraic III,integer?
so why should its value at a complex quadratic number be an
The main theorem is the following.
T HEOREM VIII. 2 . Let T E 1l be a complex quadratic number with discrim
inant -D. Hence -D is the discriminant of the primitive positive definite
quadratic form Q(x, y) which has T as a root of Q(x, 1) = 0. Let hD denote
the class number of the order of discriminant -D. Then j(T) is an algebraic
number of degree hD and its minimal polynomial is given by
HD(x) = Il (x - j(a))
where a runs over all complex numbers such that (a, 1) is a zero of one of
the hD inequivalent primitive reduced forms of discriminant -D.
If
K, then Z[ T ] is the maximal order of some imaginary quadratic number field,
isextension
an extension of K of degree hD· In fact it is the maximal unramified abelian
The Galoisofgroup
K. Sinceof H is Galois over K we can consider its Galois group.
H over K is isomorphic to the class group of K. By
definition,
everyIn ideal H is called the Hilbert class field of K; it is a field under which
in Z[ T ] becomes principal when considered as an ideal in ZH.
maximal theorder
rest ofofthissomechapter it willquadratic
imaginary be assumed, as above,
number field thatsoZ[T-D] is will
and the
represent a fundamental
orshall0 modulo discriminant. Hence -D is a number congruent to 1
4 and no odd prime divides D to a power greater than one. We
refer to d as the square free positive integer such that Q(T) = Q( y' -d),
in other words if
It will betheorem.d 3 (mod 4) then D = d, otherwise D = 4d.
requiredIntoparticular
compute wethewillHilbert class polynomial, HD(x), of the
preceding need to compute, to
the values of j (T) for various T E 1l. As noted in Chapter III we can computehigh precision,
VIII.2. GENERATING CURVES OVER LARGE PRIME FIELDS USING CM 151
whereThetheabove
sumisisaover
very thegeneral
same outline
set of values
of the ofglobal
a as theory.
the aboveTo product.
look at what
happens
will be over a finite
assumed for field we need
simplicity that towelocalize
are all the above
interested in constructions.
curves defined It
over
IFP , where is a large prime number.
p
order Weofwishdiscriminant
to construct-D.a curve This over IFPimmediately
means with complexthatmultiplication
we are not bygoingan
tois contained
construct supersingular
in IF so a elliptic curves.-D isThesought
discriminant j-invariant
for of suchthe aHilbert
which curve
polynomial P
HD(x) has a root modulo p. So the field tower Q K H will c c
collapse
the locally to either QP or a quadratic extension of Q P . In the latter case
caseIfprime p is inert in K, whilst in the former it splits (we shall ignore the
oftheramified primes).
primebypZ[.J=]5]
is inert .then there are which
no curves modulo p with complex
multiplication
Hilbertweclasslookfieldfor ais principalThus
trivial when a prime
considered splits in p and for which the
locallyp. at p is needed. In other
words So ideals
given which ideal of K of norm
D we wish to know which prime numbers, p, split in K into
prime
expected are principal. Roughly 1/(2hD) of the primes would be
Such atoprime
have willprincipal,
be onedegree one ideal
for which divisors. equation
the diophantine
4p x2 + Dy2
=
can
which be solved.
essentially This equation can
computesIttheis easy be solved
continued by the
fraction method
expansion of Cornacchia,
of the square
root of a given rational. to see that solving 4p x2 + Dy2 is
=
equivalent to solving p u2 + dv 2 and this task can be accomplished with
=
the following method:
ALG ORITHM VIIl.1: Cornacchia's Algorithm.
INPUT : A square free integer d and a prime p .
OUTPUT : A solution to p = u2 + dv 2 , if one exists .
1 . Let p/2 < x0 < p be a solution to x 2 -d (mod p) .
2 . p +-- qoxo + x 1 , +--
3. k 0.
Unt il x� < p ::=; xL 1 do :
4 ·
Xk f- qk+l Xk+l + Xk+2 , f- + 1 . k k
5. u +-- xk > v +-- J(p - x�)/d .
6. If v E Z return ( u, v) , else return ' No Solution ' .
Torithmapplyfindsthisa pair
we can(x, y).repetitively try
By ouris found. prime numbers until Cornacchia' s
previous comment, we expect to try 1/(2hD) algo
primes before a suitable one
Given such a triple (x, y, p), compute
m = p + l ± x.
These are going to be the possible group orders of the elliptic
which we will try to construct. It can then be checked whether m is suitable,P curves over IF
VIII.2. GENERATING CURVES OVER LARGE PRIME FIELDS USING CM 153
innumber
that itk hassucha that
largepkprime1 (mod
factor, is) not
m , the equal tosetp and
criteria there
forth in is not aV.small
Section 7 .
pointsTo onexplain
the curvewhy is equal
m is chosen
to in this manner, recall that the number of
m = p+ l - t
where t is the trace of Frobenius.2 Recall2 that t = a + a, where±(x+FJ5y)/2
a is an element
ofnormp in K. A solution to x +Dy 4p means that
= a =
istherefore
an element be of orders
the norm p,ofwith
the trace equal
elliptic curvetoand±x.its The p + 1 ± x will
orderstwist.
quadratic
curve ForovertheIFfieldwithIFPgroup
and aorder
group order
The m,
main itideais required
is to build
contained in the anfollowing
elliptic
lemma. P m.
LEMMA VIII. 3 . The following hold for elliptic curves over IFP .
Every element in IF is the j-invariant of an elliptic curve over IF .
If D 4 then all Pelliptic curves with given j-invariant, j =J. 0, P1728,
•
• >
over IFP are given by
Y 2 X 3 + 3 k c2 x + 2 k c3
=
where c is any quadratic non-residue in IFP . This means that if the j-invariant
ofcana curve
be over IFdown.
written P withChecking
order canwhichbe constructed,
m
one has the then twoorder
correct candidate
is then curves
done
by means
fact, the of randomly
problem here chosen
is curve
slightly points,in that
different, as discussed
we have intheSection
order VI. 2need(in
and
to distinguish
candidate groupbetween
orders curves,
for one ascurve;opposed
the to havinghowever
method to distinguish
is the between
same).
be andThe problem
the j-invariants has hence
of an been
elliptic reduced
curve to
over computing
IF with which
given j-invariants
number of can
points
m complex multiplication by thebe maximal P order of Q(y'-D). AsHilbert
was
seen above,
polynomial HD (x).such j-invariants must the roots, modulo p, of the
154 VIII. GENERATING CURVES USING COMPLEX MULTIPLICATION
with order m. are (mod p) also give rise to elliptic curves over IFP
E" : y 2 = X 3 + 226037567835338611569192198897X
+ 150691711890225741046128132598,
2
E"' : y = X +3 470569005626771030721528558211X
+ 7331063557219604895221098683,
E"" : y = X 3 +
2 306353065106026110803105308074X
+ 204235376737350740535403538716.
In the Appendix we give a few more examples over larger finite fields.
VIIl.3. Weber Polynomials
There
produced are two problems
are soin could with the above
some besensemore' special'. Theymethod. The
will future first is
have relatively that the
small curves
classAs
numbers
a general and
principle, it isSchoof' amenable
believeds algorithm, to some
that choosingis more randomlikely unknown attack.
curves,to produce
and computing
their
which group order
are resistant via
to specialized attacks. As of butthe writing ofwide
this book, curves
therein
isthevirtually no
community. evidence to support this belief, it enjoys support
The
the Hilbert second problem
polynomials, with the above method is that to find
HD(x), have to be computed. It has been noted that
the j-invariants
this requires
precision. computing the coefficients to what can be a prohibitively large
anotherOne
ofrelationship way toofgetthearound
generator
tocoefficients Hilbert
j ( ) The advantage
T .
thisclassis tofieldcompute
is that which
thisus second
thehasminimal
a known
polynomial
polynomial
algebraic
maypreci
have
much smaller which would allow to use
sion. In this section a possible solution to this second problem is considered. a much smaller
156 VIII. GENERATING CURVES USING COMPLEX MULTIPLICATION
(
' /3 -
_
T) h(T)8 '
where (n = e 27ri /n . These functions are not all algebraically independent since
they are all related to j via the equations (see [7])
. = (h24 - 16) 3 = (hi4 + 16 ) 3 = (h§4 + 16) 3 = /23 = /32 + 1728.
J
h24 hi4 h§4
Weber
Clearly calls µ(T) a class invariant if µ(T) lies in the Hilbert class field of Q(T).
j(T) is a class invariant. However, using the Weber functions we can
determinebya WlotDmore
denoted ( class invariants. These give rise to polynomials, usually
x ), using almost the same method as we used to compute
HD ( x) . Finding the roots of these new polynomials, which will hopefully
have smaller
Atkin coefficients,
and Morain will then
[7] suggest allow us to recover
using theRemember the
following choicesj-invariant.
of class invari
ants to
discriminant produce the Weber polynomials: -D is a fundamental
and we have that d is the square free positive integer such that
Q(v-D) = Q(v-d). The following conditions are applied in turn (in other
words the condition on D being divisible by 3 takes priority).
•• IfIf DD 3 (mod 6) use µ = FJ513 (T).
7 (mod 8) use µ = h(T)/V'i.
•• IfIf dD ±23 (mod (mod 8) use µ = h(T).
8) use µ = h 1 (T)/.J2.
(mod 88)) use
•• IfIf dd 51 (mod h(T) 4 .
use µµ == h(T) 2 /.J2.
The
Inso that only problem
case here
thejustdegree is the
of Wsuch case when D 3 (mod 8) and D '=t 3 (mod 6) .
D ( x) is 3hD and not hD· This could be a problem,
one
detailed could
descriptions ignore
ofinvariants discriminants.
how to compute Atkin and Morain
the various Weber polynomials and also give
otherAsalternative
an example class
of thetheadvantage to use.
Atkin and Morain give followingthatexample:
using Weber polynomials can bring,
H23 ( x) = x3 + 3491750x2 - 5151296875x + 233753
while
VIII.4. FURTHER DISCUSSION 157
LEMMA VIII. 4 . Let d be square free and p a prime number such that we can
find a solution to the equation
p x2 dy2 ,
=
+
Iffactor
the then thispolynomial
Hilbert polynomialhascanno besuchusedfactor to define
modulo the2 extension
are Lettried.the degree irreducible factor of HD, over IF , be denoted by p(x). then anotherIF2n over IF2 .
D and n
n 2
Let
curve a denote
over a root of p(x) in IF2n . This is then the j-invariant of an elliptic
IF2n which has CM by an order of Q(y'-D). We then only need
tothegenerate
correct a curveAswith
order. given j-invariant
mentioned earlier, more anddetails
actuallyon this
test canwhether
be it hasin
found
[ 3].
7
158 VIII. GENERATING CURVES USING COMPLEX MULTIPLICATION
CHAPTER IX
Other Applications of Elliptic Curves
Incurves
thisinchapter we discuss
cryptography, a number of
namely factoring, additional
primality applications
proving of elliptic
andcentral
provingideas
the
equivalence of the
of eachinapplication Diffie-Hellman problem to the DLP. Only the
found the referencesare cited.
discussed. More comprehensive descriptions can be
IX. 1 . Factoring Using Elliptic Curves
We shall give a brief description of Lenstra's [78] elliptic curve factoring
method, usually referred to as ECM. Let N be a number which is to be
factored and
To introduce let p denote some,
theForelliptic as yet
curve method, unknown, prime
consider factor
first of N.
Pollard' s =p p- 1
method
the of factoring. convenience, assume that N is of the form N · q,
CRTproduct
) as
of two prime numbers. The group (Z/NZ)* decomposes (via the
(Z/NZ)* rv r1; x r1; .
Take
say A an(p -element
1 ) , thena E (Z/NZ)*, (pand-l) raise it to the power of a multiple of p-1,
a>- 1 (mod p) .
It can be expected that
gcd (a>.(p-l) - 1, N) = p.
Themake
wethan problem
the with this is that
assumption that wep -need
1 is tosmooth',
' know p-i.e1. allto recover
of its p. However,
divisors are if
less
some
isbyacomputing given bound, then, if a large smooth number
chance that p - 1 will divide M. In such a situation p can be recovered M is chosen, there
gcd (aM - 1, N) = p.
aMFor (example,
mod N) =suppose 2804399N and= 12628003 and we choose a = 2 and M = 20! Then
gcd (aM - 1, N) = gcd (2804398, 12628003) = 2053.
We
settingdeduce
p = the2053,factorization
we see that Np=-2053 1 = x 6151. This example works since, on
2
•
2 33 19 divides 20! and - 1 does
• q
not divide 20!
159
160 IX. OTHER APPLICATIONS OF ELLIPTIC CURVES
computed.
becomputing
found by[M(k)] If NP divides M(k) then p divides zk and a factor of N might
taking(x,gcd(z)zkas, N)some. In practice this factor will be found whilst
the The presence y,
of zero divisors inversion
in thethatringtheZ/NZ. will become impossible due to
method
ofthethecoefficients relies on the fact
group ordera andE(IFpb )·fromTherea large smooth
is considerable number
freedom M(k) is a multiple
here; weHowever,
can choosefor
prime annumbers ofcurve
between number of possibilities.
20 and 40 decimal digits one is likely to write
down elliptic
(seeTo[78]seeandwhy[89]). with a smooth group order after not too long a time
p are noted. this works efficiently, a few facts about elliptic curves modulo
IX. 1 . FACTORING USING ELLIPTIC CURVES 161
LEMMA IX.l. There is a positive constant such that a a p2 of all pairs (a, b) E
IF x IFp, with 4a3 27b2 # 0, give a curve with
P +
#Ca,b (IFP ) E
(p - y'p, p + y'p),
and such group orders in this range are distributed in an approximately uni
!arm manner.
With every
choosing a curve new elliptic
with order curve used,
in (p -integer we have a probability
-JP, p -JP) . Choosing the curve can be
+
of about a of
interpreted as choosing a random T from a uniform distribution on
(p - -JP, p -JP) . The elliptic curve method will have a very good chance of
+
finding
of dividing a factor
M(k).
of our number, with this choice of T, if T has a good chance
values The method is more likely to work for larger values of k, and hence larger
eachofonecurve.
forat least M(k). However, the larger the value of k the more work is needed
A
forvalue good
whichof kM(k)strategy
>
is to start with a medium
p. Then, if a factor is not found after a few
size value of k,
attempts,
successful. the is increased and the procedure
Usingbythis idea of increasing the value of k, the complexity of theis repeated until it is
method is given
O(Lp(0. 5 , J2)) ,
where we recall from Chapter I that the function LP is given by
LP (v, c) = exp ( c (logpr (loglogp) ( 1 - vl ) .
For numbers of the form N = pq, with p and of order .JN and N 10 80 ,
q >
the elliptic
field sieve curve method
methods, even is inefficient
though, for comparedof thisto theform,quadratic
integers ECM orapproxi
has number
mately thethesamebasicasymptotic
isusedbecause operations complexity
in ECM as thefar quadratic
are more sieve method.
complicated than This
those
in themakes
What quadratic
the sieve.the most successful factoring algorithm known on
ECM
hundred todigitbe ofnumbers
number the form ispq,thatwhere
it ispvery
and q
rareare forof roughly
a randomthe hundred
same size.digitSo
forfactors
a random
before integer
a more ofadvanced
around onemethodhundred such digits
as the ECM shouldorfindnumber
quadratic the prime
field
sieves. However,
numbers for which inpcryptography
and q do have oneroughly
is usually
the interested
same size. inHence
the types
it could of
appear This thatis notthe true;
uses oftheECM large inprime
cryptography
variations areofverybothlimited.
the quadratic and
number fieldIt sieve
procedure. is at algorithms
this stage require
that the the factorization
ECM method can ofbe numbers
applied as asome
with sub
success.
also In addition
require the it will beofseenauxiliary
factorization later that
numbers.primality Since proving
one algorithms
could expect
that any auxiliary number produced by an algorithm should be of the form
162 IX. OTHER APPLICATIONS OF ELLIPTIC CURVES
toAsThisconstruct
mentionedelliptic
previously,
curves
elliptic curve primality
ininChapter
the
provingcontextVIII,ofthea primality
CM method was algorithm.
proving
( ECPP ) method is itself based on the
first used
Pocklington-Lehmer
Pocklington-Lehmer primality
Nreplacing test
- 1 primality ( [123] , [132] ) . To introduce ECPP, the
test IFis; therefore first discussed. It is
then
powerful shown how,
primality by
test can be the group
obtained. Only by
thethe group
very basicE(IF ),
design a more
P of the
primality
further test is
optimizations,considered, leaving
improvements the reader to
and enhancements. consult the literature for
prime Assume that
testis (a[102] the number N has already passed the Miller-Rabin
, [130] ) . There is then some confidence that the number
pseudo
Nwillreally
achieve prime.
morewhich We
than this.merely want to
An outputsomeone verify this confidence.
from theelseprimality However,
proving isprogramwe
will
without be produced
them having will convince
to runorthecertificate
algorithmofagain. that the number
In other ofwords the prime,
algorithm
should
ofinformation produce
the numberprovided. a ' p roof' the primality N:
is easily verified, in an irrefutable manner, with the additional the primality
Consider the following theorem.
T HEOREM
p
e
IX. 2 . Suppose N is an integer and a prime divisor of N - 1,
p
p
with being the largest power of that divides N - 1. Also suppose that
there is an a such that
aN- l 1 (mod N)
and
gcd(a(N- l /P , N) 1.
) =
This theorem
corollary: can be turned into a primality test by using the following
C OROLLARY IX. 3 . Write N - 1 as AB where A and B are coprime, the
factorization of A is completely known and A .JN. For each prime factor,
>
p, of A we can find an ap such that
a;- 1 ( 1 mod N) gcd(a�N- l /p - 1, N) 1,
and ) =
N
if and only if is prime.
IX.2. THE POCKLINGTON-LEHMER PRIMALITY TEST 163
B
ToCorollary
of prove theIX.primality
3 and of Nforweeachneedprime
then to partially
factor factor
of A N-1an integer,
find into A andap,
which satisfies the conditions above. It does not matter how such values of
aP are found. Once found, their existence will guarantee the primality of N.
One problem
primality of thatnumber
another may bewillencountered
have to beis established,
that in factoring
and soNon.- 1This
the
gives
of oneAsrisenumber
to theissodependent
called down on run process whereby the proof of primality
the proof of primality of another and so on.
The integeran example
N - 1 hasthe theprimality
followingof factors:
N 105554676553297 will be proven.
=
N - 1 24 x 3 x 1048583 x 2097169.
=
On setting
prove the A 29 ofx 101Assume
=
primality p.
and B here358,thatwethenotice
= that ofa2numbers
primality 9 a 10 1 2 will
=
less than =
- 1 24 x 3 x 43691.
q =
Italsois need
seen that taking a3 5 and a4369 1 2 will prove the primality of We
to provecertificate=
the primality of 43691,iswhich =
is done in a similar way. q.
4369 1
257 3
164 IX. OTHER APPLICATIONS OF ELLIPTIC CURVES
isinTheneeded.
main problem
an RSA Suppose
scheme,
with
it is this method
wished
or toorder to prove is that
the
defineof an10 100elliptic
the partialoffactorization
primality
curveit scheme a modulus
over toofbeNused
-1
IFP . This means
that p could
numberwithout be
of aroundof the . Hence may be required to factor a
task a largeoneamount
hundredof computing
decimal digits, powerandavailable.
this can be a non-trivial
IX.3. The ECPP Algorithm
InN. theSincelastNsection
is the togroup
believed be (Z/NZ)* was used to prove the primality of
prime, the order of (Z/NZ)* is expected to be
N - 1. The method will work if the number N - 1 is suitably smooth, but we
could
using be working
another with a group order which is not smooth.
group which has a chance of having a smooth group order willIn this situation
improve the
Just as with situation.
thethe elliptic curve factoring method,curvetheovergroupZ/NZ.
(Z/NZ)* can
begroupreplaced with
has a chance group of points on
of havinguntila smooth an elliptic
order, with
and even if it does This
not Thislast
curvesis
can
the continue to be chosen one is found a smooth
idea behind the elliptic curve primality proving algorithm, which is now order.
discussed.
The method is due toofGoldwasser
analogue of the method PocklingtonandandKilian
Lehmer.[46] who gave the following
T HEOREM IX. 4 . Suppose N is an integer coprime to six and larger than one.
Let E denote an elliptic curve over Z/NZ. Assume that one can compute an
integer m which has a prime divisor q with
q > (Nl/4 + l) 2 .
If a point P E E(Z/NZ) can be found such that
[m] P = 0 and [m /q ]P =f. 0,
then N is prime. Note if neither of the above multiplications is possible then
a non-trivial factor of N has been found, just as with the ECM factoring
method, and so N is not prime.
suchThea point
following result implies that, once a suitable order has been found,
P must exist.
LEMMA IX. 5 . Let E denote an elliptic curve over Z/NZ with order equal to
m and with N prime. If m has a prime divisor q such that
q > (Nl/4 + l) 2 ,
then there exists a point P E E(Z/NZ) such that [m/q]P =f. 0.
All that remains is to keep producing random elliptic curves and calculat
ing their group orders until one is found which will prove the given number,
IX.3. THE ECPP ALGORITHM 165
N, is prime.
follows. Just If awithsuitable
as the point P on the ellipticmethod
Pocklington-Lehmer curveaisdown found,runthestrategy
result
can be adopted if in such a process it is needed to prove another number is
prime.Goldwasser
Schoof' s algorithm andcanKilian
be suggested
used to that astheit order
compute is veryoflikely
E(Z/NZ). that NThisis prime,
order
can
proceed thenfrombe trial divided
there. As to sees ifalgorithm
Schoof' it divisiblerunsbyina large prime timeandthisonegives
polynomial q can
ustheaalgorithm
probabilistic is a polynomialoftime
certificate the primalityoftest.N which
primality Clearlycanthebe output
checked from
in a
shorterAtkin timeandthanMorain
it took[7] tonoticed
generatethatit.it would be more efficient to use the
CM-theory
ofgroup
determining of elliptic
the curvesorderto generate
group of a the required
random curve theycurve.findHowever
a curve insteada
given
They order.first find a discriminant D for which there exist elliptic curves
over IFN ( assuming N is prime) with complex multiplication by an order
ofwithQ(this
y' D). They can then compute the possible group orders of curves
-
these groupcomplex
orders multiplication
possess a large structure.
prime It is determined
factor, q, of the whichabove.
form ( if any) of
This
may
strategy.requireFinally,
callingusing
the primality
the provingmentioned
CM-theory program recursively
in Chapter inVIII,
a down a run
curve
with thewithrequired
curve the order can
required be found, and a point can be constructed on the
properties.
the This methodof numbers
primality has been with implemented
over one and is verydecimal
thousand successful.digits.It canHowever,
prove
itveryis still not a deterministic
practical. A deterministic polynomial
polynomial timetimeprimality
algorithmtest,hasalthough
been it is
given
bybeenAdleman
implemented, and Huang perhaps [3] . This latter test has to our knowledge never
because it uses the arithmetic of Jacobians of
hyperelliptic
point curvestheof genus
in preferring methodtwo.of FromAdleman a practical
and Huang viewtopointECPP. there seems no
IX. 3 . 1 . Example. Consider proving the primality of p = 2 100 + 277. Using
the methods developed to find curves using the CM method the elliptic curve
}72 = .X" 3 + 169317673849406496638751929789.X"
+ 535428649309014131591402355077
over
After IFP , is found, which has order = 1267650600228230776357544186344.
trialCalldivision it is seenp that m
m
has an 81-bit cofactor, which is probably
prime. this cofactor 1 = 1764763222984205716119937.
p1 is prime the result of Goldwasser and Kilian will show that p is prime on Assuming that
166 IX. OTHER APPLICATIONS OF ELLIPTIC CURVES
17647632229842057161 19937
1237 1060090 19141934754397 824737339346094623169598
498566265383685655850376 1698160958763013389415626
176476322298 1587729747968
2132 18387804097 19
2132 18387804097 19
5979072666605065 11093328037873283
12289991207526417 5086330291908954
2132 1839059327264
636820759
636820759
572504044 593942949
442683250 159049258
636870910
37397
This last
less than 193. number is easily seen to be prime as it is not divisible by any prime
IX.4. Equivalence between DLP and DHP
In[18])thisforsection we thedescribe
showing the ideasbetween
equivalence of Maurer,
the DLPWolfandandtheBoneh
DHP ([for94],various
[95],
special
To classesgiven
recap, of groups.
a finite abelian group G, the DLP is: given h E G, find
g,
the integer m, if it exists, such that
IX.4. EQUIVALENCE BETWEEN DLP AND DHP 167
With current
whether such knowledge
curves always itexist.
is unclearIt is howlastthisfactiswhich
this actuallymakesdonetheorfollowing
indeed
method
We onlygiven
are applyh toE cyclic groups with certain prime orders.
G = (g) and we wish to compute m E Z such that
hE(IFp= gm. We let P = ( ) denote a generator of the cyclic elliptic curve
u, v
This
toof theDHPcancurve
.9 beHence
testedweusing
can a polynomial
determine whethernumber we of group
need to operations
take a and twist
quadratic calls
weconsult without
do nottheneedabove actually
to take a knowingtwistwhat(forthethevalue
quadratic m
case of is.weAgain
'
where do yousuppose
should
Using the function mentioned
DHP9 papers
we can) .then compute gn where
gn2 gz gm3 +Am+B ,
= =
Sousingalthough
a technique
we dosimilar to the( method
not know '
m ,n
'
of Tonelli and Shanks in Chapter II.
) we do know
(g m' , g n' ).
Suppose (a, b), (c, d) E E(IFP ) but wed only know
(ga , l) , (gc, g ) E G x G;
then we can compute, using the function DHP 9 , the group
and the formulae for the group law of the elliptic curve in terms of two group operations in G
elements
(ge , g f ) E G x G
such that on the curve E(IFp ) we have
(e, f) (a, b) + (c, d).
=
T HEOREM IX. 6 ( Maurer and Wolf, [95]) . Let G be a cyclic group of prime
order, p. Let B denote a smoothness bound which is polynomial in logp.
The Diffie-Hellman problem in G and the DLP in G are polynomial time
equivalent if one of the following expressions is B-smooth:
p± 1,
p ± 2a , p ± 2b
+1 +1
where 1 ( 4), = a2 + b2 and a + byf-I 1 ( 2 + 2yf-I);
p mod p mod
p ± 2a , p ± 2b , p ±
+1 + 1 =f a + 1 (a + b)
IX.4. EQUIVALENCE BETWEEN DLP AND DHP 169
Into systems
this finalbased
chapteron hyperelliptic
the generalization
curves of systems based
is considered. on elliptic curves
The cryptography is
the same:
elliptic the only
curve bycurves change
the group is the
of pointsreplacement of the
of theforJacobian group of points
of a hyperelliptic on an
curve.
Hyperelliptic
[63] .
were first proposed use in cryptography by Koblitz
X. 1 . Arithmetic of Hyperelliptic Curves
Let C
quadratic denote a hyperelliptic curve of genus g defined over IFq , with imaginary
in the formfunction field K. A hyperelliptic curve, C, of genus g can be given
C : Y2 + H(X)Y = F(X)
where F(X) is a monic polynomial of degree 2g+ 1 and H(X) is a polynomial
ofcurvedegreeis non-singular
at most g. Both H(X) and F(X) have coefficients in IFq . Such a
if for no point on C (IFq) does there exist a point for
which the two partial derivatives,
2Y + H(X) and H' (X)Y - F' (X),
simultaneously
singular. vanish. It will always be assumed that the
In odd characteristic fields it will always be assumed that H(X) = 0 curve C is non
andAthatdivisor F(X) is square free.
on a curve is a formal sum of points
D = PEC(Fq) L npP
where
divisor np E Z and all but finitely many of the np are zero, the degree of a
is defined to be L, np . A divisor is called effective if np � 0 for all
P and is called rational if it is stable under the action of the absolute Galois
groupEveryoverfunction
IFq .
on the curve gives rise to a divisor of degree zero, consist
ing ofcalled
are the formal sumTheof thegrouppolesof and
principal. zerosdivisors
rational of the function.
of degree Such
zero divisors
modulo
principal
isbased
a finite divisors
abelian forms
group theandJacobian
forms of CbasisoverofIFqthe, denoted
the cryptographic )· This
by J0(IFqschemes
on hyperelliptic curves.
171
172 X. HYPERELLIPTIC CRYPTOSYSTEMS
point A divisor
P occurs oninCthewillsupport
be calledof thesemi-reduced
divisor, if ittheis point
then effectiveP does
and not,
if, when a
where
P denotes the image of P under the hyperelliptic involution. semi-reduced A
divisor, which is
a, b E Fq [ ] which satisfy
x
defined over IFq , can be represented by two polynomials
(i)(ii) deg <b deg a,
b is a solution of the congruence b2 + Hb F (mod a).
Such a divisor will be denoted by div( a, b), and it represents the IFq -rational
divisor
Xi
whereThetheJacobian,
sum is overJc , allcanrootsXi of
be represented a, each root
uniquely having multiplicity
byofreduced mi .
divisors. A
reduced
equal divisor is a semi-reduced divisor as above but degree less than or
g.canThebetog.performed
Henceofthethe polynomial
identity group law ona above will have degree less than or equal to
Jc is given by = div(l, 0), and addition
0
using the well known algorithm of Cantor and Koblitz (see
[24] and [63] ) . Cantor' s algorithm is equivalent to the usual combination and
reduction
consideration algorithm
a divisorof isbinary quadratic
essentially forms.toIna thebinaryfunction
equivalent fieldsform,
quadratic undera
fact we will return to later.
ALG ORITHM X . 1 : Cantor's Algorithm.
2 . a3 +- aia2 /d2 ,
2 2 22 3 2
3 . b3 +- (siaib2 + s 2 a2 bi + s 3 (bib2 + F))/d (mod a3 ).
4 . While deg a3 is greater than the genus of C do :
5.
6.
a 3 +- ( F - Hb 3 -
b3 +- - H - b3 (mod a3 ) .bD / a 3 ,
7 . Return div(a3 , b3 ).
It is easythistowhile
process see that
loop theand degree
so of a3 will
eventually a monotonically
reduced divisor decrease
will be as we
obtained.
The
whileinitial
the stepswhile
final are analogous
loop is to the composition
analogous to the of binarymethod
reduction quadratic
for forms,
binary
quadratic
improvements forms.andForan anextension
analysistoofrealthequadratic
complexityfunction
of the fields
aboveseemethod, [1 18]
andFor[1 19]the. rest of this section it will be assumed, for simplicity, that IF has
odd characteristic and that H(X) = 0. K is a quadratic function qfield,
As
X.2. GENERATING SUITABLE CURVES 173
prime
ofIFq [xdivisors,
] which liesP, inbelowK come in one of three varieties. Let p denote the prime
P, in which case we have:
• PIn ramifies
•
P,P isthis caseabovep divides
lyinginert p. DenoteF andthisthere
primeisdivisor
only oneby ramified
div(p, 0).prime divisor,
In this case p does not divide F and there is no solution to the equation
y2 F(x) (mod p)
indetermined
the field byL eitherIFq [xusing
= ]/(p).a standard
Whether generalization
such a solutionof exists can be
the Legendre
symbol or factoring y 2 F over the field L.
-
• PAs splits
in the inert case p does2 not divide F but now the equation
y F(x) (mod p)
has twosplitssolutions,
then into ther1twoanddivisors
r2 , both of degree less than p. The prime, p,
VI.4, points on the curve. The zeta function for the curve is, as in
Z(C; T) = exp (z= n )
n> l
Nn
rn .
X.2. GENERATING SUITABLE CURVES 175
For a curve of genus this zeta function can be shown to be of the following
form: g,
Z ( C· T ) =
P ( T)
( 1 - T) ( 1 - qT)
'
g
II ( 1 - ai T ) ( 1 - ai T ) , ( X.1 )
i= i
where each °'i is of absolute value -J<i_. It then follows that
g
Nn = qn + 1 - L(a� + an , � 1. n
i= i
The coefficients of P (T) can be obtained from the power series identity [66]
Z' ( T ) = i+ l - l ) Ti .
Z ( T)
'°'(N·
� z+ i - q
Iti followssufficefromtothisdetermine
� g,
identity and Equation
P ( T) ,
( X.1 )
and hence the
°'i ·
that the values Ni , for 1
Therefore, in this case, �
knowledge of
Ni, N2 , . . . , N9
Thetofactas thethatRiemann
the rootshypothesis determines
Nn
of the polynomial
P (T)
for all
n > g.
haveasmagnitude -J<i_ is re
ferred
and properties of the(seezetae.g. function for function fields certain symmetries
follow from it, in common with the ordi
nary zeta
forabelian function
ellipticvarieties.
curves Awasmoreconjectured [14 7] ) . This generalization of the Hasse Theorem
by Weilforandprojective
proven byvarieties
him forofcurves and
general version dimension
(seeasOur[147]
n, well as) . the Riemann hypothesis for such varieties, was proven by Deligne
interest is in the order of Jc (IFqn ) . It can be shown that
g
#Jc (IFqn ) = II l l - aj l 2 ,
j= i
and
of IFForthus the size of the Jacobian group of C defined over any extension field
q is also uniquely determined by the zeta function of the curve.
example the curve 2
c : Y + y = X 11 + X5 + 1
of genus five defined over IF2 has the following values of Ni :
Ni = 1, N2 = 9, N3 = 13, N4 = 17, N5 = 21.
This means that the polynomial Z (T) is given by
Z ( T ) = 32T 10 - 32T 9 + 32T 8 - 16T 7 + 8T 6 - 4T 5 + 4T 4 - 4T 3 + 4T 2 - 2T + 1.
176 X. HYPERELLIPTIC CRYPTOSYSTEMS
with
div(!) coover
primea apredetermined
(x), b (x) E IFq [x].setTheof prime
methoddivisors
then tries (the tofactor
factorbase).
the divisor
This
produces
matrix a relation asin arethe used
techniques, class forgroupsolving
whichdiscrete
can thenlogarithms
be used with in standard
IF� , to find
discrete
issmall
chosen logarithms
to be the in J0(IFq)·
set of all In prime
split the original
divisors presentation,
of small the factor
degree in base
K. The
factor degree
base is the essentially
would drawback toconsist
curvesofofhalfsmallof the
genus.points For onelliptic
the curvesover
curve the
IFq .
The
the factor decision as
basefactor to whether
was decided, an element
in [2], over
usingfiniteof the required form
the factfields.that Inin random factored over
polynomial
time one
factorizationscan polynomials
are expensive and sofields
one replaces them the
byhand, standard
a sieving NFS,
procedure.so
Factoring
forHowever, polynomials
a complexity-theoretic over finite
answertechnique is, on the
one does notforneed other
to usefields, inexpensive,
a sievingdeveloped
technique.by
Flassenberg in practice,
and the a sieving
Paulus,primehasdivisor
proveddecomposition function
to be particularly useful.
done Determining
via the following proposition, once the of the
factorization function
of 2
f can be
b - a2 F has
been found.
PROPOSITION X. l . Let a(x), b(x) = IFq [x] be coprime polynomials, let f de
note the function a( x )y + b( x) and set
T
dimensional
initialized atmatrixthe startindexed
of thebysievethetopolynomial
the value ofcodes. Each array element is
deg(NK/lFq [xJ (ay + b)) = deg(b2 - a2 F),
where a and
indexTheof sieve b are
the array. the polynomials whose codes represent the row and column
proceeds by taking every element, P
base in turn. The sieving array element is decreased by the degree of p if
= div(p, ) of the factor
r ,
either
ar + b 0 (mod p)
or
- ar + b 0 (mod p).
bEvery polynomial,
(mod p) a
0array element which satisfies
= -a0r
0is(mod p),
computed. is taken,
The in the
degree a-direction
of p is and
subtracted the polynomial
from every
(a, b) = (a0 + eip, ±bo + e2p)
where e1 andaseto2 arehowpolynomials.
todonebe can
taken we jump This canthebearray.
through doneDetails
efficiently
of but this
how carecanneedsbe
be foundarithmetic
Polynomial in [43] . is not used to compute the jumps. This would
mean that
would have intoorder
be to deduce tothepolynomials,
converted next array element
the the currentaddition
polynomial array position
or left
shift performed,
more efficient to andimplement
then converted backaddition
polynomial to two polynomial
and left codes.directly
shift It is faron
the codescanthemselves.
addition be carried Aoutleftefficiently
shift is bysimply a multiplication
computing a base q
by whileof thean
q,
expansion
codes of the polynomials which need to be added.
X.3.2. The Hafner-McCurley analogue. In the method used by Paulus
and Flassenberg,
torization of the which isa based
element on the ideas of Hafner and McCurley, fac
+ by is replaced by attempting to factor a divisor
equivalent
Let F to a given
denote the random
factor sumofofsplitelements
base prime ofdivisors.
the factorThebase.
idea, just as in
the previouspower
A random method,
sum isoftoelements
find relations
in F isonfirstthecomputed,
elements in this factor base.
D= L [ni ]Di .
Di EF
Ifthea factor
divisor,baseD' , ascan be found which is equivalent to D and which factors over
=D' L [mi ]Di ,
Di EF
X.3. THE HYPERELLIPTIC DISCRETE LOGARITHM PROBLEM 179
ofbp discriminant F(X). Prime forms are those of the form (p, bp, cp) with
F(X) ( modp) , deg bp < degp.
primes inrational
The primes,ofi.De. areirreducible
the support polynomialswhich
those polynomials in IFq are[X] ,factors
which lieof below a,
a = E II Pvp ,
p
where E E IFq [X] * . If the prime divisors of are defined by
fp
fp p,
= ( bp, Cp)
then ( b, c) L [Ep vp]fp
a,
p
with
F(X).
Ep ±1 and b Ep bp (mod 2pIFq [X] ) and cP such that fp has discriminant
=
How is such a factorization of D' over the factor base obtained? Every
divisor equivalent to D is represented by a quadratic form of the shape
2 2
(
ax +b y+
x )
cy , *, * .
Hence we
a polynomial needax
to 2
run through a set of ( y) E IFq [X] x IFq [X] until we obtain
x,
+ b y + cy which can be factored over the polynomials
x
2
lying
as used below the prime divisors
above, canof Hafner-McCurley in the factor
be applied to thishasproblem. base. Clearly sieving techniques,
ods The method
for finding group structure, and ahence been the
discrete most successful of all
logarithms, of Jacobians meth
oftwocurves of high
hoursmethod genus.
to compute For example
therequires
grouponlystructure curve over IF11 of genus eight may take
using BSGS type methods, but the
sieving
Itsame
shouldmethod above
be noted 17
thattotheanmethod minutes.
really requires largeofgenus curves.
The applied elliptic curve over a field size 10 5 can
take
above twomethods.
minutesTheusingcrossover
BSGS while
point itofwould
the take over
BSGS and five sieving
the hours using the
methods
described above seems to be around fields of order 10 9 , where is the genus.
g
Such Jacobians will have group orders9about
1Q 2 .
Notice that for a genus five curve over a field size of 32-bits
a cryptosystem without using large integer arithmetic and for which the above we can implement
180 X. HYPERELLIPTIC CRYPTOSYSTEMS
methods cannotside,besuchapplied
another plus successfully
Jacobians will to compute
have group discrete
orders logarithms. On
around
(232 ) 5 2160 '
=
and so canlogarithm
discrete be madealgorithms,
resistant, with
such current
as BSGS.computing power, to the general
APPENDIX A
Curve Examples
This appendix
pointsIFcontain presents
large examples
prime of
subgroups. elliptic curves
Section whose
A. 1A.shows groups
curves of rational
overoverfinite
fields q ,
withsense that
q =
with
n
q = p, a large prime, while Section 2 shows
2 . Unless explicitly noted otherwise, the curves are ' random', in
curves IFq ,
the
probability, their relevant
andcounting coefficients
the ordersalgorithms
of their groups were drawn
of rational at random, with
pointsVII.wereIn each uniform
determined
using the point
number of random curves described in Chapter
E was generated, and the order of the group E(IFq )
case, a
determined,
suchInrandom until
trialsa satisfactory
was discussed one was
in some found.
SectionexamplesThe probability of
VI. 5 . of curves generated withsuccess in
Section
the AllCMthemethod A. 1 , we
described also present
in Chapter VIII.
primes listed in the examples were
primality proving (ECPP) method [7] described in Chapter IX. certified using the elliptic curve
A . 1 . Odd Characteristic
The
prime.examples
The curvein thisequations
sectionaredescribe
of thecurves
form over fields IFP , where p is a large
: E Y2 = X 3 + aX + b, a, b E IFP .
For each
of IFP shown curve, the values of p, a, b, and #E(IFP ) are listed, with elements
as integers in the range { O , 1, . . . ,p-1 } , in decimalwherenotation.
When #E(IFP ) is composite, it is also shown factored as
small positive integer,a backslash
and isatprime.
r Large integers s · r,
mightthatbe brokens is a
into
multiple
is continued lines, with
in1-7theshow
next 'line. the end of a line indicating the number
Examples r andom'
ples,thethe'size'valuesof aoffieldp areelement curves, ask
all ofistheself-evident.described
form 2 + The curves
c, c
above. In these
a smallinpositive exam
integer,
sowere generated with the CM method. For these examples, the value f1og2 pl examples 8-11
isclassshown ( since p has no special form ) , as are the discriminant - D and the
number hDthe· curve initially obtained was renormalized with a trans
In all cases,
formation of the form a u4 a, b u6b, u =J. 0, to make the coefficient a a
---+ ---+
181
182 A. CURVE EXAMPLES
tosmalltheinteger.
original Asone.discussed in Chapter III, the resulting curve is isomorphic
EXAMPLE 1.
p 2 130 + 169
1 36 1 1 29467683753853853498429727072845993 ,
a 3,
1043498 1 5 1013573 1 4 1076033 1 1 9958062900890 ,
1 36 1 1 29467683753853808807784495688874237
( a prime number) .
EXAMPLE 2.
p 2 130 + 169
1 36 1 1 29467683753853853498429727072845993 ,
a 1,
1 230929586093851 880935564157041 535079 1 94 ,
1 36 1 1 2946768375385384606053 1 1 60085896483
( a prime number) .
EXAMPLE 3 .
p 2 160 + 7
1461501 637330902918203684832716283019655932542983 ,
a 10,
1 3436327621 500924997016374389707648 18528075565078 ,
1461501 6373309029182036835 1 8 2 1 8 12681271 1 1 3700256 1
( a prime number) .
EXAMPLE 4.
p 2 160 + 7
1461501 637330902918203684832716283019655932542983 ,
a 1,
10106859255005724302068796085586429042267726159 1 9 ,
1461501 6373309029 182036830386300935244086503 19587
( a prime number) .
A . 1 . ODD CHARACTERISTIC 183
EXAMPLE 5.
p 2 190 + 129
1569275433846670 1 9095894735580 1 9 1660402558886 1 1 160 \
08628353 ,
a 10,
b 1 34846241 14 1436 1 3 1 2 6 1 10541 1 3 1 1693 10875806949 1 86774 \
22294274 ,
#E(Fp ) 1569275433846670 1 909589473557802870403052555408969 \
46997883
(a prime number).
EXAMPLE 6.
p 2 190 + 129
1569275433846670 1 9095894735580 1 9 1660402558886 1 1 160 \
08628353 ,
a 2,
b 1 2352246712371885871866833 1484303955154914555 16523 \
489 1978 5 ,
p = 70488450694327127420028 1 64 1 86486186967538228180387 \
43742878235725906364657764309029949371 1 66271546975 \
960081758439943 1 788 7 ,
399,
a 5,
b 386662904220884846158 1 1 89787552969575 8 8 1 6 1 14458122 \
722763260847739483350876 1427897436830503346 1629194 \
63497627079364752199 ,
70488450694327127420028 1 64 1 86486186967538228180387 \
43742878233999375534968 1064547 1 1 64576003 122 183606 1 \
60284656 1 85776243884
4 . 1 7622 1 1 267358 178 1855007041046621 54674 1 884557045 \
096859357195584998438837420266 1 36779 1 1440007805459 \
01540071 1 64046444060971 .
186 A. CURVE EXAMPLES
For
isis, theineachallirreducible
curve, thepolynomial
values of used
n, f (x), a2 , a6 , and #E(IFq ) are listed, where f (x)
to represent IFq over IF2 . The coefficient a2
n listedtheareexamples,
ofhexadecimal odd. The
digit expands
either 0 or 1a andis presented
coefficient 6
in theexpands
thus equalin tohexadecimal
its trace, asform.
natural towaythetoappropriate
four bits, except
all values
Each
possibly
the most
foran-a1 , total significant digit, which
length of Once expanded, the bits represent the coefficients of
n.
number of bits
an- 2 , . . . , a0 , respectively from left to right, where a is a root of f(x).
The
where s
groupis aordersmall #E(IFq ) is shown in decimal form, and also factored as r,
positive integer, and r is prime. In all the examples, is
s·
s
the smallest possible4 otherwise.
Tr2 ( a2 ) 1,= s =
value for theAsgiven
before, isomorphism
a backslash class,
at i.e.,end of2 awhen
the s =
line
indicates
line. All curves that thein number ( hexadecimal or decimal ) is continued in the next
this section are ' random'.
EXAMPLE 12. 131, f(x) x 131 + x8 + x3 + x2 + 1,
n = =
1,
7417501D24550DBC7735 1 632C85 1 3E8FE ,
2722258935367507707729351 29293271 1465734
2 . 136 1 12946768375385386467564646635573286 7 .
[A-1] L.M. Adleman and M.-D. Huang, editors. ANTS- 1 : Algorithmic Number Theory.
Springer-Verlag, LNCS 877, 1994.
[A-2] H. Cohen, editor. ANTS-2: Algorithmic Number Theory. Springer-Verlag, LNCS
1122, 1996.
[A-3] J. Buhler, editor. ANTS-3: Algorithmic Number Theory. Springer-Verlag, LNCS
1423, 1998.
[A92] J. Seberry and Y. Zheng, editors. Advances in Cryptology, A USCR YPT 92.
Springer-Verlag, LNCS 718, 1993.
[A94] J. Pieprzyk and R. Safavi-Naini, editors. Advances in Cryptology, ASIA CRYPT 94.
Springer-Verlag, LNCS 917, 1995.
[A98] K. Ohta and D. Pei, editors. Advances in Cryptology, ASIA CR YPT 98. Springer
Verlag, LNCS 1514, 1998.
[B98] D.A. Buell and J.T. Teitelbaum, editors. Computational Perspectives on Number
Theory: Proceedings of a Conference in Honor of A. O.L. Atkin, American Mathe
matical Society International Press, 7, 1998.
[C85] H.C. Williams, editor. Advances in Cryptology, CRYPTO 85. Springer-Verlag,
LNCS 218, 1986.
[C90] A.J. Menezes and S.A. Vanstone, editors. Advances in Cryptology, CR YPTO 90.
Springer-Verlag, LNCS 537, 1991.
[C91] J. Feigenbaum, editor. Advances i n Cryptology, CRYPTO 9 1 . Springer-Verlag,
LNCS 576, 1992.
[C92] E.F. Bickell, editor. Advances in Cryptology, CR YPTO 92. Springer-Verlag, LNCS
740, 1992.
[C94] Y.G. Desmedt, editor. Advances in Cryptology, CR YPTO 94. Springer-Verlag,
LNCS 839, 1994.
[C96] N. Koblitz, editor. Advances in Cryptology, CR YPTO 96. Springer-Verlag, LNCS
1109, 1996.
[C97] B. Kaliski, editor. Advances in Cryptology, CR YPTO 97. Springer-Verlag, LNCS
1294, 1997.
[E84] F. Pichler, editor. Advances in Cryptology, EUR O CR YPT 84. Springer-Verlag,
LNCS 219, 1985.
[E89] J.-J. Quisquater and J. Vandewalle, editors. Advances in Cryptology, EUROCRYPT
89. Springer-Verlag, LNCS 434, 1990.
[E90] l.B. Damgard, editor. Advances in Cryptology, EUROCRYPT 90. Springer-Verlag,
LNCS 473, 1991.
[E91] D.W. Davies. Advances in Cryptology, EUROCRYPT 91. Springer-Verlag, LNCS
547, 1991.
[E95] L.C. Guillou and J.-J. Quisquater, editors. Advances in Cryptology, EUROCRYPT
95. Springer-Verlag, LNCS 921, 1995.
[E96] U.M. Maurer, editor. Advances in Cryptology, EUR O CR YPT 96. Springer-Verlag,
LNCS 1070, 1996.
191
192 BIBLIOGRAPHY
[46] S. Goldwasser and J. Kilian. Almost all primes can be quickly certified. In Proc.
1 8th STOC, 316-329, 1986.
[47] S.W. Golomb. Shift Register Sequences. Holden-Day, 1967.
[48] D.M. Gordon. A survey of fast exponentiation methods. J. Algorithms, 27, 129-146,
1998.
[49] J. Guajardo and C. Paar. Efficient algorithms for elliptic curve cryptosystems. In
[C9 7] , 342-356.
[50] J.L. Hafner and K.S. McCurley. A rigorous sub-exponential algorithm for compu
tation of class groups. J. AMS, 2, 837-850, 1989.
[51] 0. Herrman. Uber die Berechnung der Fourierkoeffizienten der Funktion j (T). J.
Reine Angew. Math., 274/275, 187-195, 1975.
[52] D. Hiihnlein, M. Jacobson, S. Paulus and T. Takagi. A cryptosystem based on
non-maximal imaginary quadratic orders with fast decryption. In [E98] , 279-287.
[53] J.I. Igusa. Arithmetic variety of moduli for genus two. Ann. Math. , 72, 612-649,
1960.
[54] T. Itoh and S. Tsujii. A fast algorithm for computing multiplicative inverses in
GF(2m) using normal bases. Info. and Comput., 78(3) , 171-177, 1988.
[55] M. Jacobson, N. Koblitz, J.H. Silverman, A. Stein and E. Teske. Analysis of the
Xedni calculus attack. Preprint, 1999.
[56] J. Jedwab and C.J. Mitchell. Minimum weight modified signed-digit representations
and fast exponentiation. Electronics Letters, 25, 1171-1172, 1989.
[57] M. Joye and J.-J. Quisquater. Reducing the elliptic curve cryptosystem of Meyer
Miiller to the cryptosystem of Rabin-Williams. Designs, Codes and Cryptography,
14, 53-56, 1998.
[58] B.S. Kaliski. The Montgomery inverse and its applications. IEEE Trans. Comp.,
44, 1064-1065, 1995.
[59] A. Karatsuba. Doklady Akad. Nauk SSSR, 145, 293-294, 1962. English translation
in Soviet Physics-Doklady, 7, 595-596, 1963.
[60] A. W. Knapp. Elliptic Curves. Princeton University Press, 1993.
[61] D.E. Knuth. The Art of Computer Programming, 2 - Semi-numerical Algorithms.
Addison-Wesley, 2nd edition, 1981.
[62] N. Koblitz. Elliptic curve cryptosystems. Math. Comp., 48, 203-209, 1987.
[63] N. Koblitz. Hyperelliptic cryptosystems. J. Crypto., 1, 139-150, 1989.
[64] N. Koblitz. Constructing elliptic curve cryptosystems in characteristic 2. In [C90] ,
156-167.
[65] N. Koblitz. CM-curves with good cryptographic properties. In [C91] , 279-287.
[66] N. Koblitz, Algebraic aspects of cryptography. 3, Algorithms and Computation in
Mathematics, Springer-Verlag, Berlin, 1998.
[67] C.K. Koc; and T. Acar. Montgomery multiplication in GF(2 k ). Designs, Codes and
Cryptography, 14, 57-69, 1998.
[68] K. Koyama, U. Maurer, T. Okamoto and S.A. Vanstone. New public-key scheme
based on elliptic curves over the ring Z n . In [C91] , 252-266.
[69] K. Koyama and Y. Tsuruoka. Speeding up elliptic cryptosystems by using a signed
binary window method. In [C92] , 345-357.
[70] K. Kurosawa, K. Okada and S. Tsujii. Low exponent attack against elliptic curve
RSA. In [A94] , 376-383.
[71] K.-Y. Lam and L.C.K. Hui. Efficiency of SS(l) square-and-multiply exponentiation
algorithms. Electronics Letters, 30, 2115-2116, 1994.
[72] S. Lang. Elliptic Curves: Diophantine Analysis. Springer-Verlag, 1978.
[73] G.-J. Lay and H.G. Zimmer. Constructing elliptic curves with given group order
over large finite fields. In [A-1] , 250-263.
BIBLIOGRAPHY 195
[74] F. Lehmann, M. Maurer, V. Muller and V. Shoup. Counting the number of points
on elliptic curves over finite fields of characteristic greater than three. In [A-1] ,
60-70.
[75] F. Lemmermeyer. The Euclidean algorithm in algebraic number fields. Expo. Math.,
13, 385-416, 1995.
[76] A. Lempel, G. Seroussi, and S. Winograd. On the complexity of multiplication in
finite fields. Theoretical Comp. Sci. , 22, 285-296, 1983.
[77] A.K. Lenstra and H.W. Lenstra, editors. The Development of the Number Field
Sieve. Springer-Verlag, LNM 1554, 1993.
[78] H.W. Lenstra. Factoring integers with elliptic curves. Ann. Math., 126, 649-673,
1987.
[79] H.W. Lenstra and C.P. Schnorr. A Monte Carlo factoring algorithm with linear
storage. Math. Comp., 43, 289-311, 1984.
[80] R. Lercier. Computing isogenies in lF2n . In [A-2] , 197-212.
[81] R. Lercier. Algorithmique des courbes elliptiques dans les corps finis. These, L' Ecole
Polytechnique, Laboratoire D'Informatique, CNRS, Paris, June, 1997.
[82] R. Lercier. Finding good random elliptic curves for cryptosystems defined over lF2n .
In [E97] , 379-392.
[83] R. Lercier and F. Morain. Counting the number of points on elliptic curves over
finite fields: strategies and performances. In [E95] , 79-94.
[84] R. Lercier and F. Morain. Algorithms for computing isogenies between elliptic
curves. In [B98] , 77-96.
[85] R. Lercier and F. Morain. Counting points on elliptic curves over lFpn using Cou
veignes algorithm. Rapport de Recherche LIX/ RR/ 95 / 09, 1995.
[86] R. Lidl and H. Niederreiter. Finite Fields, in Encyclopedia of Mathematics and its
Applications, G.-C. Rota, editor, Addison-Wesley, 1983.
[87] J .H. van Lint. Introduction to Coding Theory. Springer-Verlag, 1982.
[88] K.S. McCurley. The discrete logarithm problem. In Cryptology and Computational
Number Theory, C. Pomerance, editor, 49-74. Proc. Symp. Applied Maths 42,
1990.
[89] J. McKee. Subtleties in the distribution of the numbers of points on elliptic curves
over a finite prime field. J. LMS, 59, 448-460, 1999.
[90] J. McKee and R.G.E. Pinch. On a cryptosystem of Vanstone and Zuccherato.
Preprint, 1998.
[91] K. Mahler. On the coefficients of the 2mth transformation polynomial for j (w).
Acta Arith. , 2 1, 89-97, 1972.
[92] K. Mahler. On the coefficients of transformation polynomials for the modular func
tions. Bull. Austral. Math. Soc. , 10, 197-218, 1974.
[93] J.L. Massey and O.N. Garcia. Error correcting codes in computer arithmetic. In
Advances in Information Systems Science, J.L. Tou, editor, 4, 273-326. Plenum,
New York, 1971.
[94] U.M. Maurer. Towards the equivalence of breaking the Diffie-Hellman protocol and
computing discrete logarithms. In [C94] , 271-281.
[95] U.M. Maurer and S. Wolf. Diffie-Hellman oracles. In [C96] , 268-282.
[96] W. Meier and 0. Staffelbach. Efficient multiplication on certain non-supersingular
elliptic curves. In [C92] , 333-344.
[97] A.J. Menezes. Elliptic Curve Public Key Cryptosystems. Kluwer Academic Pub
lishers, 1993.
[98] A.J. Menezes, T. Okamoto and S.A. Vanstone. Reducing elliptic curve logarithms
to a finite field. IEEE Trans. Info. Theory, 39, 1639-1646, 1993.
196 BIBLIOGRAPHY
[99] A.J. Menezes, P.C. van Oorschot and S.A. Vanstone. Handbook of Applied Cryp
tography. CRC Press, 1996.
[100] A.J. Menezes, S.A. Vanstone and R. J. Zuccherato. Counting points on elliptic
curves over lF2n Math. Comp., 60, 407-420, 1993.
[101] B. Meyer and V. Muller. A public key cryptosystem based on elliptic curves over
'll /n'll equivalent to factoring. In [E96] , 49-59.
[102] G. Miller. Riemann's hypothesis and test for primality. J. Comp. and Sys. Sci. , 1 3 ,
300-317, 1976.
[103] V. Miller. Use of elliptic curves in cryptography. In [C85] , 417-426.
[104] A. Miyaji. Elliptic curves over lFP suitable for cryptosystems. In [A92] , 479-491 .
[105] P.L. Montgomery. Modular multiplication without trial division. Math. Comp., 44,
519-521, 1985.
[106] P.L. Montgomery. Speeding the Pollard and elliptic curve methods of factorization.
Math. Comp., 48, 243-264, 1987.
[107] F. Morain. Building cyclic elliptic curves modulo large primes. In [E91 ] , 328-336.
[108] F. Morain. Calcul du nombre de points sur une courbe elliptique dans un corps fini:
aspects algorithmiques. J. Theorie des Nombres de Bordeaux, 7, 255-282, 1995.
[109] F. Morain and J. Olivos. Speeding up the computations on an elliptic curve using
addition-subtraction chains. Info. Theory Appl. , 24, 531-543, 1990.
[110] V. Muller. Ein Algorithmus zur Bestimmung der Punktzahl elliptischer Kurven
uber endlichen Korpern der Charakteristik grosser drei. Ph.D. Thesis, Universitat
des Saarlandes, 1995.
[1 1 1] V. Muller. Fast multiplication on elliptic curves over small fields of characteristic
two. J. Crypto . , 1 1 , 219-234, 1998.
[112] R. Mullin, I. Onyszchuk, S.A. Vanstone and R. Wilson. Optimal normal bases in
GF (pn ) . Discrete Appl. Math., 22, 149-161 , 1988/89.
[113] K. Nyberg and R.A. Rueppel. Message recovery for signature schemes based on the
discrete logarithm problem. Designs, Codes and Cryptography, 7, 61-8 1 , 1996.
[114] A.M. Odlyzko. Discrete logarithms in finite fields and their cryptographic signifi
cance. In [E84] , 417-426.
[115] J. Omura and J. Massey. Computational method and apparatus for finite field
arithmetic. U.S. Patent number 4,587,627, May 1986.
[116] P.C. van Oorschot and M.J. Wiener. Parallel collision search with cryptanalytic
applications. J. Crypto., 12, 1-28, 1999.
[117] S. Paulus. An algorithm of sub-exponential type computing the class group of
quadratic orders over principal ideal domains. In [A-2] , 243-257.
[118] S. Paulus and H.-G. Ruck. Real and imaginary quadratic representation of hyper
elliptic function fields. Math. Comp., 68, 1233-1241, 1999.
[119] S. Paulus and A. Stein. Comparing real and imaginary arithmetics for divisor class
groups of hyperelliptic curves. In [A-3] , 576-591 .
[120] J. Pila. Frobenius maps of abelian varieties and finding roots of unity in finite fields.
Math. Comp., 55, 745-763, 1996.
[121] R.G.E. Pinch. Extending the Wiener attack to RSA-type cryptosystems. Electronics
Letters, 3 1 , 1736-1738, 1995.
[122] J.-M. Piveteau. New signature scheme with message recovery. Electronics Letters,
29, 2185, 1993.
[123] H.C. Pocklington. The determination of the prime and composite nature of large
numbers by Fermat's theorem. Proc. Camb. Phil. Soc. , 18, 29-30, 1914/16.
[124] G.C. Pohlig and M.E. Hellman. An improved algorithm for computing logarithms
over GF (p) and its cryptographic significance. IEEE Trans. Info. Theory, 24, 106-
110, 1978.
BIBLIOGRAPHY 197
[125] J.M. Pollard. Monte Carlo methods for index computation (mod p) . Math. Comp.,
32, 918-924, 1978.
[126] K.C. Posch and R. Posch. Modulo reduction in residue number systems. IEEE
Trans. Parallel and Dist. Systems, 6, 449-454, 1995.
[127] K.C. Posch and R. Posch. Division in residue number systems involving length
indicators. J. Comp. Appl. Maths. , 66, 411-419, 1996.
[128] J.-J. Quisquater and J.-P. Delescaille. How easy is collision search? Application to
DES. In [E89] , 408-413.
[129] M. Rabin. Digitized signatures and public key functions as intractable as factoriza
tion. MIT/L CS/TR-212, MIT Laboratory for Computer Science, 1979.
[130] M. Rabin. Probabilistic algorithms for testing primality. J. Number Theory, 12,
128-138, 1980.
[131] G. Reitwiesner. Binary arithmetic. Adv. in Comp., 1, 231-308, 1960.
[132] H. Riesel. Prime Numbers and Computer Methods for Factorization. Birkhauser,
1985.
[133] R.L. Rivest, Shamir A. and L.M. Adleman. A method for obtaining digital signa
tures and public-key cryptosystems. Comm. A CM, 21 , 120-126, 1978.
[134] R.L. Rivest, Shamir A. and L.M. Adleman. Cryptographic communications system
and method. US Patent No 4405829, 1983.
[135] H.-G. Riick. On the discrete logarithm problem in the divisor class group of curves.
Math. Comp., 68, 805-806, 1999.
[136] T. Satoh and K. Araki. Fermat quotients and the polynomial time discrete log
algorithm for anomalous elliptic curves. Comm. Math. Univ. Sancti Pauli, 47 , 81-
92, 1998.
[137] J. Sattler and C.P. Schnorr. Generating random walks in groups. Ann. Univ. Sci.
Budapest. Sect. Comp., 6, 65-79, 1985.
[138] E.F. Schaefer. Computing a Selmer group of a Jacobian using functions on the
curve. Math. Ann. , 310, 447-471, 1998.
[139] B. Schneier. Applied Cryptography. John Wiley and Sons, 1996.
[140] A. Schonhage. Schnelle Multiplikation von Polynomen iiber Korpen der Charakter
istik 2. Acta Info., 7, 395-398, 1977.
[141] R. Schoof. Elliptic curves over finite fields and the computation of square roots mod
p. Math. Comp., 44, 483-494, 1985.
[142] R. Schoof. Counting points on elliptic curves over finite fields. J. TMorie des Nom
bres de Bordeaux, 7, 219-254, 1995.
[143] I.A. Semaev. Evaluation of discrete logarithms on some elliptic curves. Math.
Comp., 67 , 353-356, 1998.
[144] G. Seroussi. Table of low-weight irreducible polynomials over lF2 • Hewlett-Packard
Laboratories Technical Report No. HPL-98-135, August 1998.
[145] G. Seroussi. Compact representation of elliptic curve points over lF2n . Hewlett
Packard Laboratories Technical Report No. HPL-98-94Rl, September 1998.
[146] V. Shoup. Lower bounds for discrete logarithm and related problems. In [E97] ,
313-328.
[147] J.H. Silverman. The Arithmetic of Elliptic Curves. Springer-Verlag, GTM 106,
1986.
[148] J.H. Silverman. Advanced Topics in the Arithmetic of Elliptic Curves. Springer
Verlag, GTM 151, 1994.
[149] J.H. Silverman and J. Suzuki. Elliptic curve discrete logarithms and the index
calculus. In [A98] , 110-125.
[150] J.H. Silverman. The xedni calculus and the elliptic curve discrete logarithm prob
lem. Preprint, 1998.
198 BIBLIOGRAPHY
[151] N.P. Smart. The Algorithmic Resolution of Diophantine Equations. Cambridge Uni
versity Press, 1998.
[152] N.P. Smart. Elliptic curves over small fields of odd characteristic J. Crypto . , 12,
141-151, 1999.
[153] N.P. Smart. The discrete logarithm problem on elliptic curves of trace one. J.
Crypto., 12, 193-196, 1999.
[154] J.A. Solinas. An improved algorithm for arithmetic on a family of elliptic curves.
In [C97] , 357-371.
[155] A.-M. Spallek. Kurven vom Geschlecht 2 und ihre Anwendung in Public-Key
Kryptosytemen Ph.D. Thesis, Universitat Essen, 1994.
[156] R.G. Swan. Factorization of polynomials over finite fields. Pacific J. Math. , 12,
1099-1106, 1962.
[157] E. Teske. Speeding up Pollard's Rho method for computing discrete logarithms. In
[A-3] , 541-554.
[158] E. Teske. A space efficient algorithm for group structure computation. Math. Comp.,
67, 1637-1663, 1998.
[159] S.A. Vanstone and R.J. Zuccherato. Elliptic curve cryptosystems using curves of
smooth order over the ring Z n . IEEE Trans. Info. Theory, 43, 1231-1237, 1997.
[160] J. Velu. Isogenies entre courbes elliptiques. Comptes Rendus l 'Acad. Sci. Paris,
Ser. A, 273, 238-241 1971.
[161] J.F. Voloch. The discrete logarithm problem on elliptic curves and descents
Preprint, 1997.
[162] A. Wiles. Modular elliptic curves and Fermat's Last Theorem. Ann. Math. , 142,
443-551, 1995.
[163] H.C. Williams. A modification of the RSA public-key encryption procedure. IEEE
Trans. Info. Theory, 26, 726-729, 1980.
[164] S. Winograd. Some bilinear forms whose complexity depends on the field of con
stants. Math. Sys. Theory, 10, 169-180, 1977.
Author Index
Tsujii, S., 22
Vanstone, S.A., 2, 82
Velu, J., 134
Voloch, J.F., 82
Wiener, M.J., 96
Williams, H.C., 7, 8
Wolf, S., 166, 168
Legendre symbol, 18, 102, 120 counting, xii, 42, 50, 52, 101-107, 109-
148, 181
Massey-Omura encryption, xi, 5 doubling, 32, s e e point addition
Massey-Omura multiplier, 22 multiplication, 57, 62-76
Miller-Rabin test, 162 and exponentiation, 63
modular arithmetic, 11-19 binary method, 63
polynomial, 19-22, 24 example of costs, 72
modular function, 47 m-ary method, 64
modular inversion, 13, 16 modified m-ary method, 64
polynomial, 21 of fixed point, 72
modular multiplication, 12 precomputation, 64-66, 70, 72
polynomial, 19 relative costs, 72
modular polynomials, 50-55, 116, 118- signed m-ary window, 70
122, 144 signed digit method, 67
variants, 52 sliding window method, 66
modular reduction, 12 window methods, 66
polynomial, 19 with non-adjacent form representa
moduli of special form, 12 tion, 68
Montgomery arithmetic, 15-17 rational, 30
Montgomery multiplication, 17 polynomial multiplication, 20
Montgomery reduction, 15-16 Prime Number Theorem, 107
Mordell-Weil Theorem, 98 projective coordinates, 22, 30, 58-62
morphism, 44 weighted, 58
MOY attack, 82-88 proof of primality, 162
MOY condition, 99 down run, 163
multiplication-by-m map ([m] ) , 34 public key cryptography, 1