Verify receipts and evidence packs offline
A Verify signature button inside CortexHub only tells you what CortexHub says about itself. Everything CortexHub signs can also be checked without CortexHub: you need the file, CortexHub's published public keys, and a small open-source verifier. No account, no API key, and no call to a CortexHub API. With saved copies of the keys it works on a machine with no network at all.
What is signed
| Record | Signed by | What the signature covers |
|---|---|---|
| Authorization record (one per call CortexHub let through) | The agent's own Ed25519 key | Who called which tool, with which argument hash, under which policy and approval, before the call ran |
| Receipt (one per finished call, allowed or not) | The agent's key | What happened: outcome, result hash, timing, and the decision |
| Enforcement decision (one per blocked or held call) | The agent's key | The denial or hold and why |
| Evidence pack | A CortexHub platform key | The pack's manifest, which lists the SHA-256 of every file in the pack |
Each agent's records form hash chains: every record carries the SHA-256 of the one before it, so a changed, removed or inserted record breaks the chain.
The public keys
CortexHub publishes its public keys as standard JSON Web Key Sets, unauthenticated:
- Platform keys (evidence packs):
https://api.cortexhub.ai/.well-known/cortexhub-signing-keys.json - One agent's keys:
https://api.cortexhub.ai/.well-known/cortexhub-signing-keys/agents/<agent_id>.json(the agent id is in every record it signed)
Each key has its id (kid), the Ed25519 public key (x), when it was created and retired,
and cxh:fingerprint_sha256, the SHA-256 of the public key. CortexHub shows the first 16
characters of that fingerprint, for example 3f2a 9c41 b7d0 e512, so you can match what
the app says against the published key.
Retired keys stay published, so records signed before a key rotation still verify. A key that was revoked (for example after a suspected compromise) is withdrawn at once, and records it signed no longer verify. Agent keys are only ever listed one agent at a time: nobody can list another organisation's agents.
Save a copy of the key sets when you audit. Keys are only ever added or retired, so a saved copy also lets you notice if a published key ever changed.
Get the files
- One record: open a tool call in a session, go to Tamper-proof audit and select Download next to the authorization record or the receipt. The file holds the record exactly as signed, the key id and fingerprint, the canonical form it was signed in, and how to verify it. A record that carries the agent owner's private reason for the call can only be downloaded by that owner, because the signature covers the reason.
- An evidence pack: Compliance & audit -> Evidence packs, then Download ZIP. The
pack carries its signed manifest (
manifest.jsonandmanifest.signature.json), the agents' public keys (signing_keys.json) and aREADME.mdwith these steps.
Verify with the CortexHub verifier
The verifier ships in the open-source CortexHub Python SDK (MIT licensed). It needs Python
3.11 or later and the cryptography package.
pip install 'cortexhub[verify]'
cortexhub verify cortexhub-receipt-2026-11-19.json
cortexhub verify evidence-pack.zip
For a pack it checks the platform signature on the manifest, that every file matches the manifest and no file was added, every record signature, and every chain:
CortexHub verify: evidence pack cxh_epack_...
[ok] Manifest signature: verified with CortexHub public key 5c1b 9087 801d d034 (cxh_psk_evidence_v1)
[ok] Files: 13 files match the signed manifest
[ok] Record signatures: 120 of 120 verified with the agents' keys
[ok] Receipts chain: Chain intact: 40 records across 2 agents, no gaps
[ok] Authorization records chain: Chain intact: 38 records across 2 agents, no gaps
[ok] Enforcement decisions chain: Chain intact: 42 records across 2 agents, no gaps
Result: VERIFIED
The exit code is 0 when everything verifies, 1 when a check fails and 2 when the
file cannot be read. Add --json for machine-readable output.
Air-gapped. Download the key sets on a connected machine, carry them over with the
files, and pass them with --keys; --offline guarantees no network access:
curl -o cortexhub-signing-keys.json https://api.cortexhub.ai/.well-known/cortexhub-signing-keys.json
curl -o agent-keys.json https://api.cortexhub.ai/.well-known/cortexhub-signing-keys/agents/<agent_id>.json
cortexhub verify evidence-pack.zip --offline --keys cortexhub-signing-keys.json
cortexhub verify cortexhub-receipt-2026-11-19.json --offline --keys agent-keys.json
An evidence pack carries its agents' keys inside it, vouched for by the platform signature, so a pack only needs the platform key set.
The whole-archive signature. A pack's API record
(GET /v1/orgs/{org_id}/evidence-packs/{pack_id}) also carries the SHA-256 of the whole ZIP
and a platform signature over it. Save that record as JSON and add --pack-record pack.json to
check it too. This is the only check for packs issued before packs carried a signed
manifest.
Read it before you run it. The verifier is one file, cortexhub/verify.py inside the
SDK package. To read or run it without installing the SDK, download the package and run the
file directly:
pip download cortexhub --no-deps --no-binary :all: -d cortexhub-sdk
# unpack the archive, then:
python verify.py evidence-pack.zip
The verifier only follows a key URL written inside a file when it is https on
cortexhub.ai, so a forged file cannot point it at keys of its own choosing.
Verify by hand
To check a single record with your own code, follow these steps. The snippet below needs
only Python and cryptography.
- Take the key whose
kidequals the record'ssigning_key_idfrom the agent's key set, and check that itscxh:agent_idis the record'sagent_id. - Remove the fields outside the signature:
- receipts:
signature,created_at,purged_at,purge_reason - authorization records:
signature,calls_made,consumed_at,created_at,sequence_number - enforcement decisions:
signature,created_at - anything an export added:
agent_name,withheld_fields,signed_body_sha256,signed_connection_id
- receipts:
- Build the canonical bytes (
cxh-canonical-json-v1): drop top-level fields whose value isnull(nestednullvalues stay); rewrite every string that is an ISO 8601 date and time as UTC with milliseconds, for example2026-11-19T12:38:50.123+00:00; serialise with sorted keys, no whitespace and non-ASCII characters kept, encoded as UTF-8. - Verify the record's
signature(Ed25519, base64url without padding) over those bytes. An enforcement decision recorded by an earlier CortexHub version for a call with no connection may carrysigned_connection_id(cxh_conn_unresolved,cxh_conn_curatedorcxh_conn_meta): it was signed with that internal placeholder inconnection_id, which is stored empty, so setconnection_idto it for this step only. The verifier does this and reports how many such records it found. - For a chain, each record's
prev_receipt_hash,prev_envelope_hashorprev_decision_hashmust equal the SHA-256 (lowercase hex) of the previous record's canonical bytes, orGENESISfor an agent's first record.
import base64, json, sys
from datetime import datetime, timezone
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
UNSIGNED = {
"receipt": {"signature", "created_at", "purged_at", "purge_reason"},
"authorization_record": {"signature", "calls_made", "consumed_at", "created_at", "sequence_number"},
"decision": {"signature", "created_at"},
}
ANNOTATIONS = {"agent_name", "withheld_fields", "signed_body_sha256", "signed_connection_id"}
def b64(s):
return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4))
def coerce(v):
if isinstance(v, str) and len(v) >= 10 and v[4] == "-":
try:
d = datetime.fromisoformat(v.replace("Z", "+00:00"))
except ValueError:
return v
d = d.replace(tzinfo=timezone.utc) if d.tzinfo is None else d.astimezone(timezone.utc)
return d.replace(microsecond=d.microsecond // 1000 * 1000).isoformat(timespec="milliseconds")
if isinstance(v, dict):
return {k: coerce(x) for k, x in v.items()}
if isinstance(v, list):
return [coerce(x) for x in v]
return v
def canonical(record, record_type):
drop = UNSIGNED[record_type] | ANNOTATIONS
body = {k: coerce(v) for k, v in record.items() if k not in drop and v is not None}
return json.dumps(body, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode()
doc = json.load(open(sys.argv[1])) # a downloaded signed record
keys = json.load(open(sys.argv[2]))["keys"] # the agent's key set
record = doc["record"]
key = next(k for k in keys if k["kid"] == record["signing_key_id"]
and k["cxh:agent_id"] == record["agent_id"])
Ed25519PublicKey.from_public_bytes(b64(key["x"])).verify(
b64(record["signature"]), canonical(record, doc["record_type"]))
print("verified with key", key["cxh:fingerprint_sha256"][:16])
verify raises InvalidSignature when the record was changed.
What this proves, and what it does not
A record that verifies was signed by the key CortexHub published for that agent and has not
changed since. An intact chain shows no record of that agent was changed, removed or
inserted within the period. It does not prove that CortexHub signed every call it should
have; the chains and CortexHub's own chain report (chain_integrity_report.json in a pack)
are the evidence for completeness.
An evidence pack never contains anyone's private content: tool arguments and results, chat
text and the agent owner's private reason for a call are left out. An authorization record
whose private reason was left out is marked withheld_fields in the pack; its own signature
cannot be checked from the pack (the verifier says so instead of passing it), and the next
record's chain link still can.
Go deeper
- Security controls: how receipts and evidence packs fit the audit trail.
- Watch, respond and prove: creating an evidence pack.