@Test public void testVector13() { final PointHasher pointHasher = EcCurve.secp256r1.getPointHasher(); EcPoint result = pointHasher.hashToCurve(new byte[0], new byte[] { 11, 22, 33, 44, 55, 66, 77, 88, 99, (byte) 0xAA }); System.out.println("Test Vector Point: " + result); EcPoint expected = new EcPoint("7896639666179850600089770859633179318609745119740988802865031172234535885203", "40879632738687313280027362084246141692225199417980157740680594485795347875719"); 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; }