This project is an implementation of the Noise Protocol Framework in Go. The Noise Protocol Framework is a set of protocols for secure communication that can be combined to provide various levels of security and functionality. The goal of the framework is to provide a flexible and easy-to-use tool for secure communication in a variety of settings.
To install the Noise package, run:
go get github.com/galadd/noise
The Noise package provides a simple interface for building Noise protocols. The package provides a HandshakeState
type, which can be used to perform the Noise handshake. The HandshakeState
type provides methods for sending and receiving handshake messages, and for generating encryption keys.
The HandshakeState
type is initialized with a HandshakePattern
and a CipherSuite
. The HandshakePattern
specifies the handshake pattern to use, and the CipherSuite
specifies the cryptographic primitives to use. The CipherSuite
type is defined in the crypto
package, and provides a simple interface for using the cryptographic primitives.
The HandshakeState
type provides methods for sending and receiving handshake messages. The WriteMessage
method is used to send a handshake message, and the ReadMessage
method is used to receive a handshake message. The WriteMessage
method takes a payload as input, and the ReadMessage
method returns a payload as output. The payload is encrypted using the encryption keys generated by the handshake.
Contributions are welcome! Please open an issue or submit a pull request.