aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/federation.md35
1 files changed, 24 insertions, 11 deletions
diff --git a/docs/federation.md b/docs/federation.md
index d2a0602..6021dea 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -115,25 +115,37 @@ Spread out:
* **`deps`**: the IDs of its dependencies, as 64 lower-case hex digits, one at least,
ascending, none twice; a client gives the heads it read.
-* **`party`** and **`key`**: the party that signs it, and the key it signs with, an
- `ssh-ed25519` key without its comment.
+* **`party`** and **`key`**: the party that signs it, and the key it signs with:
+ `ssh-ed25519`, one space, and the key's base64, padded and canonical, with no comment.
* **What it does**, one of: `write`, a value at a place (The policy); `keys`, the
party's key set (Keys); `nodes`, its node list (Nodes); `proposal` and `vote`
(Changing the policy).
-* **`sig`**: an SSH signature by `key` (`ssh-keygen -Y sign`, namespace
- `continuum-federation`) over the event's bytes without `sig`, unarmored, in base64.
+* **`sig`**: an SSH signature (`ssh-keygen -Y sign`, namespace `continuum-federation`)
+ over the event's bytes without `sig`: the SSHSIG blob of version 1, hashed with
+ `sha512`, its key the event's `key`, in base64, padded and canonical, unarmored. It is
+ checked as continuum checks a user's signature, strictly *(checked:
+ `access::sshsig::verify_blob`)*.
Three things no party signs, as their bytes need no signer, each without `party`, `key`
and `sig`: a version event (Changing the policy), and a federation's root and a fork's,
which are checkpoints (Checkpoints).
An event is none if its bytes aren't the JCS encoding of the JSON they read as, if a
-field is missing or more, or if it is larger than the federation allows, which is within
-what a sync message carries. It names no swarm, no version and no ID of its own: its
-history says the first two. An event signed in a federation, or in a fork once it
-forked, has that store's root in its history, and no other store takes it
-([`store.md`](store.md), Forks). An event is **written under** the version current at
-its history (Changing the policy).
+field is missing or more, if its `key` or `sig` doesn't read back to itself spelled as
+above, or if it is larger than the federation allows. So nobody but its signer makes
+another event of what a party signed. Federation 1 allows:
+
+* an event of up to 256 KiB, with up to 64 dependencies;
+* a party with up to 16 keys, in its version or its set, and a node list of up to 64
+ nodes;
+* a path of up to 32 segments, each of up to 255 bytes;
+* in values, numbers that are integers from −2⁵³ to 2⁵³, and strings of whole Unicode
+ characters, no surrogate alone.
+
+It names no swarm, no version and no ID of its own: its history says the first two. An
+event signed in a federation, or in a fork once it forked, has that store's root in its
+history, and no other store takes it ([`store.md`](store.md), Forks). An event is
+**written under** the version current at its history (Changing the policy).
### The policy
@@ -163,7 +175,7 @@ out:
* **The federation** it follows, and its **number**, one more than that of the version
it changes (of the highest, for a merge's).
* **The parties and their keys** (`keys`): one party at least, each by name, as
- continuum's user names, 1 to 64 of `A-Z a-z 0-9 . _ @ -` but not `@`, with one
+ continuum's user names, 1 to 64 of `A-Z a-z 0-9 . _ @ -`, with one
`ssh-ed25519` key or more, compared as keys (their comments aside), none twice in the
version. With them the party signs its votes and proposals on this version, its key
set and its node list (Keys, Nodes). Its `since` is the number of the version that
@@ -627,6 +639,7 @@ crafted events. *Sim*: a simulation. *Bench*: measured, not judged.
| 65 | An identifier given to different parties on two sides, then a merge | The merge's rules say whose values count; the others' aren't kept | unit |
| 66 | A merge's root keeping a value that didn't count on its side, or at a place its version gives another | Nodes holding that side build the root, find it differs, and don't join; others take it on their operator's word | sim |
| 67 | Events a side writes after a merge's heads, brought to the merge | Never taken: their history lacks its root; their party signs them again | unit |
+| 68 | A party's event spelled anew by another: its `sig` or `key` encoded otherwise, its signature's S not canonical, its blob naming another key | None: `key` and `sig` read back to themselves, the signature is checked strictly, and the blob's key is `key` | unit |
## Roads not taken