Added define LTC_RSA_BLINDING to be able to disable rsa blinding
This commit is contained in:
@@ -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
@@ -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,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -787,6 +787,8 @@ const ltc_math_descriptor tfm_desc = {
|
||||
&addmod,
|
||||
&submod,
|
||||
|
||||
NULL,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user