diff --git a/ffi/java/MclTest.java b/ffi/java/MclTest.java index c47966d..8438e84 100644 --- a/ffi/java/MclTest.java +++ b/ffi/java/MclTest.java @@ -107,6 +107,10 @@ public class MclTest { Mcl.mul(cP, P, c); // cP = P * c Mcl.pairing(e1, cP, Q); assertBool("e1 == e2", e1.equals(e2)); + Mcl.inv(e1, e1); + Mcl.mul(e1, e1, e2); + e2.setStr("1 0 0 0 0 0 0 0 0 0 0 0"); + assertBool("e1 == 1", e1.equals(e2)); BLSsignature(Q); if (errN == 0) { diff --git a/ffi/java/mcl_impl.hpp b/ffi/java/mcl_impl.hpp index bc3bd9f..668910d 100644 --- a/ffi/java/mcl_impl.hpp +++ b/ffi/java/mcl_impl.hpp @@ -370,7 +370,7 @@ void mul(GT& z, const GT& x, const GT& y) } void inv(GT& y, GT& x) { - mcl::bn::Fp12::inv(y.self_, x.self_); + mcl::bn::Fp12::unitaryInv(y.self_, x.self_); } void pow(GT& z, const GT& x, const Fr& y) {