# rb_verify — verify a ReserveBeat evidence bundle yourself Everything in this directory is licensed under the Apache License 2.0 (`LICENSE`). - `rb_verify.py` is the verifier. It is one file and needs Python 3.10+, the standard library and one pinned package (`requirements.txt`). - `FORMAT.md` specifies the bundle, format v1, and every check the verifier runs. - `fixtures/` holds a demo bundle, a one-byte tampered copy of it that must fail, a real mainnet storage proof and the RFC 6962 vectors, with the expected transcripts. ``` python3 -m venv .venv && .venv/bin/pip install --require-hashes -r requirements.txt .venv/bin/python rb_verify.py bundle --tsa-ca /etc/ssl/certs/ca-certificates.crt .venv/bin/python rb_verify.py storage-proof .venv/bin/python rb_verify.py pdf --record --bundle ``` Exit status: 0 means every check that applies verified, 1 means at least one failed (all failures are listed), and 2 means the input could not be read. A bundle cut between two daily anchors carries records that no anchor covers yet. While the oldest of them is at most 30 hours older than the bundle's own `as_of`, they read PENDING: the run can still exit 0, and it says how many there are and that they are not yet timestamped. Older than that, they are OVERDUE and the run fails (`FORMAT.md` §5.4). `--require-anchored` fails PENDING records too. What each part needs: - **The chain, the anchors, the Merkle roots, the payloads and the storage proofs** need nothing beyond the above. Keccak-256 is built in. - **RFC 3161 timestamps** need `openssl` on `PATH`. Without it, every leg that holds a token counts as NOT VERIFIED and the run fails. A leg whose bundle stores no CA chain is NOT VERIFIED too, unless you pass `--tsa-ca `: trust roots you choose, such as your system's CA bundle (`/etc/ssl/certs/ca-certificates.crt` on Debian and Ubuntu) or the root the TSA publishes. - **The time each TSA signed** (check T2, `FORMAT.md` §6.4) needs nothing more. It is printed beside each verified leg, and the run fails if the TSA signed before the newest record the anchor covers or more than 600 seconds from the anchor's recorded `anchored_at`. That dates each anchored record as no later than its anchor's TSA time, by a third party's clock only for an `EXTERNAL_RFC3161` leg, and never more closely than that. - **OpenTimestamps** proofs are counted, not checked. Checking one needs the `ots` client and a Bitcoin node. `--ots-dir DIR` writes each proof beside the bytes it timestamps, for `ots verify`. A bundle prepares evidence for examination. It is not an attestation. Verifying it shows that the records, anchors and self-made payloads are the ones committed, in the order and at the times claimed. It does not show that the figures in the underlying documents are true.