Skip to content

Commit

Permalink
check the threshold and size of vs is equal
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfsx committed Feb 22, 2024
1 parent 0a2c62d commit 0a4a457
Showing 1 changed file with 1 addition and 1 deletion.
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 {
return false
}
var err error
Expand Down

0 comments on commit 0a4a457

Please sign in to comment.