Skip to content

Commit 94d5b83

Browse files
Modified noise parameter for Paillier ciphertext in ECDSA signing.
1 parent 2cc30c6 commit 94d5b83

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mpc_protocols/mpc_ecdsa.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,16 @@ error_t ecdsa_sign_t::peer2_step2(
388388

389389
bn_t m_tag = bn_t::from_bin(data_to_sign);
390390

391-
bn_t rho = bn_t::rand((q*q) << 208); // 128 + 80 (needed to ensure statistical closeness, even though over integers)
391+
//bn_t rho = bn_t::rand((q*q) << 208); // 128 + 80 (needed to ensure statistical closeness, even though over integers)
392+
bn_t rho = bn_t::rand((q*q) << 80); // 80 (need additional noise over q*q due to refresh)
393+
392394
MODULO(q) u = m_tag / k2;
393395
bn_t u2 = rho*q + u;
394396
MODULO(q) v = r / k2;
395397

396398
bn_t c1 = share.paillier.add_scalar(share.c_key, share.x);
397-
c1 = share.paillier.add_scalar(c1, q << 208); // 128 + 80 (needed to ensure that is positive, due to slack in range proof)
399+
// c1 = share.paillier.add_scalar(c1, q << 208); // 128 + 80 (needed to ensure that is positive, due to slack in range proof)
400+
398401
bn_t c2 = share.paillier.mul_scalar(c1, v);
399402
out.c3 = share.paillier.add_scalar(c2, u2);
400403

0 commit comments

Comments
 (0)