secretstream: go.cryptoscope.co/secretstream Index | Files | Directories

package secretstream

import "go.cryptoscope.co/secretstream"

Index

Package Files

client.go conn.go server.go

Constants

const NetworkString = "shs-bs"

type Addr Uses

type Addr struct {
    PubKey []byte
}

Addr wrapps a net.Addr and adds the public key

func (Addr) Network Uses

func (a Addr) Network() string

Network returns NetworkString, the network id of this protocol. Can be used with go.cryptoscope.co/netwrap to wrap the underlying connection.

func (Addr) String Uses

func (a Addr) String() string

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client can dial secret-handshake server endpoints

func NewClient Uses

func NewClient(kp secrethandshake.EdKeyPair, appKey []byte) (*Client, error)

NewClient creates a new Client with the passed keyPair and appKey

func (*Client) ConnWrapper Uses

func (c *Client) ConnWrapper(pubKey []byte) netwrap.ConnWrapper

ConnWrapper returns a connection wrapper for the client.

type Conn Uses

type Conn struct {
    // contains filtered or unexported fields
}

Conn is a boxstream wrapped net.Conn

func (*Conn) Close Uses

func (conn *Conn) Close() error

Close closes the underlying net.Conn

func (*Conn) LocalAddr Uses

func (conn *Conn) LocalAddr() net.Addr

LocalAddr returns the local net.Addr with the local public key

func (*Conn) Read Uses

func (conn *Conn) Read(p []byte) (int, error)

Read implements io.Reader.

func (*Conn) RemoteAddr Uses

func (conn *Conn) RemoteAddr() net.Addr

RemoteAddr returns the remote net.Addr with the remote public key

func (*Conn) SetDeadline Uses

func (conn *Conn) SetDeadline(t time.Time) error

SetDeadline passes the call to the underlying net.Conn

func (*Conn) SetReadDeadline Uses

func (conn *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline passes the call to the underlying net.Conn

func (*Conn) SetWriteDeadline Uses

func (conn *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline passes the call to the underlying net.Conn

func (*Conn) Write Uses

func (conn *Conn) Write(p []byte) (int, error)

Write implements io.Writer.

type Server Uses

type Server struct {
    // contains filtered or unexported fields
}

Server can create net.Listeners

func NewServer Uses

func NewServer(keyPair secrethandshake.EdKeyPair, appKey []byte) (*Server, error)

NewServer returns a Server which uses the passed keyPair and appKey

func (*Server) Addr Uses

func (s *Server) Addr() net.Addr

Addr returns the shs-bs address of the server.

func (*Server) ConnWrapper Uses

func (s *Server) ConnWrapper() netwrap.ConnWrapper

ConnWrapper returns a connection wrapper.

func (*Server) ListenerWrapper Uses

func (s *Server) ListenerWrapper() netwrap.ListenerWrapper

ListenerWrapper returns a listener wrapper.

Directories

PathSynopsis
boxstreamPackage boxstream implements npm:pull-box-stream in Go (without the pull)
internal/lo25519
secrethandshakePackage secrethandshake is a Go implementation of Dominic Tarr's secret-handshake: https://github.com/auditdrivencrypto/secret-handshake
secrethandshake/internal/extra25519blatent grep of github.com/agl/ed25519/extra25519 until we have a better solution
secrethandshake/tests

Package secretstream imports 10 packages (graph) and is imported by 16 packages. Updated 2020-03-07. Refresh now. Tools for package owners.