vcon-server

CNSA 2.0 TLS profile

Hold every TLS connection to TLS 1.3, TLS_AES_256_GCM_SHA384, ML-KEM-1024 and ML-DSA-87 with tls.profile = "cnsa2": when to use it and when not, ML-DSA-87 certificates from OpenSSL 3.5 or wolfCLU, the configuration and restart, the checks with curl, OpenSSL and wolfSSL, the way back, and what each refusal means.

By default (tls.profile = "hybrid") every TLS connection the server and its clients make offers the hybrid key exchange X25519MLKEM768 first, and the server's listeners agree on it with a client that lists it first; a peer without it agrees on X25519, secp256r1 or secp384r1. Certificates are ECDSA, RSA, Ed25519 or ML-DSA, and TLS 1.2 is still allowed with an ECDSA, RSA or Ed25519 certificate (TLS 1.2 has no ML-DSA signature).

tls.profile = "cnsa2" holds every connection to the algorithms of the NSA's Commercial National Security Algorithm Suite 2.0 for TLS, as the Internet-Draft draft-becker-cnsa2-tls-profile-06 (30 October 2026) profiles them:

Whathybrid (the default)cnsa2
ProtocolTLS 1.3, TLS 1.2TLS 1.3 only
Cipher suitesTLS 1.3: AES-256-GCM, AES-128-GCM, ChaCha20-Poly1305; TLS 1.2 ECDHE suitesTLS_AES_256_GCM_SHA384 (0x1302) only
Key exchangeX25519MLKEM768, X25519, secp256r1, secp384r1ML-KEM-1024 (0x0202) only
Signatures, certificates and keysECDSA, RSA, Ed25519, ML-DSA-44, ML-DSA-65, ML-DSA-87ML-DSA-87 (0x0906) only, at both ends and in every certificate of the chain
Early data (0-RTT)nonenone
S3 storage and exportyesrefused at start
A catalog in PostgreSQLyesrefused at start

Each list under cnsa2 holds one item, so there is nothing to fall back to: a peer that lacks one of them gets no connection, and the refusal names the requirement it failed. The server refuses to start when the certificate in tls.cert, any certificate of its chain, or the key in tls.key is not ML-DSA-87.

CI runs every command on this page against a live server, after getting started, and then puts the server back on hybrid. Except where a section says otherwise, the commands were run with OpenSSL 3.5.9 and curl 8.14.1, the versions in Debian 13 (trixie) on 2026-12-04.

When to use it, and when not

Use cnsa2 when a policy requires CNSA 2.0 algorithms on every connection, and every peer can meet them: every client of the API, the MCP proxy and the TUI, and every load generator. A client with cnsa2 of its own, such as vcon-server mcp or tui with tls_profile = "cnsa2", or a vcon-scale run with --tls-profile cnsa2, meets it; so do OpenSSL 3.5 and wolfSSL 5.9.4, configured as check it shows.

The draft's section 5 lets a CNSA 2.0 end also serve peers that are not compliant; it requires the session to fail "if interoperability with non-CNSA-compliant clients or servers is not intended". cnsa2 is made for that case alone: it always fails closed, and has no mode that also serves other peers. A server that must serve both keeps hybrid.

Keep hybrid when:

  • Any peer cannot meet the profile. curl built with OpenSSL 3.5, for one, offers X25519MLKEM768 and not ML-KEM-1024 unless it is told to (check it shows both). There is no fallback: a peer without the profile's algorithms gets no connection at all.
  • You want a classical algorithm beside the post-quantum one. cnsa2 is ML-KEM and ML-DSA alone. If a flaw in ML-KEM or ML-DSA were found, its traffic would have nothing else protecting it, while hybrid's X25519MLKEM768 keeps X25519 beside ML-KEM-768. The Cryptography Incident Review Group's first statement, an initial assessment of findings on lattice cryptography (dated November 30, 2026, on findings shared with several of its members on November 16, 2026), weighs both ways. It recommends "that those adopting the current NIST standards choose the highest security level each application can support": ML-KEM-1024 and ML-DSA-87 are the highest levels of ML-KEM and ML-DSA, which cnsa2 takes. It also encourages "hybrids that combine schemes based on different mathematical foundations": cnsa2 gives up the X25519 hedge that hybrid keeps.
  • The objects are in S3, you export to S3, or the catalog is in PostgreSQL. The S3 client runs on the AWS SDK's own TLS settings, which cannot be held to the profile, and so do the AWS SDK's credential requests over HTTPS (STS), which are made only for S3. The server refuses to start with tls.profile = "cnsa2" and a [storage.s3] or [export.s3] table, or with catalog.backend = "postgres", since a catalog in PostgreSQL needs its objects in S3.
  • You need a publicly trusted certificate. See Let's Encrypt.

The profile does not provide certificate status: the draft's section 11 requires a server, and a client when client authentication is required, to provide certificate status (CRL distribution points, or OCSP with or without stapling), and the server neither staples OCSP nor checks a peer certificate's revocation.

The server's TLS log lines count only the connections its listeners accept, not those it makes. Under cnsa2 it makes none: its only outbound TLS connections are to S3 and to PostgreSQL, and it refuses to start with either.

Before you start

  • A running server set up as getting started leaves it: its configuration in /etc/vcon-server/vcon-server.toml, run by the account vcon, at https://vcon.example.com:8443.

  • OpenSSL 3.5 or later to make the certificates, and for the checks. OpenSSL added ML-KEM and ML-DSA in 3.5. Debian 13 and Fedora 44 ship OpenSSL 3.5:

    openssl version | cut -d' ' -f1,2
    
    OpenSSL 3.5.<n>
    
  • Every client switched at the same time. After the restart, a client without the profile gets no connection: plan the change with the owners of every client, monitor and load balancer that speaks TLS to the server. A load balancer that ends TLS in front of the server needs ML-KEM-1024 and ML-DSA-87 of its own; otherwise the profile holds only between it and the server.

  • A shell on the server's host, with sudo. The server restarts, so every request waits or fails for the seconds that takes.

  • One shell for the steps: later steps use variables that earlier steps set.

CONFIG=/etc/vcon-server/vcon-server.toml
URL=https://vcon.example.com:8443

Make ML-DSA-87 certificates with OpenSSL

The server needs an ML-DSA-87 certificate and key, and each client needs the ML-DSA-87 certificate authority (CA) that signed it. These steps make a private CA and a server certificate signed by it. Keep the CA's key offline, or delete it once the certificates are made.

  1. The CA: an ML-DSA-87 key and a self-signed certificate for it.

    openssl req -x509 -newkey ML-DSA-87 -nodes -days 3650 \
      -keyout cnsa2-ca.key -out cnsa2-ca.pem -subj "/CN=vcon-server CNSA 2.0 CA" \
      -addext "basicConstraints=critical,CA:TRUE" \
      -addext "keyUsage=critical,keyCertSign,cRLSign" 2>/dev/null
    
  2. The server's key and a certificate request with the name clients use:

    openssl req -new -newkey ML-DSA-87 -nodes \
      -keyout cnsa2-key.pem -out cnsa2.csr -subj "/CN=vcon.example.com" \
      -addext "subjectAltName=DNS:vcon.example.com" \
      -addext "basicConstraints=critical,CA:FALSE" \
      -addext "keyUsage=critical,digitalSignature" \
      -addext "extendedKeyUsage=serverAuth" 2>/dev/null
    
  3. The CA signs it, keeping the request's extensions:

    openssl x509 -req -in cnsa2.csr -CA cnsa2-ca.pem -CAkey cnsa2-ca.key -days 825 \
      -copy_extensions copyall -out cnsa2-cert.pem 2>/dev/null
    openssl verify -CAfile cnsa2-ca.pem cnsa2-cert.pem
    openssl x509 -in cnsa2-cert.pem -noout -text | grep -oE "(Signature|Public Key) Algorithm: .*" | LC_ALL=C sort -u
    
    cnsa2-cert.pem: OK
    Public Key Algorithm: ML-DSA-87
    Signature Algorithm: ML-DSA-87
    
  4. Install the certificate and key for the server, readable by vcon only, and the CA's certificate for clients:

    sudo install -m 0400 -o vcon -g vcon cnsa2-cert.pem /etc/vcon-server/cnsa2-cert.pem
    sudo install -m 0400 -o vcon -g vcon cnsa2-key.pem /etc/vcon-server/cnsa2-key.pem
    sudo install -m 0644 cnsa2-ca.pem /usr/local/share/vcon-server/cnsa2-ca.pem
    rm cnsa2-key.pem cnsa2.csr
    CA=/usr/local/share/vcon-server/cnsa2-ca.pem
    

    With an intermediate CA, put the server's certificate first in cnsa2-cert.pem and the intermediate after it. Every certificate of that chain must be ML-DSA-87.

With wolfCLU

wolfCLU 0.2.0, wolfSSL's command-line tool, on wolfSSL 5.9.4, can make the CA's certificate and the requests, but not every part of the chain (checked 2026-12-04):

  • Its own ML-DSA keys cannot be used. wolfssl genkey ml-dsa -level 5 writes a key that wolfssl req then fails on. Make the keys with OpenSSL: openssl genpkey -algorithm ML-DSA-87 -out <file>.
  • wolfssl ca cannot sign with an ML-DSA CA key. It exits 0 but writes no signed certificate. Sign the requests with openssl x509 -req, as in step 3 above.
  • No path length. basicConstraints = critical,CA:TRUE,pathlen:0 gives a certificate with CA:FALSE, which openssl verify then refuses as a CA (invalid CA certificate): write critical,CA:TRUE alone.
  • No subject key identifier. With subjectKeyIdentifier = hash in the section, the certificate is written with no extensions at all, so it is not a CA either: leave it out.

With those, a wolfCLU CA and wolfCLU requests serve the profile:

openssl genpkey -algorithm ML-DSA-87 -out ca.key
wolfssl req -new -x509 -key ca.key -days 3650 -subj "O=Example/CN=Example CNSA 2.0 CA" \
  -config wolfclu.conf -extensions v3_ca -out ca.pem
openssl genpkey -algorithm ML-DSA-87 -out server.key
wolfssl req -new -key server.key -subj "O=Example/CN=vcon.example.com" -out server.csr
openssl x509 -req -in server.csr -CA ca.pem -CAkey ca.key -days 825 \
  -extfile wolfclu.conf -extensions v3_server -out server.pem

where wolfclu.conf holds:

[ req ]
distinguished_name = req_distinguished_name
prompt = no

[ req_distinguished_name ]
O = Example

[ v3_ca ]
basicConstraints = critical,CA:TRUE
keyUsage = critical,keyCertSign,cRLSign

[ v3_server ]
basicConstraints = critical,CA:FALSE
keyUsage = critical,digitalSignature
extendedKeyUsage = serverAuth
subjectAltName = DNS:vcon.example.com

The repository's scripts/make-cnsa2-fixtures.sh builds wolfSSL and wolfCLU from their release tarballs, checked by SHA-256, in a container, makes such a chain, and records each of the limits above as it meets it. The tests run that chain through the profile. wolfSSL is GPL-3.0 (with an exception that allows GPL-2.0 beside the programs its LICENSING file lists) or a commercial license; wolfCLU 0.2.0's sources say GPL version 3 or later. Both are outside programs here, never part of vcon-server.

Let's Encrypt

Let's Encrypt cannot issue a certificate for this profile today. Its post Cryptographic Algorithm Plans and Recommendations (December 3, 2026) lists the end-entity keys it supports as ECDSA (256 and 384 bits) and RSA (2048, 3072 and 4096 bits): Let's Encrypt does not issue ML-DSA certificates yet. Its ML-DSA certificates are to be Merkle Tree Certificates (MTCs), which it is "aiming to make … generally available in early February 2027". An MTC is a different form of certificate from the X.509 chain signed with ML-DSA-87 that this profile accepts, so the profile does not take one.

Get a Let's Encrypt certificate still applies to hybrid, with an ECDSA or RSA certificate; cnsa2 cannot use it today.

Switch the server to cnsa2

  1. Point [tls] at the new certificate and key, and add the profile:

    sudo cp -p $CONFIG $CONFIG.hybrid
    sudo sed -i -e 's|^cert = "/etc/vcon-server/cert.pem"|cert = "/etc/vcon-server/cnsa2-cert.pem"|' \
      -e 's|^key = "/etc/vcon-server/key.pem"|key = "/etc/vcon-server/cnsa2-key.pem"\nprofile = "cnsa2"|' $CONFIG
    sudo sed -n '/^\[tls\]/,/^profile/p' $CONFIG
    
    [tls]
    cert = "/etc/vcon-server/cnsa2-cert.pem"
    key = "/etc/vcon-server/cnsa2-key.pem"
    profile = "cnsa2"
    

    An [operator] listener with a certificate of its own (operator listener) is held to the same profile, so its certificate and key must be ML-DSA-87 too.

  2. Restart the server. Under systemd:

    sudo systemctl restart vcon-server
    timeout 30 sh -c 'until curl -s -o /dev/null --cacert /usr/local/share/vcon-server/cnsa2-ca.pem --curves MLKEM1024 https://vcon.example.com:8443/health; do sleep 1; done' && echo answering
    
    answering
    

    Or, without systemd, stop it and start it again:

    sudo kill -TERM "$(pidof vcon-server)"
    while pidof vcon-server >/dev/null; do sleep 0.2; done
    
    sudo -u vcon vcon-server serve --config /etc/vcon-server/vcon-server.toml
    
    <time>  INFO vcon_server::serve: serving listen=0.0.0.0:8443
    …
    

Check it

curl built with OpenSSL 3.5 meets the profile when it is asked for ML-KEM-1024 and the CA is the ML-DSA-87 one. Without a key, /health answers 401, which shows that the handshake succeeded:

curl -sS --cacert $CA --tlsv1.3 --curves MLKEM1024 --tls13-ciphers TLS_AES_256_GCM_SHA384 "$URL/health"; echo
{"status":401,"title":"A valid bearer key is needed","type":"https://vcon-server.com/problems/unauthorized"}

openssl s_client shows what was agreed: the group, the cipher suite, the server's ML-DSA-87 signature, and the certificate checked against the CA and the server's name (Verify return code: 0 (ok); a name the certificate does not hold gives 62 (hostname mismatch)).

openssl s_client -connect vcon.example.com:8443 -servername vcon.example.com \
  -verify_hostname vcon.example.com -CAfile $CA \
  -tls1_3 -groups MLKEM1024 -ciphersuites TLS_AES_256_GCM_SHA384 -sigalgs mldsa87 </dev/null 2>&1 \
  | grep -E "^(Protocol|New, |Negotiated TLS1.3 group|Peer signature type|Verify return code)"
Peer signature type: mldsa87
Negotiated TLS1.3 group: MLKEM1024
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Protocol: TLSv1.3
Verify return code: 0 (ok)

The server logs the first connection since its start to agree each group. Under systemd:

sudo journalctl -u vcon-server -o cat | grep -o 'group=MLKEM1024' | head -1
group=MLKEM1024

In the foreground, the line is in the terminal the server runs in: the first TLS connection since the start to agree on this key-exchange group, with group=MLKEM1024.

curl with its default groups, which with OpenSSL 3.5 include X25519MLKEM768 but not ML-KEM-1024, gets no connection:

curl -sS --cacert $CA "$URL/health"
curl: (35) TLS connect error: error:0A000410:SSL routines::ssl/tls alert handshake failure

nor does a client that asks for TLS 1.2:

curl -sS --cacert $CA --curves MLKEM1024 --tls-max 1.2 "$URL/health"
curl: (35) TLS connect error: error:0A00042E:SSL routines::tlsv1 alert protocol version

The server logs the first refusal of each requirement since its start, with the requirement the client failed:

sudo journalctl -u vcon-server -o cat | grep -o 'requirement=.*' | LC_ALL=C sort -u
requirement="CNSA 2.0 requires TLS 1.3"
requirement="CNSA 2.0 requires the key-exchange group ML-KEM-1024 (0x0202)"

On the wire, with tshark

To see the group and the cipher suite in the packets, capture the handshake on the server's host for 30 seconds while a client connects, and read each ServerHello: one line for each. A client that lists ML-KEM-1024 after another group adds a line with no group for the HelloRetryRequest, and a client refused after the ServerHello (for its signature algorithms) adds one too. The group's number is 514 (0x0202, ML-KEM-1024) and the cipher suite's 0x1302 (TLS_AES_256_GCM_SHA384):

sudo tshark -i lo -f 'tcp port 8443' -a duration:30 -Y 'tls.handshake.type == 2' \
  -T fields -e tls.handshake.extensions_key_share_group -e tls.handshake.ciphersuite
514	0x1302

Clients

vcon-server mcp and vcon-server tui

The client file of vcon-server mcp and vcon-server tui takes tls_profile. With "cnsa2", the command connects with the profile's algorithms only, so ca must name the ML-DSA-87 CA:

KEY=$(sudo -u vcon vcon-server key create --operator --label cnsa2-check --config $CONFIG | jq -r .token)
install -d -m 0700 agent
printf '%s\n' "$KEY" > agent/agent.token
chmod 0600 agent/agent.token
cat > agent/mcp.toml <<EOF
url = "$URL/mcp"
key_file = "$PWD/agent/agent.token"
ca = "$CA"
tls_profile = "cnsa2"
EOF
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"shell","version":"1"}}}' \
  | vcon-server mcp --client agent/mcp.toml | jq -r .result.serverInfo.name
vcon-server

Without tls_profile, the client offers the hybrid groups, none of which is ML-KEM-1024, and the server refuses it:

sed -i '/^tls_profile/d' agent/mcp.toml
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"shell","version":"1"}}}' \
  | vcon-server mcp --client agent/mcp.toml
vcon-server: <words>

vcon-scale

vcon-scale --tls-profile cnsa2 holds the load generator's connections to the profile (scale).

wolfSSL

wolfSSL 5.9.4's example client meets the profile when it is built with ML-KEM and ML-DSA, and with ML-KEM alone as a TLS group (--enable-tls-mlkem-standalone, off by default), and is limited to TLS 1.3, the one cipher suite and ML-KEM-1024. A build with session tickets (--enable-session-ticket, or options that turn them on, such as --enable-wolfclu) also needs --enable-ticket-nonce-malloc: the server's session tickets carry a 32-byte nonce, longer than such a build takes by default, and without it the client's first read after the handshake fails with error -425. The build below has no session tickets. wolfSSL 5.9.4 was released on September 25, 2026; it is GPL-3.0 (with the exception above) or a commercial license, and is a test peer here, never part of vcon-server. Build it, and connect:

curl -sSLO https://github.com/wolfSSL/wolfssl/archive/refs/tags/v5.9.4-stable.tar.gz
echo "7256bfc89b183a75183806c7debfa203443873b0b4a562e1b80d68e01b45ac57  v5.9.4-stable.tar.gz" | sha256sum -c -
tar xzf v5.9.4-stable.tar.gz && cd wolfssl-5.9.4-stable
./autogen.sh
./configure --enable-dilithium --enable-mlkem --enable-tls-mlkem-standalone \
  --enable-experimental --enable-tls13
make -j4
./examples/client/client -v 4 -l TLS13-AES256-GCM-SHA384 --pqc ML_KEM_1024 \
  -A /usr/local/share/vcon-server/cnsa2-ca.pem -h vcon.example.com -p 8443 -g
…
SSL version is TLSv1.3
SSL cipher suite is TLS_AES_256_GCM_SHA384
…
SSL curve name is ML_KEM_1024
…
HTTP/1.0 404 Not Found
…

The 404 is the server's answer to the client's GET, for a path the server does not serve: the connection carried a request and its answer.

The repository's scripts/cnsa2-interop.sh runs this client (in a build with session tickets and --enable-ticket-nonce-malloc) and openssl s_client against a server with tls.profile = "cnsa2", each in a container pinned by digest. It fails unless each agrees ML-KEM-1024 and TLS_AES_256_GCM_SHA384, the wolfSSL client reads the server's answer, and the server logs group=MLKEM1024.

Go back to hybrid

Put the saved configuration back and restart. The ECDSA certificate in /etc/vcon-server/cert.pem is still there:

sudo mv $CONFIG.hybrid $CONFIG

Restart, under systemd:

sudo systemctl restart vcon-server
timeout 30 sh -c 'until curl -s -o /dev/null --cacert /usr/local/share/vcon-server/ca.pem https://vcon.example.com:8443/health; do sleep 1; done' && echo answering
answering

Or, without systemd:

sudo kill -TERM "$(pidof vcon-server)"
while pidof vcon-server >/dev/null; do sleep 0.2; done
sudo -u vcon vcon-server serve --config /etc/vcon-server/vcon-server.toml
<time>  INFO vcon_server::serve: serving listen=0.0.0.0:8443
…

A default curl connects again:

curl -sS --cacert /usr/local/share/vcon-server/ca.pem "$URL/health"; echo
{"status":401,"title":"A valid bearer key is needed","type":"https://vcon-server.com/problems/unauthorized"}

When it does not work

The server's log names the requirement that failed: TLS 1.3, TLS_AES_256_GCM_SHA384 (0x1302), ML-KEM-1024 (0x0202) or ML-DSA-87 (0x0906). A client with tls_profile = "cnsa2" names it too, or all four when the server only ends the handshake.

What you seeCauseWhat to do
The server does not start: the TLS certificate or key (tls.cert, tls.key) cannot be used with tls.profile: CNSA 2.0 requires ML-DSA-87 (0x0906) for every certificate, key and handshake signature; certificate 1 of the chain (the leaf) is signed with ECDSA with SHA-256tls.cert is still the ECDSA certificate, or one certificate of the chain is not ML-DSA-87. The number counts from the leafInstall an ML-DSA-87 chain, as in make ML-DSA-87 certificates
The server does not start: … the private key is ECDSA P-256tls.key is not the certificate's ML-DSA-87 keyPoint tls.key at the ML-DSA-87 key
The server does not start: tls.profile = "cnsa2" cannot be used with [storage.s3] (or [export.s3])The S3 client, and the AWS SDK's credential requests made for it, cannot be held to the profileKeep the objects in the data directory (for [export.s3], export to a directory), or stay on hybrid
The server does not start: tls.profile = "cnsa2" cannot be used with catalog.backend = "postgres"A catalog in PostgreSQL needs its objects in S3Keep the catalog in the data directory (catalog.backend = "local"), or stay on hybrid
The server does not start: tls.profile: "…" is not "hybrid" or "cnsa2"A misspelled profileWrite "hybrid" or "cnsa2"
curl: (35) TLS connect error: … alert handshake failureThe client offers no ML-KEM-1024, no TLS_AES_256_GCM_SHA384, or no ML-DSA-87 signature. curl with OpenSSL 3.5 offers X25519MLKEM768 and not ML-KEM-1024 by default--curves MLKEM1024 with a curl built with OpenSSL 3.5 or later
curl: (35) TLS connect error: … alert protocol versionThe client asks for TLS 1.2Allow TLS 1.3
curl: (60) SSL certificate problemcurl does not trust the ML-DSA-87 CA--cacert /usr/local/share/vcon-server/cnsa2-ca.pem
vcon-server mcp or tui stops with … CNSA 2.0 requires TLS 1.3, TLS_AES_256_GCM_SHA384, ML-KEM-1024 and ML-DSA-87, and the peer refused the handshakeThe client file has tls_profile = "cnsa2" and the server is on hybridGive both the same profile
vcon-server mcp stops with the server: … error sending request for url (…) (tui with a connection error), and the server's log names a requirementThe server is on cnsa2 and the client file has no tls_profile = "cnsa2"Add tls_profile = "cnsa2" to the client file
The server's log: the first TLS handshake since the start that tls.profile = "cnsa2" refused for this requirement requirement=…A client connected without the profile; the line names what it lacked, once for each requirement since the startSwitch that client to the profile

Source of this page: website/content/docs/cnsa2-tls.md