Recovery eras

Continuity follows a relationship through the rotations a DID's own key signs. When that key leaks, or two of the peer's devices rotate apart, another signature from the same key cannot settle which successor is right. This page explains a proposed second level of authority, a recovery key named in the DID document, and the rule continuity would use to apply it.

Research. This rule is a design under study and is not in @estoc/continuity. The figures run a sketch written for this page. It covers the peer's side: rotations, recoveries and endings the peer signs, seen from DIDs of yours that stay put. Your own rotations follow the same rules and are described in prose.

If pairs, heads and confirmation are new, the continuity page introduces them. Here your DIDs are L and M, and the peer's are letters from A.

Two levels of authority

Level Signed by May
first-order, key the old DID's everyday key change the DID, its keys and its services, but not the recovery entry
second-order, recovery the recovery key the old document names take over, settle forks of the everyday key, and change the recovery entry

The level comes from the key that verified the signature, not from what the message says about itself. Each pairwise relationship is recovered on its own, and the recovering side can start from any DID it held in that relationship.

The era in the document

A did:peer:4 document carries the recovery key next to an era:

{
  "recovery": {
    "publicKeyMultibase": "z6Mk…",
    "era": "7f3a…"
  }
}

The era is an opaque random value. A wallet creates one with the first DID of a relationship, copies it on every first-order rotation and draws a new one at each recovery. It lives in the document because a did:peer:4 identifier is a hash of its document: the DID fixes the era, and a different era means a different DID. It is not a counter, since the rule only asks whether two eras are equal, and a number would invite ordering and last-writer-wins.

Eras

Inside one relationship, the peer DIDs that first-order claims connect form an era. Here A rotated to B, and B to C, with the everyday key, so A, B and C are one era. A recovery's successor starts an era of its own.

A recovery supersedes every first-order claim from its era and adds a derived link from each pair of that era to the successor. Whichever pair of the old era you ask from, the head moves to the new one.

Switch on r, a recovery A ⇒ D. f1 and f2 stay in history as superseded, and C(L,B) and C(L,C) reach C(L,D) along derived links.

Settling a fork

A's everyday key signed two successors, B and C. Two devices may have rotated apart, or someone else may hold the key. The first-order rule reports competing changes and picks neither, as continuity does today.

Switch on r. Both branches start in A's era, so the recovery supersedes both, the conflict is gone and every pair leads to C(L,D). Settling a fork like this is what the second level is for.

Recoveries in order, and in competition

D ⇒ F starts from D's era, which A ⇒ D opened, so it follows A ⇒ D instead of competing with it. The order between eras comes only from recoveries. Eras form a tree, with no clock and no counter.

Switch on r3, a second recovery from A's era, to G. Two recoveries from one era with different successors are a fork one level up. The model reports it and picks neither, and the pairs downstream are blocked with it.

This is the limit the second level keeps. A fork of the recovery key cannot be settled from the evidence. A third level would move the limit up once more; whichever level is the top, its own fork stays open.

What an old key can still do

A recovery revokes nothing. The retired everyday key can still sign, and its letters still arrive. The rule decides what they are worth.

Why binding compares the era

After A ⇒ D, a first-order D → E and a recovery E ⇒ F, a first-order A → E arrives late, signed with A's retired key and sent from E. Your peer's other device might have sent it, or someone holding both retired keys. A and E carry different eras, so binding rejects it.

Untick Binding compares era. x becomes a fact and joins A, D and E into one era. A ⇒ D now lands inside its own predecessor's era, and E ⇒ F competes with it. The model does not throw. It reports a conflict, so every replica stops at the same answer instead of failing on the same fact.

A relationship is a component

The figures group pairs by relationship, and the rule derives that grouping from the claims too. Each claim covers a rectangle of pairs, its local DIDs by its peer DIDs, and rectangles that share a local DID and a peer DID merge. The result is what one relationship means for recovery.

What the rule promises

What it leaves as it was: there is no revocation, so a retired key can still sign; a fork of the recovery key stays unsettled; and once the current recovery key leaks, no signature tells its owner from a thief.

Sandbox

Select a pair, then add facts at it. A rotation with the everyday key copies the era into the successor's document, and a recovery draws a new one. The scenario menu holds the cases above and a few more, such as a later first-order claim that reveals two recoveries from one era. The facts live in the page address, so a link reproduces what you see.