NA-0670 (D-1297): closeout — constant-time bearer-token comparison shipped (audit C-2) - #1633
Merged
Conversation
…ipped (audit C-2); the implementation PR's green IS evidence Spine governance closeout for NA-0670. The qsl-server implementation (satellite decision D-0014) merged as 5235c2bf (PR #64) over base b4f86a3c, replacing auth_ok's short-circuiting `provided == token` with ct_eq_secret (SHA-256 both sides -> fixed 32-byte digest -> the client's hs_ct_eq_32 XOR-accumulate fold, ENG-0003). Because that PR changed src/, the required `rust` check RAN and went green on the reviewed commit 82df531 -- real evidence for the behavioural half; the constant-time property itself is structural and read-verified, not measured. Records D-1297; a TRACEABILITY row; a journal entry; NEXT_ACTIONS STATE -> READY=NONE | HIGHEST_NA=0670 | HIGHEST_D=1297 (NA-0670 flipped DONE); the as-built and testplan. Four IMPROVEMENT_LEDGER filings, none fixed: ENG-0063 (precompute the token digest), ENG-0064 (two-repo seat CARGO_TARGET_DIR leak), ENG-0065 (flaky log-capture test sync defect), ENG-0066 (qsl-server TRACEABILITY back-fill). The 2026-07-22 audit's C-2 is closed; no audit HIGHs remain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals: G4
What
Spine governance closeout for NA-0670 (D606). The qsl-server implementation (satellite decision D-0014) merged as
5235c2bf(PR #64, QuantumShieldLabs/qsl-server#64) over baseb4f86a3c, replacingauth_ok's short-circuitingprovided == token(str::eq, a remote timing oracle on the network-exposed shared bearer token) withct_eq_secret— SHA-256 both sides to a fixed 32-byte digest, then the client'shs_ct_eq_32XOR-accumulate fold (ENG-0003) over all 32 bytes, no data-dependent early return. Same idiom the file already uses for its other secret (route_key_for); hashing normalises both inputs to 32 bytes and closes the length leak for free. No dependency change (sha2already direct;subtledeliberately not added;Cargo.toml/Cargo.lockdiff empty); no wire/API/protocol/schema/env change.The 2026-07-22 independent audit's C-2 — the last unfixed HIGH, and the only one outside the spine — is now closed. No audit HIGHs remain.
Where the evidence is (and where it is NOT)
src/lib.rs, so its requiredrustcheck RAN and went green on the exact reviewed commit82df531(1m36s). That green is real evidence for the behavioural half (auth still accepts the right token, rejects wrong ones incl. the same-length case). The constant-time property itself is structural, read-verified, not measured — no timing proof run or claimed.docs_only=true(classify_ci_scopeover the diff), so its suites skip and its own green proves nothing about the fix. It ships governance records only — do not read this PR's CI as evidence for C-2; PR suite2: add reason_code to CHAINKEY_UNSET reject #64's is.Records
DECISIONS.md(D-1297);TRACEABILITY.md;docs/ops/ROLLING_OPERATIONS_JOURNAL.md;NEXT_ACTIONS.mdSTATE →READY=NONE | HIGHEST_NA=0670 | HIGHEST_D=1297(NA-0670 flipped DONE);docs/governance/evidence/NA-0670_as_built.md;tests/NA-0670_qsl_server_c2_constant_time_bearer_testplan.md.Queue helper verified:
READY_COUNT 0/ exit 2 (correct atREADY=NONE,--allow-nonready-countnot passed);LATEST_DECISION_ENTRY D-1297;DUPLICATE_COUNT 0.Four IMPROVEMENT_LEDGER filings — none fixed (recording, not a second fix)
Sha256::digest(token)atAppStateconstruction (removes the secret from the per-request path; erases the block-count offset). Refinement, ridesnew_with_auth*.CARGO_TARGET_DIRinto the qsl-server seat, so the satellite built into the spine's target dir and its registered per-repo cache went unused. First real exercise of the NA-0667 two-repo seat path; worked around with an explicit pin,qworkuntouched.tests::logs_do_not_contain_raw_channel) surfaced, not caused, by the required new test: 0/20 pristine vs 8/25 at 6 cores, 0/30 atRUST_TEST_THREADS=2 and =4 so CI's 2-vCPU runner is reliably green. The "always passes where merges are decided" class.TRACEABILITY.mdlapsed for three satellite lanes (D-0011/0012/0013 have no rows); only the NA-0670 row was added.Commit identity GH007 noreply, author and committer, trailers empty, verified on the object (WF-0029 per-commit override). The executor cannot self-promote — stopping at this open PR.
🤖 Generated with Claude Code