Mercurial > dropbear
comparison libtomcrypt/testprof/tomcrypt_test.h @ 415:8b9aba1d5fa4 channel-fix
merge of '73fe066c5d9e2395354ba74756124d45c978a04d'
and 'f5014cc84558f1e8eba42dbecf9f72f94bfe6134'
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Feb 2007 16:00:18 +0000 |
parents | 0cbe8f6dbf9e |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
414:c53a26c430e5 | 415:8b9aba1d5fa4 |
---|---|
3 #define __TEST_H_ | 3 #define __TEST_H_ |
4 | 4 |
5 #include <tomcrypt.h> | 5 #include <tomcrypt.h> |
6 | 6 |
7 /* enable stack testing */ | 7 /* enable stack testing */ |
8 // #define STACK_TEST | 8 /* #define STACK_TEST */ |
9 | 9 |
10 /* stack testing, define this if stack usage goes downwards [e.g. x86] */ | 10 /* stack testing, define this if stack usage goes downwards [e.g. x86] */ |
11 #define STACK_DOWN | 11 #define STACK_DOWN |
12 | 12 |
13 typedef struct { | 13 typedef struct { |
16 } test_entry; | 16 } test_entry; |
17 | 17 |
18 extern prng_state yarrow_prng; | 18 extern prng_state yarrow_prng; |
19 | 19 |
20 void run_cmd(int res, int line, char *file, char *cmd); | 20 void run_cmd(int res, int line, char *file, char *cmd); |
21 #define DO(x) { run_cmd((x), __LINE__, __FILE__, #x); } | 21 |
22 #ifdef LTC_VERBOSE | |
23 #define DO(x) do { fprintf(stderr, "%s:\n", #x); run_cmd((x), __LINE__, __FILE__, #x); } while (0); | |
24 #else | |
25 #define DO(x) do { run_cmd((x), __LINE__, __FILE__, #x); } while (0); | |
26 #endif | |
22 | 27 |
23 /* TESTS */ | 28 /* TESTS */ |
24 int cipher_hash_test(void); | 29 int cipher_hash_test(void); |
25 int modes_test(void); | 30 int modes_test(void); |
26 int mac_test(void); | 31 int mac_test(void); |
27 int pkcs_1_test(void); | 32 int pkcs_1_test(void); |
28 int store_test(void); | 33 int store_test(void); |
29 int rsa_test(void); | 34 int rsa_test(void); |
35 int katja_test(void); | |
30 int ecc_tests(void); | 36 int ecc_tests(void); |
31 int dsa_test(void); | 37 int dsa_test(void); |
32 int dh_tests(void); | |
33 int der_tests(void); | 38 int der_tests(void); |
34 | 39 |
35 /* timing */ | 40 /* timing */ |
36 #define KTIMES 25 | 41 #define KTIMES 25 |
37 #define TIMES 100000 | 42 #define TIMES 100000 |
60 int time_hash(void); | 65 int time_hash(void); |
61 void time_mult(void); | 66 void time_mult(void); |
62 void time_sqr(void); | 67 void time_sqr(void); |
63 void time_prng(void); | 68 void time_prng(void); |
64 void time_rsa(void); | 69 void time_rsa(void); |
70 void time_dsa(void); | |
71 void time_katja(void); | |
65 void time_ecc(void); | 72 void time_ecc(void); |
66 void time_dh(void); | |
67 void time_macs_(unsigned long MAC_SIZE); | 73 void time_macs_(unsigned long MAC_SIZE); |
68 void time_macs(void); | 74 void time_macs(void); |
69 void time_encmacs(void); | 75 void time_encmacs(void); |
70 | 76 |
71 | 77 |
72 | 78 |
73 #endif | 79 #endif |
74 | 80 |
75 /* $Source: /cvs/libtom/libtomcrypt/testprof/tomcrypt_test.h,v $ */ | 81 /* $Source: /cvs/libtom/libtomcrypt/testprof/tomcrypt_test.h,v $ */ |
76 /* $Revision: 1.8 $ */ | 82 /* $Revision: 1.14 $ */ |
77 /* $Date: 2005/05/05 14:35:59 $ */ | 83 /* $Date: 2006/10/18 03:36:34 $ */ |