Home/Documentation/Design Decisions & Open Items
Design decisions & open items
Every place the specification was silent and the implementation had to decide — pinned here with its status — plus the defects the review process found and fixed, and the questions that remain genuinely open. Nothing in this register is quietly resolved.
The decision register
When a specification lists fields but not a byte layout, or says "derive" without a formula, an implementation must choose. NIRVQ records each such choice as a numbered decision, so a second implementation — and the independent reviewer — can see exactly where the spec ends and the implementation begins.
| ID | Decision | Status |
|---|---|---|
| D-01 | nonce_w derivation. The spec says "derive nonce_w" with no formula. The implementation uses HKDF-Expand(PRK, frame("NIRVQ-COMB-v1", "NONCE-W", header_hash), 12), pinned by the KAT vectors | PINNED — NEEDS SPEC-OWNER CONFIRMATION |
| D-02 | Wire layout. The proposal lists the envelope's fields, not their byte order. The canonical layout in the reference implementation is the de-facto wire format until the spec adopts one | PINNED — IMPLEMENTATION LAYOUT |
| D-03 | Body AEAD. AES-256-GCM for all profiles in the reference build. Per-profile ChaCha20-Poly1305 is not implemented | CHACHA20-POLY1305 ABSENT |
| D-05 | Burned-epoch behaviour. After burn, decapsulation returns a pseudorandom secret from a tombstone PRF keyed by a per-epoch burn marker and the ciphertext — so a burned epoch is indistinguishable from a cryptographic failure | PINNED — IMPLEMENTED |
| D-06 / D-20 | Decapsulation budget validity. liboqs exposes no validity signal for a well-formed invalid ciphertext, so the 1,000-per-epoch budget counter cannot operate on real KEMs (budget_operable = False). The FO re-encryption validity check that would fix this has a hook in the code; its ML-KEM limb has landed and its HQC limb has landed and is wired (fix wave, Dec 6, 2026; HQC fork ACCEPTED) — the budget is operable for both slots on real KEMs | LANDED — BOTH LIMBS WIRED |
| D-08 | TEST-KEM backend. Preserves production ciphertext lengths (1,088 B / 8,978 B), key lengths, 32-byte shared secrets, per-slot independence, and implicit rejection. It preserves no hardness — breaking it is trivial by construction and says nothing about the real KEMs | PINNED — EXPLICIT SELECTION ONLY |
| D-14 | Secret erasure. Secrets are held in bytearray where feasible and zeroed on every exit path, but CPython bytes are immutable and library-internal copies cannot be erased from user code. Erasure is best-effort and is never claimed as provable | PINNED — BEST-EFFORT, DISCLOSED |
| D-17 | HQC key size. NIRVQ implements HQC-192 under the HQC team specification dated 2025-08-22 — not v5.1 — via liboqs 0.16.0, pinned exactly. The key service stores the full 4,602-byte expanded liboqs HQC-3 secret key per HQC key; the v5.1 normative dk is the 32-byte seed_KEM alone, and the 32-byte form is refused at import on the real backend — there is no migration code to the compressed form and no decision to build any. The secret key never enters an envelope or the KDF, so only key-service storage is affected. The migration decision belongs to the Chief Cryptographer (VACANT); G-7 / M-2B stay OPEN until liboqs 0.17.0 stable | CLARIFIED — MIGRATION OPEN |
Decision-review wave — 15/15 ruled, 0 open (Dec 6, 2026)
Under the founder's blanket approval of Dec 6, 2026 ("run sub agents to review it and use their decision … do what you think is best, do not wait for me for the approval, all approved, just work as per proposal"), a decision-review wave ruled on every open decision: 15/15 ruled, 0 open. Eleven fixes landed with regression tests. The wave made no full-suite run — Run 10, the latest full suite on the post-fix tree, has now landed: 6 failed / 2,509 passed / 1 skipped / 26 xfailed in 1,916.75s; coverage line 94.34% / branch 90.14% (M-1 PASS, fourth measured pass in a row). Run 10 is NOT green — ONLY the 6 by-design CI tests fail (B2/B8/B9); see Codebase, Build & Tests. Run 9, the previous full suite, was 9 failed / 2,265 passed / 1 skipped / 26 xfailed in 2,793.82s; coverage line 90.77% / branch 85.99% (M-1 PASS, third measured pass in a row). Run 8, the first full suite on the post-decision tree, was 30 failed / 2,092 passed / 1 skipped / 1 xfailed in 2,172.01s; coverage line 92.59% / branch 88.34% (M-1 PASS, second measured pass in a row). Excluded from the delegation, and still open: reviewer contact of any kind (outreach prepared only, nothing sent), the G5 founder sign-off, and license counsel review.
The fix-review-25 decision IDs D-01..D-08 below are NOT the build's D-01..D-08 in docs/DECISIONS.md (nonce_w, wire format, …). They collide by name; the wave IDs are used here because the fix-review reports, repro tests, and Run 7 triage all reference them. The appendix in docs/DECISIONS.md states the collision explicitly.
| ID | Decision | Status |
|---|---|---|
| D-01 * | M1 contract. Duplicate epoch creates stay idempotent — repeat POST /epochs returns 201 with the stored record ([201, 201]), not 400/409. No API change; the shipped behaviour already implements it. Proposal basis: Ch. 2A (NORMATIVE), pp. 15–18, line 304 — "an epoch ID MUST NOT be reused for a different key" — concerns key material, not status codes | RULED — FIXED (TESTS + DOCS) |
| D-03 * | Demo / watermark repair. Sidecar deletion in the demo reset ONLY; the watermark is NOT rescoped. No store.py change — the refusal is correct FS-02 behaviour. Proposal basis: the demo must be independently re-runnable (Q2, Ch. 1A p. 11 line 206; G-LC-7, pp. 45–46 line 951) | RULED — FIXED (DEMO RESET + TESTS) |
| D-04 * | FR-ABS-01 validator. Drop batch_seq from the required keys in _validate_pool_meta; cap_bytes and total_generated stay REQUIRED. The F6 fallback derivation is live code again | RULED — FIXED |
| D-05 * | FR-EH-01. logger.propagate = False at module level in audit_log.py, plus narrowing of the no-log-leakage test from a zero-record assertion to a content assertion. Proposal basis: Ch. 2A, line 312 — every opening failure returns ERR-OPEN-FAILED and nothing else, including in the log | RULED — FIXED |
| D-06 * | Checker kind. The auto-wired test-backend checker carries kind == "test-backend" (same attribute pattern as the FO checker's kind == "fo-mlkem"). Reordering the wiring was rejected. No counting behaviour touched | RULED — FIXED |
| D-07 * | Header-hash convention. PREDECESSOR wins: in a rewrap entry, header_hash is the predecessor envelope's header hash, and the v2 attestation's predecessor_header_hash binds that same value. Proposal basis: Ch. 34 §34.3.1 — a migration event's own hash field refers to the envelope being migrated from | RULED — FIXED |
| D-08 * | FR-3 repair. The post-commit _passport_append now runs after the try/except, outside the rollback scope. An append fault still propagates, but the committed, verified migration stands, so the old epoch burns. Proposal basis: §34.3.2 — only a completed, verified re-wrap creates a migration event, and this rewrap did complete and was verified before the commit | RULED — FIXED |
| F3 | Burn-on-framing-failure (Ch. 35 §35.4.1). MANDATE — burn on identifiable framing failure. §35.4.1 is explicit three times over (consumption paragraph, §35.4.2 listing "framing error" as a burn trigger, §35.4.3). Step (1) governs only the unidentifiable case: where no trustworthy pad_range_id exists there is nothing to burn. Finding to the spec owner: the mandate burns a pad on an unauthenticated failure — the spec already discloses it (§35.4.3, mitigation = replication) | RULED — FIXED (GAP CLOSED) |
| CC-A2 | Decap-budget quarantine lifecycle. Operator-reviewed un-quarantine with attestation; NO automatic expiry. A named reviewer + reason are required; healthy and burned epochs are refused; the tripwire re-arms from 0. Garbage opens DO burn budget when parseable; unparseable envelopes burn nothing. Proposal basis: Ch. 2A §28.6.5 — "Chief Cryptographer paged; Passport-visible anomaly event written" is a human event, not a timer | RULED — FIXED |
| OQ-01 | Backward rotation. FORBIDDEN — target epoch must exceed all predecessor epochs (monotonicity guard in rewrap() and verify_successor()). Proposal basis: Ch. 30 §30.6.3 Stage 1 verifies "epoch monotonicity" for successor keys; §30.7.1 moves epochs one-way only | RULED — FIXED |
| ACSP gate | ACSP gate. Carry the failing gate as accepted residual R-ACSP-1; gate NOT PASSED under the proposal's p. 27 criteria (S1 FAIL, S2 FAIL). No re-scoped criterion adopted — redefining the criterion after failure would be a waiver, and only the proposal coordinator (Patch 6) can amend the criteria | RULED — ACCEPTED RESIDUAL, GATE NOT PASSED |
| Canary p | Canary fraction. p = 0.05 per profile, VAULT + VAULT-FEDERAL only (CORE refused). The provisional constant becomes a commitment; no code change (value already 0.05). Detection is exactly 1−(1−p)^k; overhead ~5% | RULED — DECIDED (NO CODE CHANGE) |
| HQC FO | HQC FO checker. Fork liboqs for the HQC limb, as a follow-up engineering workstream. The fork is NOT built in this wave and must NOT be built against a liboqs release candidate. The HQC limb stays Absent until the fork lands, passes its KAT gate, and is wired — never claim a full FO check. Proposal basis: Ch. 28 §28.6.3 counting rule is per-presentation and per-slot — no basis for permanently exempting the HQC slot. Update (Dec 6, 2026, fix wave): the fork is ACCEPTED and the limb is landed and wired at the production call sites — the budget is operable for both slots; G-7/M-2B still open. | ACCEPTED + WIRED (FIX WAVE) |
| THR-1 | THR-1 date. Two different decisions: THR-1 is M22 (Sep 2029) — Hardened Build exit + 6 months; M7 (Jun 2028) governs P1-1 / Milestone 2.0. Patch 5's OPEN is superseded. Basis: Ch. 44 deliverables table gives the M7 decision its own identifier and content; THR-1 is defined only in Ch. 30 §30.5.3 | RULED |
| TR-01 / 02 / 03 / 05 / 07 / 08 / 12 | Threat residuals. TR-01: accepted residual + read-only serve guardrail SHIPPED (serve --read-only refuses mutating ops with 403). TR-02 / TR-03 / TR-05: accepted residuals; passphrase-KEK SPECIFIED, not adopted. TR-07: RESOLVED BY G6 (the Passport master key IS in G6's in-memory-only set; the audit file's "BLOCKED" label was stale). TR-08: accepted residual / out of scope (no per-object ACL; per-caller identity is the dependency). TR-12: accepted residual; process separation is the in-build step | RULED — 1 GUARDRAIL SHIPPED, REST ACCEPTED RESIDUALS |
| H1 | Funded public canary programme. NOT ADOPTED at this time. C13 stays High, the challenges distribution stays 6/0/7/2, and nothing is spent. Basis: App. A §A.12 routes adoption through a board-level budget decision; ~$215,400 is unbudgeted against canonical totals already short on a GA-gating line | RULED — NOT ADOPTED |
| Outreach | G-COMB / G-1 engagement package. Verified and fixed where stale; PREP ONLY — nothing sent, nobody contacted. The package is ready to send once the founder supplies the fee, dates, funder/design-partner list, and pairing choice | RULED — PREP ONLY |
* Fix-review-25 wave IDs — not the build's D-01..D-08 above. See the collision note.
Review context for the rulings above. Deep-dive-25 is complete (Phase A+B): 285 findings, 241 VERIFIED, 0 Critical, 21 unique Highs. The fix-review wave found 68 introduced bugs, 61 fixed; the 7 blocked ones are now fixed via this decision wave. Re-verification round 2: 0 Highs reproduce (lifecycle 45/45, governance 15/16 + 1 adjudicated F-G2 residual). Run 10 (final full suite, on the post-fix tree): 6 failed / 2,509 passed / 1 skipped / 26 xfailed in 1,916.75s; coverage line 94.34% (13,546/14,359) / branch 90.14% (4,799/5,324) — M-1 thresholds (≥90% line / ≥80% branch) BOTH MET, the fourth measured M-1 pass in a row. Run 10 is NOT green: ONLY the 6 by-design CI tests fail (B2/B8/B9). The previous final suite, Run 9, was 9 failed / 2,265 passed / 1 skipped / 26 xfailed in 2,793.82s; coverage line 90.77% (13,015/14,339) / branch 85.99% (4,571/5,316) — the third measured M-1 pass; Run 8 was 30 failed / 2,092 passed / 1 skipped / 1 xfailed in 2,172.01s; coverage line 92.59% (11,534/12,457) / branch 88.34% (4,044/4,578) — the second measured M-1 pass; Run 7 was 20 failed / 2,064 passed / 1 skipped / 1 xfailed in 1,950.02s; coverage line 94.06% (11,181/11,887) / branch 89.64% (3,910/4,362) — the first measured M-1 pass. All 20 Run 7 failures were attributed: 12 blocked on founder decisions (now fixed via this wave), 6 by-design CI (B2/B8/B9), 2 known ABS-09 order-dependent canary interactions; 0 new regressions.
The register above records choices. This section records mistakes — each found by the programme's own review machinery, each fixed as a specification or implementation change, each still written down here because a sealing system that hides its defect history cannot be trusted with fifty-year archives.
| Finding | What was wrong | Resolution |
|---|---|---|
| RT08 D-01 | Circular AAD. The envelope's authenticated data depended on itself — unimplementable as specified | Fixed as a spec change: body_digest moved out of the canonical header; body AAD is the framed object_id only |
| RT08 D-02 | Re-wrap impossible as specified. The original construction could not re-wrap a header without the body | Fixed as a spec change: header-only re-wrap with the DEK re-wrapped under the new KEK |
| RT08 D-03 | Successor verification undefined. Nothing proved a re-wrapped envelope legitimately succeeded its predecessor | Fixed: the normative four-step successor verification (see Key Service & Lifecycle) |
| RT08 D-04 | Unauthenticated Passport stub. The stub sat outside the authenticated header and could be swapped | Fixed: the stub is inside the canonical header, covered by the tag |
| LC-2 | Re-wrap decrypted the body. The first implementation of re-wrap decrypted the predecessor body during migration — defeating the point of header-only re-wrap, reproduced 1,000/1,000 | Fixed in the build programme: re-wrap is header-only, with regression tests. This is the class of flaw the whole evidence discipline exists to catch |
| A-EXT | The anchor assumption was implicit. AND-survival's strongest claim quietly depended on the anchor not being extractable from combiner output | Option A adopted: A-EXT is a formalised, named assumption — unendorsed until G-1. The proof drafts D-COMB-PROOF-1–3 exist; the oracle-reduction gap is recorded; D-COMB-PROOF-4/5 are outstanding |
Open items — recorded, not resolved
- THR-1 — RULED. THR-1 is M22 (Sep 2029) — Hardened Build exit + 6 months; M7 (Jun 2028) governs P1-1 / Milestone 2.0. Patch 5's OPEN is superseded by the Dec 6, 2026 decision-review ruling.
- M-2B — HQC specification version. liboqs 0.16.0 implements the 2025-08-22 HQC specification, not v5.1; v5.1 arrives with liboqs 0.17.0. The re-baseline is planned, not done.
- P-5 / P-10 / P-11 — final-issue blockers. Three proposal items still block final issue, including the claims auditor's independence (P-5): the auditor is named, the audit has not run, and independence is not yet established on the record.
- Reviewer engagement — VACANT. The independent cryptographer engagement (precondition to build funding) has researched candidates and prepared approach drafts. No one has been contacted or engaged, and no date is promised.
- H1 canary programme — NOT ADOPTED. The Dec 6, 2026 decision-review ruling: not adopted at this time. C13 stays High, the challenges distribution stays 6/0/7/2, and nothing is spent.
- Coverage — MEASURED. Run 10 (Dec 6, 2026): line 94.34% (13,546/14,359), branch 90.14% (4,799/5,324); M-1 thresholds (≥90% line / ≥80% branch) BOTH MET — the fourth measured M-1 pass in a row (Run 9: 90.77% / 85.99%; Run 8: 92.59% / 88.34%; Run 7: 94.06% / 89.64%). Full suite: 6 failed / 2,509 passed / 1 skipped / 26 xfailed in 1,916.75s. Run 10 is NOT green — ONLY the 6 by-design CI tests fail (see Codebase, Build & Tests).
Because the alternative — a specification that appears to have descended perfect — is the one thing a careful evaluator should never believe. Every entry above was found by the process working as designed: a red team rewarded for breaking the spec, a build programme that reproduced its own flaw a thousand times before fixing it, and patch rounds that record corrections in public. The register is the evidence that the process works.
