Skip to main content

Verify Ed25519 signed TrustAtom decision receipts (ML-DSA-65 post-quantum gate planned)

Project description

trustatom

Verify Ed25519 signed TrustAtom decision receipts (ML-DSA-65 post-quantum gate planned).

A TrustAtom is a signed decision receipt: who decided, what policy governed, what evidence supported it, when. This package verifies them. It does not mint them -- minting requires the Trust Gate backend with OPA policy evaluation and key management.

Install

pip install trustatom

Usage

from trustatom import TrustAtom, verify_receipt

atom = TrustAtom(
    agent_id="analyst-01",
    action="tool_call:database_query",
    policy="opa://compliance/data-access-v2",
    decision="ALLOW",
    evidence={"role": "analyst", "scope": "read_only"},
    timestamp="2026-06-30T00:00:00Z",
    signature=signature_bytes,
    public_key=public_key_bytes,
    pq_cosig=pq_cosig_bytes,  # optional; required when TRUST_GATE_REQUIRE_PQ=1 (default)
)

assert verify_receipt(atom)
print(atom.receipt_id)  # 128-bit content address, sha256[:32]

H3: PQ-required verify

By default, verify_receipt rejects any receipt missing pq_cosig (defends against signature-stripping). Set TRUST_GATE_REQUIRE_PQ=0 or pass require_pq=False to accept legacy Ed25519-only receipts.

ML-DSA-65 cosignature verification itself is not yet implemented in this package -- it checks that pq_cosig is present, not that it cryptographically verifies. A real ML-DSA-65 check ships when a NIST-compliant ML-DSA-65 Python library is available.

Links

License

Apache-2.0

Project details


Download files

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

Source Distribution

trustatom-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

trustatom-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file trustatom-0.1.0.tar.gz.

File metadata

  • Download URL: trustatom-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trustatom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67f25240c16287eadd7097d4342391720a2e4921ba45eb2d54a6e8b9eb62edfe
MD5 b3b3eec4f0d73790a649fa00b0746040
BLAKE2b-256 b236a58af7869ead4941dc69f4e1a0168f4039423c65243b01ca7edf2cd2a167

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustatom-0.1.0.tar.gz:

Publisher: publish-trustatom.yml on CWNApps/cwn-dev-ops

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

File details

Details for the file trustatom-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: trustatom-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for trustatom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e10bdab9741a3b4d8a2e8d0e2634258e24b2ab9c0f87a4bcc751e1228f8c5841
MD5 b6690a960d556fa14070800250ad6735
BLAKE2b-256 9f19d787155b0e1cbe4480ffae7972f9238eda8c2b407d2e7fee96c5d61eb035

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustatom-0.1.0-py3-none-any.whl:

Publisher: publish-trustatom.yml on CWNApps/cwn-dev-ops

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page