# Identity backup signing and permanent names

`RECOVERY_SIGNING_KEY` is an independent provider ES256 authority, encoded as a JSON object with `kid` and `privateJWK` (a P-256 signing JWK). It is not the credential-encryption key, an account key, or a passkey. Keep it in Worker secrets or the self-host's private environment. Never publish its private JWK. The current public authority is available at `GET /api/recovery/authority`; clients trust that explicitly selected same-origin service, not a key or URL supplied by a recovery file.

Node reads `RECOVERY_SIGNING_KEY` when supplied and otherwise persists its initial authority in its private data directory with mode0600. Preserve these keys through restarts and backups. Provisioning a secret alone does not update the application; deploy the corresponding routes before opening signup.

Do not blindly replace the authority. This version verifies against the configured signing authority only; a completed historical-key rotation, revocation and recovery migration flow is not implemented. Rotation must remain disabled until that flow exists and has been independently reviewed. Preserve the account's existing signing/encryption keychain and `KEY_ENCRYPTION_KEY` too; losing the encryption key cannot be repaired by replacing the provider signer.

New accounts use UUIDv4 identities and `n.<Crockford Base32>` names allocated from 64 durable counter lanes. Permanent name claims and numeric allocation records are separate from disposable account state. Back up every namespace shard and each lane's high-water state. Never restore an old namespace snapshot and reopen writes without proving complete claim continuity. Lost ledger/high-water continuity requires an allocation halt and verified reconciliation. Existing populations need verified permanent-claim backfill before rollout; opportunistic grandfathering is not proof of a complete migration.

Custom names are additional aliases. A verified historical paid order can establish permanent eligibility; cancellation does not clear it. Payment history is checked only when needed for an explicit claim, with a bounded scan. Billing credentials, catalog validation and actual paid-order joins are required for first-time eligibility. Already verified eligibility survives billing disablement and catalog changes within the same Polar environment. Sandbox history does not authorize production claims. No live Polar payment acceptance is claimed.

Recovery files contain no handles: the encrypted payload holds the UUID, private identity keychain and reset credential, with a provider signature. Authenticated users download public handle certificates separately from Account & security. Both numbered and custom names resolve to the same retained UUID. Recovery preserves existing permission/revocation records; it cannot recreate a completely deleted identity or restore missing keys, inboxes or grants. Missing-account reconstitution remains a separately gated implementation task.

See [identity names](../spec/identity-names.md), [recovery identity](../spec/recovery-identity.md), and independent audit. Public account creation and production release remain gated.

## Public signup control

`SIGNUP_ENABLED=true` opens account creation independently of full release certification. Production requires a nonempty `TURNSTILE_SITE_KEY`, matching `TURNSTILE_SECRET_KEY`, `KEY_ENCRYPTION_KEY` and `RECOVERY_SIGNING_KEY`. Missing configuration closes signup in both the public config and POST handler. Explicit `SIGNUP_ENABLED=false` closes signup even when `RELEASE_READY=true`; when omitted, legacy release gating remains available. Local development retains its existing isolated setup behavior. The frontend uses the public site key; keep it in deployment vars so a later deploy does not overwrite dashboard configuration with an empty value. Credentials and mandatory recovery setup, accepted terms and network admission limits remain enforced.

## Verified contact at activation

Set `SIGNUP_CONTACT_REQUIRED=true` for public signup. A pending account must confirm an eight-digit email code or acknowledge an encrypted Web Push setup challenge before recovery confirmation can activate it. Configure `MAIL_ENABLED=true` with a delivery binding, or `PUSH_ENABLED=true` with matching VAPID public/private keys. The public config exposes setup transport availability separately from routine notifications. Existing active accounts are not retroactively blocked by this new-account requirement.

