pqc-kem-auditor
Domain auditor for concrete, standardized post-quantum KEMs. The current
scope is ML-KEM (FIPS 203) only; other KEMs get added with their own
primary sources and fixtures rather than by analogy.
Boundary with lattice-auditor: that skill owns generic LWE/RLWE parameter
and noise-sampler reasoning (custom constructions, security estimates);
this skill owns the standardized KEM's API, state, serialization, and
decapsulation conformance.
When to Use
- Auditing ML-KEM-512/768/1024 (Kyber) encapsulation/decapsulation code
- Reviewing the Fujisaki-Okamoto transform implementation: re-encryption
comparison and implicit rejection
- Reviewing ciphertext/public-key/secret-key encoding, modulus checks, and
compression/rounding
- Assessing decapsulation-failure oracles and constant-time reject paths
- Checking parameter-set and spec-version provenance (FIPS 203 final vs
draft vs round-3 Kyber)
When NOT to Use
- Generic LWE/RLWE parameter soundness, custom lattice schemes, noise
sampling design ->
lattice-auditor
- Post-quantum signatures (ML-DSA, SLH-DSA, Falcon, XMSS/LMS) -> the
lattice/PQ signature review path
- Classical KEM/hybrid TLS integration questions ->
encryption-scheme-auditor
for the symmetric side plus this skill for the KEM side
- Timing leakage measurement methodology ->
side-channel-auditor
Core Review Areas
- Version/parameter provenance: FIPS 203 final vs CRYSTALS-Kyber round-3
differences (domain separation of K derivation, hash choices); the
parameter set (512/768/1024) matches the claimed category
- Input validation: public-key modulus check (encoded coefficients < q),
ciphertext length/type checks, secret-key hash consistency (FIPS 203
§7.2/§7.3 input checking)
- Encapsulation: m sampled from an approved RBG, K derived exactly per
spec, no K exposure before ciphertext output
- Decapsulation and implicit rejection: re-encrypt and compare; on
mismatch return K-bar = J(z || c) with NO observable difference from
success (no error return, no timing/branch difference, no logging)
- Compression/rounding: Compress/Decompress rounding per spec; off-by-one
rounding changes failure probability and interop
- Failure-oracle resistance: nothing (timing, errors, retries, metrics)
distinguishes implicit rejection from success across many queries
- State and key lifecycle: z randomness quality, secret-key zeroization,
no seed reuse across keypairs
Workflow
Phase 1: Version and parameter mapping
- Read
references/pqc-kem-checklist.md
- Pin the spec version and parameter sets; queue
spec-delta-checker if
the code claims FIPS 203 conformance
Phase 2: Decapsulation review
- Execute
workflows/kem-decapsulation-review.md
Phase 3: Pattern hunt
- Read
references/finding-patterns.md
- Prioritize explicit-failure decapsulation, missing modulus checks, and
round-3/FIPS derivation mixing
Phase 4: Handoff
- Send surviving findings to
crypto-fp-check
- Cross-route parameter/noise design questions to
lattice-auditor and
timing measurement to side-channel-auditor
Output Contract
Produce a KEM handoff that includes:
kem_family_and_parameter_set
encapsulation_or_decapsulation_path
failure_oracle_invariant
evidence
disposition (one of verified, false_positive, unverified,
observation, residual_risk)
next_route
Reference Index
- references/pqc-kem-checklist.md
- references/finding-patterns.md
- references/spec-sources.md
- workflows/kem-decapsulation-review.md
1---2name: pqc-kem-auditor-23description: Audit standardized post-quantum KEM implementations — currently ML-KEM / FIPS 203 — for encapsulation/decapsulation conformance, implicit-rejection correctness, ciphertext and key validation, compression/rounding, and decapsulation-failure oracle resistance. Use when reviewing ML-KEM/Kyber APIs, serialization, or decapsulation paths.4---56# pqc-kem-auditor78Domain auditor for concrete, standardized post-quantum KEMs. The current9scope is ML-KEM (FIPS 203) only; other KEMs get added with their own10primary sources and fixtures rather than by analogy.1112Boundary with `lattice-auditor`: that skill owns generic LWE/RLWE parameter13and noise-sampler reasoning (custom constructions, security estimates);14this skill owns the standardized KEM's API, state, serialization, and15decapsulation conformance.1617## When to Use1819- Auditing ML-KEM-512/768/1024 (Kyber) encapsulation/decapsulation code20- Reviewing the Fujisaki-Okamoto transform implementation: re-encryption21 comparison and implicit rejection22- Reviewing ciphertext/public-key/secret-key encoding, modulus checks, and23 compression/rounding24- Assessing decapsulation-failure oracles and constant-time reject paths25- Checking parameter-set and spec-version provenance (FIPS 203 final vs26 draft vs round-3 Kyber)2728## When NOT to Use2930- Generic LWE/RLWE parameter soundness, custom lattice schemes, noise31 sampling design -> `lattice-auditor`32- Post-quantum signatures (ML-DSA, SLH-DSA, Falcon, XMSS/LMS) -> the33 lattice/PQ signature review path34- Classical KEM/hybrid TLS integration questions -> `encryption-scheme-auditor`35 for the symmetric side plus this skill for the KEM side36- Timing leakage measurement methodology -> `side-channel-auditor`3738## Core Review Areas39401. Version/parameter provenance: FIPS 203 final vs CRYSTALS-Kyber round-341 differences (domain separation of K derivation, hash choices); the42 parameter set (512/768/1024) matches the claimed category432. Input validation: public-key modulus check (encoded coefficients < q),44 ciphertext length/type checks, secret-key hash consistency (FIPS 20345 §7.2/§7.3 input checking)463. Encapsulation: m sampled from an approved RBG, K derived exactly per47 spec, no K exposure before ciphertext output484. Decapsulation and implicit rejection: re-encrypt and compare; on49 mismatch return K-bar = J(z || c) with NO observable difference from50 success (no error return, no timing/branch difference, no logging)515. Compression/rounding: Compress/Decompress rounding per spec; off-by-one52 rounding changes failure probability and interop536. Failure-oracle resistance: nothing (timing, errors, retries, metrics)54 distinguishes implicit rejection from success across many queries557. State and key lifecycle: z randomness quality, secret-key zeroization,56 no seed reuse across keypairs5758## Workflow5960### Phase 1: Version and parameter mapping6162- Read `references/pqc-kem-checklist.md`63- Pin the spec version and parameter sets; queue `spec-delta-checker` if64 the code claims FIPS 203 conformance6566### Phase 2: Decapsulation review6768- Execute `workflows/kem-decapsulation-review.md`6970### Phase 3: Pattern hunt7172- Read `references/finding-patterns.md`73- Prioritize explicit-failure decapsulation, missing modulus checks, and74 round-3/FIPS derivation mixing7576### Phase 4: Handoff7778- Send surviving findings to `crypto-fp-check`79- Cross-route parameter/noise design questions to `lattice-auditor` and80 timing measurement to `side-channel-auditor`8182## Output Contract8384Produce a KEM handoff that includes:8586- `kem_family_and_parameter_set`87- `encapsulation_or_decapsulation_path`88- `failure_oracle_invariant`89- `evidence`90- `disposition` (one of `verified`, `false_positive`, `unverified`,91 `observation`, `residual_risk`)92- `next_route`9394## Reference Index9596- [references/pqc-kem-checklist.md](references/pqc-kem-checklist.md)97- [references/finding-patterns.md](references/finding-patterns.md)98- [references/spec-sources.md](references/spec-sources.md)99- [workflows/kem-decapsulation-review.md](workflows/kem-decapsulation-review.md)