aboutsummaryrefslogtreecommitdiffstats
path: root/docs/federation.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/federation.md')
-rw-r--r--docs/federation.md47
1 files changed, 31 insertions, 16 deletions
diff --git a/docs/federation.md b/docs/federation.md
index 7b453af..5faa478 100644
--- a/docs/federation.md
+++ b/docs/federation.md
@@ -46,7 +46,8 @@ What an adversary can do:
* delay or drop messages between any nodes, short of forever between honest ones;
* steal another party's key.
-What it can't: forge an Ed25519 signature, or find two byte strings with one SHA-256.
+What it can't: forge an Ed25519 or ECDSA signature, or find two byte strings with one
+SHA-256.
Out of scope: keeping anything from being read (every party reads all of it), hiding who
talks to whom, and a party's own machine taken over whole (then the adversary is that
@@ -125,11 +126,12 @@ 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:
- `ssh-ed25519`, one space, and the key's base64, padded and canonical, with no comment,
- its 32 bytes an Ed25519 public key. Keys in a version and a key set are spelled so
- too, and node IDs as continuum spells them: `continuum:` and the 64 lower-case hex
- digits of the node's Ed25519 public key.
+* **`party`** and **`key`**: the party that signs it, and the key it signs with: its
+ type, one space, and the base64 of its SSH encoding, padded and canonical, with no
+ comment. Two types: `ssh-ed25519`, its 32 bytes an Ed25519 public key, and
+ `ecdsa-sha2-nistp256`, its point on NIST P-256 uncompressed. Keys in a version and a
+ key set are spelled so too, and node IDs as continuum spells them: `continuum:` and
+ the 64 lower-case hex digits of the node's Ed25519 public key.
* **What it does**, one field of:
* `write`, `{"path": "<path>", "value": <value>}`: a value at a place (The policy);
* `keys`, `["<key>", …]`: the party's key set (Keys);
@@ -141,9 +143,14 @@ Spread out:
* **`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`, its reserved field empty, as `ssh-keygen` writes
- it, in base64, padded and canonical, unarmored. It is checked as continuum checks a
- user's signature, strictly *(checked: `access::sshsig::verify_blob`)*, which takes
- `sha256` too, and any reserved field: the federation asks `sha512` and an empty one.
+ it, in base64, padded and canonical, unarmored. An Ed25519 signature is checked as
+ continuum checks a user's signature, strictly *(checked:
+ `access::sshsig::verify_blob`)*, which takes `sha256` too, and any reserved field: the
+ federation asks `sha512` and an empty one. An ECDSA signature is over the SHA-256 of
+ what it signs, as SSH signs with such a key. Its `s` and the curve's order less `s`
+ both check, so the federation takes the low one alone, at most half the order, and `r`
+ and `s` each as SSH's shortest mpint *(checked: `federation::keys`)*. `ssh-keygen`
+ makes either; a party's client makes `s` low.
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,
@@ -193,12 +200,13 @@ current at its heads, Forks). Spread out:
* **The federation** it follows, and its **number**, one more than that of the version
it changes.
* **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 . _ @ -`, with one `ssh-ed25519` key
- or more, 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 named them anew: this one's where it does (a party new in
- it, keys the parties replace, or the same keys named anew), else the `since` the
- version it changes gives the party, whose keys it then names unchanged.
+ continuum's user names, 1 to 64 of `A-Z a-z 0-9 . _ @ -`, with one key or more
+ (`ssh-ed25519` or `ecdsa-sha2-nistp256`, Events), 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 named them anew: this
+ one's where it does (a party new in it, keys the parties replace, or the same keys
+ named anew), else the `since` the version it changes gives the party, whose keys it
+ then names unchanged.
* **The node lists** (`nodes`): every party's, a list of node IDs, none twice, with its
`since` as keys have one. The version that lets a party in names its list anew, empty
where it gives it no nodes, so that a list it wrote before it was taken out counts no
@@ -691,7 +699,7 @@ crafted events. *Sim*: a simulation. *Bench*: measured, not judged.
| 59 | Two checkpoints proposed at once, by nodes voting by themselves | The votes split; nays from the nodes backing one make the other dead, and its backers are free | sim |
| 60 | Two nodes of one party, each voting by itself | They can vote twice, answered as any party voting twice: a party has one node vote by itself | — |
| 61 | A key a version names, kept on a node that votes by itself, stolen with it | As 23: it counts while that version is current | unit |
-| 62 | 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 |
+| 62 | A party's event spelled anew by another: its `sig` or `key` encoded otherwise, its signature's S not canonical (of ECDSA, the order less `s`, or `r` or `s` with zeros more in front), its blob naming another key | None: `key` and `sig` read back to themselves, the signature is checked strictly (of ECDSA, `s` low and `r` and `s` each its shortest), and the blob's key is `key` | unit |
| 63 | A node joining from the root is shown a chain old keys grew, beside the one the others took | It takes neither, and reports; once a checkpoint passed, it joins from a pinned one, where that chain is refused | unit |
| 64 | Checkpoint heads before the current checkpoint, or at which it isn't current, or one in another's history | No version: a version event naming it is refused | unit |
| 65 | After a checkpoint, a party that backed a second proposal once its first was dead, the nays that freed it withheld by those who cast them | Not named: its client keeps those nays with its `true` | unit |
@@ -786,6 +794,13 @@ moves to it by a version of its policy that names it (`"federation": 2`), which
parties pass once their nodes run a continuum that knows it. A node that doesn't know
the federation, or a version, its swarm has stops taking events and says so.
+A change that only has the federation take what it refused, and reads nothing it took
+otherwise, keeps the number: the keys of type `ecdsa-sha2-nistp256` taken beside Ed25519
+ones are such a change. It is rolled out first and used after: every node runs a
+continuum that takes it before any party uses it. A node that doesn't refuses what uses
+it, a version naming such a key among them, and reads otherwise than the others until
+it does.
+
## The registry on it
The krebs registry today: users, their hosts, the hosts' names, addresses and keys, as