v151 · origin trial · webcrypto · post-quantum
Algorithm Updates in WebCrypto
A modernization of the Web Cryptography API: post-quantum algorithms (ML-KEM, ML-DSA, SLH-DSA), modern AEAD ciphers (AES-OCB, ChaCha20-Poly1305), the SHA-3/Keccak family (SHA3 digests, cSHAKE, TurboSHAKE, KangarooTwelve, KMAC), and the Argon2 password KDF — plus new SubtleCrypto methods for key encapsulation (encapsulateKey/decapsulateKey and their -Bits forms), getPublicKey, and a static supports() capability check.
In Chrome 150 these algorithms and methods are in developer trial (behind a flag). An origin trial follows on desktop in Chrome 151–154 (chromestatus API, updated 2026-06-17; ship estimate unset, status “Proposed”). To use them:
- In Chrome 151–154: register your origin for the “WebCrypto Additional Algorithms” origin trial at developer.chrome.com/origintrials and serve the token. ChromeStatus records a live trial registration (origin-trial id
1379790335835635713) with trial documentation. - In Chrome 150 (or for local development): launch Chrome with
--enable-blink-features=WebCryptoPQC(runtime-enabled featureWebCryptoPQC, origin-trial feature nameWebCryptoAdditionalAlgorithms202606). - Serve over HTTPS — the partial interface is exposed with
[SecureContext]in Window and Worker contexts. - Feature-detect with the new static
SubtleCrypto.supports(operation, algorithm)before calling — algorithm availability varies by build and platform.
at a glance
| Milestone listing | Chrome 151 — Origin trial (chromestatus listing, verified 2026-07-28; the feature was previously listed under Chrome 150 as In developer trial) |
|---|---|
| Origin trial | Desktop, Chrome 151–154; public registration listed (origin-trial id 1379790335835635713, feature name WebCryptoAdditionalAlgorithms202606) |
| Ship estimate | None recorded — feature detail (chromestatus API, updated 2026-06-17): desktop milestone unset, status text “Proposed” |
| Interface | SubtleCrypto (partial), via crypto.subtle |
| Context | Secure contexts, Window and Worker |
| Runtime flag | WebCryptoPQC in runtime_enabled_features.json5 |
| Standards body | WICG — WebCrypto Modern Algorithms |
| ChromeStatus | 5198951632470016 — Algorithm Updates in WebCrypto |
Syntax
The update extends SubtleCrypto with four key-encapsulation methods (KEM support for ML-KEM), a public-key derivation helper, and a static feature-detection method. IDL from the WICG draft:
[SecureContext, Exposed=(Window,Worker)]
partial interface SubtleCrypto {
Promise<EncapsulatedKey> encapsulateKey(
AlgorithmIdentifier encapsulationAlgorithm,
CryptoKey encapsulationKey,
AlgorithmIdentifier sharedKeyAlgorithm,
boolean extractable,
sequence<KeyUsage> keyUsages
);
Promise<EncapsulatedBits> encapsulateBits(
AlgorithmIdentifier encapsulationAlgorithm,
CryptoKey encapsulationKey
);
Promise<CryptoKey> decapsulateKey(
AlgorithmIdentifier decapsulationAlgorithm,
CryptoKey decapsulationKey,
BufferSource ciphertext,
AlgorithmIdentifier sharedKeyAlgorithm,
boolean extractable,
sequence<KeyUsage> keyUsages
);
Promise<ArrayBuffer> decapsulateBits(
AlgorithmIdentifier decapsulationAlgorithm,
CryptoKey decapsulationKey,
BufferSource ciphertext
);
Promise<CryptoKey> getPublicKey(
CryptoKey key,
sequence<KeyUsage> keyUsages
);
static boolean supports(DOMString operation,
AlgorithmIdentifier algorithm,
optional unsigned long? length = null);
static boolean supports(DOMString operation,
AlgorithmIdentifier algorithm,
AlgorithmIdentifier additionalAlgorithm);
};
Source: WICG WebCrypto Modern Algorithms — Partial SubtleCrypto interface
enum KeyFormat { "raw-public", "raw-private", "raw-seed", "raw-secret",
"raw", "spki", "pkcs8", "jwk" };
enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits",
"wrapKey", "unwrapKey",
"encapsulateKey", "encapsulateBits",
"decapsulateKey", "decapsulateBits" };
dictionary EncapsulatedKey {
CryptoKey sharedKey;
ArrayBuffer ciphertext;
};
dictionary EncapsulatedBits {
ArrayBuffer sharedKey;
ArrayBuffer ciphertext;
};
Source: WICG WebCrypto Modern Algorithms — Data types, Encapsulation dictionaries
| Member | Contract |
|---|---|
encapsulateKey(alg, key, sharedAlg, extractable, usages) | Runs the KEM encapsulation against the recipient public key and resolves to an EncapsulatedKey: the freshly encapsulated shared secret as a CryptoKey (algorithm sharedAlg, with the requested usages) plus the ciphertext to send |
encapsulateBits(alg, key) | Same encapsulation, but the shared secret comes back as raw ArrayBuffer bits (an EncapsulatedBits) instead of an imported CryptoKey |
decapsulateKey(alg, key, ciphertext, sharedAlg, extractable, usages) | Reverses encapsulation with the private key: resolves to the shared secret as a CryptoKey |
decapsulateBits(alg, key, ciphertext) | Decapsulates to raw ArrayBuffer bits |
getPublicKey(key, keyUsages) | Derives the public CryptoKey from an asymmetric private key, so only the private half needs to be stored |
static supports(operation, algorithm, length?) / static supports(operation, algorithm, additionalAlgorithm) | Static capability check: is this algorithm identifier (with parameters, key length, or a second algorithm) supported for the named operation on this build? |
The new algorithm roster
Eleven algorithm families are registered, each with its own operations section in the spec (key generation, import/export, and the operations below). All are optional to implement per the spec — use SubtleCrypto.supports() to detect them.
| Algorithm(s) | Kind | Primary operations | Reference |
|---|---|---|---|
| ML-KEM | Post-quantum key encapsulation | encapsulateKey/Bits, decapsulateKey/Bits, generateKey, importKey, exportKey | FIPS 203 |
| ML-DSA | Post-quantum signatures | sign, verify, generateKey, importKey, exportKey | FIPS 204 |
| SLH-DSA | Post-quantum hash-based signatures | sign, verify, generateKey, importKey, exportKey | FIPS 205 |
| AES-OCB | Authenticated encryption | encrypt, decrypt, generateKey, importKey, exportKey, getKeyLength | RFC 7253 |
| ChaCha20-Poly1305 | Authenticated encryption | encrypt, decrypt, generateKey, importKey, exportKey, getKeyLength | RFC 8439 |
| SHA3-256, SHA3-384, SHA3-512 | SHA-3 digests | digest | FIPS 202 |
| cSHAKE128, cSHAKE256 | Customizable XOF | digest | NIST SP 800-185 |
| TurboSHAKE128, TurboSHAKE256 | Fast XOF | digest | RFC 9861 |
| KT128, KT256 (KangarooTwelve) | Fast XOF / hashing | digest | RFC 9861 |
| KMAC128, KMAC256 | Keyed MAC (Keccak) | sign, verify, generateKey, importKey, exportKey, getKeyLength | NIST SP 800-185 |
| Argon2d, Argon2i, Argon2id | Password-based key derivation | deriveBits, importKey, getKeyLength | RFC 9106 |
Examples
// 1. Feature-detect first — the method and every algorithm are optional
const kemOK = SubtleCrypto.supports?.("encapsulateKey", "ML-KEM-768") ?? false;
if (!kemOK) throw new DOMException("ML-KEM-768 is unavailable", "NotSupportedError");
// 2. Recipient generates an ML-KEM key pair
const pair = await crypto.subtle.generateKey("ML-KEM-768", true, [
"encapsulateKey", "decapsulateKey",
]);
// 3. Sender encapsulates a shared secret against the recipient public key
const { sharedKey, ciphertext } = await crypto.subtle.encapsulateKey(
"ML-KEM-768", pair.publicKey, "AES-GCM", true, ["encrypt", "decrypt"],
);
// -> send { ciphertext } to the recipient; keep sharedKey local
// 4. Recipient decapsulates with the private key — same shared secret
const recovered = await crypto.subtle.decapsulateKey(
"ML-KEM-768", pair.privateKey, ciphertext, "AES-GCM", true, ["encrypt", "decrypt"],
);
Source: composed from the WICG partial SubtleCrypto interface and ML-KEM registered names and operations; the draft does not provide an ML-KEM JavaScript example.
Browser compatibility
There is no browser-compat-data (BCD) entry for these methods and algorithms yet, so the table below is an interim view built from ChromeStatus ship data and public vendor signals — not from BCD.
| Browser | Status | Notes |
|---|---|---|
| Chrome | 150 (developer trial) | Behind --enable-blink-features=WebCryptoPQC in 150; desktop origin trial 151–154 with public registration; ship estimate unset, status “Proposed” |
| Edge | Not separately reported | No Edge position is recorded on ChromeStatus; no public support evidence (Chromium engine equivalence is not a support commitment) |
| Firefox | Neutral | Recorded on ChromeStatus (no public support or opposition) |
| Safari | Neutral | Recorded on ChromeStatus (no public support or opposition) |
api/SubtleCrypto.json (none of the six new members are present as of 2026-07-24)
Specifications
| Specification | Status |
|---|---|
| WebCrypto Modern Algorithms | WICG draft (incubation) |
| Web Cryptography API | W3C Recommendation — the base SubtleCrypto interface this draft extends |
| FIPS 203 / 204 / 205, FIPS 202, NIST SP 800-185, RFC 7253 / 8439 / 9106 / 9861 | Normative algorithm references (linked from the draft) |