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 ownpubkeys.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f48aafd591a92ff0227e366d5f1cc48ae2636d9174d793c811e771f1ade22863
|
|
| MD5 |
5d6a598dd0e9abccdd7b36807703d347
|
|
| BLAKE2b-256 |
0feb82d9184a2bf31b6a45979d9ac781885cf55664b1ee00c251d592c0839bb8
|
Provenance
The following attestation bundles were made for trustnotch-0.1.1.tar.gz:
Publisher:
publish-trustnotch.yml on trustnotch/trustnotch-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustnotch-0.1.1.tar.gz -
Subject digest:
f48aafd591a92ff0227e366d5f1cc48ae2636d9174d793c811e771f1ade22863 - Sigstore transparency entry: 1750379811
- Sigstore integration time:
-
Permalink:
trustnotch/trustnotch-server@22ecf64155e502ed0951cce8f2510f4f91d11b0e -
Branch / Tag:
refs/tags/trustnotch-v0.1.1 - Owner: https://github.com/trustnotch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-trustnotch.yml@22ecf64155e502ed0951cce8f2510f4f91d11b0e -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb150170f5e5ce125f45ef885b1a98326a78d6631bf57f73cf3579bfac907635
|
|
| MD5 |
f5b00b911db4f9ac70234713fdfbd48a
|
|
| BLAKE2b-256 |
fb136dbbdb1104872b2c3df60fc14a8deda7d23ced5fdc0e277db545bfed420e
|
Provenance
The following attestation bundles were made for trustnotch-0.1.1-py3-none-any.whl:
Publisher:
publish-trustnotch.yml on trustnotch/trustnotch-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustnotch-0.1.1-py3-none-any.whl -
Subject digest:
cb150170f5e5ce125f45ef885b1a98326a78d6631bf57f73cf3579bfac907635 - Sigstore transparency entry: 1750379848
- Sigstore integration time:
-
Permalink:
trustnotch/trustnotch-server@22ecf64155e502ed0951cce8f2510f4f91d11b0e -
Branch / Tag:
refs/tags/trustnotch-v0.1.1 - Owner: https://github.com/trustnotch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-trustnotch.yml@22ecf64155e502ed0951cce8f2510f4f91d11b0e -
Trigger Event:
push
-
Statement type: