Class KyberPrivateKeySpec

java.lang.Object
com.ibm.crypto.hdwrCCA.provider.KyberPrivateKeySpec
All Implemented Interfaces:
KeySpec

@Deprecated(since="21.0.11.0", forRemoval=true) public class KyberPrivateKeySpec extends Object implements KeySpec
Deprecated, for removal: This API element is subject to removal in a future version.
Replaced by ML-KEM implementation. This CRYSTALS-Kyber implementation is deprecated and will be removed in a future release, in alignment with NIST's latest recommendations for post-quantum cryptography modernization. Users should transition to the finalized ML-KEM standards.
This class specifies a Kyber private key spec to be used with KyberKeyFactory. This is used to make a representation of the key for import or export.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    KyberPrivateKeySpec(byte[] keyToken, byte type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an instance of this class from a key token and key type.
    KyberPrivateKeySpec(byte[] keyToken, byte type, byte usage)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an instance of this class from a key token and key type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the key attributes.
    byte[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a clone of the PKDS label or key token.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KyberPrivateKeySpec

      public KyberPrivateKeySpec(byte[] keyToken, byte type) throws InvalidKeySpecException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance of this class from a key token and key type. The usage is defaulted to KeyHWAttributeValues.KEYMANAGEMENT.
      Parameters:
      keyToken - The token associated with the private key. If this is a key label, then the label must conform to the character restrictions imposed by the platform you are executing on and should be in the ISO_8859_1 character encoding.
      type - The type of the key Encrypted under the master key (KeyHWAttributeValues.MASTER) or outside the hardware in the PKDS (KeyHWAttributeValues.PKDS) or in the clear (KeyHWAttributeValues.CLEAR). Please note that it is recommended to use the KeyLabelKeySpec class to create a key specification using a KeyHWAttributeValues.PKDS type of key.
      Throws:
      InvalidKeySpecException
    • KyberPrivateKeySpec

      public KyberPrivateKeySpec(byte[] keyToken, byte type, byte usage)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance of this class from a key token and key type. The usage is defaulted to KeyHWAttributeValues.KEYMANAGEMENT.
      Parameters:
      keyToken - The token associated with the private key. If this is a key label, then the label must conform to the character restrictions imposed by the platform you are executing on and should be in the ISO_8859_1 character encoding.
      type - The type of the key Encrypted under the master key (KeyHWAttributeValues.MASTER) or outside the hardware in the PKDS (KeyHWAttributeValues.PKDS) or in the clear (KeyHWAttributeValues.CLEAR). Please note that it is recommended to use the KeyLabelKeySpec class to create a key specification using a KeyHWAttributeValues.PKDS type of key.
      usage - Determines for what purpose the key pair is to be used. KeyHWAttributeValues.KEYMANAGEMENT is for signing purposes and must be used.
  • Method Details

    • getToken

      public byte[] getToken()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a clone of the PKDS label or key token.

      Note that this method returns a clone of sensitive information. It is the caller's responsibility to zero out the information after it is no longer needed.

      Returns:
      A clone of the PKDS label or key token.
    • getAttributes

      public KyberKeyAttributes getAttributes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the key attributes.
      Returns:
      the key attributes.