Alasdair McAndrew on Fri, 29 Jun 2012 06:07:03 +0200

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

Re: Elliptic curves over GF(p)?

Thanks, folks - I think I've done it.  Here are the relevant lines I used:
  #define p 0x7FFFFFFF  // p = 2^31-1

  GEN a,b,pp,F,E,X,Y;
  pp = stoi(p);
  a = stoi(rand()%p);
  b = stoi(rand()%p);
  F = mkvecn(5,gen_0,gen_0,gen_0,a,b);
  E = ellinit(F,MEDDEFAULTPREC);

  // Now check that E has a prime number of points....

then later on


for operations on the curve.


On Fri, Jun 29, 2012 at 1:45 AM, Bill Allombert <> wrote:
On Thu, Jun 28, 2012 at 12:11:53PM -0300, Jeremy Porter wrote:
> On 12-06-28 11:44 AM, Alasdair McAndrew wrote:
> > Thanks for that.  I'm still having difficulties, though, trying to
> > work out from the manual actually how to initialize an elliptic curve
> > using libpari.  Are there any examples somewhere?
> >
> > Thanks again,
> > Alasdair
> I've also found the EC-related library functions to be "sparsely"
> documented, but there is a fair chunk of code out there if you look in
> the right places. Consider:

You might want to look at the functions FpE_* int the libpari manual
(section 7.3.1 page 116). Note that they do not require initialisation.