Fix up some slight changes.

Hack out the RSA code in tomcrypt_math.h fairly crudely, as LTC's rsa_key
collide's with Dropbear's rsa_key

--HG--
branch : libtomcrypt-dropbear
extra : convert_revision : ffd1015238ffcc959f6cd95176d96fcd0945a397
This commit is contained in:
Matt Johnston 2007-01-11 03:04:55 +00:00
parent 28ad393b00
commit 7f0dd15bab
2 changed files with 10 additions and 5 deletions

View File

@ -111,7 +111,8 @@
#ifdef DROPBEAR_3DES_CBC #ifdef DROPBEAR_3DES_CBC
#define DES #define DES
#endif #endif
#define CBC
#define LTC_CBC_MODE
#if defined(DROPBEAR_DSS) && defined(DSS_PROTOK) #if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
#define SHA512 #define SHA512
@ -123,12 +124,12 @@
#define MD5 #define MD5
#endif #endif
#define HMAC #define LTC_HMAC
/* Various tidbits of modern neatoness */ /* Various tidbits of modern neatoness */
#define BASE64 #define BASE64
/* default no functions */ /* default no pthread functions */
#define LTC_MUTEX_GLOBAL(x) #define LTC_MUTEX_GLOBAL(x)
#define LTC_MUTEX_PROTO(x) #define LTC_MUTEX_PROTO(x)
#define LTC_MUTEX_TYPE(x) #define LTC_MUTEX_TYPE(x)
@ -137,8 +138,6 @@
#define LTC_MUTEX_UNLOCK(x) #define LTC_MUTEX_UNLOCK(x)
#define FORTUNA_POOLS 0 #define FORTUNA_POOLS 0
#endif
/* Debuggers */ /* Debuggers */
/* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */ /* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */

View File

@ -11,9 +11,12 @@
typedef void ecc_point; typedef void ecc_point;
#endif #endif
/* Dropbear has its own rsa_key. We just comment this out. */
#if 0
#ifndef MRSA #ifndef MRSA
typedef void rsa_key; typedef void rsa_key;
#endif #endif
#endif
/** math descriptor */ /** math descriptor */
typedef struct { typedef struct {
@ -386,6 +389,8 @@ typedef struct {
ecc_point *C, ecc_point *C,
void *modulus); void *modulus);
/* Dropbear has its own rsa code */
#if 0
/* ---- (optional) rsa optimized math (for internal CRT) ---- */ /* ---- (optional) rsa optimized math (for internal CRT) ---- */
/** RSA Key Generation /** RSA Key Generation
@ -411,6 +416,7 @@ typedef struct {
int (*rsa_me)(const unsigned char *in, unsigned long inlen, int (*rsa_me)(const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen, int which, unsigned char *out, unsigned long *outlen, int which,
rsa_key *key); rsa_key *key);
#endif
} ltc_math_descriptor; } ltc_math_descriptor;
extern ltc_math_descriptor ltc_mp; extern ltc_math_descriptor ltc_mp;