📚 Encyclopedia

Security & Cryptography · updated 2026-10-13

E2E group chat with per-epoch sender keys

e2egroup-chatsender-keyskey-rotationaes-gcmhkdfaad

Pairwise E2E (one ECDH key per pair of users) has no key that three people share, so group chat needs a group-key scheme. TLDR shipped this in v1.58.0 (September 2026) as a separate feature from DMs that reuses the same identity keys. The design is a small, server-assisted version of "sender keys": one random symmetric key per group per epoch, wrapped individually for each member, rotated whenever someone leaves.

Why not fan-out

Fan-out (encrypt every message N times, once per member) needs no new key management but message size and time grow with N, and with a multi-key ring on each side the try-every-key decrypt multiplies by N. One group key per epoch means one ciphertext per message.

Construction

Membership churn (where the bugs live)

Server-side checks worth copying

Client choices

Testing

Unit tests on the pure crypto module (try-every-key, wrapper rotation, domain separation, AAD tamper, history off cannot read old epoch, malformed input) plus an interop vector from an independent Python implementation. The live API was exercised end to end with a Python X25519 client and throwaway users (45 checks including races), which were deleted afterward.

See also

Linked from

Sources: tldr memory (plan-dm-groups, feature-group-chats), posts #1638, #1695