@Test public void success_GeneratePublicKeySeed_via_SHAKE_512_from_hex_string_7() { PrivateKey privateKey = PrivateKey.newInstance(HexEncoder.getBytes( "d65df341ad13e008567688baedda8e9d" + "cdc17dc024974ea5b4227b6530e339bf" + "f21f99e68ca6968f3cca6dfe0fb9f4fa" + "b4fa135d5542ea3f01")); byte[] seed = delegate.generatePublicKeySeed(privateKey); assertThat(HexEncoder.getString(seed), is( "df9705f58edbab802c7f8363cfe5560a" + "b1c6132c20a9f1dd163483a26f8ac53a" + "39d6808bf4a1dfbd261b099bb03b3fb5" + "0906cb28bd8a081f00")); }
@Override public byte[] generatePublicKeySeed(PrivateKey privateKey) { if (!(privateKey instanceof PrivateKeyEd448)) { throw new IllegalArgumentException("Public key on Curve448 must be " + CURVE.getPublicKeyByteLength() + " byte length. Length: " + privateKey.getRaw().length); } BigInteger s = privateKey.getScalarSeed(this); Point point = CURVE.getBasePoint().scalarMultiply(s); return point.encode().getValue(); }
Ed448PublicKeyDelegate implements PublicKeyDelegate, HashDelegate { @Override public byte[] generatePublicKeySeed(PrivateKey privateKey) { if (!(privateKey instanceof PrivateKeyEd448)) { throw new IllegalArgumentException("Public key on Curve448 must be " + CURVE.getPublicKeyByteLength() + " byte length. Length: " + privateKey.getRaw().length); } BigInteger s = privateKey.getScalarSeed(this); Point point = CURVE.getBasePoint().scalarMultiply(s); return point.encode().getValue(); } }
Ed448PublicKeyDelegate implements PublicKeyDelegate, HashDelegate { @Override public byte[] generatePublicKeySeed(PrivateKey privateKey) { if (!(privateKey instanceof PrivateKeyEd448)) { throw new IllegalArgumentException("Public key on Curve448 must be " + CURVE.getPublicKeyByteLength() + " byte length. Length: " + privateKey.getRaw().length); } BigInteger s = privateKey.getScalarSeed(this); Point point = CURVE.getBasePoint().scalarMultiply(s); return point.encode().getValue(); } Ed448PublicKeyDelegate(HashAlgorithm hashAlgorithm); }
Ed448PublicKeyDelegate implements PublicKeyDelegate, HashDelegate { @Override public byte[] generatePublicKeySeed(PrivateKey privateKey) { if (!(privateKey instanceof PrivateKeyEd448)) { throw new IllegalArgumentException("Public key on Curve448 must be " + CURVE.getPublicKeyByteLength() + " byte length. Length: " + privateKey.getRaw().length); } BigInteger s = privateKey.getScalarSeed(this); Point point = CURVE.getBasePoint().scalarMultiply(s); return point.encode().getValue(); } Ed448PublicKeyDelegate(HashAlgorithm hashAlgorithm); @Override byte[] generatePublicKeySeed(PrivateKey privateKey); @Override byte[] hashPrivateKey(PrivateKey privateKey); }
Ed448PublicKeyDelegate implements PublicKeyDelegate, HashDelegate { @Override public byte[] generatePublicKeySeed(PrivateKey privateKey) { if (!(privateKey instanceof PrivateKeyEd448)) { throw new IllegalArgumentException("Public key on Curve448 must be " + CURVE.getPublicKeyByteLength() + " byte length. Length: " + privateKey.getRaw().length); } BigInteger s = privateKey.getScalarSeed(this); Point point = CURVE.getBasePoint().scalarMultiply(s); return point.encode().getValue(); } Ed448PublicKeyDelegate(HashAlgorithm hashAlgorithm); @Override byte[] generatePublicKeySeed(PrivateKey privateKey); @Override byte[] hashPrivateKey(PrivateKey privateKey);  }