Skip to main content

StateProof

StateProof

Version 0.3.0 — proof-carrying post-install Python environment exactness.

StateProof has one security property: it determines whether a selected Python directory matches an approved state. It reports EXACT or NOT_EXACT; it does not classify code as benign or malicious.

Quick start

python -m stateproof.cli capture ./my_env --output approved.px.json
python -m stateproof.cli verify ./my_env --against approved.px.json --evidence evidence.json
python -m stateproof.cli evidence-verify ./my_env --evidence evidence.json --against approved.px.json

Independent Proof of Exact State

A proof is a self-contained, canonical Merkle representation of the captured state. It includes the ordered entry set, a Merkle state_root, inclusion-proof paths, the manifest root, and optionally an Ed25519 signature.

python -m stateproof.cli keygen --private owner.pem --public owner.pub.pem
python -m stateproof.cli prove ./my_env --private owner.pem --output state.proof.json
python -m stateproof.cli proof-verify state.proof.json --public-key owner.pub.pem --require-signature
# PROOF_VALID

PROOF_VALID means that the proof is internally consistent and, when signed, the signature is valid. It does not claim that a different machine's files are still unchanged after the proof was produced. To assert the current machine's files are exact, run verify on that machine; to prove both facts, use verify and a signed proof.

The same flow is available as a library API:

from stateproof import ProofCarryingEnvironment

proof = ProofCarryingEnvironment.create("./my_env", private_path="owner.pem")
assert ProofCarryingEnvironment.verify(proof, "owner.pub.pem", require_signature=True)

Optional manifest signing

python -m stateproof.cli keygen --private owner.pem --public owner.pub.pem
python -m stateproof.cli sign approved.px.json --private owner.pem --output approved.signed.px.json
python -m stateproof.cli verify ./my_env --against approved.signed.px.json --public-key owner.pub.pem --require-signature

Signing is optional and requires cryptography: pip install 'stateproof[signing]'.

Deterministic scope

The snapshot includes regular files, directories, empty directories, and symlinks below the selected root. Symlinks are recorded but never followed. Unsupported special filesystem entries and unstable scans are rejected rather than marked exact. Default cache directories are excluded.

EXACT means byte-for-byte equality for every registered file, with the recorded path, type, size, target, and mode matching. NOT_EXACT means a deterministic mismatch exists.

Download files

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

Source Distribution

stateproof-0.3.0.tar.gz (134.3 kB view details)

Uploaded Source

Built Distribution

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

stateproof-0.3.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file stateproof-0.3.0.tar.gz.

File metadata

  • Download URL: stateproof-0.3.0.tar.gz
  • Upload date:
  • Size: 134.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stateproof-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a991e085301391a4538833895ce17c11aba9b2caf759f61927bb2b324f0fa3fb
MD5 86b8408e1eb90cc624147ef326b307e4
BLAKE2b-256 e567aacb42cd93535ccf3d3f376e165fe8ef50bdbb47f63e1ac9ff0a9126880a

See more details on using hashes here.

Provenance

The following attestation bundles were made for stateproof-0.3.0.tar.gz:

Publisher: publish.yml on adnanomar77/stateproof

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

File details

Details for the file stateproof-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: stateproof-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for stateproof-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4378bfb36392781d5064340f64fde4b3e1c6a799af1d173fb18bad0e6d6e785
MD5 c35b13f611cb4386648e346d8d856f12
BLAKE2b-256 8eb26bd7a68c2e60beebb0e25ee15324891c17f1738a61b14112a9b9d68603c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for stateproof-0.3.0-py3-none-any.whl:

Publisher: publish.yml on adnanomar77/stateproof

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

Release history Release notifications | RSS feed

0.3.1

2 files

This release

0.3.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page