Metadata-Version: 2.4
Name: ainfera-verify
Version: 0.1.0
Summary: Offline verifier for Ainfera AuditChains. Trust no one — verify the chain yourself.
Project-URL: Homepage, https://ainfera.ai
Project-URL: Repository, https://github.com/ainfera-ai/verify
Project-URL: Issues, https://github.com/ainfera-ai/verify/issues
Project-URL: Documentation, https://ainfera.ai/docs/verify
Author-email: "Ainfera Inc." <hello@ainfera.ai>
License: Apache-2.0
License-File: LICENSE
Keywords: ai-governance,ainfera,audit,cryptography,eu-ai-act,verification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Requires-Dist: cryptography>=42.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: rich>=13.7.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Provides-Extra: sigstore
Requires-Dist: sigstore>=3.0.0; extra == 'sigstore'
Description-Content-Type: text/markdown

# ainfera-verify

> Trust no one. Verify the chain yourself.

`ainfera-verify` is the public, offline verifier for [Ainfera](https://ainfera.ai) AuditChains. It lets anyone — regulator, auditor, partner, curious developer — fetch an Agent's AuditChain and cryptographically verify it without trusting Ainfera or holding an Ainfera account.

This is the customer trust primitive behind Ainfera's audit-grade transparency claim: chain of custody you can check yourself.

## Install

```bash
pip install ainfera-verify
```

Or with Homebrew:

```bash
brew install ainfera/tap/verify
```

## Usage

Verify a full AuditChain by Agent ID (fetches from the public read endpoint, then verifies offline):

```bash
ainfera-verify chain manwe
```

Inspect a single AuditEvent:

```bash
ainfera-verify event manwe 1245
```

Verify an offline Annex IV bundle export (use this for air-gapped review):

```bash
ainfera-verify bundle ./manwe-2026-05-19.zip
```

## What it verifies

For every `AuditEvent` in the chain:

1. **Hash continuity** — `previous_hash` matches the prior event's `event_hash`.
2. **Event integrity** — `event_hash` is the SHA-256 of `previous_hash || canonical_json(payload)`.
3. **HMAC signature** — `hmac_signature` validates against Ainfera's published public key.
4. **Sigstore signature** — when present, validated against the Rekor transparency log.

If any check fails, the verifier reports the exact `seq` where the chain breaks.

## Trust model

- The CLI ships under Apache 2.0. The verification logic is auditable.
- After events are fetched, verification is fully offline — no network calls, no Ainfera dependency.
- Ainfera's HMAC public key is published at [`https://ainfera.ai/.well-known/ainfera-public-key.json`](https://ainfera.ai/.well-known/ainfera-public-key.json) and cached locally.
- For air-gapped verification, download the key once or use a bundle export (which embeds the key).

## EU AI Act Annex IV

Annex IV technical documentation requires verifiable evidence of system behavior. `ainfera-verify bundle` produces a pass/fail with the cryptographic chain of custody — sufficient evidence for a regulator's technical reviewer.

## Web version

Don't want to install anything? Drop a bundle into [verify.ainfera.ai](https://verify.ainfera.ai). All verification runs in your browser.

## License

Apache 2.0. See [LICENSE](LICENSE).
