Skip to main content

Getting started

quantum-resistant-rustykey is a TypeScript-first npm package of WebAssembly post-quantum primitives for Node.js and browsers — including SQIsign (NIST additional-signatures / on-ramp), ML-DSA, FN-DSA, SLH-DSA, and ML-KEM.

RustyKey® is a FIDO Alliance member. This package exists especially for constrained WebAuthn / CTAP2 contexts where lattice signatures are too large for the classic ~1024-byte buffer.

:::caution Pre-production Await v1.0.0 (after security audit) for production / regulated deployment. Until then, prefer @latest or a caret range so dependents pick up patches. :::

Install

pnpm i quantum-resistant-rustykey@latest
# or
bun add quantum-resistant-rustykey@latest
npm add quantum-resistant-rustykey@latest

Requires Node ≥ 26.5.0.

What you get

FamilyVariantsNotes
SQIsignL1 / L3 / L5Small signatures; NIST on-ramp. See cose-sqisign.
ML-DSA65 / 87NIST FIPS 204
FN-DSA512 / 1024Falcon family
SLH-DSA128s / 192s / 256sHash-based FIPS 205 (pure JS via @noble/post-quantum)
ML-KEM512 / 768 / 1024From mlkem-native

Quick taste (ML-KEM)

import { loadMlKem768 } from "quantum-resistant-rustykey";

const kem = await loadMlKem768();
const kp = kem.keypair();
const enc = kem.encrypt(kp.get("public_key"));
const sharedA = await enc.get("secret");
const sharedB = await kem.decrypt(enc.get("cyphertext"), kp.get("private_key"));

Live playground

Try algorithms interactively at pqc.rustykey.me.

Next