ByteSync icon indicating copy to clipboard operation
ByteSync copied to clipboard

[EPIC] Build secure trusted-session invitations

Open marwannettour opened this issue 6 months ago • 0 comments

Context

After the initiating client creates a session, ByteSync must generate a dedicated invitation for each recipient. Each invitation must be recipient-specific, signed by the issuer, encrypted for the recipient, time-limited, and protected against replay.

Objective

Implement a secure invitation format that lets a trusted client receive the information required to join a ByteSync session without manual input.

Expected capabilities

  • Build an invitation payload per recipient.
  • Include session information, issuer identity, recipient identity, expiration, nonce, requested mode, and optional profile.
  • Canonically serialize the payload before signing.
  • Sign the payload with the issuer private key.
  • Encrypt the signed invitation for the recipient public key.
  • Use hybrid encryption if RSA payload size limits require it.

Acceptance criteria

  • An invitation can be generated for each selected trusted client.
  • Each invitation contains a signed payload.
  • Each invitation is encrypted for exactly one recipient.
  • An invitation for one recipient cannot be read by another recipient.
  • The payload includes a nonce and expiration date.
  • Crypto success and failure scenarios are covered by tests.

Out of scope

  • Network transmission of the invitation.
  • Recipient-side invitation processing.
  • Auto-accept policy.
  • Effective inventory or synchronization startup.

Implementation tickets

  • #318 2.1 Define trusted-session invitation models
  • #319 2.2 Implement canonical serialization for trusted-session invitations
  • #320 2.3 Implement trusted-session invitation signing
  • #321 2.4 Implement trusted-session invitation encryption
  • #322 2.5 Add nonce generation and invitation TTL
  • #323 2.6 Add crypto tests for trusted-session invitations

marwannettour avatar May 19 '26 12:05 marwannettour