public final class Ed25519PrivateKeyManager extends PrivateKeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey,com.google.crypto.tink.proto.Ed25519PublicKey>
KeyManager generates new Ed25519PrivateKey keys and produces new
instances of Ed25519Sign.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyT>, KeyTypeManager.PrimitiveFactory<PrimitiveT,KeyT>| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
ed25519Template()
Deprecated.
use
KeyTemplates.get("ED25519") |
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
com.google.crypto.tink.proto.Ed25519PublicKey |
getPublicKey(com.google.crypto.tink.proto.Ed25519PrivateKey key)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.Ed25519KeyFormat,com.google.crypto.tink.proto.Ed25519PrivateKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
com.google.crypto.tink.proto.KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
com.google.crypto.tink.proto.Ed25519PrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawEd25519Template()
Deprecated.
use
KeyTemplates.get("ED25519_RAW") |
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(com.google.crypto.tink.proto.Ed25519PrivateKey keyProto)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassgetKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey>public com.google.crypto.tink.proto.Ed25519PublicKey getPublicKey(com.google.crypto.tink.proto.Ed25519PrivateKey key)
throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey,com.google.crypto.tink.proto.Ed25519PublicKey>GeneralSecurityExceptionpublic com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey>public com.google.crypto.tink.proto.Ed25519PrivateKey parseKey(com.google.protobuf.ByteString byteString)
throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(com.google.crypto.tink.proto.Ed25519PrivateKey keyProto)
throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<com.google.crypto.tink.proto.Ed25519PrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.Ed25519KeyFormat,com.google.crypto.tink.proto.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<com.google.crypto.tink.proto.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.GeneralSecurityException@Deprecated public static final KeyTemplate ed25519Template()
KeyTemplates.get("ED25519")KeyTemplate that generates new instances of ED25519 keys.@Deprecated public static final KeyTemplate rawEd25519Template()
KeyTemplates.get("ED25519_RAW")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.