comparison libtomcrypt/testprof/tomcrypt_test.h @ 302:973fccb59ea4 ucc-axis-hack

propagate from branch 'au.asn.ucc.matt.dropbear' (head 11034278bd1917bebcbdc69cf53b1891ce9db121) to branch 'au.asn.ucc.matt.dropbear.ucc-axis-hack' (head 10a1f614fec73d0820c3f61160d9db409b9beb46)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 Mar 2006 12:59:58 +0000
parents 1b9e69c058d2
children 0cbe8f6dbf9e
comparison
equal deleted inserted replaced
299:740e782679be 302:973fccb59ea4
1
2 #ifndef __TEST_H_
3 #define __TEST_H_
4
5 #include <tomcrypt.h>
6
7 /* enable stack testing */
8 // #define STACK_TEST
9
10 /* stack testing, define this if stack usage goes downwards [e.g. x86] */
11 #define STACK_DOWN
12
13 typedef struct {
14 char *name, *prov, *req;
15 int (*entry)(void);
16 } test_entry;
17
18 extern prng_state yarrow_prng;
19
20 void run_cmd(int res, int line, char *file, char *cmd);
21 #define DO(x) { run_cmd((x), __LINE__, __FILE__, #x); }
22
23 /* TESTS */
24 int cipher_hash_test(void);
25 int modes_test(void);
26 int mac_test(void);
27 int pkcs_1_test(void);
28 int store_test(void);
29 int rsa_test(void);
30 int ecc_tests(void);
31 int dsa_test(void);
32 int dh_tests(void);
33 int der_tests(void);
34
35 /* timing */
36 #define KTIMES 25
37 #define TIMES 100000
38
39 extern struct list {
40 int id;
41 unsigned long spd1, spd2, avg;
42 } results[];
43
44 extern int no_results;
45
46 int sorter(const void *a, const void *b);
47 void tally_results(int type);
48 ulong64 rdtsc (void);
49
50 void t_start(void);
51 ulong64 t_read(void);
52 void init_timer(void);
53
54 /* register default algs */
55 void reg_algs(void);
56 int time_keysched(void);
57 int time_cipher(void);
58 int time_cipher2(void);
59 int time_cipher3(void);
60 int time_hash(void);
61 void time_mult(void);
62 void time_sqr(void);
63 void time_prng(void);
64 void time_rsa(void);
65 void time_ecc(void);
66 void time_dh(void);
67 void time_macs_(unsigned long MAC_SIZE);
68 void time_macs(void);
69 void time_encmacs(void);
70
71
72
73 #endif
74
75 /* $Source: /cvs/libtom/libtomcrypt/testprof/tomcrypt_test.h,v $ */
76 /* $Revision: 1.8 $ */
77 /* $Date: 2005/05/05 14:35:59 $ */