Class MLDSAKeyParameterSpec

java.lang.Object
com.ibm.crypto.hdwrCCA.provider.MLDSAKeyParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class MLDSAKeyParameterSpec extends Object implements AlgorithmParameterSpec
This class provides means for specifying the parameters for a ML-DSA key pair to be generated via the MLDSAKeyPairGenerator class. These parameters are:

type, which is either KeyHWAttrubuteValues.PKDS, KeyHWAttributeValues.MASTER, or KeyHWAttributeValues.CLEAR;

usage must be KeyHWAttributeValues.SIGNATURE;

name, the name or OID of the desired algorithm. Acceptable OIDs: "2.16.840.1.101.3.4.3.17" - Pure ML-DSA 4,4 "2.16.840.1.101.3.4.3.18" - Pure ML-DSA 6,5 "2.16.840.1.101.3.4.3.19" - Pure ML-DSA 8,7 "2.16.840.1.101.3.4.3.32" - Pre-hash ML-DSA 4,4 with SHA-512 "2.16.840.1.101.3.4.3.33" - Pre-hash ML-DSA 6,5 with SHA-512 "2.16.840.1.101.3.4.3.34" - Pre-hash ML-DSA 8,7 with SHA-512

Acceptable names: "puremldsa44" - Pure ML-DSA 4,4 "puremldsa65" - Pure ML-DSA 6,5 "puremldsa87" - Pure ML-DSA 8,7 "prehashmldsa44" - Pre-hash ML-DSA 4,4 "prehashmldsa65" - Pre-hash ML-DSA 6,5 "prehashmldsa87" - Pre-hash ML-DSA 8,7

keylabel which is the label associated with the generated private key.

This class is immutable.

  • Constructor Details

    • MLDSAKeyParameterSpec

      public MLDSAKeyParameterSpec(String name) throws IllegalArgumentException
      Creates a parameter set. The type is defaulted to KeyHWAttributeValues.MASTER. The usage is defaulted to KeyHWAttributeValues.SIGNATURE.
      Parameters:
      name - the standard name or OID of the algorithm parameters
      Throws:
      IllegalArgumentException - for any parameter values outside the bounds for that parameter.
    • MLDSAKeyParameterSpec

      public MLDSAKeyParameterSpec(String name, byte type) throws IllegalArgumentException
      Creates a parameter set. The usage is defaulted to KeyHWAttributeValues.SIGNATURE.
      Parameters:
      name - the standard name or OID of the algorithm parameters
      type - the hardware key type determined from KeyHWAttributeValues PKDS (key storage), MASTER (encrypted under ICSF master key), or CLEAR.
      Throws:
      IllegalArgumentException - for any parameter values outside the bounds for that parameter.
    • MLDSAKeyParameterSpec

      public MLDSAKeyParameterSpec(String name, byte type, byte usage) throws IllegalArgumentException
      Creates a parameter set.
      Parameters:
      name - the standard name or OID of the algorithm parameters
      type - the hardware key type determined from KeyHWAttributeValues PKDS (key storage), MASTER (encrypted under ICSF master key), or CLEAR.
      usage - the way that the key will be used, must be SIGNATURE (used for signing purposes only)
      Throws:
      IllegalArgumentException - for any parameter values outside the bounds for that parameter.
    • MLDSAKeyParameterSpec

      public MLDSAKeyParameterSpec(String name, byte type, byte usage, String label) throws IllegalArgumentException
      Creates a parameter set.
      Parameters:
      name - the standard name or OID of the algorithm parameters
      type - the hardware key type determined from KeyHWAttributeValues PKDS (key storage), MASTER (encrypted under ICSF master key), or CLEAR.
      usage - the way that the key will be used, must be SIGNATURE (used for signing purposes only)
      label - if a KeyHWAttributeValues.PKDS key, the label used to identify the key. If a KeyHWAttributeValues.CLEAR key, label is ignored.
      Throws:
      IllegalArgumentException - for any parameter values outside the bounds for that parameter.
  • Method Details

    • getName

      public String getName()
      Returns the name
      Returns:
      the name
    • getAttributes

      public MLDSAKeyAttributes getAttributes()
      Returns the key pair attributes.
      Returns:
      the key pair attributes.
    • getLabelString

      public String getLabelString()
      Returns the key label that will be used to store the private key.
      Returns:
      the key label. Returns null if no label is associated with this parameter spec.
    • getPreHash

      public boolean getPreHash()
      Returns the preHash
      Returns:
      the preHash