proof-aware-crypto-tooling-.../docs
mrwulf ddbb5a4fd8 fix(verify_consistency): restore RFC 9162 Step-7 terminal sn==0 check
The deployed consistency verifier implemented the RFC 9162 2.1.4.2
bit-navigation loop but its final return checked only the two
reconstructed roots, omitting the terminal condition that the new-size
navigation counter reach zero. That condition couples the consumed proof
length to the claimed tree sizes; without it, a valid proof for one
transition verifies under a lied (power-of-two) old size. Flagship: a
valid 2->3 proof is accepted under the false claim 1->3 with the size-2
root.

Fix: add `and sn == 0` to the final return.

This is the corpus's Known Gap 14 (3,867 deployed-accepts-only cases in a
pinned 73,573-case family, recorded in public log entry 13). It was
found by the project's own differential harness; a post-appeal review
round added a faithful RFC oracle as a third comparison, which showed
the deployed verifier — not the mechanized model — was the one deviating
from RFC 9162, and traced it to the missing terminal check.

Scope: verify_consistency's only production caller is the consumer-side
pin store, reached only behind a verified head signature. Generation is
RFC-correct and unaffected; the live provider service does not run this
verifier; the published standalone verify.py has no consistency verifier.
An empirical search found 0 realizable pin-advance poisons against an
honestly pinned consumer, consistent with Known Gap 14's non-claim.

Verification:
- New fail-first three-way regression test
  test_consistency_lied_size_three_way_agreement (deployed / recursive
  ConsRec model / independent faithful RFC 9162 transliteration) over the
  honest AND lied-size families; fails pre-fix, passes post-fix.
- Historical differential tests (164,479 inclusion; 164,224 consistency)
  unchanged — the fix rejects nothing honest.
- Full suite: 145 passed, 0 failed.

Public log entry 13, the attested accumulator commit, and the IACR
submission PDF are all unchanged. Vulnerable state tagged
vulnerable/sn0-consistency-fd2f6ba. See
docs/security-2026-07-23-consistency-terminal-check.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 18:34:23 +02:00
..
agent-native.md warden: agent-native field research + design decisions (AX/MCP/A2A/AP2/x402/ERC-8004) 2026-07-06 23:20:56 +02:00
cockpit.md docs: coherence + portability audit — clean-clone bootstrap proven 2026-07-21 18:00:08 +02:00
products.md docs: coherence + portability audit — clean-clone bootstrap proven 2026-07-21 18:00:08 +02:00
runbook-latch.md warden hardening round: policy engine, ledger rotation, MCP UX, treasury LIVE, ops docs 2026-07-07 13:38:42 +02:00
security-2026-07-23-consistency-terminal-check.md fix(verify_consistency): restore RFC 9162 Step-7 terminal sn==0 check 2026-07-23 18:34:23 +02:00
threat-model.md docs: coherence + portability audit — clean-clone bootstrap proven 2026-07-21 18:00:08 +02:00
warden-lab-manual.md docs: coherence + portability audit — clean-clone bootstrap proven 2026-07-21 18:00:08 +02:00
warden-lineup.html lineup: treasury LIVE, 100 tests 2026-07-07 13:39:27 +02:00