Class MLDSAKeyParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
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 Summary
ConstructorsConstructorDescriptionMLDSAKeyParameterSpec(String name) Creates a parameter set.MLDSAKeyParameterSpec(String name, byte type) Creates a parameter set.MLDSAKeyParameterSpec(String name, byte type, byte usage) Creates a parameter set.MLDSAKeyParameterSpec(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 namebooleanReturns the preHash
-
Constructor Details
-
MLDSAKeyParameterSpec
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
Creates a parameter set. The usage is defaulted to KeyHWAttributeValues.SIGNATURE.- 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.
-
MLDSAKeyParameterSpec
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 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 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 SIGNATURE (used for signing purposes only)label- 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.
-
getPreHash
public boolean getPreHash()Returns the preHash- Returns:
- the preHash
-