Documentation ¶
Index ¶
- func Recover(suite pairing.Suite, public *share.PubPoly, msg []byte, sigs [][]byte, ...) ([]byte, error)
- func Sign(suite pairing.Suite, private *share.PriShare, msg []byte) ([]byte, error)
- func Verify(suite pairing.Suite, public *share.PubPoly, msg, sig []byte) (int, error)
- func VerifyPartialSign(suite pairing.Suite, public *share.PubPoly, msg, sig []byte, serverId int) error
- type SigShare
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Recover ¶
func Recover(suite pairing.Suite, public *share.PubPoly, msg []byte, sigs [][]byte, t, n int) ([]byte, error)
Recover reconstructs the full BLS signature S = x * H(m) from a threshold t of signature shares Si using Lagrange interpolation. The full signature S can be verified through the regular BLS verification routine using the shared public key X. The shared public key can be computed by evaluating the public sharing polynomial at index 0.
func Sign ¶
Sign creates a threshold BLS signature Si = xi * H(m) on the given message m using the provided secret key share xi.
Types ¶
type SigShare ¶
type SigShare []byte
SigShare encodes a threshold BLS signature share Si = i || v where the 2-byte big-endian value i corresponds to the share's index and v represents the share's value. The signature share Si is a point on curve G1.