authority: github.com/katzenpost/authority/voting/server Index | Files | Directories

package server

import "github.com/katzenpost/authority/voting/server"

Package server implements the Katzenpost voting authority server.

Index

Package Files

rand.go server.go state.go wire_handler.go

Variables

var ErrGenerateOnly = errors.New("server: GenerateOnly set")

ErrGenerateOnly is the error returned when the server initialization terminates due to the `GenerateOnly` debug config option.

type DeterministicRandReader Uses

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

DeterministicRandReader is a random Reader whose output is a chacha20 keystream.

func NewDeterministicRandReader Uses

func NewDeterministicRandReader(key []byte) (*DeterministicRandReader, error)

NewDeterministicRandReader returns a DeterministicRandReader initialized with key.

func (*DeterministicRandReader) Int63 Uses

func (r *DeterministicRandReader) Int63() int64

Int63 returns a random int64 with most significant bit set to 0.

func (*DeterministicRandReader) Perm Uses

func (r *DeterministicRandReader) Perm(n int) []int

Perm returns the shuffled slice of integers from 0 to n.

func (*DeterministicRandReader) Read Uses

func (r *DeterministicRandReader) Read(data []byte) (int, error)

Read writes the keystream into the passed byteslice and returns the number of bytes written.

func (*DeterministicRandReader) Seed Uses

func (r *DeterministicRandReader) Seed(seed int64)

Seed initializes the DeterministicRandReader with nonce.

type Server Uses

type Server struct {
    sync.WaitGroup
    // contains filtered or unexported fields
}

Server is a voting authority server instance.

func New Uses

func New(cfg *config.Config) (*Server, error)

New returns a new Server instance parameterized with the specific configuration.

func (*Server) IdentityKey Uses

func (s *Server) IdentityKey() *eddsa.PublicKey

IdentityKey returns the running Server's identity public key.

func (*Server) RotateLog Uses

func (s *Server) RotateLog()

RotateLog rotates the log file if logging to a file is enabled.

func (*Server) Shutdown Uses

func (s *Server) Shutdown()

Shutdown cleanly shuts down a given Server instance.

func (*Server) Wait Uses

func (s *Server) Wait()

Wait waits till the server is terminated for any reason.

type SharedRandom Uses

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

SharedRandom is a container for commit-and-reveal protocol messages

func (*SharedRandom) Commit Uses

func (s *SharedRandom) Commit(epoch uint64) ([]byte, error)

Commit produces a SharedRandom commit value for the given epoch

func (*SharedRandom) GetCommit Uses

func (s *SharedRandom) GetCommit() []byte

GetCommit returns the commit value

func (*SharedRandom) Reveal Uses

func (s *SharedRandom) Reveal() []byte

Reveal returns the reveal value

func (*SharedRandom) SetCommit Uses

func (s *SharedRandom) SetCommit(rawCommit []byte)

SetCommit sets the commit value

func (*SharedRandom) Verify Uses

func (s *SharedRandom) Verify(reveal []byte) bool

Verify checks that the reveal value verifies the commit value

Directories

PathSynopsis
configPackage config implements the Katzenpost voting authority server configuration.

Package server imports 34 packages (graph) and is imported by 2 packages. Updated 2019-09-08. Refresh now. Tools for package owners.