Provision 06 · cryptographic provenance

Integrity & provenance

At every publish of the corpus we compute a Merkle root over all decisions. The root is committed to the public repository and anchored on the Bitcoin blockchain via OpenTimestamps. Every single decision is thus cryptographically verifiable — even if opencaselaw.ch should one day no longer exist.

§01 Current root

§02 The leaf

What the root promises

For each decision, a leaf value is formed according to the following schema and SHA-256-hashed:

decision_id
cli:ch
ECLI
content_hash       (SHA-256 over regeste || full_text)
decision_date

The leaves are read into an RFC-6962 Merkle tree in alphabetical order by decision_id (same convention as Certificate Transparency). The root is 32 bytes (64 hex characters) and commits to every decision with this decision_id, this content_hash, these identifiers, on this date.

With the root and an inclusion proof path (log₂ N sibling hashes, ~20 for roughly 991k decisions) one can cryptographically prove that a given decision was part of the corpus — without trusting opencaselaw.ch.

§03 Verify

Verification path

You have a decision with decision_id, content_hash, cli:ch, ECLI, decision_date.
You form the leaf: decision_id\ncli:ch\nECLI\ncontent_hash\ndecision_date
You hash the leaf: SHA-256(0x00 || leaf_bytes)
You fetch the inclusion proof path for this decision at a given date.
You reconstruct the root: each step is a SHA-256(0x01 || left || right).
You compare the reconstructed root with docs/integrity/<date>.root in the Git repository.
Optional: you verify the OpenTimestamps .ots proof against the Bitcoin blockchain — the root is then deemed to have existed at a given point in time.

§04 Status

Roadmap

  • Live: weekly Merkle root + manifest as docs/integrity/<YYYY-MM-DD>.{root,json}.
  • Live: OpenTimestamps anchor via ots stamp; upgradable to a full Bitcoin anchor after ~1 Bitcoin block (1–6 h) (ots upgrade).
  • Live: GET /api/integrity/<decision_id> delivers the RFC-6962 inclusion proof path against the most recent root.
  • Optional: cross-anchoring to further timestamping services (Sigsum, RFC 3161 TSA).

Part of the Open Law Standards (provision 06 · provenance).

§05 Code

Reference implementation