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.1.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.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stateproof-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0228553d81723a9cee332125af7381a5e547843441a92865dd3483f886d9eb08
MD5 eacb292ac99823aaa265ab5ab20c4cba
BLAKE2b-256 e4f05bb2ccde5afc124fbb345f7635afb41b5c5c286ceee2b0c2ab493f57ca0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for stateproof-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: stateproof-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c35c31de1cdddfc713aa28893d82153d4a8ed957366a728c71b1678eef672b0c
MD5 3afadbf66646e1d5dca2b0a056dee7c5
BLAKE2b-256 d92632129b373db179a7b2a4d8f1a194020df5e502e13e705d2abdbf7bf887f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for stateproof-0.3.1-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

This release

0.3.1 This release

2 files

0.3.0

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