Documentation
¶
Overview ¶
Command ans-verify is an offline verifier for SCITT COSE receipts served by the ANS Transparency Log. It mirrors the reference's `cmd/ans-verify` binary so third-party tooling written against the reference works unchanged against ans-tl.
Typical use:
ans-verify -url http://localhost:18081 -agent <agentId>
With the above invocation the tool:
- Fetches the TL's verification keys from /root-keys in the sumdb-note verification format.
- Fetches the receipt from /v1/agents/{agentId}/receipt as raw CBOR.
- Parses the COSE_Sign1 structure, decodes the protected header (algorithm, kid, VDS, CWT issuer/iat), and extracts the inclusion proof from the unprotected header (label 396 → {treeSize, leafIndex, path, rootHash}).
- Walks the proof from the leaf hash (RFC 6962: SHA-256(0x00 || event_bytes)) to the stored root.
- Verifies the ES256 signature against one of the fetched verification keys.
- Fetches the badge (/v1/agents/{agentId}) and cross-checks that the badge's merkleProof matches the receipt's proof.
If -pubkey <path> is given, the tool loads that PEM public key instead of fetching /root-keys. This is useful for air-gapped verification against a receipt saved to disk.
Click to show internal directories.
Click to hide internal directories.