Skip to content

node:crypto: expand WebCrypto modern algorithm coverage #2518

@andrewtdiz

Description

@andrewtdiz

Summary

Perry's WebCrypto coverage includes the core deterministic algorithms currently covered by the granular crypto suite, but it does not yet cover Node's newer WebCrypto algorithm/method surface such as P-384/P-521, Ed448/X448, AES-OCB, ChaCha20-Poly1305, KMAC, ML-KEM, or SubtleCrypto.supports() / encapsulation helpers.

Missing surface

  • WebCrypto curves/algorithms beyond the implemented core set: P-384/P-521, Ed448, X448, AES-OCB, ChaCha20-Poly1305, KMAC128/KMAC256, and ML-KEM variants
  • SubtleCrypto.supports(op, algorithm, length?)
  • subtle.encapsulateBits(...) / subtle.decapsulateBits(...)
  • subtle.encapsulateKey(...) / subtle.decapsulateKey(...)

Evidence

  • The granular crypto suite README lists WebCrypto P-384/P-521, Ed448/X448, AES-OCB, ChaCha20-Poly1305, PQC/KMAC/Argon2 surfaces as follow-up work (test-parity/node-suite/crypto/README.md:16-21).
  • docs/runtime-parity.md lists the corresponding Node WebCrypto methods and algorithms (docs/runtime-parity.md:4664-4703) and notes Node's expanded post-quantum/KMAC WebCrypto coverage (docs/runtime-parity.md:5551).
  • Source search for P-384, P-521, Ed448, X448, AES-OCB, ChaCha20, KMAC, ML-KEM, encapsulateBits, decapsulateBits, encapsulateKey, decapsulateKey, and SubtleCrypto.supports found no implementation in crates/perry-stdlib/src/webcrypto, runtime dispatch, or the API manifest.

Expected Node-compatible behavior

crypto.webcrypto.subtle should expose Node-compatible support detection and algorithm behavior for the newer WebCrypto algorithms Perry chooses to support. Unsupported algorithms should fail with Node-compatible rejection/error behavior rather than falling through as missing methods or unsupported algorithm strings.

Duplicate check

Searched issues and PRs for WebCrypto P-384 P-521 Ed448 X448 AES-OCB ChaCha20 KMAC ML-KEM. No existing tracker or PR was found. #2517 covers top-level node:crypto Argon2 and crypto.encapsulate / crypto.decapsulate; this issue is scoped to crypto.webcrypto.subtle algorithm and method coverage.

Verification note

I could not run a fresh local Perry parity probe in this workspace because there is no local perry binary. This issue is based on committed parity metadata and current source inspection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions