"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "rsa-decrypt.c" between
nettle-3.7.2.tar.gz and nettle-3.7.3.tar.gz

About: Nettle is a low-level cryptographic library.

rsa-decrypt.c  (nettle-3.7.2):rsa-decrypt.c  (nettle-3.7.3)
skipping to change at line 51 skipping to change at line 51
int int
rsa_decrypt(const struct rsa_private_key *key, rsa_decrypt(const struct rsa_private_key *key,
size_t *length, uint8_t *message, size_t *length, uint8_t *message,
const mpz_t gibberish) const mpz_t gibberish)
{ {
mpz_t m; mpz_t m;
int res; int res;
mpz_init(m); mpz_init(m);
/* First check that input is in range. Since we don't have the
public key available here, we need to reconstruct n. */
mpz_mul (m, key->p, key->q);
if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, m) >= 0)
{
mpz_clear (m);
return 0;
}
rsa_compute_root(key, m, gibberish); rsa_compute_root(key, m, gibberish);
res = pkcs1_decrypt (key->size, m, length, message); res = pkcs1_decrypt (key->size, m, length, message);
mpz_clear(m); mpz_clear(m);
return res; return res;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)