// Group owner delivers the group key to each member:
const wrapped = await wrapKeyForRecipient({
keyBytes: groupKey, recipientBundle: memberBundle,
myIdentity: ownerIdentity,
contextSalt: new TextEncoder().encode(groupId),
info: 'me2em/crypto/v1/group-key',
});
// upload `wrapped` — the server can store but not open it
Wraps a key for an OFFLINE recipient via X3DH envelope.
Flow: X3DH initiation against the recipient's bundle → derive a one-time wrapping key → AES-256-GCM encrypt the target key.
───────────────────────────────────────────────────────────── Security properties ─────────────────────────────────────────────────────────────