Skip to content

Commit

Permalink
SpotlessApply...
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminion committed Jan 9, 2020
1 parent 059a4d7 commit b5d256d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import static tech.pegasys.artemis.util.hashToG2.Helper.clear_h2;
import static tech.pegasys.artemis.util.hashToG2.Helper.hashToBase;
import static tech.pegasys.artemis.util.hashToG2.Helper.isInG2;
import static tech.pegasys.artemis.util.hashToG2.Helper.isOnCurve;
import static tech.pegasys.artemis.util.hashToG2.Helper.iso3;
import static tech.pegasys.artemis.util.hashToG2.Helper.mapToCurve;
import static tech.pegasys.artemis.util.hashToG2.Helper.isOnCurve;

import java.nio.charset.StandardCharsets;
import org.apache.milagro.amcl.BLS381.ECP2;
Expand Down Expand Up @@ -67,12 +67,12 @@ public static ECP2 hashToG2(Bytes message, Bytes cipherSuite) {
JacobianPoint p = iso3(q0.add(q1));

// This should never fail, and the check is non-trivial, so we use an assert
assert(isOnCurve(p));
assert isOnCurve(p);

JacobianPoint q = clear_h2(p);

// This should never fail, and the check is very expensive, so we use an assert
assert(isInG2(q));
assert isInG2(q);

return q.toECP2();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static tech.pegasys.artemis.util.hashToG2.Chains.qChain;
import static tech.pegasys.artemis.util.hashToG2.HashToCurve.hashToG2;
import static tech.pegasys.artemis.util.hashToG2.Helper.isInG2;

Expand Down

0 comments on commit b5d256d

Please sign in to comment.