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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.