MCPcopy Create free account
hub / github.com/DOSNetwork/core / Verify

Function Verify

sign/tbls/tbls.go:64–71  ·  view source on GitHub ↗

Verify checks the given threshold BLS signature Si on the message m using the public key share Xi that is associated to the secret key share xi. This public key share Xi can be computed by evaluating the public sharing polynonmial at the share's index i.

(suite suites.Suite, public *share.PubPoly, msg, sig []byte)

Source from the content-addressed store, hash-verified

62// public key share Xi can be computed by evaluating the public sharing
63// polynonmial at the share's index i.
64func Verify(suite suites.Suite, public *share.PubPoly, msg, sig []byte) error {
65 s := SigShare(sig)
66 i, err := s.Index()
67 if err != nil {
68 return err
69 }
70 return bls.Verify(suite, public.Eval(i).V, msg, s.Value())
71}
72
73func sliceUniqMap(s [][]byte) [][]byte {
74 seen := make(map[string]struct{}, len(s))

Callers

nothing calls this directly

Calls 4

SigShareTypeAlias · 0.85
ValueMethod · 0.80
IndexMethod · 0.45
EvalMethod · 0.45

Tested by

no test coverage detected