Documentation
¶
Overview ¶
Package basket implements the basket pluggable transport protocol, aimed at providing post-quantum link cryptography and traffic correlation defenses to the Tor wire protocol.
Index ¶
- Variables
- func Listen(network string, laddr *net.TCPAddr, config *ServerConfig) (*basketListener, error)
- type AcceptError
- type BasketConn
- func (c *BasketConn) Close() error
- func (c *BasketConn) LocalAddr() net.Addr
- func (c *BasketConn) Read(b []byte) (n int, err error)
- func (c *BasketConn) RemoteAddr() net.Addr
- func (c *BasketConn) SetDeadline(t time.Time) error
- func (c *BasketConn) SetReadDeadline(t time.Time) error
- func (c *BasketConn) SetWriteDeadline(t time.Time) error
- func (c *BasketConn) Stats() (*BasketStats, error)
- func (c *BasketConn) Write(b []byte) (n int, err error)
- type BasketStats
- type ClientConfig
- type HandshakeMethod
- type InvalidHandshakeMethodError
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
var ErrCounterWrapped = errors.New("nonce counter wrapped")
var ErrDecryptFailed = errors.New("decrypt failed")
var ErrInvalidHandshakeRequest = errors.New("invalid handshakeRequest")
var ErrInvalidHandshakeResponse = errors.New("invalid handshakeResponse")
var ErrInvalidSignature = errors.New("invalid signature")
var ErrMalformedFrame = errors.New("malformed frame")
Functions ¶
Types ¶
type AcceptError ¶
type AcceptError struct {
Err error
}
AcceptError is the error returned from Accept that wraps the underlying failure reasons with a net.Error interface that is always Temporary().
func (*AcceptError) Error ¶
func (e *AcceptError) Error() string
func (*AcceptError) Temporary ¶
func (e *AcceptError) Temporary() bool
func (*AcceptError) Timeout ¶
func (e *AcceptError) Timeout() bool
type BasketConn ¶
BasketConn is the basket net.Conn data type.
func Dial ¶
func Dial(network string, addr *net.TCPAddr, config *ClientConfig) (*BasketConn, error)
func (*BasketConn) Close ¶
func (c *BasketConn) Close() error
func (*BasketConn) LocalAddr ¶
func (c *BasketConn) LocalAddr() net.Addr
func (*BasketConn) RemoteAddr ¶
func (c *BasketConn) RemoteAddr() net.Addr
func (*BasketConn) SetDeadline ¶
func (c *BasketConn) SetDeadline(t time.Time) error
func (*BasketConn) SetReadDeadline ¶
func (c *BasketConn) SetReadDeadline(t time.Time) error
func (*BasketConn) SetWriteDeadline ¶
func (c *BasketConn) SetWriteDeadline(t time.Time) error
func (*BasketConn) Stats ¶
func (c *BasketConn) Stats() (*BasketStats, error)
type BasketStats ¶
type BasketStats struct { RxFramingBytes uint64 RxPayloadBytes uint64 RxCoverBytes uint64 TxFramingBytes uint64 TxPayloadBytes uint64 TxCoverBytes uint64 }
BasketStats is the datastructure containing per-connection statistics.
type ClientConfig ¶
type ClientConfig struct { // Method specifies which key exchange method to use. Method HandshakeMethod // AuthKey is the optional handshake authorization shared-secret. AuthKey []byte // CertCheckFn is the routine used to validate the server's certificate. CertCheckFn func(*net.TCPAddr, cert.Certificate) error }
ClientConfig specifies the client connection configuration parameters.
type HandshakeMethod ¶
type HandshakeMethod byte
HandshakeMethod specifies the key exchange algorithm to use.
const ( // HandshakeCurve25519 is a classical Curve25519 key exchange. HandshakeCurve25519 HandshakeMethod = iota // HandshakeNTRU is Curve25519 with the server's public key transmitted on // the wire as a NTRUEncrypt ciphertext. HandshakeNTRU )
func HandshakeMethodFromString ¶
func HandshakeMethodFromString(methodStr string) (HandshakeMethod, error)
HandshakeMethodFromString returns a HandshakeMethod given a string representation of the byte value of the method.
type InvalidHandshakeMethodError ¶
type InvalidHandshakeMethodError HandshakeMethod
InvalidHandshakeMethodError is the error returned when the handshake method is invalid.
func (InvalidHandshakeMethodError) Error ¶
func (m InvalidHandshakeMethodError) Error() string
type ServerConfig ¶
type ServerConfig struct { // ServerCert is the server's certificate that is used to sign responses. ServerCert cert.Certificate // AuthKey is the optional handshake authorization shared-secret. AuthKey []byte }
ServerConfig specifies the server connection configuration parameters.
Directories
¶
Path | Synopsis |
---|---|
Package cert implements supports for basket "certificates" used to verify endpoint identity during the cryptographic handshake.
|
Package cert implements supports for basket "certificates" used to verify endpoint identity during the cryptographic handshake. |
Package kex wraps the go.crypto Curve25519 primitive for ease of use.
|
Package kex wraps the go.crypto Curve25519 primitive for ease of use. |
Package kist implements the link capacity estimation algorithm from "Never Been KIST: Tor’s Congestion Management Blossoms with Kernel-Informed Socket Transport".
|
Package kist implements the link capacity estimation algorithm from "Never Been KIST: Tor’s Congestion Management Blossoms with Kernel-Informed Socket Transport". |