Skip to content

Client-side Ed25519 key management in browser #8

@theonlyhennygod

Description

@theonlyhennygod

v0.0.7 — Client-Side Key Management

Problem

The React frontend has no awareness of Ed25519 keypairs. It only knows JWT tokens. Events are signed server-side, not client-side.

Acceptance Criteria

  • Browser-side Ed25519 keypair generation using WebCrypto/subtle
  • Keypairs stored in IndexedDB (encrypted with user password)
  • Key export/download for backup
  • Key import for account recovery on new device
  • Client-side event signing before posting to API
  • Frontend posts include sig field (client-signed, server verifies)
  • Settings page shows public key and key management options
  • E2E test: generate key in browser, sign event, verify server-side

Files to create/modify

  • apps/web/src/lib/keys.ts (NEW — keypair generation, storage, signing)
  • apps/web/src/lib/event-signer.ts (NEW — client-side event signing)
  • apps/web/src/hooks/useKeypair.ts (NEW)
  • apps/web/src/pages/Settings.tsx (add key management UI)
  • apps/web/src/components/KeyManager.tsx (NEW)

Test

bun run --cwd apps/web typecheck

Version bump

All package.json files: 0.0.6 to 0.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions