Metadata-Version: 2.5
Name: ariadne-verify
Version: 0.1.2
Summary: Air-gapped Ed25519 & SHA-256 Merkle compliance verifier for Ariadne Nexus ZK_PROV_V1 provenance certificates.
Project-URL: Homepage, https://ariadnenexus.com
Project-URL: Specification, https://ariadnenexus.com/rfc/zk-prov-v1
Project-URL: Repository, https://github.com/dotlink-ops/nexus-core
Author-email: Ariadne Nexus Engineering <security@ariadnenexus.com>
License: Apache-2.0
Keywords: ed25519,mcp,merkle,provenance,title-insurance,zero-knowledge
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Requires-Dist: cryptography>=43.0.3
Description-Content-Type: text/markdown

# `ariadne-verify` — Air-Gapped `ZK_PROV_V1` Certificate Verifier

Standalone, zero-network cryptographic compliance CLI and Python library for auditing **Ariadne Nexus Zero-PII Collateral Provenance Certificates** (`ANX-RFC-001` / `ZK_PROV_V1`).

Designed for specialty legal-title insurers, specie underwriters, reinsurance auditors, and art/RWA credit desks requiring **10+ year offline non-repudiation** with zero runtime dependency on Ariadne Nexus infrastructure.

- **Specification:** [`https://ariadnenexus.com/rfc/zk-prov-v1`](https://ariadnenexus.com/rfc/zk-prov-v1)
- **Repository:** [`https://github.com/dotlink-ops/nexus-core`](https://github.com/dotlink-ops/nexus-core)
- **Runtime Dependencies:** Python `>= 3.10` + `cryptography >= 43.0.3` (zero HTTP/network libraries)
- **License:** Apache-2.0

---

## 1. Supply-Chain & Artifact Integrity Verification (Optional Pre-Audit Step)

Every release wheel and standalone script published on GitHub Releases includes a Sigstore-signed SLSA build provenance attestation. Before transferring the wheel into an air-gapped compliance environment, verify its cryptographic build provenance:

```bash
gh attestation verify ariadne_verify-0.1.2-py3-none-any.whl \
  --repo dotlink-ops/nexus-core
```

---

## 2. Zero-Install Execution (`uvx` or Air-Gapped Wheel)

### Online Workstation (Zero Global Install via `uvx`)
```bash
uvx ariadne-verify --input archived_binder_proof.json \
  --pinned-pubkey-b64 "<OFFICIAL_ARIADNE_ORACLE_ED25519_PUBKEY_B64>"
```

### Air-Gapped Vault / Compliance Server
```bash
pip install --no-index --find-links ./offline-wheelhouse ariadne-verify
ariadne-verify --input archived_binder_proof.json \
  --pinned-pubkey-b64 "<OFFICIAL_ARIADNE_ORACLE_ED25519_PUBKEY_B64>"
```

---

## 3. Full Chain-of-Custody Merkle Root Recomputation

During a title claim or underwriting audit where the custodian presents the ordered 32-byte SHA-256 transfer digests (`L_0, L_1, ..., L_{n-1}`), pass `--custody-hashes` to independently recompute the domain-separated (`0x01` internal node prefix) binary Merkle root and cross-verify it against the Ed25519-signed statement:

```bash
ariadne-verify \
  --input archived_binder_proof.json \
  --pinned-pubkey-b64 "<OFFICIAL_ARIADNE_ORACLE_ED25519_PUBKEY_B64>" \
  --custody-hashes "0x4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a,0x9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
```

### Verification Checks & Exit Codes
1. Confirms `scheme == "ariadne-zk-ed25519-v1"` and `seller_pii_exposed is False`.
2. Enforces exact issuer match when `--pinned-pubkey-b64` is supplied.
3. Validates base64 encoding, 32-byte Ed25519 public key length, 64-byte signature length, and RFC 8032 PureEdDSA signature over `public_statement`.
4. Parses `ZK_PROV_V1` claims from `public_statement` and rejects outer-JSON field mismatches (`asset_id`, `policy_ref`, `optical_forensic_score_bps`, `title_lien_clearance_merkle_root`).
5. Recomputes the `0x01`-domain-separated SHA-256 binary Merkle root when `--custody-hashes` is provided.

- **Exit `0`:** All cryptographic, claim-binding, Zero-PII, and Merkle custody checks pass. Prints structured audit JSON to `stdout`.
- **Exit `1`:** Any cryptographic mismatch, outer-envelope spoofing attempt, key-pinning violation, or corrupted Merkle leaf. Prints structured error JSON to `stderr`.
