parmana-verifier (Python)
Check whether a Parmana Execution Trust Record was signed by a key you trust, using only the record and a trust file. No network access, no account, no Parmana server needed.
This is the Python counterpart of the Node verifier in the repository root. It checks the same things in the same order, and it returns the same result shape and exit codes. Its results match the Node verifier on every test vector and on records generated by each implementation.
What it checks, and what it does not
Checked
- The record hash (
trustRecordHash) against the canonical record fields. - The Ed25519 signature, over the legacy message, from a key in your trust file.
- Ed25519 signatures in a hybrid
signaturesarray, and the whole-record (schema version 3) message. - Trust rules: the key's fingerprint, its validity window, and the
compromisedflag. - The
hybridRequiredFromcutover, when the trust file sets one.
Not checked: ML-DSA-65 (dilithium3) signatures. The cryptography package does not provide ML-DSA. A record with a dilithium3 entry is reported as invalid, so this verifier never accepts a hybrid record on its Ed25519 part alone. To check the ML-DSA-65 part, use the Node verifier (@parmana/verifier) on Node 24 or later with OpenSSL 3.5 or later.
Other differences from the Node verifier
- A timestamp without a time zone offset is rejected. Node reads it in the local time zone, so this verifier gives the same answer on every machine.
- Integers beyond 2^53 are rounded the way JavaScript rounds them when it parses JSON. Use records written by Parmana, which never contain such integers.
Install
Requires Python 3.11 or later (tested on 3.11, 3.12 and 3.13). The only dependency is cryptography (version 42 or later). It is not yet published to PyPI, so install from a clone of this repository:
cd python
pip install -e .
For the tests, install the test extra as well: pip install -e ".[test]".
Command line
parmana-verify <proof.json> <trust.json>
parmana-verify key-fingerprint <public-key.pem>
verifyprints one line of JSON and exits0when the record is valid,1when it is invalid, and2for a usage or read error.key-fingerprintprints thesha256:...value to pin in a trust file.
The output has the same fields as the Node CLI: valid, coverage, errors and checks.
Python API
import json
from parmana_verifier import parse_trust_policy, verify_execution_trust_record
record = json.load(open("proof.json"))
policy = parse_trust_policy(json.load(open("trust.json")))
result = verify_execution_trust_record(record, policy.keys, policy.hybrid_required_from)
print(result["valid"], result["errors"])
Trust file
The trust file lists each key you accept, pinned by its fingerprint. See the main README for the format. The verifier never fetches keys.
Tests
cd python
pip install -e ".[test]"
pytest
The tests run the shared test vectors in ../test/vectors, check the canonical serialization against JavaScript's number and string formatting, and generate Ed25519 records at test time to cover the trust rules and the CLI.
Metadata
Release files for parmana-verifier 0.1.0
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 | |
|---|---|---|---|---|
| parmana_verifier-0.1.0.tar.gz | 14.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parmana_verifier-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.7 kB
Release files / parmana_verifier-0.1.0.tar.gz
| Download URL | parmana_verifier-0.1.0.tar.gz |
|---|---|
| Size | 14.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b09292dcffe5ff9a563d429c90608ad29034d663f2a8a6eccc93e7a4d8c83fa
|
|
BLAKE2b-256 checksum How to use checksums |
cebfd89f38a33c8c4b7f230eb1a393de0534f71a75a325949aa6019e820db8b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / parmana_verifier-0.1.0-py3-none-any.whl
| Download URL | parmana_verifier-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
256167d63f04bcd9ee72c1c03db5392e50e9c03c14e3554bab7def9d313991fe
|
|
BLAKE2b-256 checksum How to use checksums |
a798f7ecec630bf338654eb9b68c5790b3b4db685360ae7cc8b2eab0b71d7652
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for parmana-verifier 0.1.0
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.