public class EdDSAPublicKey extends Object implements EdDSAKey, PublicKey
For compatibility with older releases, decoding supports both RFC 8410 and an older draft specification.
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 © 2019. All rights reserved.