phase 9 M4 review fixes — key-trust hardening (v1.56.83): 8 items. SECURITY: (1) Chat send now FAILS CLOSED — recomputes fingerprintOf(pubkey) and refuses the whole send if it != the id the server filed it under (no ciphertext leaves on substitution); (2) server STAMPS sender_pubkey_b64 from the session account's registered chat_pubkeys (getChatPubkey), ignoring the client claim — rejects send if no key registered; (3) IndexedDB keys now account-scoped (privkey:/pubkey:<accountId>) + reconciled against the server fingerprint with deliberate rekey on mismatch — no cross-account key reuse in a shared browser; (4) verification UX: full self+peer SHA-256 fingerprints with copy + verify-keys panel. CORRECTNESS: (5) onCleanup registered synchronously at setup (was after onMount awaits → SSE leak); (6,7) errdefer on fp/pk dupes in listChatMembers/chatRoomPubkeys; (8) pubkey registration enforces an uncompressed P-256 point (0x04 + 64 bytes), rejecting arbitrary base64. VERIFIED for real: #2+#8 against live Postgres (sender key server-derived; point validation), #1+#3+#4 in real headless browser (tampered key refused / honest sends ciphertext; account switch reuses no prior key; fingerprint panel renders). Pre-existing team-tier live-PG failure untouched
$ koh steal kepr.uk/kepr@ee3342b00267
·
parent: f8685e18edeb
discussion
log in to leave a comment.