Added define LTC_RSA_BLINDING to be able to disable rsa blinding
This commit is contained in:
@@ -289,10 +289,10 @@
|
||||
#ifndef LTC_NO_MATH
|
||||
|
||||
/* LibTomMath */
|
||||
/* #define LTM_LTC_DESC */
|
||||
/* #define LTM_DESC */
|
||||
|
||||
/* TomsFastMath */
|
||||
/* #define TFM_LTC_DESC */
|
||||
/* #define TFM_DESC */
|
||||
|
||||
#endif /* LTC_NO_MATH */
|
||||
|
||||
@@ -302,6 +302,9 @@
|
||||
/* Include RSA support */
|
||||
#define LTC_MRSA
|
||||
|
||||
/* Enable RSA blinding when doing private key operations? */
|
||||
/* #define LTC_RSA_BLINDING */
|
||||
|
||||
/* Include Diffie-Hellman support */
|
||||
#ifndef GPM_DESC
|
||||
/* is_prime fails for GPM */
|
||||
@@ -382,6 +385,11 @@
|
||||
#define LTC_PKCS_1
|
||||
#endif
|
||||
|
||||
#if defined(TFM_DESC) && defined(LTC_RSA_BLINDING)
|
||||
#warning RSA blinding currently not supported in combination with TFM
|
||||
#undef LTC_RSA_BLINDING
|
||||
#endif
|
||||
|
||||
#if defined(LTC_DER) && !defined(MPI)
|
||||
#error ASN.1 DER requires MPI functionality
|
||||
#endif
|
||||
|
||||
@@ -431,6 +431,15 @@ typedef struct {
|
||||
@return CRYPT_OK on success
|
||||
*/
|
||||
int (*submod)(void *a, void *b, void *c, void *d);
|
||||
|
||||
/* ---- misc stuff ---- */
|
||||
/** Make a pseudo-random mpi
|
||||
@param a The mpi to make random
|
||||
@param size The desired length
|
||||
@return CRYPT_OK on success
|
||||
*/
|
||||
int (*rand)(void *a, int size);
|
||||
|
||||
} ltc_math_descriptor;
|
||||
|
||||
extern ltc_math_descriptor ltc_mp;
|
||||
@@ -515,6 +524,8 @@ extern const ltc_math_descriptor gmp_desc;
|
||||
|
||||
#define mp_tohex(a, b) mp_toradix(a, b, 16)
|
||||
|
||||
#define mp_rand(a, b) ltc_mp.rand(a, b)
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
|
||||
Reference in New Issue
Block a user