BaseMLDSAPrivateKey class abstract
Base of every ML-DSA (FIPS 204) private key.
Mirrors BaseMLDSAPublicKey: the level is the subclass (MLDSA44PrivateKey, MLDSA65PrivateKey, MLDSA87PrivateKey), and length-based dispatch across levels stays available through BaseMLDSAPrivateKey.fromBytes and BaseMLDSAPrivateKey.generate.
- Inheritance
-
- Object
- IMLDSASigningKey<
BaseMLDSAPublicKey> - BaseMLDSAPrivateKey
- Implemented types
- Mixed-in types
- Implementers
Constructors
-
BaseMLDSAPrivateKey(List<
int> keyBytes, BaseMLDSAPublicKey publicKey)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- publicKey → BaseMLDSAPublicKey
-
Get the associated public key.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sk → SecretBytes
-
final
- type → CryptoKeyType
-
no setterinherited
- variables → List
-
no setteroverride
Methods
-
dispose(
) → void -
Releases the native allocation and wipes owned key material.
Idempotent: safe to call twice.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sign(
MLDSASigningParams signingParams) → MLDSASignature -
inherited
-
takeSecretKey(
) → SecretBytes -
Returns the live secret key object (not a copy). Do not zero,
transform-destructively, or retain it past the key's dispose;
after dispose
override
-
toBytes(
{SecretTransform? transform}) → SecretBytes -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
verificationKey(
) → BaseMLDSAPublicKey -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromBytes(
List< int> bytes) → BaseMLDSAPrivateKey -
Parses untagged bytes into the matching level key. Throws when the
length matches no ML-DSA parameter set.
override
-
generate(
MLDSAParams params, {List< int> ? seed}) → BaseMLDSAPrivateKey - Generates a key of the given parameter set's level.
-
isValidBytes(
List< int> bytes) → bool -
Static method to check the validity of key bytes for a specific elliptic curve type.
override