Skip to content

Commit

Permalink
check whether the threshold and size of vs is equal (#291)
Browse files Browse the repository at this point in the history
* use *common.SignatureData instead of common.SignatureData to fix issue #163

* upgrade dependencies version

* check the threshold and size of vs is equal

* fix bug
  • Loading branch information
asdfsx authored Apr 18, 2024
1 parent 7113b68 commit 843de68
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+1 {
return false
}
var err error
Expand Down

0 comments on commit 843de68

Please sign in to comment.