Skip to content

Commit

Permalink
Clarifying the persisting of server setup (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlewi authored Oct 5, 2023
1 parent 83795f3 commit ead80ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/opaque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ where
Le<<<OprfHash<CS> 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<R: CryptoRng + RngCore>(
rng: &mut R,
keypair: KeyPair<CS::KeGroup, S>,
Expand Down

0 comments on commit ead80ad

Please sign in to comment.