Mnemontron
Mnemontron / Verify a receipt

How to verify a Mnemontron receipt

A Mnemontron receipt proves which evidence an answer cited. To verify one, check its Ed25519 signature against the instance's public keys, confirm it is within its validity window, and compare the cited content hashes with the evidence you hold. This guide walks through each step. For what Mnemontron is, start at the home page.

Key takeaways

What a receipt contains

Steps

  1. Save the receipt. Keep the compact JWS from the receipt field of the response.
  2. Fetch the public keys. Download the key set from the instance's /.well-known/jwks.json. Rotated keys stay in the set, so older receipts still verify.
  3. Check the signature. Find the key whose id matches the receipt's kid and verify the EdDSA signature. Any edit to the payload makes this fail.
  4. Check the type and validity window. Confirm typ is mnemontron.receipt/v1 and that the current time is between nbf and exp.
  5. Check the citations. Compare each cited content hash and version with the evidence you hold, and compare query_sha256 with the SHA-256 of the query you asked.
  6. Check for replay. Submit the receipt to the instance's verification API. The first presentation returns replay: false; any later presentation of the same receipt returns replay: true, and an expired receipt is rejected.

Offline and online verification

Mnemontron ships a verification script that performs steps 2 to 4 offline against a saved key set or a key set URL, and exits with an error on a bad signature, a wrong type or an expired receipt. Offline verification cannot see which receipts have already been presented, so replay detection is available only through the API.

Agents can apply the same checks to the instance's A2A agent card, which is signed with the same keys.