diff options
author | Niels Möller <nisse@lysator.liu.se> | 2016-06-20 20:04:56 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2016-06-20 20:04:56 +0200 |
commit | 3fe1d6549765ecfb24f0b80b2ed086fdc818bff3 (patch) | |
tree | 6bc137df6e38bd4bb5de9007023d1d745f34250c /rsa-sign.c | |
parent | b4115a0abeef459dde9a466ccec98e064fac88ee (diff) | |
download | nettle-3fe1d6549765ecfb24f0b80b2ed086fdc818bff3.tar.gz |
Use mpz_powm_sec.
Diffstat (limited to 'rsa-sign.c')
-rw-r--r-- | rsa-sign.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -96,11 +96,11 @@ rsa_compute_root(const struct rsa_private_key *key, /* Compute xq = m^d % q = (m%q)^b % q */ mpz_fdiv_r(xq, m, key->q); - mpz_powm(xq, xq, key->b, key->q); + mpz_powm_sec(xq, xq, key->b, key->q); /* Compute xp = m^d % p = (m%p)^a % p */ mpz_fdiv_r(xp, m, key->p); - mpz_powm(xp, xp, key->a, key->p); + mpz_powm_sec(xp, xp, key->a, key->p); /* Set xp' = (xp - xq) c % p. */ mpz_sub(xp, xp, xq); |