Cloudflare

Support for modern cryptographic algorithms in Workers

Oct 1, 2026Thibault Meunier
Support for modern cryptographic algorithms in Workers
SummaryAI, from the source post

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