# Verify it yourself

`azoth-verify` checks a dossier or a receipt without Azoth: no dependency, no network call, no code shared with the producer — so its verdict does not rest on trusting us.

## On the command line

Download the verifier from **Proof › Verification** — a ZIP, with its SHA-256 next to it — unzip it and run it with Node.js 18 or later:

```
shasum -a 256 -c azoth-verify.zip.sha256
unzip azoth-verify.zip -d azoth-verify && cd azoth-verify

node bin/azoth-verify.mjs dossier.zip --keys keys.jwks.json                          # PASS / FAIL per check, exit 0 / 1
node bin/azoth-verify.mjs dossier.zip --keys keys.jwks.json --json                   # machine-readable
node bin/azoth-verify.mjs dossier.zip --keys keys.jwks.json --tsa-root tsa-root.pem  # pin the time-stamping root too
node bin/azoth-verify.mjs receipt receipt.txt --dossier dossier.zip --keys keys.jwks.json
```

## In a browser, offline

`/azoth-verify.html` is one self-contained page that runs the same checks in the browser, with no network access at all. **Verify it yourself** opens it from Proof › Dossiers and Proof › Verification; on the home page it opens the latest verified decision, whose **Export and verify this decision** downloads its dossier and opens the page beside it. Keep a copy: it works without Azoth.

[/azoth-verify.html](https://www.azothos.ai/azoth-verify.html)

## Try it on an example

A demo dossier of five synthetic decisions, the demo workspace’s public keys and the receipt of one of its calls — made by Azoth’s own export code, and signed with a demo key whose private half was never written. Download the three files, then run:

[demo-dossier.zip](https://www.azothos.ai/verify-examples/demo-dossier.zip) · [demo-keys.jwks.json](https://www.azothos.ai/verify-examples/demo-keys.jwks.json) · [receipt.txt](https://www.azothos.ai/verify-examples/receipt.txt)

```
node bin/azoth-verify.mjs demo-dossier.zip --keys demo-keys.jwks.json
node bin/azoth-verify.mjs receipt receipt.txt --dossier demo-dossier.zip --keys demo-keys.jwks.json
```

In the browser page, choose `demo-dossier.zip`, and `demo-keys.jwks.json` to pin its keys. Change one byte of the dossier and verify again: it fails.

## Open source

The verifier is licensed under Apache-2.0: anyone may read it, run it and change it. Its code is the one in the ZIP and in the browser page.

[github.com/azothos/azoth-verifier](https://github.com/azothos/azoth-verifier)

Each version is also published to its own public repository and to npm — with Node.js, nothing to download first:

```
npx -y @azothos/verifier demo-dossier.zip --keys demo-keys.jwks.json
npx -y @azothos/verifier receipt receipt.txt --dossier demo-dossier.zip --keys demo-keys.jwks.json
```

## What it checks

- every file against the manifest, and the root hash;
- the hash chain of the sealed decisions;
- the RFC 3161 timestamp, against a root you pin with `--tsa-root`;
- each kind of dossier: decision, incident, compliance, litigation, cost exhaustion, AI footprint;
- a receipt: its format, its key, its signature and the decision it names;
- the applicable law of each decision, decided again from its seal;
- the dossier’s signature — required since version 2.0.0 — against keys you pin with `--keys`, and what it covers: the journal’s head when it was exported, the entries listed, the filters;
- since version 2.1.0, each entry’s time, kind of actor and trace against what its seal says;
- each sealed cost, computed again from its sealed price and the signed model catalog.

> Trust comes from what you pin: the keys published at `/api/proof/keys/<workspaceId>` and the root of the time-stamping authority. Without the keys, a dossier does not verify: the keys it ships vouch only for itself, and an unsigned dossier binds its content to nothing. Without the authority’s root, a timestamp is reported with a warning.

Each check is specified in `packages/verifier/SPEC.md`, which is enough to write another verifier from scratch.

A passing check proves that the files are the ones Azoth sealed and signed, in that order, at that time. It does not prove that a decision was right: it is technical evidence, not a judgement.
