Clarifying the persisting of server setup (#344)

This commit is contained in:
Kevin Lewi
2023-10-04 20:53:07 -07:00
committed by GitHub
parent 83795f3f1c
commit ead80ad892
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -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
+4
View File
@@ -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>,