Skip to main content

Supported algorithms

Sizes, OIDs, and selection guidance for the NIST post-quantum algorithms implemented in post-quantum-packages.

Standards coverage

StandardAlgorithmsTypeNIST security categoriesStatus
FIPS 203 (ML-KEM)ML-KEM-512, ML-KEM-768, ML-KEM-1024Key encapsulationI, III, VFinal (Aug 2024)
FIPS 204 (ML-DSA)ML-DSA-44, ML-DSA-65, ML-DSA-87Digital signaturesII, III, VFinal (Aug 2024)
FIPS 205 (SLH-DSA)SLH-DSA-SHA2/SHAKE in 128s, 128f, 192s, 192f, 256s, 256fHash-based signaturesI, III, VFinal (Aug 2024)

Falcon (FN-DSA) is selected for a future standard (FIPS 206) and is not yet implemented in these packages.

Key and signature sizes

Use these when sizing calldata, certificate chains, JWT envelopes, or storage. The packages expose sizes programmatically through pq-oid's Algorithm.get().

ML-KEM (FIPS 203)

Parameter setPublic keySecret keyCiphertextShared secret
ML-KEM-512800 B1,632 B768 B32 B
ML-KEM-7681,184 B2,400 B1,088 B32 B
ML-KEM-10241,568 B3,168 B1,568 B32 B

ML-DSA (FIPS 204)

Parameter setPublic keySecret keySignature
ML-DSA-441,312 B2,560 B2,420 B
ML-DSA-651,952 B4,032 B3,309 B
ML-DSA-872,592 B4,896 B4,627 B

SLH-DSA (FIPS 205, selection)

Parameter setPublic keySecret keySignature
SLH-DSA-SHA2-128s32 B64 B7,856 B
SLH-DSA-SHA2-128f32 B64 B17,088 B
SLH-DSA-SHA2-192s48 B96 B16,224 B
SLH-DSA-SHA2-256s64 B128 B29,792 B

SHAKE variants of SLH-DSA have the same sizes; performance differs.

OIDs

ML-KEM-512 2.16.840.1.101.3.4.4.1
ML-KEM-768 2.16.840.1.101.3.4.4.2
ML-KEM-1024 2.16.840.1.101.3.4.4.3

ML-DSA-44 2.16.840.1.101.3.4.3.17
ML-DSA-65 2.16.840.1.101.3.4.3.18
ML-DSA-87 2.16.840.1.101.3.4.3.19

The full list (including all 12 SLH-DSA variants) is exposed through pq-oid and mapped to JOSE / COSE / X.509 descriptors by pq-algorithm-id.

Algorithm selection guide

Use this as a starting heuristic, not a substitute for a security review.

  • Need a signature → use ML-DSA-65 by default. NIST Level 3, best balance of size and verification cost. Drop to ML-DSA-44 only if you are size-constrained and accept Level 2. Use ML-DSA-87 for Level 5.
  • Need a KEM → use ML-KEM-768. Level 3, the standard recommendation. ML-KEM-512 is Level 1; ML-KEM-1024 is Level 5.
  • Need hash-only security assumptions → use a SLH-DSA variant. Hash-based, so its security does not depend on lattice problems. Cost: signatures are 7,856 bytes and up; verification is multiple millions of gas on EVM. The s (small) variants have smaller signatures but slower signing; the f (fast) variants are the reverse.

Signature size in context

PQ signatures are larger than classical ones by one to two orders of magnitude. This is the fundamental engineering constraint these packages are designed around.

SchemeSignatureNotes
Ed25519 (classical)64 BQuantum-vulnerable
ML-DSA-442,420 BFIPS 204, lattice-based
ML-DSA-653,309 BFIPS 204, lattice-based
SLH-DSA-SHA2-128s7,856 BFIPS 205, hash-based

On an L2 that posts calldata to L1, a 3,309-byte ML-DSA-65 signature is the dominant per-transaction cost driver. The packages expose helpers to compute these costs (planned: pq-size-calculator).