Documentation
¶
Index ¶
- Variables
- func C(msg []byte, r, groupKey *ristretto255.Element) ristretto255.Scalar
- func Lambda(id peer.ID, peers []peer.ID) (*ristretto255.Scalar, error)
- type Messages
- type Nonce
- type NonceMsg
- type NoncePairs
- type PartialSigMsg
- type PartialSigs
- type Sign
- func (s *Sign) Aggregate(resp PartialSigs)
- func (s *Sign) GroupCommitment(np NoncePairs)
- func (s Sign) NonceMsg() *NonceMsg
- func (s Sign) PartialSig() *PartialSigMsg
- func (s *Sign) PartialSign(key *dkg.Keys) error
- func (s *Sign) Preprocess() error
- func (s Sign) Valid(z ristretto255.Scalar, id peer.ID, share ristretto255.Element) bool
- type Signature
Constants ¶
This section is empty.
Variables ¶
var ( // One is used to initialize the Lagrange coefficient One = append([]byte{0x01}, make([]byte, 31)...) )
Functions ¶
func C ¶
func C(msg []byte, r, groupKey *ristretto255.Element) ristretto255.Scalar
C = H(R || Y || msg)
Types ¶
type Nonce ¶
type Nonce struct { N *ristretto255.Scalar // single-use nonce C *ristretto255.Element // derived commitment share }
Nonce holds a single-use nonce generated during the preprocessing stage
type NonceMsg ¶
type NonceMsg struct { ID peer.ID D ristretto255.Element E ristretto255.Element M []byte }
NonceMsg is used to broadcast the nonce pair generated for key signing
type NoncePairs ¶
NoncePairs holds peer generated single-use nonce pairs
type PartialSigMsg ¶
type PartialSigMsg struct { ID peer.ID Z ristretto255.Scalar }
PartialSigMsg is used to broadcast the partial signature `z_i`
func (*PartialSigMsg) Decode ¶
func (p *PartialSigMsg) Decode(buf []byte) error
Decode a response message
type PartialSigs ¶
type PartialSigs map[peer.ID]PartialSigMsg
PartialSigs holds the partial signature `z_i` for each peer
type Sign ¶
type Sign struct { ID peer.ID // signer's ID Peers []peer.ID // set of t <= peers >= n Msg []byte // the message to be signed D Nonce // (d_i, D_i) E Nonce // (e_i, E_i) Rho ristretto255.Scalar // binding value ρ Ri map[peer.ID]ristretto255.Element // set of all peer commitments R_i C ristretto255.Scalar // challenge value Signature // aggregated multisignature }
Sign holds information necessary for a group sign operation
func (*Sign) Aggregate ¶
func (s *Sign) Aggregate(resp PartialSigs)
Aggregate partial signatures into a multisignature
func (*Sign) GroupCommitment ¶
func (s *Sign) GroupCommitment(np NoncePairs)
GroupCommitment derives the group commitment R from the set of all nonce pairs
func (Sign) PartialSig ¶
func (s Sign) PartialSig() *PartialSigMsg
PartialSig extracts the partial signature `z_i` from a signature run
func (*Sign) PartialSign ¶
PartialSign calculates a partial signature z over a challenge value and a secret share
func (*Sign) Preprocess ¶
Preprocess filters the peer list and generates a nonce pair
func (Sign) Valid ¶
func (s Sign) Valid(z ristretto255.Scalar, id peer.ID, share ristretto255.Element) bool
Valid ensures a partial signature was derived correctly
type Signature ¶
type Signature struct { R ristretto255.Element Z ristretto255.Scalar }
Signature holds a Schnorr multisignature generated using >= t secret shares <= n and verified using the group public key