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
+10 -2
View File
@@ -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
+11
View File
@@ -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$ */