@Test public void success_ScalarMultipleBasePoint_9() { Point point = curve.getBasePoint().scalarMultiply(new BigInteger("9")); assertThat(point.getAffineX().getInteger(), is(new BigInteger("678819586033147925281023223806960408804378601126531157763570688900376738103095651143762799384400423222857151421219751020550555632887915"))); assertThat(point.getAffineY().getInteger(), is(new BigInteger("60696086077381741094032748984832537947444053808169978921575679174195124930944594569279421079811560196531757705827406107516052224374095"))); }
@Override public Point scalarMultiply(BigInteger integer) { if (integer.equals(BigInteger.ZERO)) { return PointEd448.O; } Point[] qs = new Point[]{O, O}; Point[] rs = new Point[]{this, this, negateY()}; int[] signedBin = ArrayUtils.toMutualOppositeForm(integer); for (int aSignedBin : signedBin) { qs[0] = qs[0].doubling(); qs[1] = qs[0].add(rs[1 - aSignedBin]).negate(); qs[0] = qs[(aSignedBin ^ (aSignedBin >> 31)) - (aSignedBin >> 31)]; } return qs[0]; }
PointEd448 extends Point { @Override public Point scalarMultiply(BigInteger integer) { if (integer.equals(BigInteger.ZERO)) { return PointEd448.O; } Point[] qs = new Point[]{O, O}; Point[] rs = new Point[]{this, this, negateY()}; int[] signedBin = ArrayUtils.toMutualOppositeForm(integer); for (int aSignedBin : signedBin) { qs[0] = qs[0].doubling(); qs[1] = qs[0].add(rs[1 - aSignedBin]).negate(); qs[0] = qs[(aSignedBin ^ (aSignedBin >> 31)) - (aSignedBin >> 31)]; } return qs[0]; } }
PointEd448 extends Point { @Override public Point scalarMultiply(BigInteger integer) { if (integer.equals(BigInteger.ZERO)) { return PointEd448.O; } Point[] qs = new Point[]{O, O}; Point[] rs = new Point[]{this, this, negateY()}; int[] signedBin = ArrayUtils.toMutualOppositeForm(integer); for (int aSignedBin : signedBin) { qs[0] = qs[0].doubling(); qs[1] = qs[0].add(rs[1 - aSignedBin]).negate(); qs[0] = qs[(aSignedBin ^ (aSignedBin >> 31)) - (aSignedBin >> 31)]; } return qs[0]; } PointEd448(Coordinate x, Coordinate y, Coordinate z, Coordinate t); }
PointEd448 extends Point { @Override public Point scalarMultiply(BigInteger integer) { if (integer.equals(BigInteger.ZERO)) { return PointEd448.O; } Point[] qs = new Point[]{O, O}; Point[] rs = new Point[]{this, this, negateY()}; int[] signedBin = ArrayUtils.toMutualOppositeForm(integer); for (int aSignedBin : signedBin) { qs[0] = qs[0].doubling(); qs[1] = qs[0].add(rs[1 - aSignedBin]).negate(); qs[0] = qs[(aSignedBin ^ (aSignedBin >> 31)) - (aSignedBin >> 31)]; } return qs[0]; } PointEd448(Coordinate x, Coordinate y, Coordinate z, Coordinate t); static PointEd448 fromAffine(Coordinate x, Coordinate y); @Override Point add(Point point); @Override Point doubling(); @Override Point scalarMultiply(BigInteger integer); @Override Point negateY(); @Override EncodedPoint encode(); @Override Point negate(); }
PointEd448 extends Point { @Override public Point scalarMultiply(BigInteger integer) { if (integer.equals(BigInteger.ZERO)) { return PointEd448.O; } Point[] qs = new Point[]{O, O}; Point[] rs = new Point[]{this, this, negateY()}; int[] signedBin = ArrayUtils.toMutualOppositeForm(integer); for (int aSignedBin : signedBin) { qs[0] = qs[0].doubling(); qs[1] = qs[0].add(rs[1 - aSignedBin]).negate(); qs[0] = qs[(aSignedBin ^ (aSignedBin >> 31)) - (aSignedBin >> 31)]; } return qs[0]; } PointEd448(Coordinate x, Coordinate y, Coordinate z, Coordinate t); static PointEd448 fromAffine(Coordinate x, Coordinate y); @Override Point add(Point point); @Override Point doubling(); @Override Point scalarMultiply(BigInteger integer); @Override Point negateY(); @Override EncodedPoint encode(); @Override Point negate();  }