comparison testprof/tomcrypt_test.h @ 381:999a5eb4ed10 libtomcrypt-dropbear

propagate from branch 'au.asn.ucc.matt.ltc.orig' (head 52840647ac7f5c707c3bd158d119a15734a7ef28) to branch 'au.asn.ucc.matt.ltc.dropbear' (head 20dccfc09627970a312d77fb41dc2970b62689c3)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 02:39:21 +0000
parents d5faf4814ddb
children
comparison
equal deleted inserted replaced
281:997e6f7dc01e 381:999a5eb4ed10
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 $ */