PQ Python

asyncssh

The only Python SSH stack with a P-384 ML-KEM hybrid (mlkem1024nistp384-sha384), but it has no ML-DSA keys and authenticates with Ed25519 or P-256 by default.

PyPI
asyncssh
Version cited
2.24.227 Nov 2026
Downloads
17.5M/mo

Key exchange and encryption

PQ with action

Three ML-KEM hybrids via cryptography ≥48

Signatures and identity

Stopgap only

RSA/P-384 stopgap; no ML-DSA keys

What to do

Use asyncssh ≥2.24.0 (AGY: ≥2.24.2) with a PQ-capable cryptography; prefer mlkem1024nistp384-sha384; keep RSA-3072+ or P-384 keys for it on OpenSSH 10.6 servers.

Since 1 Dec 2026 Only #853, about cryptography 51’s DSA deprecation, unrelated to PQ. Nothing advisory-related as of 3 Dec 2026.

Details

Key exchange#

  • Supports mlkem768x25519-sha256 (first preference), mlkem768nistp256-sha256 and mlkem1024nistp384-sha384. It is the only Python SSH stack with a P-384 hybrid, the option closest to CNSA (the AGY report calls it CNSA-aligned, with no 256-bit ECC).
  • Takes ML-KEM from cryptography natively since 2.24.0 (cryptography >= 48.0.0).
  • sntrup761x25519-sha512 requires liboqs.
  • 2.24.2 disabled rsa2048-sha256 key exchange by default.

Authentication#

  • Default keys are ssh-ed25519 / ecdsa-sha2-nistp256.
  • no ML-DSA keys: asyncssh cannot use OpenSSH 10.6’s ssh-mldsa44-ed25519, even though cryptography 51.0.0 can serialize those keys.
  • A server that offers only composite host keys, or accepts only composite user keys, breaks asyncssh connections AGY.

Recipe: PQ-only key exchange with non-256-bit signatures#

From the AGY report AGY:

# AsyncSSH 2.24.2+ strict PQ KEX + stopgap non-256-bit-ECC auth
async with asyncssh.connect(
    host,
    kex_algs=["mlkem1024nistp384-sha384", "mlkem768x25519-sha256"],
    server_host_key_algs=["rsa-sha2-512", "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521"],
    signature_algs=["rsa-sha2-512", "ecdsa-sha2-nistp384", "ecdsa-sha2-nistp521"],
) as conn: ...

The matching server keeps ssh-mldsa44-ed25519 keys plus RSA-3072/4096 (rsa-sha2-512) or P-384 (ecdsa-sha2-nistp384) keys (details).

Versions and trackers#

  • The Claude report recommends ≥2.24.0; the AGY report recommends asyncssh >= 2.24.2 with cryptography >= 51.0.0.
  • 853 is about cryptography 51’s DSA deprecation (#853). The AGY report also lists asyncssh #809 among its SSH trackers without describing it.#

  • Sources: asyncssh changelog, 2.24.2 changes.rst, api.rst.

17,510,269 downloads in the 30 days to 3 Dec 2026.

Sources cited on this page 4
  1. #853 github.com
  2. asyncssh changelog asyncssh.readthedocs.io
  3. 2.24.2 changes.rst github.com
  4. api.rst github.com

All sources across the guide