Struct network::noise::handshake::NoiseUpgrader[][src]

pub struct NoiseUpgrader {
    pub network_context: NetworkContext,
    // some fields omitted
}
Expand description

The Noise configuration to be used to perform a protocol upgrade on an underlying socket.

Fields

network_context: NetworkContext

The validator’s network context

Implementations

Create a new NoiseConfig with the provided keypair and authentication mode.

Perform a protocol upgrade on an underlying connection. In addition perform the noise IK handshake to establish a noise stream and exchange static public keys. Upon success, returns the static public key of the remote as well as a NoiseStream.

Perform an outbound protocol upgrade on this connection.

This runs the “client” side of the Noise IK handshake to establish a secure Noise stream and send its static public key to the server. In mutual auth scenarios, we will also include an anti replay attack counter in the Noise handshake payload. Currently this counter is always a millisecond- granularity unix epoch timestamp.

Perform an inbound protocol upgrade on this connection.

This runs the “server” side of the Noise IK handshake to establish a secure Noise stream and exchange static public keys. If the configuration requires mutual authentication, we will only allow connections from peers that successfully authenticate to a public key in our trusted_peers set. In addition, we will expect the client to include an anti replay attack counter in the Noise handshake payload in mutual auth scenarios.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.