public final class Ed25519PrivateKeyManager extends PrivateKeyTypeManager<Ed25519PrivateKey,Ed25519PublicKey>
KeyManager generates new Ed25519PrivateKey keys and produces new
instances of Ed25519Sign.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyProtoT extends com.google.protobuf.MessageLite>| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
ed25519Template() |
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
Ed25519PublicKey |
getPublicKey(Ed25519PrivateKey key)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<Ed25519KeyFormat,Ed25519PrivateKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
Ed25519PrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawEd25519Template() |
static void |
registerPair(boolean newKeyAllowed)
Registers the
Ed25519PrivateKeyManager and the Ed25519PublicKeyManager with the
registry, so that the the Ed25519-Keys can be used with Tink. |
void |
validateKey(Ed25519PrivateKey keyProto)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassfipsStatus, firstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<Ed25519PrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<Ed25519PrivateKey>public Ed25519PublicKey getPublicKey(Ed25519PrivateKey key) throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<Ed25519PrivateKey,Ed25519PublicKey>GeneralSecurityExceptionpublic KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<Ed25519PrivateKey>public Ed25519PrivateKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<Ed25519PrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(Ed25519PrivateKey keyProto) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<Ed25519PrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<Ed25519KeyFormat,Ed25519PrivateKey> keyFactory()
KeyTypeManagerKeyTypeManager.KeyFactory for this key type.
By default, this throws an UnsupportedOperationException. Hence, if an implementation does not support creating primitives, no implementation is required.
keyFactory in class KeyTypeManager<Ed25519PrivateKey>public static void registerPair(boolean newKeyAllowed)
throws GeneralSecurityException
Ed25519PrivateKeyManager and the Ed25519PublicKeyManager with the
registry, so that the the Ed25519-Keys can be used with Tink.GeneralSecurityExceptionpublic static final KeyTemplate ed25519Template()
KeyTemplate that generates new instances of ED25519 keys.public static final KeyTemplate rawEd25519Template()
KeyTemplate that generates new instances of Ed25519 keys. Keys generated from
this template creates raw signatures of exactly 64 bytes. It's compatible with most other
libraries.