class Ed25519Utils {

  public static Ed25519EncodedFieldElement prepareForScalarMultiply(final PrivateKey key) {
    final byte[] hash = Hashes.sha512(key.getBytes());
    final byte[] a = Arrays.copyOfRange(hash, 0, 32);
    a[31] &= 0x7F;
    a[31] |= 0x40;
    a[0] &= 0xF8;
    return new Ed25519EncodedFieldElement(a);
  }

  private  Ed25519Utils();

}