Andreas Enge on Thu, 28 Jun 2012 09:29:02 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Elliptic curves over GF(p)?


On Thu, Jun 28, 2012 at 10:17:54AM +1000, Alasdair McAndrew wrote:
> I want to do some simple computation on elliptic curves of the form y^2 =
> x^3 + ax +b (mod p), where p is prime (of at least 32 bits) .  My needs are
> simple: define such a curve, find its cardinality, find a generator (if the
> cardinality is prime) or a point of high order, and in general perform
> arithmetic on the curve: addition, order, etc.  Can libpari manage all of
> this?  The manual is fairly sparse on elliptic curves, and it's
> not clear to me, as a beginner, whether Pari supports elliptic curves over
> finite fields GF(p).

All this is possible, try the following snippets:
p = 53
E = ellinit ([Mod (-117, p), Mod (324, p)])
P = [0, 18]
ellap (E, p)
n = p + 1 - ellap (E, p)
ellpow (E, P, 48)
ellpow (E, P, 24)
ellpow (E, P, 12)
ellpow (E, P, 8)
ellgroup (E)
?ellgroup
ellgroup (E, , 1)

If you are using the stable pari version 2.5.1 instead of the development
version, ellinit takes 5 instead of (possibly) 2 arguments.

Andreas