QuantLayer Quantum benchmarks

Design document, published from the repository at docs/pqc/BENCHMARKS.md.

Generated by packages/pqc-engine/src/bench.test.ts (QUANTLAYER_BENCH=1) on 2026-11-13. Raw data: benchmarks.json. Re-run on target hardware before capacity planning.

  • Machine: Apple M2, 8 cores, 16 GiB, darwin 27.0.0, Node v26.13.1
  • Build: Rust release, portable code paths (no SIMD: libcrux's verified portable implementation), 1 KiB message, hedged signing.
  • Method: median latency after a warm-up; single thread. "Rust" is measured in-process by quantlayer-pqc-bench. "Node" goes through the Node-API bindings (@quantlayer-protocol/pqc-engine), including call and copy overhead.
  • Memory: "peak heap" is the largest extra heap allocation during one operation (counting allocator). libcrux and fips205 work mostly on the stack, which this does not capture. Node resident-set growth over the whole TypeScript run was 28.1 MiB.

Signatures

AlgorithmNIST cat.Public keySignatureSeed (stored)Keygen (Rust)Sign (Rust)Verify (Rust)Sign (Node)Verify (Node)Peak heap: keygen / sign / verify
ML-DSA-4421,312 B2,420 B32 B54.1 µs111.9 µs30.5 µs99.9 µs29.7 µs3,904 / 2,420 / 0 B
ML-DSA-6531,952 B3,309 B32 B56.8 µs155.9 µs45.6 µs171.4 µs46.8 µs6,016 / 3,309 / 0 B
ML-DSA-8752,592 B4,627 B32 B69.0 µs192.2 µs70.4 µs205.7 µs72.3 µs7,520 / 4,627 / 0 B
SLH-DSA-SHA2-128s132 B7,856 B48 B101 ms877 ms741.6 µs876 ms772.6 µs144 / 7,856 / 0 B
SLH-DSA-SHA2-128f132 B17,088 B48 B1.58 ms39 ms2.19 ms39 ms2.19 ms144 / 17,088 / 0 B
SLH-DSA-SHA2-256s564 B29,792 B96 B97 ms1,323 ms1.63 ms1,324 ms1.64 ms288 / 29,792 / 0 B

Key encapsulation

AlgorithmNIST cat.Encapsulation keyCiphertextSeed (stored)Keygen (Rust)Encaps (Rust)Decaps (Rust)Encaps (Node)Decaps (Node)Peak heap: keygen / encaps / decaps
ML-KEM-5121800 B768 B64 B7.4 µs6.4 µs6.6 µs9.3 µs8.2 µs2,496 / 768 / 0 B
ML-KEM-76831,184 B1,088 B64 B13.5 µs11.0 µs11.5 µs14.0 µs13.0 µs3,648 / 1,088 / 0 B
ML-KEM-102451,568 B1,568 B64 B19.8 µs15.3 µs16.3 µs18.2 µs17.9 µs4,800 / 1,568 / 0 B

Reading the numbers

  • ML-DSA-65 (default) signs in a fraction of a millisecond. A signature is 3,309 B, about 52× an Ed25519 signature.
  • SLH-DSA rests only on hash-function security, but signing is slow (the "s" sets take about a second). Calls run synchronously on the calling thread, so in Node run SLH-DSA signing in a worker thread, or prefer SLH-DSA-SHA2-128f. Use SLH-DSA for long-lived roots of trust, not per-request signing.
  • Hybrid Ed25519+ML-DSA-65 costs one ML-DSA-65 signature plus one classical signature, and is 3,379 B on the wire (6 B header + 64 + 3,309).