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

Org.BouncyCastle.Crypto.Parameters.MLDsaPrivateKeyParameters

ML-DSA private key (FIPS 204). The expanded key holds (ρ, K, tr, s₁, s₂, t₀) derived from a 32-byte seed; the corresponding t₁ half of the public key is cached for fast public-key recovery. A key built from a seed retains the seed so it can be re-encoded in the seed format.
namespace Org.BouncyCastle.Crypto.Parameters { public sealed class MLDsaPrivateKeyParameters : MLDsaKeyParameters { public enum Format { SeedOnly, EncodingOnly, SeedAndEncoding } public static readonly Format DefaultFormat; public Format PreferredFormat { get; } public static MLDsaPrivateKeyParameters FromEncoding(MLDsaParameters parameters, byte[] encoding); public static MLDsaPrivateKeyParameters FromSeed(MLDsaParameters parameters, byte[] seed); public static MLDsaPrivateKeyParameters FromSeed(MLDsaParameters parameters, byte[] seed, Format preferredFormat); public byte[] GetEncoded(); public MLDsaPublicKeyParameters GetPublicKey(); public byte[] GetPublicKeyEncoded(); public byte[] GetSeed(); public MLDsaPrivateKeyParameters WithPreferredFormat(Format preferredFormat); } }