ML-KEM, ML-DSA, SLH-DSA, HPKE and classical primitives.
Documentation · v0.0.41
Crypto Service developer documentation
API references for all 18 npm packages, generated by TypeDoc from source, with a quick start and the standards each algorithm implements. The packages share one version and are released together.
Suite version 0.0.41 · 18 npm packages in lockstep · TypeDoc API reference · Apache-2.0 OR MIT
Quick start
ML-KEM-768 in three calls.
Install @sebastienrousseau/crypto-lib on Node.js 22 or later, then generate a key pair, encapsulate a shared secret and recover it. Keys, ciphertexts and secrets are hex strings.
# 1. Install (Node.js 22 or later)
pnpm add @sebastienrousseau/crypto-lib
// 2. ML-KEM-768 key encapsulation (FIPS 203 algorithm; not a validated module)
import { mlKemKeygen, mlKemEncapsulate, mlKemDecapsulate } from "@sebastienrousseau/crypto-lib";
const { publicKey, secretKey } = mlKemKeygen(768);
const { ciphertext, sharedSecret } = mlKemEncapsulate(768, publicKey);
const received = mlKemDecapsulate(768, secretKey, ciphertext);
// received.sharedSecret === sharedSecretProject facts
- 18 npm packages, one version
- 6 language SDKs over the REST API
- 100% statement, branch, function and line coverage in every package
- FIPS 203/204/205 algorithms, not a validated module
- Apache-2.0 OR MIT
API reference
The 18 packages
Every package is published to npm as @sebastienrousseau/<name> at the same version. Each reference below is generated by TypeDoc from the package’s source.
Primitives and runtimes
Cloudflare Workers, Vercel Edge, Deno, Bun and browsers.
Accelerator interface only; ships no WebAssembly module yet.
Deterministic keys, test vectors, mocks and fixtures.
Service and clients
Self-hosted Fastify REST service over crypto-lib.
Zero-dependency fetch client for crypto-server.
Subcommands for scripts and CI, plus an interactive menu.
Express and Fastify request and response encryption.
Postman collection types and a Markdown converter.
Keys and data
KMS interface: AWS, Google Cloud, Vault Transit, local.
Prisma Client extension for field encryption.
TypeORM @EncryptedColumn() decorator.
CycloneDX 1.6 and SPDX 3.0 CBOM generator.
Front end
React hooks for client-side cryptography.
Vue 3 composables for client-side cryptography.
Tooling and AI
Model Context Protocol server over stdio for AI agents.
Flags weak and quantum-vulnerable cryptography in editors.
Classical versus post-quantum benchmarks.