Skip to main content

openmls/components/
vc_application_secret.rs

1use tls_codec::{TlsDeserializeBytes, TlsSerialize, TlsSize};
2
3use crate::{binary_tree::LeafNodeIndex, components::vc_derivation_info::EpochId};
4
5/// The coordinates of one application secret in a virtual client's operation
6/// secret tree.
7#[derive(Debug, Clone, PartialEq, Eq, TlsSize, TlsSerialize, TlsDeserializeBytes)]
8pub struct VcApplicationSecretInfo {
9    /// The derivation epoch the secret was taken from.
10    pub epoch_id: EpochId,
11    /// The sender's leaf index in the emulation group, identifying the
12    /// application ratchet the generation was allocated from.
13    pub leaf_index: LeafNodeIndex,
14    /// The application-ratchet generation the sender consumed.
15    pub generation: u32,
16}