# XMSE Merkle Proof Verification (C2)

Offline verification — **no network**.

## Quick start

```bash
python3 scripts/verify-xmse-merkle-proof.py \
  --proof data/ops/media-provenance/sample-merkle-proof.json
```

## Verify from index

```bash
python3 scripts/verify-xmse-merkle-proof.py --index 0
```

Reads `data/ops/media-provenance/transparency-log.jsonl` and recomputes root.

## Algorithm

1. Leaf = `SHA256(JSON(entry, sort_keys=True, ensure_ascii=False))`
2. Walk proof siblings left/right per `position`
3. Compare computed root to `merkleRoot` in `transparency-merkle.json`

## License

`scripts/verify-xmse-merkle-proof.py` — Python 3 stdlib only (Apache-2.0 project).

See `docs/ANCHOR-SPEC.md` for C1/C2/C3 definitions.
