Documentation
¶
Index ¶
- func Aggregate(partialSigs []*bls_sig.PartialSignature) (*bls_sig.Signature, error)
- func CombineShares(shares []*bls_sig.SecretKeyShare, t, n int) (*bls_sig.SecretKey, error)
- func Keygen() (*bls_sig.PublicKey, *bls_sig.SecretKey, error)
- func KeygenWithSeed(reader io.Reader) (*bls_sig.PublicKey, *bls_sig.SecretKey, error)
- func PartialSign(sks *bls_sig.SecretKeyShare, msg []byte) (*bls_sig.PartialSignature, error)
- func Scheme() *bls_sig.SigEth2
- func Sign(sk *bls_sig.SecretKey, msg []byte) (*bls_sig.Signature, error)
- func SplitSecret(secret *bls_sig.SecretKey, t, n int, reader io.Reader) ([]*bls_sig.SecretKeyShare, *share.FeldmanVerifier, error)
- func Verify(pk *bls_sig.PublicKey, msg []byte, sig *bls_sig.Signature) (bool, error)
- func VerifyAndAggregate(tss TSS, partialSigs []*bls_sig.PartialSignature, msg []byte) (*bls_sig.Signature, []byte, error)
- type TSS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶
func Aggregate(partialSigs []*bls_sig.PartialSignature) (*bls_sig.Signature, error)
Aggregate returns an aggregated signature.
func CombineShares ¶ added in v0.7.0
CombineShares returns the root/group secret by combining threshold secret shares.
func KeygenWithSeed ¶ added in v0.3.0
KeygenWithSeed returns a new BLS key pair seeded from the reader.
func PartialSign ¶
func PartialSign(sks *bls_sig.SecretKeyShare, msg []byte) (*bls_sig.PartialSignature, error)
PartialSign signs given message(msg) using given Secret Key Share(sks) and returns a Partial Signature.
func SplitSecret ¶ added in v0.3.0
func SplitSecret(secret *bls_sig.SecretKey, t, n int, reader io.Reader) ([]*bls_sig.SecretKeyShare, *share.FeldmanVerifier, error)
SplitSecret splits the secret and returns n secret shares and t verifiers.
func VerifyAndAggregate ¶
func VerifyAndAggregate(tss TSS, partialSigs []*bls_sig.PartialSignature, msg []byte) (*bls_sig.Signature, []byte, error)
VerifyAndAggregate verifies all partial signatures against a message and aggregates them. It returns the aggregated signature and slice of valid partial signature identifiers.
Types ¶
type TSS ¶
type TSS struct {
// contains filtered or unexported fields
}
TSS (threshold signing scheme) wraps PubKey (PublicKey), Pubshares (the public shares corresponding to each secret key share) and threshold (number of shares).
func GenerateTSS ¶
GenerateTSS returns a new random instance of threshold signing scheme and associated SecretKeyShares. It generates n number of secret key shares where t of them can be combined to sign a message.
func (TSS) PublicShare ¶
PublicShare returns a share's public key by share index (identifier).