Enum libp2p_noise::handshake::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
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
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.