Documentation
¶
Overview ¶
Package przssetup provides commit-and-reveal setup for pairwise seeds used by the PRZS sampler.
See README.md for details.
Index ¶
- Variables
- type Participant
- func (p *Participant) Round1() (*Round1Broadcast, error)
- func (p *Participant) Round2(r1bo network.RoundMessages[*Round1Broadcast]) (network.RoundMessages[*Round2P2P], error)
- func (p *Participant) Round3(r2uo network.RoundMessages[*Round2P2P]) (przs.Seeds, error)
- func (p *Participant) SharingID() sharing.ID
- type Round1Broadcast
- type Round2P2P
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidArgument indicates missing or inconsistent inputs. ErrInvalidArgument = errs.New("invalid argument") // ErrFailed captures non-recoverable protocol failures. ErrFailed = errs.New("failed") )
Functions ¶
This section is empty.
Types ¶
type Participant ¶
type Participant struct {
// contains filtered or unexported fields
}
Participant runs the PRZS seed-setup protocol.
func NewParticipant ¶
func NewParticipant(sessionID network.SID, mySharingID sharing.ID, quorum network.Quorum, tape ts.Transcript, prng io.Reader) (*Participant, error)
NewParticipant initialises the seed setup for a given session.
func (*Participant) Round1 ¶
func (p *Participant) Round1() (*Round1Broadcast, error)
Round1 samples pairwise seed contributions and commits to them.
func (*Participant) Round2 ¶
func (p *Participant) Round2(r1bo network.RoundMessages[*Round1Broadcast]) (network.RoundMessages[*Round2P2P], error)
Round2 opens committed seed contributions to each counterparty.
func (*Participant) Round3 ¶
func (p *Participant) Round3(r2uo network.RoundMessages[*Round2P2P]) (przs.Seeds, error)
Round3 verifies peers' openings and derives pairwise seeds.
func (*Participant) SharingID ¶
func (p *Participant) SharingID() sharing.ID
SharingID returns the participant identifier.
type Round1Broadcast ¶
type Round1Broadcast struct {
Commitments map[sharing.ID]hash_comm.Commitment `cbor:"commitments"`
}
func (*Round1Broadcast) Bytes ¶
func (*Round1Broadcast) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.