Repository navigation
feat(spec)!: let a better sidecar outrank an appended trailer - #72
Merged
Merged
Conversation
A valid-CRC trailer proves nothing about which file it was sealed with, so another capture's proof appended to a trailer-stripped genuine file beside its genuine sidecar read tampered (frames not compared on a clip). §3.1 now has one rule, "A sidecar that does better", for the trailer (step 1) and the depth-0 manifest proof (step 4): both verdicts are computed over the same canonical bytes and outcomes ranked (authentic > verified clip > frames not compared > rest); the sidecar decides only when strictly higher, with the new label "trailer copy differs" (or "manifest copy differs") and proof_source sidecar. Ties keep the file's proof; ceilings are never ranked. Nested, corrupted and unsupported footers are unchanged; an appended broken footer is recorded as open in the threat model. Vectors 172-174 added, corpus 6.1.0 -> 6.2.0 (174 vectors), none moved. BREAKING CHANGE: §3.1 step 1 reading rule changed for verifiers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
§3.1 extends #71's rule to the trailer, as one rule (A sidecar that does better): when a sidecar differs from the proof the file carries — trailer at step 1, depth-0 manifest proof at step 4 — a verifier judges both over the same canonical bytes (file without trailer at step 1, whole file at step 4) and ranks outcomes: authentic > verified clip > frames not compared > everything else. The sidecar decides only when strictly higher; its verdict carries
trailer copy differs(new label) ormanifest copy differs,proof_sourcesidecar, and the active manifest's copy is compared with the sidecar. Tie → file's proof stands withsidecar differs. Ceilings never ranked.Unchanged: nested trailer (structural), CRC-failing / major≠1 footer (steps 2–3, nothing judged). An appended broken footer still accuses a stripped genuine file — recorded as open in the threat model. Byte-identical sidecar: no change.
Why
A valid-CRC trailer is no more authenticated as the file's than a manifest: anyone can append another capture's proof to a trailer-stripped genuine file and have it read tampered beside its genuine sidecar. Nothing is gained that deleting the trailer would not give.
Vectors (corpus 6.1.0 → 6.2.0, minor: none moved; reading rule breaking)
trailer copy differs, source sidecartrailer copy differsGenerated by
generate.ts, byte-stable. CI-equivalent run locally: typecheck, 263 tests, validate, manifest:check, conformance:check (174/174), generate:edge-cases — all green.🤖 Generated with Claude Code