public class MLDSAPrivateKey extends PrivateKey
Key.KeyType, Key.VendorDefinedKeyBuilderObject.ObjectClass, Object.VendorDefinedObjectBuilder| Modifier and Type | Field and Description |
|---|---|
protected ParameterSetAttribute |
parameterSet_
ML-DSA parameter set
|
protected PublicKeyInfoAttribute |
publicKeyInfo_
Public Key DER encoded
|
protected SeedAttribute |
seed_
Seed value as defined in ML_DSA KeyGen in FIPS 204
|
protected ValueAttribute |
value_
Private value as defined in [FIPS 204]
|
alwaysAuthenticate_, alwaysSensitive_, decrypt_, extractable_, neverExtractable_, sensitive_, sign_, signRecover_, subject_, unwrap_, unwrapTemplate_, wrapWithTrusted_allowedMechanisms_, derive_, endDate_, id_, keyGenMechanism_, keyType_, keyTypeNames_, local_, startDate_, vendorKeyBuilder_label_, modifiable_, private_, token_attributeTable_, objectClass_, objectClassNames_, objectHandle_, vendorObjectBuilder_| Constructor and Description |
|---|
MLDSAPrivateKey()
Create an ML-DSA public key object.
|
MLDSAPrivateKey(Session session,
long objectHandle)
Create an ML-DSA private key object for the given session and object handle.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateAttributes()
Allocates the attribute objects for this class and adds them to the attribute table.
|
java.lang.Object |
clone()
Create a (deep) clone of this object.
|
boolean |
equals(java.lang.Object object)
Compares all member variables of this object with the other object.
|
static Object |
getInstance(Session session,
long objectHandle) |
ParameterSetAttribute |
getParameterSet()
Get the ParameterSet attribute.
|
PublicKeyInfoAttribute |
getPublicKeyInfo()
Get the PublicKeyInfo attribute.
|
SeedAttribute |
getSeed()
Get the Seed attribute.
|
ValueAttribute |
getValue()
Get the Value attribute.
|
protected static void |
putAttributesInTable(MLDSAPrivateKey object)
Put all attributes of the given object into the attributes table of this object.
|
long |
readParameterSet()
Read the value of the ParameterSet attribute.
|
byte[] |
readPublicKeyInfo()
Read the value of the PublicKeyInfo attribute.
|
byte[] |
readSeed()
Read the value of the Seed attribute.
|
byte[] |
readValue()
Read the value of the Value attribute.
|
MLDSAPrivateKey |
setParameterSet(CK_ML_DSA_PARAMETER_SET_TYPE parameterSet)
Set the value of the ParameterSet attribute.
|
MLDSAPrivateKey |
setParameterSet(long value)
Set the value of the ParameterSet attribute.
|
MLDSAPrivateKey |
setPublicKeyInfo(byte[] value)
Set the PublicKeyInfo attribute.
|
MLDSAPrivateKey |
setSeed(byte[] value)
Set the value of the Seed attribute.
|
MLDSAPrivateKey |
setValue(byte[] value)
Set the value of the Value attribute.
|
java.lang.String |
toString()
This method returns a string representation of the current object.
|
getAlwaysAuthenticate, getAlwaysSensitive, getAuthPinFlags, getDecrypt, getExtractable, getNeverExtractable, getSecondaryAuth, getSensitive, getSign, getSignRecover, getSubject, getUnknownPrivateKey, getUnwrap, getUnwrapTemplate, getWrapWithTrusted, isAlwaysAuthenticate, isAlwaysSensitive, isDecrypt, isExtractable, isNeverExtractable, isSensitive, isSign, isSignRecover, isUnwrap, isWrapWithTrusted, putAttributesInTable, readAlwaysAuthenticate, readAlwaysSensitive, readDecrypt, readExtractable, readNeverExtractable, readSensitive, readSign, readSignRecover, readSubject, readUnwrap, readUnwrapTemplate, readWrapWithTrusted, setAlwaysAuthenticate, setAlwaysSensitive, setDecrypt, setExtractable, setNeverExtractable, setSensitive, setSign, setSignRecover, setSubject, setUnwrap, setUnwrapTemplate, setWrapWithTrustedgetAllowedMechanisms, getDerive, getEndDate, getId, getKeyGenMechanism, getKeyType, getKeyTypeName, getLocal, getStartDate, getVendorDefinedKeyBuilder, hashCode, isDerivable, isDerive, isLocal, putAttributesInTable, readAllowedMechanisms, readDerive, readEndDate, readId, readKeyGenMechanism, readKeyType, readLocal, readStartDate, setAllowedMechanisms, setDerive, setEndDate, setId, setKeyGenMechanism, setKeyType, setLocal, setStartDate, setVendorDefinedKeyBuildergetLabel, getModifiable, getPrivate, getToken, isModifiable, isPrivate, isToken, putAttributesInTable, readLabel, readModifiable, readPrivate, readToken, setLabel, setModifiable, setPrivate, setTokencheckAttributesState, checkAttributeState, filterExcludedAttributes, filterExcludedAttributes, getAttribute, getAttributeTable, getAttributeValue, getAttributeValues, getExcludedAttributes, getObjectClass, getObjectClassName, getObjectHandle, getSetAttributes, getSetAttributes, getUnknownObject, getVendorDefinedObjectBuilder, hasExcluded, putAttribute, putAttributesInTable, readAttributes, removeAttribute, setObjectHandle, setVendorDefinedObjectBuilder, toStringprotected ParameterSetAttribute parameterSet_
protected SeedAttribute seed_
PKCS11Constants.CKA_SEEDprotected ValueAttribute value_
PKCS11Constants.CKA_VALUEprotected PublicKeyInfoAttribute publicKeyInfo_
PKCS11Constants.CKA_PUBLIC_KEY_INFOpublic MLDSAPrivateKey()
public MLDSAPrivateKey(Session session, long objectHandle) throws TokenException
session - the session to use.objectHandle - the object handle of the ML-DSA private key object.TokenException - if getting the attributes of the ML-DSA private key object fails.public static Object getInstance(Session session, long objectHandle) throws TokenException
TokenExceptionpublic MLDSAPrivateKey setParameterSet(long value)
value - the value of the ParameterSet attribute.PKCS11Constants.CKA_PARAMETER_SET,
PKCS11Constants.CKP_ML_DSA_44,
PKCS11Constants.CKP_ML_DSA_65,
PKCS11Constants.CKP_ML_DSA_87,
CK_ML_DSA_PARAMETER_SET_TYPEpublic MLDSAPrivateKey setParameterSet(CK_ML_DSA_PARAMETER_SET_TYPE parameterSet)
parameterSet - the parameter set with the chosen typePKCS11Constants.CKA_PARAMETER_SET,
PKCS11Constants.CKP_ML_DSA_44,
PKCS11Constants.CKP_ML_DSA_65,
PKCS11Constants.CKP_ML_DSA_87,
CK_ML_DSA_PARAMETER_SET_TYPEpublic ParameterSetAttribute getParameterSet()
PKCS11Constants.CKA_PARAMETER_SET,
PKCS11Constants.CKP_ML_DSA_44,
PKCS11Constants.CKP_ML_DSA_65,
PKCS11Constants.CKP_ML_DSA_87,
CK_ML_DSA_PARAMETER_SET_TYPEpublic long readParameterSet()
PKCS11Constants.CKA_PARAMETER_SET,
PKCS11Constants.CKP_ML_DSA_44,
PKCS11Constants.CKP_ML_DSA_65,
PKCS11Constants.CKP_ML_DSA_87,
CK_ML_DSA_PARAMETER_SET_TYPEpublic MLDSAPrivateKey setSeed(byte[] value)
PKCS11Constants.CKA_SEEDpublic SeedAttribute getSeed()
PKCS11Constants.CKA_SEEDpublic byte[] readSeed()
PKCS11Constants.CKA_SEEDpublic MLDSAPrivateKey setValue(byte[] value)
value - the value of the Value attribute.PKCS11Constants.CKA_VALUEpublic ValueAttribute getValue()
PKCS11Constants.CKA_VALUEpublic byte[] readValue()
PKCS11Constants.CKA_VALUEpublic MLDSAPrivateKey setPublicKeyInfo(byte[] value)
value - the PublicKeyInfo attribute.PKCS11Constants.CKA_PUBLIC_KEY_INFOpublic PublicKeyInfoAttribute getPublicKeyInfo()
PKCS11Constants.CKA_PUBLIC_KEY_INFOpublic byte[] readPublicKeyInfo()
PKCS11Constants.CKA_PUBLIC_KEY_INFOprotected static void putAttributesInTable(MLDSAPrivateKey object)
object - The object to work with.protected void allocateAttributes()
PrivateKeyallocateAttributes in class PrivateKeypublic java.lang.Object clone()
PrivateKeyclone in class PrivateKeypublic boolean equals(java.lang.Object object)
PrivateKeyequals in class PrivateKeyobject - The other object to compare to.public java.lang.String toString()
PrivateKeytoString in class PrivateKey