Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Mar 19, 2024
1 parent 72992e5 commit 1b18466
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/olm/session/double_ratchet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use super::{
receiver_chain::ReceiverChain,
root_key::{RemoteRootKey, RootKey},
};
#[cfg(doc)]
use crate::olm::session::receiver_chain::ReceiverChain;
use crate::olm::{messages::Message, shared_secret::Shared3DHSecret};

/// The sender side of a double-ratchet implementation.
Expand All @@ -34,12 +36,12 @@ use crate::olm::{messages::Message, shared_secret::Shared3DHSecret};
/// the *next* root key).
///
/// Once we receive a message, we transition to the "inactive" state. Since we
/// don't handle decryption here (that's done in
/// [`crate::olm::session::ChainStore`]), we don't need to keep track of the
/// sender's chain key. All we need is enough state so that we can calculate the
/// next root key once we start encrypting again: specifically, the public part
/// of the other side's ratchet key `T`<sub>`i`</sub> which was sent to us in
/// the message, and the remote root key `R`<sub>`i`</sub>.
/// don't handle decryption here (that's done in [`ReceiverChain`]), we don't
/// need to keep track of the sender's chain key. All we need is enough state so
/// that we can calculate the next root key once we start encrypting again:
/// specifically, the public part of the other side's ratchet key
/// `T`<sub>`i`</sub> which was sent to us in the message, and the remote root
/// key `R`<sub>`i`</sub>.
#[derive(Serialize, Deserialize, Clone)]
#[serde(transparent)]
pub(super) struct DoubleRatchet {
Expand Down

0 comments on commit 1b18466

Please sign in to comment.