[−][src]Crate libp2p_noise
Noise protocol framework support for libp2p.
This crate provides libp2p_core::InboundUpgrade
and libp2p_core::OutboundUpgrade
implementations for various noise handshake patterns, currently IK, IX, and XX.
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 tokio_io::AsyncRead
and tokio_io::AsyncWrite
.
Usage
Example:
use libp2p_core::Transport; use libp2p_tcp::TcpConfig; use libp2p_noise::{Keypair, NoiseConfig}; let keypair = Keypair::gen_curve25519(); let transport = TcpConfig::new().with_upgrade(NoiseConfig::xx(keypair)); // ...
Modules
rt1 | Futures performing 1 round trip. |
rt15 | Futures performing 1.5 round trips. |
Structs
Keypair | ECC secret and public key. |
NoiseConfig | The protocol upgrade configuration. |
NoiseOutput | A noise session to a remote. |
PublicKey | ECC public key. |
SecretKey | ECC secret key. |
Enums
Curve25519 | |
IK | |
IX | |
NoiseError | libp2p_noise error type. |
XX |