summaryrefslogtreecommitdiff
path: root/rsa-sign.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2016-06-20 20:04:56 +0200
committerNiels Möller <nisse@lysator.liu.se>2016-06-20 20:04:56 +0200
commit3fe1d6549765ecfb24f0b80b2ed086fdc818bff3 (patch)
tree6bc137df6e38bd4bb5de9007023d1d745f34250c /rsa-sign.c
parentb4115a0abeef459dde9a466ccec98e064fac88ee (diff)
downloadnettle-3fe1d6549765ecfb24f0b80b2ed086fdc818bff3.tar.gz
Use mpz_powm_sec.
Diffstat (limited to 'rsa-sign.c')
-rw-r--r--rsa-sign.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa-sign.c b/rsa-sign.c
index eba7388d..48323527 100644
--- a/rsa-sign.c
+++ b/rsa-sign.c
@@ -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);