Skip to main content

Module invite

Module invite 

Source
Expand description

Cryptographic organization invites

An invite is built around an XAES-256-GCM invite key that acts as the hub tying every sealed object together. Two independent secrets can recover the invite key (the invite secret from the link, or the organization key held by admins), and from the invite key everything else — the invite data and, when confirmation is enabled, the organization key — can be unsealed:

InviteSecret -> SecretProtectedKeyEnvelope -> InviteKey -> SymmetricKeyEnvelope -> InviteDataCEK
                                               ^     |                                   |
                                               |     |               DataEnvelope --------+
                                               |     |                    +-> InviteSecret
                                               |     |                    +-> OrgPubKeyPrint
OrganizationKey -> EncString ------------------+     +-> SymmetricKeyEnvelope -> OrganizationKey
  • InviteSecret -> SecretProtectedKeyEnvelope -> InviteKey (invite_secret_sealed_invite_key): the invite key sealed with the high-entropy invite secret, so an invitee holding only the secret from the link recovers the invite key.
  • OrganizationKey -> EncString -> InviteKey (organization_key_sealed_invite_key): the invite key sealed with the organization key, so anyone holding the organization key recovers the invite key (and thus the invite data).
  • InviteKey -> SymmetricKeyEnvelope -> InviteDataCEK -> DataEnvelope -> InviteSecret + OrgPubKeyPrint (invite_key_sealed_invite_data_cek + sealed_invite_data): the InviteDataV1 is sealed under its own content-encryption key (CEK), and that CEK is sealed with the invite key. The data binds the organization public-key thumbprint and a copy of the invite secret (so the invite link can be reconstructed from the invite key).
  • InviteKey -> SymmetricKeyEnvelope -> OrganizationKey (invite_key_sealed_organization_key): the organization key sealed with the invite key, so a redeeming invitee can recover the organization key. It is present if and exactly if confirmation is enabled for the invite.

Structs§

Invite
Cryptographic invite for an organization, built around an XAES-256-GCM invite key that acts as the hub tying everything together. See the module-level docs for the overall diagram.
InviteDataV1 🔒
The plaintext data sealed inside the invite’s [DataEnvelope] with the invite key.
InviteSecret
The invite secret: 32 random, high-entropy bytes carried in the invite link.

Enums§

InviteData 🔒
InviteKeyBundleError
Errors that can occur when creating or opening an invite.

Constants§

INVITE_SECRET_LEN 🔒
Length, in bytes, of the raw invite secret. 32 bytes provides 256 bits of entropy, which is why the invite secret is safe to use directly as a [HighEntropySecret].