Documentation
¶
Index ¶
- func AggregateSignatures(s PairingSuite, public *share.PubPoly, msg []byte, sigs []*ThresholdSig, ...) ([]byte, error)
- func NewKeyPair(s PairingSuite, r cipher.Stream) (abstract.Scalar, abstract.Point)
- func Sign(s PairingSuite, private abstract.Scalar, msg []byte) []byte
- func ThresholdVerify(s PairingSuite, public *share.PubPoly, msg []byte, sig *ThresholdSig) bool
- func Verify(s PairingSuite, public abstract.Point, msg, sig []byte) error
- type DistKeyShare
- type PairingSuite
- type ThresholdSig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateSignatures ¶
func AggregateSignatures(s PairingSuite, public *share.PubPoly, msg []byte, sigs []*ThresholdSig, n, t int) ([]byte, error)
func NewKeyPair ¶
func Sign ¶
func Sign(s PairingSuite, private abstract.Scalar, msg []byte) []byte
Performs a BLS signature operation. Namely, it computes:
x * H(m) as a point on G1
where x is the private key, and m the message.
func ThresholdVerify ¶
func ThresholdVerify(s PairingSuite, public *share.PubPoly, msg []byte, sig *ThresholdSig) bool
ThresholdVerify verifies that the threshold signature is have been correctly generated from the private share generated during a DKG.
func Verify ¶
func Verify(s PairingSuite, public abstract.Point, msg, sig []byte) error
Verify checks the signature. Namely, it checks the equivalence between
e(H(m),X) == e(H(m), G2^x) == e(H(m)^x, G2) == e(s, G2)
where m is the message, X the public key from G2, s the signature and G2 the base point from which the public key have been generated.
Types ¶
type DistKeyShare ¶
type DistKeyShare interface {}
type PairingSuite ¶
type ThresholdSig ¶
func ThresholdSign ¶
func ThresholdSign(s PairingSuite, d DistKeyShare, msg []byte) *ThresholdSig
ThresholdSign generates the regular BLS signature and also computes a discrete log equality proof to show that the signature have been correctly generated from the private share generated during a DKG.
Click to show internal directories.
Click to hide internal directories.