Skip to content

proofmark-jp/proofmark-verify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProofMark Evidence Pack — Independent Verifier

One command. Zero dependencies. Forever.

python verify.py evidence-pack.zip — that is the entire user manual.

This repository ships the last key of the ProofMark trust chain: a single Python script that can validate any ProofMark Evidence Pack on any operating system, using only the Python standard library and the ubiquitous openssl binary.

It exists for one reason: vendor lock-in is not a trust model. If proofmark.jp goes offline tomorrow, every Evidence Pack issued today must still be verifiable a decade from now. This script is how we keep that promise.


Why this exists

ProofMark certificates are built on three independently-auditable pieces:

Layer Standard Independently verifiable?
Content fingerprint SHA-256 (FIPS 180-4) ✅ — any SHA-256 implementation
Time anchor RFC 3161 Timestamp Token ✅ — openssl ts -verify
Optional provenance C2PA Content Credentials ✅ — c2patool / Adobe Inspect

Every one of those is an open standard. ProofMark adds workflow, UX and an Evidence Pack format on top — but the cryptographic core is something you can re-validate without us, without a network, without a SaaS subscription. This repository proves it.


What gets verified

When you run python verify.py evidence-pack.zip the tool will:

  1. Reject unsafe archives — Zip-Slip / symlink / absolute-path entries are denied before extraction.
  2. Check the pack layout — required entries (hash.txt, timestamp.tsr, metadata.json, CLIENT_LETTER.txt, verify.sh, verify.py) must all be present. The presence of timestamp.MISSING.txt is a hard fail (TSA was unreachable when the pack was generated).
  3. Read metadata.json — surfaces certificate_id, issued_at and schema fingerprint.
  4. Hash the original asset — when an original/ directory is bundled, the file inside is SHA-256-hashed and compared to hash.txt. When the pack is a Private Proof (no original bundled) the comparison is skipped — by design, not by accident.
  5. Detect optional artifactsc2pa.json, chain.json, copyright_notice.pdf, FreeTSA root and TSA certificates are reported when present.
  6. Verify the RFC 3161 timestamp — invokes openssl ts -verify -digest <hash> -in timestamp.tsr -CAfile … -untrusted … against the bundled TSA / CA certificates. Output is parsed for Verification: OK.
  7. Print a deterministic summary — or, with --json, a stable machine-readable report suitable for CI and audit pipelines.

The verifier does not make any network call. Ever.


Prerequisites

Tool Required version Why
Python 3.8 or newer standard-library pathlib, dataclasses, subprocess
OpenSSL 1.1.1 or newer (3.x preferred) RFC 3161 ts -verify subcommand

OpenSSL is optional for layout + hash checks but required to validate the timestamp itself. Install it via:

No pip install step. No virtualenv. No requirements.txt.


Usage

# Human-readable report (default)
python verify.py path/to/evidence-pack.zip

# Fail loudly if openssl is missing — recommended for CI / audit pipelines
python verify.py path/to/evidence-pack.zip --require-openssl

# Emit a stable JSON document for downstream tooling
python verify.py path/to/evidence-pack.zip --json

Sample successful output

────────────────────────────────────────────────────────────
 ProofMark Evidence Pack Verifier v1.0.0
 Verifying: pm-evidence-2026-04-23.zip
────────────────────────────────────────────────────────────
▶ Pack layout
  ✓ required entries present (hash.txt, timestamp.tsr, metadata.json, …)
▶ metadata.json
  certificate_id : pm_2026_0001a2b3
  issued_at      : 2026-04-23T05:14:08Z
  ✓ metadata.json read
▶ Hash verification (SHA-256)
  declared hash : 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
  asset         : original/cover.png
  computed hash : 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
  ✓ hash matches declared value
▶ Optional artifacts
  ✓ c2pa.json detected (generator: ProofMark/1.0)
  ✓ freetsa-ca.crt bundled
  ✓ freetsa-tsa.crt bundled
▶ RFC3161 timestamp verification (OpenSSL)
  running: openssl ts -verify -digest <hash> -in timestamp.tsr -CAfile … -untrusted …
  ✓ RFC3161 timestamp signature verifies (Verification: OK)

────────────────────────────────────────────────────────────
 Summary
────────────────────────────────────────────────────────────
  [PASS] layout
  [PASS] metadata
  [PASS] hash  — match
  [PASS] optional
  [PASS] timestamp  — openssl ts -verify OK

  ✅ Evidence Pack VERIFIED

Exit codes

Code Meaning
0 All checks passed
1 One or more verification checks failed
2 Usage error (missing file, interrupted)
3 Archive integrity / layout failure
4 --require-openssl set but binary not found

Evidence Pack v1 — file layout

evidence-pack.zip
├── hash.txt                  (required, SHA-256 hex of the asset)
├── timestamp.tsr             (required, RFC 3161 Timestamp Token)
├── CLIENT_LETTER.txt         (required, plain-language explanation)
├── metadata.json             (required, machine-readable)
├── verify.sh                 (required, POSIX shell verifier)
├── verify.py                 (required, this script — copied in for offline use)
├── c2pa.json                 (optional, C2PA manifest excerpt)
├── chain.json                (optional, Chain-of-Evidence steps)
├── copyright_notice.pdf      (optional, human-friendly cover sheet)
├── freetsa-ca.crt            (optional, FreeTSA root certificate)
├── freetsa-tsa.crt           (optional, FreeTSA TSA certificate)
└── original/                 (optional, omitted in Private Proof mode)
    └── <your-asset.ext>

Whitelist rule: the verifier only treats files inside the original/ directory as the original asset. Nothing else can be mistaken for it — by design.


Trust ecosystem positioning

ProofMark sits next to — not on top of — three industry standards:

  • RFC 3161 (IETF) — the timestamp signature itself. We do not invent crypto; we wrap a well-understood standard.
  • C2PA / Content Credentials (c2pa.org) — when an Evidence Pack carries c2pa.json, the verifier surfaces it so you can re-check provenance with c2patool or Adobe Inspect.
  • FreeTSA / Commercial TSA — the public FreeTSA root is shipped for self-contained verification today; the Trust Center roadmap documents the migration to a commercial RFC 3161 TSA when the documented preconditions are met.

If any one of these layers changes, your pack still verifies against the others. This is the defence-in-depth property B2B legal and accounting auditors actually buy.


Security model

  • No network access. The script never opens a socket. All inputs are read from the supplied ZIP file and the local filesystem.
  • No telemetry. No version pings, no analytics, no opt-out toggle — because there is nothing to opt out of.
  • Safe extraction. Symlinks, absolute paths and .. traversal are rejected before any byte is written to disk.
  • Hardened temp files. Extraction happens inside a tempfile.TemporaryDirectory, so all artifacts are removed even on abnormal exit, and on Windows where deleting open handles is denied.
  • OpenSSL invocation is digest-based. We pass -digest <hex> rather than the file path, so the verifier works for Private Proof packs that intentionally omit the original asset.

For B2B legal & accounting teams

This script is intended to be run by your auditors without our help:

  • Source is small (one file, ~600 lines), readable, and MIT licensed.
  • Behaviour is deterministic; the JSON output is suitable for evidence capture in audit workpapers.
  • All cryptographic checks reduce to two well-known primitives: SHA-256 and RFC 3161. Both are public, both are reviewable.
  • A signed copy of this verifier is included inside every Evidence Pack (verify.py), so the version that was current when the pack was generated travels with the pack.

In other words: even if ProofMark Inc. ceases to exist, the proofs do not. That is the point of the entire repository.


Project layout

.
├── verify.py                 — the verifier (this is the artifact)
├── README.md                 — what you are reading
└── .github/
    └── workflows/
        └── lint.yml          — CI: byte-compile verify.py on every push

Contributing

Issues and pull requests are welcome at github.com/proofmark-jp/verify.

Hard requirements for any PR:

  1. No new runtime dependencies. Standard library only.
  2. No network calls. Ever.
  3. Cross-platform. Windows / macOS / Linux must all keep passing.
  4. Backwards compatible. Old Evidence Packs must keep verifying.

License

MIT License. See LICENSE — or, in short:

Copyright (c) 2026 ProofMark

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.

Releases

No releases published

Packages

 
 
 

Contributors

Languages