Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check whether the threshold and size of vs is equal #291

Merged
merged 8 commits into from
Apr 18, 2024
2 changes: 1 addition & 1 deletion crypto/vss/feldman_vss.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func Create(ec elliptic.Curve, threshold int, secret *big.Int, indexes []*big.In
}

func (share *Share) Verify(ec elliptic.Curve, threshold int, vs Vs) bool {
if share.Threshold != threshold || vs == nil {
if share.Threshold != threshold || vs == nil || len(vs) != threshold+1 {
return false
}
var err error
Expand Down
Loading