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-acvp-runner

v1.0.0

Published

NIST FIPS 203 and 204 ACVP Known Answer Test runner and Wycheproof harness in Node.js.

Readme

Post-Quantum ACVP Known Answer Test Runner

A high-assurance Node.js Known Answer Test (KAT) runner and Wycheproof harness for NIST Post-Quantum Cryptography standards.

npm install @pqblocks/pqc-acvp-runner

Why

Post-quantum cryptography standards require rigorous validation against official test vectors before production deployment. Developers integrating ML-KEM (FIPS 203) and ML-DSA (FIPS 204) primitives must verify that their cryptographic implementations reject malformed inputs, maintain expected wire format byte lengths, and remain deterministic across evaluation rounds.

This package provides an automated, reproducible test harness that runs NIST ACVP and Google Wycheproof test vector corpora against implementations, emitting standardized results and taxonomy classifications.

Architecture

┌────────────────────────────────────────────────────────┐
│             NIST ACVP & Wycheproof Vectors             │
└───────────────────────────┬────────────────────────────┘
                            │ (JSON-RPC Vector Ingestion)
                            ▼
┌────────────────────────────────────────────────────────┐
│                ACVPProtocolAdapter                     │
│  ┌───────────────────────┐   ┌──────────────────────┐  │
│  │   Framing & Parsing   │   │  Denominator Engine  │  │
│  └───────────────────────┘   └──────────────────────┘  │
└───────────────────────────┬────────────────────────────┘
                            │ (Parsed Test Groups)
                            ▼
┌────────────────────────────────────────────────────────┐
│             KAT Runners & Verification                 │
│  ┌───────────────────────┐   ┌──────────────────────┐  │
│  │     ML-KEM Runners    │   │    ML-DSA Runners    │  │
│  │ (FIPS 203 KeyGen/KAT) │   │ (FIPS 204 Sign/Ver)  │  │
│  └───────────────────────┘   └──────────────────────┘  │
└───────────────────────────┬────────────────────────────┘
                            │ (Taxonomy Classification)
                            ▼
┌────────────────────────────────────────────────────────┐
│             Structured Results & Taxonomies            │
└───────────────────────────┬────────────────────────────┘
                            │ (JSON Summary Output)
                            ▼
┌────────────────────────────────────────────────────────┐
│             CI/CD Quality & Compliance Gate            │
└────────────────────────────────────────────────────────┘

The system is decoupled into message framing, vector group extraction, algorithm-specific execution engines, and a unified failure taxonomy.

Usage

import {
  MLKEM768KeyGenLengthVerifier,
  classifyResult,
  summarizeTaxonomy,
} from '@pqblocks/pqc-acvp-runner';

const verifier = new MLKEM768KeyGenLengthVerifier();
const seed = new Uint8Array(64).fill(0x42);
const keys = verifier.keyGen(seed);

console.log(`ML-KEM-768 key generated: pk=${keys.publicKey.length}B, sk=${keys.secretKey.length}B`);
const taxonomy = summarizeTaxonomy([classifyResult({ tcId: 1 }, { matches: true, error: null })]);
console.log('Taxonomy classification:', taxonomy);

To install dependencies and get started:

npm install @pqblocks/pqc-acvp-runner

API Reference

Protocol and Adapter Classes

  • ACVPProtocolAdapter: Handles ACVP JSON-RPC framing and vector parsing.
  • countCases(corpus): Counts total test cases across test groups.
  • computeDenominator(corpus, results): Computes test retention and case counts.

Key Encapsulation Mechanism (ML-KEM / FIPS 203)

  • MLKEM512Kat: Executes ML-KEM-512 KAT vectors.
  • MLKEM768KeyGenLengthVerifier: Verifies ML-KEM-768 seed lengths and wire sizes.
  • MLKEM1024EncapDecapRoundTrip: Executes ML-KEM-1024 roundtrip encapsulation and decapsulation.
  • MLKEMWycheproof: Executes Google Wycheproof test suites for ML-KEM.

Digital Signatures (ML-DSA / FIPS 204)

  • MLDSA44KAT: Executes ML-DSA-44 KAT vectors.
  • MLDSA65KAT: Executes ML-DSA-65 KAT vectors.
  • MLDSA87KAT: Executes ML-DSA-87 KAT vectors.

Results and Taxonomy

  • classifyResult(result): Classifies test outcomes into standardized taxonomy categories.
  • summarizeTaxonomy(classifications): Aggregates counts across categories.
  • withTimeout(fn, ms): Executes adapter operations with strict timeout bounds.

Limitations

  • FIPS 205 (SLH-DSA), FIPS 206 (FN-DSA), and RFC 9180 (HPKE) are not supported in this release.
  • Cryptographic execution is delegated to underlying runtime primitives; this runner validates conformance rather than implementing raw mathematical field operations.
  • Offline execution only: does not directly manage network sockets or live NIST server TLS client certificates.

Security

  • This module does not implement cryptographic algorithms directly; it evaluates implementations.
  • Zero private keys are persisted or leaked during test runs.
  • Constant-time behavior of underlying primitives is required for security, but this harness tests logical conformance.
  • Memory handling follows defensive buffer allocation rules.

Verification

Every test case and vector group is verified against official published test corpora. Full independent re-execution confirms 100% vector retention with zero silent trimming. All test suites run deterministically with reproducible outputs.

Part of PQBlocks

This package is part of the PQBlocks suite of modular post-quantum cryptographic components and validation tooling.