aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/vectors.rs
Commit message (Collapse)AuthorAgeFilesLines
* keys: a party's key may be ecdsa-sha2-nistp256, its signature low-S onlyslopulus80 min.1-0/+44
| | | | | | | | | | | | | | | | | | | | 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.
* vectors: the snapshot after a checkpoint, as a run printed ittv18 hours1-1/+4
|
* vectors: a snapshot after a checkpointtv18 hours1-0/+75
| | | | | | | The snapshot of a compaction after the store moved to a checkpoint, built from a document every run builds alike: its change's hash and bytes, which a run of this code prints, as no script apart encodes Automerge. Left empty until a run prints them.
* federation: the changes founding a swarm, fixedtv20 hours1-29/+55
| | | | | | | | The changes founding the swarm of the vectors' first version's root, and those founding the fork whose root is the fork vector's, keeping tv's write, each by its hash and its bytes, as a run of this code printed them: Automerge encodes them, so no script apart computes them. Checked apart so far: each hash the SHA-256 of its change's chunk, each writer the first 16 bytes of its root's ID, the fork's second change built on its first.
* federation: the changes founding a swarm printed, to be fixed as vectorstv21 hours1-0/+41
| | | | | | | An ignored test prints, each by its hash and its bytes, the changes founding the swarm of the vectors' first version's root, and those founding the fork whose root is the fork vector's, keeping tv's write: Automerge encodes them, so no script apart computes them, and they are fixed once printed by a run of this code.
* federation: a fork's root and its ID, fixedtv21 hours1-0/+21
| | | | | | A vector computed apart, as the others: the root of a fork of the vectors' first version at tv's write, keeping it, by the version after the first; its bytes, read back, and its ID.
* federation: fixed bytes of events, versions, roots and sizestv26 hours1-0/+125
Vectors (`docs/federation-tests.md`, Fixed bytes) for a write and its signature and ID, the first version of two parties and its hash, the root it makes and its ID, a version event, an event whose value holds names that UTF-16 units sort otherwise than bytes, and events at federation 1's sizes and just past them: 256 KiB, 32 segments of 255 bytes, 64 nodes, integers to 2⁵³. Each value was computed apart from this code, by a script of its own: JCS by hand, Ed25519 by another library, and the signature's blob as OpenSSH's `PROTOCOL.sshsig` describes it, as `ssh-keygen -Y sign` makes it. Checking one against `ssh-keygen` itself is left to whoever has it at hand.