Class MLKEMKeyParameterSpec
java.lang.Object
com.ibm.crypto.hdwrCCA.provider.MLKEMKeyParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
This class provides means for specifying the parameters for a
ML-KEM key pair to be generated via the MLKEMKeyPairGenerator
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.4.2" - ML-KEM 768 "2.16.840.1.101.3.4.4.3" - ML-KEM 1024 Acceptable names: "mlkem768" - ML-KEM 768 "mlkem1024" - ML-KEM 1024
keylabel which is the label associated with the generated private key.
This class is immutable.
-
Constructor Summary
ConstructorsConstructorDescriptionMLKEMKeyParameterSpec(String name) Creates a parameter set.MLKEMKeyParameterSpec(String name, byte type) Creates a parameter set.MLKEMKeyParameterSpec(String name, byte type, byte usage) Creates a parameter set.MLKEMKeyParameterSpec(String name, byte type, byte usage, String label) Creates a parameter set. -
Method Summary
Modifier and TypeMethodDescriptionReturns the key pair attributes.Returns the key label that will be used to store the private key.getName()Returns the name
-
Constructor Details
-
MLKEMKeyParameterSpec
Creates a parameter set. The type is defaulted to KeyHWAttributeValues.MASTER. The usage is defaulted to KeyHWAttributeValues.KEYMANAGEMENT.- Parameters:
name- the standard name or OID of the algorithm parameters- Throws:
IllegalArgumentException- for any parameter values outside the bounds for that parameter.
-
MLKEMKeyParameterSpec
Creates a parameter set. The usage is defaulted to KeyHWAttributeValues.KEYMANAGEMENT.- Parameters:
name- the standard name or OID of the algorithm parameterstype- 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.
-
MLKEMKeyParameterSpec
Creates a parameter set.- Parameters:
name- the standard name or OID of the algorithm parameterstype- 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 KEYMANAGEMENT- Throws:
IllegalArgumentException- for any parameter values outside the bounds for that parameter.
-
MLKEMKeyParameterSpec
public MLKEMKeyParameterSpec(String name, byte type, byte usage, String label) throws IllegalArgumentException Creates a parameter set.- Parameters:
name- the standard name or OID of the algorithm parameterstype- 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 KEYMANAGEMENTlabel- if aKeyHWAttributeValues.PKDSkey, the label used to identify the key. If aKeyHWAttributeValues.CLEARkey, label is ignored.- Throws:
IllegalArgumentException- for any parameter values outside the bounds for that parameter.
-
-
Method Details
-
getName
-
getAttributes
Returns the key pair attributes.- Returns:
- the key pair attributes.
-
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.
-