@Test public void testVector30() { final PointHasher pointHasher = EcCurve.secp521r1.getPointHasher(); EcPoint result = pointHasher.hashToCurve("", new byte[] { 55, 55, 55, 55 }); System.out.println("Test Vector Point: " + result); EcPoint expected = new EcPoint( "2768349715079449444231566354465020534634915115767115468302150473018588917518015402422449264716777593497296537839044872846608596157327621194172704431949602173", "1721075987500708626593431035845099406033376640406833904074563079331527369533486419760886310715297738198901920467665231428286533003113019266397765708681873858"); Assert.assertEquals(expected, result); }
public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); BigInteger squareRoot(BigInteger a); EcPoint hashToCurve(final String input); EcPoint hashToCurve(final String input, final byte[] clientSecret); EcPoint hashToCurve(final byte[] input); EcPoint hashToCurve(final byte[] input, final byte[] clientSecret); abstract EcPoint createPointFromInteger(BigInteger t); }
PointHasher { public EcPoint hashToCurve(final String input) { return this.hashToCurve(input.getBytes(StandardCharsets.UTF_8), null); } PointHasher(EcCurve curve); BigInteger squareRoot(BigInteger a); EcPoint hashToCurve(final String input); EcPoint hashToCurve(final String input, final byte[] clientSecret); EcPoint hashToCurve(final byte[] input); EcPoint hashToCurve(final byte[] input, final byte[] clientSecret); abstract EcPoint createPointFromInteger(BigInteger t); static final BigInteger TWO; static final BigInteger THREE; static final BigInteger FOUR; }