herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
458 stars 157 forks source link

Pairing on Fp254BNb returns 0 if element from G2 is zero #8

Closed arybczak closed 7 years ago

arybczak commented 7 years ago

Likely a minor issue, but pairing on Fp254BNb (I didn't check other curves) returns 0 whenever it is passed an element from G2 that is zero (if element from G1 is zero, it correctly returns 1).

herumi commented 7 years ago

Thank you for pointing it out. I fixed it. https://github.com/herumi/mcl/commit/e7bf6b32447dba7d9789b8d726f02b86ab459065

arybczak commented 7 years ago

Thanks!