Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Vendor: Cloudflare · https://developers.cloudflare.com/workers/ · Last reviewed 2026-12-05 · History

Summary

  • Inbound: requests reach a Worker over Cloudflare’s visitor connections, so key agreement is hybrid X25519MLKEM768 by default when the client supports it.1
  • Outbound fetch() to third-party servers follows the zone’s origin connection settings: hybrid key agreement is preferred when the destination supports it.12
  • A zone setting can restrict outbound fetch() to hybrid key agreement only. Destinations that cannot comply fail with error 525.2
  • Web Crypto: ML-KEM (768 and 1024) and ML-DSA (44, 65, 87) are available behind the webcrypto_modern_algorithms compatibility flag, since 2026-10-01.34
  • Nothing is published about key agreement for outbound TCP sockets (connect() and startTls()), checked 2026-12-05.5

Add "compatibility_flags": ["webcrypto_modern_algorithms"] to wrangler.jsonc to use ML-KEM and ML-DSA in crypto.subtle.3

Cryptographic operations

  • Requests to a Worker: the edge terminates TLS 1.3 for custom domains and *.workers.dev; signatures planned via Merkle Tree Certificates.1 See Visitor connections.
  • Outbound fetch(): Cloudflare is the TLS client, governed by the “Cloudflare to origin” status (X25519MLKEM768); the setting “applies to all outbound connections for the zone, including fetch() requests from Workers”.12 See Origin connections.
  • D1, KV, Durable Objects, R2, Workers AI, Hyperdrive: mostly migrated to X25519MLKEM768, “a long tail of services” remaining; signatures “Not yet”.1
  • TCP sockets: groups offered not documented (checked 2026-12-05).5
  • Web Crypto without the flag: classical only (RSASSA-PKCS1-v1_5, ECDSA P-256/P-384/P-521, Ed25519, X25519).4
With webcrypto_modern_algorithms4 Operations
ML-DSA-44, ML-DSA-65, ML-DSA-87 sign, verify, generate, import, export
ML-KEM-768, ML-KEM-1024 encapsulate, decapsulate, generate, import, export
ML-KEM-512 not supported (BoringSSL version does not expose it)3
  • Pure algorithms, not hybrids. The API follows a draft and “may change as the draft evolves”.6 SHA-3, ChaCha20-Poly1305 and HPKE from the same proposal are not implemented.3

Versions

Change Date Source
ML-KEM and ML-DSA in Web Crypto behind webcrypto_modern_algorithms 2026-10-01 3
Outbound fetch() follows automatic key exchange 2026-09-08 27

Configuration

  • Web Crypto: set the flag in wrangler.jsonc ({"compatibility_flags": ["webcrypto_modern_algorithms"]}), then e.g. crypto.subtle.generateKey("ML-DSA-44", true, ["sign", "verify"]); test with SubtleCrypto.supports().3
  • Outbound fetch(): nothing to enable. To disable classical, the zone administrator sets the compliance requirement Post-quantum hybrid (["pqh"]); it covers fetch() from Workers and failing destinations “will return 525”.2 Cloudflare advises against it if any service your Workers connect to lacks support.2
  • Requests to a Worker: classical cannot be disabled. Web Crypto: the application chooses.

Vendor commitments

  • 2026-12-03: all products “fully post-quantum” in 2027; nothing specific to Workers.8 See Cloudflare.

References

  1. Cloudflare Docs, “PQC in Cloudflare products”. https://developers.cloudflare.com/ssl/post-quantum-cryptography/pqc-cloudflare-products/ (accessed 2026-12-05). ↩ ↩2 ↩3 ↩4 ↩5

  2. Cloudflare Docs, “Automatic key exchange to origins”. https://developers.cloudflare.com/ssl/origin-configuration/automatic-key-exchange/ (accessed 2026-12-05). ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  3. Cloudflare Blog, ML-KEM and ML-DSA in Workers Web Crypto, 2026-10-01. https://blog.cloudflare.com/workers-ml-kem-ml-dsa-support/ (accessed 2026-12-05). “This support is available behind the webcrypto_modern_algorithms compatibility flag while the specification is still moving.” ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  4. Cloudflare Docs, “Web Crypto”, Supported algorithms. https://developers.cloudflare.com/workers/runtime-apis/web-crypto/ (accessed 2026-12-05). ↩ ↩2 ↩3

  5. Cloudflare Docs, “TCP sockets”. https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/ (accessed 2026-12-05). ↩ ↩2

  6. Cloudflare Docs, “Compatibility flags”, Web Crypto modern algorithms. https://developers.cloudflare.com/workers/configuration/compatibility-flags/#web-crypto-modern-algorithms (accessed 2026-12-05). ↩

  7. Cloudflare Blog, Automatic Key Exchange announcement, 2026-09-08. https://blog.cloudflare.com/automatic-key-exchange-for-origins/ (accessed 2026-12-05). ↩

  8. Cloudflare Blog, “Project Quantum Leap: Cloudflare will be fully post-quantum in 2027”, 2026-12-03. https://blog.cloudflare.com/project-quantum-leap/ (accessed 2026-12-05). ↩


Edit: Cloudflare Workers

If you give an email address it is recorded publicly as the author of the commit, and GitHub will link the commit to your account if that address belongs to one.

Edits are reviewed before they appear. By submitting you release your contribution under CC BY-SA 4.0. Read the editorial guidelines first.

This site uses Just the Docs, a documentation theme for Jekyll.