comparison src/headers/tomcrypt_math.h @ 383:2c89a3a04104 libtomcrypt-dropbear

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
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 03:04:55 +0000
parents d5faf4814ddb
children
comparison
equal deleted inserted replaced
381:999a5eb4ed10 383:2c89a3a04104
9 9
10 #ifndef MECC 10 #ifndef MECC
11 typedef void ecc_point; 11 typedef void ecc_point;
12 #endif 12 #endif
13 13
14 /* Dropbear has its own rsa_key. We just comment this out. */
15 #if 0
14 #ifndef MRSA 16 #ifndef MRSA
15 typedef void rsa_key; 17 typedef void rsa_key;
18 #endif
16 #endif 19 #endif
17 20
18 /** math descriptor */ 21 /** math descriptor */
19 typedef struct { 22 typedef struct {
20 /** Name of the math provider */ 23 /** Name of the math provider */
384 int (*ecc_mul2add)(ecc_point *A, void *kA, 387 int (*ecc_mul2add)(ecc_point *A, void *kA,
385 ecc_point *B, void *kB, 388 ecc_point *B, void *kB,
386 ecc_point *C, 389 ecc_point *C,
387 void *modulus); 390 void *modulus);
388 391
392 /* Dropbear has its own rsa code */
393 #if 0
389 /* ---- (optional) rsa optimized math (for internal CRT) ---- */ 394 /* ---- (optional) rsa optimized math (for internal CRT) ---- */
390 395
391 /** RSA Key Generation 396 /** RSA Key Generation
392 @param prng An active PRNG state 397 @param prng An active PRNG state
393 @param wprng The index of the PRNG desired 398 @param wprng The index of the PRNG desired
409 @return CRYPT_OK on success 414 @return CRYPT_OK on success
410 */ 415 */
411 int (*rsa_me)(const unsigned char *in, unsigned long inlen, 416 int (*rsa_me)(const unsigned char *in, unsigned long inlen,
412 unsigned char *out, unsigned long *outlen, int which, 417 unsigned char *out, unsigned long *outlen, int which,
413 rsa_key *key); 418 rsa_key *key);
419 #endif
414 } ltc_math_descriptor; 420 } ltc_math_descriptor;
415 421
416 extern ltc_math_descriptor ltc_mp; 422 extern ltc_math_descriptor ltc_mp;
417 423
418 int ltc_init_multi(void **a, ...); 424 int ltc_init_multi(void **a, ...);