From ead80ad89201eb6ed3a4a2aa471c47437fcd3e8d Mon Sep 17 00:00:00 2001 From: Kevin Lewi Date: Wed, 4 Oct 2023 20:53:07 -0700 Subject: [PATCH] Clarifying the persisting of server setup (#344) --- src/lib.rs | 3 ++- src/opaque.rs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ac3dfd4..3507eed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,7 +78,8 @@ //! # Ok::<(), ProtocolError>(()) //! ``` //! The server must persist an instance of [ServerSetup] for the registration -//! and login steps. +//! and login steps, and can use [ServerSetup::serialize] and +//! [ServerSetup::deserialize] to save and restore the instance. //! //! ## Registration //! The registration protocol between the client and server consists of four diff --git a/src/opaque.rs b/src/opaque.rs index 737739e..63a132a 100644 --- a/src/opaque.rs +++ b/src/opaque.rs @@ -224,6 +224,10 @@ where Le<< as CoreProxy>::Core as BlockSizeUser>::BlockSize, U256>: NonZero, { /// Create [`ServerSetup`] with the given keypair + /// + /// This function should not be used to restore a previously-existing + /// instance of [ServerSetup]. Instead, use [ServerSetup::serialize] and + /// [ServerSetup::deserialize] for this purpose. pub fn new_with_key( rng: &mut R, keypair: KeyPair,