Enum libp2p::noise::IdentityExchange
source · [−]pub enum IdentityExchange {
Mutual,
Send {
remote: PublicKey,
},
Receive,
None {
remote: PublicKey,
},
}
Expand description
The options for identity exchange in an authenticated handshake.
Note: Even if a remote’s public identity key is known a priori, unless the authenticity of the key is linked to the authenticity of a remote’s static DH public key, an authenticated handshake will still send the associated signature of the provided local
KeypairIdentity
in order for the remote to verify that the static DH public key is authentic w.r.t. the known public identity key.
Variants
Mutual
Send the local public identity to the remote.
The remote identity is unknown (i.e. expected to be received).
Send
Fields
remote: PublicKey
Send the local public identity to the remote.
The remote identity is known.
Receive
Don’t send the local public identity to the remote.
The remote identity is unknown, i.e. expected to be received.
None
Fields
remote: PublicKey
Don’t send the local public identity to the remote.
The remote identity is known, thus identities must be mutually known in order for the handshake to succeed.
Auto Trait Implementations
impl RefUnwindSafe for IdentityExchange
impl Send for IdentityExchange
impl Sync for IdentityExchange
impl Unpin for IdentityExchange
impl UnwindSafe for IdentityExchange
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more