auth

package
v0.0.0-...-cd85d4b Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAC_KEY_SIZE = 16
	ENC_KEY_SIZE = 16
)
View Source
const (
	AUTH_MIN_DURATION = (10 * time.Second) // 10 sec
	AUTH_DELAY_RATE   = (1 * time.Second)  // increase 1 sec per retry
	AUTH_RETRY_LIMIT  = 10
)

Variables

This section is empty.

Functions

func GeneratePartialAuthenticationParams

func GeneratePartialAuthenticationParams(cred []byte, n, k int) ([][]byte, error)

func PI

func PI(password []byte) *big.Int

Types

type AuthClient

type AuthClient struct {
	X *big.Int
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cred []byte, n, k int) *AuthClient

func (*AuthClient) Done

func (c *AuthClient) Done(phase int) bool

func (*AuthClient) GetCipherKey

func (c *AuthClient) GetCipherKey() ([]byte, error)

func (*AuthClient) Initiate

func (c *AuthClient) Initiate(nodes []node.Node) (map[uint64][]byte, error)

func (*AuthClient) ProcessResponse

func (c *AuthClient) ProcessResponse(phase int, data []byte, peer node.Node) (res map[uint64][]byte, err error)

type AuthKey

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

type AuthParams

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

type AuthPartialSecret

type AuthPartialSecret struct {
	sss.Coordinate

	Xi []byte
	Ni []byte
	Pi []byte
	// contains filtered or unexported fields
}

type AuthServer

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

func NewServer

func NewServer(ss []byte, proof []byte) (*AuthServer, error)

func (*AuthServer) MakeResponse

func (s *AuthServer) MakeResponse(phase int, req []byte) (res []byte, done bool, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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