VSO · Practical verification guides

VeraSnap Verify SDK: a reproducible offline walkthrough

Run seven synthetic photo-proof cases with a pinned SDK, inspect partial verification and failures, and retain the full results.

What this walkthrough checks

Run the existing VeraSnap Verify SDK against seven published synthetic cases and save the full JSON, standard error and exit code for each. This is the photo-proof SDK, not the VCP trading-log SDK. The app, the server-side Verify SDK and the planned Capture SDK are different components.

Alpha, first-party implementation. This walkthrough does not establish production readiness, regulatory or insurance acceptance, independent security audit, VAP/CPP full conformance, or independent third-party reproduction. Experimental extensions and proposed repairs remain unadopted.

The samples use synthetic media bytes and public test keys, with stored RFC 3161 tokens originally obtained on 18 November 2026. They are not customer photos or evidence of an actual insurance event. The steps reuse those tokens offline; do not run tools/make_fixtures.py, which requests new timestamps. See the fixed fixture manifest.

Select the exact source, not just the package version

This guide pins the main-branch snapshot 66d1875b5977feacb755c3bb92c38d2f2ba39665, checked on 26 November 2026. It contains the post-release repeat-registration and Android attestation-path fixes. The README recommends the earlier implementation snapshot 4eaa3b73e049bf14dbff0dcea30cf18c627ee617; the selected main snapshot also includes subsequent documentation changes.

The historical v0.1.0 alpha release points to 0caa054b074b09524045b8ee948f63d450b5b7db and records 125 first-party tests. The README records 186 first-party tests for its later pinned implementation. Both code revisions still identify as package version 0.1.0; that string alone cannot identify the installed code. This guide neither replaces the tag/ZIP nor updates the historical result.

1. Start in a new directory and virtual environment

Use Git, Python 3.10 or later, and Bash on macOS/Linux (or a compatible shell in WSL). This walkthrough was actually checked on macOS with Python 3.14.3 and the dependency versions below; other environments were not re-executed for this page. Clone/download and package installation need network access. The seven verification commands below use local files and the SDK’s bundled TSA roots.

Run the following from a location where verasnap-sdk-guide does not already exist. Do not use a production registry, private keys or customer evidence.

git clone https://github.com/veritaschain/verasnap-verify-sdk.git verasnap-sdk-guide
cd verasnap-sdk-guide
git checkout --detach 66d1875b5977feacb755c3bb92c38d2f2ba39665
git rev-parse HEAD
python3 -m venv .venv
. .venv/bin/activate
python -m pip install "cryptography==50.0.2" "asn1crypto==1.5.1" "cbor2==6.3.0" .
verasnap-verify --version

git rev-parse HEAD must print 66d1875b5977feacb755c3bb92c38d2f2ba39665. The version command prints verasnap-verify 0.1.0; keep the commit as well. Continue in this same directory with the virtual environment active.

2. Record the environment and input hashes

The following creates a new guide-output directory and records the source commit, dependency versions and SHA-256 digests of the fixture inputs. If that directory already exists, keep it as the previous run and begin in a fresh clone; do not silently overwrite evidence.

mkdir guide-output
python - <<'PY'
from pathlib import Path
import hashlib, importlib.metadata, json, platform, subprocess
source = Path('tests/fixtures/scenarios')
files = [source/'manifest.json'] + sorted(source.rglob('proof.json')) + [source/'S28/proof.zip', source/'media/photo.jpg', source/'media/photo_edited.jpg']
record = {
    'commit': subprocess.check_output(['git', 'rev-parse', 'HEAD'], text=True).strip(),
    'python': platform.python_version(),
    'platform': platform.platform(),
    'dependencies': {p: importlib.metadata.version(p) for p in ('verasnap-verify', 'cryptography', 'asn1crypto', 'cbor2')},
    'input_sha256': {str(p): hashlib.sha256(p.read_bytes()).hexdigest() for p in files},
}
Path('guide-output/environment-and-inputs.json').write_text(json.dumps(record, indent=2)+'\n')
PY

Also save the complete installed dependency list:

python -m pip freeze > guide-output/pip-freeze.txt

This identifies the bytes used in this run. It does not authenticate the host or turn this execution into independent reproduction.

3. Register the public test key for this exercise only

The source’s scenario tests use a manually registered public fixture key. Reproduce that setup below. This is deliberately not Android Key Attestation or Apple App Attest enrollment. It is only a local trust configuration for testing result handling.

trial_key=$(python - <<'PY'
import json
from pathlib import Path
print(json.loads(Path('tests/fixtures/scenarios/manifest.json').read_text())['keys']['device_enrolled'])
PY
)
verasnap-verify keys --registry guide-output/test-keys.sqlite add \
  --public-key "$trial_key" --account fixture-only \
  --note 'Public synthetic fixture; manual registration, not device attestation' \
  > guide-output/test-key-fingerprint.txt
unset trial_key

The resulting signer_key check is passed / known_unattested, not known from hardware-attested enrollment. Never register an arbitrary key from a customer’s proof just to obtain a green result. Production enrollment requires a separate authenticated workflow, challenge/account binding and registry/revocation management described in the enrollment documentation. The public test private keys must never be reused for real signing.

4. Run seven cases and keep nonzero exits

These commands invoke the existing CLI; the shell helper only saves its output and exit code. Expected yellow and red results are not shell success. Do not use --allow-unknown-signer or weaken trust settings. The fixture source files are read, not edited.

run_case() {
  case_name=$1
  shift
  if verasnap-verify verify "$@" --json \
    > "guide-output/$case_name.json" 2> "guide-output/$case_name.stderr.txt"; then
    case_exit=0
  else
    case_exit=$?
  fi
  printf '%s\n' "$case_exit" > "guide-output/$case_name.exit.txt"
}
fixtures=tests/fixtures/scenarios
run_case S01 "$fixtures/S01/proof.json" --media "$fixtures/media/photo.jpg" --registry guide-output/test-keys.sqlite
run_case S02 "$fixtures/S02/proof.json" --media "$fixtures/media/photo.jpg"
run_case S03 "$fixtures/S03/proof.json" --media "$fixtures/media/photo_edited.jpg" --registry guide-output/test-keys.sqlite
run_case S27 "$fixtures/S27/proof.json" --media "$fixtures/media/photo.jpg" --registry guide-output/test-keys.sqlite
run_case S13 "$fixtures/S13/proof.json" --media "$fixtures/media/photo.jpg" --registry guide-output/test-keys.sqlite
run_case S20 "$fixtures/S20/proof.json" --registry guide-output/test-keys.sqlite
run_case S28 "$fixtures/S28/proof.zip" --registry guide-output/test-keys.sqlite

S01 is the fixture baseline; S02 omits the registry; S03 supplies a media file with one bit changed. S27 lacks the token in the internal proof format; S13 removes the timestamp section in the shareable format. S20 supplies no media, and S28 uses an Evidence Pack ZIP containing media and proof. These cases intentionally have different expected outcomes.

5. Compare the complete results with the expected outcomes

python - <<'PY'
from pathlib import Path
import json
for name in ('S01', 'S02', 'S03', 'S27', 'S13', 'S20', 'S28'):
    result = json.loads(Path(f'guide-output/{name}.json').read_text())
    code = Path(f'guide-output/{name}.exit.txt').read_text().strip()
    print(name, 'exit='+code, result['level'], result['status'], 'media_verified='+str(result['media_verified']).lower())
PY
CaseExitlevelstatusmedia_verifiedCheck to inspect
S010greenANCHOR_VERIFIEDtruesigner_key: passed / known_unattested
S021yellowPARTIALLY_VERIFIEDtruesigner_key: warning / unknown
S032redHASH_MISMATCHfalsemedia_hash: failed / mismatch
S271yellowPARTIALLY_VERIFIEDtruetimestamp: warning / missing_token
S132redERRORtruetimestamp: failed / missing
S200greenANCHOR_VERIFIEDfalsemedia_hash: skipped / not_provided
S280greenANCHOR_VERIFIEDtrueZIP: supplied media matched; manual test key

The local run recorded the following summary:

S01 exit=0 green ANCHOR_VERIFIED media_verified=true
S02 exit=1 yellow PARTIALLY_VERIFIED media_verified=true
S03 exit=2 red HASH_MISMATCH media_verified=false
S27 exit=1 yellow PARTIALLY_VERIFIED media_verified=true
S13 exit=2 red ERROR media_verified=true
S20 exit=0 green ANCHOR_VERIFIED media_verified=false
S28 exit=0 green ANCHOR_VERIFIED media_verified=true

Do not route claims using the color alone. S20 is green with media_verified=false because no media file was supplied; media_hash is skipped. S01/S28 use manual test-key trust, which does not demonstrate a genuine device or a person’s identity. In all these samples, attestation written inside the proof is info / stated, not a per-capture attestation that this SDK has verified.

S27 and S13 demonstrate why “timestamp missing” cannot be reduced to one generic status: the input format and missing field produce different named checks. Read checks[].id/status/code, media_verified, the signer and the verified timestamp_time. A green result is not proof that a scene is true or that an insurer should pay. Result-field reference.

If your result differs

Keep the JSON, stderr and exit files before investigating. Exit 0, 1 and 2 mean green, yellow and red for this CLI; they are not the exit-code contracts of the VAP research verifier or VCP SDK. The CLI documents exit 3 for input errors, but an unexpected traceback or non-JSON output must be recorded as an execution problem, not reclassified as a yellow verification result.

Check the full source commit, dependency list, fixture hashes and registry path. An already-registered test key is rejected rather than overwritten; start a separate run directory/clone. Do not modify expected results, add arbitrary trust roots or replace a failed sample to make a run look successful. Preserve environment differences and seek technical review when needed.

What to retain and what this local run establishes

Keep the source commit, environment-and-inputs.json, pip-freeze.txt, the test registry/fingerprint, each result JSON, stderr and exit file. Results can contain key fingerprints, account references and device statements; review them before sharing. Use a working copy when preparing a public report and keep the original separately.

On 26 November 2026 the seven CLI outcomes above matched the published scenario expectations; the unchanged SDK test suite also completed with 186 passed in the same isolated virtual environment. This is a first-party local check of the selected snapshot and stored fixtures, not a new independent timestamp issuance, hardware enrollment test, production deployment or independent third-party reproduction. The source implementation, fixed release and historical test records were not changed.

The SDK does not check TSA CRL/OCSP revocation, prove the physical scene, identify the photographer, or verify per-capture attestation. Capture time is a device statement; a verified timestamp binds evidence to the token’s time, not absolute shooting-time truth. See Pinned SDK README · Result codes · Limitations.

Return to VeraSnap for enterprises and insurers · Compare the separate VCP SDK · Technical questions. Do not attach sensitive claim files or credentials to the first message.

Guide for staff receiving photo evidence · Current versions, distributions and known issues

Sources and reviewed revisions

These references identify the reviewed materials and revisions. Where execution results are reported, their source, environment and conditions are stated in the relevant section. Historical test records and fixed distributions are retained.