Top Description Fields Constructors Methods
org.bouncycastle.jcajce.spec

public Class KTSKeySpec

extends Object
implements KeySpec
Class Inheritance
All Implemented Interfaces
java.security.spec.KeySpec
Known Direct Subclasses
org.bouncycastle.jcajce.spec.KTSExtractKeySpec, org.bouncycastle.jcajce.spec.KTSGenerateKeySpec
Imports
java.security.spec.AlgorithmParameterSpec, .KeySpec, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.asn1.x9.X9ObjectIdentifiers, org.bouncycastle.crypto.fips.FipsKDF, org.bouncycastle.util.Arrays

Base KeySpec for creating the agreed key value in a KTS key exchange such as RSA-KEMs

Field Summary

Modifier and TypeField and Description
public static final FipsKDF.AgreementKDFParametersBuilder
public static final FipsKDF.AgreementKDFParametersBuilder
private final AlgorithmIdentifier
private final String
private final int
private final String
private final int
private byte[]
private final AlgorithmParameterSpec

Constructor Summary

AccessConstructor and Description
pack-priv
KTSKeySpec(String keyAlgorithmName, int keySize, String macAlgorithm, int macKeySizeInBits, AlgorithmParameterSpec parameterSpec, AlgorithmIdentifier kdfAlgorithm, byte[] otherInfo)

Method Summary

Modifier and TypeMethod and Description
pack-priv static byte[]
copyOtherInfo(byte[] otherInfo)

pack-priv static AlgorithmIdentifier
public AlgorithmIdentifier

Returns:

the AlgorithmIdentifier for the SecretKeyFactory's KDF.
getKdfAlgorithmId
()

Return the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret.

public String

Returns:

the key algorithm.
getKeyAlgorithmName
()

Return the name of the algorithm for the secret key this key spec should produce.

public int

Returns:

length in bits of the key to be calculated.
getKeySize
()

Return the size of the key (in bits) to be calculated by the SecretKeyFactory used with this key spec.

public String

Returns:

the MAC key algorithm, null if not present.
getMacAlgorithmName
()

Return the name of the MAC algorithm for the MAC key this key spec should recover (if any).

public int

Returns:

length in bits of the MAC key to be recovered, 0 if not present.
getMacKeySize
()

Return the size of the key (in bits) to be taken from the extracted secret.

public byte[]

Returns:

the otherInfo data.
getOtherInfo
()

Return the otherInfo data for initialising the KDF.

public AlgorithmParameterSpec

Returns:

the algorithm parameter spec to be used with the private key.
getParameterSpec
()

Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

KDF2back to summary
public static final FipsKDF.AgreementKDFParametersBuilder KDF2
KDF3back to summary
public static final FipsKDF.AgreementKDFParametersBuilder KDF3
kdfAlgorithmback to summary
private final AlgorithmIdentifier kdfAlgorithm
keyAlgorithmNameback to summary
private final String keyAlgorithmName
keySizeback to summary
private final int keySize
macAlgorithmback to summary
private final String macAlgorithm
macKeySizeInBitsback to summary
private final int macKeySizeInBits
otherInfoback to summary
private byte[] otherInfo
parameterSpecback to summary
private final AlgorithmParameterSpec parameterSpec

Constructor Detail

KTSKeySpecback to summary
pack-priv KTSKeySpec(String keyAlgorithmName, int keySize, String macAlgorithm, int macKeySizeInBits, AlgorithmParameterSpec parameterSpec, AlgorithmIdentifier kdfAlgorithm, byte[] otherInfo)

Method Detail

copyOtherInfoback to summary
pack-priv static byte[] copyOtherInfo(byte[] otherInfo)
createAlgIdback to summary
pack-priv static AlgorithmIdentifier createAlgId(FipsKDF.AgreementKDFParametersBuilder kdfParamSource)
getKdfAlgorithmIdback to summary
public AlgorithmIdentifier getKdfAlgorithmId()

Return the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret.

Returns:AlgorithmIdentifier

the AlgorithmIdentifier for the SecretKeyFactory's KDF.

getKeyAlgorithmNameback to summary
public String getKeyAlgorithmName()

Return the name of the algorithm for the secret key this key spec should produce.

Returns:String

the key algorithm.

getKeySizeback to summary
public int getKeySize()

Return the size of the key (in bits) to be calculated by the SecretKeyFactory used with this key spec.

Returns:int

length in bits of the key to be calculated.

getMacAlgorithmNameback to summary
public String getMacAlgorithmName()

Return the name of the MAC algorithm for the MAC key this key spec should recover (if any).

Returns:String

the MAC key algorithm, null if not present.

getMacKeySizeback to summary
public int getMacKeySize()

Return the size of the key (in bits) to be taken from the extracted secret.

Returns:int

length in bits of the MAC key to be recovered, 0 if not present.

getOtherInfoback to summary
public byte[] getOtherInfo()

Return the otherInfo data for initialising the KDF.

Returns:byte[]

the otherInfo data.

getParameterSpecback to summary
public AlgorithmParameterSpec getParameterSpec()

Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted.

Returns:AlgorithmParameterSpec

the algorithm parameter spec to be used with the private key.