ecdsa/keygen: ensure paillier modulus == paillierModulusLen

This commit is contained in:
creamwhip
2021-10-18 14:29:31 +08:00
parent cf960baa49
commit d70c605c98

View File

@@ -49,7 +49,7 @@ func (round *round2) Start() *tss.Error {
r1msg.UnmarshalAuthEcdsaPK(),
r1msg.UnmarshalAuthPaillierSignature()
if paillierPKj.N.BitLen() < paillierModulusLen-12 {
if paillierPKj.N.BitLen() < paillierModulusLen {
return round.WrapError(errors.New("the Paillier PK bit length is too small. It may have been"+
" maliciously set by the other party"), msg.GetFrom())
}