aboutsummaryrefslogtreecommitdiffstats
path: root/docs/guides/federation/keys.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/guides/federation/keys.md')
-rw-r--r--docs/guides/federation/keys.md31
1 files changed, 30 insertions, 1 deletions
diff --git a/docs/guides/federation/keys.md b/docs/guides/federation/keys.md
index 48018a3..3dd2834 100644
--- a/docs/guides/federation/keys.md
+++ b/docs/guides/federation/keys.md
@@ -25,12 +25,41 @@ continuum-party --node http://tv:secret@localhost:3000 --key laptop.key \
Each key goes as one argument, an `authorized_keys` line; its comment is left out. A
set holds up to 16 keys. A node voting by itself keeps a key its version names on that
-node (`--store-vote-key`): one stolen there votes for the party.
+node (`--store-vote-key`), an Ed25519 key in a file: one stolen there votes for the
+party.
A set counts where it is written under a version numbered at least the `since` the
current version gives the party's keys: once a version names a party's keys anew, no set
written before counts, and the party writes its set again.
+## Keys in an ssh-agent
+
+A key no file holds signs through an ssh-agent holding it: a smartcard's or a security
+key's PIV key, which the agent reaches through PKCS#11 (`ssh-add -s`), or a key in a
+Secure Enclave or a phone, held by an agent there. Such a key is `ecdsa-sha2-nistp256` or
+`ssh-ed25519`. A security key's FIDO key (`ssh-keygen -t ecdsa-sk` or `-t ed25519-sk`,
+its type ending in `@openssh.com`) is neither: it signs otherwise than the federation
+takes, and is no party's key.
+
+Give the client its public key as `--key`, the key itself (an `authorized_keys` line) or
+a file holding it: it asks the agent at `SSH_AUTH_SOCK` to sign, and writes the signature
+as `ssh-keygen -Y sign` does through that agent. Of a file holding several keys (all
+`ssh-add -L` lists, say), the first signs, and the client warns: give another itself to
+sign with it. An agent that doesn't hold the key given signs nothing, and the client stops
+before it records or puts what it would have signed.
+
+```sh
+ssh-add -L # ecdsa-sha2-nistp256 AAAA… tv@phone
+ssh-add -L | grep tv@phone | cut -d' ' -f1,2 # the key as a version or a set names it
+continuum-party --node http://tv:secret@localhost:3000 \
+ --key "$(ssh-add -L | grep tv@phone)" --record tv.record \
+ write home/tv/motd '"from the phone"'
+```
+
+Of an ECDSA signature, `s` and the curve's order less `s` both check. The federation
+takes the low one alone, so that nobody makes another event of what the party signed;
+the client makes `s` low, whichever the agent gives.
+
## Changing the keys of a set
A write counts only while the key that signed it is among the party's keys: what a key