Available on crate feature
extensions-draft and crate feature virtual-clients-draft and (32-bit or 64-bit) only.Expand description
Virtual-clients-draft derivation chain: types and helpers for the per-commit material the application supplies on the sender side and the receiver re-derives.
Structs§
- EpochId
- Identifier of a derivation epoch’s registered virtual-clients state.
Derived deterministically from the emulation group’s
safe_export_secret(VC_COMPONENT_ID), so every emulator client of a virtual client arrives at the same value for a given derivation epoch. - Generation
Id - A per-message generation ID a virtual client attaches to a fanned-out PrivateMessage so a strongly-consistent DS can detect generation collisions between siblings, per higher-level group, per higher-level group epoch, and per ratchet type (mls-virtual-clients draft).
- KeyPackage
Info - Wire struct a virtual client hands to a sibling so the sibling can fetch and process the matching KeyPackage (mls-virtual-clients draft):
- KeyPackage
Seed Secret - Per-KeyPackage seed secret from which a single KeyPackage’s init and
leaf-encryption keys are derived. Produced by
OperationSecret::derive_key_package_seed_secretfor one index within akey_packageoperation’s batch. Persisted inRetainedKeyPackageMaterialso the Welcome path can rederive the keys without re-walking the operation tree. - KeyPackage
Upload - Wire struct a virtual client uploads to a sibling so the sibling learns about the KeyPackages the virtual client published for a derivation epoch (mls-virtual-clients draft):
- Operation
Secret - Per-operation secret from which the material for a single virtual-clients
operation (commit path, key package, application message) is derived.
Produced by the per-epoch Virtual Client Operation Secret Tree
(
OperationSecretTree). Sender and receiver derive the same value from the same per-epoch state. - Registered
VcDerivation Epoch Deprecated - Registration record of the storage layout that preceded the
derivation-epoch log. Only for decoding stored records and converting them
with
VcDerivationEpochLogEntry::from_legacy_record. - Retained
KeyPackage Material - Per-
KeyPackageRefmaterial a sibling retains when it processes aKeyPackageUpload. It captures what the Welcome path needs to later rederive the KeyPackage’s init and leaf-encryption keys without touching the operation tree: the per-KeyPackage seed secret, plus the derivation epoch, leaf index, generation, and batch index used to validate the leaf found in the ratchet tree. The sibling also keeps the KeyPackage’s extensions, s.t. it can apply the corresponding semantics when processing a Welcome. - VcDerivation
Epoch LogEntry - One registration in an emulation group’s log of derivation epochs, stored
as its own row keyed by
(group_id, epoch_id). - VcDerivation
Epoch State - Per-derivation-epoch state, persisted alongside the per-epoch operation
secret tree and keyed by
EpochId. Bundles everything the library needs to emit a VC commit for this epoch and to XOR application message nonces with deterministic reuse guards. - VcEmulation
Binding - The binding of one epoch of a higher-level group to the derivation epoch
whose virtual-client LeafNode was active at that epoch, stored as its own
row keyed by
(group_id, group_epoch). - VcEmulation
Bindings Deprecated - Per-group bindings record of the storage layout that preceded per-epoch
VcEmulationBindingrows. Only for decoding stored records and converting their entries withVcEmulationBinding::from_legacy_record.
Enums§
- Ratchet
Type - Which ratchet a
PrivateMessageContextrefers to (mls-virtual-clients draftRatchetType): - Virtual
Client Operation Type - What virtual-clients operation a per-operation secret is being derived
for (mls-virtual-clients draft
VirtualClientOperationType). Mixed into theOperationContextof every operation-secret derivation so that secrets derived for different operations cannot collide even if the other fields happen to match. - Virtual
Clients Error - Errors that can occur while processing virtual-clients derivation info.
Constants§
- VC_
COMPONENT_ ID - Component ID under which the virtual-clients derivation info is carried in
the leaf node’s
app_data_dictionaryextension.
Functions§
- assemble_
vc_ key_ package_ upload - Build a
KeyPackageUploadforepoch_idfrom a batch’sgenerationand itsKeyPackageInfoentries, fillingleaf_indexfrom theVcDerivationEpochStatestored for that epoch. - process_
vc_ key_ package_ upload - Process a
KeyPackageUploadreceived from a sibling virtual client.