diff --git a/share/poly.go b/share/poly.go index 5c800cb21..b76324e6d 100644 --- a/share/poly.go +++ b/share/poly.go @@ -229,7 +229,7 @@ func xyScalar(g kyber.Group, shares []*PriShare, t, n int) (map[int]kyber.Scalar x := make(map[int]kyber.Scalar) y := make(map[int]kyber.Scalar) for _, s := range sorted { - if s == nil || s.V == nil || s.I < 0 { + if s == nil || s.V == nil { continue } idx := int(s.I) @@ -429,7 +429,7 @@ func xyCommit(g kyber.Group, shares []*PubShare, t, n int) (map[int]kyber.Scalar y := make(map[int]kyber.Point) for _, s := range sorted { - if s == nil || s.V == nil || s.I < 0 { + if s == nil || s.V == nil { continue } idx := int(s.I) diff --git a/share/vss/rabin/vss.go b/share/vss/rabin/vss.go index 53257f977..1746867f0 100644 --- a/share/vss/rabin/vss.go +++ b/share/vss/rabin/vss.go @@ -574,7 +574,7 @@ func (a *aggregator) VerifyDeal(d *Deal, inclusion bool) error { if fi.I != gi.I { return errors.New("vss: not the same index for f and g share in Deal") } - if fi.I < 0 || fi.I >= uint32(len(a.verifiers)) { + if fi.I >= uint32(len(a.verifiers)) { return errors.New("vss: index out of bounds in Deal") } // compute fi * G + gi * H