Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Elliptic Curves in polynomial groups

by abell (Chaplain)
on May 22, 2003 at 22:27 UTC ( [id://260255]=note: print w/replies, xml ) Need Help??


in reply to Elliptic Curves in polynomial groups

I think Math::Pari is the best way to do elliptic curve computations within perl.

If you are willing to give up perl, you would gain in efficiency by using the native Pari C library or the scripting environment GP. You would need some working knowledge of Pari anyway, if you meant to use Math::Pari.

If you know some C++, there is also the LiDIA library, which provides high level functions for dealing with finite fields and everything needed for elliptic curve computations.

Cheers

Antonio

The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket
  • Comment on Re: Elliptic Curves in polynomial groups

Replies are listed 'Best First'.
Re: Re: Elliptic Curves in polynomial groups
by John M. Dlugosz (Monsignor) on May 22, 2003 at 22:41 UTC
    I want to do EC-based public key encryption and signature, and it's a small part of the overall program.

    I was thinking of using Math::BigInt abstract interface and allowing whatever the most optimal implementation is on that platform as the "engine". But Math::Pari has some EC stuff built-in already... but I wonder if that's just EC in general using real numbers, not modular arithmetic on finite fields.

      Pari functions for elliptic curves are very general and work for finite fields as well. A finite field elements is represented by a modular polynomial modulo an irreducible modular polynomial. For instance, a representation of the finite fields with 7^3 elements consists of elements of this form (in Pari notation):
      Mod( Mod(1, 7)*a*x^2 + Mod(1, 7)*b*x + Mod(1, 7)*c, Mod(1, 7)*x^3 + Mod(1, 7)*x + Mod(1, 7) )
      You get all elements by varying a, b and c from 0 to 6. See this recent thread for more examples.

      Building an efficient finite field library starting from big integers is fun, but quite demanding, and you'd probably prefer to focus on the higher level algorithms. In this case, I suggest you try and play a bit with Pari under the GP environment (which is interactive and has online help). Once you have understood what functions serve your purpose, you can assemble them into a C program or a GP script, which will be invoked from your program, or integrate them directly into your program (via Math::Pari).

      Have fun

      Antonio

      The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket
        Hmm, that sounds like it's well worth playing with in its own right. So, I take it the "functions" are distinct from the "types" they operate on, so a function that uses +,-, etc. can work when fed a value that's a field element instead of a bignum or complex or whatnot?

        —John

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://260255]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found