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)
| 62 | // public key share Xi can be computed by evaluating the public sharing |
| 63 | // polynonmial at the share's index i. |
| 64 | func 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 | |
| 73 | func sliceUniqMap(s [][]byte) [][]byte { |
| 74 | seen := make(map[string]struct{}, len(s)) |