Skip to content

@brivora/crypto

@brivora/crypto is an opinionated, batteries-included post-quantum cryptography library for JavaScript/TypeScript.

  • Hybrid by default — Classical (Ed25519 + X25519) + Post-Quantum (ML-DSA-65 + ML-KEM-768). Both must be broken to compromise security.
  • NIST FIPS compliant — ML-KEM-768 (FIPS 203), ML-DSA-65 (FIPS 204), finalized August 2024.
  • Self-describing payloads — Every encrypted/signed payload includes version and algorithm metadata.
  • Zero configuration — Sensible defaults. No crypto PhD required.
  • Pure TypeScript — No native modules. No WASM. Works everywhere: Node.js, Deno, Bun, browsers.
  • Zero telemetry — No analytics. No network calls. Pure local computation.
Terminal window
npm install @brivora/crypto
import { crypto } from '@brivora/crypto';
const keys = await crypto.createIdentity();
const signed = await crypto.sign(data, keys.privateKey);
  • Node.js 20+ (also works in Deno, Bun, and modern browsers)
  • Web Crypto API (globalThis.crypto.subtle)