]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Correction in RSA encryption.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 28 May 2010 21:06:25 +0000 (23:06 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 3 Jun 2010 17:54:57 +0000 (19:54 +0200)
lib/nettle/pk.c

index 9ce6c468cf8ca7f6bc860c212bb3ee8b471f6c49..cc173cc378bec92251d03ebf9f59093b69f02b48 100644 (file)
@@ -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) {