summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-06-29 08:31:27 +0200
committerWerner Koch <wk@gnupg.org>2017-07-06 10:21:36 +0200
commit208aba6f9a0475ba049f5a66fe02cf9a6214a887 (patch)
treeb76c04fbd87424ebe9a980cb17bc79a1df6cdd95
parent85a9a913da9ecc6b2cd6f743e90e49983251d706 (diff)
downloadlibgcrypt-208aba6f9a0475ba049f5a66fe02cf9a6214a887.tar.gz
rsa: Use modern MPI allocation function.
* cipher/rsa.c (secret_core_crt): Use modern function _gcry_mpi_snew. -- Eventually we want to get rid of the notion of limb sizes in mpi using code. Thus it is better to use the modern function/macro. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--cipher/rsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/rsa.c b/cipher/rsa.c
index ce73f106..575ea949 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -1026,7 +1026,7 @@ secret_core_crt (gcry_mpi_t M, gcry_mpi_t C,
r_nbits = mpi_get_nbits (P) / 4;
if (r_nbits < 96)
r_nbits = 96;
- r = mpi_alloc_secure ( (r_nbits + BITS_PER_MPI_LIMB-1)/BITS_PER_MPI_LIMB );
+ r = mpi_secure_new (r_nbits);
/* d_blind = (d mod (p-1)) + (p-1) * r */
/* m1 = c ^ d_blind mod p */