# Export and Verify Offline

An evidence package is a directory that holds one object with everything needed to check it: the sealed object, its receipt, its log event and inclusion proof, the timestamped checkpoint, and Octet's signing keys. It verifies without a connection to Octet, so you can hand it to a court, a regulator or an auditor, or keep it outside the vault.

## Export a package

```bash
octet-vault --token-file read.token export <object-id> --key vault.key --out evidence-<object-id>
```

`export` creates the `--out` directory, or writes into an empty one. It refuses a directory that has files in it, unless you pass `--force`. `--json` lists every file it wrote.

Without `--key`, the package holds the sealed object and the log evidence only. With `--key`, it also holds the opened object and everything `verify` needs offline:

| Path | Content |
|---|---|
| `evidence.json` | The index row, receipt, log event, inclusion proof, checkpoint, anchors and signing keys |
| `object.ovlt` | The sealed object |
| `checkpoint.note` and its `.ots` and `.tsr` files | The checkpoint and its OpenTimestamps and RFC 3161 timestamps |
| `bound.note` and its `.ots` and `.tsr` files | The earliest timestamped checkpoint that contains the object's event |
| `verify-log.json` | The log check's report at export time |
| `bundle.json`, `bundle.pb` (`--key`) | The opened evidence bundle, as JSON and as protobuf |
| `proof.bin` (`--key`) | The signed proof, exactly as your app uploaded it |
| `status-list-<sha256>.json` (`--key`, Android) | Google's attestation revocation list as it was at sealing |
| `enrolment/` (`--key`, iOS) | The device's archived App Attest enrolment |

Exporting downloads the sealed object, so it is an `object_read` event in your log.

:::warning[An opened package holds the proof]
With `--key`, `bundle.json` and `proof.bin` hold the proof in plaintext. Share such a package only with someone who may see the proof. Without `--key`, the package stays sealed.
:::

## Verify a package offline

Anyone can check the log evidence, without a token or a key:

```bash
octet-vault verify-log --dir evidence-<object-id>
```

The holder of the recipient key can run the full verification, with the app identity:

```bash
octet-vault verify --dir evidence-<object-id> --key vault.key \
    --android-app-identity <package name>,<signing certificate SHA-256>
```

For an iOS proof, pass `--app-attest-team-id <team ID> --app-attest-bundle-id <bundle ID>` in place of `--android-app-identity`. Without the app identity, the result is INCONCLUSIVE (see [App identity](/docs/vaults/concepts/verification/#app-identity)).

Neither command contacts Octet, with one exception: for an Android proof whose revocation list is in neither the package nor the local cache, `verify` downloads that list from the vault. `export --key` saves the list into the package when the vault serves it. Both print the same lines as the online commands. See [Check Lines and Exit Codes](/docs/vaults/reference/checks/).

## Verify in the browser

The Octet portal can open and verify one object in your browser, with the same verifier as the CLI:

1. Sign in to the [Octet portal](https://api.octetproof.com/portal/sign-in) as an owner or admin of the licence.
2. Open the licence's **Vaults** tab, then **Open and verify**.
3. Enter the object ID, pick the vault's environment (**Release** or **Sandbox**), choose your recipient key file and enter its passphrase.
4. Check the verify options. The page fills in the app identities registered on your licence.
5. Select **Open and verify**.

If your key file needs a FIDO2 security key (see [Keys](/docs/vaults/concepts/keys/#security-keys)), the browser asks for it after step 5. Use Chrome or Firefox with a USB security key. Safari may not return the result the page needs, and the page then says so.

The page shows the verdict and one row per check, and can copy the report as text. Your key file, its passphrase and the opened proof stay in the browser tab and are never sent. Fetching the object is an `object_read` event, as with the CLI.
