Skip to content

feat(spec): let a better sidecar outrank a depth-0 manifest proof - #71

Merged
gregogalante merged 2 commits into
mainfrom
feat/c2pa-sidecar-precedence
Oct 3, 2026
Merged

gregogalante merged 2 commits into
mainfrom
feat/c2pa-sidecar-precedence

Conversation

@gregogalante

Copy link
Copy Markdown
Member

Breaking reading rule, corpus 6.0.0 → 6.1.0 (minor: 3 vectors added, none moved).

A C2PA manifest is unauthenticated to a vcap reader and sits outside JPEG canonical bytes. A foreign proof in a manifest added to a trailer-stripped genuine file with a genuine sidecar read tampered (false accusation). §3.1 step 4 now judges both proofs when they differ; the sidecar's verdict stands, with manifest copy differs and proof_source: sidecar, only when its outcome ranks strictly higher (authentic > verified clip > frames not compared > rest). Ties keep the manifest's proof (vector 127 unchanged). Ceilings are never ranked, so a stripped sidecar cannot hide a red ceiling. Nothing is gained that deleting the manifest would not give.

  • Reference verifier: carrier.ts returns the differing sidecar as an alternate; verify.ts ranks outcomes.
  • Vectors: 169 (JPEG, sidecar wins → authentic), 170 (JPEG, sidecar no better → depth-0 tampered stands), 171 (MP4 clip, frames not compared vs verified clip → sidecar wins). Minted with generate:c2pa --only 169,170,171.
  • VERSION, MANIFEST, conformance report and docs updated.
  • Clip timing (stts/ctts/mdhd/edit duration/audio esds) unbound for clips: no verifier-only rule closes it. Recorded as open (§11, threat model §5.1) with reviews/design-clip-timing.md proposing per-segment timing hashes in segments[] plus a signed media.timing root — no change to the segment message, no re-signing in sealers.
  • Open, not changed: a valid-CRC trailer appended to a stripped file with a genuine sidecar is the same shape (step 1).

Verifier must: when no footer and a sidecar differs from the depth-0 proof, judge both and pick the sidecar iff its outcome ranks strictly higher; label it manifest copy differs.

CI-equivalent run locally: typecheck, 260 tests, validate, manifest:check, conformance:check (171/171), edge cases; npm run generate byte-stable.

🤖 Generated with Claude Code

gregogalante and others added 2 commits October 3, 2026 15:34
A C2PA manifest is unauthenticated to a vcap reader and sits outside the
JPEG canonical bytes, so a foreign proof added beside a trailer-stripped
genuine file and its sidecar read tampered. §3.1 step 4 now judges both
when they differ and lets the sidecar decide when its outcome ranks
strictly higher (authentic > verified clip > frames not compared > rest),
with "manifest copy differs". Ties keep the manifest's proof; ceilings are
never ranked.

Vectors 169-171 added, corpus 6.0.0 -> 6.1.0 (171 vectors). Clip timing
gap recorded as open in §11 and the threat model, with a design note
proposing signed per-segment timing (no verifier-only fix exists).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cedence

# Conflicts:
#	CHANGELOG.md
#	spec/threat-model.md
@gregogalante
gregogalante merged commit 16a97f0 into main Oct 3, 2026
2 checks passed
@gregogalante
gregogalante deleted the feat/c2pa-sidecar-precedence branch October 3, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant