veritable-verify
Offline verification for Veritable signed certificates and report envelopes produced by EnergyIR. Free, pure Python, zero dependencies.
pip install veritable-verify
veritable-verify certificate.json --pubkey <hex>
from veritable_verify import verify_envelope
res = verify_envelope(envelope_dict_or_json, public_key_hex="<hex>")
res.valid, res.digest, res.licence # bool, sha256, licence stamp dict
What it checks:
- envelope schema (
level,method,bound,artifact_b64,signed) - the ed25519 signature (RFC 8032) over
b"energyir-certificate/1\n"+ the signed artifact bytes. The prefix separates certificate signatures from everything else the same key signs - that the envelope shown is the certificate that was signed, for every schema version: the
signed bytes must be the canonical JSON object
{level, method, bound}, the level and method shown must be the signed ones, and the bound shown (apart from the signature and licence fields added after signing) must be exactly the signed bound. A certificate that carries a witness signs it beside the body under a fixed key for its method (WITNESS_ONLY_KEYS); no other difference is allowed. An edited envelope hassignature_okTrue andvalidFalse - the artifact digest (
sha256of the signed artifact; see https://veritabledatabase.com/verify)
It also displays the licence stamp (license_id, holder, org, type). The stamp is added
after signing and is not covered by the signature: treat it as information, not proof.
It cannot mint licences, sign artifacts, or run the engine — verification is
public-key-only math. Verification fails closed: any malformation returns
valid=False with a reason.
Certificates issued before 2026-11-16
Library callers: in 0.3.1 an older certificate returns res.valid == True with
res.warning set. Check res.warning (or pass accept_legacy=False) if your program must
refuse the older form now.
They were signed over the bare artifact bytes, with no certificate prefix. 0.3.1 accepts them with a warning. From 0.4.0 they are refused by default: a bare signature is tied to the bytes only, so the same key's signature over anything that is byte for byte a certificate body would pass. To verify one you know was issued as a certificate, ask for the older form by name:
veritable-verify old-certificate.json --pubkey <hex> --accept-legacy-signature
res = verify_envelope(env, public_key_hex="<hex>", accept_legacy=True) # only the literal True
res.signature_scheme # "energyir-certificate/1" or "bare (issued before 2026-11-16; ...)"
The body comparison above applies to them too.
Versions
See CHANGELOG.md. In short:
- 0.3.1, the first release on PyPI, is a transition release: a certificate issued before 2026-11-16 (bare signature) is accepted with a warning.
- 0.4.0 refuses such a certificate unless
--accept-legacy-signatureis given. Nothing else differs.
Trust model
bound.public_key is self-asserted: it proves the envelope is internally
consistent, not that it came from a signer you trust. Pass --pubkey /
public_key_hex= to pin the expected key for a real authenticity decision.
Certificate refs (schema v3)
From 0.2.0 the verifier reads bound.schema_version 1, 2 and 3, and refuses
any newer version. A v3 certificate carries bound.ref, the position in a
source's history it attests, as kind:value or kind:value@scope:
| kind | value | refused |
|---|---|---|
pg_lsn |
Postgres X/Y, canonical uppercase, no padding |
0/0 |
delta_version |
decimal, 0 to 2^63-1, no leading zeros; scope = table full name (required) | negatives |
iceberg_snapshot |
decimal int64; scope = table full name (required) | -1 |
For v3 the verifier also checks that the displayed bound equals the signed
one (apart from the signature fields), so an edited ref is rejected even
though the signature still verifies (signature_ok stays True, valid is
False). An optional bound.base_ref must be valid and on the same axis.
--expect-ref KIND:VALUE@SCOPE requires a specific position.
veritable-verify cert.json --pubkey <hex> --expect-ref delta_version:41@main.sales.orders
Metadata
Release files for veritable-verify 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| veritable_verify-0.3.1.tar.gz | 21.5 kB | Without provenance | Details for veritable_verify-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| veritable_verify-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for veritable_verify-0.3.1-py3-none-any.whl |
Total release size: 43.1 kB
Release files / veritable_verify-0.3.1.tar.gz
| Download URL | veritable_verify-0.3.1.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1bee63a3ad4ac00b60c0f0f863e2b17f5ec5ad749cba3ae5d8a38e7cd1648c4f
|
|
BLAKE2b-256 checksum How to use checksums |
69e149f748c8c36a7538d390a9e4307b5a9b01ff118b428f2fed8c773e450d3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / veritable_verify-0.3.1-py3-none-any.whl
| Download URL | veritable_verify-0.3.1-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa7464866032c9a0901cd11acee681f3d2574731962eed572b0f33f5cbc2c092
|
|
BLAKE2b-256 checksum How to use checksums |
b676abc91fc1c2e5e8006f88f59b2b55fe8f19e8dd72796244fca063076e9579
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for veritable-verify 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.