Documentation ¶
Index ¶
- func GenerateConfig(group curve.Curve, N, T int, source io.Reader, pl *pool.Pool) (map[party.ID]*config.Config, party.IDSlice)
- func HandlerLoop(id party.ID, h protocol.Handler, network *Network)
- func PartyIDs(n int) party.IDSlice
- func Rounds(rounds []round.Session, rule Rule) (error, bool)
- type Network
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶
func GenerateConfig(group curve.Curve, N, T int, source io.Reader, pl *pool.Pool) (map[party.ID]*config.Config, party.IDSlice)
GenerateConfig creates some random configuration for N parties with set threshold T over the group.
func HandlerLoop ¶
HandlerLoop blocks until the handler has finished. The result of the execution is given by Handler.Result().
Types ¶
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network simulates a point-to-point network between different parties using Go channels. The same network is used by all processes, and can be reused for different protocols. When used with test.Handler, no interaction from the user is required beyond creating the network.
func NewNetwork ¶
type Rule ¶
type Rule interface { // ModifyBefore modifies r before r.Finalize() is called. ModifyBefore(r round.Session) // ModifyAfter modifies rNext, which is the round returned by r.Finalize(). ModifyAfter(rNext round.Session) // ModifyContent modifies content for the message that is delivered in rNext. ModifyContent(rNext round.Session, to party.ID, content round.Content) }
Rule describes various hooks that can be applied to a protocol execution.
Click to show internal directories.
Click to hide internal directories.