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

@atlasauth/pca-fndsa

v0.4.1

Published

FN-DSA / Falcon (FIPS 206 draft) suite for PCA: register the compact PQ signature suite in the crypto-agility seam with a pluggable, vetted verify backend (a constant-time Falcon is not safely hand-rolled in TS) — wire format, suite ids, and KAT-driven in

Readme

@atlasauth/pca-fndsa

FN-DSA (Falcon, FIPS 206 draft) signature suites for Proof-Carrying Authority. It defines the suite ids, the fixed wire sizes, strict length enforcement and the PCA leaf-signature framing (pure and hybrid with Ed25519). The Falcon arithmetic itself is delegated to a pluggable backend, because a constant-time Falcon is not something to hand-roll in TypeScript. Use @atlasauth/pca-fndsa-wasm as the backend.

FN-DSA keys and signatures are much smaller than ML-DSA's, which helps on bandwidth-bound surfaces.

| suite id | public key | signature | | --- | --- | --- | | fn-dsa-512 | 897 B | 666 B (padded) | | fn-dsa-1024 | 1793 B | 1280 B (padded) | | hybrid-ed25519-fn-dsa-512 / -1024 | as above | Ed25519 in sig, FN-DSA in pq_sig; both must verify |

Install

npm i @atlasauth/pca-fndsa @atlasauth/pca-fndsa-wasm

Depends on @atlasauth/pca. No backend is bundled: without one, signing and verification throw a clear error.

Usage

Register a backend once, then sign and verify. The backend receives raw bytes, so pick the variant from the key length.

import { randomBytes } from 'node:crypto';
import * as wasm from '@atlasauth/pca-fndsa-wasm';
import { setFalconBackend, getFalconBackend, fndsaSign, fndsaVerify } from '@atlasauth/pca-fndsa';

const variantOf = (n: number) => (n === 897 || n === 1345 ? 'fn-dsa-512' : 'fn-dsa-1024');

setFalconBackend({
  keygen: () => {
    const { verifyingKey, signingKey } = wasm.keygen('fn-dsa-512', randomBytes(wasm.SEED_BYTES));
    return { pk: verifyingKey, sk: signingKey };
  },
  sign: (sk, msg) => wasm.sign(variantOf(sk.length), sk, msg, randomBytes(wasm.SEED_BYTES)),
  verify: (pk, msg, sig) => wasm.verify(variantOf(pk.length), pk, msg, sig),
});

const { pk, sk } = getFalconBackend().keygen!();
const msg = new TextEncoder().encode('hello');
const sig = fndsaSign('fn-dsa-512', sk, msg);      // 666-byte padded signature
fndsaVerify('fn-dsa-512', pk, msg, sig);           // true

For PCA artifacts, signPcaWithFndsa({ alg, leaf, fnDsa, edSecret? }) returns the wire fields (sig, alg, pq_pk, and pq_sig for hybrid suites) and verifyPcaFndsa({ alg, leaf, holder, pq_pk, sig, pq_sig }) checks them. Verification fails closed on an unknown suite, wrong key or signature length, a tampered action or a suite downgrade, and a hybrid suite needs both halves to verify.

API

FN_DSA_SUITES, isKnownFnDsaAlg, resolveFnDsaAlg, setFalconBackend, getFalconBackend, resetFalconBackend, fndsaSign, fndsaVerify, signPcaWithFndsa, verifyPcaFndsa, fndsaLeafMessage, and the size constants. registerTestBackend and mockKeypair install a deterministic mock for tests only; never use them in production.

Status

Experimental and unaudited. The suite wiring (wire format, length checks, hybrid composition, PCActn leaf framing) is tested against the real @atlasauth/pca-fndsa-wasm backend for both parameter sets, with tampered action, swapped key, forged signature and missing/forged hybrid half rejected. The deterministic mock backend is kept only for wiring and negative-plumbing tests. The FN-DSA primitive itself has no official test vectors (none exist yet); see the backend package for what is cross-checked. FIPS 206 is still a draft, so key and signature encodings may change before the final standard. Signatures use the fixed-length padded encoding only. The core @atlasauth/pca verifier does not itself recognise these suite ids; verify FN-DSA artifacts with verifyPcaFndsa.

License

MIT - see LICENSE