Metadata-Version: 2.4
Name: atlas-pca
Version: 0.3.0
Summary: Reference verifier for Atlas Proof-Carrying Authority (PCActn core, M0-M3)
Author: Atlas
License-Expression: MIT
Project-URL: Homepage, https://github.com/Atlas-Authorization/pca-python
Project-URL: Repository, https://github.com/Atlas-Authorization/pca-python
Project-URL: Issues, https://github.com/Atlas-Authorization/pca-python/issues
Project-URL: Specification, https://github.com/Atlas-Authorization/pca
Keywords: authorization,agents,proof-carrying-authority,pca,verifier,ed25519,ml-dsa
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: fast
Requires-Dist: cryptography>=41; extra == "fast"
Provides-Extra: pq
Requires-Dist: dilithium-py>=1.0; extra == "pq"
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.110; extra == "fastapi"
Provides-Extra: django
Requires-Dist: django>=4.2; extra == "django"
Dynamic: license-file

# atlas-pca

Reference verifier for **Proof-Carrying Authority (PCA)**, an execution-authentication framework for
autonomous agents. With every action the agent presents a self-contained proof-carrying action
(PCActn); the resource server verifies the proof offline instead of trusting a bearer token.

> Status: **0.3.0, unaudited.** Not independently security-reviewed; evaluate before relying on it for
> production authorization decisions.

## Install

```sh
pip install atlas-pca
```

The verifier has no required dependencies. Optional extras: `atlas-pca[fast]` (native Ed25519 via
`cryptography`), `atlas-pca[pq]` (ML-DSA-65 post-quantum signatures via `dilithium-py`),
`atlas-pca[fastapi]`, `atlas-pca[django]`.

## Use

```python
from atlas_pca import verify_pcactn_core

verdict = verify_pcactn_core(pcactn, grant, audience="https://api.example.com")
if not verdict.allow:
    raise PermissionError(f"authF failed: {verdict.reason}")
```

## Checks

Verification is stateless, fail-closed and runs in a fixed, normative order:
`wire`, `version`, `audience`, `validity`, `chain`, `grant_ref_bound`, `plan_inclusion`,
`leaf_signature`, `counter`.

`grant_ref_bound` (new in 0.2.0) requires the signed `grant_ref` to equal the id of the root capability
(`cap_chain[0]`), so replay state cannot be keyed on an attacker-chosen value.

The package passes the shared 172-vector PCA conformance corpus, which the TypeScript, Rust, Go and
other verifiers also pass.

## Links

- Source: https://github.com/Atlas-Authorization/pca-python
- Specification and docs: https://github.com/Atlas-Authorization/pca

License: MIT
