Enum libp2p_noise::handshake::RemoteIdentity[][src]

pub enum RemoteIdentity<C> {
    Unknown,
    StaticDhKey(PublicKey<C>),
    IdentityKey(PublicKey),
}
Expand description

The identity of the remote established during a handshake.

Variants

Unknown

The remote provided no identifying information.

The identity of the remote is unknown and must be obtained through a different, out-of-band channel.

StaticDhKey(PublicKey<C>)

The remote provided a static DH public key.

The static DH public key is authentic in the sense that a successful handshake implies that the remote possesses a corresponding secret key.

Note: To rule out active attacks like a MITM, trust in the public key must still be established, e.g. by comparing the key against an expected or otherwise known public key.

Tuple Fields of StaticDhKey

0: PublicKey<C>
IdentityKey(PublicKey)

The remote provided a public identity key in addition to a static DH public key and the latter is authentic w.r.t. the former.

Note: To rule out active attacks like a MITM, trust in the public key must still be established, e.g. by comparing the key against an expected or otherwise known public key.

Tuple Fields of IdentityKey

0: PublicKey

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.