Added define LTC_RSA_BLINDING to be able to disable rsa blinding

This commit is contained in:
Steffen Jaeckel
2011-03-21 22:50:49 +01:00
parent 380693edd9
commit 8dc8a2d551
6 changed files with 75 additions and 24 deletions
+9
View File
@@ -409,6 +409,13 @@ static int isprime(void *a, int *b)
return CRYPT_OK;
}
static int set_rand(void *a, int size)
{
LTC_ARGCHK(a != NULL);
mpz_random(a, size);
return CRYPT_OK;
}
const ltc_math_descriptor gmp_desc = {
"GNU MP",
sizeof(mp_limb_t) * CHAR_BIT - GMP_NAIL_BITS,
@@ -492,6 +499,8 @@ const ltc_math_descriptor gmp_desc = {
&addmod,
&submod,
&set_rand,
};
+9 -1
View File
@@ -408,7 +408,13 @@ static int isprime(void *a, int *b)
err = mpi_to_ltc_error(mp_prime_is_prime(a, 8, b));
*b = (*b == MP_YES) ? LTC_MP_YES : LTC_MP_NO;
return err;
}
}
static int set_rand(void *a, int size)
{
LTC_ARGCHK(a != NULL);
return mpi_to_ltc_error(mp_rand(a, size));
}
const ltc_math_descriptor ltm_desc = {
@@ -494,6 +500,8 @@ const ltc_math_descriptor ltm_desc = {
&addmod,
&submod,
&set_rand,
};
+2
View File
@@ -787,6 +787,8 @@ const ltc_math_descriptor tfm_desc = {
&addmod,
&submod,
NULL,
};