Skip to content

Algorithms

AlgorithmStandardUsage
ML-KEM-768FIPS 203Key encapsulation (encryption)
ML-DSA-65FIPS 204Digital signatures
X25519RFC 7748Classical key exchange (hybrid)
Ed25519RFC 8032Classical signatures (hybrid)
AES-256-GCMFIPS 197Symmetric encryption
HKDF-SHA256RFC 5869Key derivation
SHA-256FIPS 180-4Hashing, fingerprinting
SHA-3-256FIPS 202Merkle tree hashing (verify)

All operations use classical + post-quantum crypto by default. This is defense-in-depth: both algorithms must be broken to compromise security.

Post-quantum algorithms are mathematically sound but relatively new in production. Classical algorithms (Ed25519, X25519) have decades of cryptanalysis. Hybrid mode gives you the best of both worlds:

  • If PQC algorithms are broken: classical crypto still protects you
  • If quantum computers break classical crypto: PQC still protects you
  • Both must fail for a compromise

You can disable hybrid mode with { hybrid: false } for PQC-only operation when you’re confident in the post-quantum algorithms alone.

  • Constant-time comparisons — All byte comparisons use constant-time algorithms to prevent timing side-channels
  • CSPRNG — All random bytes from crypto.getRandomValues() (OS-level CSPRNG)
  • No network calls — Everything runs locally. Zero telemetry.
  • Audited primitives — Built on @noble/post-quantum (audited by Cure53)

Import only what you need:

// Only signing — no encryption code in your bundle
import { sign, verify, createIdentity } from '@brivora/crypto';