Verifier usage and export formats.
The verifier checks export integrity, validates message chains and signatures (best-effort), and can decrypt v2 messages. It can also decrypt file attachments on demand (download only when requested).
core51-evidence-verifier-src.zip
Tip: the verifier prints its version as the first line at startup.
python -m pip install -r requirements.txt python verify_evidence_zip.py --help
python3 -m venv .venv . .venv/bin/activate pip install -r requirements.txt python verify_evidence_zip.py --help
python verify_evidence_zip.py chat.zip
Checks manifest + sha256, parses messages, validates hash-chain. Signature verification may be WARN if historical keys are missing or if legacy fields were not exported.
python verify_evidence_zip.py --decrypt chat_v2.zip
Enter the encryption private key (base64, 32 bytes). Decryption is best-effort: only messages with stored envelopes can be decrypted.
python verify_evidence_zip.py --decrypt --print-decrypted chat_v2.zip
Shows Core ID (public_id) when available. If the plaintext is an attachment message, the verifier prints ATTACHMENT_ID to copy/paste.
python verify_evidence_zip.py --decrypt --export-readable out_readable.zip chat_v2.zip
Creates a ZIP with report + transcript and includes the original input ZIP for reproducibility.
python verify_evidence_zip.py --decrypt chat_v2.zip \ --bearer-token "<JWT>" \ --fetch-attachment "<ATTACHMENT_ID>"
The verifier calls /api/attachments/<id> with Authorization: Bearer, downloads ciphertext from R2 via a presigned URL, verifies sha256, and decrypts locally.
Note: for tests the token is passed via CLI (visible in shell history). For production, we recommend reading it from stdin or an environment variable.
GET /api/chats/{chat_id}/wire-export.v2
GET /api/chats/{chat_id}/wire-export.v2.zip
v2 exports are required for decryption because they include key envelopes.