PointEd25519 extends Point { public static PointEd25519 fromAffine(Coordinate x, Coordinate y) { return new PointEd25519( x.multiply(DEFAULT_Z).mod(), y.multiply(DEFAULT_Z).mod(), DEFAULT_Z, x.multiply(y).multiply(DEFAULT_Z).mod()); } PointEd25519(Coordinate x, Coordinate y, Coordinate z, Coordinate t); static PointEd25519 fromAffine(Coordinate x, Coordinate y); @Override final Point add(Point point); @Override Point doubling(); @Override final Point scalarMultiply(BigInteger integer); @Override Point negateY(); @Override final EncodedPoint encode(); @Override Point negate();  }
@Test public void success_IsEqual_true_1() { Point point1 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); Point point2 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); assertThat(point1.isEqual(point2), is(true)); }
@Test public void success_IsEqual_false_1() { Point point1 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("55756317091645948491064284809040306721406210822346482531807933600495972956139"))); Point point2 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); assertThat(point1.isEqual(point2), is(false)); }
@Test public void success_IsEqual_false_2() { Point point1 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("47481641482705931103934862287125658686534006637492775092431200862455707981015")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); Point point2 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); assertThat(point1.isEqual(point2), is(false)); }
@Test public void success_IsEqual_false_3() { Point point1 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); Point point2 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("55756317091645948491064284809040306721406210822346482531807933600495972956139"))); assertThat(point1.isEqual(point2), is(false)); }
@Test public void success_IsEqual_false_4() { Point point1 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("43891533794047446595129048335950223439754428083113210033800244870979949519638")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); Point point2 = PointEd25519.fromAffine( new CoordinateEd25519(new BigInteger("47481641482705931103934862287125658686534006637492775092431200862455707981015")), new CoordinateEd25519(new BigInteger("23252602200307492321313643524776623321052079804243872788483132543098216090908"))); assertThat(point1.isEqual(point2), is(false)); }