seep

package module
v0.0.0-...-a9ad23c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2017 License: MIT Imports: 7 Imported by: 0

README

SEEP

GoDoc

SEEP, short for Socket Extensible Encryption Protocol, is a socket encryption protocol based on the noise protocol framwork and XDR (external data representation).

This package also comes with an RPC codec, loosely based on SEEP and an encoding format (XDR and GOB are supported).

Documentation

Overview

SEEP, short for Socket Extensible Encryption Protocol, is a socket encryption protocol based on the noise protocol framwork and XDR (external data representation). This package also comes with an RPC codec, loosely based on SEEP and an encoding format (XDR and GOB are supported).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGobRpcClient

func NewGobRpcClient(src *xdr.Decoder, dst *xdr.Encoder, nc noise.Config, c io.Closer) (rpc.ClientCodec, error)

Creates a client side RPC codec, that uses GOB as format to encode structures.

func NewGobRpcSource

func NewGobRpcSource(src *xdr.Decoder, dst *xdr.Encoder, nc noise.Config, c io.Closer) (rpc.ServerCodec, error)

Creates a server side RPC codec, that uses GOB as format to encode structures.

func NewRpcClient

func NewRpcClient(src *xdr.Decoder, dst *xdr.Encoder, nc noise.Config, c io.Closer) (rpc.ClientCodec, error)

Creates a client side RPC codec, that uses XDR as format to encode structures.

func NewRpcSource

func NewRpcSource(src *xdr.Decoder, dst *xdr.Encoder, nc noise.Config, c io.Closer) (rpc.ServerCodec, error)

Creates a client side RPC codec, that uses XDR as format to encode structures.

Types

type Connection

type Connection struct {
	io.Writer
	io.Reader
	// contains filtered or unexported fields
}

The Connection is a simple object acting as reader and writer, carrying the minimal information needed to perform the noise protocol handshake. After the call to the .Init() method, the connection can be written to, so that the data is being send during the handshake. However, this data is not encrypted using a private key, so no secrecy for this data is given.

c := new(seep.Connection)
c.Init()
c.Write(someData) // this data is sent during the handshake.
err := c.Handshake(src,dst,cfg)
// ... check error
// use c as Reader and Writer

func (*Connection) Handshake

func (c *Connection) Handshake(src *xdr.Decoder, dst *xdr.Encoder, nc noise.Config) error

func (*Connection) Init

func (c *Connection) Init()

type Reader

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

func NewReader

func NewReader(src *xdr.Decoder, dec *noise.CipherState) *Reader

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

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

func NewWriter

func NewWriter(dst *xdr.Encoder, enc *noise.CipherState) *Writer

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL