package
0.0.0-20191201205449-f379a713d0c2
Repository: https://github.com/rjected/lit.git
Documentation: pkg.go.dev

# README

lndc

The lndc package implements a secure crypto messaging protocol based off of the Noise Protocol Framework. The package exposes the raw state machine that handles the handshake and subsequent message encryption/decryption scheme. Additionally, the package exposes a net.Conn and a net.Listener interface implementation which allows the encrypted transport to be seamlessly integrated into a codebase.

The secure messaging scheme implemented within this package uses NOISE_XX as the handshake for authenticated key exchange. Please note that this is not the same as brontide which uses the NOISE_XK protocol for handshakes and lndc is not compatible with the same.

This package has intentionally been designed so it can be used as a standalone package for any projects needing secure encrypted+authenticated communications between network enabled programs.

This package requires additional attribution to that of lit since it is adapted from the original brontide package. Please see license for details.

# 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.
EphemeralGenerator is a functional option that allows callers to substitute a custom function for use when generating ephemeral keys for ActOne or ActTwo.
NewListener returns a new net.Listener which enforces the lndc scheme during both initial connection establishment and data transfer.
NewNoiseMachine creates a new instance of the lndc state-machine.

# Constants

ActOneSize is the size of the packet sent from initiator to responder in ActOne.
ActThreeSize is the size of the packet sent from initiator to responder in ActThree.
ActTwoSize is the size the packet sent from responder to initiator in ActTwo.
TODO: add support for noise_XK (brontide) as well.

# Structs

Conn is an implementation of net.Conn which enforces an authenticated key exchange and message encryption protocol based off the noise_XX protocol In the case of a successful handshake, all messages sent via the .Write() method are encrypted with an AEAD cipher along with an encrypted length-prefix.
Listener is an implementation of a net.Conn which executes an authenticated key exchange and message encryption protocol dubbed "Machine" after initial connection acceptance.
No description provided by the author