npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@panva/hpke-noble

v1.0.6

Published

@noble/* based HPKE algorithm implementations for hpke

Readme

@panva/hpke-noble

@panva/hpke-noble provides additional HPKE algorithm implementations for use with hpke, using Paul Miller's @noble cryptographic libraries. This package provides cross-runtime support for algorithms not available in Web Cryptography, including post-quantum KEMs, SHAKE-based KDFs, and ChaCha20Poly1305 AEAD.

Overview

@panva/hpke-noble provides additional algorithms for hpke by conforming to the HPKE interfaces (KEM, KDF, or AEAD). This approach allows you to:

  • Use cryptographic primitives not available in Web Cryptography
  • Support algorithms across all JavaScript runtimes (Node.js, browsers, Deno, Bun, Cloudflare Workers, etc.)
  • Integrate specialized or audited cryptographic libraries

All implementations in this package work across all Web-interoperable JavaScript runtimes. For React Native, you may need a polyfill for crypto.getRandomValues.

Included Implementations

See https://panva.github.io/hpke/

Key Encapsulation Mechanisms (KEM)

| Name | ID | | -------------------------- | -------- | | DHKEM(P-256, HKDF-SHA256) | 0x0010 | | DHKEM(P-384, HKDF-SHA384) | 0x0011 | | DHKEM(P-521, HKDF-SHA512) | 0x0012 | | DHKEM(X25519, HKDF-SHA256) | 0x0020 | | DHKEM(X448, HKDF-SHA512) | 0x0021 | | ML-KEM-512 | 0x0040 | | ML-KEM-768 | 0x0041 | | ML-KEM-1024 | 0x0042 | | MLKEM768-P256 | 0x0050 | | MLKEM768-X25519 | 0x647a | | MLKEM1024-P384 | 0x0051 |

Key Derivation Functions (KDF)

| Name | ID | | ------------- | -------- | | HKDF-SHA256 | 0x0001 | | HKDF-SHA384 | 0x0002 | | HKDF-SHA512 | 0x0003 | | SHAKE128 | 0x0010 | | SHAKE256 | 0x0011 | | TurboSHAKE128 | 0x0012 | | TurboSHAKE256 | 0x0013 |

Authenticated Encryption (AEAD)

| Name | ID | | ---------------- | -------- | | AES-128-GCM | 0x0001 | | AES-256-GCM | 0x0002 | | ChaCha20Poly1305 | 0x0003 |

Usage

Each implementation follows the factory pattern required by hpke:

import * as HPKE from 'hpke'
import { KEM_ML_KEM_768, KDF_SHAKE256, AEAD_ChaCha20Poly1305 } from '@panva/hpke-noble'

const suite = new HPKE.CipherSuite(KEM_ML_KEM_768, KDF_SHAKE256, AEAD_ChaCha20Poly1305)

[!NOTE]
Built-in implementations (based on Web Cryptography) and @panva/hpke-noble implementations can be freely mixed and matched. For example, you could use KEM_ML_KEM_768 from @panva/hpke-noble with KDF_HKDF_SHA256 and AEAD_AES_256_GCM from hpke.

[!NOTE]
These implementations are tested using the same test vectors and validation suite as the built-in implementations in hpke, ensuring correctness and interoperability.

Example Integration

This package also serves as an example of how to integrate external cryptographic libraries with hpke. If you need to bring your own cryptographic primitives (e.g., hardware-backed implementations, audited libraries, or runtime-specific bindings), you can follow the same pattern by implementing the KEM, KDF, or AEAD interfaces.