StaticnewGenerate a new random MLDSAPrivateKey with the specified security level.
The ML-DSA security level (default: MLDSA65)
StaticnewGenerate a new random MLDSAPrivateKey using the provided RNG.
The ML-DSA security level
Random number generator
StaticfromCreate an MLDSAPrivateKey from raw bytes.
The ML-DSA security level
The private key bytes
StatickeypairGenerate a keypair and return both private and public keys.
The ML-DSA security level (default: MLDSA65)
Tuple of [privateKey, publicKey]
StatickeypairGenerate a keypair using the provided RNG.
The ML-DSA security level
Random number generator
Tuple of [privateKey, publicKey]
Returns the security level of this key.
Returns the raw key bytes.
Returns a copy of the raw key bytes.
Returns the size of the key in bytes.
Sign a message with this private key.
The message to sign
The ML-DSA signature
Derive the public key from this private key.
Note: ML-DSA doesn't have a direct derivation method, so we need to regenerate the keypair from seed. For now, we extract from the secret key structure (the public key is embedded in the secret key for ML-DSA).
Get string representation (truncated for security).
Returns the CBOR tags associated with MLDSAPrivateKey.
Returns the untagged CBOR encoding.
Format: [level, key_bytes]
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates an MLDSAPrivateKey by decoding it from untagged CBOR.
Creates an MLDSAPrivateKey by decoding it from tagged CBOR.
StaticfromStaticfromStatic method to decode from tagged CBOR binary data.
StaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation.
Returns the UR string representation.
StaticfromStaticfrom
MLDSAPrivateKey - Post-quantum signing private key using ML-DSA.