User Tools

Color scheme: Light

Post-Quantum Cryptography for .NET

Add ML-DSA and ML-KEM to the .NET software you already have—without rewriting it

The library adds the post-quantum signature ML-DSA and the key encapsulation ML-KEM to existing .NET code, one call site at a time—hybrid with RSA, ECDSA, or ECDH, as BSI TR-02102-1 recommends.

C# code that creates and checks a certificate chain with CryptoMode.Hybrid; beside it, the output Chain valid: True

The challenge

Every migration to post-quantum algorithms starts with one question: which algorithm runs where in your systems. The next one: how does a new algorithm get into software that works with RSA or ECDSA today—without rewriting it, and without locking out peers that only know the classical algorithms?

The solution

The library offers extension methods with the same names as in .NET plus an extra CryptoMode argument. Same call, one extra argument: only CryptoMode routes it into the library, and code without that argument behaves exactly as before. That way you can extend an application call by call. OpenSSL does the post-quantum work.

  • Call by call: add post-quantum protection to certificates, signatures, and encrypted messages at a single call site; the rest of your code stays as it is.
  • Hybrid by default: the defaults follow BSI TR-02102-1 and produce ML-DSA or ML-KEM output only alongside a classical algorithm.
  • Classical verifiers keep reading: hybrid certificates with RSA or ECDSA plus ML-DSA stay readable for peers without this library.
  • No silent fallback: if a call can't produce the post-quantum part it asked for, it fails—it never hands back a purely classical result.

One more argument, nothing else

The call stays the one from .NET. Only CryptoMode routes it into the library, which signs or agrees on keys in hybrid mode through OpenSSL.

Flow: .NET code with CryptoMode, the library, OpenSSL 3.5, a hybrid result of RSA or ECDSA plus ML-DSA
Without CryptoMode, your code behaves as before. If the post-quantum part can’t be produced, the call fails.

Features

  • ML-DSA and ML-KEM, combined with RSA, ECDSA, or ECDH
  • Certificates and certificate chains, CRLs, PFX
  • Sign data, CMS messages, and XML documents; encrypt CMS
  • Agree on a hybrid key
  • Keys in the operating system's key store (Windows, Linux with Secret Service) or in a PFX file
  • Works in Blazor

Technical details

Frequently asked questions

Do I have to rewrite my code?

You extend it one call at a time: the library binds only to calls with the extra CryptoMode argument; every other call behaves as before.

Which standards does it implement?

ML-DSA and ML-KEM per FIPS 204 and FIPS 203, hybrid by default per BSI TR-02102-1.

Where does the post-quantum math come from?

From OpenSSL 3.5 or later, which you run with your security updates—a widely used, well-reviewed foundation.

Where do I start?

With your first hybrid certificate chain: RSA or ECDSA plus ML-DSA. Your first hybrid certificate chain

Setup, examples and reference, step by step: it's all in the documentation.

Open the documentation