[java] use unitaryInv instead of inv

update-fork
MITSUNARI Shigeo 4 years ago
parent 0d436b2378
commit 44f3595a6d
  1. 4
      ffi/java/MclTest.java
  2. 2
      ffi/java/mcl_impl.hpp

@ -107,6 +107,10 @@ public class MclTest {
Mcl.mul(cP, P, c); // cP = P * c Mcl.mul(cP, P, c); // cP = P * c
Mcl.pairing(e1, cP, Q); Mcl.pairing(e1, cP, Q);
assertBool("e1 == e2", e1.equals(e2)); 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); BLSsignature(Q);
if (errN == 0) { if (errN == 0) {

@ -370,7 +370,7 @@ void mul(GT& z, const GT& x, const GT& y)
} }
void inv(GT& y, GT& x) 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) void pow(GT& z, const GT& x, const Fr& y)
{ {

Loading…
Cancel
Save