<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Crypto.Generators.MLDsaKeyPairGenerator

Key-pair generator for ML-DSA (FIPS 204). Driven by an MLDsaKeyGenerationParameters init payload; produces an AsymmetricCipherKeyPair bound to the chosen parameter set.

Generate a fresh ML-DSA key pair. The private key is returned with SeedAndEncoding so the resulting key carries both the 32-byte seed and the expanded encoding.

public void Init(KeyGenerationParameters parameters)

Initialise with an MLDsaKeyGenerationParameters instance; the SecureRandom and parameter set are taken from it.