PQ Python

PyNaCl

Every PyNaCl public-key API is X25519 or Ed25519, it bundles libsodium 1.0.20 with no post-quantum bindings, and even libsodium 1.0.22 has no ML-DSA.

PyPI
PyNaCl
Version cited
1.6.2(1 Jan 2026), bundling libsodium 1.0.20
Downloads
170M/mo

Key exchange and encryption

No path yet

X25519 Box/SealedBox only, no PQ

Signatures and identity

No path yet

Ed25519 only; no ML-DSA

What to do

Do not wait for PyNaCl 1.7. Move Box/SealedBox to cryptography HPKE and SigningKey/VerifyKey to cryptography mldsa; re-encrypt stored SealedBox data. Keep SecretBox, Aead, hash and pwhash.

Since 1 Dec 2026 Nothing found as of 3 Dec 2026 (no issues filed since 25 Nov).

Details

no PQ API SecretBox, Aead, pwhash unaffected

PyNaCl 1.6.2 (1 Jan 2026; 169,977,493 downloads per 30 days) still bundles libsodium 1.0.20 (libsodium 1.0.20-stable) and exposes no post-quantum bindings (PyNaCl CHANGELOG). No issues have been filed since 25 Nov.

What is exposed#

Every asymmetric class hardcodes Curve25519, X25519 or Ed25519: nacl.public.Box, SealedBox, PrivateKey/PublicKey, nacl.signing.SigningKey/VerifyKey, crypto_kx_* and crypto_core_ristretto255_*. Box/Curve25519 and Ed25519 SigningKey are explicit protocol dependencies, so migrating a file format or an enrolled key needs peer coordination. Any stored X25519 sealed box, or one that crossed an untrusted network, should be assumed harvestable; re-encrypt under symmetric keys or an ML-KEM hybrid.

Upstream libsodium#

libsodium 1.0.22 (9 Apr 2026) added crypto_kem_mlkem768 and X-Wing (crypto_kem), and recommends X-Wing “for most applications”. It has no ML-DSA, so the Claude report concludes that even an updated PyNaCl would have no PQ signatures (libsodium ChangeLog).

Sources disagree. The AGY report says libsodium master has added crypto_sign_mldsa44 AGY. The Claude report, reading the 1.0.22 release, says libsodium has no ML-DSA. Neither reports a released libsodium with ML-DSA.

Libsodium itself made no statement, emergency release or default change after the advisory (response).

Migration#

  • Box/SealedBox to cryptography.hazmat.primitives.hpke.Suite with KEM.MLKEM768_X25519 (or MLKEM1024_P384, MLKEM1024), or pycryptodome’s HPKE X-Wing. See the envelope recipe.
  • SigningKey/VerifyKey to cryptography.hazmat.primitives.asymmetric.mldsa.
  • Leave nacl.secret.SecretBox, Aead, hash and pwhash untouched; they are symmetric.

paramiko 5.1.0 depends on pynacl>=1.5. Track PyNaCl adopting libsodium ≥1.0.22 on the trackers page.

Sources cited on this page 5
  1. PyNaCl CHANGELOG github.com
  2. Box/Curve25519 pynacl.readthedocs.io
  3. Ed25519 SigningKey pynacl.readthedocs.io
  4. libsodium 1.0.22 github.com
  5. libsodium ChangeLog github.com

All sources across the guide