Class KTSKeySpec

java.lang.Object
org.bouncycastle.jcajce.spec.KTSKeySpec
All Implemented Interfaces:
KeySpec
Direct Known Subclasses:
KTSExtractKeySpec, KTSGenerateKeySpec

public class KTSKeySpec extends Object implements KeySpec
Base KeySpec for creating the agreed key value in a KTS key exchange such as RSA-KEMs
  • Field Details

  • Method Details

    • getKeyAlgorithmName

      public String 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

      public String 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

      public AlgorithmParameterSpec 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

      public AlgorithmIdentifier 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.