Documentation
¶
Overview ¶
Package icy implements a secure, pipelined transport using the Noise Protocol and XChaCha20-Poly1305.
Index ¶
Constants ¶
const MaxFrameSize = 0xFFFFFF // 16MB
Variables ¶
var ( ErrFrameTooLarge = errors.New("icy: frame too large") ErrDecrypt = errors.New("icy: decrypt failed") ErrHandshakeIncomplete = errors.New("icy: handshake incomplete") ErrInvalidHeader = errors.New("icy: invalid header") ErrSessionIDMismatch = errors.New("icy: session ID mismatch") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Pattern *noise.HandshakePattern
KeyPair *noise.KeyPair
RemotePublicKey []byte
}
Config holds configuration for the Noise handshake.
type Conn ¶
Conn represents a secure, bidirectional transport for encrypted communication. It implements io.ReadWriteCloser and embeds textproto.Pipeline for concurrent request/response pipelining over a Noise-authenticated channel.
func NewConn ¶
NewConn performs a Noise handshake over rwc and returns a new encrypted Conn using rwc for I/O.
func (*Conn) HandshakeHash ¶
HandshakeHash returns the handshake hash.
func (*Conn) RemotePublicKey ¶
RemotePublicKey returns the remote static public key.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader reads length-prefixed frames from an underlying reader and decrypts them.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session holds the state of an established Noise session.
func (*Session) HandshakeHash ¶
HandshakeHash returns the handshake hash, useful for channel binding.
func (*Session) RemotePublicKey ¶
RemotePublicKey returns the remote static public key.