Class KTSKeySpec

  • All Implemented Interfaces:
    java.security.spec.KeySpec
    Direct Known Subclasses:
    KTSExtractKeySpec, KTSGenerateKeySpec

    public class KTSKeySpec
    extends java.lang.Object
    implements java.security.spec.KeySpec
    Base KeySpec for creating the agreed key value in a KTS key exchange such as RSA-KEMs
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AlgorithmIdentifier getKdfAlgorithmId()
      Return the AlgorithmIdentifier for the KDF to do key derivation after extracting the secret.
      java.lang.String getKeyAlgorithmName()
      Return the name of the algorithm for the secret key this key spec should produce.
      int getKeySize()
      Return the size of the key (in bits) to be calculated by the SecretKeyFactory used with this key spec.
      java.lang.String getMacAlgorithmName()
      Return the name of the MAC algorithm for the MAC key this key spec should recover (if any).
      int getMacKeySize()
      Return the size of the key (in bits) to be taken from the extracted secret.
      byte[] getOtherInfo()
      Return the otherInfo data for initialising the KDF.
      java.security.spec.AlgorithmParameterSpec getParameterSpec()
      Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getKeyAlgorithmName

        public java.lang.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 java.lang.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 java.security.spec.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.