# Named suites

Available only where the operator has switched suites on (`KEYS_SUITES=on`); otherwise every `/suites` path answers 404 `suites_disabled`. Same API key as the rest.

A suite is a named, versioned set of algorithms with a status: `current` (new data is written under it), `deprecated` (still opens and verifies, nothing new is written), `retired` (refused). Unknown and retired suites are refused with 400 (`unknown_suite`, `suite_retired`); writing under a deprecated suite is 409 `suite_not_current`.

- `GET /suites`: the registry: suite, family (kem or sig), status, and whether this server can run it now.
- `POST /suites/keys` `{ name, suite }`: make a suite key (kem for encryption, sig for signing). A signature key's public parts are returned; nothing secret ever is.
- `POST /suites/encrypt` `{ key, suite, plaintext, aad? }` gives `{ envelope, suite }`. The hybrid suite combines X25519, ML-KEM-1024 and (where the server has it) Classic McEliece 8192128f: it stays safe unless every part is broken. The envelope is bound to your account and to `aad`.
- `POST /suites/decrypt` `{ key, envelope, aad? }` gives `{ plaintext, suite }`. A wrong key, account, aad or a damaged envelope is 400 `decrypt_failed`.
- `POST /suites/sign` `{ key, suite, message, domain? }` gives `{ signature, suite }`: Ed25519 and SLH-DSA-SHA2-128s together; both must verify.
- `POST /suites/verify` `{ key, message, signature, domain? }` gives `{ valid }`.
- `POST /suites/rewrap` `{ from, to, envelopes[], aad? }`: re-seals envelopes under a non-current suite to your key `to` (under the current suite). Items that cannot be moved are listed with the reason and left unchanged.
- `GET /suites/report`: your keys and operation counts per suite. `POST /suites/report` `{ envelopes?, signatures? }`: counts what is left under each suite and whether it needs rewrapping.

Stored suite secrets are wrapped by the key service. Where the operator sets `KEYS_SUITE_WRAP=hybrid`, newly stored ones are also sealed to a hybrid wrapping key; older records still open.

Not claimed: ML-KEM, SLH-DSA and the McEliece binding are new, unaudited in this service, and the McEliece part runs in a separate binary. The same operations count against your per-minute limit.
