struct KeyExchange {
name: NamedGroup,
agreement_algorithm: &'static Algorithm,
priv_key: EphemeralPrivateKey,
pub_key: PublicKey,
pub_key_validator: fn(_: &[u8]) -> bool,
}
Expand description
An in-progress key exchange. This has the algorithm, our private key, and our public key.
Fields§
§name: NamedGroup
§agreement_algorithm: &'static Algorithm
§priv_key: EphemeralPrivateKey
§pub_key: PublicKey
§pub_key_validator: fn(_: &[u8]) -> bool
Trait Implementations§
Source§impl ActiveKeyExchange for KeyExchange
impl ActiveKeyExchange for KeyExchange
Source§fn complete(self: Box<Self>, peer: &[u8]) -> Result<SharedSecret, Error>
fn complete(self: Box<Self>, peer: &[u8]) -> Result<SharedSecret, Error>
Completes the key exchange, given the peer’s public key.
Source§fn group(&self) -> NamedGroup
fn group(&self) -> NamedGroup
Return the group being used.
Source§fn ffdhe_group(&self) -> Option<FfdheGroup<'static>>
fn ffdhe_group(&self) -> Option<FfdheGroup<'static>>
FFDHE group the
ActiveKeyExchange
is operating in. Read moreSource§fn complete_for_tls_version(
self: Box<Self>,
peer_pub_key: &[u8],
tls_version: &SupportedProtocolVersion,
) -> Result<SharedSecret, Error>
fn complete_for_tls_version( self: Box<Self>, peer_pub_key: &[u8], tls_version: &SupportedProtocolVersion, ) -> Result<SharedSecret, Error>
Completes the key exchange for the given TLS version, given the peer’s public key. Read more
Source§fn hybrid_component(&self) -> Option<(NamedGroup, &[u8])>
fn hybrid_component(&self) -> Option<(NamedGroup, &[u8])>
For hybrid key exchanges, returns the
NamedGroup
and key share
for the classical half of this key exchange. Read moreSource§fn complete_hybrid_component(
self: Box<Self>,
_peer_pub_key: &[u8],
) -> Result<SharedSecret, Error>
fn complete_hybrid_component( self: Box<Self>, _peer_pub_key: &[u8], ) -> Result<SharedSecret, Error>
Completes the classical component of the key exchange, given the peer’s public key. Read more
Auto Trait Implementations§
impl Freeze for KeyExchange
impl RefUnwindSafe for KeyExchange
impl Send for KeyExchange
impl Sync for KeyExchange
impl Unpin for KeyExchange
impl UnwindSafe for KeyExchange
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