| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A key held in hardware is never a file: only an ssh-agent signs with it. Given a public
key as `--key` (a `.pub` file, `ssh-ed25519` or `ecdsa-sha2-nistp256`), the client asks
the agent at `SSH_AUTH_SOCK` to sign what SSHSIG signs (a sign request with the key's
blob, no flags) and writes the blob around the agent's signature as `ssh-keygen -Y sign`
does. An ECDSA signature the agent gives with a high `s` is made low, the other of its
two spellings, which the federation takes. What it makes is checked before it is used.
A private key file signs as it did.
A test starts `ssh-agent`, adds an ECDSA and an Ed25519 key to it and deletes their
files, signs through it, and has both continuum and `ssh-keygen -Y verify` check each
signature, one of an agent's high-S answers among them. Without OpenSSH it asks nothing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A party's keys may be held where no file has them, in a Secure Enclave or a phone, and
those are ECDSA keys on NIST P-256. Everywhere a party's key counts (a version's keys, a
key set, the key an event is signed with) such a key is taken beside an Ed25519 one,
spelled as `ssh-keygen` writes it, without a comment: `ecdsa-sha2-nistp256`, a space,
and the base64 of its SSH encoding, its point uncompressed and on the curve.
Its signature is SSHSIG as an Ed25519 one is, hashed with `sha512`, its inner signature
over SHA-256 as SSH signs with such a key. ECDSA signatures are malleable: of `s` and
the curve's order less `s`, both check. So the federation takes one spelling alone: `s`
low, at most half the order, `r` and `s` each SSH's shortest mpint, and the blob reading
back to itself as an Ed25519 one does. What anyone makes of a party's signature is then
none, as before.
The vectors are a key `ssh-keygen -t ecdsa -b 256` made, a first version naming it, and
a write and a key set `ssh-keygen -Y sign` signed with it, each taken; the signature's
high-S twin, which checks as ECDSA, and its `r` spelled longer are none. Ed25519 keys and
signatures are spelled and checked as they were.
|
| |
|
|
|
|
|
|
|
| |
`continuum-party` takes its options (`node`, `token`, `key`, `record`:
`config::PARTY_OPTIONS`) on the command line and in configuration files of the node's
format: `--config`, repeatable, arguments winning, `--unset`, includes and imports. The
configuration's loader takes the options it reads as a table (`config::with_options`,
`config::merged`, `file::load_with`), the node's or the client's, and a key naming
none of them is an error in either; `node` and `token` are secrets, never logged.
|
| |
|
|
|
|
|
|
| |
`continuum-party proposals` lists the proposals on the current version at the node,
each with whether it passed or is dead and the parties voting `true` and `false`, as
`GET /events/counts` names them, and what its version changes of the current one, read
from an event proposing it, its signature checked: each field whose value differs, and
of `keys` and `nodes` each party's (`client::changes`).
|
| |
|
|
|
|
| |
The federation spells a key without a comment, so a key set holding a line's comment is
none. `continuum-party keys` takes each key as an `authorized_keys` line, one argument
each, and writes it as the federation spells it.
|
| |
|
|
|
|
|
|
|
|
| |
A record casts nothing on the version current when it began, as a `true` sent before
may be held back somewhere. A federation's first version is current from its start, so
a record begun at a node casts nothing on it, and with every party's begun so, no
proposal on it can pass. `continuum-party init PARTY --root FILE` begins a record from
the file the store's swarm starts from, for a party that never voted in it
(`Record::before`): nothing was sent before it, and it casts on every version, the
first too. A node voting by itself takes such a record as its `--store-vote-record`.
|
| |
|
|
|
|
|
|
|
|
| |
A node voting by itself, and a party's client, signed a vote on the heads
the node held: where those held what is beside a checkpoint's heads (a
party's writes made while the swarm was parted, say), the vote wasn't above
them, and a version event written on it was refused, so the checkpoint
never moved, though it passed. Both now vote on the events proposing what
they vote on, and a node proposes a checkpoint on the heads it names: so
their votes are above those heads wherever the proposal is.
|
| |
|
|
|
|
|
|
| |
`root FILE`: the root of the federation whose first version the file holds, as the
file its founders start its swarm from (`--store-root`). `fork FILE HEAD...`: the root
of the fork at those heads by the version the file holds, with the events it keeps, as
a node holding the federation builds it (`POST /admin/events/fork`). `check FILE`: what
a node finds of the fork whose root the file holds (`POST /events/fork`).
|
| |
|
|
|
|
|
| |
A party that has a node vote by itself votes by hand only through that node:
`continuum-party vote PROPOSAL yes|no --through` asks the node to cast it
(`POST /admin/events/vote`), by the record the node keeps, without a key or record of
the client's own.
|
|
|
A second binary, behind the `federation` feature: a party's client, which signs its
party's events with one of its keys (`--key`, an OpenSSH private key file), puts them
through a node's API (`--node`, its user and password in the URL, or `--token`), and
keeps its party's record (`--record`), by which it votes, written before a vote is
sent (`federation::party`, run by `continuum::party`):
* `init PARTY` begins a record of `PARTY` on the version current now;
* `write PATH VALUE`, `keys KEY...`, `nodes NODE...` and `propose FILE` sign events on
the node's heads, recorded, and put;
* `vote PROPOSAL yes|no` votes on the proposal of that hash on the current version, by
the record: with a `true`, the votes on its party's earlier proposal, from the node,
checked, kept as the nays that freed it;
* `again` signs again, of the latest event it signed at each place, its key set and its
node list, what the node refuses as not above its checkpoint's heads, or as built on
one it refuses;
* `twice RECORD...` names, from the records of parties' clients, a party that voted
twice.
The feature brings reqwest along, the client's HTTP.
|