pub struct ServerSetup<CS, SK = PrivateKey<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>, OS = OprfSeed<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash>>{ /* private fields */ }Expand description
The state elements the server holds upon setup
Implementations§
Source§impl<CS> ServerSetup<CS>where
CS: CipherSuite,
impl<CS> ServerSetup<CS>where
CS: CipherSuite,
Source§impl<CS, SK, OS> ServerSetup<CS, SK, OS>
impl<CS, SK, OS> ServerSetup<CS, SK, OS>
Sourcepub fn new_with_key_pair_and_seed<R>(
rng: &mut R,
keypair: KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>,
oprf_seed: OS,
) -> ServerSetup<CS, SK, OS>
Available on crate feature core only.
pub fn new_with_key_pair_and_seed<R>( rng: &mut R, keypair: KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>, oprf_seed: OS, ) -> ServerSetup<CS, SK, OS>
core only.Create ServerSetup with the given keypair and OPRF seed.
This function should not be used to restore a previously-existing
instance of ServerSetup. Instead, use ServerSetup::serialize and
ServerSetup::deserialize for this purpose.
Sourcepub fn key_material_info<'ci>(
&self,
credential_identifier: &'ci [u8],
) -> KeyMaterialInfo<'ci, OS>
Available on crate feature core only.
pub fn key_material_info<'ci>( &self, credential_identifier: &'ci [u8], ) -> KeyMaterialInfo<'ci, OS>
core only.The information required to generate the key material for
ServerRegistration::start_with_key_material() and
ServerLogin::builder_with_key_material().
Sourcepub fn serialize(
&self,
) -> GenericArray<u8, <<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output as Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>>::Output>where
SK: PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>,
OS: OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>,
<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len: Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>,
<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output: ArrayLength<u8> + Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>,
<<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output as Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>>::Output: ArrayLength<u8>,
Available on crate feature core only.
pub fn serialize(
&self,
) -> GenericArray<u8, <<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output as Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>>::Output>where
SK: PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>,
OS: OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>,
<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len: Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>,
<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output: ArrayLength<u8> + Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>,
<<<OS as OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>::Len as Add<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Len>>::Output as Add<<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::PkLen>>::Output: ArrayLength<u8>,
core only.Serialization into bytes
Sourcepub fn deserialize(
input: &[u8],
) -> Result<ServerSetup<CS, SK, OS>, ProtocolError<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>where
SK: PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>,
OS: OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>,
Available on crate feature core only.
pub fn deserialize(
input: &[u8],
) -> Result<ServerSetup<CS, SK, OS>, ProtocolError<<SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>>where
SK: PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>,
OS: OprfSeedSerialization<<<CS as CipherSuite>::OprfCs as CipherSuite>::Hash, <SK as PrivateKeySerialization<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group>>::Error>,
core only.Deserialization from bytes
Sourcepub fn keypair(
&self,
) -> &KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>
Available on crate feature core only.
pub fn keypair( &self, ) -> &KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>
core only.Returns the keypair
Source§impl<CS, SK> ServerSetup<CS, SK>where
CS: CipherSuite,
SK: Clone,
impl<CS, SK> ServerSetup<CS, SK>where
CS: CipherSuite,
SK: Clone,
Sourcepub fn new_with_key_pair<R>(
rng: &mut R,
keypair: KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>,
) -> ServerSetup<CS, SK>
Available on crate feature core only.
pub fn new_with_key_pair<R>( rng: &mut R, keypair: KeyPair<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group, SK>, ) -> ServerSetup<CS, SK>
core only.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.
Trait Implementations§
Source§impl<CS, SK, OS> Clone for ServerSetup<CS, SK, OS>
impl<CS, SK, OS> Clone for ServerSetup<CS, SK, OS>
Source§fn clone(&self) -> ServerSetup<CS, SK, OS>
fn clone(&self) -> ServerSetup<CS, SK, OS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<CS, SK, OS> Debug for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Debug,
OS: Clone + Debug,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Debug,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Debug,
impl<CS, SK, OS> Debug for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Debug,
OS: Clone + Debug,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Debug,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Debug,
Source§impl<'de, CS, SK, OS> Deserialize<'de> for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Deserialize<'de>,
OS: Clone + Deserialize<'de>,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Deserialize<'de>,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Deserialize<'de>,
impl<'de, CS, SK, OS> Deserialize<'de> for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Deserialize<'de>,
OS: Clone + Deserialize<'de>,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Deserialize<'de>,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerSetup<CS, SK, OS>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerSetup<CS, SK, OS>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<CS, SK, OS> Hash for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Hash,
OS: Clone + Hash,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Hash,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Hash,
impl<CS, SK, OS> Hash for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Hash,
OS: Clone + Hash,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Hash,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Hash,
Source§impl<CS, SK, OS> Ord for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Ord,
OS: Clone + Ord,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Ord,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Ord,
impl<CS, SK, OS> Ord for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Ord,
OS: Clone + Ord,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Ord,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Ord,
Source§fn cmp(&self, __other: &ServerSetup<CS, SK, OS>) -> Ordering
fn cmp(&self, __other: &ServerSetup<CS, SK, OS>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<CS, SK, OS> PartialEq for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + PartialEq,
OS: Clone + PartialEq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: PartialEq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: PartialEq,
impl<CS, SK, OS> PartialEq for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + PartialEq,
OS: Clone + PartialEq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: PartialEq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: PartialEq,
Source§impl<CS, SK, OS> PartialOrd for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + PartialOrd,
OS: Clone + PartialOrd,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: PartialOrd,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: PartialOrd,
impl<CS, SK, OS> PartialOrd for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + PartialOrd,
OS: Clone + PartialOrd,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: PartialOrd,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: PartialOrd,
Source§impl<CS, SK, OS> Serialize for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Serialize,
OS: Clone + Serialize,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Serialize,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Serialize,
impl<CS, SK, OS> Serialize for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Serialize,
OS: Clone + Serialize,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Serialize,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<CS, SK, OS> Eq for ServerSetup<CS, SK, OS>where
CS: CipherSuite,
SK: Clone + Eq,
OS: Clone + Eq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Eq,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Sk: Eq,
Auto Trait Implementations§
impl<CS, SK, OS> Freeze for ServerSetup<CS, SK, OS>where
OS: Freeze,
SK: Freeze,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Freeze,
impl<CS, SK, OS> RefUnwindSafe for ServerSetup<CS, SK, OS>where
OS: RefUnwindSafe,
SK: RefUnwindSafe,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: RefUnwindSafe,
impl<CS, SK, OS> Send for ServerSetup<CS, SK, OS>where
OS: Send,
SK: Send,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Send,
impl<CS, SK, OS> Sync for ServerSetup<CS, SK, OS>where
OS: Sync,
SK: Sync,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Sync,
impl<CS, SK, OS> Unpin for ServerSetup<CS, SK, OS>where
OS: Unpin,
SK: Unpin,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: Unpin,
impl<CS, SK, OS> UnwindSafe for ServerSetup<CS, SK, OS>where
OS: UnwindSafe,
SK: UnwindSafe,
<<<CS as CipherSuite>::KeyExchange as KeyExchange>::Group as Group>::Pk: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
Source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
Source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.