Support for modern cryptographic algorithms in Workers
Oct 1, 2026Thibault Meunier

Summary
This post introduces the addition of ML-KEM-768 and ML-DSA-44 (with support for ML-KEM-1024, ML-DSA-65, ML-DSA-87) to Cloudflare Workers' Web Crypto API. It details the implementation of `encapsulateBits()`, `decapsulateBits()`, `encapsulateKey()`, `decapsulateKey()`, `getPublicKey()`, and `SubtleCrypto.supports()`. The post provides code examples for using these primitives with libraries like `jose` and `hpke`, and explains the rationale for native implementation over bundling separate crypto libraries. It also highlights the need for compatibility flags and the ongoing evolution of the Web Crypto API specification.
More from the Random Number Generation for Security trail
- Using AI to chart a course for our post-quantum migration
- Post-quantum authentication to origins is now supported
- Why we cannot wait for better post-quantum signature algorithms
- The White House's post-quantum executive order is an important milestone. It’s time to get to work
- Post-quantum encryption for Cloudflare IPsec is generally available