Skip to content

[PB-6431]: feat/email encryption#56

Merged
jzunigax2 merged 0 commit into
feat/fetch-recipient-public-keysfrom
feat/email-encryption
May 27, 2026
Merged

[PB-6431]: feat/email encryption#56
jzunigax2 merged 0 commit into
feat/fetch-recipient-public-keysfrom
feat/email-encryption

Conversation

@jzunigax2
Copy link
Copy Markdown
Contributor

Adds end-to-end encryption for mail. On send, the body and a short list-preview snippet are sealed with a hybrid scheme; on read, the body and previews are decrypted client-side.

  • Encryption envelope (services/mail-encryption): encrypts body + preview under one symmetric key, wrapped per-recipient. Wrapped keys ship as a de-identified, order-randomized array carrying no addresses, so the recipient set (Bcc included) stays hidden; recipients find their entry by trial decryption. Subject stays cleartext so the backend can index/search it.
  • Recipient key lookup (services/recipient-keys, store/api/mail): resolves recipients' public keys before an encrypted send; falls back to a cleartext send if any recipient has no key.
  • Compose (compose-message): wires lookup + encryption into the send flow.
  • Read path: useDecryptedMail decrypts the opened message; useDecryptedPreviews decrypts list/search row previews (encrypted rows show a blank snippet until decrypted, never ciphertext).
  • New typed errors (SendEmailError, FetchRecipientKeysError, FetchActiveDomainsError) and i18n keys across all locales.

@jzunigax2 jzunigax2 self-assigned this May 27, 2026
@jzunigax2 jzunigax2 added the enhancement New feature or request label May 27, 2026
@jzunigax2 jzunigax2 changed the title [_]: feat/email encryption [PB-6431]: feat/email encryption May 27, 2026
@jzunigax2 jzunigax2 force-pushed the feat/fetch-recipient-public-keys branch from 2f4efb7 to 90badcb Compare May 27, 2026 21:40
@jzunigax2 jzunigax2 merged commit 7b4f50d into feat/fetch-recipient-public-keys May 27, 2026
1 of 3 checks passed
@jzunigax2 jzunigax2 force-pushed the feat/fetch-recipient-public-keys branch from 90badcb to 1df2887 Compare May 27, 2026 21:44
@jzunigax2 jzunigax2 deleted the feat/email-encryption branch May 27, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant