srp

package
v0.0.0-...-1e2af45 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadServerReuse

func ReadServerReuse(r io.Reader) (bool, error)

func WriteServerReuse

func WriteServerReuse(w io.Writer, v bool) error

Types

type Client

type Client struct {
	Username string
	Identity string
	SID      string
	Nonce    []byte
	Password string
}

func NewClient

func NewClient(username, password string) *Client

func (*Client) Next

func (c *Client) Next(challenge []byte) (response []byte, err error)

func (*Client) Start

func (c *Client) Start() (mech string, ir []byte, err error)

type ClientEvidence

type ClientEvidence struct {
	Ephemeral *big.Int
	Evidence  []byte
	Options   []string
	IV        []byte
}

func (*ClientEvidence) ReadFrom

func (ce *ClientEvidence) ReadFrom(r io.Reader) error

func (*ClientEvidence) WriteTo

func (ce *ClientEvidence) WriteTo(w io.Writer) error

type ClientIdentity

type ClientIdentity struct {
	Username string
	Identity string
	SID      string
	Nonce    []byte
}

func (*ClientIdentity) ReadFrom

func (ci *ClientIdentity) ReadFrom(r io.Reader) error

func (*ClientIdentity) WriteTo

func (ci *ClientIdentity) WriteTo(w io.Writer) error

type ServerEvidence

type ServerEvidence struct {
	Evidence []byte
	IV       []byte
	SID      string
	TTL      uint16
}

func (*ServerEvidence) ReadFrom

func (se *ServerEvidence) ReadFrom(r io.Reader) error

func (*ServerEvidence) WriteTo

func (se *ServerEvidence) WriteTo(w io.Writer) error

type ServerNonce

type ServerNonce struct {
	Nonce []byte
}

func (*ServerNonce) ReadFrom

func (sn *ServerNonce) ReadFrom(r io.Reader) error

func (*ServerNonce) WriteTo

func (sn *ServerNonce) WriteTo(w io.Writer) error

type ServerProtocolElements

type ServerProtocolElements struct {
	Modulus   *big.Int
	Generator *big.Int
	Salt      []byte
	Ephemeral *big.Int
	Options   []string
}

func (*ServerProtocolElements) ReadFrom

func (spe *ServerProtocolElements) ReadFrom(r io.Reader) error

func (*ServerProtocolElements) WriteTo

func (spe *ServerProtocolElements) WriteTo(w io.Writer) error

Jump to

Keyboard shortcuts

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