acss

package
v0.0.0-...-f83d8fb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStopped       = errors.New("process stopped")
	ErrInvalidSender = errors.New("invalid sender")
	ErrDataLength    = errors.New("data too long")
)
View Source
var ErrInvalidType = errors.New("invalid message type")

Functions

func ValidMessageType

func ValidMessageType(v byte) bool

Types

type ACSS

type ACSS struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(suite suites.Suite, conf *config.Config, dealer string) *ACSS

func (*ACSS) Close

func (a *ACSS) Close() error

func (*ACSS) Handle

func (a *ACSS) Handle(sender string, msg *Message) error

Handle must be called for each incoming message of other peers.

func (*ACSS) Input

func (a *ACSS) Input(secret kyber.Scalar)

Input is called by the dealer to start the sharing of the given secret.

func (*ACSS) Messages

func (a *ACSS) Messages() <-chan *OutMessage

Messages receives the messages to be sent to other peers.

func (*ACSS) Output

func (a *ACSS) Output() chan *crypto.Share

Output receives the final share.

func (*ACSS) Stopped

func (a *ACSS) Stopped() bool

type Message

type Message struct {
	Type MessageType
	Data []byte
}

func (*Message) MarshalBinary

func (m *Message) MarshalBinary() ([]byte, error)

func (*Message) UnmarshalBinary

func (m *Message) UnmarshalBinary(data []byte) error

type MessageError

type MessageError struct {
	SenderID string
	Type     MessageType
	Str      string
}

func (*MessageError) Error

func (e *MessageError) Error() string

type MessageType

type MessageType byte
const (
	RBC MessageType = iota
	OK
	Ready
	Implicate
	Reveal
)

func (MessageType) String

func (t MessageType) String() string

type OutMessage

type OutMessage struct {
	Receiver string
	Payload  *Message
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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