Skip to content

Releases

Cosign 0.12.12

Choose a tag to compare

@sybenx sybenx released this 16 Nov 12:18

Cosign 0.12.12: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.12 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.11

Choose a tag to compare

@sybenx sybenx released this 16 Nov 12:05

Cosign 0.12.11: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.11 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.10

Choose a tag to compare

@sybenx sybenx released this 05 Nov 18:55

Cosign 0.12.10: far less relay traffic.

  • Servers ping each other once a minute instead of every 10 seconds, and count a server as up for two and a
    half minutes after hearing from it. They no longer ping devices on a timer: a phone or browser that pings a
    server (every 10 s while it runs) is answered at once, so an open app still sees its servers up and a closed
    one costs nothing. Every member pinging every other every 10 s, in every account, was most of a shared
    relay's traffic.
  • A decryption piece sent without its proofs is refused, and the partner that sent it is named (live finding
    16a). Every server since 0.12.7 sends them.

Cosign 0.12.10: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.10 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.9

Choose a tag to compare

@sybenx sybenx released this 03 Nov 17:46

Cosign 0.12.9

Two security fixes, both found by red teams on design documents that were reading this code for
other reasons. One is live and this release closes part of it; the other is latent and closed
outright. The scope of each is stated plainly below, because the first is a partial fix and a
release note that said otherwise would be wrong.

A joining phone needed a piece from the device whose invite you scanned — partial

Live finding 17. A phone joining an existing key has no member list yet, so welcome and
sigma are routed before any sender check — and nothing checked the sender afterwards either. From
one message the joining phone took the whole group: the key, the npub, the threshold, every member
and every point. need came out of that same message, so helpers: [x] made a single message a
complete enrollment. The invite carries only a pk and relays, and a join request's own pubkey is in
the clear on a public relay, so this was not a dishonest server's attack — anyone watching those
relays could answer, and the honest flow needs a welcome plus two sigmas, so an attacker won the
race without trying. The phone then held a share of a key the attacker controlled alone, and the
only cue was a truncated npub in a note.

Every piece now carries the pk that sent it, and for each new share one of them must come from the
inviter in the code the person scanned on this device. That pk is the only thing a scan
authenticates; the vouching device already sends its sigmas straight to the joining device; and an
attacker cannot stand in for it without that device's shares. Plus a floor of two distinct senders,
whatever helpers claims, so one message is never a quorum again.

What this does not close, and it is the path most joins take. The condition needs a scanned
inviter pk, which only exists when joining by someone else's cosign:invite — and the only thing
that produces one of those is the browser extension. A phone showing its own join code
(cosign:join) scans in the other direction: the existing device authenticates the joining one, and
the joining one learns nothing about who answers. The two-sender floor applies there and an attacker
with two keys satisfies it. So phone-to-phone joining is still exposed. Closing it needs the
joining device to have a first-hand copy of the group key, which means showing the npub and having
the person compare it — a screen, and a decision about how it should feel, not a condition that can
be added quietly.

The other half of the protection was already present and this release does not add a second copy of
it: repair_step3 verifies the repaired share against the commitment of the group it was handed, so
a sum that does not lie on that key's polynomial is refused by the library. The attack works only
because an attacker that supplies every piece supplies a consistent set. Forcing one honest piece
into the sum is what makes the library's own check bite.

A decryption partner must send a piece for every share it holds — latent

Each Chaum–Pedersen proof released in 0.12.7 speaks for one index and nothing else, and nothing
checked that a partner's parts covered its shares. A partner holding three that sent two passed
every check there was — each part verified, and comparing how many were checked against how many
were sent compares the answer against itself. The combined point was then one short, ecdhCombine
refuses only the identity, and the result was a value that is nobody's conversation key: a MAC
failure wherever the plaintext was wanted, with no member named, because every proof passed. A
repeated index did the same from the other side.

The set of indices in parts must now equal the partner's shares exactly, compared as sorted lists
so a duplicate is refused as well as a missing one. A partner that sends anything else is a partner
that failed, by name, and the next one gets a turn. Both sides: the server's frostEcdh and the
phone's sharedX, whose own check compared the answer against itself.

Latent rather than live, and the finding says so. It needs a partner that holds more than one
share and answers ecdh_req. A server holds one, so its answer is one part; a current device
refuses the request outright (§5.6); a paper backup holds two and is not a running process. It
becomes reachable with a device old enough to still answer. Fixed anyway, because it is one
condition, it fails closed, and the failure mode it closes is the one this code could not report.

The live half of the same lines is not fixed, and it is a compatibility decision rather than a
patch: verification is skipped entirely when a partner answers with an empty parts array, so the
proof regime is optional at the answering partner's choosing. Removing that branch means stating a
version floor. Written up as finding 16(a).

Where the phone fix reaches people

android/cosign is a submodule that Marble consumes, so the joining-phone fix reaches a phone only
through a Marble release. This release carries the protocol, the server image and the signing
libraries.

Tests

server/test/ecdh-cover.ts (10 checks) shows the wrong key with real crypto rather than asserting
it away. JoinWelcomeTest records the two facts the join fix rests on: an attacker supplying every
piece is not caught by the library, and one honest piece in the sum and it is. 32 Kotlin unit tests,
dleq, share-points, ecdh-cover, guards.e2e and create.e2e all pass; tsc clean.

Cosign 0.12.9: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.9 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.8

Choose a tag to compare

@sybenx sybenx released this 02 Nov 01:20

Cosign 0.12.8

One security fix. A share point from your member list is not evidence of anything, and your
servers were treating it as if it were.

What was wrong

When a server receives a piece of a signature from another member, it checks that piece against
the share point the member list says that member holds. The member list is written by your
servers and passed between them, so that check was asking a question and accepting the answer
from whoever might be lying.

A server willing to send one deliberately bad round could therefore have a member it invented
produce a piece that verified — by signing with a secret behind a point it chose. It could
not forge a signature: the finished signature is checked against your actual key and fails. But
the check happened before that, and its result was already written down: the mark that keeps a
member a server only ever heard about from reporting your devices lost, taking the account out,
cancelling a wait or adding a device. One bad round cleared that mark, permanently.

So the protection added in 0.12.5 against a server writing itself in as one of your devices was
bypassable by any server willing to fail one signature on purpose.

What changed

  • Pieces are now verified against share points rebuilt from your account's key rather than
    taken from the member list, and a server that cannot rebuild them refuses rather than falling
    back to what it was told.
  • The mark is cleared only after a signature that actually verifies, which is the only thing
    nothing but a real member could help produce.
  • The same correction applies to the proofs added in 0.12.7 for pieces of a decryption: they are
    checked against rebuilt points too.

Said plainly

Rebuilding the points is not a complete answer, and the code now says so where someone will read
it. The check that the rebuilt points belong to your key constrains their sum, so a server that
chooses all but one of them can still land on your key and know the secrets behind the ones it
chose. What that buys it is a piece that verifies and then fails to combine — which is why
clearing the mark only after a verifying signature is the half that closes the hole. For a
decryption, where there is no finished signature to check, the proof is weaker than 0.12.7's
notes implied: it catches a stale or corrupted share and a dishonest partner, and not a server
that writes the member list. Closing that needs a further change and it is specified, not built.

Also

  • docs/device-evidence.md: when one of your devices may believe in another, and why the three
    obvious answers do not work. A proposal, with its red team's verdict at the top.

Cosign 0.12.8: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.8 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.7

Choose a tag to compare

@sybenx sybenx released this 27 Oct 15:15

Cosign 0.12.7

Two security fixes found this week, and a decryption round that now proves itself.

A paper backup is not a device, and may not say it is

case 'members' accepted a member list from any member that is not a device, and the paper
backup is one of those. It could send a list in which its own entry said role: 'device', and the
clause that exists for a real case — a paper that became the phone it restored, seen at the other
server — believed it.

That clause is careful about what it grants: unless the server saw the recovery itself it marks
the member viaServer, so removing a device, taking the account out and cancelling a wait stay
refused. But isDevice ignores that mark, so after the flip the paper holder counted as one of
your devices for everything gated on that alone — granting an app access above all, and also
phone_signed, repair_delta, refresh_request, mail_for, revoke and undo. The round that
hands out a piece of a decryption was saved only by the arithmetic of a weighted key, which is not
a reason and is not true of a threshold-2 key.

The point of the paper is that using it is slow and visible: a recovery runs a wait at every
server and every device is told. This path was neither. A member list is now merged only from
another server, which is what the clause always meant.

A server a generation behind says so, and stops pretending

A server that was away when the key refreshed got neither the plan nor its part from the other
servers, and afterwards refused every later plan, because a refresh plan has to match the share
points it no longer had. Nothing told it, either: the sync the two servers exchange carried
sites, tickets, changes and the archive, and no epoch. So it went on answering rounds with
partials that cannot verify — which reads as a slow server rather than a dead one, while the
group quietly went from three signers to two.

The sync now carries the epoch. A server that finds itself behind says so in words you can read,
shows it on its status page, and refuses to take part in signing and decryption rather than
contributing a piece nobody can use. Mid-refresh is not behind: in the two-phase refresh the
other server commits first and this one keeps signing with its current shares until it commits
too.

It does not repair itself, and it says so: the fix is to take that server out and enroll it
again. A server that comes back within about a minute of the refresh still catches the plan from
the relay and recovers on its own, as it always did.

A piece of a decryption proves it is the share's

Signing has always verified every partial. A decryption verified none: combining rejected only a
degenerate result, so one wrong piece — a stale share, a corrupted copy at rest, a dishonest
partner — made whoever asked derive a value nobody else has, and the only symptom anywhere was a
message that would not decrypt.

Each piece now carries a Chaum-Pedersen proof that it was made with the share the member list
already publishes, and the asking device checks every one before combining. A piece that does not
match names the server that sent it, and the next server gets a turn. 98 bytes per piece, one
extra scalar multiplication to make and two to check.

Servers answer with the proofs beside the pieces they always sent, so a phone or extension that
does not know about them yet behaves exactly as before. The phone's half is in the Android
library and arrives with the next Marble build.

Also

  • Two end-to-end suites that fought over the same ports now have their own.

Cosign 0.12.7: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.7 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.6

Choose a tag to compare

@sybenx sybenx released this 27 Oct 04:41

Cosign 0.12.6: three more server fixes from the same week of reviews. Server operators
should update.
No protocol change, no account change.

Only a device gets a piece of a decryption. A server asking its peers for one is a
server coordinating a decryption, which §5.6 forbids, and this server answered. On a
weighted key the arithmetic hid it — a server's share and ours are 2 points, short of 4 —
but on a 2-of-3 key the numbers allowed it, and a rule this important shouldn't rest on the
arithmetic. Only a device may ask now. Paired with the browser extension's half of the same
fix (it answered any server's request with three points' worth of partials), this closes a
path where one breached server held the secret that opens everything an account encrypts to
itself.

Nothing enters the archive that the account didn't sign. The archive checked that an
event's kind was one it keeps and that an id and a signature were present — never the
signature itself — and a peer's sync, logged and saved messages were taken on trust.
Everything built on the archive assumes otherwise: a change is judged against the version it
replaces, "dated in the future" is shown to devices and deleted by its id with one tap, and
Undo signs the content of a saved copy again. The check now lives in one place inside
the archive, and those three messages are accepted only from a server rather than from
anything that isn't a device.

A server that was offline keeps what a device deleted. The server-to-server message for
dropping an archive entry was called forget, which is also what a device calls "remove my
servers' pieces", so the clause could never run. It is archive_forget now. No compatibility
shim: no version ever honoured the old message.

Also: ordinary NIP-46 clients are now held to it by a test — site/test/nip46.e2e.ts drives
a spec-written client and nak itself through every method, including the ones Cosign
refuses on purpose.

The server image is ghcr.io/sybenx/cosign-server:0.12.6 (also :0.12 and :latest), for amd64
and arm64. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.6: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.6 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.5

Choose a tag to compare

@sybenx sybenx released this 27 Oct 01:46

Cosign 0.12.5: three security fixes for servers, found by two independent reviews of a
design proposal and then found to be live in the running code. Server operators should
update.
Nothing in the protocol changes, and no account changes.

A server's word no longer makes something one of your devices. One server of an
account — dishonest, breached, or a friend's box somebody got into — could send the others
a member list containing a "device" whose key it held, and from then on they treated it as
one of the user's devices: it could report every real device lost, which is instant and
final, take the account out, cancel a wait or a paper recovery, and grant apps. It could
never sign (it holds no shares, and partial signatures are checked), so this was permanent
lockout rather than theft of the key. A member learned only from another server's list is
now marked, and those six actions are refused from it until it has proved it holds the
shares the list claims — which it does the first time it signs. Nothing else is gated, so a
device added through one server is never delayed at another.

A paper backup and a new server wait, and their pieces wait with them. A paper is 2
points and a server is 1, and either, handed to a key the asking device chose, is the
threshold with that device's own 3: the whole key, from one device, for good. The only gate
was the device saying it had asked for the user's lock. Both now wait an hour
(COSIGN_ADD_WAIT), every device is told and woken, any one of them can stop it, and no
piece is made until the wait ends
. Adding a device is untouched.

A device reported lost may say it wasn't them. Reporting is instant and final, the
first report won outright, and the reported device was mute from that moment — so a thief
with one device reported every other device lost and then cancelled each paper recovery the
owner started. A device that has been reported lost now keeps, for a week
(COSIGN_CONTEST), the right to report the device that reported it, cancel a wait and
cancel a recovery, and nothing else. Two devices that report each other are both out: a
thief can deny service and can never take over.

Also: every other device is now told in so many words, and woken, when a device is added;
a server takes a paper recovery it watched itself as its own; and a phone no longer makes
repair shares for anything it didn't ask to add (already in Marble 0.12.17).

Two new end-to-end tests run the attacks rather than describing them:
site/test/hardening.e2e.ts and site/test/contest.e2e.ts.

The server image is ghcr.io/sybenx/cosign-server:0.12.5 (also :0.12 and :latest), for
amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from
https://github.com/sybenx/marble.

Cosign 0.12.5: the protocol, the server and the signing libraries.

The server image is ghcr.io/sybenx/cosign-server:0.12.5 (also :0.12 and :latest), for amd64 and arm64. Running one: docs/servers.md. Marble, the Android app, is released from https://github.com/sybenx/marble.

Cosign 0.12.4

Choose a tag to compare

@sybenx sybenx released this 25 Oct 04:45

Cosign 0.12.4 (beta)

  • Search finds people properly: the relays that answer fastest first, the people you follow before anyone else, and names ranked by an exact match, an address that checks out, and who follows them. Copies of one profile — bridges and bots — fold into a single row you can open. Paste a link to someone or a post and it goes straight there.
  • Marble's key work runs in a process of its own, apart from the feed and everything it loads.
  • Your server's page: choose who can join it (only you, the people you follow, the people you invite, or anyone), see the accounts it serves, and stop serving one.
  • Joining a server you were invited to: your phone shows it whose account this is, signed, so a server can take on the people its owner knows without handing out codes. A code from its page still works, and is still the only way for a brand-new account.
  • What a server sees, what searching sends, and where pictures come from: written down in the README.

Search and the folding were checked on an emulator against live relays, not yet on a phone.

Android build of Cosign 0.12.4. Install over the previous version; your phone stays in your key.

Updating from 0.11.0 or older with Obtainium: 0.11.1 moved to a new signing key (Android's key rotation, which keeps your data). Obtainium warns that the certificate changed; choose Install anyway, or install this version once from https://cosign.aaro.cc. Either way your keys stay. Don't uninstall.

Cosign 0.12.3

Choose a tag to compare

@sybenx sybenx released this 25 Oct 02:10

Cosign 0.12.3 (beta)

  • Reply to posts, fuller profiles, a cleaner feed, Report, and tap Marble to go to the top.
  • Add a server of your own: open its page and scan the code it shows. Until now only public servers could be added.
  • A server's own page is rewritten for the person running it.

Android build of Cosign 0.12.3. Install over the previous version; your phone stays in your key.

Updating from 0.11.0 or older with Obtainium: 0.11.1 moved to a new signing key (Android's key rotation, which keeps your data). Obtainium warns that the certificate changed; choose Install anyway, or install this version once from https://cosign.aaro.cc. Either way your keys stay. Don't uninstall.