0.6: owners keep their place in line#

Status: design for version 0.6, revised after an independent security review of the design and another of the code. Parts marked "0.7" are described so that the formats do not change later.

An owner should not depend on one registry to prove that they were first. In 0.6 the proof travels with the owner. A stamp can leave a registry with everything needed to show when it was logged. Another registry checks that proof by rule. Where the proof meets a conflict, a person decides with the proof in hand.

1. What "first" means#

Clocks can be wrong, and a registry could lie about its own clock. So "first" is defined by order in a log, and by clocks that the registry does not control.

Within one registry. An entry's place in line is its position in that registry's log. A lower position is first. The time written in the entry plays no part.

Across registries. A registry's own witnesses do not give an independent clock. A witness chooses the time it signs, and a registry may run its own witnesses, as Grantstamp does today. So across registries, an entry's time is bounded only by parties the other registry trusts:

Entry A is first over entry B when A's upper bound comes before B's lower bound. When the windows overlap, a case decides.

In 0.6 these bounds are recorded and carried with every stamp that moves, but registries do not yet order stamps by them. A conflict across registries goes to a case. Ordering by Bitcoin, checked by the registry itself, comes in 0.7.

When a stamp moves. Its record keeps where and when it was first logged. In 0.6 a stamp moves once: a stamp that was moved cannot move again with its first place in line.

2. An anchor every hour#

The project's cosign job runs every 30 minutes. Once an hour, if the log has grown since the last anchor, it saves the newest cosigned checkpoint as <size>.checkpoint, timestamps it with OpenTimestamps, and lists it in index.json. It also upgrades the timestamps still pending. The files live on the anchors branch and are copied to https://grantstamp.io/registry/anchors/.

grantstamp audit --anchors checks every anchor against the current log and reports which ones Bitcoin has confirmed. ots verify checks a block.

3. Export#

grantstamp owner export writes one JSON file:

From 0.6 the owner's register and files claims also sign sent, the digest of each upload as sent. The client keeps every upload in ~/.grantstamp/bundles/. A stamp registered before 0.6, or with no owner claim, cannot move with its place in line.

4. Moving a stamp#

Two registries are involved: the origin and the destination. The destination lists the origin as a peer, with its address, log policy and signing keys pinned by its operator.

A move ticket from the origin. grantstamp owner move --to URL asks the origin for a ticket (typ: grantstamp-move+jws), signed with the origin's registry key. It names the owner's key, the destination, and each stamp with its policy and listing as they are now. The origin issues it only when the key is current, while no proven recovery of the owner's key waits to take effect, and not for 7 days after the current key cancels a proven recovery, since a thief holding the key could cancel it. Each stamp must be active, not part of a case an arbiter is acting on, and not itself moved in. A case nobody has reviewed yet, or a recovery merely requested, blocks nothing: anyone can open one. The ticket names such cases, and the destination keeps them with the stamp. A ticket lasts an hour. So once an owner's recovery is proven, a stolen key cannot carry their stamps away before the operator can look, and a stamp the origin suspends can leave only on a ticket issued in the hour before.

The import. POST /v1/stamps/import, signed with the same key, carries the ticket and one stamp from the export. The destination checks:

  1. the ticket: signed by a listed peer and naming it as the issuer, current and lasting at most an hour, naming this registry, this key and this stamp
  2. each upload: its entry, rebuilt from its opening, is in the anchored checkpoint, which carries the peer's log signature and its witness quorum. Each upload is a separate entry, in log order
  3. the claims: signed by the owner's own keys at the destination, never by keys the peer names, and naming the files and the digest of the upload as sent, which must match the upload in the request
  4. that this origin stamp was never imported here before, keyed by the peer's log and not its address
  5. the owner's later policy and listing claims: signed by the same keys, and ending where the ticket says the stamp is now.

Then the content is checked against the destination's stamps, as in a registration.

The owner's own keys at the destination are the ones that count: the current ones, and ones the destination itself saw replaced. A peer's word is never enough, or a peer could give an owner's stamp to another account. So a stamp signed with a key the owner has since replaced moves only to a registry that knew that key as the owner's. - With a conflict, the import is refused with a signed refusal, and a case is opened against the conflicting stamp with the verified proof attached. The case names the uploads that hold the matching files, and when their witnesses vouched for them. An arbiter decides.

5. Identity that travels#

A registry signs what it checked about an owner (typ: grantstamp-identity+jws): the owner's key, the identity level, the name only where the name itself was checked, and an expiry 90 days later. It never includes a LinkedIn name, subject or profile. It does not attest identities that came from another registry.

Another registry accepts it when a listed peer signed it, for a key the owner holds there, before it expires. It is shown as "attested by" that peer, it stops counting when it expires, and it never counts as proof of being a publisher.

6. Case decisions signed by an arbiter, and appeals#

Arbiters keep their keys on their own machines. The registry holds their public keys, lists them in its descriptor, and logs the list whenever it changes.

Today there is one arbiter, the maintainer. The case record says so.

7. What the reviews of the code changed#

Three independent reviews checked the code before release. The first made twenty findings, from security problems to missing tests. The second checked those fixes and found four more problems, one of them serious. The third found two more bugs and some smaller points. All of them are fixed and tested, except one change that older clients notice, which the changelog describes. The main ones:

Two smaller points wait for a later version: the registry's container image installs its dependencies unpinned, and the website's build job holds more permissions than it needs.

8. Outside 0.6#

Source of this page on GitHub. Documentation for Grantstamp 0.6, licensed CC BY 4.0.