public final class RsaSsaPkcs1SignKeyManager extends PrivateKeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey,com.google.crypto.tink.proto.RsaSsaPkcs1PublicKey>
RsaSsaPkcs1PrivateKey keys and produces new instances of
RsaSsaPkcs1SignJce.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyT>, KeyTypeManager.PrimitiveFactory<PrimitiveT,KeyT>| Modifier and Type | Method and Description |
|---|---|
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
com.google.crypto.tink.proto.RsaSsaPkcs1PublicKey |
getPublicKey(com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey privKeyProto)
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.RsaSsaPkcs1KeyFormat,com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey> |
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.RsaSsaPkcs1PrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawRsa3072SsaPkcs1Sha256F4Template() |
static KeyTemplate |
rawRsa4096SsaPkcs1Sha512F4Template() |
static void |
registerPair(boolean newKeyAllowed)
Registers the
RsaSsaPkcs1SignKeyManager and the RsaSsaPkcs1VerifyKeyManager
with the registry, so that the the RsaSsaPkcs1-Keys can be used with Tink. |
static KeyTemplate |
rsa3072SsaPkcs1Sha256F4Template() |
static KeyTemplate |
rsa4096SsaPkcs1Sha512F4Template() |
void |
validateKey(com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey privKey)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassgetKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey>public com.google.crypto.tink.proto.RsaSsaPkcs1PublicKey getPublicKey(com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey privKeyProto)
throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey,com.google.crypto.tink.proto.RsaSsaPkcs1PublicKey>GeneralSecurityExceptionpublic com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey>public com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey 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.RsaSsaPkcs1PrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey privKey)
throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.RsaSsaPkcs1KeyFormat,com.google.crypto.tink.proto.RsaSsaPkcs1PrivateKey> 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.RsaSsaPkcs1PrivateKey>public static void registerPair(boolean newKeyAllowed)
throws GeneralSecurityException
RsaSsaPkcs1SignKeyManager and the RsaSsaPkcs1VerifyKeyManager
with the registry, so that the the RsaSsaPkcs1-Keys can be used with Tink.GeneralSecurityExceptionpublic static final KeyTemplate rsa3072SsaPkcs1Sha256F4Template()
KeyTemplate that generates new instances of RSA-SSA-PKCS1 key pairs with the
following parameters:
KeyTemplate.OutputPrefixType#TINK.
public static final KeyTemplate rawRsa3072SsaPkcs1Sha256F4Template()
KeyTemplate that generates new instances of RSA-SSA-PKCS1 key pairs with the
following parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix).
public static final KeyTemplate rsa4096SsaPkcs1Sha512F4Template()
KeyTemplate that generates new instances of RSA-SSA-PKCS1 key pairs with the
following parameters:
KeyTemplate.OutputPrefixType#TINK.
public static final KeyTemplate rawRsa4096SsaPkcs1Sha512F4Template()
KeyTemplate that generates new instances of RSA-SSA-PKCS1 key pairs with the
following parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix).