Changes to update Tomato RAF.
[tomato.git] / release / src / router / dropbear / libtomcrypt / src / headers / tomcrypt_custom.h
blob12bdb7fc8d5bbce24f7e17bb041542d6818fad05
1 #ifndef TOMCRYPT_CUSTOM_H_
2 #define TOMCRYPT_CUSTOM_H_
4 /* this will sort out which stuff based on the user-config in options.h */
5 #include "options.h"
7 /* macros for various libc functions you can change for embedded targets */
8 #ifndef XMALLOC
9 #ifdef malloc
10 #define LTC_NO_PROTOTYPES
11 #endif
12 #define XMALLOC malloc
13 #endif
14 #ifndef XREALLOC
15 #ifdef realloc
16 #define LTC_NO_PROTOTYPES
17 #endif
18 #define XREALLOC realloc
19 #endif
20 #ifndef XCALLOC
21 #ifdef calloc
22 #define LTC_NO_PROTOTYPES
23 #endif
24 #define XCALLOC calloc
25 #endif
26 #ifndef XFREE
27 #ifdef free
28 #define LTC_NO_PROTOTYPES
29 #endif
30 #define XFREE free
31 #endif
33 #ifndef XMEMSET
34 #ifdef memset
35 #define LTC_NO_PROTOTYPES
36 #endif
37 #define XMEMSET memset
38 #endif
39 #ifndef XMEMCPY
40 #ifdef memcpy
41 #define LTC_NO_PROTOTYPES
42 #endif
43 #define XMEMCPY memcpy
44 #endif
45 #ifndef XMEMCMP
46 #ifdef memcmp
47 #define LTC_NO_PROTOTYPES
48 #endif
49 #define XMEMCMP memcmp
50 #endif
51 #ifndef XSTRCMP
52 #ifdef strcmp
53 #define LTC_NO_PROTOTYPES
54 #endif
55 #define XSTRCMP strcmp
56 #endif
58 #ifndef XCLOCK
59 #define XCLOCK clock
60 #endif
61 #ifndef XCLOCKS_PER_SEC
62 #define XCLOCKS_PER_SEC CLOCKS_PER_SEC
63 #endif
65 #define LTC_NO_PRNGS
66 #define LTC_NO_PK
67 #ifdef DROPBEAR_SMALL_CODE
68 #define LTC_SMALL_CODE
69 #endif
70 /* These spit out warnings etc */
71 #define LTC_NO_ROLC
73 /* Enable self-test test vector checking */
74 /* Not for dropbear */
75 /*#define LTC_TEST*/
77 /* clean the stack of functions which put private information on stack */
78 /* #define LTC_CLEAN_STACK */
80 /* disable all file related functions */
81 #define LTC_NO_FILE
83 /* disable all forms of ASM */
84 /* #define LTC_NO_ASM */
86 /* disable FAST mode */
87 /* #define LTC_NO_FAST */
89 /* disable BSWAP on x86 */
90 /* #define LTC_NO_BSWAP */
93 #ifdef DROPBEAR_BLOWFISH
94 #define BLOWFISH
95 #endif
97 #ifdef DROPBEAR_AES
98 #define RIJNDAEL
99 #endif
101 #ifdef DROPBEAR_TWOFISH
102 #define TWOFISH
104 /* enabling just TWOFISH_SMALL will make the binary ~1kB smaller, turning on
105 * TWOFISH_TABLES will make it a few kB bigger, but perhaps reduces runtime
106 * memory usage? */
107 #define TWOFISH_SMALL
108 /*#define TWOFISH_TABLES*/
109 #endif
111 #ifdef DROPBEAR_3DES
112 #define DES
113 #endif
115 #define LTC_CBC_MODE
117 #ifdef DROPBEAR_ENABLE_CTR_MODE
118 #define LTC_CTR_MODE
119 #endif
121 #if defined(DROPBEAR_DSS) && defined(DSS_PROTOK)
122 #define SHA512
123 #endif
125 #define SHA1
127 #ifdef DROPBEAR_MD5_HMAC
128 #define MD5
129 #endif
131 #define LTC_HMAC
133 /* Various tidbits of modern neatoness */
134 #define BASE64
136 /* default no pthread functions */
137 #define LTC_MUTEX_GLOBAL(x)
138 #define LTC_MUTEX_PROTO(x)
139 #define LTC_MUTEX_TYPE(x)
140 #define LTC_MUTEX_INIT(x)
141 #define LTC_MUTEX_LOCK(x)
142 #define LTC_MUTEX_UNLOCK(x)
143 #define FORTUNA_POOLS 0
145 /* Debuggers */
147 /* define this if you use Valgrind, note: it CHANGES the way SOBER-128 and RC4 work (see the code) */
148 /* #define LTC_VALGRIND */
150 #endif
154 /* $Source: /cvs/libtom/libtomcrypt/src/headers/tomcrypt_custom.h,v $ */
155 /* $Revision: 1.66 $ */
156 /* $Date: 2006/12/04 02:50:11 $ */