# Trust without the registry

Edition 2026-10-30.

How a reader proves, with no call to anybody, that the authority behind a
record was accredited and is still in good standing. Two signed documents do it
together: an **accreditation chain** proves a body was accredited, and a
**standing staple** proves the accreditation still holds. Neither is enough
alone: a chain without a staple lets a suspended body's records verify cleanly
forever.

## Why a second path

A countersignature ([protocol.md](protocol.md)) proves the registry accepted a
revision, but only to a reader holding that registry's key. A chain proves the
issuing authority's standing from roots the **reader** chose to trust, so no
single operator sits in the trust path of a format whose premise is that
mirrors re-serve records and consumers verify them independently.

**The chain travels beside the record, never inside it.** A record is signed
and its revisions are an append-only history; a chain has a lifetime of its
own, since links expire and are re-issued. Inside the document, a
re-accreditation would force a new revision of every record the authority owns.
Outside, a mirror serves a fresh chain beside bytes that never changed, which
is where the countersignature and the staple live too.

## The hierarchy

Who may accredit whom. Delegation runs downward, a level may be repeated (a GNR
may accredit another GNR), and a level may be skipped (a GNTLR may accredit a
GNEA directly).

| Kind    | May accredit                     |
| ------- | -------------------------------- |
| `GNTLR` | `GNEA`, `GNDP`, `GNR`, `GNTLR`   |
| `GNR`   | `GNEA`, `GNDP`, `GNR`            |
| `GNEA`  | nobody                           |
| `GNDP`  | nobody                           |
| `GNIA`  | nobody: it is not on this axis   |

A body may hold several kinds. Accrediting it is allowed only when **every**
kind it holds is accreditable by **some** kind the issuer holds. Any-to-any
would let one accreditable kind carry every other kind past its own tier rule.

## An accreditation link

One delegation: an issuer saying what it gave a subject, and until when.

| Field         | Meaning                                                              |
| ------------- | -------------------------------------------------------------------- |
| `issuer`      | The accrediting body's slug.                                         |
| `subject`     | The accredited body's slug.                                          |
| `subjectKind` | The kind the subject was accredited as.                              |
| `subjectKey`  | The public key the subject signs with, base64url of 32 bytes.        |
| `remit`       | The scope rules delegated, as [scope.md](scope.md) defines them.     |
| `notBefore`   | RFC 3339, with an offset.                                            |
| `notAfter`    | RFC 3339, with an offset.                                            |
| `signature`   | The issuer's signature, in the `accreditation` context.              |

The signature covers every other field: the payload is the link without
`signature`, built into the pre-image [signing.md](signing.md) describes. No
other key is allowed. `subjectKey` matters most: it binds the chain to the key
that actually signed the record, and a link whose key could be swapped would let
any chain vouch for any signer.

**A link has no maximum lifetime.** It asserts that an accreditation happened,
which does not stop being true; whether it still holds is the staple's question,
at a cadence chosen for that.

An issuer publishes a link with `accreditation.link.issue`
([operations.md](operations.md)). The registry refuses one when:

- the issuer names itself as the subject;
- the hierarchy does not let the issuer's kind accredit `subjectKind`;
- `notAfter` is not after `notBefore`, or has already passed;
- `remit` is not contained in the issuer's own remit;
- the signature is not the issuer's, in the `accreditation` context, made with
  the issuer's active self-custody key;
- the registry does not show the subject as accredited by the issuer, or
  `subjectKey` is not one of the subject's active keys.

The registry records an accreditation that already happened; a link creates
none. It stores the issuer's bytes and signs nothing itself.

**One link per key.** The issuer links each of the subject's active keys, so
a record signed before a rotation still finds the link naming its key.
Issuing for a key replaces the issuer's earlier link for that key and drops
any link a previous parent left. A retired key's link is kept until its
`notAfter` and is not renewed, since a link names a key that is good now;
revoking a key deletes the links naming it.

## A chain

```json
{ "links": [ { "issuer": "a-root", "subject": "a-gnr", "...": "..." },
             { "issuer": "a-gnr", "subject": "acme", "...": "..." } ] }
```

Links run **root first**, so a reader learns where the chain begins from
`links[0].issuer` alone. A chain has at least one link and at most 16. The bound
is the same one the registry walks its own graph with; it exists because a chain
is data an attacker supplies.

### Verifying a chain

The reader brings the chain, its own **trust anchors** (for each: a slug, a
kind, a public key and, optionally, the remit it is trusted for), the **subject**
it wants proved, and the **key** it wants proved: the key that signed what it is
checking. A chain checked against nothing in particular proves only that it is
self-consistent, which any forger can arrange. Each step names the verdict it
fails with.

1. The chain parses (`malformed-chain`), is not empty (`empty-chain`) and has
   at most 16 links (`too-deep`).
2. `links[0].issuer` is one of the reader's anchors (`no-trusted-anchor`). The
   walk starts at that anchor: its slug, kind and key, and its remit if the
   reader gave one.
3. For each link, in order:
   1. `issuer` is the body the walk is at (`broken-link`).
   2. `subject` has not appeared before, the anchor included (`cycle`).
   3. `notBefore` is not in the future (`not-yet-valid`), and `notAfter` is
      still ahead (`expired`).
   4. The hierarchy lets the current kind accredit `subjectKind`
      (`kind-not-accreditable`).
   5. The signature's `publicKey` is the current key (`wrong-signer`): the
      anchor's for the first link, and after that the `subjectKey` of the link
      before. Never the key the signature names for itself.
   6. The signature verifies over the link without `signature`, and its context
      is `accreditation` (`bad-signature`).
   7. When a remit bounds the current body, the link's `remit` is contained in
      it (`remit-not-contained`), by the containment rule in
      [scope.md](scope.md). A chain cannot widen as it descends.
   8. The walk moves down: to `subject`, as `subjectKind`, under `subjectKey`,
      bounded by `remit`.
4. The walk ends at the expected subject (`subject-mismatch`) under the
   expected key (`key-mismatch`).

A chain that passes proves which anchor it reached and the remit that survived
containment all the way down. **It proves the accreditation happened, never
that it still holds.**

## A standing staple

One accrediting body's signed statement that a body beneath it is in good
standing, for one window. It is the OCSP-stapling model: short-lived, verified
offline, no call to the registry per lookup and no revocation list to
distribute.

| Field         | Meaning                                                                 |
| ------------- | ----------------------------------------------------------------------- |
| `subject`     | The body it is about.                                                   |
| `subjectKind` | The subject's kind.                                                     |
| `issuer`      | Who asserts it: the subject's accrediting parent, or the registry.      |
| `standing`    | `good`, `restricted` or `suspended`.                                    |
| `reason`      | Why, when the standing is not `good`. Free text, at most 200 characters. |
| `notBefore`   | RFC 3339, with an offset.                                               |
| `notAfter`    | RFC 3339, with an offset.                                               |
| `signature`   | The issuer's signature, in the `standing` context.                      |

The signature covers every other field, `notAfter` included, so a valid staple
cannot be lifted and re-dated. **A window is at most 72 hours.** It is a bound
readers rely on rather than a choice each issuer makes, so a staple claiming a
longer one is refused by every reader.

**A positive assertion, never a revocation list.** No staple means unknown
standing, never good standing, so a suspended authority cannot restore itself by
serving nothing. `restricted` is its own value: a restricted body still mints
and serves, so reading it as suspended would discard good records, and reading
it as good would hide a sanction published precisely so relying parties see it.

**Who issues one.** The subject's accrediting parent, with
`accreditation.staple.issue` ([operations.md](operations.md)), which the
registry stores and hands on verbatim. For a body with no accrediting parent,
which is a top-tier root, the registry issues it itself with its own key (the
one at `/.well-known/gavr-registry-key`), fresh for each request: valid from
five minutes before the request, for the full 72 hours. The registry refuses a
parent's staple when the parent names itself as the subject, when the hierarchy
does not let the parent's kind speak for `subjectKind`, when the window is
malformed, longer than 72 hours or already over, or when the signature is not
the parent's in the `standing` context.

### Reading a staple

The reader brings the staple, the subject it expects, and the **issuer's key**,
which the chain already proved: the key of the body one link above the subject
(the `subjectKey` of the link before the last, or the anchor's key when the
chain has one link). For a body the registry staples, it is the registry's key.
The checks run in this order, and the verdict is one of:

| Verdict                      | When                                                                                                                                                                                       |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `absent`                     | There is no staple. Unknown standing, not good standing.                                                                                                                                   |
| `invalid`                    | It does not parse; it is about another subject; its context is not `standing`; it is not signed by the issuer's key; its window is malformed or longer than 72 hours; or the signature fails. |
| `not-yet-valid`              | `notBefore` is in the future.                                                                                                                                                              |
| `stale`                      | `notAfter` has passed. Neither good nor bad: the parent may simply have had an outage.                                                                                                     |
| `good`                       | The window is open and the standing is `good`.                                                                                                                                             |
| `restricted` or `suspended`  | The window is open and the staple says so, with its `reason`.                                                                                                                              |

**A lapsed staple is its own verdict, never a failure and never a pass.**
Rendering stale as bad accuses a participant whose parent had an outage;
rendering it as good is the hole the staple exists to close.

## Where to get them

Both are public and unauthenticated reads of the registry. Nothing in either
response is trusted by a verifier, not the ordering, not the assembly, not the
fact that the registry served it: a chain fetched from a hostile mirror verifies
or fails identically.

| Read                              | Answers                                                                                                                                                       |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /authorities/:slug/chain`    | `{ "kind": "chain", "links": [...] }`; `{ "kind": "self-anchored" }` for a body with no parent; `{ "kind": "incomplete", "missingFor": "<slug>" }` when a link upstream has not been issued yet. `?key=<public key>` ends the chain at the link naming that key; without it, the most recently issued link. Each link further up is the one naming the key that signed the link below it. |
| `GET /authorities/:slug/issued`   | `{ "kind": "issued", "bodies": [...], "more": false }`: each body the slug accredits (at most 500, `more` when that cut the list) with its `kind`, `state`, `standing` as the registry sees it, `activeKeys`, `remit` (its scope rules, what a link delegates), and the `links` and `staple` this slug has lodged for it. What an issuer reads to keep them current. |
| `GET /authorities/:slug/staple`   | `{ "kind": "staple", "staple": {...} }`, or `{ "kind": "delegated", "stapledBy": "<slug>" }` when the parent has not published one.                          |

An unknown slug answers 404. `incomplete` and `delegated` are answers, not
errors: a network mid-rollout has edges whose links nobody has signed yet. A
parent's stored staple is served even after it lapses, so the reader sees
`stale` rather than nothing.

## Putting it together

To trust a record's authority without the registry:

1. Verify the record's signature as [signing.md](signing.md) describes, pinning
   the `record` context. That gives the signing key.
2. Fetch the owner's chain with `?key=` set to the signing key, and verify it
   against your anchors, with the owner's slug as the subject and the signing
   key as the key.
3. Read the owner's staple with the key of the body one link above it.

The registry keeps its live reads (`GET /authorities/:slug/standing`); this is
offline corroboration at scale, not a replacement for asking authoritatively
when it matters.
