comparison libtomcrypt/src/headers/tomcrypt_math.h @ 384:a05fb340a95d

propagate from branch 'au.asn.ucc.matt.ltc.dropbear' (head ffd1015238ffcc959f6cd95176d96fcd0945a397) to branch 'au.asn.ucc.matt.dropbear' (head 52ccb0ad0587a62bc64aecb939adbb76546aac16)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 03:05:30 +0000
parents 0cbe8f6dbf9e
children ac2158e3e403
comparison
equal deleted inserted replaced
382:0cbe8f6dbf9e 384:a05fb340a95d
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, ...);