Skip to content

feat: X3DH session establishment + linked-devices management UI#315

Open
davidugorji wants to merge 2 commits into
codebestia:mainfrom
davidugorji:feat/x3dh-linked-devices
Open

feat: X3DH session establishment + linked-devices management UI#315
davidugorji wants to merge 2 commits into
codebestia:mainfrom
davidugorji:feat/x3dh-linked-devices

Conversation

@davidugorji

Copy link
Copy Markdown

Summary

  • X3DH handshake (4-DH with one-time prekey, falls back to 3-DH when exhausted) using stored device prekeys
  • Atomic one-time-prekey consumption on bundle fetch (consumed exactly once)
  • Linked-devices settings screen: list, link, revoke, log out everywhere

Closes #305
Closes #302

Status

Work in progress - pushing commits incrementally.

- Backend: GET /devices/:id/bundle returns identity key + signed prekey
  + atomically-claimed one-time prekey (FOR UPDATE SKIP LOCKED), falling
  back to a signed-prekey-only bundle once OTPs are exhausted
- Backend: DELETE /devices/:id and POST /devices/logout-everywhere for
  revoking devices; deviceName/platform/registrationId/lastSeenAt now
  tracked on the devices table and set during wallet auth verify
- Client: src/lib/x3dh.ts implements initiator/responder X3DH (4-DH with
  fallback to 3-DH), converting the existing Ed25519 identity key to
  X25519 via the standard birational map instead of a second keypair
- Client: /app/devices settings screen — list devices, revoke, log out
  everywhere, key-change messaging on confirm

Closes codebestia#305
Closes codebestia#302
@davidugorji davidugorji marked this pull request as ready for review June 30, 2026 09:01
@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@davidugorji Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

X3DH session establishment over existing prekeys Linked-devices management UI

1 participant