public final class RsaSsaPkcs1SignKeyManager extends PrivateKeyTypeManager<RsaSsaPkcs1PrivateKey,RsaSsaPkcs1PublicKey>
RsaSsaPkcs1PrivateKey keys and produces new instances of
RsaSsaPkcs1SignJce.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyProtoT extends com.google.protobuf.MessageLite>| Modifier and Type | Method and Description |
|---|---|
TinkFipsUtil.AlgorithmFipsCompatibility |
fipsStatus()
Returns the FIPS compatibility of this KeyTypeManager.
|
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
RsaSsaPkcs1PublicKey |
getPublicKey(RsaSsaPkcs1PrivateKey privKeyProto)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<RsaSsaPkcs1KeyFormat,RsaSsaPkcs1PrivateKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this 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(RsaSsaPkcs1PrivateKey privKey)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassfirstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<RsaSsaPkcs1PrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<RsaSsaPkcs1PrivateKey>public RsaSsaPkcs1PublicKey getPublicKey(RsaSsaPkcs1PrivateKey privKeyProto) throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<RsaSsaPkcs1PrivateKey,RsaSsaPkcs1PublicKey>GeneralSecurityExceptionpublic KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<RsaSsaPkcs1PrivateKey>public RsaSsaPkcs1PrivateKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<RsaSsaPkcs1PrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(RsaSsaPkcs1PrivateKey privKey) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<RsaSsaPkcs1PrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<RsaSsaPkcs1KeyFormat,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<RsaSsaPkcs1PrivateKey>public TinkFipsUtil.AlgorithmFipsCompatibility fipsStatus()
KeyTypeManagerfipsStatus in class KeyTypeManager<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).