From: Nikos Mavrogiannopoulos Date: Fri, 28 May 2010 21:06:25 +0000 (+0200) Subject: Correction in RSA encryption. X-Git-Tag: gnutls_2_11_3~235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=329361fbd8ef93abcfce00a45ac5a8ce86827f4a;p=thirdparty%2Fgnutls.git Correction in RSA encryption. --- diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c index 9ce6c468cf..cc173cc378 100644 --- a/lib/nettle/pk.c +++ b/lib/nettle/pk.c @@ -92,9 +92,9 @@ _wrap_nettle_pk_encrypt(gnutls_pk_algorithm_t algo, return GNUTLS_E_MPI_SCAN_FAILED; } - mpz_powm(p, p, TOMPZ(pk_params->params[1]), TOMPZ(pk_params->params[0])); + mpz_powm(p, p, TOMPZ(pk_params->params[1])/*e*/, TOMPZ(pk_params->params[0]/*m*/)); - ret = _gnutls_mpi_dprint(p, ciphertext); + ret = _gnutls_mpi_dprint_size(p, ciphertext, plaintext->size); _gnutls_mpi_release(&p); if (ret < 0) {