.NET 10 migration

Post-quantum cryptography in .NET: upgrading to .NET 10 for ML-DSA and ML-KEM

.NET 10 LTS is the first .NET release with built-in post-quantum algorithms: ML-KEM, ML-DSA, SLH-DSA and Composite ML-DSA. We upgrade .NET Framework 4.x and .NET 6, 7, 8 and 9 applications to .NET 10 and help you adopt these APIs carefully, with a crypto-agility layer and test evidence at every step.

11 Nov 2025.NET 10 LTS released, with ML-KEM, ML-DSA and SLH-DSA built in
14 Nov 2028End of support for .NET 10 LTS
10 Nov 2026.NET 8 and .NET 9 reached end of support
3,309 BSize of one ML-DSA-65 signature (an Ed25519 signature is 64 B)
Watch and download

Post-quantum migration in a few minutes

.NET 10 post-quantum cryptography in C#: ML-KEM and ML-DSA tutorial (4:49) What .NET 10 ships, a C# walkthrough of ML-KEM-768 and ML-DSA-65 with real output, key sizes, crypto agility and hybrid TLS. Watch on YouTube
AI warning on cryptography: post-quantum migration explained (1:48) The 2 December joint statement, the deadlines, where RSA and ECC hide, and the five steps. Watch on YouTube
AI advances and cryptography: plan your post-quantum migration now (1:30) Why the 2 December warning matters for every stack, and what a migration involves. Watch on YouTube

The video loads from YouTube (youtube-nocookie.com) only when you press play.

What .NET 10 ships for post-quantum cryptography

NIST published the first three post-quantum standards on 13 August 2024: FIPS 203 (ML-KEM, key encapsulation), FIPS 204 (ML-DSA, signatures) and FIPS 205 (SLH-DSA, hash-based signatures). .NET 10, released on 11 November 2025 as a long-term support release, exposes all three in System.Security.Cryptography, plus Composite ML-DSA from the IETF LAMPS draft, which pairs ML-DSA with a classical algorithm such as RSA.

The new types do not derive from AsymmetricAlgorithm. Keys are created with static methods such as MLDsa.GenerateKey and MLKem.ImportEncapsulationKey, and each class has a static IsSupported property, because .NET does not implement the maths itself: it calls the operating system's cryptographic library.

"Experimental" below means the API carries [Experimental("SYSLIB5006")], so the compiler reports an error until you suppress that diagnostic. The status column reflects the shipped .NET 10 reference assembly. Microsoft's "What's new" page still describes the whole MLDsa class as experimental, but in the released build only some of its members are.

  • macOS, iOS and Android: .NET 10 builds these classes as not supported, so IsSupported returns false. Apple CryptoKit support for ML-KEM is an open work item for a later release.
  • X.509: CertificateRequest accepts MLDsa, SlhDsa and CompositeMLDsa keys, and X509Certificate2 gains CopyWithPrivateKey and GetMLDsaPrivateKey-style accessors. All of these members are experimental in .NET 10.
  • CMS and COSE: Microsoft lists SignedCms signing with ML-DSA and SLH-DSA, and a new experimental CoseKey type that accepts an MLDsa key.
  • TLS: SslStream can use ML-DSA or SLH-DSA certificates only with TLS 1.3 and when both the operating system and the peer support them. .NET 10 has no public API to choose or report the TLS key-exchange group, such as the hybrid X25519MLKEM768 standardised in RFC 10024, so that behaviour comes from OpenSSL or Schannel. See hybrid TLS with ML-KEM.
Post-quantum types in .NET 10 (System.Security.Cryptography)
AlgorithmStandard.NET classStatus in .NET 10Platform
ML-KEM (512, 768, 1024)FIPS 203MLKemStable core: GenerateKey, Encapsulate, Decapsulate, raw key import and export. PKCS#8, SubjectPublicKeyInfo and PEM members are experimental.Linux with OpenSSL 3.5+; Windows 11 24H2/25H2 and Windows Server 2025 with the November 2025 update
ML-DSA (44, 65, 87)FIPS 204MLDsaStable core: GenerateKey, SignData, VerifyData, raw key import and export. PKCS#8, SubjectPublicKeyInfo, PEM, external-mu and pre-hash (HashML-DSA) members are experimental.As ML-KEM
SLH-DSAFIPS 205SlhDsaWhole class experimentalLinux with OpenSSL 3.5+; Windows CNG support had not arrived at .NET 10 release
Composite ML-DSAIETF draft-ietf-lamps-pq-composite-sigsCompositeMLDsaWhole class experimental (draft standard)Implemented in managed code over the component keys

ML-DSA and ML-KEM in C#: a minimal example

The sample below uses only members that are not experimental in .NET 10, so it builds without suppressing SYSLIB5006. Method names follow the .NET 10 reference assembly. Storing keys as PKCS#8 or embedding them in certificates uses the experimental members, and that is a decision to make on purpose, not by accident.

ML-DSA-65 sign and verify, then ML-KEM-768 encapsulate and decapsulate (.NET 10)
using System.Security.Cryptography;

if (!MLDsa.IsSupported)
    throw new PlatformNotSupportedException(
        "ML-DSA needs OpenSSL 3.5+ or Windows CNG with PQC support.");

byte[] data = "invoice-2026-0042"u8.ToArray();

// Sign with ML-DSA-65 (FIPS 204)
using MLDsa signingKey = MLDsa.GenerateKey(MLDsaAlgorithm.MLDsa65);
byte[] signature = signingKey.SignData(data);          // 3,309 bytes
byte[] publicKey = signingKey.ExportMLDsaPublicKey();  // 1,952 bytes

// Verify with the public key only
using MLDsa verifier = MLDsa.ImportMLDsaPublicKey(MLDsaAlgorithm.MLDsa65, publicKey);
bool valid = verifier.VerifyData(data, signature);

// ML-KEM-768 (FIPS 203): agree a 32-byte shared secret
using MLKem receiver = MLKem.GenerateKey(MLKemAlgorithm.MLKem768);
using MLKem sender = MLKem.ImportEncapsulationKey(
    MLKemAlgorithm.MLKem768, receiver.ExportEncapsulationKey());
sender.Encapsulate(out byte[] ciphertext, out byte[] senderSecret);
byte[] receiverSecret = receiver.Decapsulate(ciphertext);

Always check IsSupported. The same binary can have post-quantum support on a patched Windows Server 2025 host and none on a container image that still ships OpenSSL 3.0.

Why .NET Framework, .NET 8 and .NET 9 cannot simply add it

Microsoft's Microsoft.Bcl.Cryptography NuGet package (version 10.0) does make the MLKem, MLDsa, SlhDsa and CompositeMLDsa types available to .NET Framework 4.6.2 and later, .NET Standard 2.0 and .NET 8 and 9. It is a bridge, not an equivalent, for the reasons below.

  • On those older runtimes the package contains only the Windows CNG implementation. On Linux there is no OpenSSL path, and SLH-DSA is not supported at all.
  • The integration points that matter in production (CertificateRequest, X509Certificate2 key accessors, SignedCms, COSE and TLS certificates in SslStream and Kestrel) are part of the .NET 10 runtime itself.
  • Microsoft's own package notes say it is not recommended when you target a .NET version that includes the support.
  • .NET 8 and .NET 9 both reached end of support on 10 November 2026 and no longer receive security patches, so a post-quantum programme built on them begins with an unpatched runtime.
  • BouncyCastle as an alternative. BouncyCastle for .NET (BouncyCastle.Cryptography, ML-KEM, ML-DSA and SLH-DSA since version 2.5.0 in December 2024) is the other route for runtimes you cannot move yet. It is a managed, platform-independent library with its own API and its own TLS stack, so it runs anywhere but does not plug into SslStream, the Windows certificate store or X509Certificate2. We use it where it fits, for example a .NET Framework service that must verify ML-DSA signatures before it can be upgraded.

Our upgrade path to quantum-safe .NET

Each step produces something you can review before the next one starts. We work in your repositories, through your normal review and release process.

  1. Assess

    Inventory every use of RSA, ECDsa, ECDiffieHellman, X.509, SignedCms, JWT and TLS settings across your solutions and dependencies, and record target frameworks, hosting OS and OpenSSL versions. This feeds a wider cryptographic inventory if you are building one.

  2. Upgrade the runtime

    Move projects to .NET 10 LTS: from .NET Framework 4.x this is a port (SDK-style projects, replacing System.Web and WCF server code, checking Windows-only APIs); from .NET 6 to 9 it is usually a retarget plus breaking-change review. Then patch hosts: Windows 11 24H2/25H2 or Server 2025 with the November 2025 update, or a Linux base image with OpenSSL 3.5 or later.

  3. Add a crypto-agility layer

    Put signing, verification and key agreement behind your own interfaces, keyed by algorithm identifiers stored alongside each signature or ciphertext. Keep the experimental SYSLIB5006 members behind this layer, so that a later change to a draft standard touches one place.

  4. Adopt hybrid and post-quantum algorithms

    Introduce ML-KEM for new key agreement and ML-DSA for new signatures, usually alongside the existing classical algorithm (dual signatures or composite keys) until every verifier has been upgraded. Prioritise data with a long confidentiality life, which is exposed to harvest-now, decrypt-later collection.

  5. Test and evidence

    Add cross-platform tests that assert IsSupported on each deployment target, interoperability tests against your partners' libraries, and size and latency measurements. You receive the inventory, the test results and a change log you can use when you assess compliance against CNSA 2.0 or the NCSC timeline. The compliance decision remains yours and your assessors'.

Migration risks to plan for

Post-quantum algorithms change data sizes and dependencies more than earlier algorithm changes did. These are the issues we check before anything reaches production.

  • Key and signature sizes. An ML-DSA-65 public key is 1,952 bytes and a signature 3,309 bytes (FIPS 204). An ML-KEM-768 encapsulation key is 1,184 bytes and its ciphertext 1,088 bytes. Database columns, JWT and cookie size limits, HTTP header limits, QR codes and fixed-size message formats can all break.
  • HSM, KMS and certificate authority support. Keys held in an HSM, Azure Key Vault, AWS KMS or an internal CA can only move to ML-DSA when that product supports it. We check vendor support before designing around it instead of assuming it.
  • Interop with draft formats. PKCS#8 and certificate encodings for ML-KEM, and composite signatures, were still IETF work when .NET 10 shipped. Data produced with experimental members may need re-encoding when the standards settle.
  • Platform gaps. No macOS support in .NET 10, no SLH-DSA in Windows CNG at release, and older Linux distributions without OpenSSL 3.5 all mean a runtime check and a fallback plan.
  • Pre-hash and context. HashML-DSA (SignPreHash) produces signatures that are deliberately incompatible with pure ML-DSA. A mismatched mode or context string fails verification without any other error.
  • Third-party libraries. JWT, SAML, PDF signing and messaging libraries need their own post-quantum support. Upgrading the runtime does not change what they emit. See also Java, Go and OpenSSL for mixed estates.
Engagements

Start with a free call, then a fixed-price assessment

Every migration starts by finding where your cryptography actually is. We work on any stack: .NET, Java, Go, Python, Node.js, PHP, Rust, C and C++, iOS and Android, cloud KMS, HSMs and PKI. Prices are fixed before work starts. BEK Service Ltd is not VAT registered, so no VAT is added.

Free readiness call

Free 30 minutes

A video call with an engineer. Tell us what you run; we tell you where your quantum-vulnerable cryptography most likely is, what the deadlines mean for you, and whether an assessment is worth it.

  • Your stacks, vendors and data lifetimes
  • Which deadlines apply to you
  • A straight answer on next steps
Book the free call

Migration and implementation

Quoted after the assessment

We do the work: runtime upgrades, crypto-agility layers, hybrid TLS, PQC signatures and key exchange, testing and the evidence your customers or auditors ask for.

  • Runtime and library upgrades on any stack
  • Hybrid ML-KEM key exchange, ML-DSA signatures
  • PKI, KMS and HSM changes
  • Regression and interop testing
  • Evidence pack for customers and auditors
Ask for a quote
  1. Discover

    Inventory every algorithm, key, certificate, library and protocol in scope.

  2. Prioritise

    Rank by how long the data must stay secret and how hard each change is.

  3. Upgrade

    Move runtimes and libraries to versions that support NIST's PQC standards.

  4. Implement

    Hybrid key exchange first, then PQC signatures, behind a crypto-agile layer.

  5. Evidence

    Test, document and hand over what your customers and auditors ask for.

FAQ

Questions we are asked

Does .NET 10 support post-quantum cryptography?

Yes. .NET 10 adds MLKem (FIPS 203), MLDsa (FIPS 204), SlhDsa (FIPS 205) and CompositeMLDsa to System.Security.Cryptography. They work where the operating system provides the algorithms: Linux with OpenSSL 3.5 or later, or Windows 11 24H2/25H2 and Windows Server 2025 with the November 2025 update. They are not supported on macOS in .NET 10.

Is ML-DSA in .NET 10 still experimental?

Partly. In the shipped .NET 10 build the MLDsa class itself is not marked experimental, and GenerateKey, SignData, VerifyData and raw key import and export can be used without warnings. PKCS#8, SubjectPublicKeyInfo and PEM handling, external-mu signing and pre-hash signing carry the SYSLIB5006 experimental diagnostic. SlhDsa and CompositeMLDsa are experimental as whole classes.

Can I use ML-KEM or ML-DSA from .NET Framework 4.8?

Only in a limited way. The Microsoft.Bcl.Cryptography 10.0 NuGet package provides the types for .NET Framework 4.6.2 and later, but only through Windows CNG on Windows versions that have post-quantum support. It does not add the certificate, CMS, COSE or TLS integration that .NET 10 has. BouncyCastle for .NET is a managed alternative. For anything long-lived we recommend moving to .NET 10.

When did .NET 8 reach end of support?

.NET 8 (LTS) and .NET 9 (STS) both reached end of support on 10 November 2026. .NET 10 LTS is supported until 14 November 2028, according to Microsoft's .NET support policy.

Does SslStream use hybrid post-quantum TLS in .NET 10?

.NET 10 has no public API to select or report TLS 1.3 key-exchange groups such as X25519MLKEM768. SslStream relies on the operating system's TLS stack, so whether a hybrid group is negotiated depends on OpenSSL or Schannel configuration on both ends. Using ML-DSA certificates in SslStream requires TLS 1.3 and support on both sides.

Will upgrading to .NET 10 make our application quantum-safe?

No. The upgrade makes the algorithms available; your application still has to use them. Key agreement, signatures, stored keys, certificates and third-party libraries each need their own change, so we start with an inventory and add post-quantum algorithms step by step, usually in hybrid with existing ones.

Do you guarantee CNSA 2.0 or NCSC compliance?

No. We implement and evidence the technical changes, and give you the inventory, test results and change history your assessors need. Whether your organisation meets a given framework is a decision for you and your assessors.

Sources

Facts checked against the sources below on 2026-12-02. Standards and product support change; tell us if something here is out of date. This page is general information, not legal or compliance advice.

  1. Post-Quantum Cryptography in .NET (Microsoft .NET Blog, 2025-11-18)
  2. What's new in .NET libraries for .NET 10: Cryptography (Microsoft Learn, 2026-12-01)
  3. System.Security.Cryptography reference assembly at v10.0.0 (dotnet/runtime on GitHub, 2025-11-11)
  4. MLDsa Class (Microsoft Learn, 2026-07-01)
  5. MLKem Class (Microsoft Learn, 2026-07-01)
  6. .NET and .NET Core official support policy (Microsoft, 2026-12-02)
  7. Post-quantum cryptography APIs now generally available on Microsoft platforms (Microsoft Security Blog, 2025-11-12)
  8. Microsoft.Bcl.Cryptography project file at v10.0.0 (dotnet/runtime on GitHub, 2025-11-11)
  9. ML-KEM: CryptoKit support (issue 116454) (dotnet/runtime on GitHub, 2025-06-10)
  10. Add TLS 1.3 group information to SSL/TLS classes (issue 132239) (dotnet/runtime on GitHub, 2026-08-12)
  11. FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard (NIST, 2024-08-13)
  12. FIPS 204: Module-Lattice-Based Digital Signature Standard (NIST, 2024-08-13)
  13. FIPS 205: Stateless Hash-Based Digital Signature Standard (NIST, 2024-08-13)
  14. RFC 10024: Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3 (RFC Editor, 2026-08)
  15. Bouncy Castle C# release notes (Legion of the Bouncy Castle (GitHub), 2026-07-30)
Talk to an engineer

Book your free 30-minute readiness call

Tell us what you run and what is driving the question: a customer questionnaire, a government contract, a regulator or your own roadmap. We reply within one working day with times for a call.

Prefer e-mail? Write to sales@bekservice.uk.

BEK Service Ltd, a software company registered in England and Wales (company no. 12590587). We use what you send only to answer you; see our privacy policy.