<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3" -->

---
title: Support for modern cryptographic algorithms in Workers
description: Cloudflare Workers now offers opt-in support for post-quantum-resistant algorithms ML-KEM (key encapsulation) and ML-DSA (signatures) via Web Crypto, based on...
canonical: https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Support for modern cryptographic algorithms in Workers | daily.dev
og:description: Cloudflare Workers now offers opt-in support for post-quantum-resistant algorithms ML-KEM (key encapsulation) and ML-DSA (signatures) via Web Crypto, based on...
og:url: https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3
og:image: https://api.daily.dev/og/posts/ZJlYER7W3.png
og:image:alt: Support for modern cryptographic algorithms in Workers
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Support for modern cryptographic algorithms in Workers

**[Cloudflare](https://daily.dev/sources/cloudflare)** · 9 min read · 2 upvotes · 0 comments

## Summary

Cloudflare Workers now offers opt-in support for post-quantum-resistant algorithms ML-KEM (key encapsulation) and ML-DSA (signatures) via Web Crypto, based on the draft Modern Algorithms in the Web Cryptography API specification. The feature is gated behind the webcrypto_modern_algorithms compatibility flag and includes new APIs like encapsulateBits(), decapsulateBits(), getPublicKey(), and SubtleCrypto.supports(). Initially, ML-KEM-768 and ML-DSA-44 are the primary supported variants, with ML-KEM-1024, ML-DSA-65, and ML-DSA-87 also available; ML-KEM-512 is unsupported due to BoringSSL limitations. The implementation lives in workerd's Web Crypto layer backed by BoringSSL, and libraries like panva/jose and panva/hpke can now delegate to native primitives instead of bundling their own cryptographic code. Other parts of the WICG proposal, such as SHA-3, cSHAKE, TurboSHAKE, ChaCha20-Poly1305, and native HPKE, are not yet implemented.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.cloudflare.com/workers-ml-kem-ml-dsa-support>

## Questions this post answers

### How do I enable ML-KEM and ML-DSA support in Cloudflare Workers?

Add the webcrypto_modern_algorithms compatibility flag to the wrangler.jsonc configuration under compatibility_flags. This opts into post-quantum-resistant Web Crypto APIs including ML-KEM-768 and ML-KEM-1024 for key encapsulation and ML-DSA-44, ML-DSA-65, and ML-DSA-87 for signatures, implemented in workerd's Web Crypto layer backed by BoringSSL primitives.

_Developers tracking post-quantum rollout milestones across platforms can follow related updates on daily.dev._

### Why doesn't Cloudflare Workers support ML-KEM-512?

ML-KEM-512 is not supported because the BoringSSL version used by Workers does not expose that variant. Rather than add a separate implementation just for that one variant, the initial rollout only includes algorithms already available through the native crypto library: ML-KEM-768, ML-KEM-1024, and ML-DSA-44, ML-DSA-65, ML-DSA-87.

_Teams evaluating post-quantum algorithm coverage across runtimes can compare notes and gaps on daily.dev._

### How do I sign a JWT with ML-DSA using the jose library?

Use jose.generateKeyPair with the algorithm string 'ML-DSA-44', then call new jose.SignJWT(payload).setProtectedHeader({alg}).setIssuedAt().setExpirationTime('5m').sign(privateKey), and verify with jose.jwtVerify(jwt, publicKey). The panva/jose library maps ML-DSA-* algorithms directly to the underlying Web Crypto primitives, so libraries no longer need to bundle their own post-quantum signing implementation.

_Library maintainers migrating signing code to post-quantum algorithms can share patterns like this on daily.dev._

## Similar posts on daily.dev

- [Quantum-Resistant ML-KEM and ML-DSA in Java](https://daily.dev/posts/quantum-resistant-ml-kem-and-ml-dsa-in-java-8jnil5ogs) · Baeldung · 0 upvotes · 0 comments
- [Standardizing Post-Quantum IPsec: Cloudflare Adopts Hybrid ML-KEM to Replace Ciphersuite Bloat](https://daily.dev/posts/standardizing-post-quantum-ipsec-cloudflare-adopts-hybrid-ml-kem-to-replace-ciphersuite-bloat-72husfcdu) · InfoQ · 0 upvotes · 0 comments
- [Future-proofing data integrity: Quantum-safe digital signatures in Cloud KMS](https://daily.dev/posts/future-proofing-data-integrity-quantum-safe-digital-signatures-in-cloud-kms-48ecf07wc) · Google Cloud · 2 upvotes · 1 comments
- [Post-Quantum Cryptography in .NET](https://daily.dev/posts/post-quantum-cryptography-in-net-9uq2cqj7r) · .NET Blog · 25 upvotes · 0 comments
- [Post-quantum encryption for Cloudflare IPsec is generally available](https://daily.dev/posts/post-quantum-encryption-for-cloudflare-ipsec-is-generally-available-bafxrwzks) · Cloudflare · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#quantum-computing](https://daily.dev/tags/quantum-computing), [#cryptography](https://daily.dev/tags/cryptography), [#cloudflare](https://daily.dev/tags/cloudflare)

[View this post on daily.dev](https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Support for modern cryptographic algorithms in Workers","url":"https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3"},"datePublished":"2026-10-01T13:02:30.512Z","dateModified":"2026-10-01T13:02:54.465Z","description":"Cloudflare Workers now offers opt-in support for post-quantum-resistant algorithms ML-KEM (key encapsulation) and ML-DSA (signatures) via Web Crypto, based on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/337ae2adff51512b2d62e341acf8a3d6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/337ae2adff51512b2d62e341acf8a3d6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Cloudflare","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Cloudflare","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/38522e1d11354cd6b7af66f9d4316735","url":"https://daily.dev/sources/cloudflare"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,quantum-computing,cryptography,cloudflare","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Cloudflare","item":"https://daily.dev/sources/cloudflare"},{"@type":"ListItem","position":3,"name":"Support for modern cryptographic algorithms in Workers"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/support-for-modern-cryptographic-algorithms-in-workers-zjlyer7w3#faq","mainEntity":[{"@type":"Question","name":"How do I enable ML-KEM and ML-DSA support in Cloudflare Workers?","acceptedAnswer":{"@type":"Answer","text":"Add the webcrypto_modern_algorithms compatibility flag to the wrangler.jsonc configuration under compatibility_flags. This opts into post-quantum-resistant Web Crypto APIs including ML-KEM-768 and ML-KEM-1024 for key encapsulation and ML-DSA-44, ML-DSA-65, and ML-DSA-87 for signatures, implemented in workerd's Web Crypto layer backed by BoringSSL primitives. Developers tracking post-quantum rollout milestones across platforms can follow related updates on daily.dev."}},{"@type":"Question","name":"Why doesn't Cloudflare Workers support ML-KEM-512?","acceptedAnswer":{"@type":"Answer","text":"ML-KEM-512 is not supported because the BoringSSL version used by Workers does not expose that variant. Rather than add a separate implementation just for that one variant, the initial rollout only includes algorithms already available through the native crypto library: ML-KEM-768, ML-KEM-1024, and ML-DSA-44, ML-DSA-65, ML-DSA-87. Teams evaluating post-quantum algorithm coverage across runtimes can compare notes and gaps on daily.dev."}},{"@type":"Question","name":"How do I sign a JWT with ML-DSA using the jose library?","acceptedAnswer":{"@type":"Answer","text":"Use jose.generateKeyPair with the algorithm string 'ML-DSA-44', then call new jose.SignJWT(payload).setProtectedHeader({alg}).setIssuedAt().setExpirationTime('5m').sign(privateKey), and verify with jose.jwtVerify(jwt, publicKey). The panva/jose library maps ML-DSA-* algorithms directly to the underlying Web Crypto primitives, so libraries no longer need to bundle their own post-quantum signing implementation. Library maintainers migrating signing code to post-quantum algorithms can share patterns like this on daily.dev."}}]}
```

