# Independent auditor guide

## What to receive

Obtain the entire export folder containing `transcript.pdf`, `audit.json`, and any `attachments` directory. Obtain `verify-transcript.mjs` through your trusted software distribution channel. The script is under `auditor` in this source package and includes its runtime JavaScript dependencies. Only Node.js 24 is required; no npm install or private keys are needed. Keep original evidence unchanged and verify a working copy.

Exports contain confidential plaintext. Transfer and store them using your approved secure process. Do not upload them to arbitrary online PDF or signature-checking services.

## First integrity check

In PowerShell, run:

```powershell
node .\verify-transcript.mjs "C:\Evidence\Secure-Escrow-Chat-EXPORT-ID"
$LASTEXITCODE
```

Replace the example path with the actual export folder. The verifier does not make network requests. It checks canonical JSON, all participant key-bundle signatures, original message signatures, chronological ordering, signed identities, signed timestamps, document descriptors, duplicate messages/sequences, internal chain links, the master manifest signature, exact PDF hash/length, and included document hashes/sizes.

## Establish key trust independently

Compare **both participant combined SHA-256 fingerprints** against an independently authenticated record or trusted out-of-band comparison. Do not treat fingerprints copied solely from the export as proof of identity. After establishing trust, run:

```powershell
node .\verify-transcript.mjs "C:\Evidence\Secure-Escrow-Chat-EXPORT-ID" --trust ALICE_64_CHARACTER_HEX_FINGERPRINT --trust BOB_64_CHARACTER_HEX_FINGERPRINT
```

Replace the uppercase placeholders with the independently verified lowercase hexadecimal fingerprints, without spaces. The exporter must be one of the two participants. This release exports one contact/device/key-version conversation at a time. Export other device/key-version conversations separately.

| Exit | Meaning |
| --- | --- |
| `0` | Integrity checks passed and both participant fingerprints match the supplied trust list. Review all other report fields and warnings. |
| `1` | Verification failed, required files are missing, input is malformed, or command arguments are invalid. Do not rely on this export as intact evidence. |
| `2` | Integrity passed, but one or both participant keys lack an independently supplied trust fingerprint. |

A zero exit does not certify legal identity or completeness. `completeness` always reports `NOT_PROVEN`. `identityLabels` is `EXPORTER_ASSERTED`, and `timestamps` is `SENDER_ASSERTED`.

## Document results

`documentsVerified` counts supplied document files whose plaintext bytes match signed hashes. Files are named `attachments/UUID.bin` to avoid untrusted filenames or extension execution. Original names and MIME types remain in the signed message and PDF. Do not automatically open received files. If necessary, examine a verified copy using your controlled document-analysis workflow.

`documentsHashesOnly` counts signed attachment references for which bytes were intentionally not included. A signed hash is not proof that an auditor received or inspected the underlying document. If the export declares bytes included, missing or altered files cause failure. Extra files outside the declared inventory are not evidence authenticated by the seal.

## What a successful check does not prove

- It does not prove that every message ever exchanged is present. Local history may be incomplete; date selection and unknown trailing messages prevent proof of completeness.
- It does not certify exact historical time, key ownership by a legal person, historical revocation status, legal admissibility, or regulatory compliance.
- Handle/email/profile and local fingerprint-comparison dates are assertions sealed by the exporter. The recipient's email is unavailable in the current directory and is not fabricated.
- It verifies that PDF bytes match the exporter-signed manifest. It does not parse the PDF and prove that its visible wording semantically matches every JSON message. For material conclusions, inspect the original signed message payloads in JSON; those retain each sender's independent signature.
- A compromised exporter's key can reseal an edited report or selected subset, but cannot forge the other participant's original message signatures without that participant's key.

The PDF uses reversible notation for non-ASCII and control characters: backslash followed by `u{HEX}`. Literal backslashes are doubled. Original Unicode remains unchanged inside the Base64-encoded signed JSON payload. The report includes raw message signatures, sender/recipient identities, key fingerprints, UTC timestamps and signed document hashes.

`CHAIN_START_OUTSIDE_EXPORT` means a chain starts after sequence 1; `CHAIN_GAP` means intermediate sequence numbers are absent. Broken links between adjacent present sequence numbers are a failure. No warning does not prove that no messages were omitted before/after or in an entirely absent conversation.
