Erasure Proof — signed erasure certificates
When a fact is deleted, GRAFOMEM Cloud can issue an Ed25519-signed erasure certificate: a record that the fact was removed from the memory store, a BLAKE2b-128 digest of what was removed (no content retained), what was observed in each subsystem, and when. Certificates are appended to a hash-chained ledger that can be verified end to end.
A certificate is signed evidence that an erasure was performed and what the server observed at that moment. It is tamper-evident (a modified certificate fails signature verification; a modified ledger fails chain verification), not tamper-proof. It is one input to a GDPR Article 17 record, not a compliance verdict.
Two ways a certificate gets issued
| Path | When | Content hash | Store check |
|---|---|---|---|
POST /v1/stores/{id}/delete | the normal delete | server-observed: the server reads the fact before deleting and hashes what it read | read-back after delete; the certificate is refused if the fact is still present |
POST /v1/erasure/issue | you deleted the fact some other way and want a certificate after the fact | caller-asserted: you pass fact_content, the server hashes it; it cannot check it was the real content | read-back; 409 if the fact is still present |
Both paths probe the primary store and record what they found. Subsystems that are not probed are recorded as unverified, never silently as absent.
The delete path
1. POST /v1/stores/{id}/delete {"ref": 42}
↓
2. Server reads fact 42 (pre-delete content)
↓
3. Backend hard-deletes it
↓
4. Server reads back: still present → HTTP 500, no certificate
↓
5. fact_content_hash = BLAKE2b-128(pre-delete content)
coverage = {"primary": "absent", "decision_trail": "absent" | "unverified", ...}
↓
6. Certificate Ed25519-signed with the platform key, appended to the ledger
Certificate schema
| Field | Type | Description |
|---|---|---|
certificate_id | string | BLAKE2b-128 hex digest |
tenant_id | string | Tenant that requested erasure |
fact_ref | int | Memory ref that was deleted |
fact_content_hash | string | BLAKE2b-128 of the content — server-observed on the delete path, caller-asserted on /issue; null when neither was available |
coverage | object | Per-subsystem observation: present, absent, or unverified (not probed) |
scrubbed_decision_ids | string[] | Decision Trail records whose references were redacted |
erasure_requested_at | datetime | When erasure was requested |
erasure_completed_at | datetime | When erasure completed |
legal_basis | string | e.g. "GDPR Article 17 — Right to Erasure" |
requested_by | string | data_subject, dpo, or automated |
signature | base64 | Ed25519 signature (null when no signing key is configured) |
public_key | base64 | Signer's public key |
verified | bool | true means signed at issuance. It is not an independent verification — call /verify for that |
verification_note | string | e.g. "Ed25519-signed at issuance" |
The ledger
Every certificate is appended to the erasure ledger with a sequence number and entry_hash = SHA-256(prev_hash ‖ canonical(entry)). The chain starts at a genesis row. GET /v1/erasure/ledger/verify recomputes the whole chain and reports every break by seq:
{"ok": true, "rows": 26, "problems": []}
A restore-after-backup scrub verifies the chain first and records the result alongside its stats.
The ledger lives in the same database as the data it records, so a database restore rolls both back together: erasures performed after the backup was taken are not re-applied automatically. The hash chain (added 2026-11-06) makes tampering with or truncating the ledger detectable; it does not make the ledger survive a restore. This notice stays until the ledger is relocated to an independent store.
API reference
POST /v1/erasure/issue
Issue a certificate for a fact that has already been deleted. This endpoint does not delete anything.
curl -X POST https://api.grafomem.com/v1/erasure/issue \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fact_ref": 42,
"fact_content": "Aria lives in Rome",
"requested_by": "data_subject"
}'
| Response | Meaning |
|---|---|
200 + certificate | fact absent from the primary store; certificate issued |
409 {"status":"not_issued","reason":"fact_still_present"} | the fact is still there; nothing issued |
fact_content is hashed, not stored — and not checkedThe server cannot see the deleted content, so the hash on this path records what you said the content was. If you need a server-observed hash, delete through POST /v1/stores/{id}/delete.
GET /v1/erasure/stats
Totals: certificates, decisions scrubbed, signed count, first/last erasure.
GET /v1/erasure/ledger/verify
Verify the ledger hash chain. Returns {ok, rows, problems}. A ledger that was never sealed (migration not applied) is reported as not ok.
GET /v1/erasure/{certificate_id}
Retrieve one certificate.
GET /v1/erasure/{certificate_id}/verify
Recompute the canonical digest and verify the Ed25519 signature against the stored public key:
{
"valid": true,
"certificate_id": "28b5813a622ed648...",
"detail": "Ed25519 signature verified — certificate is authentic"
}
GET /v1/erasure/fact/{fact_ref}
Find the certificate for a fact ref.
GET /v1/erasure/
List the tenant's certificates (paginated).
Configuration
Certificates are signed only when a signing key is configured. Set a hex-encoded 32-byte Ed25519 seed:
export ERASURE_SIGNING_KEY=$(python3 -c "import secrets; print(secrets.token_hex(32))") # or GRAFOMEM_SIGNING_KEY
grafomem serve -b postgres --db postgresql://...
Without a key, the service issues unsigned certificates (signature: null, verified: false) and the GDPR Art 17 report finding is PARTIAL.
What is not covered
- Per-record delete destroys no key: embeddings and content are removed by the backend's hard-delete, not by cryptographic erasure.
- Subsystems the service does not probe are reported as
unverified; a certificate never claims more than was observed.