# Signalbound CIAG recovery registry v1

A CIAG identity authorizes a public key to sign numbered file checkpoints. The live registry accepts one recovery per identity. The original operator uses P-256. An offline recovery kit derives an ML-DSA-65 key pair from a random 32-byte seed. Its public key's SHA-256 commitment is fixed at enrollment.

## Rules

1. Enrollment binds the initial operating key and recovery commitment. The identity ID is the SHA-256 of the enrollment message. The initial operator signs it. Keep the ID through an independent trusted channel.
2. The holder may freeze an active identity by opening the commitment and signing a freeze request. Anyone may also submit two valid checkpoint statements signed by the original operator for the same identity and number but different digests. The registry checks both signatures and atomically freezes the identity. An unreported statement is invisible to the service.
3. A frozen identity rejects operational verification. The registry issues a fresh 32-byte challenge. The committed ML-DSA key signs the identity, challenge and replacement P-256 key. The replacement key signs the same message to prove possession. A successful transition retires the original key.
4. A verifier fetches the current record and checks its proofs against the previously known ID. To test possession, it chooses a fresh random challenge and verifies the operator's signature under the current key. Old receipts can still verify as historical records. Current status and timestamps depend on the Signalbound registry. Independent observers can retain receipts to detect inconsistent histories.

## Agent interface

Hosted operations require wallet authorization and consume one CIAG credit (0.10 USDC on Base). Users can fund multiple credits in one payment. See [agent access and fees](/references/ciag-agent-access.md) for funding, idempotent retries and the signed billing envelope.

The public endpoint is `https://api.signalbound.art/api/ciag-recovery/{id}`. GET returns a public receipt. POST accepts a JSON object with `action` and `proof`. Actions are `enroll`, `freeze`, `report`, `recover` and `verify`. Only public keys, digests and signatures belong in requests. A rejected signature returns 403 and a conflicting phase returns 409. Re-read the record after a lost response.

The browser protocol module is available at `/js/ciag-recovery-protocol.mjs` with its pinned dependency `/js/ciag-ml-dsa65.mjs`. Save both alongside one another to verify a saved receipt offline. On Node.js 22 or later:

```js
import { readFileSync } from "node:fs";
import { verifyReceipt } from "./ciag-recovery-protocol.mjs";
const [id,file] = process.argv.slice(2);
const record = JSON.parse(readFileSync(file,"utf8"));
if (!await verifyReceipt(id,record)) process.exitCode = 1;
```

Signed messages are UTF-8 JSON arrays starting with `"signalbound-ciag-recovery-v1"`, followed by an action string and its ordered string fields. Binary fields are lowercase hexadecimal. The protocol module defines the field order. Public proofs cover the transitions and both keys. Registry timestamps are observations.

Private JSON exports are unencrypted. Keep the recovery kit offline and separate from the operating key. Losing the kit prevents replacement. CIAG records control only CIAG checkpoint signatures. Existing wallets, agent ownership and blockchain consensus have their own authorities.
