Mercurial > dropbear
comparison libtomcrypt/src/headers/tomcrypt_math.h @ 844:68facbc41273
merge again
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 01 Nov 2013 00:19:25 +0800 |
parents | ac2158e3e403 |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
834:e378da7eae5d | 844:68facbc41273 |
---|---|
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 | |
16 #ifndef MRSA | 14 #ifndef MRSA |
17 typedef void rsa_key; | 15 typedef void rsa_key; |
18 #endif | |
19 #endif | 16 #endif |
20 | 17 |
21 /** math descriptor */ | 18 /** math descriptor */ |
22 typedef struct { | 19 typedef struct { |
23 /** Name of the math provider */ | 20 /** Name of the math provider */ |
387 int (*ecc_mul2add)(ecc_point *A, void *kA, | 384 int (*ecc_mul2add)(ecc_point *A, void *kA, |
388 ecc_point *B, void *kB, | 385 ecc_point *B, void *kB, |
389 ecc_point *C, | 386 ecc_point *C, |
390 void *modulus); | 387 void *modulus); |
391 | 388 |
392 /* Dropbear has its own rsa code */ | |
393 #if 0 | |
394 /* ---- (optional) rsa optimized math (for internal CRT) ---- */ | 389 /* ---- (optional) rsa optimized math (for internal CRT) ---- */ |
395 | 390 |
396 /** RSA Key Generation | 391 /** RSA Key Generation |
397 @param prng An active PRNG state | 392 @param prng An active PRNG state |
398 @param wprng The index of the PRNG desired | 393 @param wprng The index of the PRNG desired |
414 @return CRYPT_OK on success | 409 @return CRYPT_OK on success |
415 */ | 410 */ |
416 int (*rsa_me)(const unsigned char *in, unsigned long inlen, | 411 int (*rsa_me)(const unsigned char *in, unsigned long inlen, |
417 unsigned char *out, unsigned long *outlen, int which, | 412 unsigned char *out, unsigned long *outlen, int which, |
418 rsa_key *key); | 413 rsa_key *key); |
419 #endif | |
420 } ltc_math_descriptor; | 414 } ltc_math_descriptor; |
421 | 415 |
422 extern ltc_math_descriptor ltc_mp; | 416 extern ltc_math_descriptor ltc_mp; |
423 | 417 |
424 int ltc_init_multi(void **a, ...); | 418 int ltc_init_multi(void **a, ...); |