receipt_id is null. When your application then saves the AI response with that record’s receipt_id, EDN signs a second record that links the response to the SIP. Anyone with EDN’s public key can check that a record is genuine and unchanged, without contacting EDN.
The two records
EDN signs each record with Ed25519 over its exact content.
What the records show
- The
siprecord shows exactly what EDN returned to your application for an exchange, and when. - The
ai_responserecord shows which AI response your application saved for that SIP. - Together, they link each saved AI response to the context EDN supplied.
What the records do not show
EDN signs what it supplied and what your application reported. The records do not show which model produced the response, what else your application sent to the model, such as its own system prompt, or whether the SIP reached the model unchanged.How to use them
- Call Build a SIP and keep the
receipt_idit returns. - Send the SIP to your model and receive the AI response.
- Call Save a conversation turn with the exchange and the same
receipt_id. EDN returnsresponse_receipt_id. - Later, fetch both records with Get a signed record and EDN’s public keys with Get verification keys, then verify each record.
How to verify a record
- Decode
payload_b64to get the signed content. - Check that its SHA-256 matches
payload_sha256. - In Get verification keys, find the key whose
key_idmatches the record’skey_id. - Check
signature_b64over the decoded content with that key. - For an
ai_responserecord, compute the SHA-256 of the exact response text you hold and compare it withresponse_sha256in the signed content.
If signing fails
Signing never blocks a request. If EDN cannot save a record, Build a SIP returnsreceipt_id: null and Save a conversation turn returns response_receipt_id: null. The SIP is returned and the exchange is saved as usual.
