Documentation ¶
Index ¶
- type ID
- type IDSlice
- func (partyIDs IDSlice) Contains(ids ...ID) bool
- func (partyIDs IDSlice) Copy() IDSlice
- func (IDSlice) Domain() string
- func (partyIDs IDSlice) Len() int
- func (partyIDs IDSlice) Less(i, j int) bool
- func (partyIDs IDSlice) Remove(id ID) IDSlice
- func (partyIDs IDSlice) String() string
- func (partyIDs IDSlice) Swap(i, j int)
- func (partyIDs IDSlice) Valid() bool
- func (partyIDs IDSlice) WriteTo(w io.Writer) (int64, error)
- type PointMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID represents a unique identifier for a participant in our scheme.
You should think of this as a 32 byte slice. We represent it as a string to have a comparable type, but using more than 32 bytes will lead to inconsistencies because of how we use this ID numerically later.
This ID is used as an interpolation point of a polynomial sharing of the secret key.
func (ID) Domain ¶
Domain implements hash.WriterToWithDomain, and separates this type within hash.Hash.
type IDSlice ¶
type IDSlice []ID
func NewIDSlice ¶
NewIDSlice returns a sorted slice from partyIDs.
func (IDSlice) Contains ¶
Contains returns true if partyIDs contains id. Assumes that the IDSlice is valid.
func (IDSlice) Domain ¶
Domain implements hash.WriterToWithDomain, and separates this type within hash.Hash.
func (IDSlice) Remove ¶
Remove finds id in partyIDs and returns a copy of the slice if it was found.
type PointMap ¶
PointMap is a map from party ID's to points, to be easy to marshal.
When unmarshalling, EmptyPointMap must be called first, to provide a group to use to unmarshal the points.
func EmptyPointMap ¶
EmptyPointMap creates an empty PointMap with a fixed group, ready to be unmarshalled.
This needs to be used before unmarshalling, so that we have a group to unmarshal the points inside of the map.
func NewPointMap ¶
NewPointMap creates a PointMap from a map of points.