ProofSnap: Evidence Verification Guide
========================================================================
Evidence ID: cap_DC4vIuz8pm4FTxFA

************************************************************************
TEST PACKAGE, NOT FOR LEGAL USE
manifest.json records test_mode: true.
This package was made in test mode (a test key, or an account without
linked billing) and is marked as a test.
The checks below say only whether the package is intact; it is not
evidence. The scripts print the same warning next to their result.
************************************************************************

This package is self-contained. Everything needed to verify it is inside the
ZIP. Three ways to verify:

  A) Run the bundled script (from the package root)
       macOS / Linux:  bash verification/verify.sh
       Windows:        powershell -ExecutionPolicy Bypass -File verification\verify.ps1
     Each script ends in one of three verdicts: PASS (exit 0), FAIL (exit 1,
     a check ran and did not pass) or INCOMPLETE. INCOMPLETE is exit 2 when a
     check could not be run because a tool such as python or openssl is
     missing, which says nothing against the package, and exit 3 when the
     package does not carry what a check needs, or a check of the qualified
     electronic time stamp gave a WARNING.

  B) Verify online: drag the ZIP onto https://getproofsnap.com/verify/index.html

  C) Run the five steps below by hand. Step N here is step [N/5] in the
     scripts.

Do not rely on the scripts shipped inside a package as the only basis of
trust: a party who re-seals a package can also replace them. Run an
independent copy of the scripts, the commands in this guide, or the public
verifier as well.

------------------------------------------------------------------------
STEP 1: File integrity (SHA-256)
------------------------------------------------------------------------
manifest.json lists the SHA-256 hash of every file in the package except
manifest.json itself and the files made from it after it was written: the
signature manifest.sig, the public key publickey.pem and the timestamp files
(manifest.json.ots), which Steps 2 and 5 check instead. Recompute each hash and
compare. A mismatch or a missing file means the package was altered after
signing. A file that is present but NOT listed in the manifest is reported as
"NOT COVERED": it was not signed or timestamped, so treat it as unattested
rather than part of the sealed evidence.

  macOS/Linux:  shasum -a 256 <file>
  Windows:      Get-FileHash <file> -Algorithm SHA256

------------------------------------------------------------------------
STEP 2: Manifest signature (RSA + SHA-256)
------------------------------------------------------------------------
manifest.sig is a detached RSA signature over manifest.json, made with the
private key whose public half is publickey.pem. Verify:

  openssl dgst -sha256 -verify publickey.pem -signature manifest.sig manifest.json

"Verified OK" proves manifest.json (and therefore, via Step 1, every file it
lists) has not been altered since it was signed. The key is in this package, so
this shows internal coherence, not authorship. This package was sealed
without a qualified electronic time stamp, so what ties the manifest to a moment
in time is the OpenTimestamps proof in Step 5 (if present), as far as Step 5
finds it confirmed in a Bitcoin block.

------------------------------------------------------------------------
STEP 3: Forensic log
------------------------------------------------------------------------
forensic_log.json records the acquisition. In an API package it is flat
metadata (the manifest + RSA signature + timestamp integrity model), so there is
no operation hash-chain to recompute; integrity rests on Steps 1 and 2 and on
the timestamp steps (5) whose files the package carries.
The bundled scripts (verify.sh / verify.ps1, step 3) read the log, report which
model is present, and recompute a chain only when one is present.

------------------------------------------------------------------------
STEP 4: eIDAS RFC 3161 qualified electronic time stamp
------------------------------------------------------------------------
This package was sealed without a request for a qualified electronic time
stamp, so it has no manifest.json.tsr; the scripts report step 4 as not
present.

------------------------------------------------------------------------
STEP 5: Bitcoin OpenTimestamps (if present)
------------------------------------------------------------------------
At sealing, manifest.json.ots is pending: it holds the commitments of the
OpenTimestamps calendars to the SHA-256 of manifest.json. Once the commitment
is confirmed in a Bitcoin block, usually within hours, the proof shows that
manifest.json existed no later than the time of that block. Verify with the
OpenTimestamps client (it completes a pending proof from the calendars):

  ots verify manifest.json.ots -f manifest.json

After Bitcoin confirmation, ProofSnap issues an upgraded proof for the same
manifest hash (GET /v1/captures/{capture_id}, timestamps.bitcoin_ots.
upgraded_proof_url; in a matter export it is captures/<capture_id>.upgraded.ots).
Save it next to manifest.json as manifest.json.upgraded.ots: verify.sh and
verify.ps1 then check it too. It is not listed in manifest.json and does not
need to be: it commits to the SHA-256 of manifest.json and carries the Bitcoin
block attestation, so it proves itself, and the OpenTimestamps client verifies
it without contacting any calendar:

  ots verify manifest.json.upgraded.ots -f manifest.json

------------------------------------------------------------------------
C2PA provenance
------------------------------------------------------------------------
screenshot.jpeg carries an embedded C2PA manifest (exported as c2pa.json).
Re-validate at https://contentcredentials.org/verify or with c2patool. Note:
a "signing certificate untrusted" result is expected until ProofSnap's C2PA
certificate is added to the CAI/Adobe trust list; it does not affect the RSA
signature, timestamps, or forensic log above.
========================================================================
