From 1b18466d8f4cc0e825d763bbbb8cc919c9df852e Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 19 Mar 2024 13:35:27 +0000 Subject: [PATCH] Address review comments --- src/olm/session/double_ratchet.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/olm/session/double_ratchet.rs b/src/olm/session/double_ratchet.rs index bf60cd98..2e6803ce 100644 --- a/src/olm/session/double_ratchet.rs +++ b/src/olm/session/double_ratchet.rs @@ -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. @@ -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``i` which was sent to us in -/// the message, and the remote root key `R``i`. +/// 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``i` which was sent to us in the message, and the remote root +/// key `R``i`. #[derive(Serialize, Deserialize, Clone)] #[serde(transparent)] pub(super) struct DoubleRatchet {