INVITE ONLY
OBSERVATORY

Research

protocol-spec

Cryptographic Primitives and Parameter Sets

Version
v1.0
Category
protocol-spec
Published
Last updated
Authors
QERYX Research
Primitives ML-KEM-1024 ML-DSA-87 X25519 ChaCha20-Poly1305 AES-256-GCM SHA-512 SHAKE-256 BLAKE3 HKDF-SHA-512 Argon2id HMAC-SHA-256
What changed v1.0
  1. v1.0 First publication, including the same-day Argon2id reweighting: the one-shot path ships at m=512 MiB, t=2, p=4.
Contents
  1. §1 The master table
  2. §2 Backend pinning
  3. §3 Level 5 parameter sets
  4. §4 Context framing (FIPS 204 §5.2)
  5. §5 Labeled HKDF
  6. §6 Argon2id
  7. §7 What is deliberately absent
  8. §8 References

Every cryptographic primitive QERYX instantiates, with its parameter set, byte sizes, and the source citation that pins it. Wire-stable values are byte-locked: changing any of them is a backward-incompatible break. This chapter is the anti-drift rail for every other paper — a primitive that does not appear in the master table does not appear in QERYX.

The master table

PrimitiveStandardPublicSecretOutput
ML-KEM-1024FIPS 203 (2024)1568 B3168 B32 B shared secret
ML-DSA-87FIPS 204 (2024)2592 B4896 B4627 B signature
X25519RFC 774832 B32 B32 B
ChaCha20-Poly1305RFC 843932 B key12 B nonce, 16 B tag
AES-256-GCM (CSfC outer)FIPS 197 + SP 800-38D32 B key12 B nonce, 16 B tag
SHA-512FIPS 180-464 B
SHAKE-256 / SHA3-256FIPS 202extendable
BLAKE3 (keyed)Aumasson, O'Connor et al.32 B domain key32 B
HKDF-SHA-512RFC 5869PRK 64 B, ≤255×64 B
Argon2idRFC 910616 B random salt32 B
HMAC-SHA-256RFC 210416 B truncated token

Source citations for every row live in docs/SPEC/01-primitives.md §2.1, each pointing into crypto-core/src/.

Backend pinning

Every ML-KEM and ML-DSA operation dispatches to a library lineage holding FIPS 140-3 certificate #4631. QERYX's own module boundary is not yet CMVP-certified; module validation is in progress. Two unmaintained third-party PQ crates were removed in the 2026-04 migration for concrete reasons:

  • The KyberSlash timing attacks (IACR ePrint 2024/1049; TCHES 2025) recover ML-KEM private keys in minutes on unpatched reference implementations — one removed crate tracked reference C that was never patched past the 2023-12-29 disclosure.
  • The other shipped a round-3 signature variant rather than the final FIPS 204 ML-DSA parameterization.
  • The pinned backend's ML-KEM kernels are audited secret-independent, and its ML-DSA signs hedged by default per FIPS 204 Appendix D.

Level 5 parameter sets

Both lattice primitives run at NIST security category 5 — the only category CNSA 2.0 accepts for National Security Systems.

ParameterML-KEM-1024ML-DSA-87
Ring degree n256256
Modulus q33298,380,417
Rankk = 4(k, l) = 8 × 7
Classical security256 bit256 bit
Quantum security128 bit192 bit
NIST OID2.16.840.1.101.3.4.4.32.16.840.1.101.3.4.3.19

Deterministic ML-DSA signing is never used on mobile: FIPS 204 warns the deterministic variant is vulnerable to fault-injection differential attacks. Every signature draws fresh 256-bit randomness.

Context framing — FIPS 204 §5.2, load-bearing

Every ML-DSA-87 signature in QERYX carries an explicit context string, framed exactly as the standard specifies:

M' = 0x00 || len(ctx) || ctx || M

Every byte of the context is signed. A signature computed under context A deterministically fails verification under context B — there is no cross-protocol replay. Fifteen reserved context strings cover the protocol slots, one each: message authentication, handshake transcript, device pairing, build attestation, both ESv1 legs, call initiation, the pre-key handshake, KTS tree heads and leaves, FSOR destruction roots, destruction proofs, and the three QLEAP directory slots. The full table with citations is in the source chapter.

Labeled HKDF

labeled_hkdf(IKM, label, context, len):
    info = "QERYX-v1-" || label || context
    return HKDF-SHA-512(IKM, salt = None, info, len)

The "QERYX-v1-" prefix is wire-stable; bumping it is a session-state break. A boundary-collision-safe variant (labeled_hkdf_strict) injects a reserved delimiter byte between label and context for new protocol slots; existing slots stay byte-locked for forward compatibility — an external review finding (F-005) closed with exactly this split. The full label catalog ships in the Reviewer FAQ.

Argon2id

Memory      = 512 MiB
Iterations  = 2
Parallelism = 4
Output      = 32 B
Salt        = 16 B random per call

The 2026-05-01 audit reweighting moved the one-shot path up from the RFC 9106 second recommendation (64 MiB · t=3) to 512 MiB · t=2 — a 5.3× increase in memory-iterations work factor. The RFC 9106 first recommendation (2 GiB · t=1) remains exposed as a named constant for desktop tooling; phone processes cannot run it under the per-process memory ceiling.

What is deliberately absent

Each absence below is a decision with a reason attached. Nothing here was left out because including it was inconvenient.

  • No ECDSA or RSA classical signatures anywhere in the message path. CNSA 2.0 requires ML-DSA-87 for software and firmware signing by 2027; QERYX is already there.
  • No ML-DSA-65 fallback. Removed 2026-04-20 per an external audit — there is no negotiation variable to downgrade.
  • No Curve25519 EdDSA in the identity path — X25519 is key exchange only; identity signatures are ML-DSA-87.
  • No SHA-1, no MD5, anywhere in the dependency tree.

References

  1. QERYX Protocol Specification §2 — docs/SPEC/01-primitives.md, snapshot 2026-05-01.
  2. NIST FIPS 203 (ML-KEM) and FIPS 204 (ML-DSA), 2024.
  3. RFC 5869 (HKDF), RFC 7748 (X25519), RFC 8439 (ChaCha20-Poly1305), RFC 9106 (Argon2).
  4. KyberSlash: division timing attacks on ML-KEM reference code — IACR ePrint 2024/1049.
  5. CNSA 2.0 and FIPS Conformance Posture — the per-line conformance mapping for this table.