-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subsequent additions in ECn2 #25
Comments
Note: See issue 25 of MIRACL ( miracl/MIRACL#25 ) for explanation on the modified addition operation for G2 elements.
Thanks for spotting that bug. Will update MIRACL later this week in response to your observations. Mike On Sun, Jul 3, 2016 at 4:12 AM, Rémi Bazin notifications@github.com wrote:
|
Hello,
After investigating the "Illegal parameter usage [in ecn2_add]" error that I received in my program, I reduced the code to the "simplest" version below that still produces that error:
I figured that the bug came from mrecn2.c, function ecn2_add3 lines 578-580:
I understand that this comment and error have been put here on purpose, but I believe that the C++ wrappers provided in pairing_3.h should make the life easier for users and allow, say, multiple additions of elements in G2.
I noticed that adding the line
t2.g.norm();
before the faulty linet3 = t1 + t2;
solves the problem, which means it could easily be solved in bn_pair.cpp too (if not simply bundled in mrecn2.c by default ; it is always better not to get an error message when we can avoid it).Thank you
Rémi
The text was updated successfully, but these errors were encountered: