CoordinateEd448 extends Coordinate { @Override public Coordinate inverse() { return new CoordinateEd448(value.modInverse(curve.getPrimePowerP())); } CoordinateEd448(BigInteger integer); @Override Coordinate add(Coordinate val); @Override Coordinate divide(Coordinate val); @Override Coordinate multiply(Coordinate val); @Override Coordinate subtract(Coordinate val); @Override Coordinate mod(); @Override Coordinate inverse(); @Override Coordinate powerMod(BigInteger exponent); @Override Coordinate negate(); @Override EncodedCoordinate encode(); static final CoordinateEd448 ZERO; static final CoordinateEd448 ONE; }
@Test public void success_InverseCoordinate() { Coordinate coordinate1 = new CoordinateEd448(new BigInteger("100")); Coordinate coordinate2 = new CoordinateEd448(new BigInteger("101241240")); Coordinate result1 = coordinate1.inverse(); Coordinate result2 = coordinate2.inverse(); assertThat(result1.getInteger(), is(new BigInteger("298003876961198825125222761234081859084992957881800404715410981664051054548359616801422517316457383831336442629355891318031934187529830"))); assertThat(result2.getInteger(), is(new BigInteger("673507629182422721936800389851085231159105187272243652094453137669720167156774078719049982943593330342901284365694758095842983726897167"))); }