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

@pqblocks/pqc-compat-registry

v1.0.0

Published

A machine-readable registry of NIST post-quantum algorithm identifiers (FIPS 203/204/205 OIDs) for compliance tooling.

Readme

@pqblocks/pqc-compat-registry

A registry of NIST post-quantum algorithm identifiers — OIDs, key and signature sizes, and security strengths for the 18 FIPS 203/204/205 parameter sets — for developers building PQC compliance and interop tooling.

Use it whenever you need to translate between a NIST parameter-set name (e.g. ML-KEM-768), its ASN.1 OID, and its wire-format sizes, without hand-copying tables.

Standards: FIPS 203 (ML-KEM), FIPS 204 (ML-DSA), FIPS 205 (SLH-DSA), RFC 9881 / RFC 9909 / RFC 9935 OID assignments.

Why PQBlocks

Hand-maintained copies of the FIPS parameter tables drift. This package is a single canonical, typed source of truth: 18 parameter sets with dotted OIDs, component lists, key/signature/shared-secret lengths, and security categories (lambda), plus OID parsing and size validators that throw typed errors.

Architecture

┌──────────────────────────────────────────────────────────────┐
│                     Your application / CLI                   │
│        (compliance report, TLS config, ASN.1 encoder)       │
└───────────────────────────┬──────────────────────────────────┘
                            │ import { algorithms, parse_oid, ... }
                            ▼
┌──────────────────────────────────────────────────────────────┐
│              @pqblocks/pqc-compat-registry              │
│  ┌─────────────────┐  ┌──────────────┐  ┌────────────────┐  │
│  │  registry.ts    │  │ oid_parser   │  │  validators    │  │
│  │  18 Algorithm-  │  │ parse_oid()  │  │  FIPS 203/204/ │  │
│  │  Spec entries   │  │ validate_oid │  │  205 size      │  │
│  │  + ALL_OIDS     │  │ get_oid_by_  │  │  checks        │  │
│  │                 │  │  algorithm() │  │                │  │
│  └─────────────────┘  └──────────────┘  └────────────────┘  │
└──────────────────────────────────────────────────────────────┘
                            │ plain data + functions (no crypto)
                            ▼
┌──────────────────────────────────────────────────────────────┐
│   NIST FIPS 203/204/205 parameter tables, RFC 9881/9909/9935 │
│   OID arcs (the registry mirrors these; it does not replace   │
│   a crypto library)                                           │
└──────────────────────────────────────────────────────────────┘

The package performs no cryptographic operations. It is identifier/metadata only — use a PQC crypto library (e.g. @noble/post-quantum) for key generation, encapsulation, signing, and verification.

Installation

npm install @pqblocks/pqc-compat-registry

Requires Node.js >= 20. No runtime dependencies; TypeScript types are bundled.

Usage

import { algorithms, parse_oid, validate_oid, get_oid_by_algorithm,
         validate_parameter_sizes, validate_slh_dsa_sizes, ALL_ALGORITHMS } from '@pqblocks/pqc-compat-registry';

// 1. Look up a parameter set by name
const kem = algorithms['ml-kem-768'];
console.log(kem.oid_dotted);        // '2.16.840.1.101.3.4.4.2'
console.log(kem.key_length);        // 1184 (encapsulation key bytes)
console.log(kem.security_lambda);   // 192

// 2. Parse an OID back to its algorithm
const r = parse_oid('2.16.840.1.101.3.4.3.19');
console.log(r.algorithm);           // 'ml-dsa-87'

// 3. Validate that observed sizes match the FIPS table
console.log(validate_oid('2.16.840.1.101.3.4.4.1'));                 // true
console.log(validate_parameter_sizes('ml-dsa-44',
  { public_key: 2560, private_key: 1312, signature: 2420 }));        // { valid: true, ... }
console.log(validate_slh_dsa_sizes('slh-dsa-sha2-128s',
  { private_key: 64, public_key: 32, signature: 7856 }));            // { valid: true, ... }

// 4. Reverse lookup: name -> OID
console.log(get_oid_by_algorithm('slh-dsa-shake-256f')); // '2.16.840.1.101.3.4.3.31'
console.log(ALL_ALGORITHMS.length);                              // 18

CLI: npx pqc-registry <oid|algorithm> prints the matching entry as JSON.

API reference

| Export | Type | Description | |--------|------|-------------| | algorithms | Record<Algorithm, AlgorithmSpec> | All 18 parameter sets: name, fips, oid_dotted, oid_components, key_length, signature_length, shared_secret_length, security_lambda, description | | ALL_ALGORITHMS | string[] | The 18 registry keys ('ml-kem-512' … 'slh-dsa-shake-256f') | | ALL_OIDS | string[] | The 18 NIST-arc dotted OIDs | | parse_oid(oid: string) | (oid) => OIDResult \| null | Dotted OID -> { algorithm, ... }, or null if unregistered; throws typed E_INVALID_OID on malformed input | | validate_oid(oid) | (oid) => boolean | Never throws; false for malformed or unknown input | | get_oid_by_algorithm(name) | (name) => string | Throws E_NOT_REGISTERED for unknown names and prototype-pollution keys (__proto__, constructor, toString) | | validate_parameter_sizes(alg, sizes) | (alg, {public_key?, private_key?, signature?, ...}) => SizeValidationResult | Checks observed sizes against the FIPS 203/204/205 table for alg | | validate_slh_dsa_sizes(alg, sizes) | (alg, {private_key, public_key, signature}) => SLHDSASizeValidation | SLH-DSA-specific check using FIPS 205 Table 2 (private = 4n bytes) | | FIPS_TABLES | object | The canonical size tables used by the validators | | version, license, description, packageMeta | string/object | Package metadata |

Error contract: malformed OIDs raise E_INVALID_OID; unknown algorithms raise E_NOT_REGISTERED; both are typed errors with error_code, error_message, and suggestion fields. validate_oid is the non-throwing variant.

Limitations

  • Covers exactly the 18 FIPS 203/204/205 parameter sets. Other algorithms (e.g. FN-DSA / FIPS 206, HPKE / RFC 9180, LMS/XMSS / SP 800-208) are not supported and return E_NOT_REGISTERED.
  • No cryptographic operations: no keygen, encapsulation, signing, or verification.
  • No performance claims: lookups are O(1) map accesses; no timing numbers are published.
  • Not a FIPS 140-3 / CMVP validated module (see SECURITY_NOTES.md).

Security notes

This package contains no secrets, no key material, and no cryptographic primitives; it is a pure data registry. It is not FIPS 140-3 / CMVP validated. See SECURITY_NOTES.md for the full posture.

Verification

  • TESTING.md — test counts, official NIST ACVP vectors used, how to run.
  • BENCHMARKS.md — correctness harness results and reproduction.
  • EVIDENCE.md — mapping of every registry field to its primary standard source.
  • VERIFICATION_REPORT.md — self-verification summary, defects fixed, known limitations.

Part of PQBlocks

@pqblocks/pqc-compat-registry is part of the PQBlocks family of post-quantum packages. Apache-2.0 licensed.