Skip to content
Live demo →

TLS policies

The policy is chosen per client, per server listener and per request (ADR-0020). The default is hybrid.

Policy Key exchange offered Classical peer Use it for
hybrid (default) X25519MLKEM768 first, then X25519, secp256r1, secp384r1. TLS 1.3, TLS 1.2 allowed over TCP connects, post_quantum = false general purpose: post-quantum wherever the peer supports it
pq-required X25519MLKEM768 only, TLS 1.3 refused with PQ_REQUIRED no downgrade allowed
cnsa2 MLKEM1024 only, TLS_AES_256_GCM_SHA384, ML-DSA-87 or P-384 certificates. TCP only (no HTTP/3) refused with PQ_REQUIRED US National Security Systems alignment (CNSA 2.0)
classical X25519, secp256r1, secp384r1 connects explicit opt-in: legacy interop, benchmarking

profile: "default" is an older option name and an alias of hybrid. require_pq: true is sugar for pq-required.

let r = unicomm_core::ffi::request_value(r#"{"url":"https://localhost:8446/","policy":"pq-required","ca_path":"certs/ca.pem"}"#);
// r["ok"] == false and r["error_code"] == "PQ_REQUIRED" when the server cannot do X25519MLKEM768
  • Go has no ML-KEM-1024 in crypto/tls, so the pure-Go client offers hybrid, pq-required and classical only. Use the Rust core or a binding for cnsa2.
  • HTTP/3 with cnsa2 is rejected as BAD_INPUT: rustls QUIC needs TLS13_AES_128_GCM_SHA256 to be negotiable, which an AES-256-only profile forbids.
  • Browsers cannot do cnsa2. It is for native and internal links.
  • The cnsa2 chain still has a P-384 root, so it is not yet fully CNSA 2.0 (ADR-0016). It is an alignment target, not a certification.

Roots and leaves are ECDSA P-384 with SHA-384, with an ML-DSA path (ADR-0015). The server and unicomm ca init / cert issue issue P-384. Run unicomm cbom to find older P-256 certificates and reissue them. Public WebPKI moves to post-quantum signatures later (Merkle Tree Certificates); until then public sites keep classical certificates.