I implemented finite fields using Montgomery representation. Multiplication
is faster, though inversion slows down a little. This improves the
running time of all pairings except E (this pairing type isn’t useful anyway).
I enjoyed the challenge of writing it, but I can’t help feel that there ought
be an implementation of integer mod rings in GMP.
After all, GMP already has Montgomery reduction
in its mpz_powm() function, and it has modular inversion routines
too. With a little more coding they could easily get a fast integer mod
I would much rather focus on elliptic curves.
There are some changes which may break compatibility with previous
releases. I had forgotten to write element_sgn for the new
finite fields code (which broke a few things). I have now fixed this, but
I have changed the way it works. This means compressed elements from earlier
PBC versions will be incompatible.
Also, there are minor change in the element_from_hash() functions, and they
behave differently now.
Thu Sep 28 13:31:56 PDT 2006