Skip to main content

Offline verifier for TrustNotch tamper-evident audit-log proofs.

Project description

trustnotch

Offline verifier for TrustNotch tamper-evident audit-log proofs (proof-format-v1).

Verify any proof bundle on your own machine — no database, no network, no dependence on the TrustNotch server. You supply the trusted keys; trustnotch checks the cryptography. If TrustNotch went away tomorrow, every proof it ever issued would still be verifiable with this package alone.

Requires Python 3.12+. Apache-2.0 licensed.

Install

pip install trustnotch

Or run the CLI without installing it:

uvx trustnotch verify bundle.json

Command line

trustnotch verify [--keys PATH | --offline] [--json] BUNDLE
  • BUNDLE — path to a proof-bundle JSON file.
  • --keys PATH — verify signatures against your own pubkeys.json (default: the keys bundled with this package).
  • --offline — skip the receipt (signature) tier; verify inclusion and anchor only, no keys required.
  • --json — emit machine-readable JSON.

It prints each tier's status; add --json for a structured result.

Library

import json
from pathlib import Path
from trustnotch.verify import verify, load_pubkeys, load_bundled_pubkeys

bundle = json.loads(Path("proof.json").read_text())

# verify against the keys shipped with this package…
result = verify(bundle, load_bundled_pubkeys())

# …or against keys you supply
trusted = load_pubkeys(json.loads(Path("pubkeys.json").read_text()))
result = verify(bundle, trusted)

if result.receipt_and_inclusion_ok:
    ...

What it checks

verify() reports each tier independently and deliberately offers no single "verified" boolean (see proof-format-v1 §6) — you decide which tiers must hold for your threat model:

  • receipt — the bundle's signature verifies against a trusted key.
  • inclusion — the entry is provably included under the signed Merkle root (RFC 6962).
  • anchor_structural — the OpenTimestamps proof is well-formed and commits the Merkle root to a Bitcoin timestamp. This is a structural check of the timestamp proof; confirming the anchoring transaction against the live Bitcoin chain is a separate step that requires chain data.

About this repository

This is the source of the published trustnotch package. The PyPI wheel is built from exactly this tree, and the repository is kept in sync with the package at each release, so the code you audit here is the code that runs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trustnotch-0.1.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trustnotch-0.1.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file trustnotch-0.1.1.tar.gz.

File metadata

  • Download URL: trustnotch-0.1.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trustnotch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f48aafd591a92ff0227e366d5f1cc48ae2636d9174d793c811e771f1ade22863
MD5 5d6a598dd0e9abccdd7b36807703d347
BLAKE2b-256 0feb82d9184a2bf31b6a45979d9ac781885cf55664b1ee00c251d592c0839bb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustnotch-0.1.1.tar.gz:

Publisher: publish-trustnotch.yml on trustnotch/trustnotch-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trustnotch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: trustnotch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trustnotch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb150170f5e5ce125f45ef885b1a98326a78d6631bf57f73cf3579bfac907635
MD5 f5b00b911db4f9ac70234713fdfbd48a
BLAKE2b-256 fb136dbbdb1104872b2c3df60fc14a8deda7d23ced5fdc0e277db545bfed420e

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustnotch-0.1.1-py3-none-any.whl:

Publisher: publish-trustnotch.yml on trustnotch/trustnotch-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page