Skip to main content

Module vc_derivation_info

Module vc_derivation_info 

Source
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.
GenerationId
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).
KeyPackageInfo
Wire struct a virtual client hands to a sibling so the sibling can fetch and process the matching KeyPackage (mls-virtual-clients draft):
KeyPackageSeedSecret
Per-KeyPackage seed secret from which a single KeyPackage’s init and leaf-encryption keys are derived. Produced by OperationSecret::derive_key_package_seed_secret for one index within a key_package operation’s batch. Persisted in RetainedKeyPackageMaterial so the Welcome path can rederive the keys without re-walking the operation tree.
KeyPackageUpload
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):
OperationSecret
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.
RegisteredVcDerivationEpochDeprecated
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.
RetainedKeyPackageMaterial
Per-KeyPackageRef material a sibling retains when it processes a KeyPackageUpload. 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.
VcDerivationEpochLogEntry
One registration in an emulation group’s log of derivation epochs, stored as its own row keyed by (group_id, epoch_id).
VcDerivationEpochState
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.
VcEmulationBinding
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).
VcEmulationBindingsDeprecated
Per-group bindings record of the storage layout that preceded per-epoch VcEmulationBinding rows. Only for decoding stored records and converting their entries with VcEmulationBinding::from_legacy_record.

Enums§

RatchetType
Which ratchet a PrivateMessageContext refers to (mls-virtual-clients draft RatchetType):
VirtualClientOperationType
What virtual-clients operation a per-operation secret is being derived for (mls-virtual-clients draft VirtualClientOperationType). Mixed into the OperationContext of every operation-secret derivation so that secrets derived for different operations cannot collide even if the other fields happen to match.
VirtualClientsError
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_dictionary extension.

Functions§

assemble_vc_key_package_upload
Build a KeyPackageUpload for epoch_id from a batch’s generation and its KeyPackageInfo entries, filling leaf_index from the VcDerivationEpochState stored for that epoch.
process_vc_key_package_upload
Process a KeyPackageUpload received from a sibling virtual client.