Noise protocol framework support for tetsy-libp2p.
Note: This crate is still experimental and subject to major breaking changes both on the API and the wire protocol.
This crate provides tetsy_libp2p_core::InboundUpgrade
and tetsy_libp2p_core::OutboundUpgrade
implementations for various noise handshake patterns (currently IK
, IX
, and XX
)
over a particular choice of Diffie–Hellman key agreement (currently only X25519).
Note: Only the
XX
handshake pattern is currently guaranteed to provide interoperability with other tetsy-libp2p implementations.
All upgrades produce as output a pair, consisting of the remote's static public key
and a NoiseOutput
which represents the established cryptographic session with the
remote, implementing futures::io::AsyncRead
and futures::io::AsyncWrite
.
Example:
``` use tetsylibp2pcore::{identity, Transport, upgrade}; use tetsylibp2ptcp::TcpConfig; use tetsylibp2pnoise::{Keypair, X25519Spec, NoiseConfig};
let idkeys = identity::Keypair::generateed25519();
let dhkeys = Keypair::
```