Package org.bouncycastle.jcajce.spec
Class KTSKeySpec
java.lang.Object
org.bouncycastle.jcajce.spec.KTSKeySpec
- All Implemented Interfaces:
KeySpec
- Direct Known Subclasses:
KTSExtractKeySpec
,KTSGenerateKeySpec
Base KeySpec for creating the agreed key value in a KTS key exchange such as RSA-KEMs
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FipsKDF.AgreementKDFParametersBuilder
static final FipsKDF.AgreementKDFParametersBuilder
-
Method Summary
Modifier and TypeMethodDescriptionReturn the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret.byte[]
Return the salt data for initialising the KDF.Return the name of the algorithm for the secret key this key spec should produce.int
Return the size of the key (in bits) to be calculated by the SecretKeyFactory used with this key spec.Return the name of the MAC algorithm for the MAC key this key spec should recover (if any).int
Return the size of the key (in bits) to be taken from the extracted secret.byte[]
Return the otherInfo data for initialising the KDF.Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted.
-
Field Details
-
KDF2
-
KDF3
-
-
Method Details
-
getKeyAlgorithmName
Return the name of the algorithm for the secret key this key spec should produce.- Returns:
- the key algorithm.
-
getKeySize
public int getKeySize()Return the size of the key (in bits) to be calculated by the SecretKeyFactory used with this key spec.- Returns:
- length in bits of the key to be calculated.
-
getMacAlgorithmName
Return the name of the MAC algorithm for the MAC key this key spec should recover (if any).- Returns:
- the MAC key algorithm, null if not present.
-
getMacKeySize
public int getMacKeySize()Return the size of the key (in bits) to be taken from the extracted secret.- Returns:
- length in bits of the MAC key to be recovered, 0 if not present.
-
getParameterSpec
Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted.- Returns:
- the algorithm parameter spec to be used with the private key.
-
getKdfAlgorithmId
Return the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret.- Returns:
- the AlgorithmIdentifier for the SecretKeyFactory's KDF.
-
getOtherInfo
public byte[] getOtherInfo()Return the otherInfo data for initialising the KDF.- Returns:
- the otherInfo data.
-
getKdfSalt
public byte[] getKdfSalt()Return the salt data for initialising the KDF.- Returns:
- the KDF salt data.
-