bls

package
v0.0.0-...-8c4653d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 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 {
	PriShare() *share.PriShare
	Polynomial() *share.PubPoly
}

type PairingSuite

type PairingSuite interface {
	G1() abstract.Suite
	G2() abstract.Suite
	GT() pbc.PairingGroup
}

type ThresholdSig

type ThresholdSig struct {
	Index int
	Sig   abstract.Point
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL