Function libp2p::noise::handshake::rt1_responder[][src]

pub fn rt1_responder<T, C>(
    io: T,
    session: Result<HandshakeState, NoiseError>,
    identity: KeypairIdentity,
    identity_x: IdentityExchange,
    legacy: LegacyConfig
) -> Handshake<T, C>

Notable traits for Handshake<T, C>

impl<T, C> Future for Handshake<T, C> type Output = Result<(RemoteIdentity<C>, NoiseOutput<T>), NoiseError>;
where
    C: Protocol<C> + AsRef<[u8]>,
    T: AsyncWrite + AsyncRead + Send + Unpin + 'static, 

Creates an authenticated Noise handshake for the responder of a single roundtrip (2 message) handshake pattern.

Subject to the chosen IdentityExchange, this message sequence expects the remote to identify itself in the first message payload (i.e. unencrypted) and identifies the local node to the remote in the second message payload.

This message sequence is suitable for authenticated 2-message Noise handshake patterns where the static keys of the initiator and responder are either known (i.e. appear in the pre-message pattern) or are sent with the first and second message, respectively (e.g. IK or IX).

initiator -{id}-> responder
initiator <-{id}- responder