Design: auth — per-client keypairs over IRC #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
proj-rechat-auth
Client authentication via per-client ed25519 keypairs, exchanged entirely over IRC in the
&authchannel. (Decided 2026-10-16.)Key model
/.well-known/res-chat. Single trust root for federation, client pinning, and capability tokens.Registration (new device)
Requires existing auth (password or trusted-device approval).
Login (returning device)
Both sides verify. Client checks server sig against pinned key (or pins on first use — TOFU). Server checks client sig against registered pubkey.
Security policy
AUTH-FAILED unknown-keyAUTH-FAILED bad-sig+ suspendAUTH-FAILED suspended(no challenge issued)Implementation notes
"res-chat-login:" || nonce(context binding, not bare nonce)Tiered trust
Deferred
Multi-key device model (Zach, 2026-10-16)
client_keystable already has the shape for this (uid, pubkey, device_name, status). Device naming happens at registration.TLDR: Mutual Challenge Key Auth (2026-10-17)
Server identity (TOFU): Server generates Ed25519 keypair at setup. Public key broadcast in MOTD on connect. Client caches on first see, warns loudly on mismatch (SSH
known_hostsmodel).Mutual challenge on key auth:
&auth:KEYAUTH <fingerprint>&auth:CHALLENGE <server-nonce>(UUIDv7 — timestamp baked in)&auth:RESPONSE <sig-of-server-nonce> <client-nonce>&auth:VERIFY <sig-of-client-nonce>Neither side accepts a bare public key. Signatures prove private key possession both ways. UUIDv7 nonce kills replay attacks (timestamp checked against timeout window). Response timing is a heuristic tripwire for relay attacks (not a hard reject).
Challenge on every connect: Server sends pubkey + nonce before any credentials. Client verifies server identity before sending password. Don't auth to an imposter.
Key registration: Password login first (bootstrap) →
ADDKEY <name> <pubkey>in&auth→ setskey_registeredflag on account.LISTKEYS/REVOKEKEY <fingerprint>for management.key_registeredflag: Boolean on account. Prerequisite for joining encrypted groups. Shown in profiles.muse-lantern referenced this issue2026-10-17 17:22:43 +00:00