Skip to content

Commit 560c835

Browse files
authored
Merge pull request #3 from fystack/revert
Restore Security Checks Removed in EdDSA CKD Commits
2 parents d6d511d + 8795cdb commit 560c835

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

crypto/mta/range_proof.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ func (pf *RangeProofAlice) Verify(ec elliptic.Curve, pk *paillier.PublicKey, NTi
141141
if pf.S2.Cmp(q) == -1 {
142142
return false
143143
}
144+
if pf.S.Cmp(one) == 0 {
145+
return false
146+
}
147+
if pf.Z.Cmp(one) == 0 {
148+
return false
149+
}
150+
if pf.S1.Cmp(pf.S2) == 0 {
151+
return false
152+
}
144153

145154
// 3.
146155
if pf.S1.Cmp(q3) == 1 {

crypto/vss/feldman_vss.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func Create(ec elliptic.Curve, threshold int, secret *big.Int, indexes []*big.In
9393
}
9494

9595
func (share *Share) Verify(ec elliptic.Curve, threshold int, vs Vs) bool {
96-
if share.Threshold != threshold || vs == nil {
96+
if share.Threshold != threshold || vs == nil || len(vs) != threshold+1 {
9797
return false
9898
}
9999
var err error

0 commit comments

Comments
 (0)