public class EdDSAPublicKey extends Object implements EdDSAKey, PublicKey
Warning: Public key encoding is is based on the current curdle WG draft, and is subject to change. See getEncoded().
For compatibility with older releases, decoding supports both the old and new draft specifications. See decode().
Ref: https://tools.ietf.org/html/draft-ietf-curdle-pkix-04
Old Ref: https://tools.ietf.org/html/draft-josefsson-pkix-eddsa-04
KEY_ALGORITHM
Constructor and Description |
---|
EdDSAPublicKey(EdDSAPublicKeySpec spec) |
EdDSAPublicKey(X509EncodedKeySpec spec) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
GroupElement |
getA() |
byte[] |
getAbyte() |
String |
getAlgorithm() |
byte[] |
getEncoded()
Returns the public key in its canonical encoding.
|
String |
getFormat() |
GroupElement |
getNegativeA() |
EdDSAParameterSpec |
getParams() |
int |
hashCode() |
public EdDSAPublicKey(EdDSAPublicKeySpec spec)
public EdDSAPublicKey(X509EncodedKeySpec spec) throws InvalidKeySpecException
InvalidKeySpecException
public String getAlgorithm()
getAlgorithm
in interface Key
public byte[] getEncoded()
This implements the following specs:
For keys in older formats, decoding and then re-encoding is sufficient to migrate them to the canonical encoding.
Relevant spec quotes:In the X.509 certificate, the subjectPublicKeyInfo field has the SubjectPublicKeyInfo type, which has the following ASN.1 syntax: SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING }
AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } For all of the OIDs, the parameters MUST be absent.
id-Ed25519 OBJECT IDENTIFIER ::= { 1 3 101 112 }
getEncoded
in interface Key
public EdDSAParameterSpec getParams()
public GroupElement getA()
public GroupElement getNegativeA()
public byte[] getAbyte()
Copyright © 2021. All rights reserved.