# The receipt

> Exact signature scheme, canonical string, verification, key.  
> Last verified: 2026-09-30 · Hub: https://www.synapseconnexion.com/ia/index.md · Changelog: https://www.synapseconnexion.com/ia/changements.md

Every tool response carries `recu`:

```json
{
  "id": "16 hex chars, random",
  "horodatage": "UTC, ISO 8601 with milliseconds, e.g. 2026-09-30T01:48:21.402Z",
  "service": "confirme.page | confirme.domaine | confirme.courriel | confirme.battement | confirme.tache | autotest",
  "demande_sha256": "SHA-256 hex of json_encode(demande, UNESCAPED_SLASHES|UNESCAPED_UNICODE)",
  "resultat_sha256": "SHA-256 hex of json_encode(resultat, same flags)",
  "signature_base64": "Ed25519 detached signature, base64",
  "cle_id": "synapse-ia-2026-d5c611",
  "verifier": "https://www.synapseconnexion.com/ia/verifier"
}
```

## Canonical string (what is signed)

```
id \n horodatage \n service \n demande_sha256 \n resultat_sha256
```
Five fields joined by a single `\n` (0x0A), no trailing newline, UTF-8. Signature = `Ed25519.sign(canonical, secret_key)`.

## Public key

- Algorithm: Ed25519 (RFC 8032)
- Key id: `synapse-ia-2026-d5c611`
- Public key (base64): `K/kTLHKpECbCylRI5/nt58oTVQr8VRzDEyDoCdXRSe0=`
- Fetch anytime: `GET https://www.synapseconnexion.com/ia/cle`

## Verify offline (Python)

```python
import base64, json, hashlib
from nacl.signing import VerifyKey   # pip install pynacl
recu = json.load(open('recu.json'))
pk = base64.b64decode('K/kTLHKpECbCylRI5/nt58oTVQr8VRzDEyDoCdXRSe0=')
canon = '\n'.join([recu['id'], recu['horodatage'], recu['service'], recu['demande_sha256'], recu['resultat_sha256']]).encode()
VerifyKey(pk).verify(canon, base64.b64decode(recu['signature_base64']))  # raises if invalid
```

Or online, always free: `POST https://www.synapseconnexion.com/ia/verifier` with the receipt → `{"valide": true}`.

## What a receipt proves, and what it does not

- Proves: Synapse observed `resultat` for `demande` at `horodatage`, and neither has been altered since (you can recompute both hashes from the JSON you kept).
- Does not prove: what you did next, that the page stayed online, that a mailbox exists (see limites.md), or anything about a heartbeat other than *when you declared it*.
- Keep the full response alongside the receipt: hashes alone cannot be inverted.
