bls

package
v0.0.0-...-34685ae Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateSignatures

func AggregateSignatures(s pbc.PairingSuite, public *share.PubPoly, msg []byte, sigs []*ThresholdSig, n, t int) ([]byte, error)

AggregateSignatures takes a list of threshold signatures, verifies them against the message and the given public polynomial. If there are enough valid threshold signatures, the final BLS signature is generated.

func NewKeyPair

func NewKeyPair(s pbc.PairingSuite, r cipher.Stream) (kyber.Scalar, kyber.Point)

func Sign

func Sign(s pbc.PairingSuite, private kyber.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 pbc.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 pbc.PairingSuite, public kyber.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 ThresholdSig

type ThresholdSig struct {
	Index int
	Sig   kyber.Point
}

func ThresholdSign

func ThresholdSign(s pbc.PairingSuite, private *share.PriShare, 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