in reply to Re: Elliptic Curves in polynomial groups
in thread Elliptic Curves in polynomial groups

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.

  • Comment on Re: Re: Elliptic Curves in polynomial groups

Replies are listed 'Best First'.
Re: Re: Re: Elliptic Curves in polynomial groups
by abell (Chaplain) on May 22, 2003 at 23:18 UTC

    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

        Yes, most functions take as arguments generic pari objects and only complain if there is something wrong, like if you want to add a modular integer and a real number, factor a real number and so on.

        Antonio

        The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket