On 8/15/2017 5:29 PM, Anders Rundgren wrote:
Does this mean that the following is correct?
EC public key:
public interface ECPublicKey
extends PublicKey, ECKey
CFRG/RFC 7748 public key:
public class TheActualImplememtationClass
extends PublicKey, ByteArrayKey
Basically, yes. My latest prototype has something like:
class XDHPublicKeyImpl extends X509Key implements ByteArrayKey, PublicKey
So it supports X.509 encoding through getEncoded(), and raw encoding
through ByteArrayKey. But perhaps ByteArrayKey and X.509 encoding is not
necessary---see Xuelei's latest suggestion on this thread related to this.
If so, it should work. Documentation seems a bit less obvious though
which is why I advocated a more direct approach.
Cheers,
Anders