# Functions

Dial attempts to establish an encrypted+authenticated connection with the remote peer located at address which has remotePub as its long-term static public key.
No description provided by the author
NewAuthInfo returns a new AuthInfo instance.
NewBrontideMachine creates a new instance of the brontide state-machine.
NewClient creates a new Client object which will handle the mailbox connection.
NewClientConn creates a new client connection with the given receive and send session identifiers.
NewClientWebsocketConn attempts to create websocket LNC client connection to a server connection listening at the given mailbox server.
NewConnData creates a new ConnData instance.
NewGrpcClient creates a new Client object which will handle the mailbox connection and will use grpc streams to connect to the mailbox.
NewListener returns a new net.Listener which enforces the Brontide scheme during both initial connection establishment and data transfer.
NewMsgData creates a new MsgData message with the given version and payload.
NewNoiseGrpcConn creates a new noise connection using given local ECDH key.
NewPassphraseEntropy generates a new one-time-use passphrase, represented as a set of mnemonic words and the raw entropy itself.
No description provided by the author
NewServerConn creates a new net.Conn compatible server connection that uses a gRPC based connection to tunnel traffic over a mailbox server.
NewWebsocketsClient creates a new Client object which will handle the mailbox connection and will use websockets to connect to the mailbox.
PassphraseEntropyToMnemonic turns the raw bytes of the passphrase entropy into human-readable mnemonic words.
PassphraseMnemonicToEntropy reverses the mnemonic word encoding and returns the raw passphrase entropy bytes.
RefreshClientConn creates a new ClientConn object with the same values as the passed ClientConn but with a new quit channel, a new closeOnce var and a new gbn connection.
RefreshServerConn returns the same ServerConn object created in NewServerConn but creates a new quit channel as well as instantiates a new GoBN connection.
UseLogger uses a specified Logger to output package logging info.
WithGrpcConn initialised the grpc client of the Client using the given connection.
WithMaxHandshakeVersion is a functional option used to set the maximum handshake version supported.
WithMinHandshakeVersion is a functional option used to set the minimum handshake version supported.

# Constants

ActTwoPayloadSize is the size of the fixed sized payload that can be sent from the responder to the Initiator in act two.
ClientStatusConnected indicates that the connection to both the mailbox server and end server was successful.
ClientStatusNotConnected means that the client is not connected at all.
ClientStatusSessionInUse means that the connection to the mailbox server was successful but that the stream for the session is already occupied by another client.
ClientStatusSessionNotFound means that the connection to the mailbox server was successful but that the mailbox with the given ID was not found.
HandshakeVersion0 is the handshake version in which the auth data is sent in a fixed sized payload in act 2.
HandshakeVersion1 is the handshake version in which the auth data is sent in a dynamically sized, length-prefixed payload in act 2.
HandshakeVersion2 is the handshake version that indicates that the KK pattern is to be used for all handshakes after the first handshake.
KK is the name of the Noise KK Handshake pattern.
MaxHandshakeVersion is the maximum handshake that we currently support.
MinHandshakeVersion is the minimum handshake version that is currently supported.
NumPassphraseEntropyBytes is the number of bytes we use for the pairing phrase.
NumPassphraseWords is the number of words we use for the pairing phrase.
ProtocolName is the name of the protocol that's used for the encrypted communication.
ProtocolVersion is the version of the protocol used for the encrypted communication.
ServerStatusIdle means that the session is ready for use but that there is currently no client connected.
ServerStatusInUse means that a client is currently connected and using the session.
ServerStatusNotConnected means that the server is currently not connected to a mailbox.
No description provided by the author
XX is the name of the Noise XX Handshake pattern that uses SPAKE2 to mask the ephemeral key sent in the first act.

# Variables

ErrMaxMessageLengthExceeded is returned a message to be written to the cipher session exceeds the maximum allowed message payload.
ErrMessageNotFlushed signals that the connection cannot accept a new message because the prior message has not been fully flushed.
KKPattern represents the KK Noise pattern in which both initiator and responder start off knowing the static remote key of the other.
No description provided by the author
XXPattern represents the XX Noise pattern using SPAKE2 to mask the ephemeral key of the first message.

# Structs

Addr is a type that implements the net.Addr interface for addresses involved in mailbox connections.
AuthInfo is a type that implements the gRPC specific credentials.AuthInfo interface that's needed for implementing a secure client/server handshake.
BrontideMachineConfig holds the config necessary to construct a new Machine object.
Client manages the mailboxConn it holds and refreshes it on connection retries.
ClientConn is a type that establishes a base transport connection to a mailbox server using a REST/WebSocket connection.
ConnData manages all the items needed for establishing a noise connection to a peer.
GrpcLogLogger is a wrapper around a btclog logger to make it compatible with the grpclog logger package.
HandshakePattern represents the Noise pattern being used.
Listener is an implementation of a net.Conn which executes an authenticated key exchange and message encryption protocol dubbed "Machine" after initial connection acceptance.
Machine is a state-machine which implements Brontide: an Authenticated-key Exchange in Three Acts.
A MessagePattern represents a Token or a stream of Tokens.
MsgData is a message that's being sent between server and client to transport higher-level application data.
NoiseAddr is a type that implements the net.Addr interface for addresses involved in noise encrypted communication over mailbox connections.
NoiseConn is an implementation of net.Conn which enforces an authenticated key exchange and message encryption protocol dubbed "Brontide" after initial TCP connection establishment.
NoiseGrpcConn is a type that implements the credentials.TransportCredentials interface and can therefore be used as a replacement of the default TLS implementation that's used by HTTP/2.
No description provided by the author
ServerConn is a type that implements the Conn interface and can be used to serve a gRPC connection over a noise encrypted connection that uses a mailbox connection as its transport connection.

# Interfaces

ClientConnTransport is an interface that hides the implementation of the underlying send and receive connections to a hashmail server.
ConnectionData is the interface that needs to be implemented by any object that the Brontide Noise Machine can use to fetch and set connection data.
ControlMsg is the interface that needs to be implemented by any message that is sent over a control connection.
ProxyConn is the main interface that any mailbox connection needs to implement.

# Type aliases

ActNum is the index of a message pattern within a handshake pattern.
ClientOption is the signature of a Client functional option.
ClientStatus is a description of the connection status of the client.
ServerStatus is a description of the server's session state.
Token represents either a public key that should be transmitted or received from the handshake peer or a DH operation that should be performed.