aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/federation-tests.md7
-rw-r--r--docs/federation.md38
2 files changed, 28 insertions, 17 deletions
diff --git a/docs/federation-tests.md b/docs/federation-tests.md
index d7e4a43..6754060 100644
--- a/docs/federation-tests.md
+++ b/docs/federation-tests.md
@@ -29,7 +29,9 @@ built to: a stage is done when its tests are.
## The harness
* **Keys.** Ed25519 keys made from seeds, signing as `ssh-keygen -Y sign` does; a vector
- checks one signature against `ssh-keygen` itself.
+ checks one signature against `ssh-keygen` itself. An ECDSA key `ssh-keygen` made, and
+ events it signed with it, are vectors; a test signs through a running `ssh-agent`, and
+ `ssh-keygen -Y verify` checks what it signed, where OpenSSH is installed.
* **Events.** A builder for every kind (writes, key sets, node lists, proposals, votes,
version events, checkpoints, roots and forks), each from a party, a key and its
dependencies, encoded and signed as the design says; and for what is none: bytes that
@@ -115,7 +117,8 @@ Vectors for: an event and its ID; an event whose value holds names JCS sorts by
UTF-16 units otherwise than by their bytes (one from U+E000 to U+FFFF beside one beyond
U+FFFF); events at federation 1's sizes and just past them; a signature, a version and
its hash, a checkpoint and its ID, the genesis change of a federation's root and of a
-fork's, and a snapshot after a checkpoint. A vector that changes is a change of the
+fork's, a snapshot after a checkpoint, and a version naming an ECDSA key, with a write
+and a key set `ssh-keygen` signed with it. A vector that changes is a change of the
federation, which takes its next number ([`federation.md`](federation.md), Changing the
federation).
diff --git a/docs/federation.md b/docs/federation.md
index 7b453af..f30cdd4 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